@powerhousedao/vetra 6.2.3-dev.69 → 6.2.3-dev.70

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 (42) hide show
  1. package/dist/document-models/app-module/index.d.ts +2 -33
  2. package/dist/document-models/document-editor/index.d.ts +2 -31
  3. package/dist/document-models/processor-module/index.d.ts +2 -34
  4. package/dist/document-models/subgraph-module/index.d.ts +2 -29
  5. package/dist/document-models/vetra-package/index.d.ts +2 -37
  6. package/dist/{editor-CiX3Tq3g.js → editor-BDR7IYJG.js} +3 -5
  7. package/dist/{editor-CiX3Tq3g.js.map → editor-BDR7IYJG.js.map} +1 -1
  8. package/dist/{editor-DpZVlVN1.js → editor-CnfajXGg.js} +3 -5
  9. package/dist/{editor-DpZVlVN1.js.map → editor-CnfajXGg.js.map} +1 -1
  10. package/dist/{editor-Intw9NHl.js → editor-Cnk0M044.js} +29 -15
  11. package/dist/{editor-Intw9NHl.js.map → editor-Cnk0M044.js.map} +1 -1
  12. package/dist/{editor-BXOEFIDj.js → editor-D5SIbFn_.js} +3 -3
  13. package/dist/{editor-BXOEFIDj.js.map → editor-D5SIbFn_.js.map} +1 -1
  14. package/dist/{editor-C5a0rBQj.js → editor-DbE7t0TU.js} +3 -5
  15. package/dist/{editor-C5a0rBQj.js.map → editor-DbE7t0TU.js.map} +1 -1
  16. package/dist/{editor-DFEeM_dy.js → editor-SJk7cr6k.js} +3 -5
  17. package/dist/{editor-DFEeM_dy.js.map → editor-SJk7cr6k.js.map} +1 -1
  18. package/dist/editors/index.d.ts +17 -6
  19. package/dist/editors/index.d.ts.map +1 -1
  20. package/dist/editors/index.js +1 -1
  21. package/dist/index-6UbC6P89.d.ts +39 -0
  22. package/dist/index-6UbC6P89.d.ts.map +1 -0
  23. package/dist/index-6bE9h_7M.d.ts +35 -0
  24. package/dist/index-6bE9h_7M.d.ts.map +1 -0
  25. package/dist/index-7hPKQROx.d.ts +33 -0
  26. package/dist/index-7hPKQROx.d.ts.map +1 -0
  27. package/dist/index-D_rwE-2_.d.ts +31 -0
  28. package/dist/index-D_rwE-2_.d.ts.map +1 -0
  29. package/dist/index-cdL5k2sw.d.ts +36 -0
  30. package/dist/index-cdL5k2sw.d.ts.map +1 -0
  31. package/dist/index.js +1 -1
  32. package/dist/{module-CQ4BzxUF.js → module-CZLWjrD_.js} +7 -7
  33. package/dist/module-CZLWjrD_.js.map +1 -0
  34. package/package.json +9 -9
  35. package/dist/document-models/app-module/index.d.ts.map +0 -1
  36. package/dist/document-models/document-editor/index.d.ts.map +0 -1
  37. package/dist/document-models/processor-module/index.d.ts.map +0 -1
  38. package/dist/document-models/subgraph-module/index.d.ts.map +0 -1
  39. package/dist/document-models/vetra-package/index.d.ts.map +0 -1
  40. package/dist/module-CQ4BzxUF.js.map +0 -1
  41. package/dist/useVetraDocument-B0k3gNtw.js +0 -30
  42. package/dist/useVetraDocument-B0k3gNtw.js.map +0 -1
@@ -1,35 +1,4 @@
1
1
  import { $ as AppModuleDocument, A as isAppModuleDocument, B as setAppStatus, C as defaultLocalState, D as AppModulePHStateSchema, E as AppModuleDocumentSchema, F as setDragAndDropEnabled, G as AppModuleDndOperationsAction, H as AppModuleController, I as addDocumentType, J as AppModuleBaseOperationsAction, K as SetDragAndDropEnabledAction, L as creators_d_exports, M as documentModel, N as AppModuleDndOperationsOperations, O as assertIsAppModuleDocument, P as creators_d_exports$1, Q as SetDocumentTypesAction, R as removeDocumentType, S as defaultGlobalState, T as AppModuleDocumentHeaderSchema, U as AppModuleBaseOperationsOperations, V as setDocumentTypes, W as AppModuleAction, X as SetAppNameAction, Y as RemoveDocumentTypeAction, Z as SetAppStatusAction, _ as useAppModuleDocumentsInSelectedDrive, _t as StatusType, a as RemoveDocumentTypeInputSchema, at as Incremental, b as createAppModuleDocument, c as SetDocumentTypesInputSchema, ct as MakeMaybe, d as definedNonNullAnySchema, dt as RemoveDocumentTypeInput, et as AppModuleLocalState, f as isDefinedNonNullAny, ft as Scalars, g as useAppModuleDocumentById, gt as SetDragAndDropEnabledInput, h as AppModule, ht as SetDocumentTypesInput, i as AppModuleStateSchema, it as Exact, j as isAppModuleState, k as assertIsAppModuleState, l as SetDragAndDropEnabledInputSchema, lt as MakeOptional, m as utils, mt as SetAppStatusInput, n as initialLocalState, nt as AddDocumentTypeInput, o as SetAppNameInputSchema, ot as InputMaybe, p as reducer, pt as SetAppNameInput, q as AddDocumentTypeAction, r as AddDocumentTypeInputSchema, rt as AppModuleState, s as SetAppStatusInputSchema, st as MakeEmpty, t as initialGlobalState, tt as AppModulePHState, u as StatusTypeSchema, ut as Maybe, v as useAppModuleDocumentsInSelectedFolder, w as defaultPHState, x as createState, y as useSelectedAppModuleDocument, z as setAppName } from "../../index-DPG4u1Ym.js";
2
- import { UpgradeManifest } from "document-model";
3
- //#region document-models/app-module/v1/gen/document-type.d.ts
4
- /**
5
- * WARNING: DO NOT EDIT
6
- * This file is auto-generated and updated by codegen
7
- */
8
- export declare const appModuleDocumentType = "powerhouse/app";
9
- //#endregion
10
- //#region document-models/app-module/v1/actions.d.ts
11
- /** Actions for the AppModule document model */
12
- export declare const actions: {
13
- setName: typeof import("document-model").setName;
14
- setPreferredEditor: typeof import("document-model").setPreferredEditor;
15
- undo: typeof import("document-model").undo;
16
- redo: typeof import("document-model").redo;
17
- noop: typeof import("document-model").noop;
18
- setAppName: (input: SetAppNameInput) => SetAppNameAction;
19
- setAppStatus: (input: SetAppStatusInput) => SetAppStatusAction;
20
- addDocumentType: (input: AddDocumentTypeInput) => AddDocumentTypeAction;
21
- removeDocumentType: (input: RemoveDocumentTypeInput) => RemoveDocumentTypeAction;
22
- setDocumentTypes: (input: SetDocumentTypesInput) => SetDocumentTypesAction;
23
- setDragAndDropEnabled: (input: SetDragAndDropEnabledInput) => SetDragAndDropEnabledAction;
24
- };
25
- //#endregion
26
- //#region document-models/app-module/upgrades/versions.d.ts
27
- export declare const supportedVersions: readonly [1];
28
- export declare const latestVersion: 1;
29
- //#endregion
30
- //#region document-models/app-module/upgrades/upgrade-manifest.d.ts
31
- export declare const appModuleUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
32
- //#endregion
33
- export { AddDocumentTypeAction, AddDocumentTypeInput, AddDocumentTypeInputSchema, AppModule, AppModuleAction, AppModuleBaseOperationsAction, AppModuleBaseOperationsOperations, AppModuleController, AppModuleDndOperationsAction, AppModuleDndOperationsOperations, type AppModuleDocument, AppModuleDocumentHeaderSchema, AppModuleDocumentSchema, type AppModuleState as AppModuleGlobalState, AppModuleState, type AppModuleLocalState, type AppModulePHState, AppModulePHStateSchema, AppModuleStateSchema, Exact, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, RemoveDocumentTypeAction, RemoveDocumentTypeInput, RemoveDocumentTypeInputSchema, Scalars, SetAppNameAction, SetAppNameInput, SetAppNameInputSchema, SetAppStatusAction, SetAppStatusInput, SetAppStatusInputSchema, SetDocumentTypesAction, SetDocumentTypesInput, SetDocumentTypesInputSchema, SetDragAndDropEnabledAction, SetDragAndDropEnabledInput, SetDragAndDropEnabledInputSchema, StatusType, StatusTypeSchema, addDocumentType, creators_d_exports as appModuleBaseOperationsActions, creators_d_exports$1 as appModuleDndOperationsActions, assertIsAppModuleDocument, assertIsAppModuleState, createAppModuleDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isAppModuleDocument, isAppModuleState, isDefinedNonNullAny, reducer, removeDocumentType, setAppName, setAppStatus, setDocumentTypes, setDragAndDropEnabled, useAppModuleDocumentById, useAppModuleDocumentsInSelectedDrive, useAppModuleDocumentsInSelectedFolder, useSelectedAppModuleDocument, utils };
2
+ import { a as appModuleDocumentType, i as actions, n as latestVersion, r as supportedVersions, t as appModuleUpgradeManifest } from "../../index-6bE9h_7M.js";
3
+ export { AddDocumentTypeAction, AddDocumentTypeInput, AddDocumentTypeInputSchema, AppModule, AppModuleAction, AppModuleBaseOperationsAction, AppModuleBaseOperationsOperations, AppModuleController, AppModuleDndOperationsAction, AppModuleDndOperationsOperations, type AppModuleDocument, AppModuleDocumentHeaderSchema, AppModuleDocumentSchema, type AppModuleState as AppModuleGlobalState, AppModuleState, type AppModuleLocalState, type AppModulePHState, AppModulePHStateSchema, AppModuleStateSchema, Exact, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, RemoveDocumentTypeAction, RemoveDocumentTypeInput, RemoveDocumentTypeInputSchema, Scalars, SetAppNameAction, SetAppNameInput, SetAppNameInputSchema, SetAppStatusAction, SetAppStatusInput, SetAppStatusInputSchema, SetDocumentTypesAction, SetDocumentTypesInput, SetDocumentTypesInputSchema, SetDragAndDropEnabledAction, SetDragAndDropEnabledInput, SetDragAndDropEnabledInputSchema, StatusType, StatusTypeSchema, actions, addDocumentType, creators_d_exports as appModuleBaseOperationsActions, creators_d_exports$1 as appModuleDndOperationsActions, appModuleDocumentType, appModuleUpgradeManifest, assertIsAppModuleDocument, assertIsAppModuleState, createAppModuleDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isAppModuleDocument, isAppModuleState, isDefinedNonNullAny, latestVersion, reducer, removeDocumentType, setAppName, setAppStatus, setDocumentTypes, setDragAndDropEnabled, supportedVersions, useAppModuleDocumentById, useAppModuleDocumentsInSelectedDrive, useAppModuleDocumentsInSelectedFolder, useSelectedAppModuleDocument, utils };
34
4
  export {};
