@kardalum/plugin-sdk 0.20.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 (323) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/admin-section-registry.d.ts +33 -1
  3. package/dist/admin-section-registry.js +67 -0
  4. package/dist/capabilities.js +46 -1
  5. package/dist/consent-entry.d.ts +11 -0
  6. package/dist/consent-entry.js +18 -0
  7. package/dist/content-library.d.ts +17 -0
  8. package/dist/content-list-extensions.d.ts +50 -0
  9. package/dist/content-list-extensions.js +11 -0
  10. package/dist/content-picker/page-picker-sheet.d.ts +2 -0
  11. package/dist/content-picker/page-picker-sheet.js +1 -1
  12. package/dist/content-picker/page-picker.d.ts +18 -0
  13. package/dist/content-picker/page-picker.js +20 -0
  14. package/dist/datatype-validation.js +10 -2
  15. package/dist/datatypes-entry.d.ts +1 -0
  16. package/dist/datatypes-entry.js +2 -0
  17. package/dist/entitlement-types.d.ts +18 -1
  18. package/dist/host-entry.d.ts +7 -1
  19. package/dist/host-entry.js +14 -1
  20. package/dist/index.d.ts +35 -7
  21. package/dist/index.js +46 -5
  22. package/dist/mail.d.ts +6 -2
  23. package/dist/manifest-entry.d.ts +22 -4
  24. package/dist/manifest-entry.js +25 -1
  25. package/dist/manifest-schema.d.ts +570 -31
  26. package/dist/manifest-schema.js +240 -12
  27. package/dist/manifest.d.ts +757 -32
  28. package/dist/manifest.js +8 -4
  29. package/dist/plugin-context.d.ts +47 -0
  30. package/dist/plugin-context.js +27 -0
  31. package/dist/plugin-permissions.d.ts +18 -0
  32. package/dist/plugin-permissions.js +25 -0
  33. package/dist/plugin-screen-context.d.ts +152 -11
  34. package/dist/plugin-screen-context.js +30 -0
  35. package/dist/providers.d.ts +47 -2
  36. package/dist/render-page.d.ts +15 -0
  37. package/dist/render-page.js +20 -0
  38. package/dist/richtext/block-panel.d.ts +12 -1
  39. package/dist/richtext/block-panel.js +27 -21
  40. package/dist/richtext/button-view.d.ts +11 -0
  41. package/dist/richtext/button-view.js +45 -0
  42. package/dist/richtext/content-guard.d.ts +4 -0
  43. package/dist/richtext/content-guard.js +27 -0
  44. package/dist/richtext/editor-handle.d.ts +34 -0
  45. package/dist/richtext/editor-handle.js +225 -0
  46. package/dist/richtext/extensions.d.ts +6 -0
  47. package/dist/richtext/extensions.js +16 -0
  48. package/dist/richtext/insert-menu.d.ts +6 -1
  49. package/dist/richtext/insert-menu.js +38 -18
  50. package/dist/richtext/item-attributes.d.ts +6 -0
  51. package/dist/richtext/item-attributes.js +19 -0
  52. package/dist/richtext/item-panel.d.ts +25 -0
  53. package/dist/richtext/item-panel.js +118 -0
  54. package/dist/richtext/item-view.d.ts +58 -0
  55. package/dist/richtext/item-view.js +172 -0
  56. package/dist/richtext/mark-form.d.ts +10 -0
  57. package/dist/richtext/mark-form.js +38 -0
  58. package/dist/richtext/paste-choice.d.ts +9 -0
  59. package/dist/richtext/paste-choice.js +13 -0
  60. package/dist/richtext/plugin-items.d.ts +72 -0
  61. package/dist/richtext/plugin-items.js +562 -0
  62. package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
  63. package/dist/richtext/plugin-mark-tooltips.js +44 -0
  64. package/dist/richtext/plugin-toolbar.d.ts +57 -0
  65. package/dist/richtext/plugin-toolbar.js +186 -0
  66. package/dist/richtext/rich-item-icons.d.ts +5 -0
  67. package/dist/richtext/rich-item-icons.js +42 -0
  68. package/dist/richtext/rich-items.d.ts +42 -0
  69. package/dist/richtext/rich-items.js +68 -0
  70. package/dist/richtext/rich-text-view-host.d.ts +24 -0
  71. package/dist/richtext/rich-text-view-host.js +11 -0
  72. package/dist/richtext/toolbar-button.d.ts +16 -0
  73. package/dist/richtext/toolbar-button.js +9 -0
  74. package/dist/richtext/url-paste.d.ts +20 -0
  75. package/dist/richtext/url-paste.js +82 -0
  76. package/dist/richtext-html-entry.d.ts +5 -0
  77. package/dist/richtext-html-entry.js +11 -0
  78. package/dist/sdk-strings.d.ts +59 -0
  79. package/dist/sdk-strings.js +64 -0
  80. package/dist/service-contract.d.ts +17 -0
  81. package/dist/service-contract.js +39 -0
  82. package/dist/services.d.ts +114 -0
  83. package/dist/services.js +1 -0
  84. package/dist/structured-storage-types.d.ts +124 -4
  85. package/dist/tailwind.js +10 -5
  86. package/dist/template-reads.d.ts +16 -0
  87. package/dist/template-reads.js +21 -0
  88. package/dist/testing-entry.d.ts +38 -0
  89. package/dist/testing-entry.js +173 -0
  90. package/dist/text-entry.d.ts +1 -1
  91. package/dist/text-entry.js +3 -2
  92. package/dist/tokens/system-dark.css +1 -0
  93. package/dist/tokens/tailwind-theme.css +2 -0
  94. package/dist/tokens/tokens.css +4 -0
  95. package/dist/tokens/tokens.json +5 -1
  96. package/dist/uploads.d.ts +43 -0
  97. package/dist/uploads.js +1 -0
  98. package/dist/user-library.d.ts +51 -0
  99. package/dist/user-library.js +15 -0
  100. package/dist/view-helpers.d.ts +18 -0
  101. package/dist/view-helpers.js +64 -0
  102. package/dist/views/content-list-view.js +207 -8
  103. package/dist/views/content-picker-view.js +1 -1
  104. package/dist/views/rich-text-view.d.ts +2 -0
  105. package/dist/views/rich-text-view.js +182 -24
  106. package/dist/views/unreadable-rich-text.d.ts +17 -0
  107. package/dist/views/unreadable-rich-text.js +40 -0
  108. package/dist/visitors.d.ts +81 -0
  109. package/dist/visitors.js +1 -0
  110. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
  111. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
  112. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
  113. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
  114. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +127 -8
  115. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +82 -7
  116. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +5 -1
  117. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +2 -2
  118. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +7 -0
  119. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +11 -0
  120. package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +1 -1
  121. package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +18 -0
  122. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +80 -0
  123. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +41 -2
  124. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.d.ts +213 -0
  125. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
  126. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.d.ts +11 -0
  127. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
  128. package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +50 -13
  129. package/node_modules/@kardalum/api-schemas/dist/core-actions.js +19 -10
  130. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +77 -0
  131. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +37 -0
  132. package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
  133. package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
  134. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
  135. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
  136. package/node_modules/@kardalum/api-schemas/dist/html-scan.d.ts +22 -0
  137. package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
  138. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
  139. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
  140. package/node_modules/@kardalum/api-schemas/dist/index.d.ts +52 -14
  141. package/node_modules/@kardalum/api-schemas/dist/index.js +53 -9
  142. package/node_modules/@kardalum/api-schemas/dist/json-depth.d.ts +3 -0
  143. package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
  144. package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +4 -2
  145. package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +6 -1
  146. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +178 -2
  147. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +10 -0
  148. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +3 -3
  149. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +16 -0
  150. package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +4 -0
  151. package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
  152. package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +7 -0
  153. package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +51 -2
  154. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.d.ts +87 -0
  155. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
  156. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.d.ts +11 -0
  157. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
  158. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +4 -2
  159. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +12 -2
  160. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
  161. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
  162. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
  163. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
  164. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
  165. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
  166. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
  167. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
  168. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
  169. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
  170. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
  171. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
  172. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +18 -0
  173. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +18 -0
  174. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +5 -2
  175. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +10 -2
  176. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +48 -1
  177. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +5 -2
  178. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +6 -4
  179. package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
  180. package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
  181. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.d.ts +112 -0
  182. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
  183. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +12 -0
  184. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +3 -0
  185. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +2 -0
  186. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +3 -0
  187. package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +67 -0
  188. package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +15 -0
  189. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
  190. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
  191. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +80 -15
  192. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +67 -23
  193. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +10 -3
  194. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +33 -8
  195. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +2 -1
  196. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +7 -1
  197. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +1 -1
  198. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +43 -7
  199. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +36 -5
  200. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.d.ts +638 -0
  201. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
  202. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.d.ts +36 -0
  203. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
  204. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
  205. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
  206. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
  207. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
  208. package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
  209. package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
  210. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +10 -0
  211. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +10 -1
  212. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +171 -4
  213. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +406 -42
  214. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
  215. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
  216. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
  217. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
  218. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
  219. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
  220. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
  221. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
  222. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
  223. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
  224. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
  225. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
  226. package/node_modules/@kardalum/api-schemas/dist/render-cache.d.ts +126 -0
  227. package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
  228. package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +303 -0
  229. package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
  230. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
  231. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
  232. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +66 -1
  233. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +465 -7
  234. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +15 -118
  235. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +110 -0
  236. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
  237. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
  238. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
  239. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +9 -2
  240. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +7 -2
  241. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +26 -0
  242. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +19 -0
  243. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
  244. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
  245. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +5 -3
  246. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +3 -1
  247. package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
  248. package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
  249. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +4 -0
  250. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +28 -0
  251. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
  252. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
  253. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +14 -0
  254. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +2 -0
  255. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.d.ts +482 -0
  256. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
  257. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
  258. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
  259. package/node_modules/@kardalum/api-schemas/package.json +1 -0
  260. package/node_modules/@kardalum/design-tokens/dist/build-css.js +9 -1
  261. package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
  262. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +2 -0
  263. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -0
  264. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
  265. package/node_modules/@kardalum/design-tokens/dist/tokens.css +4 -0
  266. package/node_modules/@kardalum/design-tokens/dist/tokens.js +6 -0
  267. package/node_modules/@kardalum/design-tokens/dist/tokens.json +5 -1
  268. package/node_modules/@kardalum/design-tokens/dist/types.d.ts +4 -0
  269. package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +17 -0
  270. package/node_modules/@kardalum/plugin-package/dist/build-reference.js +9 -0
  271. package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +1 -1
  272. package/node_modules/@kardalum/plugin-package/dist/capabilities.js +276 -19
  273. package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
  274. package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +23 -0
  275. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.d.ts +17 -0
  276. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
  277. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
  278. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
  279. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +2 -0
  280. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
  281. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +21 -8
  282. package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +1 -1
  283. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +23 -10
  284. package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
  285. package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +2 -0
  286. package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +2 -0
  287. package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +30 -2
  288. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +6 -2
  289. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
  290. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
  291. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +2 -0
  292. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +24 -6
  293. package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +15 -0
  294. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
  295. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
  296. package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +1 -1
  297. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +14 -4
  298. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
  299. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
  300. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
  301. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
  302. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +44 -11
  303. package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +7 -0
  304. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
  305. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
  306. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
  307. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
  308. package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -0
  309. package/node_modules/@kardalum/plugin-package/dist/index.js +5 -0
  310. package/node_modules/@kardalum/plugin-package/dist/public-suffix.d.ts +7 -0
  311. package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
  312. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
  313. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
  314. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
  315. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
  316. package/node_modules/@kardalum/plugin-package/package.json +4 -0
  317. package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
  318. package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
  319. package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
  320. package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
  321. package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
  322. package/node_modules/@kardalum/ui/dist/index.js +2 -0
  323. package/package.json +15 -3
