@powerhousedao/powerhouse-vetra-packages 6.2.3-dev.2 → 6.2.3-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/browser/{connect-BqgnsniX.js → connect-BtHSAuSc.js} +10 -4
  2. package/dist/browser/{connect-BqgnsniX.js.map → connect-BtHSAuSc.js.map} +1 -1
  3. package/dist/browser/{dist-C-xkNfyD.js → dist-D69hfRZN.js} +8 -8
  4. package/dist/browser/dist-D69hfRZN.js.map +1 -0
  5. package/dist/browser/{document-drive-ZQzPQfEL.js → document-drive-BEXJ-rHp.js} +61 -21
  6. package/dist/browser/{document-drive-ZQzPQfEL.js.map → document-drive-BEXJ-rHp.js.map} +1 -1
  7. package/dist/browser/document-models/index.js +1 -1
  8. package/dist/browser/{editor-DZP1WlYy.js → editor-Cbl_EDjI.js} +5 -5
  9. package/dist/browser/{editor-DZP1WlYy.js.map → editor-Cbl_EDjI.js.map} +1 -1
  10. package/dist/browser/{editor-BNgF9-uX.js → editor-mNThkZOv.js} +6 -6
  11. package/dist/browser/{editor-BNgF9-uX.js.map → editor-mNThkZOv.js.map} +1 -1
  12. package/dist/browser/editors/document-model-editor/module.js +1 -1
  13. package/dist/browser/editors/generic-drive-explorer/index.js +4 -4
  14. package/dist/browser/editors/generic-drive-explorer/module.js +1 -1
  15. package/dist/browser/{folder-view-tx0A96ZI.js → folder-view-D8AkN1Oj.js} +3 -3
  16. package/dist/browser/{folder-view-tx0A96ZI.js.map → folder-view-D8AkN1Oj.js.map} +1 -1
  17. package/dist/browser/{graphql-editor-Cbkb5KRZ.js → graphql-editor-BcL3-Zha.js} +3 -3
  18. package/dist/browser/{graphql-editor-Cbkb5KRZ.js.map → graphql-editor-BcL3-Zha.js.map} +1 -1
  19. package/dist/browser/index.js +1 -1
  20. package/dist/browser/{json-editor-CN6kPtl1.js → json-editor-DHXQRIN5.js} +3 -3
  21. package/dist/browser/{json-editor-CN6kPtl1.js.map → json-editor-DHXQRIN5.js.map} +1 -1
  22. package/dist/browser/lib-ewnRj2dJ.js.map +1 -1
  23. package/dist/browser/{state-schemas-CKh98ehP.js → state-schemas-C4F8lReN.js} +3 -3
  24. package/dist/browser/{state-schemas-CKh98ehP.js.map → state-schemas-C4F8lReN.js.map} +1 -1
  25. package/dist/node/{connect-CeLh6yfj.mjs → connect-B6IQsY6u.mjs} +10 -4
  26. package/dist/node/{connect-CeLh6yfj.mjs.map → connect-B6IQsY6u.mjs.map} +1 -1
  27. package/dist/node/{dist-CUFTZwfc.mjs → dist-hd-KLWy7.mjs} +8 -8
  28. package/dist/node/dist-hd-KLWy7.mjs.map +1 -0
  29. package/dist/node/{document-drive-D1NMjQQc.mjs → document-drive-CkV9NvD7.mjs} +61 -21
  30. package/dist/node/{document-drive-D1NMjQQc.mjs.map → document-drive-CkV9NvD7.mjs.map} +1 -1
  31. package/dist/node/document-models/index.mjs +1 -1
  32. package/dist/node/{editor-CXQOsbup.mjs → editor-C93fdI28.mjs} +6 -6
  33. package/dist/node/{editor-CXQOsbup.mjs.map → editor-C93fdI28.mjs.map} +1 -1
  34. package/dist/node/{editor-Dg2OZEJu.mjs → editor-DG1q4Y55.mjs} +5 -5
  35. package/dist/node/{editor-Dg2OZEJu.mjs.map → editor-DG1q4Y55.mjs.map} +1 -1
  36. package/dist/node/editors/document-model-editor/module.mjs +1 -1
  37. package/dist/node/editors/generic-drive-explorer/index.mjs +4 -4
  38. package/dist/node/editors/generic-drive-explorer/module.mjs +1 -1
  39. package/dist/node/{folder-view-DZ0o2-Ef.mjs → folder-view-BGabHV7H.mjs} +3 -3
  40. package/dist/node/{folder-view-DZ0o2-Ef.mjs.map → folder-view-BGabHV7H.mjs.map} +1 -1
  41. package/dist/node/{graphql-editor-DNxebuTn.mjs → graphql-editor-B-XIb6az.mjs} +3 -3
  42. package/dist/node/{graphql-editor-DNxebuTn.mjs.map → graphql-editor-B-XIb6az.mjs.map} +1 -1
  43. package/dist/node/index.mjs +1 -1
  44. package/dist/node/{json-editor-BpnEn9AS.mjs → json-editor-DB0vi6tV.mjs} +3 -3
  45. package/dist/node/{json-editor-BpnEn9AS.mjs.map → json-editor-DB0vi6tV.mjs.map} +1 -1
  46. package/dist/node/main-B1tRsYOp.mjs.map +1 -1
  47. package/dist/node/{state-schemas-CuSHxrn6.mjs → state-schemas-BGsgtEG1.mjs} +3 -3
  48. package/dist/node/{state-schemas-CuSHxrn6.mjs.map → state-schemas-BGsgtEG1.mjs.map} +1 -1
  49. package/package.json +7 -7
  50. package/dist/browser/dist-C-xkNfyD.js.map +0 -1
  51. package/dist/node/dist-CUFTZwfc.mjs.map +0 -1
