@powerhousedao/vetra 5.0.0 → 5.0.1-staging.11

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 (362) hide show
  1. package/dist/document-models/app-module/actions.d.ts +18 -0
  2. package/dist/document-models/app-module/actions.d.ts.map +1 -0
  3. package/dist/document-models/app-module/actions.js +8 -0
  4. package/dist/document-models/app-module/gen/base-operations/creators.d.ts +2 -2
  5. package/dist/document-models/app-module/gen/base-operations/creators.d.ts.map +1 -1
  6. package/dist/document-models/app-module/gen/base-operations/creators.js +6 -7
  7. package/dist/document-models/app-module/gen/creators.d.ts +2 -0
  8. package/dist/document-models/app-module/gen/creators.d.ts.map +1 -1
  9. package/dist/document-models/app-module/gen/creators.js +2 -0
  10. package/dist/document-models/app-module/gen/dnd-operations/creators.d.ts +2 -2
  11. package/dist/document-models/app-module/gen/dnd-operations/creators.d.ts.map +1 -1
  12. package/dist/document-models/app-module/gen/dnd-operations/creators.js +2 -3
  13. package/dist/document-models/app-module/gen/document-schema.d.ts +199 -0
  14. package/dist/document-models/app-module/gen/document-schema.d.ts.map +1 -0
  15. package/dist/document-models/app-module/gen/document-schema.js +33 -0
  16. package/dist/document-models/app-module/gen/document-type.d.ts +2 -0
  17. package/dist/document-models/app-module/gen/document-type.d.ts.map +1 -0
  18. package/dist/document-models/app-module/gen/document-type.js +1 -0
  19. package/dist/document-models/app-module/gen/index.d.ts +8 -1
  20. package/dist/document-models/app-module/gen/index.d.ts.map +1 -1
  21. package/dist/document-models/app-module/gen/index.js +8 -1
  22. package/dist/document-models/app-module/gen/reducer.d.ts +1 -3
  23. package/dist/document-models/app-module/gen/reducer.d.ts.map +1 -1
  24. package/dist/document-models/app-module/gen/reducer.js +16 -16
  25. package/dist/document-models/app-module/gen/schema/index.d.ts +1 -1
  26. package/dist/document-models/app-module/gen/schema/index.d.ts.map +1 -1
  27. package/dist/document-models/app-module/gen/schema/index.js +1 -1
  28. package/dist/document-models/app-module/gen/types.d.ts +1 -2
  29. package/dist/document-models/app-module/gen/types.d.ts.map +1 -1
  30. package/dist/document-models/app-module/gen/types.js +0 -1
  31. package/dist/document-models/app-module/gen/utils.d.ts +5 -2
  32. package/dist/document-models/app-module/gen/utils.d.ts.map +1 -1
  33. package/dist/document-models/app-module/gen/utils.js +20 -3
  34. package/dist/document-models/app-module/hooks.d.ts +11 -0
  35. package/dist/document-models/app-module/hooks.d.ts.map +1 -0
  36. package/dist/document-models/app-module/hooks.js +26 -0
  37. package/dist/document-models/app-module/index.d.ts +5 -31
  38. package/dist/document-models/app-module/index.d.ts.map +1 -1
  39. package/dist/document-models/app-module/index.js +5 -18
  40. package/dist/document-models/app-module/module.d.ts +5 -0
  41. package/dist/document-models/app-module/module.d.ts.map +1 -0
  42. package/dist/document-models/app-module/module.js +10 -0
  43. package/dist/document-models/app-module/src/index.d.ts +2 -0
  44. package/dist/document-models/app-module/src/index.d.ts.map +1 -0
  45. package/dist/document-models/app-module/src/index.js +1 -0
  46. package/dist/document-models/app-module/src/reducers/base-operations.d.ts +2 -2
  47. package/dist/document-models/app-module/src/reducers/base-operations.d.ts.map +1 -1
  48. package/dist/document-models/app-module/src/reducers/base-operations.js +1 -1
  49. package/dist/document-models/app-module/src/reducers/dnd-operations.d.ts +2 -2
  50. package/dist/document-models/app-module/src/reducers/dnd-operations.d.ts.map +1 -1
  51. package/dist/document-models/app-module/src/reducers/dnd-operations.js +1 -1
  52. package/dist/document-models/app-module/src/tests/base-operations.test.js +32 -34
  53. package/dist/document-models/app-module/src/tests/dnd-operations.test.js +10 -13
  54. package/dist/document-models/app-module/src/tests/document-model.test.js +22 -21
  55. package/dist/document-models/app-module/utils.d.ts +14 -0
  56. package/dist/document-models/app-module/utils.d.ts.map +1 -0
  57. package/dist/document-models/app-module/utils.js +7 -0
  58. package/dist/document-models/document-editor/actions.d.ts +16 -0
  59. package/dist/document-models/document-editor/actions.d.ts.map +1 -0
  60. package/dist/document-models/document-editor/actions.js +4 -0
  61. package/dist/document-models/document-editor/gen/base-operations/creators.d.ts +2 -2
  62. package/dist/document-models/document-editor/gen/base-operations/creators.d.ts.map +1 -1
  63. package/dist/document-models/document-editor/gen/base-operations/creators.js +5 -6
  64. package/dist/document-models/document-editor/gen/creators.d.ts +1 -0
  65. package/dist/document-models/document-editor/gen/creators.d.ts.map +1 -1
  66. package/dist/document-models/document-editor/gen/creators.js +1 -0
  67. package/dist/document-models/document-editor/gen/document-schema.d.ts +180 -0
  68. package/dist/document-models/document-editor/gen/document-schema.d.ts.map +1 -0
  69. package/dist/document-models/document-editor/gen/document-schema.js +33 -0
  70. package/dist/document-models/document-editor/gen/document-type.d.ts +2 -0
  71. package/dist/document-models/document-editor/gen/document-type.d.ts.map +1 -0
  72. package/dist/document-models/document-editor/gen/document-type.js +1 -0
  73. package/dist/document-models/document-editor/gen/index.d.ts +7 -1
  74. package/dist/document-models/document-editor/gen/index.d.ts.map +1 -1
  75. package/dist/document-models/document-editor/gen/index.js +7 -1
  76. package/dist/document-models/document-editor/gen/reducer.d.ts +1 -3
  77. package/dist/document-models/document-editor/gen/reducer.d.ts.map +1 -1
  78. package/dist/document-models/document-editor/gen/reducer.js +11 -11
  79. package/dist/document-models/document-editor/gen/schema/index.d.ts +1 -1
  80. package/dist/document-models/document-editor/gen/schema/index.d.ts.map +1 -1
  81. package/dist/document-models/document-editor/gen/schema/index.js +1 -1
  82. package/dist/document-models/document-editor/gen/types.d.ts +1 -2
  83. package/dist/document-models/document-editor/gen/types.d.ts.map +1 -1
  84. package/dist/document-models/document-editor/gen/types.js +0 -1
  85. package/dist/document-models/document-editor/gen/utils.d.ts +5 -2
  86. package/dist/document-models/document-editor/gen/utils.d.ts.map +1 -1
  87. package/dist/document-models/document-editor/gen/utils.js +20 -3
  88. package/dist/document-models/document-editor/hooks.d.ts +11 -0
  89. package/dist/document-models/document-editor/hooks.d.ts.map +1 -0
  90. package/dist/document-models/document-editor/hooks.js +26 -0
  91. package/dist/document-models/document-editor/index.d.ts +5 -29
  92. package/dist/document-models/document-editor/index.d.ts.map +1 -1
  93. package/dist/document-models/document-editor/index.js +5 -18
  94. package/dist/document-models/document-editor/module.d.ts +5 -0
  95. package/dist/document-models/document-editor/module.d.ts.map +1 -0
  96. package/dist/document-models/document-editor/module.js +10 -0
  97. package/dist/document-models/document-editor/src/index.d.ts +2 -0
  98. package/dist/document-models/document-editor/src/index.d.ts.map +1 -0
  99. package/dist/document-models/document-editor/src/index.js +1 -0
  100. package/dist/document-models/document-editor/src/reducers/base-operations.d.ts +2 -2
  101. package/dist/document-models/document-editor/src/reducers/base-operations.d.ts.map +1 -1
  102. package/dist/document-models/document-editor/src/reducers/base-operations.js +1 -1
  103. package/dist/document-models/document-editor/src/tests/base-operations.test.js +22 -24
  104. package/dist/document-models/document-editor/src/tests/document-model.test.js +24 -22
  105. package/dist/document-models/document-editor/utils.d.ts +14 -0
  106. package/dist/document-models/document-editor/utils.d.ts.map +1 -0
  107. package/dist/document-models/document-editor/utils.js +7 -0
  108. package/dist/document-models/document-models.d.ts +3 -0
  109. package/dist/document-models/document-models.d.ts.map +1 -0
  110. package/dist/document-models/document-models.js +12 -0
  111. package/dist/document-models/index.d.ts +9 -5
  112. package/dist/document-models/index.d.ts.map +1 -1
  113. package/dist/document-models/index.js +9 -5
  114. package/dist/document-models/processor-module/actions.d.ts +17 -0
  115. package/dist/document-models/processor-module/actions.d.ts.map +1 -0
  116. package/dist/document-models/processor-module/actions.js +4 -0
  117. package/dist/document-models/processor-module/gen/base-operations/creators.d.ts +2 -2
  118. package/dist/document-models/processor-module/gen/base-operations/creators.d.ts.map +1 -1
  119. package/dist/document-models/processor-module/gen/base-operations/creators.js +6 -7
  120. package/dist/document-models/processor-module/gen/creators.d.ts +1 -0
  121. package/dist/document-models/processor-module/gen/creators.d.ts.map +1 -1
  122. package/dist/document-models/processor-module/gen/creators.js +1 -0
  123. package/dist/document-models/processor-module/gen/document-schema.d.ts +199 -0
  124. package/dist/document-models/processor-module/gen/document-schema.d.ts.map +1 -0
  125. package/dist/document-models/processor-module/gen/document-schema.js +33 -0
  126. package/dist/document-models/processor-module/gen/document-type.d.ts +2 -0
  127. package/dist/document-models/processor-module/gen/document-type.d.ts.map +1 -0
  128. package/dist/document-models/processor-module/gen/document-type.js +1 -0
  129. package/dist/document-models/processor-module/gen/index.d.ts +7 -1
  130. package/dist/document-models/processor-module/gen/index.d.ts.map +1 -1
  131. package/dist/document-models/processor-module/gen/index.js +7 -1
  132. package/dist/document-models/processor-module/gen/reducer.d.ts +1 -3
  133. package/dist/document-models/processor-module/gen/reducer.d.ts.map +1 -1
  134. package/dist/document-models/processor-module/gen/reducer.js +13 -13
  135. package/dist/document-models/processor-module/gen/schema/index.d.ts +1 -1
  136. package/dist/document-models/processor-module/gen/schema/index.d.ts.map +1 -1
  137. package/dist/document-models/processor-module/gen/schema/index.js +1 -1
  138. package/dist/document-models/processor-module/gen/types.d.ts +1 -2
  139. package/dist/document-models/processor-module/gen/types.d.ts.map +1 -1
  140. package/dist/document-models/processor-module/gen/types.js +0 -1
  141. package/dist/document-models/processor-module/gen/utils.d.ts +5 -2
  142. package/dist/document-models/processor-module/gen/utils.d.ts.map +1 -1
  143. package/dist/document-models/processor-module/gen/utils.js +20 -3
  144. package/dist/document-models/processor-module/hooks.d.ts +11 -0
  145. package/dist/document-models/processor-module/hooks.d.ts.map +1 -0
  146. package/dist/document-models/processor-module/hooks.js +26 -0
  147. package/dist/document-models/processor-module/index.d.ts +5 -30
  148. package/dist/document-models/processor-module/index.d.ts.map +1 -1
  149. package/dist/document-models/processor-module/index.js +5 -18
  150. package/dist/document-models/processor-module/module.d.ts +5 -0
  151. package/dist/document-models/processor-module/module.d.ts.map +1 -0
  152. package/dist/document-models/processor-module/module.js +10 -0
  153. package/dist/document-models/processor-module/src/index.d.ts +2 -0
  154. package/dist/document-models/processor-module/src/index.d.ts.map +1 -0
  155. package/dist/document-models/processor-module/src/index.js +1 -0
  156. package/dist/document-models/processor-module/src/reducers/base-operations.d.ts +2 -2
  157. package/dist/document-models/processor-module/src/reducers/base-operations.d.ts.map +1 -1
  158. package/dist/document-models/processor-module/src/reducers/base-operations.js +1 -1
  159. package/dist/document-models/processor-module/src/tests/base-operations.test.js +24 -26
  160. package/dist/document-models/processor-module/src/tests/document-model.test.js +26 -24
  161. package/dist/document-models/processor-module/utils.d.ts +14 -0
  162. package/dist/document-models/processor-module/utils.d.ts.map +1 -0
  163. package/dist/document-models/processor-module/utils.js +7 -0
  164. package/dist/document-models/subgraph-module/actions.d.ts +14 -0
  165. package/dist/document-models/subgraph-module/actions.d.ts.map +1 -0
  166. package/dist/document-models/subgraph-module/actions.js +4 -0
  167. package/dist/document-models/subgraph-module/gen/base-operations/creators.d.ts +2 -2
  168. package/dist/document-models/subgraph-module/gen/base-operations/creators.d.ts.map +1 -1
  169. package/dist/document-models/subgraph-module/gen/base-operations/creators.js +3 -4
  170. package/dist/document-models/subgraph-module/gen/creators.d.ts +1 -0
  171. package/dist/document-models/subgraph-module/gen/creators.d.ts.map +1 -1
  172. package/dist/document-models/subgraph-module/gen/creators.js +1 -0
  173. package/dist/document-models/subgraph-module/gen/document-schema.d.ts +161 -0
  174. package/dist/document-models/subgraph-module/gen/document-schema.d.ts.map +1 -0
  175. package/dist/document-models/subgraph-module/gen/document-schema.js +33 -0
  176. package/dist/document-models/subgraph-module/gen/document-type.d.ts +2 -0
  177. package/dist/document-models/subgraph-module/gen/document-type.d.ts.map +1 -0
  178. package/dist/document-models/subgraph-module/gen/document-type.js +1 -0
  179. package/dist/document-models/subgraph-module/gen/index.d.ts +7 -1
  180. package/dist/document-models/subgraph-module/gen/index.d.ts.map +1 -1
  181. package/dist/document-models/subgraph-module/gen/index.js +7 -1
  182. package/dist/document-models/subgraph-module/gen/reducer.d.ts +1 -3
  183. package/dist/document-models/subgraph-module/gen/reducer.d.ts.map +1 -1
  184. package/dist/document-models/subgraph-module/gen/reducer.js +7 -7
  185. package/dist/document-models/subgraph-module/gen/schema/index.d.ts +1 -1
  186. package/dist/document-models/subgraph-module/gen/schema/index.d.ts.map +1 -1
  187. package/dist/document-models/subgraph-module/gen/schema/index.js +1 -1
  188. package/dist/document-models/subgraph-module/gen/types.d.ts +1 -2
  189. package/dist/document-models/subgraph-module/gen/types.d.ts.map +1 -1
  190. package/dist/document-models/subgraph-module/gen/types.js +0 -1
  191. package/dist/document-models/subgraph-module/gen/utils.d.ts +5 -2
  192. package/dist/document-models/subgraph-module/gen/utils.d.ts.map +1 -1
  193. package/dist/document-models/subgraph-module/gen/utils.js +20 -3
  194. package/dist/document-models/subgraph-module/hooks.d.ts +11 -0
  195. package/dist/document-models/subgraph-module/hooks.d.ts.map +1 -0
  196. package/dist/document-models/subgraph-module/hooks.js +26 -0
  197. package/dist/document-models/subgraph-module/index.d.ts +5 -27
  198. package/dist/document-models/subgraph-module/index.d.ts.map +1 -1
  199. package/dist/document-models/subgraph-module/index.js +5 -18
  200. package/dist/document-models/subgraph-module/module.d.ts +5 -0
  201. package/dist/document-models/subgraph-module/module.d.ts.map +1 -0
  202. package/dist/document-models/subgraph-module/module.js +10 -0
  203. package/dist/document-models/subgraph-module/src/index.d.ts +2 -0
  204. package/dist/document-models/subgraph-module/src/index.d.ts.map +1 -0
  205. package/dist/document-models/subgraph-module/src/index.js +1 -0
  206. package/dist/document-models/subgraph-module/src/reducers/base-operations.d.ts +2 -2
  207. package/dist/document-models/subgraph-module/src/reducers/base-operations.d.ts.map +1 -1
  208. package/dist/document-models/subgraph-module/src/reducers/base-operations.js +1 -1
  209. package/dist/document-models/subgraph-module/src/tests/base-operations.test.js +7 -9
  210. package/dist/document-models/subgraph-module/src/tests/document-model.test.js +9 -7
  211. package/dist/document-models/subgraph-module/utils.d.ts +14 -0
  212. package/dist/document-models/subgraph-module/utils.d.ts.map +1 -0
  213. package/dist/document-models/subgraph-module/utils.js +7 -0
  214. package/dist/document-models/vetra-package/actions.d.ts +22 -0
  215. package/dist/document-models/vetra-package/actions.d.ts.map +1 -0
  216. package/dist/document-models/vetra-package/actions.js +4 -0
  217. package/dist/document-models/vetra-package/gen/base-operations/creators.d.ts +2 -2
  218. package/dist/document-models/vetra-package/gen/base-operations/creators.d.ts.map +1 -1
  219. package/dist/document-models/vetra-package/gen/base-operations/creators.js +11 -12
  220. package/dist/document-models/vetra-package/gen/creators.d.ts +1 -0
  221. package/dist/document-models/vetra-package/gen/creators.d.ts.map +1 -1
  222. package/dist/document-models/vetra-package/gen/creators.js +1 -0
  223. package/dist/document-models/vetra-package/gen/document-schema.d.ts +256 -0
  224. package/dist/document-models/vetra-package/gen/document-schema.d.ts.map +1 -0
  225. package/dist/document-models/vetra-package/gen/document-schema.js +33 -0
  226. package/dist/document-models/vetra-package/gen/document-type.d.ts +2 -0
  227. package/dist/document-models/vetra-package/gen/document-type.d.ts.map +1 -0
  228. package/dist/document-models/vetra-package/gen/document-type.js +1 -0
  229. package/dist/document-models/vetra-package/gen/index.d.ts +7 -1
  230. package/dist/document-models/vetra-package/gen/index.d.ts.map +1 -1
  231. package/dist/document-models/vetra-package/gen/index.js +7 -1
  232. package/dist/document-models/vetra-package/gen/reducer.d.ts +1 -3
  233. package/dist/document-models/vetra-package/gen/reducer.d.ts.map +1 -1
  234. package/dist/document-models/vetra-package/gen/reducer.js +23 -23
  235. package/dist/document-models/vetra-package/gen/schema/index.d.ts +1 -1
  236. package/dist/document-models/vetra-package/gen/schema/index.d.ts.map +1 -1
  237. package/dist/document-models/vetra-package/gen/schema/index.js +1 -1
  238. package/dist/document-models/vetra-package/gen/types.d.ts +1 -2
  239. package/dist/document-models/vetra-package/gen/types.d.ts.map +1 -1
  240. package/dist/document-models/vetra-package/gen/types.js +0 -1
  241. package/dist/document-models/vetra-package/gen/utils.d.ts +5 -2
  242. package/dist/document-models/vetra-package/gen/utils.d.ts.map +1 -1
  243. package/dist/document-models/vetra-package/gen/utils.js +20 -3
  244. package/dist/document-models/vetra-package/hooks.d.ts +11 -0
  245. package/dist/document-models/vetra-package/hooks.d.ts.map +1 -0
  246. package/dist/document-models/vetra-package/hooks.js +26 -0
  247. package/dist/document-models/vetra-package/index.d.ts +5 -35
  248. package/dist/document-models/vetra-package/index.d.ts.map +1 -1
  249. package/dist/document-models/vetra-package/index.js +5 -18
  250. package/dist/document-models/vetra-package/module.d.ts +5 -0
  251. package/dist/document-models/vetra-package/module.d.ts.map +1 -0
  252. package/dist/document-models/vetra-package/module.js +10 -0
  253. package/dist/document-models/vetra-package/src/index.d.ts +2 -0
  254. package/dist/document-models/vetra-package/src/index.d.ts.map +1 -0
  255. package/dist/document-models/vetra-package/src/index.js +1 -0
  256. package/dist/document-models/vetra-package/src/reducers/base-operations.d.ts +2 -2
  257. package/dist/document-models/vetra-package/src/reducers/base-operations.d.ts.map +1 -1
  258. package/dist/document-models/vetra-package/src/reducers/base-operations.js +1 -1
  259. package/dist/document-models/vetra-package/src/tests/base-operations.test.js +1 -1
  260. package/dist/document-models/vetra-package/src/tests/document-model.test.js +27 -25
  261. package/dist/document-models/vetra-package/utils.d.ts +14 -0
  262. package/dist/document-models/vetra-package/utils.d.ts.map +1 -0
  263. package/dist/document-models/vetra-package/utils.js +7 -0
  264. package/dist/editors/app-editor/components/AppEditorForm.d.ts.map +1 -1
  265. package/dist/editors/app-editor/components/AppEditorForm.js +4 -3
  266. package/dist/editors/app-editor/components/EditName.d.ts +3 -0
  267. package/dist/editors/app-editor/components/EditName.d.ts.map +1 -0
  268. package/dist/editors/app-editor/components/EditName.js +31 -0
  269. package/dist/editors/app-editor/editor.d.ts +1 -1
  270. package/dist/editors/app-editor/editor.d.ts.map +1 -1
  271. package/dist/editors/app-editor/editor.js +2 -2
  272. package/dist/editors/app-editor/editor.test.js +1 -1
  273. package/dist/editors/app-editor/module.d.ts +4 -0
  274. package/dist/editors/app-editor/module.d.ts.map +1 -0
  275. package/dist/editors/app-editor/module.js +10 -0
  276. package/dist/editors/document-editor/editor.d.ts +1 -1
  277. package/dist/editors/document-editor/editor.d.ts.map +1 -1
  278. package/dist/editors/document-editor/editor.js +2 -2
  279. package/dist/editors/document-editor/editor.test.js +1 -1
  280. package/dist/editors/document-editor/module.d.ts +3 -0
  281. package/dist/editors/document-editor/module.d.ts.map +1 -0
  282. package/dist/editors/document-editor/{index.js → module.js} +3 -4
  283. package/dist/editors/editors.d.ts +3 -0
  284. package/dist/editors/editors.d.ts.map +1 -0
  285. package/dist/editors/editors.js +14 -0
  286. package/dist/editors/hooks/useVetraDocument.d.ts +9 -9
  287. package/dist/editors/hooks/useVetraDocument.d.ts.map +1 -1
  288. package/dist/editors/index.d.ts +6 -6
  289. package/dist/editors/index.d.ts.map +1 -1
  290. package/dist/editors/index.js +6 -6
  291. package/dist/editors/processor-editor/editor.d.ts +1 -1
  292. package/dist/editors/processor-editor/editor.d.ts.map +1 -1
  293. package/dist/editors/processor-editor/editor.js +2 -2
  294. package/dist/editors/processor-editor/editor.test.js +1 -1
  295. package/dist/editors/processor-editor/module.d.ts +3 -0
  296. package/dist/editors/processor-editor/module.d.ts.map +1 -0
  297. package/dist/editors/processor-editor/{index.js → module.js} +3 -4
  298. package/dist/editors/subgraph-editor/editor.d.ts +1 -1
  299. package/dist/editors/subgraph-editor/editor.d.ts.map +1 -1
  300. package/dist/editors/subgraph-editor/editor.js +2 -2
  301. package/dist/editors/subgraph-editor/editor.test.js +1 -1
  302. package/dist/editors/subgraph-editor/module.d.ts +3 -0
  303. package/dist/editors/subgraph-editor/module.d.ts.map +1 -0
  304. package/dist/editors/subgraph-editor/{index.js → module.js} +3 -4
  305. package/dist/editors/vetra-drive-app/components/EditorContainer.js +1 -1
  306. package/dist/editors/vetra-drive-app/components/ModuleItem.d.ts.map +1 -1
  307. package/dist/editors/vetra-drive-app/components/ModuleItem.js +2 -1
  308. package/dist/editors/vetra-drive-app/editor.d.ts +1 -1
  309. package/dist/editors/vetra-drive-app/editor.d.ts.map +1 -1
  310. package/dist/editors/vetra-drive-app/editor.js +3 -6
  311. package/dist/editors/vetra-drive-app/module.d.ts +3 -0
  312. package/dist/editors/vetra-drive-app/module.d.ts.map +1 -0
  313. package/dist/editors/vetra-drive-app/{index.js → module.js} +3 -4
  314. package/dist/editors/vetra-package/editor.d.ts +1 -1
  315. package/dist/editors/vetra-package/editor.d.ts.map +1 -1
  316. package/dist/editors/vetra-package/editor.js +2 -2
  317. package/dist/editors/vetra-package/editor.test.js +1 -1
  318. package/dist/editors/vetra-package/module.d.ts +4 -0
  319. package/dist/editors/vetra-package/module.d.ts.map +1 -0
  320. package/dist/editors/vetra-package/module.js +10 -0
  321. package/dist/index.d.ts +3 -9
  322. package/dist/index.d.ts.map +1 -1
  323. package/dist/index.js +2 -5
  324. package/dist/processors/codegen/document-handlers/document-codegen-manager.js +1 -1
  325. package/dist/processors/codegen/document-handlers/generators/app-generator.d.ts.map +1 -1
  326. package/dist/processors/codegen/document-handlers/generators/app-generator.js +3 -0
  327. package/dist/processors/codegen/document-handlers/generators/document-editor-generator.d.ts.map +1 -1
  328. package/dist/processors/codegen/document-handlers/generators/document-editor-generator.js +3 -0
  329. package/dist/processors/codegen/document-handlers/generators/document-model-generator.d.ts.map +1 -1
  330. package/dist/processors/codegen/document-handlers/generators/document-model-generator.js +4 -0
  331. package/dist/processors/codegen/document-handlers/generators/package-generator.d.ts.map +1 -1
  332. package/dist/processors/codegen/document-handlers/generators/package-generator.js +3 -0
  333. package/dist/processors/codegen/document-handlers/generators/processor-generator.d.ts.map +1 -1
  334. package/dist/processors/codegen/document-handlers/generators/processor-generator.js +3 -0
  335. package/dist/processors/codegen/document-handlers/generators/subgraph-generator.d.ts.map +1 -1
  336. package/dist/processors/codegen/document-handlers/generators/subgraph-generator.js +3 -0
  337. package/dist/processors/codegen/document-handlers/generators/utils.d.ts +13 -0
  338. package/dist/processors/codegen/document-handlers/generators/utils.d.ts.map +1 -0
  339. package/dist/processors/codegen/document-handlers/generators/utils.js +29 -0
  340. package/dist/processors/vetra-read-model/migrations.d.ts.map +1 -1
  341. package/dist/processors/vetra-read-model/migrations.js +0 -1
  342. package/dist/style.css +5 -1
  343. package/dist/subgraphs/vetra-package/schema.d.ts.map +1 -1
  344. package/dist/subgraphs/vetra-package/schema.js +1 -1
  345. package/dist/tsconfig.tsbuildinfo +1 -1
  346. package/dist/vite.config.d.ts.map +1 -1
  347. package/dist/vite.config.js +11 -1
  348. package/package.json +25 -18
  349. package/dist/editors/app-editor/index.d.ts +0 -4
  350. package/dist/editors/app-editor/index.d.ts.map +0 -1
  351. package/dist/editors/app-editor/index.js +0 -10
  352. package/dist/editors/document-editor/index.d.ts +0 -4
  353. package/dist/editors/document-editor/index.d.ts.map +0 -1
  354. package/dist/editors/processor-editor/index.d.ts +0 -4
  355. package/dist/editors/processor-editor/index.d.ts.map +0 -1
  356. package/dist/editors/subgraph-editor/index.d.ts +0 -4
  357. package/dist/editors/subgraph-editor/index.d.ts.map +0 -1
  358. package/dist/editors/vetra-drive-app/index.d.ts +0 -4
  359. package/dist/editors/vetra-drive-app/index.d.ts.map +0 -1
  360. package/dist/editors/vetra-package/index.d.ts +0 -5
  361. package/dist/editors/vetra-package/index.d.ts.map +0 -1
  362. package/dist/editors/vetra-package/index.js +0 -10