35
- //# sourceMappingURL=index.d.ts.map
@@ -1,33 +1,4 @@
1
1
  import { $ as InputMaybe, A as isDocumentEditorState, B as AddDocumentTypeAction, C as defaultPHState, D as assertIsDocumentEditorDocument, E as DocumentEditorPHStateSchema, F as setEditorName, G as DocumentEditorDocument, H as RemoveDocumentTypeAction, I as setEditorStatus, J as AddDocumentTypeInput, K as DocumentEditorLocalState, L as DocumentEditorController, M as addDocumentType, N as creators_d_exports, O as assertIsDocumentEditorState, P as removeDocumentType, Q as Incremental, R as DocumentEditorBaseOperationsOperations, S as defaultLocalState, T as DocumentEditorDocumentSchema, U as SetEditorNameAction, V as DocumentEditorBaseOperationsAction, W as SetEditorStatusAction, X as DocumentTypeItem, Y as DocumentEditorState, Z as Exact, _ as useDocumentEditorDocumentsInSelectedFolder, a as DocumentTypeItemSchema, at as Scalars, b as createState, c as SetEditorStatusInputSchema, ct as StatusType, d as isDefinedNonNullAny, et as MakeEmpty, f as reducer, g as useDocumentEditorDocumentsInSelectedDrive, h as useDocumentEditorDocumentById, i as DocumentEditorStateSchema, it as RemoveDocumentTypeInput, j as documentModel, k as isDocumentEditorDocument, l as StatusTypeSchema, m as DocumentEditor, n as initialLocalState, nt as MakeOptional, o as RemoveDocumentTypeInputSchema, ot as SetEditorNameInput, p as utils, q as DocumentEditorPHState, r as AddDocumentTypeInputSchema, rt as Maybe, s as SetEditorNameInputSchema, st as SetEditorStatusInput, t as initialGlobalState, tt as MakeMaybe, u as definedNonNullAnySchema, v as useSelectedDocumentEditorDocument, w as DocumentEditorDocumentHeaderSchema, x as defaultGlobalState, y as createDocumentEditorDocument, z as DocumentEditorAction } from "../../index-D6Ai0OOc.js";
2
- import { UpgradeManifest } from "document-model";
3
- //#region document-models/document-editor/v1/gen/document-type.d.ts
4
- /**
5
- * WARNING: DO NOT EDIT
6
- * This file is auto-generated and updated by codegen
7
- */
8
- export declare const documentEditorDocumentType = "powerhouse/document-editor";
9
- //#endregion
10
- //#region document-models/document-editor/v1/actions.d.ts
11
- /** Actions for the DocumentEditor document model */
12
- export declare const actions: {
13
- setName: typeof import("document-model").setName;
14
- setPreferredEditor: typeof import("document-model").setPreferredEditor;
15
- undo: typeof import("document-model").undo;
16
- redo: typeof import("document-model").redo;
17
- noop: typeof import("document-model").noop;
18
- setEditorName: (input: SetEditorNameInput) => SetEditorNameAction;
19
- addDocumentType: (input: AddDocumentTypeInput) => AddDocumentTypeAction;
20
- removeDocumentType: (input: RemoveDocumentTypeInput) => RemoveDocumentTypeAction;
21
- setEditorStatus: (input: SetEditorStatusInput) => SetEditorStatusAction;
22
- };
23
- //#endregion
24
- //#region document-models/document-editor/upgrades/versions.d.ts
25
- export declare const supportedVersions: readonly [1];
26
- export declare const latestVersion: 1;
27
- //#endregion
28
- //#region document-models/document-editor/upgrades/upgrade-manifest.d.ts
29
- export declare const documentEditorUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
30
- //#endregion
31
- export { AddDocumentTypeAction, AddDocumentTypeInput, AddDocumentTypeInputSchema, DocumentEditor, DocumentEditorAction, DocumentEditorBaseOperationsAction, DocumentEditorBaseOperationsOperations, DocumentEditorController, type DocumentEditorDocument, DocumentEditorDocumentHeaderSchema, DocumentEditorDocumentSchema, type DocumentEditorState as DocumentEditorGlobalState, DocumentEditorState, type DocumentEditorLocalState, type DocumentEditorPHState, DocumentEditorPHStateSchema, DocumentEditorStateSchema, DocumentTypeItem, DocumentTypeItemSchema, Exact, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, RemoveDocumentTypeAction, RemoveDocumentTypeInput, RemoveDocumentTypeInputSchema, Scalars, SetEditorNameAction, SetEditorNameInput, SetEditorNameInputSchema, SetEditorStatusAction, SetEditorStatusInput, SetEditorStatusInputSchema, StatusType, StatusTypeSchema, addDocumentType, assertIsDocumentEditorDocument, assertIsDocumentEditorState, createDocumentEditorDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, creators_d_exports as documentEditorBaseOperationsActions, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isDocumentEditorDocument, isDocumentEditorState, reducer, removeDocumentType, setEditorName, setEditorStatus, useDocumentEditorDocumentById, useDocumentEditorDocumentsInSelectedDrive, useDocumentEditorDocumentsInSelectedFolder, useSelectedDocumentEditorDocument, utils };
2
+ import { a as documentEditorDocumentType, i as actions, n as latestVersion, r as supportedVersions, t as documentEditorUpgradeManifest } from "../../index-7hPKQROx.js";
3
+ export { AddDocumentTypeAction, AddDocumentTypeInput, AddDocumentTypeInputSchema, DocumentEditor, DocumentEditorAction, DocumentEditorBaseOperationsAction, DocumentEditorBaseOperationsOperations, DocumentEditorController, type DocumentEditorDocument, DocumentEditorDocumentHeaderSchema, DocumentEditorDocumentSchema, type DocumentEditorState as DocumentEditorGlobalState, DocumentEditorState, type DocumentEditorLocalState, type DocumentEditorPHState, DocumentEditorPHStateSchema, DocumentEditorStateSchema, DocumentTypeItem, DocumentTypeItemSchema, Exact, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, RemoveDocumentTypeAction, RemoveDocumentTypeInput, RemoveDocumentTypeInputSchema, Scalars, SetEditorNameAction, SetEditorNameInput, SetEditorNameInputSchema, SetEditorStatusAction, SetEditorStatusInput, SetEditorStatusInputSchema, StatusType, StatusTypeSchema, actions, addDocumentType, assertIsDocumentEditorDocument, assertIsDocumentEditorState, createDocumentEditorDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, creators_d_exports as documentEditorBaseOperationsActions, documentEditorDocumentType, documentEditorUpgradeManifest, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isDocumentEditorDocument, isDocumentEditorState, latestVersion, reducer, removeDocumentType, setEditorName, setEditorStatus, supportedVersions, useDocumentEditorDocumentById, useDocumentEditorDocumentsInSelectedDrive, useDocumentEditorDocumentsInSelectedFolder, useSelectedDocumentEditorDocument, utils };
32
4
  export {};
33
- //# sourceMappingURL=index.d.ts.map
@@ -1,36 +1,4 @@
1
1
  import { $ as SetProcessorTypeAction, A as assertIsProcessorModuleDocument, B as setProcessorName, C as createState, D as ProcessorModuleDocumentHeaderSchema, E as defaultPHState, F as addDocumentType, G as ProcessorModuleAction, H as setProcessorType, I as addProcessorApp, J as ProcessorModuleBaseOperationsAction, K as AddDocumentTypeAction, L as creators_d_exports, M as isProcessorModuleDocument, N as isProcessorModuleState, O as ProcessorModuleDocumentSchema, P as documentModel, Q as SetProcessorStatusAction, R as removeDocumentType, S as createProcessorModuleDocument, T as defaultLocalState, U as ProcessorModuleController, V as setProcessorStatus, W as ProcessorModuleBaseOperationsOperations, X as RemoveProcessorAppAction, Y as RemoveDocumentTypeAction, Z as SetProcessorNameAction, _ as ProcessorModule, _t as SetProcessorNameInput, a as DocumentTypeItemSchema, at as DocumentTypeItem, b as useProcessorModuleDocumentsInSelectedFolder, bt as StatusType, c as RemoveProcessorAppInputSchema, ct as InputMaybe, d as SetProcessorTypeInputSchema, dt as MakeOptional, et as ProcessorModuleDocument, f as StatusTypeSchema, ft as Maybe, g as utils, gt as Scalars, h as reducer, ht as RemoveProcessorAppInput, i as AddProcessorAppInputSchema, it as AddProcessorAppInput, j as assertIsProcessorModuleState, k as ProcessorModulePHStateSchema, l as SetProcessorNameInputSchema, lt as MakeEmpty, m as isDefinedNonNullAny, mt as RemoveDocumentTypeInput, n as initialLocalState, nt as ProcessorModulePHState, o as ProcessorModuleStateSchema, ot as Exact, p as definedNonNullAnySchema, pt as ProcessorModuleState, q as AddProcessorAppAction, r as AddDocumentTypeInputSchema, rt as AddDocumentTypeInput, s as RemoveDocumentTypeInputSchema, st as Incremental, t as initialGlobalState, tt as ProcessorModuleLocalState, u as SetProcessorStatusInputSchema, ut as MakeMaybe, v as useProcessorModuleDocumentById, vt as SetProcessorStatusInput, w as defaultGlobalState, x as useSelectedProcessorModuleDocument, y as useProcessorModuleDocumentsInSelectedDrive, yt as SetProcessorTypeInput, z as removeProcessorApp } from "../../index-B52jv-LY.js";
2
- import { UpgradeManifest } from "document-model";
3
- //#region document-models/processor-module/v1/gen/document-type.d.ts
4
- /**
5
- * WARNING: DO NOT EDIT
6
- * This file is auto-generated and updated by codegen
7
- */
8
- export declare const processorModuleDocumentType = "powerhouse/processor";
9
- //#endregion
10
- //#region document-models/processor-module/v1/actions.d.ts
11
- /** Actions for the ProcessorModule document model */
12
- export declare const actions: {
13
- setName: typeof import("document-model").setName;
14
- setPreferredEditor: typeof import("document-model").setPreferredEditor;
15
- undo: typeof import("document-model").undo;
16
- redo: typeof import("document-model").redo;
17
- noop: typeof import("document-model").noop;
18
- setProcessorName: (input: SetProcessorNameInput) => SetProcessorNameAction;
19
- setProcessorType: (input: SetProcessorTypeInput) => SetProcessorTypeAction;
20
- addDocumentType: (input: AddDocumentTypeInput) => AddDocumentTypeAction;
21
- removeDocumentType: (input: RemoveDocumentTypeInput) => RemoveDocumentTypeAction;
22
- addProcessorApp: (input: AddProcessorAppInput) => AddProcessorAppAction;
23
- removeProcessorApp: (input: RemoveProcessorAppInput) => RemoveProcessorAppAction;
24
- setProcessorStatus: (input: SetProcessorStatusInput) => SetProcessorStatusAction;
25
- };
26
- //#endregion
27
- //#region document-models/processor-module/upgrades/versions.d.ts
28
- export declare const supportedVersions: readonly [1];
29
- export declare const latestVersion: 1;
30
- //#endregion
31
- //#region document-models/processor-module/upgrades/upgrade-manifest.d.ts
32
- export declare const processorModuleUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
33
- //#endregion
34
- export { AddDocumentTypeAction, AddDocumentTypeInput, AddDocumentTypeInputSchema, AddProcessorAppAction, AddProcessorAppInput, AddProcessorAppInputSchema, DocumentTypeItem, DocumentTypeItemSchema, Exact, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, ProcessorModule, ProcessorModuleAction, ProcessorModuleBaseOperationsAction, ProcessorModuleBaseOperationsOperations, ProcessorModuleController, type ProcessorModuleDocument, ProcessorModuleDocumentHeaderSchema, ProcessorModuleDocumentSchema, type ProcessorModuleState as ProcessorModuleGlobalState, ProcessorModuleState, type ProcessorModuleLocalState, type ProcessorModulePHState, ProcessorModulePHStateSchema, ProcessorModuleStateSchema, RemoveDocumentTypeAction, RemoveDocumentTypeInput, RemoveDocumentTypeInputSchema, RemoveProcessorAppAction, RemoveProcessorAppInput, RemoveProcessorAppInputSchema, Scalars, SetProcessorNameAction, SetProcessorNameInput, SetProcessorNameInputSchema, SetProcessorStatusAction, SetProcessorStatusInput, SetProcessorStatusInputSchema, SetProcessorTypeAction, SetProcessorTypeInput, SetProcessorTypeInputSchema, StatusType, StatusTypeSchema, addDocumentType, addProcessorApp, assertIsProcessorModuleDocument, assertIsProcessorModuleState, createProcessorModuleDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isProcessorModuleDocument, isProcessorModuleState, creators_d_exports as processorModuleBaseOperationsActions, reducer, removeDocumentType, removeProcessorApp, setProcessorName, setProcessorStatus, setProcessorType, useProcessorModuleDocumentById, useProcessorModuleDocumentsInSelectedDrive, useProcessorModuleDocumentsInSelectedFolder, useSelectedProcessorModuleDocument, utils };
2
+ import { a as processorModuleDocumentType, i as actions, n as latestVersion, r as supportedVersions, t as processorModuleUpgradeManifest } from "../../index-cdL5k2sw.js";
3
+ export { AddDocumentTypeAction, AddDocumentTypeInput, AddDocumentTypeInputSchema, AddProcessorAppAction, AddProcessorAppInput, AddProcessorAppInputSchema, DocumentTypeItem, DocumentTypeItemSchema, Exact, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, ProcessorModule, ProcessorModuleAction, ProcessorModuleBaseOperationsAction, ProcessorModuleBaseOperationsOperations, ProcessorModuleController, type ProcessorModuleDocument, ProcessorModuleDocumentHeaderSchema, ProcessorModuleDocumentSchema, type ProcessorModuleState as ProcessorModuleGlobalState, ProcessorModuleState, type ProcessorModuleLocalState, type ProcessorModulePHState, ProcessorModulePHStateSchema, ProcessorModuleStateSchema, RemoveDocumentTypeAction, RemoveDocumentTypeInput, RemoveDocumentTypeInputSchema, RemoveProcessorAppAction, RemoveProcessorAppInput, RemoveProcessorAppInputSchema, Scalars, SetProcessorNameAction, SetProcessorNameInput, SetProcessorNameInputSchema, SetProcessorStatusAction, SetProcessorStatusInput, SetProcessorStatusInputSchema, SetProcessorTypeAction, SetProcessorTypeInput, SetProcessorTypeInputSchema, StatusType, StatusTypeSchema, actions, addDocumentType, addProcessorApp, assertIsProcessorModuleDocument, assertIsProcessorModuleState, createProcessorModuleDocument, createState, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isProcessorModuleDocument, isProcessorModuleState, latestVersion, creators_d_exports as processorModuleBaseOperationsActions, processorModuleDocumentType, processorModuleUpgradeManifest, reducer, removeDocumentType, removeProcessorApp, setProcessorName, setProcessorStatus, setProcessorType, supportedVersions, useProcessorModuleDocumentById, useProcessorModuleDocumentsInSelectedDrive, useProcessorModuleDocumentsInSelectedFolder, useSelectedProcessorModuleDocument, utils };
35
4
  export {};
