anu-verzum 1.21.2 → 1.21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ export declare abstract class Component<P extends Record<string, any> = Props, S
|
|
|
5
5
|
context: Record<string, any>;
|
|
6
6
|
/** @internal Set by the reconciler. */
|
|
7
7
|
__fiber?: any;
|
|
8
|
-
static isAnuComponent
|
|
8
|
+
static isAnuComponent: boolean;
|
|
9
9
|
constructor(props: P, context?: Record<string, any>);
|
|
10
10
|
setState(partialState?: Partial<S> | ((prevState: S, prevProps: P) => S)): void;
|
|
11
11
|
abstract render(): AnuElement | AnuElement[] | string | number | boolean | null | undefined;
|
package/dist/core/domUtils.js
CHANGED
|
@@ -20,12 +20,7 @@ const getHTMLValidSvgTag = fiberType => {
|
|
|
20
20
|
exports.getHTMLValidSvgTag = getHTMLValidSvgTag;
|
|
21
21
|
const SVG_ELEMENT_LIST = exports.SVG_ELEMENT_LIST = ['anchor', 'animate', 'animateMotion', 'animateTransform', 'circle', 'clipPath', 'desc', 'discard', 'ellipse', 'feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'foreignObject', 'g', 'hatch', 'hatchpath', 'image', 'line', 'linearGradient', 'marker', 'mask', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'set', 'stop', 'svgStyle', 'svg', 'switch', 'symbol', 'text', 'textPath', 'svgTitle', 'tspan', 'unknown', 'use', 'view'];
|
|
22
22
|
const updateDomProperties = (dom, prevProps, nextProps, isSvgElement = false) => {
|
|
23
|
-
const isEvent = name =>
|
|
24
|
-
if (!String.prototype.startsWith) {
|
|
25
|
-
return name[0] === 'o' && name[1] === 'n';
|
|
26
|
-
}
|
|
27
|
-
return name.startsWith('on');
|
|
28
|
-
};
|
|
23
|
+
const isEvent = name => name.startsWith('on');
|
|
29
24
|
const isAttribute = name => !isEvent(name) && name !== 'children' && name !== 'style';
|
|
30
25
|
const isNew = (prev, next) => key => prev[key] !== next[key];
|
|
31
26
|
const isGone = (prev, next) => key => !(key in next);
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { AnuElement } from './elements';
|
|
2
|
-
export type Ref<T> = {
|
|
3
|
-
current: T | null;
|
|
4
|
-
};
|
|
1
|
+
import { AnuElement, Ref } from './elements';
|
|
5
2
|
export declare const createRef: <T = any>() => Ref<T>;
|
|
6
3
|
export declare const scheduleUpdate: (instance: any, partialState: Record<string, any>, partialStateCallback?: (prevState: any, prevProps: any) => any) => void;
|
|
7
4
|
export declare const render: (elements: AnuElement | AnuElement[], containerDom: Element) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare const Anu: {
|
|
|
29
29
|
};
|
|
30
30
|
createContext: <T extends Record<string, any> = Record<string, any>>(context: T) => import("./core/components/Context").Context<T>;
|
|
31
31
|
createElement: (type: import(".").ElementType, config: Props | null, ...args: any[]) => AnuElement;
|
|
32
|
-
createRef: <T = any>() =>
|
|
32
|
+
createRef: <T = any>() => Ref<T>;
|
|
33
33
|
Component: typeof Component;
|
|
34
34
|
Fragment: typeof Fragment;
|
|
35
35
|
render: (elements: AnuElement | AnuElement[], containerDom: Element) => void;
|
|
@@ -52,7 +52,7 @@ declare const Anu: {
|
|
|
52
52
|
componentDidUpdate(_prevProps: import("./core/components/History").HistoryLinkProps, _prevState: Record<string, any>): void;
|
|
53
53
|
componentWillUnmount(): void;
|
|
54
54
|
};
|
|
55
|
-
isAnuComponent
|
|
55
|
+
isAnuComponent: boolean;
|
|
56
56
|
};
|
|
57
57
|
Redirect: {
|
|
58
58
|
new (props: import("./core/components/History").HistoryRedirectProps, context?: Record<string, any>): {
|
|
@@ -66,7 +66,7 @@ declare const Anu: {
|
|
|
66
66
|
componentDidUpdate(_prevProps: import("./core/components/History").HistoryRedirectProps, _prevState: Record<string, any>): void;
|
|
67
67
|
componentWillUnmount(): void;
|
|
68
68
|
};
|
|
69
|
-
isAnuComponent
|
|
69
|
+
isAnuComponent: boolean;
|
|
70
70
|
};
|
|
71
71
|
Route: {
|
|
72
72
|
new (props: import("./core/components/History").HistoryRouteProps): {
|
|
@@ -81,7 +81,7 @@ declare const Anu: {
|
|
|
81
81
|
setState(partialState?: Partial<Record<string, any>> | ((prevState: Record<string, any>, prevProps: import("./core/components/History").HistoryRouteProps) => Record<string, any>)): void;
|
|
82
82
|
componentDidUpdate(_prevProps: import("./core/components/History").HistoryRouteProps, _prevState: Record<string, any>): void;
|
|
83
83
|
};
|
|
84
|
-
isAnuComponent
|
|
84
|
+
isAnuComponent: boolean;
|
|
85
85
|
};
|
|
86
86
|
getUrlParams: (key: string) => string | null;
|
|
87
87
|
getAllUrlParamNames: () => string[];
|
|
@@ -112,7 +112,7 @@ declare const Anu: {
|
|
|
112
112
|
componentDidUpdate(_prevProps: import("./core/components/Connector").ConnectorProviderProps, _prevState: Record<string, any>): void;
|
|
113
113
|
componentWillUnmount(): void;
|
|
114
114
|
};
|
|
115
|
-
isAnuComponent
|
|
115
|
+
isAnuComponent: boolean;
|
|
116
116
|
};
|
|
117
117
|
};
|
|
118
118
|
ServerAPI: {
|
|
@@ -139,7 +139,7 @@ declare const Anu: {
|
|
|
139
139
|
deepEqual: (object1: Record<string, any>, object2: Record<string, any>) => boolean;
|
|
140
140
|
};
|
|
141
141
|
};
|
|
142
|
-
export type { AnuElement, AnuChild, AnuNode, Props, Ref, FunctionComponent, ElementType } from './core/elements';
|
|
142
|
+
export type { AnuElement, AnuChild, AnuNode, AnuCSSProperties, Props, Ref, FunctionComponent, ElementType } from './core/elements';
|
|
143
143
|
export type { ContextValue, ConsumerProps } from './core/components/Context';
|
|
144
144
|
export type { Action, ThunkAction, Dispatch, Reducer, MiddlewareAPI, Middleware, Store, SelectorFn, CreateSelectorFn } from './store/store';
|
|
145
145
|
export type { ApiSuccessResponse, ApiErrorResponse } from './server-api/server-api';
|
package/package.json
CHANGED