@lvce-editor/virtual-dom-worker 1.45.0 → 2.1.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,311 @@
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
 
3
+ declare const CallStackArrow = "CallStackArrow";
4
+ declare const CallStackDescription = "CallStackDescription";
5
+ declare const CallStackLabel = "CallStackLabel";
6
+ declare const Chevron = "Chevron";
7
+ declare const DebugButton = "DebugButton";
8
+ declare const DebugButtons = "DebugButtons";
9
+ declare const DebugPausedMessage = "DebugPausedMessage";
10
+ declare const DebugPropertyChevron = "DebugPropertyChevron";
11
+ declare const DebugPropertyKey = "DebugPropertyKey";
12
+ declare const DebugRow = "DebugRow";
13
+ declare const DebugRowCallStack = "DebugRowCallStack";
14
+ declare const DebugRowCheckBox = "DebugRowCheckBox";
15
+ declare const DebugRowInputField = "DebugRowInputField";
16
+ declare const DebugSectionAction = "DebugSectionAction";
17
+ declare const DebugSectionActions = "DebugSectionActions";
18
+ declare const DebugSectionHeader = "DebugSectionHeader";
19
+ declare const DebugValue = "DebugValue";
20
+ declare const DebugValueBoolean = "DebugValueBoolean";
21
+ declare const DebugValueFunction = "DebugValueFunction";
22
+ declare const DebugValueGetter = "DebugValueGetter";
23
+ declare const DebugValueNumber = "DebugValueNumber";
24
+ declare const DebugValueObject = "DebugValueObject";
25
+ declare const DebugValueScopeName = "DebugValueScopeName";
26
+ declare const DebugValueString = "DebugValueString";
27
+ declare const DebugValueSymbol = "DebugValueSymbol";
28
+ declare const DebugValueUndefined = "DebugValueUndefined";
29
+ declare const DeleteWatchExpression = "DeleteWatchExpression";
30
+ declare const IconButton = "IconButton";
31
+ declare const InputBox = "InputBox";
32
+ declare const InputLabel = "InputLabel";
21
33
  export interface DomEventListener {
22
- readonly name: string
23
- readonly params: readonly string[]
24
- readonly preventDefault?: boolean
25
- readonly passive?: boolean
34
+ readonly name: string;
35
+ readonly params: readonly string[];
36
+ readonly preventDefault?: boolean;
37
+ readonly passive?: boolean;
38
+ }
39
+ declare const Unknown = 0;
40
+ declare const Backspace = 1;
41
+ declare const Tab = 2;
42
+ declare const Enter = 3;
43
+ declare const Ctrl = 4;
44
+ declare const Alt = 5;
45
+ declare const PauseBreak = 6;
46
+ declare const CapsLock = 7;
47
+ declare const Escape = 8;
48
+ declare const Space = 9;
49
+ declare const PageUp = 10;
50
+ declare const PageDown = 11;
51
+ declare const End = 255;
52
+ declare const Home = 12;
53
+ declare const LeftArrow = 13;
54
+ declare const UpArrow = 14;
55
+ declare const RightArrow = 15;
56
+ declare const DownArrow = 16;
57
+ declare const Insert = 17;
58
+ declare const Delete = 18;
59
+ declare const Digit0 = 19;
60
+ declare const Digit1 = 20;
61
+ declare const Digit2 = 21;
62
+ declare const Digit3 = 22;
63
+ declare const Digit4 = 23;
64
+ declare const Digit5 = 24;
65
+ declare const Digit6 = 25;
66
+ declare const Digit7 = 26;
67
+ declare const Digit8 = 27;
68
+ declare const Digit9 = 28;
69
+ declare const KeyA = 29;
70
+ declare const KeyB = 30;
71
+ declare const KeyC = 31;
72
+ declare const KeyD = 32;
73
+ declare const KeyE = 33;
74
+ declare const KeyF = 34;
75
+ declare const KeyG = 35;
76
+ declare const KeyH = 36;
77
+ declare const KeyI = 37;
78
+ declare const KeyJ = 38;
79
+ declare const KeyK = 39;
80
+ declare const KeyL = 40;
81
+ declare const KeyM = 41;
82
+ declare const KeyN = 42;
83
+ declare const KeyO = 43;
84
+ declare const KeyP = 44;
85
+ declare const KeyQ = 45;
86
+ declare const KeyR = 46;
87
+ declare const KeyS = 47;
88
+ declare const KeyT = 48;
89
+ declare const KeyU = 49;
90
+ declare const KeyV = 50;
91
+ declare const KeyW = 51;
92
+ declare const KeyX = 52;
93
+ declare const KeyY = 53;
94
+ declare const KeyZ = 54;
95
+ declare const Meta = 55;
96
+ declare const ContextMenu = 56;
97
+ declare const F1 = 57;
98
+ declare const F2 = 58;
99
+ declare const F3 = 59;
100
+ declare const F4 = 60;
101
+ declare const F5 = 61;
102
+ declare const F6 = 62;
103
+ declare const F7 = 63;
104
+ declare const F8 = 64;
105
+ declare const F9 = 65;
106
+ declare const F10 = 66;
107
+ declare const F11 = 67;
108
+ declare const F12 = 68;
109
+ declare const F13 = 69;
110
+ declare const F14 = 70;
111
+ declare const F15 = 71;
112
+ declare const F16 = 72;
113
+ declare const F17 = 72;
114
+ declare const F18 = 74;
115
+ declare const F19 = 75;
116
+ declare const F20 = 76;
117
+ declare const F21 = 77;
118
+ declare const F22 = 78;
119
+ declare const F23 = 79;
120
+ declare const F24 = 80;
121
+ declare const NumLock = 81;
122
+ declare const ScrollLock = 82;
123
+ declare const SemiColon = 83;
124
+ declare const Equal = 84;
125
+ declare const Comma = 85;
126
+ declare const Minus = 86;
127
+ declare const Period = 87;
128
+ declare const Slash = 88;
129
+ declare const Backquote = 89;
130
+ declare const BracketLeft = 90;
131
+ declare const Backslash = 91;
132
+ declare const BracketRight = 92;
133
+ declare const Quote = 93;
134
+ declare const OEM_8 = 94;
135
+ declare const IntlBackslash = 95;
136
+ declare const Numpad0 = 96;
137
+ declare const Numpad1 = 97;
138
+ declare const Numpad2 = 98;
139
+ declare const Numpad3 = 99;
140
+ declare const Numpad4 = 100;
141
+ declare const Numpad5 = 101;
142
+ declare const Numpad6 = 102;
143
+ declare const Numpad7 = 103;
144
+ declare const Numpad8 = 104;
145
+ declare const Numpad9 = 105;
146
+ declare const NumpadMultiply = 106;
147
+ declare const NumpadAdd = 107;
148
+ declare const NumpadSeparator = 108;
149
+ declare const NumpadSubtract = 109;
150
+ declare const NumpadDecimal = 110;
151
+ declare const NumpadDivide = 111;
152
+ declare const KeyInComposition = 112;
153
+ declare const ABNT_C1 = 113;
154
+ declare const ABNT_C2 = 114;
155
+ declare const AudioVolumeMute = 115;
156
+ declare const AudioVolumeUp = 116;
157
+ declare const AudioVolumeDown = 117;
158
+ declare const BrowserSearch = 118;
159
+ declare const BrowserHome = 119;
160
+ declare const BrowserBack = 120;
161
+ declare const BrowserForward = 121;
162
+ declare const MediaTrackNext = 122;
163
+ declare const MediaTrackPrevious = 123;
164
+ declare const MediaStop = 124;
165
+ declare const MediaPlayPause = 125;
166
+ declare const LaunchMediaPlayer = 126;
167
+ declare const LaunchMail = 127;
168
+ declare const LaunchApp2 = 128;
169
+ declare const Clear = 129;
170
+ declare const MaxValue = 130;
171
+ declare const Star = 131;
172
+ declare const Plus = 132;
173
+ declare const CtrlCmd: number;
174
+ declare const Shift: number;
175
+ declare const Alt$1: number;
176
+ declare const WinCtrl: number;
177
+ export declare const mergeClassNames: (...classNames: readonly string[]) => string;
178
+ declare const Keyboard = -1;
179
+ declare const LeftClick = 0;
180
+ export declare const px: (value: number) => string;
181
+ export declare const position: (x: number, y: number) => string;
182
+ export interface VirtualDomNode {
183
+ readonly type: number;
184
+ readonly [key: string]: any;
185
+ }
186
+ export declare const text: (data: string) => VirtualDomNode;
187
+ export interface AddPatch {
188
+ readonly type: 6;
189
+ readonly nodes: readonly VirtualDomNode[];
190
+ }
191
+ export interface AttributePatch {
192
+ readonly type: 3;
193
+ readonly key: string;
194
+ readonly value: any;
26
195
  }
