@lvce-editor/virtual-dom 6.10.0 → 7.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 (55) hide show
  1. package/dist/index.d.ts +1 -91
  2. package/dist/index.js +147 -129
  3. package/dist/parts/AddPatch/AddPatch.d.ts +5 -0
  4. package/dist/parts/ApplyDragInfoMaybe/ApplyDragInfoMaybe.d.ts +1 -0
  5. package/dist/parts/ApplyPatch/ApplyPatch.d.ts +2 -0
  6. package/dist/parts/AttachEvent/AttachEvent.d.ts +1 -0
  7. package/dist/parts/AttributePatch/AttributePatch.d.ts +5 -0
  8. package/dist/parts/ClearNode/ClearNode.d.ts +1 -0
  9. package/dist/parts/ComponentUid/ComponentUid.d.ts +3 -0
  10. package/dist/parts/CreateEventListenerFunction/CreateEventListenerFunction.d.ts +1 -0
  11. package/dist/parts/DomEventType/DomEventType.d.ts +3 -0
  12. package/dist/parts/DragInfo/DragInfo.d.ts +5 -0
  13. package/dist/parts/ElementTagMap/ElementTagMap.d.ts +1 -0
  14. package/dist/parts/EventState/EventState.d.ts +3 -0
  15. package/dist/parts/FileHandles/FileHandles.d.ts +4 -0
  16. package/dist/parts/GetActiveElementInside/GetActiveElementInside.d.ts +1 -0
  17. package/dist/parts/GetEventListenerArg/GetEventListenerArg.d.ts +1 -0
  18. package/dist/parts/GetEventListenerArgs/GetEventListenerArgs.d.ts +1 -0
  19. package/dist/parts/GetEventListenerOptions/GetEventListenerOptions.d.ts +1 -0
  20. package/dist/parts/GetUidTarget/GetUidTarget.d.ts +1 -0
  21. package/dist/parts/GetWrappedListener/GetWrappedListener.d.ts +1 -0
  22. package/dist/parts/IDragInfo/IDragInfo.d.ts +10 -0
  23. package/dist/parts/Id/Id.d.ts +1 -0
  24. package/dist/parts/Instances/Instances.d.ts +2 -0
  25. package/dist/parts/IpcState/IpcState.d.ts +2 -0
  26. package/dist/parts/IsInputElement/IsInputElement.d.ts +1 -0
  27. package/dist/parts/ListenerCache/ListenerCache.d.ts +3 -0
  28. package/dist/parts/Main/Main.d.ts +11 -0
  29. package/dist/parts/NameAnonymousFunction/NameAnonymousFunction.d.ts +1 -0
  30. package/dist/parts/NavigateChildPatch/NavigateChildPatch.d.ts +4 -0
  31. package/dist/parts/NavigateParentPatch/NavigateParentPatch.d.ts +3 -0
  32. package/dist/parts/NavigateSiblingPatch/NavigateSiblingPatch.d.ts +4 -0
  33. package/dist/parts/Patch/Patch.d.ts +12 -0
  34. package/dist/parts/PatchFunctions/PatchFunctions.d.ts +6 -0
  35. package/dist/parts/PatchType/PatchType.d.ts +11 -0
  36. package/dist/parts/PreventEventsMaybe/PreventEventsMaybe.d.ts +1 -0
  37. package/dist/parts/QueryInputs/QueryInputs.d.ts +1 -0
  38. package/dist/parts/RegisterEventListeners/RegisterEventListeners.d.ts +2 -0
  39. package/dist/parts/RememberFocus/RememberFocus.d.ts +1 -0
  40. package/dist/parts/RemoveAttributePatch/RemoveAttributePatch.d.ts +4 -0
  41. package/dist/parts/RemoveChildPatch/RemoveChildPatch.d.ts +4 -0
  42. package/dist/parts/RemovePatch/RemovePatch.d.ts +4 -0
  43. package/dist/parts/RenderInternal/RenderInternal.d.ts +2 -0
  44. package/dist/parts/ReplacePatch/ReplacePatch.d.ts +5 -0
  45. package/dist/parts/SetDragImage/SetDragImage.d.ts +1 -0
  46. package/dist/parts/SetReferenceNodeUidPatch/SetReferenceNodeUidPatch.d.ts +4 -0
  47. package/dist/parts/TextPatch/TextPatch.d.ts +4 -0
  48. package/dist/parts/UidSymbol/UidSymbol.d.ts +1 -0
  49. package/dist/parts/VirtualDom/VirtualDom.d.ts +8 -0
  50. package/dist/parts/VirtualDomElement/VirtualDomElement.d.ts +2 -0
  51. package/dist/parts/VirtualDomElementProp/VirtualDomElementProp.d.ts +1 -0
  52. package/dist/parts/VirtualDomElementProps/VirtualDomElementProps.d.ts +1 -0
  53. package/dist/parts/VirtualDomElements/VirtualDomElements.d.ts +1 -0
  54. package/dist/parts/VirtualDomNode/VirtualDomNode.d.ts +4 -0
  55. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,91 +1 @@
