@kardalum/plugin-sdk 0.18.0 → 0.20.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 (435) hide show
  1. package/CHANGELOG.md +253 -0
  2. package/README.md +20 -1
  3. package/dist/admin-section-registry.d.ts +16 -1
  4. package/dist/admin-section-registry.js +23 -0
  5. package/dist/assets/asset-picker.js +3 -3
  6. package/dist/built-in-editor-ids.d.ts +1 -1
  7. package/dist/built-in-editor-ids.js +2 -20
  8. package/dist/built-in-serializers.js +1 -1
  9. package/dist/built-in-settings-schemas.d.ts +10 -0
  10. package/dist/built-in-settings-schemas.js +90 -4
  11. package/dist/built-in-value-schemas.js +35 -0
  12. package/dist/built-ins.js +48 -17
  13. package/dist/capabilities.d.ts +11 -1
  14. package/dist/capabilities.js +55 -3
  15. package/dist/cli.d.ts +66 -0
  16. package/dist/cli.js +22 -0
  17. package/dist/content-library.d.ts +85 -0
  18. package/dist/content-library.js +15 -0
  19. package/dist/content-picker/page-picker-sheet.d.ts +13 -0
  20. package/dist/content-picker/page-picker-sheet.js +105 -0
  21. package/dist/content-picker/page-tree.d.ts +25 -0
  22. package/dist/content-picker/page-tree.js +132 -0
  23. package/dist/data-type-plugin.d.ts +9 -3
  24. package/dist/datatype-validation.d.ts +6 -11
  25. package/dist/datatype-validation.js +141 -3
  26. package/dist/define-plugin.d.ts +4 -4
  27. package/dist/define-plugin.js +5 -5
  28. package/dist/entitlement-entry.d.ts +1 -1
  29. package/dist/entitlement-entry.js +1 -1
  30. package/dist/entitlement-gate.d.ts +14 -0
  31. package/dist/entitlement-gate.js +64 -7
  32. package/dist/entitlement-plan.d.ts +6 -0
  33. package/dist/entitlement-plan.js +10 -0
  34. package/dist/entitlement-types.d.ts +36 -12
  35. package/dist/entitlement.d.ts +31 -4
  36. package/dist/entitlement.js +58 -17
  37. package/dist/hook-entry.d.ts +5 -0
  38. package/dist/hook-entry.js +30 -0
  39. package/dist/host-entry.d.ts +1 -1
  40. package/dist/host-entry.js +1 -1
  41. package/dist/index.d.ts +38 -4
  42. package/dist/index.js +54 -3
  43. package/dist/mail.d.ts +30 -0
  44. package/dist/mail.js +1 -0
  45. package/dist/manifest-entry.d.ts +29 -4
  46. package/dist/manifest-entry.js +39 -2
  47. package/dist/manifest-schema.d.ts +443 -29
  48. package/dist/manifest-schema.js +292 -24
  49. package/dist/manifest.d.ts +450 -51
  50. package/dist/manifest.js +1 -1
  51. package/dist/media/media-picker.js +33 -20
  52. package/dist/media/upload-error.d.ts +5 -1
  53. package/dist/media/upload-error.js +14 -2
  54. package/dist/media-library.d.ts +32 -0
  55. package/dist/media-library.js +15 -0
  56. package/dist/nested-field-host.d.ts +76 -0
  57. package/dist/nested-field-host.js +90 -0
  58. package/dist/notify.d.ts +12 -4
  59. package/dist/notify.js +1 -1
  60. package/dist/outbound.d.ts +47 -0
  61. package/dist/outbound.js +1 -0
  62. package/dist/plugin-context.d.ts +5 -0
  63. package/dist/plugin-context.js +3 -3
  64. package/dist/plugin-screen-context.d.ts +112 -0
  65. package/dist/plugin-screen-context.js +26 -0
  66. package/dist/providers.d.ts +268 -0
  67. package/dist/providers.js +74 -0
  68. package/dist/read-all-pages.d.ts +5 -0
  69. package/dist/read-all-pages.js +3 -2
  70. package/dist/register-built-ins.js +6 -6
  71. package/dist/registry.js +1 -1
  72. package/dist/richtext/block-panel.js +12 -7
  73. package/dist/richtext/extensions.js +7 -7
  74. package/dist/richtext/insert-menu.js +12 -9
  75. package/dist/richtext/style-listbox.js +7 -5
  76. package/dist/richtext/text-style-class.js +1 -1
  77. package/dist/sdk-strings.d.ts +285 -0
  78. package/dist/sdk-strings.js +347 -0
  79. package/dist/sealing.d.ts +14 -0
  80. package/dist/sealing.js +1 -0
  81. package/dist/simple-storage-value-provider.js +27 -27
  82. package/dist/structured-storage-types.d.ts +309 -9
  83. package/dist/structured-storage-types.js +2 -2
  84. package/dist/text-entry.d.ts +1 -0
  85. package/dist/text-entry.js +6 -0
  86. package/dist/tokens/tailwind-theme.css +5 -0
  87. package/dist/tokens/tokens.css +15 -3
  88. package/dist/tokens/tokens.json +8 -3
  89. package/dist/ui-entry.js +3 -3
  90. package/dist/views/asset-view.js +6 -3
  91. package/dist/views/content-list-preview.js +3 -1
  92. package/dist/views/content-list-settings-view.js +11 -7
  93. package/dist/views/content-list-view.d.ts +5 -3
  94. package/dist/views/content-list-view.js +38 -34
  95. package/dist/views/content-picker-view.d.ts +3 -0
  96. package/dist/views/content-picker-view.js +143 -0
  97. package/dist/views/crop-view.d.ts +4 -6
  98. package/dist/views/crop-view.js +22 -13
  99. package/dist/views/date-range-view.js +9 -6
  100. package/dist/views/file-upload-view.d.ts +5 -7
  101. package/dist/views/file-upload-view.js +16 -7
  102. package/dist/views/group-view.d.ts +8 -0
  103. package/dist/views/group-view.js +123 -0
  104. package/dist/views/html-code-editor.js +2 -2
  105. package/dist/views/html-view.js +12 -11
  106. package/dist/views/image-view.js +40 -22
  107. package/dist/views/link-view.d.ts +3 -0
  108. package/dist/views/link-view.js +150 -0
  109. package/dist/views/options-list-view.d.ts +3 -0
  110. package/dist/views/options-list-view.js +104 -0
  111. package/dist/views/repeatable-list-view.d.ts +3 -0
  112. package/dist/views/repeatable-list-view.js +113 -0
  113. package/dist/views/rich-text-view.js +32 -16
  114. package/dist/views/suggest-key.d.ts +17 -0
  115. package/dist/views/suggest-key.js +55 -0
  116. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +215 -0
  117. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +179 -0
  118. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.d.ts +12 -0
  119. package/node_modules/@kardalum/api-schemas/dist/ai-context.schema.js +10 -0
  120. package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +1 -1
  121. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +10 -0
  122. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +5 -0
  123. package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +1 -1
  124. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +7 -1
  125. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +4 -2
  126. package/node_modules/@kardalum/api-schemas/dist/auth.schema.js +1 -1
  127. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +1 -0
  128. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +27 -0
  129. package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +65 -0
  130. package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +126 -0
  131. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +116 -3
  132. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +71 -18
  133. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +57 -2
  134. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +137 -0
  135. package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +1 -1
  136. package/node_modules/@kardalum/api-schemas/dist/content-path.js +1 -1
  137. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.d.ts +50 -0
  138. package/node_modules/@kardalum/api-schemas/dist/content-search.schema.js +42 -0
  139. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.d.ts +37 -0
  140. package/node_modules/@kardalum/api-schemas/dist/content-summary.schema.js +19 -0
  141. package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +3 -3
  142. package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +1 -1
  143. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.d.ts +23 -0
  144. package/node_modules/@kardalum/api-schemas/dist/content-unpublish.schema.js +13 -0
  145. package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +3 -0
  146. package/node_modules/@kardalum/api-schemas/dist/content.schema.js +10 -0
  147. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.d.ts +41 -0
  148. package/node_modules/@kardalum/api-schemas/dist/contract-cancel.schema.js +86 -0
  149. package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +10 -5
  150. package/node_modules/@kardalum/api-schemas/dist/core-actions.js +7 -4
  151. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +25 -0
  152. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +9 -1
  153. package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +4 -4
  154. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.d.ts +35 -0
  155. package/node_modules/@kardalum/api-schemas/dist/data-type-issue.js +60 -0
  156. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +267 -12
  157. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +54 -8
  158. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +24 -6
  159. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +98 -13
  160. package/node_modules/@kardalum/api-schemas/dist/form-protection.d.ts +23 -0
  161. package/node_modules/@kardalum/api-schemas/dist/form-protection.js +12 -0
  162. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.d.ts +12 -0
  163. package/node_modules/@kardalum/api-schemas/dist/graphql-limits.js +14 -0
  164. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.d.ts +23 -0
  165. package/node_modules/@kardalum/api-schemas/dist/held-embed-words.js +70 -0
  166. package/node_modules/@kardalum/api-schemas/dist/index.d.ts +122 -43
  167. package/node_modules/@kardalum/api-schemas/dist/index.js +92 -27
  168. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.d.ts +9 -0
  169. package/node_modules/@kardalum/api-schemas/dist/install-sign-in-switched-off.schema.js +9 -0
  170. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.d.ts +8 -0
  171. package/node_modules/@kardalum/api-schemas/dist/legal-anchors.js +9 -0
  172. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +63 -0
  173. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +54 -0
  174. package/node_modules/@kardalum/api-schemas/dist/listing-categories.schema.d.ts +46 -0
  175. package/node_modules/@kardalum/api-schemas/dist/listing-categories.schema.js +52 -0
  176. package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +224 -0
  177. package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +404 -0
  178. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.d.ts +8 -0
  179. package/node_modules/@kardalum/api-schemas/dist/management-multipart.schema.js +4 -0
  180. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.d.ts +145 -0
  181. package/node_modules/@kardalum/api-schemas/dist/marketplace-leaks.schema.js +154 -0
  182. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +359 -8
  183. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +85 -11
  184. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.d.ts +15 -0
  185. package/node_modules/@kardalum/api-schemas/dist/marketplace-package-api.schema.js +14 -0
  186. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.d.ts +131 -0
  187. package/node_modules/@kardalum/api-schemas/dist/marketplace-payouts.schema.js +272 -0
  188. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.d.ts +84 -0
  189. package/node_modules/@kardalum/api-schemas/dist/marketplace-profile.schema.js +138 -0
  190. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.d.ts +20 -0
  191. package/node_modules/@kardalum/api-schemas/dist/marketplace-revocation.schema.js +49 -0
  192. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.d.ts +211 -0
  193. package/node_modules/@kardalum/api-schemas/dist/marketplace-sites.schema.js +424 -0
  194. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +78 -0
  195. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.js +27 -0
  196. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.d.ts +70 -0
  197. package/node_modules/@kardalum/api-schemas/dist/mcp-tool-inputs.schema.js +43 -0
  198. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +22 -0
  199. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +22 -10
  200. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.d.ts +75 -0
  201. package/node_modules/@kardalum/api-schemas/dist/media-move.schema.js +53 -0
  202. package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +2 -2
  203. package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +2 -0
  204. package/node_modules/@kardalum/api-schemas/dist/media-reference.js +55 -0
  205. package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +1 -0
  206. package/node_modules/@kardalum/api-schemas/dist/media.schema.js +9 -5
  207. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.d.ts +204 -0
  208. package/node_modules/@kardalum/api-schemas/dist/nested-fields.schema.js +370 -0
  209. package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +53 -0
  210. package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +284 -0
  211. package/node_modules/@kardalum/api-schemas/dist/news.schema.d.ts +5 -5
  212. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +1 -2
  213. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +1 -2
  214. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.d.ts +145 -0
  215. package/node_modules/@kardalum/api-schemas/dist/notification-kinds.js +177 -0
  216. package/node_modules/@kardalum/api-schemas/dist/notification.schema.d.ts +258 -7
  217. package/node_modules/@kardalum/api-schemas/dist/notification.schema.js +96 -5
  218. package/node_modules/@kardalum/api-schemas/dist/page-address.d.ts +10 -0
  219. package/node_modules/@kardalum/api-schemas/dist/page-address.js +7 -0
  220. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.d.ts +34 -0
  221. package/node_modules/@kardalum/api-schemas/dist/password-reset.schema.js +60 -0
  222. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.d.ts +28 -3
  223. package/node_modules/@kardalum/api-schemas/dist/plan-editor.schema.js +55 -8
  224. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +12 -0
  225. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +13 -0
  226. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.d.ts +23 -0
  227. package/node_modules/@kardalum/api-schemas/dist/plugin-caller.js +16 -0
  228. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.d.ts +76 -0
  229. package/node_modules/@kardalum/api-schemas/dist/plugin-cli-commands.js +316 -0
  230. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +42 -0
  231. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +74 -0
  232. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.d.ts +31 -0
  233. package/node_modules/@kardalum/api-schemas/dist/plugin-data-type-configs.js +131 -0
  234. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +26 -2
  235. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.js +1 -0
  236. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +26 -2
  237. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +13 -5
  238. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.d.ts +228 -0
  239. package/node_modules/@kardalum/api-schemas/dist/plugin-document-types.js +41 -0
  240. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +26 -0
  241. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +55 -0
  242. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +40 -0
  243. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +124 -0
  244. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.d.ts +41 -0
  245. package/node_modules/@kardalum/api-schemas/dist/plugin-field-info.js +51 -0
  246. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.d.ts +32 -0
  247. package/node_modules/@kardalum/api-schemas/dist/plugin-graphql-fields.js +102 -0
  248. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +107 -0
  249. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +213 -0
  250. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.d.ts +5 -0
  251. package/node_modules/@kardalum/api-schemas/dist/plugin-https-origin.js +21 -0
  252. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +4 -0
  253. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +3 -0
  254. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +44 -0
  255. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +38 -1
  256. package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +237 -2
  257. package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +205 -6
  258. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.d.ts +26 -0
  259. package/node_modules/@kardalum/api-schemas/dist/plugin-labels.js +29 -1
  260. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.d.ts +32 -8
  261. package/node_modules/@kardalum/api-schemas/dist/plugin-locales.js +120 -14
  262. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +357 -4
  263. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +279 -0
  264. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +16 -1
  265. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +34 -1
  266. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.d.ts +40 -0
  267. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-ai.js +139 -0
  268. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +22 -1
  269. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +31 -1
  270. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.d.ts +25 -0
  271. package/node_modules/@kardalum/api-schemas/dist/plugin-media-access.js +43 -0
  272. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +107 -0
  273. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.js +150 -0
  274. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.d.ts +5 -0
  275. package/node_modules/@kardalum/api-schemas/dist/plugin-package-build.schema.js +7 -0
  276. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +310 -0
  277. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +430 -0
  278. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.d.ts +4 -0
  279. package/node_modules/@kardalum/api-schemas/dist/plugin-read-only.schema.js +2 -0
  280. package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +1 -1
  281. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.d.ts +45 -0
  282. package/node_modules/@kardalum/api-schemas/dist/plugin-sealed-values.js +99 -0
  283. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.d.ts +68 -0
  284. package/node_modules/@kardalum/api-schemas/dist/plugin-secrets.js +114 -0
  285. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +342 -0
  286. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +400 -0
  287. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +180 -0
  288. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +612 -0
  289. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +7 -0
  290. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +50 -7
  291. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.d.ts +45 -0
  292. package/node_modules/@kardalum/api-schemas/dist/plugin-tasks.js +197 -0
  293. package/node_modules/@kardalum/api-schemas/dist/plural-rules.d.ts +9 -0
  294. package/node_modules/@kardalum/api-schemas/dist/plural-rules.js +41 -0
  295. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +41 -0
  296. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +100 -12
  297. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.d.ts +189 -0
  298. package/node_modules/@kardalum/api-schemas/dist/refund-request.schema.js +164 -0
  299. package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +4 -4
  300. package/node_modules/@kardalum/api-schemas/dist/render-editing.js +4 -4
  301. package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.js +1 -1
  302. package/node_modules/@kardalum/api-schemas/dist/revenue-view.schema.js +7 -3
  303. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +6 -0
  304. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +82 -0
  305. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.d.ts +66 -0
  306. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +497 -0
  307. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.d.ts +82 -0
  308. package/node_modules/@kardalum/api-schemas/dist/sale-conditions.schema.js +99 -0
  309. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.d.ts +13 -0
  310. package/node_modules/@kardalum/api-schemas/dist/sample-content.schema.js +28 -0
  311. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +91 -1
  312. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +289 -0
  313. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +205 -0
  314. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +121 -0
  315. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +51 -10
  316. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +384 -0
  317. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +616 -0
  318. package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +3 -3
  319. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +1 -1
  320. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.js +1 -1
  321. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.d.ts +13 -0
  322. package/node_modules/@kardalum/api-schemas/dist/structured-duplicate-key.js +26 -0
  323. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +66 -0
  324. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +160 -0
  325. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +1 -1
  326. package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +1 -0
  327. package/node_modules/@kardalum/api-schemas/dist/template.schema.js +3 -0
  328. package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.d.ts +1 -1
  329. package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.js +1 -1
  330. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.d.ts +13 -0
  331. package/node_modules/@kardalum/api-schemas/dist/transaction-rolled-back.js +29 -0
  332. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.d.ts +13 -0
  333. package/node_modules/@kardalum/api-schemas/dist/trash-purge.schema.js +6 -0
  334. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +58 -1
  335. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +35 -4
  336. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.d.ts +5 -1
  337. package/node_modules/@kardalum/api-schemas/dist/vendor-service.schema.js +4 -3
  338. package/node_modules/@kardalum/api-schemas/package.json +1 -0
  339. package/node_modules/@kardalum/design-tokens/dist/build-css.d.ts +1 -1
  340. package/node_modules/@kardalum/design-tokens/dist/build-css.js +8 -2
  341. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +5 -0
  342. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -1
  343. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +3 -3
  344. package/node_modules/@kardalum/design-tokens/dist/theme-css.d.ts +2 -2
  345. package/node_modules/@kardalum/design-tokens/dist/theme-css.js +2 -2
  346. package/node_modules/@kardalum/design-tokens/dist/theme-types.d.ts +2 -2
  347. package/node_modules/@kardalum/design-tokens/dist/themes/dark.d.ts +3 -3
  348. package/node_modules/@kardalum/design-tokens/dist/themes/dark.js +3 -3
  349. package/node_modules/@kardalum/design-tokens/dist/themes/light.d.ts +1 -1
  350. package/node_modules/@kardalum/design-tokens/dist/themes/light.js +1 -1
  351. package/node_modules/@kardalum/design-tokens/dist/tokens.css +15 -3
  352. package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +4 -4
  353. package/node_modules/@kardalum/design-tokens/dist/tokens.js +17 -8
  354. package/node_modules/@kardalum/design-tokens/dist/tokens.json +8 -3
  355. package/node_modules/@kardalum/design-tokens/dist/types.d.ts +2 -2
  356. package/node_modules/@kardalum/design-tokens/dist/types.js +1 -1
  357. package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +21 -2
  358. package/node_modules/@kardalum/plugin-package/dist/build-reference.js +8 -2
  359. package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +17 -10
  360. package/node_modules/@kardalum/plugin-package/dist/capabilities.js +355 -22
  361. package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
  362. package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +2 -0
  363. package/node_modules/@kardalum/plugin-package/dist/cms-range.d.ts +17 -0
  364. package/node_modules/@kardalum/plugin-package/dist/cms-range.js +353 -0
  365. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.d.ts +2 -0
  366. package/node_modules/@kardalum/plugin-package/dist/delivery/ai-declarations.js +26 -0
  367. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.d.ts +1 -1
  368. package/node_modules/@kardalum/plugin-package/dist/delivery/archive-names.js +3 -2
  369. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.d.ts +2 -0
  370. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +34 -0
  371. package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +2 -2
  372. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.d.ts +2 -0
  373. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +27 -0
  374. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.d.ts +2 -0
  375. package/node_modules/@kardalum/plugin-package/dist/delivery/graphql-fields.js +22 -0
  376. package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +1 -0
  377. package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +1 -0
  378. package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +47 -5
  379. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.d.ts +27 -0
  380. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +95 -0
  381. package/node_modules/@kardalum/plugin-package/dist/delivery/locales.js +9 -4
  382. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.d.ts +3 -0
  383. package/node_modules/@kardalum/plugin-package/dist/delivery/plugin-settings.js +68 -0
  384. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +3 -0
  385. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +298 -0
  386. package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +27 -5
  387. package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +91 -2
  388. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.d.ts +6 -0
  389. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +140 -0
  390. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.d.ts +2 -0
  391. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +36 -0
  392. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.d.ts +1 -0
  393. package/node_modules/@kardalum/plugin-package/dist/delivery/templates.js +21 -1
  394. package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +10 -0
  395. package/node_modules/@kardalum/plugin-package/dist/envelope.d.ts +2 -2
  396. package/node_modules/@kardalum/plugin-package/dist/envelope.js +2 -2
  397. package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +3 -3
  398. package/node_modules/@kardalum/plugin-package/dist/extract.js +9 -9
  399. package/node_modules/@kardalum/plugin-package/dist/hash.d.ts +1 -1
  400. package/node_modules/@kardalum/plugin-package/dist/hash.js +1 -1
  401. package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -2
  402. package/node_modules/@kardalum/plugin-package/dist/index.js +2 -1
  403. package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +75 -0
  404. package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +123 -0
  405. package/node_modules/@kardalum/plugin-package/dist/package-contract.d.ts +2 -2
  406. package/node_modules/@kardalum/plugin-package/dist/package-contract.js +5 -5
  407. package/node_modules/@kardalum/plugin-package/dist/types.d.ts +1 -1
  408. package/node_modules/@kardalum/ui/dist/components/alert-dialog.d.ts +1 -1
  409. package/node_modules/@kardalum/ui/dist/components/alert-dialog.js +8 -3
  410. package/node_modules/@kardalum/ui/dist/components/badge.js +1 -1
  411. package/node_modules/@kardalum/ui/dist/components/button.js +1 -1
  412. package/node_modules/@kardalum/ui/dist/components/dialog.d.ts +1 -1
  413. package/node_modules/@kardalum/ui/dist/components/dialog.js +49 -4
  414. package/node_modules/@kardalum/ui/dist/components/dropdown-menu.d.ts +5 -1
  415. package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +18 -5
  416. package/node_modules/@kardalum/ui/dist/components/empty-state.d.ts +4 -4
  417. package/node_modules/@kardalum/ui/dist/components/input.js +6 -1
  418. package/node_modules/@kardalum/ui/dist/components/property-field.js +3 -3
  419. package/node_modules/@kardalum/ui/dist/components/sheet.d.ts +1 -1
  420. package/node_modules/@kardalum/ui/dist/components/sheet.js +12 -7
  421. package/node_modules/@kardalum/ui/dist/components/skeleton.js +1 -1
  422. package/node_modules/@kardalum/ui/dist/components/switch.js +1 -1
  423. package/node_modules/@kardalum/ui/dist/components/tab-strip.d.ts +3 -3
  424. package/node_modules/@kardalum/ui/dist/components/toast.js +4 -3
  425. package/node_modules/@kardalum/ui/dist/components/tooltip.d.ts +27 -0
  426. package/node_modules/@kardalum/ui/dist/components/tooltip.js +81 -0
  427. package/node_modules/@kardalum/ui/dist/components/truncated-text.d.ts +16 -0
  428. package/node_modules/@kardalum/ui/dist/components/truncated-text.js +95 -0
  429. package/node_modules/@kardalum/ui/dist/components/use-toast.js +2 -2
  430. package/node_modules/@kardalum/ui/dist/index.d.ts +3 -1
  431. package/node_modules/@kardalum/ui/dist/index.js +3 -1
  432. package/node_modules/@kardalum/ui/dist/lib/menu-host.d.ts +5 -0
  433. package/node_modules/@kardalum/ui/dist/lib/menu-host.js +17 -0
  434. package/node_modules/@kardalum/ui/package.json +8 -6
  435. package/package.json +18 -7
