@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.
- package/dist/document-models/app-module/index.d.ts +2 -33
- package/dist/document-models/document-editor/index.d.ts +2 -31
- package/dist/document-models/processor-module/index.d.ts +2 -34
- package/dist/document-models/subgraph-module/index.d.ts +2 -29
- package/dist/document-models/vetra-package/index.d.ts +2 -37
- package/dist/{editor-CiX3Tq3g.js → editor-BDR7IYJG.js} +3 -5
- package/dist/{editor-CiX3Tq3g.js.map → editor-BDR7IYJG.js.map} +1 -1
- package/dist/{editor-DpZVlVN1.js → editor-CnfajXGg.js} +3 -5
- package/dist/{editor-DpZVlVN1.js.map → editor-CnfajXGg.js.map} +1 -1
- package/dist/{editor-Intw9NHl.js → editor-Cnk0M044.js} +29 -15
- package/dist/{editor-Intw9NHl.js.map → editor-Cnk0M044.js.map} +1 -1
- package/dist/{editor-BXOEFIDj.js → editor-D5SIbFn_.js} +3 -3
- package/dist/{editor-BXOEFIDj.js.map → editor-D5SIbFn_.js.map} +1 -1
- package/dist/{editor-C5a0rBQj.js → editor-DbE7t0TU.js} +3 -5
- package/dist/{editor-C5a0rBQj.js.map → editor-DbE7t0TU.js.map} +1 -1
- package/dist/{editor-DFEeM_dy.js → editor-SJk7cr6k.js} +3 -5
- package/dist/{editor-DFEeM_dy.js.map → editor-SJk7cr6k.js.map} +1 -1
- package/dist/editors/index.d.ts +17 -6
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +1 -1
- package/dist/index-6UbC6P89.d.ts +39 -0
- package/dist/index-6UbC6P89.d.ts.map +1 -0
- package/dist/index-6bE9h_7M.d.ts +35 -0
- package/dist/index-6bE9h_7M.d.ts.map +1 -0
- package/dist/index-7hPKQROx.d.ts +33 -0
- package/dist/index-7hPKQROx.d.ts.map +1 -0
- package/dist/index-D_rwE-2_.d.ts +31 -0
- package/dist/index-D_rwE-2_.d.ts.map +1 -0
- package/dist/index-cdL5k2sw.d.ts +36 -0
- package/dist/index-cdL5k2sw.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{module-CQ4BzxUF.js → module-CZLWjrD_.js} +7 -7
- package/dist/module-CZLWjrD_.js.map +1 -0
- package/package.json +9 -9
- package/dist/document-models/app-module/index.d.ts.map +0 -1
- package/dist/document-models/document-editor/index.d.ts.map +0 -1
- package/dist/document-models/processor-module/index.d.ts.map +0 -1
- package/dist/document-models/subgraph-module/index.d.ts.map +0 -1
- package/dist/document-models/vetra-package/index.d.ts.map +0 -1
- package/dist/module-CQ4BzxUF.js.map +0 -1
- package/dist/useVetraDocument-B0k3gNtw.js +0 -30
- package/dist/useVetraDocument-B0k3gNtw.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { lazy } from "react";
|
|
|
2
2
|
//#region editors/app-editor/module.ts
|
|
3
3
|
/** Document editor module for the "powerhouse/app" document type */
|
|
4
4
|
const AppEditor = {
|
|
5
|
-
Component: lazy(() => import("./editor-
|
|
5
|
+
Component: lazy(() => import("./editor-D5SIbFn_.js")),
|
|
6
6
|
documentTypes: ["powerhouse/app"],
|
|
7
7
|
config: {
|
|
8
8
|
id: "app-editor",
|
|
@@ -13,7 +13,7 @@ const AppEditor = {
|
|
|
13
13
|
//#region editors/document-editor/module.ts
|
|
14
14
|
/** Document editor module for the "powerhouse/document-editor" document type */
|
|
15
15
|
const DocumentEditorEditor = {
|
|
16
|
-
Component: lazy(() => import("./editor-
|
|
16
|
+
Component: lazy(() => import("./editor-SJk7cr6k.js")),
|
|
17
17
|
documentTypes: ["powerhouse/document-editor"],
|
|
18
18
|
config: {
|
|
19
19
|
id: "document-editor-editor",
|
|
@@ -24,7 +24,7 @@ const DocumentEditorEditor = {
|
|
|
24
24
|
//#region editors/processor-editor/module.ts
|
|
25
25
|
/** Document editor module for the "powerhouse/processor" document type */
|
|
26
26
|
const ProcessorModuleEditor = {
|
|
27
|
-
Component: lazy(() => import("./editor-
|
|
27
|
+
Component: lazy(() => import("./editor-DbE7t0TU.js")),
|
|
28
28
|
documentTypes: ["powerhouse/processor"],
|
|
29
29
|
config: {
|
|
30
30
|
id: "processor-module-editor",
|
|
@@ -35,7 +35,7 @@ const ProcessorModuleEditor = {
|
|
|
35
35
|
//#region editors/subgraph-editor/module.ts
|
|
36
36
|
/** Document editor module for the "powerhouse/subgraph" document type */
|
|
37
37
|
const SubgraphModuleEditor = {
|
|
38
|
-
Component: lazy(() => import("./editor-
|
|
38
|
+
Component: lazy(() => import("./editor-BDR7IYJG.js")),
|
|
39
39
|
documentTypes: ["powerhouse/subgraph"],
|
|
40
40
|
config: {
|
|
41
41
|
id: "subgraph-module-editor",
|
|
@@ -45,7 +45,7 @@ const SubgraphModuleEditor = {
|
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region editors/vetra-drive-app/module.ts
|
|
47
47
|
const VetraDriveApp = {
|
|
48
|
-
Component: lazy(() => import("./editor-
|
|
48
|
+
Component: lazy(() => import("./editor-Cnk0M044.js")),
|
|
49
49
|
documentTypes: ["powerhouse/document-drive"],
|
|
50
50
|
config: {
|
|
51
51
|
id: "vetra-drive-app",
|
|
@@ -56,7 +56,7 @@ const VetraDriveApp = {
|
|
|
56
56
|
//#region editors/vetra-package/module.ts
|
|
57
57
|
/** Document editor module for the "powerhouse/package" document type */
|
|
58
58
|
const VetraPackageEditor = {
|
|
59
|
-
Component: lazy(() => import("./editor-
|
|
59
|
+
Component: lazy(() => import("./editor-CnfajXGg.js")),
|
|
60
60
|
documentTypes: ["powerhouse/package"],
|
|
61
61
|
config: {
|
|
62
62
|
id: "vetra-package-editor",
|
|
@@ -66,4 +66,4 @@ const VetraPackageEditor = {
|
|
|
66
66
|
//#endregion
|
|
67
67
|
export { DocumentEditorEditor as a, ProcessorModuleEditor as i, VetraDriveApp as n, AppEditor as o, SubgraphModuleEditor as r, VetraPackageEditor as t };
|
|
68
68
|
|
|
69
|
-
//# sourceMappingURL=module-
|
|
69
|
+
//# sourceMappingURL=module-CZLWjrD_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-CZLWjrD_.js","names":[],"sources":["../editors/app-editor/module.ts","../editors/document-editor/module.ts","../editors/processor-editor/module.ts","../editors/subgraph-editor/module.ts","../editors/vetra-drive-app/module.ts","../editors/vetra-package/module.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport type {\n AppModuleAction,\n AppModuleDocument,\n} from \"../../document-models/app-module/index.js\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/app\" document type */\nexport const AppEditor: EditorModule<AppModuleDocument, AppModuleAction> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/app\"],\n config: {\n id: \"app-editor\",\n name: \"AppEditor\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport type {\n DocumentEditorAction,\n DocumentEditorDocument,\n} from \"../../document-models/document-editor/index.js\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/document-editor\" document type */\nexport const DocumentEditorEditor: EditorModule<\n DocumentEditorDocument,\n DocumentEditorAction\n> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/document-editor\"],\n config: {\n id: \"document-editor-editor\",\n name: \"Document Editor Editor\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport type {\n ProcessorModuleAction,\n ProcessorModuleDocument,\n} from \"../../document-models/processor-module/index.js\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/processor\" document type */\nexport const ProcessorModuleEditor: EditorModule<\n ProcessorModuleDocument,\n ProcessorModuleAction\n> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/processor\"],\n config: {\n id: \"processor-module-editor\",\n name: \"Processor Module Editor\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport type {\n SubgraphModuleAction,\n SubgraphModuleDocument,\n} from \"../../document-models/subgraph-module/index.js\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/subgraph\" document type */\nexport const SubgraphModuleEditor: EditorModule<\n SubgraphModuleDocument,\n SubgraphModuleAction\n> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/subgraph\"],\n config: {\n id: \"subgraph-module-editor\",\n name: \"Subgraph Module Editor\",\n },\n};\n","import type {\n DocumentDriveAction,\n DocumentDriveDocument,\n} from \"@powerhousedao/shared/document-drive\";\nimport type { EditorModule } from \"@powerhousedao/shared/document-model\";\nimport { lazy } from \"react\";\n\nexport const VetraDriveApp: EditorModule<\n DocumentDriveDocument,\n DocumentDriveAction\n> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/document-drive\"],\n config: {\n id: \"vetra-drive-app\",\n name: \"Vetra Drive App\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport type {\n VetraPackageAction,\n VetraPackageDocument,\n} from \"../../document-models/vetra-package/index.js\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/package\" document type */\nexport const VetraPackageEditor: EditorModule<\n VetraPackageDocument,\n VetraPackageAction\n> = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/package\"],\n config: {\n id: \"vetra-package-editor\",\n name: \"Vetra Package Editor\",\n },\n};\n"],"mappings":";;;AAYA,MAAa,YAA8D;CACzE,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,gBAAgB;CAChC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACPA,MAAa,uBAGT;CACF,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,4BAA4B;CAC5C,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACVA,MAAa,wBAGT;CACF,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,sBAAsB;CACtC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACVA,MAAa,uBAGT;CACF,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,qBAAqB;CACrC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;ACfA,MAAa,gBAGT;CACF,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,2BAA2B;CAC3C,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACLA,MAAa,qBAGT;CACF,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,oBAAoB;CACpC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/vetra",
|
|
3
|
-
"version": "6.2.3-dev.
|
|
3
|
+
"version": "6.2.3-dev.70",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -61,21 +61,21 @@
|
|
|
61
61
|
"./package.json": "./package.json"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@powerhousedao/codegen": "6.2.3-dev.
|
|
65
|
-
"@powerhousedao/config": "6.2.3-dev.
|
|
66
|
-
"@powerhousedao/design-system": "6.2.3-dev.
|
|
67
|
-
"@powerhousedao/reactor-api": "6.2.3-dev.
|
|
68
|
-
"@powerhousedao/reactor-browser": "6.2.3-dev.
|
|
69
|
-
"@powerhousedao/shared": "6.2.3-dev.
|
|
64
|
+
"@powerhousedao/codegen": "6.2.3-dev.70",
|
|
65
|
+
"@powerhousedao/config": "6.2.3-dev.70",
|
|
66
|
+
"@powerhousedao/design-system": "6.2.3-dev.70",
|
|
67
|
+
"@powerhousedao/reactor-api": "6.2.3-dev.70",
|
|
68
|
+
"@powerhousedao/reactor-browser": "6.2.3-dev.70",
|
|
69
|
+
"@powerhousedao/shared": "6.2.3-dev.70",
|
|
70
70
|
"change-case": "5.4.4",
|
|
71
|
-
"document-model": "6.2.3-dev.
|
|
71
|
+
"document-model": "6.2.3-dev.70",
|
|
72
72
|
"graphql": "^16",
|
|
73
73
|
"react": "19.2.6",
|
|
74
74
|
"zod": "^4.5.4",
|
|
75
75
|
"tailwind-merge": "3.4.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@powerhousedao/builder-tools": "6.2.3-dev.
|
|
78
|
+
"@powerhousedao/builder-tools": "6.2.3-dev.70",
|
|
79
79
|
"@tailwindcss/cli": "4.2.2",
|
|
80
80
|
"@testing-library/jest-dom": "^6.9.1",
|
|
81
81
|
"@testing-library/react": "^16.3.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../document-models/app-module/v1/gen/document-type.ts","../../../document-models/app-module/v1/actions.ts","../../../document-models/app-module/upgrades/versions.ts","../../../document-models/app-module/upgrades/upgrade-manifest.ts"],"mappings":";;;;;;;qBAIa;;;;qBCQA;;;;;;sBAAA;;;;;;;;;qBCZA;qBAEA;;;qBCKA,0BAA0B,uBAC9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../document-models/document-editor/v1/gen/document-type.ts","../../../document-models/document-editor/v1/actions.ts","../../../document-models/document-editor/upgrades/versions.ts","../../../document-models/document-editor/upgrades/upgrade-manifest.ts"],"mappings":";;;;;;;qBAIa;;;;qBCKA;;;;;;yBAAA;;;;;;;qBCTA;qBAEA;;;qBCKA,+BAA+B,uBACnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../document-models/processor-module/v1/gen/document-type.ts","../../../document-models/processor-module/v1/actions.ts","../../../document-models/processor-module/upgrades/versions.ts","../../../document-models/processor-module/upgrades/upgrade-manifest.ts"],"mappings":";;;;;;;qBAIa;;;;qBCKA;;;;;;4BAAA;;;;;;;;;;qBCTA;qBAEA;;;qBCKA,gCAAgC,uBACpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../document-models/subgraph-module/v1/gen/document-type.ts","../../../document-models/subgraph-module/v1/actions.ts","../../../document-models/subgraph-module/upgrades/versions.ts","../../../document-models/subgraph-module/upgrades/upgrade-manifest.ts"],"mappings":";;;;;;;qBAIa;;;;qBCKA;;;;;;2BAAA;;;;;qBCTA;qBAEA;;;qBCKA,+BAA+B,uBACnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../document-models/vetra-package/v1/actions.ts","../../../document-models/vetra-package/v1/gen/document-type.ts","../../../document-models/vetra-package/upgrades/versions.ts","../../../document-models/vetra-package/upgrades/upgrade-manifest.ts"],"mappings":";;;;qBASa;;;;;;0BAAA;;;;;;;;;;;;;;;;;qBCLA;;;qBCJA;qBAEA;;;qBCKA,6BAA6B,uBACjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-CQ4BzxUF.js","names":[],"sources":["../editors/app-editor/module.ts","../editors/document-editor/module.ts","../editors/processor-editor/module.ts","../editors/subgraph-editor/module.ts","../editors/vetra-drive-app/module.ts","../editors/vetra-package/module.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/app\" document type */\nexport const AppEditor: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/app\"],\n config: {\n id: \"app-editor\",\n name: \"AppEditor\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/document-editor\" document type */\nexport const DocumentEditorEditor: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/document-editor\"],\n config: {\n id: \"document-editor-editor\",\n name: \"Document Editor Editor\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/processor\" document type */\nexport const ProcessorModuleEditor: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/processor\"],\n config: {\n id: \"processor-module-editor\",\n name: \"Processor Module Editor\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/subgraph\" document type */\nexport const SubgraphModuleEditor: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/subgraph\"],\n config: {\n id: \"subgraph-module-editor\",\n name: \"Subgraph Module Editor\",\n },\n};\n","import type { EditorModule } from \"@powerhousedao/shared/document-model\";\nimport { lazy } from \"react\";\n\nexport const VetraDriveApp: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/document-drive\"],\n config: {\n id: \"vetra-drive-app\",\n name: \"Vetra Drive App\",\n },\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/package\" document type */\nexport const VetraPackageEditor: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/package\"],\n config: {\n id: \"vetra-package-editor\",\n name: \"Vetra Package Editor\",\n },\n};\n"],"mappings":";;;AAQA,MAAa,YAA0B;CACrC,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,gBAAgB;CAChC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACPA,MAAa,uBAAqC;CAChD,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,4BAA4B;CAC5C,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACPA,MAAa,wBAAsC;CACjD,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,sBAAsB;CACtC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACPA,MAAa,uBAAqC;CAChD,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,qBAAqB;CACrC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;ACZA,MAAa,gBAA8B;CACzC,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,2BAA2B;CAC3C,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF;;;;ACFA,MAAa,qBAAmC;CAC9C,WAAW,WAAW,OAAO,uBAAc;CAC3C,eAAe,CAAC,oBAAoB;CACpC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { useDocumentOfType, useSelectedDocumentId, useSelectedDrive } from "@powerhousedao/reactor-browser";
|
|
2
|
-
import { isFileNode } from "@powerhousedao/shared/document-drive";
|
|
3
|
-
//#region editors/hooks/useVetraDocument.ts
|
|
4
|
-
const VETRA_PACKAGE_DOCUMENT_TYPE = "powerhouse/package";
|
|
5
|
-
const SUBGRAPH_MODULE_DOCUMENT_TYPE = "powerhouse/subgraph";
|
|
6
|
-
const PROCESSOR_MODULE_DOCUMENT_TYPE = "powerhouse/processor";
|
|
7
|
-
function useProcessorModuleDocument(documentId) {
|
|
8
|
-
return useDocumentOfType(documentId, PROCESSOR_MODULE_DOCUMENT_TYPE);
|
|
9
|
-
}
|
|
10
|
-
function useSelectedProcessorModuleDocument() {
|
|
11
|
-
return useProcessorModuleDocument(useSelectedDocumentId());
|
|
12
|
-
}
|
|
13
|
-
function useSubgraphModuleDocument(documentId) {
|
|
14
|
-
return useDocumentOfType(documentId, SUBGRAPH_MODULE_DOCUMENT_TYPE);
|
|
15
|
-
}
|
|
16
|
-
function useSelectedSubgraphModuleDocument() {
|
|
17
|
-
return useSubgraphModuleDocument(useSelectedDocumentId());
|
|
18
|
-
}
|
|
19
|
-
function useVetraPackageDocument(documentId) {
|
|
20
|
-
return useDocumentOfType(documentId, VETRA_PACKAGE_DOCUMENT_TYPE);
|
|
21
|
-
}
|
|
22
|
-
function useSelectedDriveVetraPackage() {
|
|
23
|
-
const [selectedDrive] = useSelectedDrive();
|
|
24
|
-
const documentId = selectedDrive.state.global.nodes.find((node) => isFileNode(node) && node.documentType === VETRA_PACKAGE_DOCUMENT_TYPE)?.id;
|
|
25
|
-
return useVetraPackageDocument(documentId);
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { useSelectedProcessorModuleDocument as n, useSelectedSubgraphModuleDocument as r, useSelectedDriveVetraPackage as t };
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=useVetraDocument-B0k3gNtw.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useVetraDocument-B0k3gNtw.js","names":[],"sources":["../editors/hooks/useVetraDocument.ts"],"sourcesContent":["import {\n useDocumentOfType,\n useSelectedDocumentId,\n useSelectedDocumentOfType,\n useSelectedDrive,\n} from \"@powerhousedao/reactor-browser\";\nimport { isFileNode } from \"@powerhousedao/shared/document-drive\";\nimport type {\n AppModuleAction,\n AppModuleDocument,\n} from \"../../document-models/app-module/index.js\";\nimport {\n type DocumentEditorAction,\n type DocumentEditorDocument,\n} from \"../../document-models/document-editor/index.js\";\nimport type {\n ProcessorModuleAction,\n ProcessorModuleDocument,\n} from \"../../document-models/processor-module/index.js\";\nimport type {\n SubgraphModuleAction,\n SubgraphModuleDocument,\n} from \"../../document-models/subgraph-module/index.js\";\nimport type {\n VetraPackageAction,\n VetraPackageDocument,\n} from \"../../document-models/vetra-package/index.js\";\n\nconst VETRA_PACKAGE_DOCUMENT_TYPE = \"powerhouse/package\";\nconst DOCUMENT_EDITOR_DOCUMENT_TYPE = \"powerhouse/document-editor\";\nconst SUBGRAPH_MODULE_DOCUMENT_TYPE = \"powerhouse/subgraph\";\nconst PROCESSOR_MODULE_DOCUMENT_TYPE = \"powerhouse/processor\";\n\nexport function useAppModuleDocument(documentId: string | undefined | null) {\n return useDocumentOfType<AppModuleDocument, AppModuleAction>(\n documentId,\n \"powerhouse/app\",\n );\n}\n\nexport function useSelectedAppModuleDocument() {\n const documentId = useSelectedDocumentId();\n return useAppModuleDocument(documentId);\n}\n\nexport function useDocumentEditorDocument(\n documentId: string | undefined | null,\n) {\n return useDocumentOfType<DocumentEditorDocument, DocumentEditorAction>(\n documentId,\n DOCUMENT_EDITOR_DOCUMENT_TYPE,\n );\n}\n\nexport function useSelectedDocumentEditorDocument() {\n const documentId = useSelectedDocumentId();\n return useDocumentEditorDocument(documentId);\n}\n\nexport function useProcessorModuleDocument(\n documentId: string | undefined | null,\n) {\n return useDocumentOfType<ProcessorModuleDocument, ProcessorModuleAction>(\n documentId,\n PROCESSOR_MODULE_DOCUMENT_TYPE,\n );\n}\n\nexport function useSelectedProcessorModuleDocument() {\n const documentId = useSelectedDocumentId();\n return useProcessorModuleDocument(documentId);\n}\n\nexport function useSubgraphModuleDocument(\n documentId: string | undefined | null,\n) {\n return useDocumentOfType<SubgraphModuleDocument, SubgraphModuleAction>(\n documentId,\n SUBGRAPH_MODULE_DOCUMENT_TYPE,\n );\n}\n\nexport function useSelectedSubgraphModuleDocument() {\n const documentId = useSelectedDocumentId();\n return useSubgraphModuleDocument(documentId);\n}\n\nexport function useVetraPackageDocument(documentId: string | undefined | null) {\n return useDocumentOfType<VetraPackageDocument, VetraPackageAction>(\n documentId,\n VETRA_PACKAGE_DOCUMENT_TYPE,\n );\n}\n\nexport function useSelectedVetraPackageDocument() {\n return useSelectedDocumentOfType<VetraPackageDocument, VetraPackageAction>(\n VETRA_PACKAGE_DOCUMENT_TYPE,\n );\n}\n\nexport function useSelectedDriveVetraPackage() {\n const [selectedDrive] = useSelectedDrive();\n const documentId = selectedDrive.state.global.nodes.find(\n (node) =>\n isFileNode(node) && node.documentType === VETRA_PACKAGE_DOCUMENT_TYPE,\n )?.id;\n\n return useVetraPackageDocument(documentId);\n}\n"],"mappings":";;;AA4BA,MAAM,8BAA8B;AAEpC,MAAM,gCAAgC;AACtC,MAAM,iCAAiC;AA4BvC,SAAgB,2BACd,YACA;CACA,OAAO,kBACL,YACA,8BACF;AACF;AAEA,SAAgB,qCAAqC;CAEnD,OAAO,2BADY,sBACwB,CAAC;AAC9C;AAEA,SAAgB,0BACd,YACA;CACA,OAAO,kBACL,YACA,6BACF;AACF;AAEA,SAAgB,oCAAoC;CAElD,OAAO,0BADY,sBACuB,CAAC;AAC7C;AAEA,SAAgB,wBAAwB,YAAuC;CAC7E,OAAO,kBACL,YACA,2BACF;AACF;AAQA,SAAgB,+BAA+B;CAC7C,MAAM,CAAC,iBAAiB,iBAAiB;CACzC,MAAM,aAAa,cAAc,MAAM,OAAO,MAAM,MACjD,SACC,WAAW,IAAI,KAAK,KAAK,iBAAiB,2BAC9C,CAAC,EAAE;CAEH,OAAO,wBAAwB,UAAU;AAC3C"}
|