@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
@@ -62,6 +62,17 @@ export interface LicenseVerdictEnvelope {
62
62
  /** S317: the licence's term, covered by `termSignature` like `planId`. A
63
63
  * verdict without it reads as plan unknown, term active. */
64
64
  term?: LicenseVerdictTerm;
65
+ /** S367b: where the licence key was refused while a sharing case of the
66
+ * licence is under 30 days old. Covered by `noticeSignature` only, never by
67
+ * `signature` or `termSignature`, so every verifier built before it checks
68
+ * the bytes it always did and ignores this field. */
69
+ notice?: LicenseVerdictNotice;
70
+ /** Part I6f: what the licence's end does to the plugin, and whether it
71
+ * ended by a refund. Covered by `endSignature` only, never by `signature`,
72
+ * `termSignature` or `noticeSignature`, so every verifier built before it
73
+ * checks the bytes it always did and ignores this field. Signed only on a
74
+ * `valid` answer. */
75
+ end?: LicenseVerdictEnd;
65
76
  }
66
77
  /** The longest `detail` a verdict may carry. */
67
78
  export declare const LICENSE_VERDICT_DETAIL_MAX = 500;
@@ -92,6 +103,10 @@ export interface SignedLicenseVerdict {
92
103
  signature: string;
93
104
  /** S317: base64 Ed25519 over canonicalizeLicenseVerdictTerm; present only when the envelope carries planId or term. */
94
105
  termSignature?: string;
106
+ /** S367b: base64 Ed25519 over canonicalizeLicenseVerdictNotice; present only when the envelope carries a notice. */
107
+ noticeSignature?: string;
108
+ /** Part I6f: base64 Ed25519 over canonicalizeLicenseVerdictEnd; present only when the envelope carries an end. */
109
+ endSignature?: string;
95
110
  }
96
111
  /**
97
112
  * A `LicenseChallenge` is the only way to obtain a nonce, and the only
@@ -193,6 +208,45 @@ export declare function canonicalizeLicenseVerdict(envelope: LicenseVerdictEnvel
193
208
  * hold a `planId` key, which the version 1 bytes never do, so neither
194
209
  * signature can stand in for the other. */
195
210
  export declare function canonicalizeLicenseVerdictTerm(envelope: LicenseVerdictEnvelope): Buffer;
211
+ /** S367b: what the buyer's own CMS is told while a sharing case of the
212
+ * licence is under 30 days old. Covered by `noticeSignature` only, so
213
+ * `signature` and `termSignature` keep their bytes and every verifier built
214
+ * before this field ignores it. S367c: `staging-site` tells a staging site's
215
+ * CMS which seated site it belongs to (`domain`) and when it was named
216
+ * (`at`). S367d: `service-closing` tells every CMS the licence service ends at
217
+ * `at`; a CMS that verifies it stops checking (licence terms `updates`). */
218
+ export interface LicenseVerdictNotice {
219
+ kind: "key-seen-elsewhere" | "staging-site" | "service-closing";
220
+ domain: string;
221
+ at: string;
222
+ }
223
+ /** The longest domain a notice carries. */
224
+ export declare const LICENSE_VERDICT_NOTICE_DOMAIN_MAX = 253;
225
+ /** Every reason an `invalid` verdict carries. `domain_mismatch` is no longer
226
+ * answered by the marketplace (S367b) but stays readable on a verdict stored
227
+ * before it. S367d: `public_visitors` is a local or unset domain on a site
228
+ * that answers public visitors (licence terms `local`). S367e: `key_replaced` is
229
+ * a key the operator replaced (licence terms `revocation`); soft, like a full
230
+ * set of seats. */
231
+ export declare const LICENSE_INVALID_REASONS: readonly ["unknown_key", "plugin_mismatch", "domain_mismatch", "domain_blocked", "seat_limit", "seat_move", "key_shared", "licence_locked", "public_visitors", "key_replaced"];
232
+ /** S367b: what `noticeSignature` covers: the version 1 fields, then
233
+ * `notice`. These bytes always hold a `notice` key, which neither the
234
+ * version 1 nor the term bytes do, so no signature can stand in for
235
+ * another. */
236
+ export declare function canonicalizeLicenseVerdictNotice(envelope: LicenseVerdictEnvelope): Buffer;
237
+ /** Part I6f: what a licence's end does to the plugin. `read_only` keeps its
238
+ * reads and refuses its writes; `off` deactivates it. */
239
+ export declare const LICENSE_VERDICT_END_EFFECTS: readonly ["read_only", "off"];
240
+ /** Part I6f: the end the marketplace signs on a `valid` answer: the author's
241
+ * effect for how the licence ended, and whether it ended by a refund. */
242
+ export interface LicenseVerdictEnd {
243
+ effect: (typeof LICENSE_VERDICT_END_EFFECTS)[number];
244
+ refunded: boolean;
245
+ }
246
+ /** Part I6f: what `endSignature` covers: the version 1 fields, then `end`.
247
+ * These bytes always hold an `end` key, which none of the version 1, term or
248
+ * notice bytes do, so no signature can stand in for another. */
249
+ export declare function canonicalizeLicenseVerdictEnd(envelope: LicenseVerdictEnvelope): string;
196
250
  export declare function signLicenseVerdict(envelope: LicenseVerdictEnvelope, privateKeyBase64: string): string;
