@kardalum/plugin-sdk 0.19.0 → 0.21.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 (552) hide show
  1. package/CHANGELOG.md +281 -0
  2. package/README.md +19 -0
  3. package/dist/admin-section-registry.d.ts +48 -1
  4. package/dist/admin-section-registry.js +90 -0
  5. package/dist/built-in-editor-ids.d.ts +1 -1
  6. package/dist/built-in-editor-ids.js +2 -20
  7. package/dist/built-in-settings-schemas.d.ts +10 -0
  8. package/dist/built-in-settings-schemas.js +86 -0
  9. package/dist/built-in-value-schemas.js +35 -0
  10. package/dist/built-ins.js +38 -7
  11. package/dist/capabilities.d.ts +11 -1
  12. package/dist/capabilities.js +101 -4
  13. package/dist/cli.d.ts +66 -0
  14. package/dist/cli.js +22 -0
  15. package/dist/consent-entry.d.ts +11 -0
  16. package/dist/consent-entry.js +18 -0
  17. package/dist/content-library.d.ts +102 -0
  18. package/dist/content-library.js +15 -0
  19. package/dist/content-list-extensions.d.ts +50 -0
  20. package/dist/content-list-extensions.js +11 -0
  21. package/dist/content-picker/page-picker-sheet.d.ts +15 -0
  22. package/dist/content-picker/page-picker-sheet.js +105 -0
  23. package/dist/content-picker/page-picker.d.ts +18 -0
  24. package/dist/content-picker/page-picker.js +20 -0
  25. package/dist/content-picker/page-tree.d.ts +25 -0
  26. package/dist/content-picker/page-tree.js +132 -0
  27. package/dist/data-type-plugin.d.ts +7 -1
  28. package/dist/datatype-validation.d.ts +4 -9
  29. package/dist/datatype-validation.js +147 -1
  30. package/dist/datatypes-entry.d.ts +1 -0
  31. package/dist/datatypes-entry.js +2 -0
  32. package/dist/entitlement-entry.d.ts +1 -1
  33. package/dist/entitlement-entry.js +1 -1
  34. package/dist/entitlement-gate.d.ts +14 -0
  35. package/dist/entitlement-gate.js +64 -7
  36. package/dist/entitlement-plan.d.ts +6 -0
  37. package/dist/entitlement-plan.js +10 -0
  38. package/dist/entitlement-types.d.ts +53 -12
  39. package/dist/entitlement.d.ts +31 -4
  40. package/dist/entitlement.js +58 -17
  41. package/dist/hook-entry.d.ts +5 -0
  42. package/dist/hook-entry.js +30 -0
  43. package/dist/host-entry.d.ts +7 -1
  44. package/dist/host-entry.js +14 -1
  45. package/dist/index.d.ts +67 -7
  46. package/dist/index.js +94 -6
  47. package/dist/mail.d.ts +34 -0
  48. package/dist/mail.js +1 -0
  49. package/dist/manifest-entry.d.ts +47 -4
  50. package/dist/manifest-entry.js +63 -2
  51. package/dist/manifest-schema.d.ts +993 -40
  52. package/dist/manifest-schema.js +516 -26
  53. package/dist/manifest.d.ts +1186 -62
  54. package/dist/manifest.js +8 -4
  55. package/dist/media/media-picker.js +31 -18
  56. package/dist/media/upload-error.d.ts +5 -1
  57. package/dist/media/upload-error.js +14 -2
  58. package/dist/media-library.d.ts +32 -0
  59. package/dist/media-library.js +15 -0
  60. package/dist/nested-field-host.d.ts +76 -0
  61. package/dist/nested-field-host.js +90 -0
  62. package/dist/notify.d.ts +12 -4
  63. package/dist/notify.js +1 -1
  64. package/dist/outbound.d.ts +47 -0
  65. package/dist/outbound.js +1 -0
  66. package/dist/plugin-context.d.ts +52 -0
  67. package/dist/plugin-context.js +27 -0
  68. package/dist/plugin-permissions.d.ts +18 -0
  69. package/dist/plugin-permissions.js +25 -0
  70. package/dist/plugin-screen-context.d.ts +262 -9
  71. package/dist/plugin-screen-context.js +56 -0
  72. package/dist/providers.d.ts +313 -0
  73. package/dist/providers.js +74 -0
  74. package/dist/read-all-pages.d.ts +5 -0
  75. package/dist/read-all-pages.js +3 -2
  76. package/dist/render-page.d.ts +15 -0
  77. package/dist/render-page.js +20 -0
  78. package/dist/richtext/block-panel.d.ts +12 -1
  79. package/dist/richtext/block-panel.js +36 -25
  80. package/dist/richtext/button-view.d.ts +11 -0
  81. package/dist/richtext/button-view.js +45 -0
  82. package/dist/richtext/content-guard.d.ts +4 -0
  83. package/dist/richtext/content-guard.js +27 -0
  84. package/dist/richtext/editor-handle.d.ts +34 -0
  85. package/dist/richtext/editor-handle.js +225 -0
  86. package/dist/richtext/extensions.d.ts +6 -0
  87. package/dist/richtext/extensions.js +16 -0
  88. package/dist/richtext/insert-menu.d.ts +6 -1
  89. package/dist/richtext/insert-menu.js +45 -22
  90. package/dist/richtext/item-attributes.d.ts +6 -0
  91. package/dist/richtext/item-attributes.js +19 -0
  92. package/dist/richtext/item-panel.d.ts +25 -0
  93. package/dist/richtext/item-panel.js +118 -0
  94. package/dist/richtext/item-view.d.ts +58 -0
  95. package/dist/richtext/item-view.js +172 -0
  96. package/dist/richtext/mark-form.d.ts +10 -0
  97. package/dist/richtext/mark-form.js +38 -0
  98. package/dist/richtext/paste-choice.d.ts +9 -0
  99. package/dist/richtext/paste-choice.js +13 -0
  100. package/dist/richtext/plugin-items.d.ts +72 -0
  101. package/dist/richtext/plugin-items.js +562 -0
  102. package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
  103. package/dist/richtext/plugin-mark-tooltips.js +44 -0
  104. package/dist/richtext/plugin-toolbar.d.ts +57 -0
  105. package/dist/richtext/plugin-toolbar.js +186 -0
  106. package/dist/richtext/rich-item-icons.d.ts +5 -0
  107. package/dist/richtext/rich-item-icons.js +42 -0
  108. package/dist/richtext/rich-items.d.ts +42 -0
  109. package/dist/richtext/rich-items.js +68 -0
  110. package/dist/richtext/rich-text-view-host.d.ts +24 -0
  111. package/dist/richtext/rich-text-view-host.js +11 -0
  112. package/dist/richtext/style-listbox.js +6 -4
  113. package/dist/richtext/toolbar-button.d.ts +16 -0
  114. package/dist/richtext/toolbar-button.js +9 -0
  115. package/dist/richtext/url-paste.d.ts +20 -0
  116. package/dist/richtext/url-paste.js +82 -0
  117. package/dist/richtext-html-entry.d.ts +5 -0
  118. package/dist/richtext-html-entry.js +11 -0
  119. package/dist/sdk-strings.d.ts +344 -0
  120. package/dist/sdk-strings.js +411 -0
  121. package/dist/sealing.d.ts +14 -0
  122. package/dist/sealing.js +1 -0
  123. package/dist/service-contract.d.ts +17 -0
  124. package/dist/service-contract.js +39 -0
  125. package/dist/services.d.ts +114 -0
  126. package/dist/services.js +1 -0
  127. package/dist/simple-storage-value-provider.js +24 -24
  128. package/dist/structured-storage-types.d.ts +429 -9
  129. package/dist/tailwind.js +10 -5
  130. package/dist/template-reads.d.ts +16 -0
  131. package/dist/template-reads.js +21 -0
  132. package/dist/testing-entry.d.ts +38 -0
  133. package/dist/testing-entry.js +173 -0
  134. package/dist/text-entry.d.ts +1 -0
  135. package/dist/text-entry.js +7 -0
  136. package/dist/tokens/system-dark.css +1 -0
  137. package/dist/tokens/tailwind-theme.css +7 -0
  138. package/dist/tokens/tokens.css +19 -3
  139. package/dist/tokens/tokens.json +13 -4
  140. package/dist/uploads.d.ts +43 -0
  141. package/dist/uploads.js +1 -0
  142. package/dist/user-library.d.ts +51 -0
  143. package/dist/user-library.js +15 -0
  144. package/dist/view-helpers.d.ts +18 -0
  145. package/dist/view-helpers.js +64 -0
  146. package/dist/views/asset-view.js +4 -1
  147. package/dist/views/content-list-preview.js +3 -1
  148. package/dist/views/content-list-settings-view.js +11 -7
  149. package/dist/views/content-list-view.d.ts +5 -3
  150. package/dist/views/content-list-view.js +243 -40
  151. package/dist/views/content-picker-view.d.ts +3 -0
  152. package/dist/views/content-picker-view.js +143 -0
  153. package/dist/views/crop-view.d.ts +4 -6
  154. package/dist/views/crop-view.js +22 -13
  155. package/dist/views/date-range-view.js +4 -1
  156. package/dist/views/file-upload-view.d.ts +5 -7
  157. package/dist/views/file-upload-view.js +16 -7
  158. package/dist/views/group-view.d.ts +8 -0
  159. package/dist/views/group-view.js +123 -0
  160. package/dist/views/html-view.js +7 -6
  161. package/dist/views/image-view.js +37 -19
  162. package/dist/views/link-view.d.ts +3 -0
  163. package/dist/views/link-view.js +150 -0
  164. package/dist/views/options-list-view.d.ts +3 -0
  165. package/dist/views/options-list-view.js +104 -0
  166. package/dist/views/repeatable-list-view.d.ts +3 -0
  167. package/dist/views/repeatable-list-view.js +113 -0
  168. package/dist/views/rich-text-view.d.ts +2 -0
  169. package/dist/views/rich-text-view.js +208 -35
  170. package/dist/views/suggest-key.d.ts +17 -0
  171. package/dist/views/suggest-key.js +55 -0
  172. package/dist/views/unreadable-rich-text.d.ts +17 -0
  173. package/dist/views/unreadable-rich-text.js +40 -0
  174. package/dist/visitors.d.ts +81 -0
  175. package/dist/visitors.js +1 -0
  176. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
  177. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
  178. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
  179. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
  180. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +334 -0
  181. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +254 -0
  182. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
  183. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
  184. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
  185. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
  186. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +11 -1
  187. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
  188. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +8 -0
  189. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +38 -0
  190. package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
  191. package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +144 -0
  192. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +115 -3
  193. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +58 -11
  194. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +137 -2
  195. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +178 -2
  196. package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
  197. package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
  198. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.d.ts +213 -0
  199. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
  200. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
  201. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
  202. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
  203. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
  204. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
  205. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
  206. package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
  207. package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
  208. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
  209. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
  210. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.d.ts +11 -0
  211. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
  212. package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +55 -13
  213. package/node_modules/@kardalum/api-schemas/dist/core-actions.js +22 -10
  214. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
  215. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +8 -0
  216. package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +1 -1
  217. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
  218. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
  219. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +257 -15
  220. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +78 -5
  221. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
  222. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +90 -5
  223. package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
  224. package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
  225. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
  226. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
  227. package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
  228. package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
  229. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
  230. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
  231. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
  232. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
  233. package/node_modules/@kardalum/api-schemas/dist/html-scan.d.ts +22 -0
  234. package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
  235. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
  236. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
  237. package/node_modules/@kardalum/api-schemas/dist/index.d.ts +162 -48
  238. package/node_modules/@kardalum/api-schemas/dist/index.js +137 -30
  239. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
  240. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
  241. package/node_modules/@kardalum/api-schemas/dist/json-depth.d.ts +3 -0
  242. package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
  243. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
  244. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
  245. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
  246. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
  247. package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +226 -0
  248. package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +409 -0
  249. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
  250. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
  251. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
  252. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
  253. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +490 -10
  254. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +53 -3
  255. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
  256. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
  257. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
  258. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
  259. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
  260. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
  261. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
  262. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
  263. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
  264. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
  265. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
  266. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
  267. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
  268. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
  269. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +38 -0
  270. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +13 -1
  271. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
  272. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
  273. package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
  274. package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
  275. package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
  276. package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +5 -0
  277. package/node_modules/@kardalum/api-schemas/dist/media.schema.js +8 -0
  278. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
  279. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
  280. package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +60 -0
  281. package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +333 -0
  282. package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
  283. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
  284. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
  285. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
  286. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
  287. package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
  288. package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
  289. package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
  290. package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
  291. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.d.ts +87 -0
  292. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
  293. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
  294. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
  295. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
  296. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
  297. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
  298. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
  299. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.d.ts +11 -0
  300. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
  301. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
  302. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
  303. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
  304. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
  305. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +44 -0
  306. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +84 -0
  307. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
  308. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
  309. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
  310. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
  311. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
  312. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
  313. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
  314. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
  315. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
  316. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
  317. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
  318. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
  319. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
  320. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
  321. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +44 -2
  322. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +44 -2
  323. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +16 -5
  324. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
  325. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
  326. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +34 -0
  327. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +102 -0
  328. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +43 -0
  329. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +126 -0
  330. package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
  331. package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
  332. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
  333. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
  334. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
  335. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
  336. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.d.ts +112 -0
  337. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
  338. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +119 -0
  339. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +216 -0
  340. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
  341. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
  342. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
  343. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
  344. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +46 -0
  345. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +41 -1
  346. package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +304 -2
  347. package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +220 -6
  348. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
  349. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
  350. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
  351. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
  352. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
  353. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
  354. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +408 -14
  355. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +307 -23
  356. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +23 -1
  357. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +61 -3
  358. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
  359. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
  360. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +23 -1
  361. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +37 -1
  362. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
  363. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
  364. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
  365. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
  366. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
  367. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
  368. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +346 -0
  369. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +461 -0
  370. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
  371. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
  372. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.d.ts +638 -0
  373. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
  374. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
  375. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
  376. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
  377. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
  378. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.d.ts +36 -0
  379. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
  380. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
  381. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
  382. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
  383. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
  384. package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
  385. package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
  386. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +352 -0
  387. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +409 -0
  388. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +347 -0
  389. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +976 -0
  390. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
  391. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
  392. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
  393. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +47 -4
  394. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
  395. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
  396. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
  397. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
  398. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
  399. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
  400. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
  401. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
  402. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
  403. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
  404. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
  405. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
  406. package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
  407. package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
  408. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
  409. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
  410. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
  411. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
  412. package/node_modules/@kardalum/api-schemas/dist/render-cache.d.ts +126 -0
  413. package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
  414. package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +307 -4
  415. package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
  416. package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
  417. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
  418. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
  419. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +71 -0
  420. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +540 -0
  421. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
  422. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +394 -0
  423. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
  424. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
  425. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
  426. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
  427. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +201 -1
  428. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
  429. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
  430. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
  431. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +97 -8
  432. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +64 -1
  433. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +136 -0
  434. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +53 -2
  435. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
  436. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
  437. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +386 -0
  438. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +618 -0
  439. package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
  440. package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
  441. package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
  442. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
  443. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
  444. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
  445. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +70 -0
  446. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +188 -0
  447. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
  448. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
  449. package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
  450. package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
  451. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
  452. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
  453. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
  454. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
  455. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +72 -1
  456. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +36 -3
  457. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
  458. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
  459. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.d.ts +482 -0
  460. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
  461. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
  462. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
  463. package/node_modules/@kardalum/api-schemas/package.json +2 -0
  464. package/node_modules/@kardalum/design-tokens/dist/build-css.js +15 -1
  465. package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
  466. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +7 -0
  467. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +2 -1
  468. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
  469. package/node_modules/@kardalum/design-tokens/dist/tokens.css +19 -3
  470. package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +1 -1
  471. package/node_modules/@kardalum/design-tokens/dist/tokens.js +18 -3
  472. package/node_modules/@kardalum/design-tokens/dist/tokens.json +13 -4
  473. package/node_modules/@kardalum/design-tokens/dist/types.d.ts +5 -1
  474. package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +38 -2
  475. package/node_modules/@kardalum/plugin-package/dist/build-reference.js +17 -2
  476. package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
  477. package/node_modules/@kardalum/plugin-package/dist/capabilities.js +625 -35
  478. package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
  479. package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +25 -0
  480. package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
  481. package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
  482. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.d.ts +17 -0
  483. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
  484. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
  485. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
  486. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
  487. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
  488. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
  489. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
  490. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +2 -0
  491. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
  492. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
  493. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +47 -0
  494. package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
  495. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
  496. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +40 -0
  497. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
  498. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
  499. package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
  500. package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +3 -0
  501. package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +3 -0
  502. package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +76 -6
  503. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
  504. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +99 -0
  505. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
  506. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
  507. package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
  508. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
  509. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
  510. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +5 -0
  511. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +316 -0
  512. package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +40 -4
  513. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
  514. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
  515. package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
  516. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
  517. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +150 -0
  518. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
  519. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
  520. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
  521. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
  522. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
  523. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +69 -0
  524. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
  525. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
  526. package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +17 -0
  527. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
  528. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
  529. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
  530. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
  531. package/node_modules/@kardalum/plugin-package/dist/index.d.ts +8 -2
  532. package/node_modules/@kardalum/plugin-package/dist/index.js +7 -1
  533. package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
  534. package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
  535. package/node_modules/@kardalum/plugin-package/dist/public-suffix.d.ts +7 -0
  536. package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
  537. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
  538. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
  539. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
  540. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
  541. package/node_modules/@kardalum/plugin-package/package.json +4 -0
  542. package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
  543. package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
  544. package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
  545. package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
  546. package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
  547. package/node_modules/@kardalum/ui/dist/components/tooltip.js +1 -2
  548. package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +6 -1
  549. package/node_modules/@kardalum/ui/dist/components/truncated-text.js +5 -4
  550. package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
  551. package/node_modules/@kardalum/ui/dist/index.js +2 -0
  552. package/package.json +25 -3
