@antelopejs/dms 0.19.6 → 0.20.1

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 (1312) hide show
  1. package/CHANGELOG.md +257 -1
  2. package/README.md +23 -14
  3. package/bin/control/backend-mode.test.mjs +112 -0
  4. package/bin/control/backend-records.test.mjs +154 -100
  5. package/bin/control/backend.mjs +42 -25
  6. package/bin/control/backend.test.mjs +22 -1
  7. package/bin/control/base.mjs +6 -1
  8. package/bin/control/build-cache.mjs +18 -6
  9. package/bin/control/build-key-refusals.test.mjs +8 -8
  10. package/bin/control/build-key.mjs +18 -13
  11. package/bin/control/build-key.test.mjs +26 -1
  12. package/bin/control/build-layout.test.mjs +57 -14
  13. package/bin/control/commands-stack.mjs +1 -0
  14. package/bin/control/forwarder.test.mjs +128 -2
  15. package/bin/control/helpers/ephemeral-range.mjs +18 -0
  16. package/bin/control/helpers/fake-run.mjs +86 -17
  17. package/bin/control/helpers/key-fixture.mjs +9 -6
  18. package/bin/control/helpers/narrow-range.mjs +35 -0
  19. package/bin/control/helpers/pids.mjs +10 -0
  20. package/bin/control/helpers/tree.mjs +4 -4
  21. package/bin/control/journey-load.mjs +49 -0
  22. package/bin/control/journey.mjs +6 -41
  23. package/bin/control/journey.test.mjs +100 -41
  24. package/bin/control/mail.mjs +8 -2
  25. package/bin/control/module-root.mjs +7 -3
  26. package/bin/control/module-root.test.mjs +7 -5
  27. package/bin/control/mongo-server.test.mjs +64 -19
  28. package/bin/control/mongo.mjs +12 -3
  29. package/bin/control/namespaces.test.mjs +50 -31
  30. package/bin/control/options.mjs +1 -0
  31. package/bin/control/processes.mjs +72 -1
  32. package/bin/control/processes.test.mjs +98 -64
  33. package/bin/control/renderer.test.mjs +2 -2
  34. package/bin/control/run-ports.test.mjs +141 -0
  35. package/bin/control/run-state.mjs +9 -3
  36. package/bin/control/stack.mjs +93 -14
  37. package/bin/control/tab.test.mjs +1 -1
  38. package/bin/control/verify/formal.test.mjs +2 -2
  39. package/bin/control/verify/map.mjs +1 -1
  40. package/bin/control/verify/verdict.mjs +1 -1
  41. package/bin/dms-control.mjs +7 -3
  42. package/checks/dms-components.d.mts +38 -0
  43. package/data/mockup-example/spec.json +209 -0
  44. package/data/mockup-spec.schema.json +10957 -0
  45. package/data/module-store/catalog.json +1 -7
  46. package/dist/attachments/read.js +2 -1
  47. package/dist/attachments/read.js.map +1 -1
  48. package/dist/attachments/save.js +2 -1
  49. package/dist/attachments/save.js.map +1 -1
  50. package/dist/attachments/stored-claims.d.ts +2 -0
  51. package/dist/attachments/stored-claims.js +21 -0
  52. package/dist/attachments/stored-claims.js.map +1 -0
  53. package/dist/branding/index.d.ts +2 -0
  54. package/dist/branding/index.js +19 -0
  55. package/dist/branding/index.js.map +1 -0
  56. package/dist/branding/page.d.ts +10 -0
  57. package/dist/branding/page.js +22 -0
  58. package/dist/branding/page.js.map +1 -0
  59. package/dist/branding/register.d.ts +1 -0
  60. package/dist/branding/register.js +10 -0
  61. package/dist/branding/register.js.map +1 -0
  62. package/dist/branding/routes.d.ts +18 -0
  63. package/dist/branding/routes.js +78 -0
  64. package/dist/branding/routes.js.map +1 -0
  65. package/dist/branding/theme-schemas.d.ts +484 -0
  66. package/dist/branding/theme-schemas.js +52 -0
  67. package/dist/branding/theme-schemas.js.map +1 -0
  68. package/dist/builder.d.ts +2 -0
  69. package/dist/builder.js +64 -0
  70. package/dist/builder.js.map +1 -0
  71. package/dist/config/internal/state.d.ts +20 -0
  72. package/dist/config/internal/state.js +12 -0
  73. package/dist/config/internal/state.js.map +1 -1
  74. package/dist/crons/cleanup-user-invites.js +7 -1
  75. package/dist/crons/cleanup-user-invites.js.map +1 -1
  76. package/dist/db/guard-row.d.ts +2 -2
  77. package/dist/db/guard-row.js +1 -1
  78. package/dist/db/guard-row.js.map +1 -1
  79. package/dist/db/index.d.ts +1 -0
  80. package/dist/db/index.js +1 -0
  81. package/dist/db/index.js.map +1 -1
  82. package/dist/db/models/attachments.model.d.ts +3 -3
  83. package/dist/db/models/setupToken.model.d.ts +3 -3
  84. package/dist/db/models/signInAttempts.model.d.ts +3 -3
  85. package/dist/db/models/systemState.model.d.ts +3 -3
  86. package/dist/db/models/userEmailChanges.model.d.ts +3 -3
  87. package/dist/db/models/userKnownDevices.model.d.ts +3 -3
  88. package/dist/db/models/userNotificationPreferences.model.d.ts +3 -3
  89. package/dist/db/models/userNotificationPreferences.model.js +2 -1
  90. package/dist/db/models/userNotificationPreferences.model.js.map +1 -1
  91. package/dist/db/models/userNotifications.model.d.ts +3 -3
  92. package/dist/db/row-id.d.ts +4 -0
  93. package/dist/db/row-id.js +10 -0
  94. package/dist/db/row-id.js.map +1 -0
  95. package/dist/dev/module-update-notifications.js +2 -4
  96. package/dist/dev/module-update-notifications.js.map +1 -1
  97. package/dist/implementations/dms/connection-access.d.ts +8 -0
  98. package/dist/implementations/dms/connection-access.js +23 -0
  99. package/dist/implementations/dms/connection-access.js.map +1 -0
  100. package/dist/implementations/dms/dev-handshake.js +2 -5
  101. package/dist/implementations/dms/dev-handshake.js.map +1 -1
  102. package/dist/implementations/dms/page/access.d.ts +8 -0
  103. package/dist/implementations/dms/page/access.js +15 -3
  104. package/dist/implementations/dms/page/access.js.map +1 -1
  105. package/dist/implementations/dms/page/controller.d.ts +5 -5
  106. package/dist/implementations/dms/page/controller.js +9 -6
  107. package/dist/implementations/dms/page/controller.js.map +1 -1
  108. package/dist/implementations/dms/page/preview-menu.js +1 -1
  109. package/dist/implementations/dms/page/preview-menu.js.map +1 -1
  110. package/dist/implementations/dms/page/preview-models.d.ts +10 -10
  111. package/dist/implementations/dms/page/registry.js +2 -2
  112. package/dist/implementations/dms/page/registry.js.map +1 -1
  113. package/dist/implementations/dms/page/types.d.ts +1 -1
  114. package/dist/implementations/dms/page.d.ts +2 -1
  115. package/dist/implementations/dms/page.js +2 -1
  116. package/dist/implementations/dms/page.js.map +1 -1
  117. package/dist/implementations/dms-auth/index.d.ts +3 -4
  118. package/dist/implementations/dms-auth/index.js +39 -62
  119. package/dist/implementations/dms-auth/index.js.map +1 -1
  120. package/dist/implementations/dms-auth/session-handoff.d.ts +1 -1
  121. package/dist/implementations/dms-auth/session-handoff.js +7 -22
  122. package/dist/implementations/dms-auth/session-handoff.js.map +1 -1
  123. package/dist/implementations/dms-auth/token-secret.d.ts +7 -1
  124. package/dist/implementations/dms-auth/token-secret.js +59 -4
  125. package/dist/implementations/dms-auth/token-secret.js.map +1 -1
  126. package/dist/implementations/dms-auth/token-session.d.ts +2 -2
  127. package/dist/implementations/dms-auth/token-session.js +0 -7
  128. package/dist/implementations/dms-auth/token-session.js.map +1 -1
  129. package/dist/implementations/dms-base/bulk-selection.js +5 -2
  130. package/dist/implementations/dms-base/bulk-selection.js.map +1 -1
  131. package/dist/implementations/dms-base/export-jobs.d.ts +1 -4
  132. package/dist/implementations/dms-base/export-jobs.js +8 -12
  133. package/dist/implementations/dms-base/export-jobs.js.map +1 -1
  134. package/dist/implementations/dms-base/footer-summary.d.ts +2 -1
  135. package/dist/implementations/dms-base/footer-summary.js +1 -1
  136. package/dist/implementations/dms-base/footer-summary.js.map +1 -1
  137. package/dist/implementations/dms-base/search-route.d.ts +3 -3
  138. package/dist/implementations/dms-base/search-route.js +6 -3
  139. package/dist/implementations/dms-base/search-route.js.map +1 -1
  140. package/dist/implementations/dms-base/table-view.d.ts +2 -2
  141. package/dist/implementations/dms-base/table-view.js +21 -12
  142. package/dist/implementations/dms-base/table-view.js.map +1 -1
  143. package/dist/implementations/dms-builder/database.d.ts +13 -0
  144. package/dist/implementations/dms-builder/database.js +126 -0
  145. package/dist/implementations/dms-builder/database.js.map +1 -0
  146. package/dist/implementations/dms-builder/engine/access-grant.d.ts +2 -0
  147. package/dist/implementations/dms-builder/engine/access-grant.js +275 -0
  148. package/dist/implementations/dms-builder/engine/access-grant.js.map +1 -0
  149. package/dist/implementations/dms-builder/engine/access-mongodb.d.ts +20 -0
  150. package/dist/implementations/dms-builder/engine/access-mongodb.js +30 -0
  151. package/dist/implementations/dms-builder/engine/access-mongodb.js.map +1 -0
  152. package/dist/implementations/dms-builder/engine/access-mysql.d.ts +8 -0
  153. package/dist/implementations/dms-builder/engine/access-mysql.js +11 -0
  154. package/dist/implementations/dms-builder/engine/access-mysql.js.map +1 -0
  155. package/dist/implementations/dms-builder/engine/access-postgres.d.ts +8 -0
  156. package/dist/implementations/dms-builder/engine/access-postgres.js +11 -0
  157. package/dist/implementations/dms-builder/engine/access-postgres.js.map +1 -0
  158. package/dist/implementations/dms-builder/engine/analysis-fields.d.ts +25 -0
  159. package/dist/implementations/dms-builder/engine/analysis-fields.js +272 -0
  160. package/dist/implementations/dms-builder/engine/analysis-fields.js.map +1 -0
  161. package/dist/implementations/dms-builder/engine/analysis-input.d.ts +28 -0
  162. package/dist/implementations/dms-builder/engine/analysis-input.js +38 -0
  163. package/dist/implementations/dms-builder/engine/analysis-input.js.map +1 -0
  164. package/dist/implementations/dms-builder/engine/analysis-job.d.ts +4 -0
  165. package/dist/implementations/dms-builder/engine/analysis-job.js +195 -0
  166. package/dist/implementations/dms-builder/engine/analysis-job.js.map +1 -0
  167. package/dist/implementations/dms-builder/engine/analysis-names.d.ts +14 -0
  168. package/dist/implementations/dms-builder/engine/analysis-names.js +94 -0
  169. package/dist/implementations/dms-builder/engine/analysis-names.js.map +1 -0
  170. package/dist/implementations/dms-builder/engine/analysis-relations.d.ts +19 -0
  171. package/dist/implementations/dms-builder/engine/analysis-relations.js +145 -0
  172. package/dist/implementations/dms-builder/engine/analysis-relations.js.map +1 -0
  173. package/dist/implementations/dms-builder/engine/analysis.d.ts +5 -0
  174. package/dist/implementations/dms-builder/engine/analysis.js +185 -0
  175. package/dist/implementations/dms-builder/engine/analysis.js.map +1 -0
  176. package/dist/implementations/dms-builder/engine/block-target.d.ts +23 -0
  177. package/dist/implementations/dms-builder/engine/block-target.js +80 -0
  178. package/dist/implementations/dms-builder/engine/block-target.js.map +1 -0
  179. package/dist/implementations/dms-builder/engine/block-tree.d.ts +3 -0
  180. package/dist/implementations/dms-builder/engine/block-tree.js +130 -0
  181. package/dist/implementations/dms-builder/engine/block-tree.js.map +1 -0
  182. package/dist/implementations/dms-builder/engine/catalog-connection.d.ts +5 -0
  183. package/dist/implementations/dms-builder/engine/catalog-connection.js +73 -0
  184. package/dist/implementations/dms-builder/engine/catalog-connection.js.map +1 -0
  185. package/dist/implementations/dms-builder/engine/catalog-inference.d.ts +4 -0
  186. package/dist/implementations/dms-builder/engine/catalog-inference.js +387 -0
  187. package/dist/implementations/dms-builder/engine/catalog-inference.js.map +1 -0
  188. package/dist/implementations/dms-builder/engine/catalog.d.ts +6 -0
  189. package/dist/implementations/dms-builder/engine/catalog.js +128 -0
  190. package/dist/implementations/dms-builder/engine/catalog.js.map +1 -0
  191. package/dist/implementations/dms-builder/engine/chain.d.ts +21 -0
  192. package/dist/implementations/dms-builder/engine/chain.js +98 -0
  193. package/dist/implementations/dms-builder/engine/chain.js.map +1 -0
  194. package/dist/implementations/dms-builder/engine/column-display.d.ts +41 -0
  195. package/dist/implementations/dms-builder/engine/column-display.js +267 -0
  196. package/dist/implementations/dms-builder/engine/column-display.js.map +1 -0
  197. package/dist/implementations/dms-builder/engine/column-label.d.ts +5 -0
  198. package/dist/implementations/dms-builder/engine/column-label.js +21 -0
  199. package/dist/implementations/dms-builder/engine/column-label.js.map +1 -0
  200. package/dist/implementations/dms-builder/engine/compose-page.d.ts +3 -0
  201. package/dist/implementations/dms-builder/engine/compose-page.js +346 -0
  202. package/dist/implementations/dms-builder/engine/compose-page.js.map +1 -0
  203. package/dist/implementations/dms-builder/engine/config-literal.d.ts +30 -0
  204. package/dist/implementations/dms-builder/engine/config-literal.js +401 -0
  205. package/dist/implementations/dms-builder/engine/config-literal.js.map +1 -0
  206. package/dist/implementations/dms-builder/engine/connection-access-config.d.ts +11 -0
  207. package/dist/implementations/dms-builder/engine/connection-access-config.js +261 -0
  208. package/dist/implementations/dms-builder/engine/connection-access-config.js.map +1 -0
  209. package/dist/implementations/dms-builder/engine/connection-access.d.ts +9 -0
  210. package/dist/implementations/dms-builder/engine/connection-access.js +207 -0
  211. package/dist/implementations/dms-builder/engine/connection-access.js.map +1 -0
  212. package/dist/implementations/dms-builder/engine/database-access.d.ts +21 -0
  213. package/dist/implementations/dms-builder/engine/database-access.js +98 -0
  214. package/dist/implementations/dms-builder/engine/database-access.js.map +1 -0
  215. package/dist/implementations/dms-builder/engine/database-check-input.d.ts +22 -0
  216. package/dist/implementations/dms-builder/engine/database-check-input.js +42 -0
  217. package/dist/implementations/dms-builder/engine/database-check-input.js.map +1 -0
  218. package/dist/implementations/dms-builder/engine/database-check.d.ts +4 -0
  219. package/dist/implementations/dms-builder/engine/database-check.js +37 -0
  220. package/dist/implementations/dms-builder/engine/database-check.js.map +1 -0
  221. package/dist/implementations/dms-builder/engine/database-connection-remove.d.ts +5 -0
  222. package/dist/implementations/dms-builder/engine/database-connection-remove.js +167 -0
  223. package/dist/implementations/dms-builder/engine/database-connection-remove.js.map +1 -0
  224. package/dist/implementations/dms-builder/engine/database-connection.d.ts +7 -0
  225. package/dist/implementations/dms-builder/engine/database-connection.js +310 -0
  226. package/dist/implementations/dms-builder/engine/database-connection.js.map +1 -0
  227. package/dist/implementations/dms-builder/engine/database-host.d.ts +2 -0
  228. package/dist/implementations/dms-builder/engine/database-host.js +37 -0
  229. package/dist/implementations/dms-builder/engine/database-host.js.map +1 -0
  230. package/dist/implementations/dms-builder/engine/database-pin.d.ts +12 -0
  231. package/dist/implementations/dms-builder/engine/database-pin.js +157 -0
  232. package/dist/implementations/dms-builder/engine/database-pin.js.map +1 -0
  233. package/dist/implementations/dms-builder/engine/database-repair.d.ts +5 -0
  234. package/dist/implementations/dms-builder/engine/database-repair.js +91 -0
  235. package/dist/implementations/dms-builder/engine/database-repair.js.map +1 -0
  236. package/dist/implementations/dms-builder/engine/describe-value.d.ts +2 -0
  237. package/dist/implementations/dms-builder/engine/describe-value.js +16 -0
  238. package/dist/implementations/dms-builder/engine/describe-value.js.map +1 -0
  239. package/dist/implementations/dms-builder/engine/display-defaults.d.ts +15 -0
  240. package/dist/implementations/dms-builder/engine/display-defaults.js +96 -0
  241. package/dist/implementations/dms-builder/engine/display-defaults.js.map +1 -0
  242. package/dist/implementations/dms-builder/engine/dms-database.d.ts +3 -0
  243. package/dist/implementations/dms-builder/engine/dms-database.js +70 -0
  244. package/dist/implementations/dms-builder/engine/dms-database.js.map +1 -0
  245. package/dist/implementations/dms-builder/engine/driver-packages.d.ts +3 -0
  246. package/dist/implementations/dms-builder/engine/driver-packages.js +87 -0
  247. package/dist/implementations/dms-builder/engine/driver-packages.js.map +1 -0
  248. package/dist/implementations/dms-builder/engine/emit.d.ts +12 -0
  249. package/dist/implementations/dms-builder/engine/emit.js +157 -0
  250. package/dist/implementations/dms-builder/engine/emit.js.map +1 -0
  251. package/dist/implementations/dms-builder/engine/entry-connections.d.ts +2 -0
  252. package/dist/implementations/dms-builder/engine/entry-connections.js +123 -0
  253. package/dist/implementations/dms-builder/engine/entry-connections.js.map +1 -0
  254. package/dist/implementations/dms-builder/engine/env-lines.d.ts +5 -0
  255. package/dist/implementations/dms-builder/engine/env-lines.js +66 -0
  256. package/dist/implementations/dms-builder/engine/env-lines.js.map +1 -0
  257. package/dist/implementations/dms-builder/engine/expression.d.ts +6 -0
  258. package/dist/implementations/dms-builder/engine/expression.js +90 -0
  259. package/dist/implementations/dms-builder/engine/expression.js.map +1 -0
  260. package/dist/implementations/dms-builder/engine/file-batch.d.ts +17 -0
  261. package/dist/implementations/dms-builder/engine/file-batch.js +154 -0
  262. package/dist/implementations/dms-builder/engine/file-batch.js.map +1 -0
  263. package/dist/implementations/dms-builder/engine/file-paths.d.ts +3 -0
  264. package/dist/implementations/dms-builder/engine/file-paths.js +18 -0
  265. package/dist/implementations/dms-builder/engine/file-paths.js.map +1 -0
  266. package/dist/implementations/dms-builder/engine/guards.d.ts +8 -0
  267. package/dist/implementations/dms-builder/engine/guards.js +27 -0
  268. package/dist/implementations/dms-builder/engine/guards.js.map +1 -0
  269. package/dist/implementations/dms-builder/engine/held-value.d.ts +2 -0
  270. package/dist/implementations/dms-builder/engine/held-value.js +37 -0
  271. package/dist/implementations/dms-builder/engine/held-value.js.map +1 -0
  272. package/dist/implementations/dms-builder/engine/index.d.ts +65 -0
  273. package/dist/implementations/dms-builder/engine/index.js +84 -0
  274. package/dist/implementations/dms-builder/engine/index.js.map +1 -0
  275. package/dist/implementations/dms-builder/engine/indexed-project.d.ts +7 -0
  276. package/dist/implementations/dms-builder/engine/indexed-project.js +18 -0
  277. package/dist/implementations/dms-builder/engine/indexed-project.js.map +1 -0
  278. package/dist/implementations/dms-builder/engine/inherited-variables.d.ts +2 -0
  279. package/dist/implementations/dms-builder/engine/inherited-variables.js +19 -0
  280. package/dist/implementations/dms-builder/engine/inherited-variables.js.map +1 -0
  281. package/dist/implementations/dms-builder/engine/interface-capabilities.d.ts +1 -0
  282. package/dist/implementations/dms-builder/engine/interface-capabilities.js +28 -0
  283. package/dist/implementations/dms-builder/engine/interface-capabilities.js.map +1 -0
  284. package/dist/implementations/dms-builder/engine/interface-ids.d.ts +2 -0
  285. package/dist/implementations/dms-builder/engine/interface-ids.js +6 -0
  286. package/dist/implementations/dms-builder/engine/interface-ids.js.map +1 -0
  287. package/dist/implementations/dms-builder/engine/literal-overrides.d.ts +7 -0
  288. package/dist/implementations/dms-builder/engine/literal-overrides.js +54 -0
  289. package/dist/implementations/dms-builder/engine/literal-overrides.js.map +1 -0
  290. package/dist/implementations/dms-builder/engine/literals.d.ts +9 -0
  291. package/dist/implementations/dms-builder/engine/literals.js +68 -0
  292. package/dist/implementations/dms-builder/engine/literals.js.map +1 -0
  293. package/dist/implementations/dms-builder/engine/local-bindings.d.ts +4 -0
  294. package/dist/implementations/dms-builder/engine/local-bindings.js +165 -0
  295. package/dist/implementations/dms-builder/engine/local-bindings.js.map +1 -0
  296. package/dist/implementations/dms-builder/engine/map-resources-batch.d.ts +5 -0
  297. package/dist/implementations/dms-builder/engine/map-resources-batch.js +142 -0
  298. package/dist/implementations/dms-builder/engine/map-resources-batch.js.map +1 -0
  299. package/dist/implementations/dms-builder/engine/map-resources-pages.d.ts +12 -0
  300. package/dist/implementations/dms-builder/engine/map-resources-pages.js +242 -0
  301. package/dist/implementations/dms-builder/engine/map-resources-pages.js.map +1 -0
  302. package/dist/implementations/dms-builder/engine/map-resources-plan.d.ts +54 -0
  303. package/dist/implementations/dms-builder/engine/map-resources-plan.js +269 -0
  304. package/dist/implementations/dms-builder/engine/map-resources-plan.js.map +1 -0
  305. package/dist/implementations/dms-builder/engine/map-resources-references.d.ts +4 -0
  306. package/dist/implementations/dms-builder/engine/map-resources-references.js +74 -0
  307. package/dist/implementations/dms-builder/engine/map-resources-references.js.map +1 -0
  308. package/dist/implementations/dms-builder/engine/map-resources-repairs.d.ts +18 -0
  309. package/dist/implementations/dms-builder/engine/map-resources-repairs.js +105 -0
  310. package/dist/implementations/dms-builder/engine/map-resources-repairs.js.map +1 -0
  311. package/dist/implementations/dms-builder/engine/map-resources.d.ts +6 -0
  312. package/dist/implementations/dms-builder/engine/map-resources.js +347 -0
  313. package/dist/implementations/dms-builder/engine/map-resources.js.map +1 -0
  314. package/dist/implementations/dms-builder/engine/mapped-choices.d.ts +2 -0
  315. package/dist/implementations/dms-builder/engine/mapped-choices.js +153 -0
  316. package/dist/implementations/dms-builder/engine/mapped-choices.js.map +1 -0
  317. package/dist/implementations/dms-builder/engine/mapped-displays.d.ts +11 -0
  318. package/dist/implementations/dms-builder/engine/mapped-displays.js +56 -0
  319. package/dist/implementations/dms-builder/engine/mapped-displays.js.map +1 -0
  320. package/dist/implementations/dms-builder/engine/mapped-modules.d.ts +10 -0
  321. package/dist/implementations/dms-builder/engine/mapped-modules.js +120 -0
  322. package/dist/implementations/dms-builder/engine/mapped-modules.js.map +1 -0
  323. package/dist/implementations/dms-builder/engine/mapped-routes.d.ts +2 -0
  324. package/dist/implementations/dms-builder/engine/mapped-routes.js +11 -0
  325. package/dist/implementations/dms-builder/engine/mapped-routes.js.map +1 -0
  326. package/dist/implementations/dms-builder/engine/mapping-refusal.d.ts +3 -0
  327. package/dist/implementations/dms-builder/engine/mapping-refusal.js +11 -0
  328. package/dist/implementations/dms-builder/engine/mapping-refusal.js.map +1 -0
  329. package/dist/implementations/dms-builder/engine/mixed-types.d.ts +2 -0
  330. package/dist/implementations/dms-builder/engine/mixed-types.js +32 -0
  331. package/dist/implementations/dms-builder/engine/mixed-types.js.map +1 -0
  332. package/dist/implementations/dms-builder/engine/model-methods-keep.d.ts +3 -0
  333. package/dist/implementations/dms-builder/engine/model-methods-keep.js +25 -0
  334. package/dist/implementations/dms-builder/engine/model-methods-keep.js.map +1 -0
  335. package/dist/implementations/dms-builder/engine/module-loader.d.ts +5 -0
  336. package/dist/implementations/dms-builder/engine/module-loader.js +30 -0
  337. package/dist/implementations/dms-builder/engine/module-loader.js.map +1 -0
  338. package/dist/implementations/dms-builder/engine/module-reload.d.ts +21 -0
  339. package/dist/implementations/dms-builder/engine/module-reload.js +90 -0
  340. package/dist/implementations/dms-builder/engine/module-reload.js.map +1 -0
  341. package/dist/implementations/dms-builder/engine/modules.d.ts +17 -0
  342. package/dist/implementations/dms-builder/engine/modules.js +193 -0
  343. package/dist/implementations/dms-builder/engine/modules.js.map +1 -0
  344. package/dist/implementations/dms-builder/engine/name-words.d.ts +3 -0
  345. package/dist/implementations/dms-builder/engine/name-words.js +26 -0
  346. package/dist/implementations/dms-builder/engine/name-words.js.map +1 -0
  347. package/dist/implementations/dms-builder/engine/native-kind.d.ts +1 -0
  348. package/dist/implementations/dms-builder/engine/native-kind.js +41 -0
  349. package/dist/implementations/dms-builder/engine/native-kind.js.map +1 -0
  350. package/dist/implementations/dms-builder/engine/ops-blocks.d.ts +25 -0
  351. package/dist/implementations/dms-builder/engine/ops-blocks.js +334 -0
  352. package/dist/implementations/dms-builder/engine/ops-blocks.js.map +1 -0
  353. package/dist/implementations/dms-builder/engine/ops-categories.d.ts +6 -0
  354. package/dist/implementations/dms-builder/engine/ops-categories.js +178 -0
  355. package/dist/implementations/dms-builder/engine/ops-categories.js.map +1 -0
  356. package/dist/implementations/dms-builder/engine/ops.d.ts +40 -0
  357. package/dist/implementations/dms-builder/engine/ops.js +383 -0
  358. package/dist/implementations/dms-builder/engine/ops.js.map +1 -0
  359. package/dist/implementations/dms-builder/engine/options-patch.d.ts +9 -0
  360. package/dist/implementations/dms-builder/engine/options-patch.js +58 -0
  361. package/dist/implementations/dms-builder/engine/options-patch.js.map +1 -0
  362. package/dist/implementations/dms-builder/engine/own-connections.d.ts +4 -0
  363. package/dist/implementations/dms-builder/engine/own-connections.js +21 -0
  364. package/dist/implementations/dms-builder/engine/own-connections.js.map +1 -0
  365. package/dist/implementations/dms-builder/engine/page-access.d.ts +31 -0
  366. package/dist/implementations/dms-builder/engine/page-access.js +159 -0
  367. package/dist/implementations/dms-builder/engine/page-access.js.map +1 -0
  368. package/dist/implementations/dms-builder/engine/page-category-move.d.ts +16 -0
  369. package/dist/implementations/dms-builder/engine/page-category-move.js +121 -0
  370. package/dist/implementations/dms-builder/engine/page-category-move.js.map +1 -0
  371. package/dist/implementations/dms-builder/engine/page-delete.d.ts +2 -0
  372. package/dist/implementations/dms-builder/engine/page-delete.js +53 -0
  373. package/dist/implementations/dms-builder/engine/page-delete.js.map +1 -0
  374. package/dist/implementations/dms-builder/engine/page-draft-validation.d.ts +2 -0
  375. package/dist/implementations/dms-builder/engine/page-draft-validation.js +200 -0
  376. package/dist/implementations/dms-builder/engine/page-draft-validation.js.map +1 -0
  377. package/dist/implementations/dms-builder/engine/page-draft.d.ts +4 -0
  378. package/dist/implementations/dms-builder/engine/page-draft.js +336 -0
  379. package/dist/implementations/dms-builder/engine/page-draft.js.map +1 -0
  380. package/dist/implementations/dms-builder/engine/page-structure.d.ts +5 -0
  381. package/dist/implementations/dms-builder/engine/page-structure.js +48 -0
  382. package/dist/implementations/dms-builder/engine/page-structure.js.map +1 -0
  383. package/dist/implementations/dms-builder/engine/paths.d.ts +7 -0
  384. package/dist/implementations/dms-builder/engine/paths.js +31 -0
  385. package/dist/implementations/dms-builder/engine/paths.js.map +1 -0
  386. package/dist/implementations/dms-builder/engine/permissions.d.ts +9 -0
  387. package/dist/implementations/dms-builder/engine/permissions.js +43 -0
  388. package/dist/implementations/dms-builder/engine/permissions.js.map +1 -0
  389. package/dist/implementations/dms-builder/engine/placement.d.ts +6 -0
  390. package/dist/implementations/dms-builder/engine/placement.js +55 -0
  391. package/dist/implementations/dms-builder/engine/placement.js.map +1 -0
  392. package/dist/implementations/dms-builder/engine/planned-page.d.ts +9 -0
  393. package/dist/implementations/dms-builder/engine/planned-page.js +14 -0
  394. package/dist/implementations/dms-builder/engine/planned-page.js.map +1 -0
  395. package/dist/implementations/dms-builder/engine/preview.d.ts +2 -0
  396. package/dist/implementations/dms-builder/engine/preview.js +346 -0
  397. package/dist/implementations/dms-builder/engine/preview.js.map +1 -0
  398. package/dist/implementations/dms-builder/engine/price-currency.d.ts +5 -0
  399. package/dist/implementations/dms-builder/engine/price-currency.js +53 -0
  400. package/dist/implementations/dms-builder/engine/price-currency.js.map +1 -0
  401. package/dist/implementations/dms-builder/engine/probe-client.d.ts +15 -0
  402. package/dist/implementations/dms-builder/engine/probe-client.js +41 -0
  403. package/dist/implementations/dms-builder/engine/probe-client.js.map +1 -0
  404. package/dist/implementations/dms-builder/engine/probe-connections.d.ts +10 -0
  405. package/dist/implementations/dms-builder/engine/probe-connections.js +43 -0
  406. package/dist/implementations/dms-builder/engine/probe-connections.js.map +1 -0
  407. package/dist/implementations/dms-builder/engine/probe-mongodb.d.ts +2 -0
  408. package/dist/implementations/dms-builder/engine/probe-mongodb.js +92 -0
  409. package/dist/implementations/dms-builder/engine/probe-mongodb.js.map +1 -0
  410. package/dist/implementations/dms-builder/engine/probe-mysql.d.ts +2 -0
  411. package/dist/implementations/dms-builder/engine/probe-mysql.js +136 -0
  412. package/dist/implementations/dms-builder/engine/probe-mysql.js.map +1 -0
  413. package/dist/implementations/dms-builder/engine/probe-postgres.d.ts +2 -0
  414. package/dist/implementations/dms-builder/engine/probe-postgres.js +80 -0
  415. package/dist/implementations/dms-builder/engine/probe-postgres.js.map +1 -0
  416. package/dist/implementations/dms-builder/engine/probe-rethinkdb.d.ts +2 -0
  417. package/dist/implementations/dms-builder/engine/probe-rethinkdb.js +92 -0
  418. package/dist/implementations/dms-builder/engine/probe-rethinkdb.js.map +1 -0
  419. package/dist/implementations/dms-builder/engine/project-config-entry.d.ts +5 -0
  420. package/dist/implementations/dms-builder/engine/project-config-entry.js +164 -0
  421. package/dist/implementations/dms-builder/engine/project-config-entry.js.map +1 -0
  422. package/dist/implementations/dms-builder/engine/project-config-ops.d.ts +2 -0
  423. package/dist/implementations/dms-builder/engine/project-config-ops.js +184 -0
  424. package/dist/implementations/dms-builder/engine/project-config-ops.js.map +1 -0
  425. package/dist/implementations/dms-builder/engine/project-config-readers.d.ts +15 -0
  426. package/dist/implementations/dms-builder/engine/project-config-readers.js +125 -0
  427. package/dist/implementations/dms-builder/engine/project-config-readers.js.map +1 -0
  428. package/dist/implementations/dms-builder/engine/project-config-remove.d.ts +4 -0
  429. package/dist/implementations/dms-builder/engine/project-config-remove.js +104 -0
  430. package/dist/implementations/dms-builder/engine/project-config-remove.js.map +1 -0
  431. package/dist/implementations/dms-builder/engine/project-config-steps.d.ts +3 -0
  432. package/dist/implementations/dms-builder/engine/project-config-steps.js +30 -0
  433. package/dist/implementations/dms-builder/engine/project-config-steps.js.map +1 -0
  434. package/dist/implementations/dms-builder/engine/project-config-text.d.ts +3 -0
  435. package/dist/implementations/dms-builder/engine/project-config-text.js +36 -0
  436. package/dist/implementations/dms-builder/engine/project-config-text.js.map +1 -0
  437. package/dist/implementations/dms-builder/engine/project-config.d.ts +34 -0
  438. package/dist/implementations/dms-builder/engine/project-config.js +236 -0
  439. package/dist/implementations/dms-builder/engine/project-config.js.map +1 -0
  440. package/dist/implementations/dms-builder/engine/project-env-loading.d.ts +4 -0
  441. package/dist/implementations/dms-builder/engine/project-env-loading.js +175 -0
  442. package/dist/implementations/dms-builder/engine/project-env-loading.js.map +1 -0
  443. package/dist/implementations/dms-builder/engine/project-env.d.ts +16 -0
  444. package/dist/implementations/dms-builder/engine/project-env.js +199 -0
  445. package/dist/implementations/dms-builder/engine/project-env.js.map +1 -0
  446. package/dist/implementations/dms-builder/engine/project-scaffold.d.ts +31 -0
  447. package/dist/implementations/dms-builder/engine/project-scaffold.js +209 -0
  448. package/dist/implementations/dms-builder/engine/project-scaffold.js.map +1 -0
  449. package/dist/implementations/dms-builder/engine/project.d.ts +24 -0
  450. package/dist/implementations/dms-builder/engine/project.js +281 -0
  451. package/dist/implementations/dms-builder/engine/project.js.map +1 -0
  452. package/dist/implementations/dms-builder/engine/query-chain-series.d.ts +11 -0
  453. package/dist/implementations/dms-builder/engine/query-chain-series.js +288 -0
  454. package/dist/implementations/dms-builder/engine/query-chain-series.js.map +1 -0
  455. package/dist/implementations/dms-builder/engine/query-chain.d.ts +40 -0
  456. package/dist/implementations/dms-builder/engine/query-chain.js +181 -0
  457. package/dist/implementations/dms-builder/engine/query-chain.js.map +1 -0
  458. package/dist/implementations/dms-builder/engine/query-emit.d.ts +42 -0
  459. package/dist/implementations/dms-builder/engine/query-emit.js +200 -0
  460. package/dist/implementations/dms-builder/engine/query-emit.js.map +1 -0
  461. package/dist/implementations/dms-builder/engine/query-ops-emit.d.ts +11 -0
  462. package/dist/implementations/dms-builder/engine/query-ops-emit.js +284 -0
  463. package/dist/implementations/dms-builder/engine/query-ops-emit.js.map +1 -0
  464. package/dist/implementations/dms-builder/engine/query-ops.d.ts +32 -0
  465. package/dist/implementations/dms-builder/engine/query-ops.js +216 -0
  466. package/dist/implementations/dms-builder/engine/query-ops.js.map +1 -0
  467. package/dist/implementations/dms-builder/engine/query-plan-execute.d.ts +51 -0
  468. package/dist/implementations/dms-builder/engine/query-plan-execute.js +129 -0
  469. package/dist/implementations/dms-builder/engine/query-plan-execute.js.map +1 -0
  470. package/dist/implementations/dms-builder/engine/query-plan.d.ts +39 -0
  471. package/dist/implementations/dms-builder/engine/query-plan.js +235 -0
  472. package/dist/implementations/dms-builder/engine/query-plan.js.map +1 -0
  473. package/dist/implementations/dms-builder/engine/query-preview.d.ts +11 -0
  474. package/dist/implementations/dms-builder/engine/query-preview.js +184 -0
  475. package/dist/implementations/dms-builder/engine/query-preview.js.map +1 -0
  476. package/dist/implementations/dms-builder/engine/query-route-response.d.ts +9 -0
  477. package/dist/implementations/dms-builder/engine/query-route-response.js +90 -0
  478. package/dist/implementations/dms-builder/engine/query-route-response.js.map +1 -0
  479. package/dist/implementations/dms-builder/engine/query-structure.d.ts +35 -0
  480. package/dist/implementations/dms-builder/engine/query-structure.js +330 -0
  481. package/dist/implementations/dms-builder/engine/query-structure.js.map +1 -0
  482. package/dist/implementations/dms-builder/engine/query-sync.d.ts +12 -0
  483. package/dist/implementations/dms-builder/engine/query-sync.js +153 -0
  484. package/dist/implementations/dms-builder/engine/query-sync.js.map +1 -0
  485. package/dist/implementations/dms-builder/engine/query-template-emit.d.ts +1 -0
  486. package/dist/implementations/dms-builder/engine/query-template-emit.js +103 -0
  487. package/dist/implementations/dms-builder/engine/query-template-emit.js.map +1 -0
  488. package/dist/implementations/dms-builder/engine/query-template-series.d.ts +2 -0
  489. package/dist/implementations/dms-builder/engine/query-template-series.js +206 -0
  490. package/dist/implementations/dms-builder/engine/query-template-series.js.map +1 -0
  491. package/dist/implementations/dms-builder/engine/query-template.d.ts +53 -0
  492. package/dist/implementations/dms-builder/engine/query-template.js +211 -0
  493. package/dist/implementations/dms-builder/engine/query-template.js.map +1 -0
  494. package/dist/implementations/dms-builder/engine/query-where.d.ts +3 -0
  495. package/dist/implementations/dms-builder/engine/query-where.js +73 -0
  496. package/dist/implementations/dms-builder/engine/query-where.js.map +1 -0
  497. package/dist/implementations/dms-builder/engine/relabel-columns.d.ts +6 -0
  498. package/dist/implementations/dms-builder/engine/relabel-columns.js +79 -0
  499. package/dist/implementations/dms-builder/engine/relabel-columns.js.map +1 -0
  500. package/dist/implementations/dms-builder/engine/reserved-names.d.ts +1 -0
  501. package/dist/implementations/dms-builder/engine/reserved-names.js +20 -0
  502. package/dist/implementations/dms-builder/engine/reserved-names.js.map +1 -0
  503. package/dist/implementations/dms-builder/engine/resource-data.d.ts +1 -0
  504. package/dist/implementations/dms-builder/engine/resource-data.js +18 -0
  505. package/dist/implementations/dms-builder/engine/resource-data.js.map +1 -0
  506. package/dist/implementations/dms-builder/engine/resource-emit-types.d.ts +42 -0
  507. package/dist/implementations/dms-builder/engine/resource-emit-types.js +383 -0
  508. package/dist/implementations/dms-builder/engine/resource-emit-types.js.map +1 -0
  509. package/dist/implementations/dms-builder/engine/resource-emit.d.ts +64 -0
  510. package/dist/implementations/dms-builder/engine/resource-emit.js +242 -0
  511. package/dist/implementations/dms-builder/engine/resource-emit.js.map +1 -0
  512. package/dist/implementations/dms-builder/engine/resource-index.d.ts +30 -0
  513. package/dist/implementations/dms-builder/engine/resource-index.js +259 -0
  514. package/dist/implementations/dms-builder/engine/resource-index.js.map +1 -0
  515. package/dist/implementations/dms-builder/engine/resource-ops-delete.d.ts +10 -0
  516. package/dist/implementations/dms-builder/engine/resource-ops-delete.js +379 -0
  517. package/dist/implementations/dms-builder/engine/resource-ops-delete.js.map +1 -0
  518. package/dist/implementations/dms-builder/engine/resource-ops.d.ts +23 -0
  519. package/dist/implementations/dms-builder/engine/resource-ops.js +210 -0
  520. package/dist/implementations/dms-builder/engine/resource-ops.js.map +1 -0
  521. package/dist/implementations/dms-builder/engine/resource-schema.d.ts +3 -0
  522. package/dist/implementations/dms-builder/engine/resource-schema.js +20 -0
  523. package/dist/implementations/dms-builder/engine/resource-schema.js.map +1 -0
  524. package/dist/implementations/dms-builder/engine/resource-structure.d.ts +18 -0
  525. package/dist/implementations/dms-builder/engine/resource-structure.js +299 -0
  526. package/dist/implementations/dms-builder/engine/resource-structure.js.map +1 -0
  527. package/dist/implementations/dms-builder/engine/resource-summary-route.d.ts +2 -0
  528. package/dist/implementations/dms-builder/engine/resource-summary-route.js +49 -0
  529. package/dist/implementations/dms-builder/engine/resource-summary-route.js.map +1 -0
  530. package/dist/implementations/dms-builder/engine/rethinkdb-client.d.ts +34 -0
  531. package/dist/implementations/dms-builder/engine/rethinkdb-client.js +3 -0
  532. package/dist/implementations/dms-builder/engine/rethinkdb-client.js.map +1 -0
  533. package/dist/implementations/dms-builder/engine/scalar-guards.d.ts +6 -0
  534. package/dist/implementations/dms-builder/engine/scalar-guards.js +23 -0
  535. package/dist/implementations/dms-builder/engine/scalar-guards.js.map +1 -0
  536. package/dist/implementations/dms-builder/engine/scan.d.ts +37 -0
  537. package/dist/implementations/dms-builder/engine/scan.js +249 -0
  538. package/dist/implementations/dms-builder/engine/scan.js.map +1 -0
  539. package/dist/implementations/dms-builder/engine/source-index.d.ts +9 -0
  540. package/dist/implementations/dms-builder/engine/source-index.js +66 -0
  541. package/dist/implementations/dms-builder/engine/source-index.js.map +1 -0
  542. package/dist/implementations/dms-builder/engine/source-options.d.ts +7 -0
  543. package/dist/implementations/dms-builder/engine/source-options.js +65 -0
  544. package/dist/implementations/dms-builder/engine/source-options.js.map +1 -0
  545. package/dist/implementations/dms-builder/engine/table-readers.d.ts +17 -0
  546. package/dist/implementations/dms-builder/engine/table-readers.js +141 -0
  547. package/dist/implementations/dms-builder/engine/table-readers.js.map +1 -0
  548. package/dist/implementations/dms-builder/engine/table-view-checks.d.ts +30 -0
  549. package/dist/implementations/dms-builder/engine/table-view-checks.js +146 -0
  550. package/dist/implementations/dms-builder/engine/table-view-checks.js.map +1 -0
  551. package/dist/implementations/dms-builder/engine/table-view-settings.d.ts +4 -0
  552. package/dist/implementations/dms-builder/engine/table-view-settings.js +298 -0
  553. package/dist/implementations/dms-builder/engine/table-view-settings.js.map +1 -0
  554. package/dist/implementations/dms-builder/engine/theme-app-config.d.ts +17 -0
  555. package/dist/implementations/dms-builder/engine/theme-app-config.js +317 -0
  556. package/dist/implementations/dms-builder/engine/theme-app-config.js.map +1 -0
  557. package/dist/implementations/dms-builder/engine/theme-assets.d.ts +18 -0
  558. package/dist/implementations/dms-builder/engine/theme-assets.js +160 -0
  559. package/dist/implementations/dms-builder/engine/theme-assets.js.map +1 -0
  560. package/dist/implementations/dms-builder/engine/theme-config-imports.d.ts +7 -0
  561. package/dist/implementations/dms-builder/engine/theme-config-imports.js +80 -0
  562. package/dist/implementations/dms-builder/engine/theme-config-imports.js.map +1 -0
  563. package/dist/implementations/dms-builder/engine/theme-draft.d.ts +2 -0
  564. package/dist/implementations/dms-builder/engine/theme-draft.js +35 -0
  565. package/dist/implementations/dms-builder/engine/theme-draft.js.map +1 -0
  566. package/dist/implementations/dms-builder/engine/theme-entry.d.ts +6 -0
  567. package/dist/implementations/dms-builder/engine/theme-entry.js +41 -0
  568. package/dist/implementations/dms-builder/engine/theme-entry.js.map +1 -0
  569. package/dist/implementations/dms-builder/engine/theme-font-catalog.d.ts +15 -0
  570. package/dist/implementations/dms-builder/engine/theme-font-catalog.js +82 -0
  571. package/dist/implementations/dms-builder/engine/theme-font-catalog.js.map +1 -0
  572. package/dist/implementations/dms-builder/engine/theme-fonts.d.ts +12 -0
  573. package/dist/implementations/dms-builder/engine/theme-fonts.js +154 -0
  574. package/dist/implementations/dms-builder/engine/theme-fonts.js.map +1 -0
  575. package/dist/implementations/dms-builder/engine/theme-layer.d.ts +11 -0
  576. package/dist/implementations/dms-builder/engine/theme-layer.js +99 -0
  577. package/dist/implementations/dms-builder/engine/theme-layer.js.map +1 -0
  578. package/dist/implementations/dms-builder/engine/theme-literals.d.ts +9 -0
  579. package/dist/implementations/dms-builder/engine/theme-literals.js +108 -0
  580. package/dist/implementations/dms-builder/engine/theme-literals.js.map +1 -0
  581. package/dist/implementations/dms-builder/engine/theme-scaffold.d.ts +3 -0
  582. package/dist/implementations/dms-builder/engine/theme-scaffold.js +248 -0
  583. package/dist/implementations/dms-builder/engine/theme-scaffold.js.map +1 -0
  584. package/dist/implementations/dms-builder/engine/theme-stylesheet.d.ts +14 -0
  585. package/dist/implementations/dms-builder/engine/theme-stylesheet.js +167 -0
  586. package/dist/implementations/dms-builder/engine/theme-stylesheet.js.map +1 -0
  587. package/dist/implementations/dms-builder/engine/theme-svg.d.ts +6 -0
  588. package/dist/implementations/dms-builder/engine/theme-svg.js +182 -0
  589. package/dist/implementations/dms-builder/engine/theme-svg.js.map +1 -0
  590. package/dist/implementations/dms-builder/engine/theme.d.ts +5 -0
  591. package/dist/implementations/dms-builder/engine/theme.js +275 -0
  592. package/dist/implementations/dms-builder/engine/theme.js.map +1 -0
  593. package/dist/implementations/dms-builder/engine/value.d.ts +35 -0
  594. package/dist/implementations/dms-builder/engine/value.js +152 -0
  595. package/dist/implementations/dms-builder/engine/value.js.map +1 -0
  596. package/dist/implementations/dms-builder/engine/writable.d.ts +28 -0
  597. package/dist/implementations/dms-builder/engine/writable.js +310 -0
  598. package/dist/implementations/dms-builder/engine/writable.js.map +1 -0
  599. package/dist/implementations/dms-builder/index.d.ts +129 -0
  600. package/dist/implementations/dms-builder/index.js +293 -0
  601. package/dist/implementations/dms-builder/index.js.map +1 -0
  602. package/dist/implementations/dms-notifications/index.d.ts +0 -1
  603. package/dist/implementations/dms-notifications/index.js +0 -4
  604. package/dist/implementations/dms-notifications/index.js.map +1 -1
  605. package/dist/index.d.ts +0 -1
  606. package/dist/index.js +12 -3
  607. package/dist/index.js.map +1 -1
  608. package/dist/mcp/access.d.ts +4 -0
  609. package/dist/mcp/access.js +11 -0
  610. package/dist/mcp/access.js.map +1 -0
  611. package/dist/mcp/backend-url.d.ts +8 -0
  612. package/dist/mcp/backend-url.js +39 -0
  613. package/dist/mcp/backend-url.js.map +1 -0
  614. package/dist/mcp/bridge.d.ts +8 -0
  615. package/dist/mcp/bridge.js +169 -0
  616. package/dist/mcp/bridge.js.map +1 -0
  617. package/dist/mcp/confirmation-gate.d.ts +13 -0
  618. package/dist/mcp/confirmation-gate.js +79 -0
  619. package/dist/mcp/confirmation-gate.js.map +1 -0
  620. package/dist/mcp/index.d.ts +1 -0
  621. package/dist/mcp/index.js +73 -0
  622. package/dist/mcp/index.js.map +1 -0
  623. package/dist/mcp/json.d.ts +5 -0
  624. package/dist/mcp/json.js +14 -0
  625. package/dist/mcp/json.js.map +1 -0
  626. package/dist/mcp/log-buffer.d.ts +14 -0
  627. package/dist/mcp/log-buffer.js +65 -0
  628. package/dist/mcp/log-buffer.js.map +1 -0
  629. package/dist/mcp/page-verify/accounts.d.ts +35 -0
  630. package/dist/mcp/page-verify/accounts.js +106 -0
  631. package/dist/mcp/page-verify/accounts.js.map +1 -0
  632. package/dist/mcp/page-verify/browser.d.ts +2 -0
  633. package/dist/mcp/page-verify/browser.js +58 -0
  634. package/dist/mcp/page-verify/browser.js.map +1 -0
  635. package/dist/mcp/page-verify/controls.d.ts +13 -0
  636. package/dist/mcp/page-verify/controls.js +48 -0
  637. package/dist/mcp/page-verify/controls.js.map +1 -0
  638. package/dist/mcp/page-verify/failures.d.ts +2 -0
  639. package/dist/mcp/page-verify/failures.js +52 -0
  640. package/dist/mcp/page-verify/failures.js.map +1 -0
  641. package/dist/mcp/page-verify/forms.d.ts +12 -0
  642. package/dist/mcp/page-verify/forms.js +257 -0
  643. package/dist/mcp/page-verify/forms.js.map +1 -0
  644. package/dist/mcp/page-verify/index.d.ts +20 -0
  645. package/dist/mcp/page-verify/index.js +283 -0
  646. package/dist/mcp/page-verify/index.js.map +1 -0
  647. package/dist/mcp/page-verify/interactions.d.ts +8 -0
  648. package/dist/mcp/page-verify/interactions.js +191 -0
  649. package/dist/mcp/page-verify/interactions.js.map +1 -0
  650. package/dist/mcp/page-verify/mockup.d.ts +13 -0
  651. package/dist/mcp/page-verify/mockup.js +132 -0
  652. package/dist/mcp/page-verify/mockup.js.map +1 -0
  653. package/dist/mcp/page-verify/page-probe.d.ts +191 -0
  654. package/dist/mcp/page-verify/page-probe.js +107 -0
  655. package/dist/mcp/page-verify/page-probe.js.map +1 -0
  656. package/dist/mcp/page-verify/playwright.d.ts +147 -0
  657. package/dist/mcp/page-verify/playwright.js +15 -0
  658. package/dist/mcp/page-verify/playwright.js.map +1 -0
  659. package/dist/mcp/page-verify/render.d.ts +41 -0
  660. package/dist/mcp/page-verify/render.js +293 -0
  661. package/dist/mcp/page-verify/render.js.map +1 -0
  662. package/dist/mcp/page-verify/report.d.ts +116 -0
  663. package/dist/mcp/page-verify/report.js +8 -0
  664. package/dist/mcp/page-verify/report.js.map +1 -0
  665. package/dist/mcp/page-verify/targets.d.ts +8 -0
  666. package/dist/mcp/page-verify/targets.js +39 -0
  667. package/dist/mcp/page-verify/targets.js.map +1 -0
  668. package/dist/mcp/project-files.d.ts +20 -0
  669. package/dist/mcp/project-files.js +175 -0
  670. package/dist/mcp/project-files.js.map +1 -0
  671. package/dist/mcp/protocol.d.ts +9 -0
  672. package/dist/mcp/protocol.js +129 -0
  673. package/dist/mcp/protocol.js.map +1 -0
  674. package/dist/mcp/route.d.ts +9 -0
  675. package/dist/mcp/route.js +109 -0
  676. package/dist/mcp/route.js.map +1 -0
  677. package/dist/mcp/server.d.ts +8 -0
  678. package/dist/mcp/server.js +27 -0
  679. package/dist/mcp/server.js.map +1 -0
  680. package/dist/mcp/tool.d.ts +39 -0
  681. package/dist/mcp/tool.js +50 -0
  682. package/dist/mcp/tool.js.map +1 -0
  683. package/dist/mcp/tools/builder-catalog.d.ts +1 -0
  684. package/dist/mcp/tools/builder-catalog.js +73 -0
  685. package/dist/mcp/tools/builder-catalog.js.map +1 -0
  686. package/dist/mcp/tools/builder-compose.d.ts +1 -0
  687. package/dist/mcp/tools/builder-compose.js +95 -0
  688. package/dist/mcp/tools/builder-compose.js.map +1 -0
  689. package/dist/mcp/tools/builder-pages.d.ts +1 -0
  690. package/dist/mcp/tools/builder-pages.js +185 -0
  691. package/dist/mcp/tools/builder-pages.js.map +1 -0
  692. package/dist/mcp/tools/builder-project.d.ts +1 -0
  693. package/dist/mcp/tools/builder-project.js +304 -0
  694. package/dist/mcp/tools/builder-project.js.map +1 -0
  695. package/dist/mcp/tools/builder-queries.d.ts +12 -0
  696. package/dist/mcp/tools/builder-queries.js +110 -0
  697. package/dist/mcp/tools/builder-queries.js.map +1 -0
  698. package/dist/mcp/tools/builder-resources.d.ts +1 -0
  699. package/dist/mcp/tools/builder-resources.js +154 -0
  700. package/dist/mcp/tools/builder-resources.js.map +1 -0
  701. package/dist/mcp/tools/builder-shared.d.ts +14 -0
  702. package/dist/mcp/tools/builder-shared.js +44 -0
  703. package/dist/mcp/tools/builder-shared.js.map +1 -0
  704. package/dist/mcp/tools/builder-table-view.d.ts +246 -0
  705. package/dist/mcp/tools/builder-table-view.js +145 -0
  706. package/dist/mcp/tools/builder-table-view.js.map +1 -0
  707. package/dist/mcp/tools/builder-theme.d.ts +1 -0
  708. package/dist/mcp/tools/builder-theme.js +39 -0
  709. package/dist/mcp/tools/builder-theme.js.map +1 -0
  710. package/dist/mcp/tools/database.d.ts +1 -0
  711. package/dist/mcp/tools/database.js +114 -0
  712. package/dist/mcp/tools/database.js.map +1 -0
  713. package/dist/mcp/tools/index.d.ts +2 -0
  714. package/dist/mcp/tools/index.js +36 -0
  715. package/dist/mcp/tools/index.js.map +1 -0
  716. package/dist/mcp/tools/json-patch.d.ts +82 -0
  717. package/dist/mcp/tools/json-patch.js +144 -0
  718. package/dist/mcp/tools/json-patch.js.map +1 -0
  719. package/dist/mcp/tools/mockup-annotations.d.ts +1 -0
  720. package/dist/mcp/tools/mockup-annotations.js +32 -0
  721. package/dist/mcp/tools/mockup-annotations.js.map +1 -0
  722. package/dist/mcp/tools/mockup-apply-to-page.d.ts +1 -0
  723. package/dist/mcp/tools/mockup-apply-to-page.js +32 -0
  724. package/dist/mcp/tools/mockup-apply-to-page.js.map +1 -0
  725. package/dist/mcp/tools/mockup-from-page.d.ts +1 -0
  726. package/dist/mcp/tools/mockup-from-page.js +29 -0
  727. package/dist/mcp/tools/mockup-from-page.js.map +1 -0
  728. package/dist/mcp/tools/mockup-patch-spec.d.ts +1 -0
  729. package/dist/mcp/tools/mockup-patch-spec.js +67 -0
  730. package/dist/mcp/tools/mockup-patch-spec.js.map +1 -0
  731. package/dist/mcp/tools/mockup-resolve-annotation.d.ts +1 -0
  732. package/dist/mcp/tools/mockup-resolve-annotation.js +28 -0
  733. package/dist/mcp/tools/mockup-resolve-annotation.js.map +1 -0
  734. package/dist/mcp/tools/mockup-support.d.ts +9 -0
  735. package/dist/mcp/tools/mockup-support.js +45 -0
  736. package/dist/mcp/tools/mockup-support.js.map +1 -0
  737. package/dist/mcp/tools/mockup-write-spec.d.ts +1 -0
  738. package/dist/mcp/tools/mockup-write-spec.js +16 -0
  739. package/dist/mcp/tools/mockup-write-spec.js.map +1 -0
  740. package/dist/mcp/tools/mockup.d.ts +2 -0
  741. package/dist/mcp/tools/mockup.js +18 -0
  742. package/dist/mcp/tools/mockup.js.map +1 -0
  743. package/dist/mcp/tools/page-verify.d.ts +1 -0
  744. package/dist/mcp/tools/page-verify.js +116 -0
  745. package/dist/mcp/tools/page-verify.js.map +1 -0
  746. package/dist/mcp/tools/pages.d.ts +3 -0
  747. package/dist/mcp/tools/pages.js +77 -0
  748. package/dist/mcp/tools/pages.js.map +1 -0
  749. package/dist/mcp/tools/preview-blocks.d.ts +1 -0
  750. package/dist/mcp/tools/preview-blocks.js +252 -0
  751. package/dist/mcp/tools/preview-blocks.js.map +1 -0
  752. package/dist/mcp/tools/query-logs.d.ts +1 -0
  753. package/dist/mcp/tools/query-logs.js +25 -0
  754. package/dist/mcp/tools/query-logs.js.map +1 -0
  755. package/dist/mcp/tools/typecheck.d.ts +1 -0
  756. package/dist/mcp/tools/typecheck.js +110 -0
  757. package/dist/mcp/tools/typecheck.js.map +1 -0
  758. package/dist/mockup/anchor.d.ts +43 -0
  759. package/dist/mockup/anchor.js +193 -0
  760. package/dist/mockup/anchor.js.map +1 -0
  761. package/dist/mockup/annotations.d.ts +88 -0
  762. package/dist/mockup/annotations.js +169 -0
  763. package/dist/mockup/annotations.js.map +1 -0
  764. package/dist/mockup/apply-fate.d.ts +52 -0
  765. package/dist/mockup/apply-fate.js +148 -0
  766. package/dist/mockup/apply-fate.js.map +1 -0
  767. package/dist/mockup/apply-match.d.ts +39 -0
  768. package/dist/mockup/apply-match.js +129 -0
  769. package/dist/mockup/apply-match.js.map +1 -0
  770. package/dist/mockup/apply-names.d.ts +4 -0
  771. package/dist/mockup/apply-names.js +52 -0
  772. package/dist/mockup/apply-names.js.map +1 -0
  773. package/dist/mockup/apply-notes.d.ts +9 -0
  774. package/dist/mockup/apply-notes.js +16 -0
  775. package/dist/mockup/apply-notes.js.map +1 -0
  776. package/dist/mockup/apply-options.d.ts +18 -0
  777. package/dist/mockup/apply-options.js +117 -0
  778. package/dist/mockup/apply-options.js.map +1 -0
  779. package/dist/mockup/apply-plan.d.ts +23 -0
  780. package/dist/mockup/apply-plan.js +237 -0
  781. package/dist/mockup/apply-plan.js.map +1 -0
  782. package/dist/mockup/apply-to-page.d.ts +35 -0
  783. package/dist/mockup/apply-to-page.js +145 -0
  784. package/dist/mockup/apply-to-page.js.map +1 -0
  785. package/dist/mockup/built-sync.d.ts +16 -0
  786. package/dist/mockup/built-sync.js +53 -0
  787. package/dist/mockup/built-sync.js.map +1 -0
  788. package/dist/mockup/compile.d.ts +24 -0
  789. package/dist/mockup/compile.js +264 -0
  790. package/dist/mockup/compile.js.map +1 -0
  791. package/dist/mockup/controller-blocks.d.ts +35 -0
  792. package/dist/mockup/controller-blocks.js +204 -0
  793. package/dist/mockup/controller-blocks.js.map +1 -0
  794. package/dist/mockup/files.d.ts +18 -0
  795. package/dist/mockup/files.js +36 -0
  796. package/dist/mockup/files.js.map +1 -0
  797. package/dist/mockup/fixtures.d.ts +45 -0
  798. package/dist/mockup/fixtures.js +139 -0
  799. package/dist/mockup/fixtures.js.map +1 -0
  800. package/dist/mockup/form-fields.d.ts +3 -0
  801. package/dist/mockup/form-fields.js +75 -0
  802. package/dist/mockup/form-fields.js.map +1 -0
  803. package/dist/mockup/from-page-routes.d.ts +13 -0
  804. package/dist/mockup/from-page-routes.js +75 -0
  805. package/dist/mockup/from-page-routes.js.map +1 -0
  806. package/dist/mockup/from-page-sketch.d.ts +8 -0
  807. package/dist/mockup/from-page-sketch.js +53 -0
  808. package/dist/mockup/from-page-sketch.js.map +1 -0
  809. package/dist/mockup/from-page.d.ts +19 -0
  810. package/dist/mockup/from-page.js +296 -0
  811. package/dist/mockup/from-page.js.map +1 -0
  812. package/dist/mockup/index.d.ts +19 -0
  813. package/dist/mockup/index.js +59 -0
  814. package/dist/mockup/index.js.map +1 -0
  815. package/dist/mockup/json-schema.d.ts +3 -0
  816. package/dist/mockup/json-schema.js +253 -0
  817. package/dist/mockup/json-schema.js.map +1 -0
  818. package/dist/mockup/live-page.d.ts +45 -0
  819. package/dist/mockup/live-page.js +188 -0
  820. package/dist/mockup/live-page.js.map +1 -0
  821. package/dist/mockup/model.d.ts +372 -0
  822. package/dist/mockup/model.js +125 -0
  823. package/dist/mockup/model.js.map +1 -0
  824. package/dist/mockup/owner-controller.d.ts +12 -0
  825. package/dist/mockup/owner-controller.js +41 -0
  826. package/dist/mockup/owner-controller.js.map +1 -0
  827. package/dist/mockup/page.d.ts +19 -0
  828. package/dist/mockup/page.js +83 -0
  829. package/dist/mockup/page.js.map +1 -0
  830. package/dist/mockup/queue.d.ts +1 -0
  831. package/dist/mockup/queue.js +17 -0
  832. package/dist/mockup/queue.js.map +1 -0
  833. package/dist/mockup/routes.d.ts +30 -0
  834. package/dist/mockup/routes.js +274 -0
  835. package/dist/mockup/routes.js.map +1 -0
  836. package/dist/mockup/sample-rows.d.ts +7 -0
  837. package/dist/mockup/sample-rows.js +30 -0
  838. package/dist/mockup/sample-rows.js.map +1 -0
  839. package/dist/mockup/sketch-allowlist.d.ts +11 -0
  840. package/dist/mockup/sketch-allowlist.js +368 -0
  841. package/dist/mockup/sketch-allowlist.js.map +1 -0
  842. package/dist/mockup/sketch-css.d.ts +3 -0
  843. package/dist/mockup/sketch-css.js +306 -0
  844. package/dist/mockup/sketch-css.js.map +1 -0
  845. package/dist/mockup/sketch-html.d.ts +7 -0
  846. package/dist/mockup/sketch-html.js +243 -0
  847. package/dist/mockup/sketch-html.js.map +1 -0
  848. package/dist/mockup/sketch-limits.d.ts +1 -0
  849. package/dist/mockup/sketch-limits.js +5 -0
  850. package/dist/mockup/sketch-limits.js.map +1 -0
  851. package/dist/mockup/sketch-scan.d.ts +1 -0
  852. package/dist/mockup/sketch-scan.js +136 -0
  853. package/dist/mockup/sketch-scan.js.map +1 -0
  854. package/dist/mockup/sketch-tokens.d.ts +22 -0
  855. package/dist/mockup/sketch-tokens.js +42 -0
  856. package/dist/mockup/sketch-tokens.js.map +1 -0
  857. package/dist/mockup/sketch.d.ts +26 -0
  858. package/dist/mockup/sketch.js +134 -0
  859. package/dist/mockup/sketch.js.map +1 -0
  860. package/dist/mockup/source-routes.d.ts +24 -0
  861. package/dist/mockup/source-routes.js +105 -0
  862. package/dist/mockup/source-routes.js.map +1 -0
  863. package/dist/mockup/source.d.ts +29 -0
  864. package/dist/mockup/source.js +131 -0
  865. package/dist/mockup/source.js.map +1 -0
  866. package/dist/mockup/store.d.ts +63 -0
  867. package/dist/mockup/store.js +296 -0
  868. package/dist/mockup/store.js.map +1 -0
  869. package/dist/mockup/validate.d.ts +9 -0
  870. package/dist/mockup/validate.js +172 -0
  871. package/dist/mockup/validate.js.map +1 -0
  872. package/dist/pages/public/preview/index.d.ts +4 -0
  873. package/dist/pages/public/preview/index.js +3 -3
  874. package/dist/pages/public/preview/index.js.map +1 -1
  875. package/dist/pages/settings/users/invite-extension-routes.js.map +1 -1
  876. package/dist/pages/settings/users/notifications.d.ts +3 -4
  877. package/dist/pages/settings/users/notifications.js +8 -24
  878. package/dist/pages/settings/users/notifications.js.map +1 -1
  879. package/dist/pages/settings/users/permission-tree-nodes.d.ts +3 -3
  880. package/dist/pages/settings/users/permission-tree-nodes.js.map +1 -1
  881. package/dist/pages/settings/users/permission-warnings.js.map +1 -1
  882. package/dist/pages/settings/users/role-editor-store.d.ts +1 -0
  883. package/dist/pages/settings/users/role-editor-store.js +27 -7
  884. package/dist/pages/settings/users/role-editor-store.js.map +1 -1
  885. package/dist/pages/settings/users/role-preview.js +1 -1
  886. package/dist/pages/settings/users/role-preview.js.map +1 -1
  887. package/dist/pages/settings/users/roles.js +14 -0
  888. package/dist/pages/settings/users/roles.js.map +1 -1
  889. package/dist/pages/settings/users/two-factor-operations.d.ts +0 -1
  890. package/dist/pages/settings/users/two-factor-operations.js +0 -1
  891. package/dist/pages/settings/users/two-factor-operations.js.map +1 -1
  892. package/dist/realtime/sessions.d.ts +9 -0
  893. package/dist/realtime/sessions.js +6 -0
  894. package/dist/realtime/sessions.js.map +1 -1
  895. package/dist/routes/auth/logout.d.ts +2 -2
  896. package/dist/routes/auth/logout.js +3 -9
  897. package/dist/routes/auth/logout.js.map +1 -1
  898. package/dist/routes/auth/refresh.js +6 -8
  899. package/dist/routes/auth/refresh.js.map +1 -1
  900. package/dist/routes/auth/switch-tenant.js +8 -11
  901. package/dist/routes/auth/switch-tenant.js.map +1 -1
  902. package/dist/routes/auth/two-factor-throttle.js +5 -1
  903. package/dist/routes/auth/two-factor-throttle.js.map +1 -1
  904. package/dist/routes/auth.js +1 -1
  905. package/dist/routes/auth.js.map +1 -1
  906. package/dist/routes/files.d.ts +2 -2
  907. package/dist/routes/files.js +2 -2
  908. package/dist/routes/files.js.map +1 -1
  909. package/dist/routes/onboarding.js +4 -6
  910. package/dist/routes/onboarding.js.map +1 -1
  911. package/dist/routes/realtime.d.ts +3 -3
  912. package/dist/routes/realtime.js +22 -18
  913. package/dist/routes/realtime.js.map +1 -1
  914. package/dist/routes/system-state.d.ts +6 -6
  915. package/dist/routes/system-state.js +1 -1
  916. package/dist/routes/system-state.js.map +1 -1
  917. package/dist/store/catalog.d.ts +2 -2
  918. package/dist/store/declarations.d.ts +0 -3
  919. package/dist/store/declarations.js +5 -74
  920. package/dist/store/declarations.js.map +1 -1
  921. package/dist/store/internal/frontend/frontend-ready.d.ts +2 -2
  922. package/dist/store/registry.js +2 -4
  923. package/dist/store/registry.js.map +1 -1
  924. package/dist/store/runtime.d.ts +2 -2
  925. package/dist/store/tarball.js +12 -6
  926. package/dist/store/tarball.js.map +1 -1
  927. package/dist/utils/export-jobs-run.d.ts +6 -6
  928. package/dist/utils/export-jobs-run.js +3 -7
  929. package/dist/utils/export-jobs-run.js.map +1 -1
  930. package/dist/utils/export-jobs.js +20 -1
  931. package/dist/utils/export-jobs.js.map +1 -1
  932. package/dist/utils/index.d.ts +2 -0
  933. package/dist/utils/index.js +2 -0
  934. package/dist/utils/index.js.map +1 -1
  935. package/dist/utils/owner-only-file.d.ts +1 -0
  936. package/dist/utils/owner-only-file.js +60 -0
  937. package/dist/utils/owner-only-file.js.map +1 -0
  938. package/dist/utils/package-manager/index.d.ts +1 -0
  939. package/dist/utils/package-manager/index.js +18 -0
  940. package/dist/utils/package-manager/index.js.map +1 -0
  941. package/dist/utils/package-manager.d.ts +12 -0
  942. package/dist/utils/package-manager.js +28 -0
  943. package/dist/utils/package-manager.js.map +1 -0
  944. package/dist/utils/page-access.d.ts +4 -0
  945. package/dist/utils/page-access.js +10 -3
  946. package/dist/utils/page-access.js.map +1 -1
  947. package/dist/utils/query-text.d.ts +2 -0
  948. package/dist/utils/query-text.js +7 -0
  949. package/dist/utils/query-text.js.map +1 -0
  950. package/dist/utils/row-action-rule-evaluator.d.ts +2 -2
  951. package/dist/utils/tenant-instances.js +3 -3
  952. package/dist/utils/tenant-instances.js.map +1 -1
  953. package/dist/validation/auth.schema.d.ts +6 -6
  954. package/dist/validation/regional-preferences.schema.d.ts +4 -4
  955. package/dist/validation/user-notification-preferences.schema.d.ts +0 -1
  956. package/dist/validation/user-notification-preferences.schema.js +6 -3
  957. package/dist/validation/user-notification-preferences.schema.js.map +1 -1
  958. package/frontend-vue/deferred-plugins.ts +2 -0
  959. package/frontend-vue/dms.frontend.ts +34 -1
  960. package/frontend-vue/dms.server.ts +3 -1
  961. package/frontend-vue/eslint-globals.generated.mjs +7 -1
  962. package/frontend-vue/layers/dms-auth/app/components/OAuthButtons.vue +1 -1
  963. package/frontend-vue/layers/dms-auth/app/middleware/auth.ts +18 -9
  964. package/frontend-vue/layers/dms-auth/server/accounts.ts +2 -8
  965. package/frontend-vue/layers/dms-auth/server/actions.ts +83 -60
  966. package/frontend-vue/layers/dms-auth/server/backend-answers.ts +95 -0
  967. package/frontend-vue/layers/dms-auth/server/oauth.ts +26 -29
  968. package/frontend-vue/layers/dms-auth/server/session.ts +62 -27
  969. package/frontend-vue/layers/dms-core/app/build/composables/auth/usePermissionPreview.ts +20 -9
  970. package/frontend-vue/layers/dms-core/app/build/composables/user/tablePreferences.ts +9 -7
  971. package/frontend-vue/layers/dms-core/app/build/utils/permission-preview.ts +4 -4
  972. package/frontend-vue/layers/dms-core/app/build/utils/sharedRealtimeConnection.ts +10 -0
  973. package/frontend-vue/layers/dms-core/app/composables/realtime/useUserRealtime.ts +2 -0
  974. package/frontend-vue/layers/dms-core/app/composables/useApiErrorPresenter.ts +1 -1
  975. package/frontend-vue/layers/dms-core/app/composables/user/usePreferences.ts +0 -16
  976. package/frontend-vue/layers/dms-core/app/composables/watch/useWatch.ts +4 -0
  977. package/frontend-vue/layers/dms-core/app/types/menu.ts +5 -0
  978. package/frontend-vue/layers/dms-core/app/types/page.ts +4 -6
  979. package/frontend-vue/layers/dms-core/app/utils/regional.ts +1 -2
  980. package/frontend-vue/layers/dms-layout/app/assets/css/main.css +28 -32
  981. package/frontend-vue/layers/dms-layout/app/assets/css/status.css +137 -0
  982. package/frontend-vue/layers/dms-layout/app/build/branding/BrandingColorPair.vue +77 -0
  983. package/frontend-vue/layers/dms-layout/app/build/branding/BrandingDeveloperPanel.vue +266 -0
  984. package/frontend-vue/layers/dms-layout/app/build/branding/BrandingEditor.vue +316 -0
  985. package/frontend-vue/layers/dms-layout/app/build/branding/BrandingLogoTile.vue +67 -0
  986. package/frontend-vue/layers/dms-layout/app/build/branding/BrandingPaletteSwatches.vue +63 -0
  987. package/frontend-vue/layers/dms-layout/app/build/branding/BrandingPreview.vue +138 -0
  988. package/frontend-vue/layers/dms-layout/app/build/branding/BrandingSimplePanel.vue +171 -0
  989. package/frontend-vue/layers/dms-layout/app/build/branding/BrandingValueInput.vue +36 -0
  990. package/frontend-vue/layers/dms-layout/app/build/branding/api.ts +55 -0
  991. package/frontend-vue/layers/dms-layout/app/build/branding/catalog.ts +209 -0
  992. package/frontend-vue/layers/dms-layout/app/build/branding/color-input.ts +35 -0
  993. package/frontend-vue/layers/dms-layout/app/build/branding/device-draft.ts +290 -0
  994. package/frontend-vue/layers/dms-layout/app/build/branding/errors.ts +23 -0
  995. package/frontend-vue/layers/dms-layout/app/build/branding/fonts.ts +106 -0
  996. package/frontend-vue/layers/dms-layout/app/build/branding/header-action.ts +19 -0
  997. package/frontend-vue/layers/dms-layout/app/build/branding/logo-tiles.ts +73 -0
  998. package/frontend-vue/layers/dms-layout/app/build/branding/logos.ts +180 -0
  999. package/frontend-vue/layers/dms-layout/app/build/branding/model.ts +391 -0
  1000. package/frontend-vue/layers/dms-layout/app/build/branding/preview-style.ts +182 -0
  1001. package/frontend-vue/layers/dms-layout/app/build/branding/raster.ts +97 -0
  1002. package/frontend-vue/layers/dms-layout/app/build/branding/theme-types.ts +105 -0
  1003. package/frontend-vue/layers/dms-layout/app/build/branding/useBrandingEditor.ts +256 -0
  1004. package/frontend-vue/layers/dms-layout/app/build/branding/values.ts +103 -0
  1005. package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardFrame.vue +1 -1
  1006. package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionsOutlet.vue +50 -32
  1007. package/frontend-vue/layers/dms-layout/app/build/components/layout/PreviewSidebar.vue +62 -0
  1008. package/frontend-vue/layers/dms-layout/app/build/components/layout/StageCard.vue +5 -5
  1009. package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationCard.vue +1 -1
  1010. package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleCatalogTile.vue +1 -1
  1011. package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleStoreBanners.vue +4 -4
  1012. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxDisplay.vue +3 -3
  1013. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationPreferencesForm.vue +2 -2
  1014. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/profile/ProfilePersonalInfo.vue +2 -2
  1015. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/region/RegionFormatPreview.vue +3 -3
  1016. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/RoleEditor.vue +5 -5
  1017. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/RoleOwnerPanel.vue +3 -3
  1018. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/RolePermissionArea.vue +1 -1
  1019. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/RolePermissionLeaf.vue +1 -1
  1020. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/RolesList.vue +5 -5
  1021. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/RolesListItem.vue +1 -1
  1022. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/role-permissions.ts +34 -0
  1023. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/role-types.ts +1 -1
  1024. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/useRoleEditor.ts +13 -10
  1025. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityBackupCodesModal.vue +1 -1
  1026. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityDialogFrame.vue +1 -1
  1027. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityEmail.vue +6 -6
  1028. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityPassword.vue +2 -2
  1029. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecuritySessions.vue +2 -2
  1030. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityTwoFactor.vue +2 -2
  1031. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/AppearanceAccessibility.vue +2 -2
  1032. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/CssVariablesList.vue +15 -7
  1033. package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/ScalePreview.vue +1 -0
  1034. package/frontend-vue/layers/dms-layout/app/build/composables/general/useGithubStarPrompt.ts +7 -3
  1035. package/frontend-vue/layers/dms-layout/app/build/composables/notification/useNotificationGroupsOpen.ts +7 -3
  1036. package/frontend-vue/layers/dms-layout/app/build/composables/settings/security/useSecurityOverview.ts +0 -1
  1037. package/frontend-vue/layers/dms-layout/app/build/mockup/header-action.ts +125 -0
  1038. package/frontend-vue/layers/dms-layout/app/build/mockups/header-action.ts +19 -0
  1039. package/frontend-vue/layers/dms-layout/app/build/utils/module-store-catalog.ts +5 -7
  1040. package/frontend-vue/layers/dms-layout/app/build/utils/modules-catalog.ts +1 -6
  1041. package/frontend-vue/layers/dms-layout/app/components/AppWidgetsDock.vue +36 -2
  1042. package/frontend-vue/layers/dms-layout/app/components/layout/HStack.vue +2 -0
  1043. package/frontend-vue/layers/dms-layout/app/components/layout/VStack.vue +2 -0
  1044. package/frontend-vue/layers/dms-layout/app/components/navigation/CollapsedMenuItem.vue +20 -12
  1045. package/frontend-vue/layers/dms-layout/app/components/navigation/NavigationMenu.vue +63 -2
  1046. package/frontend-vue/layers/dms-layout/app/composables/layout/useServedHeaderActions.ts +10 -3
  1047. package/frontend-vue/layers/dms-layout/app/composables/profile/useUserLanguage.ts +5 -0
  1048. package/frontend-vue/layers/dms-layout/app/composables/useAppWidgets.ts +12 -0
  1049. package/frontend-vue/layers/dms-layout/app/composables/useHeaderActions.ts +4 -4
  1050. package/frontend-vue/layers/dms-layout/app/composables/useMenuLocks.ts +48 -0
  1051. package/frontend-vue/layers/dms-layout/app/custom-layouts/EmptyLayout.vue +1 -1
  1052. package/frontend-vue/layers/dms-layout/app/custom-layouts/PreviewLayout.vue +47 -5
  1053. package/frontend-vue/layers/dms-layout/app/custom-pages/modules-store.vue +11 -8
  1054. package/frontend-vue/layers/dms-layout/app/custom-pages/modules.vue +10 -10
  1055. package/frontend-vue/layers/dms-layout/app/custom-pages/settings/shortcuts.vue +4 -4
  1056. package/frontend-vue/layers/dms-layout/app/entries/branding/BrandingEditor.ts +1 -0
  1057. package/frontend-vue/layers/dms-layout/app/entries/branding/header-action.ts +2 -0
  1058. package/frontend-vue/layers/dms-layout/app/entries/branding/model.ts +5 -0
  1059. package/frontend-vue/layers/dms-layout/app/entries/components/layout/LayoutFooter.ts +2 -0
  1060. package/frontend-vue/layers/dms-layout/app/entries/mockup/header-action.ts +2 -0
  1061. package/frontend-vue/layers/dms-layout/app/entries/mockups/header-action.ts +2 -0
  1062. package/frontend-vue/layers/dms-layout/app/pages/[...slug].vue +4 -0
  1063. package/frontend-vue/layers/dms-layout/app/plugins/dms-mcp-navigate.client.ts +13 -0
  1064. package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +181 -12
  1065. package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +181 -12
  1066. package/frontend-vue/layers/dms-layout/server/html-render.ts +3 -6
  1067. package/frontend-vue/layers/dms-onboarding/app/build/components/onboarding/StepMeta.vue +1 -1
  1068. package/frontend-vue/layers/dms-onboarding/app/custom-pages/onboarding.vue +3 -3
  1069. package/frontend-vue/layers/dms-onboarding/app/entries/components/onboarding/steps/StepReady.ts +2 -0
  1070. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/BlockPreviewSketch.vue +77 -0
  1071. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupAnnotations.vue +93 -0
  1072. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupBlockCatalog.vue +76 -0
  1073. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupCommentPanel.vue +85 -0
  1074. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupEditOverlay.vue +240 -0
  1075. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupEditPanel.vue +91 -0
  1076. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupIndex.vue +66 -0
  1077. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspector.vue +182 -0
  1078. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupInspectorField.vue +172 -0
  1079. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupIssues.vue +32 -0
  1080. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupLayers.vue +44 -0
  1081. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPageInspector.vue +92 -0
  1082. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPagesList.vue +125 -0
  1083. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupPromptModal.vue +51 -0
  1084. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupTopBar.vue +138 -0
  1085. package/frontend-vue/layers/dms-ui/app/build/components/block-preview/MockupWorkbench.vue +493 -0
  1086. package/frontend-vue/layers/dms-ui/app/build/components/containers/TargetComponentTree.vue +1 -0
  1087. package/frontend-vue/layers/dms-ui/app/build/components/form/FormFieldControl.vue +16 -8
  1088. package/frontend-vue/layers/dms-ui/app/build/components/form/FormSectionNav.vue +2 -2
  1089. package/frontend-vue/layers/dms-ui/app/build/components/form/FormSections.vue +7 -4
  1090. package/frontend-vue/layers/dms-ui/app/build/components/section/context.ts +1 -1
  1091. package/frontend-vue/layers/dms-ui/app/build/components/stat/StatCell.vue +3 -3
  1092. package/frontend-vue/layers/dms-ui/app/build/components/table/FiltersRow.vue +1 -1
  1093. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuColumns.vue +1 -1
  1094. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuDensity.vue +1 -1
  1095. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuFilter.vue +5 -5
  1096. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuImport.vue +6 -6
  1097. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuPage.vue +1 -1
  1098. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuRoot.vue +6 -6
  1099. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuSort.vue +1 -1
  1100. package/frontend-vue/layers/dms-ui/app/build/components/table/MenuViewMode.vue +5 -1
  1101. package/frontend-vue/layers/dms-ui/app/build/components/table/RowSelection.vue +1 -1
  1102. package/frontend-vue/layers/dms-ui/app/build/components/table/Table.types.ts +1 -1
  1103. package/frontend-vue/layers/dms-ui/app/build/components/table/{Actions.vue → TableActions.vue} +22 -22
  1104. package/frontend-vue/layers/dms-ui/app/build/components/table/TableBody.vue +1 -1
  1105. package/frontend-vue/layers/dms-ui/app/build/components/table/{Empty.vue → TableEmpty.vue} +2 -2
  1106. package/frontend-vue/layers/dms-ui/app/build/components/table/{Menu.vue → TableMenu.vue} +1 -0
  1107. package/frontend-vue/layers/dms-ui/app/build/components/table/{Pagination.vue → TablePagination.vue} +1 -1
  1108. package/frontend-vue/layers/dms-ui/app/build/components/table/{Table.vue → TableRoot.vue} +3 -3
  1109. package/frontend-vue/layers/dms-ui/app/build/components/table/{Views.vue → TableViews.vue} +37 -14
  1110. package/frontend-vue/layers/dms-ui/app/build/components/table-view/CardRowActions.vue +2 -2
  1111. package/frontend-vue/layers/dms-ui/app/build/components/table-view/CardsDisplay.vue +9 -5
  1112. package/frontend-vue/layers/dms-ui/app/build/components/table-view/ExpandedRowDetail.vue +4 -3
  1113. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewGeometry.ts +53 -0
  1114. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/previewNavigation.ts +23 -0
  1115. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockInspector.ts +115 -0
  1116. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useBlockPreviewEmbed.ts +78 -9
  1117. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupCatalog.ts +45 -0
  1118. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupComments.ts +95 -0
  1119. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupEditing.ts +323 -0
  1120. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupHandoff.ts +62 -0
  1121. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSession.ts +115 -0
  1122. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/useMockupSpec.ts +433 -0
  1123. package/frontend-vue/layers/dms-ui/app/build/composables/block-preview/usePreviewFrame.ts +94 -0
  1124. package/frontend-vue/layers/dms-ui/app/build/composables/data-types/metricCells.ts +1 -1
  1125. package/frontend-vue/layers/dms-ui/app/build/composables/form/fieldComponentProps.ts +113 -0
  1126. package/frontend-vue/layers/dms-ui/app/build/composables/form/formLayout.ts +4 -4
  1127. package/frontend-vue/layers/dms-ui/app/build/composables/form/formState.ts +7 -3
  1128. package/frontend-vue/layers/dms-ui/app/build/composables/form/useFormModel.ts +1 -1
  1129. package/frontend-vue/layers/dms-ui/app/build/composables/live/liveStorage.ts +11 -5
  1130. package/frontend-vue/layers/dms-ui/app/build/composables/page/blockAnchors.ts +65 -0
  1131. package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionDescriptors.ts +1 -1
  1132. package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionRendering.ts +1 -1
  1133. package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnActionSizing.ts +1 -1
  1134. package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnHeaders.ts +1 -1
  1135. package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnStructure.ts +1 -1
  1136. package/frontend-vue/layers/dms-ui/app/build/composables/table/tableColumnTypes.ts +1 -1
  1137. package/frontend-vue/layers/dms-ui/app/build/composables/table/useTable.ts +1 -1
  1138. package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableColumns.ts +1 -1
  1139. package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableConfigClipboard.ts +1 -1
  1140. package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableContext.ts +4 -1
  1141. package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableStates.ts +1 -1
  1142. package/frontend-vue/layers/dms-ui/app/build/composables/table/utils/clearTableFilters.ts +1 -1
  1143. package/frontend-vue/layers/dms-ui/app/build/composables/table/utils/filterEditorValue.ts +1 -1
  1144. package/frontend-vue/layers/dms-ui/app/build/composables/table/utils/formatFilterValue.ts +2 -2
  1145. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableRowActionContainers.ts +3 -3
  1146. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewBindings.ts +1 -1
  1147. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewCounts.ts +4 -3
  1148. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewDisplays.ts +1 -1
  1149. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewFilters.ts +1 -1
  1150. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewNavigation.ts +1 -1
  1151. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewQuickFilters.ts +18 -13
  1152. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/tableViewViews.ts +2 -2
  1153. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useGroupedRows.ts +4 -4
  1154. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableFooter.ts +1 -1
  1155. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViews.ts +19 -22
  1156. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/groupedRows.ts +1 -1
  1157. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/quickFilters.ts +1 -1
  1158. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableCounts.ts +5 -1
  1159. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +1 -1
  1160. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/urlFilters.ts +1 -1
  1161. package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/views.ts +48 -3
  1162. package/frontend-vue/layers/dms-ui/app/build/mockups/MockupCards.vue +188 -0
  1163. package/frontend-vue/layers/dms-ui/app/build/mockups/MockupThumbnail.vue +137 -0
  1164. package/frontend-vue/layers/dms-ui/app/build/mockups/resync.ts +56 -0
  1165. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreview.ts +77 -105
  1166. package/frontend-vue/layers/dms-ui/app/build/utils/blockPreviewMessages.ts +362 -0
  1167. package/frontend-vue/layers/dms-ui/app/build/utils/eyebrow.ts +1 -1
  1168. package/frontend-vue/layers/dms-ui/app/build/utils/mockup.ts +436 -0
  1169. package/frontend-vue/layers/dms-ui/app/build/utils/mockupCatalog.ts +437 -0
  1170. package/frontend-vue/layers/dms-ui/app/build/utils/mockupDrop.ts +260 -0
  1171. package/frontend-vue/layers/dms-ui/app/build/utils/mockupEdit.ts +487 -0
  1172. package/frontend-vue/layers/dms-ui/app/build/utils/mockupHandoff.ts +20 -0
  1173. package/frontend-vue/layers/dms-ui/app/build/utils/mockupHistory.ts +80 -0
  1174. package/frontend-vue/layers/dms-ui/app/build/utils/mockupInspector.ts +120 -0
  1175. package/frontend-vue/layers/dms-ui/app/build/utils/mockupOutline.ts +91 -0
  1176. package/frontend-vue/layers/dms-ui/app/build/utils/mockupSpec.ts +219 -0
  1177. package/frontend-vue/layers/dms-ui/app/build/utils/mockupStamp.ts +265 -0
  1178. package/frontend-vue/layers/dms-ui/app/build/utils/mockupStream.ts +98 -0
  1179. package/frontend-vue/layers/dms-ui/app/build/utils/sanitizedNodes.ts +27 -0
  1180. package/frontend-vue/layers/dms-ui/app/build/utils/sketch.ts +167 -0
  1181. package/frontend-vue/layers/dms-ui/app/components/RecursiveComponent.vue +1 -0
  1182. package/frontend-vue/layers/dms-ui/app/components/activity-feed/ActivityFeed.vue +4 -4
  1183. package/frontend-vue/layers/dms-ui/app/components/block-preview/BlockPreview.vue +32 -6
  1184. package/frontend-vue/layers/dms-ui/app/components/block-preview/MockupViewer.vue +38 -0
  1185. package/frontend-vue/layers/dms-ui/app/components/blocks/BannerBlock.vue +3 -3
  1186. package/frontend-vue/layers/dms-ui/app/components/blocks/CardBlock.vue +3 -3
  1187. package/frontend-vue/layers/dms-ui/app/components/blocks/KeyValueListBlock.vue +2 -2
  1188. package/frontend-vue/layers/dms-ui/app/components/blocks/LiveToggleBlock.vue +2 -2
  1189. package/frontend-vue/layers/dms-ui/app/components/card/{Card.vue → CardPanel.vue} +2 -2
  1190. package/frontend-vue/layers/dms-ui/app/components/chart/ChartCard.vue +4 -4
  1191. package/frontend-vue/layers/dms-ui/app/components/confirm/ConfirmModal.vue +1 -0
  1192. package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +1 -1
  1193. package/frontend-vue/layers/dms-ui/app/components/form/{Form.vue → FormBlock.vue} +1 -1
  1194. package/frontend-vue/layers/dms-ui/app/components/form/LocalizedField.vue +34 -25
  1195. package/frontend-vue/layers/dms-ui/app/components/form/components/DatePicker.vue +17 -16
  1196. package/frontend-vue/layers/dms-ui/app/components/form/components/DisplayImage.vue +1 -0
  1197. package/frontend-vue/layers/dms-ui/app/components/form/components/DisplayRichText.vue +12 -4
  1198. package/frontend-vue/layers/dms-ui/app/components/form/components/{Calendar.vue → InputCalendar.vue} +11 -10
  1199. package/frontend-vue/layers/dms-ui/app/components/form/components/{Cascader.vue → InputCascader.vue} +0 -6
  1200. package/frontend-vue/layers/dms-ui/app/components/form/components/{Image.vue → InputImage.vue} +1 -0
  1201. package/frontend-vue/layers/dms-ui/app/components/form/components/{Relation.vue → InputRelation.vue} +14 -11
  1202. package/frontend-vue/layers/dms-ui/app/components/form/components/{Repeater.vue → InputRepeater.vue} +1 -0
  1203. package/frontend-vue/layers/dms-ui/app/components/form/components/{Select.vue → InputSelect.vue} +9 -5
  1204. package/frontend-vue/layers/dms-ui/app/components/form/components/KeyValue.vue +4 -3
  1205. package/frontend-vue/layers/dms-ui/app/components/form/components/SegmentedSelect.vue +2 -2
  1206. package/frontend-vue/layers/dms-ui/app/components/kpi/KpiCard.vue +7 -7
  1207. package/frontend-vue/layers/dms-ui/app/components/meter/MeterBlock.vue +5 -5
  1208. package/frontend-vue/layers/dms-ui/app/components/period/PeriodSelector.vue +1 -1
  1209. package/frontend-vue/layers/dms-ui/app/components/section-header/SectionHeader.vue +2 -2
  1210. package/frontend-vue/layers/dms-ui/app/components/status/StatusSummary.vue +3 -3
  1211. package/frontend-vue/layers/dms-ui/app/components/table-view/ImagePreview.vue +1 -0
  1212. package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanBoard.vue +20 -18
  1213. package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanDisplay.vue +1 -1
  1214. package/frontend-vue/layers/dms-ui/app/components/table-view/TableView.vue +6 -5
  1215. package/frontend-vue/layers/dms-ui/app/components/top-list/TopListCard.vue +2 -2
  1216. package/frontend-vue/layers/dms-ui/app/components/top-list/internal/TopListRow.vue +2 -2
  1217. package/frontend-vue/layers/dms-ui/app/composables/chart/formatValue.ts +1 -1
  1218. package/frontend-vue/layers/dms-ui/app/composables/chart/types.ts +1 -1
  1219. package/frontend-vue/layers/dms-ui/app/composables/confirm/types.ts +1 -1
  1220. package/frontend-vue/layers/dms-ui/app/composables/form/types/props.ts +2 -2
  1221. package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +2 -2
  1222. package/frontend-vue/layers/dms-ui/app/composables/tab/useTab.ts +6 -7
  1223. package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/index.ts +1 -1
  1224. package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/tableViewDelete.ts +1 -1
  1225. package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/tableViewShiftA.ts +1 -1
  1226. package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/tableViewShiftN.ts +1 -1
  1227. package/frontend-vue/layers/dms-ui/app/composables/table-view/types/display.ts +1 -1
  1228. package/frontend-vue/layers/dms-ui/app/composables/table-view/useTableViewEmptyState.ts +1 -1
  1229. package/frontend-vue/layers/dms-ui/app/entries/components/block-preview/BlockPreviewSketch.ts +2 -0
  1230. package/frontend-vue/layers/dms-ui/app/entries/components/table/TableActions.ts +2 -0
  1231. package/frontend-vue/layers/dms-ui/app/entries/components/table/TableEmpty.ts +2 -0
  1232. package/frontend-vue/layers/dms-ui/app/entries/components/table/TablePagination.ts +2 -0
  1233. package/frontend-vue/layers/dms-ui/app/entries/components/table/TableRoot.ts +2 -0
  1234. package/frontend-vue/layers/dms-ui/app/entries/components/table/TableViews.ts +2 -0
  1235. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/previewNavigation.ts +1 -0
  1236. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useBlockInspector.ts +1 -0
  1237. package/frontend-vue/layers/dms-ui/app/entries/composables/block-preview/useMockupSpec.ts +1 -0
  1238. package/frontend-vue/layers/dms-ui/app/entries/mockups/MockupCards.ts +1 -0
  1239. package/frontend-vue/layers/dms-ui/app/entries/mockups/MockupThumbnail.ts +1 -0
  1240. package/frontend-vue/layers/dms-ui/app/entries/utils/blockPreview.ts +1 -0
  1241. package/frontend-vue/layers/dms-ui/app/entries/utils/mockup.ts +1 -0
  1242. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupCatalog.ts +1 -0
  1243. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupDrop.ts +1 -0
  1244. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupEdit.ts +1 -0
  1245. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupHistory.ts +1 -0
  1246. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupInspector.ts +1 -0
  1247. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupOutline.ts +1 -0
  1248. package/frontend-vue/layers/dms-ui/app/entries/utils/mockupSpec.ts +1 -0
  1249. package/frontend-vue/layers/dms-ui/app/entries/utils/sketch.ts +1 -0
  1250. package/frontend-vue/layers/dms-ui/app/types/table/base.ts +1 -1
  1251. package/frontend-vue/layers/dms-ui/app/utils/mockupAssistant.ts +59 -0
  1252. package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +122 -1
  1253. package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +122 -1
  1254. package/frontend-vue/package.json +4 -3
  1255. package/frontend-vue/scripts/check-autoimport-boundaries.mjs +12 -7
  1256. package/frontend-vue/scripts/check-dms-components.mjs +519 -0
  1257. package/frontend-vue/scripts/check-invariants.mjs +7 -1
  1258. package/frontend-vue/scripts/check-page-invariants.mjs +1 -1
  1259. package/frontend-vue/scripts/dms-components-dependencies.mjs +89 -0
  1260. package/frontend-vue/scripts/probes/frontend-legacy.cjs +22 -22
  1261. package/frontend-vue/scripts/test-dms-components.mjs +255 -0
  1262. package/frontend-vue/server/request-body.ts +21 -0
  1263. package/package.json +79 -25
  1264. package/skills/dms/REFERENCE.md +1 -1
  1265. package/skills/dms/SKILL.md +7 -6
  1266. package/skills/dms-auth/SKILL.md +4 -3
  1267. package/skills/dms-module/REFERENCE.md +1 -1
  1268. package/skills/dms-module/SKILL.md +2 -2
  1269. package/skills/dms-module/cases.json +3 -3
  1270. package/skills/dms-project/REFERENCE.md +4 -2
  1271. package/skills/dms-project/SKILL.md +2 -2
  1272. package/skills/dms-project/scripts/dms-dev.sh +1 -1
  1273. package/frontend-vue/layers/dms-layout/app/entries/components/layout/Footer.ts +0 -2
  1274. package/frontend-vue/layers/dms-onboarding/app/entries/components/onboarding/steps/ready.ts +0 -2
  1275. package/frontend-vue/layers/dms-ui/app/build/composables/confirm/actionError.ts +0 -21
  1276. package/frontend-vue/layers/dms-ui/app/entries/components/table/Actions.ts +0 -2
  1277. package/frontend-vue/layers/dms-ui/app/entries/components/table/Empty.ts +0 -2
  1278. package/frontend-vue/layers/dms-ui/app/entries/components/table/Pagination.ts +0 -2
  1279. package/frontend-vue/layers/dms-ui/app/entries/components/table/Table.ts +0 -2
  1280. package/frontend-vue/layers/dms-ui/app/entries/components/table/Views.ts +0 -2
  1281. package/frontend-vue/layers/dms-ui/app/entries/composables/confirm/actionError.ts +0 -1
  1282. package/skills/dms-best-practices/REFERENCE.md +0 -95
  1283. package/skills/dms-best-practices/SKILL.md +0 -81
  1284. package/skills/dms-best-practices/cases.json +0 -82
  1285. package/skills/dms-pages/REFERENCE.md +0 -277
  1286. package/skills/dms-pages/SKILL.md +0 -115
  1287. package/skills/dms-pages/cases.json +0 -96
  1288. /package/frontend-vue/layers/dms-layout/app/build/components/layout/{Container.vue → LayoutContainer.vue} +0 -0
  1289. /package/frontend-vue/layers/dms-layout/app/build/components/layout/{Footer.vue → LayoutFooter.vue} +0 -0
  1290. /package/frontend-vue/layers/dms-layout/app/components/layout/{Spacer.vue → StackSpacer.vue} +0 -0
  1291. /package/frontend-vue/layers/dms-onboarding/app/build/components/onboarding/steps/{platform.vue → StepPlatform.vue} +0 -0
  1292. /package/frontend-vue/layers/dms-onboarding/app/build/components/onboarding/steps/{ready.vue → StepReady.vue} +0 -0
  1293. /package/frontend-vue/layers/dms-onboarding/app/components/onboarding/steps/{register.vue → StepRegister.vue} +0 -0
  1294. /package/frontend-vue/layers/dms-ui/app/build/components/table/{Tabs.vue → TableTabs.vue} +0 -0
  1295. /package/frontend-vue/layers/dms-ui/app/{types → build/types}/shortcuts-aggregated.d.ts +0 -0
  1296. /package/frontend-vue/layers/dms-ui/app/components/{Placeholder.vue → PlaceholderBlock.vue} +0 -0
  1297. /package/frontend-vue/layers/dms-ui/app/components/banner/{Banner.vue → NoticeBanner.vue} +0 -0
  1298. /package/frontend-vue/layers/dms-ui/app/components/chart/{Chart.vue → ChartBlock.vue} +0 -0
  1299. /package/frontend-vue/layers/dms-ui/app/components/chart/internal/{Sparkline.vue → SparklineChart.vue} +0 -0
  1300. /package/frontend-vue/layers/dms-ui/app/components/form/components/{Display.vue → DisplayValue.vue} +0 -0
  1301. /package/frontend-vue/layers/dms-ui/app/components/form/components/{Checkbox.vue → InputCheckbox.vue} +0 -0
  1302. /package/frontend-vue/layers/dms-ui/app/components/form/components/{File.vue → InputFile.vue} +0 -0
  1303. /package/frontend-vue/layers/dms-ui/app/components/form/components/{Slider.vue → InputSlider.vue} +0 -0
  1304. /package/frontend-vue/layers/dms-ui/app/components/form/components/{Switch.vue → InputSwitch.vue} +0 -0
  1305. /package/frontend-vue/layers/dms-ui/app/components/form/components/{Textarea.vue → InputTextarea.vue} +0 -0
  1306. /package/frontend-vue/layers/dms-ui/app/components/grid/{Grid.vue → GridBlock.vue} +0 -0
  1307. /package/frontend-vue/layers/dms-ui/app/components/guard/{Guard.vue → GuardBlock.vue} +0 -0
  1308. /package/frontend-vue/layers/dms-ui/app/components/meter/{Meter.vue → MeterBar.vue} +0 -0
  1309. /package/frontend-vue/layers/dms-ui/app/components/section/{Section.vue → SectionPanel.vue} +0 -0
  1310. /package/frontend-vue/layers/dms-ui/app/components/section-header/{Eyebrow.vue → EyebrowLabel.vue} +0 -0
  1311. /package/frontend-vue/layers/dms-ui/app/components/segmented/{Segmented.vue → SegmentedControl.vue} +0 -0
  1312. /package/frontend-vue/layers/dms-ui/app/components/tab/{Tab.vue → TabBlock.vue} +0 -0
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.words = words;
4
+ exports.singular = singular;
5
+ exports.humanized = humanized;
6
+ function words(value) {
7
+ return value
8
+ .replace(/([a-z0-9])([A-Z])/g, "$1 $2")
9
+ .split(/[^A-Za-z0-9]+/)
10
+ .filter((part) => part.length > 0)
11
+ .map((part) => part.toLowerCase());
12
+ }
13
+ function singular(name) {
14
+ if (name.endsWith("ies")) {
15
+ return `${name.slice(0, -3)}y`;
16
+ }
17
+ if (/(ss|us|is)$/.test(name)) {
18
+ return name;
19
+ }
20
+ return name.endsWith("s") ? name.slice(0, -1) : name;
21
+ }
22
+ function humanized(name) {
23
+ const spaced = words(name).join(" ");
24
+ return spaced.charAt(0).toUpperCase() + spaced.slice(1);
25
+ }
26
+ //# sourceMappingURL=name-words.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"name-words.js","sourceRoot":"","sources":["../../../../src/implementations/dms-builder/engine/name-words.ts"],"names":[],"mappings":";;AAAA,sBAMC;AAGD,4BAQC;AAGD,8BAGC;AAvBD,SAAgB,KAAK,CAAC,KAAa;IACjC,OAAO,KAAK;SACT,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;SACtC,KAAK,CAAC,eAAe,CAAC;SACtB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SACjC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;AACvC,CAAC;AAGD,SAAgB,QAAQ,CAAC,IAAY;IACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACjC,CAAC;IACD,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACvD,CAAC;AAGD,SAAgB,SAAS,CAAC,IAAY;IACpC,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function nativeKind(native: string): string;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nativeKind = nativeKind;
4
+ const NATIVE_KINDS = [
5
+ [
6
+ /^(smallint|integer|int|bigint|int[248]|(small|big)?serial|serial[248]|numeric|decimal|real|double precision|float[48])$/,
7
+ "number",
8
+ ],
9
+ [
10
+ /^(tinyint|smallint|mediumint|int|integer|bigint|decimal|dec|numeric|fixed|float|double|real)( (un)?signed)?( zerofill)?$/,
11
+ "number",
12
+ ],
13
+ [
14
+ /^(text|tinytext|mediumtext|longtext|character varying|varchar|character|char|bpchar|citext|name)$/,
15
+ "text",
16
+ ],
17
+ ];
18
+ const DOCUMENT_KINDS = new Map([
19
+ ["string", "text"],
20
+ ["STRING", "text"],
21
+ ["objectId", "text"],
22
+ ["uuid", "text"],
23
+ ["int", "number"],
24
+ ["long", "number"],
25
+ ["double", "number"],
26
+ ["decimal", "number"],
27
+ ["NUMBER", "number"],
28
+ ]);
29
+ const SAMPLED_SHARE = /^(\S+) \d+%/;
30
+ function nativeKind(native) {
31
+ const sampled = SAMPLED_SHARE.exec(native)?.[1];
32
+ if (sampled !== undefined) {
33
+ return DOCUMENT_KINDS.get(sampled) ?? sampled;
34
+ }
35
+ const base = native
36
+ .toLowerCase()
37
+ .replace(/\s*\([^)]*\)/g, "")
38
+ .trim();
39
+ return NATIVE_KINDS.find(([pattern]) => pattern.test(base))?.[1] ?? base;
40
+ }
41
+ //# sourceMappingURL=native-kind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-kind.js","sourceRoot":"","sources":["../../../../src/implementations/dms-builder/engine/native-kind.ts"],"names":[],"mappings":";;AAuCA,gCAUC;AAjDD,MAAM,YAAY,GAAuB;IACvC;QACE,yHAAyH;QACzH,QAAQ;KACT;IACD;QACE,0HAA0H;QAC1H,QAAQ;KACT;IACD;QACE,mGAAmG;QACnG,MAAM;KACP;CACF,CAAC;AAMF,MAAM,cAAc,GAAG,IAAI,GAAG,CAAiB;IAC7C,CAAC,QAAQ,EAAE,MAAM,CAAC;IAClB,CAAC,QAAQ,EAAE,MAAM,CAAC;IAClB,CAAC,UAAU,EAAE,MAAM,CAAC;IACpB,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,KAAK,EAAE,QAAQ,CAAC;IACjB,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClB,CAAC,QAAQ,EAAE,QAAQ,CAAC;IACpB,CAAC,SAAS,EAAE,QAAQ,CAAC;IACrB,CAAC,QAAQ,EAAE,QAAQ,CAAC;CACrB,CAAC,CAAC;AAGH,MAAM,aAAa,GAAG,aAAa,CAAC;AAOpC,SAAgB,UAAU,CAAC,MAAc;IACvC,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAChD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC;IAChD,CAAC;IACD,MAAM,IAAI,GAAG,MAAM;SAChB,WAAW,EAAE;SACb,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;SAC5B,IAAI,EAAE,CAAC;IACV,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AAC3E,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { CreatePageInput, EditablePageMeta, MoveDest, MutationOpts, OpResult, PageRef } from "@antelopejs/interface-dms-builder";
2
+ import { type SourceFile } from "ts-morph";
3
+ import { Transaction } from "./writable";
4
+ export declare function removeBlock(targetPath: string, opts?: MutationOpts): OpResult;
5
+ export declare function moveBlock(targetPath: string, dest: MoveDest, opts?: MutationOpts): OpResult;
6
+ export declare function slugError(name: string, kind: "page" | "category"): OpResult<never> | undefined;
7
+ type PageData = {
8
+ ref: PageRef;
9
+ filepath: string;
10
+ };
11
+ export interface StagedPage {
12
+ ref: PageRef;
13
+ filepath: string;
14
+ sourceFile: SourceFile;
15
+ }
16
+ export declare function stagePage(input: CreatePageInput, transaction: Transaction): StagedPage | OpResult<PageData>;
17
+ export declare function createPage(input: CreatePageInput): OpResult<{
18
+ ref: PageRef;
19
+ filepath: string;
20
+ }>;
21
+ export declare function configurePage(ref: string, patch: Partial<EditablePageMeta>, opts?: MutationOpts): OpResult<{
22
+ ref: string;
23
+ version: string;
24
+ }>;
25
+ export {};
@@ -0,0 +1,334 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.removeBlock = removeBlock;
7
+ exports.moveBlock = moveBlock;
8
+ exports.slugError = slugError;
9
+ exports.stagePage = stagePage;
10
+ exports.createPage = createPage;
11
+ exports.configurePage = configurePage;
12
+ const node_fs_1 = __importDefault(require("node:fs"));
13
+ const node_path_1 = __importDefault(require("node:path"));
14
+ const ts_morph_1 = require("ts-morph");
15
+ const block_target_1 = require("./block-target");
16
+ const emit_1 = require("./emit");
17
+ const literals_1 = require("./literals");
18
+ const paths_1 = require("./paths");
19
+ const project_1 = require("./project");
20
+ const placement_1 = require("./placement");
21
+ const page_category_move_1 = require("./page-category-move");
22
+ const page_structure_1 = require("./page-structure");
23
+ const resource_index_1 = require("./resource-index");
24
+ const scan_1 = require("./scan");
25
+ const source_index_1 = require("./source-index");
26
+ const value_1 = require("./value");
27
+ const writable_1 = require("./writable");
28
+ const options_patch_1 = require("./options-patch");
29
+ const ops_1 = require("./ops");
30
+ const DMS_PAGE_MODULE = "@antelopejs/interface-dms/page";
31
+ const DMS_LAYOUTS_MODULE = "@antelopejs/interface-dms/base/layouts";
32
+ function removeBlock(targetPath, opts) {
33
+ const parsed = (0, paths_1.parseBlockPath)(targetPath);
34
+ if (!parsed) {
35
+ return (0, ops_1.notFound)(targetPath);
36
+ }
37
+ const context = (0, ops_1.openPage)(parsed.pageRef);
38
+ if ((0, ops_1.isError)(context)) {
39
+ return context;
40
+ }
41
+ const stale = (0, ops_1.checkVersion)(context.sourceFile, opts);
42
+ if (stale) {
43
+ return stale;
44
+ }
45
+ const cls = (0, writable_1.findPageClass)(context.sourceFile, context.page.id);
46
+ if (!cls) {
47
+ return (0, ops_1.notFound)(parsed.pageRef);
48
+ }
49
+ const transaction = new writable_1.Transaction(context.sourceFile.getProject());
50
+ transaction.track(context.sourceFile);
51
+ if (parsed.segments.length === 1) {
52
+ const prop = cls
53
+ .getStaticProperties()
54
+ .find((candidate) => ts_morph_1.Node.isPropertyDeclaration(candidate) &&
55
+ candidate.getName() === parsed.segments[0]);
56
+ if (!prop) {
57
+ return (0, ops_1.notFound)(targetPath);
58
+ }
59
+ prop.remove();
60
+ return (0, ops_1.commit)(transaction, undefined);
61
+ }
62
+ const parentSegments = parsed.segments.slice(0, -1);
63
+ const childId = parsed.segments[parsed.segments.length - 1];
64
+ const resolved = (0, block_target_1.resolveBlockTarget)(cls, parentSegments);
65
+ if (!resolved.ok) {
66
+ return resolved.reason === "not_found"
67
+ ? (0, ops_1.notFound)(targetPath)
68
+ : (0, ops_1.opaque)(targetPath);
69
+ }
70
+ const index = resolved.target.childCalls.findIndex((call) => (0, literals_1.stringLiteralValue)(call.getArguments()[0]) === childId);
71
+ if (index < 0) {
72
+ return (0, ops_1.notFound)(targetPath);
73
+ }
74
+ const args = (0, ops_1.childArgsOf)(resolved.target);
75
+ args.splice(index, 1);
76
+ (0, ops_1.setChildren)(resolved.target, args);
77
+ return (0, ops_1.commit)(transaction, undefined);
78
+ }
79
+ function moveBlock(targetPath, dest, opts) {
80
+ const parsed = (0, paths_1.parseBlockPath)(targetPath);
81
+ if (!parsed || parsed.segments.length < 2 || !dest.parent) {
82
+ return (0, ops_1.unsupported)("moveBlock v1 supports moving a child block into a container");
83
+ }
84
+ const context = (0, ops_1.openPage)(parsed.pageRef);
85
+ if ((0, ops_1.isError)(context)) {
86
+ return context;
87
+ }
88
+ const stale = (0, ops_1.checkVersion)(context.sourceFile, opts);
89
+ if (stale) {
90
+ return stale;
91
+ }
92
+ const cls = (0, writable_1.findPageClass)(context.sourceFile, context.page.id);
93
+ if (!cls) {
94
+ return (0, ops_1.notFound)(parsed.pageRef);
95
+ }
96
+ const sourceParentSegments = parsed.segments.slice(0, -1);
97
+ const childId = parsed.segments[parsed.segments.length - 1];
98
+ const source = (0, block_target_1.resolveBlockTarget)(cls, sourceParentSegments);
99
+ if (!source.ok) {
100
+ return source.reason === "not_found"
101
+ ? (0, ops_1.notFound)(targetPath)
102
+ : (0, ops_1.opaque)(targetPath);
103
+ }
104
+ const sourceIndex = source.target.childCalls.findIndex((call) => (0, literals_1.stringLiteralValue)(call.getArguments()[0]) === childId);
105
+ if (sourceIndex < 0) {
106
+ return (0, ops_1.notFound)(targetPath);
107
+ }
108
+ const destParsed = (0, paths_1.parseBlockPath)(dest.parent);
109
+ if (!destParsed) {
110
+ return (0, ops_1.notFound)(dest.parent);
111
+ }
112
+ const transaction = new writable_1.Transaction(context.sourceFile.getProject());
113
+ transaction.track(context.sourceFile);
114
+ const args = (0, ops_1.childArgsOf)(source.target);
115
+ const [moved] = args.splice(sourceIndex, 1);
116
+ if (destParsed.segments.join("/") === sourceParentSegments.join("/")) {
117
+ const { index, warnings } = (0, ops_1.clampIndex)(dest.index, args.length);
118
+ args.splice(index, 0, moved);
119
+ (0, ops_1.setChildren)(source.target, args);
120
+ return (0, ops_1.commit)(transaction, undefined, warnings);
121
+ }
122
+ (0, ops_1.setChildren)(source.target, args);
123
+ const destResolved = (0, block_target_1.resolveBlockTarget)(cls, destParsed.segments);
124
+ if (!destResolved.ok || !destResolved.target.editable) {
125
+ transaction.rollback();
126
+ return destResolved.ok === false && destResolved.reason === "not_found"
127
+ ? (0, ops_1.notFound)(dest.parent)
128
+ : (0, ops_1.opaque)(dest.parent);
129
+ }
130
+ const destArgs = (0, ops_1.childArgsOf)(destResolved.target);
131
+ const { index, warnings } = (0, ops_1.clampIndex)(dest.index, destArgs.length);
132
+ destArgs.splice(index, 0, moved);
133
+ (0, ops_1.setChildren)(destResolved.target, destArgs);
134
+ return (0, ops_1.commit)(transaction, undefined, warnings);
135
+ }
136
+ function buildPageSource(input, category, filepath) {
137
+ const className = `${(0, emit_1.pascalCase)(input.name)}Page`;
138
+ const options = [`displayName: ${JSON.stringify(input.displayName)}`];
139
+ let categoryImport = "";
140
+ if (category.moduleId) {
141
+ options.push(`module: ${JSON.stringify(category.moduleId)}`);
142
+ }
143
+ else if (category.importName && category.importModule) {
144
+ const spec = category.importModule.endsWith(".ts")
145
+ ? (0, emit_1.relativeModule)(filepath, category.importModule)
146
+ : category.importModule;
147
+ categoryImport = `import { ${category.importName} } from ${JSON.stringify(spec)};\n`;
148
+ options.push(`category: ${category.importName}`);
149
+ }
150
+ if (input.icon) {
151
+ options.push(`icon: ${JSON.stringify(input.icon)}`);
152
+ }
153
+ if (input.order !== undefined) {
154
+ options.push(`order: ${input.order}`);
155
+ }
156
+ if (input.description) {
157
+ options.push(`description: ${JSON.stringify(input.description)}`);
158
+ }
159
+ if (input.permission !== undefined) {
160
+ options.push(`permission: ${JSON.stringify(input.permission)}`);
161
+ }
162
+ const indent = (0, project_1.indentationText)((0, project_1.resolveProjectRoot)());
163
+ const imports = [
164
+ (0, emit_1.importStatement)(["PageController", "RegisterPage"], DMS_PAGE_MODULE, indent),
165
+ (0, emit_1.importStatement)(["DefaultLayout"], DMS_LAYOUTS_MODULE, indent),
166
+ ].join("\n");
167
+ const optionLines = options
168
+ .map((option) => `${indent}${indent}${option},`)
169
+ .join("\n");
170
+ return `${imports}\n${categoryImport}\n@RegisterPage()\nexport class ${className} extends PageController(\n${indent}${JSON.stringify(input.name)},\n${indent}{\n${optionLines}\n${indent}},\n${indent}DefaultLayout({ fullWidth: true }),\n) {}\n`;
171
+ }
172
+ function placeByDir(project, dir, name, module) {
173
+ const src = (0, placement_1.srcDir)(project, module);
174
+ if (!src) {
175
+ return undefined;
176
+ }
177
+ const resolved = (0, placement_1.resolveWithinSrc)(src, dir);
178
+ if (resolved === undefined) {
179
+ return undefined;
180
+ }
181
+ const barrel = (0, placement_1.findNearestBarrel)(project, resolved);
182
+ if (!barrel) {
183
+ return undefined;
184
+ }
185
+ return {
186
+ filepath: node_path_1.default.join(resolved, name, "page.ts"),
187
+ barrel,
188
+ wire: () => (0, placement_1.addSortedExport)(barrel, (0, placement_1.barrelSpecifier)(barrel, node_path_1.default.join(resolved, name, "page"))),
189
+ };
190
+ }
191
+ function resolvePagePlacement(project, category, name, dir, module) {
192
+ if (dir !== undefined) {
193
+ return placeByDir(project, dir, name, module);
194
+ }
195
+ if (category.importModule?.endsWith(".ts")) {
196
+ const categoryDir = node_path_1.default.dirname(category.importModule);
197
+ const categoryBarrel = project.getSourceFile(node_path_1.default.join(categoryDir, "index.ts"));
198
+ if (categoryBarrel) {
199
+ return {
200
+ filepath: node_path_1.default.join(categoryDir, name, "page.ts"),
201
+ barrel: categoryBarrel,
202
+ wire: () => (0, placement_1.addSortedExport)(categoryBarrel, `./${name}/page`),
203
+ };
204
+ }
205
+ }
206
+ const root = (0, writable_1.resolveRootBarrel)(project, module);
207
+ if (!root) {
208
+ return undefined;
209
+ }
210
+ return {
211
+ filepath: node_path_1.default.join(node_path_1.default.dirname(root.getFilePath()), `${name}.ts`),
212
+ barrel: root,
213
+ wire: () => root.addImportDeclaration({ moduleSpecifier: `./${name}` }),
214
+ };
215
+ }
216
+ const SLUG = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
217
+ function slugError(name, kind) {
218
+ if (SLUG.test(name)) {
219
+ return undefined;
220
+ }
221
+ const suggestion = name
222
+ .trim()
223
+ .toLowerCase()
224
+ .replace(/[^a-z0-9]+/g, "-")
225
+ .replace(/^-+|-+$/g, "");
226
+ return (0, ops_1.invalidConfig)(`"${name}" cannot name a ${kind}: it becomes a folder, a route and a class name, so it must be lowercase letters, digits and dashes${suggestion ? ` — try "${suggestion}"` : ""}`);
227
+ }
228
+ function stagePage(input, transaction) {
229
+ const invalid = slugError(input.name, "page");
230
+ if (invalid) {
231
+ return invalid;
232
+ }
233
+ const category = (0, source_index_1.findCategoryRecord)(input.category);
234
+ if (!category) {
235
+ return (0, ops_1.notFound)(input.category);
236
+ }
237
+ const ref = (0, scan_1.joinSlug)(category.fullSlug, input.name);
238
+ if ((0, source_index_1.findPageRecord)(ref)) {
239
+ return (0, ops_1.duplicate)(input.name, "page");
240
+ }
241
+ const misplaced = (0, ops_1.moduleError)(input.module, category.importModule, `category "${input.category}"`);
242
+ if (misplaced) {
243
+ return misplaced;
244
+ }
245
+ const project = (0, writable_1.getWritableProject)();
246
+ (0, writable_1.refreshFromDisk)(project);
247
+ const placement = resolvePagePlacement(project, category, input.name, input.dir, input.module);
248
+ if (!placement) {
249
+ return (0, ops_1.unsupported)("could not resolve a barrel to register the new page");
250
+ }
251
+ if (node_fs_1.default.existsSync(placement.filepath)) {
252
+ return (0, ops_1.duplicate)(input.name, "page");
253
+ }
254
+ transaction.track(placement.barrel);
255
+ const sourceFile = project.createSourceFile(placement.filepath, buildPageSource(input, category, placement.filepath));
256
+ transaction.track(sourceFile, true);
257
+ placement.wire();
258
+ return { ref, filepath: placement.filepath, sourceFile };
259
+ }
260
+ function createPage(input) {
261
+ const transaction = new writable_1.Transaction((0, writable_1.getWritableProject)());
262
+ const staged = stagePage(input, transaction);
263
+ if ("ok" in staged) {
264
+ return staged;
265
+ }
266
+ return (0, ops_1.commit)(transaction, { ref: staged.ref, filepath: staged.filepath });
267
+ }
268
+ function configurePage(ref, patch, opts) {
269
+ const context = (0, ops_1.openPage)(ref);
270
+ if ((0, ops_1.isError)(context)) {
271
+ return context;
272
+ }
273
+ const stale = (0, ops_1.checkVersion)(context.sourceFile, opts);
274
+ if (stale) {
275
+ return stale;
276
+ }
277
+ const cls = (0, writable_1.findPageClass)(context.sourceFile, context.page.id);
278
+ if (!cls) {
279
+ return (0, ops_1.notFound)(ref);
280
+ }
281
+ const call = (0, literals_1.getExtendsCall)(cls);
282
+ const optionsArg = call?.getArguments()[1];
283
+ if (!optionsArg || !ts_morph_1.Node.isObjectLiteralExpression(optionsArg)) {
284
+ return (0, ops_1.unsupported)("page options are not a plain object literal");
285
+ }
286
+ const { category, ...scalar } = patch;
287
+ let move;
288
+ if (category !== undefined && category !== context.page.categoryRef) {
289
+ const planned = (0, page_category_move_1.planCategoryMove)(ref, context.page, category);
290
+ if ("ok" in planned) {
291
+ return planned;
292
+ }
293
+ move = planned;
294
+ }
295
+ const project = context.sourceFile.getProject();
296
+ const transaction = new writable_1.Transaction(project);
297
+ transaction.track(context.sourceFile);
298
+ const { ctx, imports } = (0, value_1.createImportCollector)({
299
+ resolveRef: (0, resource_index_1.resourceRefResolver)(),
300
+ });
301
+ try {
302
+ (0, options_patch_1.applyPatch)(optionsArg, (0, options_patch_1.optionsPatch)(optionsArg, scalar, context.page.id), false, ctx);
303
+ }
304
+ catch (error) {
305
+ transaction.rollback();
306
+ if (error instanceof value_1.InvalidValueError) {
307
+ return (0, ops_1.invalidValue)(error);
308
+ }
309
+ throw error;
310
+ }
311
+ for (const importRef of imports) {
312
+ (0, emit_1.applyImportRef)(context.sourceFile, importRef);
313
+ }
314
+ const written = move
315
+ ? (0, page_category_move_1.applyCategoryMove)(project, context.sourceFile, optionsArg, move, transaction)
316
+ : context.sourceFile;
317
+ const newRef = move?.newRef ?? ref;
318
+ const result = (0, ops_1.commit)(transaction, {
319
+ ref: newRef,
320
+ version: (0, page_structure_1.pageVersion)(written),
321
+ });
322
+ if (result.ok && newRef !== ref) {
323
+ (0, source_index_1.invalidateSourceIndex)();
324
+ result.warnings = [
325
+ ...(result.warnings ?? []),
326
+ {
327
+ code: "route_changed",
328
+ message: `the page's route is now "${newRef}"; it was "${ref}", and nothing redirects the old one`,
329
+ },
330
+ ];
331
+ }
332
+ return result;
333
+ }
334
+ //# sourceMappingURL=ops-blocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ops-blocks.js","sourceRoot":"","sources":["../../../../src/implementations/dms-builder/engine/ops-blocks.ts"],"names":[],"mappings":";;;;;AAyEA,kCAmDC;AAED,8BAgEC;AAgID,8BAeC;AAcD,8BAiDC;AAED,gCASC;AAED,sCA+EC;AAneD,sDAAyB;AACzB,0DAA6B;AAS7B,uCAAiD;AACjD,iDAAoD;AACpD,iCAKgB;AAChB,yCAAgE;AAChE,mCAAyC;AACzC,uCAAgE;AAChE,2CAMqB;AACrB,6DAI8B;AAC9B,qDAA+C;AAC/C,qDAAuD;AACvD,iCAAuD;AACvD,iDAIwB;AACxB,mCAAmE;AACnE,yCAMoB;AACpB,mDAA2D;AAC3D,+BAee;AACf,MAAM,eAAe,GAAG,gCAAgC,CAAC;AACzD,MAAM,kBAAkB,GAAG,wCAAwC,CAAC;AACpE,SAAgB,WAAW,CAAC,UAAkB,EAAE,IAAmB;IACjE,MAAM,MAAM,GAAG,IAAA,sBAAc,EAAC,UAAU,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAA,cAAQ,EAAC,UAAU,CAAC,CAAC;IAC9B,CAAC;IACD,MAAM,OAAO,GAAG,IAAA,cAAQ,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACzC,IAAI,IAAA,aAAO,EAAC,OAAO,CAAC,EAAE,CAAC;QACrB,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,MAAM,KAAK,GAAG,IAAA,kBAAY,EAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACrD,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GA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YAChB,GAAG,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC;YAC1B;gBACE,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,4BAA4B,MAAM,cAAc,GAAG,sCAAsC;aACnG;SACF,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { CategoryRef, CreateCategoryInput, EditableCategoryMeta, OpResult } from "@antelopejs/interface-dms-builder";
2
+ export declare function createCategory(input: CreateCategoryInput): OpResult<{
3
+ ref: CategoryRef;
4
+ }>;
5
+ export declare function configureCategory(ref: string, patch: Partial<EditableCategoryMeta>): OpResult;
6
+ export declare function deleteCategory(ref: string): OpResult;
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createCategory = createCategory;
7
+ exports.configureCategory = configureCategory;
8
+ exports.deleteCategory = deleteCategory;
9
+ const node_fs_1 = __importDefault(require("node:fs"));
10
+ const node_path_1 = __importDefault(require("node:path"));
11
+ const ts_morph_1 = require("ts-morph");
12
+ const emit_1 = require("./emit");
13
+ const ops_blocks_1 = require("./ops-blocks");
14
+ const project_1 = require("./project");
15
+ const resource_index_1 = require("./resource-index");
16
+ const scan_1 = require("./scan");
17
+ const source_index_1 = require("./source-index");
18
+ const value_1 = require("./value");
19
+ const writable_1 = require("./writable");
20
+ const options_patch_1 = require("./options-patch");
21
+ const ops_1 = require("./ops");
22
+ function buildCategorySource(input, parent, filepath) {
23
+ const constName = `${input.name.replace(/[^A-Za-z0-9]/g, "")}Category`;
24
+ const parentName = parent?.importName ?? "pagesCategory";
25
+ const parentModuleRaw = parent?.importModule ?? scan_1.DMS_PAGE_MODULE;
26
+ const parentSpec = parentModuleRaw.endsWith(".ts")
27
+ ? (0, emit_1.relativeModule)(filepath, parentModuleRaw)
28
+ : parentModuleRaw;
29
+ const imports = new Map();
30
+ const add = (specifier, name) => {
31
+ const set = imports.get(specifier) ?? new Set();
32
+ set.add(name);
33
+ imports.set(specifier, set);
34
+ };
35
+ add(scan_1.DMS_PAGE_MODULE, "Category");
36
+ add(parentSpec, parentName);
37
+ const options = [
38
+ `displayName: ${JSON.stringify(input.displayName)}`,
39
+ `category: ${parentName}`,
40
+ ];
41
+ if (input.icon) {
42
+ options.push(`icon: ${JSON.stringify(input.icon)}`);
43
+ }
44
+ if (input.order !== undefined) {
45
+ options.push(`order: ${input.order}`);
46
+ }
47
+ const indent = (0, project_1.indentationText)((0, project_1.resolveProjectRoot)());
48
+ const importText = [...imports]
49
+ .map(([specifier, names]) => (0, emit_1.importStatement)([...names], specifier, indent))
50
+ .join("\n");
51
+ const optionsText = options.map((option) => `${indent}${option},`).join("\n");
52
+ return `${importText}\n\nexport const ${constName} = Category(${JSON.stringify(input.name)}, {\n${optionsText}\n});\n`;
53
+ }
54
+ function createCategory(input) {
55
+ const invalid = (0, ops_blocks_1.slugError)(input.name, "category");
56
+ if (invalid) {
57
+ return invalid;
58
+ }
59
+ const parent = input.parent ? (0, source_index_1.findCategoryRecord)(input.parent) : undefined;
60
+ if (input.parent && !parent) {
61
+ return (0, ops_1.notFound)(input.parent);
62
+ }
63
+ const ref = `${parent?.ref ?? "pages"}.${input.name}`;
64
+ if ((0, source_index_1.findCategoryRecord)(ref)) {
65
+ return (0, ops_1.duplicate)(input.name, "category");
66
+ }
67
+ const misplaced = (0, ops_1.moduleError)(input.module, parent?.importModule, `category "${input.parent}"`);
68
+ if (misplaced) {
69
+ return misplaced;
70
+ }
71
+ const project = (0, writable_1.getWritableProject)();
72
+ (0, writable_1.refreshFromDisk)(project);
73
+ const barrel = (0, writable_1.resolveRootBarrel)(project, input.module);
74
+ if (!barrel) {
75
+ return (0, ops_1.unsupported)("no root barrel (src/index.ts) found");
76
+ }
77
+ const filepath = node_path_1.default.join(node_path_1.default.dirname(barrel.getFilePath()), `${input.name}.category.ts`);
78
+ if (node_fs_1.default.existsSync(filepath)) {
79
+ return (0, ops_1.duplicate)(input.name, "category");
80
+ }
81
+ const transaction = new writable_1.Transaction(project);
82
+ transaction.track(barrel);
83
+ const sourceFile = project.createSourceFile(filepath, buildCategorySource(input, parent, filepath));
84
+ transaction.track(sourceFile, true);
85
+ barrel.addImportDeclaration({ moduleSpecifier: `./${input.name}.category` });
86
+ return (0, ops_1.commit)(transaction, { ref });
87
+ }
88
+ function openCategoryDeclaration(category) {
89
+ if (!category.importName ||
90
+ !category.importModule ||
91
+ !category.importModule.endsWith(".ts")) {
92
+ return undefined;
93
+ }
94
+ const project = (0, writable_1.getWritableProject)();
95
+ (0, writable_1.refreshFromDisk)(project);
96
+ const sourceFile = project.getSourceFile(category.importModule);
97
+ const decl = sourceFile?.getVariableDeclaration(category.importName);
98
+ if (!sourceFile || !decl) {
99
+ return undefined;
100
+ }
101
+ return { sourceFile, decl };
102
+ }
103
+ function configureCategory(ref, patch) {
104
+ const category = (0, source_index_1.findCategoryRecord)(ref);
105
+ if (!category) {
106
+ return (0, ops_1.notFound)(ref);
107
+ }
108
+ const opened = openCategoryDeclaration(category);
109
+ if (!opened) {
110
+ return (0, ops_1.unsupported)("category is built-in or not editable from source");
111
+ }
112
+ const init = opened.decl.getInitializer();
113
+ const optionsArg = init && ts_morph_1.Node.isCallExpression(init) ? init.getArguments()[1] : undefined;
114
+ if (!optionsArg || !ts_morph_1.Node.isObjectLiteralExpression(optionsArg)) {
115
+ return (0, ops_1.unsupported)("category options are not a plain object literal");
116
+ }
117
+ const { parent, ...scalar } = patch;
118
+ if (parent !== undefined && parent !== category.parentRef) {
119
+ return (0, ops_1.unsupported)("changing a category's parent is not supported in v1");
120
+ }
121
+ const transaction = new writable_1.Transaction(opened.sourceFile.getProject());
122
+ transaction.track(opened.sourceFile);
123
+ const { ctx, imports } = (0, value_1.createImportCollector)({
124
+ resolveRef: (0, resource_index_1.resourceRefResolver)(),
125
+ });
126
+ try {
127
+ (0, options_patch_1.applyPatch)(optionsArg, (0, options_patch_1.optionsPatch)(optionsArg, scalar, category.id), false, ctx);
128
+ }
129
+ catch (error) {
130
+ transaction.rollback();
131
+ if (error instanceof value_1.InvalidValueError) {
132
+ return (0, ops_1.invalidValue)(error);
133
+ }
134
+ throw error;
135
+ }
136
+ for (const importRef of imports) {
137
+ (0, emit_1.applyImportRef)(opened.sourceFile, importRef);
138
+ }
139
+ return (0, ops_1.commit)(transaction, undefined);
140
+ }
141
+ function deleteCategory(ref) {
142
+ const category = (0, source_index_1.findCategoryRecord)(ref);
143
+ if (!category) {
144
+ return (0, ops_1.notFound)(ref);
145
+ }
146
+ const blockedBy = [
147
+ ...(0, source_index_1.listPageRecords)()
148
+ .filter((page) => page.categoryRef === ref || page.categoryRef.startsWith(`${ref}.`))
149
+ .map((page) => page.ref),
150
+ ...(0, source_index_1.listCategoryRecords)()
151
+ .filter((child) => child.parentRef === ref)
152
+ .map((child) => child.ref),
153
+ ];
154
+ if (blockedBy.length > 0) {
155
+ return { ok: false, error: { code: "referential_integrity", blockedBy } };
156
+ }
157
+ const opened = openCategoryDeclaration(category);
158
+ if (!opened) {
159
+ return (0, ops_1.unsupported)("category is built-in or not editable from source");
160
+ }
161
+ const statement = opened.decl.getVariableStatement();
162
+ if (!statement) {
163
+ return (0, ops_1.notFound)(ref);
164
+ }
165
+ const project = opened.sourceFile.getProject();
166
+ const transaction = new writable_1.Transaction(project);
167
+ transaction.track(opened.sourceFile);
168
+ statement.remove();
169
+ if ((0, writable_1.holdsOnlyImports)(opened.sourceFile)) {
170
+ for (const importer of (0, writable_1.findImporters)(project, opened.sourceFile.getFilePath())) {
171
+ transaction.track(importer.getSourceFile());
172
+ importer.remove();
173
+ }
174
+ transaction.trackDelete(opened.sourceFile);
175
+ }
176
+ return (0, ops_1.commit)(transaction, undefined);
177
+ }
178
+ //# sourceMappingURL=ops-categories.js.map