197
251
  /** S317: what the marketplace's validation route returns. `signature` is
198
252
  * signLicenseVerdict's, byte for byte (Ed25519 is deterministic), so every
@@ -200,6 +254,17 @@ export declare function signLicenseVerdict(envelope: LicenseVerdictEnvelope, pri
200
254
  * the envelope carries a plan or a term. Throws RangeError for a malformed
201
255
  * plan or term: the marketplace never signs one. */
202
256
  export declare function signLicenseVerdictWithTerm(envelope: LicenseVerdictEnvelope, privateKeyBase64: string): SignedLicenseVerdict;
257
+ /** S367b: signLicenseVerdictWithTerm's answer, plus `noticeSignature` when
258
+ * the envelope carries a notice. `signature` and `termSignature` are the
259
+ * same bytes as without the notice. Throws RangeError for a malformed
260
+ * notice: the marketplace never signs one. */
261
+ export declare function signLicenseVerdictWithNotice(envelope: LicenseVerdictEnvelope, privateKeyBase64: string): SignedLicenseVerdict;
262
+ /** Part I6f: signLicenseVerdictWithNotice's answer, plus `endSignature`
263
+ * when the envelope carries an end. `signature`, `termSignature` and
264
+ * `noticeSignature` are the same bytes as without the end. Throws RangeError
265
+ * for a malformed end or an end on an answer that is not `valid`: the
266
+ * marketplace never signs one. */
267
+ export declare function signLicenseVerdictWithEnd(envelope: LicenseVerdictEnvelope, privateKeyBase64: string): SignedLicenseVerdict;
203
268
  export type LicenseVerdictSignatureResult = {
204
269
  ok: true;
205
270
  envelope: LicenseVerdictEnvelope;
@@ -220,3 +285,13 @@ export declare function verifyLicenseVerdictSignature(signed: unknown, trustedKe
220
285
  maxAgeMs?: number;
221
286
  }): LicenseVerdictSignatureResult;
222
287
  export declare function verifyLicenseVerdict(signedVerdict: unknown, challenge: LicenseChallenge, trustedKeys: TrustedKey[], now?: Date): LicenseVerdictResult;
288
+ /** S367b: the notice when it is well formed and `noticeSignature` verifies
289
+ * over it with a trusted key; null otherwise, which reads as a verdict
290
+ * without one. It checks nothing else (freshness, subject): the caller has
291
+ * already verified the verdict itself. */
292
+ export declare function verifyLicenseVerdictNotice(signed: unknown, trustedKeys: TrustedKey[]): LicenseVerdictNotice | null;
293
+ /** Part I6f: the end when it is well formed and `endSignature` verifies over
294
+ * it with a trusted key; null otherwise, which reads as an answer without
295
+ * one. It checks nothing else (freshness, subject, status): the caller has
296
+ * already verified the answer itself. */
297
+ export declare function verifyLicenseVerdictEnd(signed: unknown, trustedKeys: TrustedKey[]): LicenseVerdictEnd | null;
@@ -104,6 +104,66 @@ function isCanonicalInstant(value) {
104
104
  const time = Date.parse(value);
105
105
  return Number.isFinite(time) && new Date(time).toISOString() === value;
106
106
  }
