@satoshibits/react-json-schema-builder 1.1.4 → 1.1.5

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 (234) hide show
  1. package/dist/index.cjs.js +1 -1
  2. package/dist/index.cjs10.js +1 -1
  3. package/dist/index.cjs10.js.map +1 -1
  4. package/dist/index.cjs11.js +1 -1
  5. package/dist/index.cjs11.js.map +1 -1
  6. package/dist/index.cjs12.js +1 -1
  7. package/dist/index.cjs12.js.map +1 -1
  8. package/dist/index.cjs13.js +1 -1
  9. package/dist/index.cjs13.js.map +1 -1
  10. package/dist/index.cjs14.js +1 -1
  11. package/dist/index.cjs14.js.map +1 -1
  12. package/dist/index.cjs15.js +6 -1
  13. package/dist/index.cjs15.js.map +1 -1
  14. package/dist/index.cjs16.js +1 -1
  15. package/dist/index.cjs16.js.map +1 -1
  16. package/dist/index.cjs17.js +1 -1
  17. package/dist/index.cjs17.js.map +1 -1
  18. package/dist/index.cjs18.js +1 -1
  19. package/dist/index.cjs18.js.map +1 -1
  20. package/dist/index.cjs19.js +1 -1
  21. package/dist/index.cjs19.js.map +1 -1
  22. package/dist/index.cjs2.js +1 -1
  23. package/dist/index.cjs2.js.map +1 -1
  24. package/dist/index.cjs20.js +1 -1
  25. package/dist/index.cjs20.js.map +1 -1
  26. package/dist/index.cjs21.js +1 -1
  27. package/dist/index.cjs21.js.map +1 -1
  28. package/dist/index.cjs22.js +1 -1
  29. package/dist/index.cjs22.js.map +1 -1
  30. package/dist/index.cjs23.js +1 -6
  31. package/dist/index.cjs23.js.map +1 -1
  32. package/dist/index.cjs24.js +1 -6
  33. package/dist/index.cjs24.js.map +1 -1
  34. package/dist/index.cjs25.js +1 -6
  35. package/dist/index.cjs25.js.map +1 -1
  36. package/dist/index.cjs26.js +1 -1
  37. package/dist/index.cjs26.js.map +1 -1
  38. package/dist/index.cjs27.js +1 -1
  39. package/dist/index.cjs27.js.map +1 -1
  40. package/dist/index.cjs28.js +6 -1
  41. package/dist/index.cjs28.js.map +1 -1
  42. package/dist/index.cjs29.js +6 -1
  43. package/dist/index.cjs29.js.map +1 -1
  44. package/dist/index.cjs3.js +1 -1
  45. package/dist/index.cjs3.js.map +1 -1
  46. package/dist/index.cjs30.js +1 -1
  47. package/dist/index.cjs30.js.map +1 -1
  48. package/dist/index.cjs31.js +1 -1
  49. package/dist/index.cjs34.js +1 -1
  50. package/dist/index.cjs36.js +1 -1
  51. package/dist/index.cjs37.js +1 -1
  52. package/dist/index.cjs37.js.map +1 -1
  53. package/dist/index.cjs38.js +1 -6
  54. package/dist/index.cjs38.js.map +1 -1
  55. package/dist/index.cjs39.js +1 -6
  56. package/dist/index.cjs39.js.map +1 -1
  57. package/dist/index.cjs4.js +1 -1
  58. package/dist/index.cjs4.js.map +1 -1
  59. package/dist/index.cjs40.js +1 -6
  60. package/dist/index.cjs40.js.map +1 -1
  61. package/dist/index.cjs41.js +1 -1
  62. package/dist/index.cjs41.js.map +1 -1
  63. package/dist/index.cjs42.js +1 -1
  64. package/dist/index.cjs42.js.map +1 -1
  65. package/dist/index.cjs43.js +1 -1
  66. package/dist/index.cjs43.js.map +1 -1
  67. package/dist/index.cjs44.js +6 -1
  68. package/dist/index.cjs44.js.map +1 -1
  69. package/dist/index.cjs45.js +6 -1
  70. package/dist/index.cjs45.js.map +1 -1
  71. package/dist/index.cjs46.js +6 -1
  72. package/dist/index.cjs46.js.map +1 -1
  73. package/dist/index.cjs47.js +1 -1
  74. package/dist/index.cjs5.js +1 -1
  75. package/dist/index.cjs5.js.map +1 -1
  76. package/dist/index.cjs55.js +1 -5
  77. package/dist/index.cjs55.js.map +1 -1
  78. package/dist/index.cjs56.js +1 -1
  79. package/dist/index.cjs56.js.map +1 -1
  80. package/dist/index.cjs58.js +1 -1
  81. package/dist/index.cjs58.js.map +1 -1
  82. package/dist/index.cjs59.js +1 -1
  83. package/dist/index.cjs59.js.map +1 -1
  84. package/dist/index.cjs6.js +1 -1
  85. package/dist/index.cjs6.js.map +1 -1
  86. package/dist/index.cjs60.js +1 -1
  87. package/dist/index.cjs60.js.map +1 -1
  88. package/dist/index.cjs61.js +1 -1
  89. package/dist/index.cjs61.js.map +1 -1
  90. package/dist/index.cjs62.js +5 -1
  91. package/dist/index.cjs62.js.map +1 -1
  92. package/dist/index.cjs63.js +1 -1
  93. package/dist/index.cjs63.js.map +1 -1
  94. package/dist/index.cjs65.js +1 -1
  95. package/dist/index.cjs67.js +1 -1
  96. package/dist/index.cjs69.js +1 -1
  97. package/dist/index.cjs7.js +1 -1
  98. package/dist/index.cjs7.js.map +1 -1
  99. package/dist/index.cjs71.js +1 -1
  100. package/dist/index.cjs72.js +1 -1
  101. package/dist/index.cjs75.js +1 -1
  102. package/dist/index.cjs78.js +1 -1
  103. package/dist/index.cjs78.js.map +1 -1
  104. package/dist/index.cjs79.js +1 -1
  105. package/dist/index.cjs79.js.map +1 -1
  106. package/dist/index.cjs8.js +1 -1
  107. package/dist/index.cjs8.js.map +1 -1
  108. package/dist/index.cjs80.js +1 -1
  109. package/dist/index.cjs80.js.map +1 -1
  110. package/dist/index.cjs81.js +1 -1
  111. package/dist/index.cjs81.js.map +1 -1
  112. package/dist/index.cjs82.js +1 -1
  113. package/dist/index.cjs82.js.map +1 -1
  114. package/dist/index.cjs9.js +1 -1
  115. package/dist/index.cjs9.js.map +1 -1
  116. package/dist/index.d.mts +5 -4
  117. package/dist/index.d.mts.map +1 -1
  118. package/dist/index.es.js +18 -28
  119. package/dist/index.es10.js +22 -22
  120. package/dist/index.es10.js.map +1 -1
  121. package/dist/index.es11.js +14 -42
  122. package/dist/index.es11.js.map +1 -1
  123. package/dist/index.es12.js +5 -65
  124. package/dist/index.es12.js.map +1 -1
  125. package/dist/index.es13.js +43 -24
  126. package/dist/index.es13.js.map +1 -1
  127. package/dist/index.es14.js +21 -126
  128. package/dist/index.es14.js.map +1 -1
  129. package/dist/index.es15.js +13 -20
  130. package/dist/index.es15.js.map +1 -1
  131. package/dist/index.es16.js +129 -130
  132. package/dist/index.es16.js.map +1 -1
  133. package/dist/index.es17.js +3 -137
  134. package/dist/index.es17.js.map +1 -1
  135. package/dist/index.es18.js +20 -61
  136. package/dist/index.es18.js.map +1 -1
  137. package/dist/index.es19.js +65 -10
  138. package/dist/index.es19.js.map +1 -1
  139. package/dist/index.es2.js +156 -115
  140. package/dist/index.es2.js.map +1 -1
  141. package/dist/index.es20.js +134 -22
  142. package/dist/index.es20.js.map +1 -1
  143. package/dist/index.es21.js +131 -421
  144. package/dist/index.es21.js.map +1 -1
  145. package/dist/index.es22.js +63 -5
  146. package/dist/index.es22.js.map +1 -1
  147. package/dist/index.es23.js +11 -13
  148. package/dist/index.es23.js.map +1 -1
  149. package/dist/index.es24.js +23 -16
  150. package/dist/index.es24.js.map +1 -1
  151. package/dist/index.es25.js +428 -13
  152. package/dist/index.es25.js.map +1 -1
  153. package/dist/index.es26.js +7 -13
  154. package/dist/index.es26.js.map +1 -1
  155. package/dist/index.es27.js +9 -3
  156. package/dist/index.es27.js.map +1 -1
  157. package/dist/index.es28.js +13 -19
  158. package/dist/index.es28.js.map +1 -1
  159. package/dist/index.es29.js +19 -23
  160. package/dist/index.es29.js.map +1 -1
  161. package/dist/index.es3.js +129 -340
  162. package/dist/index.es3.js.map +1 -1
  163. package/dist/index.es30.js +4 -7
  164. package/dist/index.es30.js.map +1 -1
  165. package/dist/index.es31.js +1 -1
  166. package/dist/index.es34.js +1 -1
  167. package/dist/index.es36.js +6 -6
  168. package/dist/index.es37.js +97 -815
  169. package/dist/index.es37.js.map +1 -1
  170. package/dist/index.es38.js +56 -10
  171. package/dist/index.es38.js.map +1 -1
  172. package/dist/index.es39.js +24 -10
  173. package/dist/index.es39.js.map +1 -1
  174. package/dist/index.es4.js +92 -70
  175. package/dist/index.es4.js.map +1 -1
  176. package/dist/index.es40.js +45 -10
  177. package/dist/index.es40.js.map +1 -1
  178. package/dist/index.es41.js +71 -99
  179. package/dist/index.es41.js.map +1 -1
  180. package/dist/index.es42.js +56 -52
  181. package/dist/index.es42.js.map +1 -1
  182. package/dist/index.es43.js +827 -19
  183. package/dist/index.es43.js.map +1 -1
  184. package/dist/index.es44.js +10 -45
  185. package/dist/index.es44.js.map +1 -1
  186. package/dist/index.es45.js +10 -86
  187. package/dist/index.es45.js.map +1 -1
  188. package/dist/index.es46.js +10 -60
  189. package/dist/index.es46.js.map +1 -1
  190. package/dist/index.es47.js +3 -3
  191. package/dist/index.es5.js +225 -79
  192. package/dist/index.es5.js.map +1 -1
  193. package/dist/index.es55.js +30 -252
  194. package/dist/index.es55.js.map +1 -1
  195. package/dist/index.es56.js +26 -21
  196. package/dist/index.es56.js.map +1 -1
  197. package/dist/index.es58.js +62 -23
  198. package/dist/index.es58.js.map +1 -1
  199. package/dist/index.es59.js +27 -63
  200. package/dist/index.es59.js.map +1 -1
  201. package/dist/index.es6.js +117 -57
  202. package/dist/index.es6.js.map +1 -1
  203. package/dist/index.es60.js +5 -29
  204. package/dist/index.es60.js.map +1 -1
  205. package/dist/index.es61.js +24 -5
  206. package/dist/index.es61.js.map +1 -1
  207. package/dist/index.es62.js +254 -24
  208. package/dist/index.es62.js.map +1 -1
  209. package/dist/index.es63.js +21 -32
  210. package/dist/index.es63.js.map +1 -1
  211. package/dist/index.es65.js +2 -2
  212. package/dist/index.es67.js +3 -3
  213. package/dist/index.es69.js +2 -2
  214. package/dist/index.es7.js +345 -48
  215. package/dist/index.es7.js.map +1 -1
  216. package/dist/index.es71.js +7 -7
  217. package/dist/index.es72.js +1 -1
  218. package/dist/index.es75.js +1 -1
  219. package/dist/index.es78.js +67 -11
  220. package/dist/index.es78.js.map +1 -1
  221. package/dist/index.es79.js +10 -203
  222. package/dist/index.es79.js.map +1 -1
  223. package/dist/index.es8.js +73 -163
  224. package/dist/index.es8.js.map +1 -1
  225. package/dist/index.es80.js +203 -20
  226. package/dist/index.es80.js.map +1 -1
  227. package/dist/index.es81.js +21 -392
  228. package/dist/index.es81.js.map +1 -1
  229. package/dist/index.es82.js +386 -61
  230. package/dist/index.es82.js.map +1 -1
  231. package/dist/index.es9.js +18 -3
  232. package/dist/index.es9.js.map +1 -1
  233. package/dist/packages/builder/add-dialog.d.ts +5 -5
  234. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs46.js","sources":["../src/components/multi-input.tsx"],"sourcesContent":["import { Label } from \"@/components/ui/label\";\nimport { Input } from \"@/components/ui/input\";\nimport { X } from \"lucide-react\";\nimport { InputErrorWrapper } from \"@/components/input-error\";\nimport { useState } from \"react\";\n\ninterface MultiInputProps {\n renderValues?: () => React.ReactNode;\n values: string[];\n onAddValue: (newVal: string) => void;\n onRemoveValue: (index: number) => void;\n maxValues?: number;\n}\n\nconst MultiInput = ({\n values,\n onAddValue,\n renderValues,\n maxValues,\n onRemoveValue,\n ...props\n}: MultiInputProps &\n Omit<React.ComponentProps<\"input\">, \"value\" | \"onChange\">) => {\n const [primaryError, setPrimaryError] = useState<string>();\n const [errorDescription, setErrorDescription] = useState<string>();\n\n return (\n <InputErrorWrapper\n errorCode={primaryError}\n errorDescription={errorDescription}\n showError={!!primaryError}\n className=\"space-y-2\"\n >\n <Label>Add Input</Label>\n <Input\n {...props}\n onKeyDown={(e) => {\n // Prevent form submission on Enter key press\n if (e.key === \"Enter\") {\n e.preventDefault();\n //prevent bubbling up\n e.stopPropagation();\n }\n }}\n onKeyUp={(e) => {\n // Add value on Enter key press\n if (e.key === \"Enter\") {\n if (maxValues && values.length >= maxValues) {\n setPrimaryError(\"Maximum reached\");\n setErrorDescription(\n \"You have reached the maximum number of values\",\n );\n return;\n }\n onAddValue?.(e.currentTarget.value);\n e.currentTarget.value = \"\";\n }\n }}\n />\n {renderValues ? (\n renderValues()\n ) : (\n <div className=\"space-x-2 flex\">\n {values.map((value, i) => (\n <div\n key={`${i}-${value}`}\n className=\"flex items-center text-xs border rounded p-1 w-max mt-2\"\n >\n <span>{value}</span>\n <button onClick={() => onRemoveValue(i)}>\n <X size={16} />\n </button>\n </div>\n ))}\n </div>\n )}\n </InputErrorWrapper>\n );\n};\n\nexport default MultiInput;\n"],"names":["MultiInput","values","onAddValue","renderValues","maxValues","onRemoveValue","props","primaryError","setPrimaryError","useState","errorDescription","setErrorDescription","jsxs","InputErrorWrapper","jsx","Label","Input","value","X"],"mappings":"4RAcMA,EAAa,CAAC,CAClB,OAAAC,EACA,WAAAC,EACA,aAAAC,EACA,UAAAC,EACA,cAAAC,EACA,GAAGC,CACL,IACgE,CAC9D,KAAM,CAACC,EAAcC,CAAe,EAAIC,WAAiB,EACnD,CAACC,EAAkBC,CAAmB,EAAIF,WAAiB,EAG/D,OAAAG,EAAA,KAACC,EAAA,kBAAA,CACC,UAAWN,EACX,iBAAAG,EACA,UAAW,CAAC,CAACH,EACb,UAAU,YAEV,SAAA,CAAAO,EAAAA,IAACC,SAAM,SAAS,WAAA,CAAA,EAChBD,EAAA,IAACE,EAAA,MAAA,CACE,GAAGV,EACJ,UAAY,GAAM,CAEZ,EAAE,MAAQ,UACZ,EAAE,eAAe,EAEjB,EAAE,gBAAgB,EAEtB,EACA,QAAU,GAAM,CAEV,GAAA,EAAE,MAAQ,QAAS,CACjB,GAAAF,GAAaH,EAAO,QAAUG,EAAW,CAC3CI,EAAgB,iBAAiB,EACjCG,EACE,+CACF,EACA,MAAA,CAEWT,IAAA,EAAE,cAAc,KAAK,EAClC,EAAE,cAAc,MAAQ,EAAA,CAC1B,CACF,CACF,EACCC,EACCA,EAAa,EAEZW,MAAA,MAAA,CAAI,UAAU,iBACZ,SAAOb,EAAA,IAAI,CAACgB,EAAO,IAClBL,EAAA,KAAC,MAAA,CAEC,UAAU,0DAEV,SAAA,CAAAE,EAAAA,IAAC,QAAM,SAAMG,CAAA,CAAA,EACbH,EAAAA,IAAC,SAAO,CAAA,QAAS,IAAMT,EAAc,CAAC,EACpC,SAACS,EAAA,IAAAI,EAAA,QAAA,CAAE,KAAM,EAAI,CAAA,CACf,CAAA,CAAA,CAAA,EANK,GAAG,CAAC,IAAID,CAAK,EAAA,CAQrB,CACH,CAAA,CAAA,CAAA,CAEJ,CAEJ"}
