@ethereal-nexus/core 0.1.4 → 0.2.1
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/functions/component/component.d.mts +15 -0
- package/dist/functions/component/component.d.ts +15 -0
- package/dist/functions/component/component.js +46 -0
- package/dist/functions/component/component.js.map +1 -0
- package/dist/functions/component/component.mjs +21 -0
- package/dist/functions/component/component.mjs.map +1 -0
- package/dist/functions/component/index.d.mts +8 -0
- package/dist/functions/component/index.d.ts +8 -0
- package/dist/functions/component/index.js +48 -0
- package/dist/functions/component/index.js.map +1 -0
- package/dist/functions/component/index.mjs +21 -0
- package/dist/functions/component/index.mjs.map +1 -0
- package/dist/functions/index.d.mts +2 -0
- package/dist/functions/index.d.ts +2 -0
- package/dist/functions/index.js +21 -3
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +20 -3
- package/dist/functions/index.mjs.map +1 -1
- package/dist/functions/parse/index.js +1 -3
- package/dist/functions/parse/index.js.map +1 -1
- package/dist/functions/parse/index.mjs +1 -3
- package/dist/functions/parse/index.mjs.map +1 -1
- package/dist/functions/parse/parse.d.mts +1 -3
- package/dist/functions/parse/parse.d.ts +1 -3
- package/dist/functions/parse/parse.js +1 -3
- package/dist/functions/parse/parse.js.map +1 -1
- package/dist/functions/parse/parse.mjs +1 -3
- package/dist/functions/parse/parse.mjs.map +1 -1
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +57 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -12
- package/dist/index.mjs.map +1 -1
- package/dist/schema/dialog/dialog.js +12 -6
- package/dist/schema/dialog/dialog.js.map +1 -1
- package/dist/schema/dialog/dialog.mjs +12 -6
- package/dist/schema/dialog/dialog.mjs.map +1 -1
- package/dist/schema/dialog/index.js +12 -6
- package/dist/schema/dialog/index.js.map +1 -1
- package/dist/schema/dialog/index.mjs +12 -6
- package/dist/schema/dialog/index.mjs.map +1 -1
- package/dist/schema/rte/index.d.mts +3 -0
- package/dist/schema/rte/index.d.ts +3 -0
- package/dist/schema/rte/index.js +49 -0
- package/dist/schema/rte/index.js.map +1 -0
- package/dist/schema/rte/index.mjs +22 -0
- package/dist/schema/rte/index.mjs.map +1 -0
- package/dist/schema/rte/rte.d.mts +15 -0
- package/dist/schema/rte/rte.d.ts +15 -0
- package/dist/schema/rte/rte.js +47 -0
- package/dist/schema/rte/rte.js.map +1 -0
- package/dist/schema/rte/rte.mjs +22 -0
- package/dist/schema/rte/rte.mjs.map +1 -0
- package/dist/types/component.d.mts +9 -0
- package/dist/types/component.d.ts +9 -0
- package/dist/types/component.js +19 -0
- package/dist/types/component.js.map +1 -0
- package/dist/types/component.mjs +1 -0
- package/dist/types/component.mjs.map +1 -0
- package/dist/types/index.d.mts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/utils.js.map +1 -1
- package/package.json +1 -1
- /package/{LICENSE → LICENSE.md} +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseSchema } from '../../types/schema.mjs';
|
|
2
|
+
import { ComponentModel } from '../../types/component.mjs';
|
|
3
|
+
import { ObjectEntries, ObjectOutput } from '../../types/object.mjs';
|
|
4
|
+
import { DialogSchema } from '../../schema/dialog/dialog.mjs';
|
|
5
|
+
import '../../types/webcomponent.mjs';
|
|
6
|
+
import '../../schema/optional/optional.mjs';
|
|
7
|
+
import '../../types/utils.mjs';
|
|
8
|
+
|
|
9
|
+
interface ComponentSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput>, Partial<ComponentModel> {
|
|
10
|
+
type: 'component';
|
|
11
|
+
dialog: Omit<DialogSchema<TEntries>, 'tabs'>;
|
|
12
|
+
}
|
|
13
|
+
declare function component<TEntries extends ObjectEntries>(config: Partial<ComponentModel>, dialogInstance: Omit<DialogSchema<TEntries>, 'tabs'>): ComponentSchema<TEntries>;
|
|
14
|
+
|
|
15
|
+
export { type ComponentSchema, component };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseSchema } from '../../types/schema.js';
|
|
2
|
+
import { ComponentModel } from '../../types/component.js';
|
|
3
|
+
import { ObjectEntries, ObjectOutput } from '../../types/object.js';
|
|
4
|
+
import { DialogSchema } from '../../schema/dialog/dialog.js';
|
|
5
|
+
import '../../types/webcomponent.js';
|
|
6
|
+
import '../../schema/optional/optional.js';
|
|
7
|
+
import '../../types/utils.js';
|
|
8
|
+
|
|
9
|
+
interface ComponentSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput>, Partial<ComponentModel> {
|
|
10
|
+
type: 'component';
|
|
11
|
+
dialog: Omit<DialogSchema<TEntries>, 'tabs'>;
|
|
12
|
+
}
|
|
13
|
+
declare function component<TEntries extends ObjectEntries>(config: Partial<ComponentModel>, dialogInstance: Omit<DialogSchema<TEntries>, 'tabs'>): ComponentSchema<TEntries>;
|
|
14
|
+
|
|
15
|
+
export { type ComponentSchema, component };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/functions/component/component.ts
|
|
21
|
+
var component_exports = {};
|
|
22
|
+
__export(component_exports, {
|
|
23
|
+
component: () => component
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(component_exports);
|
|
26
|
+
function component(config, dialogInstance) {
|
|
27
|
+
return {
|
|
28
|
+
type: "component",
|
|
29
|
+
dialog: dialogInstance,
|
|
30
|
+
_parse() {
|
|
31
|
+
return {
|
|
32
|
+
...config,
|
|
33
|
+
...dialogInstance._parse()
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
_primitive() {
|
|
37
|
+
return dialogInstance._primitive();
|
|
38
|
+
},
|
|
39
|
+
...config
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
component
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/component/component.ts"],"sourcesContent":["import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n}\n\nexport function component<TEntries extends ObjectEntries>(\n config: Partial<ComponentModel>,\n dialogInstance: Omit<DialogSchema<TEntries>, 'tabs'>\n): ComponentSchema<TEntries> {\n\n return {\n type: 'component',\n dialog: dialogInstance,\n _parse() {\n return {\n ...config,\n ...dialogInstance._parse()\n };\n },\n _primitive() {\n return dialogInstance._primitive();\n },\n ...config,\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,SAAS,UACd,QACA,gBAC2B;AAE3B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,eAAe,OAAO;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,eAAe,WAAW;AAAA,IACnC;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/functions/component/component.ts
|
|
2
|
+
function component(config, dialogInstance) {
|
|
3
|
+
return {
|
|
4
|
+
type: "component",
|
|
5
|
+
dialog: dialogInstance,
|
|
6
|
+
_parse() {
|
|
7
|
+
return {
|
|
8
|
+
...config,
|
|
9
|
+
...dialogInstance._parse()
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
_primitive() {
|
|
13
|
+
return dialogInstance._primitive();
|
|
14
|
+
},
|
|
15
|
+
...config
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
component
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=component.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/component/component.ts"],"sourcesContent":["import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n}\n\nexport function component<TEntries extends ObjectEntries>(\n config: Partial<ComponentModel>,\n dialogInstance: Omit<DialogSchema<TEntries>, 'tabs'>\n): ComponentSchema<TEntries> {\n\n return {\n type: 'component',\n dialog: dialogInstance,\n _parse() {\n return {\n ...config,\n ...dialogInstance._parse()\n };\n },\n _primitive() {\n return dialogInstance._primitive();\n },\n ...config,\n };\n}"],"mappings":";AASO,SAAS,UACd,QACA,gBAC2B;AAE3B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,eAAe,OAAO;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,eAAe,WAAW;AAAA,IACnC;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ComponentSchema, component } from './component.mjs';
|
|
2
|
+
import '../../types/schema.mjs';
|
|
3
|
+
import '../../types/webcomponent.mjs';
|
|
4
|
+
import '../../types/component.mjs';
|
|
5
|
+
import '../../types/object.mjs';
|
|
6
|
+
import '../../schema/optional/optional.mjs';
|
|
7
|
+
import '../../types/utils.mjs';
|
|
8
|
+
import '../../schema/dialog/dialog.mjs';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ComponentSchema, component } from './component.js';
|
|
2
|
+
import '../../types/schema.js';
|
|
3
|
+
import '../../types/webcomponent.js';
|
|
4
|
+
import '../../types/component.js';
|
|
5
|
+
import '../../types/object.js';
|
|
6
|
+
import '../../schema/optional/optional.js';
|
|
7
|
+
import '../../types/utils.js';
|
|
8
|
+
import '../../schema/dialog/dialog.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/functions/component/index.ts
|
|
21
|
+
var component_exports = {};
|
|
22
|
+
__export(component_exports, {
|
|
23
|
+
component: () => component
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(component_exports);
|
|
26
|
+
|
|
27
|
+
// src/functions/component/component.ts
|
|
28
|
+
function component(config, dialogInstance) {
|
|
29
|
+
return {
|
|
30
|
+
type: "component",
|
|
31
|
+
dialog: dialogInstance,
|
|
32
|
+
_parse() {
|
|
33
|
+
return {
|
|
34
|
+
...config,
|
|
35
|
+
...dialogInstance._parse()
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
_primitive() {
|
|
39
|
+
return dialogInstance._primitive();
|
|
40
|
+
},
|
|
41
|
+
...config
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
45
|
+
0 && (module.exports = {
|
|
46
|
+
component
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/component/index.ts","../../../src/functions/component/component.ts"],"sourcesContent":["export * from './component';\n","import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n}\n\nexport function component<TEntries extends ObjectEntries>(\n config: Partial<ComponentModel>,\n dialogInstance: Omit<DialogSchema<TEntries>, 'tabs'>\n): ComponentSchema<TEntries> {\n\n return {\n type: 'component',\n dialog: dialogInstance,\n _parse() {\n return {\n ...config,\n ...dialogInstance._parse()\n };\n },\n _primitive() {\n return dialogInstance._primitive();\n },\n ...config,\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSO,SAAS,UACd,QACA,gBAC2B;AAE3B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,eAAe,OAAO;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,eAAe,WAAW;AAAA,IACnC;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/functions/component/component.ts
|
|
2
|
+
function component(config, dialogInstance) {
|
|
3
|
+
return {
|
|
4
|
+
type: "component",
|
|
5
|
+
dialog: dialogInstance,
|
|
6
|
+
_parse() {
|
|
7
|
+
return {
|
|
8
|
+
...config,
|
|
9
|
+
...dialogInstance._parse()
|
|
10
|
+
};
|
|
11
|
+
},
|
|
12
|
+
_primitive() {
|
|
13
|
+
return dialogInstance._primitive();
|
|
14
|
+
},
|
|
15
|
+
...config
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
component
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/component/component.ts"],"sourcesContent":["import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n}\n\nexport function component<TEntries extends ObjectEntries>(\n config: Partial<ComponentModel>,\n dialogInstance: Omit<DialogSchema<TEntries>, 'tabs'>\n): ComponentSchema<TEntries> {\n\n return {\n type: 'component',\n dialog: dialogInstance,\n _parse() {\n return {\n ...config,\n ...dialogInstance._parse()\n };\n },\n _primitive() {\n return dialogInstance._primitive();\n },\n ...config,\n };\n}"],"mappings":";AASO,SAAS,UACd,QACA,gBAC2B;AAE3B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,eAAe,OAAO;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,eAAe,WAAW;AAAA,IACnC;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { parse } from './parse/parse.mjs';
|
|
2
2
|
export { parsePrimitives } from './parse/parsePrimitives.mjs';
|
|
3
|
+
export { ComponentSchema, component } from './component/component.mjs';
|
|
3
4
|
import '../schema/dialog/dialog.mjs';
|
|
4
5
|
import '../types/utils.mjs';
|
|
5
6
|
import '../types/schema.mjs';
|
|
6
7
|
import '../types/webcomponent.mjs';
|
|
7
8
|
import '../types/object.mjs';
|
|
8
9
|
import '../schema/optional/optional.mjs';
|
|
10
|
+
import '../types/component.mjs';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { parse } from './parse/parse.js';
|
|
2
2
|
export { parsePrimitives } from './parse/parsePrimitives.js';
|
|
3
|
+
export { ComponentSchema, component } from './component/component.js';
|
|
3
4
|
import '../schema/dialog/dialog.js';
|
|
4
5
|
import '../types/utils.js';
|
|
5
6
|
import '../types/schema.js';
|
|
6
7
|
import '../types/webcomponent.js';
|
|
7
8
|
import '../types/object.js';
|
|
8
9
|
import '../schema/optional/optional.js';
|
|
10
|
+
import '../types/component.js';
|
package/dist/functions/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/functions/index.ts
|
|
21
21
|
var functions_exports = {};
|
|
22
22
|
__export(functions_exports, {
|
|
23
|
+
component: () => component,
|
|
23
24
|
parse: () => parse,
|
|
24
25
|
parsePrimitives: () => parsePrimitives
|
|
25
26
|
});
|
|
@@ -27,17 +28,34 @@ module.exports = __toCommonJS(functions_exports);
|
|
|
27
28
|
|
|
28
29
|
// src/functions/parse/parse.ts
|
|
29
30
|
function parse(schema) {
|
|
30
|
-
return
|
|
31
|
-
dialog: schema._parse()
|
|
32
|
-
};
|
|
31
|
+
return schema._parse();
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
// src/functions/parse/parsePrimitives.ts
|
|
36
35
|
function parsePrimitives(schema) {
|
|
37
36
|
return schema._primitive();
|
|
38
37
|
}
|
|
38
|
+
|
|
39
|
+
// src/functions/component/component.ts
|
|
40
|
+
function component(config, dialogInstance) {
|
|
41
|
+
return {
|
|
42
|
+
type: "component",
|
|
43
|
+
dialog: dialogInstance,
|
|
44
|
+
_parse() {
|
|
45
|
+
return {
|
|
46
|
+
...config,
|
|
47
|
+
...dialogInstance._parse()
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
_primitive() {
|
|
51
|
+
return dialogInstance._primitive();
|
|
52
|
+
},
|
|
53
|
+
...config
|
|
54
|
+
};
|
|
55
|
+
}
|
|
39
56
|
// Annotate the CommonJS export names for ESM import in node:
|
|
40
57
|
0 && (module.exports = {
|
|
58
|
+
component,
|
|
41
59
|
parse,
|
|
42
60
|
parsePrimitives
|
|
43
61
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/functions/index.ts","../../src/functions/parse/parse.ts","../../src/functions/parse/parsePrimitives.ts"],"sourcesContent":["export * from './parse'\n","import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return
|
|
1
|
+
{"version":3,"sources":["../../src/functions/index.ts","../../src/functions/parse/parse.ts","../../src/functions/parse/parsePrimitives.ts","../../src/functions/component/component.ts"],"sourcesContent":["export * from './parse'\nexport * from './component'\n","import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._parse()\n}","import { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parsePrimitives<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._primitive() as Record<string, WebcomponentPropTypes>\n}","import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n}\n\nexport function component<TEntries extends ObjectEntries>(\n config: Partial<ComponentModel>,\n dialogInstance: Omit<DialogSchema<TEntries>, 'tabs'>\n): ComponentSchema<TEntries> {\n\n return {\n type: 'component',\n dialog: dialogInstance,\n _parse() {\n return {\n ...config,\n ...dialogInstance._parse()\n };\n },\n _primitive() {\n return dialogInstance._primitive();\n },\n ...config,\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,SAAS,MAA+B,QAAyB;AACtE,SAAO,OAAO,OAAO;AACvB;;;ACDO,SAAS,gBAAyC,QAAyB;AAChF,SAAO,OAAO,WAAW;AAC3B;;;ACGO,SAAS,UACd,QACA,gBAC2B;AAE3B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,eAAe,OAAO;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,eAAe,WAAW;AAAA,IACnC;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
package/dist/functions/index.mjs
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
// src/functions/parse/parse.ts
|
|
2
2
|
function parse(schema) {
|
|
3
|
-
return
|
|
4
|
-
dialog: schema._parse()
|
|
5
|
-
};
|
|
3
|
+
return schema._parse();
|
|
6
4
|
}
|
|
7
5
|
|
|
8
6
|
// src/functions/parse/parsePrimitives.ts
|
|
9
7
|
function parsePrimitives(schema) {
|
|
10
8
|
return schema._primitive();
|
|
11
9
|
}
|
|
10
|
+
|
|
11
|
+
// src/functions/component/component.ts
|
|
12
|
+
function component(config, dialogInstance) {
|
|
13
|
+
return {
|
|
14
|
+
type: "component",
|
|
15
|
+
dialog: dialogInstance,
|
|
16
|
+
_parse() {
|
|
17
|
+
return {
|
|
18
|
+
...config,
|
|
19
|
+
...dialogInstance._parse()
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
_primitive() {
|
|
23
|
+
return dialogInstance._primitive();
|
|
24
|
+
},
|
|
25
|
+
...config
|
|
26
|
+
};
|
|
27
|
+
}
|
|
12
28
|
export {
|
|
29
|
+
component,
|
|
13
30
|
parse,
|
|
14
31
|
parsePrimitives
|
|
15
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/functions/parse/parse.ts","../../src/functions/parse/parsePrimitives.ts"],"sourcesContent":["import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return
|
|
1
|
+
{"version":3,"sources":["../../src/functions/parse/parse.ts","../../src/functions/parse/parsePrimitives.ts","../../src/functions/component/component.ts"],"sourcesContent":["import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._parse()\n}","import { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parsePrimitives<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._primitive() as Record<string, WebcomponentPropTypes>\n}","import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n}\n\nexport function component<TEntries extends ObjectEntries>(\n config: Partial<ComponentModel>,\n dialogInstance: Omit<DialogSchema<TEntries>, 'tabs'>\n): ComponentSchema<TEntries> {\n\n return {\n type: 'component',\n dialog: dialogInstance,\n _parse() {\n return {\n ...config,\n ...dialogInstance._parse()\n };\n },\n _primitive() {\n return dialogInstance._primitive();\n },\n ...config,\n };\n}"],"mappings":";AAGO,SAAS,MAA+B,QAAyB;AACtE,SAAO,OAAO,OAAO;AACvB;;;ACDO,SAAS,gBAAyC,QAAyB;AAChF,SAAO,OAAO,WAAW;AAC3B;;;ACGO,SAAS,UACd,QACA,gBAC2B;AAE3B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,eAAe,OAAO;AAAA,MAC3B;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,eAAe,WAAW;AAAA,IACnC;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/functions/parse/index.ts","../../../src/functions/parse/parse.ts","../../../src/functions/parse/parsePrimitives.ts"],"sourcesContent":["export * from './parse'\nexport * from './parsePrimitives'","import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/parse/index.ts","../../../src/functions/parse/parse.ts","../../../src/functions/parse/parsePrimitives.ts"],"sourcesContent":["export * from './parse'\nexport * from './parsePrimitives'","import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._parse()\n}","import { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parsePrimitives<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._primitive() as Record<string, WebcomponentPropTypes>\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,SAAS,MAA+B,QAAyB;AACtE,SAAO,OAAO,OAAO;AACvB;;;ACDO,SAAS,gBAAyC,QAAyB;AAChF,SAAO,OAAO,WAAW;AAC3B;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/functions/parse/parse.ts","../../../src/functions/parse/parsePrimitives.ts"],"sourcesContent":["import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/parse/parse.ts","../../../src/functions/parse/parsePrimitives.ts"],"sourcesContent":["import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._parse()\n}","import { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parsePrimitives<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._primitive() as Record<string, WebcomponentPropTypes>\n}"],"mappings":";AAGO,SAAS,MAA+B,QAAyB;AACtE,SAAO,OAAO,OAAO;AACvB;;;ACDO,SAAS,gBAAyC,QAAyB;AAChF,SAAO,OAAO,WAAW;AAC3B;","names":[]}
|
|
@@ -5,8 +5,6 @@ import '../../types/schema.mjs';
|
|
|
5
5
|
import '../../types/webcomponent.mjs';
|
|
6
6
|
import '../../schema/optional/optional.mjs';
|
|
7
7
|
|
|
8
|
-
declare function parse<T extends ObjectEntries>(schema: DialogSchema<T>):
|
|
9
|
-
dialog: object;
|
|
10
|
-
};
|
|
8
|
+
declare function parse<T extends ObjectEntries>(schema: DialogSchema<T>): object;
|
|
11
9
|
|
|
12
10
|
export { parse };
|
|
@@ -5,8 +5,6 @@ import '../../types/schema.js';
|
|
|
5
5
|
import '../../types/webcomponent.js';
|
|
6
6
|
import '../../schema/optional/optional.js';
|
|
7
7
|
|
|
8
|
-
declare function parse<T extends ObjectEntries>(schema: DialogSchema<T>):
|
|
9
|
-
dialog: object;
|
|
10
|
-
};
|
|
8
|
+
declare function parse<T extends ObjectEntries>(schema: DialogSchema<T>): object;
|
|
11
9
|
|
|
12
10
|
export { parse };
|
|
@@ -24,9 +24,7 @@ __export(parse_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(parse_exports);
|
|
26
26
|
function parse(schema) {
|
|
27
|
-
return
|
|
28
|
-
dialog: schema._parse()
|
|
29
|
-
};
|
|
27
|
+
return schema._parse();
|
|
30
28
|
}
|
|
31
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
32
30
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/functions/parse/parse.ts"],"sourcesContent":["import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/parse/parse.ts"],"sourcesContent":["import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._parse()\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,SAAS,MAA+B,QAAyB;AACtE,SAAO,OAAO,OAAO;AACvB;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/functions/parse/parse.ts"],"sourcesContent":["import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/parse/parse.ts"],"sourcesContent":["import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._parse()\n}"],"mappings":";AAGO,SAAS,MAA+B,QAAyB;AACtE,SAAO,OAAO,OAAO;AACvB;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -5,6 +5,7 @@ export { CheckBoxSchema, checkbox } from './schema/checkbox/checkbox.mjs';
|
|
|
5
5
|
export { PathBrowserSchema, pathbrowser } from './schema/pathbrowser/pathbrowser.mjs';
|
|
6
6
|
export { ImageSchema, image } from './schema/image/image.mjs';
|
|
7
7
|
export { SelectSchema, select } from './schema/select/select.mjs';
|
|
8
|
+
export { RichTextEditorSchema, rte } from './schema/rte/rte.mjs';
|
|
8
9
|
export { HiddenSchema, hidden } from './schema/hidden/hidden.mjs';
|
|
9
10
|
export { OptionalSchema, optional } from './schema/optional/optional.mjs';
|
|
10
11
|
export { ObjectSchema, object } from './schema/object/object.mjs';
|
|
@@ -12,9 +13,11 @@ export { GetServerSideProps } from './types/props.mjs';
|
|
|
12
13
|
export { EntryMask, RequireAtLeastOne, ResolveObject } from './types/utils.mjs';
|
|
13
14
|
export { BaseFieldInput, BaseSchema, Output } from './types/schema.mjs';
|
|
14
15
|
export { InferOutput } from './types/infer.mjs';
|
|
16
|
+
export { ComponentModel } from './types/component.mjs';
|
|
15
17
|
export { webcomponent } from './decorators/webcomponent/webcomponent.mjs';
|
|
16
18
|
export { parse } from './functions/parse/parse.mjs';
|
|
17
19
|
export { parsePrimitives } from './functions/parse/parsePrimitives.mjs';
|
|
20
|
+
export { ComponentSchema, component } from './functions/component/component.mjs';
|
|
18
21
|
import './types/object.mjs';
|
|
19
22
|
import './types/webcomponent.mjs';
|
|
20
23
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { CheckBoxSchema, checkbox } from './schema/checkbox/checkbox.js';
|
|
|
5
5
|
export { PathBrowserSchema, pathbrowser } from './schema/pathbrowser/pathbrowser.js';
|
|
6
6
|
export { ImageSchema, image } from './schema/image/image.js';
|
|
7
7
|
export { SelectSchema, select } from './schema/select/select.js';
|
|
8
|
+
export { RichTextEditorSchema, rte } from './schema/rte/rte.js';
|
|
8
9
|
export { HiddenSchema, hidden } from './schema/hidden/hidden.js';
|
|
9
10
|
export { OptionalSchema, optional } from './schema/optional/optional.js';
|
|
10
11
|
export { ObjectSchema, object } from './schema/object/object.js';
|
|
@@ -12,9 +13,11 @@ export { GetServerSideProps } from './types/props.js';
|
|
|
12
13
|
export { EntryMask, RequireAtLeastOne, ResolveObject } from './types/utils.js';
|
|
13
14
|
export { BaseFieldInput, BaseSchema, Output } from './types/schema.js';
|
|
14
15
|
export { InferOutput } from './types/infer.js';
|
|
16
|
+
export { ComponentModel } from './types/component.js';
|
|
15
17
|
export { webcomponent } from './decorators/webcomponent/webcomponent.js';
|
|
16
18
|
export { parse } from './functions/parse/parse.js';
|
|
17
19
|
export { parsePrimitives } from './functions/parse/parsePrimitives.js';
|
|
20
|
+
export { ComponentSchema, component } from './functions/component/component.js';
|
|
18
21
|
import './types/object.js';
|
|
19
22
|
import './types/webcomponent.js';
|
|
20
23
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
33
|
checkbox: () => checkbox,
|
|
34
|
+
component: () => component,
|
|
34
35
|
dialog: () => dialog,
|
|
35
36
|
hidden: () => hidden,
|
|
36
37
|
image: () => image,
|
|
@@ -40,6 +41,7 @@ __export(src_exports, {
|
|
|
40
41
|
parse: () => parse,
|
|
41
42
|
parsePrimitives: () => parsePrimitives,
|
|
42
43
|
pathbrowser: () => pathbrowser,
|
|
44
|
+
rte: () => rte,
|
|
43
45
|
select: () => select,
|
|
44
46
|
text: () => text,
|
|
45
47
|
webcomponent: () => webcomponent
|
|
@@ -54,6 +56,7 @@ function dialog(entries) {
|
|
|
54
56
|
return {
|
|
55
57
|
...this,
|
|
56
58
|
tabs: void 0,
|
|
59
|
+
component: void 0,
|
|
57
60
|
_parse() {
|
|
58
61
|
const usedEntries = /* @__PURE__ */ new Set();
|
|
59
62
|
const tabsArray = Object.entries(tabs).map(([tabKey, value]) => {
|
|
@@ -76,16 +79,18 @@ function dialog(entries) {
|
|
|
76
79
|
children
|
|
77
80
|
};
|
|
78
81
|
});
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
return {
|
|
83
|
+
dialog: [{
|
|
84
|
+
type: "tabs",
|
|
85
|
+
id: "tabs",
|
|
86
|
+
children: tabsArray
|
|
87
|
+
}]
|
|
88
|
+
};
|
|
84
89
|
}
|
|
85
90
|
};
|
|
86
91
|
},
|
|
87
92
|
_parse() {
|
|
88
|
-
|
|
93
|
+
const dialog2 = Object.entries(entries).map(([key, entry]) => ({
|
|
89
94
|
id: key,
|
|
90
95
|
name: key,
|
|
91
96
|
...entry._parse()
|
|
@@ -94,6 +99,9 @@ function dialog(entries) {
|
|
|
94
99
|
return entry.type !== "hidden";
|
|
95
100
|
}
|
|
96
101
|
});
|
|
102
|
+
return {
|
|
103
|
+
dialog: dialog2
|
|
104
|
+
};
|
|
97
105
|
},
|
|
98
106
|
_primitive() {
|
|
99
107
|
return Object.entries(entries).reduce(
|
|
@@ -224,6 +232,25 @@ function select(input) {
|
|
|
224
232
|
};
|
|
225
233
|
}
|
|
226
234
|
|
|
235
|
+
// src/schema/rte/rte.ts
|
|
236
|
+
function rte(input) {
|
|
237
|
+
const { placeholder, label } = input;
|
|
238
|
+
return {
|
|
239
|
+
type: "richtexteditor",
|
|
240
|
+
_parse() {
|
|
241
|
+
return {
|
|
242
|
+
type: "richtexteditor",
|
|
243
|
+
label,
|
|
244
|
+
placeholder
|
|
245
|
+
};
|
|
246
|
+
},
|
|
247
|
+
_primitive() {
|
|
248
|
+
return "string";
|
|
249
|
+
},
|
|
250
|
+
...input
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
|
|
227
254
|
// src/schema/hidden/hidden.ts
|
|
228
255
|
function hidden(input) {
|
|
229
256
|
const { type } = input;
|
|
@@ -283,9 +310,7 @@ function pascalToKebab(pascalCaseString) {
|
|
|
283
310
|
|
|
284
311
|
// src/functions/parse/parse.ts
|
|
285
312
|
function parse(schema) {
|
|
286
|
-
return
|
|
287
|
-
dialog: schema._parse()
|
|
288
|
-
};
|
|
313
|
+
return schema._parse();
|
|
289
314
|
}
|
|
290
315
|
|
|
291
316
|
// src/functions/parse/parsePrimitives.ts
|
|
@@ -293,17 +318,35 @@ function parsePrimitives(schema) {
|
|
|
293
318
|
return schema._primitive();
|
|
294
319
|
}
|
|
295
320
|
|
|
321
|
+
// src/functions/component/component.ts
|
|
322
|
+
function component(config, dialogInstance) {
|
|
323
|
+
return {
|
|
324
|
+
type: "component",
|
|
325
|
+
dialog: dialogInstance,
|
|
326
|
+
_parse() {
|
|
327
|
+
return {
|
|
328
|
+
...config,
|
|
329
|
+
...dialogInstance._parse()
|
|
330
|
+
};
|
|
331
|
+
},
|
|
332
|
+
_primitive() {
|
|
333
|
+
return dialogInstance._primitive();
|
|
334
|
+
},
|
|
335
|
+
...config
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
|
|
296
339
|
// src/decorators/webcomponent/webcomponent.ts
|
|
297
340
|
function webcomponent(schema, options) {
|
|
298
341
|
const props = schema ? {
|
|
299
342
|
...parsePrimitives(schema)
|
|
300
343
|
} : void 0;
|
|
301
|
-
return (
|
|
302
|
-
const name = pascalToKebab(
|
|
344
|
+
return (component2) => {
|
|
345
|
+
const name = pascalToKebab(component2.displayName);
|
|
303
346
|
if (!window.customElements.get(name)) {
|
|
304
347
|
customElements.define(
|
|
305
348
|
name,
|
|
306
|
-
(0, import_react_to_web_component.default)(
|
|
349
|
+
(0, import_react_to_web_component.default)(component2, {
|
|
307
350
|
props
|
|
308
351
|
})
|
|
309
352
|
);
|
|
@@ -313,6 +356,7 @@ function webcomponent(schema, options) {
|
|
|
313
356
|
// Annotate the CommonJS export names for ESM import in node:
|
|
314
357
|
0 && (module.exports = {
|
|
315
358
|
checkbox,
|
|
359
|
+
component,
|
|
316
360
|
dialog,
|
|
317
361
|
hidden,
|
|
318
362
|
image,
|
|
@@ -322,6 +366,7 @@ function webcomponent(schema, options) {
|
|
|
322
366
|
parse,
|
|
323
367
|
parsePrimitives,
|
|
324
368
|
pathbrowser,
|
|
369
|
+
rte,
|
|
325
370
|
select,
|
|
326
371
|
text,
|
|
327
372
|
webcomponent
|