@ethereal-nexus/core 0.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/LICENSE +201 -0
- package/dist/decorators/index.d.mts +8 -0
- package/dist/decorators/index.d.ts +8 -0
- package/dist/decorators/index.js +71 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/decorators/index.mjs +34 -0
- package/dist/decorators/index.mjs.map +1 -0
- package/dist/decorators/webcomponent/index.d.mts +8 -0
- package/dist/decorators/webcomponent/index.d.ts +8 -0
- package/dist/decorators/webcomponent/index.js +71 -0
- package/dist/decorators/webcomponent/index.js.map +1 -0
- package/dist/decorators/webcomponent/index.mjs +34 -0
- package/dist/decorators/webcomponent/index.mjs.map +1 -0
- package/dist/decorators/webcomponent/webcomponent.d.mts +12 -0
- package/dist/decorators/webcomponent/webcomponent.d.ts +12 -0
- package/dist/decorators/webcomponent/webcomponent.js +69 -0
- package/dist/decorators/webcomponent/webcomponent.js.map +1 -0
- package/dist/decorators/webcomponent/webcomponent.mjs +34 -0
- package/dist/decorators/webcomponent/webcomponent.mjs.map +1 -0
- package/dist/functions/index.d.mts +8 -0
- package/dist/functions/index.d.ts +8 -0
- package/dist/functions/index.js +44 -0
- package/dist/functions/index.js.map +1 -0
- package/dist/functions/index.mjs +16 -0
- package/dist/functions/index.mjs.map +1 -0
- package/dist/functions/parse/index.d.mts +8 -0
- package/dist/functions/parse/index.d.ts +8 -0
- package/dist/functions/parse/index.js +44 -0
- package/dist/functions/parse/index.js.map +1 -0
- package/dist/functions/parse/index.mjs +16 -0
- package/dist/functions/parse/index.mjs.map +1 -0
- package/dist/functions/parse/parse.d.mts +12 -0
- package/dist/functions/parse/parse.d.ts +12 -0
- package/dist/functions/parse/parse.js +35 -0
- package/dist/functions/parse/parse.js.map +1 -0
- package/dist/functions/parse/parse.mjs +10 -0
- package/dist/functions/parse/parse.mjs.map +1 -0
- package/dist/functions/parse/parsePrimitives.d.mts +10 -0
- package/dist/functions/parse/parsePrimitives.d.ts +10 -0
- package/dist/functions/parse/parsePrimitives.js +33 -0
- package/dist/functions/parse/parsePrimitives.js.map +1 -0
- package/dist/functions/parse/parsePrimitives.mjs +8 -0
- package/dist/functions/parse/parsePrimitives.mjs.map +1 -0
- package/dist/index.d.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +329 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +280 -0
- package/dist/index.mjs.map +1 -0
- package/dist/schema/checkbox/checkbox.d.mts +14 -0
- package/dist/schema/checkbox/checkbox.d.ts +14 -0
- package/dist/schema/checkbox/checkbox.js +46 -0
- package/dist/schema/checkbox/checkbox.js.map +1 -0
- package/dist/schema/checkbox/checkbox.mjs +21 -0
- package/dist/schema/checkbox/checkbox.mjs.map +1 -0
- package/dist/schema/checkbox/index.d.mts +3 -0
- package/dist/schema/checkbox/index.d.ts +3 -0
- package/dist/schema/checkbox/index.js +48 -0
- package/dist/schema/checkbox/index.js.map +1 -0
- package/dist/schema/checkbox/index.mjs +21 -0
- package/dist/schema/checkbox/index.mjs.map +1 -0
- package/dist/schema/dialog/dialog.d.mts +13 -0
- package/dist/schema/dialog/dialog.d.ts +13 -0
- package/dist/schema/dialog/dialog.js +92 -0
- package/dist/schema/dialog/dialog.js.map +1 -0
- package/dist/schema/dialog/dialog.mjs +67 -0
- package/dist/schema/dialog/dialog.mjs.map +1 -0
- package/dist/schema/dialog/index.d.mts +6 -0
- package/dist/schema/dialog/index.d.ts +6 -0
- package/dist/schema/dialog/index.js +94 -0
- package/dist/schema/dialog/index.js.map +1 -0
- package/dist/schema/dialog/index.mjs +67 -0
- package/dist/schema/dialog/index.mjs.map +1 -0
- package/dist/schema/hidden/hidden.d.mts +22 -0
- package/dist/schema/hidden/hidden.d.ts +22 -0
- package/dist/schema/hidden/hidden.js +42 -0
- package/dist/schema/hidden/hidden.js.map +1 -0
- package/dist/schema/hidden/hidden.mjs +17 -0
- package/dist/schema/hidden/hidden.mjs.map +1 -0
- package/dist/schema/hidden/index.d.mts +3 -0
- package/dist/schema/hidden/index.d.ts +3 -0
- package/dist/schema/hidden/index.js +44 -0
- package/dist/schema/hidden/index.js.map +1 -0
- package/dist/schema/hidden/index.mjs +17 -0
- package/dist/schema/hidden/index.mjs.map +1 -0
- package/dist/schema/image/image.d.mts +15 -0
- package/dist/schema/image/image.d.ts +15 -0
- package/dist/schema/image/image.js +47 -0
- package/dist/schema/image/image.js.map +1 -0
- package/dist/schema/image/image.mjs +22 -0
- package/dist/schema/image/image.mjs.map +1 -0
- package/dist/schema/image/index.d.mts +3 -0
- package/dist/schema/image/index.d.ts +3 -0
- package/dist/schema/image/index.js +49 -0
- package/dist/schema/image/index.js.map +1 -0
- package/dist/schema/image/index.mjs +22 -0
- package/dist/schema/image/index.mjs.map +1 -0
- package/dist/schema/multifield/index.d.mts +4 -0
- package/dist/schema/multifield/index.d.ts +4 -0
- package/dist/schema/multifield/index.js +50 -0
- package/dist/schema/multifield/index.js.map +1 -0
- package/dist/schema/multifield/index.mjs +23 -0
- package/dist/schema/multifield/index.mjs.map +1 -0
- package/dist/schema/multifield/multifield.d.mts +17 -0
- package/dist/schema/multifield/multifield.d.ts +17 -0
- package/dist/schema/multifield/multifield.js +48 -0
- package/dist/schema/multifield/multifield.js.map +1 -0
- package/dist/schema/multifield/multifield.mjs +23 -0
- package/dist/schema/multifield/multifield.mjs.map +1 -0
- package/dist/schema/object/index.d.mts +6 -0
- package/dist/schema/object/index.d.ts +6 -0
- package/dist/schema/object/index.js +51 -0
- package/dist/schema/object/index.js.map +1 -0
- package/dist/schema/object/index.mjs +24 -0
- package/dist/schema/object/index.mjs.map +1 -0
- package/dist/schema/object/object.d.mts +12 -0
- package/dist/schema/object/object.d.ts +12 -0
- package/dist/schema/object/object.js +49 -0
- package/dist/schema/object/object.js.map +1 -0
- package/dist/schema/object/object.mjs +24 -0
- package/dist/schema/object/object.mjs.map +1 -0
- package/dist/schema/optional/index.d.mts +3 -0
- package/dist/schema/optional/index.d.ts +3 -0
- package/dist/schema/optional/index.js +44 -0
- package/dist/schema/optional/index.js.map +1 -0
- package/dist/schema/optional/index.mjs +17 -0
- package/dist/schema/optional/index.mjs.map +1 -0
- package/dist/schema/optional/optional.d.mts +26 -0
- package/dist/schema/optional/optional.d.ts +26 -0
- package/dist/schema/optional/optional.js +42 -0
- package/dist/schema/optional/optional.js.map +1 -0
- package/dist/schema/optional/optional.mjs +17 -0
- package/dist/schema/optional/optional.mjs.map +1 -0
- package/dist/schema/pathbrowser/index.d.mts +3 -0
- package/dist/schema/pathbrowser/index.d.ts +3 -0
- package/dist/schema/pathbrowser/index.js +49 -0
- package/dist/schema/pathbrowser/index.js.map +1 -0
- package/dist/schema/pathbrowser/index.mjs +22 -0
- package/dist/schema/pathbrowser/index.mjs.map +1 -0
- package/dist/schema/pathbrowser/pathbrowser.d.mts +15 -0
- package/dist/schema/pathbrowser/pathbrowser.d.ts +15 -0
- package/dist/schema/pathbrowser/pathbrowser.js +47 -0
- package/dist/schema/pathbrowser/pathbrowser.js.map +1 -0
- package/dist/schema/pathbrowser/pathbrowser.mjs +22 -0
- package/dist/schema/pathbrowser/pathbrowser.mjs.map +1 -0
- package/dist/schema/select/index.d.mts +3 -0
- package/dist/schema/select/index.d.ts +3 -0
- package/dist/schema/select/index.js +49 -0
- package/dist/schema/select/index.js.map +1 -0
- package/dist/schema/select/index.mjs +22 -0
- package/dist/schema/select/index.mjs.map +1 -0
- package/dist/schema/select/select.d.mts +18 -0
- package/dist/schema/select/select.d.ts +18 -0
- package/dist/schema/select/select.js +47 -0
- package/dist/schema/select/select.js.map +1 -0
- package/dist/schema/select/select.mjs +22 -0
- package/dist/schema/select/select.mjs.map +1 -0
- package/dist/schema/text/index.d.mts +3 -0
- package/dist/schema/text/index.d.ts +3 -0
- package/dist/schema/text/index.js +49 -0
- package/dist/schema/text/index.js.map +1 -0
- package/dist/schema/text/index.mjs +22 -0
- package/dist/schema/text/index.mjs.map +1 -0
- package/dist/schema/text/text.d.mts +15 -0
- package/dist/schema/text/text.d.ts +15 -0
- package/dist/schema/text/text.js +47 -0
- package/dist/schema/text/text.js.map +1 -0
- package/dist/schema/text/text.mjs +22 -0
- package/dist/schema/text/text.mjs.map +1 -0
- package/dist/types/index.d.mts +5 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/types/infer.d.mts +9 -0
- package/dist/types/infer.d.ts +9 -0
- package/dist/types/infer.js +19 -0
- package/dist/types/infer.js.map +1 -0
- package/dist/types/infer.mjs +1 -0
- package/dist/types/infer.mjs.map +1 -0
- package/dist/types/object.d.mts +39 -0
- package/dist/types/object.d.ts +39 -0
- package/dist/types/object.js +19 -0
- package/dist/types/object.js.map +1 -0
- package/dist/types/object.mjs +1 -0
- package/dist/types/object.mjs.map +1 -0
- package/dist/types/props.d.mts +13 -0
- package/dist/types/props.d.ts +13 -0
- package/dist/types/props.js +19 -0
- package/dist/types/props.js.map +1 -0
- package/dist/types/props.mjs +1 -0
- package/dist/types/props.mjs.map +1 -0
- package/dist/types/schema.d.mts +42 -0
- package/dist/types/schema.d.ts +42 -0
- package/dist/types/schema.js +19 -0
- package/dist/types/schema.js.map +1 -0
- package/dist/types/schema.mjs +1 -0
- package/dist/types/schema.mjs.map +1 -0
- package/dist/types/utils.d.mts +32 -0
- package/dist/types/utils.d.ts +32 -0
- package/dist/types/utils.js +19 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/types/utils.mjs +1 -0
- package/dist/types/utils.mjs.map +1 -0
- package/dist/types/webcomponent.d.mts +7 -0
- package/dist/types/webcomponent.d.ts +7 -0
- package/dist/types/webcomponent.js +19 -0
- package/dist/types/webcomponent.js.map +1 -0
- package/dist/types/webcomponent.mjs +1 -0
- package/dist/types/webcomponent.mjs.map +1 -0
- package/dist/utils/pascalToKebab.d.mts +3 -0
- package/dist/utils/pascalToKebab.d.ts +3 -0
- package/dist/utils/pascalToKebab.js +33 -0
- package/dist/utils/pascalToKebab.js.map +1 -0
- package/dist/utils/pascalToKebab.mjs +8 -0
- package/dist/utils/pascalToKebab.mjs.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/object/index.ts","../../../src/schema/object/object.ts"],"sourcesContent":["export * from './object';\n","import type { BaseSchema } from '../../types';\nimport { ObjectEntries, ObjectOutput } from '../../types/object';\n\nexport interface ObjectSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput> {\n type: 'object';\n}\n\nexport function object<TEntries extends ObjectEntries>(entries: TEntries): ObjectSchema<TEntries> {\n return {\n type: 'object',\n _parse() {\n return Object.entries(entries)\n .map(([key, entry]) => ({\n id: key,\n name: key,\n ...entry._parse()\n }))\n .filter((entry: object) => {\n if('type' in entry){\n return entry.type !== 'hidden'\n }\n })\n },\n _primitive() {\n return 'json'\n }\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOO,SAAS,OAAuC,SAA2C;AAChG,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO,OAAO,QAAQ,OAAO,EAC1B,IAAI,CAAC,CAAC,KAAK,KAAK,OAAO;AAAA,QACtB,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,GAAG,MAAM,OAAO;AAAA,MAClB,EAAE,EACD,OAAO,CAAC,UAAkB;AACzB,YAAG,UAAU,OAAM;AACjB,iBAAO,MAAM,SAAS;AAAA,QACxB;AAAA,MACF,CAAC;AAAA,IACL;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/schema/object/object.ts
|
|
2
|
+
function object(entries) {
|
|
3
|
+
return {
|
|
4
|
+
type: "object",
|
|
5
|
+
_parse() {
|
|
6
|
+
return Object.entries(entries).map(([key, entry]) => ({
|
|
7
|
+
id: key,
|
|
8
|
+
name: key,
|
|
9
|
+
...entry._parse()
|
|
10
|
+
})).filter((entry) => {
|
|
11
|
+
if ("type" in entry) {
|
|
12
|
+
return entry.type !== "hidden";
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
_primitive() {
|
|
17
|
+
return "json";
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
object
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/object/object.ts"],"sourcesContent":["import type { BaseSchema } from '../../types';\nimport { ObjectEntries, ObjectOutput } from '../../types/object';\n\nexport interface ObjectSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput> {\n type: 'object';\n}\n\nexport function object<TEntries extends ObjectEntries>(entries: TEntries): ObjectSchema<TEntries> {\n return {\n type: 'object',\n _parse() {\n return Object.entries(entries)\n .map(([key, entry]) => ({\n id: key,\n name: key,\n ...entry._parse()\n }))\n .filter((entry: object) => {\n if('type' in entry){\n return entry.type !== 'hidden'\n }\n })\n },\n _primitive() {\n return 'json'\n }\n };\n}"],"mappings":";AAOO,SAAS,OAAuC,SAA2C;AAChG,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO,OAAO,QAAQ,OAAO,EAC1B,IAAI,CAAC,CAAC,KAAK,KAAK,OAAO;AAAA,QACtB,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,GAAG,MAAM,OAAO;AAAA,MAClB,EAAE,EACD,OAAO,CAAC,UAAkB;AACzB,YAAG,UAAU,OAAM;AACjB,iBAAO,MAAM,SAAS;AAAA,QACxB;AAAA,MACF,CAAC;AAAA,IACL;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseSchema } from '../../types/schema.mjs';
|
|
2
|
+
import { ObjectEntries, ObjectOutput } from '../../types/object.mjs';
|
|
3
|
+
import '../../types/webcomponent.mjs';
|
|
4
|
+
import '../optional/optional.mjs';
|
|
5
|
+
import '../../types/utils.mjs';
|
|
6
|
+
|
|
7
|
+
interface ObjectSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput> {
|
|
8
|
+
type: 'object';
|
|
9
|
+
}
|
|
10
|
+
declare function object<TEntries extends ObjectEntries>(entries: TEntries): ObjectSchema<TEntries>;
|
|
11
|
+
|
|
12
|
+
export { type ObjectSchema, object };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseSchema } from '../../types/schema.js';
|
|
2
|
+
import { ObjectEntries, ObjectOutput } from '../../types/object.js';
|
|
3
|
+
import '../../types/webcomponent.js';
|
|
4
|
+
import '../optional/optional.js';
|
|
5
|
+
import '../../types/utils.js';
|
|
6
|
+
|
|
7
|
+
interface ObjectSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput> {
|
|
8
|
+
type: 'object';
|
|
9
|
+
}
|
|
10
|
+
declare function object<TEntries extends ObjectEntries>(entries: TEntries): ObjectSchema<TEntries>;
|
|
11
|
+
|
|
12
|
+
export { type ObjectSchema, object };
|
|
@@ -0,0 +1,49 @@
|
|
|
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/schema/object/object.ts
|
|
21
|
+
var object_exports = {};
|
|
22
|
+
__export(object_exports, {
|
|
23
|
+
object: () => object
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(object_exports);
|
|
26
|
+
function object(entries) {
|
|
27
|
+
return {
|
|
28
|
+
type: "object",
|
|
29
|
+
_parse() {
|
|
30
|
+
return Object.entries(entries).map(([key, entry]) => ({
|
|
31
|
+
id: key,
|
|
32
|
+
name: key,
|
|
33
|
+
...entry._parse()
|
|
34
|
+
})).filter((entry) => {
|
|
35
|
+
if ("type" in entry) {
|
|
36
|
+
return entry.type !== "hidden";
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
_primitive() {
|
|
41
|
+
return "json";
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
object
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/object/object.ts"],"sourcesContent":["import type { BaseSchema } from '../../types';\nimport { ObjectEntries, ObjectOutput } from '../../types/object';\n\nexport interface ObjectSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput> {\n type: 'object';\n}\n\nexport function object<TEntries extends ObjectEntries>(entries: TEntries): ObjectSchema<TEntries> {\n return {\n type: 'object',\n _parse() {\n return Object.entries(entries)\n .map(([key, entry]) => ({\n id: key,\n name: key,\n ...entry._parse()\n }))\n .filter((entry: object) => {\n if('type' in entry){\n return entry.type !== 'hidden'\n }\n })\n },\n _primitive() {\n return 'json'\n }\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,SAAS,OAAuC,SAA2C;AAChG,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO,OAAO,QAAQ,OAAO,EAC1B,IAAI,CAAC,CAAC,KAAK,KAAK,OAAO;AAAA,QACtB,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,GAAG,MAAM,OAAO;AAAA,MAClB,EAAE,EACD,OAAO,CAAC,UAAkB;AACzB,YAAG,UAAU,OAAM;AACjB,iBAAO,MAAM,SAAS;AAAA,QACxB;AAAA,MACF,CAAC;AAAA,IACL;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/schema/object/object.ts
|
|
2
|
+
function object(entries) {
|
|
3
|
+
return {
|
|
4
|
+
type: "object",
|
|
5
|
+
_parse() {
|
|
6
|
+
return Object.entries(entries).map(([key, entry]) => ({
|
|
7
|
+
id: key,
|
|
8
|
+
name: key,
|
|
9
|
+
...entry._parse()
|
|
10
|
+
})).filter((entry) => {
|
|
11
|
+
if ("type" in entry) {
|
|
12
|
+
return entry.type !== "hidden";
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
_primitive() {
|
|
17
|
+
return "json";
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
object
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=object.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/object/object.ts"],"sourcesContent":["import type { BaseSchema } from '../../types';\nimport { ObjectEntries, ObjectOutput } from '../../types/object';\n\nexport interface ObjectSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput> {\n type: 'object';\n}\n\nexport function object<TEntries extends ObjectEntries>(entries: TEntries): ObjectSchema<TEntries> {\n return {\n type: 'object',\n _parse() {\n return Object.entries(entries)\n .map(([key, entry]) => ({\n id: key,\n name: key,\n ...entry._parse()\n }))\n .filter((entry: object) => {\n if('type' in entry){\n return entry.type !== 'hidden'\n }\n })\n },\n _primitive() {\n return 'json'\n }\n };\n}"],"mappings":";AAOO,SAAS,OAAuC,SAA2C;AAChG,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO,OAAO,QAAQ,OAAO,EAC1B,IAAI,CAAC,CAAC,KAAK,KAAK,OAAO;AAAA,QACtB,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,GAAG,MAAM,OAAO;AAAA,MAClB,EAAE,EACD,OAAO,CAAC,UAAkB;AACzB,YAAG,UAAU,OAAM;AACjB,iBAAO,MAAM,SAAS;AAAA,QACxB;AAAA,MACF,CAAC;AAAA,IACL;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
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/schema/optional/index.ts
|
|
21
|
+
var optional_exports = {};
|
|
22
|
+
__export(optional_exports, {
|
|
23
|
+
optional: () => optional
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(optional_exports);
|
|
26
|
+
|
|
27
|
+
// src/schema/optional/optional.ts
|
|
28
|
+
function optional(wrapped) {
|
|
29
|
+
return {
|
|
30
|
+
type: "optional",
|
|
31
|
+
wrapped,
|
|
32
|
+
_primitive() {
|
|
33
|
+
return this.wrapped._primitive();
|
|
34
|
+
},
|
|
35
|
+
_parse() {
|
|
36
|
+
return this.wrapped._parse();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
optional
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/optional/index.ts","../../../src/schema/optional/optional.ts"],"sourcesContent":["export * from './optional'","import { BaseSchema, Output } from '../../types';\n\n/**\n * Optional schema type.\n */\nexport interface OptionalSchema<\n TWrapped extends BaseSchema,\n TOutput = Output<TWrapped> | undefined\n> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'optional';\n /**\n * The wrapped schema.\n */\n wrapped: TWrapped;\n}\n\n\n/**\n * Creates an optional schema.\n *\n * @param wrapped The wrapped schema.\n *\n * @returns A optional schema.\n */\nexport function optional<TWrapped extends BaseSchema>(\n wrapped: TWrapped\n): OptionalSchema<TWrapped> {\n return {\n type: 'optional',\n wrapped,\n _primitive() {\n return this.wrapped._primitive();\n },\n _parse() {\n return this.wrapped._parse();\n },\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC2BO,SAAS,SACd,SAC0B;AAC1B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,aAAa;AACX,aAAO,KAAK,QAAQ,WAAW;AAAA,IACjC;AAAA,IACA,SAAS;AACP,aAAO,KAAK,QAAQ,OAAO;AAAA,IAC7B;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/schema/optional/optional.ts
|
|
2
|
+
function optional(wrapped) {
|
|
3
|
+
return {
|
|
4
|
+
type: "optional",
|
|
5
|
+
wrapped,
|
|
6
|
+
_primitive() {
|
|
7
|
+
return this.wrapped._primitive();
|
|
8
|
+
},
|
|
9
|
+
_parse() {
|
|
10
|
+
return this.wrapped._parse();
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
optional
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/optional/optional.ts"],"sourcesContent":["import { BaseSchema, Output } from '../../types';\n\n/**\n * Optional schema type.\n */\nexport interface OptionalSchema<\n TWrapped extends BaseSchema,\n TOutput = Output<TWrapped> | undefined\n> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'optional';\n /**\n * The wrapped schema.\n */\n wrapped: TWrapped;\n}\n\n\n/**\n * Creates an optional schema.\n *\n * @param wrapped The wrapped schema.\n *\n * @returns A optional schema.\n */\nexport function optional<TWrapped extends BaseSchema>(\n wrapped: TWrapped\n): OptionalSchema<TWrapped> {\n return {\n type: 'optional',\n wrapped,\n _primitive() {\n return this.wrapped._primitive();\n },\n _parse() {\n return this.wrapped._parse();\n },\n };\n}"],"mappings":";AA2BO,SAAS,SACd,SAC0B;AAC1B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,aAAa;AACX,aAAO,KAAK,QAAQ,WAAW;AAAA,IACjC;AAAA,IACA,SAAS;AACP,aAAO,KAAK,QAAQ,OAAO;AAAA,IAC7B;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseSchema, Output } from '../../types/schema.mjs';
|
|
2
|
+
import '../../types/webcomponent.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Optional schema type.
|
|
6
|
+
*/
|
|
7
|
+
interface OptionalSchema<TWrapped extends BaseSchema, TOutput = Output<TWrapped> | undefined> extends BaseSchema<TOutput> {
|
|
8
|
+
/**
|
|
9
|
+
* The schema type.
|
|
10
|
+
*/
|
|
11
|
+
type: 'optional';
|
|
12
|
+
/**
|
|
13
|
+
* The wrapped schema.
|
|
14
|
+
*/
|
|
15
|
+
wrapped: TWrapped;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Creates an optional schema.
|
|
19
|
+
*
|
|
20
|
+
* @param wrapped The wrapped schema.
|
|
21
|
+
*
|
|
22
|
+
* @returns A optional schema.
|
|
23
|
+
*/
|
|
24
|
+
declare function optional<TWrapped extends BaseSchema>(wrapped: TWrapped): OptionalSchema<TWrapped>;
|
|
25
|
+
|
|
26
|
+
export { type OptionalSchema, optional };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseSchema, Output } from '../../types/schema.js';
|
|
2
|
+
import '../../types/webcomponent.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Optional schema type.
|
|
6
|
+
*/
|
|
7
|
+
interface OptionalSchema<TWrapped extends BaseSchema, TOutput = Output<TWrapped> | undefined> extends BaseSchema<TOutput> {
|
|
8
|
+
/**
|
|
9
|
+
* The schema type.
|
|
10
|
+
*/
|
|
11
|
+
type: 'optional';
|
|
12
|
+
/**
|
|
13
|
+
* The wrapped schema.
|
|
14
|
+
*/
|
|
15
|
+
wrapped: TWrapped;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Creates an optional schema.
|
|
19
|
+
*
|
|
20
|
+
* @param wrapped The wrapped schema.
|
|
21
|
+
*
|
|
22
|
+
* @returns A optional schema.
|
|
23
|
+
*/
|
|
24
|
+
declare function optional<TWrapped extends BaseSchema>(wrapped: TWrapped): OptionalSchema<TWrapped>;
|
|
25
|
+
|
|
26
|
+
export { type OptionalSchema, optional };
|
|
@@ -0,0 +1,42 @@
|
|
|
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/schema/optional/optional.ts
|
|
21
|
+
var optional_exports = {};
|
|
22
|
+
__export(optional_exports, {
|
|
23
|
+
optional: () => optional
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(optional_exports);
|
|
26
|
+
function optional(wrapped) {
|
|
27
|
+
return {
|
|
28
|
+
type: "optional",
|
|
29
|
+
wrapped,
|
|
30
|
+
_primitive() {
|
|
31
|
+
return this.wrapped._primitive();
|
|
32
|
+
},
|
|
33
|
+
_parse() {
|
|
34
|
+
return this.wrapped._parse();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
optional
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=optional.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/optional/optional.ts"],"sourcesContent":["import { BaseSchema, Output } from '../../types';\n\n/**\n * Optional schema type.\n */\nexport interface OptionalSchema<\n TWrapped extends BaseSchema,\n TOutput = Output<TWrapped> | undefined\n> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'optional';\n /**\n * The wrapped schema.\n */\n wrapped: TWrapped;\n}\n\n\n/**\n * Creates an optional schema.\n *\n * @param wrapped The wrapped schema.\n *\n * @returns A optional schema.\n */\nexport function optional<TWrapped extends BaseSchema>(\n wrapped: TWrapped\n): OptionalSchema<TWrapped> {\n return {\n type: 'optional',\n wrapped,\n _primitive() {\n return this.wrapped._primitive();\n },\n _parse() {\n return this.wrapped._parse();\n },\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BO,SAAS,SACd,SAC0B;AAC1B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,aAAa;AACX,aAAO,KAAK,QAAQ,WAAW;AAAA,IACjC;AAAA,IACA,SAAS;AACP,aAAO,KAAK,QAAQ,OAAO;AAAA,IAC7B;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/schema/optional/optional.ts
|
|
2
|
+
function optional(wrapped) {
|
|
3
|
+
return {
|
|
4
|
+
type: "optional",
|
|
5
|
+
wrapped,
|
|
6
|
+
_primitive() {
|
|
7
|
+
return this.wrapped._primitive();
|
|
8
|
+
},
|
|
9
|
+
_parse() {
|
|
10
|
+
return this.wrapped._parse();
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
optional
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=optional.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/optional/optional.ts"],"sourcesContent":["import { BaseSchema, Output } from '../../types';\n\n/**\n * Optional schema type.\n */\nexport interface OptionalSchema<\n TWrapped extends BaseSchema,\n TOutput = Output<TWrapped> | undefined\n> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'optional';\n /**\n * The wrapped schema.\n */\n wrapped: TWrapped;\n}\n\n\n/**\n * Creates an optional schema.\n *\n * @param wrapped The wrapped schema.\n *\n * @returns A optional schema.\n */\nexport function optional<TWrapped extends BaseSchema>(\n wrapped: TWrapped\n): OptionalSchema<TWrapped> {\n return {\n type: 'optional',\n wrapped,\n _primitive() {\n return this.wrapped._primitive();\n },\n _parse() {\n return this.wrapped._parse();\n },\n };\n}"],"mappings":";AA2BO,SAAS,SACd,SAC0B;AAC1B,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,aAAa;AACX,aAAO,KAAK,QAAQ,WAAW;AAAA,IACjC;AAAA,IACA,SAAS;AACP,aAAO,KAAK,QAAQ,OAAO;AAAA,IAC7B;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
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/schema/pathbrowser/index.ts
|
|
21
|
+
var pathbrowser_exports = {};
|
|
22
|
+
__export(pathbrowser_exports, {
|
|
23
|
+
pathbrowser: () => pathbrowser
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(pathbrowser_exports);
|
|
26
|
+
|
|
27
|
+
// src/schema/pathbrowser/pathbrowser.ts
|
|
28
|
+
function pathbrowser(input) {
|
|
29
|
+
const { placeholder, label } = input;
|
|
30
|
+
return {
|
|
31
|
+
type: "pathbrowser",
|
|
32
|
+
_parse() {
|
|
33
|
+
return {
|
|
34
|
+
type: "pathbrowser",
|
|
35
|
+
label,
|
|
36
|
+
placeholder
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
_primitive() {
|
|
40
|
+
return "string";
|
|
41
|
+
},
|
|
42
|
+
...input
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
pathbrowser
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/pathbrowser/index.ts","../../../src/schema/pathbrowser/pathbrowser.ts"],"sourcesContent":["export * from './pathbrowser'","import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface PathBrowserSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'pathbrowser';\n}\n\ninterface PathBrowserInput extends BaseFieldInput {\n placeholder: string;\n}\n\nexport function pathbrowser(input: PathBrowserInput): PathBrowserSchema {\n const {placeholder, label} = input;\n\n return {\n type: 'pathbrowser',\n _parse() {\n return {\n type: 'pathbrowser',\n label,\n placeholder,\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACaO,SAAS,YAAY,OAA4C;AACtE,QAAM,EAAC,aAAa,MAAK,IAAI;AAE7B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/schema/pathbrowser/pathbrowser.ts
|
|
2
|
+
function pathbrowser(input) {
|
|
3
|
+
const { placeholder, label } = input;
|
|
4
|
+
return {
|
|
5
|
+
type: "pathbrowser",
|
|
6
|
+
_parse() {
|
|
7
|
+
return {
|
|
8
|
+
type: "pathbrowser",
|
|
9
|
+
label,
|
|
10
|
+
placeholder
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
_primitive() {
|
|
14
|
+
return "string";
|
|
15
|
+
},
|
|
16
|
+
...input
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
pathbrowser
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/pathbrowser/pathbrowser.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface PathBrowserSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'pathbrowser';\n}\n\ninterface PathBrowserInput extends BaseFieldInput {\n placeholder: string;\n}\n\nexport function pathbrowser(input: PathBrowserInput): PathBrowserSchema {\n const {placeholder, label} = input;\n\n return {\n type: 'pathbrowser',\n _parse() {\n return {\n type: 'pathbrowser',\n label,\n placeholder,\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";AAaO,SAAS,YAAY,OAA4C;AACtE,QAAM,EAAC,aAAa,MAAK,IAAI;AAE7B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseSchema, BaseFieldInput } from '../../types/schema.mjs';
|
|
2
|
+
import '../../types/webcomponent.mjs';
|
|
3
|
+
|
|
4
|
+
interface PathBrowserSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
|
|
5
|
+
/**
|
|
6
|
+
* The schema type.
|
|
7
|
+
*/
|
|
8
|
+
type: 'pathbrowser';
|
|
9
|
+
}
|
|
10
|
+
interface PathBrowserInput extends BaseFieldInput {
|
|
11
|
+
placeholder: string;
|
|
12
|
+
}
|
|
13
|
+
declare function pathbrowser(input: PathBrowserInput): PathBrowserSchema;
|
|
14
|
+
|
|
15
|
+
export { type PathBrowserSchema, pathbrowser };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseSchema, BaseFieldInput } from '../../types/schema.js';
|
|
2
|
+
import '../../types/webcomponent.js';
|
|
3
|
+
|
|
4
|
+
interface PathBrowserSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
|
|
5
|
+
/**
|
|
6
|
+
* The schema type.
|
|
7
|
+
*/
|
|
8
|
+
type: 'pathbrowser';
|
|
9
|
+
}
|
|
10
|
+
interface PathBrowserInput extends BaseFieldInput {
|
|
11
|
+
placeholder: string;
|
|
12
|
+
}
|
|
13
|
+
declare function pathbrowser(input: PathBrowserInput): PathBrowserSchema;
|
|
14
|
+
|
|
15
|
+
export { type PathBrowserSchema, pathbrowser };
|
|
@@ -0,0 +1,47 @@
|
|
|
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/schema/pathbrowser/pathbrowser.ts
|
|
21
|
+
var pathbrowser_exports = {};
|
|
22
|
+
__export(pathbrowser_exports, {
|
|
23
|
+
pathbrowser: () => pathbrowser
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(pathbrowser_exports);
|
|
26
|
+
function pathbrowser(input) {
|
|
27
|
+
const { placeholder, label } = input;
|
|
28
|
+
return {
|
|
29
|
+
type: "pathbrowser",
|
|
30
|
+
_parse() {
|
|
31
|
+
return {
|
|
32
|
+
type: "pathbrowser",
|
|
33
|
+
label,
|
|
34
|
+
placeholder
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
_primitive() {
|
|
38
|
+
return "string";
|
|
39
|
+
},
|
|
40
|
+
...input
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
pathbrowser
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=pathbrowser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/pathbrowser/pathbrowser.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface PathBrowserSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'pathbrowser';\n}\n\ninterface PathBrowserInput extends BaseFieldInput {\n placeholder: string;\n}\n\nexport function pathbrowser(input: PathBrowserInput): PathBrowserSchema {\n const {placeholder, label} = input;\n\n return {\n type: 'pathbrowser',\n _parse() {\n return {\n type: 'pathbrowser',\n label,\n placeholder,\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,YAAY,OAA4C;AACtE,QAAM,EAAC,aAAa,MAAK,IAAI;AAE7B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/schema/pathbrowser/pathbrowser.ts
|
|
2
|
+
function pathbrowser(input) {
|
|
3
|
+
const { placeholder, label } = input;
|
|
4
|
+
return {
|
|
5
|
+
type: "pathbrowser",
|
|
6
|
+
_parse() {
|
|
7
|
+
return {
|
|
8
|
+
type: "pathbrowser",
|
|
9
|
+
label,
|
|
10
|
+
placeholder
|
|
11
|
+
};
|
|
12
|
+
},
|
|
13
|
+
_primitive() {
|
|
14
|
+
return "string";
|
|
15
|
+
},
|
|
16
|
+
...input
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
pathbrowser
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=pathbrowser.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/pathbrowser/pathbrowser.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface PathBrowserSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'pathbrowser';\n}\n\ninterface PathBrowserInput extends BaseFieldInput {\n placeholder: string;\n}\n\nexport function pathbrowser(input: PathBrowserInput): PathBrowserSchema {\n const {placeholder, label} = input;\n\n return {\n type: 'pathbrowser',\n _parse() {\n return {\n type: 'pathbrowser',\n label,\n placeholder,\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";AAaO,SAAS,YAAY,OAA4C;AACtE,QAAM,EAAC,aAAa,MAAK,IAAI;AAE7B,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
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/schema/select/index.ts
|
|
21
|
+
var select_exports = {};
|
|
22
|
+
__export(select_exports, {
|
|
23
|
+
select: () => select
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(select_exports);
|
|
26
|
+
|
|
27
|
+
// src/schema/select/select.ts
|
|
28
|
+
function select(input) {
|
|
29
|
+
const { label, values } = input;
|
|
30
|
+
return {
|
|
31
|
+
type: "select",
|
|
32
|
+
_parse() {
|
|
33
|
+
return {
|
|
34
|
+
type: "select",
|
|
35
|
+
label,
|
|
36
|
+
values
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
_primitive() {
|
|
40
|
+
return "string";
|
|
41
|
+
},
|
|
42
|
+
...input
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
select
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/select/index.ts","../../../src/schema/select/select.ts"],"sourcesContent":["export * from './select'","import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface SelectSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'select';\n}\n\ninterface SelectInput extends BaseFieldInput {\n values: {\n value: string,\n label: string,\n }[]\n}\n\nexport function select(input: SelectInput): SelectSchema {\n const {label, values} = input;\n\n return {\n type: 'select',\n _parse() {\n return {\n type: 'select',\n label,\n values,\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgBO,SAAS,OAAO,OAAkC;AACvD,QAAM,EAAC,OAAO,OAAM,IAAI;AAExB,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|