react-aptor
Advanced tools
Comparing version 2.0.0-alpha.1 to 2.0.0
import type { DependencyList, Ref, RefObject } from 'react'; | ||
export declare type APIGenerator = () => unknown; | ||
export declare type GetAPI<TInstance, TParams> = (instance: TInstance | null, prams?: TParams) => APIGenerator; | ||
export declare type Instantiate<TInstance, TElement, TParams> = (node: TElement | null, params?: TParams) => TInstance; | ||
export declare type Destroy<TInstance, TParams> = (instance: TInstance, params?: TParams) => void; | ||
export type APIGenerator = () => unknown; | ||
export type GetAPI<TInstance, TParams> = (instance: TInstance | null, prams?: TParams) => APIGenerator; | ||
export type Instantiate<TInstance, TElement, TParams> = (node: TElement | null, params?: TParams) => TInstance; | ||
export type Destroy<TInstance, TParams> = (instance: TInstance, params?: TParams) => void; | ||
export interface AptorConfiguration<TInstance, TElement, TParams> { | ||
@@ -7,0 +7,0 @@ getAPI: GetAPI<TInstance, TParams>; |
12
index.js
@@ -11,12 +11,10 @@ 'use strict'; | ||
} | ||
var _useState = react.useState(null), | ||
instance = _useState[0], | ||
setInstance = _useState[1]; | ||
instance = _useState[0], | ||
setInstance = _useState[1]; | ||
var domRef = react.useRef(null); | ||
var instantiate = configuration.instantiate, | ||
destroy = configuration.destroy, | ||
getAPI = configuration.getAPI, | ||
params = configuration.params; | ||
destroy = configuration.destroy, | ||
getAPI = configuration.getAPI, | ||
params = configuration.params; | ||
react.useEffect(function () { | ||
@@ -23,0 +21,0 @@ var instanceReference = instantiate(domRef.current, params); |
{ | ||
"name": "react-aptor", | ||
"version": "2.0.0-alpha.1", | ||
"version": "2.0.0", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "React API connector", |
@@ -11,5 +11,2 @@ <h1 align="center">React Aptor</h1> | ||
<p align="center"> | ||
<a href="https://github.com/realamirhe/react-aptor/blob/master/license"> | ||
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="license" /> | ||
</a> | ||
<a href="https://npmjs.org/package/react-aptor"> | ||
@@ -20,6 +17,9 @@ <img src="https://img.shields.io/npm/dt/react-aptor.svg" alt="downloads" /> | ||
<img src="https://img.shields.io/bundlephobia/minzip/react-aptor.svg" alt="bundle size" /> | ||
</a> | ||
<a href="https://lgtm.com/projects/g/realamirhe/react-aptor/context:javascript"> | ||
</a> | ||
<!-- <a href="https://lgtm.com/projects/g/realamirhe/react-aptor/context:javascript"> | ||
<img src="https://img.shields.io/lgtm/grade/javascript/g/realamirhe/react-aptor.svg?logo=lgtm&logoWidth=18" alt="Language grade: JavaScript" /> | ||
</a> | ||
</a> --> | ||
<a href="https://paka.dev/npm/react-aptor@latest/api"> | ||
<img src="https://paka.dev/badges/v0/cute.svg" alt="Docs" /> | ||
</a> | ||
</p> | ||
@@ -354,3 +354,3 @@ | ||
💻 Developer/Maintainer (**BTC**): | ||
`bc1qq8qq63ex7svkkjdjn5axu8angfxytvs83nlujk` | ||
`1KMz71heaNaE6myAssRH54rUKXPdbwZp5j` | ||
@@ -362,7 +362,7 @@ 🎨 Designer (**BTC**): | ||
![#c7589e](https://via.placeholder.com/30/c7589e/000000?text=+ '#c7589e') | ||
![#ed5b6e](https://via.placeholder.com/30/ed5b6e/000000?text=+ '#ed5b6e') | ||
![#f9b919](https://via.placeholder.com/30/f9b919/000000?text=+ '#f9b919') | ||
![#26abe2](https://via.placeholder.com/30/26abe2/000000?text=+ '#26abe2') | ||
![#129f4d](https://via.placeholder.com/30/129f4d/000000?text=+ '#129f4d') | ||
![#c7589e](https://i.stack.imgur.com/YuJd9.png '#c7589e') | ||
![#ed5b6e](https://i.stack.imgur.com/7ssUA.png '#ed5b6e') | ||
![#f9b919](https://i.stack.imgur.com/31VUW.png '#f9b919') | ||
![#26abe2](https://i.stack.imgur.com/y3o2u.png '#26abe2') | ||
![#129f4d](https://i.stack.imgur.com/mWeRk.png '#129f4d') | ||
@@ -369,0 +369,0 @@ ## Samples |
@@ -11,12 +11,10 @@ (function (global, factory) { | ||
} | ||
var _useState = react.useState(null), | ||
instance = _useState[0], | ||
setInstance = _useState[1]; | ||
instance = _useState[0], | ||
setInstance = _useState[1]; | ||
var domRef = react.useRef(null); | ||
var instantiate = configuration.instantiate, | ||
destroy = configuration.destroy, | ||
getAPI = configuration.getAPI, | ||
params = configuration.params; | ||
destroy = configuration.destroy, | ||
getAPI = configuration.getAPI, | ||
params = configuration.params; | ||
react.useEffect(function () { | ||
@@ -23,0 +21,0 @@ var instanceReference = instantiate(domRef.current, params); |
import type { DependencyList, Ref, RefObject } from 'react'; | ||
export declare type APIGenerator = () => unknown; | ||
export declare type GetAPI<TInstance, TParams> = (instance: TInstance | null, prams?: TParams) => APIGenerator; | ||
export declare type Instantiate<TInstance, TElement, TParams> = (node: TElement | null, params?: TParams) => TInstance; | ||
export declare type Destroy<TInstance, TParams> = (instance: TInstance, params?: TParams) => void; | ||
export type APIGenerator = () => unknown; | ||
export type GetAPI<TInstance, TParams> = (instance: TInstance | null, prams?: TParams) => APIGenerator; | ||
export type Instantiate<TInstance, TElement, TParams> = (node: TElement | null, params?: TParams) => TInstance; | ||
export type Destroy<TInstance, TParams> = (instance: TInstance, params?: TParams) => void; | ||
export interface AptorConfiguration<TInstance, TElement, TParams> { | ||
@@ -7,0 +7,0 @@ getAPI: GetAPI<TInstance, TParams>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
0
24178