@@ -1,3 +1,3 @@
1
- import type { ProcessorModuleBaseOperationsOperations } from "../../gen/base-operations/operations.js";
2
- export declare const reducer: ProcessorModuleBaseOperationsOperations;
1
+ import type { ProcessorModuleBaseOperationsOperations } from "@powerhousedao/vetra/document-models/processor-module";
2
+ export declare const processorModuleBaseOperationsOperations: ProcessorModuleBaseOperationsOperations;
3
3
  //# sourceMappingURL=base-operations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-operations.d.ts","sourceRoot":"","sources":["../../../../../document-models/processor-module/src/reducers/base-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,yCAAyC,CAAC;AAEvG,eAAO,MAAM,OAAO,EAAE,uCAuCrB,CAAC"}
1
+ {"version":3,"file":"base-operations.d.ts","sourceRoot":"","sources":["../../../../../document-models/processor-module/src/reducers/base-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,uDAAuD,CAAC;AAErH,eAAO,MAAM,uCAAuC,EAAE,uCAwCnD,CAAC"}
@@ -1,4 +1,4 @@
1
- export const reducer = {
1
+ export const processorModuleBaseOperationsOperations = {
2
2
  setProcessorNameOperation(state, action, dispatch) {
3
3
  const trimmedName = action.input.name.trim();
4
4
  if (trimmedName === "") {
@@ -2,10 +2,8 @@
2
2
  * This is a scaffold file meant for customization:
3
3
  * - change it by adding new tests or modifying the existing ones
4
4
  */
5
+ import { addDocumentType, reducer, removeDocumentType, setProcessorName, setProcessorStatus, setProcessorType, utils, } from "@powerhousedao/vetra/document-models/processor-module";
5
6
  import { beforeEach, describe, expect, it } from "vitest";
6
- import * as creators from "../../gen/base-operations/creators.js";
7
- import { reducer } from "../../gen/reducer.js";
8
- import utils from "../../gen/utils.js";
9
7
  describe("BaseOperations Operations", () => {
10
8
  let document;
11
9
  beforeEach(() => {
@@ -14,12 +12,12 @@ describe("BaseOperations Operations", () => {
14
12
  describe("setProcessorName", () => {
15
13
  it("should mutate state with new name", () => {
16
14
  const input = { name: "My Processor" };
17
- const updatedDocument = reducer(document, creators.setProcessorName(input));
15
+ const updatedDocument = reducer(document, setProcessorName(input));
18
16
  expect(updatedDocument.state.global.name).toBe("My Processor");
19
17
  });
20
18
  it("should reject empty string and store error in operation", () => {
21
19
  const input = { name: "" };
22
- const updatedDocument = reducer(document, creators.setProcessorName(input));
20
+ const updatedDocument = reducer(document, setProcessorName(input));
23
21
  expect(updatedDocument.operations.global).toHaveLength(1);
24
22
  expect(updatedDocument.operations.global[0].error).toBe("Processor name cannot be empty");
25
23
  expect(updatedDocument.state.global.name).toBe("");
@@ -28,12 +26,12 @@ describe("BaseOperations Operations", () => {
28
26
  describe("setProcessorType", () => {
29
27
  it("should mutate state with new type", () => {
30
28
  const input = { type: "analytics" };
31
- const updatedDocument = reducer(document, creators.setProcessorType(input));
29
+ const updatedDocument = reducer(document, setProcessorType(input));
32
30
  expect(updatedDocument.state.global.type).toBe("analytics");
33
31
  });
34
32
  it("should reject empty string and store error in operation", () => {
35
33
  const input = { type: "" };
36
- const updatedDocument = reducer(document, creators.setProcessorType(input));
34
+ const updatedDocument = reducer(document, setProcessorType(input));
37
35
  expect(updatedDocument.operations.global).toHaveLength(1);
38
36
  expect(updatedDocument.operations.global[0].error).toBe("Processor type cannot be empty");
39
37
  expect(updatedDocument.state.global.type).toBe("");
@@ -42,17 +40,17 @@ describe("BaseOperations Operations", () => {
42
40
  describe("setProcessorStatus", () => {
43
41
  it("should mutate state with new status", () => {
44
42
  const input = { status: "CONFIRMED" };
45
- const updatedDocument = reducer(document, creators.setProcessorStatus(input));
43
+ const updatedDocument = reducer(document, setProcessorStatus(input));
46
44
  expect(updatedDocument.state.global.status).toBe("CONFIRMED");
47
45
  });
48
46
  it("should transition from DRAFT to CONFIRMED", () => {
49
47
  expect(document.state.global.status).toBe("DRAFT");
50
- const updatedDocument = reducer(document, creators.setProcessorStatus({ status: "CONFIRMED" }));
48
+ const updatedDocument = reducer(document, setProcessorStatus({ status: "CONFIRMED" }));
51
49
  expect(updatedDocument.state.global.status).toBe("CONFIRMED");
52
50
  });
53
51
  it("should transition from CONFIRMED to DRAFT", () => {
54
- const confirmedDoc = reducer(document, creators.setProcessorStatus({ status: "CONFIRMED" }));
55
- const updatedDocument = reducer(confirmedDoc, creators.setProcessorStatus({ status: "DRAFT" }));
52
+ const confirmedDoc = reducer(document, setProcessorStatus({ status: "CONFIRMED" }));
53
+ const updatedDocument = reducer(confirmedDoc, setProcessorStatus({ status: "DRAFT" }));
56
54
  expect(updatedDocument.state.global.status).toBe("DRAFT");
57
55
  });
58
56
  });
@@ -62,7 +60,7 @@ describe("BaseOperations Operations", () => {
62
60
  id: "test-type-1",
63
61
  documentType: "powerhouse/test",
64
62
  };
65
- const updatedDocument = reducer(document, creators.addDocumentType(input));
63
+ const updatedDocument = reducer(document, addDocumentType(input));
66
64
  expect(updatedDocument.state.global.documentTypes).toContainEqual({
67
65
  id: "test-type-1",
68
66
  documentType: "powerhouse/test",
@@ -74,21 +72,21 @@ describe("BaseOperations Operations", () => {
74
72
  id: "first-type",
75
73
  documentType: "powerhouse/first",
76
74
  };
77
- const updatedDocument = reducer(document, creators.addDocumentType(input));
75
+ const updatedDocument = reducer(document, addDocumentType(input));
78
76
  expect(updatedDocument.state.global.documentTypes).toEqual([
79
77
  { id: "first-type", documentType: "powerhouse/first" },
80
78
  ]);
81
79
  });
82
80
  it("should add multiple document types sequentially", () => {
83
- let updatedDoc = reducer(document, creators.addDocumentType({
81
+ let updatedDoc = reducer(document, addDocumentType({
84
82
  id: "type-1",
85
83
  documentType: "powerhouse/a",
86
84
  }));
87
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({
85
+ updatedDoc = reducer(updatedDoc, addDocumentType({
88
86
  id: "type-2",
89
87
  documentType: "powerhouse/b",
90
88
  }));
91
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({
89
+ updatedDoc = reducer(updatedDoc, addDocumentType({
92
90
  id: "type-3",
93
91
  documentType: "powerhouse/c",
94
92
  }));
@@ -111,10 +109,10 @@ describe("BaseOperations Operations", () => {
111
109
  id: "duplicate",
112
110
  documentType: "powerhouse/first",
113
111
  };
114
- let updatedDoc = reducer(document, creators.addDocumentType(input));
112
+ let updatedDoc = reducer(document, addDocumentType(input));
115
113
  expect(updatedDoc.state.global.documentTypes).toHaveLength(1);
116
114
  expect(updatedDoc.operations.global[0].error).toBeUndefined();
117
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({
115
+ updatedDoc = reducer(updatedDoc, addDocumentType({
118
116
  id: "duplicate",
119
117
  documentType: "powerhouse/second",
120
118
  }));
@@ -125,42 +123,42 @@ describe("BaseOperations Operations", () => {
125
123
  });
126
124
  describe("removeDocumentType", () => {
127
125
  it("should mutate state by removing document type from array", () => {
128
- let updatedDoc = reducer(document, creators.addDocumentType({
126
+ let updatedDoc = reducer(document, addDocumentType({
129
127
  id: "to-remove",
130
128
  documentType: "powerhouse/test",
131
129
  }));
132
- updatedDoc = reducer(updatedDoc, creators.removeDocumentType({ id: "to-remove" }));
130
+ updatedDoc = reducer(updatedDoc, removeDocumentType({ id: "to-remove" }));
133
131
  expect(updatedDoc.state.global.documentTypes).not.toContainEqual({
134
132
  id: "to-remove",
135
133
  documentType: "powerhouse/test",
136
134
  });
137
135
  });
138
136
  it("should remove existing ID", () => {
139
- let updatedDoc = reducer(document, creators.addDocumentType({
137
+ let updatedDoc = reducer(document, addDocumentType({
140
138
  id: "existing",
141
139
  documentType: "powerhouse/test",
142
140
  }));
143
141
  const lengthBefore = updatedDoc.state.global.documentTypes.length;
144
- updatedDoc = reducer(updatedDoc, creators.removeDocumentType({ id: "existing" }));
142
+ updatedDoc = reducer(updatedDoc, removeDocumentType({ id: "existing" }));
145
143
  expect(updatedDoc.state.global.documentTypes.length).toBe(lengthBefore - 1);
146
144
  expect(updatedDoc.state.global.documentTypes.find((dt) => dt.id === "existing")).toBeUndefined();
147
145
  });
148
146
  it("should gracefully handle non-existent ID", () => {
149
147
  const initialState = document.state.global.documentTypes;
150
- const updatedDocument = reducer(document, creators.removeDocumentType({ id: "non-existent-id" }));
148
+ const updatedDocument = reducer(document, removeDocumentType({ id: "non-existent-id" }));
151
149
  expect(updatedDocument.state.global.documentTypes).toEqual(initialState);
152
150
  });
153
151
  it("should handle empty array gracefully", () => {
154
152
  expect(document.state.global.documentTypes).toEqual([]);
155
- const updatedDocument = reducer(document, creators.removeDocumentType({ id: "any-id" }));
153
+ const updatedDocument = reducer(document, removeDocumentType({ id: "any-id" }));
156
154
  expect(updatedDocument.state.global.documentTypes).toEqual([]);
157
155
  });
158
156
  it("should add then immediately remove item", () => {
159
- let updatedDoc = reducer(document, creators.addDocumentType({
157
+ let updatedDoc = reducer(document, addDocumentType({
160
158
  id: "temp-type",
161
159
  documentType: "powerhouse/temp",
162
160
  }));
163
- updatedDoc = reducer(updatedDoc, creators.removeDocumentType({ id: "temp-type" }));
161
+ updatedDoc = reducer(updatedDoc, removeDocumentType({ id: "temp-type" }));
164
162
  expect(updatedDoc.state.global.documentTypes.find((dt) => dt.id === "temp-type")).toBeUndefined();
165
163
  expect(updatedDoc.operations.global).toHaveLength(2);
166
164
  });
@@ -2,10 +2,8 @@
2
2
  * This is a scaffold file meant for customization:
3
3
  * - change it by adding new tests or modifying the existing ones
4
4
  */
5
+ import { addDocumentType, reducer, removeDocumentType, setProcessorName, setProcessorStatus, setProcessorType, utils, } from "@powerhousedao/vetra/document-models/processor-module";
5
6
  import { describe, expect, it } from "vitest";
6
- import * as creators from "../../gen/base-operations/creators.js";
7
- import { reducer } from "../../gen/reducer.js";
8
- import utils from "../../gen/utils.js";
9
7
  describe("Processor Module Document Model", () => {
10
8
  it("should have correct initial values", () => {
11
9
  const document = utils.createDocument();
@@ -13,16 +11,20 @@ describe("Processor Module Document Model", () => {
13
11
  expect(document.state.global.type).toBe("");
14
12
  expect(document.state.global.documentTypes).toEqual([]);
15
13
  expect(document.state.global.status).toBe("DRAFT");
14
+ expect(utils.isStateOfType(document.state)).toBe(true);
15
+ expect(utils.assertIsStateOfType(document.state)).toBeUndefined();
16
+ expect(utils.isDocumentOfType(document)).toBe(true);
17
+ expect(utils.assertIsDocumentOfType(document)).toBeUndefined();
16
18
  });
17
19
  it("should handle multiple operations and maintain consistency", () => {
18
20
  const document = utils.createDocument();
19
- let updatedDoc = reducer(document, creators.setProcessorName({ name: "Test Processor" }));
20
- updatedDoc = reducer(updatedDoc, creators.setProcessorType({ type: "analytics" }));
21
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({
21
+ let updatedDoc = reducer(document, setProcessorName({ name: "Test Processor" }));
22
+ updatedDoc = reducer(updatedDoc, setProcessorType({ type: "analytics" }));
23
+ updatedDoc = reducer(updatedDoc, addDocumentType({
22
24
  id: "test-type",
23
25
  documentType: "powerhouse/test",
24
26
  }));
25
- updatedDoc = reducer(updatedDoc, creators.setProcessorStatus({ status: "CONFIRMED" }));
27
+ updatedDoc = reducer(updatedDoc, setProcessorStatus({ status: "CONFIRMED" }));
26
28
  // Verify state consistency
27
29
  expect(updatedDoc.state.global.name).toBe("Test Processor");
28
30
  expect(updatedDoc.state.global.type).toBe("analytics");
@@ -33,50 +35,50 @@ describe("Processor Module Document Model", () => {
33
35
  it("should handle workflow: set name/type, add types, confirm status", () => {
34
36
  const document = utils.createDocument();
35
37
  // Step 1: Set processor name and type
36
- let updatedDoc = reducer(document, creators.setProcessorName({ name: "Production Processor" }));
38
+ let updatedDoc = reducer(document, setProcessorName({ name: "Production Processor" }));
37
39
  expect(updatedDoc.state.global.name).toBe("Production Processor");
38
- updatedDoc = reducer(updatedDoc, creators.setProcessorType({ type: "data-analytics" }));
40
+ updatedDoc = reducer(updatedDoc, setProcessorType({ type: "data-analytics" }));
39
41
  expect(updatedDoc.state.global.type).toBe("data-analytics");
40
42
  // Step 2: Add document types
41
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({
43
+ updatedDoc = reducer(updatedDoc, addDocumentType({
42
44
  id: "budget-docs",
43
45
  documentType: "powerhouse/budget",
44
46
  }));
45
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({
47
+ updatedDoc = reducer(updatedDoc, addDocumentType({
46
48
  id: "invoice-docs",
47
49
  documentType: "powerhouse/invoice",
48
50
  }));
49
51
  expect(updatedDoc.state.global.documentTypes).toHaveLength(2);
50
52
  // Step 3: Confirm processor status
51
- updatedDoc = reducer(updatedDoc, creators.setProcessorStatus({ status: "CONFIRMED" }));
53
+ updatedDoc = reducer(updatedDoc, setProcessorStatus({ status: "CONFIRMED" }));
52
54
  expect(updatedDoc.state.global.status).toBe("CONFIRMED");
53
55
  });
54
56
  it("should handle reset scenario: remove all types and add new ones", () => {
55
57
  const document = utils.createDocument();
56
58
  // Add initial types
57
- let updatedDoc = reducer(document, creators.addDocumentType({
59
+ let updatedDoc = reducer(document, addDocumentType({
58
60
  id: "old-type-1",
59
61
  documentType: "powerhouse/old1",
60
62
  }));
61
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({
63
+ updatedDoc = reducer(updatedDoc, addDocumentType({
62
64
  id: "old-type-2",
63
65
  documentType: "powerhouse/old2",
64
66
  }));
65
67
  expect(updatedDoc.state.global.documentTypes).toHaveLength(2);
66
68
  // Remove all types
67
- updatedDoc = reducer(updatedDoc, creators.removeDocumentType({ id: "old-type-1" }));
68
- updatedDoc = reducer(updatedDoc, creators.removeDocumentType({ id: "old-type-2" }));
69
+ updatedDoc = reducer(updatedDoc, removeDocumentType({ id: "old-type-1" }));
70
+ updatedDoc = reducer(updatedDoc, removeDocumentType({ id: "old-type-2" }));
69
71
  expect(updatedDoc.state.global.documentTypes).toEqual([]);
70
72
  // Add new types from scratch
71
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({
73
+ updatedDoc = reducer(updatedDoc, addDocumentType({
72
74
  id: "new-type-1",
73
75
  documentType: "powerhouse/new1",
74
76
  }));
75
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({
77
+ updatedDoc = reducer(updatedDoc, addDocumentType({
76
78
  id: "new-type-2",
77
79
  documentType: "powerhouse/new2",
78
80
  }));
79
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({
81
+ updatedDoc = reducer(updatedDoc, addDocumentType({
80
82
  id: "new-type-3",
81
83
  documentType: "powerhouse/new3",
82
84
  }));
@@ -88,15 +90,15 @@ describe("Processor Module Document Model", () => {
88
90
  it("should maintain state integrity with complex add/remove sequences", () => {
89
91
  const document = utils.createDocument();
90
92
  // Add multiple types
91
- let updatedDoc = reducer(document, creators.addDocumentType({ id: "type-a", documentType: "a" }));
92
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({ id: "type-b", documentType: "b" }));
93
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({ id: "type-c", documentType: "c" }));
93
+ let updatedDoc = reducer(document, addDocumentType({ id: "type-a", documentType: "a" }));
94
+ updatedDoc = reducer(updatedDoc, addDocumentType({ id: "type-b", documentType: "b" }));
95
+ updatedDoc = reducer(updatedDoc, addDocumentType({ id: "type-c", documentType: "c" }));
94
96
  expect(updatedDoc.state.global.documentTypes).toHaveLength(3);
95
97
  // Remove middle one
96
- updatedDoc = reducer(updatedDoc, creators.removeDocumentType({ id: "type-b" }));
98
+ updatedDoc = reducer(updatedDoc, removeDocumentType({ id: "type-b" }));
97
99
  expect(updatedDoc.state.global.documentTypes).toHaveLength(2);
98
100
  // Add it back with new documentType
99
- updatedDoc = reducer(updatedDoc, creators.addDocumentType({ id: "type-b", documentType: "b-new" }));
101
+ updatedDoc = reducer(updatedDoc, addDocumentType({ id: "type-b", documentType: "b-new" }));
100
102
  expect(updatedDoc.state.global.documentTypes).toHaveLength(3);
101
103
  // Verify order and content
102
104
  const typeB = updatedDoc.state.global.documentTypes.find((dt) => dt.id === "type-b");
@@ -0,0 +1,14 @@
1
+ import type { ProcessorModulePHState } from "./gen/types.js";
2
+ /** Utils for the ProcessorModule document model */
3
+ export declare const utils: {
4
+ fileExtension: string;
5
+ createState: import("document-model").CreateState<ProcessorModulePHState>;
6
+ createDocument: import("document-model").CreateDocument<ProcessorModulePHState>;
7
+ loadFromInput: import("document-model").LoadFromInput<ProcessorModulePHState>;
8
+ saveToFileHandle: import("document-model").SaveToFileHandle;
9
+ isStateOfType: import("document-model").IsStateOfType<ProcessorModulePHState>;
10
+ assertIsStateOfType: import("document-model").AssertIsStateOfType<ProcessorModulePHState>;
11
+ isDocumentOfType: import("document-model").IsDocumentOfType<ProcessorModulePHState>;
12
+ assertIsDocumentOfType: import("document-model").AssertIsDocumentOfType<ProcessorModulePHState>;
13
+ };
14
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../document-models/processor-module/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAI7D,mDAAmD;AACnD,eAAO,MAAM,KAAK;;;;;;;;;;CAGoC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { utils as genUtils } from "./gen/utils.js";
2
+ import * as customUtils from "./src/utils.js";
3
+ /** Utils for the ProcessorModule document model */
4
+ export const utils = {
5
+ ...genUtils,
6
+ ...customUtils,
7
+ };
@@ -0,0 +1,14 @@
1
+ /** Actions for the SubgraphModule document model */
2
+ export declare const actions: {
3
+ setSubgraphName: (input: import("./index.js").SetSubgraphNameInput) => import("./index.js").SetSubgraphNameAction;
4
+ setSubgraphStatus: (input: import("./index.js").SetSubgraphStatusInput) => import("./index.js").SetSubgraphStatusAction;
5
+ setName: (name: string) => import("document-model").SetNameAction;
6
+ undo: (skip?: number, scope?: string) => import("document-model").UndoAction;
7
+ redo: (count?: number, scope?: string) => import("document-model").RedoAction;
8
+ prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
9
+ loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
10
+ name: string;
11
+ }, operations: number) => import("document-model").LoadStateAction;
12
+ noop: (scope?: string) => import("document-model").NOOPAction;
13
+ };
14
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/subgraph-module/actions.ts"],"names":[],"mappings":"AAGA,oDAAoD;AACpD,eAAO,MAAM,OAAO;sBACyG,gDAA2B;wBAA4L,kDAA6B;;eAA0iN,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADp0O,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { baseActions } from "document-model";
2
+ import { baseOperationsActions } from "./gen/creators.js";
3
+ /** Actions for the SubgraphModule document model */
4
+ export const actions = { ...baseActions, ...baseOperationsActions };
@@ -1,5 +1,5 @@
1
- import { type SetSubgraphNameInput, type SetSubgraphStatusInput } from "../types.js";
2
- import { type SetSubgraphNameAction, type SetSubgraphStatusAction } from "./actions.js";
1
+ import type { SetSubgraphNameInput, SetSubgraphStatusInput } from "../types.js";
2
+ import type { SetSubgraphNameAction, SetSubgraphStatusAction } from "./actions.js";
3
3
  export declare const setSubgraphName: (input: SetSubgraphNameInput) => SetSubgraphNameAction;
4
4
  export declare const setSubgraphStatus: (input: SetSubgraphStatusInput) => SetSubgraphStatusAction;
5
5
  //# sourceMappingURL=creators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/subgraph-module/gen/base-operations/creators.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,0BAOxD,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAAI,OAAO,sBAAsB,4BAO5D,CAAC"}
1
+ {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/subgraph-module/gen/base-operations/creators.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,0BAOxD,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAAI,OAAO,sBAAsB,4BAO5D,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { createAction } from "document-model/core";
2
- import { z, } from "../types.js";
3
- import {} from "./actions.js";
4
- export const setSubgraphName = (input) => createAction("SET_SUBGRAPH_NAME", { ...input }, undefined, z.SetSubgraphNameInputSchema, "global");
5
- export const setSubgraphStatus = (input) => createAction("SET_SUBGRAPH_STATUS", { ...input }, undefined, z.SetSubgraphStatusInputSchema, "global");
2
+ import { SetSubgraphNameInputSchema, SetSubgraphStatusInputSchema, } from "../schema/zod.js";
3
+ export const setSubgraphName = (input) => createAction("SET_SUBGRAPH_NAME", { ...input }, undefined, SetSubgraphNameInputSchema, "global");
4
+ export const setSubgraphStatus = (input) => createAction("SET_SUBGRAPH_STATUS", { ...input }, undefined, SetSubgraphStatusInputSchema, "global");
@@ -1,2 +1,3 @@
1
1
  export * from "./base-operations/creators.js";
2
+ export * as baseOperationsActions from "./base-operations/creators.js";
2
3
  //# sourceMappingURL=creators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/subgraph-module/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/subgraph-module/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC"}
@@ -1 +1,2 @@
1
1
  export * from "./base-operations/creators.js";
2
+ export * as baseOperationsActions from "./base-operations/creators.js";
@@ -0,0 +1,161 @@
1
+ import { z } from "zod";
2
+ import type { SubgraphModuleDocument, SubgraphModulePHState } from "./types.js";
3
+ /** Schema for validating the header object of a SubgraphModule document */
4
+ export declare const SubgraphModuleDocumentHeaderSchema: z.ZodObject<{
5
+ id: z.ZodString;
6
+ name: z.ZodString;
7
+ createdAtUtcIso: z.ZodString;
8
+ lastModifiedAtUtcIso: z.ZodString;
9
+ } & {
10
+ documentType: z.ZodLiteral<"powerhouse/subgraph">;
11
+ }, "strip", z.ZodTypeAny, {
12
+ documentType: "powerhouse/subgraph";
13
+ name: string;
14
+ id: string;
15
+ createdAtUtcIso: string;
16
+ lastModifiedAtUtcIso: string;
17
+ }, {
18
+ documentType: "powerhouse/subgraph";
19
+ name: string;
20
+ id: string;
21
+ createdAtUtcIso: string;
22
+ lastModifiedAtUtcIso: string;
23
+ }>;
24
+ /** Schema for validating the state object of a SubgraphModule document */
25
+ export declare const SubgraphModulePHStateSchema: z.ZodObject<{} & {
26
+ global: z.ZodObject<Required<{
27
+ name: z.ZodType<string, any, string>;
28
+ status: z.ZodType<import("./types.js").StatusType, any, import("./types.js").StatusType>;
29
+ }>, z.UnknownKeysParam, z.ZodTypeAny, {
30
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
31
+ name: import("./types.js").Scalars["String"]["output"];
32
+ }, {
33
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
34
+ name: import("./types.js").Scalars["String"]["output"];
35
+ }>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ global: {
38
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
39
+ name: import("./types.js").Scalars["String"]["output"];
40
+ };
41
+ }, {
42
+ global: {
43
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
44
+ name: import("./types.js").Scalars["String"]["output"];
45
+ };
46
+ }>;
47
+ export declare const SubgraphModuleDocumentSchema: z.ZodObject<{
48
+ header: z.ZodObject<{
49
+ id: z.ZodString;
50
+ name: z.ZodString;
51
+ createdAtUtcIso: z.ZodString;
52
+ lastModifiedAtUtcIso: z.ZodString;
53
+ } & {
54
+ documentType: z.ZodLiteral<"powerhouse/subgraph">;
55
+ }, "strip", z.ZodTypeAny, {
56
+ documentType: "powerhouse/subgraph";
57
+ name: string;
58
+ id: string;
59
+ createdAtUtcIso: string;
60
+ lastModifiedAtUtcIso: string;
61
+ }, {
62
+ documentType: "powerhouse/subgraph";
63
+ name: string;
64
+ id: string;
65
+ createdAtUtcIso: string;
66
+ lastModifiedAtUtcIso: string;
67
+ }>;
68
+ state: z.ZodObject<{} & {
69
+ global: z.ZodObject<Required<{
70
+ name: z.ZodType<string, any, string>;
71
+ status: z.ZodType<import("./types.js").StatusType, any, import("./types.js").StatusType>;
72
+ }>, z.UnknownKeysParam, z.ZodTypeAny, {
73
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
74
+ name: import("./types.js").Scalars["String"]["output"];
75
+ }, {
76
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
77
+ name: import("./types.js").Scalars["String"]["output"];
78
+ }>;
79
+ }, "strip", z.ZodTypeAny, {
80
+ global: {
81
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
82
+ name: import("./types.js").Scalars["String"]["output"];
83
+ };
84
+ }, {
85
+ global: {
86
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
87
+ name: import("./types.js").Scalars["String"]["output"];
88
+ };
89
+ }>;
90
+ initialState: z.ZodObject<{} & {
91
+ global: z.ZodObject<Required<{
92
+ name: z.ZodType<string, any, string>;
93
+ status: z.ZodType<import("./types.js").StatusType, any, import("./types.js").StatusType>;
94
+ }>, z.UnknownKeysParam, z.ZodTypeAny, {
95
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
96
+ name: import("./types.js").Scalars["String"]["output"];
97
+ }, {
98
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
99
+ name: import("./types.js").Scalars["String"]["output"];
100
+ }>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ global: {
103
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
104
+ name: import("./types.js").Scalars["String"]["output"];
105
+ };
106
+ }, {
107
+ global: {
108
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
109
+ name: import("./types.js").Scalars["String"]["output"];
110
+ };
111
+ }>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ header: {
114
+ documentType: "powerhouse/subgraph";
115
+ name: string;
116
+ id: string;
117
+ createdAtUtcIso: string;
118
+ lastModifiedAtUtcIso: string;
119
+ };
120
+ state: {
121
+ global: {
122
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
123
+ name: import("./types.js").Scalars["String"]["output"];
124
+ };
125
+ };
126
+ initialState: {
127
+ global: {
128
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
129
+ name: import("./types.js").Scalars["String"]["output"];
130
+ };
131
+ };
132
+ }, {
133
+ header: {
134
+ documentType: "powerhouse/subgraph";
135
+ name: string;
136
+ id: string;
137
+ createdAtUtcIso: string;
138
+ lastModifiedAtUtcIso: string;
139
+ };
140
+ state: {
141
+ global: {
142
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
143
+ name: import("./types.js").Scalars["String"]["output"];
144
+ };
145
+ };
146
+ initialState: {
147
+ global: {
148
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
149
+ name: import("./types.js").Scalars["String"]["output"];
150
+ };
151
+ };
152
+ }>;
153
+ /** Simple helper function to check if a state object is a SubgraphModule document state object */
154
+ export declare function isSubgraphModuleState(state: unknown): state is SubgraphModulePHState;
155
+ /** Simple helper function to assert that a document state object is a SubgraphModule document state object */
156
+ export declare function assertIsSubgraphModuleState(state: unknown): asserts state is SubgraphModulePHState;
157
+ /** Simple helper function to check if a document is a SubgraphModule document */
158
+ export declare function isSubgraphModuleDocument(document: unknown): document is SubgraphModuleDocument;
159
+ /** Simple helper function to assert that a document is a SubgraphModule document */
160
+ export declare function assertIsSubgraphModuleDocument(document: unknown): asserts document is SubgraphModuleDocument;
161
+ //# sourceMappingURL=document-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-schema.d.ts","sourceRoot":"","sources":["../../../../document-models/subgraph-module/gen/document-schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEhF,2EAA2E;AAC3E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;EAG3C,CAAC;AAEL,0EAA0E;AAC1E,eAAO,MAAM,2BAA2B;;;;;;cAqCkP,sCAAkB;;;cAAlB,sCAAkB;;;;;cAAlB,sCAAkB;;;;;cAAlB,sCAAkB;;EAnC1S,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiCiP,sCAAkB;;;kBAAlB,sCAAkB;;;;;kBAAlB,sCAAkB;;;;;kBAAlB,sCAAkB;;;;;;;;;kBAAlB,sCAAkB;;;kBAAlB,sCAAkB;;;;;kBAAlB,sCAAkB;;;;;kBAAlB,sCAAkB;;;;;;;;;;;;;;kBAAlB,sCAAkB;;;;;;kBAAlB,sCAAkB;;;;;;;;;;;;;;kBAAlB,sCAAkB;;;;;;kBAAlB,sCAAkB;;;EA7B1S,CAAC;AAEH,kGAAkG;AAClG,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,qBAAqB,CAEhC;AAED,8GAA8G;AAC9G,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,KAAK,IAAI,qBAAqB,CAExC;AAED,iFAAiF;AACjF,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,sBAAsB,CAEpC;AAED,oFAAoF;AACpF,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,IAAI,sBAAsB,CAE5C"}
@@ -0,0 +1,33 @@
1
+ import { BaseDocumentHeaderSchema, BaseDocumentStateSchema, } from "document-model";
2
+ import { z } from "zod";
3
+ import { subgraphModuleDocumentType } from "./document-type.js";
4
+ import { SubgraphModuleStateSchema } from "./schema/zod.js";
5
+ /** Schema for validating the header object of a SubgraphModule document */
6
+ export const SubgraphModuleDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({
7
+ documentType: z.literal(subgraphModuleDocumentType),
8
+ });
9
+ /** Schema for validating the state object of a SubgraphModule document */
10
+ export const SubgraphModulePHStateSchema = BaseDocumentStateSchema.extend({
11
+ global: SubgraphModuleStateSchema(),
12
+ });
13
+ export const SubgraphModuleDocumentSchema = z.object({
14
+ header: SubgraphModuleDocumentHeaderSchema,
15
+ state: SubgraphModulePHStateSchema,
16
+ initialState: SubgraphModulePHStateSchema,
17
+ });
18
+ /** Simple helper function to check if a state object is a SubgraphModule document state object */
19
+ export function isSubgraphModuleState(state) {
20
+ return SubgraphModulePHStateSchema.safeParse(state).success;
21
+ }
22
+ /** Simple helper function to assert that a document state object is a SubgraphModule document state object */
23
+ export function assertIsSubgraphModuleState(state) {
24
+ SubgraphModulePHStateSchema.parse(state);
25
+ }
26
+ /** Simple helper function to check if a document is a SubgraphModule document */
27
+ export function isSubgraphModuleDocument(document) {
28
+ return SubgraphModuleDocumentSchema.safeParse(document).success;
29
+ }
30
+ /** Simple helper function to assert that a document is a SubgraphModule document */
31
+ export function assertIsSubgraphModuleDocument(document) {
32
+ SubgraphModuleDocumentSchema.parse(document);
33
+ }
@@ -0,0 +1,2 @@
1
+ export declare const subgraphModuleDocumentType = "powerhouse/subgraph";
2
+ //# sourceMappingURL=document-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-type.d.ts","sourceRoot":"","sources":["../../../../document-models/subgraph-module/gen/document-type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ export const subgraphModuleDocumentType = "powerhouse/subgraph";
@@ -1,6 +1,12 @@
1
1
  export * from "./actions.js";
2
2
  export * from "./document-model.js";
3
3
  export * from "./types.js";
4
- export * as actions from "./creators.js";
4
+ export * from "./creators.js";
5
5
  export { createSubgraphModuleDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
6
+ export * from "./utils.js";
7
+ export * from "./reducer.js";
8
+ export * from "./schema/index.js";
9
+ export * from "./document-type.js";
10
+ export * from "./document-schema.js";
11
+ export * from "./base-operations/operations.js";
6
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../document-models/subgraph-module/gen/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,4BAA4B,EAC5B,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../document-models/subgraph-module/gen/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,4BAA4B,EAC5B,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC"}