@powerhousedao/powerhouse-vetra-packages 6.1.0-dev.2 → 6.1.0-dev.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/assets/entry-Bzani6_n.js +313 -0
- package/dist/browser/assets/projection-entry-Bpu-8SnI.js +406 -0
- package/dist/browser/{dist-DOMEWT3x.js → connect-ZnLjvmRt.js} +13013 -10302
- package/dist/browser/connect-ZnLjvmRt.js.map +1 -0
- package/dist/browser/dist-C1nRM9t2.js +3768 -0
- package/dist/browser/dist-C1nRM9t2.js.map +1 -0
- package/dist/browser/{schemas-Bqem6NRm.js → dist-CXoKspdx.js} +131 -2
- package/dist/browser/dist-CXoKspdx.js.map +1 -0
- package/dist/browser/dist-D8H48e8N.js +2692 -0
- package/dist/browser/dist-D8H48e8N.js.map +1 -0
- package/dist/browser/{dist-CC1E3l2O.js → dist-DLFI75Zd.js} +37 -9
- package/dist/browser/dist-DLFI75Zd.js.map +1 -0
- package/dist/browser/{dist-DQgJ8n4d.js → document-drive-oqv68jDU.js} +432 -290
- package/dist/browser/document-drive-oqv68jDU.js.map +1 -0
- package/dist/browser/document-models/index.js +1 -1
- package/dist/browser/{documents-Bpu0aSLb.js → documents-D4ek7Ubv.js} +3 -3
- package/dist/browser/{documents-Bpu0aSLb.js.map → documents-D4ek7Ubv.js.map} +1 -1
- package/dist/browser/{editor-B3yz7YdR.js → editor-CoTq6fqT.js} +32 -31
- package/dist/browser/editor-CoTq6fqT.js.map +1 -0
- package/dist/browser/{editor-Dm_73jiz.js → editor-DC3bigBu.js} +5 -5
- package/dist/browser/{editor-Dm_73jiz.js.map → editor-DC3bigBu.js.map} +1 -1
- package/dist/browser/editors/document-model-editor/module.js +1 -1
- package/dist/browser/editors/generic-drive-explorer/index.js +6 -6
- package/dist/browser/editors/generic-drive-explorer/index.js.map +1 -1
- package/dist/browser/editors/generic-drive-explorer/module.js +1 -1
- package/dist/browser/{folder-view-H2ov-zId.js → folder-view-DmYBf2pP.js} +13 -12
- package/dist/browser/folder-view-DmYBf2pP.js.map +1 -0
- package/dist/browser/{graphql-editor-CnaQ3XWx.js → graphql-editor-CiGd_Li7.js} +15 -7
- package/dist/browser/{graphql-editor-CnaQ3XWx.js.map → graphql-editor-CiGd_Li7.js.map} +1 -1
- package/dist/{node/hooks-Lbsf6g-v.mjs → browser/hooks-CORHBNHb.js} +6 -4
- package/dist/browser/{hooks-Beny0xpe.js.map → hooks-CORHBNHb.js.map} +1 -1
- package/dist/browser/index.js +2 -2
- package/dist/{node/json-editor-CVGgDVh2.mjs → browser/json-editor-sEqd5piI.js} +12 -4
- package/dist/browser/json-editor-sEqd5piI.js.map +1 -0
- package/dist/browser/{style-DYS_RFSN.js → linting-Dn6pXRkK.js} +7 -14
- package/dist/browser/linting-Dn6pXRkK.js.map +1 -0
- package/dist/browser/{parser-B0sh99Kk.js → parser-CkF6Qt8V.js} +1 -1
- package/dist/browser/{parser-B0sh99Kk.js.map → parser-CkF6Qt8V.js.map} +1 -1
- package/dist/browser/{schema-context-C0GpuR27.js → schema-context-DY-GEGnY.js} +4 -4
- package/dist/browser/schema-context-DY-GEGnY.js.map +1 -0
- package/dist/browser/state-schemas-DJmzG_M8.js +308 -0
- package/dist/browser/state-schemas-DJmzG_M8.js.map +1 -0
- package/dist/node/{dist-1kPMPFPD.mjs → connect-BLC4PXD9.mjs} +13953 -11229
- package/dist/node/connect-BLC4PXD9.mjs.map +1 -0
- package/dist/node/dist-BeZaEP6S.mjs +2692 -0
- package/dist/node/dist-BeZaEP6S.mjs.map +1 -0
- package/dist/node/dist-Bm05eoTg.mjs +3769 -0
- package/dist/node/dist-Bm05eoTg.mjs.map +1 -0
- package/dist/node/{tslib.es6-DwVpIYUS.mjs → dist-Cn3iExnV.mjs} +489 -3
- package/dist/node/dist-Cn3iExnV.mjs.map +1 -0
- package/dist/node/{schemas-Cb8uEF9u.mjs → dist-fA4EItr0.mjs} +131 -2
- package/dist/node/dist-fA4EItr0.mjs.map +1 -0
- package/dist/node/{dist-Bz4SgEHs.mjs → document-drive-sM33juXr.mjs} +432 -290
- package/dist/node/document-drive-sM33juXr.mjs.map +1 -0
- package/dist/node/document-models/index.mjs +1 -1
- package/dist/node/{documents-BWJpUm9f.mjs → documents-BFBPmyw1.mjs} +3 -3
- package/dist/node/{documents-BWJpUm9f.mjs.map → documents-BFBPmyw1.mjs.map} +1 -1
- package/dist/node/{editor-W8QOlGXD.mjs → editor-BFBa9nsO.mjs} +32 -31
- package/dist/node/editor-BFBa9nsO.mjs.map +1 -0
- package/dist/node/{editor-BaXuDsby.mjs → editor-BrS98lEH.mjs} +5 -5
- package/dist/node/{editor-BaXuDsby.mjs.map → editor-BrS98lEH.mjs.map} +1 -1
- package/dist/node/editors/document-model-editor/module.mjs +1 -1
- package/dist/node/editors/generic-drive-explorer/index.mjs +6 -6
- package/dist/node/editors/generic-drive-explorer/index.mjs.map +1 -1
- package/dist/node/editors/generic-drive-explorer/module.mjs +1 -1
- package/dist/node/{folder-view-B0FNXbc0.mjs → folder-view-DHph3Yuu.mjs} +13 -12
- package/dist/node/folder-view-DHph3Yuu.mjs.map +1 -0
- package/dist/node/{graphql-Du2phcBf.mjs → graphql-DskHmkMe.mjs} +2 -2
- package/dist/node/{graphql-Du2phcBf.mjs.map → graphql-DskHmkMe.mjs.map} +1 -1
- package/dist/node/{graphql-editor-D1koK5kR.mjs → graphql-editor-CPq7oIbf.mjs} +14 -6
- package/dist/node/{graphql-editor-D1koK5kR.mjs.map → graphql-editor-CPq7oIbf.mjs.map} +1 -1
- package/dist/{browser/hooks-Beny0xpe.js → node/hooks-DJrjfVaS.mjs} +6 -4
- package/dist/node/{hooks-Lbsf6g-v.mjs.map → hooks-DJrjfVaS.mjs.map} +1 -1
- package/dist/node/index.mjs +2 -2
- package/dist/{browser/json-editor-h3cffF6X.js → node/json-editor-L32CP7TS.mjs} +12 -4
- package/dist/node/json-editor-L32CP7TS.mjs.map +1 -0
- package/dist/node/{style-CxHkfyna.mjs → linting-Dx50GuLN.mjs} +7 -14
- package/dist/node/linting-Dx50GuLN.mjs.map +1 -0
- package/dist/node/{schema-context-mLgEY1Hh.mjs → schema-context-CX5ml_9t.mjs} +4 -4
- package/dist/node/schema-context-CX5ml_9t.mjs.map +1 -0
- package/dist/node/state-schemas-XTTjQZOe.mjs +309 -0
- package/dist/node/state-schemas-XTTjQZOe.mjs.map +1 -0
- package/package.json +10 -10
- package/style.css +1 -0
- package/dist/browser/connect-CKdlDSUw.js +0 -9460
- package/dist/browser/connect-CKdlDSUw.js.map +0 -1
- package/dist/browser/dist-BXygvBtd.js +0 -132
- package/dist/browser/dist-BXygvBtd.js.map +0 -1
- package/dist/browser/dist-CC1E3l2O.js.map +0 -1
- package/dist/browser/dist-DOMEWT3x.js.map +0 -1
- package/dist/browser/dist-DQgJ8n4d.js.map +0 -1
- package/dist/browser/editor-B3yz7YdR.js.map +0 -1
- package/dist/browser/folder-view-H2ov-zId.js.map +0 -1
- package/dist/browser/json-editor-h3cffF6X.js.map +0 -1
- package/dist/browser/schema-context-C0GpuR27.js.map +0 -1
- package/dist/browser/schemas-Bqem6NRm.js.map +0 -1
- package/dist/browser/state-schemas-C5NPeV6-.js +0 -674
- package/dist/browser/state-schemas-C5NPeV6-.js.map +0 -1
- package/dist/browser/style-DYS_RFSN.js.map +0 -1
- package/dist/browser/tslib.es6-DRuVAsR8.js +0 -32
- package/dist/browser/tslib.es6-DRuVAsR8.js.map +0 -1
- package/dist/node/connect-SGvLzr5K.mjs +0 -9475
- package/dist/node/connect-SGvLzr5K.mjs.map +0 -1
- package/dist/node/dist-1kPMPFPD.mjs.map +0 -1
- package/dist/node/dist-BQTIepWC.mjs +0 -132
- package/dist/node/dist-BQTIepWC.mjs.map +0 -1
- package/dist/node/dist-Bz4SgEHs.mjs.map +0 -1
- package/dist/node/dist-Cay1iRRr.mjs +0 -491
- package/dist/node/dist-Cay1iRRr.mjs.map +0 -1
- package/dist/node/editor-W8QOlGXD.mjs.map +0 -1
- package/dist/node/folder-view-B0FNXbc0.mjs.map +0 -1
- package/dist/node/json-editor-CVGgDVh2.mjs.map +0 -1
- package/dist/node/schema-context-mLgEY1Hh.mjs.map +0 -1
- package/dist/node/schemas-Cb8uEF9u.mjs.map +0 -1
- package/dist/node/state-schemas-DAthoEEk.mjs +0 -675
- package/dist/node/state-schemas-DAthoEEk.mjs.map +0 -1
- package/dist/node/style-CxHkfyna.mjs.map +0 -1
- package/dist/node/tslib.es6-DwVpIYUS.mjs.map +0 -1
- package/dist/style.css +0 -906
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-BFBa9nsO.mjs","names":["use","React","React","r","e","s","i","t","o","r","e","n.parse","n.parseAsync","n.$ZodError","z.string","z\n .string","z\n .object","z\n .union","z.url","z.literal","Label","React","React","LabelPrimitive.Root","React","zodResolver","z.object","z.object","z.string"],"sources":["../../../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.4_@types+react-dom@19.2.3_@types+react@19.2.14__@types+re_c8c8fd2647f03197dbf56370d7498033/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../../node_modules/.pnpm/clsx@2.0.0/node_modules/clsx/dist/clsx.mjs","../../../../node_modules/.pnpm/class-variance-authority@0.7.0/node_modules/class-variance-authority/dist/index.mjs","../../editors/document-model-editor/components/divider.tsx","../../../../node_modules/.pnpm/@hookform+resolvers@5.2.2_react-hook-form@7.71.2_react@19.2.6_/node_modules/@hookform/resolvers/dist/resolvers.mjs","../../../../node_modules/.pnpm/@hookform+resolvers@5.2.2_react-hook-form@7.71.2_react@19.2.6_/node_modules/@hookform/resolvers/zod/dist/zod.mjs","../../editors/document-model-editor/schemas/inputs.ts","../../editors/document-model-editor/context/form-context.ts","../../editors/document-model-editor/hooks/useFormField.ts","../../../../node_modules/.pnpm/@radix-ui+react-label@2.1.8_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@_8d35ec453e0b59eefe06771bb1432577/node_modules/@radix-ui/react-label/dist/index.mjs","../../editors/document-model-editor/components/label.tsx","../../editors/document-model-editor/components/form.tsx","../../editors/document-model-editor/components/text-area.tsx","../../editors/document-model-editor/components/text-field.tsx","../../editors/document-model-editor/components/model-metadata-form.tsx","../../editors/document-model-editor/components/module-form.tsx","../../editors/document-model-editor/components/operation-form.tsx","../../editors/document-model-editor/components/operation-description-form.tsx","../../editors/document-model-editor/components/operation-error-form.tsx","../../editors/document-model-editor/components/operation-errors.tsx","../../editors/document-model-editor/components/operation.tsx","../../editors/document-model-editor/components/operations.tsx","../../editors/document-model-editor/components/module.tsx","../../editors/document-model-editor/components/modules.tsx","../../editors/document-model-editor/config.ts","../../editors/document-model-editor/hooks/useDocumentModelDocument.ts","../../editors/document-model-editor/editor.tsx"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nvar use = React[\" use \".trim().toString()];\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } 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 \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`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","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f);else for(t in e)e[t]&&(n&&(n+=\" \"),n+=t);return n}export function clsx(){for(var e,t,f=0,n=\"\";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? \"\".concat(value) : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>{\n return (props)=>{\n var ref;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants , defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{\n let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n};\n\n\n//# sourceMappingURL=index.mjs.map","import { twMerge } from \"tailwind-merge\";\n\ntype Props = {\n className?: string;\n size?: \"sm\" | \"md\" | \"lg\";\n margin?: \"sm\" | \"md\" | \"lg\";\n};\nexport function Divider({ className, size = \"sm\", margin = \"md\" }: Props) {\n function getSize() {\n if (size === \"sm\") return \"h-px\";\n if (size === \"md\") return \"h-1\";\n return \"h-1.5\";\n }\n\n function getMargin() {\n if (margin === \"sm\") return \"my-4\";\n if (margin === \"md\") return \"my-6\";\n return \"my-8\";\n }\n\n const sizeClass = getSize();\n const marginClass = getMargin();\n return (\n <div\n className={twMerge(\n \"bg-gray-200 dark:bg-slate-600 dark:text-slate-100\",\n sizeClass,\n marginClass,\n className,\n )}\n />\n );\n}\n","import{get as e,set as t}from\"react-hook-form\";const r=(t,r,o)=>{if(t&&\"reportValidity\"in t){const s=e(o,r);t.setCustomValidity(s&&s.message||\"\"),t.reportValidity()}},o=(e,t)=>{for(const o in t.fields){const s=t.fields[o];s&&s.ref&&\"reportValidity\"in s.ref?r(s.ref,o,e):s&&s.refs&&s.refs.forEach(t=>r(t,o,e))}},s=(r,s)=>{s.shouldUseNativeValidation&&o(r,s);const n={};for(const o in r){const f=e(s.fields,o),c=Object.assign(r[o]||{},{ref:f&&f.ref});if(i(s.names||Object.keys(r),o)){const r=Object.assign({},e(n,o));t(r,\"root\",c),t(n,o,r)}else t(n,o,c)}return n},i=(e,t)=>{const r=n(t);return e.some(e=>n(e).match(`^${r}\\\\.\\\\d+`))};function n(e){return e.replace(/\\]|\\[/g,\"\")}export{s as toNestErrors,o as validateFieldsNatively};\n//# sourceMappingURL=resolvers.mjs.map\n","import{validateFieldsNatively as r,toNestErrors as e}from\"@hookform/resolvers\";import{appendErrors as o}from\"react-hook-form\";import*as n from\"zod/v4/core\";function t(r,e){try{var o=r()}catch(r){return e(r)}return o&&o.then?o.then(void 0,e):o}function s(r,e){for(var n={};r.length;){var t=r[0],s=t.code,i=t.message,a=t.path.join(\".\");if(!n[a])if(\"unionErrors\"in t){var u=t.unionErrors[0].errors[0];n[a]={message:u.message,type:u.code}}else n[a]={message:i,type:s};if(\"unionErrors\"in t&&t.unionErrors.forEach(function(e){return e.errors.forEach(function(e){return r.push(e)})}),e){var c=n[a].types,f=c&&c[t.code];n[a]=o(a,e,n,s,f?[].concat(f,t.message):t.message)}r.shift()}return n}function i(r,e){for(var n={};r.length;){var t=r[0],s=t.code,i=t.message,a=t.path.join(\".\");if(!n[a])if(\"invalid_union\"===t.code&&t.errors.length>0){var u=t.errors[0][0];n[a]={message:u.message,type:u.code}}else n[a]={message:i,type:s};if(\"invalid_union\"===t.code&&t.errors.forEach(function(e){return e.forEach(function(e){return r.push(e)})}),e){var c=n[a].types,f=c&&c[t.code];n[a]=o(a,e,n,s,f?[].concat(f,t.message):t.message)}r.shift()}return n}function a(o,a,u){if(void 0===u&&(u={}),function(r){return\"_def\"in r&&\"object\"==typeof r._def&&\"typeName\"in r._def}(o))return function(n,i,c){try{return Promise.resolve(t(function(){return Promise.resolve(o[\"sync\"===u.mode?\"parse\":\"parseAsync\"](n,a)).then(function(e){return c.shouldUseNativeValidation&&r({},c),{errors:{},values:u.raw?Object.assign({},n):e}})},function(r){if(function(r){return Array.isArray(null==r?void 0:r.issues)}(r))return{values:{},errors:e(s(r.errors,!c.shouldUseNativeValidation&&\"all\"===c.criteriaMode),c)};throw r}))}catch(r){return Promise.reject(r)}};if(function(r){return\"_zod\"in r&&\"object\"==typeof r._zod}(o))return function(s,c,f){try{return Promise.resolve(t(function(){return Promise.resolve((\"sync\"===u.mode?n.parse:n.parseAsync)(o,s,a)).then(function(e){return f.shouldUseNativeValidation&&r({},f),{errors:{},values:u.raw?Object.assign({},s):e}})},function(r){if(function(r){return r instanceof n.$ZodError}(r))return{values:{},errors:e(i(r.issues,!f.shouldUseNativeValidation&&\"all\"===f.criteriaMode),f)};throw r}))}catch(r){return Promise.reject(r)}};throw new Error(\"Invalid input: not a Zod schema\")}export{a as zodResolver};\n//# sourceMappingURL=zod.module.js.map\n","import { z } from \"zod\";\nimport { snakeCase, constantCase } from \"change-case\";\n\nconst isUppercase = (value: string) => !/\\p{Ll}/u.test(value);\nconst isLowercase = (value: string) => !/\\p{Lu}/u.test(value);\n\nconst whitespaceRegex = /\\s+/g;\n\nexport function containsSpaces(s: string) {\n return whitespaceRegex.test(s);\n}\n\nexport function replaceSpaces(s: string) {\n return s.replace(whitespaceRegex, \"_\");\n}\n\ntype SchemaOptions = {\n required?: boolean;\n allowEmpty?: boolean;\n unique?: string[];\n};\n\nexport function createNameSchema(options: SchemaOptions = {}) {\n const { required = false, allowEmpty = false, unique = [] } = options;\n\n const baseSchema = allowEmpty ? z.string() : z.string().min(1);\n\n const uniqueRefinement = baseSchema.refine(\n (value) => {\n if (!value && allowEmpty) return true;\n return !unique\n .map((n) => n.toLowerCase())\n .includes(value.replace(/^\\s+|\\s+$/g, \"_\").toLowerCase());\n },\n { message: \"Item with this name already exists\" },\n );\n\n if (!required) {\n return unique.length > 0\n ? z\n .string()\n .optional()\n .refine(\n (value) => {\n if (value === undefined) return true;\n if (!value && allowEmpty) return true;\n return !unique\n .map((n) => n.toLowerCase())\n .includes(value.replace(/^\\s+|\\s+$/g, \"_\").toLowerCase());\n },\n { message: \"Item with this name already exists\" },\n )\n : z.string().optional();\n }\n\n return unique.length > 0 ? uniqueRefinement : baseSchema;\n}\n\nexport function createConstantCaseSchema(options: SchemaOptions = {}) {\n return createNameSchema(options)\n .transform((value) => (value ? value.toUpperCase() : value))\n .refine((value) => !value || isUppercase(value), {\n message: \"Must be uppercase\",\n });\n}\n\nexport function createLowercaseSnakeCaseSchema(options: SchemaOptions = {}) {\n return createNameSchema(options)\n .transform((value) => (value ? value.toLowerCase() : value))\n .refine((value) => !value || isLowercase(value), {\n message: \"Must be lowercase\",\n });\n}\n\nexport function toLowercaseSnakeCase(\n value: string,\n options: SchemaOptions = {},\n) {\n return createLowercaseSnakeCaseSchema(options).parse(\n snakeCase(value),\n ) as LowercaseSnakeCase;\n}\n\nexport function toConstantCase(value: string, options: SchemaOptions = {}) {\n return createConstantCaseSchema(options).parse(\n constantCase(value),\n ) as ConstantCase;\n}\n\nexport type SnakeCase = `${string}_${string}`;\nexport type LowercaseSnakeCase = Lowercase<SnakeCase>;\nexport type ConstantCase = Uppercase<SnakeCase>;\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n\nexport const AuthorSchema = z\n .object({\n name: createNameSchema({ allowEmpty: true }),\n website: z\n .union([z.url(), z.literal(\"\")])\n .optional()\n .default(\"\"),\n })\n .default({\n name: \"\",\n website: \"\",\n });\n","import React from \"react\";\nimport type { FieldValues, FieldPath } from \"react-hook-form\";\n\nexport type FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName;\n};\n\nexport const FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue,\n);\n\nexport type FormItemContextValue = {\n id: string;\n};\n\nexport const FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue,\n);\n","import React from \"react\";\nimport { useFormContext } from \"react-hook-form\";\nimport { FormFieldContext, FormItemContext } from \"../context/form-context.js\";\n\nexport const useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\");\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n","\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport type { VariantProps } from \"class-variance-authority\";\nimport { cva } from \"class-variance-authority\";\nimport { twMerge } from \"tailwind-merge\";\n\nconst labelVariants = cva(\n \"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={twMerge(labelVariants(), className)}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","import * as React from \"react\";\nimport type * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport type { ControllerProps, FieldPath, FieldValues } from \"react-hook-form\";\nimport { Controller, FormProvider } from \"react-hook-form\";\nimport { FormFieldContext, FormItemContext } from \"../context/form-context.js\";\nimport { useFormField } from \"../hooks/useFormField.js\";\nimport { twMerge } from \"tailwind-merge\";\nimport { Label } from \"./label.js\";\n\nconst Form = FormProvider;\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst FormItem = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={className} {...props} />\n </FormItemContext.Provider>\n );\n});\nFormItem.displayName = \"FormItem\";\n\nconst FormLabel = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n ref={ref}\n className={twMerge(error && \"text-red-900 dark:text-red-400\", className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n});\nFormLabel.displayName = \"FormLabel\";\n\nconst FormControl = React.forwardRef<\n React.ElementRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={\n !error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n );\n});\nFormControl.displayName = \"FormControl\";\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={twMerge(\n \"text-sm text-gray-700 dark:text-slate-200\",\n className,\n )}\n {...props}\n />\n );\n});\nFormDescription.displayName = \"FormDescription\";\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={twMerge(\n \"text-sm font-medium text-red-800 dark:text-red-100\",\n className,\n )}\n {...props}\n >\n {body}\n </p>\n );\n});\nFormMessage.displayName = \"FormMessage\";\n\nexport {\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};\n","import * as React from \"react\";\nimport { forwardRef, useImperativeHandle, useRef, useCallback } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nexport interface TextareaHandle {\n focus: () => void;\n element: HTMLTextAreaElement | null;\n}\n\nexport const Textarea = forwardRef<TextareaHandle, TextareaProps>(\n ({ className, ...props }, ref) => {\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n const adjustHeight = useCallback((textarea: HTMLTextAreaElement) => {\n textarea.style.height = \"auto\";\n const newHeight = Math.max(textarea.scrollHeight, textarea.offsetHeight);\n textarea.style.height = `${newHeight}px`;\n }, []);\n\n const handleInput = useCallback(\n (e: React.FormEvent<HTMLTextAreaElement>) => {\n adjustHeight(e.currentTarget);\n },\n [adjustHeight],\n );\n\n React.useEffect(() => {\n if (textareaRef.current) {\n adjustHeight(textareaRef.current);\n }\n }, [adjustHeight]);\n\n useImperativeHandle(ref, () => ({\n focus: () => textareaRef.current?.focus(),\n element: textareaRef.current,\n }));\n\n return (\n <textarea\n {...props}\n className={twMerge(\n \"min-h-10 w-full resize-none rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 placeholder:text-gray-600 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-500 dark:bg-slate-600 dark:text-slate-100 dark:placeholder:text-slate-300\",\n className,\n )}\n ref={textareaRef}\n onInput={handleInput}\n />\n );\n },\n);\nTextarea.displayName = \"Textarea\";\n","import { zodResolver } from \"@hookform/resolvers/zod\";\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useRef,\n} from \"react\";\nimport type { FieldValues, Resolver } from \"react-hook-form\";\nimport { useForm } from \"react-hook-form\";\nimport { z } from \"zod\";\nimport { createNameSchema } from \"../schemas/inputs.js\";\nimport { compareStringsWithoutWhitespace } from \"../utils/helpers.js\";\nimport {\n Form,\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from \"./form.js\";\nimport type { TextareaHandle } from \"./text-area.js\";\nimport { Textarea } from \"./text-area.js\";\n\ntype TextFieldProps = {\n name: string;\n value: string | null | undefined;\n onSubmit: (value: string) => void;\n label?: string;\n placeholder?: string;\n className?: string;\n rows?: number;\n focusOnMount?: boolean;\n required?: boolean;\n allowEmpty?: boolean;\n unique?: string[];\n shouldReset?: boolean;\n onChange?: (value: string) => void;\n};\n\ntype TextFieldHandle = {\n focus: () => void;\n};\n\nexport const TextField = forwardRef<TextFieldHandle, TextFieldProps>(\n (\n {\n name,\n value,\n onSubmit,\n label,\n placeholder,\n unique,\n className = \"\",\n rows = 1,\n focusOnMount = false,\n required = false,\n allowEmpty = false,\n shouldReset = false,\n onChange,\n },\n ref,\n ) => {\n const textareaRef = useRef<TextareaHandle | null>(null);\n const id = useId();\n useEffect(() => {\n if (focusOnMount && textareaRef.current) {\n textareaRef.current.focus();\n }\n }, [focusOnMount]);\n\n const fieldSchema = z.object({\n [name]: createNameSchema({ required, allowEmpty, unique }),\n });\n\n const form = useForm({\n resolver: zodResolver(\n fieldSchema as unknown as Parameters<typeof zodResolver>[0],\n ) as Resolver<FieldValues>,\n defaultValues: {\n [name]: value ?? \"\",\n },\n });\n\n const handleSubmit = useCallback(\n (values: FieldValues) => {\n const newValue = values[name] as string | undefined;\n if (newValue === undefined || value === newValue) return;\n onSubmit(newValue);\n if (shouldReset) form.reset({ [name]: \"\" });\n },\n [name, value, onSubmit, form, shouldReset],\n );\n\n const handleBlur = useCallback(async () => {\n const currentValue = (form.getValues()[name] as string | undefined) ?? \"\";\n\n if (value === null || value === undefined) {\n if (!currentValue || currentValue.trim() === \"\") return;\n }\n\n if (compareStringsWithoutWhitespace(currentValue, value ?? \"\")) return;\n\n try {\n await form.trigger(); // Trigger validation\n if (form.formState.isValid) {\n await form.handleSubmit(handleSubmit)();\n }\n } catch (_e) {\n // Allow blur to proceed even if validation fails\n }\n }, [form, handleSubmit, name, value]);\n\n const onEnterKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n (e.target as HTMLTextAreaElement).blur();\n }\n },\n [],\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n const newValue = e.target.value;\n onChange?.(newValue);\n },\n [onChange],\n );\n\n useImperativeHandle(ref, () => ({\n focus: () => textareaRef.current?.focus(),\n }));\n\n useEffect(() => {\n form.reset({ [name]: value ?? \"\" });\n }, [form, name, value]);\n\n return (\n <Form {...form}>\n <FormField\n control={form.control}\n name={name}\n render={({ field }) => (\n <FormItem className=\"grid h-full grid-rows-[auto,1fr] gap-2 overflow-visible\">\n {!!label && (\n <FormLabel\n htmlFor={name}\n className=\"text-sm font-medium text-gray-700 dark:text-slate-200\"\n >\n {label}\n </FormLabel>\n )}\n <FormControl>\n <Textarea\n {...field}\n id={id}\n name={name}\n ref={(node) => {\n if (node) {\n field.ref(node.element);\n textareaRef.current = node;\n }\n }}\n placeholder={placeholder}\n onBlur={() => void handleBlur()}\n onChange={(e) => {\n field.onChange(e);\n handleChange(e);\n }}\n onKeyDown={onEnterKeyDown}\n rows={rows}\n className={className}\n />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n </Form>\n );\n },\n);\n\nTextField.displayName = \"TextField\";\n","import { useCallback } from \"react\";\nimport { z } from \"zod\";\nimport type { Scope } from \"../types/documents.js\";\nimport {\n handleModelNameChange,\n makeInitialSchemaDoc,\n renameSchemaType,\n} from \"../utils/helpers.js\";\nimport { TextField } from \"./text-field.js\";\n\nexport const MetadataFormSchema = z.object({\n name: z.string(),\n documentType: z.string(),\n extension: z.string().optional().default(\"\"),\n description: z.string(),\n authorName: z.string(),\n authorWebsite: z.string(),\n});\n\nexport type MetadataFormValues = z.infer<typeof MetadataFormSchema>;\n\ntype Props = MetadataFormValues & {\n globalStateSchema: string;\n localStateSchema: string;\n setModelName: (name: string) => void;\n setModelId: (id: string) => void;\n setModelExtension: (extension: string) => void;\n setModelDescription: (description: string) => void;\n setAuthorName: (authorName: string) => void;\n setAuthorWebsite: (authorWebsite: string) => void;\n setStateSchema: (schema: string, scope: Scope) => void;\n};\n\nexport default function ModelMetadata(props: Props) {\n return (\n <div>\n <ModelNameForm {...props} />\n <div className=\"flex h-full flex-col gap-4\">\n <div className=\"grid flex-1 grid-cols-3 items-start gap-4\">\n <div className=\"col-span-2 flex h-full flex-col gap-4\">\n <div className=\"shrink-0\">\n <DocumentTypeForm {...props} />\n </div>\n <div className=\"min-h-0 flex-1\">\n <DescriptionForm {...props} />\n </div>\n </div>\n <div className=\"col-span-1 flex flex-col gap-4\">\n <AuthorNameForm {...props} />\n <AuthorWebsiteForm {...props} />\n <ModelExtensionForm {...props} />\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nexport function ModelNameForm(props: Props) {\n const {\n name,\n globalStateSchema,\n localStateSchema,\n setModelName,\n setStateSchema,\n } = props;\n\n const onSubmit = useCallback(\n (newName: string) => {\n if (name === newName) {\n return;\n }\n setModelName(newName);\n\n const hasExistingSchema = !!globalStateSchema;\n\n if (!hasExistingSchema) {\n const initialSchemaDoc = makeInitialSchemaDoc(newName, \"global\");\n setStateSchema(initialSchemaDoc, \"global\");\n return;\n }\n const newSchema = renameSchemaType(\n globalStateSchema,\n name,\n newName,\n \"global\",\n );\n setStateSchema(newSchema, \"global\");\n\n if (localStateSchema) {\n const newLocalStateSchema = renameSchemaType(\n localStateSchema,\n name,\n newName,\n \"local\",\n );\n setStateSchema(newLocalStateSchema, \"local\");\n }\n handleModelNameChange({\n oldName: name,\n newName,\n globalStateSchema,\n localStateSchema,\n setStateSchema,\n });\n },\n [name, globalStateSchema, localStateSchema, setStateSchema, setModelName],\n );\n\n return (\n <TextField\n name=\"name\"\n value={name}\n onSubmit={onSubmit}\n placeholder=\"Model name\"\n className=\"border-none pl-0 text-xl font-bold text-gray-900 dark:text-slate-50\"\n required\n focusOnMount\n />\n );\n}\n\nexport function DocumentTypeForm(props: Props) {\n const { documentType, setModelId } = props;\n\n return (\n <TextField\n label=\"Document Type *\"\n name=\"powerhouse/document-model\"\n value={documentType}\n onSubmit={setModelId}\n placeholder=\"Document Type\"\n required\n />\n );\n}\n\nexport function ModelExtensionForm(props: Props) {\n const { extension, setModelExtension } = props;\n\n return (\n <TextField\n name=\"extension\"\n value={extension}\n onSubmit={setModelExtension}\n label=\"Model Extension\"\n placeholder=\"Example .phdm\"\n allowEmpty\n />\n );\n}\n\nexport function DescriptionForm(props: Props) {\n const { description, setModelDescription } = props;\n\n return (\n <TextField\n name=\"description\"\n label=\"Model Description\"\n value={description}\n onSubmit={setModelDescription}\n placeholder=\"Describe your document to others\"\n allowEmpty\n className=\"h-full\"\n />\n );\n}\n\nexport function AuthorNameForm(props: Props) {\n const { authorName, setAuthorName } = props;\n\n return (\n <TextField\n name=\"authorName\"\n value={authorName}\n onSubmit={setAuthorName}\n label=\"Author Name\"\n placeholder=\"Username or organisation\"\n allowEmpty\n />\n );\n}\n\nexport function AuthorWebsiteForm(props: Props) {\n const { authorWebsite, setAuthorWebsite } = props;\n\n return (\n <TextField\n name=\"authorWebsite\"\n value={authorWebsite}\n label=\"Website URL\"\n onSubmit={(newAuthorWebsite) => {\n if (!!authorWebsite && !newAuthorWebsite) return;\n setAuthorWebsite(newAuthorWebsite);\n }}\n placeholder=\"https://www.powerhouse.inc/\"\n allowEmpty\n />\n );\n}\n","import type { ModuleSpecification } from \"@powerhousedao/shared/document-model\";\nimport { toLowercaseSnakeCase } from \"../schemas/inputs.js\";\nimport { TextField } from \"./text-field.js\";\n\ntype Props = {\n modules?: ModuleSpecification[];\n module?: ModuleSpecification;\n onAddModule: (name: string) => Promise<string | undefined>;\n updateModuleName: (id: string, name: string) => void;\n};\n\nexport function ModuleForm({\n module,\n onAddModule,\n updateModuleName,\n modules = [],\n}: Props) {\n const isEdit = !!module;\n const moduleNames = modules.map((m) => m.name);\n\n const handleSubmit = async (name: string) => {\n const formattedName = toLowercaseSnakeCase(name);\n if (!formattedName.length) return;\n\n if (isEdit) {\n if (formattedName !== module.name) {\n updateModuleName(module.id, formattedName);\n }\n } else {\n await onAddModule(formattedName);\n }\n };\n\n return (\n <TextField\n key={module?.id ?? \"new\"}\n name=\"name\"\n label={isEdit ? \"Module name *\" : \"Add module *\"}\n value={module?.name}\n onSubmit={(name) => void handleSubmit(name)}\n placeholder=\"Add module\"\n unique={moduleNames}\n shouldReset={!isEdit}\n required\n />\n );\n}\n","import type { ModuleSpecification } from \"@powerhousedao/shared/document-model\";\nimport { toConstantCase } from \"../schemas/inputs.js\";\nimport { TextField } from \"./text-field.js\";\n\ntype Props = {\n module: ModuleSpecification;\n operation?: ModuleSpecification[\"operations\"][number];\n focusOnMount?: boolean;\n allOperationNames: string[];\n onAddOperationAndInitialSchema: (\n moduleId: string,\n name: string,\n ) => Promise<string | undefined>;\n updateOperationName: (id: string, name: string) => void;\n deleteOperation: (id: string) => void;\n};\n\nexport function OperationForm({\n operation,\n module,\n focusOnMount,\n allOperationNames,\n onAddOperationAndInitialSchema,\n updateOperationName,\n deleteOperation,\n}: Props) {\n const isEdit = !!operation;\n\n const handleSubmit = async (name: string) => {\n if (isEdit && name === \"\") {\n deleteOperation(operation.id);\n return;\n }\n\n const formattedName = toConstantCase(name);\n\n if (isEdit) {\n if (formattedName !== operation.name) {\n updateOperationName(operation.id, formattedName);\n }\n } else {\n await onAddOperationAndInitialSchema(module.id, formattedName);\n }\n };\n\n const handleChange = (value: string) => {\n if (isEdit && value === \"\") {\n deleteOperation(operation.id);\n }\n };\n\n return (\n <TextField\n name=\"name\"\n value={operation?.name}\n label={isEdit ? \"Operation name *\" : \"Add operation *\"}\n onSubmit={(name) => void handleSubmit(name)}\n onChange={handleChange}\n placeholder=\"Add operation\"\n required={!isEdit}\n allowEmpty={!isEdit}\n shouldReset={!isEdit}\n focusOnMount={focusOnMount}\n unique={allOperationNames}\n />\n );\n}\n","import type { ModuleSpecification } from \"@powerhousedao/shared/document-model\";\nimport { useEffect, useRef } from \"react\";\nimport { TextField } from \"./text-field.js\";\n\ntype Props = {\n operation: ModuleSpecification[\"operations\"][number];\n focusOnMount?: boolean;\n setOperationDescription: (id: string, description: string) => void;\n};\n\nexport function OperationDescriptionForm({\n operation,\n focusOnMount,\n setOperationDescription,\n}: Props) {\n const textFieldRef = useRef<{ focus: () => void } | null>(null);\n\n useEffect(() => {\n if (focusOnMount && textFieldRef.current) {\n textFieldRef.current.focus();\n }\n }, [focusOnMount]);\n\n return (\n <TextField\n ref={textFieldRef}\n name=\"description\"\n value={operation.description}\n onSubmit={(newDescription) =>\n setOperationDescription(operation.id, newDescription)\n }\n label=\"Operation description\"\n allowEmpty\n placeholder=\"Operation Description\"\n />\n );\n}\n","import type {\n ModuleSpecification,\n OperationErrorSpecification,\n} from \"@powerhousedao/shared/document-model\";\nimport { pascalCase } from \"change-case\";\nimport { useRef } from \"react\";\nimport { TextField } from \"./text-field.js\";\n\ntype Props = {\n operation: ModuleSpecification[\"operations\"][number];\n error?: OperationErrorSpecification;\n focusOnMount?: boolean;\n onSubmit?: () => void;\n onAddOperationError: (\n operationId: string,\n errorName: string,\n ) => Promise<string | undefined>;\n deleteOperationError: (id: string) => void;\n setOperationErrorName: (\n operationId: string,\n errorId: string,\n name: string,\n ) => void;\n};\n\nexport function OperationErrorForm({\n operation,\n error,\n focusOnMount,\n onSubmit,\n onAddOperationError,\n deleteOperationError,\n setOperationErrorName,\n}: Props) {\n const textFieldRef = useRef<{ focus: () => void } | null>(null);\n const isEdit = !!error;\n const allOperationErrorNames = operation.errors\n .map((o) => o.name)\n .filter((n) => n !== null);\n\n const handleSubmit = (name: string) => {\n if (isEdit && name === \"\") {\n deleteOperationError(error.id);\n return;\n }\n\n const formattedName = pascalCase(name);\n\n if (isEdit) {\n setOperationErrorName(operation.id, error.id, formattedName);\n } else {\n void onAddOperationError(operation.id, formattedName);\n }\n onSubmit?.();\n };\n\n const handleChange = (value: string) => {\n if (isEdit && value === \"\") {\n deleteOperationError(error.id);\n }\n };\n\n return (\n <TextField\n ref={textFieldRef}\n name=\"name\"\n value={error?.name}\n onSubmit={handleSubmit}\n onChange={handleChange}\n placeholder=\"Add exception\"\n required={!isEdit}\n allowEmpty={!isEdit}\n shouldReset={!isEdit}\n unique={allOperationErrorNames}\n focusOnMount={focusOnMount}\n />\n );\n}\n","import type { ModuleSpecification } from \"@powerhousedao/shared/document-model\";\nimport { useCallback, useId, useState } from \"react\";\nimport { OperationErrorForm } from \"./operation-error-form.js\";\n\ntype Props = {\n operation: ModuleSpecification[\"operations\"][number];\n addOperationError: (\n operationId: string,\n errorName: string,\n ) => Promise<string | undefined>;\n deleteOperationError: (id: string) => void;\n setOperationErrorName: (\n operationId: string,\n errorId: string,\n name: string,\n ) => void;\n};\n\nexport function OperationErrors({\n operation,\n addOperationError,\n deleteOperationError,\n setOperationErrorName,\n}: Props) {\n const addErrorFormId = useId();\n const [shouldFocusAddForm, setShouldFocusAddForm] = useState(false);\n\n const onAddOperationError = useCallback(\n async (operationId: string, error: string) => {\n const errorId = await addOperationError(operationId, error);\n if (errorId) {\n setShouldFocusAddForm(true);\n }\n return errorId;\n },\n [addOperationError, setShouldFocusAddForm],\n );\n\n const onAddOperationErrorSubmit = useCallback(\n () => setShouldFocusAddForm(false),\n [setShouldFocusAddForm],\n );\n\n return (\n <ul className=\"ml-4 list-disc\">\n {operation.errors.map((error) => (\n <li key={error.id}>\n <OperationErrorForm\n error={error}\n operation={operation}\n onAddOperationError={onAddOperationError}\n deleteOperationError={deleteOperationError}\n setOperationErrorName={setOperationErrorName}\n />\n </li>\n ))}\n <li>\n <OperationErrorForm\n operation={operation}\n onAddOperationError={onAddOperationError}\n deleteOperationError={deleteOperationError}\n setOperationErrorName={setOperationErrorName}\n key={`${addErrorFormId}-${shouldFocusAddForm}`}\n focusOnMount={shouldFocusAddForm}\n onSubmit={onAddOperationErrorSubmit}\n />\n </li>\n </ul>\n );\n}\n","import type { ModuleSpecification } from \"@powerhousedao/shared/document-model\";\nimport { lazy, Suspense, useCallback } from \"react\";\nimport type { DocumentActionHandlers } from \"../types/documents.js\";\nimport { isEmptyOperationSchema } from \"../utils/helpers.js\";\nimport { ensureValidOperationSchemaInputName } from \"../utils/linting.js\";\nimport { OperationDescriptionForm } from \"./operation-description-form.js\";\nimport { OperationErrors } from \"./operation-errors.js\";\nimport { OperationForm } from \"./operation-form.js\";\nconst GraphqlEditor = lazy(() => import(\"./code-editors/graphql-editor.js\"));\nexport type WrappedHandlers = DocumentActionHandlers & {\n addOperationAndInitialSchema: (\n moduleId: string,\n name: string,\n ) => Promise<string | undefined>;\n};\ntype Props = {\n lastCreatedOperationId: string | null;\n operation: ModuleSpecification[\"operations\"][number];\n module: ModuleSpecification;\n allOperationNames: string[];\n onAddOperationAndInitialSchema: (\n moduleId: string,\n name: string,\n ) => Promise<string | undefined>;\n updateOperationName: (id: string, name: string) => void;\n deleteOperation: (id: string) => void;\n updateOperationSchema: (id: string, newDoc: string) => void;\n setOperationDescription: (id: string, description: string) => void;\n addOperationError: (\n operationId: string,\n errorName: string,\n ) => Promise<string | undefined>;\n deleteOperationError: (id: string) => void;\n setOperationErrorName: (\n operationId: string,\n errorId: string,\n name: string,\n ) => void;\n toggleNoInputRequired: (id: string, noInputRequired: boolean) => void;\n};\nexport function Operation(props: Props) {\n const {\n operation,\n module,\n allOperationNames,\n lastCreatedOperationId,\n onAddOperationAndInitialSchema,\n updateOperationName,\n deleteOperation,\n updateOperationSchema,\n setOperationDescription,\n addOperationError,\n deleteOperationError,\n setOperationErrorName,\n toggleNoInputRequired,\n } = props;\n\n const noInputRequired = isEmptyOperationSchema(operation.schema);\n\n const handleToggleNoInput = useCallback(\n (checked: boolean) => toggleNoInputRequired(operation.id, checked),\n [operation.id, toggleNoInputRequired],\n );\n\n const handleUpdateDocument = useCallback(\n (newDoc: string) => updateOperationSchema(operation.id, newDoc),\n [operation.id, updateOperationSchema],\n );\n\n const customLinter = useCallback(\n (doc: string) =>\n operation.name\n ? ensureValidOperationSchemaInputName(doc, operation.name)\n : [],\n [operation.name],\n );\n\n return (\n <div\n className=\"mt-4 grid grid-cols-2 gap-x-12\"\n style={{\n gridTemplateAreas: `\n \"left editor\"\n \"errors editor\"\n `,\n gridTemplateRows: \"auto 1fr\",\n }}\n >\n <div className=\"flex flex-col gap-2\" style={{ gridArea: \"left\" }}>\n <OperationForm\n operation={operation}\n onAddOperationAndInitialSchema={onAddOperationAndInitialSchema}\n updateOperationName={updateOperationName}\n deleteOperation={deleteOperation}\n module={module}\n allOperationNames={allOperationNames}\n />\n <OperationDescriptionForm\n operation={operation}\n focusOnMount={operation.id === lastCreatedOperationId}\n setOperationDescription={setOperationDescription}\n />\n </div>\n\n <div className=\"relative top-8\" style={{ gridArea: \"editor\" }}>\n <label className=\"mb-2 flex cursor-pointer items-center gap-2\">\n <input\n type=\"checkbox\"\n checked={noInputRequired}\n onChange={(e) => handleToggleNoInput(e.target.checked)}\n className=\"size-4 rounded-sm border-gray-300 dark:border-slate-500 dark:bg-slate-600 dark:text-slate-100\"\n />\n <span className=\"text-sm text-gray-700 dark:text-slate-200\">\n Operation with no inputs\n </span>\n </label>\n {!noInputRequired && (\n <Suspense>\n <GraphqlEditor\n doc={operation.schema ?? \"\"}\n updateDocumentInModel={handleUpdateDocument}\n customLinter={customLinter}\n />\n </Suspense>\n )}\n </div>\n\n <div style={{ gridArea: \"errors\" }}>\n <h3 className=\"my-2 text-sm font-medium text-gray-700 dark:text-slate-200\">\n Reducer Exceptions\n </h3>\n <OperationErrors\n operation={operation}\n addOperationError={addOperationError}\n deleteOperationError={deleteOperationError}\n setOperationErrorName={setOperationErrorName}\n />\n </div>\n </div>\n );\n}\n","import { OperationForm } from \"./operation-form.js\";\nimport type { ModuleSpecification } from \"@powerhousedao/shared/document-model\";\nimport { useCallback, useId, useState } from \"react\";\nimport { Operation } from \"./operation.js\";\n\ntype Props = {\n module: ModuleSpecification;\n allOperations: ModuleSpecification[\"operations\"];\n shouldFocusNewOperation: boolean;\n updateOperationName: (id: string, name: string) => void;\n deleteOperation: (id: string) => void;\n addOperationAndInitialSchema: (\n moduleId: string,\n name: string,\n ) => Promise<string | undefined>;\n updateOperationSchema: (id: string, newDoc: string) => void;\n setOperationDescription: (id: string, description: string) => void;\n addOperationError: (\n operationId: string,\n errorName: string,\n ) => Promise<string | undefined>;\n deleteOperationError: (id: string) => void;\n setOperationErrorName: (\n operationId: string,\n errorId: string,\n name: string,\n ) => void;\n toggleNoInputRequired: (id: string, noInputRequired: boolean) => void;\n};\nexport function Operations({\n module,\n allOperations,\n shouldFocusNewOperation,\n updateOperationName,\n deleteOperation,\n addOperationAndInitialSchema,\n addOperationError,\n deleteOperationError,\n setOperationErrorName,\n updateOperationSchema,\n setOperationDescription,\n toggleNoInputRequired,\n}: Props) {\n const [lastCreatedOperationId, setLastCreatedOperationId] = useState<\n string | null\n >(null);\n const addOperationFormId = useId();\n const allOperationNames = allOperations\n .map((o) => o.name)\n .filter((n) => n !== null);\n\n const onAddOperationAndInitialSchema = useCallback(\n async (moduleId: string, name: string) => {\n const operationId = await addOperationAndInitialSchema(moduleId, name);\n if (operationId) {\n setLastCreatedOperationId(operationId);\n }\n return operationId;\n },\n [addOperationAndInitialSchema, setLastCreatedOperationId],\n );\n\n return (\n <div>\n {module.operations.map((operation) => (\n <div key={operation.id}>\n <Operation\n operation={operation}\n module={module}\n lastCreatedOperationId={lastCreatedOperationId}\n allOperationNames={allOperationNames}\n addOperationError={addOperationError}\n deleteOperationError={deleteOperationError}\n setOperationErrorName={setOperationErrorName}\n onAddOperationAndInitialSchema={onAddOperationAndInitialSchema}\n updateOperationName={updateOperationName}\n deleteOperation={deleteOperation}\n updateOperationSchema={updateOperationSchema}\n setOperationDescription={setOperationDescription}\n toggleNoInputRequired={toggleNoInputRequired}\n />\n </div>\n ))}\n <div className=\"mt-6 w-1/2 pr-6\">\n <OperationForm\n key={addOperationFormId}\n onAddOperationAndInitialSchema={onAddOperationAndInitialSchema}\n updateOperationName={updateOperationName}\n deleteOperation={deleteOperation}\n module={module}\n allOperationNames={allOperationNames}\n focusOnMount={shouldFocusNewOperation}\n />\n </div>\n </div>\n );\n}\n","import type { ModuleSpecification as TModule } from \"@powerhousedao/shared/document-model\";\nimport { ModuleForm } from \"./module-form.js\";\nimport { Operations } from \"./operations.js\";\ntype Props = {\n module?: TModule;\n modules?: TModule[];\n allOperations: TModule[\"operations\"];\n lastCreatedModuleId: string | null;\n onAddModule: (name: string) => Promise<string | undefined>;\n updateModuleName: (id: string, name: string) => void;\n deleteModule: (id: string) => void;\n updateOperationName: (id: string, name: string) => void;\n deleteOperation: (id: string) => void;\n addOperationAndInitialSchema: (\n moduleId: string,\n name: string,\n ) => Promise<string | undefined>;\n updateOperationSchema: (id: string, newDoc: string) => void;\n setOperationDescription: (id: string, description: string) => void;\n addOperationError: (\n operationId: string,\n errorName: string,\n ) => Promise<string | undefined>;\n deleteOperationError: (id: string) => void;\n setOperationErrorName: (\n operationId: string,\n errorId: string,\n name: string,\n ) => void;\n toggleNoInputRequired: (id: string, noInputRequired: boolean) => void;\n};\nexport function Module(props: Props) {\n const {\n module,\n modules,\n allOperations,\n lastCreatedModuleId,\n onAddModule,\n updateModuleName,\n deleteModule,\n updateOperationName,\n deleteOperation,\n addOperationAndInitialSchema,\n updateOperationSchema,\n setOperationDescription,\n addOperationError,\n deleteOperationError,\n setOperationErrorName,\n toggleNoInputRequired,\n } = props;\n return (\n <div className=\"relative rounded-3xl bg-gray-100 p-6 dark:bg-slate-700\">\n <div className=\"mb-2 w-1/2 pr-6\">\n <ModuleForm\n modules={modules}\n module={module}\n onAddModule={onAddModule}\n updateModuleName={updateModuleName}\n />\n {!!module && (\n <button\n aria-label=\"Delete module\"\n tabIndex={-1}\n className=\"absolute top-1 right-1 p-2 text-gray-900 transition-colors hover:text-gray-500 dark:text-slate-100 dark:hover:text-slate-400\"\n onClick={() => {\n deleteModule(module.id);\n }}\n >\n <svg className=\"size-6\" viewBox=\"0 0 24 24\" fill=\"currentcolor\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M16.9993 8.51506L15.4844 7L11.9994 10.4852L8.51497 7.00057L7 8.51562L10.4844 12.0003L7.00056 15.4843L8.51552 16.9994L11.9994 13.5153L15.4838 17L16.9988 15.4849L13.5144 12.0003L16.9993 8.51506Z\"\n />\n </svg>\n </button>\n )}\n </div>\n {!!module && (\n <Operations\n module={module}\n allOperations={allOperations}\n shouldFocusNewOperation={module.id === lastCreatedModuleId}\n updateOperationName={updateOperationName}\n deleteOperation={deleteOperation}\n addOperationAndInitialSchema={addOperationAndInitialSchema}\n updateOperationSchema={updateOperationSchema}\n setOperationDescription={setOperationDescription}\n addOperationError={addOperationError}\n deleteOperationError={deleteOperationError}\n setOperationErrorName={setOperationErrorName}\n toggleNoInputRequired={toggleNoInputRequired}\n />\n )}\n </div>\n );\n}\n","import type { ModuleSpecification as TModule } from \"@powerhousedao/shared/document-model\";\nimport { useCallback, useRef, useState } from \"react\";\nimport { Module } from \"./module.js\";\n\ntype Props = {\n modules: TModule[];\n allOperations: TModule[\"operations\"];\n addModule: (name: string) => Promise<string | undefined>;\n updateModuleName: (id: string, name: string) => void;\n deleteModule: (id: string) => void;\n updateOperationName: (id: string, name: string) => void;\n deleteOperation: (id: string) => void;\n addOperationAndInitialSchema: (\n moduleId: string,\n name: string,\n ) => Promise<string | undefined>;\n updateOperationSchema: (id: string, newDoc: string) => void;\n setOperationDescription: (id: string, description: string) => void;\n addOperationError: (\n operationId: string,\n errorName: string,\n ) => Promise<string | undefined>;\n deleteOperationError: (id: string) => void;\n setOperationErrorName: (\n operationId: string,\n errorId: string,\n name: string,\n ) => void;\n toggleNoInputRequired: (id: string, noInputRequired: boolean) => void;\n};\nexport default function Modules({\n modules,\n allOperations,\n addModule,\n updateModuleName,\n deleteModule,\n updateOperationName,\n deleteOperation,\n addOperationAndInitialSchema,\n updateOperationSchema,\n setOperationDescription,\n addOperationError,\n deleteOperationError,\n setOperationErrorName,\n toggleNoInputRequired,\n}: Props) {\n const [lastCreatedModuleId, setLastCreatedModuleId] = useState<string | null>(\n null,\n );\n const focusTrapRef = useRef<HTMLDivElement>(null);\n\n const onAddModule = useCallback(\n async (name: string) => {\n const moduleId = await addModule(name);\n if (moduleId) {\n setLastCreatedModuleId(moduleId);\n focusTrapRef.current?.focus();\n }\n return moduleId;\n },\n [addModule, setLastCreatedModuleId],\n );\n\n return (\n <div className=\"flex flex-col gap-2\">\n {modules.map((module) => (\n <Module\n key={module.id}\n module={module}\n modules={modules}\n allOperations={allOperations}\n lastCreatedModuleId={lastCreatedModuleId}\n onAddModule={onAddModule}\n updateModuleName={updateModuleName}\n deleteModule={deleteModule}\n updateOperationName={updateOperationName}\n deleteOperation={deleteOperation}\n addOperationAndInitialSchema={addOperationAndInitialSchema}\n updateOperationSchema={updateOperationSchema}\n setOperationDescription={setOperationDescription}\n addOperationError={addOperationError}\n deleteOperationError={deleteOperationError}\n setOperationErrorName={setOperationErrorName}\n toggleNoInputRequired={toggleNoInputRequired}\n />\n ))}\n <Module\n key=\"add-module\"\n modules={modules}\n allOperations={allOperations}\n lastCreatedModuleId={lastCreatedModuleId}\n onAddModule={onAddModule}\n updateModuleName={updateModuleName}\n deleteModule={deleteModule}\n updateOperationName={updateOperationName}\n deleteOperation={deleteOperation}\n addOperationAndInitialSchema={addOperationAndInitialSchema}\n updateOperationSchema={updateOperationSchema}\n setOperationDescription={setOperationDescription}\n addOperationError={addOperationError}\n deleteOperationError={deleteOperationError}\n setOperationErrorName={setOperationErrorName}\n toggleNoInputRequired={toggleNoInputRequired}\n />\n {/* Focus trap to prevent tabbing out of the editor */}\n <div\n ref={focusTrapRef}\n tabIndex={0}\n className=\"size-0 overflow-hidden\"\n aria-hidden=\"true\"\n />\n </div>\n );\n}\n","import type { PHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\n\nexport const editorConfig: PHDocumentEditorConfig = {\n isExternalControlsEnabled: false,\n};\n","import {\n useDocumentOfType,\n useSelectedDocumentOfType,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n DocumentModelAction,\n DocumentModelDocument,\n} from \"@powerhousedao/shared/document-model\";\n\nexport function useDocumentModelDocument(\n documentId: string | undefined | null,\n): ReturnType<\n typeof useDocumentOfType<DocumentModelDocument, DocumentModelAction>\n> {\n return useDocumentOfType<DocumentModelDocument, DocumentModelAction>(\n documentId,\n \"powerhouse/document-model\",\n );\n}\n\nexport function useSelectedDocumentModelDocument(): ReturnType<\n typeof useSelectedDocumentOfType<DocumentModelDocument, DocumentModelAction>\n> {\n return useSelectedDocumentOfType<DocumentModelDocument, DocumentModelAction>(\n \"powerhouse/document-model\",\n );\n}\n","import { DocumentToolbar } from \"@powerhousedao/design-system/connect\";\nimport {\n usePHToast,\n useSetPHDocumentEditorConfig,\n} from \"@powerhousedao/reactor-browser\";\nimport { pascalCase } from \"change-case\";\nimport { generateId } from \"@powerhousedao/shared/document-model\";\nimport {\n addModule,\n addOperation,\n addOperationError,\n deleteModule,\n deleteOperation,\n deleteOperationError,\n setAuthorName,\n setAuthorWebsite,\n setInitialState,\n setModelDescription,\n setModelExtension,\n setModelId,\n setModelName,\n setModuleName,\n setOperationDescription,\n setOperationErrorName,\n setOperationName,\n setOperationSchema,\n setStateSchema,\n} from \"@powerhousedao/shared/document-model\";\nimport { lazy, Suspense, useEffect, useRef, useState } from \"react\";\nimport { Divider } from \"./components/divider.js\";\nimport ModelMetadata from \"./components/model-metadata-form.js\";\nimport Modules from \"./components/modules.js\";\nimport { editorConfig } from \"./config.js\";\nimport { SchemaContextProvider } from \"./context/schema-context.js\";\nimport { useSelectedDocumentModelDocument } from \"./hooks/useDocumentModelDocument.js\";\nimport type { Scope } from \"./types/documents.js\";\nimport {\n compareStringsWithoutWhitespace,\n initializeModelSchema,\n makeEmptyOperationSchema,\n makeOperationInitialDoc,\n} from \"./utils/helpers.js\";\nconst StateSchemas = lazy(() => import(\"./components/state-schemas.js\"));\n\nexport default function Editor() {\n useSetPHDocumentEditorConfig(editorConfig);\n const toast = usePHToast();\n const [document, dispatch] = useSelectedDocumentModelDocument();\n const [scope, setScope] = useState<Scope>(\"global\");\n const documentNodeName = document.header.name;\n const {\n name: modelName,\n id: documentType,\n extension,\n description,\n author: { name: authorName, website: authorWebsite },\n } = document.state.global;\n const {\n state: {\n global: {\n schema: globalStateSchema,\n initialValue: globalStateInitialValue,\n },\n local: { schema: localStateSchema, initialValue: localStateInitialValue },\n },\n modules,\n } = document.state.global.specifications[0];\n const operations = modules.flatMap((module) => module.operations);\n const shouldSetInitialName = useRef(\n !modelName && !!documentNodeName && operations.length === 0,\n );\n\n useEffect(() => {\n if (!shouldSetInitialName.current || !documentNodeName) return;\n\n const initialSchemaDoc = initializeModelSchema(documentNodeName);\n const actions = [\n setModelName({ name: documentNodeName }),\n setStateSchema({ schema: initialSchemaDoc, scope: \"global\" }),\n ];\n dispatch(actions);\n shouldSetInitialName.current = false;\n }, [documentNodeName, dispatch]);\n\n const operationSchemasSdl = operations\n .flatMap((operation) => operation.schema ?? [])\n .join(\"\\n\");\n\n const handleSetModelId = (id: string) => {\n if (compareStringsWithoutWhitespace(id, documentType)) return;\n dispatch([setModelId({ id })]);\n };\n\n const handleSetModelDescription = (newDescription: string) => {\n if (compareStringsWithoutWhitespace(newDescription, description)) return;\n dispatch(setModelDescription({ description: newDescription }));\n };\n\n const handleSetModelExtension = (newExtension: string) => {\n if (compareStringsWithoutWhitespace(newExtension, extension)) return;\n dispatch(setModelExtension({ extension: newExtension }));\n };\n\n const handleSetModelName = (newName: string) => {\n if (compareStringsWithoutWhitespace(newName, modelName)) return;\n dispatch(setModelName({ name: newName }));\n };\n\n const handleSetAuthorName = (newAuthorName: string) => {\n if (compareStringsWithoutWhitespace(newAuthorName, authorName)) return;\n dispatch(setAuthorName({ authorName: newAuthorName }));\n };\n\n const handleSetAuthorWebsite = (newAuthorWebsite: string) => {\n if (compareStringsWithoutWhitespace(newAuthorWebsite, authorWebsite ?? \"\"))\n return;\n dispatch(setAuthorWebsite({ authorWebsite: newAuthorWebsite }));\n };\n\n const handleSetStateSchema = (newSchema: string, scope: Scope) => {\n const oldSchema = scope === \"global\" ? globalStateSchema : localStateSchema;\n if (compareStringsWithoutWhitespace(newSchema, oldSchema)) return;\n dispatch(setStateSchema({ schema: newSchema, scope }));\n };\n\n const handleSetInitialState = (newInitialValue: string, scope: Scope) => {\n const oldInitialValue =\n scope === \"global\" ? globalStateInitialValue : localStateInitialValue;\n if (compareStringsWithoutWhitespace(newInitialValue, oldInitialValue))\n return;\n dispatch(setInitialState({ initialValue: newInitialValue, scope }));\n };\n\n const handleAddModule = (name: string): Promise<string | undefined> => {\n return new Promise((resolve) => {\n try {\n if (\n modules.some((module) =>\n compareStringsWithoutWhitespace(module.name, name),\n )\n ) {\n resolve(undefined);\n return;\n }\n const id = generateId();\n dispatch(addModule({ id, name }));\n resolve(id);\n } catch (error) {\n console.error(\"Failed to add module:\", error);\n resolve(undefined);\n }\n });\n };\n\n const handleSetModuleName = (id: string, name: string) => {\n if (\n modules.some((module) =>\n compareStringsWithoutWhitespace(module.name, name),\n )\n )\n return;\n dispatch(setModuleName({ id, name }));\n };\n\n const handleDeleteModule = (id: string) => {\n dispatch(deleteModule({ id }));\n };\n\n const handleAddOperation = (\n moduleId: string,\n name: string,\n ): Promise<string | undefined> => {\n return new Promise((resolve) => {\n const id = generateId();\n dispatch(\n addOperation({ id, moduleId, name, scope }),\n (errors) => {\n if (errors.length > 0) {\n if (toast) {\n toast(errors[0].message, { type: \"connect-warning\" });\n }\n resolve(undefined);\n } else {\n resolve(id);\n }\n },\n () => resolve(id),\n );\n });\n };\n\n const handleSetOperationName = (id: string, name: string) => {\n dispatch(setOperationName({ id, name }), (errors) => {\n if (errors.length > 0 && toast) {\n toast(errors[0].message, { type: \"connect-warning\" });\n }\n });\n };\n\n const handleSetOperationSchema = (id: string, newSchema: string) => {\n const operation = operations.find((operation) => operation.id === id);\n if (\n operation?.schema &&\n compareStringsWithoutWhitespace(newSchema, operation.schema)\n )\n return;\n dispatch(setOperationSchema({ id, schema: newSchema }));\n };\n\n const handleToggleNoInputRequired = (\n id: string,\n noInputRequired: boolean,\n ) => {\n const operation = operations.find((op) => op.id === id);\n if (!operation?.name) return;\n\n if (noInputRequired) {\n dispatch(\n setOperationSchema({\n id,\n schema: makeEmptyOperationSchema(operation.name),\n }),\n );\n } else {\n dispatch(\n setOperationSchema({\n id,\n schema: makeOperationInitialDoc(operation.name),\n }),\n );\n }\n };\n\n const handleSetOperationDescription = (\n id: string,\n newDescription: string,\n ) => {\n const operationDescription =\n operations.find((operation) => operation.id === id)?.description ?? \"\";\n if (compareStringsWithoutWhitespace(operationDescription, newDescription))\n return;\n dispatch(setOperationDescription({ id, description: newDescription }));\n };\n\n const handleDeleteOperation = (id: string) => {\n dispatch(deleteOperation({ id }));\n };\n\n const handleAddOperationError = (\n operationId: string,\n errorName: string,\n ): Promise<string | undefined> => {\n return new Promise((resolve) => {\n try {\n const operation = operations.find(\n (operation) => operation.id === operationId,\n );\n const operationErrorNames =\n operation?.errors.map((error) => error.name).filter(Boolean) ?? [];\n if (\n operationErrorNames.some((name) =>\n compareStringsWithoutWhitespace(name, errorName),\n )\n ) {\n resolve(undefined);\n return;\n }\n const id = generateId();\n const errorCode = pascalCase(errorName);\n dispatch(addOperationError({ id, operationId, errorName, errorCode }));\n resolve(id);\n } catch (error) {\n console.error(\"Failed to add operation error:\", error);\n resolve(undefined);\n }\n });\n };\n\n const handleDeleteOperationError = (id: string) => {\n dispatch(deleteOperationError({ id }));\n };\n\n const handleSetOperationErrorName = (\n operationId: string,\n errorId: string,\n errorName: string,\n ) => {\n const operation = operations.find(\n (operation) => operation.id === operationId,\n );\n const operationErrorNames =\n operation?.errors.map((error) => error.name).filter(Boolean) ?? [];\n if (\n operationErrorNames.some((name) =>\n compareStringsWithoutWhitespace(name, errorName),\n )\n )\n return;\n dispatch(setOperationErrorName({ id: errorId, errorName }));\n };\n\n const addOperationAndInitialSchema = async (\n moduleId: string,\n name: string,\n ): Promise<string | undefined> => {\n try {\n const id = await handleAddOperation(moduleId, name);\n if (!id) return undefined;\n try {\n handleSetOperationSchema(id, makeOperationInitialDoc(name));\n return id;\n } catch (error) {\n console.error(\"Failed to update operation schema:\", error);\n return undefined;\n }\n } catch (error) {\n console.error(\"Failed to add operation and schema:\", error);\n return undefined;\n }\n };\n\n return (\n <main className=\"min-h-dvh bg-gray-50 p-6 dark:bg-slate-800\">\n <DocumentToolbar />\n <SchemaContextProvider\n globalStateSchemaSdl={globalStateSchema}\n localStateSchemaSdl={localStateSchema}\n operationSchemasSdl={operationSchemasSdl}\n >\n <div className=\"mx-auto max-w-6xl px-4 pt-8\">\n <ModelMetadata\n name={modelName}\n documentType={documentType}\n extension={extension}\n description={description}\n authorName={authorName}\n authorWebsite={authorWebsite ?? \"\"}\n globalStateSchema={globalStateSchema}\n localStateSchema={localStateSchema}\n setModelId={handleSetModelId}\n setModelDescription={handleSetModelDescription}\n setModelExtension={handleSetModelExtension}\n setModelName={handleSetModelName}\n setAuthorName={handleSetAuthorName}\n setAuthorWebsite={handleSetAuthorWebsite}\n setStateSchema={handleSetStateSchema}\n />\n <Divider />\n <div>\n <Suspense>\n <StateSchemas\n modelName={modelName}\n globalStateSchema={globalStateSchema}\n globalStateInitialValue={globalStateInitialValue}\n localStateSchema={localStateSchema}\n localStateInitialValue={localStateInitialValue}\n setStateSchema={handleSetStateSchema}\n setInitialState={handleSetInitialState}\n currentScope={scope}\n onScopeChange={setScope}\n />\n </Suspense>\n <Divider />\n <h3 className=\"mb-6 text-lg text-gray-900 capitalize dark:text-slate-100\">\n {scope} Operations\n </h3>\n <Modules\n modules={modules.map((module) => ({\n ...module,\n operations: module.operations.filter(\n (op) => op.scope === scope,\n ),\n }))}\n allOperations={operations}\n addModule={handleAddModule}\n updateModuleName={handleSetModuleName}\n deleteModule={handleDeleteModule}\n updateOperationName={handleSetOperationName}\n updateOperationSchema={handleSetOperationSchema}\n setOperationDescription={handleSetOperationDescription}\n deleteOperation={handleDeleteOperation}\n addOperationError={handleAddOperationError}\n deleteOperationError={handleDeleteOperationError}\n setOperationErrorName={handleSetOperationErrorName}\n addOperationAndInitialSchema={addOperationAndInitialSchema}\n toggleNoInputRequired={handleToggleNoInputRequired}\n />\n </div>\n </div>\n </SchemaContextProvider>\n </main>\n );\n}\n"],"x_google_ignoreList":[0,1,2,3,5,6,10],"mappings":";;;;;;;;;;;;AAIA,IAAI,kBAAkB,OAAO,IAAI,aAAa;AAC9C,IAAIA,QAAMC,QAAM,QAAQ,MAAM,CAAC,UAAU;AACzC,SAAS,cAAc,OAAO;AAC5B,QAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU;;AAElE,SAAS,gBAAgB,SAAS;AAChC,QAAO,WAAW,QAAQ,OAAO,YAAY,YAAY,cAAc,WAAW,QAAQ,aAAa,mBAAmB,cAAc,WAAW,cAAc,QAAQ,SAAS;;;AAGpL,SAAS,WAAW,WAAW;CAC7B,MAAM,YAA4B,gCAAgB,UAAU;CAC5D,MAAM,QAAQA,QAAM,YAAY,OAAO,iBAAiB;EACtD,IAAI,EAAE,UAAU,GAAG,cAAc;AACjC,MAAI,gBAAgB,SAAS,IAAI,OAAOD,UAAQ,WAC9C,YAAWA,MAAI,SAAS,SAAS;EAEnC,MAAM,gBAAgBC,QAAM,SAAS,QAAQ,SAAS;EACtD,MAAM,YAAY,cAAc,KAAK,YAAY;AACjD,MAAI,WAAW;GACb,MAAM,aAAa,UAAU,MAAM;GACnC,MAAM,cAAc,cAAc,KAAK,UAAU;AAC/C,QAAI,UAAU,WAAW;AACvB,SAAIA,QAAM,SAAS,MAAM,WAAW,GAAG,EAAG,QAAOA,QAAM,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D;;WAEK,OAAO;AACd,WAAQ,MAAM,uCAAuC,MAAM;AAC3D;;;AAIJ,QACE,qBAAC,QAAD;EAAM,WAAU;YAAhB,CACE,oBAAC,iBAAD,EAAmB,CAAA,EACnB,oBAAC,uBAAD;GACE,sBAAsB;GACtB,qBAAqB;GACA;aAErB,qBAAC,OAAD;IAAK,WAAU;cAAf;KACE,oBAAC,eAAD;MACE,MAAM;MACQ;MACH;MACE;MACD;MACZ,eAAe,iBAAiB;MACb;MACD;MAClB,YAAY;MACZ,qBAAqB;MACrB,mBAAmB;MACnB,cAAc;MACd,eAAe;MACf,kBAAkB;MAClB,gBAAgB;MAChB,CAAA;KACF,oBAAC,SAAD,EAAW,CAAA;KACX,qBAAC,OAAD,EAAA,UAAA;MACE,oBAAC,UAAD,EAAA,UACE,oBAAC,cAAD;OACa;OACQ;OACM;OACP;OACM;OACxB,gBAAgB;OAChB,iBAAiB;OACjB,cAAc;OACd,eAAe;OACf,CAAA,EACO,CAAA;MACX,oBAAC,SAAD,EAAW,CAAA;MACX,qBAAC,MAAD;OAAI,WAAU;iBAAd,CACG,OAAM,cACJ;;MACL,oBAAC,SAAD;OACE,SAAS,QAAQ,KAAK,YAAY;QAChC,GAAG;QACH,YAAY,OAAO,WAAW,QAC3B,OAAO,GAAG,UAAU,MACtB;QACF,EAAE;OACH,eAAe;OACf,WAAW;OACX,kBAAkB;OAClB,cAAc;OACd,qBAAqB;OACrB,uBAAuB;OACvB,yBAAyB;OACzB,iBAAiB;OACjB,mBAAmB;OACnB,sBAAsB;OACtB,uBAAuB;OACO;OAC9B,uBAAuB;OACvB,CAAA;MACE,EAAA,CAAA;KACF;;GACgB,CAAA,CACnB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import { i as CreateDocument, n as DriveLayout, t as FolderView } from "./folder-view-
|
|
1
|
+
import "./document-drive-sM33juXr.mjs";
|
|
2
|
+
import { t as Breadcrumbs } from "./connect-BLC4PXD9.mjs";
|
|
3
|
+
import { T as useSetPHAppConfig } from "./dist-Bm05eoTg.mjs";
|
|
4
|
+
import { i as CreateDocument, n as DriveLayout, t as FolderView } from "./folder-view-DHph3Yuu.mjs";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region editors/generic-drive-explorer/config.ts
|
|
7
7
|
const editorConfig = {
|
|
@@ -26,4 +26,4 @@ function Editor(props) {
|
|
|
26
26
|
//#endregion
|
|
27
27
|
export { Editor as default };
|
|
28
28
|
|
|
29
|
-
//# sourceMappingURL=editor-
|
|
29
|
+
//# sourceMappingURL=editor-BrS98lEH.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-
|
|
1
|
+
{"version":3,"file":"editor-BrS98lEH.mjs","names":[],"sources":["../../editors/generic-drive-explorer/config.ts","../../editors/generic-drive-explorer/editor.tsx"],"sourcesContent":["import type { PHAppConfig } from \"@powerhousedao/reactor-browser\";\n\nexport const editorConfig: PHAppConfig = {\n allowedDocumentTypes: [],\n isDragAndDropEnabled: true,\n};\n","import { Breadcrumbs } from \"@powerhousedao/design-system/connect\";\nimport { useSetPHAppConfig } from \"@powerhousedao/reactor-browser\";\nimport type { EditorProps } from \"@powerhousedao/shared/document-model\";\nimport { CreateDocument } from \"./components/create-document.js\";\nimport FolderView from \"./components/folder-view.js\";\nimport { DriveLayout } from \"./components/layout.js\";\nimport { editorConfig } from \"./config.js\";\n\nexport default function Editor(props: EditorProps) {\n useSetPHAppConfig(editorConfig);\n const { className, children } = props;\n const showDocumentEditor = !!children;\n\n return (\n <DriveLayout className={className}>\n {!showDocumentEditor && (\n <DriveLayout.Header>\n <Breadcrumbs />\n </DriveLayout.Header>\n )}\n {showDocumentEditor ? (\n children\n ) : (\n <DriveLayout.Content>\n <FolderView />\n </DriveLayout.Content>\n )}\n {!showDocumentEditor && (\n <DriveLayout.Footer>\n <CreateDocument />\n </DriveLayout.Footer>\n )}\n </DriveLayout>\n );\n}\n"],"mappings":";;;;;;AAEA,MAAa,eAA4B;CACvC,sBAAsB,EAAE;CACxB,sBAAsB;CACvB;;;ACGD,SAAwB,OAAO,OAAoB;AACjD,mBAAkB,aAAa;CAC/B,MAAM,EAAE,WAAW,aAAa;CAChC,MAAM,qBAAqB,CAAC,CAAC;AAE7B,QACE,qBAAC,aAAD;EAAwB;YAAxB;GACG,CAAC,sBACA,oBAAC,YAAY,QAAb,EAAA,UACE,oBAAC,aAAD,EAAe,CAAA,EACI,CAAA;GAEtB,qBACC,WAEA,oBAAC,YAAY,SAAb,EAAA,UACE,oBAAC,YAAD,EAAc,CAAA,EACM,CAAA;GAEvB,CAAC,sBACA,oBAAC,YAAY,QAAb,EAAA,UACE,oBAAC,gBAAD,EAAkB,CAAA,EACC,CAAA;GAEX"}
|
|
@@ -6,7 +6,7 @@ const DocumentModelEditor = {
|
|
|
6
6
|
name: "Document Model Editor"
|
|
7
7
|
},
|
|
8
8
|
documentTypes: ["powerhouse/document-model"],
|
|
9
|
-
Component: lazy(() => import("../../editor-
|
|
9
|
+
Component: lazy(() => import("../../editor-BFBa9nsO.mjs"))
|
|
10
10
|
};
|
|
11
11
|
//#endregion
|
|
12
12
|
export { DocumentModelEditor };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../
|
|
1
|
+
import { E as __commonJSMin, k as __require } from "../../dist-fA4EItr0.mjs";
|
|
2
|
+
import "../../document-drive-sM33juXr.mjs";
|
|
3
3
|
import { GenericDriveExplorer } from "./module.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { i as CreateDocument, n as DriveLayout, r as FileContentView, t as FolderView } from "../../folder-view-
|
|
4
|
+
import { g as Icon, n as ConnectSearchBar } from "../../connect-BLC4PXD9.mjs";
|
|
5
|
+
import "../../dist-Bm05eoTg.mjs";
|
|
6
|
+
import { i as CreateDocument, n as DriveLayout, r as FileContentView, t as FolderView } from "../../folder-view-DHph3Yuu.mjs";
|
|
7
7
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
//#region ../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/utils.js
|
|
@@ -442,7 +442,7 @@ const SearchBar = () => {
|
|
|
442
442
|
const { t } = useTranslation();
|
|
443
443
|
const [value, setValue] = useState("");
|
|
444
444
|
return /* @__PURE__ */ jsx(ConnectSearchBar, {
|
|
445
|
-
className: "m-4 shrink-0 bg-gray-100",
|
|
445
|
+
className: "m-4 shrink-0 bg-gray-100 dark:bg-slate-700",
|
|
446
446
|
placeholder: t("searchbar.placeholder"),
|
|
447
447
|
filterLabel: t("searchbar.filterLabel"),
|
|
448
448
|
filterItems: defaultFilterItems,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["React"],"sources":["../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/utils.js","../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/unescape.js","../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/defaults.js","../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/i18nInstance.js","../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/context.js","../../../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../../../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/shim/index.js","../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/useTranslation.js","../../../../editors/generic-drive-explorer/components/search-bar.tsx"],"sourcesContent":["export const warn = (i18n, code, msg, rest) => {\n const args = [msg, {\n code,\n ...(rest || {})\n }];\n if (i18n?.services?.logger?.forward) {\n return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);\n }\n if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;\n if (i18n?.services?.logger?.warn) {\n i18n.services.logger.warn(...args);\n } else if (console?.warn) {\n console.warn(...args);\n }\n};\nconst alreadyWarned = {};\nexport const warnOnce = (i18n, code, msg, rest) => {\n if (isString(msg) && alreadyWarned[msg]) return;\n if (isString(msg)) alreadyWarned[msg] = new Date();\n warn(i18n, code, msg, rest);\n};\nconst loadedClb = (i18n, cb) => () => {\n if (i18n.isInitialized) {\n cb();\n } else {\n const initialized = () => {\n setTimeout(() => {\n i18n.off('initialized', initialized);\n }, 0);\n cb();\n };\n i18n.on('initialized', initialized);\n }\n};\nexport const loadNamespaces = (i18n, ns, cb) => {\n i18n.loadNamespaces(ns, loadedClb(i18n, cb));\n};\nexport const loadLanguages = (i18n, lng, ns, cb) => {\n if (isString(ns)) ns = [ns];\n if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);\n ns.forEach(n => {\n if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);\n });\n i18n.loadLanguages(lng, loadedClb(i18n, cb));\n};\nexport const hasLoadedNamespace = (ns, i18n, options = {}) => {\n if (!i18n.languages || !i18n.languages.length) {\n warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {\n languages: i18n.languages\n });\n return true;\n }\n return i18n.hasLoadedNamespace(ns, {\n lng: options.lng,\n precheck: (i18nInstance, loadNotPending) => {\n if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;\n }\n });\n};\nexport const getDisplayName = Component => Component.displayName || Component.name || (isString(Component) && Component.length > 0 ? Component : 'Unknown');\nexport const isString = obj => typeof obj === 'string';\nexport const isObject = obj => typeof obj === 'object' && obj !== null;","const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;\nconst htmlEntities = {\n '&': '&',\n '&': '&',\n '<': '<',\n '<': '<',\n '>': '>',\n '>': '>',\n ''': \"'\",\n ''': \"'\",\n '"': '\"',\n '"': '\"',\n ' ': ' ',\n ' ': ' ',\n '©': '©',\n '©': '©',\n '®': '®',\n '®': '®',\n '…': '…',\n '…': '…',\n '/': '/',\n '/': '/'\n};\nconst unescapeHtmlEntity = m => htmlEntities[m];\nexport const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);","import { unescape } from './unescape.js';\nlet defaultOptions = {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transWrapTextNodes: '',\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],\n useSuspense: true,\n unescape,\n transDefaultProps: undefined\n};\nexport const setDefaults = (options = {}) => {\n defaultOptions = {\n ...defaultOptions,\n ...options\n };\n};\nexport const getDefaults = () => defaultOptions;","let i18nInstance;\nexport const setI18n = instance => {\n i18nInstance = instance;\n};\nexport const getI18n = () => i18nInstance;","import { createContext } from 'react';\nimport { getDefaults, setDefaults } from './defaults.js';\nimport { getI18n, setI18n } from './i18nInstance.js';\nimport { initReactI18next } from './initReactI18next.js';\nexport { getDefaults, setDefaults, getI18n, setI18n, initReactI18next };\nexport const I18nContext = createContext();\nexport class ReportNamespaces {\n constructor() {\n this.usedNamespaces = {};\n }\n addUsedNamespaces(namespaces) {\n namespaces.forEach(ns => {\n if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;\n });\n }\n getUsedNamespaces() {\n return Object.keys(this.usedNamespaces);\n }\n}\nexport const composeInitialProps = ForComponent => async ctx => {\n const componentsInitialProps = (await ForComponent.getInitialProps?.(ctx)) ?? {};\n const i18nInitialProps = getInitialProps();\n return {\n ...componentsInitialProps,\n ...i18nInitialProps\n };\n};\nexport const getInitialProps = () => {\n const i18n = getI18n();\n const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];\n const ret = {};\n const initialI18nStore = {};\n i18n.languages.forEach(l => {\n initialI18nStore[l] = {};\n namespaces.forEach(ns => {\n initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};\n });\n });\n ret.initialI18nStore = initialI18nStore;\n ret.initialLanguage = i18n.language;\n return ret;\n};","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","import { useContext, useCallback, useMemo, useEffect, useRef, useState } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context.js';\nimport { warnOnce, loadNamespaces, loadLanguages, hasLoadedNamespace, isString, isObject } from './utils.js';\nconst notReadyT = (k, optsOrDefaultValue) => {\n if (isString(optsOrDefaultValue)) return optsOrDefaultValue;\n if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;\n return Array.isArray(k) ? k[k.length - 1] : k;\n};\nconst notReadySnapshot = {\n t: notReadyT,\n ready: false\n};\nconst dummySubscribe = () => () => {};\nexport const useTranslation = (ns, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next');\n }\n const i18nOptions = useMemo(() => ({\n ...getDefaults(),\n ...i18n?.options?.react,\n ...props\n }), [i18n, props]);\n const {\n useSuspense,\n keyPrefix\n } = i18nOptions;\n const nsOrContext = ns || defaultNSFromContext || i18n?.options?.defaultNS;\n const unstableNamespaces = isString(nsOrContext) ? [nsOrContext] : nsOrContext || ['translation'];\n const namespaces = useMemo(() => unstableNamespaces, unstableNamespaces);\n i18n?.reportNamespaces?.addUsedNamespaces?.(namespaces);\n const revisionRef = useRef(0);\n const subscribe = useCallback(callback => {\n if (!i18n) return dummySubscribe;\n const {\n bindI18n,\n bindI18nStore\n } = i18nOptions;\n const wrappedCallback = () => {\n revisionRef.current += 1;\n callback();\n };\n if (bindI18n) i18n.on(bindI18n, wrappedCallback);\n if (bindI18nStore) i18n.store.on(bindI18nStore, wrappedCallback);\n return () => {\n if (bindI18n) bindI18n.split(' ').forEach(e => i18n.off(e, wrappedCallback));\n if (bindI18nStore) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, wrappedCallback));\n };\n }, [i18n, i18nOptions]);\n const snapshotRef = useRef();\n const getSnapshot = useCallback(() => {\n if (!i18n) {\n return notReadySnapshot;\n }\n const calculatedReady = !!(i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));\n const currentLng = props.lng || i18n.language;\n const currentRevision = revisionRef.current;\n const lastSnapshot = snapshotRef.current;\n if (lastSnapshot && lastSnapshot.ready === calculatedReady && lastSnapshot.lng === currentLng && lastSnapshot.keyPrefix === keyPrefix && lastSnapshot.revision === currentRevision) {\n return lastSnapshot;\n }\n const calculatedT = i18n.getFixedT(currentLng, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);\n const newSnapshot = {\n t: calculatedT,\n ready: calculatedReady,\n lng: currentLng,\n keyPrefix,\n revision: currentRevision\n };\n snapshotRef.current = newSnapshot;\n return newSnapshot;\n }, [i18n, namespaces, keyPrefix, i18nOptions, props.lng]);\n const [loadCount, setLoadCount] = useState(0);\n const {\n t,\n ready\n } = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n useEffect(() => {\n if (i18n && !ready && !useSuspense) {\n const onLoaded = () => setLoadCount(c => c + 1);\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n }\n }, [i18n, props.lng, namespaces, ready, useSuspense, loadCount]);\n const finalI18n = i18n || {};\n const wrapperRef = useRef(null);\n const wrapperLangRef = useRef();\n const createI18nWrapper = original => {\n const descriptors = Object.getOwnPropertyDescriptors(original);\n if (descriptors.__original) delete descriptors.__original;\n const wrapper = Object.create(Object.getPrototypeOf(original), descriptors);\n if (!Object.prototype.hasOwnProperty.call(wrapper, '__original')) {\n try {\n Object.defineProperty(wrapper, '__original', {\n value: original,\n writable: false,\n enumerable: false,\n configurable: false\n });\n } catch (_) {}\n }\n return wrapper;\n };\n const ret = useMemo(() => {\n const original = finalI18n;\n const lang = original?.language;\n let i18nWrapper = original;\n if (original) {\n if (wrapperRef.current && wrapperRef.current.__original === original) {\n if (wrapperLangRef.current !== lang) {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n } else {\n i18nWrapper = wrapperRef.current;\n }\n } else {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n }\n }\n const arr = [t, i18nWrapper, ready];\n arr.t = t;\n arr.i18n = i18nWrapper;\n arr.ready = ready;\n return arr;\n }, [t, finalI18n, ready, finalI18n.resolvedLanguage, finalI18n.language, finalI18n.languages]);\n if (i18n && useSuspense && !ready) {\n throw new Promise(resolve => {\n const onLoaded = () => resolve();\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n });\n }\n return ret;\n};","import { Icon } from \"@powerhousedao/design-system\";\nimport type { ConnectSearchBarProps } from \"@powerhousedao/design-system/connect\";\nimport { ConnectSearchBar } from \"@powerhousedao/design-system/connect\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nconst defaultFilterItems: ConnectSearchBarProps[\"filterItems\"] = [\n {\n id: \"project\",\n label: \".project\",\n icon: <Icon name=\"Project\" color=\"#FF6A55\" size={16} />,\n },\n {\n id: \"budget\",\n label: \".budget\",\n icon: <Icon name=\"BarChart\" color=\"#8E55EA\" size={16} />,\n },\n {\n id: \"profile\",\n label: \".profile\",\n icon: <Icon name=\"Person\" color=\"#3E90F0\" size={16} />,\n },\n {\n id: \"legal\",\n label: \".legal\",\n icon: <Icon name=\"Briefcase\" color=\"#4BAB71\" size={16} />,\n },\n {\n id: \"atlas\",\n label: \".Atlas\",\n icon: <Icon name=\"Globe\" color=\"#FF8A00\" size={16} />,\n },\n];\n\nexport const SearchBar = () => {\n const { t } = useTranslation();\n const [value, setValue] = useState(\"\"); // TODO\n\n return (\n <ConnectSearchBar\n className=\"m-4 shrink-0 bg-gray-100\"\n placeholder={t(\"searchbar.placeholder\")}\n filterLabel={t(\"searchbar.filterLabel\")}\n filterItems={defaultFilterItems}\n value={value}\n onChange={setValue}\n />\n );\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8],"mappings":";;;;;;;;;AAAA,MAAa,QAAQ,MAAM,MAAM,KAAK,SAAS;CAC7C,MAAM,OAAO,CAAC,KAAK;EACjB;EACA,GAAI,QAAQ,EAAE;EACf,CAAC;AACF,KAAI,MAAM,UAAU,QAAQ,QAC1B,QAAO,KAAK,SAAS,OAAO,QAAQ,MAAM,QAAQ,mBAAmB,KAAK;AAE5E,KAAI,SAAS,KAAK,GAAG,CAAE,MAAK,KAAK,mBAAmB,KAAK;AACzD,KAAI,MAAM,UAAU,QAAQ,KAC1B,MAAK,SAAS,OAAO,KAAK,GAAG,KAAK;UACzB,SAAS,KAClB,SAAQ,KAAK,GAAG,KAAK;;AAGzB,MAAM,gBAAgB,EAAE;AACxB,MAAa,YAAY,MAAM,MAAM,KAAK,SAAS;AACjD,KAAI,SAAS,IAAI,IAAI,cAAc,KAAM;AACzC,KAAI,SAAS,IAAI,CAAE,eAAc,uBAAO,IAAI,MAAM;AAClD,MAAK,MAAM,MAAM,KAAK,KAAK;;AAE7B,MAAM,aAAa,MAAM,aAAa;AACpC,KAAI,KAAK,cACP,KAAI;MACC;EACL,MAAM,oBAAoB;AACxB,oBAAiB;AACf,SAAK,IAAI,eAAe,YAAY;MACnC,EAAE;AACL,OAAI;;AAEN,OAAK,GAAG,eAAe,YAAY;;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,OAAM;GAAU,MAAM;GAAM,CAAA;EACvD;CACD;EACE,IAAI;EACJ,OAAO;EACP,MAAM,oBAAC,MAAD;GAAM,MAAK;GAAY,OAAM;GAAU,MAAM;GAAM,CAAA;EAC1D;CACD;EACE,IAAI;EACJ,OAAO;EACP,MAAM,oBAAC,MAAD;GAAM,MAAK;GAAQ,OAAM;GAAU,MAAM;GAAM,CAAA;EACtD;CACF;AAED,MAAa,kBAAkB;CAC7B,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,CAAC,OAAO,YAAY,SAAS,GAAG;AAEtC,QACE,oBAAC,kBAAD;EACE,WAAU;EACV,aAAa,EAAE,wBAAwB;EACvC,aAAa,EAAE,wBAAwB;EACvC,aAAa;EACN;EACP,UAAU;EACV,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["React"],"sources":["../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/utils.js","../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/unescape.js","../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/defaults.js","../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/i18nInstance.js","../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/context.js","../../../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../../../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/shim/index.js","../../../../../../node_modules/.pnpm/react-i18next@16.5.4_i18next@25.8.13_typescript@5.9.3__react-dom@19.2.6_react@19.2.6__react@19.2.6_typescript@5.9.3/node_modules/react-i18next/dist/es/useTranslation.js","../../../../editors/generic-drive-explorer/components/search-bar.tsx"],"sourcesContent":["export const warn = (i18n, code, msg, rest) => {\n const args = [msg, {\n code,\n ...(rest || {})\n }];\n if (i18n?.services?.logger?.forward) {\n return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);\n }\n if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;\n if (i18n?.services?.logger?.warn) {\n i18n.services.logger.warn(...args);\n } else if (console?.warn) {\n console.warn(...args);\n }\n};\nconst alreadyWarned = {};\nexport const warnOnce = (i18n, code, msg, rest) => {\n if (isString(msg) && alreadyWarned[msg]) return;\n if (isString(msg)) alreadyWarned[msg] = new Date();\n warn(i18n, code, msg, rest);\n};\nconst loadedClb = (i18n, cb) => () => {\n if (i18n.isInitialized) {\n cb();\n } else {\n const initialized = () => {\n setTimeout(() => {\n i18n.off('initialized', initialized);\n }, 0);\n cb();\n };\n i18n.on('initialized', initialized);\n }\n};\nexport const loadNamespaces = (i18n, ns, cb) => {\n i18n.loadNamespaces(ns, loadedClb(i18n, cb));\n};\nexport const loadLanguages = (i18n, lng, ns, cb) => {\n if (isString(ns)) ns = [ns];\n if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);\n ns.forEach(n => {\n if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);\n });\n i18n.loadLanguages(lng, loadedClb(i18n, cb));\n};\nexport const hasLoadedNamespace = (ns, i18n, options = {}) => {\n if (!i18n.languages || !i18n.languages.length) {\n warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {\n languages: i18n.languages\n });\n return true;\n }\n return i18n.hasLoadedNamespace(ns, {\n lng: options.lng,\n precheck: (i18nInstance, loadNotPending) => {\n if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;\n }\n });\n};\nexport const getDisplayName = Component => Component.displayName || Component.name || (isString(Component) && Component.length > 0 ? Component : 'Unknown');\nexport const isString = obj => typeof obj === 'string';\nexport const isObject = obj => typeof obj === 'object' && obj !== null;","const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;\nconst htmlEntities = {\n '&': '&',\n '&': '&',\n '<': '<',\n '<': '<',\n '>': '>',\n '>': '>',\n ''': \"'\",\n ''': \"'\",\n '"': '\"',\n '"': '\"',\n ' ': ' ',\n ' ': ' ',\n '©': '©',\n '©': '©',\n '®': '®',\n '®': '®',\n '…': '…',\n '…': '…',\n '/': '/',\n '/': '/'\n};\nconst unescapeHtmlEntity = m => htmlEntities[m];\nexport const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);","import { unescape } from './unescape.js';\nlet defaultOptions = {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transWrapTextNodes: '',\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],\n useSuspense: true,\n unescape,\n transDefaultProps: undefined\n};\nexport const setDefaults = (options = {}) => {\n defaultOptions = {\n ...defaultOptions,\n ...options\n };\n};\nexport const getDefaults = () => defaultOptions;","let i18nInstance;\nexport const setI18n = instance => {\n i18nInstance = instance;\n};\nexport const getI18n = () => i18nInstance;","import { createContext } from 'react';\nimport { getDefaults, setDefaults } from './defaults.js';\nimport { getI18n, setI18n } from './i18nInstance.js';\nimport { initReactI18next } from './initReactI18next.js';\nexport { getDefaults, setDefaults, getI18n, setI18n, initReactI18next };\nexport const I18nContext = createContext();\nexport class ReportNamespaces {\n constructor() {\n this.usedNamespaces = {};\n }\n addUsedNamespaces(namespaces) {\n namespaces.forEach(ns => {\n if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;\n });\n }\n getUsedNamespaces() {\n return Object.keys(this.usedNamespaces);\n }\n}\nexport const composeInitialProps = ForComponent => async ctx => {\n const componentsInitialProps = (await ForComponent.getInitialProps?.(ctx)) ?? {};\n const i18nInitialProps = getInitialProps();\n return {\n ...componentsInitialProps,\n ...i18nInitialProps\n };\n};\nexport const getInitialProps = () => {\n const i18n = getI18n();\n const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];\n const ret = {};\n const initialI18nStore = {};\n i18n.languages.forEach(l => {\n initialI18nStore[l] = {};\n namespaces.forEach(ns => {\n initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};\n });\n });\n ret.initialI18nStore = initialI18nStore;\n ret.initialLanguage = i18n.language;\n return ret;\n};","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","import { useContext, useCallback, useMemo, useEffect, useRef, useState } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context.js';\nimport { warnOnce, loadNamespaces, loadLanguages, hasLoadedNamespace, isString, isObject } from './utils.js';\nconst notReadyT = (k, optsOrDefaultValue) => {\n if (isString(optsOrDefaultValue)) return optsOrDefaultValue;\n if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;\n return Array.isArray(k) ? k[k.length - 1] : k;\n};\nconst notReadySnapshot = {\n t: notReadyT,\n ready: false\n};\nconst dummySubscribe = () => () => {};\nexport const useTranslation = (ns, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next');\n }\n const i18nOptions = useMemo(() => ({\n ...getDefaults(),\n ...i18n?.options?.react,\n ...props\n }), [i18n, props]);\n const {\n useSuspense,\n keyPrefix\n } = i18nOptions;\n const nsOrContext = ns || defaultNSFromContext || i18n?.options?.defaultNS;\n const unstableNamespaces = isString(nsOrContext) ? [nsOrContext] : nsOrContext || ['translation'];\n const namespaces = useMemo(() => unstableNamespaces, unstableNamespaces);\n i18n?.reportNamespaces?.addUsedNamespaces?.(namespaces);\n const revisionRef = useRef(0);\n const subscribe = useCallback(callback => {\n if (!i18n) return dummySubscribe;\n const {\n bindI18n,\n bindI18nStore\n } = i18nOptions;\n const wrappedCallback = () => {\n revisionRef.current += 1;\n callback();\n };\n if (bindI18n) i18n.on(bindI18n, wrappedCallback);\n if (bindI18nStore) i18n.store.on(bindI18nStore, wrappedCallback);\n return () => {\n if (bindI18n) bindI18n.split(' ').forEach(e => i18n.off(e, wrappedCallback));\n if (bindI18nStore) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, wrappedCallback));\n };\n }, [i18n, i18nOptions]);\n const snapshotRef = useRef();\n const getSnapshot = useCallback(() => {\n if (!i18n) {\n return notReadySnapshot;\n }\n const calculatedReady = !!(i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));\n const currentLng = props.lng || i18n.language;\n const currentRevision = revisionRef.current;\n const lastSnapshot = snapshotRef.current;\n if (lastSnapshot && lastSnapshot.ready === calculatedReady && lastSnapshot.lng === currentLng && lastSnapshot.keyPrefix === keyPrefix && lastSnapshot.revision === currentRevision) {\n return lastSnapshot;\n }\n const calculatedT = i18n.getFixedT(currentLng, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);\n const newSnapshot = {\n t: calculatedT,\n ready: calculatedReady,\n lng: currentLng,\n keyPrefix,\n revision: currentRevision\n };\n snapshotRef.current = newSnapshot;\n return newSnapshot;\n }, [i18n, namespaces, keyPrefix, i18nOptions, props.lng]);\n const [loadCount, setLoadCount] = useState(0);\n const {\n t,\n ready\n } = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n useEffect(() => {\n if (i18n && !ready && !useSuspense) {\n const onLoaded = () => setLoadCount(c => c + 1);\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n }\n }, [i18n, props.lng, namespaces, ready, useSuspense, loadCount]);\n const finalI18n = i18n || {};\n const wrapperRef = useRef(null);\n const wrapperLangRef = useRef();\n const createI18nWrapper = original => {\n const descriptors = Object.getOwnPropertyDescriptors(original);\n if (descriptors.__original) delete descriptors.__original;\n const wrapper = Object.create(Object.getPrototypeOf(original), descriptors);\n if (!Object.prototype.hasOwnProperty.call(wrapper, '__original')) {\n try {\n Object.defineProperty(wrapper, '__original', {\n value: original,\n writable: false,\n enumerable: false,\n configurable: false\n });\n } catch (_) {}\n }\n return wrapper;\n };\n const ret = useMemo(() => {\n const original = finalI18n;\n const lang = original?.language;\n let i18nWrapper = original;\n if (original) {\n if (wrapperRef.current && wrapperRef.current.__original === original) {\n if (wrapperLangRef.current !== lang) {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n } else {\n i18nWrapper = wrapperRef.current;\n }\n } else {\n i18nWrapper = createI18nWrapper(original);\n wrapperRef.current = i18nWrapper;\n wrapperLangRef.current = lang;\n }\n }\n const arr = [t, i18nWrapper, ready];\n arr.t = t;\n arr.i18n = i18nWrapper;\n arr.ready = ready;\n return arr;\n }, [t, finalI18n, ready, finalI18n.resolvedLanguage, finalI18n.language, finalI18n.languages]);\n if (i18n && useSuspense && !ready) {\n throw new Promise(resolve => {\n const onLoaded = () => resolve();\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, onLoaded);\n } else {\n loadNamespaces(i18n, namespaces, onLoaded);\n }\n });\n }\n return ret;\n};","import { Icon } from \"@powerhousedao/design-system\";\nimport type { ConnectSearchBarProps } from \"@powerhousedao/design-system/connect\";\nimport { ConnectSearchBar } from \"@powerhousedao/design-system/connect\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nconst defaultFilterItems: ConnectSearchBarProps[\"filterItems\"] = [\n {\n id: \"project\",\n label: \".project\",\n icon: <Icon name=\"Project\" color=\"#FF6A55\" size={16} />,\n },\n {\n id: \"budget\",\n label: \".budget\",\n icon: <Icon name=\"BarChart\" color=\"#8E55EA\" size={16} />,\n },\n {\n id: \"profile\",\n label: \".profile\",\n icon: <Icon name=\"Person\" color=\"#3E90F0\" size={16} />,\n },\n {\n id: \"legal\",\n label: \".legal\",\n icon: <Icon name=\"Briefcase\" color=\"#4BAB71\" size={16} />,\n },\n {\n id: \"atlas\",\n label: \".Atlas\",\n icon: <Icon name=\"Globe\" color=\"#FF8A00\" size={16} />,\n },\n];\n\nexport const SearchBar = () => {\n const { t } = useTranslation();\n const [value, setValue] = useState(\"\"); // TODO\n\n return (\n <ConnectSearchBar\n className=\"m-4 shrink-0 bg-gray-100 dark:bg-slate-700\"\n placeholder={t(\"searchbar.placeholder\")}\n filterLabel={t(\"searchbar.filterLabel\")}\n filterItems={defaultFilterItems}\n value={value}\n onChange={setValue}\n />\n );\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8],"mappings":";;;;;;;;;AAAA,MAAa,QAAQ,MAAM,MAAM,KAAK,SAAS;CAC7C,MAAM,OAAO,CAAC,KAAK;EACjB;EACA,GAAI,QAAQ,EAAE;EACf,CAAC;AACF,KAAI,MAAM,UAAU,QAAQ,QAC1B,QAAO,KAAK,SAAS,OAAO,QAAQ,MAAM,QAAQ,mBAAmB,KAAK;AAE5E,KAAI,SAAS,KAAK,GAAG,CAAE,MAAK,KAAK,mBAAmB,KAAK;AACzD,KAAI,MAAM,UAAU,QAAQ,KAC1B,MAAK,SAAS,OAAO,KAAK,GAAG,KAAK;UACzB,SAAS,KAClB,SAAQ,KAAK,GAAG,KAAK;;AAGzB,MAAM,gBAAgB,EAAE;AACxB,MAAa,YAAY,MAAM,MAAM,KAAK,SAAS;AACjD,KAAI,SAAS,IAAI,IAAI,cAAc,KAAM;AACzC,KAAI,SAAS,IAAI,CAAE,eAAc,uBAAO,IAAI,MAAM;AAClD,MAAK,MAAM,MAAM,KAAK,KAAK;;AAE7B,MAAM,aAAa,MAAM,aAAa;AACpC,KAAI,KAAK,cACP,KAAI;MACC;EACL,MAAM,oBAAoB;AACxB,oBAAiB;AACf,SAAK,IAAI,eAAe,YAAY;MACnC,EAAE;AACL,OAAI;;AAEN,OAAK,GAAG,eAAe,YAAY;;;AAGvC,MAAa,kBAAkB,MAAM,IAAI,OAAO;AAC9C,MAAK,eAAe,IAAI,UAAU,MAAM,GAAG,CAAC;;AAE9C,MAAa,iBA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AAM;GAAU,MAAM;GAAM,CAAA;EAC1D;CACD;EACE,IAAI;EACJ,OAAO;EACP,MAAM,oBAAC,MAAD;GAAM,MAAK;GAAQ,OAAM;GAAU,MAAM;GAAM,CAAA;EACtD;CACF;AAED,MAAa,kBAAkB;CAC7B,MAAM,EAAE,MAAM,gBAAgB;CAC9B,MAAM,CAAC,OAAO,YAAY,SAAS,GAAG;AAEtC,QACE,oBAAC,kBAAD;EACE,WAAU;EACV,aAAa,EAAE,wBAAwB;EACvC,aAAa,EAAE,wBAAwB;EACvC,aAAa;EACN;EACP,UAAU;EACV,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { lazy } from "react";
|
|
2
2
|
//#region editors/generic-drive-explorer/module.ts
|
|
3
3
|
const GenericDriveExplorer = {
|
|
4
|
-
Component: lazy(() => import("../../editor-
|
|
4
|
+
Component: lazy(() => import("../../editor-BrS98lEH.mjs")),
|
|
5
5
|
config: {
|
|
6
6
|
id: "GenericDriveExplorer",
|
|
7
7
|
name: "Drive Explorer App"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as
|
|
1
|
+
import { a as FolderItem, h as useWindowSize, i as FileItem, m as PowerhouseButton, o as useVirtualizer } from "./connect-BLC4PXD9.mjs";
|
|
2
|
+
import { C as twMerge } from "./dist-BeZaEP6S.mjs";
|
|
3
|
+
import { O as useUserPermissions, i as isFolderNodeKind, r as isFileNodeKind, s as showCreateDocumentModal, u as useDocumentModelModules, v as useNodesInSelectedDriveOrFolder } from "./dist-Bm05eoTg.mjs";
|
|
3
4
|
import React, { useRef } from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region editors/generic-drive-explorer/components/create-document.tsx
|
|
@@ -13,7 +14,7 @@ function CreateDocument() {
|
|
|
13
14
|
return /* @__PURE__ */ jsxs("div", {
|
|
14
15
|
className: "px-6 py-4",
|
|
15
16
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
16
|
-
className: "mb-3 text-xl font-bold text-gray-
|
|
17
|
+
className: "mb-3 text-xl font-bold text-gray-700 dark:text-slate-200",
|
|
17
18
|
children: "New document"
|
|
18
19
|
}), /* @__PURE__ */ jsx("div", {
|
|
19
20
|
className: "flex w-full flex-wrap gap-4",
|
|
@@ -69,7 +70,7 @@ function FileContentView() {
|
|
|
69
70
|
return fileNodes[getItemIndex(rowIndex, columnIndex)] || null;
|
|
70
71
|
};
|
|
71
72
|
if (fileNodes.length === 0) return /* @__PURE__ */ jsx("div", {
|
|
72
|
-
className: "mb-8 text-sm text-gray-400",
|
|
73
|
+
className: "mb-8 text-sm text-gray-400 dark:text-slate-200",
|
|
73
74
|
children: "No documents or files 📄"
|
|
74
75
|
});
|
|
75
76
|
const renderItem = (rowIndex, columnIndex) => {
|
|
@@ -119,7 +120,7 @@ function DriveLayout({ children, className, ...props }) {
|
|
|
119
120
|
}
|
|
120
121
|
DriveLayout.Container = function DriveLayoutContainer({ children, className, containerProps, ...props }) {
|
|
121
122
|
return /* @__PURE__ */ jsx("div", {
|
|
122
|
-
className:
|
|
123
|
+
className: twMerge("flex grow flex-col overflow-auto", className),
|
|
123
124
|
...containerProps,
|
|
124
125
|
...props,
|
|
125
126
|
children
|
|
@@ -127,7 +128,7 @@ DriveLayout.Container = function DriveLayoutContainer({ children, className, con
|
|
|
127
128
|
};
|
|
128
129
|
DriveLayout.Header = function DriveLayoutHeader({ children, className, containerProps, ...props }) {
|
|
129
130
|
return /* @__PURE__ */ jsx("div", {
|
|
130
|
-
className:
|
|
131
|
+
className: twMerge("flex-0", className),
|
|
131
132
|
...containerProps,
|
|
132
133
|
...props,
|
|
133
134
|
children
|
|
@@ -135,7 +136,7 @@ DriveLayout.Header = function DriveLayoutHeader({ children, className, container
|
|
|
135
136
|
};
|
|
136
137
|
DriveLayout.Content = function DriveLayoutContent({ children, className, containerProps, ...props }) {
|
|
137
138
|
return /* @__PURE__ */ jsx("div", {
|
|
138
|
-
className:
|
|
139
|
+
className: twMerge("mb-5 flex-1 px-4", className),
|
|
139
140
|
...containerProps,
|
|
140
141
|
...props,
|
|
141
142
|
children
|
|
@@ -143,11 +144,11 @@ DriveLayout.Content = function DriveLayoutContent({ children, className, contain
|
|
|
143
144
|
};
|
|
144
145
|
DriveLayout.ContentSection = function DriveLayoutContentSection({ title, children, className, containerProps, ...props }) {
|
|
145
146
|
return /* @__PURE__ */ jsxs("div", {
|
|
146
|
-
className:
|
|
147
|
+
className: twMerge(className),
|
|
147
148
|
...containerProps,
|
|
148
149
|
...props,
|
|
149
150
|
children: [title && /* @__PURE__ */ jsx("div", {
|
|
150
|
-
className: "mb-4 text-base font-semibold text-gray-
|
|
151
|
+
className: "mb-4 text-base font-semibold text-gray-700 dark:text-slate-200",
|
|
151
152
|
children: title
|
|
152
153
|
}), /* @__PURE__ */ jsx("div", {
|
|
153
154
|
className: "flex flex-wrap gap-2",
|
|
@@ -157,7 +158,7 @@ DriveLayout.ContentSection = function DriveLayoutContentSection({ title, childre
|
|
|
157
158
|
};
|
|
158
159
|
DriveLayout.Footer = function DriveLayoutFooter({ children, className, containerProps, ...props }) {
|
|
159
160
|
return /* @__PURE__ */ jsx("div", {
|
|
160
|
-
className:
|
|
161
|
+
className: twMerge("flex-0", className),
|
|
161
162
|
...containerProps,
|
|
162
163
|
...props,
|
|
163
164
|
children
|
|
@@ -174,7 +175,7 @@ function FolderView(props) {
|
|
|
174
175
|
title: "Folders",
|
|
175
176
|
className: "mb-4",
|
|
176
177
|
children: folderNodes.length > 0 ? folderNodes.map((folderNode) => /* @__PURE__ */ jsx(FolderItem, { folderNode }, folderNode.id)) : /* @__PURE__ */ jsx("div", {
|
|
177
|
-
className: "mb-8 text-sm text-gray-400",
|
|
178
|
+
className: "mb-8 text-sm text-gray-400 dark:text-slate-200",
|
|
178
179
|
children: "No documents or files 📄"
|
|
179
180
|
})
|
|
180
181
|
}), /* @__PURE__ */ jsx(DriveLayout.ContentSection, {
|
|
@@ -189,4 +190,4 @@ function FolderView(props) {
|
|
|
189
190
|
//#endregion
|
|
190
191
|
export { CreateDocument as i, DriveLayout as n, FileContentView as r, FolderView as t };
|
|
191
192
|
|
|
192
|
-
//# sourceMappingURL=folder-view-
|
|
193
|
+
//# sourceMappingURL=folder-view-DHph3Yuu.mjs.map
|