@lvce-editor/virtual-dom-worker 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.
package/dist/index.d.ts CHANGED
@@ -1,30 +1,159 @@
1
- export interface VirtualDomNode {
2
- readonly type: number
3
- readonly [key: string]: any
4
- }
5
-
6
- export const text: (data: string) => VirtualDomNode
7
-
8
- export const mergeClassNames: (...classNames: readonly string[]) => string
9
-
10
- export const px: (value: number) => string
11
-
12
- export const position: (x: number, y: number) => string
13
-
14
- export interface Patch {}
15
-
16
- export const diff: (
17
- oldNodes: readonly VirtualDomNode[],
18
- newNodes: readonly VirtualDomNode[],
19
- ) => readonly Patch[]
1
+ // Generated by dts-bundle-generator v9.5.1
20
2
 
21
3
  export interface DomEventListener {
22
- readonly name: string
23
- readonly params: readonly string[]
24
- readonly preventDefault?: boolean
25
- readonly passive?: boolean
4
+ readonly name: string;
5
+ readonly params: readonly string[];
6
+ readonly preventDefault?: boolean;
7
+ readonly passive?: boolean;
8
+ }
9
+ export declare const mergeClassNames: (...classNames: readonly string[]) => string;
10
+ export interface VirtualDomNode {
11
+ readonly type: number;
12
+ readonly [key: string]: any;
26
13
  }
14
+ export declare const text: (data: string) => VirtualDomNode;
15
+ export interface AddPatch {
16
+ readonly type: 6;
17
+ readonly nodes: readonly VirtualDomNode[];
18
+ }
19
+ export interface AttributePatch {
20
+ readonly type: 3;
21
+ readonly key: string;
22
+ readonly value: any;
23
+ }
24
+ export type NavigateChildPatch = {
25
+ readonly type: 7;
26
+ readonly index: number;
27
+ };
28
+ export type NavigateParentPatch = {
29
+ readonly type: 8;
30
+ };
31
+ export type NavigateSiblingPatch = {
32
+ readonly type: 10;
33
+ readonly index: number;
34
+ };
35
+ export interface RemoveAttributePatch {
36
+ readonly type: 4;
37
+ readonly key: string;
38
+ }
39
+ export interface RemoveChildPatch {
40
+ readonly type: 9;
41
+ readonly index: number;
42
+ }
43
+ export interface RemovePatch {
44
+ readonly type: 5;
45
+ readonly index: number;
46
+ }
47
+ export interface ReplacePatch {
48
+ readonly type: 2;
49
+ readonly index: number;
50
+ readonly node: VirtualDomNode;
51
+ }
52
+ export interface TextPatch {
53
+ readonly type: 1;
54
+ readonly value: string;
55
+ }
56
+ export type Patch = TextPatch | AttributePatch | ReplacePatch | RemoveAttributePatch | RemovePatch | AddPatch | NavigateChildPatch | NavigateParentPatch | RemoveChildPatch | NavigateSiblingPatch;
57
+ export declare const diff: (oldNodes: readonly VirtualDomNode[], newNodes: readonly VirtualDomNode[]) => readonly Patch[];
58
+ declare const Audio = 0;
59
+ declare const Button = 1;
60
+ declare const Col = 2;
61
+ declare const ColGroup = 3;
62
+ declare const Div = 4;
63
+ declare const H1 = 5;
64
+ declare const Input = 6;
65
+ declare const Kbd = 7;
66
+ declare const Span = 8;
67
+ declare const Table = 9;
68
+ declare const TBody = 10;
69
+ declare const Td = 11;
70
+ declare const Text = 12;
71
+ declare const Th = 13;
72
+ declare const THead = 14;
73
+ declare const Tr = 15;
74
+ declare const I = 16;
75
+ declare const Img = 17;
76
+ declare const Root = 0;
77
+ declare const Ins = 20;
78
+ declare const Del = 21;
79
+ declare const H2 = 22;
80
+ declare const H3 = 23;
81
+ declare const H4 = 24;
82
+ declare const H5 = 25;
83
+ declare const H6 = 26;
84
+ declare const Article = 27;
85
+ declare const Aside = 28;
86
+ declare const Footer = 29;
87
+ declare const Header = 30;
88
+ declare const Nav = 40;
89
+ declare const Section = 41;
90
+ declare const Search = 42;
91
+ declare const Dd = 43;
92
+ declare const Dl = 44;
93
+ declare const Figcaption = 45;
94
+ declare const Figure = 46;
95
+ declare const Hr = 47;
96
+ declare const Li = 48;
97
+ declare const Ol = 49;
98
+ declare const P = 50;
99
+ declare const Pre = 51;
100
+ declare const A = 53;
101
+ declare const Abbr = 54;
102
+ declare const Br = 55;
103
+ declare const Cite = 56;
104
+ declare const Data = 57;
105
+ declare const Time = 58;
106
+ declare const Tfoot = 59;
107
+ declare const Ul = 60;
108
+ declare const Video = 61;
109
+ declare const TextArea = 62;
110
+ declare const Select = 63;
111
+ declare const Option = 64;
112
+ declare const Code = 65;
113
+ declare const Label = 66;
114
+ declare const CallStackArrow = "CallStackArrow";
115
+ declare const CallStackDescription = "CallStackDescription";
116
+ declare const CallStackLabel = "CallStackLabel";
117
+ declare const Chevron = "Chevron";
118
+ declare const DebugButton = "DebugButton";
119
+ declare const DebugButtons = "DebugButtons";
120
+ declare const DebugPausedMessage = "DebugPausedMessage";
121
+ declare const DebugPropertyChevron = "DebugPropertyChevron";
122
+ declare const DebugPropertyKey = "DebugPropertyKey";
123
+ declare const DebugRow = "DebugRow";
124
+ declare const DebugRowCallStack = "DebugRowCallStack";
125
+ declare const DebugRowCheckBox = "DebugRowCheckBox";
126
+ declare const DebugRowInputField = "DebugRowInputField";
127
+ declare const DebugSectionAction = "DebugSectionAction";
128
+ declare const DebugSectionActions = "DebugSectionActions";
129
+ declare const DebugSectionHeader = "DebugSectionHeader";
130
+ declare const DebugValue = "DebugValue";
131
+ declare const DebugValueBoolean = "DebugValueBoolean";
132
+ declare const DebugValueFunction = "DebugValueFunction";
133
+ declare const DebugValueGetter = "DebugValueGetter";
134
+ declare const DebugValueNumber = "DebugValueNumber";
135
+ declare const DebugValueObject = "DebugValueObject";
136
+ declare const DebugValueScopeName = "DebugValueScopeName";
137
+ declare const DebugValueString = "DebugValueString";
138
+ declare const DebugValueSymbol = "DebugValueSymbol";
139
+ declare const DebugValueUndefined = "DebugValueUndefined";
140
+ declare const DeleteWatchExpression = "DeleteWatchExpression";
141
+ declare const IconButton = "IconButton";
142
+ declare const InputBox = "InputBox";
143
+ declare const InputLabel = "InputLabel";
144
+ export declare const px: (value: number) => string;
145
+ export declare const position: (x: number, y: number) => string;
27
146
 