@@ -0,0 +1,77 @@
1
+ /** P5-D2: the categories a gated entry, a held embed or a tool names; an entry with none is strictly necessary. The
2
+ * list only grows. */
3
+ export declare const CONSENT_CATEGORIES: readonly ["preferences", "statistics", "marketing", "media"];
4
+ export type ConsentCategory = (typeof CONSENT_CATEGORIES)[number];
5
+ /** P5-D3: the cookie on a plain http page, and on an https page. The `__Host-` prefix makes the browser refuse one set
6
+ * with a Domain or from http, so a sibling subdomain cannot plant a choice (the visitor cookie's rule, visitor-cookie.ts). */
7
+ export declare const CONSENT_COOKIE_NAME = "kardalum_consent";
8
+ export declare const CONSENT_COOKIE_SECURE_NAME = "__Host-kardalum_consent";
9
+ export declare function consentCookieName(secure: boolean): string;
10
+ export declare const CONSENT_FORMAT_VERSION = "v1";
11
+ /** The longest value the reader reads. Today's longest, "v1.9999.999999.preferences.statistics.marketing.media", is 53
12
+ * characters; the room lets an older copy of this reader read the value of a longer list. */
13
+ export declare const CONSENT_COOKIE_VALUE_MAX = 128;
14
+ /** The longest category token the reader accepts; a well-formed token it does not know is skipped (the list grows). */
15
+ export declare const CONSENT_CATEGORY_TOKEN_MAX = 20;
16
+ /** One cap for every Cookie header the core reads: longer reads as no cookie (the consent reader here, and visitors/visitor-cookie.ts, which imports it since 35-P5). */
17
+ export declare const COOKIE_HEADER_MAX = 16384;
18
+ export declare const CONSENT_REVISION_MAX = 9999;
19
+ /** P5-D3: how long a choice is kept when the tool names no lifetime, and the longest it may name. */
20
+ export declare const CONSENT_MAX_AGE_DAYS_DEFAULT = 180;
21
+ export declare const CONSENT_MAX_AGE_DAYS_MAX = 395;
22
+ /** The consent loader's largest size, in bytes. */
23
+ export declare const CONSENT_LOADER_MAX_BYTES = 8192;
24
+ /** P5-D5: how long a render reuses the tool choice it read. */
25
+ export declare const CONSENT_TOOL_MEMO_MS = 1000;
26
+ /** P5-D4: the event every change of the state dispatches on `document`, and the one that asks the tool to open. */
27
+ export declare const CONSENT_EVENT = "kardalum:consent";
28
+ export declare const CONSENT_OPEN_EVENT = "kardalum:consentopen";
29
+ /** P5-D6, P5-D4: the attribute an inert script carries, and the one a theme's "settings" link carries. */
30
+ export declare const CONSENT_MARK_ATTRIBUTE = "data-kardalum-consent";
31
+ export declare const CONSENT_OPEN_ATTRIBUTE = "data-kardalum-consent-open";
32
+ /** P5-D9: the mark on the loader's own tag while a consent tool is chosen and active; unmarked, the loader grants nothing. */
33
+ export declare const CONSENT_TOOL_ATTRIBUTE = "data-kardalum-consent-tool";
34
+ /** P5-D6: the core's own `data-` prefix, which a plugin's head entry may not use. */
35
+ export declare const CORE_DATA_PREFIX = "kardalum-";
36
+ /** A visitor's consent. `decided` false: no valid cookie (nothing granted). `decidedOn` is the day of the choice, `YYYY-MM-DD`. */
37
+ export interface ConsentState {
38
+ readonly decided: boolean;
39
+ readonly granted: readonly ConsentCategory[];
40
+ readonly revision: number | null;
41
+ readonly decidedOn: string | null;
42
+ }
43
+ export declare const UNDECIDED_CONSENT: ConsentState;
44
+ /** What a tool hands `window.kardalum.consent.set`. */
45
+ export interface ConsentChoice {
46
+ granted: readonly ConsentCategory[];
47
+ /** The tool's revision of its own text, 0 to CONSENT_REVISION_MAX; 0 when left out. */
48
+ revision?: number;
49
+ /** 1 to CONSENT_MAX_AGE_DAYS_MAX; CONSENT_MAX_AGE_DAYS_DEFAULT when left out. */
50
+ maxAgeDays?: number;
51
+ }
52
+ /** P5-D4: `window.kardalum.consent` in a visitor's browser, defined by the core's consent loader. */
53
+ export interface KardalumConsentApi {
54
+ readonly categories: readonly ConsentCategory[];
55
+ state(): ConsentState;
56
+ granted(category: ConsentCategory): boolean;
57
+ /** For the chosen consent tool only. Throws TypeError on a bad choice. */
58
+ set(choice: ConsentChoice): ConsentState;
59
+ /** For the chosen consent tool only: forgets the choice (undecided again). */
60
+ reset(): void;
61
+ /** Asks the chosen tool to show its settings (dispatches CONSENT_OPEN_EVENT). */
62
+ open(): void;
63
+ }
64
+ /** P5-D10: the consent a page head or a template call reads; reading it makes the render answer for this cookie alone. */
65
+ export interface PluginConsentView {
66
+ readonly decided: boolean;
67
+ readonly granted: readonly ConsentCategory[];
68
+ has(category: ConsentCategory): boolean;
69
+ }
70
+ export declare function isConsentCategory(value: unknown): value is ConsentCategory;
71
+ /** P5-D3: a cookie value as a decided state, or null for anything the format does not allow. */
72
+ export declare function readConsentCookieValue(value: unknown): ConsentState | null;
73
+ /** P5-D3: the state the first consent cookie of a Cookie header holds, by the name of the page's scheme, or null. A
74
+ * split and a trim. */
75
+ export declare function readConsentCookie(header: unknown, secure: boolean): ConsentState | null;
76
+ /** The state of a Cookie header, undecided where it holds no valid choice. The SDK's `readConsent` wraps it. */
77
+ export declare function consentOfCookieHeader(header: unknown, secure: boolean): ConsentState;
@@ -0,0 +1,122 @@
1
+ // M35 P5 (W37): the site's one consent state. A visitor's choice lives in one first-party cookie that only the core's
2
+ // consent loader writes (render/consent-assets.ts in the server); this file holds the categories, the cookie's format and
3
+ // its one reader, which the server, the SDK and a plugin's own server code share. The loader reads the value by the same
4
+ // steps (a parity test runs both over one table). Every reader caps the length first and reads in one forward pass: no
5
+ // pattern meets the visitor's cookie.
6
+ /** P5-D2: the categories a gated entry, a held embed or a tool names; an entry with none is strictly necessary. The
7
+ * list only grows. */
8
+ export const CONSENT_CATEGORIES = Object.freeze(["preferences", "statistics", "marketing", "media"]);
9
+ /** P5-D3: the cookie on a plain http page, and on an https page. The `__Host-` prefix makes the browser refuse one set
10
+ * with a Domain or from http, so a sibling subdomain cannot plant a choice (the visitor cookie's rule, visitor-cookie.ts). */
11
+ export const CONSENT_COOKIE_NAME = "kardalum_consent";
12
+ export const CONSENT_COOKIE_SECURE_NAME = `__Host-${CONSENT_COOKIE_NAME}`;
13
+ export function consentCookieName(secure) {
14
+ return secure ? CONSENT_COOKIE_SECURE_NAME : CONSENT_COOKIE_NAME;
15
+ }
16
+ export const CONSENT_FORMAT_VERSION = "v1";
17
+ /** The longest value the reader reads. Today's longest, "v1.9999.999999.preferences.statistics.marketing.media", is 53
18
+ * characters; the room lets an older copy of this reader read the value of a longer list. */
19
+ export const CONSENT_COOKIE_VALUE_MAX = 128;
20
+ /** The longest category token the reader accepts; a well-formed token it does not know is skipped (the list grows). */
21
+ export const CONSENT_CATEGORY_TOKEN_MAX = 20;
22
+ /** One cap for every Cookie header the core reads: longer reads as no cookie (the consent reader here, and visitors/visitor-cookie.ts, which imports it since 35-P5). */
23
+ export const COOKIE_HEADER_MAX = 16_384;
24
+ export const CONSENT_REVISION_MAX = 9999;
25
+ /** P5-D3: how long a choice is kept when the tool names no lifetime, and the longest it may name. */
26
+ export const CONSENT_MAX_AGE_DAYS_DEFAULT = 180;
27
+ export const CONSENT_MAX_AGE_DAYS_MAX = 395;
28
+ /** The consent loader's largest size, in bytes. */
29
+ export const CONSENT_LOADER_MAX_BYTES = 8192;
30
+ /** P5-D5: how long a render reuses the tool choice it read. */
31
+ export const CONSENT_TOOL_MEMO_MS = 1_000;
32
+ /** P5-D4: the event every change of the state dispatches on `document`, and the one that asks the tool to open. */
33
+ export const CONSENT_EVENT = "kardalum:consent";
34
+ export const CONSENT_OPEN_EVENT = "kardalum:consentopen";
35
+ /** P5-D6, P5-D4: the attribute an inert script carries, and the one a theme's "settings" link carries. */
36
+ export const CONSENT_MARK_ATTRIBUTE = "data-kardalum-consent";
37
+ export const CONSENT_OPEN_ATTRIBUTE = "data-kardalum-consent-open";
38
+ /** P5-D9: the mark on the loader's own tag while a consent tool is chosen and active; unmarked, the loader grants nothing. */
39
+ export const CONSENT_TOOL_ATTRIBUTE = "data-kardalum-consent-tool";
40
+ /** P5-D6: the core's own `data-` prefix, which a plugin's head entry may not use. */
41
+ export const CORE_DATA_PREFIX = "kardalum-";
42
+ const DAY_MS = 86_400_000;
43
+ const DAY_DIGITS_MAX = 6;
44
+ const REVISION_DIGITS_MAX = 4;
45
+ export const UNDECIDED_CONSENT = Object.freeze({ decided: false, granted: Object.freeze([]), revision: null, decidedOn: null });
46
+ export function isConsentCategory(value) {
47
+ return typeof value === "string" && CONSENT_CATEGORIES.includes(value);
48
+ }
49
+ /** The number a run of 1 to `max` ASCII digits spells, or null. */
50
+ function wholeDigits(text, max) {
51
+ if (text.length === 0 || text.length > max)
52
+ return null;
53
+ let value = 0;
54
+ for (let index = 0; index < text.length; index += 1) {
55
+ const code = text.charCodeAt(index);
56
+ if (code < 0x30 || code > 0x39)
57
+ return null;
58
+ value = value * 10 + (code - 0x30);
59
+ }
60
+ return value;
61
+ }
62
+ /** P5-D3: a cookie value as a decided state, or null for anything the format does not allow. */
63
+ export function readConsentCookieValue(value) {
64
+ if (typeof value !== "string" || value.length === 0 || value.length > CONSENT_COOKIE_VALUE_MAX)
65
+ return null;
66
+ const parts = value.split(".");
67
+ if (parts.length < 3 || parts[0] !== CONSENT_FORMAT_VERSION)
68
+ return null;
69
+ const revision = wholeDigits(parts[1], REVISION_DIGITS_MAX);
70
+ const day = wholeDigits(parts[2], DAY_DIGITS_MAX);
71
+ if (revision === null || revision > CONSENT_REVISION_MAX || day === null)
72
+ return null;
73
+ const granted = [];
74
+ let next = 0;
75
+ for (let index = 3; index < parts.length; index += 1) {
76
+ const token = parts[index];
77
+ const at = CONSENT_CATEGORIES.indexOf(token);
78
+ if (at === -1) {
79
+ // A later version's category: skipped when well formed, so the list grows without older readers refusing.
80
+ if (!isCategoryToken(token))
81
+ return null;
82
+ continue;
83
+ }
84
+ // Repeated or out of order land below `next`.
85
+ if (at < next)
86
+ return null;
87
+ granted.push(CONSENT_CATEGORIES[at]);
88
+ next = at + 1;
89
+ }
90
+ return Object.freeze({ decided: true, granted: Object.freeze(granted), revision, decidedOn: new Date(day * DAY_MS).toISOString().slice(0, 10) });
91
+ }
92
+ /** 1 to CONSENT_CATEGORY_TOKEN_MAX lower-case ASCII letters, by loop. */
93
+ function isCategoryToken(text) {
94
+ if (text.length === 0 || text.length > CONSENT_CATEGORY_TOKEN_MAX)
95
+ return false;
96
+ for (let index = 0; index < text.length; index += 1) {
97
+ const code = text.charCodeAt(index);
98
+ if (code < 0x61 || code > 0x7a)
99
+ return false;
100
+ }
101
+ return true;
102
+ }
103
+ /** P5-D3: the state the first consent cookie of a Cookie header holds, by the name of the page's scheme, or null. A
104
+ * split and a trim. */
105
+ export function readConsentCookie(header, secure) {
106
+ if (typeof header !== "string" || header.length === 0 || header.length > COOKIE_HEADER_MAX)
107
+ return null;
108
+ const name = consentCookieName(secure);
109
+ for (const part of header.split(";")) {
110
+ const trimmed = part.trim();
111
+ const equals = trimmed.indexOf("=");
112
+ if (equals === -1)
113
+ continue;
114
+ if (trimmed.slice(0, equals).trim() === name)
115
+ return readConsentCookieValue(trimmed.slice(equals + 1).trim());
116
+ }
117
+ return null;
118
+ }
119
+ /** The state of a Cookie header, undecided where it holds no valid choice. The SDK's `readConsent` wraps it. */
120
+ export function consentOfCookieHeader(header, secure) {
121
+ return readConsentCookie(header, secure) ?? UNDECIDED_CONSENT;
122
+ }
@@ -8,9 +8,9 @@ export declare const SnapshotResponseSchema: z.ZodObject<{
8
8
  snapshot: z.ZodObject<{
9
9
  id: z.ZodString;
10
10
  createdAt: z.ZodString;
11
- description: z.ZodNullable<z.ZodString>;
12
11
  createdBy: z.ZodString;
13
12
  label: z.ZodString;
13
+ description: z.ZodNullable<z.ZodString>;
14
14
  }, z.core.$strip>;
15
15
  }, z.core.$strip>;
