@powerhousedao/vetra 6.2.3-dev.5 → 6.2.3-dev.51

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 (152) hide show
  1. package/dist/codegen/index.d.ts +19 -19
  2. package/dist/codegen/index.d.ts.map +1 -1
  3. package/dist/codegen/index.js +14 -11
  4. package/dist/codegen/index.js.map +1 -1
  5. package/dist/codegen/spec.d.ts +3 -2
  6. package/dist/codegen/spec.js +1 -1
  7. package/dist/{connect-qpJ9OUaH.js → connect-EqImHuZ2.js} +1 -1
  8. package/dist/{connect-qpJ9OUaH.js.map → connect-EqImHuZ2.js.map} +1 -1
  9. package/dist/document-models/app-module/index.d.ts +29 -6
  10. package/dist/document-models/app-module/index.d.ts.map +1 -1
  11. package/dist/document-models/app-module/index.js +4 -4
  12. package/dist/document-models/app-module/index.js.map +1 -1
  13. package/dist/document-models/document-editor/index.d.ts +27 -6
  14. package/dist/document-models/document-editor/index.d.ts.map +1 -1
  15. package/dist/document-models/document-editor/index.js +4 -4
  16. package/dist/document-models/document-editor/index.js.map +1 -1
  17. package/dist/document-models/index.d.ts +7 -6
  18. package/dist/document-models/index.js +5 -5
  19. package/dist/document-models/processor-module/index.d.ts +30 -6
  20. package/dist/document-models/processor-module/index.d.ts.map +1 -1
  21. package/dist/document-models/processor-module/index.js +4 -4
  22. package/dist/document-models/processor-module/index.js.map +1 -1
  23. package/dist/document-models/subgraph-module/index.d.ts +25 -6
  24. package/dist/document-models/subgraph-module/index.d.ts.map +1 -1
  25. package/dist/document-models/subgraph-module/index.js +4 -4
  26. package/dist/document-models/subgraph-module/index.js.map +1 -1
  27. package/dist/document-models/vetra-package/index.d.ts +33 -6
  28. package/dist/document-models/vetra-package/index.d.ts.map +1 -1
  29. package/dist/document-models/vetra-package/index.js +3 -3
  30. package/dist/{editor-LRAwrgdQ.js → editor-BXOEFIDj.js} +8 -7
  31. package/dist/editor-BXOEFIDj.js.map +1 -0
  32. package/dist/{editor-CLbvu3pG.js → editor-C5a0rBQj.js} +5 -5
  33. package/dist/editor-C5a0rBQj.js.map +1 -0
  34. package/dist/{editor-_0gdltOt.js → editor-CiX3Tq3g.js} +4 -4
  35. package/dist/editor-CiX3Tq3g.js.map +1 -0
  36. package/dist/{editor-C13SvgUy.js → editor-DFEeM_dy.js} +3 -3
  37. package/dist/editor-DFEeM_dy.js.map +1 -0
  38. package/dist/{editor-CCdg1mJL.js → editor-DpZVlVN1.js} +4 -4
  39. package/dist/{editor-CCdg1mJL.js.map → editor-DpZVlVN1.js.map} +1 -1
  40. package/dist/{editor-Fgw7attg.js → editor-DpadPeVq.js} +25 -25
  41. package/dist/{editor-Fgw7attg.js.map → editor-DpadPeVq.js.map} +1 -1
  42. package/dist/editors/components/index.d.ts +3 -3
  43. package/dist/editors/components/index.d.ts.map +1 -1
  44. package/dist/editors/components/index.js.map +1 -1
  45. package/dist/editors/hooks/index.d.ts +3 -3
  46. package/dist/editors/hooks/index.d.ts.map +1 -1
  47. package/dist/editors/hooks/index.js +1 -1
  48. package/dist/editors/index.d.ts +7 -8
  49. package/dist/editors/index.d.ts.map +1 -1
  50. package/dist/editors/index.js +1 -1
  51. package/dist/{factory-5eiZohiv.js → factory-BUuO4fIN.js} +12 -4
  52. package/dist/factory-BUuO4fIN.js.map +1 -0
  53. package/dist/{factory-DMl8eB3P.js → factory-BWrWHoS5.js} +3 -3
  54. package/dist/{factory-DMl8eB3P.js.map → factory-BWrWHoS5.js.map} +1 -1
  55. package/dist/{hooks-BIgFcbaF.js → hooks-BbxvC-C3.js} +2 -2
  56. package/dist/{hooks-BIgFcbaF.js.map → hooks-BbxvC-C3.js.map} +1 -1
  57. package/dist/{index-SB-AtQdU.d.ts → index-B52jv-LY.d.ts} +30 -64
  58. package/dist/index-B52jv-LY.d.ts.map +1 -0
  59. package/dist/{index-Dm_gN1DR.d.ts → index-D6Ai0OOc.d.ts} +26 -59
  60. package/dist/index-D6Ai0OOc.d.ts.map +1 -0
  61. package/dist/{index-f_um1g-i.d.ts → index-DPG4u1Ym.d.ts} +26 -62
  62. package/dist/index-DPG4u1Ym.d.ts.map +1 -0
  63. package/dist/{index-B5ijieNt.d.ts → index-DplUuZMT.d.ts} +21 -55
  64. package/dist/index-DplUuZMT.d.ts.map +1 -0
  65. package/dist/index.d.ts +51 -93
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +84 -12
  68. package/dist/index.js.map +1 -1
  69. package/dist/{logger-WHD0fyLm.js → logger-BFxMdimR.js} +1 -1
  70. package/dist/{logger-WHD0fyLm.js.map → logger-BFxMdimR.js.map} +1 -1
  71. package/dist/{module-Chqkdq4U.js → module-2JZcvfVs.js} +3 -3
  72. package/dist/{module-Chqkdq4U.js.map → module-2JZcvfVs.js.map} +1 -1
  73. package/dist/{module-CRq_lUkG.js → module-Caxhis1M.js} +3 -3
  74. package/dist/{module-CRq_lUkG.js.map → module-Caxhis1M.js.map} +1 -1
  75. package/dist/{module-DXT-FMxU.js → module-CdpGkPNN.js} +7 -7
  76. package/dist/{module-DXT-FMxU.js.map → module-CdpGkPNN.js.map} +1 -1
  77. package/dist/{module-ciAK1LUC.d.ts → module-D4lqkHHK.d.ts} +37 -70
  78. package/dist/module-D4lqkHHK.d.ts.map +1 -0
  79. package/dist/{module-bKT_e3CH.js → module-Db8mmgzN.js} +3 -3
  80. package/dist/{module-bKT_e3CH.js.map → module-Db8mmgzN.js.map} +1 -1
  81. package/dist/{module-CRfHlbnq.js → module-FXJRy_1W.js} +2 -2
  82. package/dist/{module-CRfHlbnq.js.map → module-FXJRy_1W.js.map} +1 -1
  83. package/dist/{module-Bx1OEHxF.js → module-hLzF5tCL.js} +3 -3
  84. package/dist/{module-Bx1OEHxF.js.map → module-hLzF5tCL.js.map} +1 -1
  85. package/dist/{ph-factories-CjbIAMgT.js → ph-factories-Bgnr3mK3.js} +2 -2
  86. package/dist/{ph-factories-CjbIAMgT.js.map → ph-factories-Bgnr3mK3.js.map} +1 -1
  87. package/dist/{ph-factories-Ce8oAqs9.js → ph-factories-CgoFCmG0.js} +2 -2
  88. package/dist/{ph-factories-Ce8oAqs9.js.map → ph-factories-CgoFCmG0.js.map} +1 -1
  89. package/dist/{ph-factories-dVj6mIlR.js → ph-factories-DhLtvC7j.js} +2 -2
  90. package/dist/{ph-factories-dVj6mIlR.js.map → ph-factories-DhLtvC7j.js.map} +1 -1
  91. package/dist/{ph-factories-CljTAAVS.js → ph-factories-HuC7_vvF.js} +2 -2
  92. package/dist/{ph-factories-CljTAAVS.js.map → ph-factories-HuC7_vvF.js.map} +1 -1
  93. package/dist/powerhouse.manifest.json +76 -0
  94. package/dist/{processor-trJFuoHh.js → processor-CsiUWh93.js} +11 -4
  95. package/dist/processor-CsiUWh93.js.map +1 -0
  96. package/dist/processors/codegen/index.d.ts +3 -4
  97. package/dist/processors/codegen/index.d.ts.map +1 -1
  98. package/dist/processors/codegen/index.js +2 -2
  99. package/dist/processors/index.d.ts +2 -3
  100. package/dist/processors/index.d.ts.map +1 -1
  101. package/dist/processors/index.js +1 -1
  102. package/dist/processors/index.js.map +1 -1
  103. package/dist/processors/vetra-read-model/index.d.ts +47 -49
  104. package/dist/processors/vetra-read-model/index.d.ts.map +1 -1
  105. package/dist/processors/vetra-read-model/index.js +1 -1
  106. package/dist/{spec-api-DobY5TUJ.js → spec-api-BIJ_jsGp.js} +9 -9
  107. package/dist/{spec-api-DobY5TUJ.js.map → spec-api-BIJ_jsGp.js.map} +1 -1
  108. package/dist/{specs-BeVdfCwg.d.ts → specs-DoTSfuxN.d.ts} +7 -4
  109. package/dist/specs-DoTSfuxN.d.ts.map +1 -0
  110. package/dist/switchboard-Bug8BWrz.js +8 -0
  111. package/dist/{switchboard-Bf0uvxSu.js.map → switchboard-Bug8BWrz.js.map} +1 -1
  112. package/dist/{upgrade-manifest-OlS1ALVv.js → upgrade-manifest-BOZ5nmyK.js} +1 -1
  113. package/dist/{upgrade-manifest-OlS1ALVv.js.map → upgrade-manifest-BOZ5nmyK.js.map} +1 -1
  114. package/dist/{upgrade-manifest-BGuy0v65.js → upgrade-manifest-D7xKGmZc.js} +1 -1
  115. package/dist/{upgrade-manifest-BGuy0v65.js.map → upgrade-manifest-D7xKGmZc.js.map} +1 -1
  116. package/dist/{upgrade-manifest-Ck3Mgwhc.js → upgrade-manifest-DLxSL23q.js} +1 -1
  117. package/dist/{upgrade-manifest-Ck3Mgwhc.js.map → upgrade-manifest-DLxSL23q.js.map} +1 -1
  118. package/dist/{upgrade-manifest-XdOLymuP.js → upgrade-manifest-Dv62Cod7.js} +1 -1
  119. package/dist/{upgrade-manifest-XdOLymuP.js.map → upgrade-manifest-Dv62Cod7.js.map} +1 -1
  120. package/dist/{upgrade-manifest-NaS4SWk9.js → upgrade-manifest-d3LquK-H.js} +1 -1
  121. package/dist/{upgrade-manifest-NaS4SWk9.js.map → upgrade-manifest-d3LquK-H.js.map} +1 -1
  122. package/dist/{useVetraDocument-BlLdlhrQ.js → useVetraDocument-B0k3gNtw.js} +1 -1
  123. package/dist/{useVetraDocument-BlLdlhrQ.js.map → useVetraDocument-B0k3gNtw.js.map} +1 -1
  124. package/dist/{utils-DXCsvCXL.js → utils-876N1Sph.js} +2 -2
  125. package/dist/{utils-DXCsvCXL.js.map → utils-876N1Sph.js.map} +1 -1
  126. package/dist/{utils-CkxGmQ2_.js → utils-Al_SGg2a.js} +2 -2
  127. package/dist/{utils-CkxGmQ2_.js.map → utils-Al_SGg2a.js.map} +1 -1
  128. package/dist/{utils-B4KdjDnp.js → utils-COP7hJ-K.js} +2 -2
  129. package/dist/{utils-B4KdjDnp.js.map → utils-COP7hJ-K.js.map} +1 -1
  130. package/dist/{utils-DmOIDVQo.js → utils-w_21RRK6.js} +3 -3
  131. package/dist/{utils-DmOIDVQo.js.map → utils-w_21RRK6.js.map} +1 -1
  132. package/dist/{vetra-package-Bl6TC4wx.js → vetra-package-DSyRtkdJ.js} +2 -2
  133. package/dist/{vetra-package-Bl6TC4wx.js.map → vetra-package-DSyRtkdJ.js.map} +1 -1
  134. package/package.json +14 -13
  135. package/dist/editor-C13SvgUy.js.map +0 -1
  136. package/dist/editor-CLbvu3pG.js.map +0 -1
  137. package/dist/editor-LRAwrgdQ.js.map +0 -1
  138. package/dist/editor-_0gdltOt.js.map +0 -1
  139. package/dist/factory-5eiZohiv.js.map +0 -1
  140. package/dist/index-B5ijieNt.d.ts.map +0 -1
  141. package/dist/index-Dm_gN1DR.d.ts.map +0 -1
  142. package/dist/index-SB-AtQdU.d.ts.map +0 -1
  143. package/dist/index-f_um1g-i.d.ts.map +0 -1
  144. package/dist/module-ciAK1LUC.d.ts.map +0 -1
  145. package/dist/powerhouse.manifest.d.ts +0 -34
  146. package/dist/powerhouse.manifest.d.ts.map +0 -1
  147. package/dist/powerhouse.manifest.js +0 -86
  148. package/dist/powerhouse.manifest.js.map +0 -1
  149. package/dist/processor-trJFuoHh.js.map +0 -1
  150. package/dist/specs-BeVdfCwg.d.ts.map +0 -1
  151. package/dist/switchboard-Bf0uvxSu.js +0 -8
  152. /package/dist/{chunk-pbuEa-1d.js → rolldown-runtime-D7D4PA-g.js} +0 -0
