@powerhousedao/vetra 5.0.3 → 5.0.5

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 (361) 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/__tests__/codegen-processor-e2e.test.js +21 -3
  325. package/dist/processors/codegen/document-handlers/document-codegen-manager.js +1 -1
  326. package/dist/processors/codegen/document-handlers/generators/app-generator.d.ts.map +1 -1
  327. package/dist/processors/codegen/document-handlers/generators/app-generator.js +3 -0
  328. package/dist/processors/codegen/document-handlers/generators/document-editor-generator.d.ts.map +1 -1
  329. package/dist/processors/codegen/document-handlers/generators/document-editor-generator.js +9 -1
  330. package/dist/processors/codegen/document-handlers/generators/document-model-generator.d.ts.map +1 -1
  331. package/dist/processors/codegen/document-handlers/generators/document-model-generator.js +4 -0
  332. package/dist/processors/codegen/document-handlers/generators/package-generator.d.ts.map +1 -1
  333. package/dist/processors/codegen/document-handlers/generators/package-generator.js +3 -0
  334. package/dist/processors/codegen/document-handlers/generators/processor-generator.d.ts.map +1 -1
  335. package/dist/processors/codegen/document-handlers/generators/processor-generator.js +3 -0
  336. package/dist/processors/codegen/document-handlers/generators/subgraph-generator.d.ts.map +1 -1
  337. package/dist/processors/codegen/document-handlers/generators/subgraph-generator.js +3 -0
  338. package/dist/processors/codegen/document-handlers/generators/utils.d.ts +13 -0
  339. package/dist/processors/codegen/document-handlers/generators/utils.d.ts.map +1 -0
  340. package/dist/processors/codegen/document-handlers/generators/utils.js +29 -0
  341. package/dist/style.css +5 -1
  342. package/dist/subgraphs/vetra-package/schema.d.ts.map +1 -1
  343. package/dist/subgraphs/vetra-package/schema.js +1 -1
  344. package/dist/tsconfig.tsbuildinfo +1 -1
  345. package/dist/vite.config.d.ts.map +1 -1
  346. package/dist/vite.config.js +11 -1
  347. package/package.json +25 -18
  348. package/dist/editors/app-editor/index.d.ts +0 -4
  349. package/dist/editors/app-editor/index.d.ts.map +0 -1
  350. package/dist/editors/app-editor/index.js +0 -10
  351. package/dist/editors/document-editor/index.d.ts +0 -4
  352. package/dist/editors/document-editor/index.d.ts.map +0 -1
  353. package/dist/editors/processor-editor/index.d.ts +0 -4
  354. package/dist/editors/processor-editor/index.d.ts.map +0 -1
  355. package/dist/editors/subgraph-editor/index.d.ts +0 -4
  356. package/dist/editors/subgraph-editor/index.d.ts.map +0 -1
  357. package/dist/editors/vetra-drive-app/index.d.ts +0 -4
  358. package/dist/editors/vetra-drive-app/index.d.ts.map +0 -1
  359. package/dist/editors/vetra-package/index.d.ts +0 -5
  360. package/dist/editors/vetra-package/index.d.ts.map +0 -1
  361. package/dist/editors/vetra-package/index.js +0 -10