196
+ export type NavigateChildPatch = {
197
+ readonly type: 7;
198
+ readonly index: number;
199
+ };
200
+ export type NavigateParentPatch = {
201
+ readonly type: 8;
202
+ };
203
+ export type NavigateSiblingPatch = {
204
+ readonly type: 10;
205
+ readonly index: number;
206
+ };
207
+ export interface RemoveAttributePatch {
208
+ readonly type: 4;
209
+ readonly key: string;
210
+ }
211
+ export interface RemoveChildPatch {
212
+ readonly type: 9;
213
+ readonly index: number;
214
+ }
215
+ export interface RemovePatch {
216
+ readonly type: 5;
217
+ readonly index: number;
218
+ }
219
+ export interface ReplacePatch {
220
+ readonly type: 2;
221
+ readonly index: number;
222
+ readonly node: VirtualDomNode;
223
+ }
224
+ export interface TextPatch {
225
+ readonly type: 1;
226
+ readonly value: string;
227
+ }
228
+ export type Patch = TextPatch | AttributePatch | ReplacePatch | RemoveAttributePatch | RemovePatch | AddPatch | NavigateChildPatch | NavigateParentPatch | RemoveChildPatch | NavigateSiblingPatch;
229
+ export declare const diff: (oldNodes: readonly VirtualDomNode[], newNodes: readonly VirtualDomNode[]) => readonly Patch[];
230
+ declare const Audio = 0;
231
+ declare const Button = 1;
232
+ declare const Col = 2;
233
+ declare const ColGroup = 3;
234
+ declare const Div = 4;
235
+ declare const H1 = 5;
236
+ declare const Input = 6;
237
+ declare const Kbd = 7;
238
+ declare const Span = 8;
239
+ declare const Table = 9;
240
+ declare const TBody = 10;
241
+ declare const Td = 11;
242
+ declare const Text = 12;
243
+ declare const Th = 13;
244
+ declare const THead = 14;
245
+ declare const Tr = 15;
246
+ declare const I = 16;
247
+ declare const Img = 17;
248
+ declare const Root = 0;
249
+ declare const Ins = 20;
250
+ declare const Del = 21;
251
+ declare const H2 = 22;
252
+ declare const H3 = 23;
253
+ declare const H4 = 24;
254
+ declare const H5 = 25;
255
+ declare const H6 = 26;
256
+ declare const Article = 27;
257
+ declare const Aside = 28;
258
+ declare const Footer = 29;
259
+ declare const Header = 30;
260
+ declare const Nav = 40;
261
+ declare const Section = 41;
262
+ declare const Search = 42;
263
+ declare const Dd = 43;
264
+ declare const Dl = 44;
265
+ declare const Figcaption = 45;
266
+ declare const Figure = 46;
267
+ declare const Hr = 47;
268
+ declare const Li = 48;
269
+ declare const Ol = 49;
270
+ declare const P = 50;
271
+ declare const Pre = 51;
272
+ declare const A = 53;
273
+ declare const Abbr = 54;
274
+ declare const Br = 55;
275
+ declare const Cite = 56;
276
+ declare const Data = 57;
277
+ declare const Time = 58;
278
+ declare const Tfoot = 59;
279
+ declare const Ul = 60;
280
+ declare const Video = 61;
281
+ declare const TextArea = 62;
282
+ declare const Select = 63;
283
+ declare const Option = 64;
284
+ declare const Code = 65;
285
+ declare const Label = 66;
27
286
 
