schyma 1.0.0 → 1.0.2

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.
@@ -1,181 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const reusables_1 = require("../utils/reusables");
5
- let schema;
6
- let tree = [];
7
- function fetchExamples(ref) {
8
- const data = (0, reusables_1.retrieveObj)(schema, ref);
9
- if (data)
10
- return data;
11
- return null;
12
- }
13
- function buildFromChildren(object) {
14
- const properties = buildProperties(object, object.id);
15
- buildRoot(object, object.id, 'children', properties);
16
- }
17
- function extractProps(object, newProperty, parent) {
18
- const obj = object.properties;
19
- for (const property in obj) {
20
- if (typeof obj[property] === 'object') {
21
- newProperty[property] = obj[property];
22
- newProperty[property].parent = parent;
23
- newProperty[property].name = property;
24
- newProperty[property].id = String(Math.floor(Math.random() * 1000000));
25
- newProperty[property].children = [];
26
- }
27
- }
28
- }
29
- function extractPatternProps(object, newProperty, parent) {
30
- const obj = object.patternProperties;
31
- for (const property in obj) {
32
- if (typeof obj[property] === 'object') {
33
- newProperty[property] = obj[property];
34
- newProperty[property].parent = parent;
35
- newProperty[property].name = property;
36
- newProperty[property].id = String(Math.floor(Math.random() * 1000000));
37
- newProperty[property].children = [];
38
- }
39
- }
40
- }
41
- function extractAdditionalProps(object, newProperty, parent) {
42
- const obj = object.additionalProperties;
43
- const arrayProps = (obj === null || obj === void 0 ? void 0 : obj.oneOf) || (obj === null || obj === void 0 ? void 0 : obj.anyOf);
44
- if (arrayProps) {
45
- extractArrayProps(obj, newProperty, parent);
46
- }
47
- else {
48
- extractProps(obj, newProperty, parent);
49
- }
50
- }
51
- function extractArrayProps(object, newProperty, parent) {
52
- var _a;
53
- if (object.anyOf || object.allOf || object.oneOf) {
54
- const arrayOfProps = object.allOf || object.oneOf || object.anyOf;
55
- if (arrayOfProps) {
56
- for (let i = 0; i < arrayOfProps.length; i++) {
57
- if (arrayOfProps[i].$ref) {
58
- const newRef = arrayOfProps[i]['$ref'].split('/').slice(-1)[0];
59
- const title = newRef.split('.')[0];
60
- newProperty[title] = arrayOfProps[i];
61
- newProperty[title].parent = parent;
62
- }
63
- else {
64
- const children = arrayOfProps[i];
65
- const patterns = children === null || children === void 0 ? void 0 : children.patternProperties;
66
- const properties = children === null || children === void 0 ? void 0 : children.properties;
67
- if (patterns) {
68
- extractPatternProps(patterns, newProperty, parent);
69
- }
70
- if (properties) {
71
- extractProps(children, newProperty, parent);
72
- }
73
- if ((_a = arrayOfProps[i]) === null || _a === void 0 ? void 0 : _a.oneOf) {
74
- const title = object.name;
75
- const a = arrayOfProps[i].oneOf;
76
- for (let i = 0; i < a.length; i++) {
77
- newProperty[title] = children.oneOf && children.oneOf[i];
78
- newProperty[title].parent = parent;
79
- newProperty[title].name = title;
80
- newProperty[title].id = String(Math.floor(Math.random() * 1000000));
81
- newProperty[title].children = [];
82
- }
83
- }
84
- }
85
- }
86
- }
87
- }
88
- }
89
- function extractItems(object, newProperty, parent) {
90
- const items = object.items;
91
- const arrayItems = items.oneOf || items.allOf || items.anyOf;
92
- if (items.properties) {
93
- extractProps(items, newProperty, parent);
94
- }
95
- if (arrayItems) {
96
- extractArrayProps(items, newProperty, parent);
97
- }
98
- }
99
- function buildProperties(object, parent) {
100
- let newProperty = {};
101
- if (object.properties) {
102
- extractProps(object, newProperty, parent);
103
- }
104
- if (object.patternProperties) {
105
- extractPatternProps(object, newProperty, parent);
106
- }
107
- if (object.additionalProperties && object.additionalProperties !== false) {
108
- extractAdditionalProps(object, newProperty, parent);
109
- }
110
- if (object.items) {
111
- extractItems(object, newProperty, parent);
112
- }
113
- if (!object.properties && !object.patternProperties && !object.additionalProperties) {
114
- extractArrayProps(object, newProperty, parent);
115
- }
116
- return newProperty;
117
- }
118
- function iterateChildren(objChildren) {
119
- for (let i = 0; i < objChildren.length; i++) {
120
- if (objChildren[i]['$ref']) {
121
- const res = fetchExamples(objChildren[i]['$ref']);
122
- if (res === null || res === void 0 ? void 0 : res.description) {
123
- objChildren[i].description = res.description;
124
- }
125
- if (res === null || res === void 0 ? void 0 : res.required) {
126
- objChildren[i].required = res.required;
127
- }
128
- if (res === null || res === void 0 ? void 0 : res.examples) {
129
- objChildren[i].examples = res.examples;
130
- }
131
- }
132
- if (objChildren[i].children.length <= 0) {
133
- buildFromChildren(objChildren[i]);
134
- }
135
- }
136
- }
137
- function buildRoot(object, parentId, type, properties) {
138
- if (type === 'initial') {
139
- const properties = buildProperties(schema, parentId);
140
- object.title = schema.title;
141
- object.required = schema.required;
142
- for (const property in properties) {
143
- object.children.push(Object.assign(Object.assign({}, properties[property]), { parent: parentId, name: property, id: String(Math.floor(Math.random() * 1000000)), children: [] }));
144
- }
145
- const objChildren = object.children;
146
- iterateChildren(objChildren);
147
- }
148
- else {
149
- if (!object.children) {
150
- object['children'] = [];
151
- }
152
- if (object.children.length <= 0) {
153
- for (const property in properties) {
154
- object.children.push(Object.assign(Object.assign({}, properties[property]), { parent: parentId || object.id, name: properties[property].title || property, id: properties[property].id || String(Math.floor(Math.random() * 1000000)), children: properties[property].children || [] }));
155
- }
156
- }
157
- const objChildren = object.children;
158
- iterateChildren(objChildren);
159
- }
160
- }
161
- function buildTree(schemaObject) {
162
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
163
- const parentLeaf = {
164
- id: 1,
165
- name: '',
166
- parent: 0,
167
- description: '',
168
- children: [],
169
- title: '',
170
- $ref: '',
171
- required: undefined,
172
- examples: undefined,
173
- };
174
- schema = schemaObject;
175
- tree[0] = parentLeaf;
176
- buildRoot(tree[0], 1, 'initial', {});
177
- return tree;
178
- });
179
- }
180
- exports.default = buildTree;
181
- //# sourceMappingURL=buildtree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buildtree.js","sourceRoot":"","sources":["../../../src/scripts/buildtree.ts"],"names":[],"mappings":";;;AAAA,kDAAgD;AAEhD,IAAI,MAA2B,CAAA;AAoC/B,IAAI,IAAI,G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A;aACH;SACF;QACD,MAAM,WAAW,GAAQ,MAAM,CAAC,QAAQ,CAAA;QACxC,eAAe,CAAC,WAAW,CAAC,CAAA;KAC7B;AACH,CAAC;AAED,SAA8B,SAAS,CAAC,YAAiC;;QACvE,MAAM,UAAU,GAAkB;YAChC,EAAE,EAAE,CAAC;YACL,IAAI,EAAE,EAAE;YACR,MAAM,EAAE,CAAC;YACT,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,EAAE;YACT,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,SAAS;SACpB,CAAA;QACD,MAAM,GAAG,YAAY,CAAA;QACrB,IAAI,CAAC,CAAC,CAAC,GAAG,UAAU,CAAA;QACpB,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,CAAA;QACpC,OAAO,IAAI,CAAA;IACb,CAAC;CAAA;AAhBD,4BAgBC"}
@@ -1 +0,0 @@
1
- export declare const startBuild: (schema: any) => Promise<any>;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.startBuild = void 0;
4
- const tslib_1 = require("tslib");
5
- // import { writeFileSync } from "fs";
6
- // import { resolve } from "path";
7
- const buildtree_js_1 = tslib_1.__importDefault(require("./buildtree.js"));
8
- const startBuild = (schema) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
9
- try {
10
- const tree = (0, buildtree_js_1.default)(schema);
11
- return tree;
12
- // return writeFileSync(
13
- // resolve(__dirname, `../configs`, `${version}.json`),
14
- // JSON.stringify(trees)
15
- // );
16
- }
17
- catch (error) {
18
- console.log(error);
19
- }
20
- });
21
- exports.startBuild = startBuild;
22
- 3;
23
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scripts/index.ts"],"names":[],"mappings":";;;;AAAA,sCAAsC;AACtC,kCAAkC;AAClC,0EAAuC;AAEhC,MAAM,UAAU,GAAG,CAAO,MAAW,EAAE,EAAE;IAC5C,IAAI;QACA,MAAM,IAAI,GAAQ,IAAA,sBAAS,EAAC,MAAM,CAAC,CAAC;QACpC,OAAO,IAAI,CAAA;QACX,wBAAwB;QACxB,2DAA2D;QAC3D,4BAA4B;QAC5B,KAAK;KACR;IAAC,OAAO,KAAK,EAAE;QACZ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACtB;AACL,CAAC,CAAA,CAAA;AAXY,QAAA,UAAU,cAWtB;AAED,CAAC,CAAA"}
@@ -1,24 +0,0 @@
1
- export type NodeType = {
2
- id: string;
3
- name: string;
4
- parent: number;
5
- description: string;
6
- children: Array<Node>;
7
- $ref?: string;
8
- title: string;
9
- label: string;
10
- targetPosition?: string;
11
- sourcePosition?: string;
12
- position?: object;
13
- data?: NodeType;
14
- };
15
- export type EdgeType = {
16
- id: string;
17
- source: string;
18
- target: string;
19
- label: string;
20
- labelBgPadding: number[];
21
- labelBgBorderRadius: number;
22
- labelBgStyle: object;
23
- markerEnd: object;
24
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=nodes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../src/types/nodes.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- self.onmessage = function (e) {
2
- const data = e.data;
3
- const result = simulateTimeConsumingTask(data);
4
- postMessage(result);
5
- };
6
- function simulateTimeConsumingTask(data) {
7
- // Simulate a time-consuming task here
8
- const result = data; // Replace with actual computation
9
- return result;
10
- }
11
- export {};
12
- //# sourceMappingURL=worker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../src/components/worker.ts"],"names":[],"mappings":"AAEA,IAAI,CAAC,SAAS,GAAG,UAAS,CAAC;IACvB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC;IAEpB,MAAM,MAAM,GAAG,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAE/C,WAAW,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC,CAAC;AAEF,SAAS,yBAAyB,CAAC,IAAS;IAC1C,sCAAsC;IACtC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,kCAAkC;IACvD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,34 +0,0 @@
1
- type TreeInterface = {
2
- required: any;
3
- examples: any;
4
- id: number;
5
- name: string;
6
- parent: number;
7
- description: string;
8
- children: Array<TreeInterface>;
9
- $ref?: string;
10
- title: string;
11
- };
12
- type MyObject = {
13
- [x: string]: any;
14
- };
15
- interface PropertiesInterface extends TreeInterface {
16
- properties?: MyObject;
17
- additionalProperties?: AdditionalProperties | Boolean;
18
- patternProperties?: MyObject;
19
- $id?: string;
20
- allOf?: Array<PropertiesInterface>;
21
- anyOf?: Array<PropertiesInterface>;
22
- oneOf?: Array<PropertiesInterface>;
23
- items?: any;
24
- definitions?: any;
25
- }
26
- interface AdditionalProperties extends TreeInterface {
27
- items?: Array<TreeInterface>;
28
- $ref?: string;
29
- allOf?: Array<TreeInterface>;
30
- anyOf?: Array<TreeInterface>;
31
- oneOf?: Array<TreeInterface>;
32
- }
33
- export default function buildTree(schemaObject: PropertiesInterface): Promise<TreeInterface[]>;
34
- export {};
@@ -1,178 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- import { retrieveObj } from '../utils/reusables';
3
- let schema;
4
- let tree = [];
5
- function fetchExamples(ref) {
6
- const data = retrieveObj(schema, ref);
7
- if (data)
8
- return data;
9
- return null;
10
- }
11
- function buildFromChildren(object) {
12
- const properties = buildProperties(object, object.id);
13
- buildRoot(object, object.id, 'children', properties);
14
- }
15
- function extractProps(object, newProperty, parent) {
16
- const obj = object.properties;
17
- for (const property in obj) {
18
- if (typeof obj[property] === 'object') {
19
- newProperty[property] = obj[property];
20
- newProperty[property].parent = parent;
21
- newProperty[property].name = property;
22
- newProperty[property].id = String(Math.floor(Math.random() * 1000000));
23
- newProperty[property].children = [];
24
- }
25
- }
26
- }
27
- function extractPatternProps(object, newProperty, parent) {
28
- const obj = object.patternProperties;
29
- for (const property in obj) {
30
- if (typeof obj[property] === 'object') {
31
- newProperty[property] = obj[property];
32
- newProperty[property].parent = parent;
33
- newProperty[property].name = property;
34
- newProperty[property].id = String(Math.floor(Math.random() * 1000000));
35
- newProperty[property].children = [];
36
- }
37
- }
38
- }
39
- function extractAdditionalProps(object, newProperty, parent) {
40
- const obj = object.additionalProperties;
41
- const arrayProps = (obj === null || obj === void 0 ? void 0 : obj.oneOf) || (obj === null || obj === void 0 ? void 0 : obj.anyOf);
42
- if (arrayProps) {
43
- extractArrayProps(obj, newProperty, parent);
44
- }
45
- else {
46
- extractProps(obj, newProperty, parent);
47
- }
48
- }
49
- function extractArrayProps(object, newProperty, parent) {
50
- var _a;
51
- if (object.anyOf || object.allOf || object.oneOf) {
52
- const arrayOfProps = object.allOf || object.oneOf || object.anyOf;
53
- if (arrayOfProps) {
54
- for (let i = 0; i < arrayOfProps.length; i++) {
55
- if (arrayOfProps[i].$ref) {
56
- const newRef = arrayOfProps[i]['$ref'].split('/').slice(-1)[0];
57
- const title = newRef.split('.')[0];
58
- newProperty[title] = arrayOfProps[i];
59
- newProperty[title].parent = parent;
60
- }
61
- else {
62
- const children = arrayOfProps[i];
63
- const patterns = children === null || children === void 0 ? void 0 : children.patternProperties;
64
- const properties = children === null || children === void 0 ? void 0 : children.properties;
65
- if (patterns) {
66
- extractPatternProps(patterns, newProperty, parent);
67
- }
68
- if (properties) {
69
- extractProps(children, newProperty, parent);
70
- }
71
- if ((_a = arrayOfProps[i]) === null || _a === void 0 ? void 0 : _a.oneOf) {
72
- const title = object.name;
73
- const a = arrayOfProps[i].oneOf;
74
- for (let i = 0; i < a.length; i++) {
75
- newProperty[title] = children.oneOf && children.oneOf[i];
76
- newProperty[title].parent = parent;
77
- newProperty[title].name = title;
78
- newProperty[title].id = String(Math.floor(Math.random() * 1000000));
79
- newProperty[title].children = [];
80
- }
81
- }
82
- }
83
- }
84
- }
85
- }
86
- }
87
- function extractItems(object, newProperty, parent) {
88
- const items = object.items;
89
- const arrayItems = items.oneOf || items.allOf || items.anyOf;
90
- if (items.properties) {
91
- extractProps(items, newProperty, parent);
92
- }
93
- if (arrayItems) {
94
- extractArrayProps(items, newProperty, parent);
95
- }
96
- }
97
- function buildProperties(object, parent) {
98
- let newProperty = {};
99
- if (object.properties) {
100
- extractProps(object, newProperty, parent);
101
- }
102
- if (object.patternProperties) {
103
- extractPatternProps(object, newProperty, parent);
104
- }
105
- if (object.additionalProperties && object.additionalProperties !== false) {
106
- extractAdditionalProps(object, newProperty, parent);
107
- }
108
- if (object.items) {
109
- extractItems(object, newProperty, parent);
110
- }
111
- if (!object.properties && !object.patternProperties && !object.additionalProperties) {
112
- extractArrayProps(object, newProperty, parent);
113
- }
114
- return newProperty;
115
- }
116
- function iterateChildren(objChildren) {
117
- for (let i = 0; i < objChildren.length; i++) {
118
- if (objChildren[i]['$ref']) {
119
- const res = fetchExamples(objChildren[i]['$ref']);
120
- if (res === null || res === void 0 ? void 0 : res.description) {
121
- objChildren[i].description = res.description;
122
- }
123
- if (res === null || res === void 0 ? void 0 : res.required) {
124
- objChildren[i].required = res.required;
125
- }
126
- if (res === null || res === void 0 ? void 0 : res.examples) {
127
- objChildren[i].examples = res.examples;
128
- }
129
- }
130
- if (objChildren[i].children.length <= 0) {
131
- buildFromChildren(objChildren[i]);
132
- }
133
- }
134
- }
135
- function buildRoot(object, parentId, type, properties) {
136
- if (type === 'initial') {
137
- const properties = buildProperties(schema, parentId);
138
- object.title = schema.title;
139
- object.required = schema.required;
140
- for (const property in properties) {
141
- object.children.push(Object.assign(Object.assign({}, properties[property]), { parent: parentId, name: property, id: String(Math.floor(Math.random() * 1000000)), children: [] }));
142
- }
143
- const objChildren = object.children;
144
- iterateChildren(objChildren);
145
- }
146
- else {
147
- if (!object.children) {
148
- object['children'] = [];
149
- }
150
- if (object.children.length <= 0) {
151
- for (const property in properties) {
152
- object.children.push(Object.assign(Object.assign({}, properties[property]), { parent: parentId || object.id, name: properties[property].title || property, id: properties[property].id || String(Math.floor(Math.random() * 1000000)), children: properties[property].children || [] }));
153
- }
154
- }
155
- const objChildren = object.children;
156
- iterateChildren(objChildren);
157
- }
158
- }
159
- export default function buildTree(schemaObject) {
160
- return __awaiter(this, void 0, void 0, function* () {
161
- const parentLeaf = {
162
- id: 1,
163
- name: '',
164
- parent: 0,
165
- description: '',
166
- children: [],
167
- title: '',
168
- $ref: '',
169
- required: undefined,
170
- examples: undefined,
171
- };
172
- schema = schemaObject;
173
- tree[0] = parentLeaf;
174
- buildRoot(tree[0], 1, 'initial', {});
175
- return tree;
176
- });
177
- }
178
- //# sourceMappingURL=buildtree.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buildtree.js","sourceRoot":"","sources":["../../../src/scripts/buildtree.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,IAAI,MAA2B,CAAA;AAoC/B,IAAI,IAAI,GAAyB,EAAE,CAAA;AAEnC,SAAS,aAAa,CAAC,GAAW;IAChC,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACrC,IAAI,IAAI;QAAE,OAAO,IAAI,CAAA;IACrB,OAAO,IAAI,CAAA;AACb,CAAC;AAED,SAAS,iBAAiB,CAAC,MAA2B;IACpD,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;IACrD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,UAAU,EAAE,UAAU,CAAC,CAAA;AACtD,CAAC;AAED,SAAS,YAAY,CAAC,MAA2B,EAAE,WAAqB,EAAE,MAAc;IACtF,MAAM,GA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AAG,UAAU,CAAA;QACpB,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,CAAA;QACpC,OAAO,IAAI,CAAA;IACb,CAAC;CAAA"}
@@ -1 +0,0 @@
1
- export declare const startBuild: (schema: any) => Promise<any>;
@@ -1,19 +0,0 @@
1
- import { __awaiter } from "tslib";
2
- // import { writeFileSync } from "fs";
3
- // import { resolve } from "path";
4
- import buildTree from "./buildtree.js";
5
- export const startBuild = (schema) => __awaiter(void 0, void 0, void 0, function* () {
6
- try {
7
- const tree = yield buildTree(schema);
8
- return tree;
9
- // return writeFileSync(
10
- // resolve(__dirname, `../configs`, `${version}.json`),
11
- // JSON.stringify(trees)
12
- // );
13
- }
14
- catch (error) {
15
- console.log(error);
16
- }
17
- });
18
- 3;
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/scripts/index.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,kCAAkC;AAClC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAEvC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAO,MAAW,EAAE,EAAE;IAC5C,IAAI;QACA,MAAM,IAAI,GAAQ,MAAM,SAAS,CAAC,MAAM,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAA;QACX,wBAAwB;QACxB,2DAA2D;QAC3D,4BAA4B;QAC5B,KAAK;KACR;IAAC,OAAO,KAAK,EAAE;QACZ,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACtB;AACL,CAAC,CAAA,CAAA;AAED,CAAC,CAAA"}
@@ -1,24 +0,0 @@
1
- export type NodeType = {
2
- id: string;
3
- name: string;
4
- parent: number;
5
- description: string;
6
- children: Array<Node>;
7
- $ref?: string;
8
- title: string;
9
- label: string;
10
- targetPosition?: string;
11
- sourcePosition?: string;
12
- position?: object;
13
- data?: NodeType;
14
- };
15
- export type EdgeType = {
16
- id: string;
17
- source: string;
18
- target: string;
19
- label: string;
20
- labelBgPadding: number[];
21
- labelBgBorderRadius: number;
22
- labelBgStyle: object;
23
- markerEnd: object;
24
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=nodes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../src/types/nodes.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- self.onmessage = function (e) {
2
- const data = e.data;
3
- const result = simulateTimeConsumingTask(data);
4
- postMessage(result);
5
- };
6
- function simulateTimeConsumingTask(data) {
7
- // Simulate a time-consuming task here
8
- const result = data; // Replace with actual computation
9
- return result;
10
- }
11
- export {};
12
- //# sourceMappingURL=worker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worker.js","sourceRoot":"","sources":["../../src/worker.ts"],"names":[],"mappings":"AAEA,IAAI,CAAC,SAAS,GAAG,UAAS,CAAC;IACvB,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC;IAEpB,MAAM,MAAM,GAAG,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAE/C,WAAW,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC,CAAC;AAEF,SAAS,yBAAyB,CAAC,IAAS;IAC1C,sCAAsC;IACtC,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,kCAAkC;IACvD,OAAO,MAAM,CAAC;AAChB,CAAC"}