36
- //# sourceMappingURL=index.d.ts.map
@@ -1,31 +1,4 @@
1
1
  import { A as setSubgraphName, B as SubgraphModulePHState, C as SubgraphModulePHStateSchema, D as isSubgraphModuleState, E as isSubgraphModuleDocument, F as SetSubgraphNameAction, G as MakeMaybe, H as Incremental, I as SetSubgraphStatusAction, J as Scalars, K as MakeOptional, L as SubgraphModuleBaseOperationsAction, M as SubgraphModuleController, N as SubgraphModuleBaseOperationsOperations, O as documentModel, P as SubgraphModuleAction, Q as SubgraphModuleState, R as SubgraphModuleDocument, S as SubgraphModuleDocumentSchema, T as assertIsSubgraphModuleState, U as InputMaybe, V as Exact, W as MakeEmpty, X as SetSubgraphStatusInput, Y as SetSubgraphNameInput, Z as StatusType, _ as createSubgraphModuleDocument, a as StatusTypeSchema, b as defaultPHState, c as isDefinedNonNullAny, d as SubgraphModule, f as useSelectedSubgraphModuleDocument, g as createState, h as useSubgraphModuleDocumentsInSelectedFolder, i as SetSubgraphStatusInputSchema, j as setSubgraphStatus, k as creators_d_exports, l as reducer, m as useSubgraphModuleDocumentsInSelectedDrive, n as initialLocalState, o as SubgraphModuleStateSchema, p as useSubgraphModuleDocumentById, q as Maybe, r as SetSubgraphNameInputSchema, s as definedNonNullAnySchema, t as initialGlobalState, u as utils, v as defaultGlobalState, w as assertIsSubgraphModuleDocument, x as SubgraphModuleDocumentHeaderSchema, y as defaultLocalState, z as SubgraphModuleLocalState } from "../../index-DplUuZMT.js";
2
- import { UpgradeManifest } from "document-model";
3
- //#region document-models/subgraph-module/v1/gen/document-type.d.ts
4
- /**
5
- * WARNING: DO NOT EDIT
6
- * This file is auto-generated and updated by codegen
7
- */
8
- export declare const subgraphModuleDocumentType = "powerhouse/subgraph";
9
- //#endregion
10
- //#region document-models/subgraph-module/v1/actions.d.ts
11
- /** Actions for the SubgraphModule document model */
12
- export declare const actions: {
13
- setName: typeof import("document-model").setName;
14
- setPreferredEditor: typeof import("document-model").setPreferredEditor;
15
- undo: typeof import("document-model").undo;
16
- redo: typeof import("document-model").redo;
17
- noop: typeof import("document-model").noop;
18
- setSubgraphName: (input: SetSubgraphNameInput) => SetSubgraphNameAction;
19
- setSubgraphStatus: (input: SetSubgraphStatusInput) => SetSubgraphStatusAction;
20
- };
21
- //#endregion
22
- //#region document-models/subgraph-module/upgrades/versions.d.ts
23
- export declare const supportedVersions: readonly [1];
24
- export declare const latestVersion: 1;
25
- //#endregion
26
- //#region document-models/subgraph-module/upgrades/upgrade-manifest.d.ts
27
- export declare const subgraphModuleUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
28
- //#endregion
29
- export { Exact, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, Scalars, SetSubgraphNameAction, SetSubgraphNameInput, SetSubgraphNameInputSchema, SetSubgraphStatusAction, SetSubgraphStatusInput, SetSubgraphStatusInputSchema, StatusType, StatusTypeSchema, SubgraphModule, SubgraphModuleAction, SubgraphModuleBaseOperationsAction, SubgraphModuleBaseOperationsOperations, SubgraphModuleController, type SubgraphModuleDocument, SubgraphModuleDocumentHeaderSchema, SubgraphModuleDocumentSchema, type SubgraphModuleState as SubgraphModuleGlobalState, SubgraphModuleState, type SubgraphModuleLocalState, type SubgraphModulePHState, SubgraphModulePHStateSchema, SubgraphModuleStateSchema, assertIsSubgraphModuleDocument, assertIsSubgraphModuleState, createState, createSubgraphModuleDocument, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isSubgraphModuleDocument, isSubgraphModuleState, reducer, setSubgraphName, setSubgraphStatus, creators_d_exports as subgraphModuleBaseOperationsActions, useSelectedSubgraphModuleDocument, useSubgraphModuleDocumentById, useSubgraphModuleDocumentsInSelectedDrive, useSubgraphModuleDocumentsInSelectedFolder, utils };
2
+ import { a as subgraphModuleDocumentType, i as actions, n as latestVersion, r as supportedVersions, t as subgraphModuleUpgradeManifest } from "../../index-D_rwE-2_.js";
3
+ export { Exact, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, Scalars, SetSubgraphNameAction, SetSubgraphNameInput, SetSubgraphNameInputSchema, SetSubgraphStatusAction, SetSubgraphStatusInput, SetSubgraphStatusInputSchema, StatusType, StatusTypeSchema, SubgraphModule, SubgraphModuleAction, SubgraphModuleBaseOperationsAction, SubgraphModuleBaseOperationsOperations, SubgraphModuleController, type SubgraphModuleDocument, SubgraphModuleDocumentHeaderSchema, SubgraphModuleDocumentSchema, type SubgraphModuleState as SubgraphModuleGlobalState, SubgraphModuleState, type SubgraphModuleLocalState, type SubgraphModulePHState, SubgraphModulePHStateSchema, SubgraphModuleStateSchema, actions, assertIsSubgraphModuleDocument, assertIsSubgraphModuleState, createState, createSubgraphModuleDocument, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isSubgraphModuleDocument, isSubgraphModuleState, latestVersion, reducer, setSubgraphName, setSubgraphStatus, creators_d_exports as subgraphModuleBaseOperationsActions, subgraphModuleDocumentType, subgraphModuleUpgradeManifest, supportedVersions, useSelectedSubgraphModuleDocument, useSubgraphModuleDocumentById, useSubgraphModuleDocumentsInSelectedDrive, useSubgraphModuleDocumentsInSelectedFolder, utils };
30
4
  export {};
31
- //# sourceMappingURL=index.d.ts.map
@@ -1,39 +1,4 @@
1
1
  import { $ as VetraPackagePHState, A as VetraPackageDocumentHeaderSchema, At as SetPackageNameAction, B as removePackageKeyword, C as isDefinedNonNullAny, Ct as RemovePackageKeywordAction, D as defaultGlobalState, Dt as SetPackageCategoryAction, E as createVetraPackageDocument, Et as SetPackageAuthorWebsiteAction, F as isVetraPackageDocument, G as setPackageDescription, H as setPackageAuthorName, I as isVetraPackageState, J as setPackageNpmUrl, K as setPackageGithubUrl, L as documentModel, M as VetraPackagePHStateSchema, Mt as VetraPackageBaseOperationsAction, N as assertIsVetraPackageDocument, O as defaultLocalState, Ot as SetPackageDescriptionAction, P as assertIsVetraPackageState, Q as VetraPackageLocalState, R as addPackageKeyword, S as definedNonNullAnySchema, St as AddPackageKeywordAction, T as createState, Tt as SetPackageAuthorNameAction, U as setPackageAuthorWebsite, V as setPackageAuthor, W as setPackageCategory, X as VetraPackageBaseOperationsOperations, Y as VetraPackageController, Z as VetraPackageDocument, _ as SetPackageDescriptionInputSchema, _t as SetPackageGithubUrlInput, a as useVetraPackageDocumentsInSelectedDrive, at as Keyword, b as SetPackageNpmUrlInputSchema, bt as VetraPackageState, c as initialLocalState, ct as MakeOptional, d as KeywordSchema, dt as Scalars, et as AddPackageKeywordInput, f as RemovePackageKeywordInputSchema, ft as SetPackageAuthorInput, g as SetPackageCategoryInputSchema, gt as SetPackageDescriptionInput, h as SetPackageAuthorWebsiteInputSchema, ht as SetPackageCategoryInput, i as useVetraPackageDocumentById, it as InputMaybe, j as VetraPackageDocumentSchema, jt as SetPackageNpmUrlAction, k as defaultPHState, kt as SetPackageGithubUrlAction, l as AddPackageKeywordInputSchema, lt as Maybe, m as SetPackageAuthorNameInputSchema, mt as SetPackageAuthorWebsiteInput, n as utils, nt as Exact, o as useVetraPackageDocumentsInSelectedFolder, ot as MakeEmpty, p as SetPackageAuthorInputSchema, pt as SetPackageAuthorNameInput, q as setPackageName, r as useSelectedVetraPackageDocument, rt as Incremental, s as initialGlobalState, st as MakeMaybe, t as VetraPackage, tt as Author, u as AuthorSchema, ut as RemovePackageKeywordInput, v as SetPackageGithubUrlInputSchema, vt as SetPackageNameInput, w as reducer, wt as SetPackageAuthorAction, x as VetraPackageStateSchema, xt as VetraPackageAction, y as SetPackageNameInputSchema, yt as SetPackageNpmUrlInput, z as creators_d_exports } from "../../module-D4lqkHHK.js";
