@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.
- package/dist/index.d.ts +1 -91
- package/dist/index.js +147 -129
- package/dist/parts/AddPatch/AddPatch.d.ts +5 -0
- package/dist/parts/ApplyDragInfoMaybe/ApplyDragInfoMaybe.d.ts +1 -0
- package/dist/parts/ApplyPatch/ApplyPatch.d.ts +2 -0
- package/dist/parts/AttachEvent/AttachEvent.d.ts +1 -0
- package/dist/parts/AttributePatch/AttributePatch.d.ts +5 -0
- package/dist/parts/ClearNode/ClearNode.d.ts +1 -0
- package/dist/parts/ComponentUid/ComponentUid.d.ts +3 -0
- package/dist/parts/CreateEventListenerFunction/CreateEventListenerFunction.d.ts +1 -0
- package/dist/parts/DomEventType/DomEventType.d.ts +3 -0
- package/dist/parts/DragInfo/DragInfo.d.ts +5 -0
- package/dist/parts/ElementTagMap/ElementTagMap.d.ts +1 -0
- package/dist/parts/EventState/EventState.d.ts +3 -0
- package/dist/parts/FileHandles/FileHandles.d.ts +4 -0
- package/dist/parts/GetActiveElementInside/GetActiveElementInside.d.ts +1 -0
- package/dist/parts/GetEventListenerArg/GetEventListenerArg.d.ts +1 -0
- package/dist/parts/GetEventListenerArgs/GetEventListenerArgs.d.ts +1 -0
- package/dist/parts/GetEventListenerOptions/GetEventListenerOptions.d.ts +1 -0
- package/dist/parts/GetUidTarget/GetUidTarget.d.ts +1 -0
- package/dist/parts/GetWrappedListener/GetWrappedListener.d.ts +1 -0
- package/dist/parts/IDragInfo/IDragInfo.d.ts +10 -0
- package/dist/parts/Id/Id.d.ts +1 -0
- package/dist/parts/Instances/Instances.d.ts +2 -0
- package/dist/parts/IpcState/IpcState.d.ts +2 -0
- package/dist/parts/IsInputElement/IsInputElement.d.ts +1 -0
- package/dist/parts/ListenerCache/ListenerCache.d.ts +3 -0
- package/dist/parts/Main/Main.d.ts +11 -0
- package/dist/parts/NameAnonymousFunction/NameAnonymousFunction.d.ts +1 -0
- package/dist/parts/NavigateChildPatch/NavigateChildPatch.d.ts +4 -0
- package/dist/parts/NavigateParentPatch/NavigateParentPatch.d.ts +3 -0
- package/dist/parts/NavigateSiblingPatch/NavigateSiblingPatch.d.ts +4 -0
- package/dist/parts/Patch/Patch.d.ts +12 -0
- package/dist/parts/PatchFunctions/PatchFunctions.d.ts +6 -0
- package/dist/parts/PatchType/PatchType.d.ts +11 -0
- package/dist/parts/PreventEventsMaybe/PreventEventsMaybe.d.ts +1 -0
- package/dist/parts/QueryInputs/QueryInputs.d.ts +1 -0
- package/dist/parts/RegisterEventListeners/RegisterEventListeners.d.ts +2 -0
- package/dist/parts/RememberFocus/RememberFocus.d.ts +1 -0
- package/dist/parts/RemoveAttributePatch/RemoveAttributePatch.d.ts +4 -0
- package/dist/parts/RemoveChildPatch/RemoveChildPatch.d.ts +4 -0
- package/dist/parts/RemovePatch/RemovePatch.d.ts +4 -0
- package/dist/parts/RenderInternal/RenderInternal.d.ts +2 -0
- package/dist/parts/ReplacePatch/ReplacePatch.d.ts +5 -0
- package/dist/parts/SetDragImage/SetDragImage.d.ts +1 -0
- package/dist/parts/SetReferenceNodeUidPatch/SetReferenceNodeUidPatch.d.ts +4 -0
- package/dist/parts/TextPatch/TextPatch.d.ts +4 -0
- package/dist/parts/UidSymbol/UidSymbol.d.ts +1 -0
- package/dist/parts/VirtualDom/VirtualDom.d.ts +8 -0
- package/dist/parts/VirtualDomElement/VirtualDomElement.d.ts +2 -0
- package/dist/parts/VirtualDomElementProp/VirtualDomElementProp.d.ts +1 -0
- package/dist/parts/VirtualDomElementProps/VirtualDomElementProps.d.ts +1 -0
- package/dist/parts/VirtualDomElements/VirtualDomElements.d.ts +1 -0
- package/dist/parts/VirtualDomNode/VirtualDomNode.d.ts +4 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,91 +1 @@
|
|
|
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
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
|
|
299
|
-
|
|
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
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
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 @@
|
|
|
1
|
+
export declare const applyDragInfoMaybe: (event: DragEvent) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const attachEvent: ($Node: HTMLElement, eventMap: any, key: string, value: string, newEventMap?: any) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const clearNode: ($Node: HTMLElement) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const createFn: (info: any, map: any) => any;
|
|
@@ -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,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 @@
|
|
|
1
|
+
export declare const isInputElement: (element: HTMLElement) => boolean;
|
|
@@ -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,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 @@
|
|
|
1
|
+
export declare const rememberFocus: ($Viewlet: HTMLElement, dom: any[], eventMap: any, uid?: number) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const setDragImage: (dataTransfer: DataTransfer, label: string) => void;
|
|
@@ -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 @@
|
|
|
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;
|