16
16
  export type SnapshotResponse = z.infer<typeof SnapshotResponseSchema>;
@@ -23,9 +23,9 @@ export declare const SnapshotListResponseSchema: z.ZodObject<{
23
23
  items: z.ZodArray<z.ZodObject<{
24
24
  id: z.ZodString;
25
25
  createdAt: z.ZodString;
26
- description: z.ZodNullable<z.ZodString>;
27
26
  createdBy: z.ZodString;
28
27
  label: z.ZodString;
28
+ description: z.ZodNullable<z.ZodString>;
29
29
  }, z.core.$strip>>;
30
30
  nextCursor: z.ZodNullable<z.ZodString>;
31
31
  }, z.core.$strip>;
@@ -34,9 +34,9 @@ export declare const RestoreSnapshotResponseSchema: z.ZodObject<{
34
34
  snapshot: z.ZodObject<{
35
35
  id: z.ZodString;
36
36
  createdAt: z.ZodString;
37
- description: z.ZodNullable<z.ZodString>;
38
37
  createdBy: z.ZodString;
39
38
  label: z.ZodString;
39
+ description: z.ZodNullable<z.ZodString>;
40
40
  }, z.core.$strip>;
41
41
  restoredItems: z.ZodNumber;
42
42
  }, z.core.$strip>;
