@lvce-editor/virtual-dom-worker 9.10.0 → 9.11.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 (37) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/parts/AddPatch/AddPatch.d.ts +5 -0
  3. package/dist/parts/ApplyPendingPatches/ApplyPendingPatches.d.ts +2 -0
  4. package/dist/parts/AriaLive/AriaLive.d.ts +1 -0
  5. package/dist/parts/AttributePatch/AttributePatch.d.ts +5 -0
  6. package/dist/parts/DomEventListener/DomEventListener.d.ts +6 -0
  7. package/dist/parts/GetKeys/GetKeys.d.ts +2 -0
  8. package/dist/parts/GetTotalChildCount/GetTotalChildCount.d.ts +2 -0
  9. package/dist/parts/InputEventType/InputEventType.d.ts +8 -0
  10. package/dist/parts/IsKey/IsKey.d.ts +1 -0
  11. package/dist/parts/Main/Main.d.ts +9 -0
  12. package/dist/parts/MergeClassNames/MergeClassNames.d.ts +1 -0
  13. package/dist/parts/MouseEventType/MouseEventType.d.ts +2 -0
  14. package/dist/parts/NavigateChildPatch/NavigateChildPatch.d.ts +4 -0
  15. package/dist/parts/NavigateParentPatch/NavigateParentPatch.d.ts +3 -0
  16. package/dist/parts/NavigateSiblingPatch/NavigateSiblingPatch.d.ts +4 -0
  17. package/dist/parts/Patch/Patch.d.ts +12 -0
  18. package/dist/parts/PatchType/PatchType.d.ts +11 -0
  19. package/dist/parts/Px/Px.d.ts +2 -0
  20. package/dist/parts/RemoveAttributePatch/RemoveAttributePatch.d.ts +4 -0
  21. package/dist/parts/RemoveChildPatch/RemoveChildPatch.d.ts +4 -0
  22. package/dist/parts/RemovePatch/RemovePatch.d.ts +4 -0
  23. package/dist/parts/ReplacePatch/ReplacePatch.d.ts +5 -0
  24. package/dist/parts/SetReferenceNodeUidPatch/SetReferenceNodeUidPatch.d.ts +4 -0
  25. package/dist/parts/Text/Text.d.ts +2 -0
  26. package/dist/parts/TextPatch/TextPatch.d.ts +4 -0
  27. package/dist/parts/VirtualDomDiff/VirtualDomDiff.d.ts +3 -0
  28. package/dist/parts/VirtualDomDiffTree/AddNavigationPatches.d.ts +2 -0
  29. package/dist/parts/VirtualDomDiffTree/CompareNodes.d.ts +3 -0
  30. package/dist/parts/VirtualDomDiffTree/DiffTrees.d.ts +3 -0
  31. package/dist/parts/VirtualDomDiffTree/RemoveTrailingNavigationPatches.d.ts +2 -0
  32. package/dist/parts/VirtualDomDiffTree/TreeToArray.d.ts +3 -0
  33. package/dist/parts/VirtualDomDiffTree/VirtualDomDiffTree.d.ts +3 -0
  34. package/dist/parts/VirtualDomNode/VirtualDomNode.d.ts +4 -0
  35. package/dist/parts/VirtualDomTree/VirtualDomTree.d.ts +6 -0
  36. package/dist/parts/WhenExpression/WhenExpression.d.ts +54 -0
  37. package/package.json +1 -1