28
- export interface VirtualDomElements {
29
- readonly [key: number]: number
147
+ declare namespace ClassNames {
148
+ export { CallStackArrow, CallStackDescription, CallStackLabel, Chevron, DebugButton, DebugButtons, DebugPausedMessage, DebugPropertyChevron, DebugPropertyKey, DebugRow, DebugRowCallStack, DebugRowCheckBox, DebugRowInputField, DebugSectionAction, DebugSectionActions, DebugSectionHeader, DebugValue, DebugValueBoolean, DebugValueFunction, DebugValueGetter, DebugValueNumber, DebugValueObject, DebugValueScopeName, DebugValueString, DebugValueSymbol, DebugValueUndefined, DeleteWatchExpression, IconButton, InputBox, InputLabel };
149
+ }
150
+ declare namespace VirtualDomElements {
151
+ export { A, Abbr, Article, Aside, Audio, Br, Button, Cite, Code, Col, ColGroup, Data, Dd, Del, Div, Dl, Figcaption, Figure, Footer, H1, H2, H3, H4, H5, H6, Header, Hr, I, Img, Input, Ins, Kbd, Label, Li, Nav, Ol, Option, P, Pre, Root, Search, Section, Select, Span, TBody, THead, Table, Td, Text, TextArea, Tfoot, Th, Time, Tr, Ul, Video };
30
152
  }
153
+
154
+ export {
155
+ ClassNames,
156
+ VirtualDomElements,
157
+ };
158
+
159
+ export {};
package/dist/index.js CHANGED
@@ -343,6 +343,71 @@ const diff = (oldNodes, newNodes) => {
343
343
  return patches;
344
344
  };
345
345
 
346
+ const CallStackArrow = 'CallStackArrow';
347
+ const CallStackDescription = 'CallStackDescription';
348
+ const CallStackLabel = 'CallStackLabel';
349
+ const Chevron = 'Chevron';
350
+ const DebugButton = 'DebugButton';
351
+ const DebugButtons = 'DebugButtons';
352
+ const DebugPausedMessage = 'DebugPausedMessage';
353
+ const DebugPropertyChevron = 'DebugPropertyChevron';
354
+ const DebugPropertyKey = 'DebugPropertyKey';
355
+ const DebugRow = 'DebugRow';
356
+ const DebugRowCallStack = 'DebugRowCallStack';
357
+ const DebugRowCheckBox = 'DebugRowCheckBox';
358
+ const DebugRowInputField = 'DebugRowInputField';
359
+ const DebugSectionAction = 'DebugSectionAction';
360
+ const DebugSectionActions = 'DebugSectionActions';
361
+ const DebugSectionHeader = 'DebugSectionHeader';
362
+ const DebugValue = 'DebugValue';
363
+ const DebugValueBoolean = 'DebugValueBoolean';
364
+ const DebugValueFunction = 'DebugValueFunction';
365
+ const DebugValueGetter = 'DebugValueGetter';
366
+ const DebugValueNumber = 'DebugValueNumber';
367
+ const DebugValueObject = 'DebugValueObject';
368
+ const DebugValueScopeName = 'DebugValueScopeName';
369
+ const DebugValueString = 'DebugValueString';
370
+ const DebugValueSymbol = 'DebugValueSymbol';
371
+ const DebugValueUndefined = 'DebugValueUndefined';
372
+ const DeleteWatchExpression = 'DeleteWatchExpression';
373
+ const IconButton = 'IconButton';
374
+ const InputBox = 'InputBox';
375
+ const InputLabel = 'InputLabel';
376
+
377
+ const ClassNames = {
378
+ __proto__: null,
379
+ CallStackArrow,
380
+ CallStackDescription,
381
+ CallStackLabel,
382
+ Chevron,
383
+ DebugButton,
384
+ DebugButtons,
385
+ DebugPausedMessage,
386
+ DebugPropertyChevron,
387
+ DebugPropertyKey,
388
+ DebugRow,
389
+ DebugRowCallStack,
390
+ DebugRowCheckBox,
391
+ DebugRowInputField,
392
+ DebugSectionAction,
393
+ DebugSectionActions,
394
+ DebugSectionHeader,
395
+ DebugValue,
396
+ DebugValueBoolean,
397
+ DebugValueFunction,
398
+ DebugValueGetter,
399
+ DebugValueNumber,
400
+ DebugValueObject,
401
+ DebugValueScopeName,
402
+ DebugValueString,
403
+ DebugValueSymbol,
404
+ DebugValueUndefined,
405
+ DeleteWatchExpression,
406
+ IconButton,
407
+ InputBox,
408
+ InputLabel
409
+ };
410
+
346
411
  const px = value => {
347
412
  return `${value}px`;
348
413
  };
@@ -350,4 +415,4 @@ const position = (x, y) => {
350
415
  return `${x}px ${y}px`;
351
416
  };
352
417
 
353
- export { VirtualDomElements, diff, mergeClassNames, position, px, text };
418
+ export { ClassNames, VirtualDomElements, diff, mergeClassNames, position, px, text };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom-worker",
3
- "version": "1.45.0",
3
+ "version": "2.0.0",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -0,0 +1,30 @@
1
+ export const CallStackArrow = 'CallStackArrow'
2
+ export const CallStackDescription = 'CallStackDescription'
3
+ export const CallStackLabel = 'CallStackLabel'
4
+ export const Chevron = 'Chevron'
5
+ export const DebugButton = 'DebugButton'
6
+ export const DebugButtons = 'DebugButtons'
7
+ export const DebugPausedMessage = 'DebugPausedMessage'
8
+ export const DebugPropertyChevron = 'DebugPropertyChevron'
9
+ export const DebugPropertyKey = 'DebugPropertyKey'
10
+ export const DebugRow = 'DebugRow'
11
+ export const DebugRowCallStack = 'DebugRowCallStack'
12
+ export const DebugRowCheckBox = 'DebugRowCheckBox'
13
+ export const DebugRowInputField = 'DebugRowInputField'
14
+ export const DebugSectionAction = 'DebugSectionAction'
15
+ export const DebugSectionActions = 'DebugSectionActions'
16
+ export const DebugSectionHeader = 'DebugSectionHeader'
17
+ export const DebugValue = 'DebugValue'
18
+ export const DebugValueBoolean = 'DebugValueBoolean'
19
+ export const DebugValueFunction = 'DebugValueFunction'
20
+ export const DebugValueGetter = 'DebugValueGetter'
21
+ export const DebugValueNumber = 'DebugValueNumber'
22
+ export const DebugValueObject = 'DebugValueObject'
23
+ export const DebugValueScopeName = 'DebugValueScopeName'
24
+ export const DebugValueString = 'DebugValueString'
25
+ export const DebugValueSymbol = 'DebugValueSymbol'
26
+ export const DebugValueUndefined = 'DebugValueUndefined'
27
+ export const DeleteWatchExpression = 'DeleteWatchExpression'
28
+ export const IconButton = 'IconButton'
29
+ export const InputBox = 'InputBox'
30
+ export const InputLabel = 'InputLabel'
@@ -3,4 +3,5 @@ export * from '../MergeClassNames/MergeClassNames.ts'
3
3
  export * from '../Text/Text.ts'
4
4
  export { diff } from '../VirtualDomDiff/VirtualDomDiff.ts'
5
5
  export * as VirtualDomElements from '../VirtualDomElements/VirtualDomElements.ts'
6
+ export * as ClassNames from '../ClassNames/ClassNames.ts'
6
7
  export * from '../Px/Px.ts'