@@ -19,9 +19,12 @@ export interface StructuredQueryBuilder<T = Record<string, unknown>> extends Pro
19
19
  where(conditions: Record<string, unknown>): this;
20
20
  orderBy(column: string, direction?: "asc" | "desc"): this;
21
21
  limit(n: number): this;
22
+ /** M33 K3: pages by the primary key, `direction` "asc" (the default) or "desc"; the next
23
+ * cursor is the last row's key either way. */
22
24
  paginate(options: {
23
25
  cursor?: string;
24
26
  limit: number;
27
+ direction?: "asc" | "desc";
25
28
  }): this;
26
29
  }
27
30
  export interface StructuredStorageTransaction {
@@ -38,35 +41,332 @@ export interface ScopedStructuredStorage {
38
41
  query<T = Record<string, unknown>>(tableName: string): StructuredQueryBuilder<T>;
39
42
  transaction(fn: (tx: StructuredStorageTransaction) => Promise<void>): Promise<void>;
40
43
  }
44
+ import type { PageAddress, PageAddressState, PluginCaller, PluginFieldInfo, ProtectionWidgetInfo } from "@kardalum/api-schemas";
41
45
  import type { Entitlement } from "./entitlement-types.js";
46
+ import type { PluginContentLibrary, ProtectionFields, ProtectionResult } from "./content-library.js";
47
+ import type { PluginMediaLibrary } from "./media-library.js";
42
48
  import type { PluginNotify } from "./notify.js";
49
+ import type { PluginMail } from "./mail.js";
50
+ import type { PluginOutbound } from "./outbound.js";
51
+ import type { PluginSealing } from "./sealing.js";
43
52
  import type { PluginVendorService } from "./vendor-service.js";
53
+ import type { PluginSecrets, PluginSettingsReader } from "./providers.js";
54
+ /** A published page as any visitor reads it, in one language (`getPublishedContent`). */
44
55
  export interface PublishedContent {
45
56
  id: string;
46
57
  documentTypeId: string;
58
+ /** The field values in `culture`, published values only, private fields left out (M32 J7). */
47
59
  data: Record<string, unknown>;
60
+ /** M33 K22: the language this answer is in. */
61
+ culture: string;
62
+ /** M33 K22: each published language with its own address, in the site's language order; the
63
+ * same list as the page's `cultures` on `listPublishedPages`. On a route or site route, when no
64
+ * public URL is set, a domain stored without a scheme is printed with the request's scheme; in a
65
+ * hook or a scheduled task, which have no request, with https. */
66
+ addresses: PageAddress[];
67
+ /** M33 K21: the document type's fields in order, with what a Group or a list holds (`group`,
68
+ * `list`), private fields and a field whose data type row is gone left out, so every entry is one
69
+ * `data` may hold. `dataType` is the editor id (the id a plugin declares under `dataTypes`),
70
+ * never a data type row id. */
71
+ fields: PluginFieldInfo[];
48
72
  }
49
- export interface PluginApiRouteContext {
73
+ /** M33 K22: what `getPublishedContent` takes. */
74
+ export interface GetPublishedContentOptions {
75
+ /** One of the site's languages (compared in lower case). Absent: the default language, or the
76
+ * first published one when the default is not published. A language the page is not published
77
+ * in answers null, never another language. */
78
+ culture?: string;
79
+ }
80
+ /** M32 F4c (D2): one page `listPublishedPages` answers: published, live, and with an address. */
81
+ export interface PublishedPageItem {
82
+ id: string;
83
+ path: string;
84
+ /**
85
+ * The default language's address: a full URL when the site has a domain, else a site path.
86
+ * When the default language is not published, it is the first published language's address.
87
+ */
88
+ url: string;
89
+ /** The document type's name. */
90
+ documentType: string;
91
+ /** When the page was published, ISO. */
92
+ updatedAt: string;
93
+ /** Each published language with its own address, in the site's language order. */
94
+ cultures: PageAddress[];
95
+ /** M33 K24: whether the server answers this page with a page: true when the render would choose
96
+ * a template for it (its document type's, else the site's catch-all), false when it would find
97
+ * none (nothing is served at its address), null on a server that renders no site. */
98
+ rendered: boolean | null;
99
+ }
100
+ /** M32 F4c (D2): one page of `listPublishedPages`. */
101
+ export interface PublishedPagesPage {
102
+ items: PublishedPageItem[];
103
+ /** Hand it back as `after` for the next page; null when the walk is done. */
104
+ nextCursor: string | null;
105
+ /** True when the cursor's page was gone, trashed or outside the walk, so the walk started again. */
106
+ restarted: boolean;
107
+ }
108
+ /** M32 F4c (D2): what `listPublishedPages` takes. */
109
+ export interface ListPublishedPagesOptions {
110
+ /** A top-level page's id: only that site's pages, the top-level page included. Absent: every site. */
111
+ site?: string;
112
+ /** M33 K24: a request's host (`request.host`): only the pages whose printed address is on it, by
113
+ * the core's address rule, as `siteOfHost` reads the host. A site's domain (its first or another)
114
+ * lists that site; the default address lists the default site and every site without a domain;
115
+ * a host the install does not name lists nothing while the default address has a name. Not with
116
+ * `site`; a host `siteOfHost` answers null for throws TypeError. */
117
+ host?: string;
118
+ /** The `nextCursor` of the previous page. */
119
+ after?: string;
120
+ /** 1 to 500 (PUBLISHED_PAGES_LIMIT_MAX), default 100. */
121
+ limit?: number;
122
+ }
123
+ /** M33 K23: what `siteOfHost` takes. */
124
+ export interface SiteOfHostOptions {
125
+ /** The scheme the host was reached on (a request's `protocol`): `"http"` or `"https"`. Used for
126
+ * `origin` only when neither the domain nor the public URL names one. Anything else throws
127
+ * TypeError. */
128
+ scheme?: "http" | "https";
129
+ }
130
+ /** M33 K23: which site a host belongs to, by the core's own address rule (the one the server uses
131
+ * to answer a request on that host). */
132
+ export interface SiteOfHost {
133
+ /** The top-level page id of the site whose domain claims the host; null on the default address
134
+ * (the default site and every site without a domain of its own). It names the claiming site
135
+ * whatever its state, as the server's own address rule does: an unpublished or binned site still
136
+ * claims its domain, and listPublishedPages lists nothing for it. */
137
+ site: string | null;
138
+ /** The scheme and main domain this host's pages are printed with, as an origin
139
+ * (`https://example.com`, a port when one is stored). The stored domain's own scheme, else the
140
+ * public URL's, else the `scheme` asked with, else https. */
141
+ origin: string;
142
+ /** False on a site's other domains (and on a host the install does not name while the default
143
+ * address has a name): a visitor there is sent on to `origin`. */
144
+ isMainHost: boolean;
145
+ /** True when `origin` comes from a stored domain or the public URL; false on the default address
146
+ * when it has no stored name, so `origin` was made from the host asked (whatever a visitor's
147
+ * `Host` header said). Print no address from an answer whose `named` is false. */
148
+ named: boolean;
149
+ }
150
+ /**
151
+ * M33 K31: one target of `pageAddresses`. `{ page }` is a page's id: its current tree position.
152
+ * `{ path }` is a tree path (a stored `path`, starting with "/", no empty segment, at most
153
+ * `SITE_LOCATION_MAX` (2,000) characters), also one no page holds any more. `site` names the
154
+ * top-level page whose site record (domains, default flag) applies when the path's first segment no
155
+ * longer names one: the `previousPath` of a top-level page that was renamed or moved (a move hook
156
+ * passes the event's `contentId` when `previousPath` has one segment). The site's path is then the
157
+ * first segment of `path`.
158
+ */
159
+ export type PageAddressTarget = {
160
+ page: string;
161
+ } | {
162
+ path: string;
163
+ site?: string;
164
+ };
165
+ /** M33 K31: what `pageAddresses` answers for one target. */
166
+ export interface PageAddresses {
167
+ /** The tree path asked, or the page's current one for a `{ page }` target. */
168
+ path: string;
169
+ /** Every language of the site, in its order, each with its `url` (made as listPublishedPages
170
+ * makes its `cultures`: a full URL when the site has a domain, with listPublishedPages' scheme
171
+ * rule, else the path with the language prefix) and `published`: true when a page is stored at that path (for `{ page }`, that page),
172
+ * is not in the trash, is published in that language, and its site is served to visitors. */
173
+ addresses: PageAddressState[];
174
+ }
175
+ /** M33 K32: what `pageAtAddress` answers: the page, the language and whether a visitor is sent on. */
176
+ export interface PageAtAddressAnswer {
177
+ /** The page's id. */
178
+ page: string;
179
+ /** The language the address is in: its prefix (the site's own code), else the default one. */
180
+ culture: string;
181
+ /** True when the core would first send a visitor on to the page's one address (a site's second
182
+ * domain, a default-site page's long form, a language root written with a trailing "/"). */
183
+ redirected: boolean;
184
+ }
185
+ /**
186
+ * M33 K32: the page at a visitor's address, on the hook, scheduled task, route and site route
187
+ * contexts, never a site fallback's (a fallback runs where no page answers, and one lookup costs up
188
+ * to four address resolutions).
189
+ */
190
+ export interface PluginAddressLookup {
191
+ /** The published page a visitor gets at `address`, read as the delivery API's lookup by address
192
+ * reads one: a site path is read on the default address; an absolute `http` or `https` URL's
193
+ * host selects the site (a host no site claims reads as the default address, so ask `siteOfHost`
194
+ * first to know whether a URL is this installation's own); the language prefix is read as the
195
+ * renderer reads it; the query and fragment are ignored. Null for no page, a draft, a reserved
196
+ * first segment ("/api", "/media") or an address that cannot be read (an empty segment, another
197
+ * scheme, a host that is no domain). A non-string or one over `SITE_LOCATION_MAX` (2,000)
198
+ * characters throws TypeError. Open to every plugin: it is the answer the delivery API gives
199
+ * anyone. */
200
+ pageAtAddress(address: string): Promise<PageAtAddressAnswer | null>;
201
+ }
202
+ /**
203
+ * M32 F2 (D27): what a handler receives instead of the Fastify request and reply. Plugin code runs in
204
+ * process with the server's privileges; the views remove the accidental path to server objects, and
205
+ * the door's review is the boundary.
206
+ */
207
+ export interface PluginRequestView {
208
+ readonly method: string;
209
+ readonly url: string;
210
+ readonly params: unknown;
211
+ readonly query: unknown;
212
+ readonly body: unknown;
213
+ /** M33 K4: the request's exact bytes, a fresh copy for this handler (changing it changes
214
+ * neither `body` nor what the host read). Present only on a route that declares
215
+ * `rawBody: true`, when the request carried a body the host parses (JSON or plain text). */
216
+ readonly rawBody?: Uint8Array;
217
+ readonly headers: Record<string, string | string[] | undefined>;
218
+ readonly ip: string;
219
+ readonly ips: readonly string[];
220
+ readonly host: string;
221
+ readonly hostname: string;
222
+ readonly protocol: "http" | "https";
223
+ readonly id: string;
224
+ readonly log: {
225
+ info(...a: unknown[]): void;
226
+ warn(...a: unknown[]): void;
227
+ error(...a: unknown[]): void;
228
+ debug(...a: unknown[]): void;
229
+ };
230
+ }
231
+ /** M32 F2 (D27): the reply a site route's handler writes to; see PluginRequestView. */
232
+ export interface PluginReplyView {
233
+ code(status: number): PluginReplyView;
234
+ status(status: number): PluginReplyView;
235
+ header(name: string, value: string | number | readonly string[]): PluginReplyView;
236
+ headers(values: Record<string, string | number | readonly string[]>): PluginReplyView;
237
+ getHeader(name: string): string | number | string[] | undefined;
238
+ type(contentType: string): PluginReplyView;
239
+ send(body?: unknown): PluginReplyView;
240
+ readonly statusCode: number;
241
+ readonly sent: boolean;
242
+ }
243
+ /**
244
+ * M33 K1: what every server context a plugin receives has: a hook's, a site fallback's, a
245
+ * scheduled task's and a route's (PluginHookContext, SiteFallbackContext, PluginTaskContext and
246
+ * PluginApiRouteContext are each built from it). A member only some of them get is declared on
247
+ * those types, never here.
248
+ */
249
+ /**
250
+ * M33 K30: `context.simpleStorage`, the plugin's own value per page and field, the store a view's
251
+ * `SimpleStorageValueProvider` reads and writes (the same key), bound to the calling plugin: it
252
+ * never reaches another plugin's values. `contentId` is a page's UUID (a missing or binned page
253
+ * throws TypeError); `fieldId` is a letter, then letters, digits and "_", at most 64 characters
254
+ * (`CONTENT_LIST_FIELD_ID_MAX`), else TypeError; `value` is JSON-serialisable and at most 65,536
255
+ * bytes serialised (`SIMPLE_STORAGE_VALUE_MAX_BYTES`), else TypeError. A plugin that is switched off
256
+ * gets PluginNotActiveError, a read-only plugin's `set` PluginReadOnlyError. On an admin or API key
257
+ * route the caller's access to the page is applied as the HTTP door applies it (`get` needs the page
258
+ * readable, `set` editable), else PluginPageAccessError; a hook, task or site fallback acts for no
259
+ * person and has no such check. Test the errors with their `is...` functions, never `instanceof`.
260
+ */
261
+ export interface PluginSimpleStorage {
262
+ /** The stored value, or null when it was never set. */
263
+ get(contentId: string, fieldId: string): Promise<unknown>;
264
+ /** Stores `value`, replacing the one before. */
265
+ set(contentId: string, fieldId: string, value: unknown): Promise<void>;
266
+ }
267
+ export interface PluginServerContextBase {
268
+ /** The plugin's own tables, scoped to its id by the host. */
50
269
  structuredStorage: ScopedStructuredStorage;
51
- /** Null if the content id doesn't exist OR isn't published (a
52
- * draft-only save never satisfies this) — deliberately conflates
53
- * "missing" and "not yet purchasable," since callers treat both the
54
- * same way. */
55
- getPublishedContent(contentId: string): Promise<PublishedContent | null>;
270
+ /** M33 K30: the plugin's own value per page and field (PluginSimpleStorage). */
271
+ simpleStorage: PluginSimpleStorage;
272
+ /** A published page in one language (M33 K22), or null if the content id doesn't exist, isn't
273
+ * published (a draft-only save never satisfies this), or isn't published in the asked `culture`.
274
+ * It deliberately conflates "missing" and "not yet purchasable," since callers treat both the
275
+ * same way. With no `culture`, the default language, else the first published one; the answer's
276
+ * `culture` says which came back. A `culture` that is not one of the site's languages throws
277
+ * TypeError. On a route or site route, when no public URL is set, a domain stored without a
278
+ * scheme is printed in `addresses` with the request's scheme; in a hook or a scheduled task,
279
+ * which have no request, with https. */
280
+ getPublishedContent(contentId: string, options?: GetPublishedContentOptions): Promise<PublishedContent | null>;
281
+ /** M32 F4c (D2): the published pages a visitor can reach, in path order, with their addresses
282
+ * (drafts, trashed pages and pages with no address are left out). Open to every plugin, as
283
+ * getPublishedContent is. A bad `site`, `host`, `after` or `limit`, or `site` with `host`, throws
284
+ * TypeError. Each item says whether the server renders it (M33 K24). The public URL's scheme
285
+ * prints every full address when one is set. On a route or site route, when no public URL is
286
+ * set, a domain stored without a scheme is printed with the request's scheme; in a hook or a
287
+ * scheduled task, which have no request, with https. */
288
+ listPublishedPages(opts?: ListPublishedPagesOptions): Promise<PublishedPagesPage>;
289
+ /** M33 K23: which site `host` (a request's `Host`, its port included) belongs to, or null for a
290
+ * host that cannot be read (empty, over 300 characters, a path, a user, a bad port). Open to
291
+ * every plugin: site addresses are public. A bad `scheme` throws TypeError. */
292
+ siteOfHost(host: string, options?: SiteOfHostOptions): Promise<SiteOfHost | null>;
293
+ /** M33 K26: a public, live media item's address, the store's own public address when it has one,
294
+ * else on the public URL, else on the default address when it has a name, else a site path; null
295
+ * for a private, trashed, missing or malformed id. Never a private file's address: read a private
296
+ * file through `media`. Open to every plugin: public items only. On a route or site route, when
297
+ * no public URL is set, a domain stored without a scheme is printed with the request's scheme;
298
+ * in a hook or a scheduled task, which have no request, with https. */
299
+ publicMediaUrl(id: string): Promise<string | null>;
300
+ /** M33 K31: the addresses of 1 to 100 (`PAGE_ADDRESSES_TARGETS_MAX`) pages or tree positions,
301
+ * also of a position a page has left and in languages a page is not published in, in the order
302
+ * asked. An entry is null for an unknown or trashed page id, for a path whose first segment names
303
+ * no top-level page when no `site` is given, and for a site a visitor cannot reach (an
304
+ * unpublished top-level page, or an unpublished site with a domain). Anything else wrong (no
305
+ * targets or more than 100, a path not starting with "/", with an empty segment or over 2,000
306
+ * characters, an id that is no UUID, both `page` and `path`) throws TypeError before any read.
307
+ * Open to every plugin: addresses are public; no content is read. On a route or site route,
308
+ * when no public URL is set, a domain stored without a scheme is printed with the request's
309
+ * scheme; in a hook or a scheduled task, which have no request, with https. */
310
+ pageAddresses(targets: ReadonlyArray<PageAddressTarget>): Promise<Array<PageAddresses | null>>;
56
311
  /** S284b: the host's latest licence verdict for this plugin, exactly as
57
312
  * the marketplace signed it (`kind: "verdict"`), `kind: "exempt"` on a
58
313
  * non-production install, `kind: "none"` when the host holds no verdict.
59
314
  * Check it with `requireEntitlement` from
60
- * `@kardalum/plugin-sdk/entitlement`; a thrown EntitlementError
61
- * answers 403 `{ code: "entitlement", reason }`. */
315
+ * `@kardalum/plugin-sdk/entitlement`; in a route a thrown EntitlementError
316
+ * answers 403 `{ code: "entitlement", reason }`, and a hook that throws it
317
+ * is skipped with one log line. */
62
318
  entitlement: Entitlement;
63
319
  /** S318: true while the plugin's licence term is lapsed: the host refuses its writes (403 plugin_read_only), so a route or hook can skip them. Set by the host; absent reads as false. */
64
320
  readOnly?: boolean;
65
321
  /** S314n3: sends a notification to people in the admin. Present only for a plugin that
66
- * declares `contributions.notifications: true` and is active; a refusal throws
322
+ * declares `contributions.notifications` (a list of kinds) and is active; a refusal throws
67
323
  * NotificationRefusedError (check it with `isNotificationRefusedError`). */
68
324
  notify?: PluginNotify;
69
325
  /** S320: calls the plugin's declared vendor service with a 5-minute licence
70
326
  * token. Present only when the manifest declares `vendorService`. */
71
327
  vendorService?: PluginVendorService;
328
+ /** M32 F4 (D12): the plugin's declared secrets, read with `get(name)`. Set by the host. */
329
+ secrets?: PluginSecrets;
330
+ /** M32 F4d (D7): the plugin's settings values, read with `get(id)` or `all()`. Set by the host. */
331
+ settings?: PluginSettingsReader;
332
+ }
333
+ export interface PluginApiRouteContext extends PluginServerContextBase, PluginAddressLookup {
334
+ /** M32 F (D8): the content half of the management client, acting as this plugin within its
335
+ * `contentAccess`. Present only when the manifest declares contentAccess. A call outside the
336
+ * declaration throws ContentAccessRefusedError and sends nothing. */
337
+ content?: PluginContentLibrary;
338
+ /** M32 F4c (D10): the media library, acting as this plugin within its `mediaAccess`: `upload`
339
+ * (media.create) and `get` (media.read). Present only when the manifest declares mediaAccess. A
340
+ * call outside the declaration throws MediaAccessRefusedError and sends nothing. */
341
+ media?: PluginMediaLibrary;
342
+ /** M32 F (D17): the built-in form protection for the request this route was called with.
343
+ * M32 F2 (D27): a site route passes the PluginRequestView it received. On
344
+ * M32 H (H19): an `ok` answer may carry `reply`, present only when the plugin declares `formReplies`.
345
+ * `rate` answer 429; on the other checks answer what a success answers and store nothing. */
346
+ protect(request: unknown): Promise<ProtectionResult>;
347
+ /** M32 F (D21): the two field names and a fresh time token, for a headless form. M33 (Forms
348
+ * review): with `minSeconds`, the built-in check's live minimum time, read on every call, so a
349
+ * front end that sends with this token waits at least so long. */
350
+ protectionFields(): Promise<ProtectionFields>;
351
+ /** M33 K52: the chosen form protection provider's widget for a front end the site builds itself:
352
+ * `{ provider, fieldPrefix, widget, script }`, or `null` while the built-in check serves alone. The
353
+ * parts are what `{% form_protection %}` writes (a class, `data-*` values, the visible `fallbackText`),
354
+ * asked with no language (`culture` is `null`), and `script` is the provider's script address under
355
+ * its asset folder. It answers what any page shows a visitor, so it asks for no capability. Read once a call. */
356
+ protectionWidget(): Promise<ProtectionWidgetInfo | null>;
357
+ /** M33 K5: who called this route, as the core authenticated them, frozen: a user (`userId`, and
358
+ * `name` when the account has one) on an "admin" route, a key (`keyId`, `keyName`) on an
359
+ * "apiKey" route. Absent on a "public" route and a site route, which have no caller. It never
360
+ * holds an email, an address, a token or a secret. A plugin that keeps it in its own history
361
+ * keeps personal data, and says so in its privacy notice. */
362
+ caller?: PluginCaller;
363
+ /** M33 K11: one email to one person, of a kind the manifest declares under `mailKinds` and the
364
+ * site owner switched on. Present only for a plugin that declares `mailKinds`. */
365
+ mail?: PluginMail;
366
+ /** M33 K16: calls web addresses through the server's checked connection (`check`, `request`). Present only
367
+ * for a plugin that declares `outboundRequests`; a call after the plugin is switched off answers `inactive`. */
368
+ outbound?: PluginOutbound;
369
+ /** M33 K17: seals values the plugin makes under a key of its own for each declared kind (`seal`, `open`).
370
+ * Present only for a plugin that declares `sealedValues`; a call after the plugin is switched off answers `inactive`. */
371
+ sealing?: PluginSealing;
72
372
  }
@@ -1,11 +1,11 @@
1
1
  // Local, SDK-owned duplicates of packages/db-adapter's structured-storage
2
2
  // shapes and apps/server's StructuredStorageAPI/StructuredQueryBuilder/
3
- // StructuredStorageTransaction classes — never imported directly, since
3
+ // StructuredStorageTransaction classes, never imported directly, since
4
4
  // @kardalum/plugin-sdk is a published package that must not depend on
5
5
  // unpublished adapter/server internals (same reasoning manifest.ts's
6
6
  // DatabaseDialect duplication already uses). TypeScript's structural
7
7
  // typing means the real apps/server classes satisfy these interfaces
8
- // without any cast, as long as their member shapes match (they do —
8
+ // without any cast, as long as their member shapes match (they do:
9
9
  // this is exactly the public contract apps/docs/src/content/docs/v1/reference/storage.md
10
10
  // already documents).
11
11
  export {};
@@ -0,0 +1 @@
1
+ export { HTML_TO_TEXT_INPUT_MAX, RICH_TEXT_MAX_DEPTH, RICH_TEXT_READ_NODES_FLOOR, RICH_TEXT_READ_NODES_MAX, htmlToText, richTextToText, type PlainTextOptions, } from "@kardalum/api-schemas";
@@ -0,0 +1,6 @@
1
+ // M33 K36 (Reading time 2.8 R3): the `@kardalum/plugin-sdk/text` subpath, the plain text of a
2
+ // rich text value and of HTML. No React, no DOM, no node built-ins: a plugin imports it in its
3
+ // server code and in its browser code alike, and its bundle carries it (the federation share
4
+ // names the package's main entry only). The functions are the core's own, from the shared
5
+ // schemas, so a plugin reads text exactly as `@kardalum/client` does.
6
+ export { HTML_TO_TEXT_INPUT_MAX, RICH_TEXT_MAX_DEPTH, RICH_TEXT_READ_NODES_FLOOR, RICH_TEXT_READ_NODES_MAX, htmlToText, richTextToText, } from "@kardalum/api-schemas";
@@ -126,6 +126,11 @@
126
126
  --text-3xl: var(--font-size-3xl);
127
127
  --text-4xl: var(--font-size-4xl);
128
128
  --text-5xl: var(--font-size-5xl);
129
+ --text-site-small: var(--font-size-site-small);
130
+ --text-site-body: var(--font-size-site-body);
131
+ --text-site-lede: var(--font-size-site-lede);
132
+ --text-site-heading: var(--font-size-site-heading);
133
+ --text-site-display: var(--font-size-site-display);
129
134
  --font-weight-normal: var(--font-weight-normal);
130
135
  --font-weight-medium: var(--font-weight-medium);
131
136
  --font-weight-semibold: var(--font-weight-semibold);
@@ -145,8 +145,8 @@
145
145
  --motion-easing-exit: cubic-bezier(0.4, 0, 1, 1);
146
146
  --direction: ltr;
147
147
  --font-family-sans: 'IBM Plex Sans', 'IBM Plex Sans Arabic', ui-sans-serif, system-ui, sans-serif;
148
- --font-family-serif: 'Literata', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
149
- --font-family-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
148
+ --font-family-serif: 'Literata', 'IBM Plex Sans Arabic', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
149
+ --font-family-mono: 'IBM Plex Mono', 'IBM Plex Sans Arabic', ui-monospace, 'Cascadia Code', Consolas, monospace;
150
150
  --font-size-xs: 0.75rem;
151
151
  --font-size-sm: 0.8125rem;
152
152
  --font-size-base: 0.875rem;
@@ -156,6 +156,11 @@
156
156
  --font-size-3xl: 1.875rem;
157
157
  --font-size-4xl: clamp(1.9rem, 3.4vw, 2.6rem);
158
158
  --font-size-5xl: clamp(2.6rem, 4.6vw, 3.4rem);
159
+ --font-size-site-small: 0.8125rem;
160
+ --font-size-site-body: 0.9375rem;
161
+ --font-size-site-lede: 1.125rem;
162
+ --font-size-site-heading: 1.5rem;
163
+ --font-size-site-display: clamp(1.9rem, 3.4vw, 2.6rem);
159
164
  --font-weight-normal: 400;
160
165
  --font-weight-medium: 500;
161
166
  --font-weight-semibold: 600;
@@ -237,5 +242,12 @@
237
242
 
238
243
  /* Arabic locales lead with Plex Sans Arabic: same token, language-conditional value. */
239
244
  [lang="ar"], [lang^="ar-"] {
240
- --font-family-sans: 'IBM Plex Sans Arabic', 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
245
+ --font-family-sans: 'IBM Plex Sans Arabic', 'IBM Plex Sans', ui-sans-serif, system-ui, 'Segoe UI', Tahoma, sans-serif;
246
+ --tracking-tighter: 0em;
247
+ --tracking-tight: 0em;
248
+ --tracking-normal: 0em;
249
+ --tracking-wide: 0em;
250
+ --tracking-wider: 0em;
251
+ --tracking-widest: 0em;
252
+ font-synthesis-style: none;
241
253
  }
@@ -133,8 +133,8 @@
133
133
  "typography": {
134
134
  "fontFamily": {
135
135
  "sans": "'IBM Plex Sans', 'IBM Plex Sans Arabic', ui-sans-serif, system-ui, sans-serif",
136
- "serif": "'Literata', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif",
137
- "mono": "'IBM Plex Mono', ui-monospace, 'Cascadia Code', Consolas, monospace"
136
+ "serif": "'Literata', 'IBM Plex Sans Arabic', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif",
137
+ "mono": "'IBM Plex Mono', 'IBM Plex Sans Arabic', ui-monospace, 'Cascadia Code', Consolas, monospace"
138
138
  },
139
139
  "fontSize": {
140
140
  "xs": "0.75rem",
@@ -145,7 +145,12 @@
145
145
  "2xl": "1.5rem",
146
146
  "3xl": "1.875rem",
147
147
  "4xl": "clamp(1.9rem, 3.4vw, 2.6rem)",
148
- "5xl": "clamp(2.6rem, 4.6vw, 3.4rem)"
148
+ "5xl": "clamp(2.6rem, 4.6vw, 3.4rem)",
149
+ "site-small": "0.8125rem",
150
+ "site-body": "0.9375rem",
151
+ "site-lede": "1.125rem",
152
+ "site-heading": "1.5rem",
153
+ "site-display": "clamp(1.9rem, 3.4vw, 2.6rem)"
149
154
  },
150
155
  "fontWeight": {
151
156
  "normal": 400,
package/dist/ui-entry.js CHANGED
@@ -1,11 +1,11 @@
1
1
  // The `@kardalum/plugin-sdk/ui` subpath: the shared UI primitives (all of
2
2
  // @kardalum/ui, since R3) + the plugin-context
3
3
  // hooks/providers, with none of the package index's richtext (TipTap)
4
- // exports — same "no weight a consumer didn't ask for" boundary
4
+ // exports, with the same "no weight a consumer didn't ask for" boundary
5
5
  // `./manifest` and `./datatypes` already draw, just for the UI-primitives
6
6
  // half of the SDK surface.
7
7
  //
8
- // DO NOT import this from a federated plugin's own view code — a
8
+ // DO NOT import this from a federated plugin's own view code: a
9
9
  // datatype/section/etc. plugin remote whose views run inside the admin
10
10
  // host. S197 final-review fix F5 tried exactly that (google-maps'
11
11
  // location-view.tsx) and it was a Critical regression, caught by the
@@ -31,7 +31,7 @@
31
31
  // script, a test harness, tooling that renders SDK UI outside the Module
32
32
  // Federation runtime entirely) where there is no host singleton to miss in
33
33
  // the first place. If you're not sure which category you're in, you're
34
- // almost certainly writing a plugin view — use the bare package index.
34
+ // almost certainly writing a plugin view, so use the bare package index.
35
35
  export { PluginValueProvider, PluginSettingsProvider, PluginApiProvider, usePluginValue, usePluginSettings, usePluginSettingsValue, usePluginApi, } from "./plugin-context.js";
36
36
  export { SimpleStorageValueProvider } from "./simple-storage-value-provider.js";
37
37
  export { EntitlementGate, useEntitlement, } from "./entitlement-gate.js";
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useId, useState } from "react";
3
3
  import { assetPathIsImage } from "@kardalum/api-schemas";
4
- import { Button, Input, PropertyField, usePropertyFieldControl } from "@kardalum/ui";
4
+ import { Button, Input, PropertyField, TruncatedText, usePropertyFieldControl } from "@kardalum/ui";
5
5
  import { AssetPicker } from "../assets/asset-picker.js";
6
6
  import { assetBaseName, normalizeStartFolder, useAssetThumbnail, useAssetTree } from "../assets/asset-tree.js";
7
7
  import { usePluginSettings, usePluginSettingsValue, usePluginValue } from "../plugin-context.js";
8
+ import { useAdminChromeProps } from "../sdk-strings.js";
8
9
  import { usePluginTranslate } from "../plugin-screen-context.js";
9
10
  function readAccepts(settings) {
10
11
  return settings.accepts === "any" ? "any" : "images";
@@ -19,6 +20,8 @@ export function AssetInputView() {
19
20
  const field = usePropertyFieldControl();
20
21
  const t = usePluginTranslate();
21
22
  const [picking, setPicking] = useState(false);
23
+ // The field's controls are the admin's words (S366f D10).
24
+ const chrome = useAdminChromeProps();
22
25
  const path = typeof value === "string" && value !== "" ? value : null;
23
26
  // A file picked a moment ago counts as existing whatever the shared tree copy says.
24
27
  const [justPicked, setJustPicked] = useState(null);
@@ -31,7 +34,7 @@ export function AssetInputView() {
31
34
  const missing = checked && !exists && !tree.truncated;
32
35
  const isImage = path !== null && assetPathIsImage(path);
33
36
  const thumbnail = useAssetThumbnail(path !== null && exists && isImage ? path : null);
34
- return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "flex items-center gap-3 rounded-md border border-border-default bg-background-subtle p-3", children: [path !== null && !missing && isImage && (_jsx("span", { className: "block h-12 w-12 shrink-0 overflow-hidden rounded-md border border-border-subtle bg-background-elevated", children: thumbnail ? _jsx("img", { src: thumbnail, alt: "", className: "h-full w-full object-cover" }) : null })), _jsx("div", { className: "flex min-w-0 flex-1 flex-col", children: path === null ? (_jsx("span", { className: "text-sm text-text-tertiary", children: t("asset.noFile") })) : (_jsxs(_Fragment, { children: [_jsx("span", { className: "truncate text-sm font-medium text-text-primary", children: missing ? t("asset.missing") : assetBaseName(path) }), _jsx("span", { className: "truncate font-mono text-xs text-text-tertiary", children: path })] })) }), _jsxs("div", { ...field, role: "group", className: "flex shrink-0 items-center gap-2", children: [_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => setPicking(true), children: path === null ? t("asset.choose") : missing ? t("asset.chooseAnother") : t("asset.change") }), path !== null && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => onChange(null), children: t("asset.remove") }))] })] }), picking && (_jsx(AssetPicker, { accepts: readAccepts(settings), startFolder: readStartFolder(settings), currentPath: path, onPick: (picked) => {
37
+ return (_jsxs("div", { ...chrome, className: "flex flex-col gap-2", children: [_jsxs("div", { className: "flex items-center gap-3 rounded-md border border-border-default bg-background-subtle p-3", children: [path !== null && !missing && isImage && (_jsx("span", { className: "block h-12 w-12 shrink-0 overflow-hidden rounded-md border border-border-subtle bg-background-elevated", children: thumbnail ? _jsx("img", { src: thumbnail, alt: "", className: "h-full w-full object-cover" }) : null })), _jsx("div", { className: "flex min-w-0 flex-1 flex-col", children: path === null ? (_jsx("span", { className: "text-sm text-text-tertiary", children: t("asset.noFile") })) : (_jsxs(_Fragment, { children: [_jsx(TruncatedText, { className: "truncate text-sm font-medium text-text-primary", children: missing ? t("asset.missing") : assetBaseName(path) }), _jsx(TruncatedText, { className: "truncate font-mono text-xs text-text-tertiary", children: path })] })) }), _jsxs("div", { ...field, role: "group", className: "flex shrink-0 items-center gap-2", children: [_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => setPicking(true), children: path === null ? t("asset.choose") : missing ? t("asset.chooseAnother") : t("asset.change") }), path !== null && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => onChange(null), children: t("asset.remove") }))] })] }), picking && (_jsx(AssetPicker, { accepts: readAccepts(settings), startFolder: readStartFolder(settings), currentPath: path, onPick: (picked) => {
35
38
  setJustPicked(picked);
36
39
  onChange(picked);
37
40
  }, onClose: () => setPicking(false) }))] }));