28
- export interface VirtualDomElements {
29
- readonly [key: number]: number
287
+ declare namespace VirtualDomElements {
288
+ 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 };
289
+ }
290
+ declare namespace ClassNames {
291
+ 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 };
30
292
  }
293
+ declare namespace KeyCode {
294
+ export { ABNT_C1, ABNT_C2, Alt, AudioVolumeDown, AudioVolumeMute, AudioVolumeUp, Backquote, Backslash, Backspace, BracketLeft, BracketRight, BrowserBack, BrowserForward, BrowserHome, BrowserSearch, CapsLock, Clear, Comma, ContextMenu, Ctrl, Delete, Digit0, Digit1, Digit2, Digit3, Digit4, Digit5, Digit6, Digit7, Digit8, Digit9, DownArrow, End, Enter, Equal, Escape, F1, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F2, F20, F21, F22, F23, F24, F3, F4, F5, F6, F7, F8, F9, Home, Insert, IntlBackslash, KeyA, KeyB, KeyC, KeyD, KeyE, KeyF, KeyG, KeyH, KeyI, KeyInComposition, KeyJ, KeyK, KeyL, KeyM, KeyN, KeyO, KeyP, KeyQ, KeyR, KeyS, KeyT, KeyU, KeyV, KeyW, KeyX, KeyY, KeyZ, LaunchApp2, LaunchMail, LaunchMediaPlayer, LeftArrow, MaxValue, MediaPlayPause, MediaStop, MediaTrackNext, MediaTrackPrevious, Meta, Minus, NumLock, Numpad0, Numpad1, Numpad2, Numpad3, Numpad4, Numpad5, Numpad6, Numpad7, Numpad8, Numpad9, NumpadAdd, NumpadDecimal, NumpadDivide, NumpadMultiply, NumpadSeparator, NumpadSubtract, OEM_8, PageDown, PageUp, PauseBreak, Period, Plus, Quote, RightArrow, ScrollLock, SemiColon, Slash, Space, Star, Tab, Unknown, UpArrow };
295
+ }
296
+ declare namespace KeyModifier {
297
+ export { Alt$1 as Alt, CtrlCmd, Shift, WinCtrl };
298
+ }
299
+ declare namespace MouseEventType {
300
+ export { Keyboard, LeftClick };
301
+ }
302
+
303
+ export {
304
+ ClassNames,
305
+ KeyCode,
306
+ KeyModifier,
307
+ MouseEventType,
308
+ VirtualDomElements,
309
+ };
310
+
311
+ export {};
package/dist/index.js CHANGED
@@ -1,7 +1,374 @@
1
+ const CallStackArrow = 'CallStackArrow';
2
+ const CallStackDescription = 'CallStackDescription';
3
+ const CallStackLabel = 'CallStackLabel';
4
+ const Chevron = 'Chevron';
5
+ const DebugButton = 'DebugButton';
6
+ const DebugButtons = 'DebugButtons';
7
+ const DebugPausedMessage = 'DebugPausedMessage';
8
+ const DebugPropertyChevron = 'DebugPropertyChevron';
9
+ const DebugPropertyKey = 'DebugPropertyKey';
10
+ const DebugRow = 'DebugRow';
11
+ const DebugRowCallStack = 'DebugRowCallStack';
12
+ const DebugRowCheckBox = 'DebugRowCheckBox';
13
+ const DebugRowInputField = 'DebugRowInputField';
14
+ const DebugSectionAction = 'DebugSectionAction';
15
+ const DebugSectionActions = 'DebugSectionActions';
16
+ const DebugSectionHeader = 'DebugSectionHeader';
17
+ const DebugValue = 'DebugValue';
18
+ const DebugValueBoolean = 'DebugValueBoolean';
19
+ const DebugValueFunction = 'DebugValueFunction';
20
+ const DebugValueGetter = 'DebugValueGetter';
21
+ const DebugValueNumber = 'DebugValueNumber';
22
+ const DebugValueObject = 'DebugValueObject';
23
+ const DebugValueScopeName = 'DebugValueScopeName';
24
+ const DebugValueString = 'DebugValueString';
25
+ const DebugValueSymbol = 'DebugValueSymbol';
26
+ const DebugValueUndefined = 'DebugValueUndefined';
27
+ const DeleteWatchExpression = 'DeleteWatchExpression';
28
+ const IconButton = 'IconButton';
29
+ const InputBox = 'InputBox';
30
+ const InputLabel = 'InputLabel';
31
+
32
+ const ClassNames = {
33
+ __proto__: null,
34
+ CallStackArrow,
35
+ CallStackDescription,
36
+ CallStackLabel,
37
+ Chevron,
38
+ DebugButton,
39
+ DebugButtons,
40
+ DebugPausedMessage,
41
+ DebugPropertyChevron,
42
+ DebugPropertyKey,
43
+ DebugRow,
44
+ DebugRowCallStack,
45
+ DebugRowCheckBox,
46
+ DebugRowInputField,
47
+ DebugSectionAction,
48
+ DebugSectionActions,
49
+ DebugSectionHeader,
50
+ DebugValue,
51
+ DebugValueBoolean,
52
+ DebugValueFunction,
53
+ DebugValueGetter,
54
+ DebugValueNumber,
55
+ DebugValueObject,
56
+ DebugValueScopeName,
57
+ DebugValueString,
58
+ DebugValueSymbol,
59
+ DebugValueUndefined,
60
+ DeleteWatchExpression,
61
+ IconButton,
62
+ InputBox,
63
+ InputLabel
64
+ };
65
+
66
+ const Unknown = 0;
67
+ const Backspace = 1;
68
+ const Tab = 2;
69
+ const Enter = 3;
70
+ const Ctrl = 4;
71
+ const Alt$1 = 5;
72
+ const PauseBreak = 6;
73
+ const CapsLock = 7;
74
+ const Escape = 8;
75
+ const Space = 9;
76
+ const PageUp = 10;
77
+ const PageDown = 11;
78
+ const End = 255;
79
+ const Home = 12;
80
+ const LeftArrow = 13;
81
+ const UpArrow = 14;
82
+ const RightArrow = 15;
83
+ const DownArrow = 16;
84
+ const Insert = 17;
85
+ const Delete = 18;
86
+ const Digit0 = 19;
87
+ const Digit1 = 20;
88
+ const Digit2 = 21;
89
+ const Digit3 = 22;
90
+ const Digit4 = 23;
91
+ const Digit5 = 24;
92
+ const Digit6 = 25;
93
+ const Digit7 = 26;
94
+ const Digit8 = 27;
95
+ const Digit9 = 28;
96
+ const KeyA = 29;
97
+ const KeyB = 30;
98
+ const KeyC = 31;
99
+ const KeyD = 32;
100
+ const KeyE = 33;
101
+ const KeyF = 34;
102
+ const KeyG = 35;
103
+ const KeyH = 36;
104
+ const KeyI = 37;
105
+ const KeyJ = 38;
106
+ const KeyK = 39;
107
+ const KeyL = 40;
108
+ const KeyM = 41;
109
+ const KeyN = 42;
110
+ const KeyO = 43;
111
+ const KeyP = 44;
112
+ const KeyQ = 45;
113
+ const KeyR = 46;
114
+ const KeyS = 47;
115
+ const KeyT = 48;
116
+ const KeyU = 49;
117
+ const KeyV = 50;
118
+ const KeyW = 51;
119
+ const KeyX = 52;
120
+ const KeyY = 53;
121
+ const KeyZ = 54;
122
+ const Meta = 55;
123
+ const ContextMenu = 56;
124
+ const F1 = 57;
125
+ const F2 = 58;
126
+ const F3 = 59;
127
+ const F4 = 60;
128
+ const F5 = 61;
129
+ const F6 = 62;
130
+ const F7 = 63;
131
+ const F8 = 64;
132
+ const F9 = 65;
133
+ const F10 = 66;
134
+ const F11 = 67;
135
+ const F12 = 68;
136
+ const F13 = 69;
137
+ const F14 = 70;
138
+ const F15 = 71;
139
+ const F16 = 72;
140
+ const F17 = 72;
141
+ const F18 = 74;
142
+ const F19 = 75;
143
+ const F20 = 76;
144
+ const F21 = 77;
145
+ const F22 = 78;
146
+ const F23 = 79;
147
+ const F24 = 80;
148
+ const NumLock = 81;
149
+ const ScrollLock = 82;
150
+ const SemiColon = 83;
151
+ const Equal = 84;
152
+ const Comma = 85;
153
+ const Minus = 86;
154
+ const Period = 87;
155
+ const Slash = 88;
156
+ const Backquote = 89;
157
+ const BracketLeft = 90;
158
+ const Backslash = 91;
159
+ const BracketRight = 92;
160
+ const Quote = 93;
161
+ const OEM_8 = 94;
162
+ const IntlBackslash = 95;
163
+ const Numpad0 = 96;
164
+ const Numpad1 = 97;
165
+ const Numpad2 = 98;
166
+ const Numpad3 = 99;
167
+ const Numpad4 = 100;
168
+ const Numpad5 = 101;
169
+ const Numpad6 = 102;
170
+ const Numpad7 = 103;
171
+ const Numpad8 = 104;
172
+ const Numpad9 = 105;
173
+ const NumpadMultiply = 106;
174
+ const NumpadAdd = 107;
175
+ const NumpadSeparator = 108;
176
+ const NumpadSubtract = 109;
177
+ const NumpadDecimal = 110;
178
+ const NumpadDivide = 111;
179
+ const KeyInComposition = 112;
180
+ const ABNT_C1 = 113;
181
+ const ABNT_C2 = 114;
182
+ const AudioVolumeMute = 115;
183
+ const AudioVolumeUp = 116;
184
+ const AudioVolumeDown = 117;
185
+ const BrowserSearch = 118;
186
+ const BrowserHome = 119;
187
+ const BrowserBack = 120;
188
+ const BrowserForward = 121;
189
+ const MediaTrackNext = 122;
190
+ const MediaTrackPrevious = 123;
191
+ const MediaStop = 124;
192
+ const MediaPlayPause = 125;
193
+ const LaunchMediaPlayer = 126;
194
+ const LaunchMail = 127;
195
+ const LaunchApp2 = 128;
196
+ const Clear = 129;
197
+ const MaxValue = 130;
198
+ const Star = 131;
199
+ const Plus = 132;
200
+
201
+ const KeyCode = {
202
+ __proto__: null,
203
+ ABNT_C1,
204
+ ABNT_C2,
205
+ Alt: Alt$1,
206
+ AudioVolumeDown,
207
+ AudioVolumeMute,
208
+ AudioVolumeUp,
209
+ Backquote,
210
+ Backslash,
211
+ Backspace,
212
+ BracketLeft,
213
+ BracketRight,
214
+ BrowserBack,
215
+ BrowserForward,
216
+ BrowserHome,
217
+ BrowserSearch,
218
+ CapsLock,
219
+ Clear,
220
+ Comma,
221
+ ContextMenu,
222
+ Ctrl,
223
+ Delete,
224
+ Digit0,
225
+ Digit1,
226
+ Digit2,
227
+ Digit3,
228
+ Digit4,
229
+ Digit5,
230
+ Digit6,
231
+ Digit7,
232
+ Digit8,
233
+ Digit9,
234
+ DownArrow,
235
+ End,
236
+ Enter,
237
+ Equal,
238
+ Escape,
239
+ F1,
240
+ F10,
241
+ F11,
242
+ F12,
243
+ F13,
244
+ F14,
245
+ F15,
246
+ F16,
247
+ F17,
248
+ F18,
249
+ F19,
250
+ F2,
251
+ F20,
252
+ F21,
253
+ F22,
254
+ F23,
255
+ F24,
256
+ F3,
257
+ F4,
258
+ F5,
259
+ F6,
260
+ F7,
261
+ F8,
262
+ F9,
263
+ Home,
264
+ Insert,
265
+ IntlBackslash,
266
+ KeyA,
267
+ KeyB,
268
+ KeyC,
269
+ KeyD,
270
+ KeyE,
271
+ KeyF,
272
+ KeyG,
273
+ KeyH,
274
+ KeyI,
275
+ KeyInComposition,
276
+ KeyJ,
277
+ KeyK,
278
+ KeyL,
279
+ KeyM,
280
+ KeyN,
281
+ KeyO,
282
+ KeyP,
283
+ KeyQ,
284
+ KeyR,
285
+ KeyS,
286
+ KeyT,
287
+ KeyU,
288
+ KeyV,
289
+ KeyW,
290
+ KeyX,
291
+ KeyY,
292
+ KeyZ,
293
+ LaunchApp2,
294
+ LaunchMail,
295
+ LaunchMediaPlayer,
296
+ LeftArrow,
297
+ MaxValue,
298
+ MediaPlayPause,
299
+ MediaStop,
300
+ MediaTrackNext,
301
+ MediaTrackPrevious,
302
+ Meta,
303
+ Minus,
304
+ NumLock,
305
+ Numpad0,
306
+ Numpad1,
307
+ Numpad2,
308
+ Numpad3,
309
+ Numpad4,
310
+ Numpad5,
311
+ Numpad6,
312
+ Numpad7,
313
+ Numpad8,
314
+ Numpad9,
315
+ NumpadAdd,
316
+ NumpadDecimal,
317
+ NumpadDivide,
318
+ NumpadMultiply,
319
+ NumpadSeparator,
320
+ NumpadSubtract,
321
+ OEM_8,
322
+ PageDown,
323
+ PageUp,
324
+ PauseBreak,
325
+ Period,
326
+ Plus,
327
+ Quote,
328
+ RightArrow,
329
+ ScrollLock,
330
+ SemiColon,
331
+ Slash,
332
+ Space,
333
+ Star,
334
+ Tab,
335
+ Unknown,
336
+ UpArrow
337
+ };
338
+
339
+ const CtrlCmd = 1 << 11 >>> 0;
340
+ const Shift = 1 << 10 >>> 0;
341
+ const Alt = 1 << 9 >>> 0;
342
+ const WinCtrl = 1 << 8 >>> 0;
343
+
344
+ const KeyModifier = {
345
+ __proto__: null,
346
+ Alt,
347
+ CtrlCmd,
348
+ Shift,
349
+ WinCtrl
350
+ };
351
+
1
352
  const mergeClassNames = (...classNames) => {
2
353
  return classNames.filter(Boolean).join(' ');
3
354
  };