@@ -23,8 +23,8 @@ export type Snapshot = z.infer<typeof SnapshotSchema>;
23
23
  export declare const SnapshotMetaSchema: z.ZodObject<{
24
24
  id: z.ZodString;
25
25
  createdAt: z.ZodString;
26
- description: z.ZodNullable<z.ZodString>;
27
26
  createdBy: z.ZodString;
28
27
  label: z.ZodString;
28
+ description: z.ZodNullable<z.ZodString>;
29
29
  }, z.core.$strip>;
30
30
  export type SnapshotMeta = z.infer<typeof SnapshotMetaSchema>;
@@ -0,0 +1,13 @@
1
+ /** The error's stable code: what isStructuredDuplicateKeyError reads. */
2
+ export declare const STRUCTURED_DUPLICATE_KEY_CODE = "STRUCTURED_DUPLICATE_KEY";
3
+ export declare class StructuredDuplicateKeyError extends Error {
4
+ readonly code: typeof STRUCTURED_DUPLICATE_KEY_CODE;
5
+ /** `cause` is the driver's own error, kept for the server's logs. */
6
+ constructor(options?: {
7
+ cause?: unknown;
8
+ });
9
+ }
10
+ /** Whether a thrown value is the duplicate key error. Read by name and code,
11
+ * not by `instanceof`, so a plugin bundle that carries its own copy of the
12
+ * SDK still recognises the error the host threw. */
13
+ export declare function isStructuredDuplicateKeyError(value: unknown): value is StructuredDuplicateKeyError;
@@ -0,0 +1,26 @@
1
+ // M33 (core part 1, task 1.3b): the one error structured storage throws when
2
+ // an insert would give a table a second row with the same primary key or the
3
+ // same value under a unique column or unique index. Each adapter maps its
4
+ // driver's unique violation to it (postgresql 23505, mysql ER_DUP_ENTRY 1062,
5
+ // sqlite SQLITE_CONSTRAINT_PRIMARYKEY or SQLITE_CONSTRAINT_UNIQUE, and the
6
+ // mock's own check), so a plugin can tell "that key is taken" (a lock already
7
+ // held, a value already used) from any other failure without knowing which
8
+ // database is active. The plugin SDK exports it.
9
+ /** The error's stable code: what isStructuredDuplicateKeyError reads. */
10
+ export const STRUCTURED_DUPLICATE_KEY_CODE = "STRUCTURED_DUPLICATE_KEY";
11
+ export class StructuredDuplicateKeyError extends Error {
12
+ code = STRUCTURED_DUPLICATE_KEY_CODE;
13
+ /** `cause` is the driver's own error, kept for the server's logs. */
14
+ constructor(options = {}) {
15
+ super("A row with this key already exists", options);
16
+ this.name = "StructuredDuplicateKeyError";
17
+ }
18
+ }
19
+ /** Whether a thrown value is the duplicate key error. Read by name and code,
20
+ * not by `instanceof`, so a plugin bundle that carries its own copy of the
21
+ * SDK still recognises the error the host threw. */
22
+ export function isStructuredDuplicateKeyError(value) {
23
+ if (!(value instanceof Error))
24
+ return false;
25
+ return value.name === "StructuredDuplicateKeyError" && value.code === STRUCTURED_DUPLICATE_KEY_CODE;
26
+ }
@@ -0,0 +1,70 @@
1
+ import { z } from "zod";
2
+ import type { DataTypeConfig } from "./data-type-config.schema.js";
3
+ export declare const CONTENT_PICKER_EDITOR_ID = "com.kardalum.contentpicker";
4
+ export declare const OPTIONS_EDITOR_ID = "com.kardalum.options";
5
+ export declare const LINK_EDITOR_ID = "com.kardalum.link";
6
+ export declare const CONTENT_PICKER_DATA_TYPE_ID = "b1e00000-0000-4000-8000-000000000015";
7
+ export declare const LINK_DATA_TYPE_ID = "b1e00000-0000-4000-8000-000000000016";
8
+ /** Every picked list is bounded, whatever the field's maximum says (D2). */
9
+ export declare const CONTENT_PICKER_MAX_ITEMS = 50;
10
+ export declare const OPTIONS_MAX = 200;
11
+ export declare const OPTION_TEXT_MAX = 200;
12
+ export declare const LINK_LABEL_MAX = 200;
13
+ export declare const LINK_URL_MAX = 2048;
14
+ export declare const ContentPickerSettingsSchema: z.ZodObject<{
15
+ startNode: z.ZodDefault<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
16
+ documentTypes: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
17
+ multiple: z.ZodDefault<z.ZodBoolean>;
18
+ max: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
19
+ }, z.core.$strict>;
20
+ export type ContentPickerSettings = z.output<typeof ContentPickerSettingsSchema>;
21
+ export declare const OptionSchema: z.ZodObject<{
22
+ label: z.ZodString;
23
+ value: z.ZodString;
24
+ }, z.core.$strict>;
25
+ export declare const OptionsListSettingsSchema: z.ZodObject<{
26
+ options: z.ZodArray<z.ZodObject<{
27
+ label: z.ZodString;
28
+ value: z.ZodString;
29
+ }, z.core.$strict>>;
30
+ multiple: z.ZodDefault<z.ZodBoolean>;
31
+ }, z.core.$strict>;
32
+ export type OptionsListSettings = z.output<typeof OptionsListSettingsSchema>;
33
+ export declare const LINK_ALLOW: readonly ["internal", "external", "both"];
34
+ export type LinkAllow = (typeof LINK_ALLOW)[number];
35
+ export declare const LinkSettingsSchema: z.ZodObject<{
36
+ allow: z.ZodDefault<z.ZodEnum<{
37
+ external: "external";
38
+ internal: "internal";
39
+ both: "both";
40
+ }>>;
41
+ }, z.core.$strict>;
42
+ export type LinkSettings = z.output<typeof LinkSettingsSchema>;
43
+ export type LinkValue = {
44
+ page: string;
45
+ url?: undefined;
46
+ label: string;
47
+ newTab: boolean;
48
+ } | {
49
+ url: string;
50
+ page?: undefined;
51
+ label: string;
52
+ newTab: boolean;
53
+ };
54
+ /** An outside address a link may hold (D4): parsed with URL, never matched with a pattern. */
55
+ export declare function isOutsideLinkAddress(url: string): boolean;
56
+ /** M35 C4a (design D3): a `url` attribute of a rich text item, also used by the SDK's form and C4b's handle: an
57
+ * address isOutsideLinkAddress admits, written without surrounding space, or a site path starting with exactly
58
+ * one "/" and holding no backslash, space, control character (C0 or C1), line or paragraph separator or bidi control. A protocol-relative address and "/\" are refused. */
59
+ export declare function isItemAddress(url: string): boolean;
60
+ export declare function readContentPickerSettings(raw: unknown): ContentPickerSettings;
61
+ export declare function readOptionsListSettings(raw: unknown): OptionsListSettings;
62
+ export declare function readLinkSettings(raw: unknown): LinkSettings;
63
+ /** One id or a list, as stored under either setting (D5). */
64
+ export declare function readPickedIds(value: unknown): string[];
65
+ export declare function readOptionValues(value: unknown): string[];
66
+ export declare function readLinkValue(value: unknown): LinkValue | null;
67
+ /** The page ids a value of this editor holds (D7, and session D's nested walk). */
68
+ export declare function pickedPageIdsOf(editorId: string, value: unknown): string[];
69
+ export declare const CONTENT_PICKER_DATA_TYPE_CONFIG: DataTypeConfig;
70
+ export declare const LINK_DATA_TYPE_CONFIG: DataTypeConfig;
@@ -0,0 +1,188 @@
1
+ import { z } from "zod";
2
+ import { UuidStringSchema } from "./uuid.schema.js";
3
+ // M32 C (D1 to D5): three built-in data types whose values are JSON read by alias. The Zod
4
+ // schemas are the source of truth; plugin-sdk keeps JSON Schema mirrors of the settings, generated
5
+ // in input mode (every object is `.strict()` so the mirror keeps `additionalProperties: false`).
6
+ // The read* functions never throw: they read a stored value or settings bag that may predate a
7
+ // change of settings (D5) and keep what still makes sense.
8
+ export const CONTENT_PICKER_EDITOR_ID = "com.kardalum.contentpicker";
9
+ export const OPTIONS_EDITOR_ID = "com.kardalum.options";
10
+ export const LINK_EDITOR_ID = "com.kardalum.link";
11
+ // The b1e00000 block continues after the Asset's 0014.
12
+ export const CONTENT_PICKER_DATA_TYPE_ID = "b1e00000-0000-4000-8000-000000000015";
13
+ export const LINK_DATA_TYPE_ID = "b1e00000-0000-4000-8000-000000000016";
14
+ /** Every picked list is bounded, whatever the field's maximum says (D2). */
15
+ export const CONTENT_PICKER_MAX_ITEMS = 50;
16
+ export const OPTIONS_MAX = 200;
17
+ export const OPTION_TEXT_MAX = 200;
18
+ export const LINK_LABEL_MAX = 200;
19
+ export const LINK_URL_MAX = 2048;
20
+ const lowerUuid = UuidStringSchema.transform((id) => id.toLowerCase());
21
+ export const ContentPickerSettingsSchema = z
22
+ .object({
23
+ startNode: lowerUuid.nullable().default(null),
24
+ documentTypes: z.array(lowerUuid).max(500).default([]),
25
+ multiple: z.boolean().default(false),
26
+ max: z.number().int().min(1).max(CONTENT_PICKER_MAX_ITEMS).nullable().default(null),
27
+ })
28
+ .strict();
29
+ const optionText = z.string().trim().min(1, { message: "Every option needs a label and a value." }).max(OPTION_TEXT_MAX);
30
+ export const OptionSchema = z.object({ label: optionText, value: optionText }).strict();
31
+ export const OptionsListSettingsSchema = z
32
+ .object({
33
+ options: z
34
+ .array(OptionSchema)
35
+ .min(1, { message: "Add at least one option." })
36
+ .max(OPTIONS_MAX)
37
+ .refine((options) => new Set(options.map((option) => option.value)).size === options.length, {
38
+ message: "Two options share a value.",
39
+ }),
40
+ multiple: z.boolean().default(false),
41
+ })
42
+ .strict();
43
+ export const LINK_ALLOW = ["internal", "external", "both"];
44
+ export const LinkSettingsSchema = z.object({ allow: z.enum(LINK_ALLOW).default("both") }).strict();
45
+ const OUTSIDE_SCHEMES = new Set(["http:", "https:", "mailto:", "tel:"]);
46
+ /** An outside address a link may hold (D4): parsed with URL, never matched with a pattern. */
47
+ export function isOutsideLinkAddress(url) {
48
+ if (typeof url !== "string")
49
+ return false;
50
+ const trimmed = url.trim();
51
+ if (trimmed === "" || trimmed.length > LINK_URL_MAX)
52
+ return false;
53
+ try {
54
+ const parsed = new URL(trimmed);
55
+ if (!OUTSIDE_SCHEMES.has(parsed.protocol))
56
+ return false;
57
+ if (parsed.protocol === "mailto:")
58
+ return parsed.pathname.trim() !== "";
59
+ if (parsed.protocol === "tel:") {
60
+ for (const char of parsed.pathname)
61
+ if (char >= "0" && char <= "9")
62
+ return true;
63
+ return false;
64
+ }
65
+ return true;
66
+ }
67
+ catch {
68
+ return false;
69
+ }
70
+ }
71
+ /** A C1 control, the Unicode line or paragraph separator, or a bidi control: invisible or reordering in an address. */
72
+ function isHiddenAddressChar(code) {
73
+ return ((code >= 0x80 && code <= 0x9f) ||
74
+ code === 0x2028 ||
75
+ code === 0x2029 ||
76
+ code === 0x061c ||
77
+ code === 0x200e ||
78
+ code === 0x200f ||
79
+ (code >= 0x202a && code <= 0x202e) ||
80
+ (code >= 0x2066 && code <= 0x2069));
81
+ }
82
+ /** M35 C4a (design D3): a `url` attribute of a rich text item, also used by the SDK's form and C4b's handle: an
83
+ * address isOutsideLinkAddress admits, written without surrounding space, or a site path starting with exactly
84
+ * one "/" and holding no backslash, space, control character (C0 or C1), line or paragraph separator or bidi control. A protocol-relative address and "/\" are refused. */
85
+ export function isItemAddress(url) {
86
+ if (typeof url !== "string" || url.length === 0 || url.length > LINK_URL_MAX)
87
+ return false;
88
+ if (url.charCodeAt(0) !== 0x2f)
89
+ return url === url.trim() && isOutsideLinkAddress(url);
90
+ for (let index = 0; index < url.length; index += 1) {
91
+ const code = url.charCodeAt(index);
92
+ if (code <= 0x20 || code === 0x7f || code === 0x5c || isHiddenAddressChar(code))
93
+ return false;
94
+ if (index === 1 && code === 0x2f)
95
+ return false;
96
+ }
97
+ return true;
98
+ }
99
+ function record(raw) {
100
+ return typeof raw === "object" && raw !== null && !Array.isArray(raw) ? raw : {};
101
+ }
102
+ function uuidOrNull(raw) {
103
+ return typeof raw === "string" && UuidStringSchema.safeParse(raw).success ? raw.toLowerCase() : null;
104
+ }
105
+ export function readContentPickerSettings(raw) {
106
+ const bag = record(raw);
107
+ const types = Array.isArray(bag.documentTypes) ? bag.documentTypes.map(uuidOrNull).filter((id) => id !== null) : [];
108
+ const max = typeof bag.max === "number" && Number.isInteger(bag.max) && bag.max >= 1 && bag.max <= CONTENT_PICKER_MAX_ITEMS ? bag.max : null;
109
+ return { startNode: uuidOrNull(bag.startNode), documentTypes: [...new Set(types)], multiple: bag.multiple === true, max };
110
+ }
111
+ export function readOptionsListSettings(raw) {
112
+ const bag = record(raw);
113
+ const list = Array.isArray(bag.options) ? bag.options.slice(0, OPTIONS_MAX) : [];
114
+ const seen = new Set();
115
+ const options = [];
116
+ for (const entry of list) {
117
+ const parsed = OptionSchema.safeParse(entry);
118
+ if (!parsed.success || seen.has(parsed.data.value))
119
+ continue;
120
+ seen.add(parsed.data.value);
121
+ options.push(parsed.data);
122
+ }
123
+ return { options, multiple: bag.multiple === true };
124
+ }
125
+ export function readLinkSettings(raw) {
126
+ const allow = record(raw).allow;
127
+ return { allow: allow === "internal" || allow === "external" ? allow : "both" };
128
+ }
129
+ /** One id or a list, as stored under either setting (D5). */
130
+ export function readPickedIds(value) {
131
+ const list = Array.isArray(value) ? value : value === null || value === undefined ? [] : [value];
132
+ const out = [];
133
+ for (const entry of list) {
134
+ const id = uuidOrNull(entry);
135
+ if (id !== null && !out.includes(id))
136
+ out.push(id);
137
+ if (out.length >= CONTENT_PICKER_MAX_ITEMS)
138
+ break;
139
+ }
140
+ return out;
141
+ }
142
+ export function readOptionValues(value) {
143
+ const list = Array.isArray(value) ? value.slice(0, OPTIONS_MAX) : [value];
144
+ const out = [];
145
+ for (const entry of list) {
146
+ if (typeof entry === "string" && entry !== "" && !out.includes(entry))
147
+ out.push(entry);
148
+ }
149
+ return out;
150
+ }
151
+ export function readLinkValue(value) {
152
+ if (typeof value !== "object" || value === null || Array.isArray(value))
153
+ return null;
154
+ const bag = value;
155
+ const label = typeof bag.label === "string" ? bag.label : "";
156
+ const newTab = bag.newTab === true;
157
+ const page = uuidOrNull(bag.page);
158
+ const url = typeof bag.url === "string" && bag.url.trim() !== "" ? bag.url.trim() : null;
159
+ if (page !== null && url === null && (bag.url === undefined || bag.url === null || bag.url === ""))
160
+ return { page, label, newTab };
161
+ if (url !== null && (bag.page === undefined || bag.page === null))
162
+ return { url, label, newTab };
163
+ return null;
164
+ }
165
+ /** The page ids a value of this editor holds (D7, and session D's nested walk). */
166
+ export function pickedPageIdsOf(editorId, value) {
167
+ if (editorId === CONTENT_PICKER_EDITOR_ID)
168
+ return readPickedIds(value);
169
+ if (editorId === LINK_EDITOR_ID) {
170
+ const link = readLinkValue(value);
171
+ return link?.page !== undefined ? [link.page] : [];
172
+ }
173
+ return [];
174
+ }
175
+ // Seeded by migration 0035 (D1), never by BUILT_IN_DATA_TYPE_CONFIGS. Parsed settings, so the
176
+ // stored row is what the data types screen saves back unchanged.
177
+ export const CONTENT_PICKER_DATA_TYPE_CONFIG = {
178
+ id: CONTENT_PICKER_DATA_TYPE_ID,
179
+ name: "Content Picker",
180
+ editorId: CONTENT_PICKER_EDITOR_ID,
181
+ settings: ContentPickerSettingsSchema.parse({}),
182
+ };
183
+ export const LINK_DATA_TYPE_CONFIG = {
184
+ id: LINK_DATA_TYPE_ID,
185
+ name: "Link",
186
+ editorId: LINK_EDITOR_ID,
187
+ settings: LinkSettingsSchema.parse({}),
188
+ };
@@ -35,6 +35,27 @@ export declare const TemplateDeleteBlockedResponseSchema: z.ZodObject<{
35
35
  message: z.ZodString;
36
36
  }, z.core.$strip>;