@@ -51,5 +54,5 @@ export function AssetReadOnlyView() {
51
54
  const t = usePluginTranslate();
52
55
  if (typeof value !== "string" || value === "")
53
56
  return _jsx("p", { className: "text-sm text-text-tertiary", children: t("asset.noFile") });
54
- return (_jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate text-sm font-medium text-text-primary", children: assetBaseName(value) }), _jsx("span", { className: "truncate font-mono text-xs text-text-tertiary", children: value })] }));
57
+ return (_jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx(TruncatedText, { className: "truncate text-sm font-medium text-text-primary", children: assetBaseName(value) }), _jsx(TruncatedText, { className: "truncate font-mono text-xs text-text-tertiary", children: value })] }));
55
58
  }
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useContentHost, usePluginSettings } from "../plugin-context.js";
3
+ import { useSdkString } from "../sdk-strings.js";
3
4
  import { CONTENT_LIST_HEADER_CELL_CLASS, contentListColumnHeader, contentListColumnKey, resolveContentListColumns, } from "./content-list-view.js";
4
5
  // The document type builder's live preview (S232). Deliberately static:
5
6
  // the builder is designing a type, so there is no page whose children
@@ -10,5 +11,6 @@ export function ContentListPreview() {
10
11
  const settings = usePluginSettings();
11
12
  const host = useContentHost();
12
13
  const columns = resolveContentListColumns(settings);
13
- return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("table", { className: "w-full border-collapse text-sm text-text-primary", children: [_jsx("caption", { className: "sr-only", children: "Children" }), _jsx("thead", { children: _jsx("tr", { children: columns.map((column) => (_jsx("th", { scope: "col", className: CONTENT_LIST_HEADER_CELL_CLASS, children: contentListColumnHeader(column, host?.documentTypes) }, contentListColumnKey(column)))) }) }), _jsx("tbody", {})] }), _jsx("p", { className: "text-sm text-text-secondary", children: "Shown on a page's editing screen." })] }));
14
+ const s = useSdkString();
15
+ return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("table", { className: "w-full border-collapse text-sm text-text-primary", children: [_jsx("caption", { className: "sr-only", children: s("contentList.caption") }), _jsx("thead", { children: _jsx("tr", { children: columns.map((column) => (_jsx("th", { scope: "col", className: CONTENT_LIST_HEADER_CELL_CLASS, children: contentListColumnHeader(column, host?.documentTypes, s) }, contentListColumnKey(column)))) }) }), _jsx("tbody", {})] }), _jsx("p", { className: "text-sm text-text-secondary", children: s("contentList.pageOnly") })] }));
14
16
  }
