@lvce-editor/virtual-dom 1.45.0 → 2.0.0

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +64 -33
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,35 +1,66 @@
1
- export const render: (elements: any[], eventMap?: any) => HTMLElement
1
+ // Generated by dts-bundle-generator v9.5.1
2
2
 
3
- export const renderInto: (
4
- $Parent: HTMLElement,
5
- elements: any[],
6
- eventMap?: any,
7
- ) => void
3
+ export interface VirtualDomNode {
4
+ readonly type: number;
5
+ readonly [key: string]: any;
6
+ }
7
+ export interface AddPatch {
8
+ readonly type: 6;
9
+ readonly nodes: readonly VirtualDomNode[];
10
+ }
11
+ export interface AttributePatch {
12
+ readonly type: 3;
13
+ readonly key: string;
14
+ readonly value: any;
15
+ }
16
+ export type NavigateChildPatch = {
17
+ readonly type: 7;
18
+ readonly index: number;
19
+ };
20
+ export type NavigateParentPatch = {
21
+ readonly type: 8;
22
+ };
23
+ export type NavigateSiblingPatch = {
24
+ readonly type: 10;
25
+ readonly index: number;
26
+ };
27
+ export interface RemoveAttributePatch {
28
+ readonly type: 4;
29
+ readonly key: string;
30
+ }
31
+ export interface RemoveChildPatch {
32
+ readonly type: 9;
33
+ readonly index: number;
34
+ }
35
+ export interface RemovePatch {
36
+ readonly type: 5;
37
+ readonly index: number;
38
+ }
39
+ export interface ReplacePatch {
40
+ readonly type: 2;
41
+ readonly index: number;
42
+ readonly node: VirtualDomNode;
43
+ }
44
+ export interface TextPatch {
45
+ readonly type: 1;
46
+ readonly value: string;
47
+ }
48
+ export type Patch = TextPatch | AttributePatch | ReplacePatch | RemoveAttributePatch | RemovePatch | AddPatch | NavigateChildPatch | NavigateParentPatch | RemoveChildPatch | NavigateSiblingPatch;
49
+ export declare const applyPatch: ($Element: Node, patches: readonly Patch[]) => void;
50
+ export declare const setComponentUid: ($Element: any, uid: any) => void;
51
+ export declare const getComponentUid: ($Element: any) => number;
52
+ export declare const getComponentUidFromEvent: (event: any) => number;
53
+ export declare const getFileHandles: (ids: readonly number[]) => Promise<readonly FileSystemHandle[]>;
54
+ export declare const addFileHandle: (fileHandle: FileSystemHandle) => number;
55
+ export declare const setIpc: (value: any) => void;
56
+ export declare const registerEventListeners: (id: any, eventListeners: any) => void;
57
+ export declare const rememberFocus: ($Viewlet: HTMLElement, dom: any[], eventMap: any, uid?: number) => any;
58
+ export declare const renderInto: ($Parent: any, dom: any, eventMap?: {}) => void;
59
+ /**
60
+ *
61
+ * @param {any[]} elements
62
+ * @returns
63
+ */
64
+ export declare const render: (elements: any, eventMap?: {}, newEventMap?: {}) => HTMLElement;
8
65
 
9
- export const setIpc: (ipc: any) => void
10
-
11
- export const setComponentUid: ($Element: HTMLElement, uid: number) => void
12
-
13
- export const getComponentUid: ($Element: HTMLElement) => number
14
-
15
- export const getComponentUidFromEvent: (event: Event) => number
16
-
17
- export const rememberFocus: (
18
- $Viewlet: HTMLElement,
19
- dom: any[],
20
- eventMap: any,
21
- uid: number,
22
- ) => void
23
-
24
- export const registerEventListeners: any
25
-
26
- export const applyPatch: (
27
- $Element: HTMLElement,
28
- patches: readonly any[],
29
- ) => void
30
-
31
- export const getFileHandles: (
32
- ids: readonly number[],
33
- ) => Promise<readonly FileSystemHandle[]>
34
-
35
- export const addFileHandle: (fileHandle: FileSystemHandle) => number
66
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom",
3
- "version": "1.45.0",
3
+ "version": "2.0.0",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "keywords": [],