@ethereal-nexus/core 0.3.0 → 0.3.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.
Files changed (149) hide show
  1. package/dist/decorators/index.d.mts +2 -4
  2. package/dist/decorators/index.d.ts +2 -4
  3. package/dist/decorators/webcomponent/index.d.mts +2 -4
  4. package/dist/decorators/webcomponent/index.d.ts +2 -4
  5. package/dist/decorators/webcomponent/webcomponent.d.mts +1 -3
  6. package/dist/decorators/webcomponent/webcomponent.d.ts +1 -3
  7. package/dist/functions/component/component.d.mts +4 -6
  8. package/dist/functions/component/component.d.ts +4 -6
  9. package/dist/functions/component/component.js.map +1 -1
  10. package/dist/functions/component/component.mjs.map +1 -1
  11. package/dist/functions/component/index.d.mts +2 -4
  12. package/dist/functions/component/index.d.ts +2 -4
  13. package/dist/functions/component/index.js.map +1 -1
  14. package/dist/functions/component/index.mjs.map +1 -1
  15. package/dist/functions/index.d.mts +2 -4
  16. package/dist/functions/index.d.ts +2 -4
  17. package/dist/functions/index.js.map +1 -1
  18. package/dist/functions/index.mjs.map +1 -1
  19. package/dist/functions/parse/index.d.mts +2 -4
  20. package/dist/functions/parse/index.d.ts +2 -4
  21. package/dist/functions/parse/parse.d.mts +1 -3
  22. package/dist/functions/parse/parse.d.ts +1 -3
  23. package/dist/functions/parse/parsePrimitives.d.mts +1 -3
  24. package/dist/functions/parse/parsePrimitives.d.ts +1 -3
  25. package/dist/index.d.mts +4 -4
  26. package/dist/index.d.ts +4 -4
  27. package/dist/index.js +157 -65
  28. package/dist/index.js.map +1 -1
  29. package/dist/index.mjs +157 -65
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/schema/calendar/calendar.d.mts +2 -1
  32. package/dist/schema/calendar/calendar.d.ts +2 -1
  33. package/dist/schema/calendar/index.d.mts +2 -1
  34. package/dist/schema/calendar/index.d.ts +2 -1
  35. package/dist/schema/checkbox/checkbox.d.mts +2 -1
  36. package/dist/schema/checkbox/checkbox.d.ts +2 -1
  37. package/dist/schema/checkbox/index.d.mts +2 -1
  38. package/dist/schema/checkbox/index.d.ts +2 -1
  39. package/dist/schema/datamodel/datamodel.d.mts +2 -1
  40. package/dist/schema/datamodel/datamodel.d.ts +2 -1
  41. package/dist/schema/datamodel/index.d.mts +2 -1
  42. package/dist/schema/datamodel/index.d.ts +2 -1
  43. package/dist/schema/datasource/datasource.d.mts +2 -1
  44. package/dist/schema/datasource/datasource.d.ts +2 -1
  45. package/dist/schema/datasource/index.d.mts +2 -1
  46. package/dist/schema/datasource/index.d.ts +2 -1
  47. package/dist/schema/dialog/condition.d.mts +11 -0
  48. package/dist/schema/dialog/condition.d.ts +11 -0
  49. package/dist/schema/dialog/condition.js +72 -0
  50. package/dist/schema/dialog/condition.js.map +1 -0
  51. package/dist/schema/dialog/condition.mjs +49 -0
  52. package/dist/schema/dialog/condition.mjs.map +1 -0
  53. package/dist/schema/dialog/dialog.d.mts +28 -7
  54. package/dist/schema/dialog/dialog.d.ts +28 -7
  55. package/dist/schema/dialog/dialog.js +152 -63
  56. package/dist/schema/dialog/dialog.js.map +1 -1
  57. package/dist/schema/dialog/dialog.mjs +153 -64
  58. package/dist/schema/dialog/dialog.mjs.map +1 -1
  59. package/dist/schema/dialog/index.d.mts +3 -3
  60. package/dist/schema/dialog/index.d.ts +3 -3
  61. package/dist/schema/dialog/index.js +155 -64
  62. package/dist/schema/dialog/index.js.map +1 -1
  63. package/dist/schema/dialog/index.mjs +155 -64
  64. package/dist/schema/dialog/index.mjs.map +1 -1
  65. package/dist/schema/dialog/tabs.d.mts +20 -0
  66. package/dist/schema/dialog/tabs.d.ts +20 -0
  67. package/dist/schema/dialog/tabs.js +74 -0
  68. package/dist/schema/dialog/tabs.js.map +1 -0
  69. package/dist/schema/dialog/tabs.mjs +51 -0
  70. package/dist/schema/dialog/tabs.mjs.map +1 -0
  71. package/dist/schema/dialog/types.d.mts +3 -0
  72. package/dist/schema/dialog/types.d.ts +3 -0
  73. package/dist/schema/dialog/types.js +19 -0
  74. package/dist/schema/dialog/types.js.map +1 -0
  75. package/dist/schema/dialog/types.mjs +1 -0
  76. package/dist/schema/dialog/types.mjs.map +1 -0
  77. package/dist/schema/dynamic/dynamic.d.mts +2 -1
  78. package/dist/schema/dynamic/dynamic.d.ts +2 -1
  79. package/dist/schema/dynamic/index.d.mts +2 -1
  80. package/dist/schema/dynamic/index.d.ts +2 -1
  81. package/dist/schema/group/group.d.mts +2 -1
  82. package/dist/schema/group/group.d.ts +2 -1
  83. package/dist/schema/group/index.d.mts +2 -1
  84. package/dist/schema/group/index.d.ts +2 -1
  85. package/dist/schema/hidden/hidden.d.mts +2 -1
  86. package/dist/schema/hidden/hidden.d.ts +2 -1
  87. package/dist/schema/hidden/index.d.mts +2 -1
  88. package/dist/schema/hidden/index.d.ts +2 -1
  89. package/dist/schema/image/image.d.mts +2 -1
  90. package/dist/schema/image/image.d.ts +2 -1
  91. package/dist/schema/image/index.d.mts +2 -1
  92. package/dist/schema/image/index.d.ts +2 -1
  93. package/dist/schema/multifield/index.d.mts +2 -1
  94. package/dist/schema/multifield/index.d.ts +2 -1
  95. package/dist/schema/multifield/multifield.d.mts +2 -1
  96. package/dist/schema/multifield/multifield.d.ts +2 -1
  97. package/dist/schema/object/index.d.mts +1 -3
  98. package/dist/schema/object/index.d.ts +1 -3
  99. package/dist/schema/object/object.d.mts +1 -3
  100. package/dist/schema/object/object.d.ts +1 -3
  101. package/dist/schema/optional/index.d.mts +2 -2
  102. package/dist/schema/optional/index.d.ts +2 -2
  103. package/dist/schema/optional/optional.d.mts +2 -25
  104. package/dist/schema/optional/optional.d.ts +2 -25
  105. package/dist/schema/pathbrowser/index.d.mts +2 -1
  106. package/dist/schema/pathbrowser/index.d.ts +2 -1
  107. package/dist/schema/pathbrowser/pathbrowser.d.mts +2 -1
  108. package/dist/schema/pathbrowser/pathbrowser.d.ts +2 -1
  109. package/dist/schema/rte/index.d.mts +2 -1
  110. package/dist/schema/rte/index.d.ts +2 -1
  111. package/dist/schema/rte/rte.d.mts +2 -1
  112. package/dist/schema/rte/rte.d.ts +2 -1
  113. package/dist/schema/select/index.d.mts +2 -1
  114. package/dist/schema/select/index.d.ts +2 -1
  115. package/dist/schema/select/index.js +2 -1
  116. package/dist/schema/select/index.js.map +1 -1
  117. package/dist/schema/select/index.mjs +2 -1
  118. package/dist/schema/select/index.mjs.map +1 -1
  119. package/dist/schema/select/select.d.mts +13 -6
  120. package/dist/schema/select/select.d.ts +13 -6
  121. package/dist/schema/select/select.js +2 -1
  122. package/dist/schema/select/select.js.map +1 -1
  123. package/dist/schema/select/select.mjs +2 -1
  124. package/dist/schema/select/select.mjs.map +1 -1
  125. package/dist/schema/text/index.d.mts +2 -1
  126. package/dist/schema/text/index.d.ts +2 -1
  127. package/dist/schema/text/text.d.mts +2 -1
  128. package/dist/schema/text/text.d.ts +2 -1
  129. package/dist/types/index.d.mts +2 -2
  130. package/dist/types/index.d.ts +2 -2
  131. package/dist/types/infer.d.mts +2 -1
  132. package/dist/types/infer.d.ts +2 -1
  133. package/dist/types/object.d.mts +2 -44
  134. package/dist/types/object.d.ts +2 -44
  135. package/dist/types/schema.d.mts +3 -44
  136. package/dist/types/schema.d.ts +3 -44
  137. package/dist/types/schema.js.map +1 -1
  138. package/dist/types/utils.d.mts +52 -2
  139. package/dist/types/utils.d.ts +52 -2
  140. package/dist/types/utils.js.map +1 -1
  141. package/dist/types-B8taWezd.d.mts +131 -0
  142. package/dist/types-rfg_xywc.d.ts +131 -0
  143. package/dist/utils/pathToArray.d.mts +7 -0
  144. package/dist/utils/pathToArray.d.ts +7 -0
  145. package/dist/utils/pathToArray.js +42 -0
  146. package/dist/utils/pathToArray.js.map +1 -0
  147. package/dist/utils/pathToArray.mjs +17 -0
  148. package/dist/utils/pathToArray.mjs.map +1 -0
  149. package/package.json +2 -2