@@ -0,0 +1 @@
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,2 @@
1
+ import type { Patch } from '../Patch/Patch.ts';
2
+ export declare const applyPendingPatches: (patches: Patch[], pendingPatches: number[], skip: number) => void;
@@ -0,0 +1 @@
1
+ export declare const Polite = "polite";
@@ -0,0 +1,5 @@
1
+ export interface AttributePatch {
2
+ readonly key: string;
3
+ readonly type: 3;
4
+ readonly value: any;
5
+ }
@@ -0,0 +1,6 @@
1
+ export interface DomEventListener {
2
+ readonly name: string | number;
3
+ readonly params: readonly (string | number)[];
4
+ readonly passive?: boolean;
5
+ readonly preventDefault?: boolean;
6
+ }
@@ -0,0 +1,2 @@
1
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
2
+ export declare const getKeys: (node: VirtualDomNode) => readonly string[];
@@ -0,0 +1,2 @@
1
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
2
+ export declare const getTotalChildCount: (nodes: readonly VirtualDomNode[], index: number) => number;
@@ -0,0 +1,8 @@
1
+ export declare const InsertText = "insertText";
2
+ export declare const DeleteContentBackward = "deleteContentBackward";
3
+ export declare const DeleteContentForward = "deleteContentForward";
4
+ export declare const DeleteWordForward = "deleteWordForward";
5
+ export declare const DeleteWordBackward = "deleteWordBackward";
6
+ export declare const InsertLineBreak = "insertLineBreak";
7
+ export declare const InsertCompositionText = "insertCompositionText";
8
+ export declare const InsertFromPaste = "insertFromPaste";
@@ -0,0 +1 @@
1
+ export declare const isKey: (key: string) => boolean;
@@ -0,0 +1,9 @@
1
+ export { AriaRoles, ClassNames, InputEventType, KeyCode, KeyModifier, MouseEventType, VirtualDomElements, WhenExpression, } from '@lvce-editor/constants';
2
+ export * as AriaLive from '../AriaLive/AriaLive.ts';
3
+ export type * from '../DomEventListener/DomEventListener.ts';
4
+ export * from '../MergeClassNames/MergeClassNames.ts';
5
+ export * from '../Px/Px.ts';
6
+ export * from '../Text/Text.ts';
7
+ export { diff } from '../VirtualDomDiff/VirtualDomDiff.ts';
8
+ export { diffTree } from '../VirtualDomDiffTree/VirtualDomDiffTree.ts';
9
+ export type * from '../VirtualDomNode/VirtualDomNode.ts';
@@ -0,0 +1 @@
1
+ export declare const mergeClassNames: (...classNames: readonly string[]) => string;
@@ -0,0 +1,2 @@
1
+ export declare const Keyboard = -1;
2
+ export declare const LeftClick = 0;
@@ -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,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,2 @@
1
+ export declare const px: (value: number) => string;
2
+ export declare const position: (x: number, y: number) => string;
@@ -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,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,4 @@
1
+ export interface SetReferenceNodeUidPatch {
2
+ readonly type: 11;
3
+ readonly uid: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
2
+ export declare const text: (data: string) => VirtualDomNode;
@@ -0,0 +1,4 @@
1
+ export interface TextPatch {
2
+ readonly type: 1;
3
+ readonly value: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ import type { Patch } from '../Patch/Patch.ts';
2
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
3
+ export declare const diff: (oldNodes: readonly VirtualDomNode[], newNodes: readonly VirtualDomNode[]) => readonly Patch[];
@@ -0,0 +1,2 @@
1
+ import type { Patch } from '../Patch/Patch.ts';
2
+ export declare const addNavigationPatches: (patches: Patch[], path: number[], currentIndex: number, currentPath?: number[]) => void;
@@ -0,0 +1,3 @@
1
+ import type { Patch } from '../Patch/Patch.ts';
2
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
3
+ export declare const compareNodes: (oldNode: VirtualDomNode, newNode: VirtualDomNode) => Patch[] | null;
@@ -0,0 +1,3 @@
1
+ import type { Patch } from '../Patch/Patch.ts';
2
+ import type * as VirtualDomTree from '../VirtualDomTree/VirtualDomTree.ts';
3
+ export declare const diffTrees: (oldTree: readonly VirtualDomTree.VirtualDomTreeNode[], newTree: readonly VirtualDomTree.VirtualDomTreeNode[], patches: Patch[], path: number[]) => void;
@@ -0,0 +1,2 @@
1
+ import type { Patch } from '../Patch/Patch.ts';
2
+ export declare const removeTrailingNavigationPatches: (patches: Patch[]) => Patch[];
@@ -0,0 +1,3 @@
1
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
2
+ import type { VirtualDomTreeNode } from '../VirtualDomTree/VirtualDomTree.ts';
3
+ export declare const treeToArray: (node: VirtualDomTreeNode) => readonly VirtualDomNode[];
@@ -0,0 +1,3 @@
1
+ import type { Patch } from '../Patch/Patch.ts';
2
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
3
+ export declare const diffTree: (oldNodes: readonly VirtualDomNode[], newNodes: readonly VirtualDomNode[]) => readonly Patch[];
@@ -0,0 +1,4 @@
1
+ export interface VirtualDomNode {
2
+ readonly [key: string]: any;
3
+ readonly type: number;
4
+ }
@@ -0,0 +1,6 @@
1
+ import type { VirtualDomNode } from '../VirtualDomNode/VirtualDomNode.ts';
2
+ export interface VirtualDomTreeNode {
3
+ readonly children: readonly VirtualDomTreeNode[];
4
+ readonly node: VirtualDomNode;
5
+ }
6
+ export declare const arrayToTree: (nodes: readonly VirtualDomNode[]) => readonly VirtualDomTreeNode[];
@@ -0,0 +1,54 @@
1
+ export declare const Empty = 0;
2
+ export declare const BrowserChromium = 1;
3
+ export declare const BrowserElectron = 2;
4
+ export declare const BrowserFirefox = 3;
5
+ export declare const FocusAbout = 4;
6
+ export declare const FocusActivityBar = 5;
7
+ export declare const FocusDebugInput = 6;
8
+ export declare const FocusDialog = 7;
9
+ export declare const FocusEditor = 12;
10
+ export declare const FocusEditorCompletions = 9;
11
+ export declare const FocusEditorImage = 10;
12
+ export declare const FocusEditorRename = 11;
13
+ export declare const FocusEditorText = 12;
14
+ export declare const FocusExplorer = 13;
15
+ export declare const FocusExplorerEditBox = 14;
16
+ export declare const FocusExtensions = 15;
17
+ export declare const FocusFindWidget = 16;
18
+ export declare const FocusLocationList = 17;
19
+ export declare const FocusMenu = 18;
20
+ export declare const FocusProblems = 19;
21
+ export declare const FocusQuickPickInput = 20;
22
+ export declare const FocusSearchInput = 21;
23
+ export declare const FocusSearchResults = 22;
24
+ export declare const FocusSimpleBrowserInput = 23;
25
+ export declare const FocusSourceControlInput = 24;
26
+ export declare const FocusTerminal = 25;
27
+ export declare const FocusTitleBarMenuBar = 26;
28
+ export declare const FocusViewletList = 27;
29
+ export declare const FocusOutput = 28;
30
+ export declare const FocusDebugConsoleInput = 29;
31
+ export declare const FocusDebugScope = 30;
32
+ export declare const FocusSearchReplaceInput = 31;
33
+ export declare const FocusSearchMatchCase = 32;
34
+ export declare const FocusSearchRegex = 33;
35
+ export declare const FocusSearchWholeWord = 34;
36
+ export declare const FocusSearchReplaceAll = 35;
37
+ export declare const FocusSearchPreserveCase = 36;
38
+ export declare const FocusSimpleBrowser = 37;
39
+ export declare const FocusSourceActions = 38;
40
+ export declare const FocusKeyBindingsTable = 39;
41
+ export declare const FocusConfirm = 40;
42
+ export declare const FocusColorPicker = 41;
43
+ export declare const FocusFindWidgetToggleReplace = 42;
44
+ export declare const FocusFindWidgetReplace = 43;
45
+ export declare const FocusFindWidgetRegex = 44;
46
+ export declare const FocusFindWidgetMatchCase = 45;
47
+ export declare const FocusFindWidgetReplaceButton = 46;
48
+ export declare const FocusFindWidgetReplaceAllButton = 47;
49
+ export declare const FocusFindWidgetCloseButton = 48;
50
+ export declare const FocusFindWidgetNextMatchButton = 49;
51
+ export declare const FocusFindWidgetPreviousMatchButton = 50;
52
+ export declare const FocusEditorHover = 51;
53
+ export declare const FocusEditorCodeGenerator = 52;
54
+ export declare const FocusKeyBindingsWhenExpression = 53;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom-worker",
3
- "version": "9.10.0",
3
+ "version": "9.11.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lvce-editor/virtual-dom.git"