@beechcms/core 0.6.0-preview.4 → 0.6.0

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 (236) hide show
  1. package/dist/automations/automations-grammar-words.d.ts.map +1 -0
  2. package/dist/automations/automations.repository.interface.d.ts.map +1 -0
  3. package/dist/automations/automations.runner.interface.d.ts.map +1 -0
  4. package/dist/automations/automations.types.d.ts.map +1 -0
  5. package/dist/common/clock.d.ts.map +1 -0
  6. package/dist/common/email.provider.d.ts +32 -0
  7. package/dist/common/email.provider.d.ts.map +1 -0
  8. package/dist/common/email.provider.js +4 -0
  9. package/dist/{hooks.d.ts → common/hooks.d.ts} +2 -2
  10. package/dist/common/hooks.d.ts.map +1 -0
  11. package/dist/common/id-generator.d.ts.map +1 -0
  12. package/dist/common/storage.d.ts.map +1 -0
  13. package/dist/{content-scan.repository.d.ts → content/content-scan.repository.d.ts} +1 -1
  14. package/dist/content/content-scan.repository.d.ts.map +1 -0
  15. package/dist/{content.repository.d.ts → content/content.repository.d.ts} +13 -4
  16. package/dist/content/content.repository.d.ts.map +1 -0
  17. package/dist/content/demo-data.repository.d.ts.map +1 -0
  18. package/dist/content/idempotency.repository.d.ts.map +1 -0
  19. package/dist/content/richtext/richtext-render.d.ts +12 -0
  20. package/dist/content/richtext/richtext-render.d.ts.map +1 -0
  21. package/dist/{richtext-render.js → content/richtext/richtext-render.js} +7 -14
  22. package/dist/content/richtext/richtext.d.ts.map +1 -0
  23. package/dist/{seed.repository.d.ts → content/seed.repository.d.ts} +1 -1
  24. package/dist/content/seed.repository.d.ts.map +1 -0
  25. package/dist/content/slug-utils.d.ts.map +1 -0
  26. package/dist/{dashboard-layout.d.ts → dashboard-layout/dashboard-layout.d.ts} +1 -1
  27. package/dist/dashboard-layout/dashboard-layout.d.ts.map +1 -0
  28. package/dist/dashboard-layout/dashboard-layout.repository.d.ts.map +1 -0
  29. package/dist/dashboard-layout/dashboard-permissions.d.ts.map +1 -0
  30. package/dist/dashboard-layout/dashboard-scopes.d.ts.map +1 -0
  31. package/dist/dashboard-layout/kanban/kanban-position.repository.d.ts +19 -0
  32. package/dist/dashboard-layout/kanban/kanban-position.repository.d.ts.map +1 -0
  33. package/dist/dashboard-layout/kanban/kanban.d.ts +75 -0
  34. package/dist/dashboard-layout/kanban/kanban.d.ts.map +1 -0
  35. package/dist/dashboard-layout/kanban/kanban.js +82 -0
  36. package/dist/dashboard-layout/layout-permissions.d.ts.map +1 -0
  37. package/dist/{seed-layout.d.ts → dashboard-layout/seed-layout.d.ts} +77 -3
  38. package/dist/dashboard-layout/seed-layout.d.ts.map +1 -0
  39. package/dist/{seed-layout.js → dashboard-layout/seed-layout.js} +101 -8
  40. package/dist/{seed-layout.repository.d.ts → dashboard-layout/seed-layout.repository.d.ts} +5 -1
  41. package/dist/dashboard-layout/seed-layout.repository.d.ts.map +1 -0
  42. package/dist/dashboard-layout/view-authorization.d.ts +18 -0
  43. package/dist/dashboard-layout/view-authorization.d.ts.map +1 -0
  44. package/dist/dashboard-layout/view-authorization.js +28 -0
  45. package/dist/engine/ddl.d.ts +173 -0
  46. package/dist/engine/ddl.d.ts.map +1 -0
  47. package/dist/engine/ddl.js +454 -0
  48. package/dist/engine/define-seed.d.ts.map +1 -0
  49. package/dist/engine/engine.d.ts +4 -0
  50. package/dist/engine/engine.d.ts.map +1 -0
  51. package/dist/engine/engine.js +4 -0
  52. package/dist/engine/policies.d.ts.map +1 -0
  53. package/dist/engine/query.d.ts +23 -0
  54. package/dist/engine/query.d.ts.map +1 -0
  55. package/dist/engine/query.js +208 -0
  56. package/dist/engine/relations.d.ts.map +1 -0
  57. package/dist/{schema-mutator.d.ts → engine/schema-mutator.d.ts} +4 -0
  58. package/dist/engine/schema-mutator.d.ts.map +1 -0
  59. package/dist/engine/seed-ddl-destructive.d.ts.map +1 -0
  60. package/dist/engine/seed-ddl.d.ts.map +1 -0
  61. package/dist/engine/seed-registry.d.ts.map +1 -0
  62. package/dist/{seed-registry.js → engine/seed-registry.js} +1 -1
  63. package/dist/engine/seed-types-generator.d.ts +10 -0
  64. package/dist/engine/seed-types-generator.d.ts.map +1 -0
  65. package/dist/engine/seed-types-generator.js +86 -0
  66. package/dist/engine/seed-validation.d.ts.map +1 -0
  67. package/dist/{seed-validation.js → engine/seed-validation.js} +14 -1
  68. package/dist/engine/seeds.d.ts.map +1 -0
  69. package/dist/engine/serialize.d.ts +20 -0
  70. package/dist/engine/serialize.d.ts.map +1 -0
  71. package/dist/engine/serialize.js +160 -0
  72. package/dist/{types.d.ts → engine/types.d.ts} +102 -63
  73. package/dist/engine/types.d.ts.map +1 -0
  74. package/dist/engine/validation/cache.d.ts +12 -0
  75. package/dist/engine/validation/cache.d.ts.map +1 -0
  76. package/dist/engine/validation/cache.js +115 -0
  77. package/dist/engine/validation/file-branch.d.ts +48 -0
  78. package/dist/engine/validation/file-branch.d.ts.map +1 -0
  79. package/dist/engine/validation/file-branch.js +127 -0
  80. package/dist/engine/validation/index.d.ts +115 -0
  81. package/dist/engine/validation/index.d.ts.map +1 -0
  82. package/dist/engine/validation/index.js +333 -0
  83. package/dist/engine/validation/primitives.d.ts +33 -0
  84. package/dist/engine/validation/primitives.d.ts.map +1 -0
  85. package/dist/engine/validation/primitives.js +43 -0
  86. package/dist/engine/validation/richtext-sanitizer.d.ts +30 -0
  87. package/dist/engine/validation/richtext-sanitizer.d.ts.map +1 -0
  88. package/dist/engine/validation/richtext-sanitizer.js +193 -0
  89. package/dist/engine/validation/schema-builders.d.ts +12 -0
  90. package/dist/engine/validation/schema-builders.d.ts.map +1 -0
  91. package/dist/engine/validation/schema-builders.js +322 -0
  92. package/dist/index.d.ts +48 -44
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +48 -44
  95. package/dist/media/file-types.d.ts +13 -0
  96. package/dist/media/file-types.d.ts.map +1 -0
  97. package/dist/media/media.repository.d.ts.map +1 -0
  98. package/dist/queue/queue.interface.d.ts +39 -0
  99. package/dist/queue/queue.interface.d.ts.map +1 -0
  100. package/dist/queue/queue.stub.d.ts +6 -0
  101. package/dist/queue/queue.stub.d.ts.map +1 -0
  102. package/dist/queue/queue.stub.js +8 -0
  103. package/dist/queue/scheduler.interface.d.ts.map +1 -0
  104. package/dist/queue/scheduler.interface.js +3 -0
  105. package/dist/queue/scheduler.stub.d.ts.map +1 -0
  106. package/dist/queue.interface.d.ts +4 -4
  107. package/dist/queue.interface.d.ts.map +1 -1
  108. package/dist/queue.stub.d.ts.map +1 -1
  109. package/dist/rate-limit/rate-limiter.d.ts +5 -0
  110. package/dist/rate-limit/rate-limiter.d.ts.map +1 -1
  111. package/dist/search/search.repository.d.ts +1 -1
  112. package/dist/search/search.repository.d.ts.map +1 -1
  113. package/dist/seed-types-generator.d.ts +1 -1
  114. package/dist/seed-types-generator.d.ts.map +1 -1
  115. package/dist/settings/site-settings.repository.d.ts.map +1 -0
  116. package/dist/settings/site-settings.repository.js +3 -0
  117. package/dist/webhooks/webhook-crypto.d.ts +8 -0
  118. package/dist/webhooks/webhook-crypto.d.ts.map +1 -0
  119. package/dist/webhooks/webhook-crypto.js +37 -0
  120. package/dist/webhooks/webhook-validation.d.ts.map +1 -0
  121. package/dist/widget/widget.repository.d.ts +1 -1
  122. package/dist/widget/widget.repository.d.ts.map +1 -1
  123. package/package.json +4 -3
  124. package/dist/automations-grammar-words.d.ts.map +0 -1
  125. package/dist/automations.repository.interface.d.ts.map +0 -1
  126. package/dist/automations.runner.interface.d.ts.map +0 -1
  127. package/dist/automations.runner.stub.d.ts +0 -5
  128. package/dist/automations.runner.stub.d.ts.map +0 -1
  129. package/dist/automations.runner.stub.js +0 -7
  130. package/dist/automations.types.d.ts.map +0 -1
  131. package/dist/clock.d.ts.map +0 -1
  132. package/dist/content-scan.repository.d.ts.map +0 -1
  133. package/dist/content.repository.d.ts.map +0 -1
  134. package/dist/dashboard-layout.d.ts.map +0 -1
  135. package/dist/dashboard-layout.repository.d.ts.map +0 -1
  136. package/dist/dashboard-permissions.d.ts.map +0 -1
  137. package/dist/dashboard-scopes.d.ts.map +0 -1
  138. package/dist/define-seed.d.ts.map +0 -1
  139. package/dist/demo-data.repository.d.ts.map +0 -1
  140. package/dist/engine.d.ts +0 -144
  141. package/dist/engine.d.ts.map +0 -1
  142. package/dist/engine.js +0 -723
  143. package/dist/file-types.d.ts +0 -13
  144. package/dist/file-types.d.ts.map +0 -1
  145. package/dist/hooks.d.ts.map +0 -1
  146. package/dist/id-generator.d.ts.map +0 -1
  147. package/dist/idempotency.repository.d.ts.map +0 -1
  148. package/dist/layout-permissions.d.ts.map +0 -1
  149. package/dist/media.repository.d.ts.map +0 -1
  150. package/dist/policies.d.ts.map +0 -1
  151. package/dist/relations.d.ts.map +0 -1
  152. package/dist/richtext-render.d.ts +0 -11
  153. package/dist/richtext-render.d.ts.map +0 -1
  154. package/dist/richtext.d.ts.map +0 -1
  155. package/dist/scheduler.interface.d.ts.map +0 -1
  156. package/dist/scheduler.stub.d.ts.map +0 -1
  157. package/dist/schema-mutator.d.ts.map +0 -1
  158. package/dist/seed-ddl-destructive.d.ts.map +0 -1
  159. package/dist/seed-ddl.d.ts.map +0 -1
  160. package/dist/seed-layout.d.ts.map +0 -1
  161. package/dist/seed-layout.repository.d.ts.map +0 -1
  162. package/dist/seed-registry.d.ts.map +0 -1
  163. package/dist/seed-validation.d.ts.map +0 -1
  164. package/dist/seed.repository.d.ts.map +0 -1
  165. package/dist/seeds.d.ts.map +0 -1
  166. package/dist/site-settings.repository.d.ts.map +0 -1
  167. package/dist/slug-utils.d.ts.map +0 -1
  168. package/dist/storage.d.ts.map +0 -1
  169. package/dist/types.d.ts.map +0 -1
  170. package/dist/validation.d.ts +0 -50
  171. package/dist/validation.d.ts.map +0 -1
  172. package/dist/validation.js +0 -659
  173. package/dist/webhook-validation.d.ts.map +0 -1
  174. /package/dist/{automations-grammar-words.d.ts → automations/automations-grammar-words.d.ts} +0 -0
  175. /package/dist/{automations-grammar-words.js → automations/automations-grammar-words.js} +0 -0
  176. /package/dist/{automations.repository.interface.d.ts → automations/automations.repository.interface.d.ts} +0 -0
  177. /package/dist/{automations.repository.interface.js → automations/automations.repository.interface.js} +0 -0
  178. /package/dist/{automations.runner.interface.d.ts → automations/automations.runner.interface.d.ts} +0 -0
  179. /package/dist/{automations.runner.interface.js → automations/automations.runner.interface.js} +0 -0
  180. /package/dist/{automations.types.d.ts → automations/automations.types.d.ts} +0 -0
  181. /package/dist/{automations.types.js → automations/automations.types.js} +0 -0
  182. /package/dist/{clock.d.ts → common/clock.d.ts} +0 -0
  183. /package/dist/{clock.js → common/clock.js} +0 -0
  184. /package/dist/{hooks.js → common/hooks.js} +0 -0
  185. /package/dist/{id-generator.d.ts → common/id-generator.d.ts} +0 -0
  186. /package/dist/{id-generator.js → common/id-generator.js} +0 -0
  187. /package/dist/{storage.d.ts → common/storage.d.ts} +0 -0
  188. /package/dist/{storage.js → common/storage.js} +0 -0
  189. /package/dist/{content-scan.repository.js → content/content-scan.repository.js} +0 -0
  190. /package/dist/{content.repository.js → content/content.repository.js} +0 -0
  191. /package/dist/{demo-data.repository.d.ts → content/demo-data.repository.d.ts} +0 -0
  192. /package/dist/{demo-data.repository.js → content/demo-data.repository.js} +0 -0
  193. /package/dist/{idempotency.repository.d.ts → content/idempotency.repository.d.ts} +0 -0
  194. /package/dist/{idempotency.repository.js → content/idempotency.repository.js} +0 -0
  195. /package/dist/{richtext.d.ts → content/richtext/richtext.d.ts} +0 -0
  196. /package/dist/{richtext.js → content/richtext/richtext.js} +0 -0
  197. /package/dist/{seed.repository.js → content/seed.repository.js} +0 -0
  198. /package/dist/{slug-utils.d.ts → content/slug-utils.d.ts} +0 -0
  199. /package/dist/{slug-utils.js → content/slug-utils.js} +0 -0
  200. /package/dist/{dashboard-layout.js → dashboard-layout/dashboard-layout.js} +0 -0
  201. /package/dist/{dashboard-layout.repository.d.ts → dashboard-layout/dashboard-layout.repository.d.ts} +0 -0
  202. /package/dist/{dashboard-layout.repository.js → dashboard-layout/dashboard-layout.repository.js} +0 -0
  203. /package/dist/{dashboard-permissions.d.ts → dashboard-layout/dashboard-permissions.d.ts} +0 -0
  204. /package/dist/{dashboard-permissions.js → dashboard-layout/dashboard-permissions.js} +0 -0
  205. /package/dist/{dashboard-scopes.d.ts → dashboard-layout/dashboard-scopes.d.ts} +0 -0
  206. /package/dist/{dashboard-scopes.js → dashboard-layout/dashboard-scopes.js} +0 -0
  207. /package/dist/{media.repository.js → dashboard-layout/kanban/kanban-position.repository.js} +0 -0
  208. /package/dist/{layout-permissions.d.ts → dashboard-layout/layout-permissions.d.ts} +0 -0
  209. /package/dist/{layout-permissions.js → dashboard-layout/layout-permissions.js} +0 -0
  210. /package/dist/{seed-layout.repository.js → dashboard-layout/seed-layout.repository.js} +0 -0
  211. /package/dist/{define-seed.d.ts → engine/define-seed.d.ts} +0 -0
  212. /package/dist/{define-seed.js → engine/define-seed.js} +0 -0
  213. /package/dist/{policies.d.ts → engine/policies.d.ts} +0 -0
  214. /package/dist/{policies.js → engine/policies.js} +0 -0
  215. /package/dist/{relations.d.ts → engine/relations.d.ts} +0 -0
  216. /package/dist/{relations.js → engine/relations.js} +0 -0
  217. /package/dist/{schema-mutator.js → engine/schema-mutator.js} +0 -0
  218. /package/dist/{seed-ddl-destructive.d.ts → engine/seed-ddl-destructive.d.ts} +0 -0
  219. /package/dist/{seed-ddl-destructive.js → engine/seed-ddl-destructive.js} +0 -0
  220. /package/dist/{seed-ddl.d.ts → engine/seed-ddl.d.ts} +0 -0
  221. /package/dist/{seed-ddl.js → engine/seed-ddl.js} +0 -0
  222. /package/dist/{seed-registry.d.ts → engine/seed-registry.d.ts} +0 -0
  223. /package/dist/{seed-validation.d.ts → engine/seed-validation.d.ts} +0 -0
  224. /package/dist/{seeds.d.ts → engine/seeds.d.ts} +0 -0
  225. /package/dist/{seeds.js → engine/seeds.js} +0 -0
  226. /package/dist/{types.js → engine/types.js} +0 -0
  227. /package/dist/{file-types.js → media/file-types.js} +0 -0
  228. /package/dist/{media.repository.d.ts → media/media.repository.d.ts} +0 -0
  229. /package/dist/{scheduler.interface.js → media/media.repository.js} +0 -0
  230. /package/dist/{site-settings.repository.js → queue/queue.interface.js} +0 -0
  231. /package/dist/{scheduler.interface.d.ts → queue/scheduler.interface.d.ts} +0 -0
  232. /package/dist/{scheduler.stub.d.ts → queue/scheduler.stub.d.ts} +0 -0
  233. /package/dist/{scheduler.stub.js → queue/scheduler.stub.js} +0 -0
  234. /package/dist/{site-settings.repository.d.ts → settings/site-settings.repository.d.ts} +0 -0
  235. /package/dist/{webhook-validation.d.ts → webhooks/webhook-validation.d.ts} +0 -0
  236. /package/dist/{webhook-validation.js → webhooks/webhook-validation.js} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automations-grammar-words.d.ts","sourceRoot":"","sources":["../../src/automations/automations-grammar-words.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,aAKpC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automations.repository.interface.d.ts","sourceRoot":"","sources":["../../src/automations/automations.repository.interface.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAE/H,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,iBAAiB,EAAE,CAAA;IAC7B,kBAAkB,EAAE,QAAQ,GAAG,IAAI,CAAA;IACnC,OAAO,EAAE,gBAAgB,EAAE,CAAA;CAC5B;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAA;AAElE,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IAC7C,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAA;IAChD,MAAM,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACrD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/D,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACnD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACjC,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;CACnF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automations.runner.interface.d.ts","sourceRoot":"","sources":["../../src/automations/automations.runner.interface.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAEpE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,sBAAsB,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACpD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automations.types.d.ts","sourceRoot":"","sources":["../../src/automations/automations.types.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE5E,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,sBAAsB,CAAA;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAED,MAAM,WAAW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IACH,GAAG,IAAI,MAAM,CAAA;IAEb;;;;OAIG;IACH,UAAU,IAAI,MAAM,CAAA;CACrB;AAID;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAGzB,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The resolved email message that the provider receives and sends.
