x-runtime-lib 0.9.31 → 0.9.33

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 (115) hide show
  1. package/dist/index.d.ts +89 -6
  2. package/dist/index.js +3574 -3462
  3. package/dist/{vendor.nxcr0zfk.js → vendor.gtr2b2v9.js} +5751 -5743
  4. package/package.json +22 -20
  5. package/dist/components/editor/picker/index.vue.d.ts +0 -8
  6. package/dist/components/editor/wrap/index.vue.d.ts +0 -20
  7. package/dist/components/element/3d/camera/orthographicCamera/v1/index.vue.d.ts +0 -14
  8. package/dist/components/element/3d/camera/perspectiveCamera/v1/index.vue.d.ts +0 -14
  9. package/dist/components/element/3d/controls/keyboardControls/v1/index.vue.d.ts +0 -3
  10. package/dist/components/element/3d/controls/mapControls/v1/index.vue.d.ts +0 -3
  11. package/dist/components/element/3d/controls/orbitControls/v1/index.vue.d.ts +0 -3
  12. package/dist/components/element/3d/geometry/boxGeometry/v1/index.vue.d.ts +0 -4
  13. package/dist/components/element/3d/geometry/circleGeometry/v1/index.vue.d.ts +0 -3
  14. package/dist/components/element/3d/geometry/coneGeometry/v1/index.vue.d.ts +0 -3
  15. package/dist/components/element/3d/geometry/cylinderGeometry/v1/index.vue.d.ts +0 -3
  16. package/dist/components/element/3d/geometry/planeGeometry/v1/index.vue.d.ts +0 -3
  17. package/dist/components/element/3d/geometry/sphereGeometry/v1/index.vue.d.ts +0 -4
  18. package/dist/components/element/3d/light/ambientLight/v1/index.vue.d.ts +0 -14
  19. package/dist/components/element/3d/light/directionalLight/v1/index.vue.d.ts +0 -14
  20. package/dist/components/element/3d/light/pointLight/v1/index.vue.d.ts +0 -14
  21. package/dist/components/element/3d/light/spotLight/v1/index.vue.d.ts +0 -14
  22. package/dist/components/element/3d/material/meshBasicMaterial/v1/index.vue.d.ts +0 -3
  23. package/dist/components/element/3d/material/meshNormalMaterial/v1/index.vue.d.ts +0 -3
  24. package/dist/components/element/3d/object/group/v1/index.vue.d.ts +0 -14
  25. package/dist/components/element/3d/object/mesh/v1/index.vue.d.ts +0 -14
  26. package/dist/components/element/chart/barChart/v1/index.vue.d.ts +0 -4
  27. package/dist/components/element/chart/lineChart/v1/index.vue.d.ts +0 -4
  28. package/dist/components/element/common/provideSlotProps/index.vue.d.ts +0 -16
  29. package/dist/components/element/dynamic/inlineSlot/v1/index.vue.d.ts +0 -3
  30. package/dist/components/element/dynamic/internal/scene/root/index.vue.d.ts +0 -19
  31. package/dist/components/element/dynamic/multipleRef/v1/entry.vue.d.ts +0 -10
  32. package/dist/components/element/dynamic/multipleRef/v1/index.vue.d.ts +0 -4
  33. package/dist/components/element/dynamic/multipleSlot/v1/entry.vue.d.ts +0 -10
  34. package/dist/components/element/dynamic/multipleSlot/v1/index.vue.d.ts +0 -4
  35. package/dist/components/element/dynamic/ref/v1/index.vue.d.ts +0 -4
  36. package/dist/components/element/dynamic/renderSwitch/v1/index.vue.d.ts +0 -3
  37. package/dist/components/element/dynamic/slot/v1/index.vue.d.ts +0 -4
  38. package/dist/components/element/ui/activator/v1/index.vue.d.ts +0 -14
  39. package/dist/components/element/ui/badge/v1/index.vue.d.ts +0 -14
  40. package/dist/components/element/ui/breadcrumbs/v1/index.vue.d.ts +0 -4
  41. package/dist/components/element/ui/btn/v1/index.vue.d.ts +0 -4
  42. package/dist/components/element/ui/btn/v1/slotAppend.vue.d.ts +0 -7
  43. package/dist/components/element/ui/btn/v1/slotDefault.vue.d.ts +0 -7
  44. package/dist/components/element/ui/btn/v1/slotLoader.vue.d.ts +0 -7
  45. package/dist/components/element/ui/btn/v1/slotPrepend.vue.d.ts +0 -7
  46. package/dist/components/element/ui/btnToggle/v1/index.vue.d.ts +0 -14
  47. package/dist/components/element/ui/card/v1/index.vue.d.ts +0 -30
  48. package/dist/components/element/ui/checkbox/v1/index.vue.d.ts +0 -14
  49. package/dist/components/element/ui/chip/v1/index.vue.d.ts +0 -4
  50. package/dist/components/element/ui/chipGroup/v1/index.vue.d.ts +0 -14
  51. package/dist/components/element/ui/colorPicker/v1/index.vue.d.ts +0 -4
  52. package/dist/components/element/ui/combobox/v1/index.vue.d.ts +0 -4
  53. package/dist/components/element/ui/container/v1/index.vue.d.ts +0 -14
  54. package/dist/components/element/ui/dataTableClient/v1/columnSlot.vue.d.ts +0 -16
  55. package/dist/components/element/ui/dataTableClient/v1/index.vue.d.ts +0 -4
  56. package/dist/components/element/ui/dataTableServer/v1/index.vue.d.ts +0 -3
  57. package/dist/components/element/ui/datePicker/v1/index.vue.d.ts +0 -3
  58. package/dist/components/element/ui/dialog/v1/index.vue.d.ts +0 -16
  59. package/dist/components/element/ui/expansionPanel/v1/index.vue.d.ts +0 -18
  60. package/dist/components/element/ui/expansionPanels/v1/index.vue.d.ts +0 -14
  61. package/dist/components/element/ui/fab/v1/index.vue.d.ts +0 -4
  62. package/dist/components/element/ui/fileInput/v1/index.vue.d.ts +0 -4
  63. package/dist/components/element/ui/flexbox/v1/index.vue.d.ts +0 -14
  64. package/dist/components/element/ui/flexboxEntry/v1/index.vue.d.ts +0 -14
  65. package/dist/components/element/ui/form/v1/index.vue.d.ts +0 -14
  66. package/dist/components/element/ui/hover/v1/index.vue.d.ts +0 -14
  67. package/dist/components/element/ui/hover/v1/wrapDefault.vue.d.ts +0 -16
  68. package/dist/components/element/ui/icon/v1/index.vue.d.ts +0 -4
  69. package/dist/components/element/ui/item/v1/index.vue.d.ts +0 -7
  70. package/dist/components/element/ui/itemGroup/v1/index.vue.d.ts +0 -14
  71. package/dist/components/element/ui/list/v1/index.vue.d.ts +0 -13
  72. package/dist/components/element/ui/listItem/v1/index.vue.d.ts +0 -4
  73. package/dist/components/element/ui/menu/v1/index.vue.d.ts +0 -16
  74. package/dist/components/element/ui/numberInput/v1/index.vue.d.ts +0 -4
  75. package/dist/components/element/ui/optInput/v1/index.vue.d.ts +0 -4
  76. package/dist/components/element/ui/pagination/v1/index.vue.d.ts +0 -4
  77. package/dist/components/element/ui/positioner/v1/index.vue.d.ts +0 -14
  78. package/dist/components/element/ui/radio/v1/index.vue.d.ts +0 -4
  79. package/dist/components/element/ui/radioGroup/v1/index.vue.d.ts +0 -14
  80. package/dist/components/element/ui/rangeSlider/v1/index.vue.d.ts +0 -4
  81. package/dist/components/element/ui/rating/v1/index.vue.d.ts +0 -4
  82. package/dist/components/element/ui/select/v1/index.vue.d.ts +0 -4
  83. package/dist/components/element/ui/sheet/v1/index.vue.d.ts +0 -14
  84. package/dist/components/element/ui/slideGroup/v1/index.vue.d.ts +0 -13
  85. package/dist/components/element/ui/slideGroupItem/v1/index.vue.d.ts +0 -4
  86. package/dist/components/element/ui/slider/v1/index.vue.d.ts +0 -4
  87. package/dist/components/element/ui/speedDial/v1/index.vue.d.ts +0 -16
  88. package/dist/components/element/ui/speedDial/v1/slotContent.vue.d.ts +0 -15
  89. package/dist/components/element/ui/stepper/v1/index.vue.d.ts +0 -14
  90. package/dist/components/element/ui/stepperHeader/v1/index.vue.d.ts +0 -13
  91. package/dist/components/element/ui/stepperItem/v1/index.vue.d.ts +0 -14
  92. package/dist/components/element/ui/stepperWindow/v1/index.vue.d.ts +0 -13
  93. package/dist/components/element/ui/stepperWindowItem/v1/index.vue.d.ts +0 -14
  94. package/dist/components/element/ui/switch/v1/index.vue.d.ts +0 -4
  95. package/dist/components/element/ui/tab/v1/index.vue.d.ts +0 -4
  96. package/dist/components/element/ui/table/v1/index.vue.d.ts +0 -14
  97. package/dist/components/element/ui/tableBody/v1/index.vue.d.ts +0 -13
  98. package/dist/components/element/ui/tableBodyCell/v1/index.vue.d.ts +0 -13
  99. package/dist/components/element/ui/tableHead/v1/index.vue.d.ts +0 -13
  100. package/dist/components/element/ui/tableHeadCell/v1/index.vue.d.ts +0 -13
  101. package/dist/components/element/ui/tableRow/v1/index.vue.d.ts +0 -13
  102. package/dist/components/element/ui/tabs/v1/index.vue.d.ts +0 -14
  103. package/dist/components/element/ui/text/v1/index.vue.d.ts +0 -4
  104. package/dist/components/element/ui/textField/v1/index.vue.d.ts +0 -4
  105. package/dist/components/element/ui/textField/v1/slotAppend.vue.d.ts +0 -10
  106. package/dist/components/element/ui/textField/v1/slotAppendInner.vue.d.ts +0 -20
  107. package/dist/components/element/ui/textField/v1/slotPrepend.vue.d.ts +0 -10
  108. package/dist/components/element/ui/textField/v1/slotPrependInner.vue.d.ts +0 -20
  109. package/dist/components/element/ui/textarea/v1/index.vue.d.ts +0 -4
  110. package/dist/components/element/ui/timeline/v1/index.vue.d.ts +0 -14
  111. package/dist/components/element/ui/timelineItem/v1/index.vue.d.ts +0 -13
  112. package/dist/components/element/ui/tooltip/v1/index.vue.d.ts +0 -16
  113. package/dist/components/element/ui/window/v1/index.vue.d.ts +0 -14
  114. package/dist/components/element/ui/windowItem/v1/index.vue.d.ts +0 -13
  115. package/dist/i18n/index.d.ts +0 -1