2
- import { UpgradeManifest } from "document-model";
3
- //#region document-models/vetra-package/v1/actions.d.ts
4
- /** Actions for the VetraPackage document model */
5
- export declare const actions: {
6
- setName: typeof import("document-model").setName;
7
- setPreferredEditor: typeof import("document-model").setPreferredEditor;
8
- undo: typeof import("document-model").undo;
9
- redo: typeof import("document-model").redo;
10
- noop: typeof import("document-model").noop;
11
- setPackageName: (input: SetPackageNameInput) => SetPackageNameAction;
12
- setPackageDescription: (input: SetPackageDescriptionInput) => SetPackageDescriptionAction;
13
- setPackageCategory: (input: SetPackageCategoryInput) => SetPackageCategoryAction;
14
- setPackageAuthor: (input: SetPackageAuthorInput) => SetPackageAuthorAction;
15
- setPackageAuthorName: (input: SetPackageAuthorNameInput) => SetPackageAuthorNameAction;
16
- setPackageAuthorWebsite: (input: SetPackageAuthorWebsiteInput) => SetPackageAuthorWebsiteAction;
17
- addPackageKeyword: (input: AddPackageKeywordInput) => AddPackageKeywordAction;
18
- removePackageKeyword: (input: RemovePackageKeywordInput) => RemovePackageKeywordAction;
19
- setPackageGithubUrl: (input: SetPackageGithubUrlInput) => SetPackageGithubUrlAction;
20
- setPackageNpmUrl: (input: SetPackageNpmUrlInput) => SetPackageNpmUrlAction;
21
- };
22
- //#endregion
23
- //#region document-models/vetra-package/v1/gen/document-type.d.ts
24
- /**
25
- * WARNING: DO NOT EDIT
26
- * This file is auto-generated and updated by codegen
27
- */
28
- export declare const vetraPackageDocumentType = "powerhouse/package";
29
- //#endregion
30
- //#region document-models/vetra-package/upgrades/versions.d.ts
31
- export declare const supportedVersions: readonly [1];
32
- export declare const latestVersion: 1;
33
- //#endregion
34
- //#region document-models/vetra-package/upgrades/upgrade-manifest.d.ts
35
- export declare const vetraPackageUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
36
- //#endregion
37
- export { AddPackageKeywordAction, AddPackageKeywordInput, AddPackageKeywordInputSchema, Author, AuthorSchema, Exact, Incremental, InputMaybe, Keyword, KeywordSchema, MakeEmpty, MakeMaybe, MakeOptional, Maybe, RemovePackageKeywordAction, RemovePackageKeywordInput, RemovePackageKeywordInputSchema, Scalars, SetPackageAuthorAction, SetPackageAuthorInput, SetPackageAuthorInputSchema, SetPackageAuthorNameAction, SetPackageAuthorNameInput, SetPackageAuthorNameInputSchema, SetPackageAuthorWebsiteAction, SetPackageAuthorWebsiteInput, SetPackageAuthorWebsiteInputSchema, SetPackageCategoryAction, SetPackageCategoryInput, SetPackageCategoryInputSchema, SetPackageDescriptionAction, SetPackageDescriptionInput, SetPackageDescriptionInputSchema, SetPackageGithubUrlAction, SetPackageGithubUrlInput, SetPackageGithubUrlInputSchema, SetPackageNameAction, SetPackageNameInput, SetPackageNameInputSchema, SetPackageNpmUrlAction, SetPackageNpmUrlInput, SetPackageNpmUrlInputSchema, VetraPackage, VetraPackageAction, VetraPackageBaseOperationsAction, VetraPackageBaseOperationsOperations, VetraPackageController, type VetraPackageDocument, VetraPackageDocumentHeaderSchema, VetraPackageDocumentSchema, type VetraPackageState as VetraPackageGlobalState, VetraPackageState, type VetraPackageLocalState, type VetraPackagePHState, VetraPackagePHStateSchema, VetraPackageStateSchema, addPackageKeyword, assertIsVetraPackageDocument, assertIsVetraPackageState, createState, createVetraPackageDocument, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isVetraPackageDocument, isVetraPackageState, reducer, removePackageKeyword, setPackageAuthor, setPackageAuthorName, setPackageAuthorWebsite, setPackageCategory, setPackageDescription, setPackageGithubUrl, setPackageName, setPackageNpmUrl, useSelectedVetraPackageDocument, useVetraPackageDocumentById, useVetraPackageDocumentsInSelectedDrive, useVetraPackageDocumentsInSelectedFolder, utils, creators_d_exports as vetraPackageBaseOperationsActions };
2
+ import { a as actions, i as vetraPackageDocumentType, n as latestVersion, r as supportedVersions, t as vetraPackageUpgradeManifest } from "../../index-6UbC6P89.js";
3
+ export { AddPackageKeywordAction, AddPackageKeywordInput, AddPackageKeywordInputSchema, Author, AuthorSchema, Exact, Incremental, InputMaybe, Keyword, KeywordSchema, MakeEmpty, MakeMaybe, MakeOptional, Maybe, RemovePackageKeywordAction, RemovePackageKeywordInput, RemovePackageKeywordInputSchema, Scalars, SetPackageAuthorAction, SetPackageAuthorInput, SetPackageAuthorInputSchema, SetPackageAuthorNameAction, SetPackageAuthorNameInput, SetPackageAuthorNameInputSchema, SetPackageAuthorWebsiteAction, SetPackageAuthorWebsiteInput, SetPackageAuthorWebsiteInputSchema, SetPackageCategoryAction, SetPackageCategoryInput, SetPackageCategoryInputSchema, SetPackageDescriptionAction, SetPackageDescriptionInput, SetPackageDescriptionInputSchema, SetPackageGithubUrlAction, SetPackageGithubUrlInput, SetPackageGithubUrlInputSchema, SetPackageNameAction, SetPackageNameInput, SetPackageNameInputSchema, SetPackageNpmUrlAction, SetPackageNpmUrlInput, SetPackageNpmUrlInputSchema, VetraPackage, VetraPackageAction, VetraPackageBaseOperationsAction, VetraPackageBaseOperationsOperations, VetraPackageController, type VetraPackageDocument, VetraPackageDocumentHeaderSchema, VetraPackageDocumentSchema, type VetraPackageState as VetraPackageGlobalState, VetraPackageState, type VetraPackageLocalState, type VetraPackagePHState, VetraPackagePHStateSchema, VetraPackageStateSchema, actions, addPackageKeyword, assertIsVetraPackageDocument, assertIsVetraPackageState, createState, createVetraPackageDocument, defaultGlobalState, defaultLocalState, defaultPHState, definedNonNullAnySchema, documentModel, initialGlobalState, initialLocalState, isDefinedNonNullAny, isVetraPackageDocument, isVetraPackageState, latestVersion, reducer, removePackageKeyword, setPackageAuthor, setPackageAuthorName, setPackageAuthorWebsite, setPackageCategory, setPackageDescription, setPackageGithubUrl, setPackageName, setPackageNpmUrl, supportedVersions, useSelectedVetraPackageDocument, useVetraPackageDocumentById, useVetraPackageDocumentsInSelectedDrive, useVetraPackageDocumentsInSelectedFolder, utils, creators_d_exports as vetraPackageBaseOperationsActions, vetraPackageDocumentType, vetraPackageUpgradeManifest };
38
4
  export {};
39
- //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,6 @@
1
1
  import { g as setSubgraphStatus, h as setSubgraphName } from "./utils-Al_SGg2a.js";
2
2
  import { StatusPill } from "./editors/components/index.js";
3
3
  import { t as useDebounce } from "./hooks-BbxvC-C3.js";
4
- import { r as useSelectedSubgraphModuleDocument } from "./useVetraDocument-B0k3gNtw.js";
5
4
  import { useSetPHDocumentEditorConfig } from "@powerhousedao/reactor-browser";
6
5
  import { useCallback, useEffect, useState } from "react";
7
6
  import { twMerge } from "tailwind-merge";