1
+ {"version":3,"file":"index.cjs46.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-up.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m18 15-6-6-6 6\", key: \"153udz\" }]];\nconst ChevronUp = createLucideIcon(\"ChevronUp\", __iconNode);\n\nexport { __iconNode, ChevronUp as default };\n//# sourceMappingURL=chevron-up.js.map\n"],"names":["__iconNode","ChevronUp","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CAAC,CAAC,OAAQ,CAAE,EAAG,iBAAkB,IAAK,SAAU,CAAC,EAC9DC,EAAYC,EAAAA,QAAiB,YAAaF,CAAU","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),h=require("./index.cjs59.js"),R=require("./index.cjs58.js"),l=require("./index.cjs55.js"),E=require("./index.cjs57.js"),j=require("./index.cjs34.js"),i=require("react/jsx-runtime");function w(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,t.get?t:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const n=w(T);var x="AlertDialog",[M,q]=h.createContextScope(x,[l.createDialogScope]),s=l.createDialogScope(),u=e=>{const{__scopeAlertDialog:r,...o}=e,t=s(r);return i.jsx(l.Root,{...t,...o,modal:!0})};u.displayName=x;var I="AlertDialogTrigger",C=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,a=s(o);return i.jsx(l.Trigger,{...a,...t,ref:r})});C.displayName=I;var $="AlertDialogPortal",A=e=>{const{__scopeAlertDialog:r,...o}=e,t=s(r);return i.jsx(l.Portal,{...t,...o})};A.displayName=$;var L="AlertDialogOverlay",D=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,a=s(o);return i.jsx(l.Overlay,{...a,...t,ref:r})});D.displayName=L;var c="AlertDialogContent",[F,G]=M(c),v=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,children:t,...a}=e,d=s(o),g=n.useRef(null),b=R.useComposedRefs(r,g),N=n.useRef(null);return i.jsx(l.WarningProvider,{contentName:c,titleName:S,docsSlug:"alert-dialog",children:i.jsx(F,{scope:o,cancelRef:N,children:i.jsxs(l.Content,{role:"alertdialog",...d,...a,ref:b,onOpenAutoFocus:E.composeEventHandlers(a.onOpenAutoFocus,p=>{p.preventDefault(),N.current?.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[i.jsx(j.Slottable,{children:t}),i.jsx(Y,{contentRef:g})]})})})});v.displayName=c;var S="AlertDialogTitle",f=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,a=s(o);return i.jsx(l.Title,{...a,...t,ref:r})});f.displayName=S;var O="AlertDialogDescription",m=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,a=s(o);return i.jsx(l.Description,{...a,...t,ref:r})});m.displayName=O;var W="AlertDialogAction",y=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,a=s(o);return i.jsx(l.Close,{...a,...t,ref:r})});y.displayName=W;var P="AlertDialogCancel",_=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,{cancelRef:a}=G(P,o),d=s(o),g=R.useComposedRefs(r,a);return i.jsx(l.Close,{...d,...t,ref:g})});_.displayName=P;var Y=({contentRef:e})=>{const r=`\`${c}\` requires a description for the component to be accessible for screen reader users.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),h=require("./index.cjs58.js"),R=require("./index.cjs56.js"),l=require("./index.cjs62.js"),E=require("./index.cjs57.js"),j=require("./index.cjs34.js"),i=require("react/jsx-runtime");function w(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,t.get?t:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const n=w(T);var x="AlertDialog",[M,q]=h.createContextScope(x,[l.createDialogScope]),s=l.createDialogScope(),u=e=>{const{__scopeAlertDialog:r,...o}=e,t=s(r);return i.jsx(l.Root,{...t,...o,modal:!0})};u.displayName=x;var I="AlertDialogTrigger",C=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,a=s(o);return i.jsx(l.Trigger,{...a,...t,ref:r})});C.displayName=I;var $="AlertDialogPortal",A=e=>{const{__scopeAlertDialog:r,...o}=e,t=s(r);return i.jsx(l.Portal,{...t,...o})};A.displayName=$;var L="AlertDialogOverlay",D=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,a=s(o);return i.jsx(l.Overlay,{...a,...t,ref:r})});D.displayName=L;var c="AlertDialogContent",[F,G]=M(c),v=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,children:t,...a}=e,d=s(o),g=n.useRef(null),b=R.useComposedRefs(r,g),N=n.useRef(null);return i.jsx(l.WarningProvider,{contentName:c,titleName:S,docsSlug:"alert-dialog",children:i.jsx(F,{scope:o,cancelRef:N,children:i.jsxs(l.Content,{role:"alertdialog",...d,...a,ref:b,onOpenAutoFocus:E.composeEventHandlers(a.onOpenAutoFocus,p=>{p.preventDefault(),N.current?.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[i.jsx(j.Slottable,{children:t}),i.jsx(Y,{contentRef:g})]})})})});v.displayName=c;var S="AlertDialogTitle",f=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,a=s(o);return i.jsx(l.Title,{...a,...t,ref:r})});f.displayName=S;var O="AlertDialogDescription",m=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,a=s(o);return i.jsx(l.Description,{...a,...t,ref:r})});m.displayName=O;var W="AlertDialogAction",y=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,a=s(o);return i.jsx(l.Close,{...a,...t,ref:r})});y.displayName=W;var P="AlertDialogCancel",_=n.forwardRef((e,r)=>{const{__scopeAlertDialog:o,...t}=e,{cancelRef:a}=G(P,o),d=s(o),g=R.useComposedRefs(r,a);return i.jsx(l.Close,{...d,...t,ref:g})});_.displayName=P;var Y=({contentRef:e})=>{const r=`\`${c}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${c}\` by passing a \`${O}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("./index.cjs28.js"),l=require("./index.cjs29.js"),u=require("./index.cjs15.js"),m=require("./index.cjs22.js"),x=require("./index.cjs4.js"),h=require("./index.cjs11.js"),y=require("./index.cjs13.js"),p=require("./index.cjs30.js"),j=({constraintName:n,value:s,onConstraintChange:i,disabled:c,error:t,onRemoveConstraint:a})=>{const{getConstraintDefinition:o}=x.useConstraints(),r=o(n);return r?e.jsx(l.InputErrorWrapper,{errorCode:t?.code,errorDescription:t?.message,showError:!!t,children:e.jsxs("div",{children:[e.jsx(u.Label,{className:"mb-2",htmlFor:r.name,children:r.name}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(b.Input,{id:r.name,type:"number",value:s,onChange:d=>i(Number(d.target.value)),disabled:c,min:0,className:m.cn({"border-destructive":t})}),e.jsx(h.Button,{type:"button",variant:"ghost",size:"icon",onClick:()=>a(),children:e.jsx(p.default,{className:"size-4"})})]}),r.description&&e.jsx("div",{className:"mt-2 text-sm text-gray-500",children:r.description})]})}):null},g=({constraintName:n,value:s,onConstraintChange:i,disabled:c,error:t,onRemoveConstraint:a})=>{const{getConstraintDefinition:o}=x.useConstraints(),r=o(n);return r?e.jsx(l.InputErrorWrapper,{errorCode:t?.code,errorDescription:t?.message,showError:!!t,children:e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx(u.Label,{htmlFor:r.name,children:r.name}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y.Switch,{id:r.name,checked:s,onCheckedChange:d=>i(d),disabled:c,className:m.cn({"border-destructive":t})}),e.jsx(h.Button,{type:"button",variant:"ghost",size:"icon",onClick:()=>a(),children:e.jsx(p.default,{className:"size-4"})})]})]}),r.description&&e.jsx("div",{className:"mt-2 text-sm text-gray-500",children:r.description})]})}):null},f=j,v=j,C=g;exports.ArrayMaxItemsRenderer=v;exports.ArrayMinItemsRenderer=f;exports.ArrayUniqueItemsRenderer=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),b=require("./index.cjs9.js"),d=require("./index.cjs10.js"),h=require("./index.cjs11.js"),g=require("./index.cjs12.js"),p=require("./index.cjs8.js"),x=require("./index.cjs13.js"),u=require("./index.cjs16.js"),v=require("./index.cjs15.js"),f=({constraintName:r,value:i,onConstraintChange:s,disabled:a,error:n,onRemoveConstraint:l})=>{const{getConstraintDefinition:o}=p.useConstraints(),t=o(r);return t?e.jsx(d.InputErrorWrapper,{errorCode:n?.code,errorDescription:n?.message,showError:!!n,children:e.jsxs("div",{children:[e.jsx(h.Label,{className:"mb-2",htmlFor:t.name,children:t.name}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(b.Input,{id:t.name,type:"number",value:i,onChange:c=>s(Number(c.target.value)),disabled:a,min:0,className:g.cn({"border-destructive":n})}),e.jsx(x.Button,{type:"button",variant:"ghost",size:"icon",onClick:()=>l(),children:e.jsx(v.default,{className:"size-4"})})]}),t.description&&e.jsx("div",{className:"mt-2 text-sm text-gray-500",children:t.description})]})}):null},S=({constraintName:r,value:i,onConstraintChange:s,disabled:a,error:n,onRemoveConstraint:l})=>{const{getConstraintDefinition:o}=p.useConstraints(),t=o(r);return t?e.jsx(d.InputErrorWrapper,{errorCode:n?.code,errorDescription:n?.message,showError:!!n,children:e.jsxs("div",{children:[e.jsx(h.Label,{className:"mb-2",htmlFor:t.name,children:t.name}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(b.Input,{id:t.name,type:"text",value:i,onChange:c=>s(c.target.value),disabled:a,placeholder:"Regular expression pattern",className:g.cn({"border-destructive":n})}),e.jsx(x.Button,{type:"button",variant:"ghost",size:"icon",onClick:()=>l(),children:e.jsx(v.default,{className:"size-4"})})]}),t.description&&e.jsx("div",{className:"mt-2 text-sm text-gray-500",children:t.description})]})}):null},L=({constraintName:r,value:i,onConstraintChange:s,disabled:a,error:n,onRemoveConstraint:l})=>{const{getConstraintDefinition:o}=p.useConstraints(),t=o(r),c=[{value:"email",label:"Email"},{value:"uri",label:"URI"},{value:"url",label:"URL"},{value:"date",label:"Date"},{value:"date-time",label:"Date-Time"},{value:"uuid",label:"UUID"},{value:"hostname",label:"Hostname"},{value:"ipv4",label:"IPv4"},{value:"ipv6",label:"IPv6"},{value:"phone",label:"Phone"}];return t?e.jsx(d.InputErrorWrapper,{errorCode:n?.code,errorDescription:n?.message,showError:!!n,children:e.jsxs("div",{children:[e.jsx(h.Label,{className:"mb-2",htmlFor:t.name,children:t.name}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(u.Select,{value:i,onValueChange:m=>s(m),disabled:a,children:[e.jsx(u.SelectTrigger,{id:t.name,className:g.cn("flex-1",{"border-destructive":n}),children:e.jsx(u.SelectValue,{placeholder:"Select format"})}),e.jsx(u.SelectContent,{children:c.map(m=>e.jsx(u.SelectItem,{value:m.value,children:m.label},m.value))})]}),e.jsx(x.Button,{type:"button",variant:"ghost",size:"icon",onClick:()=>l(),children:e.jsx(v.default,{className:"size-4"})})]}),t.description&&e.jsx("div",{className:"mt-2 text-sm text-gray-500",children:t.description})]})}):null},j=f,C=f,R=S,N=L,y={id:"string-constraints",hooks:{registerConstraints(){return[{name:"minLength",label:"Min Length",appliesTo:["string"],schema:{type:"integer",title:"Minimum Length Constraint",description:"The minimum length of the string",examples:[1,5,10],minimum:0},description:"Constrains a string to a minimum length",defaultValue:0},{name:"maxLength",label:"Max Length",appliesTo:["string"],schema:{type:"integer",title:"Maximum Length Constraint",description:"The maximum length of the string",examples:[50,100,255],minimum:0},description:"Constrains a string to a maximum length",defaultValue:100},{name:"pattern",label:"Pattern",appliesTo:["string"],schema:{type:"string",title:"Pattern Constraint",description:"Regular expression pattern the string must match",examples:["^[a-zA-Z0-9]+$","\\d{3}-\\d{2}-\\d{4}"]},description:"Regular expression that the string must match",defaultValue:""},{name:"format",label:"Format",appliesTo:["string"],schema:{type:"string",title:"Format Constraint",description:"Predefined format the string must follow",enum:["email","uri","url","date","date-time","uuid","hostname","ipv4","ipv6","phone"]},description:"Predefined format validation for the string",defaultValue:"email"}]},registerRenderers(){return{minLength:j,maxLength:C,pattern:R,format:N}}}};exports.StringFormatRenderer=N;exports.StringMaxLengthRenderer=C;exports.StringMinLengthRenderer=j;exports.StringPatternRenderer=R;exports.default=y;
2
2
  //# sourceMappingURL=index.cjs5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs5.js","sources":["../src/packages/plugins/array.tsx"],"sourcesContent":["import { Input } from \"@/components/ui/input\";\nimport { InputErrorWrapper } from \"@/components/input-error\";\nimport { Label } from \"@/components/ui/label\";\nimport { cn } from \"@/lib/utils\";\nimport {\n BaseJSONSchemaPlugin,\n ConstraintRendererProps,\n useConstraints,\n} from \"@/packages/constraints/context\";\nimport { Button } from \"@/components/ui/button\";\nimport { X } from \"lucide-react\";\nimport { Switch } from \"@/components/ui/switch\";\n\n// Generic numeric constraint renderer for arrays (minItems, maxItems)\nconst ArrayNumberConstraintRenderer = ({\n constraintName,\n value,\n onConstraintChange,\n disabled,\n error,\n onRemoveConstraint,\n}: ConstraintRendererProps<number> & { disabled?: boolean }) => {\n const { getConstraintDefinition } = useConstraints();\n const constraintDef = getConstraintDefinition(constraintName);\n\n if (!constraintDef) {\n return null;\n }\n\n return (\n <InputErrorWrapper\n errorCode={error?.code}\n errorDescription={error?.message}\n showError={!!error}\n >\n <div>\n <Label className=\"mb-2\" htmlFor={constraintDef.name}>\n {constraintDef.name}\n </Label>\n <div className=\"flex items-center gap-2\">\n <Input\n id={constraintDef.name}\n type=\"number\"\n value={value}\n onChange={(e) => onConstraintChange(Number(e.target.value))}\n disabled={disabled}\n min={0}\n className={cn({ \"border-destructive\": error })}\n />\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => onRemoveConstraint()}\n >\n <X className=\"size-4\" />\n </Button>\n </div>\n {constraintDef.description && (\n <div className=\"mt-2 text-sm text-gray-500\">\n {constraintDef.description}\n </div>\n )}\n </div>\n </InputErrorWrapper>\n );\n};\n\n// Boolean constraint renderer for uniqueItems\nconst ArrayBooleanConstraintRenderer = ({\n constraintName,\n value,\n onConstraintChange,\n disabled,\n error,\n onRemoveConstraint,\n}: ConstraintRendererProps<boolean> & { disabled?: boolean }) => {\n const { getConstraintDefinition } = useConstraints();\n const constraintDef = getConstraintDefinition(constraintName);\n\n if (!constraintDef) {\n return null;\n }\n\n return (\n <InputErrorWrapper\n errorCode={error?.code}\n errorDescription={error?.message}\n showError={!!error}\n >\n <div>\n <div className=\"mb-2 flex items-center justify-between\">\n <Label htmlFor={constraintDef.name}>{constraintDef.name}</Label>\n <div className=\"flex items-center gap-2\">\n <Switch\n id={constraintDef.name}\n checked={value}\n onCheckedChange={(checked) => onConstraintChange(checked)}\n disabled={disabled}\n className={cn({ \"border-destructive\": error })}\n />\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => onRemoveConstraint()}\n >\n <X className=\"size-4\" />\n </Button>\n </div>\n </div>\n {constraintDef.description && (\n <div className=\"mt-2 text-sm text-gray-500\">\n {constraintDef.description}\n </div>\n )}\n </div>\n </InputErrorWrapper>\n );\n};\n\n// Export the renderers\nexport const ArrayMinItemsRenderer = ArrayNumberConstraintRenderer;\nexport const ArrayMaxItemsRenderer = ArrayNumberConstraintRenderer;\nexport const ArrayUniqueItemsRenderer = ArrayBooleanConstraintRenderer;\n\nconst plugin: BaseJSONSchemaPlugin = {\n id: \"array-constraints\",\n hooks: {\n registerConstraints() {\n return [\n {\n name: \"minItems\",\n label: \"Min Items\",\n appliesTo: [\"array\"],\n schema: {\n type: \"integer\",\n title: \"Minimum Items Constraint\",\n description: \"The minimum number of items the array must contain\",\n examples: [1, 2, 5],\n minimum: 0,\n },\n description: \"Specifies the minimum number of items in the array\",\n defaultValue: 0,\n },\n {\n name: \"maxItems\",\n label: \"Max Items\",\n appliesTo: [\"array\"],\n schema: {\n type: \"integer\",\n title: \"Maximum Items Constraint\",\n description: \"The maximum number of items the array can contain\",\n examples: [10, 20, 100],\n minimum: 0,\n },\n description: \"Specifies the maximum number of items in the array\",\n defaultValue: 10,\n },\n {\n name: \"uniqueItems\",\n label: \"Unique Items\",\n appliesTo: [\"array\"],\n schema: {\n type: \"boolean\",\n title: \"Unique Items Constraint\",\n description: \"Whether array items must be unique\",\n },\n description: \"When true, all items in the array must be unique\",\n defaultValue: false,\n },\n ];\n },\n registerRenderers() {\n return {\n minItems: ArrayMinItemsRenderer,\n maxItems: ArrayMaxItemsRenderer,\n uniqueItems: ArrayUniqueItemsRenderer,\n };\n },\n },\n};\n\nexport default plugin;\n"],"names":["ArrayNumberConstraintRenderer","constraintName","value","onConstraintChange","disabled","error","onRemoveConstraint","getConstraintDefinition","useConstraints","constraintDef","jsx","InputErrorWrapper","Label","jsxs","Input","e","cn","Button","X","ArrayBooleanConstraintRenderer","Switch","checked","ArrayMinItemsRenderer","ArrayM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AAA,kBAAA,CACC,UAAWN,GAAO,KAClB,iBAAkBA,GAAO,QACzB,UAAW,CAAC,CAACA,EAEb,gBAAC,MACC,CAAA,SAAA,CAACQ,EAAAA,KAAA,MAAA,CAAI,UAAU,yCACb,SAAA,CAAAH,MAACE,EAAAA,MAAM,CAAA,QAASH,EAAc,KAAO,WAAc,KAAK,EACxDI,EAAAA,KAAC,MAAI,CAAA,UAAU,0BACb,SAAA,CAAAH,EAAA,IAACU,EAAA,OAAA,CACC,GAAIX,EAAc,KAClB,QAASP,EACT,gBAAkBmB,GAAYlB,EAAmBkB,CAAO,EACxD,SAAAjB,EACA,UAAWY,EAAA,GAAG,CAAE,qBAAsBX,CAAO,CAAA,CAAA,CAC/C,EACAK,EAAA,IAACO,EAAA,OAAA,CACC,KAAK,SACL,QAAQ,QACR,KAAK,OACL,QAAS,IAAMX,EAAmB,EAElC,SAAAI,EAAAA,IAACQ,EAAAA,QAAE,CAAA,UAAU,QAAS,CAAA,CAAA,CAAA,CACxB,CACF,CAAA,CAAA,EACF,EACCT,EAAc,aACbC,EAAA,IAAC,OAAI,UAAU,6BACZ,WAAc,WACjB,CAAA,CAAA,CAEJ,CAAA,CAAA,CACF,EApCO,IAsCX,EAGaY,EAAwBtB,EACxBuB,EAAwBvB,EACxBwB,EAA2BL"}
1
+ {"version":3,"file":"index.cjs5.js","sources":["../src/packages/plugins/string.tsx"],"sourcesContent":["import { Input } from \"@/components/ui/input\";\nimport { InputErrorWrapper } from \"@/components/input-error\";\nimport { Label } from \"@/components/ui/label\";\nimport { cn } from \"@/lib/utils\";\nimport {\n BaseJSONSchemaPlugin,\n ConstraintRendererProps,\n useConstraints,\n} from \"@/packages/constraints/context\";\nimport { Button } from \"@/components/ui/button\";\nimport { X } from \"lucide-react\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/components/ui/select\";\n\n// Generic string constraint renderer for number-based constraints (minLength, maxLength)\nconst StringNumberConstraintRenderer = ({\n constraintName,\n value,\n onConstraintChange,\n disabled,\n error,\n onRemoveConstraint,\n}: ConstraintRendererProps<number> & { disabled?: boolean }) => {\n const { getConstraintDefinition } = useConstraints();\n const constraintDef = getConstraintDefinition(constraintName);\n\n if (!constraintDef) {\n return null;\n }\n\n return (\n <InputErrorWrapper\n errorCode={error?.code}\n errorDescription={error?.message}\n showError={!!error}\n >\n <div>\n <Label className=\"mb-2\" htmlFor={constraintDef.name}>\n {constraintDef.name}\n </Label>\n <div className=\"flex items-center gap-2\">\n <Input\n id={constraintDef.name}\n type=\"number\"\n value={value}\n onChange={(e) => onConstraintChange(Number(e.target.value))}\n disabled={disabled}\n min={0}\n className={cn({ \"border-destructive\": error })}\n />\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => onRemoveConstraint()}\n >\n <X className=\"size-4\" />\n </Button>\n </div>\n {constraintDef.description && (\n <div className=\"mt-2 text-sm text-gray-500\">\n {constraintDef.description}\n </div>\n )}\n </div>\n </InputErrorWrapper>\n );\n};\n\n// Pattern constraint renderer for regex input\nconst PatternConstraintRenderer = ({\n constraintName,\n value,\n onConstraintChange,\n disabled,\n error,\n onRemoveConstraint,\n}: ConstraintRendererProps<string> & { disabled?: boolean }) => {\n const { getConstraintDefinition } = useConstraints();\n const constraintDef = getConstraintDefinition(constraintName);\n\n if (!constraintDef) {\n return null;\n }\n\n return (\n <InputErrorWrapper\n errorCode={error?.code}\n errorDescription={error?.message}\n showError={!!error}\n >\n <div>\n <Label className=\"mb-2\" htmlFor={constraintDef.name}>\n {constraintDef.name}\n </Label>\n <div className=\"flex items-center gap-2\">\n <Input\n id={constraintDef.name}\n type=\"text\"\n value={value}\n onChange={(e) => onConstraintChange(e.target.value)}\n disabled={disabled}\n placeholder=\"Regular expression pattern\"\n className={cn({ \"border-destructive\": error })}\n />\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => onRemoveConstraint()}\n >\n <X className=\"size-4\" />\n </Button>\n </div>\n {constraintDef.description && (\n <div className=\"mt-2 text-sm text-gray-500\">\n {constraintDef.description}\n </div>\n )}\n </div>\n </InputErrorWrapper>\n );\n};\n\n// Format constraint renderer with predefined format options\nconst FormatConstraintRenderer = ({\n constraintName,\n value,\n onConstraintChange,\n disabled,\n error,\n onRemoveConstraint,\n}: ConstraintRendererProps<string> & { disabled?: boolean }) => {\n const { getConstraintDefinition } = useConstraints();\n const constraintDef = getConstraintDefinition(constraintName);\n\n const formatOptions = [\n { value: \"email\", label: \"Email\" },\n { value: \"uri\", label: \"URI\" },\n { value: \"url\", label: \"URL\" },\n { value: \"date\", label: \"Date\" },\n { value: \"date-time\", label: \"Date-Time\" },\n { value: \"uuid\", label: \"UUID\" },\n { value: \"hostname\", label: \"Hostname\" },\n { value: \"ipv4\", label: \"IPv4\" },\n { value: \"ipv6\", label: \"IPv6\" },\n { value: \"phone\", label: \"Phone\" },\n ];\n\n if (!constraintDef) {\n return null;\n }\n\n return (\n <InputErrorWrapper\n errorCode={error?.code}\n errorDescription={error?.message}\n showError={!!error}\n >\n <div>\n <Label className=\"mb-2\" htmlFor={constraintDef.name}>\n {constraintDef.name}\n </Label>\n <div className=\"flex items-center gap-2\">\n <Select\n value={value}\n onValueChange={(newValue) => onConstraintChange(newValue)}\n disabled={disabled}\n >\n <SelectTrigger\n id={constraintDef.name}\n className={cn(\"flex-1\", { \"border-destructive\": error })}\n >\n <SelectValue placeholder=\"Select format\" />\n </SelectTrigger>\n <SelectContent>\n {formatOptions.map((option) => (\n <SelectItem key={option.value} value={option.value}>\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => onRemoveConstraint()}\n >\n <X className=\"size-4\" />\n </Button>\n </div>\n {constraintDef.description && (\n <div className=\"mt-2 text-sm text-gray-500\">\n {constraintDef.description}\n </div>\n )}\n </div>\n </InputErrorWrapper>\n );\n};\n\n// Export the renderers\nexport const StringMinLengthRenderer = StringNumberConstraintRenderer;\nexport const StringMaxLengthRenderer = StringNumberConstraintRenderer;\nexport const StringPatternRenderer = PatternConstraintRenderer;\nexport const StringFormatRenderer = FormatConstraintRenderer;\n\nconst plugin: BaseJSONSchemaPlugin = {\n id: \"string-constraints\",\n hooks: {\n registerConstraints() {\n return [\n {\n name: \"minLength\",\n label: \"Min Length\",\n appliesTo: [\"string\"],\n schema: {\n type: \"integer\",\n title: \"Minimum Length Constraint\",\n description: \"The minimum length of the string\",\n examples: [1, 5, 10],\n minimum: 0,\n },\n description: \"Constrains a string to a minimum length\",\n defaultValue: 0,\n },\n {\n name: \"maxLength\",\n label: \"Max Length\",\n appliesTo: [\"string\"],\n schema: {\n type: \"integer\",\n title: \"Maximum Length Constraint\",\n description: \"The maximum length of the string\",\n examples: [50, 100, 255],\n minimum: 0,\n },\n description: \"Constrains a string to a maximum length\",\n defaultValue: 100,\n },\n {\n name: \"pattern\",\n label: \"Pattern\",\n appliesTo: [\"string\"],\n schema: {\n type: \"string\",\n title: \"Pattern Constraint\",\n description: \"Regular expression pattern the string must match\",\n examples: [\"^[a-zA-Z0-9]+$\", \"\\\\d{3}-\\\\d{2}-\\\\d{4}\"],\n },\n description: \"Regular expression that the string must match\",\n defaultValue: \"\",\n },\n {\n name: \"format\",\n label: \"Format\",\n appliesTo: [\"string\"],\n schema: {\n type: \"string\",\n title: \"Format Constraint\",\n description: \"Predefined format the string must follow\",\n enum: [\n \"email\",\n \"uri\",\n \"url\",\n \"date\",\n \"date-time\",\n \"uuid\",\n \"hostname\",\n \"ipv4\",\n \"ipv6\",\n \"phone\",\n ],\n },\n description: \"Predefined format validation for the string\",\n defaultValue: \"email\",\n },\n ];\n },\n registerRenderers() {\n return {\n minLength: StringMinLengthRenderer,\n maxLength: StringMaxLengthRenderer,\n pattern: StringPatternRenderer,\n format: StringFormatRenderer,\n };\n },\n },\n};\n\nexport default plugin;\n"],"names":["StringNumberConstraintRenderer","constraintName","value","onConstraintChange","disabled","error","onRemoveConstraint","getConstraintDefinition","useConstraints","constraintDef","jsx","InputErrorWrapper","Label","jsxs","Input","e","cn","Button","X","PatternConstraintRenderer","FormatConstraintRenderer","formatOptions","Select","newValue","SelectTrigger","SelectValue","SelectContent","option","SelectItem","StringMinLengthRenderer","StringMaxLengthRenderer","StringPatternRenderer","StringFormatRenderer","plugin"],"mappings":"+XAoBMA,EAAiC,CAAC,CACtC,eAAAC,EACA,MAAAC,EACA,mBAAAC,EACA,SAAAC,EACA,MAAAC,EACA,mBAAAC,CACF,IAAgE,CACxD,KAAA,CAAE,wBAAAC,CAAwB,EAAIC,iBAAe,EAC7CC,EAAgBF,EAAwBN,CAAc,EAE5D,OAAKQ,EAKHC,EAAA,IAACC,EAAA,kBAAA,CACC,UAAWN,GAAO,KAClB,iBAAkBA,GAAO,QACzB,UAAW,CAAC,CAACA,EAEb,gBAAC,MACC,CAAA,SAAA,CAAAK,EAAAA,IAACE,SAAM,UAAU,OAAO,QAASH,EAAc,KAC5C,WAAc,IACjB,CAAA,EACAI,EAAAA,KAAC,MAAI,CAAA,UAAU,0BACb,SAAA,CAAAH,EAAA,IAACI,EAAA,MAAA,CACC,GAAIL,EAAc,KAClB,KAAK,SACL,MAAAP,EACA,SAAWa,GAAMZ,EAAmB,OAAOY,EAAE,OAAO,KAAK,CAAC,EAC1D,SAAAX,EACA,IAAK,EACL,UAAWY,EAAA,GAAG,CAAE,qBAAsBX,CAAO,CAAA,CAAA,CAC/C,EACAK,EAAA,IAACO,EAAA,OAAA,CACC,KAAK,SACL,QAAQ,QACR,KAAK,OACL,QAAS,IAAMX,EAAmB,EAElC,SAAAI,EAAAA,IAACQ,EAAAA,QAAE,CAAA,UAAU,QAAS,CAAA,CAAA,CAAA,CACxB,EACF,EACCT,EAAc,aACbC,EAAA,IAAC,OAAI,UAAU,6BACZ,WAAc,WACjB,CAAA,CAAA,CAEJ,CAAA,CAAA,CACF,EAtCO,IAwCX,EAGMS,EAA4B,CAAC,CACjC,eAAAlB,EACA,MAAA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jB,CAAA,CAAA,CAEJ,CAAA,CAAA,CACF,EAhDO,IAkDX,EAGamB,EAA0B7B,EAC1B8B,EAA0B9B,EAC1B+B,EAAwBZ,EACxBa,EAAuBZ,EAE9Ba,EAA+B,CACnC,GAAI,qBACJ,MAAO,CACL,qBAAsB,CACb,MAAA,CACL,CACE,KAAM,YACN,MAAO,aACP,UAAW,CAAC,QAAQ,EACpB,OAAQ,CACN,KAAM,UACN,MAAO,4BACP,YAAa,mCACb,SAAU,CAAC,EAAG,EAAG,EAAE,EACnB,QAAS,CACX,EACA,YAAa,0CACb,aAAc,CAChB,EACA,CACE,KAAM,YACN,MAAO,aACP,UAAW,CAAC,QAAQ,EACpB,OAAQ,CACN,KAAM,UACN,MAAO,4BACP,YAAa,mCACb,SAAU,CAAC,GAAI,IAAK,GAAG,EACvB,QAAS,CACX,EACA,YAAa,0CACb,aAAc,GAChB,EACA,CACE,KAAM,UACN,MAAO,UACP,UAAW,CAAC,QAAQ,EACpB,OAAQ,CACN,KAAM,SACN,MAAO,qBACP,YAAa,mDACb,SAAU,CAAC,iBAAkB,sBAAsB,CACrD,EACA,YAAa,gDACb,aAAc,EAChB,EACA,CACE,KAAM,SACN,MAAO,SACP,UAAW,CAAC,QAAQ,EACpB,OAAQ,CACN,KAAM,SACN,MAAO,oBACP,YAAa,2CACb,KAAM,CACJ,QACA,MACA,MACA,OACA,YACA,OACA,WACA,OACA,OACA,OAAA,CAEJ,EACA,YAAa,8CACb,aAAc,OAAA,CAElB,CACF,EACA,mBAAoB,CACX,MAAA,CACL,UAAWJ,EACX,UAAWC,EACX,QAASC,EACT,OAAQC,CACV,CAAA,CACF,CAEJ"}
@@ -1,6 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),f=require("./index.cjs57.js"),C=require("./index.cjs58.js"),M=require("./index.cjs59.js"),m=require("./index.cjs70.js"),B=require("./index.cjs60.js"),V=require("./index.cjs67.js"),z=require("./index.cjs69.js"),K=require("./index.cjs72.js"),R=require("./index.cjs82.js"),p=require("./index.cjs63.js"),U=require("./index.cjs68.js"),Y=require("./index.cjs77.js"),Z=require("./index.cjs76.js"),J=require("./index.cjs34.js"),s=require("react/jsx-runtime");function Q(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const a=Q(H);var P="Dialog",[S,X]=M.createContextScope(P),[ee,u]=S(P),_=e=>{const{__scopeDialog:t,children:o,open:r,defaultOpen:i,onOpenChange:n,modal:l=!0}=e,c=a.useRef(null),g=a.useRef(null),[v=!1,x]=B.useControllableState({prop:r,defaultProp:i,onChange:n});return s.jsx(ee,{scope:t,triggerRef:c,contentRef:g,contentId:m.useId(),titleId:m.useId(),descriptionId:m.useId(),open:v,onOpenChange:x,onOpenToggle:a.useCallback(()=>x(L=>!L),[x]),modal:l,children:o})};_.displayName=P;var w="DialogTrigger",y=a.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(w,o),n=C.useComposedRefs(t,i.triggerRef);return s.jsx(p.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":A(i.open),...r,ref:n,onClick:f.composeEventHandlers(e.onClick,i.onOpenToggle)})});y.displayName=w;var E="DialogPortal",[te,F]=S(E,{forceMount:void 0}),O=e=>{const{__scopeDialog:t,forceMount:o,children:r,container:i}=e,n=u(E,t);return s.jsx(te,{scope:t,forceMount:o,children:a.Children.map(r,l=>s.jsx(R.Presence,{present:o||n.open,children:s.jsx(K.Portal,{asChild:!0,container:i,children:l})}))})};O.displayName=E;var D="DialogOverlay",h=a.forwardRef((e,t)=>{const o=F(D,e.__scopeDialog),{forceMount:r=o.forceMount,...i}=e,n=u(D,e.__scopeDialog);return n.modal?s.jsx(R.Presence,{present:r||n.open,children:s.jsx(oe,{...i,ref:t})}):null});h.displayName=D;var oe=a.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(D,o);return s.jsx(Y.default,{as:J.Slot,allowPinchZoom:!0,shards:[i.contentRef],children:s.jsx(p.Primitive.div,{"data-state":A(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),d="DialogContent",N=a.forwardRef((e,t)=>{const o=F(d,e.__scopeDialog),{forceMount:r=o.forceMount,...i}=e,n=u(d,e.__scopeDialog);return s.jsx(R.Presence,{present:r||n.open,children:n.modal?s.jsx(ne,{...i,ref:t}):s.jsx(re,{...i,ref:t})})});N.displayName=d;var ne=a.forwardRef((e,t)=>{const o=u(d,e.__scopeDialog),r=a.useRef(null),i=C.useComposedRefs(t,o.contentRef,r);return a.useEffect(()=>{const n=r.current;if(n)return Z.hideOthers(n)},[]),s.jsx(q,{...e,ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:f.composeEventHandlers(e.onCloseAutoFocus,n=>{n.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:f.composeEventHandlers(e.onPointerDownOutside,n=>{const l=n.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&n.preventDefault()}),onFocusOutside:f.composeEventHandlers(e.onFocusOutside,n=>n.preventDefault())})}),re=a.forwardRef((e,t)=>{const o=u(d,e.__scopeDialog),r=a.useRef(!1),i=a.useRef(!1);return s.jsx(q,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(r.current||o.triggerRef.current?.focus(),n.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(r.current=!0,n.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=n.target;o.triggerRef.current?.contains(l)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&i.current&&n.preventDefault()}})}),q=a.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:n,...l}=e,c=u(d,o),g=a.useRef(null),v=C.useComposedRefs(t,g);return U.useFocusGuards(),s.jsxs(s.Fragment,{children:[s.jsx(z.FocusScope,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:n,children:s.jsx(V.DismissableLayer,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":A(c.open),...l,ref:v,onDismiss:()=>c.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(se,{titleId:c.titleId}),s.jsx(ce,{contentRef:g,descriptionId:c.descriptionId})]})]})}),b="DialogTitle",I=a.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(b,o);return s.jsx(p.Primitive.h2,{id:i.titleId,...r,ref:t})});I.displayName=b;var $="DialogDescription",T=a.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u($,o);return s.jsx(p.Primitive.p,{id:i.descriptionId,...r,ref:t})});T.displayName=$;var W="DialogClose",j=a.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(W,o);return s.jsx(p.Primitive.button,{type:"button",...r,ref:t,onClick:f.composeEventHandlers(e.onClick,()=>i.onOpenChange(!1))})});j.displayName=W;function A(e){return e?"open":"closed"}var k="DialogTitleWarning",[ie,G]=M.createContext(k,{contentName:d,titleName:b,docsSlug:"dialog"}),se=({titleId:e})=>{const t=G(k),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
-
3
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
-
5
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},ae="DialogDescriptionWarning",ce=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G(ae).contentName}}.`;return a.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},le=_,ue=y,de=O,ge=h,fe=N,pe=I,De=T,ve=j;exports.Close=ve;exports.Content=fe;exports.Description=De;exports.Dialog=_;exports.DialogClose=j;exports.DialogContent=N;exports.DialogDescription=T;exports.DialogOverlay=h;exports.DialogPortal=O;exports.DialogTitle=I;exports.DialogTrigger=y;exports.Overlay=ge;exports.Portal=de;exports.Root=le;exports.Title=pe;exports.Trigger=ue;exports.WarningProvider=ie;exports.createDialogScope=X;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),l=require("react-dom"),f=require("./index.cjs34.js"),d=require("react/jsx-runtime");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const p=n(u),m=n(l);var v=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],b=v.reduce((e,t)=>{const i=p.forwardRef((r,o)=>{const{asChild:c,...s}=r,a=c?f.Slot:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(a,{...s,ref:o})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function y(e,t){e&&m.flushSync(()=>e.dispatchEvent(t))}exports.Primitive=b;exports.dispatchDiscreteCustomEvent=y;
6
2
  //# sourceMappingURL=index.cjs55.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs55.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.6_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react_963ba7435ac590a8053d1db2d26ca164/node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dialog/src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","props","__scopeDialog","children","openProp","defaultOpen","onOpenChange","modal","triggerRef","React","contentRef","open","setOpen","useControllableState","jsx","useId","prevOpen","TRIGGER_NAME","DialogTrigger","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","DialogPortal","forceMount","container","child","Presence","PortalPrimitive","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","RemoveScroll","Slot","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","content","hideOthers","DialogContentImpl","event","originalEvent","ctrlLeftClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","DismissableLayer","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","DESCRIPTION_NAME","DialogDescription","descriptionProps","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","titleId","titleWarningContext","MESSAGE","DESCRIPTION_WARNING_NAME","descriptionId","describedById","Root","Trigger","Portal","Overlay","Content","Title","Description","Close"],"mappings":"s0BAmBA,IAAIA,EAAc,SACd,CAACC,EAAqBC,CAAiB,EAAIC,EAAAA,mBAAmBH,CAAW,EACzE,CAACI,GAAgBC,CAAgB,EAAIJ,EAAoBD,CAAW,EACpEM,EAAUC,GAAU,CACtB,KAAM,CACJ,cAAAC,EACA,SAAAC,EACA,KAAMC,EACN,YAAAC,EACA,aAAAC,EACA,MAAAC,EAAQ,EACZ,EAAMN,EACEO,EAAaC,EAAM,OAAO,IAAI,EAC9BC,EAAaD,EAAM,OAAO,IAAI,EAC9B,CAACE,EAAO,GAAOC,CAAO,EAAIC,EAAAA,qBAAqB,CACnD,KAAMT,EACN,YAAaC,EACb,SAAUC,CACd,CAAG,EACD,OAAuBQ,EAAG,IACxBhB,GACA,CACE,MAAOI,EACP,WAAAM,EACA,WAAAE,EACA,UAAWK,EAAAA,MAAO,EAClB,QAASA,EAAAA,MAAO,EAChB,cAAeA,EAAAA,MAAO,EACtB,KAAAJ,EACA,aAAcC,EACd,aAAcH,EAAM,YAAY,IAAMG,EAASI,GAAa,CAACA,CAAQ,EAAG,CAACJ,CAAO,CAAC,EACjF,MAAAL,EACA,SAAAJ,CACN,CACG,CACH,EACAH,EAAO,YAAcN,EACrB,IAAIuB,EAAe,gBACfC,EAAgBT,EAAM,WACxB,CAACR,EAAOkB,IAAiB,CACvB,KAAM,CAAE,cAAAjB,EAAe,GAAG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E,OAAAA,EAAM,UAAU,IAAM,CAChBwE,IACe,SAAS,eAAeA,CAAO,GACjC,QAAQ,MAAME,CAAO,EAE1C,EAAK,CAACA,EAASF,CAAO,CAAC,EACd,IACT,EACIG,GAA2B,2BAC3BjB,GAAqB,CAAC,CAAE,WAAAzD,EAAY,cAAA2E,KAAoB,CAE1D,MAAMF,EAAU,6EADkBJ,EAAkBK,EAAwB,EAC2C,WAAW,KAClI3E,OAAAA,EAAM,UAAU,IAAM,CACpB,MAAM6E,EAAgB5E,EAAW,SAAS,aAAa,kBAAkB,EACrE2E,GAAiBC,IACI,SAAS,eAAeD,CAAa,GACvC,QAAQ,KAAKF,CAAO,EAE5C,EAAE,CAACA,EAASzE,EAAY2E,CAAa,CAAC,EAChC,IACT,EACIE,GAAOvF,EACPwF,GAAUtE,EACVuE,GAAS3D,EACT4D,GAAUrD,EACVsD,GAAU/C,EACVgD,GAAQvB,EACRwB,GAAcrB,EACdsB,GAAQnB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs55.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-primitive@2.0.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+re_57431883aeb2c82f4228eaee26b876b0/node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NODES","Primitive","primitive","node","Node","React","props","forwardedRef","asChild","primitiveProps","Comp","Slot","jsx","dispatchDiscreteCustomEvent","target","event","ReactDOM"],"mappings":"8dAKA,IAAIA,EAAQ,CACV,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,OACA,MACA,IACF,EACIC,EAAYD,EAAM,OAAO,CAACE,EAAWC,IAAS,CAChD,MAAMC,EAAOC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACrD,KAAM,CAAE,QAAAC,EAAS,GAAGC,CAAc,EAAKH,EACjCI,EAAOF,EAAUG,EAAAA,KAAOR,EAC9B,OAAI,OAAO,OAAW,MACpB,OAAO,OAAO,IAAI,UAAU,CAAC,EAAI,IAEZS,EAAAA,IAAIF,EAAM,CAAE,GAAGD,EAAgB,IAAKF,EAAc,CAC7E,CAAG,EACD,OAAAH,EAAK,YAAc,aAAaD,CAAI,GAC7B,CAAE,GAAGD,EAAW,CAACC,CAAI,EAAGC,CAAM,CACvC,EAAG,CAAE,CAAA,EACL,SAASS,EAA4BC,EAAQC,EAAO,CAC9CD,GAAQE,EAAS,UAAU,IAAMF,EAAO,cAAcC,CAAK,CAAC,CAClE","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),u=require("./index.cjs63.js"),d=require("react/jsx-runtime");function p(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const f=p(l);var v="Separator",i="horizontal",O=["horizontal","vertical"],n=f.forwardRef((t,r)=>{const{decorative:e,orientation:o=i,...c}=t,a=m(o)?o:i,s=e?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(u.Primitive.div,{"data-orientation":a,...s,...c,ref:r})});n.displayName=v;function m(t){return O.includes(t)}var b=n;exports.Root=b;exports.Separator=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=f(l);function r(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function s(...e){return t=>{let n=!1;const u=e.map(o=>{const c=r(o,t);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let o=0;o<u.length;o++){const c=u[o];typeof c=="function"?c():r(e[o],null)}}}}function a(...e){return i.useCallback(s(...e),e)}exports.composeRefs=s;exports.useComposedRefs=a;
2
2
  //# sourceMappingURL=index.cjs56.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs56.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-separator@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+re_e069430f4793534a3e5922dcc5ebc25b/node_modules/@radix-ui/react-separator/dist/index.mjs"],"sourcesContent":["// packages/react/separator/src/separator.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Separator\";\nvar DEFAULT_ORIENTATION = \"horizontal\";\nvar ORIENTATIONS = [\"horizontal\", \"vertical\"];\nvar Separator = React.forwardRef((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n const ariaOrientation = orientation === \"vertical\" ? orientation : void 0;\n const semanticProps = decorative ? { role: \"none\" } : { \"aria-orientation\": ariaOrientation, role: \"separator\" };\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-orientation\": orientation,\n ...semanticProps,\n ...domProps,\n ref: forwardedRef\n }\n );\n});\nSeparator.displayName = NAME;\nfunction isValidOrientation(orientation) {\n return ORIENTATIONS.includes(orientation);\n}\nvar Root = Separator;\nexport {\n Root,\n Separator\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NAME","DEFAULT_ORIENTATION","ORIENTATIONS","Separator","React","props","forwardedRef","decorative","orientationProp","domProps","orientation","isValidOrientation","semanticProps","jsx","Primitive","Root"],"mappings":"gcAIA,IAAIA,EAAO,YACPC,EAAsB,aACtBC,EAAe,CAAC,aAAc,UAAU,EACxCC,EAAYC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACxD,KAAM,CAAE,WAAAC,EAAY,YAAaC,EAAkBP,EAAqB,GAAGQ,CAAQ,EAAKJ,EAClFK,EAAcC,EAAmBH,CAAe,EAAIA,EAAkBP,EAEtEW,EAAgBL,EAAa,CAAE,KAAM,QAAW,CAAE,mBADhCG,IAAgB,WAAaA,EAAc,OAC0B,KAAM,WAAa,EAChH,OAAuBG,EAAG,IACxBC,EAAAA,UAAU,IACV,CACE,mBAAoBJ,EACpB,GAAGE,EACH,GAAGH,EACH,IAAKH,CACX,CACG,CACH,CAAC,EACDH,EAAU,YAAcH,EACxB,SAASW,EAAmBD,EAAa,CACvC,OAAOR,EAAa,SAASQ,CAAW,CAC1C,CACG,IAACK,EAAOZ","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs56.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/composeRefs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React"],"mappings":"mYAEA,SAASA,EAAOC,EAAKC,EAAO,CAC1B,GAAI,OAAOD,GAAQ,WACjB,OAAOA,EAAIC,CAAK,EACPD,GAAQ,OACjBA,EAAI,QAAUC,EAElB,CACA,SAASC,KAAeC,EAAM,CAC5B,OAAQC,GAAS,CACf,IAAIC,EAAa,GACjB,MAAMC,EAAWH,EAAK,IAAKH,GAAQ,CACjC,MAAMO,EAAUR,EAAOC,EAAKI,CAAI,EAChC,MAAI,CAACC,GAAc,OAAOE,GAAW,aACnCF,EAAa,IAERE,CACb,CAAK,EACD,GAAIF,EACF,MAAO,IAAM,CACX,QAASG,EAAI,EAAGA,EAAIF,EAAS,OAAQE,IAAK,CACxC,MAAMD,EAAUD,EAASE,CAAC,EACtB,OAAOD,GAAW,WACpBA,EAAS,EAETR,EAAOI,EAAKK,CAAC,EAAG,IAAI,CAEhC,CACO,CAEJ,CACH,CACA,SAASC,KAAmBN,EAAM,CAChC,OAAOO,EAAM,YAAYR,EAAY,GAAGC,CAAI,EAAGA,CAAI,CACrD","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=f(l);function r(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function s(...e){return t=>{let n=!1;const u=e.map(o=>{const c=r(o,t);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let o=0;o<u.length;o++){const c=u[o];typeof c=="function"?c():r(e[o],null)}}}}function a(...e){return i.useCallback(s(...e),e)}exports.composeRefs=s;exports.useComposedRefs=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),v=require("react/jsx-runtime");function P(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=P(C);function j(e,o){const t=i.createContext(o),s=c=>{const{children:n,...r}=c,u=i.useMemo(()=>r,Object.values(r));return v.jsx(t.Provider,{value:u,children:n})};s.displayName=e+"Provider";function a(c){const n=i.useContext(t);if(n)return n;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[s,a]}function g(e,o=[]){let t=[];function s(c,n){const r=i.createContext(n),u=t.length;t=[...t,n];const d=p=>{const{scope:f,children:l,...x}=p,S=f?.[e]?.[u]||r,b=i.useMemo(()=>x,Object.values(x));return v.jsx(S.Provider,{value:b,children:l})};d.displayName=c+"Provider";function m(p,f){const l=f?.[e]?.[u]||r,x=i.useContext(l);if(x)return x;if(n!==void 0)return n;throw new Error(`\`${p}\` must be used within \`${c}\``)}return[d,m]}const a=()=>{const c=t.map(n=>i.createContext(n));return function(r){const u=r?.[e]||c;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:u}}),[r,u])}};return a.scopeName=e,[s,_(a,...o)]}function _(...e){const o=e[0];if(e.length===1)return o;const t=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const n=s.reduce((r,{useScope:u,scopeName:d})=>{const p=u(c)[`__scope${d}`];return{...r,...p}},{});return i.useMemo(()=>({[`__scope${o.scopeName}`]:n}),[n])}};return t.scopeName=o.scopeName,t}exports.createContext=j;exports.createContextScope=g;