@@ -0,0 +1,18 @@
1
+ /** Actions for the AppModule document model */
2
+ export declare const actions: {
3
+ setDragAndDropEnabled: (input: import("./index.js").SetDragAndDropEnabledInput) => import("./index.js").SetDragAndDropEnabledAction;
4
+ setAppName: (input: import("./index.js").SetAppNameInput) => import("./index.js").SetAppNameAction;
5
+ setAppStatus: (input: import("./index.js").SetAppStatusInput) => import("./index.js").SetAppStatusAction;
6
+ addDocumentType: (input: import("./index.js").AddDocumentTypeInput) => import("./index.js").AddDocumentTypeAction;
7
+ removeDocumentType: (input: import("./index.js").RemoveDocumentTypeInput) => import("./index.js").RemoveDocumentTypeAction;
8
+ setDocumentTypes: (input: import("./index.js").SetDocumentTypesInput) => import("./index.js").SetDocumentTypesAction;
9
+ setName: (name: string) => import("document-model").SetNameAction;
10
+ undo: (skip?: number, scope?: string) => import("document-model").UndoAction;
11
+ redo: (count?: number, scope?: string) => import("document-model").RedoAction;
12
+ prune: (start?: number, end?: number, scope?: string) => import("document-model").SchemaPruneAction;
13
+ loadState: <TState extends import("document-model").PHBaseState = import("document-model").PHBaseState>(state: TState & {
14
+ name: string;
15
+ }, operations: number) => import("document-model").LoadStateAction;
16
+ noop: (scope?: string) => import("document-model").NOOPAction;
17
+ };
18
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/app-module/actions.ts"],"names":[],"mappings":"AAGA,+CAA+C;AAC/C,eAAO,MAAM,OAAO;4BAKT,sDAAiC;iBAA2P,2CAAsB;mBAAwK,6CAAwB;sBAAiL,gDAA2B;yBAA6L,mDAA8B;uBAAoM,iDAA4B;;eAAsuL,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CADr1O,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { baseActions } from "document-model";
2
+ import { baseOperationsActions, dndOperationsActions } from "./gen/creators.js";
3
+ /** Actions for the AppModule document model */
4
+ export const actions = {
5
+ ...baseActions,
6
+ ...baseOperationsActions,
7
+ ...dndOperationsActions,
8
+ };
@@ -1,5 +1,5 @@
1
- import { type SetAppNameInput, type SetAppStatusInput, type AddDocumentTypeInput, type RemoveDocumentTypeInput, type SetDocumentTypesInput } from "../types.js";
2
- import { type SetAppNameAction, type SetAppStatusAction, type AddDocumentTypeAction, type RemoveDocumentTypeAction, type SetDocumentTypesAction } from "./actions.js";
1
+ import type { SetAppNameInput, SetAppStatusInput, AddDocumentTypeInput, RemoveDocumentTypeInput, SetDocumentTypesInput } from "../types.js";
2
+ import type { SetAppNameAction, SetAppStatusAction, AddDocumentTypeAction, RemoveDocumentTypeAction, SetDocumentTypesAction } from "./actions.js";
3
3
  export declare const setAppName: (input: SetAppNameInput) => SetAppNameAction;
4
4
  export declare const setAppStatus: (input: SetAppStatusInput) => SetAppStatusAction;
5
5
  export declare const addDocumentType: (input: AddDocumentTypeInput) => AddDocumentTypeAction;
