@powerhousedao/connect 5.0.0-staging.24 → 5.0.0-staging.25
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/assets/{atlas-import.huSz2S1P.js → atlas-import.ChPe8NNj.js} +2 -2
- package/dist/assets/{atlas-import.huSz2S1P.js.map → atlas-import.ChPe8NNj.js.map} +1 -1
- package/dist/assets/{ccip.B4gPk9T8.js → ccip.GTQhKzgV.js} +2 -2
- package/dist/assets/{ccip.B4gPk9T8.js.map → ccip.GTQhKzgV.js.map} +1 -1
- package/dist/assets/{content.EqFpXqQo.js → content.rT3-eEku.js} +2 -2
- package/dist/assets/{content.EqFpXqQo.js.map → content.rT3-eEku.js.map} +1 -1
- package/dist/assets/{creators.Cg7hgtUz.js → creators.C9agoPvT.js} +2 -2
- package/dist/assets/{creators.Cg7hgtUz.js.map → creators.C9agoPvT.js.map} +1 -1
- package/dist/assets/{drive-icon.VGDDLaPE.js → drive-icon.hoSYWHlo.js} +2 -2
- package/dist/assets/{drive-icon.VGDDLaPE.js.map → drive-icon.hoSYWHlo.js.map} +1 -1
- package/dist/assets/{index.CXV2LGi6.js → index.BRe5BZpi.js} +2 -2
- package/dist/assets/{index.CXV2LGi6.js.map → index.BRe5BZpi.js.map} +1 -1
- package/dist/assets/{index.CCqDl19I.js → index.BxcdOLkR.js} +2 -2
- package/dist/assets/{index.CCqDl19I.js.map → index.BxcdOLkR.js.map} +1 -1
- package/dist/assets/{index.CYAFrFct.js → index.C6IW2BWM.js} +2 -2
- package/dist/assets/{index.CYAFrFct.js.map → index.C6IW2BWM.js.map} +1 -1
- package/dist/assets/{index.DA_wjuiB.js → index.CAOhzGY5.js} +2 -2
- package/dist/assets/{index.DA_wjuiB.js.map → index.CAOhzGY5.js.map} +1 -1
- package/dist/assets/{index.DL3Up0hU.js → index.CG4NNeZN.js} +2 -2
- package/dist/assets/{index.DL3Up0hU.js.map → index.CG4NNeZN.js.map} +1 -1
- package/dist/assets/{index.JK7MVe59.js → index.DSOzibyt.js} +2 -2
- package/dist/assets/{index.JK7MVe59.js.map → index.DSOzibyt.js.map} +1 -1
- package/dist/assets/{index.CYF9Wn1v.js → index.Lweni6H3.js} +2 -2
- package/dist/assets/{index.CYF9Wn1v.js.map → index.Lweni6H3.js.map} +1 -1
- package/dist/assets/{main.BXlmSY46.js → main.Dt_K5cUp.js} +7 -7
- package/dist/assets/{main.BXlmSY46.js.map → main.Dt_K5cUp.js.map} +1 -1
- package/dist/assets/{nodefs.BpF1PLlt.js → nodefs.Cs1YzYn0.js} +2 -2
- package/dist/assets/{nodefs.BpF1PLlt.js.map → nodefs.Cs1YzYn0.js.map} +1 -1
- package/dist/assets/{opfs-ahp.BCWCVPBr.js → opfs-ahp.D1-ssDuc.js} +2 -2
- package/dist/assets/{opfs-ahp.BCWCVPBr.js.map → opfs-ahp.D1-ssDuc.js.map} +1 -1
- package/dist/assets/{root._-_EHvJY.js → root.DesgsmkU.js} +2 -2
- package/dist/assets/{root._-_EHvJY.js.map → root.DesgsmkU.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/vite-envs.sh +1 -1
- package/package.json +9 -9
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a6 as t,a7 as e,a8 as r,a9 as o,aa as u,ab as a}from"./main.
|
|
2
|
-
//# sourceMappingURL=creators.
|
|
1
|
+
import{a6 as t,a7 as e,a8 as r,a9 as o,aa as u,ab as a}from"./main.Dt_K5cUp.js";const s=n=>n!=null;u().refine(n=>s(n));function q(){return t({__typename:r("AddChangeLogItemInput").optional(),content:e(),id:e(),insertBefore:e().nullable()})}function d(){return t({description:e().nullish(),id:e(),name:e()})}function l(){return t({errorCode:e().nullish(),errorDescription:e().nullish(),errorName:e().nullish(),errorTemplate:e().nullish(),id:e(),operationId:e()})}function z(){return t({example:e(),id:e(),operationId:e()})}function c(){return t({description:e().nullish(),id:e(),moduleId:e(),name:e(),reducer:e().nullish(),schema:e().nullish(),template:e().nullish(),scope:i().nullish()})}function p(){return t({scope:e(),example:e(),id:e(),insertBefore:e().nullish()})}function F(){return t({__typename:r("DeleteChangeLogItemInput").optional(),id:e()})}function E(){return t({id:e()})}function S(){return t({id:e()})}function G(){return t({id:e()})}function m(){return t({id:e()})}function O(){return t({scope:e(),id:e()})}function i(){return e()}function I(){return t({newModuleId:e(),operationId:e()})}function J(){return t({__typename:r("ReorderChangeLogItemsInput").optional(),order:o(e())})}function h(){return t({moduleId:e(),order:o(e())})}function f(){return t({order:o(e())})}function T(){return t({operationId:e(),order:o(e())})}function K(){return t({operationId:e(),order:o(e())})}function _(){return t({scope:e(),order:o(e())})}function R(){return t({authorName:e()})}function A(){return t({authorWebsite:e()})}function g(){return t({scope:e(),initialValue:e()})}function D(){return t({description:e()})}function M(){return t({extension:e()})}function N(){return t({id:e()})}function b(){return t({name:e()})}function L(){return t({description:e().nullish(),id:e()})}function P(){return t({id:e(),name:e().nullish()})}function C(){return t({description:e().nullish(),id:e()})}function x(){return t({errorCode:e().nullish(),id:e()})}function U(){return t({errorDescription:e().nullish(),id:e()})}function y(){return t({errorName:e().nullish(),id:e()})}function X(){return t({errorTemplate:e().nullish(),id:e()})}function H(){return t({id:e(),name:e().nullish()})}function W(){return t({id:e(),scope:i()})}function w(){return t({id:e(),reducer:e().nullish()})}function B(){return t({id:e(),schema:e().nullish()})}function j(){return t({id:e(),template:e().nullish()})}function V(){return t({scope:e(),schema:e()})}function Q(){return t({__typename:r("UpdateChangeLogItemInput").optional(),id:e(),newContent:e()})}function Y(){return t({example:e(),id:e()})}function k(){return t({scope:e(),id:e(),newExample:e()})}const Z=n=>a("SET_MODEL_NAME",{...n},void 0,b,"global"),$=n=>a("SET_MODEL_ID",{...n},void 0,N,"global"),ee=n=>a("SET_MODEL_EXTENSION",{...n},void 0,M,"global"),ne=n=>a("SET_MODEL_DESCRIPTION",{...n},void 0,D,"global"),te=n=>a("SET_AUTHOR_NAME",{...n},void 0,R,"global"),ae=n=>a("SET_AUTHOR_WEBSITE",{...n},void 0,A,"global"),oe=n=>a("ADD_MODULE",{...n},void 0,d,"global"),re=n=>a("SET_MODULE_NAME",{...n},void 0,P,"global"),ie=n=>a("SET_MODULE_DESCRIPTION",{...n},void 0,L,"global"),ue=n=>a("DELETE_MODULE",{...n},void 0,E,"global"),se=n=>a("REORDER_MODULES",{...n},void 0,f,"global"),de=n=>a("ADD_OPERATION_ERROR",{...n},void 0,l,"global"),le=n=>a("SET_OPERATION_ERROR_CODE",{...n},void 0,x,"global"),ce=n=>a("SET_OPERATION_ERROR_NAME",{...n},void 0,y,"global"),pe=n=>a("SET_OPERATION_ERROR_DESCRIPTION",{...n},void 0,U,"global"),Ee=n=>a("SET_OPERATION_ERROR_TEMPLATE",{...n},void 0,X,"global"),Se=n=>a("DELETE_OPERATION_ERROR",{...n},void 0,S,"global"),me=n=>a("REORDER_OPERATION_ERRORS",{...n},void 0,T,"global"),Oe=n=>a("ADD_OPERATION",{...n},void 0,c,"global"),Ie=n=>a("SET_OPERATION_NAME",{...n},void 0,H,"global"),he=n=>a("SET_OPERATION_SCOPE",{...n},void 0,W,"global"),fe=n=>a("SET_OPERATION_SCHEMA",{...n},void 0,B,"global"),Te=n=>a("SET_OPERATION_DESCRIPTION",{...n},void 0,C,"global"),_e=n=>a("SET_OPERATION_TEMPLATE",{...n},void 0,j,"global"),Re=n=>a("SET_OPERATION_REDUCER",{...n},void 0,w,"global"),Ae=n=>a("MOVE_OPERATION",{...n},void 0,I,"global"),ge=n=>a("DELETE_OPERATION",{...n},void 0,m,"global"),De=n=>a("REORDER_MODULE_OPERATIONS",{...n},void 0,h,"global"),Me=n=>a("SET_STATE_SCHEMA",{...n},void 0,V,"global"),Ne=n=>a("SET_INITIAL_STATE",{...n},void 0,g,"global"),be=n=>a("ADD_STATE_EXAMPLE",{...n},void 0,p,"global"),Le=n=>a("UPDATE_STATE_EXAMPLE",{...n},void 0,k,"global"),Pe=n=>a("DELETE_STATE_EXAMPLE",{...n},void 0,O,"global"),Ce=n=>a("REORDER_STATE_EXAMPLES",{...n},void 0,_,"global");export{C as $,q as A,Te as B,le as C,F as D,pe as E,ce as F,Ee as G,Ie as H,Re as I,fe as J,he as K,_e as L,Me as M,Le as N,_ as O,O as P,k as Q,J as R,p as S,g as T,Q as U,V,h as W,m as X,I as Y,w as Z,j as _,z as a,B as a0,W as a1,H as a2,c as a3,T as a4,S as a5,X as a6,U as a7,y as a8,x as a9,l as aa,f as ab,E as ac,L as ad,P as ae,d as af,A as ag,R as ah,D as ai,M as aj,N as ak,b as al,Y as b,G as c,K as d,oe as e,Oe as f,de as g,be as h,ue as i,ge as j,Se as k,Pe as l,Ae as m,se as n,me as o,Ce as p,ae as q,De as r,te as s,Ne as t,ne as u,ee as v,$ as w,Z as x,ie as y,re as z};
|
|
2
|
+
//# sourceMappingURL=creators.C9agoPvT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creators.Cg7hgtUz.js","sources":["../../../../packages/document-model/dist/src/document-model/gen/schema/zod.js","../../../../packages/document-model/dist/src/document-model/gen/header/creators.js","../../../../packages/document-model/dist/src/document-model/gen/module/creators.js","../../../../packages/document-model/dist/src/document-model/gen/operation-error/creators.js","../../../../packages/document-model/dist/src/document-model/gen/operation/creators.js","../../../../packages/document-model/dist/src/document-model/gen/state/creators.js"],"sourcesContent":["import { z } from \"zod\";\nexport const isDefinedNonNullAny = (v) => v !== undefined && v !== null;\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\nexport function AddChangeLogItemInputSchema() {\n return z.object({\n __typename: z.literal(\"AddChangeLogItemInput\").optional(),\n content: z.string(),\n id: z.string(),\n insertBefore: z.string().nullable(),\n });\n}\nexport function AddModuleInputSchema() {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n name: z.string(),\n });\n}\nexport function AddOperationErrorInputSchema() {\n return z.object({\n errorCode: z.string().nullish(),\n errorDescription: z.string().nullish(),\n errorName: z.string().nullish(),\n errorTemplate: z.string().nullish(),\n id: z.string(),\n operationId: z.string(),\n });\n}\nexport function AddOperationExampleInputSchema() {\n return z.object({\n example: z.string(),\n id: z.string(),\n operationId: z.string(),\n });\n}\nexport function AddOperationInputSchema() {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n moduleId: z.string(),\n name: z.string(),\n reducer: z.string().nullish(),\n schema: z.string().nullish(),\n template: z.string().nullish(),\n scope: OperationScopeSchema().nullish(),\n });\n}\nexport function AddStateExampleInputSchema() {\n return z.object({\n scope: z.string(),\n example: z.string(),\n id: z.string(),\n insertBefore: z.string().nullish(),\n });\n}\nexport function AuthorSchema() {\n return z.object({\n __typename: z.literal(\"Author\").optional(),\n name: z.string(),\n website: z.string().nullable(),\n });\n}\nexport function CodeExampleSchema() {\n return z.object({\n __typename: z.literal(\"CodeExample\").optional(),\n id: z.string(),\n value: z.string(),\n });\n}\nexport function DeleteChangeLogItemInputSchema() {\n return z.object({\n __typename: z.literal(\"DeleteChangeLogItemInput\").optional(),\n id: z.string(),\n });\n}\nexport function DeleteModuleInputSchema() {\n return z.object({\n id: z.string(),\n });\n}\nexport function DeleteOperationErrorInputSchema() {\n return z.object({\n id: z.string(),\n });\n}\nexport function DeleteOperationExampleInputSchema() {\n return z.object({\n id: z.string(),\n });\n}\nexport function DeleteOperationInputSchema() {\n return z.object({\n id: z.string(),\n });\n}\nexport function DeleteStateExampleInputSchema() {\n return z.object({\n scope: z.string(),\n id: z.string(),\n });\n}\nexport function OperationScopeSchema() {\n return z.string();\n}\nexport function DocumentModelInputSchema() {\n return z.union([\n AddChangeLogItemInputSchema(),\n AddModuleInputSchema(),\n AddOperationErrorInputSchema(),\n AddOperationExampleInputSchema(),\n AddOperationInputSchema(),\n AddStateExampleInputSchema(),\n DeleteChangeLogItemInputSchema(),\n DeleteModuleInputSchema(),\n DeleteOperationErrorInputSchema(),\n DeleteOperationExampleInputSchema(),\n DeleteOperationInputSchema(),\n DeleteStateExampleInputSchema(),\n MoveOperationInputSchema(),\n ReorderChangeLogItemsInputSchema(),\n ReorderModuleOperationsInputSchema(),\n ReorderModulesInputSchema(),\n ReorderOperationErrorsInputSchema(),\n ReorderOperationExamplesInputSchema(),\n ReorderStateExamplesInputSchema(),\n SetAuthorNameInputSchema(),\n SetAuthorWebsiteInputSchema(),\n SetInitialStateInputSchema(),\n SetModelDescriptionInputSchema(),\n SetModelExtensionInputSchema(),\n SetModelIdInputSchema(),\n SetModelNameInputSchema(),\n SetModuleDescriptionInputSchema(),\n SetModuleNameInputSchema(),\n SetOperationDescriptionInputSchema(),\n SetOperationErrorCodeInputSchema(),\n SetOperationErrorDescriptionInputSchema(),\n SetOperationErrorNameInputSchema(),\n SetOperationErrorTemplateInputSchema(),\n SetOperationNameInputSchema(),\n SetOperationReducerInputSchema(),\n SetOperationSchemaInputSchema(),\n SetOperationTemplateInputSchema(),\n SetStateSchemaInputSchema(),\n UpdateChangeLogItemInputSchema(),\n UpdateOperationExampleInputSchema(),\n UpdateStateExampleInputSchema(),\n ]);\n}\nexport function DocumentModelStateSchema() {\n return z.object({\n __typename: z.literal(\"DocumentModelState\").optional(),\n author: AuthorSchema(),\n description: z.string(),\n extension: z.string(),\n id: z.string(),\n name: z.string(),\n specifications: z.array(DocumentSpecificationSchema()),\n });\n}\nexport function DocumentSpecificationSchema() {\n return z.object({\n __typename: z.literal(\"DocumentSpecification\").optional(),\n changeLog: z.array(z.string()),\n modules: z.array(ModuleSchema()),\n state: ScopeStateSchema(),\n version: z.number(),\n });\n}\nexport function ModuleSchema() {\n return z.object({\n __typename: z.literal(\"Module\").optional(),\n description: z.string().nullable(),\n id: z.string(),\n name: z.string(),\n operations: z.array(OperationSchema()),\n });\n}\nexport function MoveOperationInputSchema() {\n return z.object({\n newModuleId: z.string(),\n operationId: z.string(),\n });\n}\nexport function OperationSchema() {\n return z.object({\n __typename: z.literal(\"Operation\").optional(),\n description: z.string().nullable(),\n errors: z.array(OperationErrorSchema()),\n examples: z.array(CodeExampleSchema()),\n id: z.string(),\n name: z.string().nullable(),\n reducer: z.string().nullable(),\n schema: z.string().nullable(),\n template: z.string().nullable(),\n scope: OperationScopeSchema(),\n });\n}\nexport function OperationErrorSchema() {\n return z.object({\n __typename: z.literal(\"OperationError\").optional(),\n code: z.string().nullable(),\n description: z.string().nullable(),\n id: z.string(),\n name: z.string().nullable(),\n template: z.string().nullable(),\n });\n}\nexport function ReorderChangeLogItemsInputSchema() {\n return z.object({\n __typename: z.literal(\"ReorderChangeLogItemsInput\").optional(),\n order: z.array(z.string()),\n });\n}\nexport function ReorderModuleOperationsInputSchema() {\n return z.object({\n moduleId: z.string(),\n order: z.array(z.string()),\n });\n}\nexport function ReorderModulesInputSchema() {\n return z.object({\n order: z.array(z.string()),\n });\n}\nexport function ReorderOperationErrorsInputSchema() {\n return z.object({\n operationId: z.string(),\n order: z.array(z.string()),\n });\n}\nexport function ReorderOperationExamplesInputSchema() {\n return z.object({\n operationId: z.string(),\n order: z.array(z.string()),\n });\n}\nexport function ReorderStateExamplesInputSchema() {\n return z.object({\n scope: z.string(),\n order: z.array(z.string()),\n });\n}\nexport function SetAuthorNameInputSchema() {\n return z.object({\n authorName: z.string(),\n });\n}\nexport function SetAuthorWebsiteInputSchema() {\n return z.object({\n authorWebsite: z.string(),\n });\n}\nexport function SetInitialStateInputSchema() {\n return z.object({\n scope: z.string(),\n initialValue: z.string(),\n });\n}\nexport function SetModelDescriptionInputSchema() {\n return z.object({\n description: z.string(),\n });\n}\nexport function SetModelExtensionInputSchema() {\n return z.object({\n extension: z.string(),\n });\n}\nexport function SetModelIdInputSchema() {\n return z.object({\n id: z.string(),\n });\n}\nexport function SetModelNameInputSchema() {\n return z.object({\n name: z.string(),\n });\n}\nexport function SetModuleDescriptionInputSchema() {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetModuleNameInputSchema() {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n });\n}\nexport function SetOperationDescriptionInputSchema() {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetOperationErrorCodeInputSchema() {\n return z.object({\n errorCode: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetOperationErrorDescriptionInputSchema() {\n return z.object({\n errorDescription: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetOperationErrorNameInputSchema() {\n return z.object({\n errorName: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetOperationErrorTemplateInputSchema() {\n return z.object({\n errorTemplate: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetOperationNameInputSchema() {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n });\n}\nexport function SetOperationScopeInputSchema() {\n return z.object({\n id: z.string(),\n scope: OperationScopeSchema(),\n });\n}\nexport function SetOperationReducerInputSchema() {\n return z.object({\n id: z.string(),\n reducer: z.string().nullish(),\n });\n}\nexport function SetOperationSchemaInputSchema() {\n return z.object({\n id: z.string(),\n schema: z.string().nullish(),\n });\n}\nexport function SetOperationTemplateInputSchema() {\n return z.object({\n id: z.string(),\n template: z.string().nullish(),\n });\n}\nexport function SetStateSchemaInputSchema() {\n return z.object({\n scope: z.string(),\n schema: z.string(),\n });\n}\nexport function StateSchema() {\n return z.object({\n __typename: z.literal(\"State\").optional(),\n examples: z.array(CodeExampleSchema()),\n initialValue: z.string(),\n schema: z.string(),\n });\n}\nexport function ScopeStateSchema() {\n return z.object({\n global: StateSchema(),\n local: StateSchema(),\n });\n}\nexport function UpdateChangeLogItemInputSchema() {\n return z.object({\n __typename: z.literal(\"UpdateChangeLogItemInput\").optional(),\n id: z.string(),\n newContent: z.string(),\n });\n}\nexport function UpdateOperationExampleInputSchema() {\n return z.object({\n example: z.string(),\n id: z.string(),\n });\n}\nexport function UpdateStateExampleInputSchema() {\n return z.object({\n scope: z.string(),\n id: z.string(),\n newExample: z.string(),\n });\n}\n//# sourceMappingURL=zod.js.map","import { createAction } from \"../../../document/utils/base.js\";\nimport { z, } from \"../schema/index.js\";\nexport const setModelName = (input) => createAction(\"SET_MODEL_NAME\", { ...input }, undefined, z.SetModelNameInputSchema, \"global\");\nexport const setModelId = (input) => createAction(\"SET_MODEL_ID\", { ...input }, undefined, z.SetModelIdInputSchema, \"global\");\nexport const setModelExtension = (input) => createAction(\"SET_MODEL_EXTENSION\", { ...input }, undefined, z.SetModelExtensionInputSchema, \"global\");\nexport const setModelDescription = (input) => createAction(\"SET_MODEL_DESCRIPTION\", { ...input }, undefined, z.SetModelDescriptionInputSchema, \"global\");\nexport const setAuthorName = (input) => createAction(\"SET_AUTHOR_NAME\", { ...input }, undefined, z.SetAuthorNameInputSchema, \"global\");\nexport const setAuthorWebsite = (input) => createAction(\"SET_AUTHOR_WEBSITE\", { ...input }, undefined, z.SetAuthorWebsiteInputSchema, \"global\");\n//# sourceMappingURL=creators.js.map","import { createAction } from \"../../../document/utils/base.js\";\nimport { z, } from \"../schema/index.js\";\nexport const addModule = (input) => createAction(\"ADD_MODULE\", { ...input }, undefined, z.AddModuleInputSchema, \"global\");\nexport const setModuleName = (input) => createAction(\"SET_MODULE_NAME\", { ...input }, undefined, z.SetModuleNameInputSchema, \"global\");\nexport const setModuleDescription = (input) => createAction(\"SET_MODULE_DESCRIPTION\", { ...input }, undefined, z.SetModuleDescriptionInputSchema, \"global\");\nexport const deleteModule = (input) => createAction(\"DELETE_MODULE\", { ...input }, undefined, z.DeleteModuleInputSchema, \"global\");\nexport const reorderModules = (input) => createAction(\"REORDER_MODULES\", { ...input }, undefined, z.ReorderModulesInputSchema, \"global\");\n//# sourceMappingURL=creators.js.map","import { createAction } from \"../../../document/utils/base.js\";\nimport { z, } from \"../schema/index.js\";\nexport const addOperationError = (input) => createAction(\"ADD_OPERATION_ERROR\", { ...input }, undefined, z.AddOperationErrorInputSchema, \"global\");\nexport const setOperationErrorCode = (input) => createAction(\"SET_OPERATION_ERROR_CODE\", { ...input }, undefined, z.SetOperationErrorCodeInputSchema, \"global\");\nexport const setOperationErrorName = (input) => createAction(\"SET_OPERATION_ERROR_NAME\", { ...input }, undefined, z.SetOperationErrorNameInputSchema, \"global\");\nexport const setOperationErrorDescription = (input) => createAction(\"SET_OPERATION_ERROR_DESCRIPTION\", { ...input }, undefined, z.SetOperationErrorDescriptionInputSchema, \"global\");\nexport const setOperationErrorTemplate = (input) => createAction(\"SET_OPERATION_ERROR_TEMPLATE\", { ...input }, undefined, z.SetOperationErrorTemplateInputSchema, \"global\");\nexport const deleteOperationError = (input) => createAction(\"DELETE_OPERATION_ERROR\", { ...input }, undefined, z.DeleteOperationErrorInputSchema, \"global\");\nexport const reorderOperationErrors = (input) => createAction(\"REORDER_OPERATION_ERRORS\", { ...input }, undefined, z.ReorderOperationErrorsInputSchema, \"global\");\n//# sourceMappingURL=creators.js.map","import { createAction } from \"../../../document/utils/base.js\";\nimport { z, } from \"../schema/index.js\";\nexport const addOperation = (input) => createAction(\"ADD_OPERATION\", { ...input }, undefined, z.AddOperationInputSchema, \"global\");\nexport const setOperationName = (input) => createAction(\"SET_OPERATION_NAME\", { ...input }, undefined, z.SetOperationNameInputSchema, \"global\");\nexport const setOperationScope = (input) => createAction(\"SET_OPERATION_SCOPE\", { ...input }, undefined, z.SetOperationScopeInputSchema, \"global\");\nexport const setOperationSchema = (input) => createAction(\"SET_OPERATION_SCHEMA\", { ...input }, undefined, z.SetOperationSchemaInputSchema, \"global\");\nexport const setOperationDescription = (input) => createAction(\"SET_OPERATION_DESCRIPTION\", { ...input }, undefined, z.SetOperationDescriptionInputSchema, \"global\");\nexport const setOperationTemplate = (input) => createAction(\"SET_OPERATION_TEMPLATE\", { ...input }, undefined, z.SetOperationTemplateInputSchema, \"global\");\nexport const setOperationReducer = (input) => createAction(\"SET_OPERATION_REDUCER\", { ...input }, undefined, z.SetOperationReducerInputSchema, \"global\");\nexport const moveOperation = (input) => createAction(\"MOVE_OPERATION\", { ...input }, undefined, z.MoveOperationInputSchema, \"global\");\nexport const deleteOperation = (input) => createAction(\"DELETE_OPERATION\", { ...input }, undefined, z.DeleteOperationInputSchema, \"global\");\nexport const reorderModuleOperations = (input) => createAction(\"REORDER_MODULE_OPERATIONS\", { ...input }, undefined, z.ReorderModuleOperationsInputSchema, \"global\");\n//# sourceMappingURL=creators.js.map","import { createAction } from \"../../../document/utils/base.js\";\nimport { z, } from \"../schema/index.js\";\nexport const setStateSchema = (input) => createAction(\"SET_STATE_SCHEMA\", { ...input }, undefined, z.SetStateSchemaInputSchema, \"global\");\nexport const setInitialState = (input) => createAction(\"SET_INITIAL_STATE\", { ...input }, undefined, z.SetInitialStateInputSchema, \"global\");\nexport const addStateExample = (input) => createAction(\"ADD_STATE_EXAMPLE\", { ...input }, undefined, z.AddStateExampleInputSchema, \"global\");\nexport const updateStateExample = (input) => createAction(\"UPDATE_STATE_EXAMPLE\", { ...input }, undefined, z.UpdateStateExampleInputSchema, \"global\");\nexport const deleteStateExample = (input) => createAction(\"DELETE_STATE_EXAMPLE\", { ...input }, undefined, z.DeleteStateExampleInputSchema, \"global\");\nexport const reorderStateExamples = (input) => createAction(\"REORDER_STATE_EXAMPLES\", { ...input }, undefined, z.ReorderStateExamplesInputSchema, \"global\");\n//# sourceMappingURL=creators.js.map"],"names":["isDefinedNonNullAny","v","z\n .any","AddChangeLogItemInputSchema","z.object","z.literal","z.string","AddModuleInputSchema","AddOperationErrorInputSchema","AddOperationExampleInputSchema","AddOperationInputSchema","OperationScopeSchema","AddStateExampleInputSchema","DeleteChangeLogItemInputSchema","DeleteModuleInputSchema","DeleteOperationErrorInputSchema","DeleteOperationExampleInputSchema","DeleteOperationInputSchema","DeleteStateExampleInputSchema","MoveOperationInputSchema","ReorderChangeLogItemsInputSchema","z.array","ReorderModuleOperationsInputSchema","ReorderModulesInputSchema","ReorderOperationErrorsInputSchema","ReorderOperationExamplesInputSchema","ReorderStateExamplesInputSchema","SetAuthorNameInputSchema","SetAuthorWebsiteInputSchema","SetInitialStateInputSchema","SetModelDescriptionInputSchema","SetModelExtensionInputSchema","SetModelIdInputSchema","SetModelNameInputSchema","SetModuleDescriptionInputSchema","SetModuleNameInputSchema","SetOperationDescriptionInputSchema","SetOperationErrorCodeInputSchema","SetOperationErrorDescriptionInputSchema","SetOperationErrorNameInputSchema","SetOperationErrorTemplateInputSchema","SetOperationNameInputSchema","SetOperationScopeInputSchema","SetOperationReducerInputSchema","SetOperationSchemaInputSchema","SetOperationTemplateInputSchema","SetStateSchemaInputSchema","UpdateChangeLogItemInputSchema","UpdateOperationExampleInputSchema","UpdateStateExampleInputSchema","setModelName","input","createAction","z.SetModelNameInputSchema","setModelId","z.SetModelIdInputSchema","setModelExtension","z.SetModelExtensionInputSchema","setModelDescription","z.SetModelDescriptionInputSchema","setAuthorName","z.SetAuthorNameInputSchema","setAuthorWebsite","z.SetAuthorWebsiteInputSchema","addModule","z.AddModuleInputSchema","setModuleName","z.SetModuleNameInputSchema","setModuleDescription","z.SetModuleDescriptionInputSchema","deleteModule","z.DeleteModuleInputSchema","reorderModules","z.ReorderModulesInputSchema","addOperationError","z.AddOperationErrorInputSchema","setOperationErrorCode","z.SetOperationErrorCodeInputSchema","setOperationErrorName","z.SetOperationErrorNameInputSchema","setOperationErrorDescription","z.SetOperationErrorDescriptionInputSchema","setOperationErrorTemplate","z.SetOperationErrorTemplateInputSchema","deleteOperationError","z.DeleteOperationErrorInputSchema","reorderOperationErrors","z.ReorderOperationErrorsInputSchema","addOperation","z.AddOperationInputSchema","setOperationName","z.SetOperationNameInputSchema","setOperationScope","z.SetOperationScopeInputSchema","setOperationSchema","z.SetOperationSchemaInputSchema","setOperationDescription","z.SetOperationDescriptionInputSchema","setOperationTemplate","z.SetOperationTemplateInputSchema","setOperationReducer","z.SetOperationReducerInputSchema","moveOperation","z.MoveOperationInputSchema","deleteOperation","z.DeleteOperationInputSchema","reorderModuleOperations","z.ReorderModuleOperationsInputSchema","setStateSchema","z.SetStateSchemaInputSchema","setInitialState","z.SetInitialStateInputSchema","addStateExample","z.AddStateExampleInputSchema","updateStateExample","z.UpdateStateExampleInputSchema","deleteStateExample","z.DeleteStateExampleInputSchema","reorderStateExam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,GAAGD,CAAK,EAAI,OAAW4D,EAA8B,QAAQ,EAC9HC,GAAmB7D,GAAUC,EAAa,oBAAqB,CAAE,GAAGD,CAAK,EAAI,OAAW8D,EAA8B,QAAQ,EAC9HC,GAAsB/D,GAAUC,EAAa,uBAAwB,CAAE,GAAGD,CAAK,EAAI,OAAWgE,EAAiC,QAAQ,EACvIC,GAAsBjE,GAAUC,EAAa,uBAAwB,CAAE,GAAGD,CAAK,EAAI,OAAWkE,EAAiC,QAAQ,EACvIC,GAAwBnE,GAAUC,EAAa,yBAA0B,CAAE,GAAGD,CAAK,EAAI,OAAWoE,EAAmC,QAAQ"}
|
|
1
|
+
{"version":3,"file":"creators.C9agoPvT.js","sources":["../../../../packages/document-model/dist/src/document-model/gen/schema/zod.js","../../../../packages/document-model/dist/src/document-model/gen/header/creators.js","../../../../packages/document-model/dist/src/document-model/gen/module/creators.js","../../../../packages/document-model/dist/src/document-model/gen/operation-error/creators.js","../../../../packages/document-model/dist/src/document-model/gen/operation/creators.js","../../../../packages/document-model/dist/src/document-model/gen/state/creators.js"],"sourcesContent":["import { z } from \"zod\";\nexport const isDefinedNonNullAny = (v) => v !== undefined && v !== null;\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\nexport function AddChangeLogItemInputSchema() {\n return z.object({\n __typename: z.literal(\"AddChangeLogItemInput\").optional(),\n content: z.string(),\n id: z.string(),\n insertBefore: z.string().nullable(),\n });\n}\nexport function AddModuleInputSchema() {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n name: z.string(),\n });\n}\nexport function AddOperationErrorInputSchema() {\n return z.object({\n errorCode: z.string().nullish(),\n errorDescription: z.string().nullish(),\n errorName: z.string().nullish(),\n errorTemplate: z.string().nullish(),\n id: z.string(),\n operationId: z.string(),\n });\n}\nexport function AddOperationExampleInputSchema() {\n return z.object({\n example: z.string(),\n id: z.string(),\n operationId: z.string(),\n });\n}\nexport function AddOperationInputSchema() {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n moduleId: z.string(),\n name: z.string(),\n reducer: z.string().nullish(),\n schema: z.string().nullish(),\n template: z.string().nullish(),\n scope: OperationScopeSchema().nullish(),\n });\n}\nexport function AddStateExampleInputSchema() {\n return z.object({\n scope: z.string(),\n example: z.string(),\n id: z.string(),\n insertBefore: z.string().nullish(),\n });\n}\nexport function AuthorSchema() {\n return z.object({\n __typename: z.literal(\"Author\").optional(),\n name: z.string(),\n website: z.string().nullable(),\n });\n}\nexport function CodeExampleSchema() {\n return z.object({\n __typename: z.literal(\"CodeExample\").optional(),\n id: z.string(),\n value: z.string(),\n });\n}\nexport function DeleteChangeLogItemInputSchema() {\n return z.object({\n __typename: z.literal(\"DeleteChangeLogItemInput\").optional(),\n id: z.string(),\n });\n}\nexport function DeleteModuleInputSchema() {\n return z.object({\n id: z.string(),\n });\n}\nexport function DeleteOperationErrorInputSchema() {\n return z.object({\n id: z.string(),\n });\n}\nexport function DeleteOperationExampleInputSchema() {\n return z.object({\n id: z.string(),\n });\n}\nexport function DeleteOperationInputSchema() {\n return z.object({\n id: z.string(),\n });\n}\nexport function DeleteStateExampleInputSchema() {\n return z.object({\n scope: z.string(),\n id: z.string(),\n });\n}\nexport function OperationScopeSchema() {\n return z.string();\n}\nexport function DocumentModelInputSchema() {\n return z.union([\n AddChangeLogItemInputSchema(),\n AddModuleInputSchema(),\n AddOperationErrorInputSchema(),\n AddOperationExampleInputSchema(),\n AddOperationInputSchema(),\n AddStateExampleInputSchema(),\n DeleteChangeLogItemInputSchema(),\n DeleteModuleInputSchema(),\n DeleteOperationErrorInputSchema(),\n DeleteOperationExampleInputSchema(),\n DeleteOperationInputSchema(),\n DeleteStateExampleInputSchema(),\n MoveOperationInputSchema(),\n ReorderChangeLogItemsInputSchema(),\n ReorderModuleOperationsInputSchema(),\n ReorderModulesInputSchema(),\n ReorderOperationErrorsInputSchema(),\n ReorderOperationExamplesInputSchema(),\n ReorderStateExamplesInputSchema(),\n SetAuthorNameInputSchema(),\n SetAuthorWebsiteInputSchema(),\n SetInitialStateInputSchema(),\n SetModelDescriptionInputSchema(),\n SetModelExtensionInputSchema(),\n SetModelIdInputSchema(),\n SetModelNameInputSchema(),\n SetModuleDescriptionInputSchema(),\n SetModuleNameInputSchema(),\n SetOperationDescriptionInputSchema(),\n SetOperationErrorCodeInputSchema(),\n SetOperationErrorDescriptionInputSchema(),\n SetOperationErrorNameInputSchema(),\n SetOperationErrorTemplateInputSchema(),\n SetOperationNameInputSchema(),\n SetOperationReducerInputSchema(),\n SetOperationSchemaInputSchema(),\n SetOperationTemplateInputSchema(),\n SetStateSchemaInputSchema(),\n UpdateChangeLogItemInputSchema(),\n UpdateOperationExampleInputSchema(),\n UpdateStateExampleInputSchema(),\n ]);\n}\nexport function DocumentModelStateSchema() {\n return z.object({\n __typename: z.literal(\"DocumentModelState\").optional(),\n author: AuthorSchema(),\n description: z.string(),\n extension: z.string(),\n id: z.string(),\n name: z.string(),\n specifications: z.array(DocumentSpecificationSchema()),\n });\n}\nexport function DocumentSpecificationSchema() {\n return z.object({\n __typename: z.literal(\"DocumentSpecification\").optional(),\n changeLog: z.array(z.string()),\n modules: z.array(ModuleSchema()),\n state: ScopeStateSchema(),\n version: z.number(),\n });\n}\nexport function ModuleSchema() {\n return z.object({\n __typename: z.literal(\"Module\").optional(),\n description: z.string().nullable(),\n id: z.string(),\n name: z.string(),\n operations: z.array(OperationSchema()),\n });\n}\nexport function MoveOperationInputSchema() {\n return z.object({\n newModuleId: z.string(),\n operationId: z.string(),\n });\n}\nexport function OperationSchema() {\n return z.object({\n __typename: z.literal(\"Operation\").optional(),\n description: z.string().nullable(),\n errors: z.array(OperationErrorSchema()),\n examples: z.array(CodeExampleSchema()),\n id: z.string(),\n name: z.string().nullable(),\n reducer: z.string().nullable(),\n schema: z.string().nullable(),\n template: z.string().nullable(),\n scope: OperationScopeSchema(),\n });\n}\nexport function OperationErrorSchema() {\n return z.object({\n __typename: z.literal(\"OperationError\").optional(),\n code: z.string().nullable(),\n description: z.string().nullable(),\n id: z.string(),\n name: z.string().nullable(),\n template: z.string().nullable(),\n });\n}\nexport function ReorderChangeLogItemsInputSchema() {\n return z.object({\n __typename: z.literal(\"ReorderChangeLogItemsInput\").optional(),\n order: z.array(z.string()),\n });\n}\nexport function ReorderModuleOperationsInputSchema() {\n return z.object({\n moduleId: z.string(),\n order: z.array(z.string()),\n });\n}\nexport function ReorderModulesInputSchema() {\n return z.object({\n order: z.array(z.string()),\n });\n}\nexport function ReorderOperationErrorsInputSchema() {\n return z.object({\n operationId: z.string(),\n order: z.array(z.string()),\n });\n}\nexport function ReorderOperationExamplesInputSchema() {\n return z.object({\n operationId: z.string(),\n order: z.array(z.string()),\n });\n}\nexport function ReorderStateExamplesInputSchema() {\n return z.object({\n scope: z.string(),\n order: z.array(z.string()),\n });\n}\nexport function SetAuthorNameInputSchema() {\n return z.object({\n authorName: z.string(),\n });\n}\nexport function SetAuthorWebsiteInputSchema() {\n return z.object({\n authorWebsite: z.string(),\n });\n}\nexport function SetInitialStateInputSchema() {\n return z.object({\n scope: z.string(),\n initialValue: z.string(),\n });\n}\nexport function SetModelDescriptionInputSchema() {\n return z.object({\n description: z.string(),\n });\n}\nexport function SetModelExtensionInputSchema() {\n return z.object({\n extension: z.string(),\n });\n}\nexport function SetModelIdInputSchema() {\n return z.object({\n id: z.string(),\n });\n}\nexport function SetModelNameInputSchema() {\n return z.object({\n name: z.string(),\n });\n}\nexport function SetModuleDescriptionInputSchema() {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetModuleNameInputSchema() {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n });\n}\nexport function SetOperationDescriptionInputSchema() {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetOperationErrorCodeInputSchema() {\n return z.object({\n errorCode: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetOperationErrorDescriptionInputSchema() {\n return z.object({\n errorDescription: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetOperationErrorNameInputSchema() {\n return z.object({\n errorName: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetOperationErrorTemplateInputSchema() {\n return z.object({\n errorTemplate: z.string().nullish(),\n id: z.string(),\n });\n}\nexport function SetOperationNameInputSchema() {\n return z.object({\n id: z.string(),\n name: z.string().nullish(),\n });\n}\nexport function SetOperationScopeInputSchema() {\n return z.object({\n id: z.string(),\n scope: OperationScopeSchema(),\n });\n}\nexport function SetOperationReducerInputSchema() {\n return z.object({\n id: z.string(),\n reducer: z.string().nullish(),\n });\n}\nexport function SetOperationSchemaInputSchema() {\n return z.object({\n id: z.string(),\n schema: z.string().nullish(),\n });\n}\nexport function SetOperationTemplateInputSchema() {\n return z.object({\n id: z.string(),\n template: z.string().nullish(),\n });\n}\nexport function SetStateSchemaInputSchema() {\n return z.object({\n scope: z.string(),\n schema: z.string(),\n });\n}\nexport function StateSchema() {\n return z.object({\n __typename: z.literal(\"State\").optional(),\n examples: z.array(CodeExampleSchema()),\n initialValue: z.string(),\n schema: z.string(),\n });\n}\nexport function ScopeStateSchema() {\n return z.object({\n global: StateSchema(),\n local: StateSchema(),\n });\n}\nexport function UpdateChangeLogItemInputSchema() {\n return z.object({\n __typename: z.literal(\"UpdateChangeLogItemInput\").optional(),\n id: z.string(),\n newContent: z.string(),\n });\n}\nexport function UpdateOperationExampleInputSchema() {\n return z.object({\n example: z.string(),\n id: z.string(),\n });\n}\nexport function UpdateStateExampleInputSchema() {\n return z.object({\n scope: z.string(),\n id: z.string(),\n newExample: z.string(),\n });\n}\n//# sourceMappingURL=zod.js.map","import { createAction } from \"../../../document/utils/base.js\";\nimport { z, } from \"../schema/index.js\";\nexport const setModelName = (input) => createAction(\"SET_MODEL_NAME\", { ...input }, undefined, z.SetModelNameInputSchema, \"global\");\nexport const setModelId = (input) => createAction(\"SET_MODEL_ID\", { ...input }, undefined, z.SetModelIdInputSchema, \"global\");\nexport const setModelExtension = (input) => createAction(\"SET_MODEL_EXTENSION\", { ...input }, undefined, z.SetModelExtensionInputSchema, \"global\");\nexport const setModelDescription = (input) => createAction(\"SET_MODEL_DESCRIPTION\", { ...input }, undefined, z.SetModelDescriptionInputSchema, \"global\");\nexport const setAuthorName = (input) => createAction(\"SET_AUTHOR_NAME\", { ...input }, undefined, z.SetAuthorNameInputSchema, \"global\");\nexport const setAuthorWebsite = (input) => createAction(\"SET_AUTHOR_WEBSITE\", { ...input }, undefined, z.SetAuthorWebsiteInputSchema, \"global\");\n//# sourceMappingURL=creators.js.map","import { createAction } from \"../../../document/utils/base.js\";\nimport { z, } from \"../schema/index.js\";\nexport const addModule = (input) => createAction(\"ADD_MODULE\", { ...input }, undefined, z.AddModuleInputSchema, \"global\");\nexport const setModuleName = (input) => createAction(\"SET_MODULE_NAME\", { ...input }, undefined, z.SetModuleNameInputSchema, \"global\");\nexport const setModuleDescription = (input) => createAction(\"SET_MODULE_DESCRIPTION\", { ...input }, undefined, z.SetModuleDescriptionInputSchema, \"global\");\nexport const deleteModule = (input) => createAction(\"DELETE_MODULE\", { ...input }, undefined, z.DeleteModuleInputSchema, \"global\");\nexport const reorderModules = (input) => createAction(\"REORDER_MODULES\", { ...input }, undefined, z.ReorderModulesInputSchema, \"global\");\n//# sourceMappingURL=creators.js.map","import { createAction } from \"../../../document/utils/base.js\";\nimport { z, } from \"../schema/index.js\";\nexport const addOperationError = (input) => createAction(\"ADD_OPERATION_ERROR\", { ...input }, undefined, z.AddOperationErrorInputSchema, \"global\");\nexport const setOperationErrorCode = (input) => createAction(\"SET_OPERATION_ERROR_CODE\", { ...input }, undefined, z.SetOperationErrorCodeInputSchema, \"global\");\nexport const setOperationErrorName = (input) => createAction(\"SET_OPERATION_ERROR_NAME\", { ...input }, undefined, z.SetOperationErrorNameInputSchema, \"global\");\nexport const setOperationErrorDescription = (input) => createAction(\"SET_OPERATION_ERROR_DESCRIPTION\", { ...input }, undefined, z.SetOperationErrorDescriptionInputSchema, \"global\");\nexport const setOperationErrorTemplate = (input) => createAction(\"SET_OPERATION_ERROR_TEMPLATE\", { ...input }, undefined, z.SetOperationErrorTemplateInputSchema, \"global\");\nexport const deleteOperationError = (input) => createAction(\"DELETE_OPERATION_ERROR\", { ...input }, undefined, z.DeleteOperationErrorInputSchema, \"global\");\nexport const reorderOperationErrors = (input) => createAction(\"REORDER_OPERATION_ERRORS\", { ...input }, undefined, z.ReorderOperationErrorsInputSchema, \"global\");\n//# sourceMappingURL=creators.js.map","import { createAction } from \"../../../document/utils/base.js\";\nimport { z, } from \"../schema/index.js\";\nexport const addOperation = (input) => createAction(\"ADD_OPERATION\", { ...input }, undefined, z.AddOperationInputSchema, \"global\");\nexport const setOperationName = (input) => createAction(\"SET_OPERATION_NAME\", { ...input }, undefined, z.SetOperationNameInputSchema, \"global\");\nexport const setOperationScope = (input) => createAction(\"SET_OPERATION_SCOPE\", { ...input }, undefined, z.SetOperationScopeInputSchema, \"global\");\nexport const setOperationSchema = (input) => createAction(\"SET_OPERATION_SCHEMA\", { ...input }, undefined, z.SetOperationSchemaInputSchema, \"global\");\nexport const setOperationDescription = (input) => createAction(\"SET_OPERATION_DESCRIPTION\", { ...input }, undefined, z.SetOperationDescriptionInputSchema, \"global\");\nexport const setOperationTemplate = (input) => createAction(\"SET_OPERATION_TEMPLATE\", { ...input }, undefined, z.SetOperationTemplateInputSchema, \"global\");\nexport const setOperationReducer = (input) => createAction(\"SET_OPERATION_REDUCER\", { ...input }, undefined, z.SetOperationReducerInputSchema, \"global\");\nexport const moveOperation = (input) => createAction(\"MOVE_OPERATION\", { ...input }, undefined, z.MoveOperationInputSchema, \"global\");\nexport const deleteOperation = (input) => createAction(\"DELETE_OPERATION\", { ...input }, undefined, z.DeleteOperationInputSchema, \"global\");\nexport const reorderModuleOperations = (input) => createAction(\"REORDER_MODULE_OPERATIONS\", { ...input }, undefined, z.ReorderModuleOperationsInputSchema, \"global\");\n//# sourceMappingURL=creators.js.map","import { createAction } from \"../../../document/utils/base.js\";\nimport { z, } from \"../schema/index.js\";\nexport const setStateSchema = (input) => createAction(\"SET_STATE_SCHEMA\", { ...input }, undefined, z.SetStateSchemaInputSchema, \"global\");\nexport const setInitialState = (input) => createAction(\"SET_INITIAL_STATE\", { ...input }, undefined, z.SetInitialStateInputSchema, \"global\");\nexport const addStateExample = (input) => createAction(\"ADD_STATE_EXAMPLE\", { ...input }, undefined, z.AddStateExampleInputSchema, \"global\");\nexport const updateStateExample = (input) => createAction(\"UPDATE_STATE_EXAMPLE\", { ...input }, undefined, z.UpdateStateExampleInputSchema, \"global\");\nexport const deleteStateExample = (input) => createAction(\"DELETE_STATE_EXAMPLE\", { ...input }, undefined, z.DeleteStateExampleInputSchema, \"global\");\nexport const reorderStateExamples = (input) => createAction(\"REORDER_STATE_EXAMPLES\", { ...input }, undefined, z.ReorderStateExamplesInputSchema, \"global\");\n//# sourceMappingURL=creators.js.map"],"names":["isDefinedNonNullAny","v","z\n .any","AddChangeLogItemInputSchema","z.object","z.literal","z.string","AddModuleInputSchema","AddOperationErrorInputSchema","AddOperationExampleInputSchema","AddOperationInputSchema","OperationScopeSchema","AddStateExampleInputSchema","DeleteChangeLogItemInputSchema","DeleteModuleInputSchema","DeleteOperationErrorInputSchema","DeleteOperationExampleInputSchema","DeleteOperationInputSchema","DeleteStateExampleInputSchema","MoveOperationInputSchema","ReorderChangeLogItemsInputSchema","z.array","ReorderModuleOperationsInputSchema","ReorderModulesInputSchema","ReorderOperationErrorsInputSchema","ReorderOperationExamplesInputSchema","ReorderStateExamplesInputSchema","SetAuthorNameInputSchema","SetAuthorWebsiteInputSchema","SetInitialStateInputSchema","SetModelDescriptionInputSchema","SetModelExtensionInputSchema","SetModelIdInputSchema","SetModelNameInputSchema","SetModuleDescriptionInputSchema","SetModuleNameInputSchema","SetOperationDescriptionInputSchema","SetOperationErrorCodeInputSchema","SetOperationErrorDescriptionInputSchema","SetOperationErrorNameInputSchema","SetOperationErrorTemplateInputSchema","SetOperationNameInputSchema","SetOperationScopeInputSchema","SetOperationReducerInputSchema","SetOperationSchemaInputSchema","SetOperationTemplateInputSchema","SetStateSchemaInputSchema","UpdateChangeLogItemInputSchema","UpdateOperationExampleInputSchema","UpdateStateExampleInputSchema","setModelName","input","createAction","z.SetModelNameInputSchema","setModelId","z.SetModelIdInputSchema","setModelExtension","z.SetModelExtensionInputSchema","setModelDescription","z.SetModelDescriptionInputSchema","setAuthorName","z.SetAuthorNameInputSchema","setAuthorWebsite","z.SetAuthorWebsiteInputSchema","addModule","z.AddModuleInputSchema","setModuleName","z.SetModuleNameInputSchema","setModuleDescription","z.SetModuleDescriptionInputSchema","deleteModule","z.DeleteModuleInputSchema","reorderModules","z.ReorderModulesInputSchema","addOperationError","z.AddOperationErrorInputSchema","setOperationErrorCode","z.SetOperationErrorCodeInputSchema","setOperationErrorName","z.SetOperationErrorNameInputSchema","setOperationErrorDescription","z.SetOperationErrorDescriptionInputSchema","setOperationErrorTemplate","z.SetOperationErrorTemplateInputSchema","deleteOperationError","z.DeleteOperationErrorInputSchema","reorderOperationErrors","z.ReorderOperationErrorsInputSchema","addOperation","z.AddOperationInputSchema","setOperationName","z.SetOperationNameInputSchema","setOperationScope","z.SetOperationScopeInputSchema","setOperationSchema","z.SetOperationSchemaInputSchema","setOperationDescription","z.SetOperationDescriptionInputSchema","setOperationTemplate","z.SetOperationTemplateInputSchema","setOperationReducer","z.SetOperationReducerInputSchema","moveOperation","z.MoveOperationInputSchema","deleteOperation","z.DeleteOperationInputSchema","reorderModuleOperations","z.ReorderModuleOperationsInputSchema","setStateSchema","z.SetStateSchemaInputSchema","setInitialState","z.SetInitialStateInputSchema","addStateExample","z.AddStateExampleInputSchema","updateStateExample","z.UpdateStateExampleInputSchema","deleteStateExample","z.DeleteStateExampleInputSchema","reorderStateExamples","z.ReorderStateExamplesInputSchema"],"mappings":"gFACO,MAAMA,EAAuBC,GAAyBA,GAAM,KAC5BC,EAC/B,EACH,OAAQD,GAAMD,EAAoBC,CAAC,CAAC,EAClC,SAASE,GAA8B,CAC1C,O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AUC,EAAa,uBAAwB,CAAE,GAAGD,CAAK,EAAI,OAAWgE,EAAiC,QAAQ,EACvIC,GAAsBjE,GAAUC,EAAa,uBAAwB,CAAE,GAAGD,CAAK,EAAI,OAAWkE,EAAiC,QAAQ,EACvIC,GAAwBnE,GAAUC,EAAa,yBAA0B,CAAE,GAAGD,CAAK,EAAI,OAAWoE,EAAmC,QAAQ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Component as m,createElement as u,createContext as f}from"react";import{jsx as l}from"react/jsx-runtime";import{i as g,I as h}from"./main.
|
|
2
|
-
//# sourceMappingURL=drive-icon.
|
|
1
|
+
import{Component as m,createElement as u,createContext as f}from"react";import{jsx as l}from"react/jsx-runtime";import{i as g,I as h}from"./main.Dt_K5cUp.js";const p=f(null),c={didCatch:!1,error:null};class B extends m{constructor(r){super(r),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=c}static getDerivedStateFromError(r){return{didCatch:!0,error:r}}resetErrorBoundary(){const{error:r}=this.state;if(r!==null){for(var e,t,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];(e=(t=this.props).onReset)===null||e===void 0||e.call(t,{args:a,reason:"imperative-api"}),this.setState(c)}}componentDidCatch(r,e){var t,n;(t=(n=this.props).onError)===null||t===void 0||t.call(n,r,e)}componentDidUpdate(r,e){const{didCatch:t}=this.state,{resetKeys:n}=this.props;if(t&&e.error!==null&&y(r.resetKeys,n)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:n,prev:r.resetKeys,reason:"keys"}),this.setState(c)}}render(){const{children:r,fallbackRender:e,FallbackComponent:t,fallback:n}=this.props,{didCatch:a,error:o}=this.state;let i=r;if(a){const d={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof e=="function")i=e(d);else if(t)i=u(t,d);else if(n!==void 0)i=n;else throw o}return u(p.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},i)}}function y(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return s.length!==r.length||s.some((e,t)=>!Object.is(e,r[t]))}function b({drive:s}){const r=s?g(s):void 0,e=s==null?void 0:s.state.global.icon;return e?l("img",{src:e,alt:s.header.name,height:32,width:32}):r==="LOCAL"?l(h,{name:"Hdd",size:32}):l(h,{name:"Server",size:32})}export{b as D,B as E};
|
|
2
|
+
//# sourceMappingURL=drive-icon.hoSYWHlo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive-icon.
|
|
1
|
+
{"version":3,"file":"drive-icon.hoSYWHlo.js","sources":["../../../../node_modules/.pnpm/react-error-boundary@4.1.2_react@18.3.1/node_modules/react-error-boundary/dist/react-error-boundary.esm.js","../../src/components/drive-icon.tsx"],"sourcesContent":["'use client';\nimport { createContext, Component, createElement, useContext, useState, useMemo, forwardRef } from 'react';\n\nconst ErrorBoundaryContext = createContext(null);\n\nconst initialState = {\n didCatch: false,\n error: null\n};\nclass ErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.resetErrorBoundary = this.resetErrorBoundary.bind(this);\n this.state = initialState;\n }\n static getDerivedStateFromError(error) {\n return {\n didCatch: true,\n error\n };\n }\n resetErrorBoundary() {\n const {\n error\n } = this.state;\n if (error !== null) {\n var _this$props$onReset, _this$props;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {\n args,\n reason: \"imperative-api\"\n });\n this.setState(initialState);\n }\n }\n componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n (_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);\n }\n componentDidUpdate(prevProps, prevState) {\n const {\n didCatch\n } = this.state;\n const {\n resetKeys\n } = this.props;\n\n // There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array,\n // we'd end up resetting the error boundary immediately.\n // This would likely trigger a second error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.\n\n if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {\n var _this$props$onReset2, _this$props3;\n (_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {\n next: resetKeys,\n prev: prevProps.resetKeys,\n reason: \"keys\"\n });\n this.setState(initialState);\n }\n }\n render() {\n const {\n children,\n fallbackRender,\n FallbackComponent,\n fallback\n } = this.props;\n const {\n didCatch,\n error\n } = this.state;\n let childToRender = children;\n if (didCatch) {\n const props = {\n error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n if (typeof fallbackRender === \"function\") {\n childToRender = fallbackRender(props);\n } else if (FallbackComponent) {\n childToRender = createElement(FallbackComponent, props);\n } else if (fallback !== undefined) {\n childToRender = fallback;\n } else {\n throw error;\n }\n }\n return createElement(ErrorBoundaryContext.Provider, {\n value: {\n didCatch,\n error,\n resetErrorBoundary: this.resetErrorBoundary\n }\n }, childToRender);\n }\n}\nfunction hasArrayChanged() {\n let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));\n}\n\nfunction assertErrorBoundaryContext(value) {\n if (value == null || typeof value.didCatch !== \"boolean\" || typeof value.resetErrorBoundary !== \"function\") {\n throw new Error(\"ErrorBoundaryContext not found\");\n }\n}\n\nfunction useErrorBoundary() {\n const context = useContext(ErrorBoundaryContext);\n assertErrorBoundaryContext(context);\n const [state, setState] = useState({\n error: null,\n hasError: false\n });\n const memoized = useMemo(() => ({\n resetBoundary: () => {\n context.resetErrorBoundary();\n setState({\n error: null,\n hasError: false\n });\n },\n showBoundary: error => setState({\n error,\n hasError: true\n })\n }), [context.resetErrorBoundary]);\n if (state.hasError) {\n throw state.error;\n }\n return memoized;\n}\n\nfunction withErrorBoundary(component, errorBoundaryProps) {\n const Wrapped = forwardRef((props, ref) => createElement(ErrorBoundary, errorBoundaryProps, createElement(component, {\n ...props,\n ref\n })));\n\n // Format for display in DevTools\n const name = component.displayName || component.name || \"Unknown\";\n Wrapped.displayName = \"withErrorBoundary(\".concat(name, \")\");\n return Wrapped;\n}\n\nexport { ErrorBoundary, ErrorBoundaryContext, useErrorBoundary, withErrorBoundary };\n","import { Icon } from \"@powerhousedao/design-system\";\nimport type { DocumentDriveDocument } from \"document-drive\";\nimport { getDriveSharingType } from \"document-drive/server/utils\";\n\nexport function DriveIcon({\n drive,\n}: {\n drive: DocumentDriveDocument | undefined;\n}) {\n const sharingType = drive ? getDriveSharingType(drive) : undefined;\n const driveIconSrc = drive?.state.global.icon;\n\n if (driveIconSrc) {\n return (\n <img src={driveIconSrc} alt={drive.header.name} height={32} width={32} />\n );\n }\n\n if (sharingType === \"LOCAL\") {\n return <Icon name=\"Hdd\" size={32} />;\n }\n\n return <Icon name=\"Server\" size={32} />;\n}\n"],"names":["ErrorBoundaryContext","createContext","initialState","ErrorBoundary","Component","props","error","_this$props$onReset","_this$props","_len","args","_key","info","_this$props$onError","_this$props2","prevProps","prevState","didCatch","resetKeys","hasArrayChanged","_this$props$onReset2","_this$props3","children","fallbackRender","FallbackComponent","fallback","childToRender","createElement","a","b","item","index","DriveIcon","drive","sharingType","getDriveSharingType","driveIconSrc","jsx","Icon"],"mappings":"8JAGA,MAAMA,EAAuBC,EAAc,IAAI,EAEzCC,EAAe,CACnB,SAAU,GACV,MAAO,IACT,EACA,MAAMC,UAAsBC,CAAU,CACpC,YAAYC,EAAO,CACjB,MAAMA,CAAK,EACX,KAAK,mBAAqB,KAAK,mBAAmB,KAAK,IAAI,EAC3D,KAAK,MAAQH,CACf,CACA,OAAO,yBAAyBI,EAAO,CACrC,MAAO,CACL,SAAU,GACV,M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AK,UAC3BmB,EACTE,EAAgBC,EAAcH,EAAmBnB,CAAK,UAC7CoB,IAAa,OACtBC,EAAgBD,MAEhB,OAAMnB,CAEV,CACA,OAAOqB,EAAc3B,EAAqB,SAAU,CAClD,MAAO,CACL,SAAAiB,EACA,MAAAX,EACA,mBAAoB,KAAK,kBACjC,CACA,EAAOoB,CAAa,CAClB,CACF,CACA,SAASP,GAAkB,CACzB,IAAIS,EAAI,UAAU,OAAS,GAAK,UAAU,CAAC,IAAM,OAAY,UAAU,CAAC,EAAI,CAAA,EACxEC,EAAI,UAAU,OAAS,GAAK,UAAU,CAAC,IAAM,OAAY,UAAU,CAAC,EAAI,CAAA,EAC5E,OAAOD,EAAE,SAAWC,EAAE,QAAUD,EAAE,KAAK,CAACE,EAAMC,IAAU,CAAC,OAAO,GAAGD,EAAMD,EAAEE,CAAK,CAAC,CAAC,CACpF,CCpGO,SAASC,EAAU,CACxB,MAAAC,CACF,EAEG,CACD,MAAMC,EAAcD,EAAQE,EAAoBF,CAAK,EAAI,OACnDG,EAAeH,GAAA,YAAAA,EAAO,MAAM,OAAO,KAEzC,OAAIG,EAEAC,EAAC,MAAA,CAAI,IAAKD,EAAc,IAAKH,EAAM,OAAO,KAAM,OAAQ,GAAI,MAAO,EAAA,CAAI,EAIvEC,IAAgB,QACXG,EAACC,EAAA,CAAK,KAAK,MAAM,KAAM,GAAI,EAG7BD,EAACC,EAAA,CAAK,KAAK,SAAS,KAAM,GAAI,CACvC","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{jsxs as N,jsx as l}from"react/jsx-runtime";import{I as C,F as A,aU as me,aV as xe,aW as fe,aX as pe,aY as ge,aZ as be,a_ as Ae,a$ as Ie,b0 as Me,b1 as Ee,b2 as Fe,b3 as ze,b4 as De,b5 as Oe,b6 as Re,a2 as ke,b7 as Y,b8 as P,b9 as Be,ba as Te,bb as Le,bc as Ve,bd as Ge,be as Pe,bf as He,bg as Ue,bh as We,i as je,bi as Je,bj as W,bk as Ye,bl as Ze,bm as Qe}from"./main.
|
|
1
|
+
import{jsxs as N,jsx as l}from"react/jsx-runtime";import{I as C,F as A,aU as me,aV as xe,aW as fe,aX as pe,aY as ge,aZ as be,a_ as Ae,a$ as Ie,b0 as Me,b1 as Ee,b2 as Fe,b3 as ze,b4 as De,b5 as Oe,b6 as Re,a2 as ke,b7 as Y,b8 as P,b9 as Be,ba as Te,bb as Le,bc as Ve,bd as Ge,be as Pe,bf as He,bg as Ue,bh as We,i as je,bi as Je,bj as W,bk as Ye,bl as Ze,bm as Qe}from"./main.Dt_K5cUp.js";import*as U from"react";import Ke,{useState as D,useEffect as Xe,useCallback as E,Fragment as qe,useRef as Z,useMemo as Q,useLayoutEffect as _e}from"react";import{flushSync as $e}from"react-dom";const et=()=>{const[i,s]=D({innerWidth:window.innerWidth,innerHeight:window.innerHeight});return Xe(()=>{const e=()=>{s({innerWidth:window.innerWidth,innerHeight:window.innerHeight})};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),i};function tt(i){const{breadcrumbs:s,createEnabled:e,onBreadcrumbSelected:n}=i,[t,o]=D(!1),r=i.createEnabled?i.onCreate:void 0;function a(){o(!0)}const d=E(c=>{var f;!e||!r||(r(c,(f=s.at(-1))==null?void 0:f.id),o(!1))},[s,e,r]),u=E(()=>{o(!1)},[]);return N("div",{className:"flex h-9 flex-row items-center gap-2 p-6 text-gray-500",children:[s.map(c=>N(qe,{children:[l(nt,{node:c,onClick:n}),l("span",{children:"/"})]},c.id)),e&&(t?l(X,{className:"text-gray-800",defaultValue:"New Folder",onCancel:u,onSubmit:d,placeholder:"New Folder"}):N("button",{type:"button",className:"ml-1 flex items-center justify-center gap-2 rounded-md bg-gray-50 px-2 py-1.5 transition-colors hover:bg-gray-200 hover:text-gray-800",onClick:a,children:[l(C,{name:"Plus",size:14}),"Add new"]}))]})}function nt(i){const{node:s,onClick:e}=i;return l("div",{className:"transition-colors last-of-type:text-gray-800 hover:text-gray-800",onClick:()=>e(s),role:"button",children:s.name})}function st({selectedNodePath:i,setSelectedNode:s}){const e=E(n=>{s(n)},[s]);return{breadcrumbs:i,onBreadcrumbSelected:e}}function K(i){const{node:s,onAddFile:e,onCopyNode:n,onMoveNode:t,trackNestedDrag:o=!1,acceptedFileExtensions:r}=i,[a,d]=D(!1),u=Z(0),c=E(m=>!r||r.length===0||m.types.includes(J)?!0:m.types.includes("Files")?Array.from(m.items).some(S=>{if(S.kind==="file"){if(S.type==="application/zip"||S.type==="application/x-zip-compressed")return r.includes(".zip");if(S.type===""||S.type==="application/octet-stream")return!0}return!1}):!1,[r]),f=E(m=>{m.preventDefault(),m.stopPropagation(),c(m.dataTransfer)?d(!0):m.dataTransfer.dropEffect="none"},[c]),g=E(m=>{m.preventDefault(),m.stopPropagation(),c(m.dataTransfer)&&(u.current+=1,d(!0))},[c]),h=E(m=>{m.preventDefault(),m.stopPropagation(),u.current=Math.max(0,u.current-1),u.current===0&&d(!1)},[]),p=E(()=>{d(!1)},[]),b=E(async m=>{m.preventDefault();const S=m.target.closest("[data-drop-zone]"),M=(s==null?void 0:s.id)||"root";if(((S==null?void 0:S.getAttribute("data-drop-zone"))||"root")!==M){d(!1);return}try{let y=ot(m.dataTransfer.items).filter(Boolean);if(r&&r.length>0&&(y=y.filter(R=>{if(!R)return!1;const V=R.name.toLowerCase();return r.some(x=>V.endsWith(x.toLowerCase()))})),y.length){for(const R of y)R&&await e(R,s);return}const k=m.getModifierState("Alt"),O=m.dataTransfer.getData(J),v=JSON.parse(O);k?await n(v,s):await t(v,s)}catch(y){console.error(y)}finally{o&&(u.current=0),d(!1)}},[e,n,t,parent,s==null?void 0:s.id,o]);return Q(()=>{const m={onDragOver:f,onDrop:b,"data-drop-zone":(s==null?void 0:s.id)||"root"};return o?(m.onDragEnter=g,m.onDragLeave=h):m.onDragLeave=p,{isDropTarget:a,dropProps:m}},[a,s==null?void 0:s.id,g,h,p,f,b,o])}function ot(i){return Array.from(i).map(e=>e.kind==="file"?e.getAsFile():null).filter(Boolean)}const it={SYNCING:"Syncing",SUCCESS:"Synced",CONFLICT:"Error",MISSING:"Circle",ERROR:"Error",INITIAL_SYNC:"Syncing"};function Se(i){const{syncStatus:s,className:e,overrideSyncIcons:n={},...t}=i,o={...it,...n};return{[ue]:l(C,{size:16,...t,className:A("text-blue-900",e),name:o[ue]}),[re]:l(C,{size:16,...t,className:A("text-blue-900",e),name:o[re]}),[le]:l(C,{size:16,...t,className:A("text-green-900",e),name:o[le]}),[ae]:l(C,{size:16,...t,className:A("text-orange-900",e),name:o[ae]}),[ce]:l(C,{size:16,...t,className:A("text-red-900",e),name:o[ce]}),[de]:l(C,{size:16,...t,className:A("text-red-900",e),name:o[de]})}[s]}function rt(i){const{fileNode:s,sharingType:e,className:n,customDocumentIconSrc:t,isAllowedToCreateDocuments:o,getSyncStatusSync:r,setSelectedNode:a,onRenameNode:d,onDuplicateNode:u,showDeleteNodeModal:c}=i,[f,g]=D(B),[h,p]=D(!1),{dragProps:b}=ve({node:s}),m=f===B,w=r(s.id,e),S={[be]:()=>u(s),[ge]:()=>g(ye),[pe]:()=>c(s)},M=Object.entries(me).map(([x,T])=>({...T,id:x})).filter(x=>xe.includes(x.id));function F(x){d(x,s),g(B)}function y(){g(B)}function k(x){const T=S[x];if(!T){console.error(`No handler found for dropdown menu item: ${x}`);return}T(),p(!1)}const O=xt(s.documentType,t),v=N("div",{className:"relative",children:[l("img",{alt:"file icon",className:"max-w-none",height:34,src:O,width:32}),m&&w&&l("div",{className:"absolute bottom-[-2px] right-0 size-3 rounded-full bg-white",children:l("div",{className:"absolute left-[-2px] top-[-2px]",children:l(Se,{overrideSyncIcons:{SUCCESS:"CheckCircleFill"},syncStatus:w})})})]}),R=A("group flex h-12 cursor-pointer select-none items-center rounded-lg bg-gray-200 px-2 text-gray-600 hover:text-gray-800",n),V=m?N("div",{className:"flex w-52 items-center justify-between",children:[N("div",{className:"mr-2 truncate group-hover:mr-0",children:[l("div",{className:"max-h-6 truncate text-sm font-medium group-hover:text-gray-800",children:s.name}),l("div",{className:"max-h-6 truncate text-xs font-medium text-gray-600 group-hover:text-gray-800",children:s.documentType})]}),o?l(fe,{items:M,onItemClick:k,onOpenChange:p,open:h,children:l("button",{className:A("hidden group-hover:block",h&&"block"),onClick:x=>{x.stopPropagation(),p(!0)},children:l(C,{className:"text-gray-600",name:"VerticalDots"})})}):null]}):l(X,{className:"ml-3 flex-1 font-medium",defaultValue:s.name,onCancel:y,onSubmit:F});return l("div",{className:"relative w-64",onClick:()=>a(s),children:l("div",{...b,className:R,children:N("div",{className:"flex items-center",children:[l("div",{className:"mr-1.5",children:v}),V]})})})}function lt(i){const{folderNode:s,sharingType:e,isAllowedToCreateDocuments:n,className:t,setSelectedNode:o,getSyncStatusSync:r,onRenameNode:a,onDuplicateNode:d,showDeleteNodeModal:u,onAddFile:c,onCopyNode:f,onMoveNode:g}=i,[h,p]=D(B),[b,m]=D(!1),{dragProps:w}=ve({node:s}),{isDropTarget:S,dropProps:M}=K({node:s,onAddFile:c,onCopyNode:f,onMoveNode:g}),F=h===B,y=r(s.id,e);function k(){p(B)}function O(z){a(z,s),p(B)}const v={[be]:()=>d(s),[ge]:()=>p(ye),[pe]:()=>u(s)},R=Object.entries(me).map(([z,H])=>({...H,id:z})).filter(z=>Ae.includes(z.id));function V(z){const H=v[z];if(!H){console.error(`No handler found for dropdown menu item: ${z}`);return}H(),m(!1)}const x=F||!n?l("div",{className:"ml-3 max-h-6 truncate font-medium text-gray-600 group-hover:text-gray-800",children:s.name}):l(X,{className:"ml-3 font-medium",defaultValue:s.name,onCancel:k,onSubmit:O}),T=A("group flex h-12 cursor-pointer select-none items-center rounded-lg bg-gray-200 px-2",t,S&&"bg-blue-100");return l("div",{className:"relative w-64",onClick:()=>o(s),children:N("div",{...w,...M,className:T,children:[N("div",{className:"flex items-center overflow-hidden",children:[l("div",{className:"p-1",children:N("div",{className:"relative",children:[l(C,{name:"FolderClose",size:24}),F&&y?l("div",{className:"absolute bottom-[-3px] right-[-2px] size-3 rounded-full bg-white",children:l("div",{className:"absolute left-[-2px] top-[-2px]",children:l(Se,{overrideSyncIcons:{SUCCESS:"CheckCircleFill"},syncStatus:y})})}):null]})}),x]}),F&&n?l(fe,{items:R,onItemClick:V,onOpenChange:m,open:b,children:l("button",{className:A("ml-auto hidden group-hover:block",b&&"block"),onClick:z=>{z.stopPropagation(),m(!0)},children:l(C,{className:"text-gray-600",name:"VerticalDots"})})}):null]})})}function X(i){const{onSubmit:s,onCancel:e,defaultValue:n,className:t,minLength:o=1,...r}=i,[a,d]=D(n??""),u=Z(null);Ie(u,c),Me("keyup",f=>{f.key==="Enter"&&c(),f.key==="Escape"&&e()}),_e(()=>{setTimeout(()=>{var f,g,h;(f=u.current)==null||f.focus(),(g=u.current)==null||g.select(),(h=u.current)==null||h.scroll({left:9999})},100)},[]);function c(){a.length>=o&&s(a)}return l("input",{...r,autoFocus:!0,className:A("bg-inherit text-inherit outline-none",t),minLength:o,onChange:f=>d(f.target.value),ref:u,required:!0,type:"text",value:a})}function L(i,s,e){let n=e.initialDeps??[],t;function o(){var r,a,d,u;let c;e.key&&((r=e.debug)!=null&&r.call(e))&&(c=Date.now());const f=i();if(!(f.length!==n.length||f.some((p,b)=>n[b]!==p)))return t;n=f;let h;if(e.key&&((a=e.debug)!=null&&a.call(e))&&(h=Date.now()),t=s(...f),e.key&&((d=e.debug)!=null&&d.call(e))){const p=Math.round((Date.now()-c)*100)/100,b=Math.round((Date.now()-h)*100)/100,m=b/16,w=(S,M)=>{for(S=String(S);S.length<M;)S=" "+S;return S};console.info(`%c⏱ ${w(b,5)} /${w(p,5)} ms`,`
|
|
2
2
|
font-size: .6rem;
|
|
3
3
|
font-weight: bold;
|
|
4
4
|
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(u=e==null?void 0:e.onChange)==null||u.call(e,t),t}return o.updateDeps=r=>{n=r},o}function _(i,s){if(i===void 0)throw new Error("Unexpected undefined");return i}const at=(i,s)=>Math.abs(i-s)<1.01,ct=(i,s,e)=>{let n;return function(...t){i.clearTimeout(n),n=i.setTimeout(()=>s.apply(this,t),e)}},$=i=>{const{offsetWidth:s,offsetHeight:e}=i;return{width:s,height:e}},dt=i=>i,ut=i=>{const s=Math.max(i.startIndex-i.overscan,0),e=Math.min(i.endIndex+i.overscan,i.count-1),n=[];for(let t=s;t<=e;t++)n.push(t);return n},ht=(i,s)=>{const e=i.scrollElement;if(!e)return;const n=i.targetWindow;if(!n)return;const t=r=>{const{width:a,height:d}=r;s({width:Math.round(a),height:Math.round(d)})};if(t($(e)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(r=>{const a=()=>{const d=r[0];if(d!=null&&d.borderBoxSize){const u=d.borderBoxSize[0];if(u){t({width:u.inlineSize,height:u.blockSize});return}}t($(e))};i.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return o.observe(e,{box:"border-box"}),()=>{o.unobserve(e)}},ee={passive:!0},te=typeof window>"u"?!0:"onscrollend"in window,mt=(i,s)=>{const e=i.scrollElement;if(!e)return;const n=i.targetWindow;if(!n)return;let t=0;const o=i.options.useScrollendEvent&&te?()=>{}:ct(n,()=>{s(t,!1)},i.options.isScrollingResetDelay),r=c=>()=>{const{horizontal:f,isRtl:g}=i.options;t=f?e.scrollLeft*(g&&-1||1):e.scrollTop,o(),s(t,c)},a=r(!0),d=r(!1);d(),e.addEventListener("scroll",a,ee);const u=i.options.useScrollendEvent&&te;return u&&e.addEventListener("scrollend",d,ee),()=>{e.removeEventListener("scroll",a),u&&e.removeEventListener("scrollend",d)}},ft=(i,s,e)=>{if(s!=null&&s.borderBoxSize){const n=s.borderBoxSize[0];if(n)return Math.round(n[e.options.horizontal?"inlineSize":"blockSize"])}return i[e.options.horizontal?"offsetWidth":"offsetHeight"]},pt=(i,{adjustments:s=0,behavior:e},n)=>{var t,o;const r=i+s;(o=(t=n.scrollElement)==null?void 0:t.scrollTo)==null||o.call(t,{[n.options.horizontal?"left":"top"]:r,behavior:e})};class gt{constructor(s){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const n=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(t=>{t.forEach(o=>{const r=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var t;(t=n())==null||t.disconnect(),e=null},observe:t=>{var o;return(o=n())==null?void 0:o.observe(t,{box:"border-box"})},unobserve:t=>{var o;return(o=n())==null?void 0:o.unobserve(t)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([n,t])=>{typeof t>"u"&&delete e[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:dt,rangeExtractor:ut,onChange:()=>{},measureElement:ft,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var n,t;(t=(n=this.options).onChange)==null||t.call(n,this,e)},this.maybeNotify=L(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(t=>{this.observer.observe(t)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,t=>{this.scrollRect=t,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(t,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<t?"forward":"backward":null,this.scrollOffset=t,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,n)=>{const t=new Map,o=new Map;for(let r=n-1;r>=0;r--){const a=e[r];if(t.has(a.lane))continue;const d=o.get(a.lane);if(d==null||a.end>d.end?o.set(a.lane,a):a.end<d.end&&t.set(a.lane,!0),t.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=L(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,n,t,o,r)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:n,scrollMargin:t,getItemKey:o,enabled:r}),{key:!1}),this.getMeasurements=L(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:n,scrollMargin:t,getItemKey:o,enabled:r},a)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const d=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,d);for(let c=d;c<e;c++){const f=o(c),g=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),h=g?g.end+this.options.gap:n+t,p=a.get(f),b=typeof p=="number"?p:this.options.estimateSize(c),m=h+b,w=g?g.lane:c%this.options.lanes;u[c]={index:c,start:h,size:b,end:m,key:f,lane:w}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=L(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,n,t,o)=>this.range=e.length>0&&n>0?bt({measurements:e,outerSize:n,scrollOffset:t,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=L(()=>{let e=null,n=null;const t=this.calculateRange();return t&&(e=t.startIndex,n=t.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,n]},(e,n,t,o,r)=>o===null||r===null?[]:e({startIndex:o,endIndex:r,overscan:n,count:t}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const n=this.options.indexAttribute,t=e.getAttribute(n);return t?parseInt(t,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(e,n)=>{const t=this.indexFromElement(e),o=this.measurementsCache[t];if(!o)return;const r=o.key,a=this.elementsCache.get(r);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(r,e)),e.isConnected&&this.resizeItem(t,this.options.measureElement(e,n,this))},this.resizeItem=(e,n)=>{const t=this.measurementsCache[e];if(!t)return;const o=this.itemSizeCache.get(t.key)??t.size,r=n-o;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,r,this):t.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(t.index),this.itemSizeCache=new Map(this.itemSizeCache.set(t.key,n)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((n,t)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=L(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,n)=>{const t=[];for(let o=0,r=e.length;o<r;o++){const a=e[o],d=n[a];t.push(d)}return t},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const n=this.getMeasurements();if(n.length!==0)return _(n[Ne(0,n.length-1,t=>_(n[t]).start,e)])},this.getOffsetForAlignment=(e,n,t=0)=>{const o=this.getSize(),r=this.getScrollOffset();n==="auto"&&(n=e>=r+o?"end":"start"),n==="center"?e+=(t-o)/2:n==="end"&&(e-=o);const a=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,n="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const t=this.measurementsCache[e];if(!t)return;const o=this.getSize(),r=this.getScrollOffset();if(n==="auto")if(t.end>=r+o-this.options.scrollPaddingEnd)n="end";else if(t.start<=r+this.options.scrollPaddingStart)n="start";else return[r,n];const a=n==="end"?t.end+this.options.scrollPaddingEnd:t.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,n,t.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:n="start",behavior:t}={})=>{t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,n),{adjustments:void 0,behavior:t})},this.scrollToIndex=(e,{align:n="auto",behavior:t}={})=>{t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1));let o=0;const r=10,a=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(e,u);if(!c){console.warn("Failed to get offset for index:",e);return}const[f,g]=c;this._scrollToOffset(f,{adjustments:void 0,behavior:t}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),p=this.getOffsetForIndex(e,g);if(!p){console.warn("Failed to get offset for index:",e);return}at(p[0],h)||d(g)})},d=u=>{this.targetWindow&&(o++,o<r?this.targetWindow.requestAnimationFrame(()=>a(u)):console.warn(`Failed to scroll to index ${e} after ${r} attempts.`))};a(n)},this.scrollBy=(e,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var e;const n=this.getMeasurements();let t;if(n.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=((e=n[n.length-1])==null?void 0:e.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=n.length-1;for(;r>=0&&o.some(a=>a===null);){const a=n[r];o[a.lane]===null&&(o[a.lane]=a.end),r--}t=Math.max(...o.filter(a=>a!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:n,behavior:t})=>{this.options.scrollToFn(e,{behavior:t,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(s)}}const Ne=(i,s,e,n)=>{for(;i<=s;){const t=(i+s)/2|0,o=e(t);if(o<n)i=t+1;else if(o>n)s=t-1;else return t}return i>0?i-1:0};function bt({measurements:i,outerSize:s,scrollOffset:e,lanes:n}){const t=i.length-1,o=d=>i[d].start;if(i.length<=n)return{startIndex:0,endIndex:t};let r=Ne(0,t,o,e),a=r;if(n===1)for(;a<t&&i[a].end<e+s;)a++;else if(n>1){const d=Array(n).fill(0);for(;a<t&&d.some(c=>c<e+s);){const c=i[a];d[c.lane]=c.end,a++}const u=Array(n).fill(e+s);for(;r>=0&&u.some(c=>c>=e);){const c=i[r];u[c.lane]=c.start,r--}r=Math.max(0,r-r%n),a=Math.min(t,a+(n-1-a%n))}return{startIndex:r,endIndex:a}}const ne=typeof document<"u"?U.useLayoutEffect:U.useEffect;function St(i){const s=U.useReducer(()=>({}),{})[1],e={...i,onChange:(t,o)=>{var r;o?$e(s):s(),(r=i.onChange)==null||r.call(i,t,o)}},[n]=U.useState(()=>new gt(e));return n.setOptions(e),ne(()=>n._didMount(),[]),ne(()=>n._willUpdate()),n}function se(i){return St({observeElementRect:ht,observeElementOffset:mt,scrollToFn:pt,...i})}const oe=i=>{const{item:s,...e}=i;return N("div",{...Ee(e,"flex h-full flex-row items-center justify-between gap-x-4 px-2"),children:[s.icon,l("div",{className:"text-sm font-semibold text-slate-200",children:s.label})]})},Nt=i=>{const{value:s,onChange:e,placeholder:n,filterLabel:t,filterItems:o,selectedFilter:r,onFilterSelect:a=()=>{},className:d}=i,u=Q(()=>(o==null?void 0:o.map(h=>({id:h.id,content:l(oe,{item:h})})))??[],[o]),c=o==null?void 0:o.find(h=>h.id===r),f=c?l(oe,{className:"gap-x-1",item:c}):t&&l("div",{className:"mr-2 text-sm font-semibold text-slate-200",children:t});function g(h){e==null||e(h.target.value)}return N("div",{className:Fe("flex items-center",d),children:[l(C,{className:"mr-3",name:"Search"}),l("input",{className:A("flex h-[52px] min-w-0 flex-1 items-center rounded-xl border border-gray-200 bg-gray-50 px-4 text-sm text-slate-200 outline-none"),onChange:g,placeholder:n,value:s}),N(ze,{children:[N(De,{className:"ml-3 flex h-full flex-row items-center outline-none",children:[f," ",l(C,{name:"ChevronDown"})]}),l(Oe,{className:"rounded-xl border border-gray-100 bg-gray-50 p-2",children:u.map(h=>l(Re,{className:"h-10 cursor-pointer overflow-hidden rounded-lg hover:bg-gray-100",id:h.id,onSelect:()=>a(h.id),children:h.content},h.id))})]})]})},we="powerhouse/budget-statement",q="powerhouse/default",Ce="makerdao/rwa-portfolio",wt=[we,q,Ce],Ct="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAAB4CAYAAAAXIRdAAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAzWSURBVHgB7V1dbBXHFZ5d/wI1WMhuVBUJq1GlAg9QlZSngNU2D9BIreoYGikKUdVKjaoSklSRWol4TdWmUgs0SFVTVaqUELUKhDTlIUFqiDA8lKQ8QCvMS5PaVRAN14kMjrGN7TuZb5izPne89/r+7HrXvvNJ17s7O3v3er89Z845M3PGE+XDw58j372+Pi8bv+3n5WZV0i2l1y6EbBfLFNKT/U8fvycQGYFXznkppTi8O7fXF95eKWS3qDN4irQnM0LaPMIUOWGZ53ni0O7r3Z5o+JOQokvUMYyk9dOhSAkFhHGyfvXg/9pbVq7oU7tP8DotqzzRsb5R3Lu1Sazb2CTaOnxdtpxw9OGPI8st0nSRWGT4dgGk6je7P+xSZL0tGFkgZVvPCvHY8+2i50Cb2LKzVRHXsOzIKgVPen1HdufwEosgCPCPL/o/79n7v+79f1eD57/NVeCWnS2KrJV1Q04xCSOol7p//ysd/Xi5LSQucY1Qg3Tj57453G6Ttf3RlVqaHOagnlnf4T03sNtvnfJgoKnnmRhxPn9LdJvFyHrgh6scWUUA9Xho94d988rN8+T2QJwI27BDvTf2CtZmQbI27GgRDsURRRokTGjeIGzxkxYSpl6M8MYbtrc4ySoTNmlcwrAfN2masMMPXX+MVOHqTl9se2iFcCgfUZJG7VjcpN2VMK9xHxVAukCaQ2WwSANZBQEIEZML4MOMV9+/hQpcu1U9GGnaWjS+mt6atq32exzak9vv5eURHHxha7N48OnPiHrHQn7YQkBEZGzj7w8qokKWjLkvajX7fV+KHXSwbmOjcKgdkLS2wcefLSgzxkiEs10RfMn8rk4VanKIB8VMfjL7qzVElEjJLjpAUNdBiDZldI3l8qJWmNijuL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+VKQtKGSz8Mi3POGmjzUc22v39B0gEubw8KACrwjJ75/0fvJWSojJ5nUIUkVyCLyqP0i2O2YNuvZtE0yK8MLuru7vbNnz8rDe64/KvL+E9wgcYjEgPSmX7og97/ICYLmUs8yH6H+eAwxckIfJ01LGF1EWxJP3ATeOPZxc5C3654/rm/Ir/qWumyH8rvXe8Jbr5radlGHUP/7qFKmN1XTMaC6qS7fnh7/2wHVnNBLbkcxAHssPUlXqTlhAJH4Kc1sL4jISlnaAAAAAElFTkSuQmCC",yt=""+new URL("rwa-report-Bb0W5-ac.png",import.meta.url).href,vt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAAB4CAYAAAAXIRdAAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAzzSURBVHgB7V1dbFxHFT5zdwNt+lCTJq1EItkPBKmJlCK1JW+JBTzQgkTAtUPlKAGUhzit0ki88JL4biseeCEiLQG1AqlpEaqdP/riIBFk961VHwhVUkErYUsND7FjuT9J1Nq+0zmzc8Znx/fau/buvbP2fNJm7996N/e758w538ycEVA/BP4jj/+0Ez6X+yBKHgEputWRDnW4A9YsREWcGYrBE4h6zkspAZ7pO6T2DoGEblhviBRpL/lB2iLCFDn2mBACZo/2dZcB/qzOdME6RqIsrXRmqGJ2JRSEGsI4WR8f/WHH/WLjoNp8ruYT994HcmsnyF2PAXxjB8gHNutjawmlY09nnNHuscIO5E7cIsLQqu4e7u2656twQf2cb9mTSFT39yHpfmLNEeQimzAg91iJ41ioFxKWK2nC3ZbP9nZBIv7JXaBUJCVP9Kx5oghLEoZQpMGLb1Tw4XbQcvLKZFWImYEfdCwi6ycHq1YVsIBEDsIz+3Gr4pwRGKCp+9ky4iL+lFTbLEZW/5FAVibk4PzRvkH3KN1PHg80E5H9+qO9h4AFGNqydu+FgGxEKaTpFEjzhsbWfNKihU1hv1ju3hMsq064pHELw+1mk6YJmxt46mfWFW7aogKMpyCgfiBp0rE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fy43fOfk3U2WLHbvbRcLvvOyRbEzggoZjMxJzSay/MrXZrvuL3/lH+qZ6LJPx6bNMP/4HpDf3qO3XUvj+2mzL1zwa9Kud4/Rfj3XNoqVft61KAzYSsqqorcug2CaoRRw9ZPZ2Z6Oly+N436WZfE/7X4X8aPJouQND05OTgr8wzfE7GPob+kDQumM5b9fgA0vHIfyn04BqIZUfnBNP01kefRy99Ne/Jq067P+Zj3XNvpa6ef1//2j/+l7UX7p1/relNQ94mThPfw/zH13n8q5XAKo1B6V3zPHUx8Ksja8KOKyCM+80U1+caTn0IaodIJbW0BdGL89Lw//fFqM0gFKkskdklUhWUQetV8Etx3TYT0fyGjM036gu7tbjI6OyrmB/QejKHmOByQBi4Gq0ZwQZ/tvylc5Qei51L1MUtwf1xBTJ/Rx0rSF0YfoncwTvwSzcdzGL0fyLn3zoc77RPIjEcHeKIJORWCnOt0B6xMz6uZ8rNzemJwXV6fl7N8eUs0JPeSuioFwx9KTdS01JwxBJH4JoOdEKaNKcdAAAAAASUVORK5CYII=",ie={[we]:Ct,[q]:vt,[Ce]:yt},ye="WRITE",B="READ",J="UI_NODE",re="SYNCING",le="SUCCESS",ae="CONFLICT",ce="MISSING",de="ERROR",ue="INITIAL_SYNC";function ve(i){const{node:s}=i,[e,n]=D(!1),t=E(r=>{r.dataTransfer.setData(J,JSON.stringify(s))},[s]),o=E(()=>{n(!1)},[]);return Q(()=>({isDragging:e,dragProps:{draggable:!0,onDragStart:t,onDragEnd:o}}),[e,o,t])}function xt(i,s){return s||(wt.includes(i)?ie[i]:ie[q])}function At(i){return"documentModelState"in i?i.documentModelState:i.documentModel}const It=({documentModels:i,createDocument:s})=>N("div",{className:"px-6",children:[l("h3",{className:"mb-3 mt-4 text-xl font-bold text-gray-600",children:"New document"}),l("div",{className:"flex w-full flex-wrap gap-4",children:i==null?void 0:i.map(e=>{const n=At(e);return l(ke,{color:"light",title:n.name,"aria-description":n.description,onClick:()=>s(e),children:l("span",{className:"text-sm",children:n.name})},n.id)})})]}),G=8,j=256,he=48,Mt=420;function Et(i){const s=Z(null),{t:e}=Y(),n=et(),{fileNodes:t}=i,o=n.innerWidth-Mt,r=Math.floor(o/(j+G))||1,a=Math.ceil(t.length/r),d=se({count:a,getScrollElement:()=>s.current,estimateSize:h=>h>0?he+G:he,overscan:5}),u=se({horizontal:!0,count:r,getScrollElement:()=>s.current,estimateSize:h=>h>0?j+G:j,overscan:5}),c=(h,p)=>h*r+p,f=(h,p)=>{const b=c(h,p);return t[b]||null};if(t.length===0)return l("div",{className:"mb-8 text-sm text-gray-400",children:e("folderView.sections.documents.empty",{defaultValue:"No documents or files 📄"})});const g=(h,p)=>{const b=f(h,p);return b?l("div",{style:{marginLeft:p===0?0:G},children:l(rt,{fileNode:b,...i},b.id)}):null};return l("div",{ref:s,style:{height:"400px",width:"100%",overflow:"auto"},children:l("div",{style:{height:`${d.getTotalSize()}px`,width:`${u.getTotalSize()}px`,position:"relative"},children:d.getVirtualItems().map(h=>l(Ke.Fragment,{children:u.getVirtualItems().map(p=>l("div",{style:{position:"absolute",top:0,left:0,marginTop:h.index===0?0:G,width:`${p.size}px`,height:`${h.size}px`,transform:`translateX(${p.start}px) translateY(${h.start}px)`},children:g(h.index,p.index)},p.key))},h.key))})})}function I({children:i,className:s,...e}){return l(I.Container,{className:s,...e,children:i})}I.Container=function({children:s,className:e,containerProps:n,...t}){return l("div",{className:P("flex grow flex-col overflow-auto rounded-2xl bg-gray-50 p-2",e),...n,...t,children:s})};I.Header=function({children:s,className:e,containerProps:n,...t}){return l("div",{className:P("flex-0",e),...n,...t,children:s})};I.Content=function({children:s,className:e,containerProps:n,...t}){return l("div",{className:P("mb-5 flex-1 px-4",e),...n,...t,children:s})};I.ContentSection=function({title:s,children:e,className:n,containerProps:t,...o}){return N("div",{className:P(n),...t,...o,children:[s&&l("div",{className:"mb-4 text-base font-semibold text-gray-600",children:s}),l("div",{className:"flex flex-wrap gap-2",children:e})]})};I.Footer=function({children:s,className:e,containerProps:n,...t}){return l("div",{className:P("flex-0",e),...n,...t,children:s})};function Ft(i){const{node:s,isAllowedToCreateDocuments:e,className:n,containerProps:t,sharingType:o,getSyncStatusSync:r,setSelectedNode:a,onAddFile:d,onCopyNode:u,onMoveNode:c,onRenameNode:f,onDuplicateNode:g,onAddFolder:h,onAddAndSelectNewFolder:p,showDeleteNodeModal:b}=i,{t:m}=Y(),w=Be(s==null?void 0:s.id),S=Te(s==null?void 0:s.id),{isDropTarget:M,dropProps:F}=K({node:s,onAddFile:d,onCopyNode:u,onMoveNode:c});return N("div",{className:A("rounded-md border-2 border-transparent p-2",M&&"border-dashed border-blue-100",n),...t,...F,children:[l(I.ContentSection,{title:m("folderView.sections.folders.title",{defaultValue:"Folders"}),className:"mb-4",children:w.length>0?w.map(y=>l(lt,{folderNode:y,isAllowedToCreateDocuments:e,sharingType:o,getSyncStatusSync:r,setSelectedNode:a,onAddFile:d,onCopyNode:u,onMoveNode:c,onRenameNode:f,onDuplicateNode:g,onAddFolder:h,onAddAndSelectNewFolder:p,showDeleteNodeModal:b},y.id)):l("div",{className:"mb-8 text-sm text-gray-400",children:m("folderView.sections.folders.empty",{defaultValue:"No documents or files 📄"})})}),l(I.ContentSection,{title:m("folderView.sections.documents.title",{defaultValue:"Documents and files"}),children:l("div",{className:A("w-full",S.length>0?"min-h-[400px]":"min-h-14"),children:l(Et,{fileNodes:S,isAllowedToCreateDocuments:e,sharingType:o,getSyncStatusSync:r,setSelectedNode:a,showDeleteNodeModal:b,onAddFile:d,onCopyNode:u,onMoveNode:c,onRenameNode:f,onDuplicateNode:g,onAddFolder:h,onAddAndSelectNewFolder:p})})})]})}const zt=[{id:"project",label:".project",icon:l(C,{name:"Project",color:"#FF6A55",size:16})},{id:"budget",label:".budget",icon:l(C,{name:"BarChart",color:"#8E55EA",size:16})},{id:"profile",label:".profile",icon:l(C,{name:"Person",color:"#3E90F0",size:16})},{id:"legal",label:".legal",icon:l(C,{name:"Briefcase",color:"#4BAB71",size:16})},{id:"atlas",label:".Atlas",icon:l(C,{name:"Globe",color:"#FF8A00",size:16})}],Dt=()=>{const{t:i}=Y(),[s,e]=D("");return l(Nt,{className:"max-w-searchbar-width m-4 shrink-0 bg-gray-100",placeholder:i("searchbar.placeholder"),filterLabel:i("searchbar.filterLabel"),filterItems:zt,value:s,onChange:e})};function Ot(i){const{className:s,children:e}=i,[n]=Le(),{onRenameNode:t,onDuplicateNode:o,onAddFolder:r,onAddFile:a,onCopyNode:d,onMoveNode:u}=Ve(),c=Ge(),f=Ze(n),g=Pe(),h=He(),{isAllowedToCreateDocuments:p}=Ue(),b=We(),m=v=>{Qe(v.documentModel.id)},{isDropTarget:w,dropProps:S}=K({node:f,onAddFile:a,onCopyNode:d,onMoveNode:u}),{breadcrumbs:M,onBreadcrumbSelected:F}=st({selectedNodePath:h,setSelectedNode:W}),y=je(n);async function k(v){await r(v,c),W(c)}const O=!!e;return N(I,{className:s,children:[!O&&N(I.Header,{children:[l(tt,{breadcrumbs:M,createEnabled:p,onCreate:k,onBreadcrumbSelected:F}),b&&l(Dt,{})]}),O?e:l(I.Content,{...S,className:w?"rounded-xl bg-blue-100":"",children:l(Ft,{node:c??f,sharingType:y,getSyncStatusSync:Ye,setSelectedNode:W,onRenameNode:t,onDuplicateNode:o,onAddFolder:r,onAddFile:a,onCopyNode:d,onMoveNode:u,onAddAndSelectNewFolder:k,showDeleteNodeModal:v=>Je(v.id),isAllowedToCreateDocuments:p})}),!O&&l(I.Footer,{children:p&&l(It,{documentModels:g==null?void 0:g.filter(v=>v.documentModel.id!=="powerhouse/document-drive"),createDocument:m})})]})}const Rt={Component:Ot,documentTypes:["powerhouse/document-drive"],config:{id:"GenericDriveExplorer",name:"Drive Explorer App",disableExternalControls:!0,documentToolbarEnabled:!0,showSwitchboardLink:!0}},Vt=Object.freeze(Object.defineProperty({__proto__:null,GenericDriveExplorer:Rt},Symbol.toStringTag,{value:"Module"}));export{Rt as G,Vt as i,se as u};
|
|
5
|
-
//# sourceMappingURL=index.
|
|
5
|
+
//# sourceMappingURL=index.BRe5BZpi.js.map
|