2
2
  //# sourceMappingURL=index.cjs58.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs58.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/composeRefs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React"],"mappings":"mYAEA,SAASA,EAAOC,EAAKC,EAAO,CAC1B,GAAI,OAAOD,GAAQ,WACjB,OAAOA,EAAIC,CAAK,EACPD,GAAQ,OACjBA,EAAI,QAAUC,EAElB,CACA,SAASC,KAAeC,EAAM,CAC5B,OAAQC,GAAS,CACf,IAAIC,EAAa,GACjB,MAAMC,EAAWH,EAAK,IAAKH,GAAQ,CACjC,MAAMO,EAAUR,EAAOC,EAAKI,CAAI,EAChC,MAAI,CAACC,GAAc,OAAOE,GAAW,aACnCF,EAAa,IAERE,CACb,CAAK,EACD,GAAIF,EACF,MAAO,IAAM,CACX,QAASG,EAAI,EAAGA,EAAIF,EAAS,OAAQE,IAAK,CACxC,MAAMD,EAAUD,EAASE,CAAC,EACtB,OAAOD,GAAW,WACpBA,EAAS,EAETR,EAAOI,EAAKK,CAAC,EAAG,IAAI,CAEhC,CACO,CAEJ,CACH,CACA,SAASC,KAAmBN,EAAM,CAChC,OAAOO,EAAM,YAAYR,EAAY,GAAGC,CAAI,EAAGA,CAAI,CACrD","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs58.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-context@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs"],"sourcesContent":["// packages/react/context/src/createContext.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContext2","rootComponentName","defaultContext","Context","React","Provider","props","children","context","value","jsx","useContext2","consumerName","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","BaseContext","index","scope","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope"],"mappings":"kaAGA,SAASA,EAAeC,EAAmBC,EAAgB,CACzD,MAAMC,EAAUC,EAAM,cAAcF,CAAc,EAC5CG,EAAYC,GAAU,CAC1B,KAAM,CAAE,SAAAC,EAAU,GAAGC,CAAO,EAAKF,EAC3BG,EAAQL,EAAM,QAAQ,IAAMI,EAAS,OAAO,OAAOA,CAAO,CAAC,EACjE,OAAuBE,EAAAA,IAAIP,EAAQ,SAAU,CAAE,MAAAM,EAAO,SAAAF,CAAQ,CAAE,CACjE,EACDF,EAAS,YAAcJ,EAAoB,WAC3C,SAASU,EAAYC,EAAc,CACjC,MAAMJ,EAAUJ,EAAM,WAAWD,CAAO,EACxC,GAAIK,EAAS,OAAOA,EACpB,GAAIN,IAAmB,OAAQ,OAAOA,EACtC,MAAM,IAAI,MAAM,KAAKU,CAAY,4BAA4BX,CAAiB,IAAI,CACtF,CACE,MAAO,CAACI,EAAUM,CAAW,CAC/B,CACA,SAASE,EAAmBC,EAAWC,EAAyB,GAAI,CAClE,IAAIC,EAAkB,CAAE,EACxB,SAASC,EAAehB,EAAmBC,EAAgB,CACzD,MAAMgB,EAAcd,EAAM,cAAcF,CAAc,EAChDiB,EAAQH,EAAgB,OAC9BA,EAAkB,CAAC,GAAGA,EAAiBd,CAAc,EACrD,MAAMG,EAAYC,GAAU,CAC1B,KAAM,CAAE,MAAAc,EAAO,SAAAb,EAAU,GAAGC,CAAS,EAAGF,EAClCH,EAAUiB,IAAQN,CAAS,IAAIK,CAAK,GAAKD,EACzCT,EAAQL,EAAM,QAAQ,IAAMI,EAAS,OAAO,OAAOA,CAAO,CAAC,EACjE,OAAuBE,EAAAA,IAAIP,EAAQ,SAAU,CAAE,MAAAM,EAAO,SAAAF,CAAQ,CAAE,CACjE,EACDF,EAAS,YAAcJ,EAAoB,WAC3C,SAASU,EA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C,CAC7F,CACF,EACD,OAAAT,EAAY,UAAYK,EAAU,UAC3BL,CACT","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),v=require("react/jsx-runtime");function P(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=P(C);function j(e,o){const t=i.createContext(o),s=c=>{const{children:n,...r}=c,u=i.useMemo(()=>r,Object.values(r));return v.jsx(t.Provider,{value:u,children:n})};s.displayName=e+"Provider";function a(c){const n=i.useContext(t);if(n)return n;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[s,a]}function g(e,o=[]){let t=[];function s(c,n){const r=i.createContext(n),u=t.length;t=[...t,n];const d=p=>{const{scope:f,children:l,...x}=p,S=f?.[e]?.[u]||r,b=i.useMemo(()=>x,Object.values(x));return v.jsx(S.Provider,{value:b,children:l})};d.displayName=c+"Provider";function m(p,f){const l=f?.[e]?.[u]||r,x=i.useContext(l);if(x)return x;if(n!==void 0)return n;throw new Error(`\`${p}\` must be used within \`${c}\``)}return[d,m]}const a=()=>{const c=t.map(n=>i.createContext(n));return function(r){const u=r?.[e]||c;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:u}}),[r,u])}};return a.scopeName=e,[s,_(a,...o)]}function _(...e){const o=e[0];if(e.length===1)return o;const t=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const n=s.reduce((r,{useScope:u,scopeName:d})=>{const p=u(c)[`__scope${d}`];return{...r,...p}},{});return i.useMemo(()=>({[`__scope${o.scopeName}`]:n}),[n])}};return t.scopeName=o.scopeName,t}exports.createContext=j;exports.createContextScope=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),f=require("./index.cjs73.js");function S(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const s=S(b);function g({prop:e,defaultProp:o,onChange:t=()=>{}}){const[n,c]=v({defaultProp:o,onChange:t}),l=e!==void 0,i=l?e:n,u=f.useCallbackRef(t),d=s.useCallback(r=>{if(l){const a=typeof r=="function"?r(e):r;a!==e&&u(a)}else c(r)},[l,e,c,u]);return[i,d]}function v({defaultProp:e,onChange:o}){const t=s.useState(e),[n]=t,c=s.useRef(n),l=f.useCallbackRef(o);return s.useEffect(()=>{c.current!==n&&(l(n),c.current=n)},[n,c,l]),t}exports.useControllableState=g;