107
+ /** The longest domain a notice carries. */
108
+ export const LICENSE_VERDICT_NOTICE_DOMAIN_MAX = 253;
109
+ /** Every reason an `invalid` verdict carries. `domain_mismatch` is no longer
110
+ * answered by the marketplace (S367b) but stays readable on a verdict stored
111
+ * before it. S367d: `public_visitors` is a local or unset domain on a site
112
+ * that answers public visitors (licence terms `local`). S367e: `key_replaced` is
113
+ * a key the operator replaced (licence terms `revocation`); soft, like a full
114
+ * set of seats. */
115
+ export const LICENSE_INVALID_REASONS = [
116
+ "unknown_key",
117
+ "plugin_mismatch",
118
+ "domain_mismatch",
119
+ "domain_blocked",
120
+ "seat_limit",
121
+ "seat_move",
122
+ "key_shared",
123
+ "licence_locked",
124
+ "public_visitors",
125
+ "key_replaced",
126
+ ];
127
+ function isNotice(value) {
128
+ if (typeof value !== "object" || value === null)
129
+ return false;
130
+ const n = value;
131
+ return ((n.kind === "key-seen-elsewhere" || n.kind === "staging-site" || n.kind === "service-closing") &&
132
+ typeof n.domain === "string" &&
133
+ n.domain.length >= 1 &&
134
+ n.domain.length <= LICENSE_VERDICT_NOTICE_DOMAIN_MAX &&
135
+ typeof n.at === "string" &&
136
+ isCanonicalInstant(n.at));
137
+ }
138
+ /** S367b: what `noticeSignature` covers: the version 1 fields, then
139
+ * `notice`. These bytes always hold a `notice` key, which neither the
140
+ * version 1 nor the term bytes do, so no signature can stand in for
141
+ * another. */
142
+ export function canonicalizeLicenseVerdictNotice(envelope) {
143
+ const n = envelope.notice;
144
+ return Buffer.from(JSON.stringify({ ...canonicalFields(envelope), notice: n === undefined ? null : { kind: n.kind, domain: n.domain, at: n.at } }), "utf8");
145
+ }
146
+ /** Part I6f: what a licence's end does to the plugin. `read_only` keeps its
147
+ * reads and refuses its writes; `off` deactivates it. */
148
+ export const LICENSE_VERDICT_END_EFFECTS = ["read_only", "off"];
149
+ /** Exactly the two keys, in the shapes a verifier keeps: a third key would
150
+ * be unsigned data riding on a verified result. */
151
+ function isEnd(value) {
152
+ if (typeof value !== "object" || value === null || Array.isArray(value))
153
+ return false;
154
+ const keys = Object.keys(value);
155
+ if (keys.length !== 2 || !keys.includes("effect") || !keys.includes("refunded"))
156
+ return false;
157
+ const e = value;
158
+ return LICENSE_VERDICT_END_EFFECTS.includes(e.effect) && typeof e.refunded === "boolean";
159
+ }
160
+ /** Part I6f: what `endSignature` covers: the version 1 fields, then `end`.
161
+ * These bytes always hold an `end` key, which none of the version 1, term or
162
+ * notice bytes do, so no signature can stand in for another. */
163
+ export function canonicalizeLicenseVerdictEnd(envelope) {
164
+ const e = envelope.end;
165
+ return JSON.stringify({ ...canonicalFields(envelope), end: e === undefined ? null : { effect: e.effect, refunded: e.refunded } });
166
+ }
107
167
  function isTerm(value) {
108
168
  if (typeof value !== "object" || value === null)
109
169
  return false;
@@ -148,6 +208,35 @@ export function signLicenseVerdictWithTerm(envelope, privateKeyBase64) {
148
208
  const key = createPrivateKey({ key: Buffer.from(privateKeyBase64, "base64"), format: "der", type: "pkcs8" });
149
209
  return { envelope, signature, termSignature: sign(null, canonicalizeLicenseVerdictTerm(envelope), key).toString("base64") };
150
210
  }
211
+ /** S367b: signLicenseVerdictWithTerm's answer, plus `noticeSignature` when
212
+ * the envelope carries a notice. `signature` and `termSignature` are the
213
+ * same bytes as without the notice. Throws RangeError for a malformed
214
+ * notice: the marketplace never signs one. */
215
+ export function signLicenseVerdictWithNotice(envelope, privateKeyBase64) {
216
+ const signed = signLicenseVerdictWithTerm(envelope, privateKeyBase64);
217
+ if (envelope.notice === undefined)
218
+ return signed;
219
+ if (!isNotice(envelope.notice))
220
+ throw new RangeError("signLicenseVerdictWithNotice: the notice is malformed");
221
+ const key = createPrivateKey({ key: Buffer.from(privateKeyBase64, "base64"), format: "der", type: "pkcs8" });
222
+ return { ...signed, noticeSignature: sign(null, canonicalizeLicenseVerdictNotice(envelope), key).toString("base64") };
223
+ }
224
+ /** Part I6f: signLicenseVerdictWithNotice's answer, plus `endSignature`
225
+ * when the envelope carries an end. `signature`, `termSignature` and
226
+ * `noticeSignature` are the same bytes as without the end. Throws RangeError
227
+ * for a malformed end or an end on an answer that is not `valid`: the
228
+ * marketplace never signs one. */
229
+ export function signLicenseVerdictWithEnd(envelope, privateKeyBase64) {
230
+ const signed = signLicenseVerdictWithNotice(envelope, privateKeyBase64);
231
+ if (envelope.end === undefined)
232
+ return signed;
233
+ if (!isEnd(envelope.end))
234
+ throw new RangeError("signLicenseVerdictWithEnd: the end is malformed");
235
+ if (envelope.status !== "valid")
236
+ throw new RangeError("signLicenseVerdictWithEnd: an end is signed only on a valid answer");
237
+ const key = createPrivateKey({ key: Buffer.from(privateKeyBase64, "base64"), format: "der", type: "pkcs8" });
238
+ return { ...signed, endSignature: sign(null, Buffer.from(canonicalizeLicenseVerdictEnd(envelope), "utf8"), key).toString("base64") };
239
+ }
151
240
  function isEnvelope(value) {
152
241
  if (typeof value !== "object" || value === null)
153
242
  return false;
@@ -328,3 +417,37 @@ export function verifyLicenseVerdict(signedVerdict, challenge, trustedKeys, now
328
417
  envelope: verifiedEnvelope,
329
418
  };
330
419
  }
420
+ /** S367b: the notice when it is well formed and `noticeSignature` verifies
421
+ * over it with a trusted key; null otherwise, which reads as a verdict
422
+ * without one. It checks nothing else (freshness, subject): the caller has
423
+ * already verified the verdict itself. */
424
+ export function verifyLicenseVerdictNotice(signed, trustedKeys) {
425
+ if (!isSigned(signed))
426
+ return null;
427
+ const { envelope } = signed;
428
+ if (!isNotice(envelope.notice))
429
+ return null;
430
+ const noticeSignature = signed.noticeSignature;
431
+ if (typeof noticeSignature !== "string" || noticeSignature.length === 0)
432
+ return null;
433
+ if (checkBytes(envelope.keyId, canonicalizeLicenseVerdictNotice(envelope), noticeSignature, trustedKeys) !== "ok")
434
+ return null;
435
+ return { kind: envelope.notice.kind, domain: envelope.notice.domain, at: envelope.notice.at };
436
+ }
437
+ /** Part I6f: the end when it is well formed and `endSignature` verifies over
438
+ * it with a trusted key; null otherwise, which reads as an answer without
439
+ * one. It checks nothing else (freshness, subject, status): the caller has
440
+ * already verified the answer itself. */
441
+ export function verifyLicenseVerdictEnd(signed, trustedKeys) {
442
+ if (!isSigned(signed))
443
+ return null;
444
+ const { envelope } = signed;
445
+ if (!isEnd(envelope.end))
446
+ return null;
447
+ const endSignature = signed.endSignature;
448
+ if (typeof endSignature !== "string" || endSignature.length === 0)
449
+ return null;
450
+ if (checkBytes(envelope.keyId, Buffer.from(canonicalizeLicenseVerdictEnd(envelope), "utf8"), endSignature, trustedKeys) !== "ok")
451
+ return null;
452
+ return { effect: envelope.end.effect, refunded: envelope.end.refunded };
453
+ }
@@ -21,14 +21,14 @@ export type PackageContractResult = PackageContractCheck & {
21
21
  warnings: string[];
22
22
  };
23
23
  /**
24
- * <dir>/README.md must exist and contain something other than whitespace —
24
+ * <dir>/README.md must exist and contain something other than whitespace:
25
25
  * a file that exists but says nothing is worse than none: it would render
26
26
  * as a blank listing description in the marketplace.
27
27
  */
28
28
  export declare function checkReadmeContract(dir: string): PackageContractCheck;
29
29
  /**
30
30
  * <dir>/marketplace/cover.png must exist, be a real PNG, and be exactly
31
- * COVER_WIDTH x COVER_HEIGHT — the marketplace grid renders every listing's
31
+ * COVER_WIDTH x COVER_HEIGHT: the marketplace grid renders every listing's
32
32
  * cover at a fixed aspect, so anything else would be cropped or distorted.
33
33
  * The failure reason names both the required size and the size found,
34
34
  * since "wrong size" without the numbers makes a developer guess.
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { capViolations, checkDocsContract, isFile, readDocsContractInput } from "./docs-contract.js";
4
- // S206 Task 4: the marketplace-listing contract — a non-empty README.md
4
+ // S206 Task 4: the marketplace-listing contract: a non-empty README.md
5
5
  // plus a fixed-size cover image: used to live only in kardalum plugin's CLI
6
6
  // (packages/cli/src/plugin/checks/package-contract.ts), a dev-machine
7
7
  // package apps/server can't import from. Moved here because
@@ -9,13 +9,13 @@ import { capViolations, checkDocsContract, isFile, readDocsContractInput } from
9
9
  // AND kardalum plugin all already depend on: one implementation, no second
10
10
  // place to keep in sync. kardalum plugin's checks/package-contract.ts now
11
11
  // delegates to checkReadmeContract/checkCoverContract below rather than
12
- // keeping its own copy — see that file for why its two exports keep their
12
+ // keeping its own copy; see that file for why its two exports keep their
13
13
  // original names, CheckResult shape, and exact failure messages (its own
14
14
  // tests, and `kardalum plugin validate`'s output, depend on them).
15
15
  //
16
16
  // checkPackageContract is the door-level gate: the server's upload route
17
17
  // (apps/server/src/routes/plugin-upload.ts) just needs "does this package
18
- // qualify, and if not, why" — it has no use for which of the two rules
18
+ // qualify, and if not, why"; it has no use for which of the two rules
19
19
  // failed independently the way kardalum plugin's per-check report does.
20
20
  export const COVER_PATH = "marketplace/cover.png";
21
21
  export const COVER_WIDTH = 1200;
@@ -33,7 +33,7 @@ function fail(reasons) {
33
33
  return { ok: false, reason: reasons[0], reasons };
34
34
  }
35
35
  /**
36
- * <dir>/README.md must exist and contain something other than whitespace —
36
+ * <dir>/README.md must exist and contain something other than whitespace:
37
37
  * a file that exists but says nothing is worse than none: it would render
38
38
  * as a blank listing description in the marketplace.
39
39
  */
@@ -54,7 +54,7 @@ export function checkReadmeContract(dir) {
54
54
  }
55
55
  /**
56
56
  * <dir>/marketplace/cover.png must exist, be a real PNG, and be exactly
57
- * COVER_WIDTH x COVER_HEIGHT — the marketplace grid renders every listing's
57
+ * COVER_WIDTH x COVER_HEIGHT: the marketplace grid renders every listing's
58
58
  * cover at a fixed aspect, so anything else would be cropped or distorted.
59
59
  * The failure reason names both the required size and the size found,
60
60
  * since "wrong size" without the numbers makes a developer guess.
@@ -1,4 +1,4 @@
1
- /** The signed payload. Field order here is normative — canonicalizeEnvelope
1
+ /** The signed payload. Field order here is normative: canonicalizeEnvelope
2
2
  * serializes in exactly this order, and signer and verifier must agree byte
3
3
  * for byte. */
4
4
  export interface SignatureEnvelope {
@@ -4,7 +4,7 @@ declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
4
  declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
5
  declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
6
6
  declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): React.JSX.Element;
7
- declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): React.JSX.Element;
7
+ declare function AlertDialogContent({ className, children, ref, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): React.JSX.Element;
8
8
  declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
9
9
  declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
10
10
  declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
@@ -1,10 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
3
3
  import { cn } from '../lib/cn.js';
4
+ import { useMenuHost } from '../lib/menu-host.js';
5
+ import { DropdownMenuContainer } from './dropdown-menu.js';
4
6
  import { buttonVariants } from './button.js';
5
7
  // Ported from shadcn/ui's AlertDialog (Radix under the hood), retargeted
6
8
  // to @kardalum/design-tokens classes, no tailwindcss-animate dependency,
7
- // and no owned strings — title/description/action labels all come from
9
+ // and no owned strings: title/description/action labels all come from
8
10
  // the caller. For consequential confirmations (snapshot restore, future
9
11
  // destructive flows); Radix provides the focus trap, escape handling,
10
12
  // and aria wiring.
@@ -14,8 +16,11 @@ const AlertDialogPortal = AlertDialogPrimitive.Portal;
14
16
  function AlertDialogOverlay({ className, ...props }) {
15
17
  return (_jsx(AlertDialogPrimitive.Overlay, { className: cn('fixed inset-0 z-50 bg-background-overlay', className), ...props }));
16
18
  }
17
- function AlertDialogContent({ className, ...props }) {
18
- return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { className: cn('fixed start-1/2 top-1/2 z-50 w-full max-w-lg -translate-y-1/2 ltr:-translate-x-1/2 rtl:translate-x-1/2 rounded-xl border border-border-default bg-background-elevated p-6 shadow-xl', className), ...props })] }));
19
+ // S356: each modal surface hosts its own menus (see lib/menu-host.ts).
20
+ function AlertDialogContent({ className, children, ref, ...props }) {
21
+ const menuHost = useMenuHost(ref);
22
+ const host = menuHost.host;
23
+ return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { className: cn('fixed start-1/2 top-1/2 z-50 w-full max-w-lg -translate-y-1/2 ltr:-translate-x-1/2 rtl:translate-x-1/2 rounded-xl border border-border-default bg-background-elevated p-6 shadow-xl', className), ...props, ref: menuHost.ref, children: _jsx(DropdownMenuContainer, { container: host, children: children }) })] }));
19
24
  }
