@powerhousedao/vetra 6.2.3-dev.9 → 6.2.3-staging.0

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 (151) 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-DMl8eB3P.js → factory-BWrWHoS5.js} +3 -3
  52. package/dist/{factory-DMl8eB3P.js.map → factory-BWrWHoS5.js.map} +1 -1
  53. package/dist/{factory-5eiZohiv.js → factory-BzUAqoGU.js} +2 -2
  54. package/dist/{factory-5eiZohiv.js.map → factory-BzUAqoGU.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-kgDm1UIQ.js +8 -0
  111. package/dist/{switchboard-Bf0uvxSu.js.map → switchboard-kgDm1UIQ.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 +13 -12
  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/index-B5ijieNt.d.ts.map +0 -1
  140. package/dist/index-Dm_gN1DR.d.ts.map +0 -1
  141. package/dist/index-SB-AtQdU.d.ts.map +0 -1
  142. package/dist/index-f_um1g-i.d.ts.map +0 -1
  143. package/dist/module-ciAK1LUC.d.ts.map +0 -1
  144. package/dist/powerhouse.manifest.d.ts +0 -34
  145. package/dist/powerhouse.manifest.d.ts.map +0 -1
  146. package/dist/powerhouse.manifest.js +0 -86
  147. package/dist/powerhouse.manifest.js.map +0 -1
  148. package/dist/processor-trJFuoHh.js.map +0 -1
  149. package/dist/specs-BeVdfCwg.d.ts.map +0 -1
  150. package/dist/switchboard-Bf0uvxSu.js +0 -8
  151. /package/dist/{chunk-pbuEa-1d.js → rolldown-runtime-D7D4PA-g.js} +0 -0
@@ -1,9 +1,7 @@
1
- import * as document_model0 from "document-model";
2
1
  import { Action, DocumentModelGlobalState, DocumentModelUtils, PHAuthState, PHBaseState, PHDocument, PHDocumentController, PHDocumentState, Reducer, SignalDispatch } from "document-model";
3
2
  import * as z$1 from "zod";
4
3
  import { z } from "zod";
5
4
  import { DocumentDispatch } from "@powerhousedao/reactor-browser";
6
-
7
5
  //#region document-models/vetra-package/v1/gen/base-operations/actions.d.ts
8
6
  type SetPackageNameAction = Action & {
9
7
  type: "SET_PACKAGE_NAME";
@@ -55,13 +53,13 @@ type Maybe<T> = T | null | undefined;
55
53
  type InputMaybe<T> = T | null | undefined;
56
54
  type Exact<T extends {
57
55
  [key: string]: unknown;
58
- }> = { [K in keyof T]: T[K] };
59
- type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
60
- type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
56
+ }> = { [K in keyof T]: T[K]; };
57
+ type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]>; };
58
+ type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]>; };
61
59
  type MakeEmpty<T extends {
62
60
  [key: string]: unknown;
63
- }, K extends keyof T> = { [_ in K]?: never };
64
- type Incremental<T> = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never };
61
+ }, K extends keyof T> = { [_ in K]?: never; };
62
+ type Incremental<T> = T | { [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; };
65
63
  /** All built-in and custom scalars, mapped to their actual values */
66
64
  type Scalars = {
67
65
  ID: {
@@ -195,12 +193,16 @@ type AddPackageKeywordInput = {
195
193
  };
196
194
  /** Author/maintainer of the Vetra Package. */
197
195
  type Author = {
198
- /** Display name of the author or organization. */name: Maybe<Scalars["String"]["output"]>; /** Author's website URL. */
196
+ /** Display name of the author or organization. */
197
+ name: Maybe<Scalars["String"]["output"]>;
198
+ /** Author's website URL. */
199
199
  website: Maybe<Scalars["URL"]["output"]>;
200
200
  };
201
201
  /** A single search keyword attached to the package. */
202
202
  type Keyword = {
203
- /** Stable identifier for the keyword entry; used to remove it. */id: Scalars["OID"]["output"]; /** Display label for the keyword (e.g. 'invoicing', 'defi'). */
203
+ /** Stable identifier for the keyword entry; used to remove it. */
204
+ id: Scalars["OID"]["output"];
205
+ /** Display label for the keyword (e.g. 'invoicing', 'defi'). */
204
206
  label: Scalars["String"]["output"];
205
207
  };
206
208
  type RemovePackageKeywordInput = {
@@ -237,12 +239,19 @@ type SetPackageNpmUrlInput = {
237
239
  * created empty and filled in incrementally during development.
238
240
  */
239
241
  type VetraPackageState = {
240
- /** Author/maintainer information surfaced in the published package metadata. */author: Author; /** Free-form category label used to group packages in directories (e.g. 'Finance', 'Productivity'). */
241
- category: Maybe<Scalars["String"]["output"]>; /** One-paragraph summary of what the package provides. Shown on package listing pages. */
242
- description: Maybe<Scalars["String"]["output"]>; /** Public source code URL (typically a GitHub repository). */
243
- githubUrl: Maybe<Scalars["URL"]["output"]>; /** Search keywords associated with the package. Each keyword has a stable id so it can be removed individually. */
244
- keywords: Array<Keyword>; /** Human-readable package name (e.g. 'Pizza Plaza'). Distinct from the npm package id. */
245
- name: Maybe<Scalars["String"]["output"]>; /** Published npm package URL. Set once the package has been released. */
242
+ /** Author/maintainer information surfaced in the published package metadata. */
243
+ author: Author;
244
+ /** Free-form category label used to group packages in directories (e.g. 'Finance', 'Productivity'). */
245
+ category: Maybe<Scalars["String"]["output"]>;
246
+ /** One-paragraph summary of what the package provides. Shown on package listing pages. */
247
+ description: Maybe<Scalars["String"]["output"]>;
248
+ /** Public source code URL (typically a GitHub repository). */
249
+ githubUrl: Maybe<Scalars["URL"]["output"]>;
250
+ /** Search keywords associated with the package. Each keyword has a stable id so it can be removed individually. */
251
+ keywords: Array<Keyword>;
252
+ /** Human-readable package name (e.g. 'Pizza Plaza'). Distinct from the npm package id. */
253
+ name: Maybe<Scalars["String"]["output"]>;
254
+ /** Published npm package URL. Set once the package has been released. */
246
255
  npmUrl: Maybe<Scalars["URL"]["output"]>;
247
256
  };
248
257
  //#endregion
@@ -254,34 +263,6 @@ type VetraPackagePHState = PHBaseState & {
254
263
  };
255
264
  type VetraPackageDocument = PHDocument<VetraPackagePHState>;
256
265
  //#endregion
257
- //#region document-models/vetra-package/v1/actions.d.ts
258
- /** Actions for the VetraPackage document model */
259
- declare const actions: {
260
- setPackageName: (input: SetPackageNameInput) => SetPackageNameAction;
261
- setPackageDescription: (input: SetPackageDescriptionInput) => SetPackageDescriptionAction;
262
- setPackageCategory: (input: SetPackageCategoryInput) => SetPackageCategoryAction;
263
- setPackageAuthor: (input: SetPackageAuthorInput) => SetPackageAuthorAction;
264
- setPackageAuthorName: (input: SetPackageAuthorNameInput) => SetPackageAuthorNameAction;
265
- setPackageAuthorWebsite: (input: SetPackageAuthorWebsiteInput) => SetPackageAuthorWebsiteAction;
266
- addPackageKeyword: (input: AddPackageKeywordInput) => AddPackageKeywordAction;
267
- removePackageKeyword: (input: RemovePackageKeywordInput) => RemovePackageKeywordAction;
268
- setPackageGithubUrl: (input: SetPackageGithubUrlInput) => SetPackageGithubUrlAction;
269
- setPackageNpmUrl: (input: SetPackageNpmUrlInput) => SetPackageNpmUrlAction;
270
- setName: (name: string | {
271
- name: string;
272
- }) => document_model0.SetNameAction;
273
- setPreferredEditor: (input: string | null | {
274
- preferredEditor: string | null;
275
- }) => document_model0.SetPreferredEditorAction;
276
- undo: (count?: number, scope?: string) => document_model0.UndoAction;
277
- redo: (count?: number, scope?: string) => document_model0.RedoAction;
278
- prune: (start?: number, end?: number, scope?: string) => document_model0.SchemaPruneAction;
279
- loadState: <TState extends document_model0.PHBaseState = document_model0.PHBaseState>(state: TState & {
280
- name: string;
281
- }, operations: number) => document_model0.LoadStateAction;
282
- noop: (scope?: string) => document_model0.NOOPAction;
283
- };
284
- //#endregion
285
266
  //#region document-models/vetra-package/v1/gen/base-operations/operations.d.ts
286
267
  interface VetraPackageBaseOperationsOperations {
287
268
  setPackageNameOperation: (state: VetraPackageState, action: SetPackageNameAction, dispatch?: SignalDispatch) => void;
@@ -297,7 +278,7 @@ interface VetraPackageBaseOperationsOperations {
297
278
  }
298
279
  //#endregion
299
280
  //#region document-models/vetra-package/v1/gen/controller.d.ts
300
- declare const VetraPackageController: new (initialDocument?: document_model0.PHDocument<VetraPackagePHState> | undefined) => PHDocumentController<VetraPackagePHState> & document_model0.ActionMap<VetraPackageBaseOperationsAction, PHDocumentController<VetraPackagePHState>>;
281
+ declare const VetraPackageController: new (initialDocument?: import("document-model").PHDocument<VetraPackagePHState> | undefined) => PHDocumentController<VetraPackagePHState> & import("document-model").ActionMap<VetraPackageBaseOperationsAction, PHDocumentController<VetraPackagePHState>>;
301
282
  declare namespace creators_d_exports {
302
283
  export { addPackageKeyword, removePackageKeyword, setPackageAuthor, setPackageAuthorName, setPackageAuthorWebsite, setPackageCategory, setPackageDescription, setPackageGithubUrl, setPackageName, setPackageNpmUrl };
303
284
  }
@@ -376,13 +357,6 @@ declare function isVetraPackageDocument(document: unknown): document is VetraPac
376
357
  /** Simple helper function to assert that a document is a VetraPackage document */
377
358
  declare function assertIsVetraPackageDocument(document: unknown): asserts document is VetraPackageDocument;
378
359
  //#endregion
379
- //#region document-models/vetra-package/v1/gen/document-type.d.ts
380
- /**
381
- * WARNING: DO NOT EDIT
382
- * This file is auto-generated and updated by codegen
383
- */
384
- declare const vetraPackageDocumentType = "powerhouse/package";
385
- //#endregion
386
360
  //#region document-models/vetra-package/v1/gen/ph-factories.d.ts
387
361
  declare function defaultGlobalState(): VetraPackageState;
388
362
  declare function defaultLocalState(): VetraPackageLocalState;
@@ -404,7 +378,7 @@ declare function createVetraPackageDocument(state?: Partial<{
404
378
  declare const reducer: Reducer<VetraPackagePHState>;
405
379
  //#endregion
406
380
  //#region document-models/vetra-package/v1/gen/schema/zod.d.ts
407
- type Properties<T> = Required<{ [K in keyof T]: z$1.ZodType<T[K]> }>;
381
+ type Properties<T> = Required<{ [K in keyof T]: z$1.ZodType<T[K]>; }>;
408
382
  type definedNonNullAny = {};
409
383
  declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
410
384
  declare const definedNonNullAnySchema: z$1.ZodAny & z$1.ZodType<definedNonNullAny, any, z$1.core.$ZodTypeInternals<definedNonNullAny, any>>;
@@ -444,8 +418,13 @@ declare const utils: DocumentModelUtils<VetraPackagePHState>;
444
418
  /** Document model module for the VetraPackage document type */
445
419
  declare const VetraPackage: {
446
420
  readonly version: 1;
447
- readonly reducer: document_model0.Reducer<VetraPackagePHState>;
421
+ readonly reducer: import("document-model").Reducer<VetraPackagePHState>;
448
422
  readonly actions: {
423
+ setName: typeof import("document-model").setName;
424
+ setPreferredEditor: typeof import("document-model").setPreferredEditor;
425
+ undo: typeof import("document-model").undo;
426
+ redo: typeof import("document-model").redo;
427
+ noop: typeof import("document-model").noop;
449
428
  setPackageName: (input: SetPackageNameInput) => SetPackageNameAction;
450
429
  setPackageDescription: (input: SetPackageDescriptionInput) => SetPackageDescriptionAction;
451
430
  setPackageCategory: (input: SetPackageCategoryInput) => SetPackageCategoryAction;
@@ -456,23 +435,11 @@ declare const VetraPackage: {
456
435
  removePackageKeyword: (input: RemovePackageKeywordInput) => RemovePackageKeywordAction;
457
436
  setPackageGithubUrl: (input: SetPackageGithubUrlInput) => SetPackageGithubUrlAction;
458
437
  setPackageNpmUrl: (input: SetPackageNpmUrlInput) => SetPackageNpmUrlAction;
459
- setName: (name: string | {
460
- name: string;
461
- }) => document_model0.SetNameAction;
462
- setPreferredEditor: (input: string | null | {
463
- preferredEditor: string | null;
464
- }) => document_model0.SetPreferredEditorAction;
465
- undo: (count?: number, scope?: string) => document_model0.UndoAction;
466
- redo: (count?: number, scope?: string) => document_model0.RedoAction;
467
- prune: (start?: number, end?: number, scope?: string) => document_model0.SchemaPruneAction;
468
- loadState: <TState extends document_model0.PHBaseState = document_model0.PHBaseState>(state: TState & {
469
- name: string;
470
- }, operations: number) => document_model0.LoadStateAction;
471
- noop: (scope?: string) => document_model0.NOOPAction;
472
438
  };
473
- readonly utils: document_model0.DocumentModelUtils<VetraPackagePHState>;
474
- readonly documentModel: document_model0.DocumentModelPHState;
439
+ readonly utils: import("document-model").DocumentModelUtils<VetraPackagePHState>;
440
+ readonly documentModel: import("document-model").DocumentModelPHState;
475
441
  };
476
442
  //#endregion
477
- export { VetraPackageDocument as $, vetraPackageDocumentType as A, SetPackageDescriptionAction as At, creators_d_exports as B, isDefinedNonNullAny as C, VetraPackageAction as Ct, defaultGlobalState as D, SetPackageAuthorNameAction as Dt, createVetraPackageDocument as E, SetPackageAuthorAction as Et, assertIsVetraPackageState as F, setPackageCategory as G, setPackageAuthor as H, isVetraPackageDocument as I, setPackageName as J, setPackageDescription as K, isVetraPackageState as L, VetraPackageDocumentSchema as M, SetPackageNameAction as Mt, VetraPackagePHStateSchema as N, SetPackageNpmUrlAction as Nt, defaultLocalState as O, SetPackageAuthorWebsiteAction as Ot, assertIsVetraPackageDocument as P, VetraPackageBaseOperationsAction as Pt, actions as Q, documentModel as R, definedNonNullAnySchema as S, VetraPackageState as St, createState$1 as T, RemovePackageKeywordAction as Tt, setPackageAuthorName as U, removePackageKeyword as V, setPackageAuthorWebsite as W, VetraPackageController as X, setPackageNpmUrl as Y, VetraPackageBaseOperationsOperations as Z, SetPackageDescriptionInputSchema as _, SetPackageCategoryInput as _t, useVetraPackageDocumentsInSelectedDrive as a, Incremental as at, SetPackageNpmUrlInputSchema as b, SetPackageNameInput as bt, initialLocalState as c, MakeEmpty as ct, KeywordSchema as d, Maybe as dt, VetraPackageLocalState as et, RemovePackageKeywordInputSchema as f, RemovePackageKeywordInput as ft, SetPackageCategoryInputSchema as g, SetPackageAuthorWebsiteInput as gt, SetPackageAuthorWebsiteInputSchema as h, SetPackageAuthorNameInput as ht, useVetraPackageDocumentById as i, Exact as it, VetraPackageDocumentHeaderSchema as j, SetPackageGithubUrlAction as jt, defaultPHState as k, SetPackageCategoryAction as kt, AddPackageKeywordInputSchema as l, MakeMaybe as lt, SetPackageAuthorNameInputSchema as m, SetPackageAuthorInput as mt, utils as n, AddPackageKeywordInput as nt, useVetraPackageDocumentsInSelectedFolder as o, InputMaybe as ot, SetPackageAuthorInputSchema as p, Scalars as pt, setPackageGithubUrl as q, useSelectedVetraPackageDocument as r, Author as rt, initialGlobalState as s, Keyword as st, VetraPackage as t, VetraPackagePHState as tt, AuthorSchema as u, MakeOptional as ut, SetPackageGithubUrlInputSchema as v, SetPackageDescriptionInput as vt, reducer as w, AddPackageKeywordAction as wt, VetraPackageStateSchema as x, SetPackageNpmUrlInput as xt, SetPackageNameInputSchema as y, SetPackageGithubUrlInput as yt, addPackageKeyword as z };
478
- //# sourceMappingURL=module-ciAK1LUC.d.ts.map
443
+ export { VetraPackagePHState as $, VetraPackageDocumentHeaderSchema as A, SetPackageNameAction as At, removePackageKeyword as B, isDefinedNonNullAny as C, RemovePackageKeywordAction as Ct, defaultGlobalState as D, SetPackageCategoryAction as Dt, createVetraPackageDocument as E, SetPackageAuthorWebsiteAction as Et, isVetraPackageDocument as F, setPackageDescription as G, setPackageAuthorName as H, isVetraPackageState as I, setPackageNpmUrl as J, setPackageGithubUrl as K, documentModel as L, VetraPackagePHStateSchema as M, VetraPackageBaseOperationsAction as Mt, assertIsVetraPackageDocument as N, defaultLocalState as O, SetPackageDescriptionAction as Ot, assertIsVetraPackageState as P, VetraPackageLocalState as Q, addPackageKeyword as R, definedNonNullAnySchema as S, AddPackageKeywordAction as St, createState$1 as T, SetPackageAuthorNameAction as Tt, setPackageAuthorWebsite as U, setPackageAuthor as V, setPackageCategory as W, VetraPackageBaseOperationsOperations as X, VetraPackageController as Y, VetraPackageDocument as Z, SetPackageDescriptionInputSchema as _, SetPackageGithubUrlInput as _t, useVetraPackageDocumentsInSelectedDrive as a, Keyword as at, SetPackageNpmUrlInputSchema as b, VetraPackageState as bt, initialLocalState as c, MakeOptional as ct, KeywordSchema as d, Scalars as dt, AddPackageKeywordInput as et, RemovePackageKeywordInputSchema as f, SetPackageAuthorInput as ft, SetPackageCategoryInputSchema as g, SetPackageDescriptionInput as gt, SetPackageAuthorWebsiteInputSchema as h, SetPackageCategoryInput as ht, useVetraPackageDocumentById as i, InputMaybe as it, VetraPackageDocumentSchema as j, SetPackageNpmUrlAction as jt, defaultPHState as k, SetPackageGithubUrlAction as kt, AddPackageKeywordInputSchema as l, Maybe as lt, SetPackageAuthorNameInputSchema as m, SetPackageAuthorWebsiteInput as mt, utils as n, Exact as nt, useVetraPackageDocumentsInSelectedFolder as o, MakeEmpty as ot, SetPackageAuthorInputSchema as p, SetPackageAuthorNameInput as pt, setPackageName as q, useSelectedVetraPackageDocument as r, Incremental as rt, initialGlobalState as s, MakeMaybe as st, VetraPackage as t, Author as tt, AuthorSchema as u, RemovePackageKeywordInput as ut, SetPackageGithubUrlInputSchema as v, SetPackageNameInput as vt, reducer as w, SetPackageAuthorAction as wt, VetraPackageStateSchema as x, VetraPackageAction as xt, SetPackageNameInputSchema as y, SetPackageNpmUrlInput as yt, creators_d_exports as z };
444
+ export {};
445
+ //# sourceMappingURL=module-D4lqkHHK.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-D4lqkHHK.d.ts","names":[],"sources":["../document-models/vetra-package/v1/gen/base-operations/actions.ts","../document-models/vetra-package/v1/gen/actions.ts","../document-models/vetra-package/v1/gen/schema/types.ts","../document-models/vetra-package/v1/gen/types.ts","../document-models/vetra-package/v1/gen/base-operations/operations.ts","../document-models/vetra-package/v1/gen/controller.ts","../document-models/vetra-package/v1/gen/base-operations/creators.ts","../document-models/vetra-package/v1/gen/document-model.ts","../document-models/vetra-package/v1/gen/document-schema.ts","../document-models/vetra-package/v1/gen/ph-factories.ts","../document-models/vetra-package/v1/gen/reducer.ts","../document-models/vetra-package/v1/gen/schema/zod.ts","../document-models/vetra-package/v1/gen/utils.ts","../document-models/vetra-package/v1/hooks.ts","../document-models/vetra-package/v1/utils.ts","../document-models/vetra-package/v1/module.ts"],"mappings":";;;;;KAkBY,uBAAuB;EACjC;EACA,OAAO;;KAEG,8BAA8B;EACxC;EACA,OAAO;;KAEG,2BAA2B;EACrC;EACA,OAAO;;KAEG,yBAAyB;EACnC;EACA,OAAO;;KAEG,6BAA6B;EACvC;EACA,OAAO;;KAEG,gCAAgC;EAC1C;EACA,OAAO;;KAEG,0BAA0B;EACpC;EACA,OAAO;;KAEG,6BAA6B;EACvC;EACA,OAAO;;KAEG,4BAA4B;EACtC;EACA,OAAO;;KAEG,yBAAyB;EACnC;EACA,OAAO;;KAGG,mCACR,uBACA,8BACA,2BACA,yBACA,6BACA,gCACA,0BACA,6BACA,4BACA;;;KC7DQ,qBAAqB;;;KCRrB,MAAM,KAAK;KACX,WAAW,KAAK;KAChB,MAAM;GAAa;QAC5B,WAAW,IAAI,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ll } from "./rolldown-runtime-D7D4PA-g.js";
2
+ import { f as reducer, p as actions, r as utils$1 } from "./utils-w_21RRK6.js";
3
3
  import { createState, defaultBaseState } from "document-model";
4
4
  //#region document-models/processor-module/v1/gen/document-model.ts
5
5
  const documentModel = {
@@ -135,4 +135,4 @@ const ProcessorModule = {
135
135
  //#endregion
136
136
  export { utils as n, documentModel as r, ProcessorModule as t };
137
137
 
138
- //# sourceMappingURL=module-bKT_e3CH.js.map
138
+ //# sourceMappingURL=module-Db8mmgzN.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module-bKT_e3CH.js","names":["genUtils","customUtils"],"sources":["../document-models/processor-module/v1/gen/document-model.ts","../document-models/processor-module/v1/src/utils.ts","../document-models/processor-module/v1/utils.ts","../document-models/processor-module/v1/module.ts"],"sourcesContent":["import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/processor\",\n name: \"Processor Module\",\n author: {\n name: \"Powerhouse\",\n website: \"https://powerhouse.inc\",\n },\n extension: \".processor\",\n description:\n \"Declares a processor (a server-side function that reacts to document operations to build read models, send notifications, sync to external systems, etc.) shipped by a Vetra Reactor Package. Create one Processor Module document per processor: pick the processor type, list the document types it subscribes to, attach it to any drive apps that should run it, and mark it CONFIRMED to trigger codegen of the processor scaffold under `processors/`.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n '\"\"\"\\nConfiguration for a processor contributed by the package. A processor receives\\noperations from documents of matching types and runs server-side logic (e.g.\\nbuilding a read model, indexing, syncing to an external system).\\n\"\"\"\\ntype ProcessorModuleState {\\n \"\"\"Display name of the processor. Also determines the generated folder name under `processors/`.\"\"\"\\n name: String!\\n \"\"\"Processor implementation kind (e.g. \\'read-model\\', \\'relational-db\\'). Determines which scaffold codegen emits.\"\"\"\\n type: String!\\n \"\"\"Document types this processor subscribes to. Each entry has a stable id so it can be removed individually.\"\"\"\\n documentTypes: [DocumentTypeItem!]!\\n \"\"\"Lifecycle status. While DRAFT the processor definition is editable and codegen is skipped; switching to CONFIRMED triggers scaffold generation.\"\"\"\\n status: StatusType!\\n \"\"\"Drive-app names this processor is attached to. The processor runs in the context of each listed app.\"\"\"\\n processorApps: [String!]!\\n}\\n\\n\"\"\"A document type id (e.g. \\'my-org/invoice\\') attached to the processor with a stable entry id.\"\"\"\\ntype DocumentTypeItem {\\n \"\"\"Stable identifier for the entry; used to remove it.\"\"\"\\n id: OID!\\n \"\"\"Document type id this processor subscribes to.\"\"\"\\n documentType: String!\\n}\\n\\n\"\"\"\\nLifecycle status of a module definition.\\n- DRAFT: still being edited; codegen does not run.\\n- CONFIRMED: locked in; codegen produces the corresponding scaffold.\\n\"\"\"\\nenum StatusType {\\n DRAFT\\n CONFIRMED\\n}',\n examples: [],\n initialValue:\n '{\\n \"name\": \"\",\\n \"type\": \"\",\\n \"documentTypes\": [],\\n \"status\": \"DRAFT\",\\n \"processorApps\": []\\n}',\n },\n },\n modules: [\n {\n id: \"91ad39c1-4e8b-4127-b3c8-e835b85e6360\",\n name: \"base_operations\",\n description:\n \"Set the processor's identity, kind, lifecycle status, subscribed document types, and attached drive apps.\",\n operations: [\n {\n id: \"6f3a5c90-39f2-4302-a073-6195a71c5054\",\n name: \"SET_PROCESSOR_NAME\",\n description:\n \"Set the display name of the processor. Also determines the generated folder name under `processors/`.\",\n schema: \"input SetProcessorNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"b8f28bb4-c6ae-40e6-86fa-29ef14ff8667\",\n name: \"SET_PROCESSOR_TYPE\",\n description:\n \"Set the processor implementation kind (e.g. 'read-model', 'relational-db'). Determines which scaffold codegen emits.\",\n schema: \"input SetProcessorTypeInput {\\n type: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"fbbd7a71-c495-4efc-b8f6-1e57798dbbb4\",\n name: \"ADD_DOCUMENT_TYPE\",\n description:\n \"Subscribe the processor to a document type. Caller supplies a stable id so the entry can be removed later.\",\n schema:\n \"input AddDocumentTypeInput {\\n id: OID!\\n documentType: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"544d413f-423c-4d97-9570-84a19bffeab9\",\n name: \"REMOVE_DOCUMENT_TYPE\",\n description:\n \"Unsubscribe the processor from a document type by removing its entry id.\",\n schema: \"input RemoveDocumentTypeInput {\\n id: OID!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"df5eb500-7308-498c-9b80-028878ee198b\",\n name: \"ADD_PROCESSOR_APP\",\n description:\n \"Attach the processor to a drive app by name. The processor will run in the context of that app.\",\n schema:\n \"input AddProcessorAppInput {\\n processorApp: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"07e4168f-1a7b-41ef-953d-219028be7bb9\",\n name: \"REMOVE_PROCESSOR_APP\",\n description:\n \"Detach the processor from a drive app by name. No-op if the app is not currently attached.\",\n schema:\n \"input RemoveProcessorAppInput {\\n processorApp: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"7b6706eb-5e25-4d64-829a-e3a251380fd1\",\n name: \"SET_PROCESSOR_STATUS\",\n description:\n \"Move the processor between DRAFT and CONFIRMED. Codegen only runs once the status is CONFIRMED.\",\n schema:\n \"input SetProcessorStatusInput {\\n status: StatusType!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n ],\n version: 1,\n changeLog: [],\n },\n ],\n};\n","export {};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport type { ProcessorModulePHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the ProcessorModule document model */\nexport const utils: DocumentModelUtils<ProcessorModulePHState> = {\n ...genUtils,\n ...customUtils,\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelModule } from \"document-model\";\nimport { createState, defaultBaseState } from \"document-model\";\nimport { actions } from \"./actions.js\";\nimport { documentModel } from \"./gen/document-model.js\";\nimport { reducer } from \"./gen/reducer.js\";\nimport type { ProcessorModulePHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the ProcessorModule document type */\nexport const ProcessorModule = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<ProcessorModulePHState>;\n"],"mappings":";;;;AAEA,MAAa,gBAA0C;CACrD,IAAI;CACJ,MAAM;CACN,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CACD,WAAW;CACX,aACE;CACF,gBAAgB,CACd;EACE,OAAO;GACL,OAAO;IACL,QAAQ;IACR,UAAU,EAAE;IACZ,cAAc;IACf;GACD,QAAQ;IACN,QACE;IACF,UAAU,EAAE;IACZ,cACE;IACH;GACF;EACD,SAAS,CACP;GACE,IAAI;GACJ,MAAM;GACN,aACE;GACF,YAAY;IACV;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACD;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,EAAE;KACV,UAAU,EAAE;KACZ,OAAO;KACR;IACF;GACF,CACF;EACD,SAAS;EACT,WAAW,EAAE;EACd,CACF;CACF;;;;;;;AExHD,MAAa,QAAoD;CAC/D,GAAGA;CACH,GAAGC;CACJ;;;;ACAD,MAAa,kBAAkB;CAC7B,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,kBAAkB,EAAE,cAAc;CAC9D"}
1
+ {"version":3,"file":"module-Db8mmgzN.js","names":["genUtils","customUtils"],"sources":["../document-models/processor-module/v1/gen/document-model.ts","../document-models/processor-module/v1/src/utils.ts","../document-models/processor-module/v1/utils.ts","../document-models/processor-module/v1/module.ts"],"sourcesContent":["import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/processor\",\n name: \"Processor Module\",\n author: {\n name: \"Powerhouse\",\n website: \"https://powerhouse.inc\",\n },\n extension: \".processor\",\n description:\n \"Declares a processor (a server-side function that reacts to document operations to build read models, send notifications, sync to external systems, etc.) shipped by a Vetra Reactor Package. Create one Processor Module document per processor: pick the processor type, list the document types it subscribes to, attach it to any drive apps that should run it, and mark it CONFIRMED to trigger codegen of the processor scaffold under `processors/`.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n '\"\"\"\\nConfiguration for a processor contributed by the package. A processor receives\\noperations from documents of matching types and runs server-side logic (e.g.\\nbuilding a read model, indexing, syncing to an external system).\\n\"\"\"\\ntype ProcessorModuleState {\\n \"\"\"Display name of the processor. Also determines the generated folder name under `processors/`.\"\"\"\\n name: String!\\n \"\"\"Processor implementation kind (e.g. \\'read-model\\', \\'relational-db\\'). Determines which scaffold codegen emits.\"\"\"\\n type: String!\\n \"\"\"Document types this processor subscribes to. Each entry has a stable id so it can be removed individually.\"\"\"\\n documentTypes: [DocumentTypeItem!]!\\n \"\"\"Lifecycle status. While DRAFT the processor definition is editable and codegen is skipped; switching to CONFIRMED triggers scaffold generation.\"\"\"\\n status: StatusType!\\n \"\"\"Drive-app names this processor is attached to. The processor runs in the context of each listed app.\"\"\"\\n processorApps: [String!]!\\n}\\n\\n\"\"\"A document type id (e.g. \\'my-org/invoice\\') attached to the processor with a stable entry id.\"\"\"\\ntype DocumentTypeItem {\\n \"\"\"Stable identifier for the entry; used to remove it.\"\"\"\\n id: OID!\\n \"\"\"Document type id this processor subscribes to.\"\"\"\\n documentType: String!\\n}\\n\\n\"\"\"\\nLifecycle status of a module definition.\\n- DRAFT: still being edited; codegen does not run.\\n- CONFIRMED: locked in; codegen produces the corresponding scaffold.\\n\"\"\"\\nenum StatusType {\\n DRAFT\\n CONFIRMED\\n}',\n examples: [],\n initialValue:\n '{\\n \"name\": \"\",\\n \"type\": \"\",\\n \"documentTypes\": [],\\n \"status\": \"DRAFT\",\\n \"processorApps\": []\\n}',\n },\n },\n modules: [\n {\n id: \"91ad39c1-4e8b-4127-b3c8-e835b85e6360\",\n name: \"base_operations\",\n description:\n \"Set the processor's identity, kind, lifecycle status, subscribed document types, and attached drive apps.\",\n operations: [\n {\n id: \"6f3a5c90-39f2-4302-a073-6195a71c5054\",\n name: \"SET_PROCESSOR_NAME\",\n description:\n \"Set the display name of the processor. Also determines the generated folder name under `processors/`.\",\n schema: \"input SetProcessorNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"b8f28bb4-c6ae-40e6-86fa-29ef14ff8667\",\n name: \"SET_PROCESSOR_TYPE\",\n description:\n \"Set the processor implementation kind (e.g. 'read-model', 'relational-db'). Determines which scaffold codegen emits.\",\n schema: \"input SetProcessorTypeInput {\\n type: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"fbbd7a71-c495-4efc-b8f6-1e57798dbbb4\",\n name: \"ADD_DOCUMENT_TYPE\",\n description:\n \"Subscribe the processor to a document type. Caller supplies a stable id so the entry can be removed later.\",\n schema:\n \"input AddDocumentTypeInput {\\n id: OID!\\n documentType: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"544d413f-423c-4d97-9570-84a19bffeab9\",\n name: \"REMOVE_DOCUMENT_TYPE\",\n description:\n \"Unsubscribe the processor from a document type by removing its entry id.\",\n schema: \"input RemoveDocumentTypeInput {\\n id: OID!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"df5eb500-7308-498c-9b80-028878ee198b\",\n name: \"ADD_PROCESSOR_APP\",\n description:\n \"Attach the processor to a drive app by name. The processor will run in the context of that app.\",\n schema:\n \"input AddProcessorAppInput {\\n processorApp: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"07e4168f-1a7b-41ef-953d-219028be7bb9\",\n name: \"REMOVE_PROCESSOR_APP\",\n description:\n \"Detach the processor from a drive app by name. No-op if the app is not currently attached.\",\n schema:\n \"input RemoveProcessorAppInput {\\n processorApp: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"7b6706eb-5e25-4d64-829a-e3a251380fd1\",\n name: \"SET_PROCESSOR_STATUS\",\n description:\n \"Move the processor between DRAFT and CONFIRMED. Codegen only runs once the status is CONFIRMED.\",\n schema:\n \"input SetProcessorStatusInput {\\n status: StatusType!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n ],\n version: 1,\n changeLog: [],\n },\n ],\n};\n","export {};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport type { ProcessorModulePHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the ProcessorModule document model */\nexport const utils: DocumentModelUtils<ProcessorModulePHState> = {\n ...genUtils,\n ...customUtils,\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelModule } from \"document-model\";\nimport { createState, defaultBaseState } from \"document-model\";\nimport { actions } from \"./actions.js\";\nimport { documentModel } from \"./gen/document-model.js\";\nimport { reducer } from \"./gen/reducer.js\";\nimport type { ProcessorModulePHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the ProcessorModule document type */\nexport const ProcessorModule = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<ProcessorModulePHState>;\n"],"mappings":";;;;AAEA,MAAa,gBAA0C;CACrD,IAAI;CACJ,MAAM;CACN,QAAQ;EACN,MAAM;EACN,SAAS;CACX;CACA,WAAW;CACX,aACE;CACF,gBAAgB,CACd;EACE,OAAO;GACL,OAAO;IACL,QAAQ;IACR,UAAU,CAAC;IACX,cAAc;GAChB;GACA,QAAQ;IACN,QACE;IACF,UAAU,CAAC;IACX,cACE;GACJ;EACF;EACA,SAAS,CACP;GACE,IAAI;GACJ,MAAM;GACN,aACE;GACF,YAAY;IACV;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;IACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT;GACF;EACF,CACF;EACA,SAAS;EACT,WAAW,CAAC;CACd,CACF;AACF;;;;;;;AExHA,MAAa,QAAoD;CAC/D,GAAGA;CACH,GAAGC;AACL;;;;ACAA,MAAa,kBAAkB;CAC7B,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,iBAAiB,GAAG,aAAa;AAC9D"}
@@ -1,4 +1,4 @@
1
- import { t as __exportAll } from "./chunk-pbuEa-1d.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { BaseDocumentHeaderSchema, BaseDocumentStateSchema, baseActions, baseCreateDocument, baseLoadFromInput, baseSaveToFileHandle, createAction, createReducer, createState, defaultBaseState, isDocumentAction } from "document-model";
3
3
  import * as z$1 from "zod";
4
4
  import { z } from "zod";
@@ -451,4 +451,4 @@ const VetraPackage = {
451
451
  //#endregion
452
452
  export { KeywordSchema as A, VetraPackageStateSchema as B, setPackageCategory as C, setPackageNpmUrl as D, setPackageName as E, SetPackageCategoryInputSchema as F, isDefinedNonNullAny as H, SetPackageDescriptionInputSchema as I, SetPackageGithubUrlInputSchema as L, SetPackageAuthorInputSchema as M, SetPackageAuthorNameInputSchema as N, AddPackageKeywordInputSchema as O, SetPackageAuthorWebsiteInputSchema as P, SetPackageNameInputSchema as R, setPackageAuthorWebsite as S, setPackageGithubUrl as T, definedNonNullAnySchema as V, addPackageKeyword as _, utils$1 as a, setPackageAuthor as b, VetraPackagePHStateSchema as c, isVetraPackageDocument as d, isVetraPackageState as f, actions as g, documentModel as h, initialLocalState as i, RemovePackageKeywordInputSchema as j, AuthorSchema as k, assertIsVetraPackageDocument as l, reducer as m, utils as n, VetraPackageDocumentHeaderSchema as o, vetraPackageDocumentType as p, initialGlobalState as r, VetraPackageDocumentSchema as s, VetraPackage as t, assertIsVetraPackageState as u, creators_exports as v, setPackageDescription as w, setPackageAuthorName as x, removePackageKeyword as y, SetPackageNpmUrlInputSchema as z };
453
453
 
454
- //# sourceMappingURL=module-CRfHlbnq.js.map
454
+ //# sourceMappingURL=module-FXJRy_1W.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module-CRfHlbnq.js","names":["z","vetraPackageBaseOperationsActions","utils","genUtils","customUtils"],"sources":["../document-models/vetra-package/v1/gen/schema/zod.ts","../document-models/vetra-package/v1/gen/base-operations/creators.ts","../document-models/vetra-package/v1/actions.ts","../document-models/vetra-package/v1/gen/document-model.ts","../document-models/vetra-package/v1/src/reducers/base-operations.ts","../document-models/vetra-package/v1/gen/reducer.ts","../document-models/vetra-package/v1/gen/document-type.ts","../document-models/vetra-package/v1/gen/document-schema.ts","../document-models/vetra-package/v1/gen/utils.ts","../document-models/vetra-package/v1/src/utils.ts","../document-models/vetra-package/v1/utils.ts","../document-models/vetra-package/v1/module.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport * as z from \"zod\";\nimport type {\n AddPackageKeywordInput,\n Author,\n Keyword,\n RemovePackageKeywordInput,\n SetPackageAuthorInput,\n SetPackageAuthorNameInput,\n SetPackageAuthorWebsiteInput,\n SetPackageCategoryInput,\n SetPackageDescriptionInput,\n SetPackageGithubUrlInput,\n SetPackageNameInput,\n SetPackageNpmUrlInput,\n VetraPackageState,\n} from \"./types.js\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport function AddPackageKeywordInputSchema(): z.ZodObject<\n Properties<AddPackageKeywordInput>\n> {\n return z.object({\n id: z.string(),\n label: z.string(),\n });\n}\n\nexport function AuthorSchema(): z.ZodObject<Properties<Author>> {\n return z.object({\n __typename: z.literal(\"Author\").optional(),\n name: z.string().nullish(),\n website: z.url().nullish(),\n });\n}\n\nexport function KeywordSchema(): z.ZodObject<Properties<Keyword>> {\n return z.object({\n __typename: z.literal(\"Keyword\").optional(),\n id: z.string(),\n label: z.string(),\n });\n}\n\nexport function RemovePackageKeywordInputSchema(): z.ZodObject<\n Properties<RemovePackageKeywordInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function SetPackageAuthorInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorInput>\n> {\n return z.object({\n name: z.string().nullish(),\n website: z.url().nullish(),\n });\n}\n\nexport function SetPackageAuthorNameInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetPackageAuthorWebsiteInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorWebsiteInput>\n> {\n return z.object({\n website: z.url(),\n });\n}\n\nexport function SetPackageCategoryInputSchema(): z.ZodObject<\n Properties<SetPackageCategoryInput>\n> {\n return z.object({\n category: z.string(),\n });\n}\n\nexport function SetPackageDescriptionInputSchema(): z.ZodObject<\n Properties<SetPackageDescriptionInput>\n> {\n return z.object({\n description: z.string(),\n });\n}\n\nexport function SetPackageGithubUrlInputSchema(): z.ZodObject<\n Properties<SetPackageGithubUrlInput>\n> {\n return z.object({\n url: z.url(),\n });\n}\n\nexport function SetPackageNameInputSchema(): z.ZodObject<\n Properties<SetPackageNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetPackageNpmUrlInputSchema(): z.ZodObject<\n Properties<SetPackageNpmUrlInput>\n> {\n return z.object({\n url: z.url(),\n });\n}\n\nexport function VetraPackageStateSchema(): z.ZodObject<\n Properties<VetraPackageState>\n> {\n return z.object({\n __typename: z.literal(\"VetraPackageState\").optional(),\n author: z.lazy(() => AuthorSchema()),\n category: z.string().nullish(),\n description: z.string().nullish(),\n githubUrl: z.url().nullish(),\n keywords: z.array(z.lazy(() => KeywordSchema())),\n name: z.string().nullish(),\n npmUrl: z.url().nullish(),\n });\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport {\n AddPackageKeywordInputSchema,\n RemovePackageKeywordInputSchema,\n SetPackageAuthorInputSchema,\n SetPackageAuthorNameInputSchema,\n SetPackageAuthorWebsiteInputSchema,\n SetPackageCategoryInputSchema,\n SetPackageDescriptionInputSchema,\n SetPackageGithubUrlInputSchema,\n SetPackageNameInputSchema,\n SetPackageNpmUrlInputSchema,\n} from \"../schema/zod.js\";\nimport type {\n AddPackageKeywordInput,\n RemovePackageKeywordInput,\n SetPackageAuthorInput,\n SetPackageAuthorNameInput,\n SetPackageAuthorWebsiteInput,\n SetPackageCategoryInput,\n SetPackageDescriptionInput,\n SetPackageGithubUrlInput,\n SetPackageNameInput,\n SetPackageNpmUrlInput,\n} from \"../types.js\";\nimport type {\n AddPackageKeywordAction,\n RemovePackageKeywordAction,\n SetPackageAuthorAction,\n SetPackageAuthorNameAction,\n SetPackageAuthorWebsiteAction,\n SetPackageCategoryAction,\n SetPackageDescriptionAction,\n SetPackageGithubUrlAction,\n SetPackageNameAction,\n SetPackageNpmUrlAction,\n} from \"./actions.js\";\n\nexport const setPackageName = (input: SetPackageNameInput) =>\n createAction<SetPackageNameAction>(\n \"SET_PACKAGE_NAME\",\n { ...input },\n undefined,\n SetPackageNameInputSchema,\n \"global\",\n );\n\nexport const setPackageDescription = (input: SetPackageDescriptionInput) =>\n createAction<SetPackageDescriptionAction>(\n \"SET_PACKAGE_DESCRIPTION\",\n { ...input },\n undefined,\n SetPackageDescriptionInputSchema,\n \"global\",\n );\n\nexport const setPackageCategory = (input: SetPackageCategoryInput) =>\n createAction<SetPackageCategoryAction>(\n \"SET_PACKAGE_CATEGORY\",\n { ...input },\n undefined,\n SetPackageCategoryInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthor = (input: SetPackageAuthorInput) =>\n createAction<SetPackageAuthorAction>(\n \"SET_PACKAGE_AUTHOR\",\n { ...input },\n undefined,\n SetPackageAuthorInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthorName = (input: SetPackageAuthorNameInput) =>\n createAction<SetPackageAuthorNameAction>(\n \"SET_PACKAGE_AUTHOR_NAME\",\n { ...input },\n undefined,\n SetPackageAuthorNameInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthorWebsite = (input: SetPackageAuthorWebsiteInput) =>\n createAction<SetPackageAuthorWebsiteAction>(\n \"SET_PACKAGE_AUTHOR_WEBSITE\",\n { ...input },\n undefined,\n SetPackageAuthorWebsiteInputSchema,\n \"global\",\n );\n\nexport const addPackageKeyword = (input: AddPackageKeywordInput) =>\n createAction<AddPackageKeywordAction>(\n \"ADD_PACKAGE_KEYWORD\",\n { ...input },\n undefined,\n AddPackageKeywordInputSchema,\n \"global\",\n );\n\nexport const removePackageKeyword = (input: RemovePackageKeywordInput) =>\n createAction<RemovePackageKeywordAction>(\n \"REMOVE_PACKAGE_KEYWORD\",\n { ...input },\n undefined,\n RemovePackageKeywordInputSchema,\n \"global\",\n );\n\nexport const setPackageGithubUrl = (input: SetPackageGithubUrlInput) =>\n createAction<SetPackageGithubUrlAction>(\n \"SET_PACKAGE_GITHUB_URL\",\n { ...input },\n undefined,\n SetPackageGithubUrlInputSchema,\n \"global\",\n );\n\nexport const setPackageNpmUrl = (input: SetPackageNpmUrlInput) =>\n createAction<SetPackageNpmUrlAction>(\n \"SET_PACKAGE_NPM_URL\",\n { ...input },\n undefined,\n SetPackageNpmUrlInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { baseActions } from \"document-model\";\nimport { vetraPackageBaseOperationsActions } from \"./gen/creators.js\";\n\n/** Actions for the VetraPackage document model */\n\nexport const actions = { ...baseActions, ...vetraPackageBaseOperationsActions };\n","import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/package\",\n name: \"Vetra Package\",\n author: {\n name: \"Powerhouse\",\n website: \"https://powerhouse.inc\",\n },\n extension: \".pkg\",\n description:\n \"Manifest for a Vetra Reactor Package: bundles the metadata (name, description, category, author, keywords, source links) used to publish and discover the package in the Powerhouse ecosystem. Create one Vetra Package document per project; the document models, editors, processors, and subgraphs you add to the project are registered against this package at build time.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n '\"\"\"\\nPackage metadata used to publish a Vetra Reactor Package to npm and surface\\nit inside Connect/Switchboard. All fields are optional so a package can be\\ncreated empty and filled in incrementally during development.\\n\"\"\"\\ntype VetraPackageState {\\n \"\"\"Human-readable package name (e.g. \\'Pizza Plaza\\'). Distinct from the npm package id.\"\"\"\\n name: String\\n \"\"\"One-paragraph summary of what the package provides. Shown on package listing pages.\"\"\"\\n description: String\\n \"\"\"Free-form category label used to group packages in directories (e.g. \\'Finance\\', \\'Productivity\\').\"\"\"\\n category: String\\n \"\"\"Author/maintainer information surfaced in the published package metadata.\"\"\"\\n author: Author!\\n \"\"\"Search keywords associated with the package. Each keyword has a stable id so it can be removed individually.\"\"\"\\n keywords: [Keyword!]!\\n \"\"\"Public source code URL (typically a GitHub repository).\"\"\"\\n githubUrl: URL\\n \"\"\"Published npm package URL. Set once the package has been released.\"\"\"\\n npmUrl: URL\\n}\\n\\n\"\"\"Author/maintainer of the Vetra Package.\"\"\"\\ntype Author {\\n \"\"\"Display name of the author or organization.\"\"\"\\n name: String\\n \"\"\"Author\\'s website URL.\"\"\"\\n website: URL\\n}\\n\\n\"\"\"A single search keyword attached to the package.\"\"\"\\ntype Keyword {\\n \"\"\"Stable identifier for the keyword entry; used to remove it.\"\"\"\\n id: OID!\\n \"\"\"Display label for the keyword (e.g. \\'invoicing\\', \\'defi\\').\"\"\"\\n label: String!\\n}',\n examples: [],\n initialValue:\n '{\\n \"name\": null,\\n \"description\": null,\\n \"category\": null,\\n \"author\": {\\n \"name\": null,\\n \"website\": null\\n },\\n \"keywords\": [],\\n \"githubUrl\": null,\\n \"npmUrl\": null\\n}',\n },\n },\n modules: [\n {\n id: \"a6156f32-8120-43a5-be8b-51c7feaa3460\",\n name: \"base_operations\",\n description:\n \"Setters for the package's identity, author, keywords, and source/distribution links.\",\n operations: [\n {\n id: \"33f2eab7-9e07-497f-a4e6-53e50968c3c9\",\n name: \"SET_PACKAGE_NAME\",\n description:\n \"Set the human-readable package name shown in listings and the Connect UI.\",\n schema: \"input SetPackageNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"a07bee80-c2a8-40d7-891b-822ee298d7d9\",\n name: \"SET_PACKAGE_DESCRIPTION\",\n description:\n \"Set the one-paragraph summary describing what the package does.\",\n schema:\n \"input SetPackageDescriptionInput {\\n description: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"f3ad82f8-580a-4c6e-b930-e203cda998bb\",\n name: \"SET_PACKAGE_CATEGORY\",\n description:\n 'Set the category label used to group the package in directories (e.g. \"Finance\", \"Productivity\").',\n schema: \"input SetPackageCategoryInput {\\n category: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"67f43579-ce98-47e6-bf48-27c0f44818b9\",\n name: \"SET_PACKAGE_AUTHOR\",\n description:\n \"Replace the author block in a single call. Either field may be omitted to clear it.\",\n schema:\n \"input SetPackageAuthorInput {\\n name: OID\\n website: URL\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"94ba44c4-9627-405e-9ea2-34e9da1c283a\",\n name: \"SET_PACKAGE_AUTHOR_NAME\",\n description:\n \"Set only the author's display name without touching the website field.\",\n schema: \"input SetPackageAuthorNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"3d5c08df-6c14-480b-915b-875941979fd0\",\n name: \"SET_PACKAGE_AUTHOR_WEBSITE\",\n description:\n \"Set only the author's website URL without touching the name field.\",\n schema:\n \"input SetPackageAuthorWebsiteInput {\\n website: URL!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"ed95f841-6fd0-4552-898d-e915599b7495\",\n name: \"ADD_PACKAGE_KEYWORD\",\n description:\n \"Append a search keyword. Caller supplies a stable id so the entry can be removed later.\",\n schema:\n \"input AddPackageKeywordInput {\\n id: String!\\n label: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"83c4db24-bd2f-424d-9e26-751580d6307b\",\n name: \"REMOVE_PACKAGE_KEYWORD\",\n description:\n \"Remove a keyword by its id. No-op if the id does not exist.\",\n schema: \"input RemovePackageKeywordInput {\\n id: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"83a90530-8535-4ea7-ab53-7865532398f7\",\n name: \"SET_PACKAGE_GITHUB_URL\",\n description:\n \"Set the public source code URL (typically a GitHub repository).\",\n schema: \"input SetPackageGithubUrlInput {\\n url: URL!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"e789859a-01ee-4b60-8e7e-a3ad928a26d1\",\n name: \"SET_PACKAGE_NPM_URL\",\n description:\n \"Set the published npm package URL once the package has been released.\",\n schema: \"input SetPackageNpmUrlInput {\\n url: URL!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n ],\n version: 1,\n changeLog: [],\n },\n ],\n};\n","import type { VetraPackageBaseOperationsOperations } from \"document-models/vetra-package/v1\";\n\nexport const vetraPackageBaseOperationsOperations: VetraPackageBaseOperationsOperations =\n {\n setPackageNameOperation(state, action, _dispatch) {\n state.name = action.input.name;\n },\n setPackageDescriptionOperation(state, action, _dispatch) {\n state.description = action.input.description;\n },\n setPackageCategoryOperation(state, action, _dispatch) {\n state.category = action.input.category;\n },\n setPackageAuthorOperation(state, action, _dispatch) {\n state.author = {\n name: action.input.name ?? null,\n website: action.input.website ?? null,\n };\n },\n setPackageAuthorNameOperation(state, action, _dispatch) {\n state.author.name = action.input.name;\n },\n setPackageAuthorWebsiteOperation(state, action, _dispatch) {\n state.author.website = action.input.website;\n },\n addPackageKeywordOperation(state, action, _dispatch) {\n // Check for duplicate ID\n const existingId = state.keywords.find(\n (keyword) => keyword.id === action.input.id,\n );\n if (existingId) {\n throw new Error(`Keyword with id \"${action.input.id}\" already exists`);\n }\n\n state.keywords.push(action.input);\n },\n removePackageKeywordOperation(state, action, _dispatch) {\n state.keywords = state.keywords.filter(\n (keyword) => keyword.id !== action.input.id,\n );\n },\n setPackageGithubUrlOperation(state, action, _dispatch) {\n state.githubUrl = action.input.url;\n },\n setPackageNpmUrlOperation(state, action, _dispatch) {\n state.npmUrl = action.input.url;\n },\n };\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\nimport type { Reducer, StateReducer } from \"document-model\";\nimport { createReducer, isDocumentAction } from \"document-model\";\nimport type { VetraPackagePHState } from \"document-models/vetra-package/v1\";\n\nimport { vetraPackageBaseOperationsOperations } from \"../src/reducers/base-operations.js\";\n\nimport {\n AddPackageKeywordInputSchema,\n RemovePackageKeywordInputSchema,\n SetPackageAuthorInputSchema,\n SetPackageAuthorNameInputSchema,\n SetPackageAuthorWebsiteInputSchema,\n SetPackageCategoryInputSchema,\n SetPackageDescriptionInputSchema,\n SetPackageGithubUrlInputSchema,\n SetPackageNameInputSchema,\n SetPackageNpmUrlInputSchema,\n} from \"./schema/zod.js\";\n\nconst stateReducer: StateReducer<VetraPackagePHState> = (\n state,\n action,\n dispatch,\n) => {\n if (isDocumentAction(action)) {\n return state;\n }\n switch (action.type) {\n case \"SET_PACKAGE_NAME\": {\n SetPackageNameInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageNameOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_DESCRIPTION\": {\n SetPackageDescriptionInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageDescriptionOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_CATEGORY\": {\n SetPackageCategoryInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageCategoryOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR\": {\n SetPackageAuthorInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR_NAME\": {\n SetPackageAuthorNameInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorNameOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR_WEBSITE\": {\n SetPackageAuthorWebsiteInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorWebsiteOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"ADD_PACKAGE_KEYWORD\": {\n AddPackageKeywordInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.addPackageKeywordOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"REMOVE_PACKAGE_KEYWORD\": {\n RemovePackageKeywordInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.removePackageKeywordOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_GITHUB_URL\": {\n SetPackageGithubUrlInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageGithubUrlOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_NPM_URL\": {\n SetPackageNpmUrlInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageNpmUrlOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n default:\n return state;\n }\n};\n\nexport const reducer: Reducer<VetraPackagePHState> =\n createReducer(stateReducer);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nexport const vetraPackageDocumentType = \"powerhouse/package\";\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport {\n BaseDocumentHeaderSchema,\n BaseDocumentStateSchema,\n} from \"document-model\";\nimport { z } from \"zod\";\nimport { vetraPackageDocumentType } from \"./document-type.js\";\nimport { VetraPackageStateSchema } from \"./schema/zod.js\";\nimport type { VetraPackageDocument, VetraPackagePHState } from \"./types.js\";\n\n/** Schema for validating the header object of a VetraPackage document */\nexport const VetraPackageDocumentHeaderSchema = BaseDocumentHeaderSchema.extend(\n {\n documentType: z.literal(vetraPackageDocumentType),\n },\n);\n\n/** Schema for validating the state object of a VetraPackage document */\nexport const VetraPackagePHStateSchema = BaseDocumentStateSchema.extend({\n global: VetraPackageStateSchema(),\n});\n\nexport const VetraPackageDocumentSchema = z.object({\n header: VetraPackageDocumentHeaderSchema,\n state: VetraPackagePHStateSchema,\n initialState: VetraPackagePHStateSchema,\n});\n\n/** Simple helper function to check if a state object is a VetraPackage document state object */\nexport function isVetraPackageState(\n state: unknown,\n): state is VetraPackagePHState {\n return VetraPackagePHStateSchema.safeParse(state).success;\n}\n\n/** Simple helper function to assert that a document state object is a VetraPackage document state object */\nexport function assertIsVetraPackageState(\n state: unknown,\n): asserts state is VetraPackagePHState {\n VetraPackagePHStateSchema.parse(state);\n}\n\n/** Simple helper function to check if a document is a VetraPackage document */\nexport function isVetraPackageDocument(\n document: unknown,\n): document is VetraPackageDocument {\n return VetraPackageDocumentSchema.safeParse(document).success;\n}\n\n/** Simple helper function to assert that a document is a VetraPackage document */\nexport function assertIsVetraPackageDocument(\n document: unknown,\n): asserts document is VetraPackageDocument {\n VetraPackageDocumentSchema.parse(document);\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport {\n baseCreateDocument,\n baseLoadFromInput,\n baseSaveToFileHandle,\n defaultBaseState,\n} from \"document-model\";\nimport {\n assertIsVetraPackageDocument,\n assertIsVetraPackageState,\n isVetraPackageDocument,\n isVetraPackageState,\n} from \"./document-schema.js\";\nimport { vetraPackageDocumentType } from \"./document-type.js\";\nimport { reducer } from \"./reducer.js\";\nimport type {\n VetraPackageGlobalState,\n VetraPackageLocalState,\n VetraPackagePHState,\n} from \"./types.js\";\n\nexport const initialGlobalState: VetraPackageGlobalState = {\n name: null,\n description: null,\n category: null,\n author: {\n name: null,\n website: null,\n },\n keywords: [],\n githubUrl: null,\n npmUrl: null,\n};\nexport const initialLocalState: VetraPackageLocalState = {};\n\nexport const utils: DocumentModelUtils<VetraPackagePHState> = {\n fileExtension: \".pkg\",\n createState(state) {\n return {\n ...defaultBaseState(),\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n },\n createDocument(state) {\n return baseCreateDocument(\n utils.createState,\n state,\n vetraPackageDocumentType,\n );\n },\n saveToFileHandle(document, input) {\n return baseSaveToFileHandle(document, input);\n },\n loadFromInput(input) {\n return baseLoadFromInput(input, reducer);\n },\n isStateOfType(state) {\n return isVetraPackageState(state);\n },\n assertIsStateOfType(state) {\n return assertIsVetraPackageState(state);\n },\n isDocumentOfType(document) {\n return isVetraPackageDocument(document);\n },\n assertIsDocumentOfType(document) {\n return assertIsVetraPackageDocument(document);\n },\n};\n","export {};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport type { VetraPackagePHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the VetraPackage document model */\nexport const utils: DocumentModelUtils<VetraPackagePHState> = {\n ...genUtils,\n ...customUtils,\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelModule } from \"document-model\";\nimport { createState, defaultBaseState } from \"document-model\";\nimport { actions } from \"./actions.js\";\nimport { documentModel } from \"./gen/document-model.js\";\nimport { reducer } from \"./gen/reducer.js\";\nimport type { VetraPackagePHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the VetraPackage document type */\nexport const VetraPackage = {\n version: 1,\n reducer,\n actions,\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A,QAAM,aACN,OACA,yBACD;;CAEH,iBAAiB,UAAU,OAAO;AAChC,SAAO,qBAAqB,UAAU,MAAM;;CAE9C,cAAc,OAAO;AACnB,SAAO,kBAAkB,OAAO,QAAQ;;CAE1C,cAAc,OAAO;AACnB,SAAO,oBAAoB,MAAM;;CAEnC,oBAAoB,OAAO;AACzB,SAAO,0BAA0B,MAAM;;CAEzC,iBAAiB,UAAU;AACzB,SAAO,uBAAuB,SAAS;;CAEzC,uBAAuB,UAAU;AAC/B,SAAO,6BAA6B,SAAS;;CAEhD;;;;;;;AE/DD,MAAa,QAAiD;CAC5D,GAAGC;CACH,GAAGC;CACJ;;;;ACAD,MAAa,eAAe;CAC1B,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,kBAAkB,EAAE,cAAc;CAC9D"}
1
+ {"version":3,"file":"module-FXJRy_1W.js","names":["z","vetraPackageBaseOperationsActions","utils","genUtils","customUtils"],"sources":["../document-models/vetra-package/v1/gen/schema/zod.ts","../document-models/vetra-package/v1/gen/base-operations/creators.ts","../document-models/vetra-package/v1/actions.ts","../document-models/vetra-package/v1/gen/document-model.ts","../document-models/vetra-package/v1/src/reducers/base-operations.ts","../document-models/vetra-package/v1/gen/reducer.ts","../document-models/vetra-package/v1/gen/document-type.ts","../document-models/vetra-package/v1/gen/document-schema.ts","../document-models/vetra-package/v1/gen/utils.ts","../document-models/vetra-package/v1/src/utils.ts","../document-models/vetra-package/v1/utils.ts","../document-models/vetra-package/v1/module.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport * as z from \"zod\";\nimport type {\n AddPackageKeywordInput,\n Author,\n Keyword,\n RemovePackageKeywordInput,\n SetPackageAuthorInput,\n SetPackageAuthorNameInput,\n SetPackageAuthorWebsiteInput,\n SetPackageCategoryInput,\n SetPackageDescriptionInput,\n SetPackageGithubUrlInput,\n SetPackageNameInput,\n SetPackageNpmUrlInput,\n VetraPackageState,\n} from \"./types.js\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport function AddPackageKeywordInputSchema(): z.ZodObject<\n Properties<AddPackageKeywordInput>\n> {\n return z.object({\n id: z.string(),\n label: z.string(),\n });\n}\n\nexport function AuthorSchema(): z.ZodObject<Properties<Author>> {\n return z.object({\n __typename: z.literal(\"Author\").optional(),\n name: z.string().nullish(),\n website: z.url().nullish(),\n });\n}\n\nexport function KeywordSchema(): z.ZodObject<Properties<Keyword>> {\n return z.object({\n __typename: z.literal(\"Keyword\").optional(),\n id: z.string(),\n label: z.string(),\n });\n}\n\nexport function RemovePackageKeywordInputSchema(): z.ZodObject<\n Properties<RemovePackageKeywordInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function SetPackageAuthorInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorInput>\n> {\n return z.object({\n name: z.string().nullish(),\n website: z.url().nullish(),\n });\n}\n\nexport function SetPackageAuthorNameInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetPackageAuthorWebsiteInputSchema(): z.ZodObject<\n Properties<SetPackageAuthorWebsiteInput>\n> {\n return z.object({\n website: z.url(),\n });\n}\n\nexport function SetPackageCategoryInputSchema(): z.ZodObject<\n Properties<SetPackageCategoryInput>\n> {\n return z.object({\n category: z.string(),\n });\n}\n\nexport function SetPackageDescriptionInputSchema(): z.ZodObject<\n Properties<SetPackageDescriptionInput>\n> {\n return z.object({\n description: z.string(),\n });\n}\n\nexport function SetPackageGithubUrlInputSchema(): z.ZodObject<\n Properties<SetPackageGithubUrlInput>\n> {\n return z.object({\n url: z.url(),\n });\n}\n\nexport function SetPackageNameInputSchema(): z.ZodObject<\n Properties<SetPackageNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetPackageNpmUrlInputSchema(): z.ZodObject<\n Properties<SetPackageNpmUrlInput>\n> {\n return z.object({\n url: z.url(),\n });\n}\n\nexport function VetraPackageStateSchema(): z.ZodObject<\n Properties<VetraPackageState>\n> {\n return z.object({\n __typename: z.literal(\"VetraPackageState\").optional(),\n author: z.lazy(() => AuthorSchema()),\n category: z.string().nullish(),\n description: z.string().nullish(),\n githubUrl: z.url().nullish(),\n keywords: z.array(z.lazy(() => KeywordSchema())),\n name: z.string().nullish(),\n npmUrl: z.url().nullish(),\n });\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport {\n AddPackageKeywordInputSchema,\n RemovePackageKeywordInputSchema,\n SetPackageAuthorInputSchema,\n SetPackageAuthorNameInputSchema,\n SetPackageAuthorWebsiteInputSchema,\n SetPackageCategoryInputSchema,\n SetPackageDescriptionInputSchema,\n SetPackageGithubUrlInputSchema,\n SetPackageNameInputSchema,\n SetPackageNpmUrlInputSchema,\n} from \"../schema/zod.js\";\nimport type {\n AddPackageKeywordInput,\n RemovePackageKeywordInput,\n SetPackageAuthorInput,\n SetPackageAuthorNameInput,\n SetPackageAuthorWebsiteInput,\n SetPackageCategoryInput,\n SetPackageDescriptionInput,\n SetPackageGithubUrlInput,\n SetPackageNameInput,\n SetPackageNpmUrlInput,\n} from \"../types.js\";\nimport type {\n AddPackageKeywordAction,\n RemovePackageKeywordAction,\n SetPackageAuthorAction,\n SetPackageAuthorNameAction,\n SetPackageAuthorWebsiteAction,\n SetPackageCategoryAction,\n SetPackageDescriptionAction,\n SetPackageGithubUrlAction,\n SetPackageNameAction,\n SetPackageNpmUrlAction,\n} from \"./actions.js\";\n\nexport const setPackageName = (input: SetPackageNameInput) =>\n createAction<SetPackageNameAction>(\n \"SET_PACKAGE_NAME\",\n { ...input },\n undefined,\n SetPackageNameInputSchema,\n \"global\",\n );\n\nexport const setPackageDescription = (input: SetPackageDescriptionInput) =>\n createAction<SetPackageDescriptionAction>(\n \"SET_PACKAGE_DESCRIPTION\",\n { ...input },\n undefined,\n SetPackageDescriptionInputSchema,\n \"global\",\n );\n\nexport const setPackageCategory = (input: SetPackageCategoryInput) =>\n createAction<SetPackageCategoryAction>(\n \"SET_PACKAGE_CATEGORY\",\n { ...input },\n undefined,\n SetPackageCategoryInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthor = (input: SetPackageAuthorInput) =>\n createAction<SetPackageAuthorAction>(\n \"SET_PACKAGE_AUTHOR\",\n { ...input },\n undefined,\n SetPackageAuthorInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthorName = (input: SetPackageAuthorNameInput) =>\n createAction<SetPackageAuthorNameAction>(\n \"SET_PACKAGE_AUTHOR_NAME\",\n { ...input },\n undefined,\n SetPackageAuthorNameInputSchema,\n \"global\",\n );\n\nexport const setPackageAuthorWebsite = (input: SetPackageAuthorWebsiteInput) =>\n createAction<SetPackageAuthorWebsiteAction>(\n \"SET_PACKAGE_AUTHOR_WEBSITE\",\n { ...input },\n undefined,\n SetPackageAuthorWebsiteInputSchema,\n \"global\",\n );\n\nexport const addPackageKeyword = (input: AddPackageKeywordInput) =>\n createAction<AddPackageKeywordAction>(\n \"ADD_PACKAGE_KEYWORD\",\n { ...input },\n undefined,\n AddPackageKeywordInputSchema,\n \"global\",\n );\n\nexport const removePackageKeyword = (input: RemovePackageKeywordInput) =>\n createAction<RemovePackageKeywordAction>(\n \"REMOVE_PACKAGE_KEYWORD\",\n { ...input },\n undefined,\n RemovePackageKeywordInputSchema,\n \"global\",\n );\n\nexport const setPackageGithubUrl = (input: SetPackageGithubUrlInput) =>\n createAction<SetPackageGithubUrlAction>(\n \"SET_PACKAGE_GITHUB_URL\",\n { ...input },\n undefined,\n SetPackageGithubUrlInputSchema,\n \"global\",\n );\n\nexport const setPackageNpmUrl = (input: SetPackageNpmUrlInput) =>\n createAction<SetPackageNpmUrlAction>(\n \"SET_PACKAGE_NPM_URL\",\n { ...input },\n undefined,\n SetPackageNpmUrlInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { baseActions } from \"document-model\";\nimport { vetraPackageBaseOperationsActions } from \"./gen/creators.js\";\n\n/** Actions for the VetraPackage document model */\n\nexport const actions = { ...baseActions, ...vetraPackageBaseOperationsActions };\n","import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/package\",\n name: \"Vetra Package\",\n author: {\n name: \"Powerhouse\",\n website: \"https://powerhouse.inc\",\n },\n extension: \".pkg\",\n description:\n \"Manifest for a Vetra Reactor Package: bundles the metadata (name, description, category, author, keywords, source links) used to publish and discover the package in the Powerhouse ecosystem. Create one Vetra Package document per project; the document models, editors, processors, and subgraphs you add to the project are registered against this package at build time.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n '\"\"\"\\nPackage metadata used to publish a Vetra Reactor Package to npm and surface\\nit inside Connect/Switchboard. All fields are optional so a package can be\\ncreated empty and filled in incrementally during development.\\n\"\"\"\\ntype VetraPackageState {\\n \"\"\"Human-readable package name (e.g. \\'Pizza Plaza\\'). Distinct from the npm package id.\"\"\"\\n name: String\\n \"\"\"One-paragraph summary of what the package provides. Shown on package listing pages.\"\"\"\\n description: String\\n \"\"\"Free-form category label used to group packages in directories (e.g. \\'Finance\\', \\'Productivity\\').\"\"\"\\n category: String\\n \"\"\"Author/maintainer information surfaced in the published package metadata.\"\"\"\\n author: Author!\\n \"\"\"Search keywords associated with the package. Each keyword has a stable id so it can be removed individually.\"\"\"\\n keywords: [Keyword!]!\\n \"\"\"Public source code URL (typically a GitHub repository).\"\"\"\\n githubUrl: URL\\n \"\"\"Published npm package URL. Set once the package has been released.\"\"\"\\n npmUrl: URL\\n}\\n\\n\"\"\"Author/maintainer of the Vetra Package.\"\"\"\\ntype Author {\\n \"\"\"Display name of the author or organization.\"\"\"\\n name: String\\n \"\"\"Author\\'s website URL.\"\"\"\\n website: URL\\n}\\n\\n\"\"\"A single search keyword attached to the package.\"\"\"\\ntype Keyword {\\n \"\"\"Stable identifier for the keyword entry; used to remove it.\"\"\"\\n id: OID!\\n \"\"\"Display label for the keyword (e.g. \\'invoicing\\', \\'defi\\').\"\"\"\\n label: String!\\n}',\n examples: [],\n initialValue:\n '{\\n \"name\": null,\\n \"description\": null,\\n \"category\": null,\\n \"author\": {\\n \"name\": null,\\n \"website\": null\\n },\\n \"keywords\": [],\\n \"githubUrl\": null,\\n \"npmUrl\": null\\n}',\n },\n },\n modules: [\n {\n id: \"a6156f32-8120-43a5-be8b-51c7feaa3460\",\n name: \"base_operations\",\n description:\n \"Setters for the package's identity, author, keywords, and source/distribution links.\",\n operations: [\n {\n id: \"33f2eab7-9e07-497f-a4e6-53e50968c3c9\",\n name: \"SET_PACKAGE_NAME\",\n description:\n \"Set the human-readable package name shown in listings and the Connect UI.\",\n schema: \"input SetPackageNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"a07bee80-c2a8-40d7-891b-822ee298d7d9\",\n name: \"SET_PACKAGE_DESCRIPTION\",\n description:\n \"Set the one-paragraph summary describing what the package does.\",\n schema:\n \"input SetPackageDescriptionInput {\\n description: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"f3ad82f8-580a-4c6e-b930-e203cda998bb\",\n name: \"SET_PACKAGE_CATEGORY\",\n description:\n 'Set the category label used to group the package in directories (e.g. \"Finance\", \"Productivity\").',\n schema: \"input SetPackageCategoryInput {\\n category: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"67f43579-ce98-47e6-bf48-27c0f44818b9\",\n name: \"SET_PACKAGE_AUTHOR\",\n description:\n \"Replace the author block in a single call. Either field may be omitted to clear it.\",\n schema:\n \"input SetPackageAuthorInput {\\n name: OID\\n website: URL\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"94ba44c4-9627-405e-9ea2-34e9da1c283a\",\n name: \"SET_PACKAGE_AUTHOR_NAME\",\n description:\n \"Set only the author's display name without touching the website field.\",\n schema: \"input SetPackageAuthorNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"3d5c08df-6c14-480b-915b-875941979fd0\",\n name: \"SET_PACKAGE_AUTHOR_WEBSITE\",\n description:\n \"Set only the author's website URL without touching the name field.\",\n schema:\n \"input SetPackageAuthorWebsiteInput {\\n website: URL!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"ed95f841-6fd0-4552-898d-e915599b7495\",\n name: \"ADD_PACKAGE_KEYWORD\",\n description:\n \"Append a search keyword. Caller supplies a stable id so the entry can be removed later.\",\n schema:\n \"input AddPackageKeywordInput {\\n id: String!\\n label: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"83c4db24-bd2f-424d-9e26-751580d6307b\",\n name: \"REMOVE_PACKAGE_KEYWORD\",\n description:\n \"Remove a keyword by its id. No-op if the id does not exist.\",\n schema: \"input RemovePackageKeywordInput {\\n id: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"83a90530-8535-4ea7-ab53-7865532398f7\",\n name: \"SET_PACKAGE_GITHUB_URL\",\n description:\n \"Set the public source code URL (typically a GitHub repository).\",\n schema: \"input SetPackageGithubUrlInput {\\n url: URL!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"e789859a-01ee-4b60-8e7e-a3ad928a26d1\",\n name: \"SET_PACKAGE_NPM_URL\",\n description:\n \"Set the published npm package URL once the package has been released.\",\n schema: \"input SetPackageNpmUrlInput {\\n url: URL!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n ],\n version: 1,\n changeLog: [],\n },\n ],\n};\n","import type { VetraPackageBaseOperationsOperations } from \"document-models/vetra-package/v1\";\n\nexport const vetraPackageBaseOperationsOperations: VetraPackageBaseOperationsOperations =\n {\n setPackageNameOperation(state, action, _dispatch) {\n state.name = action.input.name;\n },\n setPackageDescriptionOperation(state, action, _dispatch) {\n state.description = action.input.description;\n },\n setPackageCategoryOperation(state, action, _dispatch) {\n state.category = action.input.category;\n },\n setPackageAuthorOperation(state, action, _dispatch) {\n state.author = {\n name: action.input.name ?? null,\n website: action.input.website ?? null,\n };\n },\n setPackageAuthorNameOperation(state, action, _dispatch) {\n state.author.name = action.input.name;\n },\n setPackageAuthorWebsiteOperation(state, action, _dispatch) {\n state.author.website = action.input.website;\n },\n addPackageKeywordOperation(state, action, _dispatch) {\n // Check for duplicate ID\n const existingId = state.keywords.find(\n (keyword) => keyword.id === action.input.id,\n );\n if (existingId) {\n throw new Error(`Keyword with id \"${action.input.id}\" already exists`);\n }\n\n state.keywords.push(action.input);\n },\n removePackageKeywordOperation(state, action, _dispatch) {\n state.keywords = state.keywords.filter(\n (keyword) => keyword.id !== action.input.id,\n );\n },\n setPackageGithubUrlOperation(state, action, _dispatch) {\n state.githubUrl = action.input.url;\n },\n setPackageNpmUrlOperation(state, action, _dispatch) {\n state.npmUrl = action.input.url;\n },\n };\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\nimport type { Reducer, StateReducer } from \"document-model\";\nimport { createReducer, isDocumentAction } from \"document-model\";\nimport type { VetraPackagePHState } from \"document-models/vetra-package/v1\";\n\nimport { vetraPackageBaseOperationsOperations } from \"../src/reducers/base-operations.js\";\n\nimport {\n AddPackageKeywordInputSchema,\n RemovePackageKeywordInputSchema,\n SetPackageAuthorInputSchema,\n SetPackageAuthorNameInputSchema,\n SetPackageAuthorWebsiteInputSchema,\n SetPackageCategoryInputSchema,\n SetPackageDescriptionInputSchema,\n SetPackageGithubUrlInputSchema,\n SetPackageNameInputSchema,\n SetPackageNpmUrlInputSchema,\n} from \"./schema/zod.js\";\n\nconst stateReducer: StateReducer<VetraPackagePHState> = (\n state,\n action,\n dispatch,\n) => {\n if (isDocumentAction(action)) {\n return state;\n }\n switch (action.type) {\n case \"SET_PACKAGE_NAME\": {\n SetPackageNameInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageNameOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_DESCRIPTION\": {\n SetPackageDescriptionInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageDescriptionOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_CATEGORY\": {\n SetPackageCategoryInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageCategoryOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR\": {\n SetPackageAuthorInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR_NAME\": {\n SetPackageAuthorNameInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorNameOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_AUTHOR_WEBSITE\": {\n SetPackageAuthorWebsiteInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageAuthorWebsiteOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"ADD_PACKAGE_KEYWORD\": {\n AddPackageKeywordInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.addPackageKeywordOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"REMOVE_PACKAGE_KEYWORD\": {\n RemovePackageKeywordInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.removePackageKeywordOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_GITHUB_URL\": {\n SetPackageGithubUrlInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageGithubUrlOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_PACKAGE_NPM_URL\": {\n SetPackageNpmUrlInputSchema().parse(action.input);\n\n vetraPackageBaseOperationsOperations.setPackageNpmUrlOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n default:\n return state;\n }\n};\n\nexport const reducer: Reducer<VetraPackagePHState> =\n createReducer(stateReducer);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nexport const vetraPackageDocumentType = \"powerhouse/package\";\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport {\n BaseDocumentHeaderSchema,\n BaseDocumentStateSchema,\n} from \"document-model\";\nimport { z } from \"zod\";\nimport { vetraPackageDocumentType } from \"./document-type.js\";\nimport { VetraPackageStateSchema } from \"./schema/zod.js\";\nimport type { VetraPackageDocument, VetraPackagePHState } from \"./types.js\";\n\n/** Schema for validating the header object of a VetraPackage document */\nexport const VetraPackageDocumentHeaderSchema = BaseDocumentHeaderSchema.extend(\n {\n documentType: z.literal(vetraPackageDocumentType),\n },\n);\n\n/** Schema for validating the state object of a VetraPackage document */\nexport const VetraPackagePHStateSchema = BaseDocumentStateSchema.extend({\n global: VetraPackageStateSchema(),\n});\n\nexport const VetraPackageDocumentSchema = z.object({\n header: VetraPackageDocumentHeaderSchema,\n state: VetraPackagePHStateSchema,\n initialState: VetraPackagePHStateSchema,\n});\n\n/** Simple helper function to check if a state object is a VetraPackage document state object */\nexport function isVetraPackageState(\n state: unknown,\n): state is VetraPackagePHState {\n return VetraPackagePHStateSchema.safeParse(state).success;\n}\n\n/** Simple helper function to assert that a document state object is a VetraPackage document state object */\nexport function assertIsVetraPackageState(\n state: unknown,\n): asserts state is VetraPackagePHState {\n VetraPackagePHStateSchema.parse(state);\n}\n\n/** Simple helper function to check if a document is a VetraPackage document */\nexport function isVetraPackageDocument(\n document: unknown,\n): document is VetraPackageDocument {\n return VetraPackageDocumentSchema.safeParse(document).success;\n}\n\n/** Simple helper function to assert that a document is a VetraPackage document */\nexport function assertIsVetraPackageDocument(\n document: unknown,\n): asserts document is VetraPackageDocument {\n VetraPackageDocumentSchema.parse(document);\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport {\n baseCreateDocument,\n baseLoadFromInput,\n baseSaveToFileHandle,\n defaultBaseState,\n} from \"document-model\";\nimport {\n assertIsVetraPackageDocument,\n assertIsVetraPackageState,\n isVetraPackageDocument,\n isVetraPackageState,\n} from \"./document-schema.js\";\nimport { vetraPackageDocumentType } from \"./document-type.js\";\nimport { reducer } from \"./reducer.js\";\nimport type {\n VetraPackageGlobalState,\n VetraPackageLocalState,\n VetraPackagePHState,\n} from \"./types.js\";\n\nexport const initialGlobalState: VetraPackageGlobalState = {\n name: null,\n description: null,\n category: null,\n author: {\n name: null,\n website: null,\n },\n keywords: [],\n githubUrl: null,\n npmUrl: null,\n};\nexport const initialLocalState: VetraPackageLocalState = {};\n\nexport const utils: DocumentModelUtils<VetraPackagePHState> = {\n fileExtension: \".pkg\",\n createState(state) {\n return {\n ...defaultBaseState(),\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n },\n createDocument(state) {\n return baseCreateDocument(\n utils.createState,\n state,\n vetraPackageDocumentType,\n );\n },\n saveToFileHandle(document, input) {\n return baseSaveToFileHandle(document, input);\n },\n loadFromInput(input) {\n return baseLoadFromInput(input, reducer);\n },\n isStateOfType(state) {\n return isVetraPackageState(state);\n },\n assertIsStateOfType(state) {\n return assertIsVetraPackageState(state);\n },\n isDocumentOfType(document) {\n return isVetraPackageDocument(document);\n },\n assertIsDocumentOfType(document) {\n return assertIsVetraPackageDocument(document);\n },\n};\n","export {};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport type { VetraPackagePHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the VetraPackage document model */\nexport const utils: DocumentModelUtils<VetraPackagePHState> = {\n ...genUtils,\n ...customUtils,\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelModule } from \"document-model\";\nimport { createState, defaultBaseState } from \"document-model\";\nimport { actions } from \"./actions.js\";\nimport { documentModel } from \"./gen/document-model.js\";\nimport { reducer } from \"./gen/reducer.js\";\nimport type { VetraPackagePHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the VetraPackage document type */\nexport const VetraPackage = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<VetraPackagePHState>;\n"],"mappings":";;;;;AAyBA,MAAa,uBAAuB,MAClC,MAAM,KAAA,KAAa,MAAM;AAE3B,MAAa,0BAA0BA,IACpC,IAAI,CAAC,CACL,QAAQ,MAAM,oBAAoB,CAAC,CAAC;AAEvC,SAAgB,+BAEd;CACA,OAAOA,IAAE,OAAO;EACd,IAAIA,IAAE,OAAO;EACb,OAAOA,IAAE,OAAO;CAClB,CAAC;AACH;AAEA,SAAgB,eA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,OAAO,OAAO;CACzC;CACA,cAAc,OAAO;EACnB,OAAO,oBAAoB,KAAK;CAClC;CACA,oBAAoB,OAAO;EACzB,OAAO,0BAA0B,KAAK;CACxC;CACA,iBAAiB,UAAU;EACzB,OAAO,uBAAuB,QAAQ;CACxC;CACA,uBAAuB,UAAU;EAC/B,OAAO,6BAA6B,QAAQ;CAC9C;AACF;;;;;;;AE/DA,MAAa,QAAiD;CAC5D,GAAGC;CACH,GAAGC;AACL;;;;ACAA,MAAa,eAAe;CAC1B,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,iBAAiB,GAAG,aAAa;AAC9D"}
@@ -1,5 +1,5 @@
1
- import { t as __exportAll } from "./chunk-pbuEa-1d.js";
2
- import { f as reducer, p as actions, r as utils$1 } from "./utils-CkxGmQ2_.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
+ import { f as reducer, p as actions, r as utils$1 } from "./utils-Al_SGg2a.js";
3
3
  import { createState, defaultBaseState } from "document-model";
4
4
  //#region document-models/subgraph-module/v1/gen/document-model.ts
5
5
  const documentModel = {
@@ -77,4 +77,4 @@ const SubgraphModule = {
77
77
  //#endregion
78
78
  export { utils as n, documentModel as r, SubgraphModule as t };
79
79
 
80
- //# sourceMappingURL=module-Bx1OEHxF.js.map
80
+ //# sourceMappingURL=module-hLzF5tCL.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module-Bx1OEHxF.js","names":["genUtils","customUtils"],"sources":["../document-models/subgraph-module/v1/gen/document-model.ts","../document-models/subgraph-module/v1/src/utils.ts","../document-models/subgraph-module/v1/utils.ts","../document-models/subgraph-module/v1/module.ts"],"sourcesContent":["import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/subgraph\",\n name: \"Subgraph Module\",\n author: {\n name: \"Powerhouse\",\n website: \"https://powerhouse.inc\",\n },\n extension: \".subgraph\",\n description:\n \"Declares a GraphQL subgraph (a slice of the Switchboard API contributed by the package) shipped by a Vetra Reactor Package. Create one Subgraph Module document per subgraph, then mark it CONFIRMED to trigger codegen of the subgraph scaffold under `subgraphs/` \\u2014 the resolvers and schema you flesh out there are stitched into the Switchboard graph at runtime.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n '\"\"\"\\nConfiguration for a GraphQL subgraph contributed by the package. The subgraph\\nis served by Switchboard and stitched into the unified Powerhouse API.\\n\"\"\"\\ntype SubgraphModuleState {\\n \"\"\"Display name of the subgraph. Also determines the generated folder name under `subgraphs/` and the route segment Switchboard mounts it at.\"\"\"\\n name: String!\\n \"\"\"Lifecycle status. While DRAFT the subgraph definition is editable and codegen is skipped; switching to CONFIRMED triggers scaffold generation.\"\"\"\\n status: StatusType!\\n}\\n\\n\"\"\"\\nLifecycle status of a module definition.\\n- DRAFT: still being edited; codegen does not run.\\n- CONFIRMED: locked in; codegen produces the corresponding scaffold.\\n\"\"\"\\nenum StatusType {\\n DRAFT\\n CONFIRMED\\n}',\n examples: [],\n initialValue: '{\\n \"name\": \"\",\\n \"status\": \"DRAFT\"\\n}',\n },\n },\n modules: [\n {\n id: \"8af5bda9-6fc7-4427-bfed-1d32d76a552f\",\n name: \"base_operations\",\n description: \"Set the subgraph's identity and lifecycle status.\",\n operations: [\n {\n id: \"d7cd6b6b-01ea-42c8-97e2-288e04b50b42\",\n name: \"SET_SUBGRAPH_NAME\",\n description:\n \"Set the display name of the subgraph. Also determines the generated folder under `subgraphs/` and the route segment Switchboard mounts it at.\",\n schema: \"input SetSubgraphNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"5a20e641-dc36-428e-8924-ecb07f3f1b94\",\n name: \"SET_SUBGRAPH_STATUS\",\n description:\n \"Move the subgraph between DRAFT and CONFIRMED. Codegen only runs once the status is CONFIRMED.\",\n schema:\n \"input SetSubgraphStatusInput {\\n status: StatusType!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n ],\n version: 1,\n changeLog: [],\n },\n ],\n};\n","export {};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport type { SubgraphModulePHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the SubgraphModule document model */\nexport const utils: DocumentModelUtils<SubgraphModulePHState> = {\n ...genUtils,\n ...customUtils,\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelModule } from \"document-model\";\nimport { createState, defaultBaseState } from \"document-model\";\nimport { actions } from \"./actions.js\";\nimport { documentModel } from \"./gen/document-model.js\";\nimport { reducer } from \"./gen/reducer.js\";\nimport type { SubgraphModulePHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the SubgraphModule document type */\nexport const SubgraphModule = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<SubgraphModulePHState>;\n"],"mappings":";;;;AAEA,MAAa,gBAA0C;CACrD,IAAI;CACJ,MAAM;CACN,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CACD,WAAW;CACX,aACE;CACF,gBAAgB,CACd;EACE,OAAO;GACL,OAAO;IACL,QAAQ;IACR,UAAU,EAAE;IACZ,cAAc;IACf;GACD,QAAQ;IACN,QACE;IACF,UAAU,EAAE;IACZ,cAAc;IACf;GACF;EACD,SAAS,CACP;GACE,IAAI;GACJ,MAAM;GACN,aAAa;GACb,YAAY,CACV;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,QAAQ;IACR,UAAU;IACV,SAAS;IACT,QAAQ,EAAE;IACV,UAAU,EAAE;IACZ,OAAO;IACR,EACD;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,QACE;IACF,UAAU;IACV,SAAS;IACT,QAAQ,EAAE;IACV,UAAU,EAAE;IACZ,OAAO;IACR,CACF;GACF,CACF;EACD,SAAS;EACT,WAAW,EAAE;EACd,CACF;CACF;;;;;;;AEvDD,MAAa,QAAmD;CAC9D,GAAGA;CACH,GAAGC;CACJ;;;;ACAD,MAAa,iBAAiB;CAC5B,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,kBAAkB,EAAE,cAAc;CAC9D"}
1
+ {"version":3,"file":"module-hLzF5tCL.js","names":["genUtils","customUtils"],"sources":["../document-models/subgraph-module/v1/gen/document-model.ts","../document-models/subgraph-module/v1/src/utils.ts","../document-models/subgraph-module/v1/utils.ts","../document-models/subgraph-module/v1/module.ts"],"sourcesContent":["import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/subgraph\",\n name: \"Subgraph Module\",\n author: {\n name: \"Powerhouse\",\n website: \"https://powerhouse.inc\",\n },\n extension: \".subgraph\",\n description:\n \"Declares a GraphQL subgraph (a slice of the Switchboard API contributed by the package) shipped by a Vetra Reactor Package. Create one Subgraph Module document per subgraph, then mark it CONFIRMED to trigger codegen of the subgraph scaffold under `subgraphs/` \\u2014 the resolvers and schema you flesh out there are stitched into the Switchboard graph at runtime.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n '\"\"\"\\nConfiguration for a GraphQL subgraph contributed by the package. The subgraph\\nis served by Switchboard and stitched into the unified Powerhouse API.\\n\"\"\"\\ntype SubgraphModuleState {\\n \"\"\"Display name of the subgraph. Also determines the generated folder name under `subgraphs/` and the route segment Switchboard mounts it at.\"\"\"\\n name: String!\\n \"\"\"Lifecycle status. While DRAFT the subgraph definition is editable and codegen is skipped; switching to CONFIRMED triggers scaffold generation.\"\"\"\\n status: StatusType!\\n}\\n\\n\"\"\"\\nLifecycle status of a module definition.\\n- DRAFT: still being edited; codegen does not run.\\n- CONFIRMED: locked in; codegen produces the corresponding scaffold.\\n\"\"\"\\nenum StatusType {\\n DRAFT\\n CONFIRMED\\n}',\n examples: [],\n initialValue: '{\\n \"name\": \"\",\\n \"status\": \"DRAFT\"\\n}',\n },\n },\n modules: [\n {\n id: \"8af5bda9-6fc7-4427-bfed-1d32d76a552f\",\n name: \"base_operations\",\n description: \"Set the subgraph's identity and lifecycle status.\",\n operations: [\n {\n id: \"d7cd6b6b-01ea-42c8-97e2-288e04b50b42\",\n name: \"SET_SUBGRAPH_NAME\",\n description:\n \"Set the display name of the subgraph. Also determines the generated folder under `subgraphs/` and the route segment Switchboard mounts it at.\",\n schema: \"input SetSubgraphNameInput {\\n name: String!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"5a20e641-dc36-428e-8924-ecb07f3f1b94\",\n name: \"SET_SUBGRAPH_STATUS\",\n description:\n \"Move the subgraph between DRAFT and CONFIRMED. Codegen only runs once the status is CONFIRMED.\",\n schema:\n \"input SetSubgraphStatusInput {\\n status: StatusType!\\n}\",\n template: \"\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n ],\n version: 1,\n changeLog: [],\n },\n ],\n};\n","export {};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport type { SubgraphModulePHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the SubgraphModule document model */\nexport const utils: DocumentModelUtils<SubgraphModulePHState> = {\n ...genUtils,\n ...customUtils,\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelModule } from \"document-model\";\nimport { createState, defaultBaseState } from \"document-model\";\nimport { actions } from \"./actions.js\";\nimport { documentModel } from \"./gen/document-model.js\";\nimport { reducer } from \"./gen/reducer.js\";\nimport type { SubgraphModulePHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the SubgraphModule document type */\nexport const SubgraphModule = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<SubgraphModulePHState>;\n"],"mappings":";;;;AAEA,MAAa,gBAA0C;CACrD,IAAI;CACJ,MAAM;CACN,QAAQ;EACN,MAAM;EACN,SAAS;CACX;CACA,WAAW;CACX,aACE;CACF,gBAAgB,CACd;EACE,OAAO;GACL,OAAO;IACL,QAAQ;IACR,UAAU,CAAC;IACX,cAAc;GAChB;GACA,QAAQ;IACN,QACE;IACF,UAAU,CAAC;IACX,cAAc;GAChB;EACF;EACA,SAAS,CACP;GACE,IAAI;GACJ,MAAM;GACN,aAAa;GACb,YAAY,CACV;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,QAAQ;IACR,UAAU;IACV,SAAS;IACT,QAAQ,CAAC;IACT,UAAU,CAAC;IACX,OAAO;GACT,GACA;IACE,IAAI;IACJ,MAAM;IACN,aACE;IACF,QACE;IACF,UAAU;IACV,SAAS;IACT,QAAQ,CAAC;IACT,UAAU,CAAC;IACX,OAAO;GACT,CACF;EACF,CACF;EACA,SAAS;EACT,WAAW,CAAC;CACd,CACF;AACF;;;;;;;AEvDA,MAAa,QAAmD;CAC9D,GAAGA;CACH,GAAGC;AACL;;;;ACAA,MAAa,iBAAiB;CAC5B,SAAS;CACT;CACA;CACA;CACA,eAAe,YAAY,iBAAiB,GAAG,aAAa;AAC9D"}
@@ -1,4 +1,4 @@
1
- import { r as utils } from "./utils-DXCsvCXL.js";
1
+ import { r as utils } from "./utils-876N1Sph.js";
2
2
  import { createBaseState, defaultBaseState } from "document-model";
3
3
  //#region document-models/document-editor/v1/gen/ph-factories.ts
4
4
  function defaultGlobalState() {
@@ -48,4 +48,4 @@ function createDocumentEditorDocument(state) {
48
48
  //#endregion
49
49
  export { defaultPHState as a, defaultLocalState as i, createState$1 as n, defaultGlobalState as r, createDocumentEditorDocument as t };
50
50
 
51
- //# sourceMappingURL=ph-factories-CjbIAMgT.js.map
51
+ //# sourceMappingURL=ph-factories-Bgnr3mK3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ph-factories-CjbIAMgT.js","names":["createState"],"sources":["../document-models/document-editor/v1/gen/ph-factories.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n * Factory methods for creating DocumentEditorDocument instances\n */\nimport type { PHAuthState, PHBaseState, PHDocumentState } from \"document-model\";\nimport { createBaseState, defaultBaseState } from \"document-model\";\nimport type {\n DocumentEditorDocument,\n DocumentEditorGlobalState,\n DocumentEditorLocalState,\n DocumentEditorPHState,\n} from \"./types.js\";\nimport { utils } from \"./utils.js\";\n\nexport function defaultGlobalState(): DocumentEditorGlobalState {\n return {\n name: \"\",\n documentTypes: [],\n status: \"DRAFT\",\n };\n}\n\nexport function defaultLocalState(): DocumentEditorLocalState {\n return {};\n}\n\nexport function defaultPHState(): DocumentEditorPHState {\n return {\n ...defaultBaseState(),\n global: defaultGlobalState(),\n local: defaultLocalState(),\n };\n}\n\nexport function createGlobalState(\n state?: Partial<DocumentEditorGlobalState>,\n): DocumentEditorGlobalState {\n return {\n ...defaultGlobalState(),\n ...(state || {}),\n };\n}\n\nexport function createLocalState(\n state?: Partial<DocumentEditorLocalState>,\n): DocumentEditorLocalState {\n return {\n ...defaultLocalState(),\n ...(state || {}),\n } as DocumentEditorLocalState;\n}\n\nexport function createState(\n baseState?: Partial<PHBaseState>,\n globalState?: Partial<DocumentEditorGlobalState>,\n localState?: Partial<DocumentEditorLocalState>,\n): DocumentEditorPHState {\n return {\n ...createBaseState(baseState?.auth, baseState?.document),\n global: createGlobalState(globalState),\n local: createLocalState(localState),\n };\n}\n\n/**\n * Creates a DocumentEditorDocument with custom global and local state\n * This properly handles the PHBaseState requirements while allowing\n * document-specific state to be set.\n */\nexport function createDocumentEditorDocument(\n state?: Partial<{\n auth?: Partial<PHAuthState>;\n document?: Partial<PHDocumentState>;\n global?: Partial<DocumentEditorGlobalState>;\n local?: Partial<DocumentEditorLocalState>;\n }>,\n): DocumentEditorDocument {\n const document = utils.createDocument(\n state\n ? createState(\n createBaseState(state.auth, state.document),\n state.global,\n state.local,\n )\n : undefined,\n );\n\n return document;\n}\n"],"mappings":";;;AAeA,SAAgB,qBAAgD;AAC9D,QAAO;EACL,MAAM;EACN,eAAe,EAAE;EACjB,QAAQ;EACT;;AAGH,SAAgB,oBAA8C;AAC5D,QAAO,EAAE;;AAGX,SAAgB,iBAAwC;AACtD,QAAO;EACL,GAAG,kBAAkB;EACrB,QAAQ,oBAAoB;EAC5B,OAAO,mBAAmB;EAC3B;;AAGH,SAAgB,kBACd,OAC2B;AAC3B,QAAO;EACL,GAAG,oBAAoB;EACvB,GAAI,SAAS,EAAE;EAChB;;AAGH,SAAgB,iBACd,OAC0B;AAC1B,QAAO;EACL,GAAG,mBAAmB;EACtB,GAAI,SAAS,EAAE;EAChB;;AAGH,SAAgBA,cACd,WACA,aACA,YACuB;AACvB,QAAO;EACL,GAAG,gBAAgB,WAAW,MAAM,WAAW,SAAS;EACxD,QAAQ,kBAAkB,YAAY;EACtC,OAAO,iBAAiB,WAAW;EACpC;;;;;;;AAQH,SAAgB,6BACd,OAMwB;AAWxB,QAViB,MAAM,eACrB,QACIA,cACE,gBAAgB,MAAM,MAAM,MAAM,SAAS,EAC3C,MAAM,QACN,MAAM,MACP,GACD,KAAA,EACL"}
1
+ {"version":3,"file":"ph-factories-Bgnr3mK3.js","names":["createState"],"sources":["../document-models/document-editor/v1/gen/ph-factories.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n * Factory methods for creating DocumentEditorDocument instances\n */\nimport type { PHAuthState, PHBaseState, PHDocumentState } from \"document-model\";\nimport { createBaseState, defaultBaseState } from \"document-model\";\nimport type {\n DocumentEditorDocument,\n DocumentEditorGlobalState,\n DocumentEditorLocalState,\n DocumentEditorPHState,\n} from \"./types.js\";\nimport { utils } from \"./utils.js\";\n\nexport function defaultGlobalState(): DocumentEditorGlobalState {\n return {\n name: \"\",\n documentTypes: [],\n status: \"DRAFT\",\n };\n}\n\nexport function defaultLocalState(): DocumentEditorLocalState {\n return {};\n}\n\nexport function defaultPHState(): DocumentEditorPHState {\n return {\n ...defaultBaseState(),\n global: defaultGlobalState(),\n local: defaultLocalState(),\n };\n}\n\nexport function createGlobalState(\n state?: Partial<DocumentEditorGlobalState>,\n): DocumentEditorGlobalState {\n return {\n ...defaultGlobalState(),\n ...(state || {}),\n };\n}\n\nexport function createLocalState(\n state?: Partial<DocumentEditorLocalState>,\n): DocumentEditorLocalState {\n return {\n ...defaultLocalState(),\n ...(state || {}),\n } as DocumentEditorLocalState;\n}\n\nexport function createState(\n baseState?: Partial<PHBaseState>,\n globalState?: Partial<DocumentEditorGlobalState>,\n localState?: Partial<DocumentEditorLocalState>,\n): DocumentEditorPHState {\n return {\n ...createBaseState(baseState?.auth, baseState?.document),\n global: createGlobalState(globalState),\n local: createLocalState(localState),\n };\n}\n\n/**\n * Creates a DocumentEditorDocument with custom global and local state\n * This properly handles the PHBaseState requirements while allowing\n * document-specific state to be set.\n */\nexport function createDocumentEditorDocument(\n state?: Partial<{\n auth?: Partial<PHAuthState>;\n document?: Partial<PHDocumentState>;\n global?: Partial<DocumentEditorGlobalState>;\n local?: Partial<DocumentEditorLocalState>;\n }>,\n): DocumentEditorDocument {\n const document = utils.createDocument(\n state\n ? createState(\n createBaseState(state.auth, state.document),\n state.global,\n state.local,\n )\n : undefined,\n );\n\n return document;\n}\n"],"mappings":";;;AAeA,SAAgB,qBAAgD;CAC9D,OAAO;EACL,MAAM;EACN,eAAe,CAAC;EAChB,QAAQ;CACV;AACF;AAEA,SAAgB,oBAA8C;CAC5D,OAAO,CAAC;AACV;AAEA,SAAgB,iBAAwC;CACtD,OAAO;EACL,GAAG,iBAAiB;EACpB,QAAQ,mBAAmB;EAC3B,OAAO,kBAAkB;CAC3B;AACF;AAEA,SAAgB,kBACd,OAC2B;CAC3B,OAAO;EACL,GAAG,mBAAmB;EACtB,GAAI,SAAS,CAAC;CAChB;AACF;AAEA,SAAgB,iBACd,OAC0B;CAC1B,OAAO;EACL,GAAG,kBAAkB;EACrB,GAAI,SAAS,CAAC;CAChB;AACF;AAEA,SAAgBA,cACd,WACA,aACA,YACuB;CACvB,OAAO;EACL,GAAG,gBAAgB,WAAW,MAAM,WAAW,QAAQ;EACvD,QAAQ,kBAAkB,WAAW;EACrC,OAAO,iBAAiB,UAAU;CACpC;AACF;;;;;;AAOA,SAAgB,6BACd,OAMwB;CAWxB,OAViB,MAAM,eACrB,QACIA,cACE,gBAAgB,MAAM,MAAM,MAAM,QAAQ,GAC1C,MAAM,QACN,MAAM,KACR,IACA,KAAA,CAGQ;AAChB"}
@@ -1,4 +1,4 @@
1
- import { r as utils } from "./utils-B4KdjDnp.js";
1
+ import { r as utils } from "./utils-COP7hJ-K.js";
2
2
  import { createBaseState, defaultBaseState } from "document-model";
3
3
  //#region document-models/app-module/v1/gen/ph-factories.ts
4
4
  function defaultGlobalState() {
@@ -49,4 +49,4 @@ function createAppModuleDocument(state) {
49
49
  //#endregion
50
50
  export { defaultPHState as a, defaultLocalState as i, createState$1 as n, defaultGlobalState as r, createAppModuleDocument as t };
51
51
 
52
- //# sourceMappingURL=ph-factories-Ce8oAqs9.js.map
52
+ //# sourceMappingURL=ph-factories-CgoFCmG0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ph-factories-Ce8oAqs9.js","names":["createState"],"sources":["../document-models/app-module/v1/gen/ph-factories.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n * Factory methods for creating AppModuleDocument instances\n */\nimport type { PHAuthState, PHBaseState, PHDocumentState } from \"document-model\";\nimport { createBaseState, defaultBaseState } from \"document-model\";\nimport type {\n AppModuleDocument,\n AppModuleGlobalState,\n AppModuleLocalState,\n AppModulePHState,\n} from \"./types.js\";\nimport { utils } from \"./utils.js\";\n\nexport function defaultGlobalState(): AppModuleGlobalState {\n return {\n name: \"\",\n status: \"DRAFT\",\n allowedDocumentTypes: null,\n isDragAndDropEnabled: true,\n };\n}\n\nexport function defaultLocalState(): AppModuleLocalState {\n return {};\n}\n\nexport function defaultPHState(): AppModulePHState {\n return {\n ...defaultBaseState(),\n global: defaultGlobalState(),\n local: defaultLocalState(),\n };\n}\n\nexport function createGlobalState(\n state?: Partial<AppModuleGlobalState>,\n): AppModuleGlobalState {\n return {\n ...defaultGlobalState(),\n ...(state || {}),\n };\n}\n\nexport function createLocalState(\n state?: Partial<AppModuleLocalState>,\n): AppModuleLocalState {\n return {\n ...defaultLocalState(),\n ...(state || {}),\n } as AppModuleLocalState;\n}\n\nexport function createState(\n baseState?: Partial<PHBaseState>,\n globalState?: Partial<AppModuleGlobalState>,\n localState?: Partial<AppModuleLocalState>,\n): AppModulePHState {\n return {\n ...createBaseState(baseState?.auth, baseState?.document),\n global: createGlobalState(globalState),\n local: createLocalState(localState),\n };\n}\n\n/**\n * Creates a AppModuleDocument with custom global and local state\n * This properly handles the PHBaseState requirements while allowing\n * document-specific state to be set.\n */\nexport function createAppModuleDocument(\n state?: Partial<{\n auth?: Partial<PHAuthState>;\n document?: Partial<PHDocumentState>;\n global?: Partial<AppModuleGlobalState>;\n local?: Partial<AppModuleLocalState>;\n }>,\n): AppModuleDocument {\n const document = utils.createDocument(\n state\n ? createState(\n createBaseState(state.auth, state.document),\n state.global,\n state.local,\n )\n : undefined,\n );\n\n return document;\n}\n"],"mappings":";;;AAeA,SAAgB,qBAA2C;AACzD,QAAO;EACL,MAAM;EACN,QAAQ;EACR,sBAAsB;EACtB,sBAAsB;EACvB;;AAGH,SAAgB,oBAAyC;AACvD,QAAO,EAAE;;AAGX,SAAgB,iBAAmC;AACjD,QAAO;EACL,GAAG,kBAAkB;EACrB,QAAQ,oBAAoB;EAC5B,OAAO,mBAAmB;EAC3B;;AAGH,SAAgB,kBACd,OACsB;AACtB,QAAO;EACL,GAAG,oBAAoB;EACvB,GAAI,SAAS,EAAE;EAChB;;AAGH,SAAgB,iBACd,OACqB;AACrB,QAAO;EACL,GAAG,mBAAmB;EACtB,GAAI,SAAS,EAAE;EAChB;;AAGH,SAAgBA,cACd,WACA,aACA,YACkB;AAClB,QAAO;EACL,GAAG,gBAAgB,WAAW,MAAM,WAAW,SAAS;EACxD,QAAQ,kBAAkB,YAAY;EACtC,OAAO,iBAAiB,WAAW;EACpC;;;;;;;AAQH,SAAgB,wBACd,OAMmB;AAWnB,QAViB,MAAM,eACrB,QACIA,cACE,gBAAgB,MAAM,MAAM,MAAM,SAAS,EAC3C,MAAM,QACN,MAAM,MACP,GACD,KAAA,EACL"}
1
+ {"version":3,"file":"ph-factories-CgoFCmG0.js","names":["createState"],"sources":["../document-models/app-module/v1/gen/ph-factories.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n * Factory methods for creating AppModuleDocument instances\n */\nimport type { PHAuthState, PHBaseState, PHDocumentState } from \"document-model\";\nimport { createBaseState, defaultBaseState } from \"document-model\";\nimport type {\n AppModuleDocument,\n AppModuleGlobalState,\n AppModuleLocalState,\n AppModulePHState,\n} from \"./types.js\";\nimport { utils } from \"./utils.js\";\n\nexport function defaultGlobalState(): AppModuleGlobalState {\n return {\n name: \"\",\n status: \"DRAFT\",\n allowedDocumentTypes: null,\n isDragAndDropEnabled: true,\n };\n}\n\nexport function defaultLocalState(): AppModuleLocalState {\n return {};\n}\n\nexport function defaultPHState(): AppModulePHState {\n return {\n ...defaultBaseState(),\n global: defaultGlobalState(),\n local: defaultLocalState(),\n };\n}\n\nexport function createGlobalState(\n state?: Partial<AppModuleGlobalState>,\n): AppModuleGlobalState {\n return {\n ...defaultGlobalState(),\n ...(state || {}),\n };\n}\n\nexport function createLocalState(\n state?: Partial<AppModuleLocalState>,\n): AppModuleLocalState {\n return {\n ...defaultLocalState(),\n ...(state || {}),\n } as AppModuleLocalState;\n}\n\nexport function createState(\n baseState?: Partial<PHBaseState>,\n globalState?: Partial<AppModuleGlobalState>,\n localState?: Partial<AppModuleLocalState>,\n): AppModulePHState {\n return {\n ...createBaseState(baseState?.auth, baseState?.document),\n global: createGlobalState(globalState),\n local: createLocalState(localState),\n };\n}\n\n/**\n * Creates a AppModuleDocument with custom global and local state\n * This properly handles the PHBaseState requirements while allowing\n * document-specific state to be set.\n */\nexport function createAppModuleDocument(\n state?: Partial<{\n auth?: Partial<PHAuthState>;\n document?: Partial<PHDocumentState>;\n global?: Partial<AppModuleGlobalState>;\n local?: Partial<AppModuleLocalState>;\n }>,\n): AppModuleDocument {\n const document = utils.createDocument(\n state\n ? createState(\n createBaseState(state.auth, state.document),\n state.global,\n state.local,\n )\n : undefined,\n );\n\n return document;\n}\n"],"mappings":";;;AAeA,SAAgB,qBAA2C;CACzD,OAAO;EACL,MAAM;EACN,QAAQ;EACR,sBAAsB;EACtB,sBAAsB;CACxB;AACF;AAEA,SAAgB,oBAAyC;CACvD,OAAO,CAAC;AACV;AAEA,SAAgB,iBAAmC;CACjD,OAAO;EACL,GAAG,iBAAiB;EACpB,QAAQ,mBAAmB;EAC3B,OAAO,kBAAkB;CAC3B;AACF;AAEA,SAAgB,kBACd,OACsB;CACtB,OAAO;EACL,GAAG,mBAAmB;EACtB,GAAI,SAAS,CAAC;CAChB;AACF;AAEA,SAAgB,iBACd,OACqB;CACrB,OAAO;EACL,GAAG,kBAAkB;EACrB,GAAI,SAAS,CAAC;CAChB;AACF;AAEA,SAAgBA,cACd,WACA,aACA,YACkB;CAClB,OAAO;EACL,GAAG,gBAAgB,WAAW,MAAM,WAAW,QAAQ;EACvD,QAAQ,kBAAkB,WAAW;EACrC,OAAO,iBAAiB,UAAU;CACpC;AACF;;;;;;AAOA,SAAgB,wBACd,OAMmB;CAWnB,OAViB,MAAM,eACrB,QACIA,cACE,gBAAgB,MAAM,MAAM,MAAM,QAAQ,GAC1C,MAAM,QACN,MAAM,KACR,IACA,KAAA,CAGQ;AAChB"}