@powerhousedao/powerhouse-vetra-packages 6.0.0-dev.100

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 (256) hide show
  1. package/LICENSE +661 -0
  2. package/dist/document-models/document-models.d.ts +3 -0
  3. package/dist/document-models/document-models.d.ts.map +1 -0
  4. package/dist/document-models/document-models.js +2 -0
  5. package/dist/document-models/document-models.js.map +1 -0
  6. package/dist/editors/document-model-editor/components/button.d.ts +2 -0
  7. package/dist/editors/document-model-editor/components/button.d.ts.map +1 -0
  8. package/dist/editors/document-model-editor/components/button.js +8 -0
  9. package/dist/editors/document-model-editor/components/button.js.map +1 -0
  10. package/dist/editors/document-model-editor/components/code-editors/constants.d.ts +3 -0
  11. package/dist/editors/document-model-editor/components/code-editors/constants.d.ts.map +1 -0
  12. package/dist/editors/document-model-editor/components/code-editors/constants.js +38 -0
  13. package/dist/editors/document-model-editor/components/code-editors/constants.js.map +1 -0
  14. package/dist/editors/document-model-editor/components/code-editors/factories.d.ts +4 -0
  15. package/dist/editors/document-model-editor/components/code-editors/factories.d.ts.map +1 -0
  16. package/dist/editors/document-model-editor/components/code-editors/factories.js +47 -0
  17. package/dist/editors/document-model-editor/components/code-editors/factories.js.map +1 -0
  18. package/dist/editors/document-model-editor/components/code-editors/graphql-editor.d.ts +10 -0
  19. package/dist/editors/document-model-editor/components/code-editors/graphql-editor.d.ts.map +1 -0
  20. package/dist/editors/document-model-editor/components/code-editors/graphql-editor.js +73 -0
  21. package/dist/editors/document-model-editor/components/code-editors/graphql-editor.js.map +1 -0
  22. package/dist/editors/document-model-editor/components/code-editors/hooks.d.ts +23 -0
  23. package/dist/editors/document-model-editor/components/code-editors/hooks.d.ts.map +1 -0
  24. package/dist/editors/document-model-editor/components/code-editors/hooks.js +59 -0
  25. package/dist/editors/document-model-editor/components/code-editors/hooks.js.map +1 -0
  26. package/dist/editors/document-model-editor/components/code-editors/json-editor.d.ts +8 -0
  27. package/dist/editors/document-model-editor/components/code-editors/json-editor.d.ts.map +1 -0
  28. package/dist/editors/document-model-editor/components/code-editors/json-editor.js +47 -0
  29. package/dist/editors/document-model-editor/components/code-editors/json-editor.js.map +1 -0
  30. package/dist/editors/document-model-editor/components/code-editors/linting.d.ts +6 -0
  31. package/dist/editors/document-model-editor/components/code-editors/linting.d.ts.map +1 -0
  32. package/dist/editors/document-model-editor/components/code-editors/linting.js +59 -0
  33. package/dist/editors/document-model-editor/components/code-editors/linting.js.map +1 -0
  34. package/dist/editors/document-model-editor/components/divider.d.ts +8 -0
  35. package/dist/editors/document-model-editor/components/divider.d.ts.map +1 -0
  36. package/dist/editors/document-model-editor/components/divider.js +22 -0
  37. package/dist/editors/document-model-editor/components/divider.js.map +1 -0
  38. package/dist/editors/document-model-editor/components/errors.d.ts +6 -0
  39. package/dist/editors/document-model-editor/components/errors.d.ts.map +1 -0
  40. package/dist/editors/document-model-editor/components/errors.js +5 -0
  41. package/dist/editors/document-model-editor/components/errors.js.map +1 -0
  42. package/dist/editors/document-model-editor/components/form.d.ts +12 -0
  43. package/dist/editors/document-model-editor/components/form.d.ts.map +1 -0
  44. package/dist/editors/document-model-editor/components/form.js +43 -0
  45. package/dist/editors/document-model-editor/components/form.js.map +1 -0
  46. package/dist/editors/document-model-editor/components/input.d.ts +6 -0
  47. package/dist/editors/document-model-editor/components/input.d.ts.map +1 -0
  48. package/dist/editors/document-model-editor/components/input.js +9 -0
  49. package/dist/editors/document-model-editor/components/input.js.map +1 -0
  50. package/dist/editors/document-model-editor/components/label.d.ts +6 -0
  51. package/dist/editors/document-model-editor/components/label.d.ts.map +1 -0
  52. package/dist/editors/document-model-editor/components/label.js +10 -0
  53. package/dist/editors/document-model-editor/components/label.js.map +1 -0
  54. package/dist/editors/document-model-editor/components/model-metadata-form.d.ts +31 -0
  55. package/dist/editors/document-model-editor/components/model-metadata-form.d.ts.map +1 -0
  56. package/dist/editors/document-model-editor/components/model-metadata-form.js +70 -0
  57. package/dist/editors/document-model-editor/components/model-metadata-form.js.map +1 -0
  58. package/dist/editors/document-model-editor/components/module-form.d.ts +10 -0
  59. package/dist/editors/document-model-editor/components/module-form.d.ts.map +1 -0
  60. package/dist/editors/document-model-editor/components/module-form.js +22 -0
  61. package/dist/editors/document-model-editor/components/module-form.js.map +1 -0
  62. package/dist/editors/document-model-editor/components/module.d.ts +22 -0
  63. package/dist/editors/document-model-editor/components/module.d.ts.map +1 -0
  64. package/dist/editors/document-model-editor/components/module.js +10 -0
  65. package/dist/editors/document-model-editor/components/module.js.map +1 -0
  66. package/dist/editors/document-model-editor/components/modules.d.ts +20 -0
  67. package/dist/editors/document-model-editor/components/modules.d.ts.map +1 -0
  68. package/dist/editors/document-model-editor/components/modules.js +17 -0
  69. package/dist/editors/document-model-editor/components/modules.js.map +1 -0
  70. package/dist/editors/document-model-editor/components/operation-description-form.d.ts +9 -0
  71. package/dist/editors/document-model-editor/components/operation-description-form.d.ts.map +1 -0
  72. package/dist/editors/document-model-editor/components/operation-description-form.js +13 -0
  73. package/dist/editors/document-model-editor/components/operation-description-form.js.map +1 -0
  74. package/dist/editors/document-model-editor/components/operation-error-form.d.ts +13 -0
  75. package/dist/editors/document-model-editor/components/operation-error-form.d.ts.map +1 -0
  76. package/dist/editors/document-model-editor/components/operation-error-form.js +40 -0
  77. package/dist/editors/document-model-editor/components/operation-error-form.js.map +1 -0
  78. package/dist/editors/document-model-editor/components/operation-errors.d.ts +10 -0
  79. package/dist/editors/document-model-editor/components/operation-errors.d.ts.map +1 -0
  80. package/dist/editors/document-model-editor/components/operation-errors.js +17 -0
  81. package/dist/editors/document-model-editor/components/operation-errors.js.map +1 -0
  82. package/dist/editors/document-model-editor/components/operation-form.d.ts +13 -0
  83. package/dist/editors/document-model-editor/components/operation-form.d.ts.map +1 -0
  84. package/dist/editors/document-model-editor/components/operation-form.js +37 -0
  85. package/dist/editors/document-model-editor/components/operation-form.js.map +1 -0
  86. package/dist/editors/document-model-editor/components/operation.d.ts +23 -0
  87. package/dist/editors/document-model-editor/components/operation.d.ts.map +1 -0
  88. package/dist/editors/document-model-editor/components/operation.js +25 -0
  89. package/dist/editors/document-model-editor/components/operation.js.map +1 -0
  90. package/dist/editors/document-model-editor/components/operations.d.ts +18 -0
  91. package/dist/editors/document-model-editor/components/operations.d.ts.map +1 -0
  92. package/dist/editors/document-model-editor/components/operations.js +20 -0
  93. package/dist/editors/document-model-editor/components/operations.js.map +1 -0
  94. package/dist/editors/document-model-editor/components/state-error.d.ts +5 -0
  95. package/dist/editors/document-model-editor/components/state-error.d.ts.map +1 -0
  96. package/dist/editors/document-model-editor/components/state-error.js +21 -0
  97. package/dist/editors/document-model-editor/components/state-error.js.map +1 -0
  98. package/dist/editors/document-model-editor/components/state-schemas.d.ts +15 -0
  99. package/dist/editors/document-model-editor/components/state-schemas.d.ts.map +1 -0
  100. package/dist/editors/document-model-editor/components/state-schemas.js +81 -0
  101. package/dist/editors/document-model-editor/components/state-schemas.js.map +1 -0
  102. package/dist/editors/document-model-editor/components/tabs.d.ts +8 -0
  103. package/dist/editors/document-model-editor/components/tabs.d.ts.map +1 -0
  104. package/dist/editors/document-model-editor/components/tabs.js +13 -0
  105. package/dist/editors/document-model-editor/components/tabs.js.map +1 -0
  106. package/dist/editors/document-model-editor/components/text-area.d.ts +9 -0
  107. package/dist/editors/document-model-editor/components/text-area.d.ts.map +1 -0
  108. package/dist/editors/document-model-editor/components/text-area.js +27 -0
  109. package/dist/editors/document-model-editor/components/text-area.js.map +1 -0
  110. package/dist/editors/document-model-editor/components/text-field.d.ts +21 -0
  111. package/dist/editors/document-model-editor/components/text-field.d.ts.map +1 -0
  112. package/dist/editors/document-model-editor/components/text-field.js +80 -0
  113. package/dist/editors/document-model-editor/components/text-field.js.map +1 -0
  114. package/dist/editors/document-model-editor/config.d.ts +3 -0
  115. package/dist/editors/document-model-editor/config.d.ts.map +1 -0
  116. package/dist/editors/document-model-editor/config.js +4 -0
  117. package/dist/editors/document-model-editor/config.js.map +1 -0
  118. package/dist/editors/document-model-editor/constants/documents.d.ts +13 -0
  119. package/dist/editors/document-model-editor/constants/documents.d.ts.map +1 -0
  120. package/dist/editors/document-model-editor/constants/documents.js +18 -0
  121. package/dist/editors/document-model-editor/constants/documents.js.map +1 -0
  122. package/dist/editors/document-model-editor/constants/graphql-kinds.d.ts +9 -0
  123. package/dist/editors/document-model-editor/constants/graphql-kinds.d.ts.map +1 -0
  124. package/dist/editors/document-model-editor/constants/graphql-kinds.js +13 -0
  125. package/dist/editors/document-model-editor/constants/graphql-kinds.js.map +1 -0
  126. package/dist/editors/document-model-editor/context/form-context.d.ts +11 -0
  127. package/dist/editors/document-model-editor/context/form-context.d.ts.map +1 -0
  128. package/dist/editors/document-model-editor/context/form-context.js +4 -0
  129. package/dist/editors/document-model-editor/context/form-context.js.map +1 -0
  130. package/dist/editors/document-model-editor/context/schema-context.d.ts +18 -0
  131. package/dist/editors/document-model-editor/context/schema-context.d.ts.map +1 -0
  132. package/dist/editors/document-model-editor/context/schema-context.js +129 -0
  133. package/dist/editors/document-model-editor/context/schema-context.js.map +1 -0
  134. package/dist/editors/document-model-editor/editor.d.ts +2 -0
  135. package/dist/editors/document-model-editor/editor.d.ts.map +1 -0
  136. package/dist/editors/document-model-editor/editor.js +217 -0
  137. package/dist/editors/document-model-editor/editor.js.map +1 -0
  138. package/dist/editors/document-model-editor/hooks/index.d.ts +3 -0
  139. package/dist/editors/document-model-editor/hooks/index.d.ts.map +1 -0
  140. package/dist/editors/document-model-editor/hooks/index.js +3 -0
  141. package/dist/editors/document-model-editor/hooks/index.js.map +1 -0
  142. package/dist/editors/document-model-editor/hooks/useDocumentModelDocument.d.ts +5 -0
  143. package/dist/editors/document-model-editor/hooks/useDocumentModelDocument.d.ts.map +1 -0
  144. package/dist/editors/document-model-editor/hooks/useDocumentModelDocument.js +8 -0
  145. package/dist/editors/document-model-editor/hooks/useDocumentModelDocument.js.map +1 -0
  146. package/dist/editors/document-model-editor/hooks/useFormField.d.ts +13 -0
  147. package/dist/editors/document-model-editor/hooks/useFormField.d.ts.map +1 -0
  148. package/dist/editors/document-model-editor/hooks/useFormField.js +22 -0
  149. package/dist/editors/document-model-editor/hooks/useFormField.js.map +1 -0
  150. package/dist/editors/document-model-editor/index.d.ts +2 -0
  151. package/dist/editors/document-model-editor/index.d.ts.map +1 -0
  152. package/dist/editors/document-model-editor/index.js +2 -0
  153. package/dist/editors/document-model-editor/index.js.map +1 -0
  154. package/dist/editors/document-model-editor/module.d.ts +3 -0
  155. package/dist/editors/document-model-editor/module.d.ts.map +1 -0
  156. package/dist/editors/document-model-editor/module.js +10 -0
  157. package/dist/editors/document-model-editor/module.js.map +1 -0
  158. package/dist/editors/document-model-editor/schemas/inputs.d.ts +31 -0
  159. package/dist/editors/document-model-editor/schemas/inputs.d.ts.map +1 -0
  160. package/dist/editors/document-model-editor/schemas/inputs.js +71 -0
  161. package/dist/editors/document-model-editor/schemas/inputs.js.map +1 -0
  162. package/dist/editors/document-model-editor/schemas/utils.d.ts +3 -0
  163. package/dist/editors/document-model-editor/schemas/utils.d.ts.map +1 -0
  164. package/dist/editors/document-model-editor/schemas/utils.js +3 -0
  165. package/dist/editors/document-model-editor/schemas/utils.js.map +1 -0
  166. package/dist/editors/document-model-editor/types/documents.d.ts +26 -0
  167. package/dist/editors/document-model-editor/types/documents.d.ts.map +1 -0
  168. package/dist/editors/document-model-editor/types/documents.js +2 -0
  169. package/dist/editors/document-model-editor/types/documents.js.map +1 -0
  170. package/dist/editors/document-model-editor/types.d.ts +2 -0
  171. package/dist/editors/document-model-editor/types.d.ts.map +1 -0
  172. package/dist/editors/document-model-editor/types.js +2 -0
  173. package/dist/editors/document-model-editor/types.js.map +1 -0
  174. package/dist/editors/document-model-editor/utils/helpers.d.ts +112 -0
  175. package/dist/editors/document-model-editor/utils/helpers.d.ts.map +1 -0
  176. package/dist/editors/document-model-editor/utils/helpers.js +920 -0
  177. package/dist/editors/document-model-editor/utils/helpers.js.map +1 -0
  178. package/dist/editors/document-model-editor/utils/helpers.test.d.ts +2 -0
  179. package/dist/editors/document-model-editor/utils/helpers.test.d.ts.map +1 -0
  180. package/dist/editors/document-model-editor/utils/helpers.test.js +805 -0
  181. package/dist/editors/document-model-editor/utils/helpers.test.js.map +1 -0
  182. package/dist/editors/document-model-editor/utils/linting.d.ts +7 -0
  183. package/dist/editors/document-model-editor/utils/linting.d.ts.map +1 -0
  184. package/dist/editors/document-model-editor/utils/linting.js +49 -0
  185. package/dist/editors/document-model-editor/utils/linting.js.map +1 -0
  186. package/dist/editors/document-model-editor/utils/style.d.ts +3 -0
  187. package/dist/editors/document-model-editor/utils/style.d.ts.map +1 -0
  188. package/dist/editors/document-model-editor/utils/style.js +6 -0
  189. package/dist/editors/document-model-editor/utils/style.js.map +1 -0
  190. package/dist/editors/editors.d.ts +3 -0
  191. package/dist/editors/editors.d.ts.map +1 -0
  192. package/dist/editors/editors.js +7 -0
  193. package/dist/editors/editors.js.map +1 -0
  194. package/dist/editors/generic-drive-explorer/components/create-document.d.ts +2 -0
  195. package/dist/editors/generic-drive-explorer/components/create-document.d.ts.map +1 -0
  196. package/dist/editors/generic-drive-explorer/components/create-document.js +19 -0
  197. package/dist/editors/generic-drive-explorer/components/create-document.js.map +1 -0
  198. package/dist/editors/generic-drive-explorer/components/file-content-view.d.ts +2 -0
  199. package/dist/editors/generic-drive-explorer/components/file-content-view.d.ts.map +1 -0
  200. package/dist/editors/generic-drive-explorer/components/file-content-view.js +77 -0
  201. package/dist/editors/generic-drive-explorer/components/file-content-view.js.map +1 -0
  202. package/dist/editors/generic-drive-explorer/components/folder-view.d.ts +5 -0
  203. package/dist/editors/generic-drive-explorer/components/folder-view.d.ts.map +1 -0
  204. package/dist/editors/generic-drive-explorer/components/folder-view.js +19 -0
  205. package/dist/editors/generic-drive-explorer/components/folder-view.js.map +1 -0
  206. package/dist/editors/generic-drive-explorer/components/index.d.ts +6 -0
  207. package/dist/editors/generic-drive-explorer/components/index.d.ts.map +1 -0
  208. package/dist/editors/generic-drive-explorer/components/index.js +6 -0
  209. package/dist/editors/generic-drive-explorer/components/index.js.map +1 -0
  210. package/dist/editors/generic-drive-explorer/components/layout.d.ts +12 -0
  211. package/dist/editors/generic-drive-explorer/components/layout.d.ts.map +1 -0
  212. package/dist/editors/generic-drive-explorer/components/layout.js +21 -0
  213. package/dist/editors/generic-drive-explorer/components/layout.js.map +1 -0
  214. package/dist/editors/generic-drive-explorer/components/search-bar.d.ts +2 -0
  215. package/dist/editors/generic-drive-explorer/components/search-bar.d.ts.map +1 -0
  216. package/dist/editors/generic-drive-explorer/components/search-bar.js +38 -0
  217. package/dist/editors/generic-drive-explorer/components/search-bar.js.map +1 -0
  218. package/dist/editors/generic-drive-explorer/config.d.ts +3 -0
  219. package/dist/editors/generic-drive-explorer/config.d.ts.map +1 -0
  220. package/dist/editors/generic-drive-explorer/config.js +5 -0
  221. package/dist/editors/generic-drive-explorer/config.js.map +1 -0
  222. package/dist/editors/generic-drive-explorer/editor.d.ts +3 -0
  223. package/dist/editors/generic-drive-explorer/editor.d.ts.map +1 -0
  224. package/dist/editors/generic-drive-explorer/editor.js +16 -0
  225. package/dist/editors/generic-drive-explorer/editor.js.map +1 -0
  226. package/dist/editors/generic-drive-explorer/index.d.ts +3 -0
  227. package/dist/editors/generic-drive-explorer/index.d.ts.map +1 -0
  228. package/dist/editors/generic-drive-explorer/index.js +3 -0
  229. package/dist/editors/generic-drive-explorer/index.js.map +1 -0
  230. package/dist/editors/generic-drive-explorer/module.d.ts +3 -0
  231. package/dist/editors/generic-drive-explorer/module.d.ts.map +1 -0
  232. package/dist/editors/generic-drive-explorer/module.js +10 -0
  233. package/dist/editors/generic-drive-explorer/module.js.map +1 -0
  234. package/dist/editors/generic-drive-explorer/utils/cn.d.ts +3 -0
  235. package/dist/editors/generic-drive-explorer/utils/cn.d.ts.map +1 -0
  236. package/dist/editors/generic-drive-explorer/utils/cn.js +6 -0
  237. package/dist/editors/generic-drive-explorer/utils/cn.js.map +1 -0
  238. package/dist/editors/generic-drive-explorer/utils/index.d.ts +3 -0
  239. package/dist/editors/generic-drive-explorer/utils/index.d.ts.map +1 -0
  240. package/dist/editors/generic-drive-explorer/utils/index.js +3 -0
  241. package/dist/editors/generic-drive-explorer/utils/index.js.map +1 -0
  242. package/dist/editors/generic-drive-explorer/utils/types.d.ts +8 -0
  243. package/dist/editors/generic-drive-explorer/utils/types.d.ts.map +1 -0
  244. package/dist/editors/generic-drive-explorer/utils/types.js +2 -0
  245. package/dist/editors/generic-drive-explorer/utils/types.js.map +1 -0
  246. package/dist/editors/index.d.ts +3 -0
  247. package/dist/editors/index.d.ts.map +1 -0
  248. package/dist/editors/index.js +3 -0
  249. package/dist/editors/index.js.map +1 -0
  250. package/dist/editors/style.css +909 -0
  251. package/dist/index.d.ts +3 -0
  252. package/dist/index.d.ts.map +1 -0
  253. package/dist/index.js +3 -0
  254. package/dist/index.js.map +1 -0
  255. package/dist/tsconfig.tsbuildinfo +1 -0
  256. package/package.json +93 -0
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ export declare const EmptyStringSchema: z.ZodDefault<z.ZodString>;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../editors/document-model-editor/schemas/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iBAAiB,2BAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ export const EmptyStringSchema = z.string().default("");
3
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../editors/document-model-editor/schemas/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ export type Scope = string;
2
+ export type DocumentActionHandlers = {
3
+ addModule: (name: string) => Promise<string | undefined>;
4
+ addOperation: (moduleId: string, name: string) => Promise<string | undefined>;
5
+ addOperationAndInitialSchema: (moduleId: string, name: string) => Promise<string | undefined>;
6
+ addOperationError: (operationId: string, errorName: string) => Promise<string | undefined>;
7
+ setModelId: (id: string) => void;
8
+ setModelExtension: (extension: string) => void;
9
+ setModelName: (name: string) => void;
10
+ setAuthorName: (authorName: string) => void;
11
+ setAuthorWebsite: (authorWebsite: string) => void;
12
+ setStateSchema: (schema: string, scope: Scope) => void;
13
+ setInitialState: (initialValue: string, scope: Scope) => void;
14
+ setModelDescription: (description: string) => void;
15
+ updateModuleName: (id: string, name: string) => void;
16
+ updateModuleDescription: (id: string, description: string) => void;
17
+ deleteModule: (id: string) => void;
18
+ updateOperationName: (id: string, name: string) => void;
19
+ updateOperationSchema: (id: string, schema: string) => void;
20
+ setOperationDescription: (id: string, description: string) => void;
21
+ updateOperationScope: (id: string, scope: Scope) => void;
22
+ deleteOperation: (id: string) => void;
23
+ deleteOperationError: (id: string) => void;
24
+ setOperationErrorName: (operationId: string, errorId: string, errorName: string) => void;
25
+ };
26
+ //# sourceMappingURL=documents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../../editors/document-model-editor/types/documents.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAE3B,MAAM,MAAM,sBAAsB,GAAG;IAEnC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACzD,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC9E,4BAA4B,EAAE,CAC5B,QAAQ,EAAE,MAAM,EAChB,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AAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACzD,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,qBAAqB,EAAE,CACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,KACd,IAAI,CAAC;CACX,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=documents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.js","sourceRoot":"","sources":["../../../../editors/document-model-editor/types/documents.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type LogLevel = "DEBUG" | "INFO" | "WARN" | "ERROR" | "SILENT";
2
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../editors/document-model-editor/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../editors/document-model-editor/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,112 @@
1
+ import type { Serializable } from "@powerhousedao/document-engineering/graphql";
2
+ import type { ASTNode, DocumentNode, FieldDefinitionNode, GraphQLObjectType, GraphQLSchema, NamedTypeNode, ObjectTypeDefinitionNode, TypeNode } from "graphql";
3
+ import { GraphQLInputObjectType } from "graphql";
4
+ import type { Scope } from "../types/documents.js";
5
+ export declare function makeStateSchemaNameForScope(modelName: string, scope: string): string;
6
+ export declare function makeInitialSchemaDoc(modelName: string, scope: string): string;
7
+ export declare function makeOperationInitialDoc(name: string): string;
8
+ export declare function makeEmptyOperationSchema(operationName: string): string;
9
+ export declare function isEmptyOperationSchema(schema: string | null | undefined): boolean;
10
+ export declare function safeParseJsonRecord(json: string): Record<string, Serializable> | null;
11
+ export declare function makeMinimalObjectForStateType(args: {
12
+ sharedSchemaDocumentNode: DocumentNode;
13
+ stateTypeDefinitionNode: ObjectTypeDefinitionNode;
14
+ existingValue: string;
15
+ }): string;
16
+ export declare function makeMinimalValuesForObjectFields(args: {
17
+ schemaDocumentNode: DocumentNode;
18
+ existingValueObject: Record<string, Serializable> | null;
19
+ fieldDefinitionNodes: readonly FieldDefinitionNode[];
20
+ visitedTypes?: Set<string>;
21
+ }): Record<string, Serializable>;
22
+ export declare function isGqlPrimitiveNode(astNodeTypeNode: ASTNode | null): astNodeTypeNode is NamedTypeNode;
23
+ export declare function compareStringsWithoutWhitespace(str1: string | null | undefined, str2: string | null | undefined): boolean;
24
+ export declare function renameSchemaType(sdl: string, oldName: string, newName: string, scope: Scope): string;
25
+ export declare function initializeModelSchema(modelName: string): string;
26
+ export declare function updateModelSchemaNames(params: {
27
+ oldName: string;
28
+ newName: string;
29
+ globalStateSchema: string;
30
+ localStateSchema: string;
31
+ setStateSchema: (schema: string, scope: Scope) => void;
32
+ }): void;
33
+ export declare function handleModelNameChange(params: {
34
+ oldName: string;
35
+ newName: string;
36
+ globalStateSchema: string;
37
+ localStateSchema: string;
38
+ setStateSchema: (schema: string, scope: Scope) => void;
39
+ }): void;
40
+ /**
41
+ * Converts an output object type into an equivalent input object type.
42
+ * Intended for structural validation of state objects.
43
+ */
44
+ export declare function objectTypeToInputType(schema: GraphQLSchema, objectType: GraphQLObjectType, options?: {
45
+ nameSuffix?: string;
46
+ cache?: Map<string, GraphQLInputObjectType>;
47
+ }): GraphQLInputObjectType;
48
+ export declare function validateStateObject(sharedSchemaDocumentNode: DocumentNode, stateTypeDefinitionNode: ObjectTypeDefinitionNode, stateValue: string): Error[];
49
+ export type StateValidationErrorKind = "MISSING" | "MISSING_OPTIONAL" | "UNKNOWN_FIELD" | "NON_NULL" | "TYPE" | "RECURSIVE_TYPE";
50
+ export type StateValidationErrorPayload = {
51
+ kind: "MISSING";
52
+ path: (string | number)[];
53
+ field: string;
54
+ expectedType?: string;
55
+ } | {
56
+ kind: "MISSING_OPTIONAL";
57
+ path: (string | number)[];
58
+ field: string;
59
+ expectedType?: string;
60
+ } | {
61
+ kind: "UNKNOWN_FIELD";
62
+ path: (string | number)[];
63
+ field: string;
64
+ didYouMean?: string;
65
+ typeName?: string;
66
+ } | {
67
+ kind: "NON_NULL";
68
+ path: (string | number)[];
69
+ field: string;
70
+ expectedType?: string;
71
+ } | {
72
+ kind: "TYPE";
73
+ path: (string | number)[];
74
+ field: string;
75
+ expectedType?: string;
76
+ details?: string;
77
+ } | {
78
+ kind: "RECURSIVE_TYPE";
79
+ path: (string | number)[];
80
+ field: string;
81
+ typeName: string;
82
+ };
83
+ export declare class StateValidationError extends Error {
84
+ readonly payload: StateValidationErrorPayload;
85
+ readonly originalMessage?: string;
86
+ constructor(payload: StateValidationErrorPayload, originalMessage?: string);
87
+ get kind(): StateValidationErrorKind;
88
+ get path(): (string | number)[];
89
+ get field(): string;
90
+ }
91
+ export declare function graphQLErrorsToStateValidationErrors(errors: readonly Error[]): StateValidationError[];
92
+ /**
93
+ * Information about a missing field in the state object.
94
+ */
95
+ export type MissingFieldInfo = {
96
+ fieldName: string;
97
+ path: (string | number)[];
98
+ isRequired: boolean;
99
+ /** The underlying type (unwrapped from NonNull if applicable) */
100
+ type: TypeNode;
101
+ };
102
+ /**
103
+ * Finds all fields defined in the schema that are missing from the state object.
104
+ * Returns information about each missing field including whether it's required.
105
+ */
106
+ export declare function findMissingFields(sharedSchemaDocumentNode: DocumentNode, rootTypeNode: ObjectTypeDefinitionNode, value: string | Record<string, unknown>, basePath?: (string | number)[]): MissingFieldInfo[];
107
+ /**
108
+ * Detects optional fields defined in the schema that are missing from the state object.
109
+ * Returns StateValidationError[] for each missing optional field.
110
+ */
111
+ export declare function detectMissingOptionalFields(sharedSchemaDocumentNode: DocumentNode, rootTypeNode: ObjectTypeDefinitionNode, value: string | Record<string, unknown>): StateValidationError[];
112
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../editors/document-model-editor/utils/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAGhF,OAAO,KAAK,EACV,OAAO,EAEP,YAAY,EAEZ,mBAAmB,EAEnB,iBAAiB,EAEjB,aAAa,EAGb,aAAa,EAEb,wBAAwB,EAExB,QAAQ,EAET,MAAM,SAAS,CAAC;AACjB,OAAO,EAGL,sBAAsB,EAYvB,MAAM,SAAS,CAAC;AAajB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAQ3E;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAOpE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,UAMnD;AAED,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAOT;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,uCAM/C;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE;IAClD,wBAAwB,EAAE,YAAY,CAAC;IACvC,uBAAuB,EAAE,wBAAwB,CAAC;IAClD,aAAa,EAAE,MAAM,CAAC;CACvB,UAoBA;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE;IACrD,kBAAkB,EAAE,YAAY,CAAC;IACjC,mBAAmB,EAAE,MAAM,C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