20
25
  function AlertDialogHeader({ className, ...props }) {
21
26
  return _jsx("div", { className: cn('flex flex-col gap-2 text-start', className), ...props });
@@ -3,7 +3,7 @@ import { cva } from 'class-variance-authority';
3
3
  import { cn } from '../lib/cn.js';
4
4
  // Status pill (Draft/Published/…). Soft style: 100-step fill + the
5
5
  // lightest text step that clears AA on that fill (S179: success/danger
6
- // 700, warning 800 — plain 600 measured 3.1–4.3:1, below the 4.5:1
6
+ // 700, warning 800; plain 600 measured 3.1–4.3:1, below the 4.5:1
7
7
  // minimum). Both steps are theme-remapped by the dark set, so the pill
8
8
  // stays readable in both themes without per-variant juggling. The
9
9
  // `primary` variant is the exception: it's an identity chip (role badges,
@@ -10,7 +10,7 @@ const buttonVariants = cva('inline-flex items-center justify-center gap-2 whites
10
10
  variants: {
11
11
  variant: {
12
12
  // Action = primary-600 (S177): cerulean in light, the light blue
13
- // itself in dark — text.inverse flips with it.
13
+ // itself in dark, text.inverse flips with it.
14
14
  default: 'bg-primary-600 text-text-inverse hover:bg-primary-700',
15
15
  secondary: 'bg-secondary-500 text-text-inverse hover:bg-secondary-600',
16
16
  destructive: 'bg-danger-600 text-text-inverse hover:bg-danger-700',
@@ -5,7 +5,7 @@ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.Dia
5
5
  declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
6
  declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
7
  declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element;
8
- declare function DialogContent({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): React.JSX.Element;
8
+ declare function DialogContent({ className, children, ref, onOpenAutoFocus, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): React.JSX.Element;
9
9
  declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
10
10
  declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
11
11
  declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
@@ -1,9 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as DialogPrimitive from '@radix-ui/react-dialog';
3
3
  import { cn } from '../lib/cn.js';
4
+ import { IconTooltip } from './tooltip.js';
5
+ import { useMenuHost } from '../lib/menu-host.js';
6
+ import { DropdownMenuContainer } from './dropdown-menu.js';
4
7
  // Hand-ported from shadcn/ui's Dialog (Radix under the hood), retargeted to
5
8
  // @kardalum/design-tokens classes, no tailwindcss-animate dependency, and
6
- // no owned strings — title/description/close labels all come from the
9
+ // no owned strings: title/description/close labels all come from the
7
10
  // caller, same convention as AlertDialog. Radix supplies the focus trap,
8
11
  // Escape handling, and aria wiring; `onCloseAutoFocus` on DialogContent is
9
12
  // how a caller returns focus to its trigger (see the admin UI conventions).
@@ -30,8 +33,50 @@ function DialogOverlay({ className, ...props }) {
30
33
  // and never reaches this scrollbar, while a caller that does nothing still
31
34
  // gets a reachable footer. 460px, the height a 920px screen gives at 200%
32
35
  // browser zoom, is the case this is measured against (WCAG 1.4.4).
33
- function DialogContent({ className, ...props }) {
34
- return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsx(DialogPrimitive.Content, { "aria-modal": "true", className: cn('fixed start-1/2 top-1/2 z-50 max-h-[calc(100dvh_-_var(--spacing-8))] w-full max-w-lg -translate-y-1/2 overflow-y-auto ltr:-translate-x-1/2 rtl:translate-x-1/2 rounded-xl border border-border-default bg-background-elevated p-6 shadow-xl', className), ...props })] }));
36
+ // S356: each modal surface hosts its own menus (see lib/menu-host.ts).
37
+ //
38
+ // S366c spec D6: a dialog opens on its first field (an input, select,
39
+ // textarea or editable region that takes focus), where the person's task
40
+ // starts. A dialog with none opens on the content itself (tabIndex -1), so no
41
+ // control, and no Close tooltip, is announced on every open. A caller's own
42
+ // onOpenAutoFocus runs first; one that prevents the default keeps control.
43
+ const FIRST_FIELD = 'input, select, textarea, [contenteditable="true"], [contenteditable=""]';
44
+ function fieldCandidates(content) {
45
+ const found = [];
46
+ for (const element of content.querySelectorAll(FIRST_FIELD)) {
47
+ if (element instanceof HTMLInputElement && element.type === 'hidden')
48
+ continue;
49
+ if (element.disabled === true)
50
+ continue;
51
+ if (element.closest('[hidden], [inert], [aria-hidden="true"]') !== null)
52
+ continue;
53
+ found.push(element);
54
+ }
55
+ return found;
56
+ }
57
+ // A field hidden by CSS cannot take focus, so each candidate is tried in order
58
+ // and the first that holds it wins; none, and the dialog itself takes it.
59
+ function focusFirstField(content) {
60
+ for (const element of fieldCandidates(content)) {
61
+ element.focus({ preventScroll: true });
62
+ if (document.activeElement === element)
63
+ return;
64
+ }
65
+ content.focus({ preventScroll: true });
66
+ }
67
+ function DialogContent({ className, children, ref, onOpenAutoFocus, ...props }) {
68
+ const menuHost = useMenuHost(ref);
69
+ const host = menuHost.host;
70
+ return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsx(DialogPrimitive.Content, { "aria-modal": "true", tabIndex: -1, onOpenAutoFocus: (event) => {
71
+ onOpenAutoFocus?.(event);
72
+ if (event.defaultPrevented)
73
+ return;
74
+ const content = event.currentTarget instanceof HTMLElement ? event.currentTarget : null;
75
+ if (content === null)
76
+ return;
77
+ event.preventDefault();
78
+ focusFirstField(content);
79
+ }, className: cn('fixed start-1/2 top-1/2 z-50 max-h-[calc(100dvh_-_var(--spacing-8))] w-full max-w-lg focus:outline-hidden -translate-y-1/2 overflow-y-auto ltr:-translate-x-1/2 rtl:translate-x-1/2 rounded-xl border border-border-default bg-background-elevated p-6 shadow-xl', className), ...props, ref: menuHost.ref, children: _jsx(DropdownMenuContainer, { container: host, children: children }) })] }));
35
80
  }