@@ -3,7 +3,8 @@ import { useId, useState } from "react";
3
3
  import { CONTENT_LIST_PROPERTIES, } from "@kardalum/api-schemas";
4
4
  import { Button, Input } from "@kardalum/ui";
5
5
  import { useContentHost, usePluginSettingsValue } from "../plugin-context.js";
6
- import { CONTENT_LIST_PROPERTY_LABELS, contentListColumnKey, findFieldInTypes, resolveContentListColumns, } from "./content-list-view.js";
6
+ import { useSdkString } from "../sdk-strings.js";
7
+ import { CONTENT_LIST_PROPERTY_KEYS, contentListColumnKey, findFieldInTypes, resolveContentListColumns, } from "./content-list-view.js";
7
8
  // The Content List datatype's column picker (S232). Rendered by the Data
8
9
  // Types editor only, so it takes the settings-EDITING hook
9
10
  // (usePluginSettingsValue), the same split every other built-in settings
@@ -19,6 +20,7 @@ export function ContentListSettingsView() {
19
20
  const aliasId = useId();
20
21
  const labelIdPrefix = useId();
21
22
  const [alias, setAlias] = useState("");
23
+ const s = useSdkString();
22
24
  const columns = resolveContentListColumns(settings);
23
25
  const documentTypes = host?.documentTypes;
24
26
  const chosenProperties = new Set(columns.flatMap((column) => (column.kind === "property" ? [column.property] : [])));
@@ -81,17 +83,19 @@ export function ContentListSettingsView() {
81
83
  // the column it acts on, as the row itself names it.
82
84
  function label(column) {
83
85
  if (column.kind === "property")
84
- return CONTENT_LIST_PROPERTY_LABELS[column.property];
86
+ return s(CONTENT_LIST_PROPERTY_KEYS[column.property]);
85
87
  const found = findFieldInTypes(column.fieldId, documentTypes);
86
- return found ? `${column.fieldId} (${found.typeName}: ${found.fieldName})` : column.fieldId;
88
+ return found
89
+ ? s("contentListSettings.fieldColumn", { alias: column.fieldId, type: found.typeName, field: found.fieldName })
90
+ : column.fieldId;
87
91
  }
88
- return (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx("ul", { className: "flex flex-col gap-2", children: columns.map((column, index) => (_jsxs("li", { className: "flex flex-wrap items-end gap-2 rounded-md border border-border-default p-2", children: [_jsx("span", { className: "text-sm text-text-primary", children: label(column) }), column.kind === "field" && (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("label", { htmlFor: `${labelIdPrefix}-${index}`, className: "text-xs font-medium text-text-secondary", children: "Label" }), _jsx(Input, { id: `${labelIdPrefix}-${index}`, value: column.label ?? "", onChange: (event) => setLabel(index, event.target.value) })] })), _jsxs("div", { className: "flex items-center gap-1 ms-auto", children: [_jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": `Move up ${label(column)}`, disabled: index === 0, onClick: () => move(index, -1), children: "Move up" }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": `Move down ${label(column)}`, disabled: index === columns.length - 1, onClick: () => move(index, 1), children: "Move down" }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": `Remove ${label(column)}`, disabled: columns.length <= 1, onClick: () => remove(index), children: "Remove" })] })] }, contentListColumnKey(column)))) }), _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("label", { htmlFor: addId, className: "text-xs font-medium text-text-secondary", children: "Add column" }), _jsxs("select", { id: addId, value: "", className: SELECT_CLASS, onChange: (event) => handlePick(event.target.value), children: [_jsx("option", { value: "", children: "Choose a column" }), availableProperties.length > 0 && (_jsx("optgroup", { label: "Properties", children: availableProperties.map((property) => (_jsx("option", { value: `${PROPERTY_PREFIX}${property}`, children: CONTENT_LIST_PROPERTY_LABELS[property] }, property))) })), (documentTypes ?? []).map((documentType) => {
92
+ return (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx("ul", { className: "flex flex-col gap-2", children: columns.map((column, index) => (_jsxs("li", { className: "flex flex-wrap items-end gap-2 rounded-md border border-border-default p-2", children: [_jsx("span", { className: "text-sm text-text-primary", children: label(column) }), column.kind === "field" && (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("label", { htmlFor: `${labelIdPrefix}-${index}`, className: "text-xs font-medium text-text-secondary", children: s("contentListSettings.label") }), _jsx(Input, { id: `${labelIdPrefix}-${index}`, value: column.label ?? "", onChange: (event) => setLabel(index, event.target.value) })] })), _jsxs("div", { className: "flex items-center gap-1 ms-auto", children: [_jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": s("contentListSettings.moveUpNamed", { column: label(column) }), disabled: index === 0, onClick: () => move(index, -1), children: s("contentListSettings.moveUp") }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": s("contentListSettings.moveDownNamed", { column: label(column) }), disabled: index === columns.length - 1, onClick: () => move(index, 1), children: s("contentListSettings.moveDown") }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": s("contentListSettings.removeNamed", { column: label(column) }), disabled: columns.length <= 1, onClick: () => remove(index), children: s("contentListSettings.remove") })] })] }, contentListColumnKey(column)))) }), _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("label", { htmlFor: addId, className: "text-xs font-medium text-text-secondary", children: s("contentListSettings.addColumn") }), _jsxs("select", { id: addId, value: "", className: SELECT_CLASS, onChange: (event) => handlePick(event.target.value), children: [_jsx("option", { value: "", children: s("contentListSettings.chooseColumn") }), availableProperties.length > 0 && (_jsx("optgroup", { label: s("contentListSettings.properties"), children: availableProperties.map((property) => (_jsx("option", { value: `${PROPERTY_PREFIX}${property}`, children: s(CONTENT_LIST_PROPERTY_KEYS[property]) }, property))) })), (documentTypes ?? []).map((documentType) => {
89
93
  const fields = documentType.fields.filter((field) => !chosenFieldIds.has(field.id));
90
94
  if (fields.length === 0)
91
95
  return null;
92
- return (_jsx("optgroup", { label: documentType.name, children: fields.map((field) => (_jsx("option", { value: `${FIELD_PREFIX}${field.id}`, children: `${field.name} (${field.id})` }, field.id))) }, documentType.id));
93
- })] })] }), _jsxs("div", { className: "flex flex-wrap items-end gap-2", children: [_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("label", { htmlFor: aliasId, className: "text-xs font-medium text-text-secondary", children: "Other alias" }), _jsx(Input, { id: aliasId, value: alias, onChange: (event) => setAlias(event.target.value) })] }), _jsx(Button, { type: "button", variant: "outline", onClick: () => {
96
+ return (_jsx("optgroup", { label: documentType.name, children: fields.map((field) => (_jsx("option", { value: `${FIELD_PREFIX}${field.id}`, children: s("contentListSettings.fieldOption", { field: field.name, alias: field.id }) }, field.id))) }, documentType.id));
97
+ })] })] }), _jsxs("div", { className: "flex flex-wrap items-end gap-2", children: [_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("label", { htmlFor: aliasId, className: "text-xs font-medium text-text-secondary", children: s("contentListSettings.otherAlias") }), _jsx(Input, { id: aliasId, value: alias, onChange: (event) => setAlias(event.target.value) })] }), _jsx(Button, { type: "button", variant: "outline", onClick: () => {
94
98
  addField(alias);
95
99
  setAlias("");
96
- }, children: "Add" })] })] }));
100
+ }, children: s("contentListSettings.add") })] })] }));
97
101
  }
