@antelopejs/dms 0.25.8-next.1174.ge77e0bd → 0.25.8

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 (343) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +2 -2
  3. package/data/mockup-example/spec.json +0 -11
  4. package/data/mockup-spec.schema.json +16 -399
  5. package/dist/e2e/index.d.mts +1 -2
  6. package/dist/implementations/dms-builder/engine/table-view-settings.js +33 -9
  7. package/dist/implementations/dms-builder/engine/table-view-settings.js.map +1 -1
  8. package/dist/index.js +0 -2
  9. package/dist/index.js.map +1 -1
  10. package/dist/mcp/index.d.ts +0 -2
  11. package/dist/mcp/index.js +0 -9
  12. package/dist/mcp/index.js.map +1 -1
  13. package/dist/mcp/page-verify/index.d.ts +0 -15
  14. package/dist/mcp/page-verify/index.js +6 -16
  15. package/dist/mcp/page-verify/index.js.map +1 -1
  16. package/dist/mcp/page-verify/mockup.d.ts +1 -3
  17. package/dist/mcp/page-verify/mockup.js +1 -5
  18. package/dist/mcp/page-verify/mockup.js.map +1 -1
  19. package/dist/mcp/page-verify/page-probe.d.ts +0 -5
  20. package/dist/mcp/page-verify/page-probe.js +0 -2
  21. package/dist/mcp/page-verify/page-probe.js.map +1 -1
  22. package/dist/mcp/page-verify/playwright.d.ts +4 -22
  23. package/dist/mcp/page-verify/playwright.js.map +1 -1
  24. package/dist/mcp/page-verify/report.d.ts +0 -1
  25. package/dist/mcp/tools/mockup-read-spec.js +3 -2
  26. package/dist/mcp/tools/mockup-read-spec.js.map +1 -1
  27. package/dist/mcp/tools/mockup.js +0 -4
  28. package/dist/mcp/tools/mockup.js.map +1 -1
  29. package/dist/mcp/tools/page-verify.d.ts +0 -1
  30. package/dist/mcp/tools/page-verify.js +2 -6
  31. package/dist/mcp/tools/page-verify.js.map +1 -1
  32. package/dist/mockup/annotations.js +2 -2
  33. package/dist/mockup/annotations.js.map +1 -1
  34. package/dist/mockup/apply-notes.js +1 -1
  35. package/dist/mockup/apply-notes.js.map +1 -1
  36. package/dist/mockup/compile.d.ts +10 -6
  37. package/dist/mockup/compile.js +290 -31
  38. package/dist/mockup/compile.js.map +1 -1
  39. package/dist/mockup/files.d.ts +1 -2
  40. package/dist/mockup/files.js +1 -2
  41. package/dist/mockup/files.js.map +1 -1
  42. package/dist/mockup/fixture-answers.d.ts +0 -1
  43. package/dist/mockup/fixture-answers.js +1 -1
  44. package/dist/mockup/fixture-answers.js.map +1 -1
  45. package/dist/mockup/fixtures.d.ts +27 -0
  46. package/dist/mockup/fixtures.js +111 -0
  47. package/dist/mockup/fixtures.js.map +1 -1
  48. package/dist/mockup/from-page.js +9 -2
  49. package/dist/mockup/from-page.js.map +1 -1
  50. package/dist/mockup/generate.js +1 -4
  51. package/dist/mockup/generate.js.map +1 -1
  52. package/dist/mockup/history-routes.d.ts +4 -2
  53. package/dist/mockup/history-routes.js +36 -27
  54. package/dist/mockup/history-routes.js.map +1 -1
  55. package/dist/mockup/history.js +1 -2
  56. package/dist/mockup/history.js.map +1 -1
  57. package/dist/mockup/index.d.ts +0 -10
  58. package/dist/mockup/index.js +0 -10
  59. package/dist/mockup/index.js.map +1 -1
  60. package/dist/mockup/json-schema-layout.d.ts +0 -1
  61. package/dist/mockup/json-schema-layout.js +2 -95
  62. package/dist/mockup/json-schema-layout.js.map +1 -1
  63. package/dist/mockup/json-schema.js +19 -40
  64. package/dist/mockup/json-schema.js.map +1 -1
  65. package/dist/mockup/manage-routes.d.ts +1 -3
  66. package/dist/mockup/manage-routes.js +1 -38
  67. package/dist/mockup/manage-routes.js.map +1 -1
  68. package/dist/mockup/manage.js +1 -1
  69. package/dist/mockup/manage.js.map +1 -1
  70. package/dist/mockup/model.d.ts +100 -137
  71. package/dist/mockup/model.js +86 -102
  72. package/dist/mockup/model.js.map +1 -1
  73. package/dist/mockup/modules.d.ts +9 -6
  74. package/dist/mockup/modules.js +24 -105
  75. package/dist/mockup/modules.js.map +1 -1
  76. package/dist/mockup/presence-board.js +1 -1
  77. package/dist/mockup/presence-board.js.map +1 -1
  78. package/dist/mockup/presence-routes.js +2 -2
  79. package/dist/mockup/presence-routes.js.map +1 -1
  80. package/dist/mockup/refusals.d.ts +0 -5
  81. package/dist/mockup/refusals.js +0 -16
  82. package/dist/mockup/refusals.js.map +1 -1
  83. package/dist/mockup/routes.d.ts +5 -3
  84. package/dist/mockup/routes.js +162 -19
  85. package/dist/mockup/routes.js.map +1 -1
  86. package/dist/mockup/row-filters.d.ts +8 -0
  87. package/dist/mockup/row-filters.js +107 -0
  88. package/dist/mockup/row-filters.js.map +1 -0
  89. package/dist/mockup/sketch-limits.d.ts +0 -1
  90. package/dist/mockup/sketch-limits.js +1 -2
  91. package/dist/mockup/sketch-limits.js.map +1 -1
  92. package/dist/mockup/sketch.d.ts +2 -2
  93. package/dist/mockup/sketch.js +1 -2
  94. package/dist/mockup/sketch.js.map +1 -1
  95. package/dist/mockup/source-routes.d.ts +4 -5
  96. package/dist/mockup/source-routes.js +17 -26
  97. package/dist/mockup/source-routes.js.map +1 -1
  98. package/dist/mockup/source.js +1 -2
  99. package/dist/mockup/source.js.map +1 -1
  100. package/dist/mockup/store.d.ts +37 -16
  101. package/dist/mockup/store.js +200 -85
  102. package/dist/mockup/store.js.map +1 -1
  103. package/dist/mockup/table-archive.d.ts +1 -0
  104. package/dist/mockup/table-archive.js +16 -0
  105. package/dist/mockup/table-archive.js.map +1 -1
  106. package/e2e/index.mjs +2 -3
  107. package/frontend-vue/eslint-globals.generated.mjs +38 -40
  108. package/frontend-vue/layers/dms-core/app/build/utils/asyncDataScope.ts +31 -3
  109. package/frontend-vue/layers/dms-core/app/composables/auth/useAuthFetch.ts +2 -8
  110. package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +0 -3
  111. package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +0 -3
  112. package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +30 -110
  113. package/frontend-vue/layers/dms-layout/app/build/components/layout/MockupSidebarMenu.vue +6 -21
  114. package/frontend-vue/layers/dms-layout/app/build/components/layout/SidebarUserMenu.vue +7 -19
  115. package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupMenu.ts +9 -79
  116. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsNav.vue +4 -17
  117. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shell/SettingsShell.vue +0 -12
  118. package/frontend-vue/layers/dms-layout/app/build/composables/settings/useSettingsNavigation.ts +0 -39
  119. package/frontend-vue/layers/dms-layout/app/build/mockups/created-mockups.ts +2 -12
  120. package/frontend-vue/layers/dms-layout/app/build/mockups/created-toast.ts +1 -9
  121. package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +6 -53
  122. package/frontend-vue/layers/dms-layout/app/theme/actions.ts +7 -11
  123. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +5 -31
  124. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupCanvasChrome.vue +1 -1
  125. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModules.vue +47 -0
  126. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverview.vue +33 -59
  127. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSlot.vue +12 -58
  128. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/{MockupZoomControls.vue → MockupOverviewZoom.vue} +15 -23
  129. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPagesList.vue +0 -21
  130. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinCard.vue +1 -1
  131. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPinLayer.vue +1 -1
  132. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +9 -77
  133. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +45 -130
  134. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewCapture.ts +3 -70
  135. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +4 -44
  136. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockInspector.ts +2 -14
  137. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +36 -256
  138. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupEditing.ts +1 -13
  139. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameSize.ts +5 -10
  140. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupOverview.ts +23 -50
  141. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageFrame.ts +29 -82
  142. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPins.ts +1 -1
  143. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRealData.ts +3 -10
  144. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupRoutePage.ts +14 -60
  145. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSession.ts +3 -8
  146. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +2 -6
  147. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupToolModes.ts +7 -5
  148. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerPages.ts +8 -29
  149. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerShortcuts.ts +2 -13
  150. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useOverviewCaptures.ts +10 -39
  151. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +0 -29
  152. package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +3 -37
  153. package/frontend-vue/layers/dms-ui/app/build/mockups/manage.ts +1 -20
  154. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewChannel.ts +8 -1
  155. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +103 -167
  156. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewRects.ts +0 -22
  157. package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +173 -75
  158. package/frontend-vue/layers/dms-ui/app/build/utils/mockupCaptures.ts +9 -118
  159. package/frontend-vue/layers/dms-ui/app/build/utils/mockupFrame.ts +8 -123
  160. package/frontend-vue/layers/dms-ui/app/build/utils/mockupLinks.ts +2 -6
  161. package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverview.ts +3 -21
  162. package/frontend-vue/layers/dms-ui/app/build/utils/mockupPageTree.ts +0 -15
  163. package/frontend-vue/layers/dms-ui/app/build/utils/mockupPins.ts +8 -6
  164. package/frontend-vue/layers/dms-ui/app/build/utils/mockupRealData.ts +5 -18
  165. package/frontend-vue/layers/dms-ui/app/build/utils/mockupShortcuts.ts +6 -17
  166. package/frontend-vue/layers/dms-ui/app/build/utils/mockupStream.ts +2 -17
  167. package/frontend-vue/layers/dms-ui/app/build/utils/mockupVersions.ts +7 -2
  168. package/frontend-vue/layers/dms-ui/app/build/utils/previewFixturesOnly.ts +0 -8
  169. package/frontend-vue/layers/dms-ui/app/build/utils/previewPageLayout.ts +6 -108
  170. package/frontend-vue/layers/dms-ui/app/build/utils/previewPageQuery.ts +1 -5
  171. package/frontend-vue/layers/dms-ui/app/build/utils/sketch.ts +10 -40
  172. package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +6 -23
  173. package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +0 -2
  174. package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +4 -53
  175. package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +4 -53
  176. package/frontend-vue/package.json +2 -2
  177. package/package.json +5 -6
  178. package/E2E.md +0 -138
  179. package/dist/mcp/mockup-export/capture.d.ts +0 -19
  180. package/dist/mcp/mockup-export/capture.js +0 -99
  181. package/dist/mcp/mockup-export/capture.js.map +0 -1
  182. package/dist/mcp/mockup-export/document.d.ts +0 -4
  183. package/dist/mcp/mockup-export/document.js +0 -199
  184. package/dist/mcp/mockup-export/document.js.map +0 -1
  185. package/dist/mcp/mockup-export/index.d.ts +0 -20
  186. package/dist/mcp/mockup-export/index.js +0 -110
  187. package/dist/mcp/mockup-export/index.js.map +0 -1
  188. package/dist/mcp/mockup-export/jobs.d.ts +0 -32
  189. package/dist/mcp/mockup-export/jobs.js +0 -49
  190. package/dist/mcp/mockup-export/jobs.js.map +0 -1
  191. package/dist/mcp/mockup-export/plan.d.ts +0 -78
  192. package/dist/mcp/mockup-export/plan.js +0 -292
  193. package/dist/mcp/mockup-export/plan.js.map +0 -1
  194. package/dist/mcp/mockup-export/route.d.ts +0 -23
  195. package/dist/mcp/mockup-export/route.js +0 -91
  196. package/dist/mcp/mockup-export/route.js.map +0 -1
  197. package/dist/mcp/page-verify/modules.d.ts +0 -8
  198. package/dist/mcp/page-verify/modules.js +0 -49
  199. package/dist/mcp/page-verify/modules.js.map +0 -1
  200. package/dist/mcp/tools/mockup-export-pdf.d.ts +0 -1
  201. package/dist/mcp/tools/mockup-export-pdf.js +0 -69
  202. package/dist/mcp/tools/mockup-export-pdf.js.map +0 -1
  203. package/dist/mcp/tools/mockup-module-catalog.d.ts +0 -1
  204. package/dist/mcp/tools/mockup-module-catalog.js +0 -36
  205. package/dist/mcp/tools/mockup-module-catalog.js.map +0 -1
  206. package/dist/mockup/compile-layouts.d.ts +0 -5
  207. package/dist/mockup/compile-layouts.js +0 -74
  208. package/dist/mockup/compile-layouts.js.map +0 -1
  209. package/dist/mockup/compile-nodes.d.ts +0 -11
  210. package/dist/mockup/compile-nodes.js +0 -119
  211. package/dist/mockup/compile-nodes.js.map +0 -1
  212. package/dist/mockup/compile-pages.d.ts +0 -18
  213. package/dist/mockup/compile-pages.js +0 -189
  214. package/dist/mockup/compile-pages.js.map +0 -1
  215. package/dist/mockup/create.d.ts +0 -16
  216. package/dist/mockup/create.js +0 -78
  217. package/dist/mockup/create.js.map +0 -1
  218. package/dist/mockup/created-watch.d.ts +0 -18
  219. package/dist/mockup/created-watch.js +0 -110
  220. package/dist/mockup/created-watch.js.map +0 -1
  221. package/dist/mockup/entities.d.ts +0 -20
  222. package/dist/mockup/entities.js +0 -213
  223. package/dist/mockup/entities.js.map +0 -1
  224. package/dist/mockup/etag.d.ts +0 -1
  225. package/dist/mockup/etag.js +0 -10
  226. package/dist/mockup/etag.js.map +0 -1
  227. package/dist/mockup/extensions.d.ts +0 -18
  228. package/dist/mockup/extensions.js +0 -61
  229. package/dist/mockup/extensions.js.map +0 -1
  230. package/dist/mockup/fixture-batch.d.ts +0 -21
  231. package/dist/mockup/fixture-batch.js +0 -111
  232. package/dist/mockup/fixture-batch.js.map +0 -1
  233. package/dist/mockup/fixture-routes.d.ts +0 -21
  234. package/dist/mockup/fixture-routes.js +0 -136
  235. package/dist/mockup/fixture-routes.js.map +0 -1
  236. package/dist/mockup/json-schema-entities.d.ts +0 -5
  237. package/dist/mockup/json-schema-entities.js +0 -141
  238. package/dist/mockup/json-schema-entities.js.map +0 -1
  239. package/dist/mockup/json.d.ts +0 -8
  240. package/dist/mockup/json.js +0 -20
  241. package/dist/mockup/json.js.map +0 -1
  242. package/dist/mockup/layout-model.d.ts +0 -156
  243. package/dist/mockup/layout-model.js +0 -96
  244. package/dist/mockup/layout-model.js.map +0 -1
  245. package/dist/mockup/layouts.d.ts +0 -9
  246. package/dist/mockup/layouts.js +0 -40
  247. package/dist/mockup/layouts.js.map +0 -1
  248. package/dist/mockup/module-manifests.d.ts +0 -99
  249. package/dist/mockup/module-manifests.js +0 -95
  250. package/dist/mockup/module-manifests.js.map +0 -1
  251. package/dist/mockup/module-states.d.ts +0 -10
  252. package/dist/mockup/module-states.js +0 -85
  253. package/dist/mockup/module-states.js.map +0 -1
  254. package/dist/mockup/modules-schema.d.ts +0 -2
  255. package/dist/mockup/modules-schema.js +0 -39
  256. package/dist/mockup/modules-schema.js.map +0 -1
  257. package/dist/mockup/page-capture-routes.d.ts +0 -19
  258. package/dist/mockup/page-capture-routes.js +0 -92
  259. package/dist/mockup/page-capture-routes.js.map +0 -1
  260. package/dist/mockup/page-captures.d.ts +0 -61
  261. package/dist/mockup/page-captures.js +0 -252
  262. package/dist/mockup/page-captures.js.map +0 -1
  263. package/dist/mockup/parse-spec.d.ts +0 -10
  264. package/dist/mockup/parse-spec.js +0 -62
  265. package/dist/mockup/parse-spec.js.map +0 -1
  266. package/dist/mockup/places.d.ts +0 -17
  267. package/dist/mockup/places.js +0 -75
  268. package/dist/mockup/places.js.map +0 -1
  269. package/dist/mockup/slug.d.ts +0 -3
  270. package/dist/mockup/slug.js +0 -7
  271. package/dist/mockup/slug.js.map +0 -1
  272. package/dist/mockup/state-patch.d.ts +0 -22
  273. package/dist/mockup/state-patch.js +0 -75
  274. package/dist/mockup/state-patch.js.map +0 -1
  275. package/dist/mockup/state.d.ts +0 -112
  276. package/dist/mockup/state.js +0 -22
  277. package/dist/mockup/state.js.map +0 -1
  278. package/dist/mockup/store-list.d.ts +0 -28
  279. package/dist/mockup/store-list.js +0 -89
  280. package/dist/mockup/store-list.js.map +0 -1
  281. package/dist/mockup/tenancy.d.ts +0 -19
  282. package/dist/mockup/tenancy.js +0 -73
  283. package/dist/mockup/tenancy.js.map +0 -1
  284. package/dist/mockup/tenant-rows.d.ts +0 -4
  285. package/dist/mockup/tenant-rows.js +0 -19
  286. package/dist/mockup/tenant-rows.js.map +0 -1
  287. package/frontend-vue/layers/dms-core/app/utils/localFetchAnswers.ts +0 -124
  288. package/frontend-vue/layers/dms-core/app/utils/textDigest.ts +0 -29
  289. package/frontend-vue/layers/dms-layout/app/build/components/layout/mockupWidgets.ts +0 -65
  290. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupDatabase.vue +0 -153
  291. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupEmptyState.vue +0 -23
  292. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupModuleStore.vue +0 -164
  293. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupOverviewSectionLabel.vue +0 -51
  294. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupReconnecting.vue +0 -17
  295. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTenantBanner.vue +0 -48
  296. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkspaceSwitcher.vue +0 -142
  297. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useFixtureBatches.ts +0 -154
  298. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupActivation.ts +0 -157
  299. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupDatabase.ts +0 -165
  300. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupFrameRender.ts +0 -126
  301. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPageZoom.ts +0 -138
  302. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupPdfExport.ts +0 -124
  303. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupTenancy.ts +0 -37
  304. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerActivation.ts +0 -56
  305. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupViewerExport.ts +0 -46
  306. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePersistedCaptures.ts +0 -151
  307. package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCreateModal.vue +0 -130
  308. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewNavigation.ts +0 -332
  309. package/frontend-vue/layers/dms-ui/app/build/utils/mockupActivation.ts +0 -100
  310. package/frontend-vue/layers/dms-ui/app/build/utils/mockupAnnotations.ts +0 -146
  311. package/frontend-vue/layers/dms-ui/app/build/utils/mockupEntities.ts +0 -80
  312. package/frontend-vue/layers/dms-ui/app/build/utils/mockupModuleNavigation.ts +0 -171
  313. package/frontend-vue/layers/dms-ui/app/build/utils/mockupModules.ts +0 -138
  314. package/frontend-vue/layers/dms-ui/app/build/utils/mockupOverviewSections.ts +0 -66
  315. package/frontend-vue/layers/dms-ui/app/build/utils/mockupSchema.ts +0 -177
  316. package/frontend-vue/layers/dms-ui/app/build/utils/mockupStatePatch.ts +0 -179
  317. package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenancy.ts +0 -143
  318. package/frontend-vue/layers/dms-ui/app/build/utils/mockupTenants.ts +0 -23
  319. package/frontend-vue/layers/dms-ui/app/build/utils/previewFixtureAnswers.ts +0 -156
  320. package/frontend-vue/layers/dms-ui/app/build/utils/previewRows.ts +0 -400
  321. package/frontend-vue/layers/dms-ui/app/build/utils/recordGuards.ts +0 -15
  322. package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupModuleStore.ts +0 -2
  323. package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupTenantBanner.ts +0 -2
  324. package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/MockupWorkspaceSwitcher.ts +0 -2
  325. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useFixtureBatches.ts +0 -1
  326. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupActivation.ts +0 -1
  327. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupOverview.ts +0 -1
  328. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupPdfExport.ts +0 -1
  329. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupRoutePage.ts +0 -1
  330. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupSession.ts +0 -1
  331. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupTenancy.ts +0 -1
  332. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/usePersistedCaptures.ts +0 -1
  333. package/frontend-vue/layers/dms-ui/app/entries/utils/json.ts +0 -1
  334. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupActivation.ts +0 -1
  335. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupAnnotations.ts +0 -1
  336. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupModuleNavigation.ts +0 -1
  337. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupOverviewSections.ts +0 -1
  338. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSchema.ts +0 -1
  339. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupStatePatch.ts +0 -1
  340. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenancy.ts +0 -1
  341. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupTenants.ts +0 -1
  342. package/frontend-vue/layers/dms-ui/app/entries/utils/previewFixtureAnswers.ts +0 -1
  343. package/frontend-vue/layers/dms-ui/app/entries/utils/previewRows.ts +0 -1