3
+ * Constructed by the service by combining call parameters with template builder output.
4
+ */
5
+ export interface OutboundEmail {
6
+ /** Sender address in RFC 5321 format (e.g., "Beech CMS <noreply@beechcms.dev>"). */
7
+ from: string;
8
+ /** List of recipient addresses. Must contain at least one element. */
9
+ to: string[];
10
+ subject: string;
11
+ /** Complete HTML body. Must be a valid HTML document (see templates/shell.ts). */
12
+ html: string;
13
+ }
14
+ /**
15
+ * Formal contract for email sending providers.
16
+ *
17
+ * Every implementation (Resend, SMTP, …) must comply with this interface.
18
+ * It is the only point of coupling between the email module and any external service.
19
+ *
20
+ * To add a new provider: create a class in apps/api/src/shared/email/providers/
21
+ * that implements this interface, then wire it in email.service.ts.
22
+ */
23
+ export interface EmailProvider {
24
+ /**
25
+ * Sends a single transactional email.
26
+ *
27
+ * @throws {Error} If the provider rejects the request. The caller is responsible
28
+ * for catching and handling this error appropriately.
29
+ */
30
+ send(email: OutboundEmail): Promise<void>;
31
+ }
32
+ //# sourceMappingURL=email.provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email.provider.d.ts","sourceRoot":"","sources":["../../src/common/email.provider.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,oFAAoF;IACpF,IAAI,EAAE,MAAM,CAAA;IACZ,sEAAsE;IACtE,EAAE,EAAE,MAAM,EAAE,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C"}
@@ -0,0 +1,4 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ // Copyright (c) 2024–2026 Flavio De Musso. All rights reserved.
3
+ // See LICENSE in the repository root for license terms.
4
+ export {};
@@ -1,5 +1,5 @@
1
- import type { ContentRepository } from './content.repository.js';
2
- import type { Seed } from './types.js';
1
+ import type { ContentRepository } from '../content/content.repository.js';
2
+ import type { Seed } from '../engine/types.js';
3
3
  export interface HookActor {
4
4
  id: string;
5
5
  role?: string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/common/hooks.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAE9C,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,IAAI,CAAA;IACV,6FAA6F;IAC7F,UAAU,EAAE,iBAAiB,CAAA;IAC7B,gGAAgG;IAChG,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB;;;;OAIG;IACH,EAAE,EAAE,OAAO,CAAA;CACZ;AAED,MAAM,WAAW,UAAU;IAGzB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAA;IAChI,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAA;IAC/I,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IAGrE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACpF,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACpF,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CACrE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id-generator.d.ts","sourceRoot":"","sources":["../../src/common/id-generator.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,IAAI,IAAI,MAAM,CAAA;IAEd;;;;;OAKG;IACH,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAA;CACzC;AAMD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAI/B,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/common/storage.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,C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AAO,EAAE,KAAK,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAElJ,sDAAsD;IACtD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElE,oDAAoD;IACpD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACnE"}
@@ -1,4 +1,4 @@
1
- import type { Seed } from './types.js';
1
+ import type { Seed } from '../engine/types.js';
2
2
  export interface IContentScanRepository {
3
3
  /**
4
4
  * Scans across all registered seeds to identify media keys that are currently referenced
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-scan.repository.d.ts","sourceRoot":"","sources":["../../src/content/content-scan.repository.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAE9C,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;CAC5D"}
@@ -1,4 +1,4 @@
1
- import { Seed, SelectOptions } from './types.js';
1
+ import { Seed, SelectOptions } from '../engine/types.js';
2
2
  /**
3
3
  * One row of the cross-seed pending-drafts overview. Aggregates the minimum a
4
4
  * reviewer needs to triage a draft without opening it: which seed it belongs to,
@@ -19,8 +19,8 @@ export interface DraftSummary {
19
19
  * Base Repository Error
20
20
  */
21
21
  export declare class RepositoryError extends Error {
22
- cause?: unknown | undefined;
23
- constructor(message: string, cause?: unknown | undefined);
22
+ cause?: unknown;
23
+ constructor(message: string, cause?: unknown);
24
24
  }
25
25
  /**
26
26
  * Thrown when an entry is not found by ID or Slug
@@ -184,6 +184,15 @@ export interface ContentRepository {
184
184
  }): Promise<{
185
185
  newValue: number;
186
186
  }>;
187
+ /**
188
+ * Atomically applies an axis-value patch AND a kanban_positions upsert in one DB batch (KB-S04e).
189
+ * `patch` is null for same-column reorders (position only).
190
+ */
191
+ updateWithKanbanPosition(seed: Seed, id: string, patch: Record<string, unknown> | null, position: string, axisBranchId: string, ctx: {
192
+ actor: string;
193
+ }): Promise<{
194
+ success: boolean;
195
+ }>;
187
196
  /**
188
197
  * Executes a list of write operations atomically via a single `db.batch`.
189
198
  * Document-level lifecycle hooks do NOT run for operations inside this call.
@@ -227,7 +236,7 @@ export interface ContentRepository {
227
236
  * Caller is responsible for validation; this method assumes the payload is
228
237
  * already shape-checked against the seed.
229
238
  */
230
- bulkUpdate(seedSlug: string, ids: string[], fields: Record<string, BulkFieldUpdate>): Promise<{
239
+ bulkUpdate(seed: Seed, ids: string[], fields: Record<string, BulkFieldUpdate>): Promise<{
231
240
  updated: number;
232
241
  failed: Array<{
233
242
  id: string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.repository.d.ts","sourceRoot":"","sources":["../../src/content/content.repository.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAExD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE;QACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;QACnB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACJ,KAAK,CAAC,EAAE,OAAO;IAAnD,YAAY,OAAO,EAAE,MAAM,EAAS,KAAK,CAAC,EAAE,OAAO,EAGlD;CACF;AAED;;GAEG;AAC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MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAE1E;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAEvD;;;;;OAKG;IACH,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAA;IAEzD;;;;OAIG;IACH,UAAU,CACR,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,MAAM,EAAE,EACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACtC,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,KAAK,CAAC;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAA;CAC/E"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demo-data.repository.d.ts","sourceRoot":"","sources":["../../src/content/demo-data.repository.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,mEAAmE;IACnE,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAC9B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"idempotency.repository.d.ts","sourceRoot":"","sources":["../../src/content/idempotency.repository.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAA;IACtD,KAAK,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC/C,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACpC"}
@@ -0,0 +1,12 @@
1
+ import type { JSONContent } from '@tiptap/core';
2
+ /**
3
+ * Accetta JSON TipTap (`{ type: 'doc', ... }`) o envelope v1.
4
+ * Le stringhe HTML legacy NON sono più supportate: ritornano null (drop-to-empty al render).
5
+ */
6
+ export declare function normalizeRichtextForRender(value: unknown): JSONContent | null;
7
+ /**
8
+ * Render deterministico JSON → HTML (per display, anteprime, API pubblica).
9
+ * Input non-JSON o stringa legacy → '' (drop-to-empty; nessun pass-through).
10
+ */
11
+ export declare function renderRichText(value: unknown): string;
12
+ //# sourceMappingURL=richtext-render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"richtext-render.d.ts","sourceRoot":"","sources":["../../../src/content/richtext/richtext-render.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAuD/C;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,CAQ7E;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIrD"}
@@ -53,35 +53,28 @@ function createRichTextHtmlExtensions() {
53
53
  ];
54
54
  }
55
55
  /**
56
- * Accetta JSON TipTap (`{ type: 'doc', ... }`), envelope v1, o stringa HTML legacy.
56
+ * Accetta JSON TipTap (`{ type: 'doc', ... }`) o envelope v1.
57
+ * Le stringhe HTML legacy NON sono più supportate: ritornano null (drop-to-empty al render).
57
58
  */
58
59
  export function normalizeRichtextForRender(value) {
59
60
  if (value == null || value === '')
60
61
  return null;
61
- if (typeof value === 'string')
62
- return value;
63
- if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
62
+ if (typeof value === 'object' && !Array.isArray(value)) {
64
63
  const o = value;
65
- if (isRichtextEnvelopeV1(value)) {
64
+ if (isRichtextEnvelopeV1(value))
66
65
  return o.doc;
67
- }
68
- if (o.type === 'doc') {
66
+ if (o.type === 'doc')
69
67
  return value;
70
- }
71
68
  }
72
69
  return null;
73
70
  }
74
71
  /**
75
72
  * Render deterministico JSON → HTML (per display, anteprime, API pubblica).
76
- * Per stringhe HTML legacy restituisce la stringa sanificata come pass-through (nessun parse TipTap).
73
+ * Input non-JSON o stringa legacy '' (drop-to-empty; nessun pass-through).
77
74
  */
78
75
  export function renderRichText(value) {
79
76
  const normalized = normalizeRichtextForRender(value);
80
77
  if (normalized == null)
81
78
  return '';
82
- if (typeof normalized === 'string') {
83
- return normalized;
84
- }
85
- const extensions = createRichTextHtmlExtensions();
86
- return generateHTML(normalized, extensions);
79
+ return generateHTML(normalized, createRichTextHtmlExtensions());
87
80
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"richtext.d.ts","sourceRoot":"","sources":["../../../src/content/richtext/richtext.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAG,CAAU,CAAA;AAEjD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,EAAE,OAAO,uBAAuB,CAAA;IAC7C,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC7B,CAAA;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAIhF"}
@@ -1,4 +1,4 @@
1
- import type { Seed } from './types.js';
1
+ import type { Seed } from '../engine/types.js';
2
2
  export interface SeedRecord {
3
3
  slug: string;
4
4
  definition: Seed;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seed.repository.d.ts","sourceRoot":"","sources":["../../src/content/seed.repository.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAE9C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;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E,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CASnG"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import type { Seed } from './types.js';
2
+ import type { Seed } from '../engine/types.js';
3
3
  /** A placed widget. `type` is namespaced ('core/stat', '@acme/weather').
4
4
  * `config` is opaque to core/API except for the optional `seedSlug` key,
5
5
  * which enables auto-cleanup when the referenced seed disappears. */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-layout.d.ts","sourceRoot":"","sources":["../../src/dashboard-layout/dashboard-layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAM9C;;sEAEsE;AACtE,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,uBAAuB,EAAE,CAAA;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0CAA0C;IAC1C,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B;gCAC4B;IAC5B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,qEAAqE;IACrE,IAAI,CAAC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EAAE,eAAe,EACvB,GAAG,EAAE,sBAAsB,GAC1B,6BAA6B,CA2E/B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-layout.repository.d.ts","sourceRoot":"","sources":["../../src/dashboard-layout/dashboard-layout.repository.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE5D,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,eAAe,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,iEAAiE;IACjE,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAA;IACzD,kFAAkF;IAClF,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAC/B,mDAAmD;IACnD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAChF,kDAAkD;IAClD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACrC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-permissions.d.ts","sourceRoot":"","sources":["../../src/dashboard-layout/dashboard-permissions.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,+BAA+B,EAAE,aAAa,CAAC,MAAM,CAAa,CAAA;AAE/E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAGzE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-scopes.d.ts","sourceRoot":"","sources":["../../src/dashboard-layout/dashboard-scopes.ts"],"names":[],"mappings":"AAOA;oDACoD;AACpD,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,MAAM,CAAuB,CAAA;AAE/E,eAAO,MAAM,uBAAuB,YAAY,CAAA;AAEhD,sFAAsF;AACtF,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,mFAAmF;AACnF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAK5D;AAED;uDACuD;AACvD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,EAAE,CAKpF"}
@@ -0,0 +1,19 @@
1
+ export interface KanbanPositionRecord {
2
+ entryId: string;
3
+ position: string;
4
+ }
5
+ /**
6
+ * Persistence contract for card ordering. The ONLY gateway to `kanban_positions`.
7
+ * Handlers and the dashboard never touch the table directly (Botanical invariant).
8
+ */
9
+ export interface IKanbanPositionRepository {
10
+ /** entryId → position for one column axis (entries without a row are omitted). */
11
+ getColumn(seedSlug: string, axisBranchId: string): Promise<Map<string, string>>;
12
+ /** Single-row upsert — exactly one write per drag (KB-S04b). */
13
+ setPosition(seedSlug: string, entryId: string, axisBranchId: string, position: string): Promise<void>;
14
+ /** Remove an entry's position row (e.g. entry deleted). */
15
+ remove(seedSlug: string, entryId: string, axisBranchId: string): Promise<void>;
16
+ /** Async rebalance (KB-S04f): rewrite a whole column's positions in one batch. */
17
+ rebalance(seedSlug: string, axisBranchId: string, ordered: KanbanPositionRecord[]): Promise<void>;
18
+ }
19
+ //# sourceMappingURL=kanban-position.repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kanban-position.repository.d.ts","sourceRoot":"","sources":["../../../src/dashboard-layout/kanban/kanban-position.repository.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,kFAAkF;IAClF,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAC/E,gEAAgE;IAChE,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrG,2DAA2D;IAC3D,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9E,kFAAkF;IAClF,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAClG"}
@@ -0,0 +1,75 @@
1
+ import type { Seed, Branch, FilterGroup } from '../../engine/types.js';
2
+ /** Branch types that can form a discrete, finite set of columns (KB §2). */
3
+ export type KanbanAxisBranchType = 'text' | 'tags' | 'boolean';
4
+ /** A branch eligible to be the kanban axis. */
5
+ export interface KanbanAxisCandidate {
6
+ /** Stable branch id (br_XX) — persisted as the axis key. Never the alias. */
7
+ branchId: string;
8
+ alias: string;
9
+ label: string;
10
+ type: KanbanAxisBranchType;
11
+ }
12
+ /** A single column on the board, in deterministic display order (Q2). */
13
+ export interface KanbanColumnDescriptor {
14
+ /** The discrete axis value. `null` ⇒ the always-last "Senza valore" column. */
15
+ value: string | null;
16
+ label: string;
17
+ }
18
+ /** Per-seed, dashboard-side kanban view preferences. Persisted in
19
+ * seed_layouts.view_config (KB-S02). NOT part of FormLayout. */
20
+ export interface KanbanConfig {
21
+ /** Chosen axis branch id, or null when the user has not configured one (KB-U02). */
22
+ axisBranchId: string | null;
23
+ /** Card sort inside columns. null ⇒ manual order via kanban_positions (KB-U22b). */
24
+ sort: {
25
+ branchId: string;
26
+ dir: 'ASC' | 'DESC';
27
+ } | null;
28
+ /** Axis values the user chose to hide when columns exceed the cap (KB-U06c). */
29
+ hiddenColumnValues?: string[];
30
+ }
31
+ export type KanbanIncompatibleReason = 'drafts-enabled' | 'no-candidate-branch';
32
+ export interface KanbanCompatibility {
33
+ compatible: boolean;
34
+ reason?: KanbanIncompatibleReason;
35
+ candidates: KanbanAxisCandidate[];
36
+ }
37
+ /**
38
+ * Determines whether a seed can be displayed as a Kanban board, and which
39
+ * branches may serve as the column axis. Pure — no I/O. (KB-S01)
40
+ *
41
+ * Q3: seeds with `allowDrafts: true` are NOT kanban-compatible.
42
+ */
43
+ export declare function resolveKanbanConfig(seed: Seed): KanbanCompatibility;
44
+ /**
45
+ * Deterministic, stable column order for a chosen axis (Q2). The "Senza valore"
46
+ * (value: null) column is always appended last. Values out of `options` are NOT
47
+ * given their own column (KB-U25) — the board folds them into "Senza valore".
48
+ *
49
+ * @param distinctTagValues unique tag values observed in data (tags axis without options).
50
+ */
51
+ export declare function resolveKanbanColumns(branch: Branch, distinctTagValues?: string[]): KanbanColumnDescriptor[];
52
+ /**
53
+ * Pure: the FilterGroup selecting one kanban column's entries for a given axis branch.
54
+ * `value: null` ⇒ "Senza valore" — entries where the axis field is NULL or empty (KB-U25).
55
+ * Boolean descriptor values 'true'/'false' are coerced to actual booleans for the engine.
56
+ */
57
+ /** Body of PATCH /:slug/:id/kanban-move. The server applies the axis change (if any)
58
+ * AND the position upsert atomically (KB-S04e). */
59
+ export interface KanbanMoveBody {
60
+ /** Axis branch id (br_XX). Identifies which kanban_positions row + which branch to patch. */
61
+ axisBranchId: string;
62
+ /** New fractional-index key for this entry in the destination column (KB-S04b/d). */
63
+ position: string;
64
+ /** Present only on a cross-column move (axis value changed). Omit for same-column reorder. */
65
+ axis?: {
66
+ kind: 'scalar';
67
+ value: string | null;
68
+ } | {
69
+ kind: 'tags';
70
+ oldValue: string | null;
71
+ newValue: string | null;
72
+ };
73
+ }
74
+ export declare function kanbanColumnFilter(branch: Branch, value: string | null): FilterGroup;
75
+ //# sourceMappingURL=kanban.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kanban.d.ts","sourceRoot":"","sources":["../../../src/dashboard-layout/kanban/kanban.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEtE,4EAA4E;AAC5E,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;AAE9D,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,oBAAoB,CAAA;CAC3B;AAED,yEAAyE;AACzE,MAAM,WAAW,sBAAsB;IACrC,+EAA+E;IAC/E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;CACd;AAED;iEACiE;AACjE,MAAM,WAAW,YAAY;IAC3B,oFAAoF;IACpF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,oFAAoF;IACpF,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,KAAK,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IACtD,gFAAgF;IAChF,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B;AAED,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,GAAG,qBAAqB,CAAA;AAE/E,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,wBAAwB,CAAA;IACjC,UAAU,EAAE,mBAAmB,EAAE,CAAA;CAClC;AAgBD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,mBAAmB,CAanE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,iBAAiB,GAAE,MAAM,EAAO,GAC/B,sBAAsB,EAAE,CAiB1B;AAED;;;;GAIG;AACH;oDACoD;AACpD,MAAM,WAAW,cAAc;IAC7B,6FAA6F;IAC7F,YAAY,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,QAAQ,EAAE,MAAM,CAAA;IAChB,8FAA8F;IAC9F,IAAI,CAAC,EACD;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GACxC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAA;CACvE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,CAYpF"}
@@ -0,0 +1,82 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright (c) 2024–2026 Flavio De Musso
3
+ /** Branch types that are explicitly never an axis (KB §2). */
4
+ const NON_AXIS_TYPES = new Set([
5
+ 'richtext', 'file', 'number', 'date', 'json', 'relation', 'repeater',
6
+ ]);
7
+ function isAxisCandidate(b) {
8
+ if (b.alias === 'status')
9
+ return null; // system status excluded (KB §2)
10
+ if (NON_AXIS_TYPES.has(b.type))
11
+ return null;
12
+ if (b.type === 'text')
13
+ return (b.options && b.options.length > 0) ? 'text' : null;
14
+ if (b.type === 'tags')
15
+ return 'tags';
16
+ if (b.type === 'boolean')
17
+ return 'boolean';
18
+ return null;
19
+ }
20
+ /**
21
+ * Determines whether a seed can be displayed as a Kanban board, and which
22
+ * branches may serve as the column axis. Pure — no I/O. (KB-S01)
23
+ *
24
+ * Q3: seeds with `allowDrafts: true` are NOT kanban-compatible.
25
+ */
26
+ export function resolveKanbanConfig(seed) {
27
+ if (seed.allowDrafts) {
28
+ return { compatible: false, reason: 'drafts-enabled', candidates: [] };
29
+ }
30
+ const candidates = [];
31
+ for (const b of seed.branches) {
32
+ const type = isAxisCandidate(b);
33
+ if (type)
34
+ candidates.push({ branchId: b.id, alias: b.alias, label: b.label, type });
35
+ }
36
+ if (candidates.length === 0) {
37
+ return { compatible: false, reason: 'no-candidate-branch', candidates: [] };
38
+ }
39
+ return { compatible: true, candidates };
40
+ }
41
+ /**
42
+ * Deterministic, stable column order for a chosen axis (Q2). The "Senza valore"
43
+ * (value: null) column is always appended last. Values out of `options` are NOT
44
+ * given their own column (KB-U25) — the board folds them into "Senza valore".
45
+ *
46
+ * @param distinctTagValues unique tag values observed in data (tags axis without options).
47
+ */
48
+ export function resolveKanbanColumns(branch, distinctTagValues = []) {
49
+ const cols = [];
50
+ if (branch.type === 'boolean') {
51
+ cols.push({ value: 'false', label: 'No' }, { value: 'true', label: 'Sì' }); // [false, true]
52
+ }
53
+ else if (branch.type === 'text' && branch.options?.length) {
54
+ for (const o of branch.options)
55
+ cols.push({ value: o, label: o }); // options order
56
+ }
57
+ else if (branch.type === 'tags') {
58
+ const ordered = branch.options?.length
59
+ ? branch.options
60
+ : [...distinctTagValues].sort((a, b) => a.localeCompare(b)); // alphabetical
61
+ for (const o of ordered)
62
+ cols.push({ value: o, label: o });
63
+ }
64
+ const isRequired = Boolean(branch.requiredOnCreate || branch.requiredOnUpdate);
65
+ if (!isRequired) {
66
+ cols.push({ value: null, label: `Senza ${branch.label}` }); // always last if not required
67
+ }
68
+ return cols;
69
+ }
70
+ export function kanbanColumnFilter(branch, value) {
71
+ if (value === null) {
72
+ const type = branch.type === 'boolean' ? 'boolean' : branch.type === 'tags' ? 'tags' : 'text';
73
+ return { column: branch.alias, type, conditions: [{ op: 'is_empty', value: null }] };
74
+ }
75
+ if (branch.type === 'boolean') {
76
+ return { column: branch.alias, type: 'boolean', conditions: [{ op: 'eq', value: value === 'true' }] };
77
+ }
78
+ if (branch.type === 'tags') {
79
+ return { column: branch.alias, type: 'tags', conditions: [{ op: 'has_tag', value }] };
80
+ }
81
+ return { column: branch.alias, type: 'select', conditions: [{ op: 'eq', value }] };
82
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-permissions.d.ts","sourceRoot":"","sources":["../../src/dashboard-layout/layout-permissions.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,4BAA4B,EAAE,aAAa,CAAC,MAAM,CAAa,CAAA;AAE5E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAGtE"}
@@ -1,5 +1,68 @@
1
1
  import { z } from 'zod';
2
- import type { Seed, Branch } from './types.js';
2
+ import type { Seed, Branch } from '../engine/types.js';
3
+ export declare const kanbanViewConfigSchema: z.ZodObject<{
4
+ axisBranchId: z.ZodNullable<z.ZodString>;
5
+ sort: z.ZodNullable<z.ZodObject<{
6
+ branchId: z.ZodString;
7
+ dir: z.ZodEnum<{
8
+ ASC: "ASC";
9
+ DESC: "DESC";
10
+ }>;
11
+ }, z.core.$strip>>;
12
+ hiddenColumnValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
+ collapsedColumnValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
+ }, z.core.$strip>;
15
+ export type KanbanViewConfig = z.infer<typeof kanbanViewConfigSchema>;
16
+ export declare const cardSlotFieldSchema: z.ZodObject<{
17
+ branchId: z.ZodString;
18
+ }, z.core.$strip>;
19
+ export type CardSlotField = z.infer<typeof cardSlotFieldSchema>;
20
+ export declare const kanbanCardConfigSchema: z.ZodObject<{
21
+ version: z.ZodLiteral<1>;
22
+ media: z.ZodOptional<z.ZodNullable<z.ZodObject<{
23
+ branchId: z.ZodString;
24
+ }, z.core.$strip>>>;
25
+ header: z.ZodOptional<z.ZodNullable<z.ZodObject<{
26
+ branchId: z.ZodString;
27
+ }, z.core.$strip>>>;
28
+ subtitle: z.ZodOptional<z.ZodNullable<z.ZodObject<{
29
+ branchId: z.ZodString;
30
+ }, z.core.$strip>>>;
31
+ metadata: z.ZodDefault<z.ZodArray<z.ZodObject<{
32
+ branchId: z.ZodString;
33
+ }, z.core.$strip>>>;
34
+ }, z.core.$strip>;
35
+ export type KanbanCardConfig = z.infer<typeof kanbanCardConfigSchema>;
36
+ export declare const seedViewConfigSchema: z.ZodObject<{
37
+ kanban: z.ZodOptional<z.ZodObject<{
38
+ axisBranchId: z.ZodNullable<z.ZodString>;
39
+ sort: z.ZodNullable<z.ZodObject<{
40
+ branchId: z.ZodString;
41
+ dir: z.ZodEnum<{
42
+ ASC: "ASC";
43
+ DESC: "DESC";
44
+ }>;
45
+ }, z.core.$strip>>;
46
+ hiddenColumnValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
47
+ collapsedColumnValues: z.ZodOptional<z.ZodArray<z.ZodString>>;
48
+ }, z.core.$strip>>;
49
+ card: z.ZodOptional<z.ZodObject<{
50
+ version: z.ZodLiteral<1>;
51
+ media: z.ZodOptional<z.ZodNullable<z.ZodObject<{
52
+ branchId: z.ZodString;
53
+ }, z.core.$strip>>>;
54
+ header: z.ZodOptional<z.ZodNullable<z.ZodObject<{
55
+ branchId: z.ZodString;
56
+ }, z.core.$strip>>>;
57
+ subtitle: z.ZodOptional<z.ZodNullable<z.ZodObject<{
58
+ branchId: z.ZodString;
59
+ }, z.core.$strip>>>;
60
+ metadata: z.ZodDefault<z.ZodArray<z.ZodObject<{
61
+ branchId: z.ZodString;
62
+ }, z.core.$strip>>>;
63
+ }, z.core.$strip>>;
64
+ }, z.core.$loose>;
65
+ export type SeedViewConfig = z.infer<typeof seedViewConfigSchema>;
3
66
  /** Reference to a Seed branch by its stable id (e.g. 'br_03').
4
67
  * Aliases can be renamed — ids cannot. When the id does not match any
5
68
  * branch on the Seed at read time, the field is silently stripped (auto-cleanup). */
@@ -30,11 +93,11 @@ export interface FormLayout {
30
93
  tabs: LayoutTab[];
31
94
  }
32
95
  /** Branch types that must occupy a section alone, full width. */
33
- export declare const FULL_WIDTH_BRANCH_TYPES: Set<import("./types.js").BranchType>;
96
+ export declare const FULL_WIDTH_BRANCH_TYPES: Set<import("../engine/types.js").BranchType>;
34
97
  /** Returns true when a branch is a gallery (file + multiple/asset-list). */
35
98
  export declare function isGalleryBranch(branch: Branch): boolean;
36
99
  /** Branch types currently unsupported in the Layout Builder. */
37
- export declare const UNSUPPORTED_BRANCH_TYPES: Set<import("./types.js").BranchType>;
100
+ export declare const UNSUPPORTED_BRANCH_TYPES: Set<import("../engine/types.js").BranchType>;
38
101
  /** Aliases that are NEVER included in the editor form (handled by other UI). */
39
102
  export declare const SYSTEM_ALIASES: Set<string>;
40
103
  /** True when the branch is eligible to appear in the layout at all. */
@@ -43,6 +106,17 @@ export declare function isLayoutableBranch(branch: Branch): boolean;
43
106
  export declare function isFullWidthBranch(branch: Branch): boolean;
44
107
  /** Branches considered SEO fields. Matches the existing rule in entry-editor.tsx. */
45
108
  export declare function isSeoBranch(branch: Branch): boolean;
109
+ export declare const METADATA_SLOT_CAP = 6;
110
+ export declare function isCardEligibleBranch(branch: Branch): boolean;
111
+ export type ValidateCardConfigResult = {
112
+ ok: true;
113
+ cleaned: KanbanCardConfig;
114
+ } | {
115
+ ok: false;
116
+ errors: string[];
117
+ cleaned: KanbanCardConfig;
118
+ };
119
+ export declare function validateCardConfigAgainstSeed(config: KanbanCardConfig, seed: Seed): ValidateCardConfigResult;
46
120
  export declare const layoutFieldSchema: z.ZodObject<{
47
121
  branchId: z.ZodString;
48
122
  }, z.core.$strip>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seed-layout.d.ts","sourceRoot":"","sources":["../../src/dashboard-layout/seed-layout.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAOtD,eAAO,MAAM,sBAAsB;;;;;;;;;;;iBAKjC,CAAA;AACF,MAAM,M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