37
37
  export type TemplateDeleteBlockedResponse = z.infer<typeof TemplateDeleteBlockedResponseSchema>;
38
+ /** M35 (2026-11-22): a template an uninstall kept because the site uses it is refused while a
39
+ * document type that points at it has pages, live or in the Recycle Bin, naming each such type and
40
+ * its page counts; a kept layout or partial also while another kept template names it, naming
41
+ * those templates (at most KEPT_TEMPLATE_NAMED_BY_MAX). */
42
+ export declare const KEPT_TEMPLATE_IN_USE_CODE = "kept_template_in_use";
43
+ export declare const KEPT_TEMPLATE_NAMED_BY_MAX = 50;
44
+ export declare const KeptTemplateInUseSchema: z.ZodObject<{
45
+ code: z.ZodLiteral<"kept_template_in_use">;
46
+ documentTypes: z.ZodArray<z.ZodObject<{
47
+ id: z.ZodString;
48
+ name: z.ZodString;
49
+ livePages: z.ZodNumber;
50
+ trashedPages: z.ZodNumber;
51
+ }, z.core.$strip>>;
52
+ templates: z.ZodArray<z.ZodObject<{
53
+ id: z.ZodString;
54
+ name: z.ZodString;
55
+ }, z.core.$strip>>;
56
+ message: z.ZodString;
57
+ }, z.core.$strip>;
58
+ export type KeptTemplateInUse = z.infer<typeof KeptTemplateInUseSchema>;
38
59
  export declare const DeleteTemplateQuerySchema: z.ZodObject<{
39
60
  confirm: z.ZodOptional<z.ZodEnum<{
40
61
  true: "true";
@@ -96,6 +117,12 @@ export declare const TemplateListItemSchema: z.ZodObject<{
96
117
  documentTypeId: z.ZodNullable<z.ZodString>;
97
118
  currentVersion: z.ZodNumber;
98
119
  ownedBy: z.ZodNullable<z.ZodString>;
120
+ ownerState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
121
+ on: "on";
122
+ uninstalled: "uninstalled";
123
+ off: "off";
124
+ }>>>;
125
+ ownerName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
126
  }, z.core.$strict>;
100
127
  export type TemplateListItem = z.infer<typeof TemplateListItemSchema>;
101
128
  export declare const TemplateListResponseSchema: z.ZodObject<{
@@ -111,6 +138,12 @@ export declare const TemplateListResponseSchema: z.ZodObject<{
111
138
  documentTypeId: z.ZodNullable<z.ZodString>;
112
139
  currentVersion: z.ZodNumber;
113
140
  ownedBy: z.ZodNullable<z.ZodString>;
141
+ ownerState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
142
+ on: "on";
143
+ uninstalled: "uninstalled";
144
+ off: "off";
145
+ }>>>;
146
+ ownerName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
147
  }, z.core.$strict>>;
115
148
  nextCursor: z.ZodNullable<z.ZodString>;
116
149
  }, z.core.$strip>;
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { KeptPartStateSchema } from "./plugin-kept-parts.js";
2
3
  import { TrashCursorSchema } from "./trash-cursor.schema.js";