@@ -1,136 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.batchResponse = batchResponse;
16
- exports.registerFixtureRoutes = registerFixtureRoutes;
17
- const interface_api_1 = require("@antelopejs/interface-api");
18
- const etag_1 = require("./etag");
19
- const fixtures_1 = require("./fixtures");
20
- const model_1 = require("./model");
21
- const owner_controller_1 = require("./owner-controller");
22
- const refusals_1 = require("./refusals");
23
- const HTTP_OK = 200;
24
- const HTTP_NOT_MODIFIED = 304;
25
- const HTTP_BAD_REQUEST = 400;
26
- const ARCHIVE_CHANGES = new Set(["archive", "restore"]);
27
- const PREFIXES = [":name/", ":name/tenants/:tenant/"];
28
- function rowOf(rows, query) {
29
- const id = query.get("id");
30
- return id === null
31
- ? undefined
32
- : (0, fixtures_1.findRow)(rows, id, query.get("key") ?? undefined);
33
- }
34
- function tenantOf(context) {
35
- const raw = context.routeParameters.tenant;
36
- if (raw === undefined)
37
- return undefined;
38
- try {
39
- return decodeURIComponent(raw);
40
- }
41
- catch {
42
- throw (0, refusals_1.notFound)("route");
43
- }
44
- }
45
- async function readFixture(store, context) {
46
- const { name, page, key } = context.routeParameters;
47
- const fixture = await store.fixture((0, refusals_1.nameOf)(name ?? ""), (0, refusals_1.checkParam)(model_1.pageIdSchema, page ?? "", "page"), (0, refusals_1.checkParam)(model_1.fixtureKeySchema, key ?? "", "fixture"), tenantOf(context));
48
- if (fixture === undefined)
49
- throw (0, refusals_1.notFound)("fixture");
50
- return fixture;
51
- }
52
- async function readRows(store, context) {
53
- const rows = (0, fixtures_1.parseRows)(await readFixture(store, context));
54
- if (!rows)
55
- throw (0, refusals_1.notFound)("rows");
56
- return rows;
57
- }
58
- function batchResponse(context, answer) {
59
- const isCurrent = (0, etag_1.etagMatches)(context.rawRequest.headers["if-none-match"], answer.etag);
60
- const result = isCurrent
61
- ? new interface_api_1.HTTPResult(HTTP_NOT_MODIFIED)
62
- : new interface_api_1.HTTPResult(HTTP_OK, answer.body, "application/json");
63
- result.addHeader("ETag", answer.etag);
64
- result.addHeader("Cache-Control", "private, no-cache");
65
- return result;
66
- }
67
- function fixtureController(store, prefix) {
68
- const fixtures = `${prefix}pages/:page/fixtures/:key`;
69
- class MockupFixtureController extends (0, interface_api_1.Controller)(fixtures_1.MOCKUP_API, owner_controller_1.MockupOwnerController) {
70
- async batch(context) {
71
- await this.assertOwner();
72
- const { name, page } = context.routeParameters;
73
- const answer = await store.fixtureBatch((0, refusals_1.nameOf)(name ?? ""), (0, refusals_1.checkParam)(model_1.pageIdSchema, page ?? "", "page"), tenantOf(context));
74
- if (!answer)
75
- throw (0, refusals_1.notFound)("page");
76
- return batchResponse(context, answer);
77
- }
78
- async fixture(context) {
79
- await this.assertOwner();
80
- return readFixture(store, context);
81
- }
82
- async save(context, body) {
83
- await this.assertOwner();
84
- const rows = await readRows(store, context);
85
- const sent = model_1.jsonObjectSchema.safeParse(body);
86
- if (!sent.success) {
87
- throw new interface_api_1.HTTPResult(HTTP_BAD_REQUEST, {
88
- message: "$dms.refusals.mockup.row_not_object",
89
- });
90
- }
91
- return { ...rowOf(rows, context.url.searchParams), ...sent.data };
92
- }
93
- async archive(context) {
94
- await this.assertOwner();
95
- if (!ARCHIVE_CHANGES.has(context.routeParameters.change ?? "")) {
96
- throw (0, refusals_1.notFound)("route");
97
- }
98
- await readRows(store, context);
99
- return {};
100
- }
101
- }
102
- __decorate([
103
- (0, interface_api_1.Get)(`${prefix}pages/:page/fixtures`),
104
- __param(0, (0, interface_api_1.Context)()),
105
- __metadata("design:type", Function),
106
- __metadata("design:paramtypes", [Object]),
107
- __metadata("design:returntype", Promise)
108
- ], MockupFixtureController.prototype, "batch", null);
109
- __decorate([
110
- (0, interface_api_1.Get)(fixtures),
111
- __param(0, (0, interface_api_1.Context)()),
112
- __metadata("design:type", Function),
113
- __metadata("design:paramtypes", [Object]),
114
- __metadata("design:returntype", Promise)
115
- ], MockupFixtureController.prototype, "fixture", null);
116
- __decorate([
117
- (0, interface_api_1.Put)(`${fixtures}/rows`),
118
- __param(0, (0, interface_api_1.Context)()),
119
- __param(1, (0, interface_api_1.JSONBody)()),
120
- __metadata("design:type", Function),
121
- __metadata("design:paramtypes", [Object, Object]),
122
- __metadata("design:returntype", Promise)
123
- ], MockupFixtureController.prototype, "save", null);
124
- __decorate([
125
- (0, interface_api_1.Put)(`${fixtures}/rows/:change`),
126
- __param(0, (0, interface_api_1.Context)()),
127
- __metadata("design:type", Function),
128
- __metadata("design:paramtypes", [Object]),
129
- __metadata("design:returntype", Promise)
130
- ], MockupFixtureController.prototype, "archive", null);
131
- return MockupFixtureController;
132
- }
133
- function registerFixtureRoutes(store) {
134
- return PREFIXES.map((prefix) => fixtureController(store, prefix));
135
- }
136
- //# sourceMappingURL=fixture-routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixture-routes.js","sourceRoot":"","sources":["../../src/mockup/fixture-routes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAQmC;AACnC,iCAAqC;AAErC,yCAA4D;AAE5D,mCAA2E;AAC3E,yDAA2D;AAC3D,yCAA0D;AAG1D,MAAM,OAAO,GAAG,GAAG,CAAC;AACpB,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAG7B,MAAM,eAAe,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAO7E,MAAM,QAAQ,GAAG,CAAC,QAAQ,EAAE,wBAAwB,CAAU,CAAC;AAG/D,SAAS,KAAK,CACZ,IAA2B,EAC3B,KAAsB;IAEtB,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,EAAE,KAAK,IAAI;QAChB,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,IAAA,kBAAO,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,CAAC;AACvD,CAAC;AAGD,SAAS,QAAQ,CAAC,OAAuB;IACvC,MAAM,GAAG,GAAG,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC;IAC3C,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACxC,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IA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AAE,MAAM,CAAC,CAAC,CAAC;AACpE,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { JsonObject } from "./model";
2
- export declare const ENTITIES_SCHEMA: JsonObject;
3
- export declare function entityFixtureDefinition(): JsonObject;
4
- export declare const FIXTURES_SCHEMA: JsonObject;
5
- export declare const SPEC_FIXTURES_SCHEMA: JsonObject;
@@ -1,141 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SPEC_FIXTURES_SCHEMA = exports.FIXTURES_SCHEMA = exports.ENTITIES_SCHEMA = void 0;
4
- exports.entityFixtureDefinition = entityFixtureDefinition;
5
- const entities_1 = require("./entities");
6
- const generate_1 = require("./generate");
7
- const model_1 = require("./model");
8
- const ENTITY_NAME = {
9
- type: "string",
10
- pattern: model_1.KEY_PATTERN.source,
11
- };
12
- const PLAIN_FIELD_NOTE = 'string; number; price (an amount); boolean; date (a string "Date.parse" reads, such as 2026-11-13); email; url (an absolute URL).';
13
- exports.ENTITIES_SCHEMA = {
14
- type: "object",
15
- propertyNames: { pattern: model_1.KEY_PATTERN.source },
16
- description: 'The app\'s data model: its tables, by name. The viewer draws them as a diagram of their relations and a browser of their rows. A page fixture { "entity": "<name>", "rows": [...] } holds the rows of one, checked against its fields. Declare an entity before a fixture points at it.',
17
- additionalProperties: {
18
- type: "object",
19
- required: ["fields"],
20
- additionalProperties: false,
21
- properties: {
22
- tenantScoped: {
23
- type: "boolean",
24
- description: 'true when each tenant has its own rows of this entity, as with a tenant-scoped DMS model. The entity then has a "tenantId" string field right after "id", declared or implied, and SaaS mode shows a tenant only the rows whose "tenantId" is its id.',
25
- },
26
- fields: {
27
- type: "object",
28
- propertyNames: { pattern: model_1.KEY_PATTERN.source },
29
- description: 'The columns of the entity, by name. "id" is the key of every row: leave it out and it is a string field; declare it to give it another type. The viewer draws "id" first, then the other fields in this order.',
30
- additionalProperties: {
31
- oneOf: [
32
- {
33
- type: "object",
34
- required: ["type"],
35
- additionalProperties: false,
36
- description: `A plain field. Types: ${PLAIN_FIELD_NOTE}`,
37
- properties: { type: { enum: [...model_1.PLAIN_FIELD_TYPES] } },
38
- },
39
- {
40
- type: "object",
41
- required: ["type", "values"],
42
- additionalProperties: false,
43
- description: "A field that takes one of a fixed list of values.",
44
- properties: {
45
- type: { const: "enum" },
46
- values: {
47
- type: "array",
48
- minItems: 1,
49
- items: { type: "string", minLength: 1 },
50
- description: "The values it takes, at least one.",
51
- },
52
- },
53
- },
54
- {
55
- type: "object",
56
- required: ["type", "to"],
57
- additionalProperties: false,
58
- description: "A field that holds the id of a row of another entity, drawn as a relation in the diagram.",
59
- properties: {
60
- type: { const: "ref" },
61
- to: {
62
- ...ENTITY_NAME,
63
- description: "The entity it points to. It must be one of the spec's entities.",
64
- },
65
- },
66
- },
67
- ],
68
- },
69
- },
70
- },
71
- },
72
- };
73
- function entityFixtureDefinition() {
74
- return {
75
- type: "object",
76
- required: [entities_1.ENTITY_KEY, "rows"],
77
- additionalProperties: false,
78
- description: "The rows of an entity, as a fixture. Read as an array of row objects, by a table's `fixture:<key>` as by any other block. Every row is checked against the entity: each key is one of its fields, each value fits the field's type (null always does), and a ref holds the id of a row of its target once the target has rows. The viewer lists them in the data browser.",
79
- properties: {
80
- [entities_1.ENTITY_KEY]: {
81
- ...ENTITY_NAME,
82
- description: "The name of one of the spec's entities.",
83
- },
84
- rows: {
85
- type: "array",
86
- items: { type: "object" },
87
- description: "The rows, as objects keyed by field name. A row whose id an earlier row of the entity has is dropped.",
88
- },
89
- },
90
- };
91
- }
92
- exports.FIXTURES_SCHEMA = {
93
- type: "object",
94
- propertyNames: { pattern: model_1.KEY_PATTERN.source },
95
- additionalProperties: {
96
- anyOf: [
97
- { $ref: "#/$defs/generate" },
98
- { $ref: "#/$defs/entityFixture" },
99
- {
100
- not: {
101
- type: "object",
102
- anyOf: [
103
- { required: [generate_1.GENERATE_KEY] },
104
- { required: [entities_1.ENTITY_KEY, "rows"] },
105
- ],
106
- },
107
- },
108
- ],
109
- },
110
- description: 'Data a block reads: an option "fixture:<key>" is served from here. A value { "$generate": { "rows", "fields" } } is replaced by generated rows; a value { "entity", "rows" } holds the rows of an entity of the spec.',
111
- };
112
- exports.SPEC_FIXTURES_SCHEMA = {
113
- type: "object",
114
- required: ["tenants"],
115
- additionalProperties: false,
116
- description: "Data the mockup itself draws, beside the data of its pages.",
117
- properties: {
118
- tenants: {
119
- type: "array",
120
- description: 'The workspaces the viewer\'s SaaS mode lists in its switcher. A mockup that lists the "saas" module can be viewed as one of them: rows of a tenant-scoped entity whose "tenantId" is another tenant\'s are hidden.',
121
- items: {
122
- type: "object",
123
- required: ["id", "name"],
124
- additionalProperties: false,
125
- properties: {
126
- id: {
127
- type: "string",
128
- minLength: 1,
129
- description: 'The tenant\'s id, which "tenantId" holds in its rows. Unique.',
130
- },
131
- name: { type: "string", description: "The name the switcher shows." },
132
- plan: {
133
- type: "string",
134
- description: "The plan, shown under the name in the switcher.",
135
- },
136
- },
137
- },
138
- },
139
- },
140
- };
141
- //# sourceMappingURL=json-schema-entities.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json-schema-entities.js","sourceRoot":"","sources":["../../src/mockup/json-schema-entities.ts"],"names":[],"mappings":";;;;AAAA,yCAAwC;AACxC,yCAA0C;AAC1C,mCAAyD;AAGzD,MAAM,WAAW,GAAe;IAC9B,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,mBAAW,CAAC,MAAM;CAC5B,CAAC;AAEF,MAAM,gBAAgB,GACpB,mIAAmI,CAAC;AAGzH,QAAA,eAAe,GAAe;IACzC,IAAI,EAAE,QAAQ;IACd,aAAa,EAAE,EAAE,OAAO,EAAE,mBAAW,CAAC,MAAM,EAAE;IAC9C,WAAW,EACT,yRAAyR;IAC3R,oBAAoB,EAAE;QACpB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,oBAAoB,EAAE,KAAK;QAC3B,UAAU,EAAE;YACV,YAAY,EAAE;gBAC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AQ;wBACd,SAAS,EAAE,CAAC;wBACZ,WAAW,EACT,+DAA+D;qBAClE;oBACD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;oBACrE,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,iDAAiD;qBAC/D;iBACF;aACF;SACF;KACF;CACF,CAAC"}
@@ -1,8 +0,0 @@
1
- import { z } from "zod";
2
- export type Json = string | number | boolean | null | Json[] | JsonObject;
3
- export interface JsonObject {
4
- [key: string]: Json;
5
- }
6
- export declare const jsonSchema: z.ZodType<Json>;
7
- export declare const jsonObjectSchema: z.ZodType<JsonObject>;
8
- export declare function jsonPointer(path: readonly PropertyKey[]): string;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.jsonObjectSchema = exports.jsonSchema = void 0;
4
- exports.jsonPointer = jsonPointer;
5
- const zod_1 = require("zod");
6
- exports.jsonSchema = zod_1.z.union([
7
- zod_1.z.string(),
8
- zod_1.z.number(),
9
- zod_1.z.boolean(),
10
- zod_1.z.null(),
11
- zod_1.z.array(zod_1.z.lazy(() => exports.jsonSchema)),
12
- zod_1.z.record(zod_1.z.string(), zod_1.z.lazy(() => exports.jsonSchema)),
13
- ]);
14
- exports.jsonObjectSchema = zod_1.z.record(zod_1.z.string(), exports.jsonSchema);
15
- function jsonPointer(path) {
16
- return path
17
- .map((segment) => `/${String(segment).replaceAll("~", "~0").replaceAll("/", "~1")}`)
18
- .join("");
19
- }
20
- //# sourceMappingURL=json.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/mockup/json.ts"],"names":[],"mappings":";;;;AAAA,6BAAwB;AAWX,QAAA,UAAU,GAAoB,OAAC,CAAC,KAAK,CAAC;IACjD,OAAC,CAAC,MAAM,EAAE;IACV,OAAC,CAAC,MAAM,EAAE;IACV,OAAC,CAAC,OAAO,EAAE;IACX,OAAC,CAAC,IAAI,EAAE;IACR,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,QAAA,UAAU,CAAC,CAAC;IACjC,OAAC,CAAC,MAAM,CACN,OAAC,CAAC,MAAM,EAAE,EACV,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,QAAA,UAAU,CAAC,CACzB;CACF,CAAC,CAAC;AAGU,QAAA,gBAAgB,GAA0B,OAAC,CAAC,MAAM,CAC7D,OAAC,CAAC,MAAM,EAAE,EACV,QAAA,UAAU,CACX,CAAC;AAGF,qBAA4B,IAA4B;IACtD,OAAO,IAAI;SACR,GAAG,CACF,CAAC,OAAO,EAAE,EAAE,CACV,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CACpE;SACA,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC"}
@@ -1,156 +0,0 @@
1
- import { z } from "zod";
2
- export declare const MOCKUP_LAYOUTS: readonly ["default", "form-page", "settings", "empty"];
3
- export type MockupLayoutType = (typeof MOCKUP_LAYOUTS)[number];
4
- export declare const CUSTOM_LAYOUT_TYPE = "custom";
5
- declare const layoutObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6
- type: z.ZodLiteral<"default">;
7
- options: z.ZodOptional<z.ZodObject<{
8
- hideHeader: z.ZodOptional<z.ZodBoolean>;
9
- fillHeight: z.ZodOptional<z.ZodBoolean>;
10
- }, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
11
- hideBrand: z.ZodOptional<z.ZodBoolean>;
12
- hideFooter: z.ZodOptional<z.ZodBoolean>;
13
- fillHeight: z.ZodOptional<z.ZodBoolean>;
14
- }, z.core.$strict>>;
15
- }, z.core.$strict>, z.ZodObject<{
16
- type: z.ZodLiteral<"form-page">;
17
- options: z.ZodOptional<z.ZodObject<{
18
- hideHeader: z.ZodOptional<z.ZodBoolean>;
19
- fillHeight: z.ZodOptional<z.ZodBoolean>;
20
- }, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
21
- hideBrand: z.ZodOptional<z.ZodBoolean>;
22
- hideFooter: z.ZodOptional<z.ZodBoolean>;
23
- fillHeight: z.ZodOptional<z.ZodBoolean>;
24
- }, z.core.$strict>>;
25
- }, z.core.$strict>, z.ZodObject<{
26
- type: z.ZodLiteral<"settings">;
27
- options: z.ZodOptional<z.ZodObject<{
28
- hideHeader: z.ZodOptional<z.ZodBoolean>;
29
- fillHeight: z.ZodOptional<z.ZodBoolean>;
30
- }, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
31
- hideBrand: z.ZodOptional<z.ZodBoolean>;
32
- hideFooter: z.ZodOptional<z.ZodBoolean>;
33
- fillHeight: z.ZodOptional<z.ZodBoolean>;
34
- }, z.core.$strict>>;
35
- }, z.core.$strict>, z.ZodObject<{
36
- type: z.ZodLiteral<"empty">;
37
- options: z.ZodOptional<z.ZodObject<{
38
- hideHeader: z.ZodOptional<z.ZodBoolean>;
39
- fillHeight: z.ZodOptional<z.ZodBoolean>;
40
- }, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
41
- hideBrand: z.ZodOptional<z.ZodBoolean>;
42
- hideFooter: z.ZodOptional<z.ZodBoolean>;
43
- fillHeight: z.ZodOptional<z.ZodBoolean>;
44
- }, z.core.$strict>>;
45
- }, z.core.$strict>, z.ZodObject<{
46
- type: z.ZodLiteral<"custom">;
47
- id: z.ZodString;
48
- }, z.core.$strict>], "type">;
49
- export declare const pageLayoutSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodEnum<{
50
- default: "default";
51
- empty: "empty";
52
- "form-page": "form-page";
53
- settings: "settings";
54
- }>, z.ZodTransform<{
55
- type: "default" | "empty" | "form-page" | "settings";
56
- }, "default" | "empty" | "form-page" | "settings">>, z.ZodDiscriminatedUnion<[z.ZodObject<{
57
- type: z.ZodLiteral<"default">;
58
- options: z.ZodOptional<z.ZodObject<{
59
- hideHeader: z.ZodOptional<z.ZodBoolean>;
60
- fillHeight: z.ZodOptional<z.ZodBoolean>;
61
- }, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
62
- hideBrand: z.ZodOptional<z.ZodBoolean>;
63
- hideFooter: z.ZodOptional<z.ZodBoolean>;
64
- fillHeight: z.ZodOptional<z.ZodBoolean>;
65
- }, z.core.$strict>>;
66
- }, z.core.$strict>, z.ZodObject<{
67
- type: z.ZodLiteral<"form-page">;
68
- options: z.ZodOptional<z.ZodObject<{
69
- hideHeader: z.ZodOptional<z.ZodBoolean>;
70
- fillHeight: z.ZodOptional<z.ZodBoolean>;
71
- }, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
72
- hideBrand: z.ZodOptional<z.ZodBoolean>;
73
- hideFooter: z.ZodOptional<z.ZodBoolean>;
74
- fillHeight: z.ZodOptional<z.ZodBoolean>;
75
- }, z.core.$strict>>;
76
- }, z.core.$strict>, z.ZodObject<{
77
- type: z.ZodLiteral<"settings">;
78
- options: z.ZodOptional<z.ZodObject<{
79
- hideHeader: z.ZodOptional<z.ZodBoolean>;
80
- fillHeight: z.ZodOptional<z.ZodBoolean>;
81
- }, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
82
- hideBrand: z.ZodOptional<z.ZodBoolean>;
83
- hideFooter: z.ZodOptional<z.ZodBoolean>;
84
- fillHeight: z.ZodOptional<z.ZodBoolean>;
85
- }, z.core.$strict>>;
86
- }, z.core.$strict>, z.ZodObject<{
87
- type: z.ZodLiteral<"empty">;
88
- options: z.ZodOptional<z.ZodObject<{
89
- hideHeader: z.ZodOptional<z.ZodBoolean>;
90
- fillHeight: z.ZodOptional<z.ZodBoolean>;
91
- }, z.core.$strict>> | z.ZodOptional<z.ZodObject<{
92
- hideBrand: z.ZodOptional<z.ZodBoolean>;
93
- hideFooter: z.ZodOptional<z.ZodBoolean>;
94
- fillHeight: z.ZodOptional<z.ZodBoolean>;
95
- }, z.core.$strict>>;
96
- }, z.core.$strict>, z.ZodObject<{
97
- type: z.ZodLiteral<"custom">;
98
- id: z.ZodString;
99
- }, z.core.$strict>], "type">]>;
100
- export type MockupPageLayout = z.infer<typeof layoutObjectSchema>;
101
- export declare const MAX_LAYOUTS = 10;
102
- export declare const LAYOUT_ASIDE_DEFAULT_WIDTH = 280;
103
- export declare const LAYOUT_ASIDE_MIN_WIDTH = 120;
104
- export declare const LAYOUT_ASIDE_MAX_WIDTH = 480;
105
- export declare const LAYOUT_ASIDE_DEFAULT_SIDE = "end";
106
- export declare const LAYOUT_ASIDE_SIDES: readonly ["start", "end"];
107
- export declare const LAYOUT_REGION_DEFAULT_HEIGHTS: {
108
- readonly header: 64;
109
- readonly aside: 480;
110
- readonly footer: 48;
111
- };
112
- declare const layoutRegionSchema: z.ZodObject<{
113
- html: z.ZodString;
114
- css: z.ZodOptional<z.ZodString>;
115
- height: z.ZodOptional<z.ZodNumber>;
116
- }, z.core.$strict>;
117
- export type MockupLayoutRegion = z.infer<typeof layoutRegionSchema>;
118
- declare const layoutAsideSchema: z.ZodObject<{
119
- html: z.ZodString;
120
- css: z.ZodOptional<z.ZodString>;
121
- height: z.ZodOptional<z.ZodNumber>;
122
- width: z.ZodOptional<z.ZodNumber>;
123
- side: z.ZodOptional<z.ZodEnum<{
124
- end: "end";
125
- start: "start";
126
- }>>;
127
- }, z.core.$strict>;
128
- export type MockupLayoutAside = z.infer<typeof layoutAsideSchema>;
129
- export declare const customLayoutSchema: z.ZodObject<{
130
- id: z.ZodString;
131
- title: z.ZodString;
132
- description: z.ZodOptional<z.ZodString>;
133
- dashboard: z.ZodOptional<z.ZodBoolean>;
134
- header: z.ZodOptional<z.ZodObject<{
135
- html: z.ZodString;
136
- css: z.ZodOptional<z.ZodString>;
137
- height: z.ZodOptional<z.ZodNumber>;
138
- }, z.core.$strict>>;
139
- aside: z.ZodOptional<z.ZodObject<{
140
- html: z.ZodString;
141
- css: z.ZodOptional<z.ZodString>;
142
- height: z.ZodOptional<z.ZodNumber>;
143
- width: z.ZodOptional<z.ZodNumber>;
144
- side: z.ZodOptional<z.ZodEnum<{
145
- end: "end";
146
- start: "start";
147
- }>>;
148
- }, z.core.$strict>>;
149
- footer: z.ZodOptional<z.ZodObject<{
150
- html: z.ZodString;
151
- css: z.ZodOptional<z.ZodString>;
152
- height: z.ZodOptional<z.ZodNumber>;
153
- }, z.core.$strict>>;
154
- }, z.core.$strict>;
155
- export type MockupCustomLayout = z.infer<typeof customLayoutSchema>;
156
- export {};
@@ -1,96 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.customLayoutSchema = exports.LAYOUT_REGION_DEFAULT_HEIGHTS = exports.LAYOUT_ASIDE_SIDES = exports.LAYOUT_ASIDE_DEFAULT_SIDE = exports.LAYOUT_ASIDE_MAX_WIDTH = exports.LAYOUT_ASIDE_MIN_WIDTH = exports.LAYOUT_ASIDE_DEFAULT_WIDTH = exports.MAX_LAYOUTS = exports.pageLayoutSchema = exports.CUSTOM_LAYOUT_TYPE = exports.MOCKUP_LAYOUTS = void 0;
4
- const zod_1 = require("zod");
5
- const slug_1 = require("./slug");
6
- const sketch_limits_1 = require("./sketch-limits");
7
- exports.MOCKUP_LAYOUTS = [
8
- "default",
9
- "form-page",
10
- "settings",
11
- "empty",
12
- ];
13
- const framedLayoutOptions = {
14
- hideHeader: zod_1.z.boolean().optional(),
15
- fillHeight: zod_1.z.boolean().optional(),
16
- };
17
- const layoutOptionSchemas = {
18
- default: zod_1.z
19
- .object({ fullWidth: zod_1.z.boolean().optional(), ...framedLayoutOptions })
20
- .strict(),
21
- "form-page": zod_1.z.object(framedLayoutOptions).strict(),
22
- settings: zod_1.z.object(framedLayoutOptions).strict(),
23
- empty: zod_1.z
24
- .object({
25
- hideBrand: zod_1.z.boolean().optional(),
26
- hideFooter: zod_1.z.boolean().optional(),
27
- fillHeight: zod_1.z.boolean().optional(),
28
- })
29
- .strict(),
30
- };
31
- function layoutSchemaOf(type) {
32
- return zod_1.z
33
- .object({
34
- type: zod_1.z.literal(type),
35
- options: layoutOptionSchemas[type].optional(),
36
- })
37
- .strict();
38
- }
39
- exports.CUSTOM_LAYOUT_TYPE = "custom";
40
- const layoutObjectSchema = zod_1.z.discriminatedUnion("type", [
41
- layoutSchemaOf("default"),
42
- layoutSchemaOf("form-page"),
43
- layoutSchemaOf("settings"),
44
- layoutSchemaOf("empty"),
45
- zod_1.z.object({ type: zod_1.z.literal(exports.CUSTOM_LAYOUT_TYPE), id: slug_1.pageIdSchema }).strict(),
46
- ]);
47
- exports.pageLayoutSchema = zod_1.z.union([zod_1.z.enum(exports.MOCKUP_LAYOUTS).transform((type) => ({ type })), layoutObjectSchema], {
48
- error: `is the name of a layout, one of ${exports.MOCKUP_LAYOUTS.join(", ")}, or { "type": <that name>, "options": {...} }, or { "type": "${exports.CUSTOM_LAYOUT_TYPE}", "id": <the id of one of layouts> }`,
49
- });
50
- exports.MAX_LAYOUTS = 10;
51
- exports.LAYOUT_ASIDE_DEFAULT_WIDTH = 280;
52
- exports.LAYOUT_ASIDE_MIN_WIDTH = 120;
53
- exports.LAYOUT_ASIDE_MAX_WIDTH = 480;
54
- exports.LAYOUT_ASIDE_DEFAULT_SIDE = "end";
55
- exports.LAYOUT_ASIDE_SIDES = ["start", "end"];
56
- exports.LAYOUT_REGION_DEFAULT_HEIGHTS = {
57
- header: 64,
58
- aside: 480,
59
- footer: 48,
60
- };
61
- const layoutHeightSchema = zod_1.z
62
- .number()
63
- .int()
64
- .min(sketch_limits_1.LAYOUT_REGION_MIN_HEIGHT)
65
- .max(sketch_limits_1.SIDEBAR_WIDGET_MAX_HEIGHT)
66
- .optional();
67
- const layoutRegionFields = {
68
- html: zod_1.z.string().max(sketch_limits_1.SKETCH_MAX_SOURCE),
69
- css: zod_1.z.string().max(sketch_limits_1.SKETCH_MAX_SOURCE).optional(),
70
- height: layoutHeightSchema,
71
- };
72
- const layoutRegionSchema = zod_1.z.object(layoutRegionFields).strict();
73
- const layoutAsideSchema = zod_1.z
74
- .object({
75
- ...layoutRegionFields,
76
- width: zod_1.z
77
- .number()
78
- .int()
79
- .min(exports.LAYOUT_ASIDE_MIN_WIDTH)
80
- .max(exports.LAYOUT_ASIDE_MAX_WIDTH)
81
- .optional(),
82
- side: zod_1.z.enum(exports.LAYOUT_ASIDE_SIDES).optional(),
83
- })
84
- .strict();
85
- exports.customLayoutSchema = zod_1.z
86
- .object({
87
- id: slug_1.pageIdSchema,
88
- title: zod_1.z.string(),
89
- description: zod_1.z.string().optional(),
90
- dashboard: zod_1.z.boolean().optional(),
91
- header: layoutRegionSchema.optional(),
92
- aside: layoutAsideSchema.optional(),
93
- footer: layoutRegionSchema.optional(),
94
- })
95
- .strict();
96
- //# sourceMappingURL=layout-model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layout-model.js","sourceRoot":"","sources":["../../src/mockup/layout-model.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iCAAsC;AACtC,mDAIyB;AAMZ,QAAA,cAAc,GAAG;IAC5B,SAAS;IACT,WAAW;IACX,UAAU;IACV,OAAO;CACC,CAAC;AAGX,MAAM,mBAAmB,GAAG;IAC1B,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC;AAGF,MAAM,mBAAmB,GAAG;IAC1B,OAAO,EAAE,OAAC;SACP,MAAM,CAAC,EAAE,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,GAAG,mBAAmB,EAAE,CAAC;SACrE,MAAM,EAAE;IACX,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;IACnD,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;IAChD,KAAK,EAAE,OAAC;SACL,MAAM,CA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,OAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACjC,MAAM,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IACrC,KAAK,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CACtC,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { MockupCustomLayout, MockupPageLayout, MockupSpecPage } from "./model";
2
- export interface LayoutIssue {
3
- path: Array<string | number>;
4
- message: string;
5
- }
6
- export declare function isCustomLayoutRef(layout: MockupPageLayout | undefined): layout is Extract<MockupPageLayout, {
7
- type: "custom";
8
- }>;
9
- export declare function layoutIssues(layouts: readonly MockupCustomLayout[], pages: readonly Pick<MockupSpecPage, "layout">[]): LayoutIssue[];
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isCustomLayoutRef = isCustomLayoutRef;
4
- exports.layoutIssues = layoutIssues;
5
- const LAYOUT_REGIONS = ["header", "aside", "footer"];
6
- function isCustomLayoutRef(layout) {
7
- return layout?.type === "custom";
8
- }
9
- function layoutIssues(layouts, pages) {
10
- const issues = [];
11
- const ids = new Set();
12
- layouts.forEach((layout, index) => {
13
- if (ids.has(layout.id)) {
14
- issues.push({
15
- path: ["layouts", index, "id"],
16
- message: `another layout already has the id "${layout.id}"`,
17
- });
18
- }
19
- ids.add(layout.id);
20
- if (LAYOUT_REGIONS.every((region) => layout[region] === undefined)) {
21
- issues.push({
22
- path: ["layouts", index],
23
- message: `a layout draws a header, an aside or a footer: give "${layout.id}" at least one`,
24
- });
25
- }
26
- });
27
- const known = ids.size
28
- ? `the layouts are ${[...ids].join(", ")}`
29
- : "the spec has no layouts";
30
- pages.forEach(({ layout }, index) => {
31
- if (isCustomLayoutRef(layout) && !ids.has(layout.id)) {
32
- issues.push({
33
- path: ["pages", index, "layout", "id"],
34
- message: `no layout has the id "${layout.id}": ${known}`,
35
- });
36
- }
37
- });
38
- return issues;
39
- }
40
- //# sourceMappingURL=layouts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layouts.js","sourceRoot":"","sources":["../../src/mockup/layouts.ts"],"names":[],"mappings":";;;;AAaA,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAG9D,2BACE,MAAoC;IAEpC,OAAO,MAAM,EAAE,IAAI,KAAK,QAAQ,CAAC;AACnC,CAAC;AAOD,sBACE,OAAsC,EACtC,KAAgD;IAEhD,MAAM,MAAM,GAAkB,EAAE,CAAC;IACjC,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QAChC,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;YACvB,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC;gBAC9B,OAAO,EAAE,sCAAsC,MAAM,CAAC,EAAE,GAAG;aAC5D,CAAC,CAAC;QACL,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACnB,IAAI,cAAc,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC,EAAE,CAAC;YACnE,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;gBACxB,OAAO,EAAE,wDAAwD,MAAM,CAAC,EAAE,gBAAgB;aAC3F,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,GAAG,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