@@ -1,32 +1,32 @@
1
- import { tt as AppModuleDocument } from "../index-f_um1g-i.js";
2
- import { q as DocumentEditorDocument } from "../index-Dm_gN1DR.js";
3
- import { nt as ProcessorModuleDocument } from "../index-SB-AtQdU.js";
4
- import { B as SubgraphModuleDocument } from "../index-B5ijieNt.js";
5
- import { _ as getDocumentModels, a as specDir, c as ActionInput, d as addActions, f as addActionsAndSave, g as getDocumentModelSchema, h as getDocument, i as saveSpec, l as ActionValidationError, m as deleteDocument, n as getSpecEntry, o as specPath, p as createDocument, r as listSpecDocumentTypes, s as stripLeadingDot, t as SPECS_DIRNAME, u as DocumentModelInfo, v as getDocuments, y as validateActions } from "../specs-BeVdfCwg.js";
1
+ import { $ as AppModuleDocument } from "../index-DPG4u1Ym.js";
2
+ import { G as DocumentEditorDocument } from "../index-D6Ai0OOc.js";
3
+ import { et as ProcessorModuleDocument } from "../index-B52jv-LY.js";
4
+ import { R as SubgraphModuleDocument } from "../index-DplUuZMT.js";
5
+ import { _ as getDocumentModels, a as specDir, c as ActionInput, d as addActions, f as addActionsAndSave, g as getDocumentModelSchema, h as getDocument, i as saveSpec, l as ActionValidationError, m as deleteDocument, n as getSpecEntry, o as specPath, p as createDocument, r as listSpecDocumentTypes, s as stripLeadingDot, t as SPECS_DIRNAME, u as DocumentModelInfo, v as getDocuments, y as validateActions } from "../specs-DoTSfuxN.js";
6
6
  import { DocumentModelDocument } from "@powerhousedao/shared/document-model";
7
7
  import { Project } from "ts-morph";
8
-
9
8
  //#region codegen/extract.d.ts