@@ -65,9 +64,8 @@ const SubgraphEditorForm = ({ subgraphName: initialSubgraphName = "", status = "
65
64
  const editorConfig = { isExternalControlsEnabled: false };
66
65
  //#endregion
67
66
  //#region editors/subgraph-editor/editor.tsx
68
- function Editor() {
67
+ function Editor({ document, dispatch }) {
69
68
  useSetPHDocumentEditorConfig(editorConfig);
70
- const [document, dispatch] = useSelectedSubgraphModuleDocument();
71
69
  const onNameChange = useCallback((name) => {
72
70
  if (name === document.state.global.name) return;
73
71
  dispatch(setSubgraphName({ name }));
@@ -77,7 +75,7 @@ function Editor() {
77
75
  }, [dispatch]);
78
76
  return /* @__PURE__ */ jsxs("div", {
79
77
  className: "bg-background p-6",
80
- children: [/* @__PURE__ */ jsx(DocumentToolbar, {}), /* @__PURE__ */ jsx(SubgraphEditorForm, {
78
+ children: [/* @__PURE__ */ jsx(DocumentToolbar, { document }), /* @__PURE__ */ jsx(SubgraphEditorForm, {
81
79
  subgraphName: document.state.global.name ?? "",
82
80
  status: document.state.global.status,
83
81
  onNameChange,
@@ -88,4 +86,4 @@ function Editor() {
88
86
  //#endregion
89
87
  export { Editor as default };
90
88
 
91
- //# sourceMappingURL=editor-CiX3Tq3g.js.map
89
+ //# sourceMappingURL=editor-BDR7IYJG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"editor-CiX3Tq3g.js","names":[],"sources":["../editors/subgraph-editor/components/SubgraphEditorForm.tsx","../editors/subgraph-editor/config.ts","../editors/subgraph-editor/editor.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\nimport { StatusPill } from \"../../components/index.js\";\nimport { useDebounce } from \"../../hooks/index.js\";\n\nexport interface SubgraphEditorFormProps {\n subgraphName?: string;\n status?: string;\n onNameChange?: (name: string) => void;\n onConfirm?: () => void;\n}\n\nexport const SubgraphEditorForm: React.FC<SubgraphEditorFormProps> = ({\n subgraphName: initialSubgraphName = \"\",\n status = \"DRAFT\",\n onNameChange,\n onConfirm,\n}) => {\n const [subgraphName, setSubgraphName] = useState(initialSubgraphName);\n const [isConfirmed, setIsConfirmed] = useState(false);\n\n // Use the debounce hook for name changes\n useDebounce(subgraphName, onNameChange, 300);\n\n // Update local state when initialSubgraphName changes\n useEffect(() => {\n // eslint-disable-next-line react-hooks-extra/set-state-in-effect\n setSubgraphName(initialSubgraphName);\n }, [initialSubgraphName]);\n\n // Reset confirmation state if status changes back to DRAFT\n useEffect(() => {\n if (status === \"DRAFT\") {\n // eslint-disable-next-line react-hooks-extra/set-state-in-effect\n setIsConfirmed(false);\n }\n }, [status]);\n\n // Check if form should be read-only\n const isReadOnly = isConfirmed || status === \"CONFIRMED\";\n\n const handleConfirm = () => {\n if (subgraphName.trim()) {\n setIsConfirmed(true); // Immediate UI update\n onConfirm?.();\n }\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <h2 className=\"text-lg font-medium text-foreground\">\n Subgraph Configuration\n </h2>\n <StatusPill\n status={status === \"CONFIRMED\" ? \"confirmed\" : \"draft\"}\n label={status === \"CONFIRMED\" ? \"Confirmed\" : \"Draft\"}\n />\n </div>\n\n {/* Subgraph Name Field */}\n <div>\n <label\n htmlFor=\"subgraph-name\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Subgraph Name\n </label>\n <input\n id=\"subgraph-name\"\n type=\"text\"\n value={subgraphName}\n onChange={(e) => setSubgraphName(e.target.value)}\n disabled={isReadOnly}\n className={twMerge(\n \"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\",\n isReadOnly ? \"cursor-not-allowed bg-muted\" : \"\",\n )}\n placeholder=\"Enter subgraph name\"\n />\n </div>\n\n {/* Confirm Button - only show if not in read-only mode */}\n {!isReadOnly && (\n <div>\n <button\n onClick={handleConfirm}\n disabled={!subgraphName.trim()}\n className=\"rounded-md bg-primary px-4 py-2 text-primary-foreground hover:hover-effect focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none disabled:disabled-effect\"\n >\n Confirm\n </button>\n </div>\n )}\n </div>\n );\n};\n","import type { PHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\n\nexport const editorConfig: PHDocumentEditorConfig = {\n isExternalControlsEnabled: false,\n};\n","import { DocumentToolbar } from \"@powerhousedao/design-system/connect\";\nimport { useSetPHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\nimport {\n setSubgraphName,\n setSubgraphStatus,\n} from \"@powerhousedao/vetra/document-models/subgraph-module\";\nimport { useCallback } from \"react\";\nimport { useSelectedSubgraphModuleDocument } from \"../hooks/useVetraDocument.js\";\nimport { SubgraphEditorForm } from \"./components/SubgraphEditorForm.js\";\nimport { editorConfig } from \"./config.js\";\n\nexport default function Editor() {\n useSetPHDocumentEditorConfig(editorConfig);\n const [document, dispatch] = useSelectedSubgraphModuleDocument();\n\n const onNameChange = useCallback(\n (name: string) => {\n if (name === document.state.global.name) return;\n dispatch(setSubgraphName({ name }));\n },\n [document.state.global.name, dispatch],\n );\n\n const onConfirm = useCallback(() => {\n dispatch(setSubgraphStatus({ status: \"CONFIRMED\" }));\n }, [dispatch]);\n\n return (\n <div className=\"bg-background p-6\">\n <DocumentToolbar />\n <SubgraphEditorForm\n subgraphName={document.state.global.name ?? \"\"}\n status={document.state.global.status}\n onNameChange={onNameChange}\n onConfirm={onConfirm}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAYA,MAAa,sBAAyD,EACpE,cAAc,sBAAsB,IACpC,SAAS,SACT,cACA,gBACI;CACJ,MAAM,CAAC,cAAc,mBAAmB,SAAS,mBAAmB;CACpE,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CAGpD,YAAY,cAAc,cAAc,GAAG;CAG3C,gBAAgB;EAEd,gBAAgB,mBAAmB;CACrC,GAAG,CAAC,mBAAmB,CAAC;CAGxB,gBAAgB;EACd,IAAI,WAAW,SAEb,eAAe,KAAK;CAExB,GAAG,CAAC,MAAM,CAAC;CAGX,MAAM,aAAa,eAAe,WAAW;CAE7C,MAAM,sBAAsB;EAC1B,IAAI,aAAa,KAAK,GAAG;GACvB,eAAe,IAAI;GACnB,YAAY;EACd;CACF;CAEA,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,oBAAC,MAAD;KAAI,WAAU;KAAsC,UAAA;IAEhD,CAAA,GACJ,oBAAC,YAAD;KACE,QAAQ,WAAW,cAAc,cAAc;KAC/C,OAAO,WAAW,cAAc,cAAc;IAC/C,CAAA,CACE;;GAGL,qBAAC,OAAD,EAAA,UAAA,CACE,oBAAC,SAAD;IACE,SAAQ;IACR,WAAU;IACX,UAAA;GAEM,CAAA,GACP,oBAAC,SAAD;IACE,IAAG;IACH,MAAK;IACL,OAAO;IACP,WAAW,MAAM,gBAAgB,EAAE,OAAO,KAAK;IAC/C,UAAU;IACV,WAAW,QACT,wMACA,aAAa,gCAAgC,EAC/C;IACA,aAAY;GACb,CAAA,CACE,EAAA,CAAA;GAGJ,CAAC,cACA,oBAAC,OAAD,EAAA,UACE,oBAAC,UAAD;IACE,SAAS;IACT,UAAU,CAAC,aAAa,KAAK;IAC7B,WAAU;IACX,UAAA;GAEO,CAAA,EACL,CAAA;EAEJ;;AAET;;;AC9FA,MAAa,eAAuC,EAClD,2BAA2B,MAC7B;;;ACOA,SAAwB,SAAS;CAC/B,6BAA6B,YAAY;CACzC,MAAM,CAAC,UAAU,YAAY,kCAAkC;CAE/D,MAAM,eAAe,aAClB,SAAiB;EAChB,IAAI,SAAS,SAAS,MAAM,OAAO,MAAM;EACzC,SAAS,gBAAgB,EAAE,KAAK,CAAC,CAAC;CACpC,GACA,CAAC,SAAS,MAAM,OAAO,MAAM,QAAQ,CACvC;CAEA,MAAM,YAAY,kBAAkB;EAClC,SAAS,kBAAkB,EAAE,QAAQ,YAAY,CAAC,CAAC;CACrD,GAAG,CAAC,QAAQ,CAAC;CAEb,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,iBAAD,CAAkB,CAAA,GAClB,oBAAC,oBAAD;GACE,cAAc,SAAS,MAAM,OAAO,QAAQ;GAC5C,QAAQ,SAAS,MAAM,OAAO;GAChB;GACH;EACZ,CAAA,CACE;;AAET"}
1
+ {"version":3,"file":"editor-BDR7IYJG.js","names":[],"sources":["../editors/subgraph-editor/components/SubgraphEditorForm.tsx","../editors/subgraph-editor/config.ts","../editors/subgraph-editor/editor.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\nimport { StatusPill } from \"../../components/index.js\";\nimport { useDebounce } from \"../../hooks/index.js\";\n\nexport interface SubgraphEditorFormProps {\n subgraphName?: string;\n status?: string;\n onNameChange?: (name: string) => void;\n onConfirm?: () => void;\n}\n\nexport const SubgraphEditorForm: React.FC<SubgraphEditorFormProps> = ({\n subgraphName: initialSubgraphName = \"\",\n status = \"DRAFT\",\n onNameChange,\n onConfirm,\n}) => {\n const [subgraphName, setSubgraphName] = useState(initialSubgraphName);\n const [isConfirmed, setIsConfirmed] = useState(false);\n\n // Use the debounce hook for name changes\n useDebounce(subgraphName, onNameChange, 300);\n\n // Update local state when initialSubgraphName changes\n useEffect(() => {\n // eslint-disable-next-line react-hooks-extra/set-state-in-effect\n setSubgraphName(initialSubgraphName);\n }, [initialSubgraphName]);\n\n // Reset confirmation state if status changes back to DRAFT\n useEffect(() => {\n if (status === \"DRAFT\") {\n // eslint-disable-next-line react-hooks-extra/set-state-in-effect\n setIsConfirmed(false);\n }\n }, [status]);\n\n // Check if form should be read-only\n const isReadOnly = isConfirmed || status === \"CONFIRMED\";\n\n const handleConfirm = () => {\n if (subgraphName.trim()) {\n setIsConfirmed(true); // Immediate UI update\n onConfirm?.();\n }\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <h2 className=\"text-lg font-medium text-foreground\">\n Subgraph Configuration\n </h2>\n <StatusPill\n status={status === \"CONFIRMED\" ? \"confirmed\" : \"draft\"}\n label={status === \"CONFIRMED\" ? \"Confirmed\" : \"Draft\"}\n />\n </div>\n\n {/* Subgraph Name Field */}\n <div>\n <label\n htmlFor=\"subgraph-name\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Subgraph Name\n </label>\n <input\n id=\"subgraph-name\"\n type=\"text\"\n value={subgraphName}\n onChange={(e) => setSubgraphName(e.target.value)}\n disabled={isReadOnly}\n className={twMerge(\n \"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\",\n isReadOnly ? \"cursor-not-allowed bg-muted\" : \"\",\n )}\n placeholder=\"Enter subgraph name\"\n />\n </div>\n\n {/* Confirm Button - only show if not in read-only mode */}\n {!isReadOnly && (\n <div>\n <button\n onClick={handleConfirm}\n disabled={!subgraphName.trim()}\n className=\"rounded-md bg-primary px-4 py-2 text-primary-foreground hover:hover-effect focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none disabled:disabled-effect\"\n >\n Confirm\n </button>\n </div>\n )}\n </div>\n );\n};\n","import type { PHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\n\nexport const editorConfig: PHDocumentEditorConfig = {\n isExternalControlsEnabled: false,\n};\n","import { DocumentToolbar } from \"@powerhousedao/design-system/connect\";\nimport type { EditorProps } from \"@powerhousedao/shared/document-model\";\nimport type {\n SubgraphModuleAction,\n SubgraphModuleDocument,\n} from \"../../document-models/subgraph-module/index.js\";\nimport { useSetPHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\nimport {\n setSubgraphName,\n setSubgraphStatus,\n} from \"@powerhousedao/vetra/document-models/subgraph-module\";\nimport { useCallback } from \"react\";\nimport { SubgraphEditorForm } from \"./components/SubgraphEditorForm.js\";\nimport { editorConfig } from \"./config.js\";\n\nexport default function Editor({\n document,\n dispatch,\n}: EditorProps<SubgraphModuleDocument, SubgraphModuleAction>) {\n useSetPHDocumentEditorConfig(editorConfig);\n\n const onNameChange = useCallback(\n (name: string) => {\n if (name === document.state.global.name) return;\n dispatch(setSubgraphName({ name }));\n },\n [document.state.global.name, dispatch],\n );\n\n const onConfirm = useCallback(() => {\n dispatch(setSubgraphStatus({ status: \"CONFIRMED\" }));\n }, [dispatch]);\n\n return (\n <div className=\"bg-background p-6\">\n <DocumentToolbar document={document} />\n <SubgraphEditorForm\n subgraphName={document.state.global.name ?? \"\"}\n status={document.state.global.status}\n onNameChange={onNameChange}\n onConfirm={onConfirm}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAYA,MAAa,sBAAyD,EACpE,cAAc,sBAAsB,IACpC,SAAS,SACT,cACA,gBACI;CACJ,MAAM,CAAC,cAAc,mBAAmB,SAAS,mBAAmB;CACpE,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CAGpD,YAAY,cAAc,cAAc,GAAG;CAG3C,gBAAgB;EAEd,gBAAgB,mBAAmB;CACrC,GAAG,CAAC,mBAAmB,CAAC;CAGxB,gBAAgB;EACd,IAAI,WAAW,SAEb,eAAe,KAAK;CAExB,GAAG,CAAC,MAAM,CAAC;CAGX,MAAM,aAAa,eAAe,WAAW;CAE7C,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2B,SAAW,CAAA,GACtC,oBAAC,oBAAD;GACE,cAAc,SAAS,MAAM,OAAO,QAAQ;GAC5C,QAAQ,SAAS,MAAM,OAAO;GAChB;GACH;EACZ,CAAA,CACE;;AAET"}
@@ -1,6 +1,5 @@
1
1
  import { C as setPackageCategory, D as setPackageNpmUrl, E as setPackageName, S as setPackageAuthorWebsite, T as setPackageGithubUrl, _ as addPackageKeyword, w as setPackageDescription, x as setPackageAuthorName, y as removePackageKeyword } from "./module-FXJRy_1W.js";
2
2
  import { t as useDebounce } from "./hooks-BbxvC-C3.js";
3
- import { t as useSelectedDriveVetraPackage } from "./useVetraDocument-B0k3gNtw.js";
4
3
  import { useSetPHDocumentEditorConfig } from "@powerhousedao/reactor-browser";
5
4
  import { useCallback, useState } from "react";
6
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -234,9 +233,8 @@ const editorConfig = { isExternalControlsEnabled: false };
234
233
  //#endregion
235
234
  //#region editors/vetra-package/editor.tsx
236
235
  function Editor(props) {
237
- const { displayToolbar = true } = props;
236
+ const { document, dispatch, displayToolbar = true } = props;
238
237
  useSetPHDocumentEditorConfig(editorConfig);
239
- const [document, dispatch] = useSelectedDriveVetraPackage();
240
238
  const onNameChange = useCallback((name) => {
241
239
  if (!document.state.global.name && !name) return;
242
240
  if (name === document.state.global.name) return;
@@ -280,7 +278,7 @@ function Editor(props) {
280
278
  }, [dispatch]);
281
279
  return /* @__PURE__ */ jsxs("div", {
282
280
  className: "bg-background p-6",
283
- children: [displayToolbar && /* @__PURE__ */ jsx(DocumentToolbar, {}), /* @__PURE__ */ jsx(MetaForm, {
281
+ children: [displayToolbar && /* @__PURE__ */ jsx(DocumentToolbar, { document }), /* @__PURE__ */ jsx(MetaForm, {
284
282
  name: document.state.global.name ?? "",
285
283
  description: document.state.global.description ?? "",
286
284
  category: document.state.global.category ?? "",
@@ -304,4 +302,4 @@ function Editor(props) {
304
302
  //#endregion
305
303
  export { Editor as default };
306
304
 
307
- //# sourceMappingURL=editor-DpZVlVN1.js.map
305
+ //# sourceMappingURL=editor-CnfajXGg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"editor-DpZVlVN1.js","names":[],"sources":["../editors/vetra-package/components/MetaForm.tsx","../editors/vetra-package/config.ts","../editors/vetra-package/editor.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport type { Keyword } from \"../../../document-models/vetra-package/index.js\";\nimport { useDebounce } from \"../../hooks/index.js\";\n\nexport interface MetaFormProps {\n name: string;\n description: string;\n category: string;\n publisher: string;\n publisherUrl: string;\n githubRepository: string;\n npmPackage: string;\n keywords: Keyword[];\n onNameChange?: (name: string) => void;\n onDescriptionChange?: (description: string) => void;\n onCategoryChange?: (category: string) => void;\n onPublisherChange?: (publisher: string) => void;\n onPublisherUrlChange?: (publisherUrl: string) => void;\n onGithubRepositoryChange?: (githubRepository: string) => void;\n onNpmPackageChange?: (npmPackage: string) => void;\n onAddKeyword?: (keyword: { id: string; label: string }) => void;\n onRemoveKeyword?: (id: string) => void;\n}\n\nexport const MetaForm: React.FC<MetaFormProps> = (props) => {\n const {\n name: initialName,\n description: initialDescription,\n category: initialCategory,\n publisher: initialPublisher,\n publisherUrl: initialPublisherUrl,\n githubRepository: initialGithubRepository,\n npmPackage: initialNpmPackage,\n keywords: initialKeywords,\n onNameChange,\n onDescriptionChange,\n onCategoryChange,\n onPublisherChange,\n onPublisherUrlChange,\n onGithubRepositoryChange,\n onNpmPackageChange,\n onAddKeyword,\n onRemoveKeyword,\n } = props;\n\n const [name, setName] = useState(initialName);\n const [description, setDescription] = useState(initialDescription);\n const [category, setCategory] = useState(initialCategory);\n const [publisher, setPublisher] = useState(initialPublisher);\n const [publisherUrl, setPublisherUrl] = useState(initialPublisherUrl);\n const [githubRepository, setGithubRepository] = useState(\n initialGithubRepository,\n );\n const [npmPackage, setNpmPackage] = useState(initialNpmPackage);\n\n // Keywords state\n const [keywords, setKeywords] = useState<Keyword[]>(initialKeywords);\n const [keywordInput, setKeywordInput] = useState(\"\");\n\n // Use the debounce hook with callbacks\n useDebounce(name, onNameChange, 300);\n useDebounce(description, onDescriptionChange, 300);\n useDebounce(publisher, onPublisherChange, 300);\n useDebounce(publisherUrl, onPublisherUrlChange, 300);\n useDebounce(githubRepository, onGithubRepositoryChange, 300);\n useDebounce(npmPackage, onNpmPackageChange, 300);\n\n return (\n <div className=\"grid grid-cols-1 gap-6 p-6 lg:grid-cols-3\">\n {/* Left Column */}\n <div className=\"space-y-6\">\n {/* Name Field */}\n <div>\n <label\n htmlFor=\"package-name\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Name\n </label>\n <input\n id=\"package-name\"\n type=\"text\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n\n {/* Description Field */}\n <div>\n <label\n htmlFor=\"package-description\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Description\n </label>\n <textarea\n id=\"package-description\"\n rows={6}\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n className=\"w-full resize-none rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n </div>\n\n {/* Middle Column */}\n <div className=\"space-y-6\">\n {/* Category Field */}\n <div>\n <label\n htmlFor=\"package-category\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Category\n </label>\n <select\n id=\"package-category\"\n value={category}\n onChange={(e) => {\n const newValue = e.target.value;\n setCategory(newValue);\n onCategoryChange?.(newValue);\n }}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n >\n <option value=\"\">Not selected</option>\n <option value=\"Productivity\">Productivity</option>\n <option value=\"Governance\">Governance</option>\n <option value=\"Project Management\">Project Management</option>\n <option value=\"Finance\">Finance</option>\n <option value=\"Legal\">Legal</option>\n <option value=\"People & Culture\">People & Culture</option>\n <option value=\"Engineering\">Engineering</option>\n </select>\n </div>\n\n {/* Publisher Field */}\n <div>\n <label\n htmlFor=\"package-publisher\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Publisher\n </label>\n <input\n id=\"package-publisher\"\n type=\"text\"\n value={publisher}\n onChange={(e) => setPublisher(e.target.value)}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n\n {/* Publisher URL Field */}\n <div>\n <label\n htmlFor=\"package-publisher-url\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Publisher URL\n </label>\n <input\n id=\"package-publisher-url\"\n type=\"text\"\n value={publisherUrl}\n onChange={(e) => setPublisherUrl(e.target.value)}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n\n {/* Keywords Field */}\n <div>\n <label\n htmlFor=\"package-keywords\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Keywords\n </label>\n <div className=\"space-y-2\">\n <input\n id=\"package-keywords\"\n type=\"text\"\n value={keywordInput}\n onChange={(e) => setKeywordInput(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === \"Enter\" && keywordInput.trim()) {\n e.preventDefault();\n const newKeyword = {\n id: Date.now().toString(), // Generate a unique ID\n label: keywordInput.trim(),\n };\n setKeywords([...keywords, newKeyword]);\n onAddKeyword?.(newKeyword);\n setKeywordInput(\"\");\n }\n }}\n placeholder=\"Type a keyword and press Enter\"\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n <div className=\"flex min-h-[80px] flex-wrap gap-2 rounded-md border border-border p-3\">\n {keywords.map((keyword) => (\n <span\n key={keyword.id}\n className=\"inline-flex items-center rounded-sm border border-info bg-info/10 px-2 py-0.5 text-xs text-info\"\n >\n {keyword.label}\n <button\n onClick={() => {\n setKeywords(keywords.filter((k) => k.id !== keyword.id));\n onRemoveKeyword?.(keyword.id);\n }}\n className=\"ml-1 text-info hover:hover-effect focus:outline-none\"\n >\n ×\n </button>\n </span>\n ))}\n </div>\n </div>\n </div>\n </div>\n\n {/* Right Column */}\n <div className=\"space-y-6\">\n {/* Github Repository Field */}\n <div>\n <label\n htmlFor=\"package-github\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Github Repository\n </label>\n <input\n id=\"package-github\"\n type=\"text\"\n value={githubRepository}\n onChange={(e) => setGithubRepository(e.target.value)}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n\n {/* NPM-package Field */}\n <div>\n <label\n htmlFor=\"package-npm\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n NPM-package\n </label>\n <input\n id=\"package-npm\"\n type=\"text\"\n value={npmPackage}\n onChange={(e) => setNpmPackage(e.target.value)}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n\n {/* Version Field */}\n <div>\n <label\n htmlFor=\"package-version\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Version\n </label>\n <input\n id=\"package-version\"\n type=\"text\"\n placeholder=\"1.0.0-dev\"\n disabled\n className=\"w-full cursor-not-allowed rounded-md border border-border bg-background px-3 py-2 text-foreground placeholder:text-muted-foreground disabled:disabled-effect\"\n />\n </div>\n\n {/* License Field */}\n <div>\n <label\n htmlFor=\"package-license\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n License\n </label>\n <input\n id=\"package-license\"\n type=\"text\"\n placeholder=\"AGPL-3.0-only\"\n disabled\n className=\"w-full cursor-not-allowed rounded-md border border-border bg-background px-3 py-2 text-foreground placeholder:text-muted-foreground disabled:disabled-effect\"\n />\n </div>\n\n {/* Install with Field */}\n <div>\n <label\n htmlFor=\"package-install\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Install with:\n </label>\n <input\n id=\"package-install\"\n type=\"text\"\n placeholder=\"@powerhousedao/todo-demo-package\"\n disabled\n className=\"w-full cursor-not-allowed rounded-md border border-border bg-background px-3 py-2 text-foreground placeholder:text-muted-foreground disabled:disabled-effect\"\n />\n </div>\n </div>\n </div>\n );\n};\n","import type { PHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\n\nexport const editorConfig: PHDocumentEditorConfig = {\n isExternalControlsEnabled: false,\n};\n","import { DocumentToolbar } from \"@powerhousedao/design-system/connect\";\nimport { useSetPHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\nimport { useCallback } from \"react\";\nimport {\n addPackageKeyword,\n removePackageKeyword,\n setPackageAuthorName,\n setPackageAuthorWebsite,\n setPackageCategory,\n setPackageDescription,\n setPackageGithubUrl,\n setPackageName,\n setPackageNpmUrl,\n} from \"../../document-models/vetra-package/index.js\";\nimport { useSelectedDriveVetraPackage } from \"../hooks/useVetraDocument.js\";\nimport { MetaForm } from \"./components/MetaForm.js\";\nimport { editorConfig } from \"./config.js\";\n\nexport type EditorProps = {\n displayToolbar?: boolean;\n};\n\nexport default function Editor(props: EditorProps) {\n const { displayToolbar = true } = props;\n useSetPHDocumentEditorConfig(editorConfig);\n const [document, dispatch] = useSelectedDriveVetraPackage();\n\n const onNameChange = useCallback(\n (name: string) => {\n if (!document.state.global.name && !name) return;\n if (name === document.state.global.name) return;\n\n dispatch(setPackageName({ name }));\n },\n [document.state.global.name, dispatch],\n );\n\n const onDescriptionChange = useCallback(\n (description: string) => {\n if (!document.state.global.description && !description) return;\n if (description === document.state.global.description) return;\n\n dispatch(setPackageDescription({ description }));\n },\n [document.state.global.description, dispatch],\n );\n\n const onCategoryChange = useCallback(\n (category: string) => {\n if (!document.state.global.category && !category) return;\n if (category === document.state.global.category) return;\n\n dispatch(setPackageCategory({ category }));\n },\n [document.state.global.category, dispatch],\n );\n\n const onPublisherChange = useCallback(\n (name: string) => {\n if (!document.state.global.author.name && !name) return;\n if (name === document.state.global.author.name) return;\n\n dispatch(setPackageAuthorName({ name }));\n },\n [document.state.global.author.name, dispatch],\n );\n\n const onPublisherUrlChange = useCallback(\n (website: string) => {\n if (!document.state.global.author.website && !website) return;\n if (website === document.state.global.author.website) return;\n\n dispatch(setPackageAuthorWebsite({ website }));\n },\n [document.state.global.author.website, dispatch],\n );\n\n const onGithubRepositoryChange = useCallback(\n (url: string) => {\n if (!document.state.global.githubUrl && !url) return;\n if (url === document.state.global.githubUrl) return;\n\n dispatch(setPackageGithubUrl({ url }));\n },\n [document.state.global.githubUrl, dispatch],\n );\n\n const onNpmPackageChange = useCallback(\n (url: string) => {\n if (!document.state.global.npmUrl && !url) return;\n if (url === document.state.global.npmUrl) return;\n\n dispatch(setPackageNpmUrl({ url }));\n },\n [document.state.global.npmUrl, dispatch],\n );\n\n const onAddKeyword = useCallback(\n (keyword: { id: string; label: string }) => {\n dispatch(addPackageKeyword(keyword));\n },\n [dispatch],\n );\n\n const onRemoveKeyword = useCallback(\n (id: string) => {\n dispatch(removePackageKeyword({ id }));\n },\n [dispatch],\n );\n\n return (\n <div className=\"bg-background p-6\">\n {displayToolbar && <DocumentToolbar />}\n <MetaForm\n name={document.state.global.name ?? \"\"}\n description={document.state.global.description ?? \"\"}\n category={document.state.global.category ?? \"\"}\n publisher={document.state.global.author.name ?? \"\"}\n publisherUrl={document.state.global.author.website ?? \"\"}\n githubRepository={document.state.global.githubUrl ?? \"\"}\n npmPackage={document.state.global.npmUrl ?? \"\"}\n keywords={document.state.global.keywords}\n onNameChange={onNameChange}\n onDescriptionChange={onDescriptionChange}\n onCategoryChange={onCategoryChange}\n onPublisherChange={onPublisherChange}\n onPublisherUrlChange={onPublisherUrlChange}\n onGithubRepositoryChange={onGithubRepositoryChange}\n onNpmPackageChange={onNpmPackageChange}\n onAddKeyword={onAddKeyword}\n onRemoveKeyword={onRemoveKeyword}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAwBA,MAAa,YAAqC,UAAU;CAC1D,MAAM,EACJ,MAAM,aACN,aAAa,oBACb,UAAU,iBACV,WAAW,kBACX,cAAc,qBACd,kBAAkB,yBAClB,YAAY,mBACZ,UAAU,iBACV,cACA,qBACA,kBACA,mBACA,sBACA,0BACA,oBACA,cACA,oBACE;CAEJ,MAAM,CAAC,MAAM,WAAW,SAAS,WAAW;CAC5C,MAAM,CAAC,aAAa,kBAAkB,SAAS,kBAAkB;CACjE,MAAM,CAAC,UAAU,eAAe,SAAS,eAAe;CACxD,MAAM,CAAC,WAAW,gBAAgB,SAAS,gBAAgB;CAC3D,MAAM,CAAC,cAAc,mBAAmB,SAAS,mBAAmB;CACpE,MAAM,CAAC,kBAAkB,uBAAuB,SAC9C,uBACF;CACA,MAAM,CAAC,YAAY,iBAAiB,SAAS,iBAAiB;CAG9D,MAAM,CAAC,UAAU,eAAe,SAAoB,eAAe;CACnE,MAAM,CAAC,cAAc,mBAAmB,SAAS,EAAE;CAGnD,YAAY,MAAM,cAAc,GAAG;CACnC,YAAY,aAAa,qBAAqB,GAAG;CACjD,YAAY,WAAW,mBAAmB,GAAG;CAC7C,YAAY,cAAc,sBAAsB,GAAG;CACnD,YAAY,kBAAkB,0BAA0B,GAAG;CAC3D,YAAY,YAAY,oBAAoB,GAAG;CAE/C,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GAEE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CAEE,qBAAC,OAAD,EAAA,UAAA,CACE,oBAAC,SAAD;KACE,SAAQ;KACR,WAAU;KACX,UAAA;IAEM,CAAA,GACP,oBAAC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etra-package/components/MetaForm.tsx","../editors/vetra-package/config.ts","../editors/vetra-package/editor.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport type { Keyword } from \"../../../document-models/vetra-package/index.js\";\nimport { useDebounce } from \"../../hooks/index.js\";\n\nexport interface MetaFormProps {\n name: string;\n description: string;\n category: string;\n publisher: string;\n publisherUrl: string;\n githubRepository: string;\n npmPackage: string;\n keywords: Keyword[];\n onNameChange?: (name: string) => void;\n onDescriptionChange?: (description: string) => void;\n onCategoryChange?: (category: string) => void;\n onPublisherChange?: (publisher: string) => void;\n onPublisherUrlChange?: (publisherUrl: string) => void;\n onGithubRepositoryChange?: (githubRepository: string) => void;\n onNpmPackageChange?: (npmPackage: string) => void;\n onAddKeyword?: (keyword: { id: string; label: string }) => void;\n onRemoveKeyword?: (id: string) => void;\n}\n\nexport const MetaForm: React.FC<MetaFormProps> = (props) => {\n const {\n name: initialName,\n description: initialDescription,\n category: initialCategory,\n publisher: initialPublisher,\n publisherUrl: initialPublisherUrl,\n githubRepository: initialGithubRepository,\n npmPackage: initialNpmPackage,\n keywords: initialKeywords,\n onNameChange,\n onDescriptionChange,\n onCategoryChange,\n onPublisherChange,\n onPublisherUrlChange,\n onGithubRepositoryChange,\n onNpmPackageChange,\n onAddKeyword,\n onRemoveKeyword,\n } = props;\n\n const [name, setName] = useState(initialName);\n const [description, setDescription] = useState(initialDescription);\n const [category, setCategory] = useState(initialCategory);\n const [publisher, setPublisher] = useState(initialPublisher);\n const [publisherUrl, setPublisherUrl] = useState(initialPublisherUrl);\n const [githubRepository, setGithubRepository] = useState(\n initialGithubRepository,\n );\n const [npmPackage, setNpmPackage] = useState(initialNpmPackage);\n\n // Keywords state\n const [keywords, setKeywords] = useState<Keyword[]>(initialKeywords);\n const [keywordInput, setKeywordInput] = useState(\"\");\n\n // Use the debounce hook with callbacks\n useDebounce(name, onNameChange, 300);\n useDebounce(description, onDescriptionChange, 300);\n useDebounce(publisher, onPublisherChange, 300);\n useDebounce(publisherUrl, onPublisherUrlChange, 300);\n useDebounce(githubRepository, onGithubRepositoryChange, 300);\n useDebounce(npmPackage, onNpmPackageChange, 300);\n\n return (\n <div className=\"grid grid-cols-1 gap-6 p-6 lg:grid-cols-3\">\n {/* Left Column */}\n <div className=\"space-y-6\">\n {/* Name Field */}\n <div>\n <label\n htmlFor=\"package-name\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Name\n </label>\n <input\n id=\"package-name\"\n type=\"text\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n\n {/* Description Field */}\n <div>\n <label\n htmlFor=\"package-description\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Description\n </label>\n <textarea\n id=\"package-description\"\n rows={6}\n value={description}\n onChange={(e) => setDescription(e.target.value)}\n className=\"w-full resize-none rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n </div>\n\n {/* Middle Column */}\n <div className=\"space-y-6\">\n {/* Category Field */}\n <div>\n <label\n htmlFor=\"package-category\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Category\n </label>\n <select\n id=\"package-category\"\n value={category}\n onChange={(e) => {\n const newValue = e.target.value;\n setCategory(newValue);\n onCategoryChange?.(newValue);\n }}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n >\n <option value=\"\">Not selected</option>\n <option value=\"Productivity\">Productivity</option>\n <option value=\"Governance\">Governance</option>\n <option value=\"Project Management\">Project Management</option>\n <option value=\"Finance\">Finance</option>\n <option value=\"Legal\">Legal</option>\n <option value=\"People & Culture\">People & Culture</option>\n <option value=\"Engineering\">Engineering</option>\n </select>\n </div>\n\n {/* Publisher Field */}\n <div>\n <label\n htmlFor=\"package-publisher\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Publisher\n </label>\n <input\n id=\"package-publisher\"\n type=\"text\"\n value={publisher}\n onChange={(e) => setPublisher(e.target.value)}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n\n {/* Publisher URL Field */}\n <div>\n <label\n htmlFor=\"package-publisher-url\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Publisher URL\n </label>\n <input\n id=\"package-publisher-url\"\n type=\"text\"\n value={publisherUrl}\n onChange={(e) => setPublisherUrl(e.target.value)}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n\n {/* Keywords Field */}\n <div>\n <label\n htmlFor=\"package-keywords\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Keywords\n </label>\n <div className=\"space-y-2\">\n <input\n id=\"package-keywords\"\n type=\"text\"\n value={keywordInput}\n onChange={(e) => setKeywordInput(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === \"Enter\" && keywordInput.trim()) {\n e.preventDefault();\n const newKeyword = {\n id: Date.now().toString(), // Generate a unique ID\n label: keywordInput.trim(),\n };\n setKeywords([...keywords, newKeyword]);\n onAddKeyword?.(newKeyword);\n setKeywordInput(\"\");\n }\n }}\n placeholder=\"Type a keyword and press Enter\"\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n <div className=\"flex min-h-[80px] flex-wrap gap-2 rounded-md border border-border p-3\">\n {keywords.map((keyword) => (\n <span\n key={keyword.id}\n className=\"inline-flex items-center rounded-sm border border-info bg-info/10 px-2 py-0.5 text-xs text-info\"\n >\n {keyword.label}\n <button\n onClick={() => {\n setKeywords(keywords.filter((k) => k.id !== keyword.id));\n onRemoveKeyword?.(keyword.id);\n }}\n className=\"ml-1 text-info hover:hover-effect focus:outline-none\"\n >\n ×\n </button>\n </span>\n ))}\n </div>\n </div>\n </div>\n </div>\n\n {/* Right Column */}\n <div className=\"space-y-6\">\n {/* Github Repository Field */}\n <div>\n <label\n htmlFor=\"package-github\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Github Repository\n </label>\n <input\n id=\"package-github\"\n type=\"text\"\n value={githubRepository}\n onChange={(e) => setGithubRepository(e.target.value)}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n\n {/* NPM-package Field */}\n <div>\n <label\n htmlFor=\"package-npm\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n NPM-package\n </label>\n <input\n id=\"package-npm\"\n type=\"text\"\n value={npmPackage}\n onChange={(e) => setNpmPackage(e.target.value)}\n className=\"w-full rounded-md border border-border px-3 py-2 text-foreground placeholder:text-muted-foreground focus:border-transparent focus:ring-2 focus:ring-ring focus:outline-none disabled:disabled-effect\"\n />\n </div>\n\n {/* Version Field */}\n <div>\n <label\n htmlFor=\"package-version\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Version\n </label>\n <input\n id=\"package-version\"\n type=\"text\"\n placeholder=\"1.0.0-dev\"\n disabled\n className=\"w-full cursor-not-allowed rounded-md border border-border bg-background px-3 py-2 text-foreground placeholder:text-muted-foreground disabled:disabled-effect\"\n />\n </div>\n\n {/* License Field */}\n <div>\n <label\n htmlFor=\"package-license\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n License\n </label>\n <input\n id=\"package-license\"\n type=\"text\"\n placeholder=\"AGPL-3.0-only\"\n disabled\n className=\"w-full cursor-not-allowed rounded-md border border-border bg-background px-3 py-2 text-foreground placeholder:text-muted-foreground disabled:disabled-effect\"\n />\n </div>\n\n {/* Install with Field */}\n <div>\n <label\n htmlFor=\"package-install\"\n className=\"mb-2 block text-sm font-medium text-foreground\"\n >\n Install with:\n </label>\n <input\n id=\"package-install\"\n type=\"text\"\n placeholder=\"@powerhousedao/todo-demo-package\"\n disabled\n className=\"w-full cursor-not-allowed rounded-md border border-border bg-background px-3 py-2 text-foreground placeholder:text-muted-foreground disabled:disabled-effect\"\n />\n </div>\n </div>\n </div>\n );\n};\n","import type { PHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\n\nexport const editorConfig: PHDocumentEditorConfig = {\n isExternalControlsEnabled: false,\n};\n","import { DocumentToolbar } from \"@powerhousedao/design-system/connect\";\nimport { useSetPHDocumentEditorConfig } from \"@powerhousedao/reactor-browser\";\nimport type { EditorProps as PHEditorProps } from \"@powerhousedao/shared/document-model\";\nimport { useCallback } from \"react\";\nimport {\n addPackageKeyword,\n removePackageKeyword,\n setPackageAuthorName,\n setPackageAuthorWebsite,\n setPackageCategory,\n setPackageDescription,\n setPackageGithubUrl,\n setPackageName,\n setPackageNpmUrl,\n} from \"../../document-models/vetra-package/index.js\";\nimport type {\n VetraPackageAction,\n VetraPackageDocument,\n} from \"../../document-models/vetra-package/index.js\";\nimport { MetaForm } from \"./components/MetaForm.js\";\nimport { editorConfig } from \"./config.js\";\n\nexport type EditorProps = PHEditorProps<\n VetraPackageDocument,\n VetraPackageAction\n> & {\n displayToolbar?: boolean;\n};\n\nexport default function Editor(props: EditorProps) {\n const { document, dispatch, displayToolbar = true } = props;\n useSetPHDocumentEditorConfig(editorConfig);\n\n const onNameChange = useCallback(\n (name: string) => {\n if (!document.state.global.name && !name) return;\n if (name === document.state.global.name) return;\n\n dispatch(setPackageName({ name }));\n },\n [document.state.global.name, dispatch],\n );\n\n const onDescriptionChange = useCallback(\n (description: string) => {\n if (!document.state.global.description && !description) return;\n if (description === document.state.global.description) return;\n\n dispatch(setPackageDescription({ description }));\n },\n [document.state.global.description, dispatch],\n );\n\n const onCategoryChange = useCallback(\n (category: string) => {\n if (!document.state.global.category && !category) return;\n if (category === document.state.global.category) return;\n\n dispatch(setPackageCategory({ category }));\n },\n [document.state.global.category, dispatch],\n );\n\n const onPublisherChange = useCallback(\n (name: string) => {\n if (!document.state.global.author.name && !name) return;\n if (name === document.state.global.author.name) return;\n\n dispatch(setPackageAuthorName({ name }));\n },\n [document.state.global.author.name, dispatch],\n );\n\n const onPublisherUrlChange = useCallback(\n (website: string) => {\n if (!document.state.global.author.website && !website) return;\n if (website === document.state.global.author.website) return;\n\n dispatch(setPackageAuthorWebsite({ website }));\n },\n [document.state.global.author.website, dispatch],\n );\n\n const onGithubRepositoryChange = useCallback(\n (url: string) => {\n if (!document.state.global.githubUrl && !url) return;\n if (url === document.state.global.githubUrl) return;\n\n dispatch(setPackageGithubUrl({ url }));\n },\n [document.state.global.githubUrl, dispatch],\n );\n\n const onNpmPackageChange = useCallback(\n (url: string) => {\n if (!document.state.global.npmUrl && !url) return;\n if (url === document.state.global.npmUrl) return;\n\n dispatch(setPackageNpmUrl({ url }));\n },\n [document.state.global.npmUrl, dispatch],\n );\n\n const onAddKeyword = useCallback(\n (keyword: { id: string; label: string }) => {\n dispatch(addPackageKeyword(keyword));\n },\n [dispatch],\n );\n\n const onRemoveKeyword = useCallback(\n (id: string) => {\n dispatch(removePackageKeyword({ id }));\n },\n [dispatch],\n );\n\n return (\n <div className=\"bg-background p-6\">\n {displayToolbar && <DocumentToolbar document={document} />}\n <MetaForm\n name={document.state.global.name ?? \"\"}\n description={document.state.global.description ?? \"\"}\n category={document.state.global.category ?? \"\"}\n publisher={document.state.global.author.name ?? \"\"}\n publisherUrl={document.state.global.author.website ?? \"\"}\n githubRepository={document.state.global.githubUrl ?? \"\"}\n npmPackage={document.state.global.npmUrl ?? \"\"}\n keywords={document.state.global.keywords}\n onNameChange={onNameChange}\n onDescriptionChange={onDescriptionChange}\n onCategoryChange={onCategoryChange}\n onPublisherChange={onPublisherChange}\n onPublisherUrlChange={onPublisherUrlChange}\n onGithubRepositoryChange={onGithubRepositoryChange}\n onNpmPackageChange={onNpmPackageChange}\n onAddKeyword={onAddKeyword}\n onRemoveKeyword={onRemoveKeyword}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;AAwBA,MAAa,YAAqC,UAAU;CAC1D,MAAM,EACJ,MAAM,aACN,aAAa,oBACb,UAAU,iBACV,WAAW,kBACX,cAAc,qBACd,kBAAkB,yBAClB,YAAY,mBACZ,UAAU,iBACV,cACA,qBACA,kBACA,mBACA,sBACA,0BACA,oBACA,cACA,oBACE;CAEJ,MAAM,CAAC,MAAM,WAAW,SAAS,WAAW;CAC5C,MAAM,CAAC,aAAa,kBAAkB,SAAS,kBAAkB;CACjE,MAAM,CAAC,UAAU,eAAe,SAAS,eAAe;CACxD,MAAM,CAAC,WAAW,gBAAgB,SAAS,gBAAgB;CAC3D,MAAM,CAAC,cAAc,mBAAmB,SAAS,mBAAmB;CACpE,MAAM,CAAC,kBAAkB,uBAAuB,SAC9C,uBACF;CACA,MAAM,CAAC,YAAY,iBAAiB,SAAS,iBAAiB;CAG9D,MAAM,CAAC,UAAU,eAAe,SAAoB,eAAe;CACnE,MAAM,CAAC,cAAc,mBAAmB,SAAS,EAAE;CAGnD,YAAY,MAAM,cAAc,GAAG;CACnC,YAAY,aAAa,qBAAqB,GAAG;CACjD,YAAY,WAAW,mBAAmB,GAAG;CAC7C,YAAY,cAAc,sBAAsB,GAAG;CACnD,YAAY,kBAAkB,0BAA0B,GAAG;CAC3D,YAAY,YAAY,oBAAoB,GAAG;CAE/C,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GAEE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CAEE,qBAAC,OAAD,EAAA,UAAA,CACE,oBAAC,SAAD;KACE,SAAQ;KACR,WAAU;KACX,UAAA;IAEM,CAAA,GACP,oBAAC,SAAD;KACE,IAAG;KACH,MAAK;KACL,OA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9B,QAAgB;EACf,IAAI,CAAC,SAAS,MAAM,OAAO,aAAa,CAAC,KAAK;EAC9C,IAAI,QAAQ,SAAS,MAAM,OAAO,WAAW;EAE7C,SAAS,oBAAoB,EAAE,IAAI,CAAC,CAAC;CACvC,GACA,CAAC,SAAS,MAAM,OAAO,WAAW,QAAQ,CAC5C;CAEA,MAAM,qBAAqB,aACxB,QAAgB;EACf,IAAI,CAAC,SAAS,MAAM,OAAO,UAAU,CAAC,KAAK;EAC3C,IAAI,QAAQ,SAAS,MAAM,OAAO,QAAQ;EAE1C,SAAS,iBAAiB,EAAE,IAAI,CAAC,CAAC;CACpC,GACA,CAAC,SAAS,MAAM,OAAO,QAAQ,QAAQ,CACzC;CAEA,MAAM,eAAe,aAClB,YAA2C;EAC1C,SAAS,kBAAkB,OAAO,CAAC;CACrC,GACA,CAAC,QAAQ,CACX;CAEA,MAAM,kBAAkB,aACrB,OAAe;EACd,SAAS,qBAAqB,EAAE,GAAG,CAAC,CAAC;CACvC,GACA,CAAC,QAAQ,CACX;CAEA,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACG,kBAAkB,oBAAC,iBAAD,EAA2B,SAAW,CAAA,GACzD,oBAAC,UAAD;GACE,MAAM,SAAS,MAAM,OAAO,QAAQ;GACpC,aAAa,SAAS,MAAM,OAAO,eAAe;GAClD,UAAU,SAAS,MAAM,OAAO,YAAY;GAC5C,WAAW,SAAS,MAAM,OAAO,OAAO,QAAQ;GAChD,cAAc,SAAS,MAAM,OAAO,OAAO,WAAW;GACtD,kBAAkB,SAAS,MAAM,OAAO,aAAa;GACrD,YAAY,SAAS,MAAM,OAAO,UAAU;GAC5C,UAAU,SAAS,MAAM,OAAO;GAClB;GACO;GACH;GACC;GACG;GACI;GACN;GACN;GACG;EAClB,CAAA,CACE;;AAET"}
@@ -1,9 +1,8 @@
1
- import { addDocument, resolveUrlPathname, showCreateDocumentModal, showDeleteNodeModal, useDocumentModelModules, useEditorModuleById, usePHToast, useSelectedDrive, useSetPHAppConfig, useSetSelectedNode } from "@powerhousedao/reactor-browser";
1
+ import { EditorDocumentProvider, addDocument, resolveUrlPathname, showCreateDocumentModal, showDeleteNodeModal, useDocumentById, useDocumentModelModules, useEditorModuleFor, usePHToast, useSetPHAppConfig, useSetSelectedNode } from "@powerhousedao/reactor-browser";
2
2
  import { Suspense, useCallback, useEffect, useMemo, useRef, useState } from "react";
3
3
  import { twMerge } from "tailwind-merge";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- import { ConnectDropdownMenu, DefaultEditorLoader, fileNodeDropdownOptions } from "@powerhousedao/design-system/connect";
6
- import { Icon } from "@powerhousedao/design-system";
5
+ import { ConnectDropdownMenu, DefaultEditorLoader, Icon, fileNodeDropdownOptions } from "@powerhousedao/design-system/connect";
7
6
  //#region editors/vetra-drive-app/config.ts
8
7
  const editorConfig = {
9
8
  allowedDocumentTypes: [
@@ -1628,23 +1627,39 @@ const ModuleSpecificationsSection = (props) => {
1628
1627
  };
1629
1628
  //#endregion
1630
1629
  //#region editors/vetra-drive-app/components/EditorContainer.tsx
1631
- const EditorContainer = (props) => {
1632
- const { documentId } = props;
1633
- const editorModule = useEditorModuleById("vetra-package-editor");
1634
- const loadingContent = /* @__PURE__ */ jsx("div", {
1635
- className: "flex h-full flex-1 items-center justify-center",
1636
- children: /* @__PURE__ */ jsx(DefaultEditorLoader, {})
1630
+ const loadingContent = /* @__PURE__ */ jsx("div", {
1631
+ className: "flex h-full flex-1 items-center justify-center",
1632
+ children: /* @__PURE__ */ jsx(DefaultEditorLoader, {})
1633
+ });
1634
+ function HostedEditor({ documentId }) {
1635
+ const [document, dispatch] = useDocumentById(documentId);
1636
+ const editorModule = useEditorModuleFor(document);
1637
+ if (!document) return /* @__PURE__ */ jsxs("p", {
1638
+ role: "alert",
1639
+ className: "p-6 text-sm",
1640
+ children: [
1641
+ "The package document ",
1642
+ documentId,
1643
+ " was not found."
1644
+ ]
1637
1645
  });
1638
1646
  if (!editorModule) return loadingContent;
1639
1647
  const EditorComponent = editorModule.Component;
1640
- return /* @__PURE__ */ jsx(Suspense, {
1641
- fallback: loadingContent,
1648
+ return /* @__PURE__ */ jsx(EditorDocumentProvider, {
1649
+ document,
1650
+ dispatch,
1642
1651
  children: /* @__PURE__ */ jsx(EditorComponent, {
1643
1652
  documentId,
1653
+ document,
1654
+ dispatch,
1644
1655
  displayToolbar: false
1645
1656
  })
1646
1657
  });
1647
- };
1658
+ }
1659
+ const EditorContainer = (props) => /* @__PURE__ */ jsx(Suspense, {
1660
+ fallback: loadingContent,
1661
+ children: /* @__PURE__ */ jsx(HostedEditor, { documentId: props.documentId })
1662
+ });
1648
1663
  //#endregion
1649
1664
  //#region editors/vetra-drive-app/components/PackageInformationSection.tsx
1650
1665
  const PackageInformationSection = ({ className, packageDocumentId, onAddPackageDocument, onOpenPackageDocument }) => {
@@ -1712,9 +1727,8 @@ const DriveExplorer = ({ driveId, driveName, driveUrl, documentModels = [], edit
1712
1727
  //#endregion
1713
1728
  //#region editors/vetra-drive-app/editor.tsx
1714
1729
  function BaseEditor(props) {
1715
- const { children } = props;
1730
+ const { children, document } = props;
1716
1731
  const setSelectedNode = useSetSelectedNode();
1717
- const [document] = useSelectedDrive();
1718
1732
  const driveId = document.header.id;
1719
1733
  const driveName = document.state.global.name ?? "";
1720
1734
  const driveUrl = document.state.local.triggers.find((t) => t.type === "PullResponder")?.data?.url ?? document.state.local.listeners.find((l) => l.callInfo?.data)?.callInfo?.data ?? "";
@@ -1774,4 +1788,4 @@ function Editor(props) {
1774
1788
  //#endregion
1775
1789
  export { BaseEditor, Editor as default };
1776
1790
 
1777
- //# sourceMappingURL=editor-Intw9NHl.js.map
1791
+ //# sourceMappingURL=editor-Cnk0M044.js.map