2
2
  //# sourceMappingURL=index.cjs59.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs59.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-context@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs"],"sourcesContent":["// packages/react/context/src/createContext.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContext2","rootComponentName","defaultContext","Context","React","Provider","props","children","context","value","jsx","useContext2","consumerName","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","BaseContext","index","scope","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2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]}
1
+ {"version":3,"file":"index.cjs59.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// packages/react/use-controllable-state/src/useControllableState.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = React.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React.useRef(value);\n const handleChange = useCallbackRef(onChange);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\nexport {\n useControllableState\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","useUncontrolledState","isControlled","value","handleChange","useCallbackRef","setValue","React","nextValue","value2","uncontrolledState","prevValueRef"],"mappings":"iaAGA,SAASA,EAAqB,CAC5B,KAAAC,EACA,YAAAC,EACA,SAAAC,EAAW,IAAM,CACnB,CACA,EAAG,CACD,KAAM,CAACC,EAAkBC,CAAmB,EAAIC,EAAqB,CAAE,YAAAJ,EAAa,SAAAC,EAAU,EACxFI,EAAeN,IAAS,OACxBO,EAAQD,EAAeN,EAAOG,EAC9BK,EAAeC,EAAc,eAACP,CAAQ,EACtCQ,EAAWC,EAAM,YACpBC,GAAc,CACb,GAAIN,EAAc,CAEhB,MAAMO,EAAS,OAAOD,GAAc,WADrBA,EACyCZ,CAAI,EAAIY,EAC5DC,IAAWb,GAAMQ,EAAaK,CAAM,CAChD,MACQT,EAAoBQ,CAAS,CAEhC,EACD,CAACN,EAAcN,EAAMI,EAAqBI,CAAY,CACvD,EACD,MAAO,CAACD,EAAOG,CAAQ,CACzB,CACA,SAASL,EAAqB,CAC5B,YAAAJ,EACA,SAAAC,CACF,EAAG,CACD,MAAMY,EAAoBH,EAAM,SAASV,CAAW,EAC9C,CAACM,CAAK,EAAIO,EACVC,EAAeJ,EAAM,OAAOJ,CAAK,EACjCC,EAAeC,EAAc,eAACP,CAAQ,EAC5CS,OAAAA,EAAM,UAAU,IAAM,CAChBI,EAAa,UAAYR,IAC3BC,EAAaD,CAAK,EAClBQ,EAAa,QAAUR,EAE1B,EAAE,CAACA,EAAOQ,EAAcP,CAAY,CAAC,EAC/BM,CACT","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("./index.cjs28.js"),d=require("./index.cjs29.js"),x=require("./index.cjs15.js"),b=require("./index.cjs22.js"),N=require("./index.cjs4.js"),p=require("./index.cjs11.js"),R=require("./index.cjs30.js"),n=({constraintName:i,value:s,onConstraintChange:u,disabled:m,error:t,onRemoveConstraint:c})=>{const{getConstraintDefinition:o}=N.useConstraints(),r=o(i);return r?e.jsx(d.InputErrorWrapper,{errorCode:t?.code,errorDescription:t?.message,showError:!!t,children:e.jsxs("div",{children:[e.jsx(x.Label,{className:"mb-2",htmlFor:r.name,children:r.name}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(l.Input,{id:r.name,type:"number",value:s,onChange:a=>u(Number(a.target.value)),disabled:m,className:b.cn({"border-destructive":t})}),e.jsx(p.Button,{type:"button",variant:"ghost",size:"icon",onClick:()=>c(),children:e.jsx(R.default,{className:"size-4"})})]}),r.description&&e.jsx("div",{className:"mt-2 text-sm text-gray-500",children:r.description})]})}):null},v=n,M=n,h=n,j=n,g=n;exports.NumberExclusiveMaximumRenderer=j;exports.NumberExclusiveMinimumRenderer=h;exports.NumberMaximumRenderer=M;exports.NumberMinimumRenderer=v;exports.NumberMultipleOfRenderer=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),d=require("react"),x=require("./index.cjs17.js"),m=require("./index.cjs18.js"),h=d.createContext(void 0),C={$schema:"http://json-schema.org/draft-07/schema#",type:"object",title:"title",description:"",properties:{},required:[]};function O({children:c,initialSchema:f}){const[p,n]=d.useState(f??C),[u,a]=d.useState([]);return w.jsx(h.Provider,{value:{schema:p,setSchema:n,path:u,setPath:a},children:c})}function R({onSchemaChange:c}={}){const f=d.useContext(h);if(f===void 0)throw new Error("useSchema must be used within a SchemaProvider");const{path:p,schema:n,setSchema:u}=f,a=(r,e)=>{let t=r,i=null,o=null;for(const s of e)t.type==="array"&&t.items&&!Array.isArray(t.items)&&typeof t.items=="object"&&t.items.type==="object"&&typeof t.items.properties?.[s]=="object"?(o=t.items,i=t.items.properties[s],t=t.items):t.type==="object"&&t.properties&&!Array.isArray(t.properties)&&typeof t.properties[s]=="object"&&(o=t,i=t.properties[s],t=t.properties[s]);return{propertySchema:i,parentSchema:o}},l=r=>{const{propertySchema:e}=a(r??n,p);return e?e.type==="array"?e.items:e:r??n},b=()=>{const{propertySchema:r}=a(n,p);return r},j=(r,e)=>{const t=m.a(n),i=l(t);if(i.properties?.[r]){const o=Object.entries(i.properties).map(([s,v])=>[s===r?e:s,v]);i.properties=Object.fromEntries(o)}i.required?.includes(r)&&(i.required=i.required.map(o=>o===r?e:o)),u(t),c?.(t)},S=(r,e)=>{const t=m.a(n),i=l(t);typeof e=="object"&&"isRequired"in e&&(i.type==="object"&&(i.required||(i.required=[]),e.isRequired?i.required.includes(r)||i.required.push(r):i.required=i.required.filter(s=>s!==r)),delete e.isRequired);let o=!1;if(i.type==="object"&&i.properties){const s=i.properties[r];typeof s!="boolean"&&s&&typeof e!="boolean"&&(e.type&&e.type!==s.type?e={title:s.title,description:s.description,default:s.default,...e}:e.enum?(delete e.type,delete e.items,delete e.properties,e={title:s.title,description:s.description,...e}):e={...s,...e},i.properties[r]=e),o=!0}if(u(t),c?.(t),o)return{status:"success",property:i.properties[r]}},y=(r,e,t)=>{const i=m.a(n),o=l(i);return o.type!=="object"&&(o.type="object"),o.properties||(o.properties={}),o.properties[r]?{status:"error",code:"key-exists",message:`Property with key ${r} already exists`}:(e.enum&&(delete e.type,delete e.items,delete e.properties),e=Object.fromEntries(Object.entries(e).filter(([,s])=>s!==void 0)),o.properties[r]=e,t&&(o.required||(o.required=[]),o.required.includes(r)||o.required.push(r)),u(i),c?.(i),{status:"success",property:o.properties[r]})},P=r=>{const e=m.a(n),t=l(e);t.type==="object"&&t.required&&(t.required=t.required.filter(i=>i!==r)),t.type==="object"&&t.properties&&delete t.properties[r],u(e),c?.(e)},g=r=>{const e=l().properties;if(!e||x.a(e)||typeof e[r]=="boolean")return;const t=e[r],i=`${r}_copy`,o=m.a(t);return y(i,o,q(r))},q=r=>{if(p.length){const{propertySchema:e}=a(n,p);return e?.type==="array"&&e.items&&typeof e.items!="boolean"&&!Array.isArray(e.items)&&e.items?.type==="object"?!!e.items?.required?.includes(r):!!e?.required?.includes(r)}return!!n?.required?.includes(r)};return{...f,getCurrentSchema:l,getCurrentProperty:b,handlePropertyChange:S,handleAddProperty:y,handleKeyChange:j,navigateToCorrectNesting:a,handleDeleteProperty:P,isPropertyRequired:q,getValue:()=>n,handleDuplicateProperty:g}}exports.SchemaContext=h;exports.SchemaProvider=O;exports.useSchema=R;
2
2
  //# sourceMappingURL=index.cjs6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs6.js","sources":["../src/packages/plugins/number.tsx"],"sourcesContent":["import { Input } from \"@/components/ui/input\";\nimport { InputErrorWrapper } from \"@/components/input-error\";\nimport { Label } from \"@/components/ui/label\";\nimport { cn } from \"@/lib/utils\";\nimport {\n BaseJSONSchemaPlugin,\n ConstraintRendererProps,\n useConstraints,\n} from \"@/packages/constraints/context\";\nimport { Button } from \"@/components/ui/button\";\nimport { X } from \"lucide-react\";\n\n// A generic number constraint renderer component to reduce code duplication\nconst NumberConstraintRenderer = ({\n constraintName,\n value,\n onConstraintChange,\n disabled,\n error,\n onRemoveConstraint,\n}: ConstraintRendererProps<number> & { disabled?: boolean }) => {\n const { getConstraintDefinition } = useConstraints();\n const constraintDef = getConstraintDefinition(constraintName);\n\n if (!constraintDef) {\n return null;\n }\n\n return (\n <InputErrorWrapper\n errorCode={error?.code}\n errorDescription={error?.message}\n showError={!!error}\n >\n <div>\n <Label className=\"mb-2\" htmlFor={constraintDef.name}>\n {constraintDef.name}\n </Label>\n <div className=\"flex items-center gap-2\">\n <Input\n id={constraintDef.name}\n type=\"number\"\n value={value}\n onChange={(e) => onConstraintChange(Number(e.target.value))}\n disabled={disabled}\n className={cn({ \"border-destructive\": error })}\n />\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => onRemoveConstraint()}\n >\n <X className=\"size-4\" />\n </Button>\n </div>\n {constraintDef.description && (\n <div className=\"mt-2 text-sm text-gray-500\">\n {constraintDef.description}\n </div>\n )}\n </div>\n </InputErrorWrapper>\n );\n};\n\n// Reuse the generic renderer for all number constraints\nexport const NumberMinimumRenderer = NumberConstraintRenderer;\nexport const NumberMaximumRenderer = NumberConstraintRenderer;\nexport const NumberExclusiveMinimumRenderer = NumberConstraintRenderer;\nexport const NumberExclusiveMaximumRenderer = NumberConstraintRenderer;\nexport const NumberMultipleOfRenderer = NumberConstraintRenderer;\n\nconst plugin: BaseJSONSchemaPlugin = {\n id: \"number-constraints\",\n hooks: {\n registerConstraints() {\n return [\n {\n name: \"minimum\",\n label: \"Minimum\",\n appliesTo: [\"number\", \"integer\"],\n schema: {\n type: \"number\",\n title: \"Minimum Constraint\",\n description: \"The minimum value for this constraint\",\n examples: [0, 1, 10],\n },\n description: \"Constrains a number or integer to a minimum value\",\n defaultValue: 0,\n },\n {\n name: \"maximum\",\n label: \"Maximum\",\n appliesTo: [\"number\", \"integer\"],\n schema: {\n type: \"number\",\n title: \"Maximum Constraint\",\n description: \"The maximum value for this constraint\",\n examples: [10, 100, 1000],\n },\n description: \"Constrains a number or integer to a maximum value\",\n defaultValue: 100,\n },\n {\n name: \"exclusiveMinimum\",\n label: \"Exclusive Minimum\",\n appliesTo: [\"number\", \"integer\"],\n schema: {\n type: \"number\",\n title: \"Exclusive Minimum Constraint\",\n description: \"The value must be strictly greater than this\",\n examples: [0, 1, 10],\n },\n description:\n \"Value must be strictly greater than (not equal to) this value\",\n defaultValue: 0,\n },\n {\n name: \"exclusiveMaximum\",\n label: \"Exclusive Maximum\",\n appliesTo: [\"number\", \"integer\"],\n schema: {\n type: \"number\",\n title: \"Exclusive Maximum Constraint\",\n description: \"The value must be strictly less than this\",\n examples: [10, 100, 1000],\n },\n description:\n \"Value must be strictly less than (not equal to) this value\",\n defaultValue: 100,\n },\n {\n name: \"multipleOf\",\n label: \"Multiple Of\",\n appliesTo: [\"number\", \"integer\"],\n schema: {\n type: \"number\",\n title: \"Multiple Of Constraint\",\n description: \"Value must be a multiple of this number\",\n examples: [2, 5, 10],\n exclusiveMinimum: 0,\n },\n description:\n \"Value must be divisible by this number (e.g., 5 for multiples of 5)\",\n defaultValue: 1,\n },\n ];\n },\n registerRenderers() {\n return {\n minimum: NumberMinimumRenderer,\n maximum: NumberMaximumRenderer,\n exclusiveMinimum: NumberExclusiveMinimumRenderer,\n exclusiveMaximum: NumberExclusiveMaximumRenderer,\n multipleOf: NumberMultipleOfRenderer,\n };\n },\n },\n};\n\nexport default plugin;\n"],"names":["NumberConstraintRenderer","constraintName","value","onConstraintChange","disabled","error","onRemoveConstraint","getConstraintDefinition","useConstraints","constraintDef","jsx","InputErrorWrapper","Label","jsxs","Input","e","cn","Button","X","NumberMinimumRenderer","NumberMaximumRenderer","NumberExclusiveMinimumRenderer","NumberExclusiveMaximumRenderer","NumberMultipleOfRenderer"],"mappings":"sUAaMA,EAA2B,CAAC,CAChC,eAAAC,EACA,MAAAC,EACA,mBAAAC,EACA,SAAAC,EACA,MAAAC,EACA,mBAAAC,CACF,IAAgE,CACxD,KAAA,CAAE,wBAAAC,CAAwB,EAAIC,iBAAe,EAC7CC,EAAgBF,EAAwBN,CAAc,EAE5D,OAAKQ,EAKHC,EAAA,IAACC,EAAA,kBAAA,CACC,UAAWN,GAAO,KAClB,iBAAkBA,GAAO,QACzB,UAAW,CAAC,CAACA,EAEb,gBAAC,MACC,CAAA,SAAA,CAAAK,EAAAA,IAACE,SAAM,UAAU,OAAO,QAASH,EAAc,KAC5C,WAAc,IACjB,CAAA,EACAI,EAAAA,KAAC,MAAI,CAAA,UAAU,0BACb,SAAA,CAAAH,EAAA,IAACI,EAAA,MAAA,CACC,GAAIL,EAAc,KAClB,KAAK,SACL,MAAAP,EACA,SAAWa,GAAMZ,EAAmB,OAAOY,EAAE,OAAO,KAAK,CAAC,EAC1D,SAAAX,EACA,UAAWY,EAAA,GAAG,CAAE,qBAAsBX,CAAO,CAAA,CAAA,CAC/C,EACAK,EAAA,IAACO,EAAA,OAAA,CACC,KAAK,SACL,QAAQ,QACR,KAAK,OACL,QAAS,IAAMX,EAAmB,EAElC,SAAAI,EAAAA,IAACQ,EAAAA,QAAE,CAAA,UAAU,QAAS,CAAA,CAAA,CAAA,CACxB,EACF,EACCT,EAAc,aACbC,EAAA,IAAC,OAAI,UAAU,6BACZ,WAAc,WACjB,CAAA,CAAA,CAEJ,CAAA,CAAA,CACF,EArCO,IAuCX,EAGaS,EAAwBnB,EACxBoB,EAAwBpB,EACxBqB,EAAiCrB,EACjCsB,EAAiCtB,EACjCuB,EAA2BvB"}