3
4
  import { TemplateAliasSchema, TemplateDefinitionSchema, TemplateKindSchema, TemplateVersionMetaSchema, TemplateVersionSchema, TrashedTemplateSchema, } from "./template.schema.js";
4
5
  // S314c3 (D8): the default of a site's template limit, in UTF-8 bytes. The server holds every
@@ -47,6 +48,24 @@ export const TemplateDeleteBlockedResponseSchema = z.object({
47
48
  isCatchAll: z.boolean(),
48
49
  message: z.string(),
49
50
  });
51
+ /** M35 (2026-11-22): a template an uninstall kept because the site uses it is refused while a
52
+ * document type that points at it has pages, live or in the Recycle Bin, naming each such type and
53
+ * its page counts; a kept layout or partial also while another kept template names it, naming
54
+ * those templates (at most KEPT_TEMPLATE_NAMED_BY_MAX). */
55
+ export const KEPT_TEMPLATE_IN_USE_CODE = "kept_template_in_use";
56
+ export const KEPT_TEMPLATE_NAMED_BY_MAX = 50;
57
+ export const KeptTemplateInUseSchema = z.object({
58
+ code: z.literal(KEPT_TEMPLATE_IN_USE_CODE),
59
+ documentTypes: z.array(z.object({
60
+ id: z.string().uuid(),
61
+ name: z.string(),
62
+ livePages: z.number().int().nonnegative(),
63
+ /** Counted up to DOCUMENT_TYPE_TRASHED_COUNT_LIMIT. */
64
+ trashedPages: z.number().int().nonnegative(),
65
+ })),
66
+ templates: z.array(z.object({ id: z.string(), name: z.string() })).max(KEPT_TEMPLATE_NAMED_BY_MAX),
67
+ message: z.string(),
68
+ });
50
69
  export const DeleteTemplateQuerySchema = z.object({ confirm: z.enum(["true"]).optional() });
