@lvce-editor/virtual-dom 6.11.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 (54) hide show
  1. package/dist/index.d.ts +1 -95
  2. package/dist/parts/AddPatch/AddPatch.d.ts +5 -0
  3. package/dist/parts/ApplyDragInfoMaybe/ApplyDragInfoMaybe.d.ts +1 -0
  4. package/dist/parts/ApplyPatch/ApplyPatch.d.ts +2 -0
  5. package/dist/parts/AttachEvent/AttachEvent.d.ts +1 -0
  6. package/dist/parts/AttributePatch/AttributePatch.d.ts +5 -0
  7. package/dist/parts/ClearNode/ClearNode.d.ts +1 -0
  8. package/dist/parts/ComponentUid/ComponentUid.d.ts +3 -0
  9. package/dist/parts/CreateEventListenerFunction/CreateEventListenerFunction.d.ts +1 -0
  10. package/dist/parts/DomEventType/DomEventType.d.ts +3 -0
  11. package/dist/parts/DragInfo/DragInfo.d.ts +5 -0
  12. package/dist/parts/ElementTagMap/ElementTagMap.d.ts +1 -0
  13. package/dist/parts/EventState/EventState.d.ts +3 -0
  14. package/dist/parts/FileHandles/FileHandles.d.ts +4 -0
  15. package/dist/parts/GetActiveElementInside/GetActiveElementInside.d.ts +1 -0
  16. package/dist/parts/GetEventListenerArg/GetEventListenerArg.d.ts +1 -0
  17. package/dist/parts/GetEventListenerArgs/GetEventListenerArgs.d.ts +1 -0
  18. package/dist/parts/GetEventListenerOptions/GetEventListenerOptions.d.ts +1 -0
  19. package/dist/parts/GetUidTarget/GetUidTarget.d.ts +1 -0
  20. package/dist/parts/GetWrappedListener/GetWrappedListener.d.ts +1 -0
  21. package/dist/parts/IDragInfo/IDragInfo.d.ts +10 -0
  22. package/dist/parts/Id/Id.d.ts +1 -0
  23. package/dist/parts/Instances/Instances.d.ts +2 -0
  24. package/dist/parts/IpcState/IpcState.d.ts +2 -0
  25. package/dist/parts/IsInputElement/IsInputElement.d.ts +1 -0
  26. package/dist/parts/ListenerCache/ListenerCache.d.ts +3 -0
  27. package/dist/parts/Main/Main.d.ts +11 -0
  28. package/dist/parts/NameAnonymousFunction/NameAnonymousFunction.d.ts +1 -0
  29. package/dist/parts/NavigateChildPatch/NavigateChildPatch.d.ts +4 -0
  30. package/dist/parts/NavigateParentPatch/NavigateParentPatch.d.ts +3 -0
  31. package/dist/parts/NavigateSiblingPatch/NavigateSiblingPatch.d.ts +4 -0
  32. package/dist/parts/Patch/Patch.d.ts +12 -0
  33. package/dist/parts/PatchFunctions/PatchFunctions.d.ts +6 -0
  34. package/dist/parts/PatchType/PatchType.d.ts +11 -0
  35. package/dist/parts/PreventEventsMaybe/PreventEventsMaybe.d.ts +1 -0
  36. package/dist/parts/QueryInputs/QueryInputs.d.ts +1 -0
  37. package/dist/parts/RegisterEventListeners/RegisterEventListeners.d.ts +2 -0
  38. package/dist/parts/RememberFocus/RememberFocus.d.ts +1 -0
  39. package/dist/parts/RemoveAttributePatch/RemoveAttributePatch.d.ts +4 -0
  40. package/dist/parts/RemoveChildPatch/RemoveChildPatch.d.ts +4 -0
  41. package/dist/parts/RemovePatch/RemovePatch.d.ts +4 -0
  42. package/dist/parts/RenderInternal/RenderInternal.d.ts +2 -0
  43. package/dist/parts/ReplacePatch/ReplacePatch.d.ts +5 -0
  44. package/dist/parts/SetDragImage/SetDragImage.d.ts +1 -0
  45. package/dist/parts/SetReferenceNodeUidPatch/SetReferenceNodeUidPatch.d.ts +4 -0
  46. package/dist/parts/TextPatch/TextPatch.d.ts +4 -0
  47. package/dist/parts/UidSymbol/UidSymbol.d.ts +1 -0
  48. package/dist/parts/VirtualDom/VirtualDom.d.ts +8 -0
  49. package/dist/parts/VirtualDomElement/VirtualDomElement.d.ts +2 -0
  50. package/dist/parts/VirtualDomElementProp/VirtualDomElementProp.d.ts +1 -0
  51. package/dist/parts/VirtualDomElementProps/VirtualDomElementProps.d.ts +1 -0
  52. package/dist/parts/VirtualDomElements/VirtualDomElements.d.ts +1 -0
  53. package/dist/parts/VirtualDomNode/VirtualDomNode.d.ts +4 -0
  54. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,95 +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 SetReferenceNodeUidPatch {
44
- readonly type: 11;
45
- readonly uid: string;
46
- }
47
- export interface TextPatch {
48
- readonly type: 1;
49
- readonly value: string;
50
- }
51
- export type Patch = TextPatch | AttributePatch | ReplacePatch | RemoveAttributePatch | RemovePatch | AddPatch | NavigateChildPatch | NavigateParentPatch | RemoveChildPatch | NavigateSiblingPatch | SetReferenceNodeUidPatch;
52
- export declare const applyPatch: ($Element: Node, patches: readonly Patch[], eventMap?: Record<string, any>, id?: any) => void;
53
- export declare const setComponentUid: ($Element: any, uid: any) => void;
54
- export declare const getComponentUid: ($Element: any) => number;
55
- export declare const getComponentUidFromEvent: (event: any) => number;
56
- export interface DragInfoItem {
57
- readonly data: string;
58
- readonly type: string;
59
- }
60
- export interface IDragInfoNew {
61
- readonly items: readonly DragInfoItem[];
62
- readonly label?: string;
63
- }
64
- export type IDragInfoOld = readonly DragInfoItem[];
65
- export type IDragInfo = IDragInfoNew | IDragInfoOld;
66
- export declare const setDragInfo: (id: string | number, data: IDragInfo) => void;
67
- export declare const getDragInfo: (id: string | number) => IDragInfo;
68
- export declare const removeDragInfo: (id: string | number) => void;
69
- export declare const getFileHandles: (ids: readonly number[]) => Promise<readonly FileSystemHandle[]>;
70
- export declare const addFileHandle: (fileHandle: FileSystemHandle) => number;
71
- export declare const setIpc: (value: any) => void;
72
- export declare const registerEventListeners: (id: any, eventListeners: any) => void;
73
- export declare const rememberFocus: ($Viewlet: HTMLElement, dom: any[], eventMap: any, uid?: number) => any;
74
- export declare const renderInto: ($Parent: any, dom: any, eventMap?: {}) => void;
75
- /**
76
- *
77
- * @param {any[]} elements
78
- * @returns
79
- */
80
- export declare const render: (elements: any, eventMap?: {}, newEventMap?: {}) => HTMLElement;
81
- 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;
82
- declare const get: (viewletId: string | number) => any;
83
- declare const set: (viewletId: string | number, instance: any) => void;
84
-
85
- declare namespace VirtualDomElements {
86
- 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 };
87
- }
88
-
89
- export {
90
- VirtualDomElements,
91
- get as getViewletInstance,
92
- set as setViewletInstance,
93
- };
94
-
95
- export {};
1
+ export * from './parts/Main/Main.ts';
@@ -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.11.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"