4
355
 
356
+ const Keyboard = -1;
357
+ const LeftClick = 0;
358
+
359
+ const MouseEventType = {
360
+ __proto__: null,
361
+ Keyboard,
362
+ LeftClick
363
+ };
364
+
365
+ const px = value => {
366
+ return `${value}px`;
367
+ };
368
+ const position = (x, y) => {
369
+ return `${x}px ${y}px`;
370
+ };
371
+
5
372
  const Audio = 0;
6
373
  const Button = 1;
7
374
  const Col = 2;
@@ -343,11 +710,4 @@ const diff = (oldNodes, newNodes) => {
343
710
  return patches;
344
711
  };
345
712
 
346
- const px = value => {
347
- return `${value}px`;
348
- };
349
- const position = (x, y) => {
350
- return `${x}px ${y}px`;
351
- };
352
-
353
- export { VirtualDomElements, diff, mergeClassNames, position, px, text };
713
+ export { ClassNames, KeyCode, KeyModifier, MouseEventType, 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.1.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'
@@ -0,0 +1,149 @@
1
+ export const Unknown = 0
2
+ export const Backspace = 1
3
+ export const Tab = 2
4
+ export const Enter = 3
5
+ export const Ctrl = 4
6
+ export const Alt = 5
7
+ export const PauseBreak = 6
8
+ export const CapsLock = 7
9
+ export const Escape = 8
10
+ export const Space = 9
11
+ export const PageUp = 10
12
+ export const PageDown = 11
13
+ export const End = 255
14
+ export const Home = 12
15
+ export const LeftArrow = 13
16
+ export const UpArrow = 14
17
+ export const RightArrow = 15
18
+ export const DownArrow = 16
19
+ export const Insert = 17
20
+ export const Delete = 18
21
+
22
+ export const Digit0 = 19
23
+ export const Digit1 = 20
24
+ export const Digit2 = 21
25
+ export const Digit3 = 22
26
+ export const Digit4 = 23
27
+ export const Digit5 = 24
28
+ export const Digit6 = 25
29
+ export const Digit7 = 26
30
+ export const Digit8 = 27
31
+ export const Digit9 = 28
32
+
33
+ export const KeyA = 29
34
+ export const KeyB = 30
35
+ export const KeyC = 31
36
+ export const KeyD = 32
37
+ export const KeyE = 33
38
+ export const KeyF = 34
39
+ export const KeyG = 35
40
+ export const KeyH = 36
41
+ export const KeyI = 37
42
+ export const KeyJ = 38
43
+ export const KeyK = 39
44
+ export const KeyL = 40
45
+ export const KeyM = 41
46
+ export const KeyN = 42
47
+ export const KeyO = 43
48
+ export const KeyP = 44
49
+ export const KeyQ = 45
50
+ export const KeyR = 46
51
+ export const KeyS = 47
52
+ export const KeyT = 48
53
+ export const KeyU = 49
54
+ export const KeyV = 50
55
+ export const KeyW = 51
56
+ export const KeyX = 52
57
+ export const KeyY = 53
58
+ export const KeyZ = 54
59
+
60
+ export const Meta = 55
61
+ export const ContextMenu = 56
62
+
63
+ export const F1 = 57
64
+ export const F2 = 58
65
+ export const F3 = 59
66
+ export const F4 = 60
67
+ export const F5 = 61
68
+ export const F6 = 62
69
+ export const F7 = 63
70
+ export const F8 = 64
71
+ export const F9 = 65
72
+ export const F10 = 66
73
+ export const F11 = 67
74
+ export const F12 = 68
75
+ export const F13 = 69
76
+ export const F14 = 70
77
+ export const F15 = 71
78
+ export const F16 = 72
79
+ export const F17 = 72
80
+ export const F18 = 74
81
+ export const F19 = 75
82
+ export const F20 = 76
83
+ export const F21 = 77
84
+ export const F22 = 78
85
+ export const F23 = 79
86
+ export const F24 = 80
87
+
88
+ export const NumLock = 81
89
+ export const ScrollLock = 82
90
+
91
+ export const SemiColon = 83
92
+ export const Equal = 84
93
+ export const Comma = 85
94
+ export const Minus = 86
95
+ export const Period = 87
96
+ export const Slash = 88
97
+ export const Backquote = 89
98
+ export const BracketLeft = 90
99
+ export const Backslash = 91
100
+ export const BracketRight = 92
101
+ export const Quote = 93
102
+ export const OEM_8 = 94
103
+ export const IntlBackslash = 95
104
+
105
+ export const Numpad0 = 96
106
+ export const Numpad1 = 97
107
+ export const Numpad2 = 98
108
+ export const Numpad3 = 99
109
+ export const Numpad4 = 100
110
+ export const Numpad5 = 101
111
+ export const Numpad6 = 102
112
+ export const Numpad7 = 103
113
+ export const Numpad8 = 104
114
+ export const Numpad9 = 105
115
+
116
+ export const NumpadMultiply = 106
117
+ export const NumpadAdd = 107
118
+ export const NumpadSeparator = 108
119
+ export const NumpadSubtract = 109
120
+ export const NumpadDecimal = 110
121
+ export const NumpadDivide = 111
122
+
123
+ export const KeyInComposition = 112
124
+
125
+ export const ABNT_C1 = 113
126
+ export const ABNT_C2 = 114
127
+
128
+ export const AudioVolumeMute = 115
129
+ export const AudioVolumeUp = 116
130
+ export const AudioVolumeDown = 117
131
+
132
+ export const BrowserSearch = 118
133
+ export const BrowserHome = 119
134
+ export const BrowserBack = 120
135
+ export const BrowserForward = 121
136
+
137
+ export const MediaTrackNext = 122
138
+ export const MediaTrackPrevious = 123
139
+ export const MediaStop = 124
140
+ export const MediaPlayPause = 125
141
+ export const LaunchMediaPlayer = 126
142
+ export const LaunchMail = 127
143
+ export const LaunchApp2 = 128
144
+
145
+ export const Clear = 129
146
+ export const MaxValue = 130
147
+
148
+ export const Star = 131
149
+ export const Plus = 132
@@ -0,0 +1,4 @@
1
+ export const CtrlCmd = (1 << 11) >>> 0
2
+ export const Shift = (1 << 10) >>> 0
3
+ export const Alt = (1 << 9) >>> 0
4
+ export const WinCtrl = (1 << 8) >>> 0
@@ -1,6 +1,10 @@
1
+ export * as ClassNames from '../ClassNames/ClassNames.ts'
1
2
  export type * from '../DomEventListener/DomEventListener.ts'
3
+ export * as KeyCode from '../KeyCode/KeyCode.ts'
4
+ export * as KeyModifier from '../KeyModifier/KeyModifier.ts'
2
5
  export * from '../MergeClassNames/MergeClassNames.ts'
6
+ export * as MouseEventType from '../MouseEventType/MouseEventType.ts'
7
+ export * from '../Px/Px.ts'
3
8
  export * from '../Text/Text.ts'
4
9
  export { diff } from '../VirtualDomDiff/VirtualDomDiff.ts'
5
10
  export * as VirtualDomElements from '../VirtualDomElements/VirtualDomElements.ts'
6
- export * from '../Px/Px.ts'
@@ -0,0 +1,3 @@
1
+ export const Keyboard = -1
2
+
3
+ export const LeftClick = 0