@@ -1 +1 @@
1
- {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/app-module/gen/base-operations/creators.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC5B,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,qBAO9C,CAAC;AAEJ,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,uBAOlD,CAAC;AAEJ,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,0BAOxD,CAAC;AAEJ,eAAO,MAAM,kBAAkB,GAAI,OAAO,uBAAuB,6BAO9D,CAAC;AAEJ,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,2BAO1D,CAAC"}
1
+ {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/app-module/gen/base-operations/creators.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,qBAO9C,CAAC;AAEJ,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,uBAOlD,CAAC;AAEJ,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,0BAOxD,CAAC;AAEJ,eAAO,MAAM,kBAAkB,GAAI,OAAO,uBAAuB,6BAO9D,CAAC;AAEJ,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,2BAO1D,CAAC"}
@@ -1,8 +1,7 @@
1
1
  import { createAction } from "document-model/core";
2
- import { z, } from "../types.js";
3
- import {} from "./actions.js";
4
- export const setAppName = (input) => createAction("SET_APP_NAME", { ...input }, undefined, z.SetAppNameInputSchema, "global");
5
- export const setAppStatus = (input) => createAction("SET_APP_STATUS", { ...input }, undefined, z.SetAppStatusInputSchema, "global");
6
- export const addDocumentType = (input) => createAction("ADD_DOCUMENT_TYPE", { ...input }, undefined, z.AddDocumentTypeInputSchema, "global");
7
- export const removeDocumentType = (input) => createAction("REMOVE_DOCUMENT_TYPE", { ...input }, undefined, z.RemoveDocumentTypeInputSchema, "global");
8
- export const setDocumentTypes = (input) => createAction("SET_DOCUMENT_TYPES", { ...input }, undefined, z.SetDocumentTypesInputSchema, "global");
2
+ import { SetAppNameInputSchema, SetAppStatusInputSchema, AddDocumentTypeInputSchema, RemoveDocumentTypeInputSchema, SetDocumentTypesInputSchema, } from "../schema/zod.js";
3
+ export const setAppName = (input) => createAction("SET_APP_NAME", { ...input }, undefined, SetAppNameInputSchema, "global");
4
+ export const setAppStatus = (input) => createAction("SET_APP_STATUS", { ...input }, undefined, SetAppStatusInputSchema, "global");
5
+ export const addDocumentType = (input) => createAction("ADD_DOCUMENT_TYPE", { ...input }, undefined, AddDocumentTypeInputSchema, "global");
6
+ export const removeDocumentType = (input) => createAction("REMOVE_DOCUMENT_TYPE", { ...input }, undefined, RemoveDocumentTypeInputSchema, "global");
7
+ export const setDocumentTypes = (input) => createAction("SET_DOCUMENT_TYPES", { ...input }, undefined, SetDocumentTypesInputSchema, "global");
@@ -1,3 +1,5 @@
1
1
  export * from "./base-operations/creators.js";
2
+ export * as baseOperationsActions from "./base-operations/creators.js";
2
3
  export * from "./dnd-operations/creators.js";
4
+ export * as dndOperationsActions from "./dnd-operations/creators.js";
3
5
  //# sourceMappingURL=creators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/app-module/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/app-module/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,cAAc,8BAA8B,CAAC;AAC7C,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export * from "./base-operations/creators.js";
2
+ export * as baseOperationsActions from "./base-operations/creators.js";
2
3
  export * from "./dnd-operations/creators.js";
4
+ export * as dndOperationsActions from "./dnd-operations/creators.js";
@@ -1,4 +1,4 @@
1
- import { type SetDragAndDropEnabledInput } from "../types.js";
2
- import { type SetDragAndDropEnabledAction } from "./actions.js";
1
+ import type { SetDragAndDropEnabledInput } from "../types.js";
2
+ import type { SetDragAndDropEnabledAction } from "./actions.js";
3
3
  export declare const setDragAndDropEnabled: (input: SetDragAndDropEnabledInput) => SetDragAndDropEnabledAction;
4
4
  //# sourceMappingURL=creators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/app-module/gen/dnd-operations/creators.ts"],"names":[],"mappings":"AACA,OAAO,EAAK,KAAK,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAEhE,eAAO,MAAM,qBAAqB,GAAI,OAAO,0BAA0B,gCAOpE,CAAC"}
1
+ {"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/app-module/gen/dnd-operations/creators.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAEhE,eAAO,MAAM,qBAAqB,GAAI,OAAO,0BAA0B,gCAOpE,CAAC"}
@@ -1,4 +1,3 @@
1
1
  import { createAction } from "document-model/core";
2
- import { z } from "../types.js";
3
- import {} from "./actions.js";
4
- export const setDragAndDropEnabled = (input) => createAction("SET_DRAG_AND_DROP_ENABLED", { ...input }, undefined, z.SetDragAndDropEnabledInputSchema, "global");
2
+ import { SetDragAndDropEnabledInputSchema } from "../schema/zod.js";
3
+ export const setDragAndDropEnabled = (input) => createAction("SET_DRAG_AND_DROP_ENABLED", { ...input }, undefined, SetDragAndDropEnabledInputSchema, "global");
@@ -0,0 +1,199 @@
1
+ import { z } from "zod";
2
+ import type { AppModuleDocument, AppModulePHState } from "./types.js";
3
+ /** Schema for validating the header object of a AppModule document */
4
+ export declare const AppModuleDocumentHeaderSchema: z.ZodObject<{
5
+ id: z.ZodString;
6
+ name: z.ZodString;
7
+ createdAtUtcIso: z.ZodString;
8
+ lastModifiedAtUtcIso: z.ZodString;
9
+ } & {
10
+ documentType: z.ZodLiteral<"powerhouse/app">;
11
+ }, "strip", z.ZodTypeAny, {
12
+ documentType: "powerhouse/app";
13
+ name: string;
14
+ id: string;
15
+ createdAtUtcIso: string;
16
+ lastModifiedAtUtcIso: string;
17
+ }, {
18
+ documentType: "powerhouse/app";
19
+ name: string;
20
+ id: string;
21
+ createdAtUtcIso: string;
22
+ lastModifiedAtUtcIso: string;
23
+ }>;
24
+ /** Schema for validating the state object of a AppModule document */
25
+ export declare const AppModulePHStateSchema: z.ZodObject<{} & {
26
+ global: z.ZodObject<Required<{
27
+ allowedDocumentTypes: z.ZodType<import("./types.js").Maybe<string[]>, any, import("./types.js").Maybe<string[]>>;
28
+ isDragAndDropEnabled: z.ZodType<boolean, any, boolean>;
29
+ name: z.ZodType<string, any, string>;
30
+ status: z.ZodType<import("./types.js").StatusType, any, import("./types.js").StatusType>;
31
+ }>, z.UnknownKeysParam, z.ZodTypeAny, {
32
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
33
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
34
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
35
+ name: import("./types.js").Scalars["String"]["output"];
36
+ }, {
37
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
38
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
39
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
40
+ name: import("./types.js").Scalars["String"]["output"];
41
+ }>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ global: {
44
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
45
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
46
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
47
+ name: import("./types.js").Scalars["String"]["output"];
48
+ };
49
+ }, {
50
+ global: {
51
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
52
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
53
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
54
+ name: import("./types.js").Scalars["String"]["output"];
55
+ };
56
+ }>;
57
+ export declare const AppModuleDocumentSchema: z.ZodObject<{
58
+ header: z.ZodObject<{
59
+ id: z.ZodString;
60
+ name: z.ZodString;
61
+ createdAtUtcIso: z.ZodString;
62
+ lastModifiedAtUtcIso: z.ZodString;
63
+ } & {
64
+ documentType: z.ZodLiteral<"powerhouse/app">;
65
+ }, "strip", z.ZodTypeAny, {
66
+ documentType: "powerhouse/app";
67
+ name: string;
68
+ id: string;
69
+ createdAtUtcIso: string;
70
+ lastModifiedAtUtcIso: string;
71
+ }, {
72
+ documentType: "powerhouse/app";
73
+ name: string;
74
+ id: string;
75
+ createdAtUtcIso: string;
76
+ lastModifiedAtUtcIso: string;
77
+ }>;
78
+ state: z.ZodObject<{} & {
79
+ global: z.ZodObject<Required<{
80
+ allowedDocumentTypes: z.ZodType<import("./types.js").Maybe<string[]>, any, import("./types.js").Maybe<string[]>>;
81
+ isDragAndDropEnabled: z.ZodType<boolean, any, boolean>;
82
+ name: z.ZodType<string, any, string>;
83
+ status: z.ZodType<import("./types.js").StatusType, any, import("./types.js").StatusType>;
84
+ }>, z.UnknownKeysParam, z.ZodTypeAny, {
85
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
86
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
87
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
88
+ name: import("./types.js").Scalars["String"]["output"];
89
+ }, {
90
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
91
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
92
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
93
+ name: import("./types.js").Scalars["String"]["output"];
94
+ }>;
95
+ }, "strip", z.ZodTypeAny, {
96
+ global: {
97
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
98
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
99
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
100
+ name: import("./types.js").Scalars["String"]["output"];
101
+ };
102
+ }, {
103
+ global: {
104
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
105
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
106
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
107
+ name: import("./types.js").Scalars["String"]["output"];
108
+ };
109
+ }>;
110
+ initialState: z.ZodObject<{} & {
111
+ global: z.ZodObject<Required<{
112
+ allowedDocumentTypes: z.ZodType<import("./types.js").Maybe<string[]>, any, import("./types.js").Maybe<string[]>>;
113
+ isDragAndDropEnabled: z.ZodType<boolean, any, boolean>;
114
+ name: z.ZodType<string, any, string>;
115
+ status: z.ZodType<import("./types.js").StatusType, any, import("./types.js").StatusType>;
116
+ }>, z.UnknownKeysParam, z.ZodTypeAny, {
117
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
118
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
119
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
120
+ name: import("./types.js").Scalars["String"]["output"];
121
+ }, {
122
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
123
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
124
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
125
+ name: import("./types.js").Scalars["String"]["output"];
126
+ }>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ global: {
129
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
130
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
131
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
132
+ name: import("./types.js").Scalars["String"]["output"];
133
+ };
134
+ }, {
135
+ global: {
136
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
137
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
138
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
139
+ name: import("./types.js").Scalars["String"]["output"];
140
+ };
141
+ }>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ header: {
144
+ documentType: "powerhouse/app";
145
+ name: string;
146
+ id: string;
147
+ createdAtUtcIso: string;
148
+ lastModifiedAtUtcIso: string;
149
+ };
150
+ state: {
151
+ global: {
152
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
153
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
154
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
155
+ name: import("./types.js").Scalars["String"]["output"];
156
+ };
157
+ };
158
+ initialState: {
159
+ global: {
160
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
161
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
162
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
163
+ name: import("./types.js").Scalars["String"]["output"];
164
+ };
165
+ };
166
+ }, {
167
+ header: {
168
+ documentType: "powerhouse/app";
169
+ name: string;
170
+ id: string;
171
+ createdAtUtcIso: string;
172
+ lastModifiedAtUtcIso: string;
173
+ };
174
+ state: {
175
+ global: {
176
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
177
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
178
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
179
+ name: import("./types.js").Scalars["String"]["output"];
180
+ };
181
+ };
182
+ initialState: {
183
+ global: {
184
+ status: import("./types.js").StatusType | `${import("./types.js").StatusType}`;
185
+ allowedDocumentTypes: import("./types.js").Maybe<Array<import("./types.js").Scalars["String"]["output"]>>;
186
+ isDragAndDropEnabled: import("./types.js").Scalars["Boolean"]["output"];
187
+ name: import("./types.js").Scalars["String"]["output"];
188
+ };
189
+ };
190
+ }>;
191
+ /** Simple helper function to check if a state object is a AppModule document state object */
192
+ export declare function isAppModuleState(state: unknown): state is AppModulePHState;
193
+ /** Simple helper function to assert that a document state object is a AppModule document state object */
194
+ export declare function assertIsAppModuleState(state: unknown): asserts state is AppModulePHState;
195
+ /** Simple helper function to check if a document is a AppModule document */
196
+ export declare function isAppModuleDocument(document: unknown): document is AppModuleDocument;
197
+ /** Simple helper function to assert that a document is a AppModule document */
198
+ export declare function assertIsAppModuleDocument(document: unknown): asserts document is AppModuleDocument;
199
+ //# sourceMappingURL=document-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-schema.d.ts","sourceRoot":"","sources":["../../../../document-models/app-module/gen/document-schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEtE,sEAAsE;AACtE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;EAExC,CAAC;AAEH,qEAAqE;AACrE,eAAO,MAAM,sBAAsB;;;;;;;;+DAmCoT,sCAAiB;8BAAqC,uCAAmB;cAAmB,sCAAkB;;;+DAA9G,sCAAiB;8BAAqC,uCAAmB;cAAmB,sCAAkB;;;;;+DAA9G,sCAAiB;8BAAqC,uCAAmB;cAAmB,sCAAkB;;;;;+DAA9G,sCAAiB;8BAAqC,uCAAmB;cAAmB,sCAAkB;;EAjCnc,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEA+BmT,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;mEAA9G,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;;;mEAA9G,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;;;mEAA9G,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;;;;;;;;;mEAA9G,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;mEAA9G,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;;;mEAA9G,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;;;mEAA9G,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;;;;;;;;;;;;mEAA9G,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;;;;mEAA9G,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;;;;;;;;;;;;mEAA9G,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;;;;mEAA9G,sCAAiB;kCAAqC,uCAAmB;kBAAmB,sCAAkB;;;EA3Bnc,CAAC;AAEH,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE1E;AAED,yGAAyG;AACzG,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,KAAK,IAAI,gBAAgB,CAEnC;AAED,4EAA4E;AAC5E,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,iBAAiB,CAE/B;AAED,+EAA+E;AAC/E,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,IAAI,iBAAiB,CAEvC"}
@@ -0,0 +1,33 @@
1
+ import { BaseDocumentHeaderSchema, BaseDocumentStateSchema, } from "document-model";
2
+ import { z } from "zod";
3
+ import { appModuleDocumentType } from "./document-type.js";
4
+ import { AppModuleStateSchema } from "./schema/zod.js";
5
+ /** Schema for validating the header object of a AppModule document */
6
+ export const AppModuleDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({
7
+ documentType: z.literal(appModuleDocumentType),
8
+ });
9
+ /** Schema for validating the state object of a AppModule document */
10
+ export const AppModulePHStateSchema = BaseDocumentStateSchema.extend({
11
+ global: AppModuleStateSchema(),
12
+ });
13
+ export const AppModuleDocumentSchema = z.object({
14
+ header: AppModuleDocumentHeaderSchema,
15
+ state: AppModulePHStateSchema,
16
+ initialState: AppModulePHStateSchema,
17
+ });
18
+ /** Simple helper function to check if a state object is a AppModule document state object */
19
+ export function isAppModuleState(state) {
20
+ return AppModulePHStateSchema.safeParse(state).success;
21
+ }
22
+ /** Simple helper function to assert that a document state object is a AppModule document state object */
23
+ export function assertIsAppModuleState(state) {
24
+ AppModulePHStateSchema.parse(state);
25
+ }
26
+ /** Simple helper function to check if a document is a AppModule document */
27
+ export function isAppModuleDocument(document) {
28
+ return AppModuleDocumentSchema.safeParse(document).success;
29
+ }
30
+ /** Simple helper function to assert that a document is a AppModule document */
31
+ export function assertIsAppModuleDocument(document) {
32
+ AppModuleDocumentSchema.parse(document);
33
+ }
@@ -0,0 +1,2 @@
1
+ export declare const appModuleDocumentType = "powerhouse/app";
2
+ //# sourceMappingURL=document-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-type.d.ts","sourceRoot":"","sources":["../../../../document-models/app-module/gen/document-type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,mBAAmB,CAAC"}
@@ -0,0 +1 @@
1
+ export const appModuleDocumentType = "powerhouse/app";
@@ -1,6 +1,13 @@
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 { createAppModuleDocument, 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";
12
+ export * from "./dnd-operations/operations.js";
6
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../document-models/app-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,uBAAuB,EACvB,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../document-models/app-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,uBAAuB,EACvB,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;AAChD,cAAc,gCAAgC,CAAC"}
@@ -1,5 +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 { createAppModuleDocument, 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";
12
+ export * from "./dnd-operations/operations.js";
@@ -1,5 +1,3 @@
1
- import type { StateReducer } from "document-model";
2
- import type { AppModulePHState } from "./types.js";
3
- export declare const stateReducer: StateReducer<AppModulePHState>;
1
+ import type { AppModulePHState } from "@powerhousedao/vetra/document-models/app-module";
4
2
  export declare const reducer: import("document-model").Reducer<AppModulePHState>;
5
3
  //# sourceMappingURL=reducer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/app-module/gen/reducer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMnD,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,gBAAgB,CAmEvD,CAAC;AAEF,eAAO,MAAM,OAAO,oDAAgD,CAAC"}
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/app-module/gen/reducer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAmFxF,eAAO,MAAM,OAAO,oDAAgD,CAAC"}
@@ -1,35 +1,35 @@
1
1
  import { isDocumentAction, createReducer } from "document-model/core";
2
- import { z } from "./types.js";
3
- import { reducer as BaseOperationsReducer } from "../src/reducers/base-operations.js";
4
- import { reducer as DndOperationsReducer } from "../src/reducers/dnd-operations.js";
5
- export const stateReducer = (state, action, dispatch) => {
2
+ import { appModuleBaseOperationsOperations } from "../src/reducers/base-operations.js";
3
+ import { appModuleDndOperationsOperations } from "../src/reducers/dnd-operations.js";
4
+ import { SetAppNameInputSchema, SetAppStatusInputSchema, AddDocumentTypeInputSchema, RemoveDocumentTypeInputSchema, SetDocumentTypesInputSchema, SetDragAndDropEnabledInputSchema, } from "./schema/zod.js";
5
+ const stateReducer = (state, action, dispatch) => {
6
6
  if (isDocumentAction(action)) {
7
7
  return state;
8
8
  }
9
9
  switch (action.type) {
10
10
  case "SET_APP_NAME":
11
- z.SetAppNameInputSchema().parse(action.input);
12
- BaseOperationsReducer.setAppNameOperation(state[action.scope], action, dispatch);
11
+ SetAppNameInputSchema().parse(action.input);
12
+ appModuleBaseOperationsOperations.setAppNameOperation(state[action.scope], action, dispatch);
13
13
  break;
14
14
  case "SET_APP_STATUS":
15
- z.SetAppStatusInputSchema().parse(action.input);
16
- BaseOperationsReducer.setAppStatusOperation(state[action.scope], action, dispatch);
15
+ SetAppStatusInputSchema().parse(action.input);
16
+ appModuleBaseOperationsOperations.setAppStatusOperation(state[action.scope], action, dispatch);
17
17
  break;
18
18
  case "ADD_DOCUMENT_TYPE":
19
- z.AddDocumentTypeInputSchema().parse(action.input);
20
- BaseOperationsReducer.addDocumentTypeOperation(state[action.scope], action, dispatch);
19
+ AddDocumentTypeInputSchema().parse(action.input);
20
+ appModuleBaseOperationsOperations.addDocumentTypeOperation(state[action.scope], action, dispatch);
21
21
  break;
22
22
  case "REMOVE_DOCUMENT_TYPE":
23
- z.RemoveDocumentTypeInputSchema().parse(action.input);
24
- BaseOperationsReducer.removeDocumentTypeOperation(state[action.scope], action, dispatch);
23
+ RemoveDocumentTypeInputSchema().parse(action.input);
24
+ appModuleBaseOperationsOperations.removeDocumentTypeOperation(state[action.scope], action, dispatch);
25
25
  break;
26
26
  case "SET_DOCUMENT_TYPES":
27
- z.SetDocumentTypesInputSchema().parse(action.input);
28
- BaseOperationsReducer.setDocumentTypesOperation(state[action.scope], action, dispatch);
27
+ SetDocumentTypesInputSchema().parse(action.input);
28
+ appModuleBaseOperationsOperations.setDocumentTypesOperation(state[action.scope], action, dispatch);
29
29
  break;
30
30
  case "SET_DRAG_AND_DROP_ENABLED":
31
- z.SetDragAndDropEnabledInputSchema().parse(action.input);
32
- DndOperationsReducer.setDragAndDropEnabledOperation(state[action.scope], action, dispatch);
31
+ SetDragAndDropEnabledInputSchema().parse(action.input);
32
+ appModuleDndOperationsOperations.setDragAndDropEnabledOperation(state[action.scope], action, dispatch);
33
33
  break;
34
34
  default:
35
35
  return state;
@@ -1,3 +1,3 @@
1
1
  export * from "./types.js";
2
- export * as z from "./zod.js";
2
+ export * from "./zod.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../document-models/app-module/gen/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../document-models/app-module/gen/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
@@ -1,2 +1,2 @@
1
1
  export * from "./types.js";
2
- export * as z from "./zod.js";
2
+ export * from "./zod.js";
@@ -1,13 +1,12 @@
1
1
  import type { PHDocument, PHBaseState } from "document-model";
2
2
  import type { AppModuleAction } from "./actions.js";
3
3
  import type { AppModuleState as AppModuleGlobalState } from "./schema/types.js";
4
- export { z } from "./schema/index.js";
5
- export * from "./schema/types.js";
6
4
  type AppModuleLocalState = Record<PropertyKey, never>;
7
5
  type AppModulePHState = PHBaseState & {
8
6
  global: AppModuleGlobalState;
9
7
  local: AppModuleLocalState;
10
8
  };
11
9
  type AppModuleDocument = PHDocument<AppModulePHState>;
10
+ export * from "./schema/types.js";
12
11
  export type { AppModuleGlobalState, AppModuleLocalState, AppModulePHState, AppModuleAction, AppModuleDocument, };
13
12
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../document-models/app-module/gen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,KAAK,mBAAmB,GAAG,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AACtD,KAAK,gBAAgB,GAAG,WAAW,GAAG;IACpC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,KAAK,EAAE,mBAAmB,CAAC;CAC5B,CAAC;AACF,KAAK,iBAAiB,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAEtD,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,GAClB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../document-models/app-module/gen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,IAAI,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEhF,KAAK,mBAAmB,GAAG,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AACtD,KAAK,gBAAgB,GAAG,WAAW,GAAG;IACpC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,KAAK,EAAE,mBAAmB,CAAC;CAC5B,CAAC;AACF,KAAK,iBAAiB,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAEtD,cAAc,mBAAmB,CAAC;AAElC,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,GAClB,CAAC"}
@@ -1,2 +1 @@
1
- export { z } from "./schema/index.js";
2
1
  export * from "./schema/types.js";
@@ -3,10 +3,13 @@ import type { AppModuleGlobalState, AppModuleLocalState } from "./types.js";
3
3
  import type { AppModulePHState } from "./types.js";
4
4
  export declare const initialGlobalState: AppModuleGlobalState;
5
5
  export declare const initialLocalState: AppModuleLocalState;
6
- declare const utils: DocumentModelUtils<AppModulePHState>;
6
+ export declare const utils: DocumentModelUtils<AppModulePHState>;
7
7
  export declare const createDocument: import("document-model").CreateDocument<AppModulePHState>;
8
8
  export declare const createState: import("document-model").CreateState<AppModulePHState>;
9
9
  export declare const saveToFileHandle: import("document-model").SaveToFileHandle;
10
10
  export declare const loadFromInput: import("document-model").LoadFromInput<AppModulePHState>;
11
- export default utils;
11
+ export declare const isStateOfType: import("document-model").IsStateOfType<AppModulePHState>;
12
+ export declare const assertIsStateOfType: import("document-model").AssertIsStateOfType<AppModulePHState>;
13
+ export declare const isDocumentOfType: import("document-model").IsDocumentOfType<AppModulePHState>;
14
+ export declare const assertIsDocumentOfType: import("document-model").AssertIsDocumentOfType<AppModulePHState>;
12
15
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../document-models/app-module/gen/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAQzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGnD,eAAO,MAAM,kBAAkB,EAAE,oBAKhC,CAAC;AACF,eAAO,MAAM,iBAAiB,EAAE,mBAAwB,CAAC;AAEzD,QAAA,MAAM,KAAK,EAAE,kBAAkB,CAAC,gBAAgB,CAyB/C,CAAC;AAEF,eAAO,MAAM,cAAc,2DAAuB,CAAC;AACnD,eAAO,MAAM,WAAW,wDAAoB,CAAC;AAC7C,eAAO,MAAM,gBAAgB,2CAAyB,CAAC;AACvD,eAAO,MAAM,aAAa,0DAAsB,CAAC;AAEjD,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../document-models/app-module/gen/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAQzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAUnD,eAAO,MAAM,kBAAkB,EAAE,oBAKhC,CAAC;AACF,eAAO,MAAM,iBAAiB,EAAE,mBAAwB,CAAC;AAEzD,eAAO,MAAM,KAAK,EAAE,kBAAkB,CAAC,gBAAgB,CAqCtD,CAAC;AAEF,eAAO,MAAM,cAAc,2DAAuB,CAAC;AACnD,eAAO,MAAM,WAAW,wDAAoB,CAAC;AAC7C,eAAO,MAAM,gBAAgB,2CAAyB,CAAC;AACvD,eAAO,MAAM,aAAa,0DAAsB,CAAC;AACjD,eAAO,MAAM,aAAa,0DAAsB,CAAC;AACjD,eAAO,MAAM,mBAAmB,gEAA4B,CAAC;AAC7D,eAAO,MAAM,gBAAgB,6DAAyB,CAAC;AACvD,eAAO,MAAM,sBAAsB,mEAA+B,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { baseCreateDocument, baseSaveToFileHandle, baseLoadFromInput, defaultBaseState, generateId, } from "document-model/core";
2
2
  import { reducer } from "./reducer.js";
3
+ import { appModuleDocumentType } from "./document-type.js";
4
+ import { isAppModuleDocument, assertIsAppModuleDocument, isAppModuleState, assertIsAppModuleState, } from "./document-schema.js";
3
5
  export const initialGlobalState = {
4
6
  name: "",
5
7
  status: "DRAFT",
@@ -7,7 +9,7 @@ export const initialGlobalState = {
7
9
  isDragAndDropEnabled: true,
8
10
  };
9
11
  export const initialLocalState = {};
10
- const utils = {
12
+ export const utils = {
11
13
  fileExtension: ".phdm",
12
14
  createState(state) {
13
15
  return {
@@ -18,7 +20,7 @@ const utils = {
18
20
  },
19
21
  createDocument(state) {
20
22
  const document = baseCreateDocument(utils.createState, state);
21
- document.header.documentType = "powerhouse/app";
23
+ document.header.documentType = appModuleDocumentType;
22
24
  // for backwards compatibility, but this is NOT a valid signed document id
23
25
  document.header.id = generateId();
24
26
  return document;
@@ -29,9 +31,24 @@ const utils = {
29
31
  loadFromInput(input) {
30
32
  return baseLoadFromInput(input, reducer);
31
33
  },
34
+ isStateOfType(state) {
35
+ return isAppModuleState(state);
36
+ },
37
+ assertIsStateOfType(state) {
38
+ return assertIsAppModuleState(state);
39
+ },
40
+ isDocumentOfType(document) {
41
+ return isAppModuleDocument(document);
42
+ },
43
+ assertIsDocumentOfType(document) {
44
+ return assertIsAppModuleDocument(document);
45
+ },
32
46
  };
33
47
  export const createDocument = utils.createDocument;
34
48
  export const createState = utils.createState;
35
49
  export const saveToFileHandle = utils.saveToFileHandle;
36
50
  export const loadFromInput = utils.loadFromInput;
37
- export default utils;
51
+ export const isStateOfType = utils.isStateOfType;
52
+ export const assertIsStateOfType = utils.assertIsStateOfType;
53
+ export const isDocumentOfType = utils.isDocumentOfType;
54
+ export const assertIsDocumentOfType = utils.assertIsDocumentOfType;
@@ -0,0 +1,11 @@
1
+ import type { DocumentDispatch } from "@powerhousedao/reactor-browser";
2
+ import type { AppModuleDocument, AppModuleAction } from "@powerhousedao/vetra/document-models/app-module";
3
+ /** Hook to get a AppModule document by its id */
4
+ export declare function useAppModuleDocumentById(documentId: string | null | undefined): [AppModuleDocument, DocumentDispatch<AppModuleAction>] | [undefined, undefined];
5
+ /** Hook to get the selected AppModule document */
6
+ export declare function useSelectedAppModuleDocument(): [AppModuleDocument, DocumentDispatch<AppModuleAction>] | [undefined, undefined];
7
+ /** Hook to get all AppModule documents in the selected drive */
8
+ export declare function useAppModuleDocumentsInSelectedDrive(): AppModuleDocument[] | undefined;
9
+ /** Hook to get all AppModule documents in the selected folder */
10
+ export declare function useAppModuleDocumentsInSelectedFolder(): AppModuleDocument[] | undefined;
11
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../document-models/app-module/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAOvE,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,iDAAiD,CAAC;AAGzD,iDAAiD;AACjD,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAEnC,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC,GACtD,CAAC,SAAS,EAAE,SAAS,CAAC,CAIzB;AAED,kDAAkD;AAClD,wBAAgB,4BAA4B,IACxC,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC,GACtD,CAAC,SAAS,EAAE,SAAS,CAAC,CAIzB;AAED,gEAAgE;AAChE,wBAAgB,oCAAoC,oCAGnD;AAED,iEAAiE;AACjE,wBAAgB,qCAAqC,oCAGpD"}