x-runtime-lib 0.8.104 → 0.8.106
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/element/3d/geometry/boxGeometry/v1/spawn.d.ts +2 -2
- package/dist/element/3d/geometry/sphereGeometry/v1/spawn.d.ts +2 -2
- package/dist/element/chart/barChart/v1/spawn.d.ts +2 -2
- package/dist/element/chart/lineChart/v1/spawn.d.ts +2 -2
- package/dist/element/regular/btn/v1/spawn.d.ts +2 -2
- package/dist/element/regular/card/v1/spawn.d.ts +2 -2
- package/dist/element/regular/chipGroup/v1/spawn.d.ts +2 -2
- package/dist/element/regular/flexLayout/v1/spawn.d.ts +2 -2
- package/dist/element/regular/form/v1/spawn.d.ts +2 -2
- package/dist/element/regular/numberInput/v1/spawn.d.ts +2 -2
- package/dist/element/regular/radioGroup/v1/spawn.d.ts +2 -2
- package/dist/element/regular/stepper/v1/spawn.d.ts +2 -2
- package/dist/element/regular/tabs/v1/spawn.d.ts +2 -2
- package/dist/element/regular/text/v1/spawn.d.ts +2 -2
- package/dist/element/regular/textarea/v1/spawn.d.ts +2 -2
- package/dist/element/regular/timeline/v1/spawn.d.ts +2 -2
- package/dist/element/regular/window/v1/spawn.d.ts +2 -2
- package/dist/index.js +909 -865
- package/dist/types/data.d.ts +7 -4
- package/dist/types/element.d.ts +2 -2
- package/dist/types/meta.d.ts +4 -0
- package/dist/utils/node.d.ts +5 -5
- package/package.json +1 -1
package/dist/types/data.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export type NodeLite = {
|
|
2
2
|
id: string;
|
|
3
3
|
key: string;
|
|
4
|
-
|
|
4
|
+
alias?: string;
|
|
5
|
+
refId?: string;
|
|
5
6
|
children?: NodeLite[];
|
|
6
7
|
};
|
|
7
8
|
export type Node = {
|
|
@@ -15,8 +16,8 @@ export type Node = {
|
|
|
15
16
|
};
|
|
16
17
|
[key: string]: any;
|
|
17
18
|
};
|
|
18
|
-
export type
|
|
19
|
-
|
|
19
|
+
export type NodePair = {
|
|
20
|
+
nodeLite: NodeLite;
|
|
20
21
|
nodes: {
|
|
21
22
|
[key: string]: Node;
|
|
22
23
|
};
|
|
@@ -24,7 +25,7 @@ export type SpawnedNode = {
|
|
|
24
25
|
export declare function initNode(): Node;
|
|
25
26
|
export declare function toNodeLite(node: Node, children?: NodeLite[]): NodeLite;
|
|
26
27
|
export interface View {
|
|
27
|
-
|
|
28
|
+
nodeLites: NodeLite[];
|
|
28
29
|
nodes: {
|
|
29
30
|
[key: string]: Node;
|
|
30
31
|
};
|
|
@@ -77,4 +78,6 @@ export interface Data {
|
|
|
77
78
|
view: View;
|
|
78
79
|
code: Code;
|
|
79
80
|
}
|
|
81
|
+
export declare function dataStringify({ type, version, view, code }: Data): string;
|
|
82
|
+
export declare function parseData(str: string): Data;
|
|
80
83
|
export {};
|
package/dist/types/element.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from './basic';
|
|
2
|
-
import {
|
|
2
|
+
import { NodePair } from './data';
|
|
3
3
|
export type ZField = {
|
|
4
4
|
key: string;
|
|
5
5
|
name: string;
|
|
@@ -183,7 +183,7 @@ export type ZElement = {
|
|
|
183
183
|
leaf?: boolean;
|
|
184
184
|
internal?: boolean;
|
|
185
185
|
teleport?: boolean;
|
|
186
|
-
spawn?: (type: string, subtype: string) =>
|
|
186
|
+
spawn?: (type: string, subtype: string) => NodePair | undefined;
|
|
187
187
|
};
|
|
188
188
|
export type ZElements = {
|
|
189
189
|
[key: string]: ZElement;
|
package/dist/types/meta.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export type PageMeta = {
|
|
|
31
31
|
arguments?: Field[];
|
|
32
32
|
states?: Field[];
|
|
33
33
|
};
|
|
34
|
+
export declare function pageMetaStringify(meta: PageMeta): string;
|
|
35
|
+
export declare function parsePageMeta(str: string): PageMeta;
|
|
34
36
|
export type CompMeta = {
|
|
35
37
|
version: string;
|
|
36
38
|
properties?: Field[];
|
|
@@ -39,3 +41,5 @@ export type CompMeta = {
|
|
|
39
41
|
slots?: Slot[];
|
|
40
42
|
states?: Field[];
|
|
41
43
|
};
|
|
44
|
+
export declare function compMetaStringify(meta: CompMeta): string;
|
|
45
|
+
export declare function parseCompMeta(str: string): CompMeta;
|
package/dist/utils/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function spawnNode(type: string, subtype: string, version: string, ref: boolean, keyOrRefId: string):
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
1
|
+
import { NodeLite, NodePair } from '../types';
|
|
2
|
+
export declare function spawnNode(type: string, subtype: string, version: string, ref: boolean, keyOrRefId: string): NodePair | undefined;
|
|
3
|
+
export declare function getNodeLite(nodeLites: NodeLite[], id: string): NodeLite | undefined;
|
|
4
|
+
export declare function duplicateNodePair(src: NodePair): NodePair;
|
|
5
|
+
export declare function duplicateNodePairs(srcs: NodePair[]): NodePair[];
|