36
81
  function DialogHeader({ className, ...props }) {
37
82
  return (_jsx("div", { className: cn('flex items-center gap-2 text-start', className), ...props }));
@@ -46,6 +91,6 @@ function DialogDescription({ className, ...props }) {
46
91
  return (_jsx(DialogPrimitive.Description, { className: cn('text-sm text-text-secondary', className), ...props }));
47
92
  }
48
93
  function DialogCloseButton({ className, ...props }) {
49
- return (_jsx(DialogPrimitive.Close, { className: cn('ms-auto shrink-0 rounded-md p-1 text-text-secondary opacity-70 transition-colors duration-fast hover:bg-background-hover hover:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary-600', className), ...props, children: _jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-4 w-4", children: [_jsx("path", { d: "M18 6 6 18" }), _jsx("path", { d: "m6 6 12 12" })] }) }));
94
+ return (_jsx(IconTooltip, { children: _jsx(DialogPrimitive.Close, { className: cn('ms-auto shrink-0 rounded-md p-1 text-text-secondary opacity-70 transition-colors duration-fast hover:bg-background-hover hover:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary-600', className), ...props, children: _jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-4 w-4", children: [_jsx("path", { d: "M18 6 6 18" }), _jsx("path", { d: "m6 6 12 12" })] }) }) }));
50
95
  }
51
96
  export { Dialog, DialogTrigger, DialogPortal, DialogOverlay, DialogClose, DialogCloseButton, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
3
  declare function DropdownMenu({ modal, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
4
+ declare function DropdownMenuContainer({ container, children, }: {
5
+ container: HTMLElement | null;
6
+ children: React.ReactNode;
7
+ }): React.JSX.Element;
4
8
  declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
9
  declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
6
10
  declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
@@ -15,4 +19,4 @@ declare function DropdownMenuLabel({ className, inset, ...props }: React.Compone
15
19
  inset?: boolean;
16
20
  }): React.JSX.Element;
17
21
  declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
18
- export { DropdownMenu, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuGroup, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, };
22
+ export { DropdownMenu, DropdownMenuContainer, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuGroup, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, };
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
2
3
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
4
  import { cn } from '../lib/cn.js';
4
5
  // Ported from shadcn/ui's DropdownMenu (Radix under the hood), retargeted
@@ -12,13 +13,13 @@ import { cn } from '../lib/cn.js';
12
13
  //
13
14
  // 1. It marks the rest of the page `aria-hidden="true"` while the menu is
14
15
  // open, leaving every focusable control on the screen inside an
15
- // aria-hidden subtree — a genuine 4.1.2 failure, which axe reports as
16
+ // aria-hidden subtree, which is a genuine 4.1.2 failure that axe reports as
16
17
  // `aria-hidden-focus`.
17
18
  // 2. It locks `pointer-events: none` onto <body>. When a menu item opens
18
19
  // a dialog (the tree row's ⋯ → Delete), the menu's layer and the
19
20
  // dialog's layer both own that lock; the menu unmounts first, the
20
21
  // dialog restores the value the menu had already set, and closing the
21
- // dialog leaves `pointer-events: none` on <body> permanently — the
22
+ // dialog leaves `pointer-events: none` on <body> permanently: the
22
23
  // entire admin stops responding to the mouse until a page reload.
23
24
  //
24
25
  // Non-modal is also what the WAI-ARIA menu button pattern describes: Tab
@@ -27,17 +28,29 @@ import { cn } from '../lib/cn.js';
27
28
  function DropdownMenu({ modal = false, ...props }) {
28
29
  return _jsx(DropdownMenuPrimitive.Root, { modal: modal, ...props });
29
30
  }
31
+ // S356 (D5): where a menu's content mounts. A surface that traps focus (the
32
+ // admin's phone tree sheet, a modal Radix Dialog) keeps focus inside its own
33
+ // DOM, so a menu portalled to <body> from inside it has its focus pulled back
34
+ // and dismisses itself at once. Such a surface names its element here, and
35
+ // every menu rendered inside it mounts there instead; outside one, menus
36
+ // mount on <body> as before. Non-modal is unchanged: this is about where the
37
+ // content lives, not about the menu's own modality.
38
+ const DropdownMenuContainerContext = React.createContext(null);
39
+ function DropdownMenuContainer({ container, children, }) {
40
+ return _jsx(DropdownMenuContainerContext.Provider, { value: container, children: children });
41
+ }
30
42
  const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
31
43
  const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
32
44
  const DropdownMenuGroup = DropdownMenuPrimitive.Group;
33
45
  const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
34
- // Radio item with a check indicator at the inline start — the shape a
46
+ // Radio item with a check indicator at the inline start: the shape a
35
47
  // "pick one" preference (theme mode, language) takes inside a menu.
36
48
  function DropdownMenuRadioItem({ className, children, ...props }) {
37
49
  return (_jsxs(DropdownMenuPrimitive.RadioItem, { className: cn('relative flex cursor-pointer select-none items-center gap-2 rounded-sm py-2 pe-2 ps-8 text-sm text-text-primary outline-hidden transition-colors data-[highlighted]:bg-background-hover data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx("span", { className: "absolute start-2 flex size-4 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "size-4 text-primary-600", children: _jsx("path", { d: "M20 6 9 17l-5-5" }) }) }) }), children] }));
38
50
  }
39
51
  function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
40
- return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { sideOffset: sideOffset, className: cn('z-50 min-w-[10rem] overflow-hidden rounded-lg border border-border-default bg-background-elevated p-1 text-text-primary shadow-lg', className), ...props }) }));
52
+ const container = React.useContext(DropdownMenuContainerContext);
53
+ return (_jsx(DropdownMenuPrimitive.Portal, { container: container ?? undefined, children: _jsx(DropdownMenuPrimitive.Content, { sideOffset: sideOffset, className: cn('z-50 min-w-[10rem] overflow-hidden rounded-lg border border-border-default bg-background-elevated p-1 text-text-primary shadow-lg', className), ...props }) }));
41
54
  }
42
55
  function DropdownMenuItem({ className, inset, variant = 'default', ...props }) {
43
56
  return (_jsx(DropdownMenuPrimitive.Item, { className: cn('relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50', variant === 'destructive'
@@ -50,4 +63,4 @@ function DropdownMenuLabel({ className, inset, ...props }) {
50
63
  function DropdownMenuSeparator({ className, ...props }) {
51
64
  return (_jsx(DropdownMenuPrimitive.Separator, { className: cn('-mx-1 my-1 h-px bg-border-default', className), ...props }));
52
65
  }
53
- export { DropdownMenu, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuGroup, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, };
66
+ export { DropdownMenu, DropdownMenuContainer, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuGroup, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, };
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
2
  export interface EmptyStateProps extends React.ComponentProps<'div'> {
3
- /** Icon element (e.g. a lucide icon) — sized/colored by the caller. */
3
+ /** Icon element (e.g. a lucide icon), sized/colored by the caller. */
4
4
  icon?: React.ReactNode;
5
- /** Translated title — this component owns no strings. */
5
+ /** Translated title: this component owns no strings. */
6
6
  title: string;
7
7
  /** Optional translated supporting text. */
8
8
  description?: string;
9
9
  /** Optional primary action (usually a Button). */
10
10
  action?: React.ReactNode;
11
11
  /**
12
- * Element used for the title — a paragraph by default, because most
12
+ * Element used for the title, a paragraph by default, because most
13
13
  * empty states sit *inside* a screen that already owns its <h1>.
14
14
  * Where the empty state IS the whole screen (the unmatched-route view,
15
15
  * a section's "nothing selected yet" landing), pass a heading so the
@@ -17,7 +17,7 @@ export interface EmptyStateProps extends React.ComponentProps<'div'> {
17
17
  */
18
18
  titleAs?: 'p' | 'h1' | 'h2' | 'h3';
19
19
  /**
20
- * Extra props for the title element — the host app uses this to mark a
20
+ * Extra props for the title element: the host app uses this to mark a
21
21
  * screen-level title as its focus target on navigation. Kept as a
22
22
  * pass-through so this primitive stays ignorant of the shell's
23
23
  * conventions.
@@ -1,6 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from '../lib/cn.js';
3
3
  function Input({ className, type, ...props }) {
4
- return (_jsx("input", { type: type, "data-slot": "input", className: cn('flex h-10 w-full rounded-md border border-border-strong bg-background-elevated px-3 py-2 text-sm text-text-primary placeholder:text-text-disabled file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-text-primary transition-colors duration-fast focus-visible:border-primary-600 focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-primary-50 disabled:cursor-not-allowed disabled:opacity-50', className), ...props }));
4
+ return (_jsx("input", { type: type, "data-slot": "input", className: cn(
5
+ // S354 (D1): the placeholder is text-tertiary on background-elevated,
6
+ // 5.64:1 light (#616966 on #FFFFFF) and 5.46:1 dark (#969C99 on
7
+ // #232625), above AA's 4.5:1. It was text-disabled, 3.11:1 and
8
+ // 3.25:1; the site's Input (packages/site-ui) moved the same way in S256.
9
+ 'flex h-10 w-full rounded-md border border-border-strong bg-background-elevated px-3 py-2 text-sm text-text-primary placeholder:text-text-tertiary file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-text-primary transition-colors duration-fast focus-visible:border-primary-600 focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-primary-50 disabled:cursor-not-allowed disabled:opacity-50', className), ...props }));
5
10
  }
6
11
  export { Input };
@@ -7,13 +7,13 @@ const PropertyFieldContext = React.createContext(null);
7
7
  // component, not a DOM element, so there is no child element to attach
8
8
  // `id`/`aria-*` to. Any control rendered *anywhere* under a PropertyField
9
9
  // can spread the result of this hook onto itself and be correctly named,
10
- // described and marked invalid — which is how a third-party data-type
10
+ // described and marked invalid, which is how a third-party data-type
11
11
  // plugin's editor gets an accessible name without the host knowing
12
12
  // anything about its internals.
13
13
  //
14
14
  // Returns an EMPTY object outside a PropertyField (never null), so every
15
- // call site can spread the result unconditionally —
16
- // `<input {...usePropertyFieldControl()} />` — and a view stays usable
15
+ // call site can spread the result unconditionally
16
+ // (`<input {...usePropertyFieldControl()} />`), and a view stays usable
17
17
  // both inside and outside a field without a `?? {}` at each use.
18
18
  const NO_PROPERTY_FIELD = Object.freeze({});
19
19
  export function usePropertyFieldControl() {
@@ -5,7 +5,7 @@ declare const SheetTrigger: React.ForwardRefExoticComponent<DialogPrimitive.Dial
5
5
  declare const SheetPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
6
  declare const SheetClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
7
  declare function SheetOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element;
8
- declare function SheetContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): React.JSX.Element;
8
+ declare function SheetContent({ className, children, ref, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): React.JSX.Element;
9
9
  declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
10
10
  declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
11
11
  declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;