1
+ {"version":3,"file":"index.cjs6.js","sources":["../src/packages/builder/context.tsx"],"sourcesContent":["import { createContext, useContext, useState } from \"react\";\n\nimport type { PropsWithChildren, SetStateAction } from \"react\";\nimport type { JSONSchema7, JSONSchema7Definition } from \"json-schema\";\nimport { clone, isEmpty } from \"remeda\";\nimport type { OperationError } from \"./shared-types\";\n\ninterface ContextState<T extends JSONSchema7> {\n schema: T;\n setSchema: React.Dispatch<T>;\n path: string[];\n setPath: React.Dispatch<SetStateAction<string[]>>;\n}\n\nexport const SchemaContext = createContext<\n ContextState<JSONSchema7> | undefined\n>(undefined);\n\nconst defaultSchema: JSONSchema7 = {\n $schema: \"http://json-schema.org/draft-07/schema#\",\n type: \"object\",\n title: \"title\",\n description: \"\",\n properties: {},\n required: [],\n};\n\nfunction SchemaProvider({\n children,\n initialSchema,\n}: PropsWithChildren<{ initialSchema?: JSONSchema7 }>) {\n const [schema, setSchema] = useState<JSONSchema7>(\n initialSchema ?? defaultSchema,\n );\n\n /**\n * Path represents the path to a nested property in the schema.\n * It should only contain property keys.\n * An empty path means the current schema is the root schema since\n * the path only represents nested properties.\n */\n const [path, setPath] = useState<string[]>([]);\n\n // NOTE: you *might* need to memoize your values\n // Learn more in http://kcd.im/optimize-context\n\n return (\n <SchemaContext.Provider value={{ schema, setSchema, path, setPath }}>\n {children}\n </SchemaContext.Provider>\n );\n}\n\nexport type PropertyAddError = OperationError & {\n status: \"error\";\n};\n\nexport interface PropertyAddSuccess {\n status: \"success\";\n property: JSONSchema7;\n}\n\nexport interface PropertyChangeSuccess {\n status: \"success\";\n property: JSONSchema7Definition;\n}\n\nfunction useSchema({\n onSchemaChange,\n}: {\n onSchemaChange?: (schema: JSONSchema7) => void;\n} = {}) {\n const context = useContext(SchemaContext);\n\n if (context === undefined) {\n throw new Error(\"useSchema must be used within a SchemaProvider\");\n }\n\n const { path, schema, setSchema } = context;\n\n /**\n * Navigates to the correct property schema of the latest key in the provided path.\n *\n * It will traverse both \"properties\" and \"items\" to find the correct property schema.\n *\n * It will only return a property schema if the provided path is valid i.e. it\n * correctly follows the schema's nesting structure.\n *\n * It will only return a parent schema if the provided path is valid i.e. it\n * correctly follows the schema's nesting structure.\n */\n const navigateToCorrectNesting = (\n providedSchema: JSONSchema7,\n providedPath: string[],\n ) => {\n let current = providedSchema;\n let propertySchema: JSONSchema7 | null = null;\n // Should be the schema of type \"object\" containing the property in its properties key\n let parentSchema: JSONSchema7 | null = null;\n\n for (const p of providedPath) {\n if (\n current.type === \"array\" &&\n current.items &&\n !Array.isArray(current.items) &&\n typeof current.items === \"object\" &&\n current.items.type === \"object\" &&\n typeof current.items.properties?.[p] === \"object\"\n ) {\n parentSchema = current.items;\n propertySchema = current.items.properties[p];\n current = current.items;\n } else if (\n current.type === \"object\" &&\n current.properties &&\n !Array.isArray(current.properties) &&\n typeof current.properties[p] === \"object\"\n ) {\n parentSchema = current;\n propertySchema = current.properties[p];\n current = current.properties[p];\n }\n }\n\n return { propertySchema, parentSchema };\n };\n\n /**\n * Gets the current schema of the latest key in the path.\n * If path is empty, it will return the root schema.\n *\n * It should always return the \"object\" schema of the current path.\n */\n const getCurrentSchema = (initialSchema?: JSONSchema7) => {\n // Gets the correct object schema if under nesting\n // Otherwise, return the root schema\n const { propertySchema } = navigateToCorrectNesting(\n initialSchema ?? schema,\n path,\n );\n\n if (propertySchema) {\n if (propertySchema.type === \"array\") {\n return propertySchema.items as JSONSchema7;\n }\n\n return propertySchema;\n }\n\n return initialSchema ?? schema;\n };\n\n /**\n * Gets the correct property schema of the latest key in the path.\n * If no path is provided, it will return null.\n */\n const getCurrentProperty = () => {\n const { propertySchema } = navigateToCorrectNesting(schema, path);\n\n return propertySchema;\n };\n\n /**\n * Change the key of a property in the schema. It expects\n * the find the key at the current path.\n */\n const handleKeyChange = (key: string, newKey: string) => {\n const newSchema = clone(schema);\n\n // The current schema containing the property to change\n const current: JSONSchema7 = getCurrentSchema(newSchema);\n\n if (current.properties?.[key]) {\n //Important: maintain order as to not confuse users\n const newProperties = Object.entries(current.properties).map(\n ([k, val]) => {\n return [k === key ? newKey : k, val];\n },\n );\n\n current.properties = Object.fromEntries(\n newProperties,\n ) as JSONSchema7[\"properties\"];\n }\n\n if (current.required?.includes(key)) {\n current.required = current.required.map((item) =>\n item === key ? newKey : item,\n );\n }\n\n setSchema(newSchema);\n onSchemaChange?.(newSchema);\n };\n\n const handlePropertyChange = (\n key: string,\n updates: Partial<JSONSchema7Definition> & { isRequired?: boolean },\n ): PropertyChangeSuccess | undefined => {\n const newSchema = clone(schema);\n\n // The current schema containing the property to change\n const current: JSONSchema7 = getCurrentSchema(newSchema);\n\n // Handle required field updates\n if (typeof updates === \"object\" && \"isRequired\" in updates) {\n if (current.type === \"object\") {\n if (!current.required) {\n current.required = [];\n }\n if (updates.isRequired) {\n if (!current.required.includes(key)) {\n current.required.push(key);\n }\n } else {\n current.required = current.required.filter((item) => item !== key);\n }\n }\n delete updates.isRequired;\n }\n\n let isUpdated = false;\n\n // Update the property\n if (current.type === \"object\" && current.properties) {\n const originalProperty = current.properties[key];\n // Ensure the property exists and is not a boolean\n if (typeof originalProperty !== \"boolean\" && originalProperty) {\n if (typeof updates !== \"boolean\") {\n //if updates changes the type of the property,\n //only the title, description, and default properties should remain\n //from the original property\n if (updates.type && updates.type !== originalProperty.type) {\n updates = {\n title: originalProperty.title,\n description: originalProperty.description,\n default: originalProperty.default,\n ...updates,\n };\n } else if (updates.enum) {\n //if the property is an enum, only the title and description should remain\n //from the original property\n delete updates.type;\n delete updates.items;\n delete updates.properties;\n updates = {\n title: originalProperty.title,\n description: originalProperty.description,\n ...updates,\n };\n } else {\n updates = { ...originalProperty, ...updates };\n }\n\n current.properties[key] = updates;\n }\n }\n isUpdated = true;\n }\n\n setSchema(newSchema);\n onSchemaChange?.(newSchema);\n\n if (isUpdated) {\n return { status: \"success\", property: current.properties![key]! };\n }\n };\n\n /**\n * Adds a sibling property to the current schema.\n */\n const handleAddProperty = (\n key: string,\n propertyToAdd: JSONSchema7,\n isRequired: boolean,\n ) => {\n const newSchema = clone(schema);\n\n // The current schema containing the property to add\n const current: JSONSchema7 = getCurrentSchema(newSchema);\n\n // Ensure the current schema has a properties object\n if (current.type !== \"object\") {\n current.type = \"object\";\n }\n if (!current.properties) {\n current.properties = {};\n }\n\n //Ensure there's no existing property with the same key\n if (current.properties[key]) {\n return {\n status: \"error\",\n code: \"key-exists\" as const,\n message: `Property with key ${key} already exists`,\n } satisfies PropertyAddError;\n }\n\n if (propertyToAdd.enum) {\n //ensure that only the enum property is present\n delete propertyToAdd.type;\n delete propertyToAdd.items;\n delete propertyToAdd.properties;\n }\n\n // Clean the propertyToAdd object ensuring it doesn't contain\n //keys with undefined values\n propertyToAdd = Object.fromEntries(\n Object.entries(propertyToAdd).filter(([, value]) => value !== undefined),\n );\n\n // Add the new property\n current.properties[key] = propertyToAdd;\n\n // Handle required field\n if (isRequired) {\n if (!current.required) {\n current.required = [];\n }\n if (!current.required.includes(key)) {\n current.required.push(key);\n }\n }\n\n setSchema(newSchema);\n onSchemaChange?.(newSchema);\n\n return {\n status: \"success\" as const,\n property: current.properties[key],\n } satisfies PropertyAddSuccess;\n };\n\n const handleDeleteProperty = (key: string) => {\n const newSchema = clone(schema);\n\n // The current schema containing the property to delete\n const current: JSONSchema7 = getCurrentSchema(newSchema);\n\n // Handle required field updates\n if (current.type === \"object\") {\n if (current.required) {\n current.required = current.required.filter((item) => item !== key);\n }\n }\n\n // Delete the property\n if (current.type === \"object\" && current.properties) {\n delete current.properties[key];\n }\n\n setSchema(newSchema);\n onSchemaChange?.(newSchema);\n };\n\n const handleDuplicateProperty = (key: string) => {\n const currentProperties = getCurrentSchema().properties;\n if (\n !currentProperties ||\n isEmpty(currentProperties) ||\n typeof currentProperties[key] === \"boolean\"\n ) {\n return;\n }\n\n const propertyToDuplicate = currentProperties[key]!;\n const newKey = `${key}_copy`;\n const newProperty = clone(propertyToDuplicate);\n\n // Add the duplicated property\n return handleAddProperty(newKey, newProperty, isPropertyRequired(key));\n };\n\n const isPropertyRequired = (key: string) => {\n if (path.length) {\n const { propertySchema } = navigateToCorrectNesting(schema, path);\n\n if (\n propertySchema?.type === \"array\" &&\n propertySchema.items &&\n typeof propertySchema.items !== \"boolean\" &&\n !Array.isArray(propertySchema.items) &&\n propertySchema.items?.type === \"object\"\n ) {\n return Boolean(propertySchema.items?.required?.includes(key));\n } else {\n return Boolean(propertySchema?.required?.includes(key));\n }\n }\n\n return Boolean(schema?.required?.includes(key));\n };\n\n /**\n * Programatically get the current schema value\n */\n const getValue = () => {\n return schema;\n };\n\n return {\n ...context,\n getCurrentSchema,\n getCurrentProperty,\n handlePropertyChange,\n handleAddProperty,\n handleKeyChange,\n navigateToCorrectNesting,\n handleDeleteProperty,\n isPropertyRequired,\n getValue,\n handleDuplicateProperty,\n };\n}\n\nexport { SchemaProvider, useSchema };\n"],"names":["SchemaContext","createContext","defaultSchema","SchemaProvider","children","initialSchema","schema","setSchema","useState","path","setPath","jsx","useSchema","onSchemaChange","context","useContext","navigateToCorrectNesting","providedSchema","providedPath","current","propertySchema","parentSchema","p","getCurrentSchema","getCurrentProperty","handleKeyChange","key","newKey","newSchema","clone","newProperties","k","val","item","handlePropertyChange","updates","isUpdated","originalProperty","handleAddProperty","propertyToAdd","isRequired","value","handleDeleteProperty","handleDuplicateProperty","currentProperties","isEmpty","propertyToDuplicate","newProperty","isPropertyRequired"],"mappings":"oMAcaA,EAAgBC,gBAE3B,MAAS,EAELC,EAA6B,CACjC,QAAS,0CACT,KAAM,SACN,MAAO,QACP,YAAa,GACb,WAAY,CAAC,EACb,SAAU,CAAA,CACZ,EAEA,SAASC,EAAe,CACtB,SAAAC,EACA,cAAAC,CACF,EAAuD,CAC/C,KAAA,CAACC,EAAQC,CAAS,EAAIC,EAAA,SAC1BH,GAAiBH,CACnB,EAQM,CAACO,EAAMC,CAAO,EAAIF,EAAAA,SAAmB,CAAA,CAAE,EAM3C,OAAAG,MAACX,EAAc,SAAd,CAAuB,MAAO,CAAE,OAAAM,EAAQ,UAAAC,EAAW,KA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AA2BjB,GAAgB,CACzC,MAAAkB,EAAoBrB,IAAmB,WAE3C,GAAA,CAACqB,GACDC,EAAAA,EAAQD,CAAiB,GACzB,OAAOA,EAAkBlB,CAAG,GAAM,UAElC,OAGI,MAAAoB,EAAsBF,EAAkBlB,CAAG,EAC3CC,EAAS,GAAGD,CAAG,QACfqB,EAAclB,IAAMiB,CAAmB,EAG7C,OAAOR,EAAkBX,EAAQoB,EAAaC,EAAmBtB,CAAG,CAAC,CACvE,EAEMsB,EAAsBtB,GAAgB,CAC1C,GAAIjB,EAAK,OAAQ,CACf,KAAM,CAAE,eAAAW,CAAmB,EAAAJ,EAAyBV,EAAQG,CAAI,EAEhE,OACEW,GAAgB,OAAS,SACzBA,EAAe,OACf,OAAOA,EAAe,OAAU,WAChC,CAAC,MAAM,QAAQA,EAAe,KAAK,GACnCA,EAAe,OAAO,OAAS,SAExB,EAAQA,EAAe,OAAO,UAAU,SAASM,CAAG,EAEpD,EAAQN,GAAgB,UAAU,SAASM,CAAG,CACvD,CAGF,MAAO,EAAQpB,GAAQ,UAAU,SAASoB,CAAG,CAC/C,EASO,MAAA,CACL,GAAGZ,EACH,iBAAAS,EACA,mBAAAC,EACA,qBAAAU,EACA,kBAAAI,EACA,gBAAAb,EACA,yBAAAT,EACA,qBAAA0B,EACA,mBAAAM,EACA,SAde,IACR1C,EAcP,wBAAAqC,CACF,CACF"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),f=require("./index.cjs73.js");function S(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const s=S(b);function g({prop:e,defaultProp:o,onChange:t=()=>{}}){const[n,c]=v({defaultProp:o,onChange:t}),l=e!==void 0,i=l?e:n,u=f.useCallbackRef(t),d=s.useCallback(r=>{if(l){const a=typeof r=="function"?r(e):r;a!==e&&u(a)}else c(r)},[l,e,c,u]);return[i,d]}function v({defaultProp:e,onChange:o}){const t=s.useState(e),[n]=t,c=s.useRef(n),l=f.useCallbackRef(o);return s.useEffect(()=>{c.current!==n&&(l(n),c.current=n)},[n,c,l]),t}exports.useControllableState=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const u=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,u.get?u:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const n=c(o);function s(e){const t=n.useRef({value:e,previous:e});return n.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}exports.usePrevious=s;
2
2
  //# sourceMappingURL=index.cjs60.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs60.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// packages/react/use-controllable-state/src/useControllableState.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = React.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React.useRef(value);\n const handleChange = useCallbackRef(onChange);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\nexport {\n useControllableState\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","useUncontrolledState","isControlled","value","handleChange","useCallbackRef","setValue","React","nextValue","value2","uncontrolledState","prevValueRef"],"mappings":"iaAGA,SAASA,EAAqB,CAC5B,KAAAC,EACA,YAAAC,EACA,SAAAC,EAAW,IAAM,CACnB,CACA,EAAG,CACD,KAAM,CAACC,EAAkBC,CAAmB,EAAIC,EAAqB,CAAE,YAAAJ,EAAa,SAAAC,EAAU,EACxFI,EAAeN,IAAS,OACxBO,EAAQD,EAAeN,EAAOG,EAC9BK,EAAeC,EAAc,eAACP,CAAQ,EACtCQ,EAAWC,EAAM,YACpBC,GAAc,CACb,GAAIN,EAAc,CAEhB,MAAMO,EAAS,OAAOD,GAAc,WADrBA,EACyCZ,CAAI,EAAIY,EAC5DC,IAAWb,GAAMQ,EAAaK,CAAM,CAChD,MACQT,EAAoBQ,CAAS,CAEhC,EACD,CAACN,EAAcN,EAAMI,EAAqBI,CAAY,CACvD,EACD,MAAO,CAACD,EAAOG,CAAQ,CACzB,CACA,SAASL,EAAqB,CAC5B,YAAAJ,EACA,SAAAC,CACF,EAAG,CACD,MAAMY,EAAoBH,EAAM,SAASV,CAAW,EAC9C,CAACM,CAAK,EAAIO,EACVC,EAAeJ,EAAM,OAAOJ,CAAK,EACjCC,EAAeC,EAAc,eAACP,CAAQ,EAC5CS,OAAAA,EAAM,UAAU,IAAM,CAChBI,EAAa,UAAYR,IAC3BC,EAAaD,CAAK,EAClBQ,EAAa,QAAUR,EAE1B,EAAE,CAACA,EAAOQ,EAAcP,CAAY,CAAC,EAC/BM,CACT","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs60.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-previous/dist/index.mjs"],"sourcesContent":["// packages/react/use-previous/src/usePrevious.tsx\nimport * as React from \"react\";\nfunction usePrevious(value) {\n const ref = React.useRef({ value, previous: value });\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["usePrevious","value","ref","React"],"mappings":"mYAEA,SAASA,EAAYC,EAAO,CAC1B,MAAMC,EAAMC,EAAM,OAAO,CAAE,MAAAF,EAAO,SAAUA,EAAO,EACnD,OAAOE,EAAM,QAAQ,KACfD,EAAI,QAAQ,QAAUD,IACxBC,EAAI,QAAQ,SAAWA,EAAI,QAAQ,MACnCA,EAAI,QAAQ,MAAQD,GAEfC,EAAI,QAAQ,UAClB,CAACD,CAAK,CAAC,CACZ","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const u=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,u.get?u:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const n=c(o);function s(e){const t=n.useRef({value:e,previous:e});return n.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}exports.usePrevious=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),b=require("./index.cjs74.js");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const S=d(a);function z(e){const[r,t]=S.useState(void 0);return b.useLayoutEffect(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const u=o[0];let s,n;if("borderBoxSize"in u){const c=u.borderBoxSize,f=Array.isArray(c)?c[0]:c;s=f.inlineSize,n=f.blockSize}else s=e.offsetWidth,n=e.offsetHeight;t({width:s,height:n})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else t(void 0)},[e]),r}exports.useSize=z;
2
2
  //# sourceMappingURL=index.cjs61.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs61.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-previous/dist/index.mjs"],"sourcesContent":["// packages/react/use-previous/src/usePrevious.tsx\nimport * as React from \"react\";\nfunction usePrevious(value) {\n const ref = React.useRef({ value, previous: value });\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["usePrevious","value","ref","React"],"mappings":"mYAEA,SAASA,EAAYC,EAAO,CAC1B,MAAMC,EAAMC,EAAM,OAAO,CAAE,MAAAF,EAAO,SAAUA,EAAO,EACnD,OAAOE,EAAM,QAAQ,KACfD,EAAI,QAAQ,QAAUD,IACxBC,EAAI,QAAQ,SAAWA,EAAI,QAAQ,MACnCA,EAAI,QAAQ,MAAQD,GAEfC,EAAI,QAAQ,UAClB,CAACD,CAAK,CAAC,CACZ","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs61.js","sources":["../../../node_modules/.pnpm/@radix-ui+react-use-size@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-size/dist/index.mjs"],"sourcesContent":["// packages/react/use-size/src/useSize.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useSize","element","size","setSize","React","useLayoutEffect","resizeObserver","entries","entry","width","height","borderSizeEntry","borderSize"],"mappings":"iaAGA,SAASA,EAAQC,EAAS,CACxB,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAM,SAAS,MAAM,EAC7CC,OAAAA,EAAAA,gBAAgB,IAAM,CACpB,GAAIJ,EAAS,CACXE,EAAQ,CAAE,MAAOF,EAAQ,YAAa,OAAQA,EAAQ,aAAc,EACpE,MAAMK,EAAiB,IAAI,eAAgBC,GAAY,CAIrD,GAHI,CAAC,MAAM,QAAQA,CAAO,GAGtB,CAACA,EAAQ,OACX,OAEF,MAAMC,EAAQD,EAAQ,CAAC,EACvB,IAAIE,EACAC,EACJ,GAAI,kBAAmBF,EAAO,CAC5B,MAAMG,EAAkBH,EAAM,cACxBI,EAAa,MAAM,QAAQD,CAAe,EAAIA,EAAgB,CAAC,EAAIA,EACzEF,EAAQG,EAAW,WACnBF,EAASE,EAAW,SAC9B,MACUH,EAAQR,EAAQ,YAChBS,EAAST,EAAQ,aAEnBE,EAAQ,CAAE,MAAAM,EAAO,OAAAC,EAAQ,CACjC,CAAO,EACD,OAAAJ,EAAe,QAAQL,EAAS,CAAE,IAAK,YAAY,CAAE,EAC9C,IAAMK,EAAe,UAAUL,CAAO,CACnD,MACME,EAAQ,MAAM,CAEpB,EAAK,CAACF,CAAO,CAAC,EACLC,CACT","x_google_ignoreList":[0]}
@@ -1,2 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),b=require("./index.cjs74.js");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const S=d(a);function z(e){const[r,t]=S.useState(void 0);return b.useLayoutEffect(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const u=o[0];let s,n;if("borderBoxSize"in u){const c=u.borderBoxSize,f=Array.isArray(c)?c[0]:c;s=f.inlineSize,n=f.blockSize}else s=e.offsetWidth,n=e.offsetHeight;t({width:s,height:n})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else t(void 0)},[e]),r}exports.useSize=z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),f=require("./index.cjs57.js"),C=require("./index.cjs56.js"),M=require("./index.cjs58.js"),m=require("./index.cjs70.js"),B=require("./index.cjs59.js"),V=require("./index.cjs67.js"),z=require("./index.cjs69.js"),K=require("./index.cjs72.js"),R=require("./index.cjs78.js"),p=require("./index.cjs55.js"),U=require("./index.cjs68.js"),Y=require("./index.cjs77.js"),Z=require("./index.cjs76.js"),J=require("./index.cjs34.js"),s=require("react/jsx-runtime");function Q(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const a=Q(H);var P="Dialog",[S,X]=M.createContextScope(P),[ee,u]=S(P),_=e=>{const{__scopeDialog:t,children:o,open:r,defaultOpen:i,onOpenChange:n,modal:l=!0}=e,c=a.useRef(null),g=a.useRef(null),[v=!1,x]=B.useControllableState({prop:r,defaultProp:i,onChange:n});return s.jsx(ee,{scope:t,triggerRef:c,contentRef:g,contentId:m.useId(),titleId:m.useId(),descriptionId:m.useId(),open:v,onOpenChange:x,onOpenToggle:a.useCallback(()=>x(L=>!L),[x]),modal:l,children:o})};_.displayName=P;var w="DialogTrigger",y=a.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(w,o),n=C.useComposedRefs(t,i.triggerRef);return s.jsx(p.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":A(i.open),...r,ref:n,onClick:f.composeEventHandlers(e.onClick,i.onOpenToggle)})});y.displayName=w;var E="DialogPortal",[te,F]=S(E,{forceMount:void 0}),O=e=>{const{__scopeDialog:t,forceMount:o,children:r,container:i}=e,n=u(E,t);return s.jsx(te,{scope:t,forceMount:o,children:a.Children.map(r,l=>s.jsx(R.Presence,{present:o||n.open,children:s.jsx(K.Portal,{asChild:!0,container:i,children:l})}))})};O.displayName=E;var D="DialogOverlay",h=a.forwardRef((e,t)=>{const o=F(D,e.__scopeDialog),{forceMount:r=o.forceMount,...i}=e,n=u(D,e.__scopeDialog);return n.modal?s.jsx(R.Presence,{present:r||n.open,children:s.jsx(oe,{...i,ref:t})}):null});h.displayName=D;var oe=a.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(D,o);return s.jsx(Y.default,{as:J.Slot,allowPinchZoom:!0,shards:[i.contentRef],children:s.jsx(p.Primitive.div,{"data-state":A(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),d="DialogContent",N=a.forwardRef((e,t)=>{const o=F(d,e.__scopeDialog),{forceMount:r=o.forceMount,...i}=e,n=u(d,e.__scopeDialog);return s.jsx(R.Presence,{present:r||n.open,children:n.modal?s.jsx(ne,{...i,ref:t}):s.jsx(re,{...i,ref:t})})});N.displayName=d;var ne=a.forwardRef((e,t)=>{const o=u(d,e.__scopeDialog),r=a.useRef(null),i=C.useComposedRefs(t,o.contentRef,r);return a.useEffect(()=>{const n=r.current;if(n)return Z.hideOthers(n)},[]),s.jsx(q,{...e,ref:i,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:f.composeEventHandlers(e.onCloseAutoFocus,n=>{n.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:f.composeEventHandlers(e.onPointerDownOutside,n=>{const l=n.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&n.preventDefault()}),onFocusOutside:f.composeEventHandlers(e.onFocusOutside,n=>n.preventDefault())})}),re=a.forwardRef((e,t)=>{const o=u(d,e.__scopeDialog),r=a.useRef(!1),i=a.useRef(!1);return s.jsx(q,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(r.current||o.triggerRef.current?.focus(),n.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(r.current=!0,n.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=n.target;o.triggerRef.current?.contains(l)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&i.current&&n.preventDefault()}})}),q=a.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:n,...l}=e,c=u(d,o),g=a.useRef(null),v=C.useComposedRefs(t,g);return U.useFocusGuards(),s.jsxs(s.Fragment,{children:[s.jsx(z.FocusScope,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:n,children:s.jsx(V.DismissableLayer,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":A(c.open),...l,ref:v,onDismiss:()=>c.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(se,{titleId:c.titleId}),s.jsx(ce,{contentRef:g,descriptionId:c.descriptionId})]})]})}),b="DialogTitle",I=a.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(b,o);return s.jsx(p.Primitive.h2,{id:i.titleId,...r,ref:t})});I.displayName=b;var $="DialogDescription",T=a.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u($,o);return s.jsx(p.Primitive.p,{id:i.descriptionId,...r,ref:t})});T.displayName=$;var W="DialogClose",j=a.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,i=u(W,o);return s.jsx(p.Primitive.button,{type:"button",...r,ref:t,onClick:f.composeEventHandlers(e.onClick,()=>i.onOpenChange(!1))})});j.displayName=W;function A(e){return e?"open":"closed"}var k="DialogTitleWarning",[ie,G]=M.createContext(k,{contentName:d,titleName:b,docsSlug:"dialog"}),se=({titleId:e})=>{const t=G(k),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
+
3
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
+
5
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return a.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},ae="DialogDescriptionWarning",ce=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G(ae).contentName}}.`;return a.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},le=_,ue=y,de=O,ge=h,fe=N,pe=I,De=T,ve=j;exports.Close=ve;exports.Content=fe;exports.Description=De;exports.Dialog=_;exports.DialogClose=j;exports.DialogContent=N;exports.DialogDescription=T;exports.DialogOverlay=h;exports.DialogPortal=O;exports.DialogTitle=I;exports.DialogTrigger=y;exports.Overlay=ge;exports.Portal=de;exports.Root=le;exports.Title=pe;exports.Trigger=ue;exports.WarningProvider=ie;exports.createDialogScope=X;
2
6
  //# sourceMappingURL=index.cjs62.js.map