@@ -128,7 +128,11 @@
128
128
  "tile": "#113D5C",
129
129
  "keep": "#7CC0E8"
130
130
  },
131
- "canvas": "#FFFFFF"
131
+ "canvas": "#FFFFFF",
132
+ "qr": {
133
+ "ground": "#FFFFFF",
134
+ "ink": "#111614"
135
+ }
132
136
  },
133
137
  "typography": {
134
138
  "fontFamily": {
@@ -71,6 +71,10 @@ export interface KardalumDesignTokens {
71
71
  keep: string;
72
72
  };
73
73
  canvas: string;
74
+ qr: {
75
+ ground: string;
76
+ ink: string;
77
+ };
74
78
  };
75
79
  typography: {
76
80
  fontFamily: {
@@ -93,6 +93,16 @@ export interface ReferenceManifestInput {
93
93
  action: string;
94
94
  documentTypes?: readonly string[];
95
95
  }>;
96
+ contentColumns?: ReadonlyArray<ContentSlotReferenceEntry>;
97
+ treeBadges?: ReadonlyArray<ContentSlotReferenceEntry>;
98
+ listFilters?: ReadonlyArray<ContentSlotReferenceEntry>;
99
+ bulkActions?: ReadonlyArray<ContentSlotReferenceEntry>;
100
+ adminSlots?: ReadonlyArray<{
101
+ id: string;
102
+ slot: string;
103
+ label: PluginLabel;
104
+ action: string;
105
+ }>;
96
106
  hooks?: object;
97
107
  scheduledTasks?: ReadonlyArray<{
98
108
  id: string;
@@ -107,6 +117,13 @@ export interface ReferenceManifestInput {
107
117
  }>;
108
118
  };
109
119
  }
120
+ /** What the reference reads of one content slot entry; not the SDK's ContentSlotInput (the rows a value function is handed). */
121
+ type ContentSlotReferenceEntry = {
122
+ id: string;
123
+ label: PluginLabel;
124
+ action: string;
125
+ documentTypes?: readonly string[];
126
+ };
110
127
  /** The serialisable facts the six generated Reference pages are rendered
111
128
  * from (spec 3.2). Only plain data: never a view, a handler or a hook. The
112
129
  * CLI writes it to reference.json; the server builds it live from the
@@ -1,4 +1,11 @@
1
1
  import { ASSERTION_KEYS, deriveCapabilities } from "./capabilities.js";
2
+ /** M35 C2: the reference's kind for each content slot key, in the reference's order. */
3
+ const CONTENT_SLOT_REFERENCE_KINDS = [
4
+ ["contentColumns", "column"],
5
+ ["treeBadges", "badge"],
6
+ ["listFilters", "filter"],
7
+ ["bulkActions", "bulkAction"],
8
+ ];
2
9
  /** Drops functions, components and undefined values by a JSON round trip. */
3
10
  function plain(value) {
4
11
  return JSON.parse(JSON.stringify(value));
@@ -48,6 +55,8 @@ export function buildReference(manifest) {
48
55
  dashboardWidgets: (c.dashboardWidgets ?? []).map(({ id, name, action }) => ({ id, name: english(name), action })),
49
56
  editorPanels: (c.editorPanels ?? []).map(({ id, label, action, documentTypes }) => ({ id, label: english(label), action, ...(documentTypes ? { documentTypes: [...documentTypes] } : {}) })),
50
57
  treeActions: (c.treeActions ?? []).map(({ id, label, action, documentTypes }) => ({ id, label: english(label), action, ...(documentTypes ? { documentTypes: [...documentTypes] } : {}) })),
58
+ contentSlots: CONTENT_SLOT_REFERENCE_KINDS.flatMap(([key, kind]) => (c[key] ?? []).map(({ id, label, action, documentTypes }) => ({ id, kind, label: english(label), action, ...(documentTypes ? { documentTypes: [...documentTypes] } : {}) }))),
59
+ adminSlots: (c.adminSlots ?? []).map(({ id, slot, label, action }) => ({ id, slot, label: english(label), action })),
51
60
  hooks: Object.keys(c.hooks ?? {}),
52
61
  scheduledTasks: (c.scheduledTasks ?? []).map(({ id, name, cron }) => ({ id, name: english(name), cron })),
53
62
  settings: (c.settings ?? []).map(({ id, type, label, askAtInstall }) => ({ id, type, label: english(label), askAtInstall: askAtInstall === true })),
@@ -75,7 +75,7 @@ export interface Capability {
75
75
  * exactly `keyof PluginContributions`: a contribution added to the
76
76
  * contract and not classified here is a compile error in the SDK's build.
77
77
  */
78
- export declare const CONTRIBUTION_EMISSION_ORDER: readonly ["dataTypes", "dataTypeConfigs", "documentTypes", "adminSections", "railEntries", "dashboardWidgets", "editorPanels", "treeActions", "templates", "assets", "themeTokens", "hooks", "scheduledTasks", "mediaProcessors", "serializers", "apiRoutes", "contentAccess", "mediaAccess", "siteRoutes", "siteFallback", "templateFilters", "templateTags", "pageHead", "heldEmbeds", "protectionProviders", "searchProviders", "mediaStores", "signInProviders", "mailSenders", "formReplies", "mailKinds", "outboundRequests", "secrets", "sealedValues", "exposedServices", "notifications", "bundledPlugins", "bundledTemplate", "aiContext", "settings"];
78
+ export declare const CONTRIBUTION_EMISSION_ORDER: readonly ["dataTypes", "dataTypeConfigs", "documentTypes", "adminSections", "railEntries", "dashboardWidgets", "editorPanels", "treeActions", "richTextExtensions", "contentColumns", "treeBadges", "listFilters", "bulkActions", "adminSlots", "templates", "assets", "themeTokens", "hooks", "guards", "scheduledTasks", "mediaProcessors", "serializers", "apiRoutes", "contentAccess", "mediaAccess", "userAccess", "userFields", "visitorIdentity", "visitorGroups", "visitorAccountSections", "visitorData", "siteRoutes", "siteFallback", "requestGuard", "responseHeaders", "pageGate", "templateFilters", "templateTags", "pageHead", "heldEmbeds", "pageOutput", "pageCache", "protectionProviders", "searchProviders", "mediaStores", "signInProviders", "signInSteps", "mailSenders", "consentTools", "formReplies", "mailKinds", "outboundRequests", "secrets", "sealedValues", "serviceContracts", "exposedServices", "usedServices", "events", "notifications", "bundledPlugins", "bundledTemplate", "aiContext", "settings"];
79
79
  export type ContributionKey = (typeof CONTRIBUTION_EMISSION_ORDER)[number];
80
80
  /** The assertion kinds, in emission order. The SDK asserts these are
81
81
  * exactly `keyof PluginAssertions`, for the reason above. */
@@ -43,33 +43,56 @@ export const CONTRIBUTION_EMISSION_ORDER = [
43
43
  "dashboardWidgets",
44
44
  "editorPanels",
45
45
  "treeActions",
46
+ "richTextExtensions",
47
+ "contentColumns",
48
+ "treeBadges",
49
+ "listFilters",
50
+ "bulkActions",
51
+ "adminSlots",
46
52
  "templates",
47
53
  "assets",
48
54
  "themeTokens",
49
55
  "hooks",
56
+ "guards",
50
57
  "scheduledTasks",
51
58
  "mediaProcessors",
52
59
  "serializers",
53
60
  "apiRoutes",
54
61
  "contentAccess",
55
62
  "mediaAccess",
63
+ "userAccess",
64
+ "userFields",
65
+ "visitorIdentity",
66
+ "visitorGroups",
67
+ "visitorAccountSections",
68
+ "visitorData",
56
69
  "siteRoutes",
57
70
  "siteFallback",
71
+ "requestGuard",
72
+ "responseHeaders",
73
+ "pageGate",
58
74
  "templateFilters",
59
75
  "templateTags",
60
76
  "pageHead",
61
77
  "heldEmbeds",
78
+ "pageOutput",
79
+ "pageCache",
62
80
  "protectionProviders",
63
81
  "searchProviders",
64
82
  "mediaStores",
65
83
  "signInProviders",
84
+ "signInSteps",
66
85
  "mailSenders",
86
+ "consentTools",
67
87
  "formReplies",
68
88
  "mailKinds",
69
89
  "outboundRequests",
70
90
  "secrets",
71
91
  "sealedValues",
92
+ "serviceContracts",
72
93
  "exposedServices",
94
+ "usedServices",
95
+ "events",
73
96
  "notifications",
74
97
  "bundledPlugins",
75
98
  "bundledTemplate",
@@ -95,18 +118,14 @@ export const ASSERTION_KEYS = ["externalNetwork", "filesystemAccess"];
95
118
  * `apiRoutes`, and only for the tiers that let traffic reach a handler
96
119
  * without a signed-in session.
97
120
  *
98
- * `exposedServices`, `bundledPlugins` and `bundledTemplate` are not named
99
- * in section 6's automatic list, which enumerates a policy rather than the
100
- * contract's keys. They are classified mediated here rather than dropped:
101
- * the marketplace resolves the two bundle keys, and the cross-plugin
102
- * service registry (when it exists) is the host's own lookup.
103
- * `exposedServices` reads promised until you remember that plugin backend
104
- * code is unsandboxed and in-process already, so handing another plugin a
105
- * service adds a lookup rather than a privilege it could not otherwise
106
- * reach. Emitting them highlights nothing for the reviewer, since the host
107
- * enforces a mediated capability, and not emitting them would be the exact
108
- * failure this design exists to prevent, a declaration the install screen
109
- * does not disclose.
121
+ * `bundledPlugins` and `bundledTemplate` are not named in section 6's
122
+ * automatic list, which enumerates a policy rather than the contract's keys.
123
+ * They are classified mediated here rather than dropped: the marketplace
124
+ * resolves them. Emitting them highlights nothing for the reviewer, since the
125
+ * host enforces a mediated capability, and not emitting them would be the
126
+ * exact failure this design exists to prevent, a declaration the install
127
+ * screen does not disclose. The four service keys (M35 B1a) are mediated by
128
+ * the core's broker, as their rows below say.
110
129
  */
111
130
  const CONTRIBUTION_RULES = {
112
131
  dataTypes: { derives: "one", id: "content.dataType", mediation: "mediated", actionGated: false },
@@ -123,14 +142,32 @@ const CONTRIBUTION_RULES = {
123
142
  // M32 F3: the host decides where a panel or a tree action renders and checks its action before it does.
124
143
  editorPanels: { derives: "one", id: "admin.editorPanel", mediation: "mediated", actionGated: true },
125
144
  treeActions: { derives: "one", id: "admin.treeAction", mediation: "mediated", actionGated: true },
145
+ // M35 C4a (W9, design D1): the core owns the schema, stores and checks every value and draws every item, and the
146
+ // partial is a template already mediated as render.template: mediated. A button view (C4b) names its own action.
147
+ richTextExtensions: { derives: "one", id: "content.richText", mediation: "mediated", actionGated: false },
148
+ // M35 C2 (W5, W26): the host draws them where it decides, calls the value functions within
149
+ // CONTENT_SLOT_CALL_TIME_MS, checks their answers as plain text and asks each one's action first.
150
+ contentColumns: { derives: "one", id: "admin.contentColumn", mediation: "mediated", actionGated: true },
151
+ treeBadges: { derives: "one", id: "admin.treeBadge", mediation: "mediated", actionGated: true },
152
+ listFilters: { derives: "one", id: "admin.listFilter", mediation: "mediated", actionGated: true },
153
+ bulkActions: { derives: "one", id: "admin.bulkAction", mediation: "mediated", actionGated: true },
154
+ adminSlots: { derives: "one", id: "admin.slot", mediation: "mediated", actionGated: true },
126
155
  templates: { derives: "one", id: "render.template", mediation: "mediated", actionGated: false },
127
156
  assets: { derives: "one", id: "render.asset", mediation: "mediated", actionGated: false },
128
157
  themeTokens: { derives: "one", id: "theme.tokens", mediation: "mediated", actionGated: false },
129
158
  hooks: { derives: "one", id: "server.hook", mediation: "mediated", actionGated: false },
159
+ // M35 B2 (W1): the host asks it and bounds it in time, but what it refuses is the plugin's code, so
160
+ // it is promised and stands under "Needs your consent".
161
+ guards: { derives: "one", id: "server.guard", mediation: "promised", actionGated: false },
130
162
  scheduledTasks: { derives: "one", id: "server.scheduledTask", mediation: "mediated", actionGated: false },
131
163
  mediaProcessors: { derives: "one", id: "media.processor", mediation: "mediated", actionGated: false },
132
164
  serializers: { derives: "one", id: "api.serializer", mediation: "mediated", actionGated: false },
133
- exposedServices: { derives: "one", id: "service.exposed", mediation: "mediated", actionGated: false },
165
+ // M35 B1a (W16): the broker finds the provider, checks the call against the owner's schemas and
166
+ // limits it in time, and the site owner approves each connection, so every one is mediated.
167
+ serviceContracts: { derives: "one", id: "service.contract", mediation: "mediated", actionGated: false },
168
+ exposedServices: { derives: "one", id: "service.offer", mediation: "mediated", actionGated: false },
169
+ usedServices: { derives: "one", id: "service.use", mediation: "mediated", actionGated: false },
170
+ events: { derives: "one", id: "event.raise", mediation: "mediated", actionGated: false },
134
171
  // S314n3 (D1): the one contribution that is promised. The host delivers each send, but
135
172
  // what the plugin sends, to whom and how often is the plugin's code, so a reviewer reads it.
136
173
  notifications: { derives: "one", id: "admin.notifications", mediation: "promised", actionGated: false },
@@ -142,15 +179,39 @@ const CONTRIBUTION_RULES = {
142
179
  // M32 F4c (D10): every call goes through the management API as the plugin's subject, which holds only
143
180
  // the declared actions, so the host decides the outcome: mediated.
144
181
  mediaAccess: { derives: "one", id: "media.access", mediation: "mediated", actionGated: false },
182
+ // M35 U1 (W6): every call goes through the management user routes as the plugin's subject, so the host decides: mediated.
183
+ userAccess: { derives: "one", id: "users.access", mediation: "mediated", actionGated: false },
184
+ // M35 U1 (W6): the core stores, checks and draws the fields: mediated.
185
+ userFields: { derives: "one", id: "users.fields", mediation: "mediated", actionGated: false },
186
+ // M35 U2b (W8): the core hands the plugin a frozen copy of the facts it chose (mediated), and changes only the
187
+ // plugin's own groups (mediated). What a section's partial shows a visitor, and what the plugin exports and
188
+ // whether it erases, is the plugin's code: promised, so a reviewer reads it.
189
+ visitorIdentity: { derives: "one", id: "visitors.identify", mediation: "mediated", actionGated: false },
190
+ visitorGroups: { derives: "one", id: "visitors.groups", mediation: "mediated", actionGated: false },
191
+ visitorAccountSections: { derives: "one", id: "visitors.accountSections", mediation: "promised", actionGated: false },
192
+ visitorData: { derives: "one", id: "visitors.data", mediation: "promised", actionGated: false },
145
193
  // M32 F2 (7.1): the host routes, budgets and escapes every call, so each is mediated.
146
194
  siteRoutes: { derives: "one", id: "site.route", mediation: "mediated", actionGated: false },
147
195
  siteFallback: { derives: "one", id: "site.fallback", mediation: "mediated", actionGated: false },
196
+ // M35 P2 (W2): the host bounds a guard in time and lets the request through when it fails, but what it
197
+ // refuses is the plugin's code, and it reads every visitor's address and headers: promised.
198
+ requestGuard: { derives: "one", id: "site.requestGuard", mediation: "promised", actionGated: false },
199
+ // M35 P2 (W2): the host checks every name against its list and every value, and keeps its own headers.
200
+ responseHeaders: { derives: "one", id: "site.responseHeaders", mediation: "mediated", actionGated: false },
201
+ // M35 P4 (W46): the host bounds a gate in time and lets the page through when it fails, but which live pages it
202
+ // redirects or removes is the plugin's code: promised, as a request guard is.
203
+ pageGate: { derives: "one", id: "site.pageGate", mediation: "promised", actionGated: false },
148
204
  templateFilters: { derives: "one", id: "render.templateFilter", mediation: "mediated", actionGated: false },
149
205
  templateTags: { derives: "one", id: "render.templateTag", mediation: "mediated", actionGated: false },
150
206
  pageHead: { derives: "one", id: "render.pageHead", mediation: "mediated", actionGated: false },
151
207
  // M33 K42: the core writes every placeholder and builds every frame, from a declared origin and
152
208
  // path only and only after a visitor's click, so it decides the outcome: mediated.
153
209
  heldEmbeds: { derives: "one", id: "render.heldEmbed", mediation: "mediated", actionGated: false },
210
+ // M35 P1 (W3): the host bounds the time and size and keeps the head out of reach, but what a
211
+ // transform writes into every page is the plugin's own: promised, so a reviewer reads it.
212
+ pageOutput: { derives: "one", id: "render.pageOutput", mediation: "promised", actionGated: false },
213
+ // M35 P4 (W32): the host checks every answer and writes every header itself: mediated.
214
+ pageCache: { derives: "one", id: "render.pageCache", mediation: "mediated", actionGated: false },
154
215
  // M32 F4 (D8, D10): a provider is plugin code the host calls with the site's data (every posted form's
155
216
  // fields and address, every published page, every uploaded file), so what it does with them is the
156
217
  // plugin's: promised, read by a reviewer. A secret is kept encrypted by the host and handed only to
@@ -161,9 +222,15 @@ const CONTRIBUTION_RULES = {
161
222
  // M32 F4b (D48): a sign-in provider vouches for who signs in to the admin; for oauth2 its own
162
223
  // `profile` decides it, so what the provider is trusted with is the plugin's: promised.
163
224
  signInProviders: { derives: "one", id: "provider.signIn", mediation: "promised", actionGated: false },
225
+ // M35 U3a (D5): a step decides whether a person who passed the password gets in; what it lets through is
226
+ // the plugin's code, so it is promised. Shown at install as "can stop people signing in to the admin".
227
+ signInSteps: { derives: "one", id: "provider.signInStep", mediation: "promised", actionGated: false },
164
228
  // M32 H (H2, H19): a mail sender sees every email the site sends (reset links included), and a form
165
229
  // reply goes to an address a visitor typed, so what each does with them is the plugin's: promised.
166
230
  mailSenders: { derives: "one", id: "provider.mail", mediation: "promised", actionGated: false },
231
+ // M35 P5 (W37): a consent tool's script runs on every page, decides what each visitor is asked and writes their choice:
232
+ // promised, so a reviewer reads it.
233
+ consentTools: { derives: "one", id: "provider.consent", mediation: "promised", actionGated: false },
167
234
  formReplies: { derives: "one", id: "mail.formReplies", mediation: "promised", actionGated: false },
168
235
  // M33 K11 (consolidation 3.15): the host bounds the kinds, the rates and the owner's switch, but to
169
236
  // whom the plugin sends and what it writes is the plugin's code, kept to the authors' rule only by
@@ -337,8 +404,28 @@ function describeMediaAccess(entry) {
337
404
  const words = MEDIA_ACCESS_WORDS.filter(([action]) => actions.includes(action)).map(([, word]) => word);
338
405
  return words.length === 0 ? null : words.join(", ");
339
406
  }
407
+ const USER_ACCESS_WORDS = [
408
+ ["users.read", "read every account"],
409
+ ["users.update", "move people between its roles"],
410
+ ["roles.read", "read roles"],
411
+ ];
412
+ /** M35 U1: "read every account, read roles", or null when the declaration names no action. */
413
+ function describeUserAccess(entry) {
414
+ const actions = entry !== null && typeof entry === "object" ? entry.actions : undefined;
415
+ if (!Array.isArray(actions))
416
+ return null;
417
+ const words = USER_ACCESS_WORDS.filter(([action]) => actions.includes(action)).map(([, word]) => word);
418
+ return words.length === 0 ? null : words.join(", ");
419
+ }
420
+ /** M35 U1: an account field's English label. */
421
+ function describeUserField(entry) {
422
+ return entry !== null && typeof entry === "object" ? readableField(entry.label) : null;
423
+ }
340
424
  /** M32 F (D7): "Comment under Post: create drafts", or null when the entry names nothing readable. */
341
425
  function describeContentAccess(record) {
426
+ // M35 C1 (W12): an allContent entry is its own line, so a wide grant is never hidden in a named list.
427
+ if (record.allContent === true)
428
+ return Array.isArray(record.actions) && record.actions.includes("content.read") ? "All content, drafts included: read" : null;
342
429
  const type = readableField(record.documentType);
343
430
  const actions = Array.isArray(record.actions) ? record.actions : [];
344
431
  const words = CONTENT_ACCESS_WORDS.filter(([action]) => actions.includes(action)).map(([, word]) => word);
@@ -379,7 +466,7 @@ function describeEntry(entry, key) {
379
466
  if (entry === null || typeof entry !== "object")
380
467
  return null;
381
468
  const record = entry;
382
- if (key === "contentAccess" && typeof record.documentType === "string" && Array.isArray(record.actions))
469
+ if (key === "contentAccess" && (typeof record.documentType === "string" || record.allContent === true) && Array.isArray(record.actions))
383
470
  return describeContentAccess(record);
384
471
  // An apiRoute is named by what it exposes, not by an id it has no field
385
472
  // for: "GET /orders" is the thing a reviewer looks up in the code.
@@ -401,14 +488,26 @@ function templateName(pluginId, name) {
401
488
  return name;
402
489
  return `${pluginId.slice(pluginId.lastIndexOf(".") + 1).split("-").join("_")}_${name}`;
403
490
  }
404
- /** M33 K4: a route's detail, "<method> <path>", with the core's `rawBody` note when it reads the
405
- * request exactly as sent (an object detail; every other route stays a plain string). */
491
+ /** CAPABILITY_NOTE_VALUE_MAX of api-schemas, restated because this module may not import it at run time;
492
+ * the SDK's capabilities test pins the two together through describeRoute's output. */
493
+ const NOTE_VALUE_MAX = 200;
494
+ /** M33 K4: a route's detail, "<method> <path>", with the core's `rawBody` note when it reads the request exactly
495
+ * as sent, and (M35 B3) the `takesFiles` note with its declared types when it takes files. A route with no note
496
+ * stays a plain string. */
406
497
  function describeRoute(route) {
407
498
  const text = describeEntry(route);
408
499
  if (text === null)
409
500
  return null;
410
- const rawBody = route !== null && typeof route === "object" && route.rawBody === true;
411
- return rawBody ? { text, notes: ["rawBody"] } : text;
501
+ const record = route !== null && typeof route === "object" ? route : {};
502
+ const notes = [];
503
+ if (record.rawBody === true)
504
+ notes.push("rawBody");
505
+ const types = record.uploads !== null && typeof record.uploads === "object" ? record.uploads.types : undefined;
506
+ if (Array.isArray(types)) {
507
+ const listed = types.filter((type) => typeof type === "string").join(", ");
508
+ notes.push({ id: "takesFiles", value: listed.length <= NOTE_VALUE_MAX ? listed : `${types.length} types` });
509
+ }
510
+ return notes.length > 0 ? { text, notes } : text;
412
511
  }
413
512
  /** M33 K11: a mail kind's label as written (a string or a map read in the reader's language), or null when it has none. */
414
513
  function describeMailKind(entry) {
@@ -491,7 +590,7 @@ function describeHeldEmbed(entry) {
491
590
  return notes.length === 0 ? { text } : { text, notes };
492
591
  }
493
592
  /** The user events that name an account, so the install screen says they identify people (M33 K20). */
494
- const PEOPLE_HOOK_EVENTS = ["user:afterLogin", "user:afterCreate", "user:afterDelete"];
593
+ const PEOPLE_HOOK_EVENTS = ["user:afterLogin", "user:afterCreate", "user:afterDelete", "user:afterChange"];
495
594
  /** M33 K45: a plugin editor's name as `{ text }` (a string, or its label map read in the reader's
496
595
  * language by every surface); with no readable name, the entry's other name fields as the text. */
497
596
  function describeDataType(entry) {
@@ -529,10 +628,104 @@ function describeProtectionProvider(entry) {
529
628
  const name = describeEntry(entry, "protectionProviders");
530
629
  return name === null ? [] : [name];
531
630
  }
631
+ /** M35 P5 (P5-D5): a consent tool's line is `<id>: public/<script>` with the core's `addsScript` note, as a protection
632
+ * provider's widget script reads, else its name. */
633
+ function describeConsentTool(entry) {
634
+ const record = entry !== null && typeof entry === "object" ? entry : null;
635
+ const id = record?.id;
636
+ const file = record?.script;
637
+ if (typeof id === "string" && id.trim() !== "" && typeof file === "string" && file.trim() !== "")
638
+ return [{ text: `${id}: public/${file}`, notes: ["addsScript"] }];
639
+ const name = describeEntry(entry, "consentTools");
640
+ return name === null ? [] : [name];
641
+ }
642
+ const RICH_TEXT_SHAPE_NOTES = { block: "richTextBlock", inline: "richTextInline", wrapper: "richTextWrapper" };
643
+ /** M35 C4a and C4b (design D1): a line per node and mark, its label as the plugin's words and its shape as the core's
644
+ * note (with its paste hosts and an editorial note, C4b), a line per button view naming its action, then one line
645
+ * with the count of the other toolbar buttons. Derived from the declarations, never declared twice. */
646
+ function describeRichTextExtensions(entry) {
647
+ const record = entry !== null && typeof entry === "object" && !Array.isArray(entry) ? entry : null;
648
+ if (record === null)
649
+ return [];
650
+ const out = [];
651
+ const valueOf = (text) => text.slice(0, NOTE_VALUE_MAX);
652
+ for (const raw of Array.isArray(record.nodes) ? record.nodes : []) {
653
+ const node = raw !== null && typeof raw === "object" ? raw : {};
654
+ const text = labelText(node.label);
655
+ // An own-property lookup: an unvalidated manifest's shape "constructor" must not find Object.prototype's function.
656
+ const note = typeof node.shape === "string" && Object.hasOwn(RICH_TEXT_SHAPE_NOTES, node.shape) ? RICH_TEXT_SHAPE_NOTES[node.shape] : undefined;
657
+ if (text === null || note === undefined)
658
+ continue;
659
+ const notes = [note];
660
+ const fromUrl = node.fromUrl !== null && typeof node.fromUrl === "object" ? node.fromUrl : null;
661
+ const hosts = Array.isArray(fromUrl?.hosts) ? fromUrl.hosts.filter((host) => typeof host === "string") : [];
662
+ if (hosts.length > 0)
663
+ notes.push({ id: "richTextPasteHosts", value: valueOf(hosts.join(", ")) });
664
+ if (node.editorial === true)
665
+ notes.push("richTextEditorial");
666
+ out.push({ text, notes });
667
+ }
668
+ for (const raw of Array.isArray(record.marks) ? record.marks : []) {
669
+ const mark = raw !== null && typeof raw === "object" ? raw : {};
670
+ const text = labelText(mark.label);
671
+ if (text !== null)
672
+ out.push({ text, notes: mark.editorial === true ? ["richTextMark", "richTextEditorial"] : ["richTextMark"] });
673
+ }
674
+ let plain = 0;
675
+ for (const raw of Array.isArray(record.buttons) ? record.buttons : []) {
676
+ const button = raw !== null && typeof raw === "object" ? raw : {};
677
+ const does = button.does !== null && typeof button.does === "object" ? button.does : {};
678
+ const text = labelText(button.label);
679
+ if (typeof does.action === "string" && text !== null)
680
+ out.push({ text, notes: [{ id: "richTextButtonView", value: valueOf(does.action) }] });
681
+ else
682
+ plain += 1;
683
+ }
684
+ if (plain > 0)
685
+ out.push({ text: "", notes: [{ id: "richTextButtons", value: String(plain) }] });
686
+ return out;
687
+ }
532
688
  /** The detail lines of a `derives: "one"` contribution. */
689
+ /** M35 B1a: whether any method's output schema marks a field personal: a bounded walk (depth 8, 512 nodes), the contract subset's own caps. */
690
+ function carriesPersonal(methods) {
691
+ let nodes = 0;
692
+ const walk = (node, depth) => {
693
+ nodes += 1;
694
+ if (nodes > 512 || depth > 8 || node === null || typeof node !== "object" || Array.isArray(node))
695
+ return false;
696
+ const record = node;
697
+ if (record.personal === true)
698
+ return true;
699
+ if (Array.isArray(record.anyOf) && record.anyOf.some((branch) => walk(branch, depth)))
700
+ return true;
701
+ if (record.items !== undefined && walk(record.items, depth + 1))
702
+ return true;
703
+ const properties = record.properties;
704
+ return properties !== null && typeof properties === "object" && Object.values(properties).some((child) => walk(child, depth + 1));
705
+ };
706
+ return methods.some((method) => method !== null && typeof method === "object" && walk(method.output, 0));
707
+ }
533
708
  function detailsOf(key, entries, pluginId) {
534
709
  if (key === "protectionProviders")
535
710
  return entries.flatMap(describeProtectionProvider);
711
+ if (key === "consentTools")
712
+ return entries.flatMap(describeConsentTool);
713
+ // M35 U3a: a step as "<its English label> (<kind>)".
714
+ if (key === "signInSteps") {
715
+ return entries.flatMap((entry) => {
716
+ const step = entry !== null && typeof entry === "object" ? entry : null;
717
+ const label = step?.label;
718
+ const text = typeof label === "string" ? label : typeof label === "object" && label !== null ? label.en : undefined;
719
+ const kind = typeof step?.kind === "string" ? step.kind : "";
720
+ return typeof text === "string" && text.trim() !== "" && text.length <= 200 ? [{ text: kind === "" ? text : `${text} (${kind})` }] : [];
721
+ });
722
+ }
723
+ if (key === "guards") {
724
+ return entries.flatMap((entry) => {
725
+ const point = entry !== null && typeof entry === "object" ? entry.point : undefined;
726
+ return typeof point === "string" && point.trim() !== "" ? [point] : [];
727
+ });
728
+ }
536
729
  if (key === "hooks")
537
730
  return entries.map(describeHook).filter((detail) => detail !== null);
538
731
  if (key === "outboundRequests")
@@ -549,16 +742,31 @@ function detailsOf(key, entries, pluginId) {
549
742
  return typeof name === "string" && name.trim() !== "" ? [templateName(pluginId, name)] : [];
550
743
  });
551
744
  }
745
+ // M35 P2 (W2): each is code; there is nothing to show beside its label.
746
+ if (key === "requestGuard" || key === "responseHeaders" || key === "pageGate")
747
+ return [];
748
+ if (key === "richTextExtensions")
749
+ return entries.flatMap(describeRichTextExtensions);
750
+ // M35 P2 (W21): a site route's detail is "<method> <path>", noted when it reads the request exactly as sent.
751
+ if (key === "siteRoutes")
752
+ return entries.map(describeRoute).filter((detail) => detail !== null);
753
+ // M35 P1 (W3): a transform is code; there is nothing to show beside its label.
754
+ if (key === "pageOutput" || key === "pageCache")
755
+ return [];
552
756
  if (key === "pageHead") {
553
757
  // The bare origins: the capability's label and shopper text say what they are, in every
554
758
  // locale, and a detail is shown as written. M33 K27: then, for a head that declares
555
759
  // `setsTitle: true`, a detail that is only the core's note "may set the page title".
760
+ // M35 P1: and for `inlineSnippets: true` the note "writes its own code into every page".
556
761
  return entries.flatMap((entry) => {
557
762
  const head = entry !== null && typeof entry === "object" ? entry : null;
558
763
  const origins = head?.scriptOrigins;
559
764
  const lines = Array.isArray(origins) ? origins.filter((o) => typeof o === "string" && o.trim() !== "") : [];
560
765
  if (head?.setsTitle === true)
561
766
  lines.push({ text: "", notes: ["setsTitle"] });
767
+ // M35 P1 (W40): a head that writes inline code says so beside its origins.
768
+ if (head?.inlineSnippets === true)
769
+ lines.push({ text: "", notes: ["inlineCode"] });
562
770
  return lines;
563
771
  });
564
772
  }
@@ -566,6 +774,23 @@ function detailsOf(key, entries, pluginId) {
566
774
  return entries.map(describeNotificationKind).filter((detail) => detail !== null);
567
775
  if (key === "mediaAccess")
568
776
  return entries.map(describeMediaAccess).filter((detail) => detail !== null);
777
+ if (key === "userAccess")
778
+ return entries.map(describeUserAccess).filter((detail) => detail !== null);
779
+ if (key === "userFields")
780
+ return entries.map(describeUserField).filter((detail) => detail !== null);
781
+ // M35 U2b (W8): the identity notes that it reads the email; a group or a section is its declared id; the data
782
+ // declaration is code, with nothing to show beside its label.
783
+ if (key === "visitorIdentity") {
784
+ return entries.flatMap((entry) => (entry !== null && typeof entry === "object" && entry.email === true ? [{ text: "", notes: ["readsVisitorEmail"] }] : []));
785
+ }
786
+ if (key === "visitorGroups" || key === "visitorAccountSections") {
787
+ return entries.flatMap((entry) => {
788
+ const id = entry !== null && typeof entry === "object" ? entry.id : undefined;
789
+ return typeof id === "string" && id.trim() !== "" && id.length <= 200 ? [id] : [];
790
+ });
791
+ }
792
+ if (key === "visitorData")
793
+ return [];
569
794
  if (key === "dataTypes")
570
795
  return entries.map(describeDataType).filter((detail) => detail !== null);
571
796
  if (key === "dataTypeConfigs") {
@@ -581,6 +806,34 @@ function detailsOf(key, entries, pluginId) {
581
806
  return [{ text: kind === "" ? name : `${name} (${kind})` }];
582
807
  });
583
808
  }
809
+ // M35 B1a: a contract as "<name> <version>" with a note when an answer carries personal data; an
810
+ // offer as "<contract> <version>"; a use as "<contract> <range>", noted when optional; an event its name.
811
+ if (key === "serviceContracts" || key === "exposedServices" || key === "usedServices" || key === "events") {
812
+ return entries.flatMap((entry) => {
813
+ const record = entry !== null && typeof entry === "object" ? entry : null;
814
+ const textOf = (value) => (typeof value === "string" && value.trim() !== "" && value.length <= 200 ? value : null);
815
+ if (record === null)
816
+ return [];
817
+ if (key === "events") {
818
+ const name = textOf(record.name);
819
+ return name === null ? [] : [name];
820
+ }
821
+ if (key === "serviceContracts") {
822
+ const name = textOf(record.name);
823
+ const version = textOf(record.version);
824
+ if (name === null || version === null)
825
+ return [];
826
+ const methods = record.methods !== null && typeof record.methods === "object" ? Object.values(record.methods) : [];
827
+ return [carriesPersonal(methods) ? { text: `${name} ${version}`, notes: ["carriesPersonalData"] } : { text: `${name} ${version}` }];
828
+ }
829
+ const contract = textOf(record.contract);
830
+ const tail = textOf(key === "exposedServices" ? record.version : record.range);
831
+ if (contract === null || tail === null)
832
+ return [];
833
+ const line = `${contract} ${tail}`;
834
+ return key === "usedServices" && record.optional === true ? [{ text: line, notes: ["optionalUse"] }] : [line];
835
+ });
836
+ }
584
837
  // A bare string is no content access entry (they are objects), so it counts but names nothing.
585
838
  return entries.map((entry) => (key === "contentAccess" && typeof entry === "string" ? null : describeEntry(entry, key))).filter((detail) => detail !== null);
586
839
  }
@@ -619,6 +872,10 @@ function declaredEntries(key, value) {
619
872
  if (key === "hooks") {
620
873
  return Object.entries(value).map(([event, hook]) => hook !== null && typeof hook === "object" && hook.durable === true ? { event, durable: true } : event);
621
874
  }
875
+ // M35 U2b (W8): `visitorIdentity: {}` is the declaration itself (the visitor without the email), so an
876
+ // empty object is one entry here, the one key where it is.
877
+ if (key === "visitorIdentity")
878
+ return [value];
622
879
  // A present-but-empty object buys nothing, which is the rule the array
623
880
  // branch gets for free: `themeTokens: {}` declares no tokens, so it is
624
881
  // not a theme capability.
@@ -1,4 +1,4 @@
1
- export declare const VIEW_BEARING_CONTRIBUTIONS: readonly ["dataTypes", "adminSections", "railEntries", "dashboardWidgets", "editorPanels", "treeActions"];
1
+ export declare const VIEW_BEARING_CONTRIBUTIONS: readonly ["dataTypes", "adminSections", "railEntries", "dashboardWidgets", "editorPanels", "treeActions", "contentColumns", "treeBadges", "listFilters", "bulkActions", "adminSlots"];
2
2
  /** An empty array declares nothing and so buys no bundle. Named for what it
3
3
  * answers, not `hasClientBundle`: that name once took a `type` string. */
4
4
  export declare function declaresClientBundle(contributions: unknown): boolean;
@@ -11,13 +11,36 @@ export const VIEW_BEARING_CONTRIBUTIONS = [
11
11
  "dashboardWidgets",
12
12
  "editorPanels",
13
13
  "treeActions",
14
+ // M35 C2: the admin registers columns, badges and filters too, for their labels and options.
15
+ "contentColumns",
16
+ "treeBadges",
17
+ "listFilters",
18
+ "bulkActions",
19
+ "adminSlots",
14
20
  ];
21
+ /** M35 C4a (design D1, C4a-D7): a rich text declaration needs a bundle only when some node, mark or button carries a
22
+ * view: `view` (or `does.view`) on a live manifest, `hasView: true` in manifest.json's summary, which drops functions. */
23
+ function richTextDeclaresView(value) {
24
+ if (value === null || typeof value !== "object" || Array.isArray(value))
25
+ return false;
26
+ const record = value;
27
+ const carries = (entry) => {
28
+ if (entry === null || typeof entry !== "object")
29
+ return false;
30
+ const item = entry;
31
+ const does = item.does !== null && typeof item.does === "object" ? item.does : null;
32
+ return item.view !== undefined || item.hasView === true || (does !== null && (does.view !== undefined || does.hasView === true));
33
+ };
34
+ return ["nodes", "marks", "buttons"].some((key) => Array.isArray(record[key]) && record[key].some(carries));
35
+ }
15
36
  /** An empty array declares nothing and so buys no bundle. Named for what it
16
37
  * answers, not `hasClientBundle`: that name once took a `type` string. */
17
38
  export function declaresClientBundle(contributions) {
18
39
  if (contributions === null || typeof contributions !== "object")
19
40
  return false;
20
41
  const declared = contributions;
42
+ if (richTextDeclaresView(declared.richTextExtensions))
43
+ return true;
21
44
  return VIEW_BEARING_CONTRIBUTIONS.some((key) => {
22
45
  const value = declared[key];
23
46
  if (value === null || value === undefined)
@@ -0,0 +1,17 @@
1
+ import { type ContractDocument, type ServiceContract } from "@kardalum/api-schemas";
2
+ export declare function contractFingerprint(contract: ServiceContract): string;
3
+ /** Whether a document's methods still hash to the fingerprint it carries (a copy edited by hand does not). */
4
+ export declare function documentFingerprintHolds(document: ContractDocument): boolean;
5
+ export declare function contractDocumentFor(input: {
6
+ owner: {
7
+ id: string;
8
+ name: string;
9
+ paid: boolean;
10
+ };
11
+ pluginVersion: string;
12
+ declaration: unknown;
13
+ history: ReadonlyArray<{
14
+ version: string;
15
+ methods: readonly string[];
16
+ }>;
17
+ }): ContractDocument | null;