package/dist/index.d.ts CHANGED
@@ -16,8 +16,22 @@ export declare interface ActivatorContext {
16
16
 
17
17
  export declare function addIndent(code: string, spaces?: number): string;
18
18
 
19
+ export declare function applyBlockBind(state: BlockState, nodeIds?: {
20
+ [alias: string]: string;
21
+ }): void;
22
+
23
+ export declare type BindContext = {
24
+ nodeIds?: {
25
+ [alias: string]: string;
26
+ };
27
+ hooks: Hooks_2;
28
+ };
29
+
30
+ export declare type BindHandle = (ctx: BindContext, state: BlockState) => void;
31
+
19
32
  export declare interface BlockState {
20
33
  type: string;
34
+ binds?: string[];
21
35
  id?: string;
22
36
  x?: number;
23
37
  y?: number;
@@ -44,7 +58,7 @@ export declare interface BlockState {
44
58
 
45
59
  export declare type Breakpoint = (typeof breakpoints)[number];
46
60
 
47
- export declare const breakpoints: string[];
61
+ export declare const breakpoints: readonly ["xs", "sm", "md", "lg", "xl"];
48
62
 
49
63
  export declare function calcBreakpoint(width: number): Breakpoint;
50
64
 
@@ -65,9 +79,14 @@ declare interface ConnectionState {
65
79
 
66
80
  export declare function createBreakpointProperty(prototype: ZProperty): ZProperty;
67
81
 
68
- export declare function createMakeNode(type: string, subtype: string): (key: ZElementKey, nodePairs?: NodePair[], props?: {
69
- [keys: string]: any;
70
- }) => NodePair;
82
+ export declare function createMakeNode(type: string, subtype: string): {
83
+ nodeIds: {
84
+ [alias: string]: string;
85
+ };
86
+ n: (key: ZElementKey, nodePairs?: NodePair[], props?: {
87
+ [keys: string]: any;
88
+ }) => NodePair;
89
+ };
71
90
 
72
91
  export declare function createNode(type: string, subtype: string, key: ZElementKey): Node_2;
73
92
 
@@ -119,6 +138,17 @@ declare type Event_2 = {
119
138
  };
120
139
  export { Event_2 as Event }
121
140
 
141
+ declare interface EventInfo {
142
+ id: string;
143
+ kind: EventKind;
144
+ names: string[];
145
+ params?: {
146
+ key: string;
147
+ name: string;
148
+ type: Type;
149
+ };
150
+ }
151
+
122
152
  export declare type EventKind = 'elementEvent' | 'elementPropertyChangeEvent' | 'elementSlotEvent' | 'elementSlotPropertyChangeEvent' | 'multipleElementSlotEvent' | 'multipleElementSlotPropertyChangeEvent' | 'refEvent' | 'refPropertyChangeEvent' | 'multipleRefEvent' | 'multipleRefPropertyChangeEvent' | 'customSlotEvent' | 'customSlotPropertyChangeEvent' | 'multipleCustomSlotEvent' | 'multipleCustomSlotPropertyChangeEvent' | 'customEvent' | 'customPropertyChangeEvent' | 'elementAdaptSlotEvent' | 'elementAdaptSlotPropertyChangeEvent' | 'customAdaptSlotEvent' | 'customAdaptSlotPropertyChangeEvent' | 'stateChangeEvent';
123
153
 
124
154
  export declare type Field = {
@@ -141,7 +171,7 @@ export declare function getAllElements(): {
141
171
  export declare function getBreakpointName(breakpoint: Breakpoint): string;
142
172
 
143
173
  export declare function getBreakpointProperty<T>(current: Breakpoint, props: {
144
- [key: Breakpoint]: T;
174
+ [key: string]: T;
145
175
  }): T | undefined;
146
176
 
147
177
  export declare function getElement(key: ZElementKey | string): ZElement | undefined;
@@ -179,6 +209,15 @@ declare interface Hooks {
179
209
  onStateChange: (id: string, newValue: any, oldValue: any) => Promise<void>;
180
210
  }
181
211
 
212
+ declare type Hooks_2 = {
213
+ getNodeInfo: (id: string) => NodeInfo | undefined;
214
+ getPropertyInfo: (id: string) => PropertyInfo | undefined;
215
+ getOnEventInfo: (id: string) => EventInfo | undefined;
216
+ getTriggerEventInfo: (id: string) => EventInfo | undefined;
217
+ getCallMethodInfo: (id: string) => MethodInfo | undefined;
218
+ getImplementMethodInfo: (id: string) => MethodInfo | undefined;
219
+ };
220
+
182
221
  export declare function initProperties(node: Node_2, properties: ZProperty[]): void;
183
222
 
184
223
  export declare function initQuickJS(): Promise<void>;
@@ -287,6 +326,22 @@ export declare type Method = {
287
326
  desc?: string;
288
327
  };
289
328
 
329
+ declare interface MethodInfo {
330
+ id: string;
331
+ kind: MethodKind;
332
+ names: string[];
333
+ inputs?: {
334
+ key: string;
335
+ name: string;
336
+ type: Type;
337
+ }[];
338
+ outputs?: {
339
+ key: string;
340
+ name: string;
341
+ type: Type;
342
+ }[];
343
+ }
344
+
290
345
  export declare type MethodKind = 'elementMethod' | 'elementSlotMethod' | 'multipeElementSlotMethod' | 'refMethod' | 'multipleRefMethod' | 'customSlotMethod' | 'multipleCustomSlotMethod' | 'customMethod' | 'elementAdaptSlotMethod' | 'customAdaptSlotMethod';
291
346
 
292
347
  export declare type Mode = 'runtime' | 'preview' | 'editor';
@@ -301,6 +356,12 @@ declare type Node_2 = {
301
356
  };
302
357
  export { Node_2 as Node }
303
358
 
359
+ declare interface NodeInfo {
360
+ id: string;
361
+ key: string;
362
+ alias: string;
363
+ }
364
+
304
365
  export declare type NodeLite = {
305
366
  id: string;
306
367
  key: string;
@@ -358,6 +419,21 @@ declare type Property = {
358
419
  raw: ZProperty;
359
420
  };
360
421
 
422
+ declare interface PropertyInfo {
423
+ id: string;
424
+ kind: PropertyKind;
425
+ names: string[];
426
+ meta: {
427
+ element: true;
428
+ raw: ZProperty;
429
+ } | {
430
+ element?: false;
431
+ raw: {
432
+ type: Type;
433
+ };
434
+ };
435
+ }
436
+
361
437
  export declare type PropertyKind = 'elementProperty' | 'elementSlotProperty' | 'multipleElementSlotProperty' | 'refProperty' | 'multipleRefProperty' | 'customSlotProperty' | 'multipleCustomSlotProperty' | 'customProperty' | 'elementAdaptSlotProperty' | 'customAdaptSlotProperty';
362
438
 
363
439
  export declare function provideDark(dark: Ref<boolean>): void;
@@ -414,13 +490,15 @@ export declare interface RefContext {
414
490
  compId: string | undefined;
415
491
  }
416
492
 
493
+ export declare function regBindHandles(type: string, handle: BindHandle): void;
494
+
417
495
  export declare function regElement(element: ZElement): void;
418
496
 
419
497
  export declare function regItems(key: ZItemsKey, items: ZItem[]): void;
420
498
 
421
499
  export declare function regTypes(key: ZTypesKey, types: ZType[]): void;
422
500
 
423
- export declare const reverseBreakpoints: string[];
501
+ export declare const reverseBreakpoints: readonly ["xl", "lg", "md", "sm", "xs"];
424
502
 
425
503
  declare class Sandbox {
426
504
  kind: SandboxKind;
@@ -537,6 +615,8 @@ export declare type SandboxKind = 'root' | 'ref' | 'multipleRef' | 'elementSlot'
537
615
 
538
616
  export declare function setField(object: any, keys: string | string[], value: any): void;
539
617
 
618
+ export declare function setupHooks(hooks: Hooks_2): void;
619
+
540
620
  export declare type Slot = {
541
621
  id: string;
542
622
  name: string;
@@ -929,6 +1009,9 @@ export declare type ZSpawnFunc = (type: string, subtype: string, ...params: any[
929
1009
  export declare interface ZSpawnResult {
930
1010
  nodePairs: NodePair[];
931
1011
  blockStates?: BlockState[];
1012
+ nodeIds?: {
1013
+ [alias: string]: string;
1014
+ };
932
1015
  }
933
1016
 
934
1017
  export declare type ZType = ZTypeWord | ZTypePixel | ZTypePercent | ZTypeHexColor | ZTypeThemeColor;