1
- // Generated by dts-bundle-generator v9.5.1
2
-
3
- export interface VirtualDomNode {
4
- readonly [key: string]: any;
5
- readonly type: number;
6
- }
7
- export interface AddPatch {
8
- readonly nodes: readonly VirtualDomNode[];
9
- readonly type: 6;
10
- }
11
- export interface AttributePatch {
12
- readonly key: string;
13
- readonly type: 3;
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 key: string;
29
- readonly type: 4;
30
- }
31
- export interface RemoveChildPatch {
32
- readonly index: number;
33
- readonly type: 9;
34
- }
35
- export interface RemovePatch {
36
- readonly index: number;
37
- readonly type: 5;
38
- }
39
- export interface ReplacePatch {
40
- readonly nodes: readonly VirtualDomNode[];
41
- readonly type: 2;
42
- }
43
- export interface TextPatch {
44
- readonly type: 1;
45
- readonly value: string;
46
- }
47
- export type Patch = TextPatch | AttributePatch | ReplacePatch | RemoveAttributePatch | RemovePatch | AddPatch | NavigateChildPatch | NavigateParentPatch | RemoveChildPatch | NavigateSiblingPatch;
48
- export declare const applyPatch: ($Element: Node, patches: readonly Patch[], eventMap?: Record<string, any>, id?: any) => void;
49
- export declare const setComponentUid: ($Element: any, uid: any) => void;
50
- export declare const getComponentUid: ($Element: any) => number;
51
- export declare const getComponentUidFromEvent: (event: any) => number;
52
- export interface DragInfoItem {
53
- readonly data: string;
54
- readonly type: string;
55
- }
56
- export interface IDragInfoNew {
57
- readonly items: readonly DragInfoItem[];
58
- readonly label?: string;
59
- }
60
- export type IDragInfoOld = readonly DragInfoItem[];
61
- export type IDragInfo = IDragInfoNew | IDragInfoOld;
62
- export declare const setDragInfo: (id: string | number, data: IDragInfo) => void;
63
- export declare const getDragInfo: (id: string | number) => IDragInfo;
64
- export declare const removeDragInfo: (id: string | number) => void;
65
- export declare const getFileHandles: (ids: readonly number[]) => Promise<readonly FileSystemHandle[]>;
66
- export declare const addFileHandle: (fileHandle: FileSystemHandle) => number;
67
- export declare const setIpc: (value: any) => void;
68
- export declare const registerEventListeners: (id: any, eventListeners: any) => void;
69
- export declare const rememberFocus: ($Viewlet: HTMLElement, dom: any[], eventMap: any, uid?: number) => any;
70
- export declare const renderInto: ($Parent: any, dom: any, eventMap?: {}) => void;
71
- /**
72
- *
73
- * @param {any[]} elements
74
- * @returns
75
- */
76
- export declare const render: (elements: any, eventMap?: {}, newEventMap?: {}) => HTMLElement;
77
- declare const A: number, Abbr: number, Article: number, Aside: number, Audio$1: number, Br: number, Button: number, Cite: number, Code: number, Col: number, ColGroup: number, Data: number, Dd: number, Del: number, Div: number, Dl: number, Dt: number, Figcaption: number, Figure: number, Footer: number, H1: number, H2: number, H3: number, H4: number, H5: number, H6: number, Header: number, Hr: number, I: number, Img: number, Input: number, Ins: number, Kbd: number, Label: number, Li: number, Nav: number, Ol: number, Option$1: number, P: number, Pre: number, Root: number, Search: number, Section: number, Select: number, Span: number, Table: number, TBody: number, Td: number, Text$1: number, TextArea: number, Tfoot: number, Th: number, THead: number, Time: number, Tr: number, Ul: number, Reference: number, Video: number;
78
- declare const get: (viewletId: string | number) => any;
79
- declare const set: (viewletId: string | number, instance: any) => void;
80
-
81
- declare namespace VirtualDomElements {
82
- export { A, Abbr, Article, Aside, Audio$1 as Audio, Br, Button, Cite, Code, Col, ColGroup, Data, Dd, Del, Div, Dl, Dt, Figcaption, Figure, Footer, H1, H2, H3, H4, H5, H6, Header, Hr, I, Img, Input, Ins, Kbd, Label, Li, Nav, Ol, Option$1 as Option, P, Pre, Reference, Root, Search, Section, Select, Span, TBody, THead, Table, Td, Text$1 as Text, TextArea, Tfoot, Th, Time, Tr, Ul, Video };
83
- }
84
-
85
- export {
86
- VirtualDomElements,
87
- get as getViewletInstance,
88
- set as setViewletInstance,
89
- };
90
-
91
- export {};
1
+ export * from './parts/Main/Main.ts';
package/dist/index.js CHANGED
@@ -1,3 +1,11 @@
1
+ const instances = Object.create(null);
2
+ const get$1 = viewletId => {
3
+ return instances[viewletId];
4
+ };
5
+ const set$1 = (viewletId, instance) => {
6
+ instances[viewletId] = instance;
7
+ };
8
+
1
9
  const Audio$2 = 'audio';
