@antelopejs/dms 0.25.8-next.1175.g5f8cc4d → 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 -41
  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
@@ -10,11 +10,9 @@ import {
10
10
  import { useResizeObserver, useTimeoutFn } from "@vueuse/core";
11
11
  import { isReducedMotionActive } from "../../../utils/reducedMotion";
12
12
  import type { PreviewBlockRect } from "../../utils/blockPreviewMessages";
13
- import { sameBlockRects } from "../../utils/blockPreviewRects";
14
13
  import type {
15
14
  MockupCategory,
16
15
  MockupDataMode,
17
- MockupModule,
18
16
  MockupPageState,
19
17
  } from "../../utils/mockup";
20
18
  import {
@@ -32,18 +30,14 @@ import {
32
30
  wantedLivePages,
33
31
  zoomAt,
34
32
  zoomFloor,
35
- ZOOM_STEP,
36
33
  type OverviewCamera,
37
34
  type OverviewFrame,
38
35
  type OverviewSectionLabel,
39
36
  type ViewportPoint,
40
37
  type ViewportSize,
41
38
  } from "../../utils/mockupOverview";
42
- import {
43
- type OverviewSectionTitle,
44
- overviewSections,
45
- } from "../../utils/mockupOverviewSections";
46
39
  import type { PagePoint, PinCanvas } from "../../utils/mockupPins";
40
+ import { groupSections } from "../../utils/mockupSections";
47
41
  import { pageForest } from "../../utils/mockupPageTree";
48
42
  import type { ClientPoint } from "./useMockupPins";
49
43
  import {
@@ -60,6 +54,9 @@ const FIT_PADDING_PX = 56;
60
54
  /** The room a fit keeps once the frames sit under section titles, which stand above their pages' titles. */
61
55
  const SECTIONED_FIT_PADDING_PX = 96;
62
56
 
57
+ /** How much one step of the zoom buttons zooms. */
58
+ const ZOOM_STEP = 1.5;
59
+
63
60
  /** How long the camera eases to where a control sent it. */
64
61
  const EASE_MS = 220;
65
62
 
@@ -85,10 +82,11 @@ interface OverviewOptions {
85
82
  categories: ComputedRef<readonly MockupCategory[]>;
86
83
  /** The developer's Real data choice, if any: each page draws, and is captured, by it. */
87
84
  dataMode: Readonly<Ref<MockupDataMode | undefined>>;
88
- /** The installed modules, a row of frames each for the pages it adds or extends. */
89
- modules: ComputedRef<readonly MockupModule[]>;
90
- /** Whether a past version of the spec is shown, whose pages are drawn but never sent to the server as captures. */
91
- isReadOnly: Readonly<Ref<boolean>>;
85
+ }
86
+
87
+ /** What labels a section's row: its category, none for the default section. */
88
+ export interface OverviewSectionTitle {
89
+ category?: MockupCategory;
92
90
  }
93
91
 
94
92
  /** The overview of every page of the mockup: where each frame sits, where the camera looks, and which frames are drawn live. */
@@ -109,10 +107,6 @@ export interface MockupOverview {
109
107
  pick: (page: string | undefined) => void;
110
108
  /** Whether the camera is moving: from a move until it has been still for a while. Live frames neither change page nor are captured meanwhile. */
111
109
  isMoving: Readonly<Ref<boolean>>;
112
- /** Whether the overview is on screen: while it is not, it holds its slots and does no work. */
113
- isOpen: Readonly<Ref<boolean>>;
114
- /** Whether the mockup has pages, every page has an image current for it or gave up on one, and the server's captures were read: nothing is left to draw live. */
115
- isSettled: ComputedRef<boolean>;
116
110
  /** The key each page's capture is current for, by page id. */
117
111
  captureKeys: ComputedRef<ReadonlyMap<string, string>>;
118
112
  /** The image each page's live frame drew, by page id, current or out of date. */
@@ -207,8 +201,7 @@ function useViewport() {
207
201
  size,
208
202
  hasSize: computed(() => size.value.width > 0 && size.value.height > 0),
209
203
  attach: (next: Element | null) => {
210
- element.value =
211
- next !== null && next instanceof HTMLElement ? next : undefined;
204
+ element.value = next instanceof HTMLElement ? next : undefined;
212
205
  },
213
206
  middle: (): ViewportPoint => ({
214
207
  x: size.value.width / 2,
@@ -239,25 +232,19 @@ function usePageReports(options: OverviewOptions) {
239
232
  );
240
233
  const layout = computed(() => {
241
234
  const categories = options.categories.value;
235
+ const isSectioned = categories.length > 0;
242
236
  const forest = pageForest(pages.value, {
243
237
  idOf: (page) => page.id,
244
238
  parentOf: (page) => page.parent,
245
239
  });
246
- const sections = overviewSections(
240
+ const sections = groupSections(
247
241
  categories,
248
- options.modules.value,
249
242
  forest.roots,
243
+ (page) => page.category,
250
244
  );
251
- const isSectioned =
252
- categories.length > 0 ||
253
- sections.some(
254
- (section) =>
255
- section.title.module !== undefined ||
256
- section.title.isSettings === true,
257
- );
258
245
  return layoutSections<OverviewSectionTitle>(
259
246
  sections.map((section) => ({
260
- ...(isSectioned && { label: section.title }),
247
+ ...(isSectioned && { label: { category: section.category } }),
261
248
  pages: section.pages
262
249
  .flatMap((page) => [
263
250
  page,
@@ -288,9 +275,7 @@ function usePageReports(options: OverviewOptions) {
288
275
  if (height !== undefined && heights.value.get(page) !== height) {
289
276
  heights.value = new Map(heights.value).set(page, height);
290
277
  }
291
- if (blocks && !sameBlockRects(layouts.value.get(page), blocks)) {
292
- layouts.value = new Map(layouts.value).set(page, blocks);
293
- }
278
+ if (blocks) layouts.value = new Map(layouts.value).set(page, blocks);
294
279
  }
295
280
  return {
296
281
  frames,
@@ -319,14 +304,10 @@ interface LiveSlotPages {
319
304
  * thread, so the pool grows by one iframe at a time, once every iframe it
320
305
  * has booted: the page nearest the middle draws first, and the canvas keeps
321
306
  * answering while the others boot. Each page draws once, is captured, and
322
- * keeps that image for as long as it is not drawn live. No page is handed a
323
- * slot before the server's captures were read, or failed to be, so a page
324
- * whose capture the server holds boots no iframe. While the camera
307
+ * keeps that image for as long as it is not drawn live. While the camera
325
308
  * moves, the slots stay as they are, since an iframe drawing another page or
326
309
  * booting holds the main thread for a whole frame or more; they follow the
327
- * camera once it rests. While the overview is closed, a page is open and the
328
- * slots stay as they are too, iframes booted and all, so coming back to the
329
- * overview draws no boot; they follow the camera again once it opens.
310
+ * camera once it rests.
330
311
  */
331
312
  function useLiveSlots(
332
313
  isOpen: Readonly<Ref<boolean>>,
@@ -349,12 +330,14 @@ function useLiveSlots(
349
330
  captured.captures,
350
331
  captured.keys,
351
332
  captured.failed,
352
- captured.isSettled,
353
333
  ],
354
334
  () => {
355
- if (!isOpen.value) return;
335
+ if (!isOpen.value) {
336
+ if (slots.value.length) slots.value = [];
337
+ if (booted.value.size) booted.value = new Set();
338
+ return;
339
+ }
356
340
  if (!viewport.hasSize.value || isMoving.value) return;
357
- if (!captured.isSettled.value) return;
358
341
  const wanted = wantedLivePages({
359
342
  frames: frames.value,
360
343
  camera: camera.value,
@@ -375,7 +358,7 @@ function useLiveSlots(
375
358
  return {
376
359
  slots,
377
360
  booted: (slot: number) => {
378
- if (!booted.value.has(slot)) {
361
+ if (isOpen.value && !booted.value.has(slot)) {
379
362
  booted.value = new Set(booted.value).add(slot);
380
363
  }
381
364
  },
@@ -533,16 +516,6 @@ export function useMockupOverview(options: OverviewOptions): MockupOverview {
533
516
  picked.value = page;
534
517
  },
535
518
  isMoving,
536
- isOpen,
537
- isSettled: computed(
538
- () =>
539
- captured.isSettled.value &&
540
- frames.value.length > 0 &&
541
- frames.value.every(({ id }) => {
542
- const key = captured.keys.value.get(id);
543
- return key === undefined || !captured.needsCapture(id, key);
544
- }),
545
- ),
546
519
  captureKeys: captured.keys,
547
520
  captures: captured.captures,
548
521
  needsCapture: captured.needsCapture,
@@ -9,21 +9,17 @@ import type {
9
9
  MockupState,
10
10
  MockupWidth,
11
11
  } from "../../utils/mockup";
12
- import { renderAcknowledgments } from "../../utils/mockupActivation";
13
- import { followedRecord } from "../../utils/mockupLinks";
12
+ import { mockupPageRender } from "../../utils/mockupFrame";
13
+ import { followedRecord, mockupPageParams } from "../../utils/mockupLinks";
14
14
  import type { PagePoint } from "../../utils/mockupPins";
15
15
  import type { MockupSectionEdit } from "../../utils/mockupSections";
16
16
  import type { MockupEditing } from "./useMockupEditing";
17
- import { useMockupFrameRender } from "./useMockupFrameRender";
18
17
  import { useMockupFrameSize } from "./useMockupFrameSize";
19
- import { useMockupPageZoom } from "./useMockupPageZoom";
20
18
  import type { ClientPoint } from "./useMockupPins";
21
19
  import { useMockupSketchStates } from "./useMockupSketchStates";
22
20
  import { usePreviewFrame } from "./usePreviewFrame";
23
21
 
24
22
  interface PageFrameOptions {
25
- /** The mockup's folder name, which its fixture routes are under. */
26
- name: string;
27
23
  editing: MockupEditing;
28
24
  width: Readonly<Ref<MockupWidth>>;
29
25
  /** The state the canvas draws. */
@@ -35,22 +31,10 @@ interface PageFrameOptions {
35
31
  /** The query of the page, as its URL gives it. */
36
32
  query: Readonly<Ref<Record<string, string> | undefined>>;
37
33
  realData: Readonly<Ref<boolean>>;
38
- /** The tenant the page is drawn as in SaaS mode, which reads its fixtures as that tenant; none in single-tenant mode. */
39
- tenant: Readonly<Ref<string | undefined>>;
40
34
  navigation: Readonly<Ref<PreviewNavigation>>;
41
- /** Whether the module store is drawn in place of the page. */
42
- isStoreOpen: Readonly<Ref<boolean>>;
43
35
  isPreviewing: Readonly<Ref<boolean>>;
44
36
  /** Opens the page `id`, on the row `record` when a link names one. */
45
37
  openPage: (id: string, record?: string) => void;
46
- /** The frame drew the render last posted for what `activationScope` names: only that one, never a render the frame was handed before it. */
47
- onDrawn: (activation: string) => void;
48
- /** The frame, ready, was handed the render of what `activationScope` names. */
49
- onPosted: (activation: string) => void;
50
- /** The preview's workspace switcher picked the tenant `id`. */
51
- onTenant: (id: string) => void;
52
- /** The preview's Modules button, or its Back entry inside a module, was picked. */
53
- onModules: () => void;
54
38
  onSectionEdit: (edit: MockupSectionEdit) => void;
55
39
  /** Escape was pressed in the preview, and nothing of its page took it. */
56
40
  onEscape: () => void;
@@ -58,33 +42,30 @@ interface PageFrameOptions {
58
42
 
59
43
  /**
60
44
  * The page view's frame: the preview iframe of the template's `preview`
61
- * element, drawn at the size the canvas and the zoom give it, which the page
62
- * is posted to whenever what it draws changes, and what the frame reports
63
- * back, a block picked, a link followed, the sections of its sidebar edited,
64
- * a zoom turned over it. The sketch states picked in the inspector are drawn
65
- * through it too, so a pick redraws. While Preview is on the frame reports no
66
- * block layout, so the layout of the page left behind is dropped when the
67
- * page changes.
45
+ * element, drawn at the size the canvas gives it, which the page is posted to
46
+ * whenever what it draws changes, and what the frame reports back, a block
47
+ * picked, a link followed, the sections of its sidebar edited. The sketch
48
+ * states picked in the inspector are drawn through it too, so a pick redraws.
68
49
  */
69
50
  export function useMockupPageFrame(options: PageFrameOptions) {
70
51
  const { editing } = options;
71
52
  const previewElement = useTemplateRef<HTMLIFrameElement>("preview");
72
53
  const canvasElement = useTemplateRef<HTMLElement>("canvas");
73
54
  const stageElement = useTemplateRef<HTMLElement>("stage");
74
- const sketchStates = useMockupSketchStates(() => void sync());
75
- const frames = useMockupFrameRender(options, sketchStates);
76
- const acks = renderAcknowledgments(options.onDrawn);
77
- let syncing = 0;
55
+ const sketchStates = useMockupSketchStates(sync);
78
56
 
79
- async function sync(): Promise<void> {
57
+ function sync(): void {
80
58
  const page = options.currentPage.value;
81
59
  if (!page) return;
82
- const turn = ++syncing;
83
- const render = await frames.renderOf(page);
84
- if (turn !== syncing || !render) return;
85
- acks.posted(render.activation, render.scope);
86
- bridge.post(render.message);
87
- if (bridge.isReady.value) options.onPosted(render.activation);
60
+ bridge.post(
61
+ mockupPageRender(
62
+ page,
63
+ sketchStates.treeOf(page, options.realData.value),
64
+ options.navigation.value,
65
+ mockupPageParams(page, options.record.value),
66
+ options.query.value,
67
+ ),
68
+ );
88
69
  bridge.post(previewInspectMessage(!options.isPreviewing.value));
89
70
  bridge.post(previewMinHeightMessage(size.fillHeight.value));
90
71
  }
@@ -100,8 +81,7 @@ export function useMockupPageFrame(options: PageFrameOptions) {
100
81
 
101
82
  const bridge = usePreviewFrame({
102
83
  frame: previewElement,
103
- onReady: () => void sync(),
104
- onDrawn: acks.drawn,
84
+ onReady: sync,
105
85
  onSelect: (layoutPath) => {
106
86
  editing.selectPath(layoutPath);
107
87
  focusCanvas();
@@ -119,34 +99,21 @@ export function useMockupPageFrame(options: PageFrameOptions) {
119
99
  options.record.value,
120
100
  ),
121
101
  ),
122
- onTenant: options.onTenant,
123
- onModules: options.onModules,
124
102
  onEscape: options.onEscape,
125
103
  onSectionEdit: options.onSectionEdit,
126
- onZoom: (message) => pageZoom.zoomFromFrame(message),
127
104
  });
128
105
  const size = useMockupFrameSize({
129
106
  canvas: canvasElement,
130
107
  width: options.width,
131
108
  reportedHeight: bridge.height,
132
109
  });
133
- const pageZoom = useMockupPageZoom({
134
- canvas: canvasElement,
135
- stage: stageElement,
136
- zoom: size.zoom,
137
- scale: size.scale,
138
- fitScale: size.fitScale,
139
- });
140
110
 
141
111
  watch(
142
112
  [
143
113
  options.shown,
144
114
  () => options.currentPage.value?.id,
145
115
  options.realData,
146
- options.tenant,
147
116
  options.navigation,
148
- options.isStoreOpen,
149
- frames.storeHeader,
150
117
  options.record,
151
118
  options.query,
152
119
  ],
@@ -155,17 +122,10 @@ export function useMockupPageFrame(options: PageFrameOptions) {
155
122
  watch(size.fillHeight, (height) =>
156
123
  bridge.post(previewMinHeightMessage(height)),
157
124
  );
158
- watch(
159
- () => options.currentPage.value?.id,
160
- () => {
161
- if (options.isPreviewing.value) editing.setLayout([]);
162
- },
163
- );
164
125
 
165
126
  return {
166
127
  bridge,
167
128
  sketchStates,
168
- pageZoom,
169
129
  focusCanvas,
170
130
  /** Deselects the block on a click on the canvas itself, around the page, and leaves a click on anything drawn in it to that. */
171
131
  onCanvasClick(event: MouseEvent): void {
@@ -173,30 +133,17 @@ export function useMockupPageFrame(options: PageFrameOptions) {
173
133
  },
174
134
  ...size,
175
135
  /** The page in view, and the point of its frame's document, under a point of the screen. */
176
- toFrame: (client: ClientPoint): PagePoint | undefined =>
177
- framePoint(
178
- stageElement.value,
179
- options.currentPage.value?.id,
180
- size.scale.value,
181
- client,
182
- ),
183
- };
184
- }
185
-
186
- /** The page in view, and the point of its frame's document, under the point `client` of the screen, when the frame is drawn in `stage` at `scale`. */
187
- function framePoint(
188
- stage: HTMLElement | null,
189
- page: string | undefined,
190
- scale: number,
191
- client: ClientPoint,
192
- ): PagePoint | undefined {
193
- const box = stage?.getBoundingClientRect();
194
- if (!box || page === undefined) return undefined;
195
- return {
196
- page,
197
- point: {
198
- x: (client.x - box.left) / scale,
199
- y: (client.y - box.top) / scale,
136
+ toFrame(client: ClientPoint): PagePoint | undefined {
137
+ const stage = stageElement.value?.getBoundingClientRect();
138
+ const page = options.currentPage.value?.id;
139
+ if (!stage || page === undefined) return undefined;
140
+ return {
141
+ page,
142
+ point: {
143
+ x: (client.x - stage.left) / size.scale.value,
144
+ y: (client.y - stage.top) / size.scale.value,
145
+ },
146
+ };
200
147
  },
201
148
  };
202
149
  }
@@ -10,7 +10,7 @@ import type { PreviewRect } from "../../utils/blockPreviewMessages";
10
10
  import type {
11
11
  MockupAnnotation,
12
12
  MockupAnnotationStatus,
13
- } from "../../utils/mockupAnnotations";
13
+ } from "../../utils/mockup";
14
14
  import {
15
15
  isOnCanvas,
16
16
  pinDropAt,
@@ -9,15 +9,10 @@ import { mockupPreviewPath, readsRealData } from "../../utils/mockupRealData";
9
9
  * a document that refuses every live route. Switching Real data replaces the
10
10
  * frame, so no tree is drawn in the document of the other mode. On the
11
11
  * Overview the switch covers every page of the board, which draws each by the
12
- * same rule through `choice`. The frame's document follows the page the frame
13
- * is handed, `framePage`, and keeps the one it has while none is, which is
14
- * the fixtures-only document until a page was handed: opening a page and
15
- * coming back to the Overview boot nothing, and only a page that reads the
16
- * other mode than the last one handed replaces the document.
12
+ * same rule through `choice`.
17
13
  */
18
14
  export function useMockupRealData(
19
15
  currentPage: Readonly<Ref<MockupPageState | undefined>>,
20
- framePage: Readonly<Ref<MockupPageState | undefined>>,
21
16
  pages: Readonly<Ref<readonly MockupPageState[]>>,
22
17
  isOverview: Readonly<Ref<boolean>>,
23
18
  initial: MockupDataMode | undefined,
@@ -39,10 +34,8 @@ export function useMockupRealData(
39
34
  choice.value = isOn ? "real" : "sample";
40
35
  },
41
36
  });
42
- const previewSrc = computed<string>((held) =>
43
- framePage.value
44
- ? mockupPreviewPath(readsRealData(framePage.value, choice.value), "page")
45
- : (held ?? mockupPreviewPath(false, "page")),
37
+ const previewSrc = computed(() =>
38
+ mockupPreviewPath(readsRealData(currentPage.value, choice.value)),
46
39
  );
47
40
  return { choice, hasRealData, realData, previewSrc };
48
41
  }
@@ -1,29 +1,10 @@
1
- import { router as inertiaRouter } from "@inertiajs/vue3";
2
- import {
3
- computed,
4
- onBeforeUnmount,
5
- onMounted,
6
- type WritableComputedRef,
7
- type ComputedRef,
8
- } from "vue";
1
+ import { computed, type WritableComputedRef, type ComputedRef } from "vue";
9
2
  import { readQueryValue } from "../../utils/mockup";
10
- import {
11
- mockupPageQuery,
12
- RECORD_QUERY,
13
- STORE_QUERY,
14
- } from "../../utils/mockupLinks";
3
+ import { mockupPageQuery, RECORD_QUERY } from "../../utils/mockupLinks";
15
4
  import { detach } from "../detach";
16
5
 
17
6
  const PAGE_QUERY = "page";
18
7
 
19
- /**
20
- * The state of each history entry of the viewer: no `page`, so Inertia has no
21
- * page to draw again when back or forward returns to it, which would remount
22
- * the viewer and lose its state (Preview, the panels). It finds the entry
23
- * missing and visits its URL with `preserveState`, and the viewer stays.
24
- */
25
- const VIEWER_ENTRY_STATE = { dmsMockupViewer: true };
26
-
27
8
  /** The page the viewer shows, and the row it shows it on. */
28
9
  export interface MockupRoutePage {
29
10
  /** The id of the page asked for, none for the Overview; setting it opens that page on no row. */
@@ -32,59 +13,36 @@ export interface MockupRoutePage {
32
13
  record: ComputedRef<string | undefined>;
33
14
  /** The query of the page on screen: the URL's, without what the viewer reads itself. */
34
15
  query: ComputedRef<Record<string, string> | undefined>;
35
- /** Whether the module store is open in place of a page. */
36
- isStoreOpen: ComputedRef<boolean>;
37
16
  /** Opens the page `id`, on the row `record` when a link names one; no `id` opens the Overview. */
38
17
  open: (id: string | undefined, record?: string) => void;
39
- /** Opens the module store. */
40
- openStore: () => void;
41
18
  }
42
19
 
43
20
  /**
44
- * The page on screen and its row as the URL's `?page=` and `?record=`, and
45
- * whether the module store is open as its `?store=`: each page opened, the
46
- * store opened and each return to the Overview is a new entry of the
47
- * browser's history, so back and forward step through them, in the viewer on
48
- * screen: Inertia writes its page in each entry it moves to, and the viewer
49
- * takes it out ({@link VIEWER_ENTRY_STATE}).
21
+ * The page on screen and its row as the URL's `?page=` and `?record=`: each
22
+ * page opened, and each return to the Overview, is a new entry of the
23
+ * browser's history, so back and forward step through them.
50
24
  */
51
25
  export function useMockupRoutePage(): MockupRoutePage {
52
26
  const route = useDmsRoute();
53
27
  const router = useDmsRouter();
54
28
 
55
- function go(query: Record<string, string>): void {
29
+ function open(id: string | undefined, record?: string): void {
56
30
  const kept = Object.fromEntries(
57
31
  Object.entries(route.query).filter(
58
- ([key]) =>
59
- key !== PAGE_QUERY && key !== RECORD_QUERY && key !== STORE_QUERY,
32
+ ([key]) => key !== PAGE_QUERY && key !== RECORD_QUERY,
60
33
  ),
61
34
  );
62
35
  detach(
63
- router.push({ query: { ...kept, ...query } }).then(forgetInertiaPage),
36
+ router.push({
37
+ query: {
38
+ ...kept,
39
+ ...(id !== undefined && { [PAGE_QUERY]: id }),
40
+ ...(record !== undefined && { [RECORD_QUERY]: record }),
41
+ },
42
+ }),
64
43
  );
65
44
  }
66
45
 
67
- function open(id: string | undefined, record?: string): void {
68
- go({
69
- ...(id !== undefined && { [PAGE_QUERY]: id }),
70
- ...(record !== undefined && { [RECORD_QUERY]: record }),
71
- });
72
- }
73
-
74
- let viewerPath: string | undefined;
75
- function forgetInertiaPage(): void {
76
- if (window.location.pathname !== viewerPath) return;
77
- window.history.replaceState(VIEWER_ENTRY_STATE, "", window.location.href);
78
- }
79
-
80
- let stopForgetting: (() => void) | undefined;
81
- onMounted(() => {
82
- viewerPath = window.location.pathname;
83
- forgetInertiaPage();
84
- stopForgetting = inertiaRouter.on("finish", forgetInertiaPage);
85
- });
86
- onBeforeUnmount(() => stopForgetting?.());
87
-
88
46
  return {
89
47
  page: computed({
90
48
  get: () => readQueryValue(route.query[PAGE_QUERY]),
@@ -92,10 +50,6 @@ export function useMockupRoutePage(): MockupRoutePage {
92
50
  }),
93
51
  record: computed(() => readQueryValue(route.query[RECORD_QUERY])),
94
52
  query: computed(() => mockupPageQuery(route.query)),
95
- isStoreOpen: computed(
96
- () => readQueryValue(route.query[STORE_QUERY]) !== undefined,
97
- ),
98
53
  open,
99
- openStore: () => go({ [STORE_QUERY]: "1" }),
100
54
  };
101
55
  }
@@ -6,21 +6,21 @@ import {
6
6
  type Ref,
7
7
  type ShallowRef,
8
8
  } from "vue";
9
- import { mockupEndpoint, type MockupState } from "../../utils/mockup";
10
9
  import {
10
+ mockupEndpoint,
11
11
  parseAnnotation,
12
12
  parseAnnotations,
13
13
  upsertAnnotation,
14
14
  type MockupAnnotation,
15
15
  type MockupAnnotationDraft,
16
16
  type MockupAnnotationPatch,
17
- } from "../../utils/mockupAnnotations";
17
+ type MockupState,
18
+ } from "../../utils/mockup";
18
19
  import {
19
20
  newViewerId,
20
21
  NO_PRESENCE,
21
22
  type MockupPresence,
22
23
  } from "../../utils/mockupPresence";
23
- import { applyStatePatch } from "../../utils/mockupStatePatch";
24
24
  import { openMockupStream, type MockupStream } from "../../utils/mockupStream";
25
25
 
26
26
  type AuthFetch = ReturnType<typeof useAuthFetch>["$authFetch"];
@@ -112,11 +112,6 @@ export function useMockupSession(options: MockupSessionOptions): MockupSession {
112
112
  onState: (next) => {
113
113
  state.value = next;
114
114
  },
115
- onPatch: (patch) => {
116
- const next = state.value && applyStatePatch(state.value, patch);
117
- if (next) state.value = next;
118
- else stream?.reopen();
119
- },
120
115
  onAnnotations: (next) => {
121
116
  annotations.value = next;
122
117
  },
@@ -488,18 +488,14 @@ export function useMockupSpec(options: MockupSpecOptions): MockupSpecEditor {
488
488
  const sync = new MockupSpecSync(options);
489
489
  const { history, written } = sync;
490
490
 
491
- let mountRead: Promise<SpecSource | undefined> | undefined;
492
491
  onMounted(async () => {
493
- mountRead = sync.read();
494
- const source = await mountRead;
492
+ const source = await sync.read();
495
493
  if (source && !sync.isClosed && !history.value) sync.adopt(source, false);
496
494
  });
497
495
  watch(
498
496
  () => options.state.value?.revision,
499
- async (_revision, previous) => {
497
+ () => {
500
498
  sync.isAwaitingState.value = false;
501
- const isFirstState = previous === undefined && mountRead !== undefined;
502
- if (isFirstState && (await mountRead)) return;
503
499
  ignoreRejection(sync.check());
504
500
  },
505
501
  );
@@ -15,11 +15,11 @@ interface ToolModesOptions {
15
15
  }
16
16
 
17
17
  /**
18
- * The modes the canvas is in: Preview hands every click to the page, so no
19
- * block stays selected or armed, while the comment tool works in it and its
20
- * click, once armed, is what a pin takes; a block armed and the comment tool
21
- * never are both; the Overview places no block and leaves Preview, to comment
22
- * on every page, and gives the focus back to the page once it shows again.
18
+ * The modes the canvas is in, which exclude one another: Preview hands every
19
+ * click to the page, so no block stays selected and no tool stays armed; a
20
+ * block armed and the comment tool never are both; the Overview places no
21
+ * block and leaves Preview, to comment on every page, and gives the focus
22
+ * back to the page once it shows again.
23
23
  */
24
24
  export function useMockupToolModes(options: ToolModesOptions) {
25
25
  const { editing, pins, post } = options;
@@ -29,6 +29,8 @@ export function useMockupToolModes(options: ToolModesOptions) {
29
29
  if (isOn) {
30
30
  editing.selection.value = undefined;
31
31
  editing.cancelPlacing();
32
+ pins.cancel();
33
+ pins.isPlacing.value = false;
32
34
  }
33
35
  post(previewInspectMessage(!isOn));
34
36
  });