10
- declare function extractEditorDocuments(project: Project): DocumentEditorDocument[];
11
- declare function extractAppDocuments(project: Project): AppModuleDocument[];
12
- declare function extractProcessorDocuments(project: Project): ProcessorModuleDocument[];
13
- declare function extractSubgraphDocuments(project: Project): SubgraphModuleDocument[];
14
- declare function extractDocumentModelDocuments(project: Project): DocumentModelDocument[];
15
- type ExtractedDocuments = {
9
+ export declare function extractEditorDocuments(project: Project): DocumentEditorDocument[];
10
+ export declare function extractAppDocuments(project: Project): AppModuleDocument[];
11
+ export declare function extractProcessorDocuments(project: Project): ProcessorModuleDocument[];
12
+ export declare function extractSubgraphDocuments(project: Project): SubgraphModuleDocument[];
13
+ export declare function extractDocumentModelDocuments(project: Project): DocumentModelDocument[];
14
+ export type ExtractedDocuments = {
16
15
  documentModels: DocumentModelDocument[];
17
16
  editors: DocumentEditorDocument[];
18
17
  apps: AppModuleDocument[];
19
18
  processors: ProcessorModuleDocument[];
20
19
  subgraphs: SubgraphModuleDocument[];
21
20
  };
22
- declare function extractAllDocuments(project: Project): ExtractedDocuments;
21
+ export declare function extractAllDocuments(project: Project): ExtractedDocuments;
23
22
  //#endregion
24
23
  //#region codegen/generate-from-document.d.ts
25
- declare function generateDocumentModelFromDocument(doc: DocumentModelDocument, project: Project): Promise<void>;
26
- declare function generateEditorFromDocument(doc: DocumentEditorDocument, project: Project): Promise<void>;
27
- declare function generateProcessorFromDocument(doc: ProcessorModuleDocument, project: Project): Promise<void>;
28
- declare function generateSubgraphFromDocument(doc: SubgraphModuleDocument, project: Project): Promise<void>;
29
- declare function generateAppFromDocument(doc: AppModuleDocument, project: Project): Promise<void>;
24
+ export declare function generateDocumentModelFromDocument(doc: DocumentModelDocument, project: Project): Promise<void>;
25
+ export declare function generateEditorFromDocument(doc: DocumentEditorDocument, project: Project): Promise<void>;
26
+ export declare function generateProcessorFromDocument(doc: ProcessorModuleDocument, project: Project): Promise<void>;
27
+ export declare function generateSubgraphFromDocument(doc: SubgraphModuleDocument, project: Project): Promise<void>;
28
+ export declare function generateAppFromDocument(doc: AppModuleDocument, project: Project): Promise<void>;
30
29
  //#endregion
31
- export { ActionInput, ActionValidationError, DocumentModelInfo, ExtractedDocuments, SPECS_DIRNAME, addActions, addActionsAndSave, createDocument, deleteDocument, extractAllDocuments, extractAppDocuments, extractDocumentModelDocuments, extractEditorDocuments, extractProcessorDocuments, extractSubgraphDocuments, generateAppFromDocument, generateDocumentModelFromDocument, generateEditorFromDocument, generateProcessorFromDocument, generateSubgraphFromDocument, getDocument, getDocumentModelSchema, getDocumentModels, getDocuments, getSpecEntry, listSpecDocumentTypes, saveSpec, specDir, specPath, stripLeadingDot, validateActions };
30
+ export { ActionInput, ActionValidationError, DocumentModelInfo, SPECS_DIRNAME, addActions, addActionsAndSave, createDocument, deleteDocument, getDocument, getDocumentModelSchema, getDocumentModels, getDocuments, getSpecEntry, listSpecDocumentTypes, saveSpec, specDir, specPath, stripLeadingDot, validateActions };
31
+ export {};
32
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../codegen/extract.ts","../../codegen/generate-from-document.ts"],"mappings":";;;;;;;;;iBA0DgB,sBAAA,CACd,OAAA,EAAS,OAAA,GACR,sBAAA;AAAA,iBA6Ba,mBAAA,CAAoB,OAAA,EAAS,OAAA,GAAU,iBAAA;AAAA,iBAoBvC,yBAAA,CACd,OAAA,EAAS,OAAA,GACR,uBAAA;AAAA,iBA2Ba,wBAAA,CACd,OAAA,EAAS,OAAA,GACR,sBAAA;AAAA,iBAiBa,6BAAA,CACd,OAAA,EAAS,OAAA,GACR,qBAAA;AAAA,KAsBS,kBAAA;EACV,cAAA,EAAgB,qBAAA;EAChB,OAAA,EAAS,sBAAA;EACT,IAAA,EAAM,iBAAA;EACN,UAAA,EAAY,uBAAA;EACZ,SAAA,EAAW,sBAAA;AAAA;AAAA,iBAMG,mBAAA,CAAoB,OAAA,EAAS,OAAA,GAAU,kBAAA;;;iBCvJjC,iCAAA,CACpB,GAAA,EAAK,qBAAA,EACL,OAAA,EAAS,OAAA,GACR,OAAA;AAAA,iBAImB,0BAAA,CACpB,GAAA,EAAK,sBAAA,EACL,OAAA,EAAS,OAAA,GACR,OAAA;AAAA,iBAemB,6BAAA,CACpB,GAAA,EAAK,uBAAA,EACL,OAAA,EAAS,OAAA,GACR,OAAA;AAAA,iBA+BmB,4BAAA,CACpB,GAAA,EAAK,sBAAA,EACL,OAAA,EAAS,OAAA,GACR,OAAA;AAAA,iBAImB,uBAAA,CACpB,GAAA,EAAK,iBAAA,EACL,OAAA,EAAS,OAAA,GACR,OAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../codegen/extract.ts","../../codegen/generate-from-document.ts"],"mappings":";;;;;;;;wBA0DgB,uBACd,SAAS,UACR;wBA6Ba,oBAAoB,SAAS,UAAU;wBAoBvC,0BACd,SAAS,UACR;wBA2Ba,yBACd,SAAS,UACR;wBAiBa,8BACd,SAAS,UACR;YAsBS;EACV,gBAAgB;EAChB,SAAS;EACT,MAAM;EACN,YAAY;EACZ,WAAW;;wBAMG,oBAAoB,SAAS,UAAU;;;wBCvJjC,kCACpB,KAAK,uBACL,SAAS,UACR;wBAImB,2BACpB,KAAK,wBACL,SAAS,UACR;wBAemB,8BACpB,KAAK,yBACL,SAAS,UACR;wBA+BmB,6BACpB,KAAK,wBACL,SAAS,UACR;wBAImB,wBACpB,KAAK,mBACL,SAAS,UACR"}
@@ -1,8 +1,8 @@
1
- import { t as createAppModuleDocument } from "../ph-factories-Ce8oAqs9.js";
2
- import { t as createDocumentEditorDocument } from "../ph-factories-CjbIAMgT.js";
3
- import { t as createProcessorModuleDocument } from "../ph-factories-CljTAAVS.js";
4
- import { n as createSubgraphModuleDocument } from "../ph-factories-dVj6mIlR.js";
5
- import { a as getDocument, c as getDocuments, d as getSpecEntry, f as listSpecDocumentTypes, g as stripLeadingDot, h as specPath, i as deleteDocument, l as validateActions, m as specDir, n as addActionsAndSave, o as getDocumentModelSchema, p as saveSpec, r as createDocument, s as getDocumentModels, t as addActions, u as SPECS_DIRNAME } from "../spec-api-DobY5TUJ.js";
1
+ import { t as createAppModuleDocument } from "../ph-factories-CgoFCmG0.js";
2
+ import { t as createDocumentEditorDocument } from "../ph-factories-Bgnr3mK3.js";
3
+ import { t as createProcessorModuleDocument } from "../ph-factories-HuC7_vvF.js";
4
+ import { n as createSubgraphModuleDocument } from "../ph-factories-DhLtvC7j.js";
5
+ import { a as getDocument, c as getDocuments, d as getSpecEntry, f as listSpecDocumentTypes, g as stripLeadingDot, h as specPath, i as deleteDocument, l as validateActions, m as specDir, n as addActionsAndSave, o as getDocumentModelSchema, p as saveSpec, r as createDocument, s as getDocumentModels, t as addActions, u as SPECS_DIRNAME } from "../spec-api-BIJ_jsGp.js";
6
6
  import { documentModelDocumentModelModule } from "document-model";
7
7
  import { PROCESSOR_APPS } from "@powerhousedao/shared/processors";
8
8
  import { generateId } from "@powerhousedao/shared/document-model";
@@ -25,14 +25,15 @@ const isDefined = (v) => v != null;
25
25
  function extractEditorDocuments(project) {
26
26
  const { directory: editorsDir } = getOrCreateDirectory(project, "editors");
27
27
  return editorsDir.getDirectories().map((dir) => getEditorMetadata(project, dir.getBaseName())).filter(isDefined).filter(({ documentTypes }) => !documentTypes.includes("powerhouse/document-drive")).map(({ name, documentTypes }) => {
28
- const doc = createDocumentEditorDocument({ global: {
28
+ const global = {
29
29
  name,
30
30
  documentTypes: documentTypes.map((documentType) => ({
31
31
  id: generateId(),
32
32
  documentType
33
33
  })),
34
34
  status: "CONFIRMED"
35
- } });
35
+ };
36
+ const doc = createDocumentEditorDocument({ global });
36
37
  doc.header.name = name;
37
38
  return doc;
38
39
  });
@@ -40,12 +41,13 @@ function extractEditorDocuments(project) {
40
41
  function extractAppDocuments(project) {
41
42
  const { directory: editorsDir } = getOrCreateDirectory(project, "editors");
42
43
  return editorsDir.getDirectories().map((dir) => getAppMetadata(project, dir.getBaseName())).filter(isDefined).map(({ name, allowedDocumentTypes, isDragAndDropEnabled }) => {
43
- const doc = createAppModuleDocument({ global: {
44
+ const global = {
44
45
  name,
45
46
  status: "CONFIRMED",
46
47
  allowedDocumentTypes: allowedDocumentTypes.length > 0 ? allowedDocumentTypes : null,
47
48
  isDragAndDropEnabled: isDragAndDropEnabled ?? true
48
- } });
49
+ };
50
+ const doc = createAppModuleDocument({ global });
49
51
  doc.header.name = name;
50
52
  return doc;
51
53
  });
@@ -53,7 +55,7 @@ function extractAppDocuments(project) {
53
55
  function extractProcessorDocuments(project) {
54
56
  const { directory: processorsDir } = getOrCreateDirectory(project, "processors");
55
57
  return processorsDir.getDirectories().map((dir) => getProcessorMetadata(project, dir.getBaseName())).map(({ processorName, processorApps, processorType, documentTypes }) => {
56
- const doc = createProcessorModuleDocument({ global: {
58
+ const global = {
57
59
  name: processorName,
58
60
  type: processorType === "relationalDb" ? "relational" : processorType,
59
61
  documentTypes: documentTypes.map((documentType) => ({
@@ -62,7 +64,8 @@ function extractProcessorDocuments(project) {
62
64
  })),
63
65
  status: "CONFIRMED",
64
66
  processorApps: [...processorApps]
65
- } });
67
+ };
68
+ const doc = createProcessorModuleDocument({ global });
66
69
  doc.header.name = processorName;
67
70
  return doc;
68
71
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../codegen/extract.ts","../../codegen/generate-from-document.ts"],"sourcesContent":["/**\n * Inverse of the `generate*` functions in `@powerhousedao/codegen`.\n *\n * `generate*` reads source-of-truth documents and writes code into the project.\n * `extract*` reads the project's existing code/files and produces the\n * `powerhouse/*` documents that would have produced that code. Intended as a\n * one-shot migration step toward the documents-as-source-of-truth model: run\n * extraction, save the documents into `specs/`, and from then on regenerate\n * from the specs.\n */\nimport {\n generateId,\n type DocumentModelDocument,\n type DocumentModelGlobalState,\n type DocumentModelPHState,\n} from \"@powerhousedao/shared/document-model\";\nimport {\n getAppMetadata,\n getEditorMetadata,\n getOrCreateDirectory,\n getProcessorMetadata,\n getSubgraphMetadata,\n loadDocumentModelInDir,\n} from \"@powerhousedao/codegen/utils\";\nimport { documentModelDocumentModelModule } from \"document-model\";\nimport { readdirSync } from \"node:fs\";\nimport type { Project } from \"ts-morph\";\n\nconst isDefined = <T>(v: T | undefined | null): v is T => v != null;\n\n/* Import from gen/ directly to bypass the top-level barrel's `hooks.ts`,\n * which pulls in browser-only `@powerhousedao/reactor-browser`. */\nimport {\n createAppModuleDocument,\n type AppModuleDocument,\n type AppModuleGlobalState,\n} from \"../document-models/app-module/v1/gen/index.js\";\nimport {\n createDocumentEditorDocument,\n type DocumentEditorDocument,\n type DocumentEditorGlobalState,\n} from \"../document-models/document-editor/v1/gen/index.js\";\nimport {\n createProcessorModuleDocument,\n type ProcessorModuleDocument,\n type ProcessorModuleGlobalState,\n} from \"../document-models/processor-module/v1/gen/index.js\";\nimport {\n createSubgraphModuleDocument,\n type SubgraphModuleDocument,\n type SubgraphModuleGlobalState,\n} from \"../document-models/subgraph-module/v1/gen/index.js\";\n\n/* Builds a `powerhouse/document-editor` document for each editor in the\n * project's `editors/` directory. Drive editors (powerhouse/document-drive)\n * are excluded — those are handled by `extractAppDocuments`, matching how\n * `generateAllEditors` / `generateAllApps` are split.\n */\nexport function extractEditorDocuments(\n project: Project,\n): DocumentEditorDocument[] {\n const { directory: editorsDir } = getOrCreateDirectory(project, \"editors\");\n return editorsDir\n .getDirectories()\n .map((dir) => getEditorMetadata(project, dir.getBaseName()))\n .filter(isDefined)\n .filter(\n ({ documentTypes }) =>\n !documentTypes.includes(\"powerhouse/document-drive\"),\n )\n .map(({ name, documentTypes }) => {\n const global: DocumentEditorGlobalState = {\n name,\n documentTypes: documentTypes.map((documentType) => ({\n id: generateId(),\n documentType,\n })),\n status: \"CONFIRMED\",\n };\n const doc = createDocumentEditorDocument({ global });\n doc.header.name = name;\n return doc;\n });\n}\n\n/* Builds a `powerhouse/app` document for each drive editor (an editor whose\n * documentTypes include `powerhouse/document-drive`) — same selection\n * predicate used by `generateAllApps`.\n */\nexport function extractAppDocuments(project: Project): AppModuleDocument[] {\n const { directory: editorsDir } = getOrCreateDirectory(project, \"editors\");\n return editorsDir\n .getDirectories()\n .map((dir) => getAppMetadata(project, dir.getBaseName()))\n .filter(isDefined)\n .map(({ name, allowedDocumentTypes, isDragAndDropEnabled }) => {\n const global: AppModuleGlobalState = {\n name,\n status: \"CONFIRMED\",\n allowedDocumentTypes:\n allowedDocumentTypes.length > 0 ? allowedDocumentTypes : null,\n isDragAndDropEnabled: isDragAndDropEnabled ?? true,\n };\n const doc = createAppModuleDocument({ global });\n doc.header.name = name;\n return doc;\n });\n}\n\nexport function extractProcessorDocuments(\n project: Project,\n): ProcessorModuleDocument[] {\n const { directory: processorsDir } = getOrCreateDirectory(\n project,\n \"processors\",\n );\n return processorsDir\n .getDirectories()\n .map((dir) => getProcessorMetadata(project, dir.getBaseName()))\n .map(({ processorName, processorApps, processorType, documentTypes }) => {\n const global: ProcessorModuleGlobalState = {\n name: processorName,\n // Inverse of the mapping in processor-generator.ts: the document\n // model stores `relational`; codegen consumes `relationalDb`.\n type: processorType === \"relationalDb\" ? \"relational\" : processorType,\n documentTypes: documentTypes.map((documentType) => ({\n id: generateId(),\n documentType,\n })),\n status: \"CONFIRMED\",\n processorApps: [...processorApps],\n };\n const doc = createProcessorModuleDocument({ global });\n doc.header.name = processorName;\n return doc;\n });\n}\n\nexport function extractSubgraphDocuments(\n project: Project,\n): SubgraphModuleDocument[] {\n const { directory: subgraphsDir } = getOrCreateDirectory(\n project,\n \"subgraphs\",\n );\n return subgraphsDir\n .getDirectories()\n .map((dir) => getSubgraphMetadata(project, dir.getBaseName()).subgraphName)\n .filter(isDefined)\n .map((name) => {\n const global: SubgraphModuleGlobalState = { name, status: \"CONFIRMED\" };\n const doc = createSubgraphModuleDocument({ global });\n doc.header.name = name;\n return doc;\n });\n}\n\nexport function extractDocumentModelDocuments(\n project: Project,\n): DocumentModelDocument[] {\n const { directory: documentModelsDir } = getOrCreateDirectory(\n project,\n \"document-models\",\n );\n return readdirSync(documentModelsDir.getPath(), { withFileTypes: true })\n .map(loadDocumentModelInDir)\n .filter(isDefined)\n .map(buildDocumentModelDocument);\n}\n\nfunction buildDocumentModelDocument(\n globalState: DocumentModelGlobalState,\n): DocumentModelDocument {\n const state = documentModelDocumentModelModule.utils.createState({\n global: globalState,\n } as Partial<DocumentModelPHState>);\n const doc = documentModelDocumentModelModule.utils.createDocument(state);\n doc.header.name = globalState.name;\n return doc;\n}\n\nexport type ExtractedDocuments = {\n documentModels: DocumentModelDocument[];\n editors: DocumentEditorDocument[];\n apps: AppModuleDocument[];\n processors: ProcessorModuleDocument[];\n subgraphs: SubgraphModuleDocument[];\n};\n\n/* Mirrors `generateAll` — runs every extractor against the project and\n * returns the full set of documents keyed by module type.\n */\nexport function extractAllDocuments(project: Project): ExtractedDocuments {\n return {\n documentModels: extractDocumentModelDocuments(project),\n editors: extractEditorDocuments(project),\n apps: extractAppDocuments(project),\n processors: extractProcessorDocuments(project),\n subgraphs: extractSubgraphDocuments(project),\n };\n}\n","/**\n * Document-driven codegen wrappers. Each function takes a `PHDocument` of the\n * matching vetra type and dispatches to the generic generate* in\n * `@powerhousedao/codegen`. The state→args translation is lifted verbatim from\n * `packages/vetra/processors/codegen/document-handlers/generators/*-generator.ts`\n * so the agent-driven path and the reactor-driven path produce identical\n * output.\n *\n * Callers are responsible for `await project.save()` after one or more\n * `generate*FromDocument` calls — leaving it out here lets a CLI batch\n * multiple specs into a single save.\n */\nimport {\n generateApp,\n generateDocumentModel,\n generateEditor,\n generateProcessor,\n generateSubgraph,\n} from \"@powerhousedao/codegen\";\nimport {\n PROCESSOR_APPS,\n type ProcessorApp,\n type ProcessorApps,\n} from \"@powerhousedao/shared/processors\";\nimport { kebabCase } from \"change-case\";\nimport type { Project } from \"ts-morph\";\n\n/* Import from gen/ directly to bypass the top-level barrel's `hooks.ts`,\n * which pulls in browser-only `@powerhousedao/reactor-browser`. */\nimport type { AppModuleDocument } from \"../document-models/app-module/v1/gen/index.js\";\nimport type {\n DocumentEditorDocument,\n DocumentTypeItem as EditorDocumentTypeItem,\n} from \"../document-models/document-editor/v1/gen/index.js\";\nimport type {\n DocumentTypeItem as ProcessorDocumentTypeItem,\n ProcessorModuleDocument,\n} from \"../document-models/processor-module/v1/gen/index.js\";\nimport type { SubgraphModuleDocument } from \"../document-models/subgraph-module/v1/gen/index.js\";\nimport type { DocumentModelDocument } from \"@powerhousedao/shared/document-model\";\n\nexport async function generateDocumentModelFromDocument(\n doc: DocumentModelDocument,\n project: Project,\n): Promise<void> {\n await generateDocumentModel(doc.state.global, project);\n}\n\nexport async function generateEditorFromDocument(\n doc: DocumentEditorDocument,\n project: Project,\n): Promise<void> {\n const state = doc.state.global;\n const documentTypes = state.documentTypes.map(\n (dt: EditorDocumentTypeItem) => dt.documentType,\n );\n await generateEditor(\n {\n editorName: state.name,\n documentTypes,\n editorId: kebabCase(state.name),\n },\n project,\n );\n}\n\nexport async function generateProcessorFromDocument(\n doc: ProcessorModuleDocument,\n project: Project,\n): Promise<void> {\n const state = doc.state.global;\n // Mirror processor-generator.ts:99-103: document model stores `relational`,\n // codegen expects `relationalDb`.\n let processorType: \"analytics\" | \"relationalDb\";\n if (state.type === \"analytics\") {\n processorType = \"analytics\";\n } else if (state.type === \"relational\") {\n processorType = \"relationalDb\";\n } else {\n throw new Error(`Unsupported processor type: \"${state.type}\"`);\n }\n\n const documentTypes = state.documentTypes.map(\n (dt: ProcessorDocumentTypeItem) => dt.documentType,\n );\n const processorApps = state.processorApps;\n if (!isProcessorApps(processorApps)) {\n throw new Error(`Unsupported processor apps: ${processorApps.join(\", \")}`);\n }\n await generateProcessor(\n {\n processorName: state.name,\n processorType,\n documentTypes,\n processorApps,\n },\n project,\n );\n}\n\nexport async function generateSubgraphFromDocument(\n doc: SubgraphModuleDocument,\n project: Project,\n): Promise<void> {\n await generateSubgraph(doc.state.global.name, project);\n}\n\nexport async function generateAppFromDocument(\n doc: AppModuleDocument,\n project: Project,\n): Promise<void> {\n const state = doc.state.global;\n await generateApp(\n {\n appName: state.name,\n appId: kebabCase(state.name),\n allowedDocumentTypes: state.allowedDocumentTypes ?? [],\n isDragAndDropEnabled: state.isDragAndDropEnabled,\n },\n project,\n );\n}\n\nfunction isProcessorApps(input: readonly string[]): input is ProcessorApps {\n if (input.length === 0) return false;\n if (new Set(input).size !== input.length) return false;\n if (!input.every((i) => PROCESSOR_APPS.includes(i as ProcessorApp))) {\n return false;\n }\n return true;\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../codegen/extract.ts","../../codegen/generate-from-document.ts"],"sourcesContent":["/**\n * Inverse of the `generate*` functions in `@powerhousedao/codegen`.\n *\n * `generate*` reads source-of-truth documents and writes code into the project.\n * `extract*` reads the project's existing code/files and produces the\n * `powerhouse/*` documents that would have produced that code. Intended as a\n * one-shot migration step toward the documents-as-source-of-truth model: run\n * extraction, save the documents into `specs/`, and from then on regenerate\n * from the specs.\n */\nimport {\n generateId,\n type DocumentModelDocument,\n type DocumentModelGlobalState,\n type DocumentModelPHState,\n} from \"@powerhousedao/shared/document-model\";\nimport {\n getAppMetadata,\n getEditorMetadata,\n getOrCreateDirectory,\n getProcessorMetadata,\n getSubgraphMetadata,\n loadDocumentModelInDir,\n} from \"@powerhousedao/codegen/utils\";\nimport { documentModelDocumentModelModule } from \"document-model\";\nimport { readdirSync } from \"node:fs\";\nimport type { Project } from \"ts-morph\";\n\nconst isDefined = <T>(v: T | undefined | null): v is T => v != null;\n\n/* Import from gen/ directly to bypass the top-level barrel's `hooks.ts`,\n * which pulls in browser-only `@powerhousedao/reactor-browser`. */\nimport {\n createAppModuleDocument,\n type AppModuleDocument,\n type AppModuleGlobalState,\n} from \"../document-models/app-module/v1/gen/index.js\";\nimport {\n createDocumentEditorDocument,\n type DocumentEditorDocument,\n type DocumentEditorGlobalState,\n} from \"../document-models/document-editor/v1/gen/index.js\";\nimport {\n createProcessorModuleDocument,\n type ProcessorModuleDocument,\n type ProcessorModuleGlobalState,\n} from \"../document-models/processor-module/v1/gen/index.js\";\nimport {\n createSubgraphModuleDocument,\n type SubgraphModuleDocument,\n type SubgraphModuleGlobalState,\n} from \"../document-models/subgraph-module/v1/gen/index.js\";\n\n/* Builds a `powerhouse/document-editor` document for each editor in the\n * project's `editors/` directory. Drive editors (powerhouse/document-drive)\n * are excluded — those are handled by `extractAppDocuments`, matching how\n * `generateAllEditors` / `generateAllApps` are split.\n */\nexport function extractEditorDocuments(\n project: Project,\n): DocumentEditorDocument[] {\n const { directory: editorsDir } = getOrCreateDirectory(project, \"editors\");\n return editorsDir\n .getDirectories()\n .map((dir) => getEditorMetadata(project, dir.getBaseName()))\n .filter(isDefined)\n .filter(\n ({ documentTypes }) =>\n !documentTypes.includes(\"powerhouse/document-drive\"),\n )\n .map(({ name, documentTypes }) => {\n const global: DocumentEditorGlobalState = {\n name,\n documentTypes: documentTypes.map((documentType) => ({\n id: generateId(),\n documentType,\n })),\n status: \"CONFIRMED\",\n };\n const doc = createDocumentEditorDocument({ global });\n doc.header.name = name;\n return doc;\n });\n}\n\n/* Builds a `powerhouse/app` document for each drive editor (an editor whose\n * documentTypes include `powerhouse/document-drive`) — same selection\n * predicate used by `generateAllApps`.\n */\nexport function extractAppDocuments(project: Project): AppModuleDocument[] {\n const { directory: editorsDir } = getOrCreateDirectory(project, \"editors\");\n return editorsDir\n .getDirectories()\n .map((dir) => getAppMetadata(project, dir.getBaseName()))\n .filter(isDefined)\n .map(({ name, allowedDocumentTypes, isDragAndDropEnabled }) => {\n const global: AppModuleGlobalState = {\n name,\n status: \"CONFIRMED\",\n allowedDocumentTypes:\n allowedDocumentTypes.length > 0 ? allowedDocumentTypes : null,\n isDragAndDropEnabled: isDragAndDropEnabled ?? true,\n };\n const doc = createAppModuleDocument({ global });\n doc.header.name = name;\n return doc;\n });\n}\n\nexport function extractProcessorDocuments(\n project: Project,\n): ProcessorModuleDocument[] {\n const { directory: processorsDir } = getOrCreateDirectory(\n project,\n \"processors\",\n );\n return processorsDir\n .getDirectories()\n .map((dir) => getProcessorMetadata(project, dir.getBaseName()))\n .map(({ processorName, processorApps, processorType, documentTypes }) => {\n const global: ProcessorModuleGlobalState = {\n name: processorName,\n // Inverse of the mapping in processor-generator.ts: the document\n // model stores `relational`; codegen consumes `relationalDb`.\n type: processorType === \"relationalDb\" ? \"relational\" : processorType,\n documentTypes: documentTypes.map((documentType) => ({\n id: generateId(),\n documentType,\n })),\n status: \"CONFIRMED\",\n processorApps: [...processorApps],\n };\n const doc = createProcessorModuleDocument({ global });\n doc.header.name = processorName;\n return doc;\n });\n}\n\nexport function extractSubgraphDocuments(\n project: Project,\n): SubgraphModuleDocument[] {\n const { directory: subgraphsDir } = getOrCreateDirectory(\n project,\n \"subgraphs\",\n );\n return subgraphsDir\n .getDirectories()\n .map((dir) => getSubgraphMetadata(project, dir.getBaseName()).subgraphName)\n .filter(isDefined)\n .map((name) => {\n const global: SubgraphModuleGlobalState = { name, status: \"CONFIRMED\" };\n const doc = createSubgraphModuleDocument({ global });\n doc.header.name = name;\n return doc;\n });\n}\n\nexport function extractDocumentModelDocuments(\n project: Project,\n): DocumentModelDocument[] {\n const { directory: documentModelsDir } = getOrCreateDirectory(\n project,\n \"document-models\",\n );\n return readdirSync(documentModelsDir.getPath(), { withFileTypes: true })\n .map(loadDocumentModelInDir)\n .filter(isDefined)\n .map(buildDocumentModelDocument);\n}\n\nfunction buildDocumentModelDocument(\n globalState: DocumentModelGlobalState,\n): DocumentModelDocument {\n const state = documentModelDocumentModelModule.utils.createState({\n global: globalState,\n } as Partial<DocumentModelPHState>);\n const doc = documentModelDocumentModelModule.utils.createDocument(state);\n doc.header.name = globalState.name;\n return doc;\n}\n\nexport type ExtractedDocuments = {\n documentModels: DocumentModelDocument[];\n editors: DocumentEditorDocument[];\n apps: AppModuleDocument[];\n processors: ProcessorModuleDocument[];\n subgraphs: SubgraphModuleDocument[];\n};\n\n/* Mirrors `generateAll` — runs every extractor against the project and\n * returns the full set of documents keyed by module type.\n */\nexport function extractAllDocuments(project: Project): ExtractedDocuments {\n return {\n documentModels: extractDocumentModelDocuments(project),\n editors: extractEditorDocuments(project),\n apps: extractAppDocuments(project),\n processors: extractProcessorDocuments(project),\n subgraphs: extractSubgraphDocuments(project),\n };\n}\n","/**\n * Document-driven codegen wrappers. Each function takes a `PHDocument` of the\n * matching vetra type and dispatches to the generic generate* in\n * `@powerhousedao/codegen`. The state→args translation is lifted verbatim from\n * `packages/vetra/processors/codegen/document-handlers/generators/*-generator.ts`\n * so the agent-driven path and the reactor-driven path produce identical\n * output.\n *\n * Callers are responsible for `await project.save()` after one or more\n * `generate*FromDocument` calls — leaving it out here lets a CLI batch\n * multiple specs into a single save.\n */\nimport {\n generateApp,\n generateDocumentModel,\n generateEditor,\n generateProcessor,\n generateSubgraph,\n} from \"@powerhousedao/codegen\";\nimport {\n PROCESSOR_APPS,\n type ProcessorApp,\n type ProcessorApps,\n} from \"@powerhousedao/shared/processors\";\nimport { kebabCase } from \"change-case\";\nimport type { Project } from \"ts-morph\";\n\n/* Import from gen/ directly to bypass the top-level barrel's `hooks.ts`,\n * which pulls in browser-only `@powerhousedao/reactor-browser`. */\nimport type { AppModuleDocument } from \"../document-models/app-module/v1/gen/index.js\";\nimport type {\n DocumentEditorDocument,\n DocumentTypeItem as EditorDocumentTypeItem,\n} from \"../document-models/document-editor/v1/gen/index.js\";\nimport type {\n DocumentTypeItem as ProcessorDocumentTypeItem,\n ProcessorModuleDocument,\n} from \"../document-models/processor-module/v1/gen/index.js\";\nimport type { SubgraphModuleDocument } from \"../document-models/subgraph-module/v1/gen/index.js\";\nimport type { DocumentModelDocument } from \"@powerhousedao/shared/document-model\";\n\nexport async function generateDocumentModelFromDocument(\n doc: DocumentModelDocument,\n project: Project,\n): Promise<void> {\n await generateDocumentModel(doc.state.global, project);\n}\n\nexport async function generateEditorFromDocument(\n doc: DocumentEditorDocument,\n project: Project,\n): Promise<void> {\n const state = doc.state.global;\n const documentTypes = state.documentTypes.map(\n (dt: EditorDocumentTypeItem) => dt.documentType,\n );\n await generateEditor(\n {\n editorName: state.name,\n documentTypes,\n editorId: kebabCase(state.name),\n },\n project,\n );\n}\n\nexport async function generateProcessorFromDocument(\n doc: ProcessorModuleDocument,\n project: Project,\n): Promise<void> {\n const state = doc.state.global;\n // Mirror processor-generator.ts:99-103: document model stores `relational`,\n // codegen expects `relationalDb`.\n let processorType: \"analytics\" | \"relationalDb\";\n if (state.type === \"analytics\") {\n processorType = \"analytics\";\n } else if (state.type === \"relational\") {\n processorType = \"relationalDb\";\n } else {\n throw new Error(`Unsupported processor type: \"${state.type}\"`);\n }\n\n const documentTypes = state.documentTypes.map(\n (dt: ProcessorDocumentTypeItem) => dt.documentType,\n );\n const processorApps = state.processorApps;\n if (!isProcessorApps(processorApps)) {\n throw new Error(`Unsupported processor apps: ${processorApps.join(\", \")}`);\n }\n await generateProcessor(\n {\n processorName: state.name,\n processorType,\n documentTypes,\n processorApps,\n },\n project,\n );\n}\n\nexport async function generateSubgraphFromDocument(\n doc: SubgraphModuleDocument,\n project: Project,\n): Promise<void> {\n await generateSubgraph(doc.state.global.name, project);\n}\n\nexport async function generateAppFromDocument(\n doc: AppModuleDocument,\n project: Project,\n): Promise<void> {\n const state = doc.state.global;\n await generateApp(\n {\n appName: state.name,\n appId: kebabCase(state.name),\n allowedDocumentTypes: state.allowedDocumentTypes ?? [],\n isDragAndDropEnabled: state.isDragAndDropEnabled,\n },\n project,\n );\n}\n\nfunction isProcessorApps(input: readonly string[]): input is ProcessorApps {\n if (input.length === 0) return false;\n if (new Set(input).size !== input.length) return false;\n if (!input.every((i) => PROCESSOR_APPS.includes(i as ProcessorApp))) {\n return false;\n }\n return true;\n}\n"],"mappings":"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"}
@@ -1,2 +1,3 @@
1
- import { _ as getDocumentModels, a as specDir, c as ActionInput, d as addActions, f as addActionsAndSave, g as getDocumentModelSchema, h as getDocument, i as saveSpec, l as ActionValidationError, m as deleteDocument, n as getSpecEntry, o as specPath, p as createDocument, r as listSpecDocumentTypes, s as stripLeadingDot, t as SPECS_DIRNAME, u as DocumentModelInfo, v as getDocuments, y as validateActions } from "../specs-BeVdfCwg.js";
2
- export { ActionInput, ActionValidationError, DocumentModelInfo, SPECS_DIRNAME, addActions, addActionsAndSave, createDocument, deleteDocument, getDocument, getDocumentModelSchema, getDocumentModels, getDocuments, getSpecEntry, listSpecDocumentTypes, saveSpec, specDir, specPath, stripLeadingDot, validateActions };
1
+ import { _ as getDocumentModels, a as specDir, c as ActionInput, d as addActions, f as addActionsAndSave, g as getDocumentModelSchema, h as getDocument, i as saveSpec, l as ActionValidationError, m as deleteDocument, n as getSpecEntry, o as specPath, p as createDocument, r as listSpecDocumentTypes, s as stripLeadingDot, t as SPECS_DIRNAME, u as DocumentModelInfo, v as getDocuments, y as validateActions } from "../specs-DoTSfuxN.js";
2
+ export { ActionInput, ActionValidationError, DocumentModelInfo, SPECS_DIRNAME, addActions, addActionsAndSave, createDocument, deleteDocument, getDocument, getDocumentModelSchema, getDocumentModels, getDocuments, getSpecEntry, listSpecDocumentTypes, saveSpec, specDir, specPath, stripLeadingDot, validateActions };
3
+ export {};
@@ -1,2 +1,2 @@
1
- import { a as getDocument, c as getDocuments, d as getSpecEntry, f as listSpecDocumentTypes, g as stripLeadingDot, h as specPath, i as deleteDocument, l as validateActions, m as specDir, n as addActionsAndSave, o as getDocumentModelSchema, p as saveSpec, r as createDocument, s as getDocumentModels, t as addActions, u as SPECS_DIRNAME } from "../spec-api-DobY5TUJ.js";
1
+ import { a as getDocument, c as getDocuments, d as getSpecEntry, f as listSpecDocumentTypes, g as stripLeadingDot, h as specPath, i as deleteDocument, l as validateActions, m as specDir, n as addActionsAndSave, o as getDocumentModelSchema, p as saveSpec, r as createDocument, s as getDocumentModels, t as addActions, u as SPECS_DIRNAME } from "../spec-api-BIJ_jsGp.js";
2
2
  export { SPECS_DIRNAME, addActions, addActionsAndSave, createDocument, deleteDocument, getDocument, getDocumentModelSchema, getDocumentModels, getDocuments, getSpecEntry, listSpecDocumentTypes, saveSpec, specDir, specPath, stripLeadingDot, validateActions };
@@ -3,4 +3,4 @@ const processorFactoryBuilders = [];
3
3
  //#endregion
4
4
  export { processorFactoryBuilders };
5
5
 
6
- //# sourceMappingURL=connect-qpJ9OUaH.js.map
6
+ //# sourceMappingURL=connect-EqImHuZ2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connect-qpJ9OUaH.js","names":[],"sources":["../processors/connect.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { ProcessorFactoryBuilder } from \"@powerhousedao/reactor-browser\";\n\nexport const processorFactoryBuilders: ProcessorFactoryBuilder[] = [];\n"],"mappings":";AAMA,MAAa,2BAAsD,EAAE"}
1
+ {"version":3,"file":"connect-EqImHuZ2.js","names":[],"sources":["../processors/connect.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { ProcessorFactoryBuilder } from \"@powerhousedao/reactor-browser\";\n\nexport const processorFactoryBuilders: ProcessorFactoryBuilder[] = [];\n"],"mappings":";AAMA,MAAa,2BAAsD,CAAC"}
@@ -1,12 +1,35 @@
1
- import { $ as SetAppStatusAction, A as assertIsAppModuleDocument, B as removeDocumentType, C as defaultGlobalState, D as AppModuleDocumentHeaderSchema, E as appModuleDocumentType, F as AppModuleDndOperationsOperations, G as AppModuleBaseOperationsOperations, H as setAppStatus, I as creators_d_exports$1, J as SetDragAndDropEnabledAction, K as AppModuleAction, L as setDragAndDropEnabled, M as isAppModuleDocument, N as isAppModuleState, O as AppModuleDocumentSchema, P as documentModel, Q as SetAppNameAction, R as addDocumentType, S as createState, T as defaultPHState, U as setDocumentTypes, V as setAppName, W as AppModuleController, X as AppModuleBaseOperationsAction, Y as AddDocumentTypeAction, Z as RemoveDocumentTypeAction, _ as useAppModuleDocumentsInSelectedDrive, _t as SetDocumentTypesInput, a as RemoveDocumentTypeInputSchema, at as AppModuleState, b as actions, c as SetDocumentTypesInputSchema, ct as InputMaybe, d as definedNonNullAnySchema, dt as MakeOptional, et as SetDocumentTypesAction, f as isDefinedNonNullAny, ft as Maybe, g as useAppModuleDocumentById, gt as SetAppStatusInput, h as AppModule, ht as SetAppNameInput, i as AppModuleStateSchema, it as AddDocumentTypeInput, j as assertIsAppModuleState, k as AppModulePHStateSchema, l as SetDragAndDropEnabledInputSchema, lt as MakeEmpty, m as utils, mt as Scalars, n as initialLocalState, nt as AppModuleLocalState, o as SetAppNameInputSchema, ot as Exact, p as reducer, pt as RemoveDocumentTypeInput, q as AppModuleDndOperationsAction, r as AddDocumentTypeInputSchema, rt as AppModulePHState, s as SetAppStatusInputSchema, st as Incremental, t as initialGlobalState, tt as AppModuleDocument, u as StatusTypeSchema, ut as MakeMaybe, v as useAppModuleDocumentsInSelectedFolder, vt as SetDragAndDropEnabledInput, w as defaultLocalState, x as createAppModuleDocument, y as useSelectedAppModuleDocument, yt as StatusType, z as creators_d_exports } from "../../index-f_um1g-i.js";
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
2
  import { UpgradeManifest } from "document-model";
3
-
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
4
26
  //#region document-models/app-module/upgrades/versions.d.ts
5
- declare const supportedVersions: readonly [1];
6
- declare const latestVersion: 1;
27
+ export declare const supportedVersions: readonly [1];
28
+ export declare const latestVersion: 1;
7
29
  //#endregion
8
30
  //#region document-models/app-module/upgrades/upgrade-manifest.d.ts
9
- declare const appModuleUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
31
+ export declare const appModuleUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
10
32
  //#endregion
11
- export { AddDocumentTypeAction, AddDocumentTypeInput, AddDocumentTypeInputSchema, AppModule, AppModuleAction, AppModuleBaseOperationsAction, AppModuleBaseOperationsOperations, AppModuleController, AppModuleDndOperationsAction, AppModuleDndOperationsOperations, AppModuleDocument, AppModuleDocumentHeaderSchema, AppModuleDocumentSchema, AppModuleState as AppModuleGlobalState, AppModuleState, AppModuleLocalState, 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 };
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 };
34
+ export {};
12
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../document-models/app-module/upgrades/versions.ts","../../../document-models/app-module/upgrades/upgrade-manifest.ts"],"mappings":";;;;cAAa,iBAAA;AAAA,cAEA,aAAA;;;cCKA,wBAAA,EAA0B,eAAA,QAC9B,iBAAA"}
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,7 +1,7 @@
1
- import { A as definedNonNullAnySchema, C as AppModuleStateSchema, D as SetDocumentTypesInputSchema, E as SetAppStatusInputSchema, O as SetDragAndDropEnabledInputSchema, S as AddDocumentTypeInputSchema, T as SetAppNameInputSchema, _ as creators_exports, a as AppModuleDocumentSchema, b as setAppStatus, c as assertIsAppModuleState, d as appModuleDocumentType, f as reducer, g as addDocumentType, h as setDragAndDropEnabled, i as AppModuleDocumentHeaderSchema, j as isDefinedNonNullAny, k as StatusTypeSchema, l as isAppModuleDocument, m as creators_exports$1, n as initialLocalState, o as AppModulePHStateSchema, p as actions, s as assertIsAppModuleDocument, t as initialGlobalState, u as isAppModuleState, v as removeDocumentType, w as RemoveDocumentTypeInputSchema, x as setDocumentTypes, y as setAppName } from "../../utils-B4KdjDnp.js";
2
- import { n as utils, r as documentModel, t as AppModule } from "../../module-CRq_lUkG.js";
3
- import { a as defaultPHState, i as defaultLocalState, n as createState, r as defaultGlobalState, t as createAppModuleDocument } from "../../ph-factories-Ce8oAqs9.js";
4
- import { n as latestVersion, r as supportedVersions, t as appModuleUpgradeManifest } from "../../upgrade-manifest-Ck3Mgwhc.js";
1
+ import { A as definedNonNullAnySchema, C as AppModuleStateSchema, D as SetDocumentTypesInputSchema, E as SetAppStatusInputSchema, O as SetDragAndDropEnabledInputSchema, S as AddDocumentTypeInputSchema, T as SetAppNameInputSchema, _ as creators_exports, a as AppModuleDocumentSchema, b as setAppStatus, c as assertIsAppModuleState, d as appModuleDocumentType, f as reducer, g as addDocumentType, h as setDragAndDropEnabled, i as AppModuleDocumentHeaderSchema, j as isDefinedNonNullAny, k as StatusTypeSchema, l as isAppModuleDocument, m as creators_exports$1, n as initialLocalState, o as AppModulePHStateSchema, p as actions, s as assertIsAppModuleDocument, t as initialGlobalState, u as isAppModuleState, v as removeDocumentType, w as RemoveDocumentTypeInputSchema, x as setDocumentTypes, y as setAppName } from "../../utils-COP7hJ-K.js";
2
+ import { n as utils, r as documentModel, t as AppModule } from "../../module-Caxhis1M.js";
3
+ import { a as defaultPHState, i as defaultLocalState, n as createState, r as defaultGlobalState, t as createAppModuleDocument } from "../../ph-factories-CgoFCmG0.js";
4
+ import { n as latestVersion, r as supportedVersions, t as appModuleUpgradeManifest } from "../../upgrade-manifest-DLxSL23q.js";
5
5
  import { PHDocumentController } from "document-model";
6
6
  import { useDocumentById, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useSelectedDocument } from "@powerhousedao/reactor-browser";
7
7
  //#region document-models/app-module/v1/gen/controller.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../document-models/app-module/v1/gen/controller.ts","../../../document-models/app-module/v1/hooks.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { PHDocumentController } from \"document-model\";\nimport { AppModule } from \"../module.js\";\nimport type { AppModuleAction, AppModulePHState } from \"./types.js\";\n\nexport const AppModuleController = PHDocumentController.forDocumentModel<\n AppModulePHState,\n AppModuleAction\n>(AppModule);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport {\n useDocumentById,\n useDocumentsInSelectedDrive,\n useDocumentsInSelectedFolder,\n useSelectedDocument,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n AppModuleAction,\n AppModuleDocument,\n} from \"document-models/app-module/v1\";\nimport {\n assertIsAppModuleDocument,\n isAppModuleDocument,\n} from \"./gen/document-schema.js\";\n\n/** Hook to get a AppModule document by its id */\nexport function useAppModuleDocumentById(\n documentId: string | null | undefined,\n):\n | [AppModuleDocument, DocumentDispatch<AppModuleAction>]\n | [undefined, undefined] {\n const [document, dispatch] = useDocumentById(documentId);\n if (!isAppModuleDocument(document)) return [undefined, undefined];\n return [document, dispatch];\n}\n\n/** Hook to get the selected AppModule document */\nexport function useSelectedAppModuleDocument(): [\n AppModuleDocument,\n DocumentDispatch<AppModuleAction>,\n] {\n const [document, dispatch] = useSelectedDocument();\n\n assertIsAppModuleDocument(document);\n return [document, dispatch] as const;\n}\n\n/** Hook to get all AppModule documents in the selected drive */\nexport function useAppModuleDocumentsInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n return documentsInSelectedDrive?.filter(isAppModuleDocument);\n}\n\n/** Hook to get all AppModule documents in the selected folder */\nexport function useAppModuleDocumentsInSelectedFolder() {\n const documentsInSelectedFolder = useDocumentsInSelectedFolder();\n return documentsInSelectedFolder?.filter(isAppModuleDocument);\n}\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,sBAAsB,qBAAqB,iBAGtD,UAAU;;;;ACUZ,SAAgB,yBACd,YAGyB;CACzB,MAAM,CAAC,UAAU,YAAY,gBAAgB,WAAW;AACxD,KAAI,CAAC,oBAAoB,SAAS,CAAE,QAAO,CAAC,KAAA,GAAW,KAAA,EAAU;AACjE,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,+BAGd;CACA,MAAM,CAAC,UAAU,YAAY,qBAAqB;AAElD,2BAA0B,SAAS;AACnC,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,uCAAuC;AAErD,QADiC,6BAA6B,EAC7B,OAAO,oBAAoB;;;AAI9D,SAAgB,wCAAwC;AAEtD,QADkC,8BAA8B,EAC9B,OAAO,oBAAoB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../document-models/app-module/v1/gen/controller.ts","../../../document-models/app-module/v1/hooks.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { PHDocumentController } from \"document-model\";\nimport { AppModule } from \"../module.js\";\nimport type { AppModuleAction, AppModulePHState } from \"./types.js\";\n\nexport const AppModuleController = PHDocumentController.forDocumentModel<\n AppModulePHState,\n AppModuleAction\n>(AppModule);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport {\n useDocumentById,\n useDocumentsInSelectedDrive,\n useDocumentsInSelectedFolder,\n useSelectedDocument,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n AppModuleAction,\n AppModuleDocument,\n} from \"document-models/app-module/v1\";\nimport {\n assertIsAppModuleDocument,\n isAppModuleDocument,\n} from \"./gen/document-schema.js\";\n\n/** Hook to get a AppModule document by its id */\nexport function useAppModuleDocumentById(\n documentId: string | null | undefined,\n):\n | [AppModuleDocument, DocumentDispatch<AppModuleAction>]\n | [undefined, undefined] {\n const [document, dispatch] = useDocumentById(documentId);\n if (!isAppModuleDocument(document)) return [undefined, undefined];\n return [document, dispatch];\n}\n\n/** Hook to get the selected AppModule document */\nexport function useSelectedAppModuleDocument(): [\n AppModuleDocument,\n DocumentDispatch<AppModuleAction>,\n] {\n const [document, dispatch] = useSelectedDocument();\n\n assertIsAppModuleDocument(document);\n return [document, dispatch] as const;\n}\n\n/** Hook to get all AppModule documents in the selected drive */\nexport function useAppModuleDocumentsInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n return documentsInSelectedDrive?.filter(isAppModuleDocument);\n}\n\n/** Hook to get all AppModule documents in the selected folder */\nexport function useAppModuleDocumentsInSelectedFolder() {\n const documentsInSelectedFolder = useDocumentsInSelectedFolder();\n return documentsInSelectedFolder?.filter(isAppModuleDocument);\n}\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,sBAAsB,qBAAqB,iBAGtD,SAAS;;;;ACUX,SAAgB,yBACd,YAGyB;CACzB,MAAM,CAAC,UAAU,YAAY,gBAAgB,UAAU;CACvD,IAAI,CAAC,oBAAoB,QAAQ,GAAG,OAAO,CAAC,KAAA,GAAW,KAAA,CAAS;CAChE,OAAO,CAAC,UAAU,QAAQ;AAC5B;;AAGA,SAAgB,+BAGd;CACA,MAAM,CAAC,UAAU,YAAY,oBAAoB;CAEjD,0BAA0B,QAAQ;CAClC,OAAO,CAAC,UAAU,QAAQ;AAC5B;;AAGA,SAAgB,uCAAuC;CAErD,OADiC,4BACH,CAAC,EAAE,OAAO,mBAAmB;AAC7D;;AAGA,SAAgB,wCAAwC;CAEtD,OADkC,6BACH,CAAC,EAAE,OAAO,mBAAmB;AAC9D"}
@@ -1,12 +1,33 @@
1
- import { $ as Exact, A as assertIsDocumentEditorState, B as DocumentEditorBaseOperationsOperations, C as defaultLocalState, D as DocumentEditorDocumentSchema, E as DocumentEditorDocumentHeaderSchema, F as creators_d_exports, G as SetEditorNameAction, H as AddDocumentTypeAction, I as removeDocumentType, J as DocumentEditorLocalState, K as SetEditorStatusAction, L as setEditorName, M as isDocumentEditorState, N as documentModel, O as DocumentEditorPHStateSchema, P as addDocumentType, Q as DocumentTypeItem, R as setEditorStatus, S as defaultGlobalState, T as documentEditorDocumentType, U as DocumentEditorBaseOperationsAction, V as DocumentEditorAction, W as RemoveDocumentTypeAction, X as AddDocumentTypeInput, Y as DocumentEditorPHState, Z as DocumentEditorState, _ as useDocumentEditorDocumentsInSelectedFolder, a as DocumentTypeItemSchema, at as Maybe, b as createDocumentEditorDocument, c as SetEditorStatusInputSchema, ct as SetEditorNameInput, d as isDefinedNonNullAny, et as Incremental, f as reducer, g as useDocumentEditorDocumentsInSelectedDrive, h as useDocumentEditorDocumentById, i as DocumentEditorStateSchema, it as MakeOptional, j as isDocumentEditorDocument, k as assertIsDocumentEditorDocument, l as StatusTypeSchema, lt as SetEditorStatusInput, m as DocumentEditor, n as initialLocalState, nt as MakeEmpty, o as RemoveDocumentTypeInputSchema, ot as RemoveDocumentTypeInput, p as utils, q as DocumentEditorDocument, r as AddDocumentTypeInputSchema, rt as MakeMaybe, s as SetEditorNameInputSchema, st as Scalars, t as initialGlobalState, tt as InputMaybe, u as definedNonNullAnySchema, ut as StatusType, v as useSelectedDocumentEditorDocument, w as defaultPHState, x as createState, y as actions, z as DocumentEditorController } from "../../index-Dm_gN1DR.js";
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
2
  import { UpgradeManifest } from "document-model";
3
-
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
4
24
  //#region document-models/document-editor/upgrades/versions.d.ts
5
- declare const supportedVersions: readonly [1];
6
- declare const latestVersion: 1;
25
+ export declare const supportedVersions: readonly [1];
26
+ export declare const latestVersion: 1;
7
27
  //#endregion
8
28
  //#region document-models/document-editor/upgrades/upgrade-manifest.d.ts
9
- declare const documentEditorUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
29
+ export declare const documentEditorUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
10
30
  //#endregion
11
- export { AddDocumentTypeAction, AddDocumentTypeInput, AddDocumentTypeInputSchema, DocumentEditor, DocumentEditorAction, DocumentEditorBaseOperationsAction, DocumentEditorBaseOperationsOperations, DocumentEditorController, DocumentEditorDocument, DocumentEditorDocumentHeaderSchema, DocumentEditorDocumentSchema, DocumentEditorState as DocumentEditorGlobalState, DocumentEditorState, DocumentEditorLocalState, 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 };
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 };
32
+ export {};
12
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../document-models/document-editor/upgrades/versions.ts","../../../document-models/document-editor/upgrades/upgrade-manifest.ts"],"mappings":";;;;cAAa,iBAAA;AAAA,cAEA,aAAA;;;cCKA,6BAAA,EAA+B,eAAA,QACnC,iBAAA"}
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,7 +1,7 @@
1
- import { C as SetEditorNameInputSchema, D as isDefinedNonNullAny, E as definedNonNullAnySchema, S as RemoveDocumentTypeInputSchema, T as StatusTypeSchema, _ as setEditorName, a as DocumentEditorDocumentSchema, b as DocumentEditorStateSchema, c as assertIsDocumentEditorState, d as documentEditorDocumentType, f as reducer, g as removeDocumentType, h as creators_exports, i as DocumentEditorDocumentHeaderSchema, l as isDocumentEditorDocument, m as addDocumentType, n as initialLocalState, o as DocumentEditorPHStateSchema, p as actions, s as assertIsDocumentEditorDocument, t as initialGlobalState, u as isDocumentEditorState, v as setEditorStatus, w as SetEditorStatusInputSchema, x as DocumentTypeItemSchema, y as AddDocumentTypeInputSchema } from "../../utils-DXCsvCXL.js";
2
- import { n as utils, r as documentModel, t as DocumentEditor } from "../../module-Chqkdq4U.js";
3
- import { a as defaultPHState, i as defaultLocalState, n as createState, r as defaultGlobalState, t as createDocumentEditorDocument } from "../../ph-factories-CjbIAMgT.js";
4
- import { n as latestVersion, r as supportedVersions, t as documentEditorUpgradeManifest } from "../../upgrade-manifest-BGuy0v65.js";
1
+ import { C as SetEditorNameInputSchema, D as isDefinedNonNullAny, E as definedNonNullAnySchema, S as RemoveDocumentTypeInputSchema, T as StatusTypeSchema, _ as setEditorName, a as DocumentEditorDocumentSchema, b as DocumentEditorStateSchema, c as assertIsDocumentEditorState, d as documentEditorDocumentType, f as reducer, g as removeDocumentType, h as creators_exports, i as DocumentEditorDocumentHeaderSchema, l as isDocumentEditorDocument, m as addDocumentType, n as initialLocalState, o as DocumentEditorPHStateSchema, p as actions, s as assertIsDocumentEditorDocument, t as initialGlobalState, u as isDocumentEditorState, v as setEditorStatus, w as SetEditorStatusInputSchema, x as DocumentTypeItemSchema, y as AddDocumentTypeInputSchema } from "../../utils-876N1Sph.js";
2
+ import { n as utils, r as documentModel, t as DocumentEditor } from "../../module-2JZcvfVs.js";
3
+ import { a as defaultPHState, i as defaultLocalState, n as createState, r as defaultGlobalState, t as createDocumentEditorDocument } from "../../ph-factories-Bgnr3mK3.js";
4
+ import { n as latestVersion, r as supportedVersions, t as documentEditorUpgradeManifest } from "../../upgrade-manifest-D7xKGmZc.js";
5
5
  import { PHDocumentController } from "document-model";
6
6
  import { useDocumentById, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useSelectedDocument } from "@powerhousedao/reactor-browser";
7
7
  //#region document-models/document-editor/v1/gen/controller.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../document-models/document-editor/v1/gen/controller.ts","../../../document-models/document-editor/v1/hooks.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { PHDocumentController } from \"document-model\";\nimport { DocumentEditor } from \"../module.js\";\nimport type { DocumentEditorAction, DocumentEditorPHState } from \"./types.js\";\n\nexport const DocumentEditorController = PHDocumentController.forDocumentModel<\n DocumentEditorPHState,\n DocumentEditorAction\n>(DocumentEditor);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport {\n useDocumentById,\n useDocumentsInSelectedDrive,\n useDocumentsInSelectedFolder,\n useSelectedDocument,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n DocumentEditorAction,\n DocumentEditorDocument,\n} from \"document-models/document-editor/v1\";\nimport {\n assertIsDocumentEditorDocument,\n isDocumentEditorDocument,\n} from \"./gen/document-schema.js\";\n\n/** Hook to get a DocumentEditor document by its id */\nexport function useDocumentEditorDocumentById(\n documentId: string | null | undefined,\n):\n | [DocumentEditorDocument, DocumentDispatch<DocumentEditorAction>]\n | [undefined, undefined] {\n const [document, dispatch] = useDocumentById(documentId);\n if (!isDocumentEditorDocument(document)) return [undefined, undefined];\n return [document, dispatch];\n}\n\n/** Hook to get the selected DocumentEditor document */\nexport function useSelectedDocumentEditorDocument(): [\n DocumentEditorDocument,\n DocumentDispatch<DocumentEditorAction>,\n] {\n const [document, dispatch] = useSelectedDocument();\n\n assertIsDocumentEditorDocument(document);\n return [document, dispatch] as const;\n}\n\n/** Hook to get all DocumentEditor documents in the selected drive */\nexport function useDocumentEditorDocumentsInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n return documentsInSelectedDrive?.filter(isDocumentEditorDocument);\n}\n\n/** Hook to get all DocumentEditor documents in the selected folder */\nexport function useDocumentEditorDocumentsInSelectedFolder() {\n const documentsInSelectedFolder = useDocumentsInSelectedFolder();\n return documentsInSelectedFolder?.filter(isDocumentEditorDocument);\n}\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,2BAA2B,qBAAqB,iBAG3D,eAAe;;;;ACUjB,SAAgB,8BACd,YAGyB;CACzB,MAAM,CAAC,UAAU,YAAY,gBAAgB,WAAW;AACxD,KAAI,CAAC,yBAAyB,SAAS,CAAE,QAAO,CAAC,KAAA,GAAW,KAAA,EAAU;AACtE,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,oCAGd;CACA,MAAM,CAAC,UAAU,YAAY,qBAAqB;AAElD,gCAA+B,SAAS;AACxC,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,4CAA4C;AAE1D,QADiC,6BAA6B,EAC7B,OAAO,yBAAyB;;;AAInE,SAAgB,6CAA6C;AAE3D,QADkC,8BAA8B,EAC9B,OAAO,yBAAyB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../document-models/document-editor/v1/gen/controller.ts","../../../document-models/document-editor/v1/hooks.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { PHDocumentController } from \"document-model\";\nimport { DocumentEditor } from \"../module.js\";\nimport type { DocumentEditorAction, DocumentEditorPHState } from \"./types.js\";\n\nexport const DocumentEditorController = PHDocumentController.forDocumentModel<\n DocumentEditorPHState,\n DocumentEditorAction\n>(DocumentEditor);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport {\n useDocumentById,\n useDocumentsInSelectedDrive,\n useDocumentsInSelectedFolder,\n useSelectedDocument,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n DocumentEditorAction,\n DocumentEditorDocument,\n} from \"document-models/document-editor/v1\";\nimport {\n assertIsDocumentEditorDocument,\n isDocumentEditorDocument,\n} from \"./gen/document-schema.js\";\n\n/** Hook to get a DocumentEditor document by its id */\nexport function useDocumentEditorDocumentById(\n documentId: string | null | undefined,\n):\n | [DocumentEditorDocument, DocumentDispatch<DocumentEditorAction>]\n | [undefined, undefined] {\n const [document, dispatch] = useDocumentById(documentId);\n if (!isDocumentEditorDocument(document)) return [undefined, undefined];\n return [document, dispatch];\n}\n\n/** Hook to get the selected DocumentEditor document */\nexport function useSelectedDocumentEditorDocument(): [\n DocumentEditorDocument,\n DocumentDispatch<DocumentEditorAction>,\n] {\n const [document, dispatch] = useSelectedDocument();\n\n assertIsDocumentEditorDocument(document);\n return [document, dispatch] as const;\n}\n\n/** Hook to get all DocumentEditor documents in the selected drive */\nexport function useDocumentEditorDocumentsInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n return documentsInSelectedDrive?.filter(isDocumentEditorDocument);\n}\n\n/** Hook to get all DocumentEditor documents in the selected folder */\nexport function useDocumentEditorDocumentsInSelectedFolder() {\n const documentsInSelectedFolder = useDocumentsInSelectedFolder();\n return documentsInSelectedFolder?.filter(isDocumentEditorDocument);\n}\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,2BAA2B,qBAAqB,iBAG3D,cAAc;;;;ACUhB,SAAgB,8BACd,YAGyB;CACzB,MAAM,CAAC,UAAU,YAAY,gBAAgB,UAAU;CACvD,IAAI,CAAC,yBAAyB,QAAQ,GAAG,OAAO,CAAC,KAAA,GAAW,KAAA,CAAS;CACrE,OAAO,CAAC,UAAU,QAAQ;AAC5B;;AAGA,SAAgB,oCAGd;CACA,MAAM,CAAC,UAAU,YAAY,oBAAoB;CAEjD,+BAA+B,QAAQ;CACvC,OAAO,CAAC,UAAU,QAAQ;AAC5B;;AAGA,SAAgB,4CAA4C;CAE1D,OADiC,4BACH,CAAC,EAAE,OAAO,wBAAwB;AAClE;;AAGA,SAAgB,6CAA6C;CAE3D,OADkC,6BACH,CAAC,EAAE,OAAO,wBAAwB;AACnE"}
@@ -1,6 +1,7 @@
1
- import { h as AppModule } from "../index-f_um1g-i.js";
2
- import { m as DocumentEditor } from "../index-Dm_gN1DR.js";
3
- import { _ as ProcessorModule } from "../index-SB-AtQdU.js";
4
- import { d as SubgraphModule } from "../index-B5ijieNt.js";
5
- import { t as VetraPackage } from "../module-ciAK1LUC.js";
6
- export { AppModule as AppModuleV1, DocumentEditor as DocumentEditorV1, ProcessorModule as ProcessorModuleV1, SubgraphModule as SubgraphModuleV1, VetraPackage as VetraPackageV1 };
1
+ import { h as AppModule } from "../index-DPG4u1Ym.js";
2
+ import { m as DocumentEditor } from "../index-D6Ai0OOc.js";
3
+ import { _ as ProcessorModule } from "../index-B52jv-LY.js";
4
+ import { d as SubgraphModule } from "../index-DplUuZMT.js";
5
+ import { t as VetraPackage } from "../module-D4lqkHHK.js";
6
+ export { AppModule as AppModuleV1, DocumentEditor as DocumentEditorV1, ProcessorModule as ProcessorModuleV1, SubgraphModule as SubgraphModuleV1, VetraPackage as VetraPackageV1 };
7
+ export {};
@@ -1,6 +1,6 @@
1
- import { t as AppModule } from "../module-CRq_lUkG.js";
2
- import { t as DocumentEditor } from "../module-Chqkdq4U.js";
3
- import { t as ProcessorModule } from "../module-bKT_e3CH.js";
4
- import { t as SubgraphModule } from "../module-Bx1OEHxF.js";
5
- import { t as VetraPackage } from "../module-CRfHlbnq.js";
1
+ import { t as AppModule } from "../module-Caxhis1M.js";
2
+ import { t as DocumentEditor } from "../module-2JZcvfVs.js";
3
+ import { t as ProcessorModule } from "../module-Db8mmgzN.js";
4
+ import { t as SubgraphModule } from "../module-hLzF5tCL.js";
5
+ import { t as VetraPackage } from "../module-FXJRy_1W.js";
6
6
  export { AppModule as AppModuleV1, DocumentEditor as DocumentEditorV1, ProcessorModule as ProcessorModuleV1, SubgraphModule as SubgraphModuleV1, VetraPackage as VetraPackageV1 };
@@ -1,12 +1,36 @@
1
- import { $ as SetProcessorNameAction, A as ProcessorModuleDocumentSchema, B as removeDocumentType, C as createProcessorModuleDocument, D as defaultPHState, E as defaultLocalState, F as isProcessorModuleState, G as ProcessorModuleController, H as setProcessorName, I as documentModel, J as AddDocumentTypeAction, K as ProcessorModuleBaseOperationsOperations, L as addDocumentType, M as assertIsProcessorModuleDocument, N as assertIsProcessorModuleState, O as processorModuleDocumentType, P as isProcessorModuleDocument, Q as RemoveProcessorAppAction, R as addProcessorApp, S as actions, St as StatusType, T as defaultGlobalState, U as setProcessorStatus, V as removeProcessorApp, W as setProcessorType, X as ProcessorModuleBaseOperationsAction, Y as AddProcessorAppAction, Z as RemoveDocumentTypeAction, _ as ProcessorModule, _t as RemoveProcessorAppInput, a as DocumentTypeItemSchema, at as AddDocumentTypeInput, b as useProcessorModuleDocumentsInSelectedFolder, bt as SetProcessorStatusInput, c as RemoveProcessorAppInputSchema, ct as Exact, d as SetProcessorTypeInputSchema, dt as MakeEmpty, et as SetProcessorStatusAction, f as StatusTypeSchema, ft as MakeMaybe, g as utils, gt as RemoveDocumentTypeInput, h as reducer, ht as ProcessorModuleState, i as AddProcessorAppInputSchema, it as ProcessorModulePHState, j as ProcessorModulePHStateSchema, k as ProcessorModuleDocumentHeaderSchema, l as SetProcessorNameInputSchema, lt as Incremental, m as isDefinedNonNullAny, mt as Maybe, n as initialLocalState, nt as ProcessorModuleDocument, o as ProcessorModuleStateSchema, ot as AddProcessorAppInput, p as definedNonNullAnySchema, pt as MakeOptional, q as ProcessorModuleAction, r as AddDocumentTypeInputSchema, rt as ProcessorModuleLocalState, s as RemoveDocumentTypeInputSchema, st as DocumentTypeItem, t as initialGlobalState, tt as SetProcessorTypeAction, u as SetProcessorStatusInputSchema, ut as InputMaybe, v as useProcessorModuleDocumentById, vt as Scalars, w as createState, x as useSelectedProcessorModuleDocument, xt as SetProcessorTypeInput, y as useProcessorModuleDocumentsInSelectedDrive, yt as SetProcessorNameInput, z as creators_d_exports } from "../../index-SB-AtQdU.js";
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
2
  import { UpgradeManifest } from "document-model";
3
-
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
4
27
  //#region document-models/processor-module/upgrades/versions.d.ts
5
- declare const supportedVersions: readonly [1];
6
- declare const latestVersion: 1;
28
+ export declare const supportedVersions: readonly [1];
29
+ export declare const latestVersion: 1;
7
30
  //#endregion
8
31
  //#region document-models/processor-module/upgrades/upgrade-manifest.d.ts
9
- declare const processorModuleUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
32
+ export declare const processorModuleUpgradeManifest: UpgradeManifest<typeof supportedVersions>;
10
33
  //#endregion
11
- export { AddDocumentTypeAction, AddDocumentTypeInput, AddDocumentTypeInputSchema, AddProcessorAppAction, AddProcessorAppInput, AddProcessorAppInputSchema, DocumentTypeItem, DocumentTypeItemSchema, Exact, Incremental, InputMaybe, MakeEmpty, MakeMaybe, MakeOptional, Maybe, ProcessorModule, ProcessorModuleAction, ProcessorModuleBaseOperationsAction, ProcessorModuleBaseOperationsOperations, ProcessorModuleController, ProcessorModuleDocument, ProcessorModuleDocumentHeaderSchema, ProcessorModuleDocumentSchema, ProcessorModuleState as ProcessorModuleGlobalState, ProcessorModuleState, ProcessorModuleLocalState, 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 };
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 };
35
+ export {};
12
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../document-models/processor-module/upgrades/versions.ts","../../../document-models/processor-module/upgrades/upgrade-manifest.ts"],"mappings":";;;;cAAa,iBAAA;AAAA,cAEA,aAAA;;;cCKA,8BAAA,EAAgC,eAAA,QACpC,iBAAA"}
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,7 +1,7 @@
1
- import { A as SetProcessorTypeInputSchema, C as AddProcessorAppInputSchema, D as RemoveProcessorAppInputSchema, E as RemoveDocumentTypeInputSchema, M as definedNonNullAnySchema, N as isDefinedNonNullAny, O as SetProcessorNameInputSchema, S as AddDocumentTypeInputSchema, T as ProcessorModuleStateSchema, _ as removeDocumentType, a as ProcessorModuleDocumentSchema, b as setProcessorStatus, c as assertIsProcessorModuleState, d as processorModuleDocumentType, f as reducer, g as creators_exports, h as addProcessorApp, i as ProcessorModuleDocumentHeaderSchema, j as StatusTypeSchema, k as SetProcessorStatusInputSchema, l as isProcessorModuleDocument, m as addDocumentType, n as initialLocalState, o as ProcessorModulePHStateSchema, p as actions, s as assertIsProcessorModuleDocument, t as initialGlobalState, u as isProcessorModuleState, v as removeProcessorApp, w as DocumentTypeItemSchema, x as setProcessorType, y as setProcessorName } from "../../utils-DmOIDVQo.js";
2
- import { n as utils, r as documentModel, t as ProcessorModule } from "../../module-bKT_e3CH.js";
3
- import { a as defaultPHState, i as defaultLocalState, n as createState, r as defaultGlobalState, t as createProcessorModuleDocument } from "../../ph-factories-CljTAAVS.js";
4
- import { n as latestVersion, r as supportedVersions, t as processorModuleUpgradeManifest } from "../../upgrade-manifest-NaS4SWk9.js";
1
+ import { A as SetProcessorTypeInputSchema, C as AddProcessorAppInputSchema, D as RemoveProcessorAppInputSchema, E as RemoveDocumentTypeInputSchema, M as definedNonNullAnySchema, N as isDefinedNonNullAny, O as SetProcessorNameInputSchema, S as AddDocumentTypeInputSchema, T as ProcessorModuleStateSchema, _ as removeDocumentType, a as ProcessorModuleDocumentSchema, b as setProcessorStatus, c as assertIsProcessorModuleState, d as processorModuleDocumentType, f as reducer, g as creators_exports, h as addProcessorApp, i as ProcessorModuleDocumentHeaderSchema, j as StatusTypeSchema, k as SetProcessorStatusInputSchema, l as isProcessorModuleDocument, m as addDocumentType, n as initialLocalState, o as ProcessorModulePHStateSchema, p as actions, s as assertIsProcessorModuleDocument, t as initialGlobalState, u as isProcessorModuleState, v as removeProcessorApp, w as DocumentTypeItemSchema, x as setProcessorType, y as setProcessorName } from "../../utils-w_21RRK6.js";
2
+ import { n as utils, r as documentModel, t as ProcessorModule } from "../../module-Db8mmgzN.js";
3
+ import { a as defaultPHState, i as defaultLocalState, n as createState, r as defaultGlobalState, t as createProcessorModuleDocument } from "../../ph-factories-HuC7_vvF.js";
4
+ import { n as latestVersion, r as supportedVersions, t as processorModuleUpgradeManifest } from "../../upgrade-manifest-d3LquK-H.js";
5
5
  import { PHDocumentController } from "document-model";
6
6
  import { useDocumentById, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useSelectedDocument } from "@powerhousedao/reactor-browser";
7
7
  //#region document-models/processor-module/v1/gen/controller.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../document-models/processor-module/v1/gen/controller.ts","../../../document-models/processor-module/v1/hooks.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { PHDocumentController } from \"document-model\";\nimport { ProcessorModule } from \"../module.js\";\nimport type { ProcessorModuleAction, ProcessorModulePHState } from \"./types.js\";\n\nexport const ProcessorModuleController = PHDocumentController.forDocumentModel<\n ProcessorModulePHState,\n ProcessorModuleAction\n>(ProcessorModule);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport {\n useDocumentById,\n useDocumentsInSelectedDrive,\n useDocumentsInSelectedFolder,\n useSelectedDocument,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n ProcessorModuleAction,\n ProcessorModuleDocument,\n} from \"document-models/processor-module/v1\";\nimport {\n assertIsProcessorModuleDocument,\n isProcessorModuleDocument,\n} from \"./gen/document-schema.js\";\n\n/** Hook to get a ProcessorModule document by its id */\nexport function useProcessorModuleDocumentById(\n documentId: string | null | undefined,\n):\n | [ProcessorModuleDocument, DocumentDispatch<ProcessorModuleAction>]\n | [undefined, undefined] {\n const [document, dispatch] = useDocumentById(documentId);\n if (!isProcessorModuleDocument(document)) return [undefined, undefined];\n return [document, dispatch];\n}\n\n/** Hook to get the selected ProcessorModule document */\nexport function useSelectedProcessorModuleDocument(): [\n ProcessorModuleDocument,\n DocumentDispatch<ProcessorModuleAction>,\n] {\n const [document, dispatch] = useSelectedDocument();\n\n assertIsProcessorModuleDocument(document);\n return [document, dispatch] as const;\n}\n\n/** Hook to get all ProcessorModule documents in the selected drive */\nexport function useProcessorModuleDocumentsInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n return documentsInSelectedDrive?.filter(isProcessorModuleDocument);\n}\n\n/** Hook to get all ProcessorModule documents in the selected folder */\nexport function useProcessorModuleDocumentsInSelectedFolder() {\n const documentsInSelectedFolder = useDocumentsInSelectedFolder();\n return documentsInSelectedFolder?.filter(isProcessorModuleDocument);\n}\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,4BAA4B,qBAAqB,iBAG5D,gBAAgB;;;;ACUlB,SAAgB,+BACd,YAGyB;CACzB,MAAM,CAAC,UAAU,YAAY,gBAAgB,WAAW;AACxD,KAAI,CAAC,0BAA0B,SAAS,CAAE,QAAO,CAAC,KAAA,GAAW,KAAA,EAAU;AACvE,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,qCAGd;CACA,MAAM,CAAC,UAAU,YAAY,qBAAqB;AAElD,iCAAgC,SAAS;AACzC,QAAO,CAAC,UAAU,SAAS;;;AAI7B,SAAgB,6CAA6C;AAE3D,QADiC,6BAA6B,EAC7B,OAAO,0BAA0B;;;AAIpE,SAAgB,8CAA8C;AAE5D,QADkC,8BAA8B,EAC9B,OAAO,0BAA0B"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../document-models/processor-module/v1/gen/controller.ts","../../../document-models/processor-module/v1/hooks.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { PHDocumentController } from \"document-model\";\nimport { ProcessorModule } from \"../module.js\";\nimport type { ProcessorModuleAction, ProcessorModulePHState } from \"./types.js\";\n\nexport const ProcessorModuleController = PHDocumentController.forDocumentModel<\n ProcessorModulePHState,\n ProcessorModuleAction\n>(ProcessorModule);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentDispatch } from \"@powerhousedao/reactor-browser\";\nimport {\n useDocumentById,\n useDocumentsInSelectedDrive,\n useDocumentsInSelectedFolder,\n useSelectedDocument,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n ProcessorModuleAction,\n ProcessorModuleDocument,\n} from \"document-models/processor-module/v1\";\nimport {\n assertIsProcessorModuleDocument,\n isProcessorModuleDocument,\n} from \"./gen/document-schema.js\";\n\n/** Hook to get a ProcessorModule document by its id */\nexport function useProcessorModuleDocumentById(\n documentId: string | null | undefined,\n):\n | [ProcessorModuleDocument, DocumentDispatch<ProcessorModuleAction>]\n | [undefined, undefined] {\n const [document, dispatch] = useDocumentById(documentId);\n if (!isProcessorModuleDocument(document)) return [undefined, undefined];\n return [document, dispatch];\n}\n\n/** Hook to get the selected ProcessorModule document */\nexport function useSelectedProcessorModuleDocument(): [\n ProcessorModuleDocument,\n DocumentDispatch<ProcessorModuleAction>,\n] {\n const [document, dispatch] = useSelectedDocument();\n\n assertIsProcessorModuleDocument(document);\n return [document, dispatch] as const;\n}\n\n/** Hook to get all ProcessorModule documents in the selected drive */\nexport function useProcessorModuleDocumentsInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n return documentsInSelectedDrive?.filter(isProcessorModuleDocument);\n}\n\n/** Hook to get all ProcessorModule documents in the selected folder */\nexport function useProcessorModuleDocumentsInSelectedFolder() {\n const documentsInSelectedFolder = useDocumentsInSelectedFolder();\n return documentsInSelectedFolder?.filter(isProcessorModuleDocument);\n}\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,4BAA4B,qBAAqB,iBAG5D,eAAe;;;;ACUjB,SAAgB,+BACd,YAGyB;CACzB,MAAM,CAAC,UAAU,YAAY,gBAAgB,UAAU;CACvD,IAAI,CAAC,0BAA0B,QAAQ,GAAG,OAAO,CAAC,KAAA,GAAW,KAAA,CAAS;CACtE,OAAO,CAAC,UAAU,QAAQ;AAC5B;;AAGA,SAAgB,qCAGd;CACA,MAAM,CAAC,UAAU,YAAY,oBAAoB;CAEjD,gCAAgC,QAAQ;CACxC,OAAO,CAAC,UAAU,QAAQ;AAC5B;;AAGA,SAAgB,6CAA6C;CAE3D,OADiC,4BACH,CAAC,EAAE,OAAO,yBAAyB;AACnE;;AAGA,SAAgB,8CAA8C;CAE5D,OADkC,6BACH,CAAC,EAAE,OAAO,yBAAyB;AACpE"}