2
10
  const Button$2 = 'button';
3
11
  const Col$2 = 'col';
@@ -115,66 +123,66 @@ const Iframe = 68;
115
123
  const Reference$1 = 100;
116
124
 
117
125
  const VirtualDomElements$1 = {
118
- __proto__: null,
119
- A: A$1,
120
- Abbr: Abbr$1,
121
- Article: Article$1,
122
- Aside: Aside$1,
123
- Audio: Audio$1,
124
- Br: Br$1,
125
- Button: Button$1,
126
- Cite: Cite$1,
127
- Code: Code$1,
128
- Col: Col$1,
129
- ColGroup: ColGroup$1,
130
- Data: Data$1,
131
- Dd: Dd$1,
132
- Del: Del$1,
133
- Div: Div$1,
134
- Dl: Dl$1,
135
- Dt: Dt$1,
136
- Figcaption: Figcaption$1,
137
- Figure: Figure$1,
138
- Footer: Footer$1,
139
- H1: H1$1,
140
- H2: H2$1,
141
- H3: H3$1,
142
- H4: H4$1,
143
- H5: H5$1,
144
- H6: H6$1,
145
- Header: Header$1,
146
- Hr: Hr$1,
147
- I: I$1,
148
- Iframe,
149
- Img: Img$1,
150
- Input: Input$1,
151
- Ins: Ins$1,
152
- Kbd: Kbd$1,
153
- Label: Label$1,
154
- Li: Li$1,
155
- Nav: Nav$1,
156
- Ol: Ol$1,
157
- Option: Option$1,
158
- P: P$1,
159
- Pre: Pre$1,
160
- Reference: Reference$1,
161
- Root: Root$1,
162
- Search: Search$1,
163
- Section: Section$1,
164
- Select: Select$1,
165
- Span: Span$1,
166
- TBody: TBody$1,
167
- THead: THead$1,
168
- Table: Table$1,
169
- Td: Td$1,
170
- Text: Text$1,
171
- TextArea: TextArea$1,
172
- Tfoot: Tfoot$1,
173
- Th: Th$1,
174
- Time: Time$1,
175
- Tr: Tr$1,
176
- Ul: Ul$1,
177
- Video: Video$1
126
+ __proto__: null,
127
+ A: A$1,
128
+ Abbr: Abbr$1,
129
+ Article: Article$1,
130
+ Aside: Aside$1,
131
+ Audio: Audio$1,
132
+ Br: Br$1,
133
+ Button: Button$1,
134
+ Cite: Cite$1,
135
+ Code: Code$1,
136
+ Col: Col$1,
137
+ ColGroup: ColGroup$1,
138
+ Data: Data$1,
139
+ Dd: Dd$1,
140
+ Del: Del$1,
141
+ Div: Div$1,
142
+ Dl: Dl$1,
143
+ Dt: Dt$1,
144
+ Figcaption: Figcaption$1,
145
+ Figure: Figure$1,
146
+ Footer: Footer$1,
147
+ H1: H1$1,
148
+ H2: H2$1,
149
+ H3: H3$1,
150
+ H4: H4$1,
151
+ H5: H5$1,
152
+ H6: H6$1,
153
+ Header: Header$1,
154
+ Hr: Hr$1,
155
+ I: I$1,
156
+ Iframe,
157
+ Img: Img$1,
158
+ Input: Input$1,
159
+ Ins: Ins$1,
160
+ Kbd: Kbd$1,
161
+ Label: Label$1,
162
+ Li: Li$1,
163
+ Nav: Nav$1,
164
+ Ol: Ol$1,
165
+ Option: Option$1,
166
+ P: P$1,
167
+ Pre: Pre$1,
168
+ Reference: Reference$1,
169
+ Root: Root$1,
170
+ Search: Search$1,
171
+ Section: Section$1,
172
+ Select: Select$1,
173
+ Span: Span$1,
174
+ TBody: TBody$1,
175
+ THead: THead$1,
176
+ Table: Table$1,
177
+ Td: Td$1,
178
+ Text: Text$1,
179
+ TextArea: TextArea$1,
180
+ Tfoot: Tfoot$1,
181
+ Th: Th$1,
182
+ Time: Time$1,
183
+ Tr: Tr$1,
184
+ Ul: Ul$1,
185
+ Video: Video$1
178
186
  };
