@powerhousedao/vetra 6.0.0-dev.249 → 6.0.0-dev.250
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/app-module-Bbj7PI-S.js +94 -0
- package/dist/app-module-Bbj7PI-S.js.map +1 -0
- package/dist/connect-CTIucT0o.js +6 -0
- package/dist/connect-CTIucT0o.js.map +1 -0
- package/dist/document-editor-DS-bZMKx.js +93 -0
- package/dist/document-editor-DS-bZMKx.js.map +1 -0
- package/dist/document-models/app-module/index.d.ts +349 -2
- package/dist/document-models/app-module/index.d.ts.map +1 -0
- package/dist/document-models/app-module/index.js +3 -2
- package/dist/document-models/document-editor/index.d.ts +325 -2
- package/dist/document-models/document-editor/index.d.ts.map +1 -0
- package/dist/document-models/document-editor/index.js +3 -2
- package/dist/document-models/index.d.ts +6 -29
- package/dist/document-models/index.js +6 -2
- package/dist/document-models/processor-module/index.d.ts +357 -2
- package/dist/document-models/processor-module/index.d.ts.map +1 -0
- package/dist/document-models/processor-module/index.js +3 -2
- package/dist/document-models/subgraph-module/index.d.ts +296 -2
- package/dist/document-models/subgraph-module/index.d.ts.map +1 -0
- package/dist/document-models/subgraph-module/index.js +3 -2
- package/dist/document-models/vetra-package/index.d.ts +386 -2
- package/dist/document-models/vetra-package/index.d.ts.map +1 -0
- package/dist/document-models/vetra-package/index.js +3 -2
- package/dist/{editor-DqkJ0B4G.js → editor-BSQfwcdz.js} +5 -4
- package/dist/{editor-DqkJ0B4G.js.map → editor-BSQfwcdz.js.map} +1 -1
- package/dist/{editor-CGNcK2z0.js → editor-Bku8e2dr.js} +5 -5
- package/dist/{editor-CGNcK2z0.js.map → editor-Bku8e2dr.js.map} +1 -1
- package/dist/{editor-ddcGG42r.js → editor-CbtrPBTP.js} +5 -4
- package/dist/{editor-ddcGG42r.js.map → editor-CbtrPBTP.js.map} +1 -1
- package/dist/{editor-D4FHn5u4.js → editor-D70FYIwV.js} +2 -2
- package/dist/{editor-D4FHn5u4.js.map → editor-D70FYIwV.js.map} +1 -1
- package/dist/{editor-CdzYJozI.js → editor-Dtg8STyT.js} +5 -5
- package/dist/{editor-CdzYJozI.js.map → editor-Dtg8STyT.js.map} +1 -1
- package/dist/{editor-CgkzQJ4g.js → editor-SfVorwsP.js} +6 -6
- package/dist/{editor-CgkzQJ4g.js.map → editor-SfVorwsP.js.map} +1 -1
- package/dist/editors/hooks/index.js +1 -1
- package/dist/editors/index.d.ts +13 -12
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +2 -2
- package/dist/{codegen-PnsnCMkw.js → factory-CweZppg6.js} +51 -3
- package/dist/factory-CweZppg6.js.map +1 -0
- package/dist/factory-D8ZDOMP3.js +79 -0
- package/dist/factory-D8ZDOMP3.js.map +1 -0
- package/dist/{hooks-Vx4YtE1e.js → hooks-Xexr33XS.js} +1 -1
- package/dist/{hooks-Vx4YtE1e.js.map → hooks-Xexr33XS.js.map} +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/{processor-module-CkuQiq7B.js → module-BWlCj_0C.js} +159 -204
- package/dist/module-BWlCj_0C.js.map +1 -0
- package/dist/{subgraph-module-CU_-umq2.js → module-BoGgbKmO.js} +111 -153
- package/dist/module-BoGgbKmO.js.map +1 -0
- package/dist/module-BoX1rWiq.d.ts +6 -0
- package/dist/module-BoX1rWiq.d.ts.map +1 -0
- package/dist/module-CG6K37P8.d.ts +6 -0
- package/dist/module-CG6K37P8.d.ts.map +1 -0
- package/dist/{app-module-BbhoykB5.js → module-CTPfENDU.js} +149 -189
- package/dist/module-CTPfENDU.js.map +1 -0
- package/dist/{module-BW12i5H3.js → module-CXIFrq-R.js} +15 -11
- package/dist/module-CXIFrq-R.js.map +1 -0
- package/dist/{vetra-package-VqptqKzx.js → module-CZLiUtDI.js} +186 -236
- package/dist/module-CZLiUtDI.js.map +1 -0
- package/dist/module-Cr-9knz_.d.ts +6 -0
- package/dist/module-Cr-9knz_.d.ts.map +1 -0
- package/dist/{document-editor-CHM7Pu4m.js → module-D0SK3Nds.js} +137 -180
- package/dist/module-D0SK3Nds.js.map +1 -0
- package/dist/module-DhhQLYnQ.d.ts +6 -0
- package/dist/module-DhhQLYnQ.d.ts.map +1 -0
- package/dist/module-J-kGIl1E.d.ts +6 -0
- package/dist/module-J-kGIl1E.d.ts.map +1 -0
- package/dist/powerhouse.manifest.d.ts +8 -5
- package/dist/powerhouse.manifest.d.ts.map +1 -1
- package/dist/powerhouse.manifest.js +19 -12
- package/dist/processor-module-D0lRrrpW.js +95 -0
- package/dist/processor-module-D0lRrrpW.js.map +1 -0
- package/dist/processors/codegen/index.d.ts +21322 -2
- package/dist/processors/codegen/index.d.ts.map +1 -0
- package/dist/processors/codegen/index.js +2 -2
- package/dist/processors/index.d.ts +4 -15
- package/dist/processors/index.d.ts.map +1 -1
- package/dist/processors/index.js +8 -81
- package/dist/processors/index.js.map +1 -1
- package/dist/processors/vetra-read-model/index.d.ts +18599 -2
- package/dist/processors/vetra-read-model/index.d.ts.map +1 -0
- package/dist/processors/vetra-read-model/index.js +2 -54
- package/dist/subgraph-module-B3ipwOza.js +92 -0
- package/dist/subgraph-module-B3ipwOza.js.map +1 -0
- package/dist/switchboard-JOTFVXuj.js +8 -0
- package/dist/switchboard-JOTFVXuj.js.map +1 -0
- package/dist/{useVetraDocument-DF0teXXM.js → useVetraDocument-DoAwvHVi.js} +1 -1
- package/dist/{useVetraDocument-DF0teXXM.js.map → useVetraDocument-DoAwvHVi.js.map} +1 -1
- package/dist/vetra-package-YNLxEA-U.js +100 -0
- package/dist/vetra-package-YNLxEA-U.js.map +1 -0
- package/package.json +9 -8
- package/dist/app-module-BbhoykB5.js.map +0 -1
- package/dist/codegen-PnsnCMkw.js.map +0 -1
- package/dist/document-editor-CHM7Pu4m.js.map +0 -1
- package/dist/document-models/index.d.ts.map +0 -1
- package/dist/editor-Bsu4yikl.js +0 -2
- package/dist/index-CHfOF-Et.d.ts +0 -363
- package/dist/index-CHfOF-Et.d.ts.map +0 -1
- package/dist/index-CL_CHW_Z.d.ts +0 -330
- package/dist/index-CL_CHW_Z.d.ts.map +0 -1
- package/dist/index-C_kUPMNf.d.ts +0 -298
- package/dist/index-C_kUPMNf.d.ts.map +0 -1
- package/dist/index-CxWUNzph.d.ts +0 -21319
- package/dist/index-CxWUNzph.d.ts.map +0 -1
- package/dist/index-Ofk3NYAC.d.ts +0 -18596
- package/dist/index-Ofk3NYAC.d.ts.map +0 -1
- package/dist/index-Qr_rU6VS.d.ts +0 -271
- package/dist/index-Qr_rU6VS.d.ts.map +0 -1
- package/dist/index-cBMMID-w.d.ts +0 -323
- package/dist/index-cBMMID-w.d.ts.map +0 -1
- package/dist/module-BW12i5H3.js.map +0 -1
- package/dist/module-XCoMwFat.js +0 -59
- package/dist/module-XCoMwFat.js.map +0 -1
- package/dist/processor-module-CkuQiq7B.js.map +0 -1
- package/dist/processors/vetra-read-model/index.js.map +0 -1
- package/dist/subgraph-module-CU_-umq2.js.map +0 -1
- package/dist/vetra-package-VqptqKzx.js.map +0 -1
|
@@ -1,42 +1,109 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-pbuEa-1d.js";
|
|
2
|
-
import { BaseDocumentHeaderSchema, BaseDocumentStateSchema, baseActions, baseCreateDocument, baseLoadFromInput, baseSaveToFileHandle, createAction,
|
|
2
|
+
import { BaseDocumentHeaderSchema, BaseDocumentStateSchema, baseActions, baseCreateDocument, baseLoadFromInput, baseSaveToFileHandle, createAction, createReducer, createState, defaultBaseState, generateId, isDocumentAction } from "document-model";
|
|
3
3
|
import * as z$1 from "zod";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
//#region document-models/app-module/v1/gen/schema/zod.ts
|
|
6
|
+
const isDefinedNonNullAny = (v) => v !== void 0 && v !== null;
|
|
7
|
+
const definedNonNullAnySchema = z$1.any().refine((v) => isDefinedNonNullAny(v));
|
|
8
|
+
const StatusTypeSchema = z$1.enum(["CONFIRMED", "DRAFT"]);
|
|
9
|
+
function AddDocumentTypeInputSchema() {
|
|
10
|
+
return z$1.object({ documentType: z$1.string() });
|
|
11
|
+
}
|
|
12
|
+
function AppModuleStateSchema() {
|
|
13
|
+
return z$1.object({
|
|
14
|
+
__typename: z$1.literal("AppModuleState").optional(),
|
|
15
|
+
allowedDocumentTypes: z$1.array(z$1.string()).nullish(),
|
|
16
|
+
isDragAndDropEnabled: z$1.boolean(),
|
|
17
|
+
name: z$1.string(),
|
|
18
|
+
status: StatusTypeSchema
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function RemoveDocumentTypeInputSchema() {
|
|
22
|
+
return z$1.object({ documentType: z$1.string() });
|
|
23
|
+
}
|
|
24
|
+
function SetAppNameInputSchema() {
|
|
25
|
+
return z$1.object({ name: z$1.string() });
|
|
26
|
+
}
|
|
27
|
+
function SetAppStatusInputSchema() {
|
|
28
|
+
return z$1.object({ status: StatusTypeSchema });
|
|
29
|
+
}
|
|
30
|
+
function SetDocumentTypesInputSchema() {
|
|
31
|
+
return z$1.object({ documentTypes: z$1.array(z$1.string()) });
|
|
32
|
+
}
|
|
33
|
+
function SetDragAndDropEnabledInputSchema() {
|
|
34
|
+
return z$1.object({ enabled: z$1.boolean() });
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region document-models/app-module/v1/gen/base-operations/creators.ts
|
|
38
|
+
/**
|
|
39
|
+
* WARNING: DO NOT EDIT
|
|
40
|
+
* This file is auto-generated and updated by codegen
|
|
41
|
+
*/
|
|
42
|
+
var creators_exports$1 = /* @__PURE__ */ __exportAll({
|
|
43
|
+
addDocumentType: () => addDocumentType,
|
|
44
|
+
removeDocumentType: () => removeDocumentType,
|
|
45
|
+
setAppName: () => setAppName,
|
|
46
|
+
setAppStatus: () => setAppStatus,
|
|
47
|
+
setDocumentTypes: () => setDocumentTypes
|
|
48
|
+
});
|
|
49
|
+
const setAppName = (input) => createAction("SET_APP_NAME", { ...input }, void 0, SetAppNameInputSchema, "global");
|
|
50
|
+
const setAppStatus = (input) => createAction("SET_APP_STATUS", { ...input }, void 0, SetAppStatusInputSchema, "global");
|
|
51
|
+
const addDocumentType = (input) => createAction("ADD_DOCUMENT_TYPE", { ...input }, void 0, AddDocumentTypeInputSchema, "global");
|
|
52
|
+
const removeDocumentType = (input) => createAction("REMOVE_DOCUMENT_TYPE", { ...input }, void 0, RemoveDocumentTypeInputSchema, "global");
|
|
53
|
+
const setDocumentTypes = (input) => createAction("SET_DOCUMENT_TYPES", { ...input }, void 0, SetDocumentTypesInputSchema, "global");
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region document-models/app-module/v1/gen/dnd-operations/creators.ts
|
|
56
|
+
/**
|
|
57
|
+
* WARNING: DO NOT EDIT
|
|
58
|
+
* This file is auto-generated and updated by codegen
|
|
59
|
+
*/
|
|
60
|
+
var creators_exports = /* @__PURE__ */ __exportAll({ setDragAndDropEnabled: () => setDragAndDropEnabled });
|
|
61
|
+
const setDragAndDropEnabled = (input) => createAction("SET_DRAG_AND_DROP_ENABLED", { ...input }, void 0, SetDragAndDropEnabledInputSchema, "global");
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region document-models/app-module/v1/actions.ts
|
|
64
|
+
/**
|
|
65
|
+
* WARNING: DO NOT EDIT
|
|
66
|
+
* This file is auto-generated and updated by codegen
|
|
67
|
+
*/
|
|
68
|
+
/** Actions for the AppModule document model */
|
|
69
|
+
const actions = {
|
|
70
|
+
...baseActions,
|
|
71
|
+
...creators_exports$1,
|
|
72
|
+
...creators_exports
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region document-models/app-module/v1/gen/document-model.ts
|
|
7
76
|
const documentModel = {
|
|
8
77
|
id: "powerhouse/app",
|
|
9
78
|
name: "App Module",
|
|
10
|
-
extension: ".phdm",
|
|
11
|
-
description: "",
|
|
12
79
|
author: {
|
|
13
80
|
name: "Powerhouse",
|
|
14
81
|
website: "https://powerhouse.inc"
|
|
15
82
|
},
|
|
83
|
+
extension: ".app",
|
|
84
|
+
description: "Declares a custom Drive App (a drive-level UI surface) shipped by a Vetra Reactor Package. Use one App Module document per drive app: configure which document types it handles, whether it accepts drag-and-drop, and mark it CONFIRMED to trigger codegen of the corresponding app scaffold under `apps/`.",
|
|
16
85
|
specifications: [{
|
|
17
|
-
version: 1,
|
|
18
|
-
changeLog: [],
|
|
19
86
|
state: {
|
|
20
|
-
global: {
|
|
21
|
-
schema: "type AppModuleState {\n name: String!\n status: StatusType!\n allowedDocumentTypes: [String!]\n isDragAndDropEnabled: Boolean!\n}\n\nenum StatusType {\n DRAFT\n CONFIRMED\n}",
|
|
22
|
-
initialValue: "{\n \"name\": \"\",\n \"status\": \"DRAFT\",\n \"allowedDocumentTypes\": null,\n \"isDragAndDropEnabled\": true\n}",
|
|
23
|
-
examples: []
|
|
24
|
-
},
|
|
25
87
|
local: {
|
|
26
88
|
schema: "",
|
|
27
|
-
|
|
28
|
-
|
|
89
|
+
examples: [],
|
|
90
|
+
initialValue: ""
|
|
91
|
+
},
|
|
92
|
+
global: {
|
|
93
|
+
schema: "\"\"\"\nConfiguration for a Drive App contributed by the package. Drive apps render a\ncustom view at the drive level (instead of, or alongside, the document file\ntree) and can opt into which document types they accept.\n\"\"\"\ntype AppModuleState {\n \"\"\"Display name of the drive app. Also used as the source for the generated folder name under `apps/`.\"\"\"\n name: String!\n \"\"\"Lifecycle status. While DRAFT the app definition is editable and codegen is skipped; switching to CONFIRMED triggers app scaffold generation.\"\"\"\n status: StatusType!\n \"\"\"Document type ids this app handles. `null` means the app accepts any document type; an empty list means it accepts none.\"\"\"\n allowedDocumentTypes: [String!]\n \"\"\"Whether the app surface accepts dropped files from the user. Defaults to true.\"\"\"\n isDragAndDropEnabled: Boolean!\n}\n\n\"\"\"\nLifecycle status of a module definition.\n- DRAFT: still being edited; codegen does not run.\n- CONFIRMED: locked in; codegen produces the corresponding scaffold.\n\"\"\"\nenum StatusType {\n DRAFT\n CONFIRMED\n}",
|
|
94
|
+
examples: [],
|
|
95
|
+
initialValue: "{\n \"name\": \"\",\n \"status\": \"DRAFT\",\n \"allowedDocumentTypes\": null,\n \"isDragAndDropEnabled\": true\n}"
|
|
29
96
|
}
|
|
30
97
|
},
|
|
31
98
|
modules: [{
|
|
32
99
|
id: "d274599a-ceb5-4f2b-8651-b25787306734",
|
|
33
100
|
name: "base_operations",
|
|
34
|
-
description: "",
|
|
101
|
+
description: "Set the app's identity, lifecycle status, and the document types it handles.",
|
|
35
102
|
operations: [
|
|
36
103
|
{
|
|
37
104
|
id: "f2ba2ddc-8527-4162-93bd-e045e9932013",
|
|
38
105
|
name: "SET_APP_NAME",
|
|
39
|
-
description: "",
|
|
106
|
+
description: "Set the display name of the drive app. Also determines the generated folder name under `apps/`.",
|
|
40
107
|
schema: "input SetAppNameInput {\n name: String!\n}",
|
|
41
108
|
template: "",
|
|
42
109
|
reducer: "",
|
|
@@ -47,7 +114,7 @@ const documentModel = {
|
|
|
47
114
|
{
|
|
48
115
|
id: "c842efa4-154c-4fd9-9d12-42bec51af4e9",
|
|
49
116
|
name: "SET_APP_STATUS",
|
|
50
|
-
description: "",
|
|
117
|
+
description: "Move the app between DRAFT and CONFIRMED. Codegen only runs once the status is CONFIRMED.",
|
|
51
118
|
schema: "input SetAppStatusInput {\n status: StatusType!\n}",
|
|
52
119
|
template: "",
|
|
53
120
|
reducer: "",
|
|
@@ -58,7 +125,7 @@ const documentModel = {
|
|
|
58
125
|
{
|
|
59
126
|
id: "7376f168-695f-4aef-94d0-6e381666358c",
|
|
60
127
|
name: "ADD_DOCUMENT_TYPE",
|
|
61
|
-
description: "",
|
|
128
|
+
description: "Append a document type id to the list of types this app handles. Initializes the list if it was `null` (accept-any).",
|
|
62
129
|
schema: "input AddDocumentTypeInput {\n documentType: String!\n}",
|
|
63
130
|
template: "",
|
|
64
131
|
reducer: "",
|
|
@@ -69,7 +136,7 @@ const documentModel = {
|
|
|
69
136
|
{
|
|
70
137
|
id: "310e4e5b-3f14-4e9a-8e09-5583c7698a65",
|
|
71
138
|
name: "REMOVE_DOCUMENT_TYPE",
|
|
72
|
-
description: "",
|
|
139
|
+
description: "Remove a document type id from the handled list. No-op if the type is not present.",
|
|
73
140
|
schema: "input RemoveDocumentTypeInput {\n documentType: String!\n}",
|
|
74
141
|
template: "",
|
|
75
142
|
reducer: "",
|
|
@@ -80,7 +147,7 @@ const documentModel = {
|
|
|
80
147
|
{
|
|
81
148
|
id: "b365727a-7df3-48f0-a4f8-02362f02ad1d",
|
|
82
149
|
name: "SET_DOCUMENT_TYPES",
|
|
83
|
-
description: "",
|
|
150
|
+
description: "Replace the entire allowed-document-types list in one call. Pass an empty list to accept none.",
|
|
84
151
|
schema: "input SetDocumentTypesInput {\n documentTypes: [String!]!\n}",
|
|
85
152
|
template: "",
|
|
86
153
|
reducer: "",
|
|
@@ -92,11 +159,11 @@ const documentModel = {
|
|
|
92
159
|
}, {
|
|
93
160
|
id: "270faa10-92e9-40d0-b128-2de32704bcb5",
|
|
94
161
|
name: "dnd_operations",
|
|
95
|
-
description: "",
|
|
162
|
+
description: "Toggle drag-and-drop file handling for the app surface.",
|
|
96
163
|
operations: [{
|
|
97
164
|
id: "077b1ab8-cb32-4b4e-a1fa-76178188c6a1",
|
|
98
165
|
name: "SET_DRAG_AND_DROP_ENABLED",
|
|
99
|
-
description: "",
|
|
166
|
+
description: "Enable or disable drag-and-drop file handling on the app surface.",
|
|
100
167
|
schema: "input SetDragAndDropEnabledInput {\n enabled: Boolean!\n}",
|
|
101
168
|
template: "",
|
|
102
169
|
reducer: "",
|
|
@@ -104,91 +171,13 @@ const documentModel = {
|
|
|
104
171
|
examples: [],
|
|
105
172
|
scope: "global"
|
|
106
173
|
}]
|
|
107
|
-
}]
|
|
174
|
+
}],
|
|
175
|
+
version: 1,
|
|
176
|
+
changeLog: []
|
|
108
177
|
}]
|
|
109
178
|
};
|
|
110
179
|
//#endregion
|
|
111
|
-
//#region document-models/app-module/
|
|
112
|
-
const isDefinedNonNullAny = (v) => v !== void 0 && v !== null;
|
|
113
|
-
const definedNonNullAnySchema = z$1.any().refine((v) => isDefinedNonNullAny(v));
|
|
114
|
-
const StatusTypeSchema = z$1.enum(["CONFIRMED", "DRAFT"]);
|
|
115
|
-
function AddDocumentTypeInputSchema() {
|
|
116
|
-
return z$1.object({ documentType: z$1.string() });
|
|
117
|
-
}
|
|
118
|
-
function AppModuleStateSchema() {
|
|
119
|
-
return z$1.object({
|
|
120
|
-
__typename: z$1.literal("AppModuleState").optional(),
|
|
121
|
-
allowedDocumentTypes: z$1.array(z$1.string()).nullish(),
|
|
122
|
-
isDragAndDropEnabled: z$1.boolean(),
|
|
123
|
-
name: z$1.string(),
|
|
124
|
-
status: StatusTypeSchema
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
function RemoveDocumentTypeInputSchema() {
|
|
128
|
-
return z$1.object({ documentType: z$1.string() });
|
|
129
|
-
}
|
|
130
|
-
function SetAppNameInputSchema() {
|
|
131
|
-
return z$1.object({ name: z$1.string() });
|
|
132
|
-
}
|
|
133
|
-
function SetAppStatusInputSchema() {
|
|
134
|
-
return z$1.object({ status: StatusTypeSchema });
|
|
135
|
-
}
|
|
136
|
-
function SetDocumentTypesInputSchema() {
|
|
137
|
-
return z$1.object({ documentTypes: z$1.array(z$1.string()) });
|
|
138
|
-
}
|
|
139
|
-
function SetDragAndDropEnabledInputSchema() {
|
|
140
|
-
return z$1.object({ enabled: z$1.boolean() });
|
|
141
|
-
}
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region document-models/app-module/gen/base-operations/creators.ts
|
|
144
|
-
var creators_exports$1 = /* @__PURE__ */ __exportAll({
|
|
145
|
-
addDocumentType: () => addDocumentType,
|
|
146
|
-
removeDocumentType: () => removeDocumentType,
|
|
147
|
-
setAppName: () => setAppName,
|
|
148
|
-
setAppStatus: () => setAppStatus,
|
|
149
|
-
setDocumentTypes: () => setDocumentTypes
|
|
150
|
-
});
|
|
151
|
-
const setAppName = (input) => createAction("SET_APP_NAME", { ...input }, void 0, SetAppNameInputSchema, "global");
|
|
152
|
-
const setAppStatus = (input) => createAction("SET_APP_STATUS", { ...input }, void 0, SetAppStatusInputSchema, "global");
|
|
153
|
-
const addDocumentType = (input) => createAction("ADD_DOCUMENT_TYPE", { ...input }, void 0, AddDocumentTypeInputSchema, "global");
|
|
154
|
-
const removeDocumentType = (input) => createAction("REMOVE_DOCUMENT_TYPE", { ...input }, void 0, RemoveDocumentTypeInputSchema, "global");
|
|
155
|
-
const setDocumentTypes = (input) => createAction("SET_DOCUMENT_TYPES", { ...input }, void 0, SetDocumentTypesInputSchema, "global");
|
|
156
|
-
//#endregion
|
|
157
|
-
//#region document-models/app-module/gen/dnd-operations/creators.ts
|
|
158
|
-
var creators_exports = /* @__PURE__ */ __exportAll({ setDragAndDropEnabled: () => setDragAndDropEnabled });
|
|
159
|
-
const setDragAndDropEnabled = (input) => createAction("SET_DRAG_AND_DROP_ENABLED", { ...input }, void 0, SetDragAndDropEnabledInputSchema, "global");
|
|
160
|
-
//#endregion
|
|
161
|
-
//#region document-models/app-module/gen/document-type.ts
|
|
162
|
-
const appModuleDocumentType = "powerhouse/app";
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region document-models/app-module/gen/document-schema.ts
|
|
165
|
-
/** Schema for validating the header object of a AppModule document */
|
|
166
|
-
const AppModuleDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({ documentType: z.literal(appModuleDocumentType) });
|
|
167
|
-
/** Schema for validating the state object of a AppModule document */
|
|
168
|
-
const AppModulePHStateSchema = BaseDocumentStateSchema.extend({ global: AppModuleStateSchema() });
|
|
169
|
-
const AppModuleDocumentSchema = z.object({
|
|
170
|
-
header: AppModuleDocumentHeaderSchema,
|
|
171
|
-
state: AppModulePHStateSchema,
|
|
172
|
-
initialState: AppModulePHStateSchema
|
|
173
|
-
});
|
|
174
|
-
/** Simple helper function to check if a state object is a AppModule document state object */
|
|
175
|
-
function isAppModuleState(state) {
|
|
176
|
-
return AppModulePHStateSchema.safeParse(state).success;
|
|
177
|
-
}
|
|
178
|
-
/** Simple helper function to assert that a document state object is a AppModule document state object */
|
|
179
|
-
function assertIsAppModuleState(state) {
|
|
180
|
-
AppModulePHStateSchema.parse(state);
|
|
181
|
-
}
|
|
182
|
-
/** Simple helper function to check if a document is a AppModule document */
|
|
183
|
-
function isAppModuleDocument(document) {
|
|
184
|
-
return AppModuleDocumentSchema.safeParse(document).success;
|
|
185
|
-
}
|
|
186
|
-
/** Simple helper function to assert that a document is a AppModule document */
|
|
187
|
-
function assertIsAppModuleDocument(document) {
|
|
188
|
-
AppModuleDocumentSchema.parse(document);
|
|
189
|
-
}
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region document-models/app-module/src/reducers/base-operations.ts
|
|
180
|
+
//#region document-models/app-module/v1/src/reducers/base-operations.ts
|
|
192
181
|
const appModuleBaseOperationsOperations = {
|
|
193
182
|
setAppNameOperation(state, action, dispatch) {
|
|
194
183
|
const trimmedName = action.input.name.trim();
|
|
@@ -213,12 +202,12 @@ const appModuleBaseOperationsOperations = {
|
|
|
213
202
|
}
|
|
214
203
|
};
|
|
215
204
|
//#endregion
|
|
216
|
-
//#region document-models/app-module/src/reducers/dnd-operations.ts
|
|
205
|
+
//#region document-models/app-module/v1/src/reducers/dnd-operations.ts
|
|
217
206
|
const appModuleDndOperationsOperations = { setDragAndDropEnabledOperation(state, action, dispatch) {
|
|
218
207
|
state.isDragAndDropEnabled = action.input.enabled;
|
|
219
208
|
} };
|
|
220
209
|
//#endregion
|
|
221
|
-
//#region document-models/app-module/gen/reducer.ts
|
|
210
|
+
//#region document-models/app-module/v1/gen/reducer.ts
|
|
222
211
|
const stateReducer = (state, action, dispatch) => {
|
|
223
212
|
if (isDocumentAction(action)) return state;
|
|
224
213
|
switch (action.type) {
|
|
@@ -251,7 +240,45 @@ const stateReducer = (state, action, dispatch) => {
|
|
|
251
240
|
};
|
|
252
241
|
const reducer = createReducer(stateReducer);
|
|
253
242
|
//#endregion
|
|
254
|
-
//#region document-models/app-module/gen/
|
|
243
|
+
//#region document-models/app-module/v1/gen/document-type.ts
|
|
244
|
+
/**
|
|
245
|
+
* WARNING: DO NOT EDIT
|
|
246
|
+
* This file is auto-generated and updated by codegen
|
|
247
|
+
*/
|
|
248
|
+
const appModuleDocumentType = "powerhouse/app";
|
|
249
|
+
//#endregion
|
|
250
|
+
//#region document-models/app-module/v1/gen/document-schema.ts
|
|
251
|
+
/**
|
|
252
|
+
* WARNING: DO NOT EDIT
|
|
253
|
+
* This file is auto-generated and updated by codegen
|
|
254
|
+
*/
|
|
255
|
+
/** Schema for validating the header object of a AppModule document */
|
|
256
|
+
const AppModuleDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({ documentType: z.literal(appModuleDocumentType) });
|
|
257
|
+
/** Schema for validating the state object of a AppModule document */
|
|
258
|
+
const AppModulePHStateSchema = BaseDocumentStateSchema.extend({ global: AppModuleStateSchema() });
|
|
259
|
+
const AppModuleDocumentSchema = z.object({
|
|
260
|
+
header: AppModuleDocumentHeaderSchema,
|
|
261
|
+
state: AppModulePHStateSchema,
|
|
262
|
+
initialState: AppModulePHStateSchema
|
|
263
|
+
});
|
|
264
|
+
/** Simple helper function to check if a state object is a AppModule document state object */
|
|
265
|
+
function isAppModuleState(state) {
|
|
266
|
+
return AppModulePHStateSchema.safeParse(state).success;
|
|
267
|
+
}
|
|
268
|
+
/** Simple helper function to assert that a document state object is a AppModule document state object */
|
|
269
|
+
function assertIsAppModuleState(state) {
|
|
270
|
+
AppModulePHStateSchema.parse(state);
|
|
271
|
+
}
|
|
272
|
+
/** Simple helper function to check if a document is a AppModule document */
|
|
273
|
+
function isAppModuleDocument(document) {
|
|
274
|
+
return AppModuleDocumentSchema.safeParse(document).success;
|
|
275
|
+
}
|
|
276
|
+
/** Simple helper function to assert that a document is a AppModule document */
|
|
277
|
+
function assertIsAppModuleDocument(document) {
|
|
278
|
+
AppModuleDocumentSchema.parse(document);
|
|
279
|
+
}
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region document-models/app-module/v1/gen/utils.ts
|
|
255
282
|
const initialGlobalState = {
|
|
256
283
|
name: "",
|
|
257
284
|
status: "DRAFT",
|
|
@@ -260,7 +287,7 @@ const initialGlobalState = {
|
|
|
260
287
|
};
|
|
261
288
|
const initialLocalState = {};
|
|
262
289
|
const utils$1 = {
|
|
263
|
-
fileExtension: ".
|
|
290
|
+
fileExtension: ".app",
|
|
264
291
|
createState(state) {
|
|
265
292
|
return {
|
|
266
293
|
...defaultBaseState(),
|
|
@@ -300,93 +327,26 @@ const utils$1 = {
|
|
|
300
327
|
}
|
|
301
328
|
};
|
|
302
329
|
//#endregion
|
|
303
|
-
//#region document-models/app-module/
|
|
304
|
-
function defaultGlobalState() {
|
|
305
|
-
return {
|
|
306
|
-
name: "",
|
|
307
|
-
status: "DRAFT",
|
|
308
|
-
allowedDocumentTypes: null,
|
|
309
|
-
isDragAndDropEnabled: true
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
function defaultLocalState() {
|
|
313
|
-
return {};
|
|
314
|
-
}
|
|
315
|
-
function defaultPHState() {
|
|
316
|
-
return {
|
|
317
|
-
...defaultBaseState(),
|
|
318
|
-
global: defaultGlobalState(),
|
|
319
|
-
local: defaultLocalState()
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
function createGlobalState(state) {
|
|
323
|
-
return {
|
|
324
|
-
...defaultGlobalState(),
|
|
325
|
-
...state || {}
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
function createLocalState(state) {
|
|
329
|
-
return {
|
|
330
|
-
...defaultLocalState(),
|
|
331
|
-
...state || {}
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
function createState$1(baseState, globalState, localState) {
|
|
335
|
-
return {
|
|
336
|
-
...createBaseState(baseState?.auth, baseState?.document),
|
|
337
|
-
global: createGlobalState(globalState),
|
|
338
|
-
local: createLocalState(localState)
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* Creates a AppModuleDocument with custom global and local state
|
|
343
|
-
* This properly handles the PHBaseState requirements while allowing
|
|
344
|
-
* document-specific state to be set.
|
|
345
|
-
*/
|
|
346
|
-
function createAppModuleDocument(state) {
|
|
347
|
-
return utils$1.createDocument(state ? createState$1(createBaseState(state.auth, state.document), state.global, state.local) : void 0);
|
|
348
|
-
}
|
|
349
|
-
//#endregion
|
|
350
|
-
//#region document-models/app-module/src/utils.ts
|
|
330
|
+
//#region document-models/app-module/v1/src/utils.ts
|
|
351
331
|
var utils_exports = /* @__PURE__ */ __exportAll({});
|
|
352
332
|
//#endregion
|
|
353
|
-
//#region document-models/app-module/
|
|
354
|
-
/** Hook to get a AppModule document by its id */
|
|
355
|
-
function useAppModuleDocumentById(documentId) {
|
|
356
|
-
const [document, dispatch] = useDocumentById(documentId);
|
|
357
|
-
if (!isAppModuleDocument(document)) return [void 0, void 0];
|
|
358
|
-
return [document, dispatch];
|
|
359
|
-
}
|
|
360
|
-
/** Hook to get the selected AppModule document */
|
|
361
|
-
function useSelectedAppModuleDocument() {
|
|
362
|
-
const [document, dispatch] = useSelectedDocument();
|
|
363
|
-
assertIsAppModuleDocument(document);
|
|
364
|
-
return [document, dispatch];
|
|
365
|
-
}
|
|
366
|
-
/** Hook to get all AppModule documents in the selected drive */
|
|
367
|
-
function useAppModuleDocumentsInSelectedDrive() {
|
|
368
|
-
return useDocumentsInSelectedDrive()?.filter(isAppModuleDocument);
|
|
369
|
-
}
|
|
370
|
-
/** Hook to get all AppModule documents in the selected folder */
|
|
371
|
-
function useAppModuleDocumentsInSelectedFolder() {
|
|
372
|
-
return useDocumentsInSelectedFolder()?.filter(isAppModuleDocument);
|
|
373
|
-
}
|
|
374
|
-
//#endregion
|
|
375
|
-
//#region document-models/app-module/actions.ts
|
|
376
|
-
/** Actions for the AppModule document model */
|
|
377
|
-
const actions = {
|
|
378
|
-
...baseActions,
|
|
379
|
-
...creators_exports$1,
|
|
380
|
-
...creators_exports
|
|
381
|
-
};
|
|
382
|
-
//#endregion
|
|
383
|
-
//#region document-models/app-module/utils.ts
|
|
333
|
+
//#region document-models/app-module/v1/utils.ts
|
|
384
334
|
/** Utils for the AppModule document model */
|
|
385
335
|
const utils = {
|
|
386
336
|
...utils$1,
|
|
387
337
|
...utils_exports
|
|
388
338
|
};
|
|
389
339
|
//#endregion
|
|
390
|
-
|
|
340
|
+
//#region document-models/app-module/v1/module.ts
|
|
341
|
+
/** Document model module for the AppModule document type */
|
|
342
|
+
const AppModule = {
|
|
343
|
+
version: 1,
|
|
344
|
+
reducer,
|
|
345
|
+
actions,
|
|
346
|
+
utils,
|
|
347
|
+
documentModel: createState(defaultBaseState(), documentModel)
|
|
348
|
+
};
|
|
349
|
+
//#endregion
|
|
350
|
+
export { SetDocumentTypesInputSchema as A, setAppStatus as C, RemoveDocumentTypeInputSchema as D, AppModuleStateSchema as E, StatusTypeSchema as M, definedNonNullAnySchema as N, SetAppNameInputSchema as O, isDefinedNonNullAny as P, setAppName as S, AddDocumentTypeInputSchema as T, creators_exports as _, utils$1 as a, creators_exports$1 as b, AppModulePHStateSchema as c, isAppModuleDocument as d, isAppModuleState as f, actions as g, documentModel as h, initialLocalState as i, SetDragAndDropEnabledInputSchema as j, SetAppStatusInputSchema as k, assertIsAppModuleDocument as l, reducer as m, utils as n, AppModuleDocumentHeaderSchema as o, appModuleDocumentType as p, initialGlobalState as r, AppModuleDocumentSchema as s, AppModule as t, assertIsAppModuleState as u, setDragAndDropEnabled as v, setDocumentTypes as w, removeDocumentType as x, addDocumentType as y };
|
|
391
351
|
|
|
392
|
-
//# sourceMappingURL=
|
|
352
|
+
//# sourceMappingURL=module-CTPfENDU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-CTPfENDU.js","names":["z","appModuleBaseOperationsActions","appModuleDndOperationsActions","utils","genUtils","customUtils"],"sources":["../document-models/app-module/v1/gen/schema/zod.ts","../document-models/app-module/v1/gen/base-operations/creators.ts","../document-models/app-module/v1/gen/dnd-operations/creators.ts","../document-models/app-module/v1/actions.ts","../document-models/app-module/v1/gen/document-model.ts","../document-models/app-module/v1/src/reducers/base-operations.ts","../document-models/app-module/v1/src/reducers/dnd-operations.ts","../document-models/app-module/v1/gen/reducer.ts","../document-models/app-module/v1/gen/document-type.ts","../document-models/app-module/v1/gen/document-schema.ts","../document-models/app-module/v1/gen/utils.ts","../document-models/app-module/v1/src/utils.ts","../document-models/app-module/v1/utils.ts","../document-models/app-module/v1/module.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport * as z from \"zod\";\nimport type {\n AddDocumentTypeInput,\n AppModuleState,\n RemoveDocumentTypeInput,\n SetAppNameInput,\n SetAppStatusInput,\n SetDocumentTypesInput,\n SetDragAndDropEnabledInput,\n StatusType,\n} from \"./types.js\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport const StatusTypeSchema = z.enum([\"CONFIRMED\", \"DRAFT\"]);\n\nexport function AddDocumentTypeInputSchema(): z.ZodObject<\n Properties<AddDocumentTypeInput>\n> {\n return z.object({\n documentType: z.string(),\n });\n}\n\nexport function AppModuleStateSchema(): z.ZodObject<\n Properties<AppModuleState>\n> {\n return z.object({\n __typename: z.literal(\"AppModuleState\").optional(),\n allowedDocumentTypes: z.array(z.string()).nullish(),\n isDragAndDropEnabled: z.boolean(),\n name: z.string(),\n status: StatusTypeSchema,\n });\n}\n\nexport function RemoveDocumentTypeInputSchema(): z.ZodObject<\n Properties<RemoveDocumentTypeInput>\n> {\n return z.object({\n documentType: z.string(),\n });\n}\n\nexport function SetAppNameInputSchema(): z.ZodObject<\n Properties<SetAppNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetAppStatusInputSchema(): z.ZodObject<\n Properties<SetAppStatusInput>\n> {\n return z.object({\n status: StatusTypeSchema,\n });\n}\n\nexport function SetDocumentTypesInputSchema(): z.ZodObject<\n Properties<SetDocumentTypesInput>\n> {\n return z.object({\n documentTypes: z.array(z.string()),\n });\n}\n\nexport function SetDragAndDropEnabledInputSchema(): z.ZodObject<\n Properties<SetDragAndDropEnabledInput>\n> {\n return z.object({\n enabled: z.boolean(),\n });\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport {\n AddDocumentTypeInputSchema,\n RemoveDocumentTypeInputSchema,\n SetAppNameInputSchema,\n SetAppStatusInputSchema,\n SetDocumentTypesInputSchema,\n} from \"../schema/zod.js\";\nimport type {\n AddDocumentTypeInput,\n RemoveDocumentTypeInput,\n SetAppNameInput,\n SetAppStatusInput,\n SetDocumentTypesInput,\n} from \"../types.js\";\nimport type {\n AddDocumentTypeAction,\n RemoveDocumentTypeAction,\n SetAppNameAction,\n SetAppStatusAction,\n SetDocumentTypesAction,\n} from \"./actions.js\";\n\nexport const setAppName = (input: SetAppNameInput) =>\n createAction<SetAppNameAction>(\n \"SET_APP_NAME\",\n { ...input },\n undefined,\n SetAppNameInputSchema,\n \"global\",\n );\n\nexport const setAppStatus = (input: SetAppStatusInput) =>\n createAction<SetAppStatusAction>(\n \"SET_APP_STATUS\",\n { ...input },\n undefined,\n SetAppStatusInputSchema,\n \"global\",\n );\n\nexport const addDocumentType = (input: AddDocumentTypeInput) =>\n createAction<AddDocumentTypeAction>(\n \"ADD_DOCUMENT_TYPE\",\n { ...input },\n undefined,\n AddDocumentTypeInputSchema,\n \"global\",\n );\n\nexport const removeDocumentType = (input: RemoveDocumentTypeInput) =>\n createAction<RemoveDocumentTypeAction>(\n \"REMOVE_DOCUMENT_TYPE\",\n { ...input },\n undefined,\n RemoveDocumentTypeInputSchema,\n \"global\",\n );\n\nexport const setDocumentTypes = (input: SetDocumentTypesInput) =>\n createAction<SetDocumentTypesAction>(\n \"SET_DOCUMENT_TYPES\",\n { ...input },\n undefined,\n SetDocumentTypesInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport { SetDragAndDropEnabledInputSchema } from \"../schema/zod.js\";\nimport type { SetDragAndDropEnabledInput } from \"../types.js\";\nimport type { SetDragAndDropEnabledAction } from \"./actions.js\";\n\nexport const setDragAndDropEnabled = (input: SetDragAndDropEnabledInput) =>\n createAction<SetDragAndDropEnabledAction>(\n \"SET_DRAG_AND_DROP_ENABLED\",\n { ...input },\n undefined,\n SetDragAndDropEnabledInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { baseActions } from \"document-model\";\nimport {\n appModuleBaseOperationsActions,\n appModuleDndOperationsActions,\n} from \"./gen/creators.js\";\n\n/** Actions for the AppModule document model */\n\nexport const actions = {\n ...baseActions,\n ...appModuleBaseOperationsActions,\n ...appModuleDndOperationsActions,\n};\n","import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/app\",\n name: \"App Module\",\n author: {\n name: \"Powerhouse\",\n website: \"https://powerhouse.inc\",\n },\n extension: \".app\",\n description:\n \"Declares a custom Drive App (a drive-level UI surface) shipped by a Vetra Reactor Package. Use one App Module document per drive app: configure which document types it handles, whether it accepts drag-and-drop, and mark it CONFIRMED to trigger codegen of the corresponding app scaffold under `apps/`.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n '\"\"\"\\nConfiguration for a Drive App contributed by the package. Drive apps render a\\ncustom view at the drive level (instead of, or alongside, the document file\\ntree) and can opt into which document types they accept.\\n\"\"\"\\ntype AppModuleState {\\n \"\"\"Display name of the drive app. Also used as the source for the generated folder name under `apps/`.\"\"\"\\n name: String!\\n \"\"\"Lifecycle status. While DRAFT the app definition is editable and codegen is skipped; switching to CONFIRMED triggers app scaffold generation.\"\"\"\\n status: StatusType!\\n \"\"\"Document type ids this app handles. `null` means the app accepts any document type; an empty list means it accepts none.\"\"\"\\n allowedDocumentTypes: [String!]\\n \"\"\"Whether the app surface accepts dropped files from the user. Defaults to true.\"\"\"\\n isDragAndDropEnabled: Boolean!\\n}\\n\\n\"\"\"\\nLifecycle status of a module definition.\\n- DRAFT: still being edited; codegen does not run.\\n- CONFIRMED: locked in; codegen produces the corresponding scaffold.\\n\"\"\"\\nenum StatusType {\\n DRAFT\\n CONFIRMED\\n}',\n examples: [],\n initialValue:\n '{\\n \"name\": \"\",\\n \"status\": \"DRAFT\",\\n \"allowedDocumentTypes\": null,\\n \"isDragAndDropEnabled\": true\\n}',\n },\n },\n modules: [\n {\n id: \"d274599a-ceb5-4f2b-8651-b25787306734\",\n name: \"base_operations\",\n description:\n \"Set the app's identity, lifecycle status, and the document types it handles.\",\n operations: [\n {\n id: \"f2ba2ddc-8527-4162-93bd-e045e9932013\",\n name: \"SET_APP_NAME\",\n description:\n \"Set the display name of the drive app. Also determines the generated folder name under `apps/`.\",\n schema: \"input SetAppNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"c842efa4-154c-4fd9-9d12-42bec51af4e9\",\n name: \"SET_APP_STATUS\",\n description:\n \"Move the app between DRAFT and CONFIRMED. Codegen only runs once the status is CONFIRMED.\",\n schema: \"input SetAppStatusInput {\\n status: StatusType!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"7376f168-695f-4aef-94d0-6e381666358c\",\n name: \"ADD_DOCUMENT_TYPE\",\n description:\n \"Append a document type id to the list of types this app handles. Initializes the list if it was `null` (accept-any).\",\n schema:\n \"input AddDocumentTypeInput {\\n documentType: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"310e4e5b-3f14-4e9a-8e09-5583c7698a65\",\n name: \"REMOVE_DOCUMENT_TYPE\",\n description:\n \"Remove a document type id from the handled list. No-op if the type is not present.\",\n schema:\n \"input RemoveDocumentTypeInput {\\n documentType: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"b365727a-7df3-48f0-a4f8-02362f02ad1d\",\n name: \"SET_DOCUMENT_TYPES\",\n description:\n \"Replace the entire allowed-document-types list in one call. Pass an empty list to accept none.\",\n schema:\n \"input SetDocumentTypesInput {\\n documentTypes: [String!]!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"270faa10-92e9-40d0-b128-2de32704bcb5\",\n name: \"dnd_operations\",\n description:\n \"Toggle drag-and-drop file handling for the app surface.\",\n operations: [\n {\n id: \"077b1ab8-cb32-4b4e-a1fa-76178188c6a1\",\n name: \"SET_DRAG_AND_DROP_ENABLED\",\n description:\n \"Enable or disable drag-and-drop file handling on the app surface.\",\n schema:\n \"input SetDragAndDropEnabledInput {\\n enabled: Boolean!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n ],\n version: 1,\n changeLog: [],\n },\n ],\n};\n","import type { AppModuleBaseOperationsOperations } from \"document-models/app-module/v1\";\n\nexport const appModuleBaseOperationsOperations: AppModuleBaseOperationsOperations =\n {\n setAppNameOperation(state, action, dispatch) {\n const trimmedName = action.input.name.trim();\n if (trimmedName === \"\") {\n throw new Error(\"App name cannot be empty\");\n }\n state.name = trimmedName;\n },\n setAppStatusOperation(state, action, dispatch) {\n state.status = action.input.status;\n },\n addDocumentTypeOperation(state, action, dispatch) {\n const existingAllowedDocumentTypes = state.allowedDocumentTypes ?? [];\n const newDocumentType = action.input.documentType;\n const newAllowedDocumentTypesSet = new Set(\n existingAllowedDocumentTypes,\n ).add(newDocumentType);\n const newAllowedDocumentTypes = [...newAllowedDocumentTypesSet];\n state.allowedDocumentTypes = newAllowedDocumentTypes;\n },\n removeDocumentTypeOperation(state, action, dispatch) {\n const existingAllowedDocumentTypes = state.allowedDocumentTypes;\n const documentTypeToRemove = action.input.documentType;\n const newAllowedDocumentTypes = existingAllowedDocumentTypes?.filter(\n (dt) => dt !== documentTypeToRemove,\n );\n state.allowedDocumentTypes = newAllowedDocumentTypes ?? [];\n },\n setDocumentTypesOperation(state, action, dispatch) {\n state.allowedDocumentTypes = action.input.documentTypes;\n },\n };\n","import type { AppModuleDndOperationsOperations } from \"document-models/app-module/v1\";\n\nexport const appModuleDndOperationsOperations: AppModuleDndOperationsOperations =\n {\n setDragAndDropEnabledOperation(state, action, dispatch) {\n state.isDragAndDropEnabled = action.input.enabled;\n },\n };\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\nimport type { Reducer, StateReducer } from \"document-model\";\nimport { createReducer, isDocumentAction } from \"document-model\";\nimport type { AppModulePHState } from \"document-models/app-module/v1\";\n\nimport { appModuleBaseOperationsOperations } from \"../src/reducers/base-operations.js\";\nimport { appModuleDndOperationsOperations } from \"../src/reducers/dnd-operations.js\";\n\nimport {\n AddDocumentTypeInputSchema,\n RemoveDocumentTypeInputSchema,\n SetAppNameInputSchema,\n SetAppStatusInputSchema,\n SetDocumentTypesInputSchema,\n SetDragAndDropEnabledInputSchema,\n} from \"./schema/zod.js\";\n\nconst stateReducer: StateReducer<AppModulePHState> = (\n state,\n action,\n dispatch,\n) => {\n if (isDocumentAction(action)) {\n return state;\n }\n switch (action.type) {\n case \"SET_APP_NAME\": {\n SetAppNameInputSchema().parse(action.input);\n\n appModuleBaseOperationsOperations.setAppNameOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_APP_STATUS\": {\n SetAppStatusInputSchema().parse(action.input);\n\n appModuleBaseOperationsOperations.setAppStatusOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"ADD_DOCUMENT_TYPE\": {\n AddDocumentTypeInputSchema().parse(action.input);\n\n appModuleBaseOperationsOperations.addDocumentTypeOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"REMOVE_DOCUMENT_TYPE\": {\n RemoveDocumentTypeInputSchema().parse(action.input);\n\n appModuleBaseOperationsOperations.removeDocumentTypeOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_DOCUMENT_TYPES\": {\n SetDocumentTypesInputSchema().parse(action.input);\n\n appModuleBaseOperationsOperations.setDocumentTypesOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_DRAG_AND_DROP_ENABLED\": {\n SetDragAndDropEnabledInputSchema().parse(action.input);\n\n appModuleDndOperationsOperations.setDragAndDropEnabledOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n default:\n return state;\n }\n};\n\nexport const reducer: Reducer<AppModulePHState> = createReducer(stateReducer);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nexport const appModuleDocumentType = \"powerhouse/app\";\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport {\n BaseDocumentHeaderSchema,\n BaseDocumentStateSchema,\n} from \"document-model\";\nimport { z } from \"zod\";\nimport { appModuleDocumentType } from \"./document-type.js\";\nimport { AppModuleStateSchema } from \"./schema/zod.js\";\nimport type { AppModuleDocument, AppModulePHState } from \"./types.js\";\n\n/** Schema for validating the header object of a AppModule document */\nexport const AppModuleDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({\n documentType: z.literal(appModuleDocumentType),\n});\n\n/** Schema for validating the state object of a AppModule document */\nexport const AppModulePHStateSchema = BaseDocumentStateSchema.extend({\n global: AppModuleStateSchema(),\n});\n\nexport const AppModuleDocumentSchema = z.object({\n header: AppModuleDocumentHeaderSchema,\n state: AppModulePHStateSchema,\n initialState: AppModulePHStateSchema,\n});\n\n/** Simple helper function to check if a state object is a AppModule document state object */\nexport function isAppModuleState(state: unknown): state is AppModulePHState {\n return AppModulePHStateSchema.safeParse(state).success;\n}\n\n/** Simple helper function to assert that a document state object is a AppModule document state object */\nexport function assertIsAppModuleState(\n state: unknown,\n): asserts state is AppModulePHState {\n AppModulePHStateSchema.parse(state);\n}\n\n/** Simple helper function to check if a document is a AppModule document */\nexport function isAppModuleDocument(\n document: unknown,\n): document is AppModuleDocument {\n return AppModuleDocumentSchema.safeParse(document).success;\n}\n\n/** Simple helper function to assert that a document is a AppModule document */\nexport function assertIsAppModuleDocument(\n document: unknown,\n): asserts document is AppModuleDocument {\n AppModuleDocumentSchema.parse(document);\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport {\n baseCreateDocument,\n baseLoadFromInput,\n baseSaveToFileHandle,\n defaultBaseState,\n generateId,\n} from \"document-model\";\nimport {\n assertIsAppModuleDocument,\n assertIsAppModuleState,\n isAppModuleDocument,\n isAppModuleState,\n} from \"./document-schema.js\";\nimport { appModuleDocumentType } from \"./document-type.js\";\nimport { reducer } from \"./reducer.js\";\nimport type {\n AppModuleGlobalState,\n AppModuleLocalState,\n AppModulePHState,\n} from \"./types.js\";\n\nexport const initialGlobalState: AppModuleGlobalState = {\n name: \"\",\n status: \"DRAFT\",\n allowedDocumentTypes: null,\n isDragAndDropEnabled: true,\n};\nexport const initialLocalState: AppModuleLocalState = {};\n\nexport const utils: DocumentModelUtils<AppModulePHState> = {\n fileExtension: \".app\",\n createState(state) {\n return {\n ...defaultBaseState(),\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n },\n createDocument(state) {\n const document = baseCreateDocument(utils.createState, state);\n\n document.header.documentType = appModuleDocumentType;\n\n // for backwards compatibility, but this is NOT a valid signed document id\n document.header.id = generateId();\n\n return document;\n },\n saveToFileHandle(document, input) {\n return baseSaveToFileHandle(document, input);\n },\n loadFromInput(input) {\n return baseLoadFromInput(input, reducer);\n },\n isStateOfType(state) {\n return isAppModuleState(state);\n },\n assertIsStateOfType(state) {\n return assertIsAppModuleState(state);\n },\n isDocumentOfType(document) {\n return isAppModuleDocument(document);\n },\n assertIsDocumentOfType(document) {\n return assertIsAppModuleDocument(document);\n },\n};\n","export {};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport type { AppModulePHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the AppModule document model */\nexport const utils: DocumentModelUtils<AppModulePHState> = {\n ...genUtils,\n ...customUtils,\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelModule } from \"document-model\";\nimport { createState, defaultBaseState } from \"document-model\";\nimport { actions } from \"./actions.js\";\nimport { documentModel } from \"./gen/document-model.js\";\nimport { reducer } from \"./gen/reducer.js\";\nimport type { AppModulePHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the AppModule document type */\nexport const AppModule = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<AppModulePHState>;\n"],"mappings":";;;;;AAoBA,MAAa,uBAAuB,MAClC,MAAM,KAAA,KAAa,MAAM;AAE3B,MAAa,0BAA0BA,IACpC,KAAK,CACL,QAAQ,MAAM,oBAAoB,EAAE,CAAC;AAExC,MAAa,mBAAmBA,IAAE,KAAK,CAAC,aAAa,QAAQ,CAAC;AAE9D,SAAgB,6BAEd;AACA,QAAOA,IAAE,OAAO,EAC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,SAAO;;CAET,iBAAiB,UAAU,OAAO;AAChC,SAAO,qBAAqB,UAAU,MAAM;;CAE9C,cAAc,OAAO;AACnB,SAAO,kBAAkB,OAAO,QAAQ;;CAE1C,cAAc,OAAO;AACnB,SAAO,iBAAiB,MAAM;;CAEhC,oBAAoB,OAAO;AACzB,SAAO,uBAAuB,MAAM;;CAEtC,iBAAiB,UAAU;AACzB,SAAO,oBAAoB,SAAS;;CAEtC,uBAAuB,UAAU;AAC/B,SAAO,0BAA0B,SAAS;;CAE7C;;;;;;;AE7DD,MAAa,QAA8C;CACzD,GAAGC;CACH,GAAGC;CACJ;;;;ACAD,MAAa,YAAY;CACvB,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,kBAAkB,EAAE,cAAc;CAC9D"}
|
|
@@ -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-CbtrPBTP.js")),
|
|
6
6
|
documentTypes: ["powerhouse/app"],
|
|
7
7
|
config: {
|
|
8
8
|
id: "app-editor",
|
|
@@ -11,8 +11,9 @@ const AppEditor = {
|
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region editors/document-editor/module.ts
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/** Document editor module for the "powerhouse/document-editor" document type */
|
|
15
|
+
const DocumentEditorEditor = {
|
|
16
|
+
Component: lazy(() => import("./editor-BSQfwcdz.js")),
|
|
16
17
|
documentTypes: ["powerhouse/document-editor"],
|
|
17
18
|
config: {
|
|
18
19
|
id: "document-editor-editor",
|
|
@@ -21,8 +22,9 @@ const DocumentEditor = {
|
|
|
21
22
|
};
|
|
22
23
|
//#endregion
|
|
23
24
|
//#region editors/processor-editor/module.ts
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
/** Document editor module for the "powerhouse/processor" document type */
|
|
26
|
+
const ProcessorModuleEditor = {
|
|
27
|
+
Component: lazy(() => import("./editor-Bku8e2dr.js")),
|
|
26
28
|
documentTypes: ["powerhouse/processor"],
|
|
27
29
|
config: {
|
|
28
30
|
id: "processor-module-editor",
|
|
@@ -31,8 +33,9 @@ const ProcessorEditor = {
|
|
|
31
33
|
};
|
|
32
34
|
//#endregion
|
|
33
35
|
//#region editors/subgraph-editor/module.ts
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
/** Document editor module for the "powerhouse/subgraph" document type */
|
|
37
|
+
const SubgraphModuleEditor = {
|
|
38
|
+
Component: lazy(() => import("./editor-Dtg8STyT.js")),
|
|
36
39
|
documentTypes: ["powerhouse/subgraph"],
|
|
37
40
|
config: {
|
|
38
41
|
id: "subgraph-module-editor",
|
|
@@ -42,7 +45,7 @@ const SubgraphEditor = {
|
|
|
42
45
|
//#endregion
|
|
43
46
|
//#region editors/vetra-drive-app/module.ts
|
|
44
47
|
const VetraDriveApp = {
|
|
45
|
-
Component: lazy(() => import("./editor-
|
|
48
|
+
Component: lazy(() => import("./editor-D70FYIwV.js")),
|
|
46
49
|
documentTypes: ["powerhouse/document-drive"],
|
|
47
50
|
config: {
|
|
48
51
|
id: "vetra-drive-app",
|
|
@@ -51,8 +54,9 @@ const VetraDriveApp = {
|
|
|
51
54
|
};
|
|
52
55
|
//#endregion
|
|
53
56
|
//#region editors/vetra-package/module.ts
|
|
57
|
+
/** Document editor module for the "powerhouse/package" document type */
|
|
54
58
|
const VetraPackageEditor = {
|
|
55
|
-
Component: lazy(() => import("./editor-
|
|
59
|
+
Component: lazy(() => import("./editor-SfVorwsP.js")),
|
|
56
60
|
documentTypes: ["powerhouse/package"],
|
|
57
61
|
config: {
|
|
58
62
|
id: "vetra-package-editor",
|
|
@@ -60,6 +64,6 @@ const VetraPackageEditor = {
|
|
|
60
64
|
}
|
|
61
65
|
};
|
|
62
66
|
//#endregion
|
|
63
|
-
export {
|
|
67
|
+
export { DocumentEditorEditor as a, ProcessorModuleEditor as i, VetraDriveApp as n, AppEditor as o, SubgraphModuleEditor as r, VetraPackageEditor as t };
|
|
64
68
|
|
|
65
|
-
//# sourceMappingURL=module-
|
|
69
|
+
//# sourceMappingURL=module-CXIFrq-R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-CXIFrq-R.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,wBAAe;CAC5C,eAAe,CAAC,iBAAiB;CACjC,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF;;;;ACPD,MAAa,uBAAqC;CAChD,WAAW,WAAW,OAAO,wBAAe;CAC5C,eAAe,CAAC,6BAA6B;CAC7C,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF;;;;ACPD,MAAa,wBAAsC;CACjD,WAAW,WAAW,OAAO,wBAAe;CAC5C,eAAe,CAAC,uBAAuB;CACvC,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF;;;;ACPD,MAAa,uBAAqC;CAChD,WAAW,WAAW,OAAO,wBAAe;CAC5C,eAAe,CAAC,sBAAsB;CACtC,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF;;;ACZD,MAAa,gBAA8B;CACzC,WAAW,WAAW,OAAO,wBAAe;CAC5C,eAAe,CAAC,4BAA4B;CAC5C,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF;;;;ACFD,MAAa,qBAAmC;CAC9C,WAAW,WAAW,OAAO,wBAAe;CAC5C,eAAe,CAAC,qBAAqB;CACrC,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF"}
|