@@ -0,0 +1,74 @@
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 __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
21
+
22
+ // src/schema/dialog/tabs.ts
23
+ var tabs_exports = {};
24
+ __export(tabs_exports, {
25
+ Tabs: () => Tabs
26
+ });
27
+ module.exports = __toCommonJS(tabs_exports);
28
+ var Tabs = class {
29
+ constructor() {
30
+ __publicField(this, "tabs", /* @__PURE__ */ new Map());
31
+ }
32
+ addTab(name, entries) {
33
+ this.tabs.set(name, entries);
34
+ }
35
+ parse(entries) {
36
+ const result = [];
37
+ const usedEntries = /* @__PURE__ */ new Set();
38
+ if (this.tabs.size === 0) {
39
+ return entries;
40
+ }
41
+ for (const [name, mask] of this.tabs) {
42
+ const children = [];
43
+ if (!mask) {
44
+ throw new Error(`Entry "${String(name)}" does not have an appropriate tab configuration.`);
45
+ }
46
+ for (const [key] of Object.entries(mask)) {
47
+ const field = entries.find((f) => f.id === key);
48
+ if (usedEntries.has(key)) {
49
+ throw new Error(`Entry "${String(name)}.${String(key)}" is already used in another tab.`);
50
+ }
51
+ if (!field) {
52
+ throw new Error(`Field with id "${key}" not found`);
53
+ }
54
+ children.push(entries.find((f) => f.id === key));
55
+ }
56
+ result.push({
57
+ type: "tab",
58
+ label: name,
59
+ id: `tab_${name.toLowerCase().replaceAll(" ", "")}`,
60
+ children
61
+ });
62
+ }
63
+ return [{
64
+ type: "tabs",
65
+ id: "tabs",
66
+ children: result
67
+ }];
68
+ }
69
+ };
70
+ // Annotate the CommonJS export names for ESM import in node:
71
+ 0 && (module.exports = {
72
+ Tabs
73
+ });
74
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/schema/dialog/tabs.ts"],"sourcesContent":["import { EntryMask } from '../../types';\nimport { Field } from './types';\n\nexport class Tabs<TEntries> {\n private tabs = new Map<string, EntryMask<TEntries>>();\n\n addTab(name: string, entries: EntryMask<TEntries>) {\n this.tabs.set(name, entries);\n }\n\n parse(entries: Field[]) {\n const result = []\n const usedEntries = new Set();\n\n if(this.tabs.size === 0) {\n return entries\n }\n\n for(const [name, mask] of this.tabs) {\n const children = []\n\n if(!mask) {\n throw new Error(`Entry \"${String(name)}\" does not have an appropriate tab configuration.`);\n }\n\n for(const [key,] of Object.entries(mask)) {\n const field = entries.find(f => f.id === key)\n\n if (usedEntries.has(key)) {\n throw new Error(`Entry \"${String(name)}.${String(key)}\" is already used in another tab.`);\n }\n\n if(!field) {\n throw new Error(`Field with id \"${key}\" not found`);\n }\n\n children.push(entries.find(f => f.id === key))\n }\n\n result.push({\n type: 'tab',\n label: name,\n id: `tab_${name.toLowerCase().replaceAll(' ', '')}`,\n children\n })\n }\n\n return [{\n type: 'tabs',\n id: 'tabs',\n children: result\n }]\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,IAAM,OAAN,MAAqB;AAAA,EAArB;AACL,wBAAQ,QAAO,oBAAI,IAAiC;AAAA;AAAA,EAEpD,OAAO,MAAc,SAA8B;AACjD,SAAK,KAAK,IAAI,MAAM,OAAO;AAAA,EAC7B;AAAA,EAEA,MAAM,SAAkB;AACtB,UAAM,SAAS,CAAC;AAChB,UAAM,cAAc,oBAAI,IAAI;AAE5B,QAAG,KAAK,KAAK,SAAS,GAAG;AACvB,aAAO;AAAA,IACT;AAEA,eAAU,CAAC,MAAM,IAAI,KAAK,KAAK,MAAM;AACnC,YAAM,WAAW,CAAC;AAElB,UAAG,CAAC,MAAM;AACR,cAAM,IAAI,MAAM,UAAU,OAAO,IAAI,CAAC,mDAAmD;AAAA,MAC3F;AAEA,iBAAU,CAAC,GAAI,KAAK,OAAO,QAAQ,IAAI,GAAG;AACxC,cAAM,QAAQ,QAAQ,KAAK,OAAK,EAAE,OAAO,GAAG;AAE5C,YAAI,YAAY,IAAI,GAAG,GAAG;AACxB,gBAAM,IAAI,MAAM,UAAU,OAAO,IAAI,CAAC,IAAI,OAAO,GAAG,CAAC,mCAAmC;AAAA,QAC1F;AAEA,YAAG,CAAC,OAAO;AACT,gBAAM,IAAI,MAAM,kBAAkB,GAAG,aAAa;AAAA,QACpD;AAEA,iBAAS,KAAK,QAAQ,KAAK,OAAK,EAAE,OAAO,GAAG,CAAC;AAAA,MAC/C;AAEA,aAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,OAAO;AAAA,QACP,IAAI,OAAO,KAAK,YAAY,EAAE,WAAW,KAAK,EAAE,CAAC;AAAA,QACjD;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,CAAC;AAAA,MACN,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -0,0 +1,51 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+
5
+ // src/schema/dialog/tabs.ts
6
+ var Tabs = class {
7
+ constructor() {
8
+ __publicField(this, "tabs", /* @__PURE__ */ new Map());
9
+ }
10
+ addTab(name, entries) {
11
+ this.tabs.set(name, entries);
12
+ }
13
+ parse(entries) {
14
+ const result = [];
15
+ const usedEntries = /* @__PURE__ */ new Set();
16
+ if (this.tabs.size === 0) {
17
+ return entries;
18
+ }
19
+ for (const [name, mask] of this.tabs) {
20
+ const children = [];
21
+ if (!mask) {
22
+ throw new Error(`Entry "${String(name)}" does not have an appropriate tab configuration.`);
23
+ }
24
+ for (const [key] of Object.entries(mask)) {
25
+ const field = entries.find((f) => f.id === key);
26
+ if (usedEntries.has(key)) {
27
+ throw new Error(`Entry "${String(name)}.${String(key)}" is already used in another tab.`);
28
+ }
29
+ if (!field) {
30
+ throw new Error(`Field with id "${key}" not found`);
31
+ }
32
+ children.push(entries.find((f) => f.id === key));
33
+ }
34
+ result.push({
35
+ type: "tab",
36
+ label: name,
37
+ id: `tab_${name.toLowerCase().replaceAll(" ", "")}`,
38
+ children
39
+ });
40
+ }
41
+ return [{
42
+ type: "tabs",
43
+ id: "tabs",
44
+ children: result
45
+ }];
46
+ }
47
+ };
48
+ export {
49
+ Tabs
50
+ };
51
+ //# sourceMappingURL=tabs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/schema/dialog/tabs.ts"],"sourcesContent":["import { EntryMask } from '../../types';\nimport { Field } from './types';\n\nexport class Tabs<TEntries> {\n private tabs = new Map<string, EntryMask<TEntries>>();\n\n addTab(name: string, entries: EntryMask<TEntries>) {\n this.tabs.set(name, entries);\n }\n\n parse(entries: Field[]) {\n const result = []\n const usedEntries = new Set();\n\n if(this.tabs.size === 0) {\n return entries\n }\n\n for(const [name, mask] of this.tabs) {\n const children = []\n\n if(!mask) {\n throw new Error(`Entry \"${String(name)}\" does not have an appropriate tab configuration.`);\n }\n\n for(const [key,] of Object.entries(mask)) {\n const field = entries.find(f => f.id === key)\n\n if (usedEntries.has(key)) {\n throw new Error(`Entry \"${String(name)}.${String(key)}\" is already used in another tab.`);\n }\n\n if(!field) {\n throw new Error(`Field with id \"${key}\" not found`);\n }\n\n children.push(entries.find(f => f.id === key))\n }\n\n result.push({\n type: 'tab',\n label: name,\n id: `tab_${name.toLowerCase().replaceAll(' ', '')}`,\n children\n })\n }\n\n return [{\n type: 'tabs',\n id: 'tabs',\n children: result\n }]\n }\n}"],"mappings":";;;;;AAGO,IAAM,OAAN,MAAqB;AAAA,EAArB;AACL,wBAAQ,QAAO,oBAAI,IAAiC;AAAA;AAAA,EAEpD,OAAO,MAAc,SAA8B;AACjD,SAAK,KAAK,IAAI,MAAM,OAAO;AAAA,EAC7B;AAAA,EAEA,MAAM,SAAkB;AACtB,UAAM,SAAS,CAAC;AAChB,UAAM,cAAc,oBAAI,IAAI;AAE5B,QAAG,KAAK,KAAK,SAAS,GAAG;AACvB,aAAO;AAAA,IACT;AAEA,eAAU,CAAC,MAAM,IAAI,KAAK,KAAK,MAAM;AACnC,YAAM,WAAW,CAAC;AAElB,UAAG,CAAC,MAAM;AACR,cAAM,IAAI,MAAM,UAAU,OAAO,IAAI,CAAC,mDAAmD;AAAA,MAC3F;AAEA,iBAAU,CAAC,GAAI,KAAK,OAAO,QAAQ,IAAI,GAAG;AACxC,cAAM,QAAQ,QAAQ,KAAK,OAAK,EAAE,OAAO,GAAG;AAE5C,YAAI,YAAY,IAAI,GAAG,GAAG;AACxB,gBAAM,IAAI,MAAM,UAAU,OAAO,IAAI,CAAC,IAAI,OAAO,GAAG,CAAC,mCAAmC;AAAA,QAC1F;AAEA,YAAG,CAAC,OAAO;AACT,gBAAM,IAAI,MAAM,kBAAkB,GAAG,aAAa;AAAA,QACpD;AAEA,iBAAS,KAAK,QAAQ,KAAK,OAAK,EAAE,OAAO,GAAG,CAAC;AAAA,MAC/C;AAEA,aAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,OAAO;AAAA,QACP,IAAI,OAAO,KAAK,YAAY,EAAE,WAAW,KAAK,EAAE,CAAC;AAAA,QACjD;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,CAAC;AAAA,MACN,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -0,0 +1,3 @@
1
+ export { b as ConditionFn, a as ConditionOperators, C as Conditions, c as ConditionsArgument, F as Field } from '../../types-B8taWezd.mjs';
2
+ import '../../types/utils.mjs';
3
+ import '../../types/webcomponent.mjs';
@@ -0,0 +1,3 @@
1
+ export { b as ConditionFn, a as ConditionOperators, C as Conditions, c as ConditionsArgument, F as Field } from '../../types-rfg_xywc.js';
2
+ import '../../types/utils.js';
3
+ import '../../types/webcomponent.js';
@@ -0,0 +1,19 @@
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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/schema/dialog/types.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
19
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/schema/dialog/types.ts"],"sourcesContent":["import { ObjectEntries, ObjectOutput } from '../../types/object';\nimport { AddType, DeepPartial, LeavesPath, NodesPath, PathValue, UnArray } from '../../types';\n\ntype Operators = 'eq' | 'neq' | 'and' | 'or' | 'exists'\n\nexport interface Conditions<T extends Operators = Operators> {\n operator: T;\n field?: string;\n value?: any;\n}\n\nexport interface ConditionOperators<TEntries extends ObjectEntries = any> {\n eq: <P extends NodesPath<UnArray<ObjectOutput<TEntries>>>>(\n field: P,\n value: PathValue<UnArray<ObjectOutput<TEntries>>, P>\n ) => Conditions<'eq'>;\n neq: <P extends NodesPath<UnArray<ObjectOutput<TEntries>>>>(\n field: P,\n value: PathValue<UnArray<ObjectOutput<TEntries>>, P>\n ) => Conditions<'neq'>;\n exists: <P extends NodesPath<UnArray<ObjectOutput<TEntries>>>>(\n field: P,\n ) => Conditions<'exists'>;\n and: (...args: Conditions[]) => Conditions<'and'>;\n or: (...args: Conditions[]) => Conditions<'or'>;\n}\n\nexport type ConditionFn<TEntries extends ObjectEntries> = (ops: ConditionOperators<TEntries>) => Conditions;\n\nexport type ConditionsArgument<TEntries extends ObjectEntries> = AddType<UnArray<DeepPartial<ObjectOutput<TEntries>>>, ConditionFn<TEntries>>\n\nexport type Field = { id: string, condition?: Conditions, children?: Field[] }"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,5 +1,6 @@
1
- import { BaseSchema } from '../../types/schema.mjs';
1
+ import { B as BaseSchema } from '../../types-B8taWezd.mjs';
2
2
  import '../../types/webcomponent.mjs';
3
+ import '../../types/utils.mjs';
3
4
 
4
5
  interface DynamicZoneSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
5
6
  /**
@@ -1,5 +1,6 @@
1
- import { BaseSchema } from '../../types/schema.js';
1
+ import { B as BaseSchema } from '../../types-rfg_xywc.js';
2
2
  import '../../types/webcomponent.js';
3
+ import '../../types/utils.js';
3
4
 
4
5
  interface DynamicZoneSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
5
6
  /**
@@ -1,3 +1,4 @@
1
1
  export { DynamicZoneSchema, dynamic } from './dynamic.mjs';
2
- import '../../types/schema.mjs';
2
+ import '../../types-B8taWezd.mjs';
3
3
  import '../../types/webcomponent.mjs';
4
+ import '../../types/utils.mjs';
@@ -1,3 +1,4 @@
1
1
  export { DynamicZoneSchema, dynamic } from './dynamic.js';
2
- import '../../types/schema.js';
2
+ import '../../types-rfg_xywc.js';
3
3
  import '../../types/webcomponent.js';
4
+ import '../../types/utils.js';
@@ -1,6 +1,7 @@
1
- import { BaseSchema, BaseFieldInput } from '../../types/schema.mjs';
1
+ import { B as BaseSchema, d as BaseFieldInput } from '../../types-B8taWezd.mjs';
2
2
  import { InferOutput } from '../../types/infer.mjs';
3
3
  import '../../types/webcomponent.mjs';
4
+ import '../../types/utils.mjs';
4
5
 
5
6
  interface GroupSchema<TChildren extends BaseSchema<unknown>> extends BaseSchema<{
6
7
  active: boolean;
@@ -1,6 +1,7 @@
1
- import { BaseSchema, BaseFieldInput } from '../../types/schema.js';
1
+ import { B as BaseSchema, d as BaseFieldInput } from '../../types-rfg_xywc.js';
2
2
  import { InferOutput } from '../../types/infer.js';
3
3
  import '../../types/webcomponent.js';
4
+ import '../../types/utils.js';
4
5
 
5
6
  interface GroupSchema<TChildren extends BaseSchema<unknown>> extends BaseSchema<{
6
7
  active: boolean;
@@ -1,4 +1,5 @@
1
1
  export { GroupSchema, group } from './group.mjs';
2
- import '../../types/schema.mjs';
2
+ import '../../types-B8taWezd.mjs';
3
3
  import '../../types/webcomponent.mjs';
4
+ import '../../types/utils.mjs';
4
5
  import '../../types/infer.mjs';
@@ -1,4 +1,5 @@
1
1
  export { GroupSchema, group } from './group.js';
2
- import '../../types/schema.js';
2
+ import '../../types-rfg_xywc.js';
3
3
  import '../../types/webcomponent.js';
4
+ import '../../types/utils.js';
4
5
  import '../../types/infer.js';
@@ -1,5 +1,6 @@
1
- import { BaseSchema } from '../../types/schema.mjs';
1
+ import { B as BaseSchema } from '../../types-B8taWezd.mjs';
2
2
  import { WebcomponentPropTypes } from '../../types/webcomponent.mjs';
3
+ import '../../types/utils.mjs';
3
4
 
4
5
  interface HiddenSchema extends BaseSchema<string> {
5
6
  /**
@@ -1,5 +1,6 @@
1
- import { BaseSchema } from '../../types/schema.js';
1
+ import { B as BaseSchema } from '../../types-rfg_xywc.js';
2
2
  import { WebcomponentPropTypes } from '../../types/webcomponent.js';
3
+ import '../../types/utils.js';
3
4
 
4
5
  interface HiddenSchema extends BaseSchema<string> {
5
6
  /**
@@ -1,3 +1,4 @@
1
1
  export { HiddenSchema, hidden } from './hidden.mjs';
2
- import '../../types/schema.mjs';
2
+ import '../../types-B8taWezd.mjs';
3
3
  import '../../types/webcomponent.mjs';
4
+ import '../../types/utils.mjs';
@@ -1,3 +1,4 @@
1
1
  export { HiddenSchema, hidden } from './hidden.js';
2
- import '../../types/schema.js';
2
+ import '../../types-rfg_xywc.js';
3
3
  import '../../types/webcomponent.js';
4
+ import '../../types/utils.js';
@@ -1,5 +1,6 @@
1
- import { BaseSchema, BaseFieldInput } from '../../types/schema.mjs';
1
+ import { B as BaseSchema, d as BaseFieldInput } from '../../types-B8taWezd.mjs';
2
2
  import '../../types/webcomponent.mjs';
3
+ import '../../types/utils.mjs';
3
4
 
4
5
  interface ImageSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
5
6
  /**
@@ -1,5 +1,6 @@
1
- import { BaseSchema, BaseFieldInput } from '../../types/schema.js';
1
+ import { B as BaseSchema, d as BaseFieldInput } from '../../types-rfg_xywc.js';
2
2
  import '../../types/webcomponent.js';
3
+ import '../../types/utils.js';
3
4
 
4
5
  interface ImageSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
5
6
  /**
@@ -1,3 +1,4 @@
1
1
  export { ImageSchema, image } from './image.mjs';
2
- import '../../types/schema.mjs';
2
+ import '../../types-B8taWezd.mjs';
3
3
  import '../../types/webcomponent.mjs';
4
+ import '../../types/utils.mjs';
@@ -1,3 +1,4 @@
1
1
  export { ImageSchema, image } from './image.js';
2
- import '../../types/schema.js';
2
+ import '../../types-rfg_xywc.js';
3
3
  import '../../types/webcomponent.js';
4
+ import '../../types/utils.js';
@@ -1,4 +1,5 @@
1
1
  export { MultifieldSchema, multifield } from './multifield.mjs';
2
- import '../../types/schema.mjs';
2
+ import '../../types-B8taWezd.mjs';
3
3
  import '../../types/webcomponent.mjs';
4
+ import '../../types/utils.mjs';
4
5
  import '../../types/infer.mjs';
@@ -1,4 +1,5 @@
1
1
  export { MultifieldSchema, multifield } from './multifield.js';
2
- import '../../types/schema.js';
2
+ import '../../types-rfg_xywc.js';
3
3
  import '../../types/webcomponent.js';
4
+ import '../../types/utils.js';
4
5
  import '../../types/infer.js';
@@ -1,6 +1,7 @@
1
- import { BaseSchema, BaseFieldInput } from '../../types/schema.mjs';
1
+ import { B as BaseSchema, d as BaseFieldInput } from '../../types-B8taWezd.mjs';
2
2
  import { InferOutput } from '../../types/infer.mjs';
3
3
  import '../../types/webcomponent.mjs';
4
+ import '../../types/utils.mjs';
4
5
 
5
6
  interface MultifieldSchema<TChildren extends BaseSchema<unknown>> extends BaseSchema<InferOutput<TChildren>[]> {
6
7
  readonly type: 'multifield';
@@ -1,6 +1,7 @@
1
- import { BaseSchema, BaseFieldInput } from '../../types/schema.js';
1
+ import { B as BaseSchema, d as BaseFieldInput } from '../../types-rfg_xywc.js';
2
2
  import { InferOutput } from '../../types/infer.js';
3
3
  import '../../types/webcomponent.js';
4
+ import '../../types/utils.js';
4
5
 
5
6
  interface MultifieldSchema<TChildren extends BaseSchema<unknown>> extends BaseSchema<InferOutput<TChildren>[]> {
6
7
  readonly type: 'multifield';
@@ -1,6 +1,4 @@
1
1
  export { ObjectSchema, object } from './object.mjs';
2
- import '../../types/schema.mjs';
2
+ import '../../types-B8taWezd.mjs';
3
3
  import '../../types/webcomponent.mjs';
4
- import '../../types/object.mjs';
5
- import '../optional/optional.mjs';
6
4
  import '../../types/utils.mjs';
@@ -1,6 +1,4 @@
1
1
  export { ObjectSchema, object } from './object.js';
2
- import '../../types/schema.js';
2
+ import '../../types-rfg_xywc.js';
3
3
  import '../../types/webcomponent.js';
4
- import '../../types/object.js';
5
- import '../optional/optional.js';
6
4
  import '../../types/utils.js';
@@ -1,7 +1,5 @@
1
- import { BaseSchema } from '../../types/schema.mjs';
2
- import { ObjectEntries, ObjectOutput } from '../../types/object.mjs';
1
+ import { f as ObjectEntries, g as ObjectOutput, B as BaseSchema } from '../../types-B8taWezd.mjs';
3
2
  import '../../types/webcomponent.mjs';
4
- import '../optional/optional.mjs';
5
3
  import '../../types/utils.mjs';
6
4
 
7
5
  interface ObjectSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput> {
@@ -1,7 +1,5 @@
1
- import { BaseSchema } from '../../types/schema.js';
2
- import { ObjectEntries, ObjectOutput } from '../../types/object.js';
1
+ import { f as ObjectEntries, g as ObjectOutput, B as BaseSchema } from '../../types-rfg_xywc.js';
3
2
  import '../../types/webcomponent.js';
4
- import '../optional/optional.js';
5
3
  import '../../types/utils.js';
6
4
 
7
5
  interface ObjectSchema<TEntries extends ObjectEntries, TOutput = ObjectOutput<TEntries>> extends BaseSchema<TOutput> {
@@ -1,3 +1,3 @@
1
- export { OptionalSchema, optional } from './optional.mjs';
2
- import '../../types/schema.mjs';
1
+ export { O as OptionalSchema, o as optional } from '../../types-B8taWezd.mjs';
3
2
  import '../../types/webcomponent.mjs';
3
+ import '../../types/utils.mjs';
@@ -1,3 +1,3 @@
1
- export { OptionalSchema, optional } from './optional.js';
2
- import '../../types/schema.js';
1
+ export { O as OptionalSchema, o as optional } from '../../types-rfg_xywc.js';
3
2
  import '../../types/webcomponent.js';
3
+ import '../../types/utils.js';
@@ -1,26 +1,3 @@
1
- import { BaseSchema, Output } from '../../types/schema.mjs';
1
+ export { O as OptionalSchema, o as optional } from '../../types-B8taWezd.mjs';
2
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 };
3
+ import '../../types/utils.mjs';
@@ -1,26 +1,3 @@
1
- import { BaseSchema, Output } from '../../types/schema.js';
1
+ export { O as OptionalSchema, o as optional } from '../../types-rfg_xywc.js';
2
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 };
3
+ import '../../types/utils.js';
@@ -1,3 +1,4 @@
1
1
  export { PathBrowserSchema, pathbrowser } from './pathbrowser.mjs';
2
- import '../../types/schema.mjs';
2
+ import '../../types-B8taWezd.mjs';
3
3
  import '../../types/webcomponent.mjs';
4
+ import '../../types/utils.mjs';
@@ -1,3 +1,4 @@
1
1
  export { PathBrowserSchema, pathbrowser } from './pathbrowser.js';
2
- import '../../types/schema.js';
2
+ import '../../types-rfg_xywc.js';
3
3
  import '../../types/webcomponent.js';
4
+ import '../../types/utils.js';
@@ -1,5 +1,6 @@
1
- import { BaseSchema, BaseFieldInput } from '../../types/schema.mjs';
1
+ import { B as BaseSchema, d as BaseFieldInput } from '../../types-B8taWezd.mjs';
2
2
  import '../../types/webcomponent.mjs';
3
+ import '../../types/utils.mjs';
3
4
 
4
5
  interface PathBrowserSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
5
6
  /**
@@ -1,5 +1,6 @@
1
- import { BaseSchema, BaseFieldInput } from '../../types/schema.js';
1
+ import { B as BaseSchema, d as BaseFieldInput } from '../../types-rfg_xywc.js';
2
2
  import '../../types/webcomponent.js';
3
+ import '../../types/utils.js';
3
4
 
4
5
  interface PathBrowserSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
5
6
  /**
@@ -1,3 +1,4 @@
1
1
  export { RichTextEditorSchema, rte } from './rte.mjs';
2
- import '../../types/schema.mjs';
2
+ import '../../types-B8taWezd.mjs';
3
3
  import '../../types/webcomponent.mjs';
4
+ import '../../types/utils.mjs';
@@ -1,3 +1,4 @@
1
1
  export { RichTextEditorSchema, rte } from './rte.js';
2
- import '../../types/schema.js';
2
+ import '../../types-rfg_xywc.js';
3
3
  import '../../types/webcomponent.js';
4
+ import '../../types/utils.js';
@@ -1,5 +1,6 @@
1
- import { BaseSchema, BaseFieldInput } from '../../types/schema.mjs';
1
+ import { B as BaseSchema, d as BaseFieldInput } from '../../types-B8taWezd.mjs';
2
2
  import '../../types/webcomponent.mjs';
3
+ import '../../types/utils.mjs';
3
4
 
4
5
  interface RichTextEditorSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
5
6
  /**
@@ -1,5 +1,6 @@
1
- import { BaseSchema, BaseFieldInput } from '../../types/schema.js';
1
+ import { B as BaseSchema, d as BaseFieldInput } from '../../types-rfg_xywc.js';
2
2
  import '../../types/webcomponent.js';
3
+ import '../../types/utils.js';
3
4
 
4
5
  interface RichTextEditorSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
5
6
  /**
@@ -1,3 +1,4 @@
1
1
  export { SelectSchema, select } from './select.mjs';
2
- import '../../types/schema.mjs';
2
+ import '../../types-B8taWezd.mjs';
3
3
  import '../../types/webcomponent.mjs';
4
+ import '../../types/utils.mjs';
@@ -1,3 +1,4 @@
1
1
  export { SelectSchema, select } from './select.js';
2
- import '../../types/schema.js';
2
+ import '../../types-rfg_xywc.js';
3
3
  import '../../types/webcomponent.js';
4
+ import '../../types/utils.js';
@@ -43,7 +43,8 @@ function select(input) {
43
43
  _primitive() {
44
44
  return multiple ? "json" : "string";
45
45
  },
46
- ...input
46
+ ...input,
47
+ multiple
47
48
  };
48
49
  }
49
50
  // Annotate the CommonJS export names for ESM import in node:
@@ -1 +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\ntype SelectOutputType<Multiple extends boolean> = Multiple extends true ? string[] : string;\n\nexport interface SelectSchema<Multiple extends boolean = false> extends BaseSchema<SelectOutputType<Multiple>> {\n /**\n * The schema type.\n */\n type: 'select';\n}\n\ninterface SelectInput extends BaseFieldInput {\n placeholder?: string;\n multiple?: boolean ;\n values: {\n value: string,\n label: string,\n }[]\n}\n\nexport function select<Multiple extends boolean = false>(input: SelectInput & { multiple?: Multiple }): SelectSchema<Multiple> {\n const { label, values, tooltip, placeholder, multiple = false as Multiple, required } = input;\n\n return {\n type: 'select',\n _parse() {\n return {\n type: 'select',\n label,\n multiple,\n values,\n tooltip,\n placeholder,\n required\n }\n },\n _primitive() {\n return multiple ? 'json' : 'string';\n },\n ...input,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACoBO,SAAS,OAAyC,OAAsE;AAC7H,QAAM,EAAE,OAAO,QAAQ,SAAS,aAAa,WAAW,OAAmB,SAAS,IAAI;AAExF,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,WAAW,SAAS;AAAA,IAC7B;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/schema/select/index.ts","../../../src/schema/select/select.ts"],"sourcesContent":["export * from './select'","import { BaseFieldInput, BaseSchema } from '../../types';\n\ntype ReadonlyObject<T> = {\n readonly [K in keyof T]: T[K];\n};\n\nexport interface SelectSchema<T, TMultiple extends boolean = false> extends BaseSchema<TMultiple extends true ? T[] : T> {\n /**\n * The schema type.\n */\n type: 'select';\n multiple: TMultiple\n}\n\ninterface SelectInput extends BaseFieldInput {\n placeholder?: string;\n multiple?: boolean;\n values: {\n value: string;\n label: string;\n }[];\n}\n\n\ntype ValuesType<T extends { values: readonly { value: string }[] }> = T['values'][number]['value'];\n\nexport function select<const T extends SelectInput, TMultiple extends boolean= T['multiple'] extends true ? true : false>(input: T): SelectSchema<ValuesType<ReadonlyObject<T>>, TMultiple>{\n const { label, values, tooltip, placeholder, multiple = false, required } = input;\n\n return {\n type: 'select',\n _parse() {\n return {\n type: 'select',\n label,\n multiple,\n values,\n tooltip,\n placeholder,\n required\n };\n },\n _primitive() {\n return multiple ? 'json' : 'string';\n },\n ...input,\n multiple: multiple as TMultiple,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC0BO,SAAS,OAA0G,OAAiE;AACzL,QAAM,EAAE,OAAO,QAAQ,SAAS,aAAa,WAAW,OAAO,SAAS,IAAI;AAE5E,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,WAAW,SAAS;AAAA,IAC7B;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
@@ -17,7 +17,8 @@ function select(input) {
17
17
  _primitive() {
18
18
  return multiple ? "json" : "string";
19
19
  },
20
- ...input
20
+ ...input,
21
+ multiple
21
22
  };
22
23
  }
23
24
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/schema/select/select.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\ntype SelectOutputType<Multiple extends boolean> = Multiple extends true ? string[] : string;\n\nexport interface SelectSchema<Multiple extends boolean = false> extends BaseSchema<SelectOutputType<Multiple>> {\n /**\n * The schema type.\n */\n type: 'select';\n}\n\ninterface SelectInput extends BaseFieldInput {\n placeholder?: string;\n multiple?: boolean ;\n values: {\n value: string,\n label: string,\n }[]\n}\n\nexport function select<Multiple extends boolean = false>(input: SelectInput & { multiple?: Multiple }): SelectSchema<Multiple> {\n const { label, values, tooltip, placeholder, multiple = false as Multiple, required } = input;\n\n return {\n type: 'select',\n _parse() {\n return {\n type: 'select',\n label,\n multiple,\n values,\n tooltip,\n placeholder,\n required\n }\n },\n _primitive() {\n return multiple ? 'json' : 'string';\n },\n ...input,\n }\n}\n"],"mappings":";AAoBO,SAAS,OAAyC,OAAsE;AAC7H,QAAM,EAAE,OAAO,QAAQ,SAAS,aAAa,WAAW,OAAmB,SAAS,IAAI;AAExF,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,WAAW,SAAS;AAAA,IAC7B;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/schema/select/select.ts"],"sourcesContent":["import { BaseFieldInput, BaseSchema } from '../../types';\n\ntype ReadonlyObject<T> = {\n readonly [K in keyof T]: T[K];\n};\n\nexport interface SelectSchema<T, TMultiple extends boolean = false> extends BaseSchema<TMultiple extends true ? T[] : T> {\n /**\n * The schema type.\n */\n type: 'select';\n multiple: TMultiple\n}\n\ninterface SelectInput extends BaseFieldInput {\n placeholder?: string;\n multiple?: boolean;\n values: {\n value: string;\n label: string;\n }[];\n}\n\n\ntype ValuesType<T extends { values: readonly { value: string }[] }> = T['values'][number]['value'];\n\nexport function select<const T extends SelectInput, TMultiple extends boolean= T['multiple'] extends true ? true : false>(input: T): SelectSchema<ValuesType<ReadonlyObject<T>>, TMultiple>{\n const { label, values, tooltip, placeholder, multiple = false, required } = input;\n\n return {\n type: 'select',\n _parse() {\n return {\n type: 'select',\n label,\n multiple,\n values,\n tooltip,\n placeholder,\n required\n };\n },\n _primitive() {\n return multiple ? 'json' : 'string';\n },\n ...input,\n multiple: multiple as TMultiple,\n };\n}\n"],"mappings":";AA0BO,SAAS,OAA0G,OAAiE;AACzL,QAAM,EAAE,OAAO,QAAQ,SAAS,aAAa,WAAW,OAAO,SAAS,IAAI;AAE5E,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,WAAW,SAAS;AAAA,IAC7B;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":[]}