179
187
 
180
188
  const getElementTag$1 = type => {
@@ -295,22 +303,14 @@ const getElementTag$1 = type => {
295
303
  };
296
304
 
297
305
  const ElementTagMap = {
298
- __proto__: null,
299
- getElementTag: getElementTag$1
306
+ __proto__: null,
307
+ getElementTag: getElementTag$1
300
308
  };
301
309
 
302
310
  const {
303
311
  getElementTag
304
312
  } = ElementTagMap;
305
313
 
306
- const instances = Object.create(null);
307
- const get$1 = viewletId => {
308
- return instances[viewletId];
309
- };
310
- const set$1 = (viewletId, instance) => {
311
- instances[viewletId] = instance;
312
- };
313
-
314
314
  const getEventListenerOptions = (eventName, value) => {
315
315
  if (value.passive) {
316
316
  return {
@@ -604,65 +604,65 @@ const {
604
604
  } = VirtualDomElements$1;
605
605
 
606
606
  const VirtualDomElements = {
607
- __proto__: null,
608
- A,
609
- Abbr,
610
- Article,
611
- Aside,
612
- Audio,
613
- Br,
614
- Button,
615
- Cite,
616
- Code,
617
- Col,
618
- ColGroup,
619
- Data,
620
- Dd,
621
- Del,
622
- Div,
623
- Dl,
624
- Dt,
625
- Figcaption,
626
- Figure,
627
- Footer,
628
- H1,
629
- H2,
630
- H3,
631
- H4,
632
- H5,
633
- H6,
634
- Header,
635
- Hr,
636
- I,
637
- Img,
638
- Input,
639
- Ins,
640
- Kbd,
641
- Label,
642
- Li,
643
- Nav,
644
- Ol,
645
- Option,
646
- P,
647
- Pre,
648
- Reference,
649
- Root,
650
- Search,
651
- Section,
652
- Select,
653
- Span,
654
- TBody,
655
- THead,
656
- Table,
657
- Td,
658
- Text,
659
- TextArea,
660
- Tfoot,
661
- Th,
662
- Time,
663
- Tr,
664
- Ul,
665
- Video
607
+ __proto__: null,
608
+ A,
609
+ Abbr,
610
+ Article,
611
+ Aside,
612
+ Audio,
613
+ Br,
614
+ Button,
615
+ Cite,
616
+ Code,
617
+ Col,
618
+ ColGroup,
619
+ Data,
620
+ Dd,
621
+ Del,
622
+ Div,
623
+ Dl,
624
+ Dt,
625
+ Figcaption,
626
+ Figure,
627
+ Footer,
628
+ H1,
629
+ H2,
630
+ H3,
631
+ H4,
632
+ H5,
633
+ H6,
634
+ Header,
635
+ Hr,
636
+ I,
637
+ Img,
638
+ Input,
639
+ Ins,
640
+ Kbd,
641
+ Label,
642
+ Li,
643
+ Nav,
644
+ Ol,
645
+ Option,
646
+ P,
647
+ Pre,
648
+ Reference,
649
+ Root,
650
+ Search,
651
+ Section,
652
+ Select,
653
+ Span,
654
+ TBody,
655
+ THead,
656
+ Table,
657
+ Td,
658
+ Text,
659
+ TextArea,
660
+ Tfoot,
661
+ Th,
662
+ Time,
663
+ Tr,
664
+ Ul,
665
+ Video
666
666
  };
667
667
 
668
668
  const renderDomTextNode = element => {
@@ -768,6 +768,7 @@ const NavigateChild = 7;
768
768
  const NavigateParent = 8;
769
769
  const RemoveChild = 9;
770
770
  const NavigateSibling = 10;
771
+ const SetReferenceNodeUid = 11;
771
772
 
772
773
  const dragInfos = Object.create(null);
773
774
  const setDragInfo = (id, data) => {
@@ -1123,6 +1124,23 @@ const applyPatch = ($Element, patches, eventMap = {}, id = 0) => {
1123
1124
  case SetAttribute:
1124
1125
  setProp($Current, patch.key, patch.value, events);
1125
1126
  break;
1127
+ case SetReferenceNodeUid:
1128
+ {
1129
+ // Get the new reference node instance
1130
+ const instance = get$1(patch.uid);
1131
+ if (!instance || !instance.state) {
1132
+ console.error('Cannot set reference node uid: instance not found', {
1133
+ uid: patch.uid
1134
+ });
1135
+ return;
1136
+ }
1137
+ const $NewNode = instance.state.$Viewlet;
1138
+ // Replace the current reference node with the new viewlet
1139
+ // @ts-ignore
1140
+ $Current.replaceWith($NewNode);
1141
+ $Current = $NewNode;
1142
+ break;
1143
+ }
1126
1144
  case SetText:
1127
1145
  setText($Current, patch.value);
1128
1146
  break;
@@ -0,0 +1,5 @@
1
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
2
+ export interface AddPatch {
3
+ readonly nodes: readonly VirtualDomNode[];
4
+ readonly type: 6;
5
+ }
@@ -0,0 +1 @@
1
+ export declare const applyDragInfoMaybe: (event: DragEvent) => void;
@@ -0,0 +1,2 @@
1
+ import type { Patch } from '../Patch/Patch.ts';
2
+ export declare const applyPatch: ($Element: Node, patches: readonly Patch[], eventMap?: Record<string, any>, id?: any) => void;
@@ -0,0 +1 @@
1
+ export declare const attachEvent: ($Node: HTMLElement, eventMap: any, key: string, value: string, newEventMap?: any) => void;
@@ -0,0 +1,5 @@
1
+ export interface AttributePatch {
2
+ readonly key: string;
3
+ readonly type: 3;
4
+ readonly value: any;
5
+ }
@@ -0,0 +1 @@
1
+ export declare const clearNode: ($Node: HTMLElement) => void;
@@ -0,0 +1,3 @@
1
+ export declare const setComponentUid: ($Element: any, uid: any) => void;
2
+ export declare const getComponentUid: ($Element: any) => number;
3
+ export declare const getComponentUidFromEvent: (event: any) => number;
@@ -0,0 +1 @@
1
+ export declare const createFn: (info: any, map: any) => any;
@@ -0,0 +1,3 @@
1
+ export declare const PointerMove = "pointermove";
2
+ export declare const PointerUp = "pointerup";
3
+ export declare const lostpointercapture = "lostpointercapture";
@@ -0,0 +1,5 @@
1
+ import type { IDragInfo, IDragInfoOld } from '../IDragInfo/IDragInfo.ts';
2
+ export declare const setDragInfo: (id: string | number, data: IDragInfo) => void;
3
+ export declare const getDragInfo: (id: string | number) => IDragInfo;
4
+ export declare const removeDragInfo: (id: string | number) => void;
5
+ export declare const isDragInfoOld: (data: IDragInfo) => data is IDragInfoOld;
@@ -0,0 +1 @@
1
+ export declare const getElementTag: any;
@@ -0,0 +1,3 @@
1
+ export declare const startIgnore: () => void;
2
+ export declare const stopIgnore: () => void;
3
+ export declare const enabled: () => boolean;
@@ -0,0 +1,4 @@
1
+ export declare const acquire: (id: number) => Promise<FileSystemHandle>;
2
+ export declare const getFileHandles: (ids: readonly number[]) => Promise<readonly FileSystemHandle[]>;
3
+ export declare const add: (promise: Promise<FileSystemHandle>) => number;
4
+ export declare const addFileHandle: (fileHandle: FileSystemHandle) => number;
@@ -0,0 +1 @@
1
+ export declare const getActiveElementInside: ($Viewlet: HTMLElement | undefined) => HTMLElement | undefined;
@@ -0,0 +1 @@
1
+ export declare const getEventListenerArg: (param: string, event: any) => any;
@@ -0,0 +1 @@
1
+ export declare const getEventListenerArgs: (params: readonly string[], event: any) => readonly any[];
@@ -0,0 +1 @@
1
+ export declare const getEventListenerOptions: (eventName: string, value: any) => any;
@@ -0,0 +1 @@
1
+ export declare const getUidTarget: ($Element: HTMLElement) => HTMLElement | undefined;
@@ -0,0 +1 @@
1
+ export declare const getWrappedListener: (listener: any, returnValue: any) => any;
@@ -0,0 +1,10 @@
1
+ export interface DragInfoItem {
2
+ readonly data: string;
3
+ readonly type: string;
4
+ }
5
+ export interface IDragInfoNew {
6
+ readonly items: readonly DragInfoItem[];
7
+ readonly label?: string;
8
+ }
9
+ export type IDragInfoOld = readonly DragInfoItem[];
10
+ export type IDragInfo = IDragInfoNew | IDragInfoOld;
@@ -0,0 +1 @@
1
+ export declare const create: () => number;
@@ -0,0 +1,2 @@
1
+ export declare const get: (viewletId: string | number) => any;
2
+ export declare const set: (viewletId: string | number, instance: any) => void;
@@ -0,0 +1,2 @@
1
+ export declare const getIpc: () => any;
2
+ export declare const setIpc: (value: any) => void;
@@ -0,0 +1 @@
1
+ export declare const isInputElement: (element: HTMLElement) => boolean;
@@ -0,0 +1,3 @@
1
+ export declare const has: (listener: any) => boolean;
2
+ export declare const set: (listener: any, value: any) => void;
3
+ export declare const get: (listener: any) => any;
@@ -0,0 +1,11 @@
1
+ export { applyPatch } from '../ApplyPatch/ApplyPatch.ts';
2
+ export { getComponentUid, getComponentUidFromEvent, setComponentUid, } from '../ComponentUid/ComponentUid.ts';
3
+ export { getDragInfo, removeDragInfo, setDragInfo, } from '../DragInfo/DragInfo.ts';
4
+ export { addFileHandle, getFileHandles } from '../FileHandles/FileHandles.ts';
5
+ export { setIpc } from '../IpcState/IpcState.ts';
6
+ export { registerEventListeners } from '../RegisterEventListeners/RegisterEventListeners.ts';
7
+ export { rememberFocus } from '../RememberFocus/RememberFocus.ts';
8
+ export { render, renderInto } from '../VirtualDom/VirtualDom.ts';
9
+ export * as VirtualDomElements from '../VirtualDomElements/VirtualDomElements.ts';
10
+ export { set as setViewletInstance } from '../Instances/Instances.ts';
11
+ export { get as getViewletInstance } from '../Instances/Instances.ts';
@@ -0,0 +1 @@
1
+ export declare const nameAnonymousFunction: (fn: any, name: string) => void;
@@ -0,0 +1,4 @@
1
+ export type NavigateChildPatch = {
2
+ readonly type: 7;
3
+ readonly index: number;
4
+ };
@@ -0,0 +1,3 @@
1
+ export type NavigateParentPatch = {
2
+ readonly type: 8;
3
+ };
@@ -0,0 +1,4 @@
1
+ export type NavigateSiblingPatch = {
2
+ readonly type: 10;
3
+ readonly index: number;
4
+ };
@@ -0,0 +1,12 @@
1
+ import type { AddPatch } from '../AddPatch/AddPatch.ts';
2
+ import type { AttributePatch } from '../AttributePatch/AttributePatch.ts';
3
+ import type { NavigateChildPatch } from '../NavigateChildPatch/NavigateChildPatch.ts';
4
+ import type { NavigateParentPatch } from '../NavigateParentPatch/NavigateParentPatch.ts';
5
+ import type { NavigateSiblingPatch } from '../NavigateSiblingPatch/NavigateSiblingPatch.ts';
6
+ import type { RemoveAttributePatch } from '../RemoveAttributePatch/RemoveAttributePatch.ts';
7
+ import type { RemoveChildPatch } from '../RemoveChildPatch/RemoveChildPatch.ts';
8
+ import type { RemovePatch } from '../RemovePatch/RemovePatch.ts';
9
+ import type { ReplacePatch } from '../ReplacePatch/ReplacePatch.ts';
10
+ import type { SetReferenceNodeUidPatch } from '../SetReferenceNodeUidPatch/SetReferenceNodeUidPatch.ts';
11
+ import type { TextPatch } from '../TextPatch/TextPatch.ts';
12
+ export type Patch = TextPatch | AttributePatch | ReplacePatch | RemoveAttributePatch | RemovePatch | AddPatch | NavigateChildPatch | NavigateParentPatch | RemoveChildPatch | NavigateSiblingPatch | SetReferenceNodeUidPatch;
@@ -0,0 +1,6 @@
1
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
2
+ export declare const removeAttribute: ($Element: HTMLElement, key: string) => void;
3
+ export declare const setText: ($Element: Text, value: string) => void;
4
+ export declare const removeChild: ($Element: HTMLElement, index: number) => void;
5
+ export declare const add: ($Element: HTMLElement, nodes: readonly VirtualDomNode[], eventMap?: Record<string, any>) => void;
6
+ export declare const replace: ($Element: HTMLElement | Text, nodes: readonly VirtualDomNode[], eventMap?: Record<string, any>) => Node;
@@ -0,0 +1,11 @@
1
+ export declare const SetText = 1;
2
+ export declare const Replace = 2;
3
+ export declare const SetAttribute = 3;
4
+ export declare const RemoveAttribute = 4;
5
+ export declare const Remove = 5;
6
+ export declare const Add = 6;
7
+ export declare const NavigateChild = 7;
8
+ export declare const NavigateParent = 8;
9
+ export declare const RemoveChild = 9;
10
+ export declare const NavigateSibling = 10;
11
+ export declare const SetReferenceNodeUid = 11;
@@ -0,0 +1 @@
1
+ export declare const preventEventsMaybe: (info: any, event: any) => void;
@@ -0,0 +1 @@
1
+ export declare const queryInputs: ($Viewlet: HTMLElement) => readonly any[];
@@ -0,0 +1,2 @@
1
+ export declare const registerEventListeners: (id: any, eventListeners: any) => void;
2
+ export declare const getEventListenerMap: (id: any) => any;
@@ -0,0 +1 @@
1
+ export declare const rememberFocus: ($Viewlet: HTMLElement, dom: any[], eventMap: any, uid?: number) => any;
@@ -0,0 +1,4 @@
1
+ export interface RemoveAttributePatch {
2
+ readonly key: string;
3
+ readonly type: 4;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface RemoveChildPatch {
2
+ readonly index: number;
3
+ readonly type: 9;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface RemovePatch {
2
+ readonly index: number;
3
+ readonly type: 5;
4
+ }
@@ -0,0 +1,2 @@
1
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
2
+ export declare const renderInternal: ($Parent: HTMLElement, elements: readonly VirtualDomNode[], eventMap: any, newEventMap?: any) => void;
@@ -0,0 +1,5 @@
1
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
2
+ export interface ReplacePatch {
3
+ readonly nodes: readonly VirtualDomNode[];
4
+ readonly type: 2;
5
+ }
@@ -0,0 +1 @@
1
+ export declare const setDragImage: (dataTransfer: DataTransfer, label: string) => void;
@@ -0,0 +1,4 @@
1
+ export interface SetReferenceNodeUidPatch {
2
+ readonly type: 11;
3
+ readonly uid: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface TextPatch {
2
+ readonly type: 1;
3
+ readonly value: string;
4
+ }
@@ -0,0 +1 @@
1
+ export declare const uidSymbol: unique symbol;
@@ -0,0 +1,8 @@
1
+ export declare const renderInto: ($Parent: any, dom: any, eventMap?: {}) => void;
2
+ export declare const renderIncremental: ($Parent: any, dom: any) => void;
3
+ /**
4
+ *
5
+ * @param {any[]} elements
6
+ * @returns
7
+ */
8
+ export declare const render: (elements: any, eventMap?: {}, newEventMap?: {}) => HTMLElement;
@@ -0,0 +1,2 @@
1
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
2
+ export declare const render: (element: VirtualDomNode, eventMap: any, newEventMap?: any) => Node;
@@ -0,0 +1 @@
1
+ export declare const setProp: ($Element: HTMLElement, key: string, value: any, eventMap: any, newEventMap?: any) => void;
@@ -0,0 +1 @@
1
+ export declare const setProps: ($Element: any, props: any, eventMap: any, newEventMap: any) => void;
@@ -0,0 +1 @@
1
+ export declare const A: any, Abbr: any, Article: any, Aside: any, Audio: any, Br: any, Button: any, Cite: any, Code: any, Col: any, ColGroup: any, Data: any, Dd: any, Del: any, Div: any, Dl: any, Dt: any, Figcaption: any, Figure: any, Footer: any, H1: any, H2: any, H3: any, H4: any, H5: any, H6: any, Header: any, Hr: any, I: any, Img: any, Input: any, Ins: any, Kbd: any, Label: any, Li: any, Nav: any, Ol: any, Option: any, P: any, Pre: any, Root: any, Search: any, Section: any, Select: any, Span: any, Table: any, TBody: any, Td: any, Text: any, TextArea: any, Tfoot: any, Th: any, THead: any, Time: any, Tr: any, Ul: any, Reference: any, Video: any;
@@ -0,0 +1,4 @@
1
+ export interface VirtualDomNode {
2
+ readonly [key: string]: any;
3
+ readonly type: number;
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom",
3
- "version": "6.10.0",
3
+ "version": "7.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lvce-editor/virtual-dom.git"