51
70
  export const TemplateResponseSchema = z.object({
52
71
  template: TemplateDefinitionSchema,
@@ -69,7 +88,13 @@ export const TemplateListQuerySchema = z.object({
69
88
  // plugin tracking table, read by the route), or null for the operator's own.
70
89
  // A route-level field: TemplateDefinitionSchema, and every adapter row mapper
71
90
  // behind it, stay as they are.
72
- export const TemplateListItemSchema = TemplateDefinitionSchema.extend({ ownedBy: z.string().min(1).nullable() });
91
+ export const TemplateListItemSchema = TemplateDefinitionSchema.extend({
92
+ ownedBy: z.string().min(1).nullable(),
93
+ /** M35: where the providing plugin stands (null for the operator's own): on, off, or uninstalled with the template kept. */
94
+ ownerState: KeptPartStateSchema.nullable().optional(),
95
+ /** M35: the providing plugin's display name, the name it had when an uninstall kept the template. */
96
+ ownerName: z.string().nullable().optional(),
97
+ });
73
98
  export const TemplateListResponseSchema = z.object({
74
99
  items: z.array(TemplateListItemSchema),
75
100
  nextCursor: z.string().uuid().nullable(),
@@ -6,6 +6,7 @@ export declare const TemplateKindSchema: z.ZodEnum<{
6
6
  }>;
7
7
  export type TemplateKind = z.infer<typeof TemplateKindSchema>;
8
8
  export declare const TEMPLATE_ALIAS_MAX_SEGMENTS = 8;
9
+ export declare const TEMPLATE_BATCH_READ_MAX = 100;
9
10
  export declare const TemplateAliasSchema: z.ZodString;
10
11
  export declare const TEMPLATE_KIND_FOLDERS: {
11
12
  readonly page: "pages";