@@ -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-BNgF9-uX.js"))
9
+ Component: lazy(() => import("../../editor-mNThkZOv.js"))
10
10
  };
11
11
  //#endregion
12
12
  export { DocumentModelEditor };
@@ -1,9 +1,9 @@
1
1
  import { D as __commonJSMin, k as __require } from "../../dist-B4FWbuEM.js";
2
- import "../../document-drive-ZQzPQfEL.js";
2
+ import "../../document-drive-BEXJ-rHp.js";
3
3
  import { GenericDriveExplorer } from "./module.js";
4
- import { S as Icon, n as ConnectSearchBar } from "../../connect-BqgnsniX.js";
5
- import "../../dist-C-xkNfyD.js";
6
- import { i as CreateDocument, n as DriveLayout, r as FileContentView, t as FolderView } from "../../folder-view-tx0A96ZI.js";
4
+ import { S as Icon, n as ConnectSearchBar } from "../../connect-BtHSAuSc.js";
5
+ import "../../dist-D69hfRZN.js";
6
+ import { i as CreateDocument, n as DriveLayout, r as FileContentView, t as FolderView } from "../../folder-view-D8AkN1Oj.js";
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
@@ -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-DZP1WlYy.js")),
4
+ Component: lazy(() => import("../../editor-Cbl_EDjI.js")),
5
5
  config: {
6
6
  id: "GenericDriveExplorer",
7
7
  name: "Drive Explorer App"
@@ -1,6 +1,6 @@
1
- import { S as Icon, i as CreateDocumentWithTypeModal, l as useVirtualizer, o as FileItem, s as FolderItem, v as PowerhouseButton, y as useWindowSize } from "./connect-BqgnsniX.js";
1
+ import { S as Icon, i as CreateDocumentWithTypeModal, l as useVirtualizer, o as FileItem, s as FolderItem, v as PowerhouseButton, y as useWindowSize } from "./connect-BtHSAuSc.js";
2
2
  import { w as twMerge } from "./dist-BAJ5nRDl.js";
3
- import { B as setSelectedNode, C as addDocument, H as useSelectedDriveSafe, L as isFileNodeKind, M as useStudioMode, O as useDisabledEditors, R as isFolderNodeKind, b as useUserPermissions, h as useSelectedFolder, m as useParentFolderForSelectedNode, n as preloadEditorModule, p as useNodesInSelectedDriveOrFolder, r as useAllowedDocumentModelModules, s as useEditorModules } from "./dist-C-xkNfyD.js";
3
+ import { B as setSelectedNode, C as addDocument, H as useSelectedDriveSafe, L as isFileNodeKind, M as useStudioMode, O as useDisabledEditors, R as isFolderNodeKind, b as useUserPermissions, h as useSelectedFolder, m as useParentFolderForSelectedNode, n as preloadEditorModule, p as useNodesInSelectedDriveOrFolder, r as useAllowedDocumentModelModules, s as useEditorModules } from "./dist-D69hfRZN.js";
4
4
  import React, { useRef, useState } from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region editors/generic-drive-explorer/utils/select-creatable-modules.ts
@@ -229,4 +229,4 @@ function FolderView(props) {
229
229
  //#endregion
230
230
  export { CreateDocument as i, DriveLayout as n, FileContentView as r, FolderView as t };
231
231
 
232
- //# sourceMappingURL=folder-view-tx0A96ZI.js.map
232
+ //# sourceMappingURL=folder-view-D8AkN1Oj.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"folder-view-tx0A96ZI.js","names":[],"sources":["../../editors/generic-drive-explorer/utils/select-creatable-modules.ts","../../editors/generic-drive-explorer/components/create-document.tsx","../../editors/generic-drive-explorer/components/file-content-view.tsx","../../editors/generic-drive-explorer/components/layout.tsx","../../editors/generic-drive-explorer/components/folder-view.tsx"],"sourcesContent":["import type { DocumentModelModule } from \"@powerhousedao/shared/document-model\";\n\n/**\n * The modules a user may pick from when creating a new document. Outside\n * studio mode only the latest version of each document type is offered: new\n * documents should never start on an outdated schema. Builders testing\n * migrations run in studio mode and still get every version.\n */\nexport function selectCreatableModules(\n modules: readonly DocumentModelModule[],\n studioMode: boolean,\n): DocumentModelModule[] {\n if (studioMode) return [...modules];\n const latestByType = new Map<string, DocumentModelModule>();\n for (const module of modules) {\n const id = module.documentModel.global.id;\n const current = latestByType.get(id);\n if (!current || (module.version ?? 1) > (current.version ?? 1)) {\n latestByType.set(id, module);\n }\n }\n return [...latestByType.values()];\n}\n","import { Icon, PowerhouseButton } from \"@powerhousedao/design-system\";\nimport type { DocumentTypeOption } from \"@powerhousedao/design-system/connect\";\nimport { CreateDocumentWithTypeModal } from \"@powerhousedao/design-system/connect\";\nimport {\n addDocument,\n preloadEditorModule,\n setSelectedNode,\n useAllowedDocumentModelModules,\n useDisabledEditors,\n useEditorModules,\n useParentFolderForSelectedNode,\n useSelectedDriveSafe,\n useSelectedFolder,\n useStudioMode,\n useUserPermissions,\n} from \"@powerhousedao/reactor-browser\";\nimport type { DocumentModelModule } from \"@powerhousedao/shared/document-model\";\nimport { useState } from \"react\";\nimport { selectCreatableModules } from \"../utils/select-creatable-modules.js\";\n\nfunction toDocumentTypeOption(\n doc: DocumentModelModule,\n studioMode: boolean,\n): DocumentTypeOption {\n const spec = doc.documentModel.global;\n return {\n documentType: spec.id,\n name: spec.name,\n // Outside studio mode only the latest version is offered, so the version\n // suffix is dropped from the label and creation resolves latest-wins.\n version: studioMode ? doc.version : undefined,\n description: spec.description,\n };\n}\n\nexport function CreateDocument() {\n const [showModal, setShowModal] = useState(false);\n const { isAllowedToCreateDocuments } = useUserPermissions();\n // Respect Connect config: allowedDocumentTypes (allowlist) via the hook,\n // disabledEditors (denylist) subtracted below.\n const allowedDocumentModelModules = useAllowedDocumentModelModules();\n const editorModules = useEditorModules();\n const disabledEditors = useDisabledEditors() ?? [];\n const [selectedDrive] = useSelectedDriveSafe();\n const selectedFolder = useSelectedFolder();\n const parentFolder = useParentFolderForSelectedNode();\n // Drive containers are never documents-in-a-drive; hide them structurally so\n // this shared editor can't fail open when disabledEditors is unset.\n const DRIVE_CONTAINER_TYPES = [\n \"powerhouse/document-drive\",\n \"powerhouse/reactor-drive\",\n ];\n const studioMode = useStudioMode() ?? false;\n const visibleDocumentModelModules = selectCreatableModules(\n allowedDocumentModelModules ?? [],\n studioMode,\n ).filter((module) => {\n const id = module.documentModel.global.id;\n return !DRIVE_CONTAINER_TYPES.includes(id) && !disabledEditors.includes(id);\n });\n const preloadEditorsForType = (documentType: string) =>\n editorModules\n ?.filter((editorModule) =>\n editorModule.documentTypes.includes(documentType),\n )\n .forEach((editorModule) => {\n void preloadEditorModule(editorModule);\n });\n const handleCreate = async ({\n name,\n documentType,\n version,\n }: {\n name: string;\n documentType: string;\n version?: number;\n }) => {\n setShowModal(false);\n if (!selectedDrive) return;\n try {\n const node = await addDocument(\n selectedDrive.header.id,\n name,\n documentType,\n selectedFolder?.id ?? parentFolder?.id,\n undefined,\n undefined,\n undefined,\n version,\n );\n setSelectedNode(node);\n } catch (error) {\n console.error(\"Failed to create document:\", error);\n }\n };\n if (!isAllowedToCreateDocuments) return null;\n if (!visibleDocumentModelModules.length) return null;\n // Rendered in the \"Documents and files\" heading row (see folder-view.tsx),\n // so the button is compact and brings no layout wrapper of its own.\n return (\n <>\n <PowerhouseButton\n className=\"py-2\"\n color=\"blue\"\n icon={<Icon name=\"Plus\" size={14} />}\n onClick={() => setShowModal(true)}\n size=\"small\"\n >\n Create New Document\n </PowerhouseButton>\n <CreateDocumentWithTypeModal\n documentTypes={visibleDocumentModelModules.map((module) =>\n toDocumentTypeOption(module, studioMode),\n )}\n onCreate={(input) => void handleCreate(input)}\n onOpenChange={setShowModal}\n onTypeSelected={preloadEditorsForType}\n open={showModal}\n />\n </>\n );\n}\n","import { useWindowSize } from \"@powerhousedao/design-system\";\nimport { FileItem } from \"@powerhousedao/design-system/connect\";\nimport {\n isFileNodeKind,\n useNodesInSelectedDriveOrFolder,\n} from \"@powerhousedao/reactor-browser\";\nimport { useVirtualizer } from \"@tanstack/react-virtual\";\nimport type { FileNode } from \"@powerhousedao/shared/document-drive\";\nimport React, { useRef } from \"react\";\n\nconst GAP = 8;\nconst ITEM_WIDTH = 256;\nconst ITEM_HEIGHT = 48;\n\nconst USED_SPACE = 420;\n\nexport function FileContentView() {\n const parentRef = useRef(null);\n const windowSize = useWindowSize();\n const availableWidth = windowSize.innerWidth - USED_SPACE;\n const nodes = useNodesInSelectedDriveOrFolder();\n const fileNodes = nodes.filter((n) => isFileNodeKind(n));\n const columnCount = Math.floor(availableWidth / (ITEM_WIDTH + GAP)) || 1;\n const rowCount = Math.ceil(fileNodes.length / columnCount);\n\n const rowVirtualizer = useVirtualizer({\n count: rowCount,\n getScrollElement: () => parentRef.current,\n estimateSize: (index) => {\n if (index > 0) {\n return ITEM_HEIGHT + GAP;\n }\n return ITEM_HEIGHT;\n },\n overscan: 5,\n });\n\n const columnVirtualizer = useVirtualizer({\n horizontal: true,\n count: columnCount,\n getScrollElement: () => parentRef.current,\n estimateSize: (index) => {\n if (index > 0) {\n return ITEM_WIDTH + GAP;\n }\n return ITEM_WIDTH;\n },\n overscan: 5,\n });\n\n const getItemIndex = (rowIndex: number, columnIndex: number) =>\n rowIndex * columnCount + columnIndex;\n\n const getItem = (rowIndex: number, columnIndex: number): FileNode | null => {\n const index = getItemIndex(rowIndex, columnIndex);\n return fileNodes[index] || null;\n };\n\n if (fileNodes.length === 0) {\n return (\n <div className=\"mb-8 text-sm text-muted-foreground\">\n No documents or files 📄\n </div>\n );\n }\n\n const renderItem = (rowIndex: number, columnIndex: number) => {\n const fileNode = getItem(rowIndex, columnIndex);\n\n if (!fileNode) {\n return null;\n }\n\n return (\n <div\n style={{\n marginLeft: columnIndex === 0 ? 0 : GAP,\n }}\n >\n <FileItem key={fileNode.id} fileNode={fileNode} />\n </div>\n );\n };\n\n return (\n <div\n ref={parentRef}\n style={{\n width: `100%`,\n overflow: \"auto\",\n }}\n >\n <div\n style={{\n height: `${rowVirtualizer.getTotalSize()}px`,\n width: `${columnVirtualizer.getTotalSize()}px`,\n position: \"relative\",\n }}\n >\n {rowVirtualizer.getVirtualItems().map((virtualRow) => (\n <React.Fragment key={virtualRow.key}>\n {columnVirtualizer.getVirtualItems().map((virtualColumn) => (\n <div\n key={virtualColumn.key}\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n marginTop: virtualRow.index === 0 ? 0 : GAP,\n width: `${virtualColumn.size}px`,\n height: `${ITEM_HEIGHT}px`,\n overflow: \"hidden\",\n transform: `translateX(${virtualColumn.start}px) translateY(${virtualRow.start}px)`,\n }}\n >\n {renderItem(virtualRow.index, virtualColumn.index)}\n </div>\n ))}\n </React.Fragment>\n ))}\n </div>\n </div>\n );\n}\n","import { twMerge } from \"tailwind-merge\";\nimport type { BaseProps } from \"../utils/types.js\";\n\nexport function DriveLayout({ children, className, ...props }: BaseProps) {\n return (\n <DriveLayout.Container className={className} {...props}>\n {children}\n </DriveLayout.Container>\n );\n}\n\nDriveLayout.Container = function DriveLayoutContainer({\n children,\n className,\n containerProps,\n ...props\n}: BaseProps) {\n return (\n <div\n className={twMerge(\"flex grow flex-col overflow-auto\", className)}\n {...containerProps}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nDriveLayout.Header = function DriveLayoutHeader({\n children,\n className,\n containerProps,\n ...props\n}: BaseProps) {\n return (\n <div\n className={twMerge(\"flex-0\", className)}\n {...containerProps}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nDriveLayout.Content = function DriveLayoutContent({\n children,\n className,\n containerProps,\n ...props\n}: BaseProps) {\n return (\n <div\n className={twMerge(\"mb-5 flex-1 px-4\", className)}\n {...containerProps}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nDriveLayout.ContentSection = function DriveLayoutContentSection({\n title,\n actions,\n children,\n className,\n containerProps,\n ...props\n}: BaseProps & { title?: string; actions?: React.ReactNode }) {\n return (\n <div className={twMerge(className)} {...containerProps} {...props}>\n {(title || actions) && (\n <div className=\"mb-4 flex items-center justify-between gap-3\">\n {title && (\n <div className=\"text-base font-semibold text-foreground\">\n {title}\n </div>\n )}\n {actions}\n </div>\n )}\n <div className=\"flex flex-wrap gap-2\">{children}</div>\n </div>\n );\n};\n","import { FolderItem } from \"@powerhousedao/design-system/connect\";\nimport {\n isFolderNodeKind,\n useNodesInSelectedDriveOrFolder,\n} from \"@powerhousedao/reactor-browser\";\nimport { twMerge } from \"tailwind-merge\";\nimport { CreateDocument } from \"./create-document.js\";\nimport { FileContentView } from \"./file-content-view.js\";\nimport { DriveLayout } from \"./layout.js\";\n\nexport function FolderView(props: { className?: string }) {\n const { className } = props;\n const nodes = useNodesInSelectedDriveOrFolder();\n const folderNodes = nodes.filter((n) => isFolderNodeKind(n));\n return (\n <div\n className={twMerge(\n \"rounded-md border-2 border-transparent p-2\",\n className,\n )}\n >\n <DriveLayout.ContentSection title=\"Folders\" className=\"mb-4\">\n {folderNodes.length > 0 ? (\n folderNodes.map((folderNode) => (\n <FolderItem key={folderNode.id} folderNode={folderNode} />\n ))\n ) : (\n <div className=\"mb-8 text-sm text-muted-foreground\">\n No documents or files 📄\n </div>\n )}\n </DriveLayout.ContentSection>\n <DriveLayout.ContentSection\n title=\"Documents and files\"\n actions={<CreateDocument />}\n >\n <div className=\"w-full\">\n <FileContentView />\n </div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AAc,EAAzC,WAAW,GAA8B,CAC1D,GAEF,oBAAC,OAAD;IAAK,WAAU;cAAqC;IAE9C,CAAA;GAEmB,CAAA,EAC7B,oBAAC,YAAY,gBAAb;GACE,OAAM;GACN,SAAS,oBAAC,gBAAD,EAAkB,CAAA;aAE3B,oBAAC,OAAD;IAAK,WAAU;cACb,oBAAC,iBAAD,EAAmB,CAAA;IACf,CAAA;GACqB,CAAA,CACzB"}
1
+ {"version":3,"file":"folder-view-D8AkN1Oj.js","names":[],"sources":["../../editors/generic-drive-explorer/utils/select-creatable-modules.ts","../../editors/generic-drive-explorer/components/create-document.tsx","../../editors/generic-drive-explorer/components/file-content-view.tsx","../../editors/generic-drive-explorer/components/layout.tsx","../../editors/generic-drive-explorer/components/folder-view.tsx"],"sourcesContent":["import type { DocumentModelModule } from \"@powerhousedao/shared/document-model\";\n\n/**\n * The modules a user may pick from when creating a new document. Outside\n * studio mode only the latest version of each document type is offered: new\n * documents should never start on an outdated schema. Builders testing\n * migrations run in studio mode and still get every version.\n */\nexport function selectCreatableModules(\n modules: readonly DocumentModelModule[],\n studioMode: boolean,\n): DocumentModelModule[] {\n if (studioMode) return [...modules];\n const latestByType = new Map<string, DocumentModelModule>();\n for (const module of modules) {\n const id = module.documentModel.global.id;\n const current = latestByType.get(id);\n if (!current || (module.version ?? 1) > (current.version ?? 1)) {\n latestByType.set(id, module);\n }\n }\n return [...latestByType.values()];\n}\n","import { Icon, PowerhouseButton } from \"@powerhousedao/design-system\";\nimport type { DocumentTypeOption } from \"@powerhousedao/design-system/connect\";\nimport { CreateDocumentWithTypeModal } from \"@powerhousedao/design-system/connect\";\nimport {\n addDocument,\n preloadEditorModule,\n setSelectedNode,\n useAllowedDocumentModelModules,\n useDisabledEditors,\n useEditorModules,\n useParentFolderForSelectedNode,\n useSelectedDriveSafe,\n useSelectedFolder,\n useStudioMode,\n useUserPermissions,\n} from \"@powerhousedao/reactor-browser\";\nimport type { DocumentModelModule } from \"@powerhousedao/shared/document-model\";\nimport { useState } from \"react\";\nimport { selectCreatableModules } from \"../utils/select-creatable-modules.js\";\n\nfunction toDocumentTypeOption(\n doc: DocumentModelModule,\n studioMode: boolean,\n): DocumentTypeOption {\n const spec = doc.documentModel.global;\n return {\n documentType: spec.id,\n name: spec.name,\n // Outside studio mode only the latest version is offered, so the version\n // suffix is dropped from the label and creation resolves latest-wins.\n version: studioMode ? doc.version : undefined,\n description: spec.description,\n };\n}\n\nexport function CreateDocument() {\n const [showModal, setShowModal] = useState(false);\n const { isAllowedToCreateDocuments } = useUserPermissions();\n // Respect Connect config: allowedDocumentTypes (allowlist) via the hook,\n // disabledEditors (denylist) subtracted below.\n const allowedDocumentModelModules = useAllowedDocumentModelModules();\n const editorModules = useEditorModules();\n const disabledEditors = useDisabledEditors() ?? [];\n const [selectedDrive] = useSelectedDriveSafe();\n const selectedFolder = useSelectedFolder();\n const parentFolder = useParentFolderForSelectedNode();\n // Drive containers are never documents-in-a-drive; hide them structurally so\n // this shared editor can't fail open when disabledEditors is unset.\n const DRIVE_CONTAINER_TYPES = [\n \"powerhouse/document-drive\",\n \"powerhouse/reactor-drive\",\n ];\n const studioMode = useStudioMode() ?? false;\n const visibleDocumentModelModules = selectCreatableModules(\n allowedDocumentModelModules ?? [],\n studioMode,\n ).filter((module) => {\n const id = module.documentModel.global.id;\n return !DRIVE_CONTAINER_TYPES.includes(id) && !disabledEditors.includes(id);\n });\n const preloadEditorsForType = (documentType: string) =>\n editorModules\n ?.filter((editorModule) =>\n editorModule.documentTypes.includes(documentType),\n )\n .forEach((editorModule) => {\n void preloadEditorModule(editorModule);\n });\n const handleCreate = async ({\n name,\n documentType,\n version,\n }: {\n name: string;\n documentType: string;\n version?: number;\n }) => {\n setShowModal(false);\n if (!selectedDrive) return;\n try {\n const node = await addDocument(\n selectedDrive.header.id,\n name,\n documentType,\n selectedFolder?.id ?? parentFolder?.id,\n undefined,\n undefined,\n undefined,\n version,\n );\n setSelectedNode(node);\n } catch (error) {\n console.error(\"Failed to create document:\", error);\n }\n };\n if (!isAllowedToCreateDocuments) return null;\n if (!visibleDocumentModelModules.length) return null;\n // Rendered in the \"Documents and files\" heading row (see folder-view.tsx),\n // so the button is compact and brings no layout wrapper of its own.\n return (\n <>\n <PowerhouseButton\n className=\"py-2\"\n color=\"blue\"\n icon={<Icon name=\"Plus\" size={14} />}\n onClick={() => setShowModal(true)}\n size=\"small\"\n >\n Create New Document\n </PowerhouseButton>\n <CreateDocumentWithTypeModal\n documentTypes={visibleDocumentModelModules.map((module) =>\n toDocumentTypeOption(module, studioMode),\n )}\n onCreate={(input) => void handleCreate(input)}\n onOpenChange={setShowModal}\n onTypeSelected={preloadEditorsForType}\n open={showModal}\n />\n </>\n );\n}\n","import { useWindowSize } from \"@powerhousedao/design-system\";\nimport { FileItem } from \"@powerhousedao/design-system/connect\";\nimport {\n isFileNodeKind,\n useNodesInSelectedDriveOrFolder,\n} from \"@powerhousedao/reactor-browser\";\nimport { useVirtualizer } from \"@tanstack/react-virtual\";\nimport type { FileNode } from \"@powerhousedao/shared/document-drive\";\nimport React, { useRef } from \"react\";\n\nconst GAP = 8;\nconst ITEM_WIDTH = 256;\nconst ITEM_HEIGHT = 48;\n\nconst USED_SPACE = 420;\n\nexport function FileContentView() {\n const parentRef = useRef(null);\n const windowSize = useWindowSize();\n const availableWidth = windowSize.innerWidth - USED_SPACE;\n const nodes = useNodesInSelectedDriveOrFolder();\n const fileNodes = nodes.filter((n) => isFileNodeKind(n));\n const columnCount = Math.floor(availableWidth / (ITEM_WIDTH + GAP)) || 1;\n const rowCount = Math.ceil(fileNodes.length / columnCount);\n\n const rowVirtualizer = useVirtualizer({\n count: rowCount,\n getScrollElement: () => parentRef.current,\n estimateSize: (index) => {\n if (index > 0) {\n return ITEM_HEIGHT + GAP;\n }\n return ITEM_HEIGHT;\n },\n overscan: 5,\n });\n\n const columnVirtualizer = useVirtualizer({\n horizontal: true,\n count: columnCount,\n getScrollElement: () => parentRef.current,\n estimateSize: (index) => {\n if (index > 0) {\n return ITEM_WIDTH + GAP;\n }\n return ITEM_WIDTH;\n },\n overscan: 5,\n });\n\n const getItemIndex = (rowIndex: number, columnIndex: number) =>\n rowIndex * columnCount + columnIndex;\n\n const getItem = (rowIndex: number, columnIndex: number): FileNode | null => {\n const index = getItemIndex(rowIndex, columnIndex);\n return fileNodes[index] || null;\n };\n\n if (fileNodes.length === 0) {\n return (\n <div className=\"mb-8 text-sm text-muted-foreground\">\n No documents or files 📄\n </div>\n );\n }\n\n const renderItem = (rowIndex: number, columnIndex: number) => {\n const fileNode = getItem(rowIndex, columnIndex);\n\n if (!fileNode) {\n return null;\n }\n\n return (\n <div\n style={{\n marginLeft: columnIndex === 0 ? 0 : GAP,\n }}\n >\n <FileItem key={fileNode.id} fileNode={fileNode} />\n </div>\n );\n };\n\n return (\n <div\n ref={parentRef}\n style={{\n width: `100%`,\n overflow: \"auto\",\n }}\n >\n <div\n style={{\n height: `${rowVirtualizer.getTotalSize()}px`,\n width: `${columnVirtualizer.getTotalSize()}px`,\n position: \"relative\",\n }}\n >\n {rowVirtualizer.getVirtualItems().map((virtualRow) => (\n <React.Fragment key={virtualRow.key}>\n {columnVirtualizer.getVirtualItems().map((virtualColumn) => (\n <div\n key={virtualColumn.key}\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n marginTop: virtualRow.index === 0 ? 0 : GAP,\n width: `${virtualColumn.size}px`,\n height: `${ITEM_HEIGHT}px`,\n overflow: \"hidden\",\n transform: `translateX(${virtualColumn.start}px) translateY(${virtualRow.start}px)`,\n }}\n >\n {renderItem(virtualRow.index, virtualColumn.index)}\n </div>\n ))}\n </React.Fragment>\n ))}\n </div>\n </div>\n );\n}\n","import { twMerge } from \"tailwind-merge\";\nimport type { BaseProps } from \"../utils/types.js\";\n\nexport function DriveLayout({ children, className, ...props }: BaseProps) {\n return (\n <DriveLayout.Container className={className} {...props}>\n {children}\n </DriveLayout.Container>\n );\n}\n\nDriveLayout.Container = function DriveLayoutContainer({\n children,\n className,\n containerProps,\n ...props\n}: BaseProps) {\n return (\n <div\n className={twMerge(\"flex grow flex-col overflow-auto\", className)}\n {...containerProps}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nDriveLayout.Header = function DriveLayoutHeader({\n children,\n className,\n containerProps,\n ...props\n}: BaseProps) {\n return (\n <div\n className={twMerge(\"flex-0\", className)}\n {...containerProps}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nDriveLayout.Content = function DriveLayoutContent({\n children,\n className,\n containerProps,\n ...props\n}: BaseProps) {\n return (\n <div\n className={twMerge(\"mb-5 flex-1 px-4\", className)}\n {...containerProps}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nDriveLayout.ContentSection = function DriveLayoutContentSection({\n title,\n actions,\n children,\n className,\n containerProps,\n ...props\n}: BaseProps & { title?: string; actions?: React.ReactNode }) {\n return (\n <div className={twMerge(className)} {...containerProps} {...props}>\n {(title || actions) && (\n <div className=\"mb-4 flex items-center justify-between gap-3\">\n {title && (\n <div className=\"text-base font-semibold text-foreground\">\n {title}\n </div>\n )}\n {actions}\n </div>\n )}\n <div className=\"flex flex-wrap gap-2\">{children}</div>\n </div>\n );\n};\n","import { FolderItem } from \"@powerhousedao/design-system/connect\";\nimport {\n isFolderNodeKind,\n useNodesInSelectedDriveOrFolder,\n} from \"@powerhousedao/reactor-browser\";\nimport { twMerge } from \"tailwind-merge\";\nimport { CreateDocument } from \"./create-document.js\";\nimport { FileContentView } from \"./file-content-view.js\";\nimport { DriveLayout } from \"./layout.js\";\n\nexport function FolderView(props: { className?: string }) {\n const { className } = props;\n const nodes = useNodesInSelectedDriveOrFolder();\n const folderNodes = nodes.filter((n) => isFolderNodeKind(n));\n return (\n <div\n className={twMerge(\n \"rounded-md border-2 border-transparent p-2\",\n className,\n )}\n >\n <DriveLayout.ContentSection title=\"Folders\" className=\"mb-4\">\n {folderNodes.length > 0 ? (\n folderNodes.map((folderNode) => (\n <FolderItem key={folderNode.id} folderNode={folderNode} />\n ))\n ) : (\n <div className=\"mb-8 text-sm text-muted-foreground\">\n No documents or files 📄\n </div>\n )}\n </DriveLayout.ContentSection>\n <DriveLayout.ContentSection\n title=\"Documents and files\"\n actions={<CreateDocument />}\n >\n <div className=\"w-full\">\n <FileContentView />\n </div>\n </DriveLayout.ContentSection>\n </div>\n );\n}\n\nexport default FolderView;\n"],"mappings":";;;;;;;;;;;;AAQA,SAAgB,uBACd,SACA,YACuB;AACvB,KAAI,WAAY,QAAO,CAAC,GAAG,QAAQ;CACnC,MAAM,+BAAe,IAAI,KAAkC;AAC3D,MAAK,MAAM,UAAU,SAAS;EAC5B,MAAM,KAAK,OAAO,cAAc,OAAO;EACvC,MAAM,UAAU,aAAa,IAAI,GAAG;AACpC,MAAI,CAAC,YAAY,OAAO,WAAW,MAAM,QAAQ,WAAW,GAC1D,cAAa,IAAI,IAAI,OAAO;;AAGhC,QAAO,CAAC,GAAG,aAAa,QAAQ,CAAC;;;;ACDnC,SAAS,qBACP,KACA,YACoB;CACpB,MAAM,OAAO,IAAI,cAAc;AAC/B,QAAO;EACL,cAAc,KAAK;EACnB,MAAM,KAAK;EAGX,SAAS,aAAa,IAAI,UAAU,KAAA;EACpC,aAAa,KAAK;EACnB;;AAGH,SAAgB,iBAAiB;CAC/B,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;CACjD,MAAM,EAAE,+BAA+B,oBAAoB;CAG3D,MAAM,8BAA8B,gCAAgC;CACpE,MAAM,gBAAgB,kBAAkB;CACxC,MAAM,kBAAkB,oBAAoB,IAAI,EAAE;CAClD,MAAM,CAAC,iBAAiB,sBAAsB;CAC9C,MAAM,iBAAiB,mBAAmB;CAC1C,MAAM,eAAe,gCAAgC;CAGrD,MAAM,wBAAwB,CAC5B,6BACA,2BACD;CACD,MAAM,aAAa,eAAe,IAAI;CACtC,MAAM,8BAA8B,uBAClC,+BAA+B,EAAE,EACjC,WACD,CAAC,QAAQ,WAAW;EACnB,MAAM,KAAK,OAAO,cAAc,OAAO;AACvC,SAAO,CAAC,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OAAD;EACE,WAAW,QACT,8CACA,UACD;YAJH,CAME,oBAAC,YAAY,gBAAb;GAA4B,OAAM;GAAU,WAAU;aACnD,YAAY,SAAS,IACpB,YAAY,KAAK,eACf,oBAAC,YAAD,EAA4C,YAAc,EAAzC,WAAW,GAA8B,CAC1D,GAEF,oBAAC,OAAD;IAAK,WAAU;cAAqC;IAE9C,CAAA;GAEmB,CAAA,EAC7B,oBAAC,YAAY,gBAAb;GACE,OAAM;GACN,SAAS,oBAAC,gBAAD,EAAkB,CAAA;aAE3B,oBAAC,OAAD;IAAK,WAAU;cACb,oBAAC,iBAAD,EAAmB,CAAA;IACf,CAAA;GACqB,CAAA,CACzB"}
@@ -1,9 +1,9 @@
1
1
  import { D as __commonJSMin } from "./dist-B4FWbuEM.js";
2
- import "./document-drive-ZQzPQfEL.js";
2
+ import "./document-drive-BEXJ-rHp.js";
3
3
  import { c as Kind, l as DirectiveLocation, m as invariant$1, p as GraphQLError, r as inspect, t as parse } from "./parser-CkF6Qt8V.js";
4
4
  import { $ as getNamedType, A as validateSchema, B as GraphQLInt, C as NoUnusedFragmentsRule, D as KnownDirectivesRule, E as KnownFragmentNamesRule, F as GraphQLDirective, G as GraphQLInputObjectType, H as isSpecifiedScalarType, I as isSpecifiedDirective, J as GraphQLNonNull, K as GraphQLInterfaceType, L as GraphQLBoolean, M as SchemaMetaFieldDef, N as TypeMetaFieldDef, O as FragmentsOnCompositeTypesRule, P as TypeNameMetaFieldDef, Q as assertAbstractType, R as GraphQLFloat, S as PossibleTypeExtensionsRule, T as KnownTypeNamesRule, U as doTypesOverlap, V as GraphQLString, W as GraphQLEnumType, X as GraphQLScalarType, Y as GraphQLObjectType, Z as GraphQLUnionType, _ as UniqueDirectivesPerLocationRule, at as isInputType, c as buildSchema, ct as isListType, d as UniqueVariableNamesRule, dt as isObjectType, et as getNullableType, f as UniqueTypeNamesRule, ft as isOutputType, g as UniqueEnumValueNamesRule, h as UniqueFieldDefinitionNamesRule, it as isInputObjectType, j as GraphQLSchema, k as ExecutableDefinitionsRule, l as validate, lt as isNamedType, m as UniqueInputFieldNamesRule, mt as isUnionType, nt as isCompositeType, ot as isInterfaceType, p as UniqueOperationTypesRule, pt as isScalarType, q as GraphQLList, rt as isEnumType, st as isLeafType, tt as isAbstractType, u as specifiedRules, ut as isNonNullType, v as UniqueDirectiveNamesRule, w as LoneSchemaDefinitionRule, x as ProvidedRequiredArgumentsRule, y as UniqueArgumentNamesRule, z as GraphQLID } from "./documents-J_l59mSV.js";
5
5
  import { i as visit, n as BREAK, t as print } from "./printer-CEYr4JOg.js";
6
- import { y as useTheme } from "./dist-C-xkNfyD.js";
6
+ import { y as useTheme } from "./dist-D69hfRZN.js";
7
7
  import { C as linter, D as EditorState, E as Compartment, O as StateEffect, S as forceLinting, T as keymap, _ as foldNodeProp, a as makeFocusHandler, b as tags, c as baseEditorExtensions, d as ayuLight, f as LRLanguage, g as foldInside, h as delimitedIndent, i as useHandlerReconfiguration, k as StateField, l as baseKeymap, n as useEditorCleanup, o as makePasteHandler, p as LanguageSupport, r as useEditorRefs, s as makeUpdateHandler, t as useDocumentSync, u as dracula, v as indentNodeProp, w as EditorView, x as LRParser, y as styleTags } from "./hooks-KKcNp2X0.js";
8
8
  import { n as safeParseSdl, r as useSchemaContext } from "./schema-context-ZyeclQwy.js";
9
9
  import { memo, useEffect, useRef } from "react";
@@ -11695,4 +11695,4 @@ const GraphqlEditor = memo(function GraphqlEditor(props) {
11695
11695
  //#endregion
11696
11696
  export { GraphqlEditor as default };
11697
11697
 
11698
- //# sourceMappingURL=graphql-editor-Cbkb5KRZ.js.map
11698
+ //# sourceMappingURL=graphql-editor-BcL3-Zha.js.map