@@ -1,8 +1,10 @@
1
1
  import { CONTENT_LIST_PROPERTIES, type ContentListColumn, type ContentListSettings } from "@kardalum/api-schemas";
2
2
  import { type ContentHostDocumentType } from "../plugin-context.js";
3
+ import { type SdkStringKey, type SdkTranslate } from "../sdk-strings.js";
3
4
  export type ContentListProperty = (typeof CONTENT_LIST_PROPERTIES)[number];
4
- /** Column headers for the six built-in row properties. */
5
- export declare const CONTENT_LIST_PROPERTY_LABELS: Readonly<Record<ContentListProperty, string>>;
5
+ /** Column headers for the six built-in row properties, as keys of the
6
+ * SDK's strings (S366f D11). */
7
+ export declare const CONTENT_LIST_PROPERTY_KEYS: Readonly<Record<ContentListProperty, SdkStringKey>>;
6
8
  export declare const CONTENT_LIST_HEADER_CELL_CLASS = "border-b border-border-default px-2 py-2 text-start text-xs font-medium text-text-secondary";
7
9
  /** A stable React key (and a settings identity) for one column. */
8
10
  export declare function contentListColumnKey(column: ContentListColumn): string;
@@ -13,7 +15,7 @@ export declare function findFieldInTypes(fieldId: string, documentTypes: Content
13
15
  } | null;
14
16
  /** The header text for a column: an explicit label wins, then the field's
15
17
  * own name where a document type declares it, then the raw alias. */
16
- export declare function contentListColumnHeader(column: ContentListColumn, documentTypes: ContentHostDocumentType[] | undefined): string;
18
+ export declare function contentListColumnHeader(column: ContentListColumn, documentTypes: ContentHostDocumentType[] | undefined, s: SdkTranslate): string;
17
19
  export declare function resolveContentListColumns(settings: Partial<ContentListSettings>): ContentListColumn[];
18
20
  export declare function ContentListInputView(): import("react").JSX.Element;
19
21
  export declare function ContentListReadOnlyView(): import("react").JSX.Element;