@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
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from "react";
3
3
  import { Selection } from "@tiptap/pm/state";
4
- import { Button, Dialog, DialogCloseButton, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, PropertyField, Switch, } from "@kardalum/ui";
4
+ import { Button, Dialog, DialogCloseButton, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, PropertyField, Switch, TruncatedText, } from "@kardalum/ui";
5
5
  import { MANAGE_API, usePluginApi } from "../plugin-context.js";
6
+ import { useSdkString } from "../sdk-strings.js";
6
7
  import { MediaPicker } from "../media/media-picker.js";
7
8
  import { useBlockListings } from "./insert-menu.js";
8
9
  function useMediaParamPreview(mediaId) {
@@ -41,6 +42,7 @@ function useMediaParamPreview(mediaId) {
41
42
  // One field per declared param, keyed by its type (S197 Task 3 brief:
42
43
  // text/textarea/number/boolean(switch)/image(MediaPicker)/choice(select)).
43
44
  function BlockParamField({ spec, value, onChange, error }) {
45
+ const s = useSdkString();
44
46
  const fieldId = `block-param-${spec.key}`;
45
47
  const [pickerOpen, setPickerOpen] = useState(false);
46
48
  const mediaId = spec.type === "image" ? (value ?? null) : null;
@@ -67,7 +69,7 @@ function BlockParamField({ spec, value, onChange, error }) {
67
69
  case "choice":
68
70
  return (_jsx(PropertyField, { label: spec.label, htmlFor: fieldId, error: error, children: _jsx("select", { id: fieldId, value: value ?? "", onChange: (event) => onChange(event.target.value), className: "h-10 w-full rounded-md border border-border-strong bg-background-elevated px-3 text-sm text-text-primary focus-visible:border-primary-600 focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-primary-50", children: (spec.options ?? []).map((option) => (_jsx("option", { value: option, children: option }, option))) }) }));
69
71
  case "image":
70
- return (_jsxs(PropertyField, { label: spec.label, error: error, children: [_jsxs("div", { className: "flex items-center gap-3 rounded-md border border-border-default bg-background-subtle p-2", children: [preview ? (_jsx("img", { src: preview.downloadUrl, alt: "", className: "h-10 w-10 shrink-0 rounded-md object-cover" })) : (_jsx("div", { "aria-hidden": "true", className: "h-10 w-10 shrink-0 rounded-md bg-background-hover" })), _jsx("span", { className: "flex-1 truncate text-sm text-text-secondary", children: preview?.filename ?? "No image selected" }), _jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => setPickerOpen(true), children: "Change" })] }), pickerOpen && (_jsx(MediaPicker
72
+ return (_jsxs(PropertyField, { label: spec.label, error: error, children: [_jsxs("div", { className: "flex items-center gap-3 rounded-md border border-border-default bg-background-subtle p-2", children: [preview ? (_jsx("img", { src: preview.downloadUrl, alt: "", className: "h-10 w-10 shrink-0 rounded-md object-cover" })) : (_jsx("div", { "aria-hidden": "true", className: "h-10 w-10 shrink-0 rounded-md bg-background-hover" })), _jsx(TruncatedText, { className: "flex-1 truncate text-sm text-text-secondary", children: preview?.filename ?? s("blockPanel.noImage") }), _jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => setPickerOpen(true), children: s("blockPanel.change") })] }), pickerOpen && (_jsx(MediaPicker
71
73
  // A block param stores the media id and nothing else, so
72
74
  // there is nowhere for alt text to go: asking for it here
73
75
  // would be collecting something this field then discards.
@@ -90,7 +92,8 @@ function BlockParamField({ spec, value, onChange, error }) {
90
92
  // The form-view/on-page distinction is only ever about the surrounding
91
93
  // panel shell, never about how a param is edited.
92
94
  export function BlockParamFields({ listing, listingsError, params, onChange, fieldErrors }) {
93
- return (_jsxs(_Fragment, { children: [!listing && listingsError && _jsx("p", { className: "text-sm text-danger-600", children: listingsError }), !listing && !listingsError && (_jsx("p", { className: "text-sm text-text-secondary", children: "This block's fields couldn't be loaded. Its template declaration may be missing or the render service is unavailable." })), listing?.params.map((spec) => (_jsx(BlockParamField, { spec: spec, value: params[spec.key], onChange: (next) => onChange(spec.key, next), error: fieldErrors?.[spec.key] }, spec.key)))] }));
95
+ const s = useSdkString();
96
+ return (_jsxs(_Fragment, { children: [!listing && listingsError && _jsx("p", { className: "text-sm text-danger-600", children: listingsError }), !listing && !listingsError && (_jsx("p", { className: "text-sm text-text-secondary", children: s("blockPanel.fieldsUnavailable") })), listing?.params.map((spec) => (_jsx(BlockParamField, { spec: spec, value: params[spec.key], onChange: (next) => onChange(spec.key, next), error: fieldErrors?.[spec.key] }, spec.key)))] }));
94
97
  }
95
98
  // The mockup's right-hand settings panel (screen 1) for the form view: a
96
99
  // modal over the editor (Dialog, per packages/ui: MediaPicker moved to
@@ -105,6 +108,7 @@ export function BlockParamFields({ listing, listingsError, params, onChange, fie
105
108
  // panel visibility is just a read of editor state, not separate
106
109
  // open/close state duplicated here.
107
110
  export function BlockPanel({ editor, pos, partial, params }) {
111
+ const s = useSdkString();
108
112
  const { listings, error: listingsError } = useBlockListings();
109
113
  const listing = listings.find((entry) => entry.alias === partial) ?? null;
110
114
  // "at the node's position" (S197 Task 3 brief): setNodeSelection(pos)
@@ -161,7 +165,7 @@ export function BlockPanel({ editor, pos, partial, params }) {
161
165
  // editor, so this is a real guard, not defensive-for-its-own-sake.
162
166
  if (!editor.isDestroyed)
163
167
  editor.commands.focus();
164
- }, className: "flex max-h-[80vh] max-w-sm flex-col gap-0 p-0", children: [_jsxs(DialogHeader, { className: "border-b border-border-default px-4 py-3", children: [_jsxs("div", { className: "flex flex-col gap-px", children: [_jsx(DialogTitle, { children: listing?.name ?? partial }), _jsxs("span", { className: "font-mono text-xs text-text-tertiary", children: ["partial: ", partial, ".liquid"] })] }), _jsx(DialogCloseButton, { "aria-label": "Close" })] }), _jsxs("div", { className: "flex flex-1 flex-col gap-4 overflow-y-auto p-4", children: [_jsx(BlockParamFields, { listing: listing, listingsError: listingsError, params: params, onChange: updateParam }), _jsxs("p", { className: "rounded-md border border-border-default bg-background-subtle p-2 text-xs text-text-secondary", children: [_jsx("b", { className: "font-semibold text-text-primary", children: "Live preview." }), " This block is rendered by your own template on the server. What you see on the page is exactly what visitors will get."] })] }), _jsxs(DialogFooter, { className: "mt-0 justify-start border-t border-border-default p-4", children: [_jsx(Button, { type: "button", variant: "ghost", className: "text-danger-600 hover:text-danger-700", onClick: handleRemove, children: "Remove block" }), _jsx(Button, { type: "button", className: "ms-auto", onClick: moveSelectionPastBlock, children: "Done" })] })] }) }));
168
+ }, className: "flex max-h-[80vh] max-w-sm flex-col gap-0 p-0", children: [_jsxs(DialogHeader, { className: "border-b border-border-default px-4 py-3", children: [_jsxs("div", { className: "flex flex-col gap-px", children: [_jsx(DialogTitle, { children: listing?.name ?? partial }), _jsx("span", { className: "font-mono text-xs text-text-tertiary", children: s("blockPanel.partial", { partial }) })] }), _jsx(DialogCloseButton, { "aria-label": s("blockPanel.close") })] }), _jsxs("div", { className: "flex flex-1 flex-col gap-4 overflow-y-auto p-4", children: [_jsx(BlockParamFields, { listing: listing, listingsError: listingsError, params: params, onChange: updateParam }), _jsxs("p", { className: "rounded-md border border-border-default bg-background-subtle p-2 text-xs text-text-secondary", children: [_jsx("b", { className: "font-semibold text-text-primary", children: s("blockPanel.livePreview") }), " ", s("blockPanel.livePreviewBody")] })] }), _jsxs(DialogFooter, { className: "mt-0 justify-start border-t border-border-default p-4", children: [_jsx(Button, { type: "button", variant: "ghost", className: "text-danger-600 hover:text-danger-700", onClick: handleRemove, children: s("blockPanel.removeBlock") }), _jsx(Button, { type: "button", className: "ms-auto", onClick: moveSelectionPastBlock, children: s("blockPanel.done") })] })] }) }));
165
169
  }
166
170
  // The chip's "preview ⤢" affordance (S197 mockup screen 3): fetches
167
171
  // POST /api/manage/v1/render/block for the block's CURRENT params and shows the
@@ -171,6 +175,7 @@ export function BlockPanel({ editor, pos, partial, params }) {
171
175
  // which is inherently a physical measurement: plain `top`/`left` here,
172
176
  // not logical properties, matches how that rect is expressed.
173
177
  export function BlockPreviewPopover({ partial, params, anchorRect, onClose }) {
178
+ const s = useSdkString();
174
179
  const fetchApi = usePluginApi();
175
180
  const [html, setHtml] = useState(null);
176
181
  const [loading, setLoading] = useState(true);
@@ -187,7 +192,7 @@ export function BlockPreviewPopover({ partial, params, anchorRect, onClose }) {
187
192
  })
188
193
  .then(async (response) => {
189
194
  if (!response.ok)
190
- throw new Error(`Failed to render preview (${response.status})`);
195
+ throw new Error(s("blockPanel.previewFailed", { status: response.status }));
191
196
  const body = (await response.json());
192
197
  if (!cancelled)
193
198
  setHtml(body.html);
@@ -206,7 +211,7 @@ export function BlockPreviewPopover({ partial, params, anchorRect, onClose }) {
206
211
  // params is a fresh object per render (rich-text-view.tsx reads it off
207
212
  // node attrs each time): comparing it by reference would refetch on
208
213
  // every unrelated re-render, so key on its serialized form instead.
209
- }, [partial, JSON.stringify(params), fetchApi]);
214
+ }, [partial, JSON.stringify(params), fetchApi, s]);
210
215
  useEffect(() => {
211
216
  function handlePointerDown(event) {
212
217
  if (popoverRef.current && !popoverRef.current.contains(event.target))
@@ -227,5 +232,5 @@ export function BlockPreviewPopover({ partial, params, anchorRect, onClose }) {
227
232
  if (event.key === "Escape")
228
233
  onClose();
229
234
  }
230
- return (_jsxs("div", { ref: popoverRef, role: "dialog", "aria-label": `Preview: ${partial}`, onKeyDown: handleKeyDownCapture, style: { position: "fixed", top: anchorRect.bottom + 4, left: anchorRect.left }, className: "z-20 w-72 rounded-md border border-border-default bg-background-elevated p-2 shadow-xl", children: [loading && _jsx("p", { className: "text-xs text-text-secondary", children: "Loading preview\u2026" }), error && _jsx("p", { className: "text-xs text-danger-600", children: error }), !loading && !error && (_jsx("iframe", { title: `Preview: ${partial}`, srcDoc: html ?? "", sandbox: "", className: "h-44 w-full rounded-sm border border-border-subtle bg-background-elevated" }))] }));
235
+ return (_jsxs("div", { ref: popoverRef, role: "dialog", "aria-label": s("blockPanel.previewLabel", { partial }), onKeyDown: handleKeyDownCapture, style: { position: "fixed", top: anchorRect.bottom + 4, left: anchorRect.left }, className: "z-20 w-72 rounded-md border border-border-default bg-background-elevated p-2 shadow-xl", children: [loading && _jsx("p", { className: "text-xs text-text-secondary", children: s("blockPanel.previewLoading") }), error && _jsx("p", { className: "text-xs text-danger-600", children: error }), !loading && !error && (_jsx("iframe", { title: s("blockPanel.previewLabel", { partial }), srcDoc: html ?? "", sandbox: "", className: "h-44 w-full rounded-sm border border-border-subtle bg-background-elevated" }))] }));
231
236
  }
@@ -3,7 +3,7 @@ import Image from "@tiptap/extension-image";
3
3
  import Link from "@tiptap/extension-link";
4
4
  // tiptap 3.31 ships table's row/header/cell as named exports of this ONE
5
5
  // package (not the separate @tiptap/extension-table-row/-cell/-header
6
- // packages older tiptap majors used) — no extra dependencies needed.
6
+ // packages older tiptap majors used): no extra dependencies needed.
7
7
  import { Table, TableRow, TableHeader, TableCell } from "@tiptap/extension-table";
8
8
  import { TextStyleClass } from "./text-style-class.js";
9
9
  import { KardalumBlock, KardalumBlockOnPage } from "./kardalum-block.js";
@@ -11,7 +11,7 @@ export { TextStyleClass } from "./text-style-class.js";
11
11
  export { KardalumBlock, KardalumBlockOnPage, selectedKardalumBlock, findKardalumBlocks, setBlockHtml, unavailableBlockHtml, moveSelectionPastBlock, } from "./kardalum-block.js";
12
12
  // The media-library image node (S197 spec §3 "Content shape"): `mediaId`
13
13
  // is the reference the server resolves at render/edit time, never a raw
14
- // pasted URL — `src`/`alt` (the base extension's own attrs) are what the
14
+ // pasted URL: `src`/`alt` (the base extension's own attrs) are what the
15
15
  // editor shows once resolved, kept in sync by whichever mount inserts the
16
16
  // image (this package's toolbar today; the on-page iframe editor later).
17
17
  const KardalumImage = Image.extend({
@@ -35,13 +35,13 @@ const KardalumImage = Image.extend({
35
35
  // THE shared TipTap extension set (S197 spec §3: "one TipTap editor
36
36
  // definition, mounted two ways"). This package's form-view editor
37
37
  // (rich-text-view.tsx) consumes it today; the on-page iframe editor (a
38
- // later task, spec §6.3 — a vanilla @tiptap/core instance, no React)
38
+ // later task, spec §6.3, a vanilla @tiptap/core instance, no React)
39
39
  // consumes it unchanged. A mount-specific need (a bubble menu, an insert
40
40
  // popover) belongs in that mount's own UI layer, never forked in here.
41
41
  export function buildRichtextExtensions(options = {}) {
42
42
  const { blockRenderMode = "chip" } = options;
43
43
  return [
44
- // StarterKit bundles its own Link internally (tiptap 3.31) — disabled
44
+ // StarterKit bundles its own Link internally (tiptap 3.31), disabled
45
45
  // here so this package's own Link instance (prompt-free popover input,
46
46
  // spec-listed as its own extension) is the only one registered; two
47
47
  // instances of the same mark name throws.
@@ -52,9 +52,9 @@ export function buildRichtextExtensions(options = {}) {
52
52
  blockRenderMode === "onPage" ? KardalumBlockOnPage : KardalumBlock,
53
53
  // Registered as its own four-node set (S197 Task 11: the on-page
54
54
  // insert menu's "Table" row needs a real `insertTable` command on
55
- // BOTH mounts — form-view and the vanilla iframe editor — since this
56
- // is the one shared extension list both consume). `resizable: false`
57
- // — column dragging needs floating-ui-style pointer tracking this
55
+ // BOTH mounts (form-view and the vanilla iframe editor), since this
56
+ // is the one shared extension list both consume). `resizable: false`:
57
+ // column dragging needs floating-ui-style pointer tracking this
58
58
  // project doesn't wire up anywhere yet; a fixed 3x3 grid (the insert
59
59
  // menu's only entry point) needs none of that.
60
60
  Table.configure({ resizable: false }),
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from "react";
3
3
  import { cn } from "@kardalum/ui";
4
4
  import { MANAGE_API, usePluginApi } from "../plugin-context.js";
5
+ import { useSdkString } from "../sdk-strings.js";
5
6
  // The value a freshly inserted block's params start with, before the user
6
7
  // has touched anything in the param panel (S197 Task 3 brief, "Inserting a
7
8
  // block": defaults: text/textarea "", number 0, boolean false, image
@@ -36,9 +37,10 @@ export function defaultBlockParams(params) {
36
37
  // a silent empty list). Shared between the insert menu (BlockInsertMenu,
37
38
  // below) and the param panel (block-panel.tsx needs the same declared
38
39
  // param specs + labels to render fields for a block already in the
39
- // document) — one fetch shape, not forked per consumer.
40
+ // document): one fetch shape, not forked per consumer.
40
41
  export function useBlockListings() {
41
42
  const fetchApi = usePluginApi();
43
+ const s = useSdkString();
42
44
  const [listings, setListings] = useState([]);
43
45
  const [loading, setLoading] = useState(true);
44
46
  const [error, setError] = useState(null);
@@ -49,7 +51,7 @@ export function useBlockListings() {
49
51
  fetchApi(`${MANAGE_API}/render/blocks`)
50
52
  .then(async (response) => {
51
53
  if (!response.ok)
52
- throw new Error(`Failed to load blocks (${response.status})`);
54
+ throw new Error(s("blockMenu.loadFailed", { status: response.status }));
53
55
  const body = await response.json();
54
56
  if (!cancelled)
55
57
  setListings(Array.isArray(body) ? body : []);
@@ -65,10 +67,10 @@ export function useBlockListings() {
65
67
  return () => {
66
68
  cancelled = true;
67
69
  };
68
- }, [fetchApi]);
70
+ }, [fetchApi, s]);
69
71
  return { listings, loading, error };
70
72
  }
71
- // The toolbar's "◫ Block ▾" popover body (S197 mockup screen 2, "Blocks —
73
+ // The toolbar's "◫ Block ▾" popover body (S197 mockup screen 2, "Blocks:
72
74
  // from your templates" section): an ARIA listbox, same single-select
73
75
  // pattern as StyleListbox (rich-text-view.tsx): roving tabindex,
74
76
  // Arrow/Home/End move focus, Enter/Space commits, Escape closes.
@@ -76,20 +78,21 @@ export function useBlockListings() {
76
78
  // Screen 2's mockup also shows Image/Quote/Table rows above the blocks
77
79
  // list, but those are already reachable from this editor's own toolbar
78
80
  // (the "🖼 Image" button, the "❝" blockquote button) or out of scope (no
79
- // Table extension exists yet) — this menu covers only what "◫ Block ▾" is
81
+ // Table extension exists yet), so this menu covers only what "◫ Block ▾" is
80
82
  // for: inserting a template-declared block.
81
83
  export function BlockInsertMenu({ onInsert, onClose }) {
84
+ const s = useSdkString();
82
85
  const { listings, loading, error } = useBlockListings();
83
86
  const [activeIndex, setActiveIndex] = useState(0);
84
87
  const optionRefs = useRef([]);
85
88
  if (loading) {
86
- return (_jsx("div", { role: "listbox", "aria-label": "Blocks", className: "min-w-64 p-2 text-xs text-text-secondary", children: "Loading\u2026" }));
89
+ return (_jsx("div", { role: "listbox", "aria-label": s("blockMenu.label"), className: "min-w-64 p-2 text-xs text-text-secondary", children: s("blockMenu.loading") }));
87
90
  }
88
91
  if (error) {
89
- return (_jsx("div", { role: "listbox", "aria-label": "Blocks", className: "min-w-64 p-2 text-xs text-danger-600", children: error }));
92
+ return (_jsx("div", { role: "listbox", "aria-label": s("blockMenu.label"), className: "min-w-64 p-2 text-xs text-danger-600", children: error }));
90
93
  }
91
94
  if (listings.length === 0) {
92
- return (_jsx("div", { role: "listbox", "aria-label": "Blocks", className: "min-w-64 p-2 text-xs text-text-secondary", children: "No blocks declared by your templates yet." }));
95
+ return (_jsx("div", { role: "listbox", "aria-label": s("blockMenu.label"), className: "min-w-64 p-2 text-xs text-text-secondary", children: s("blockMenu.empty") }));
93
96
  }
94
97
  function focusIndex(index) {
95
98
  setActiveIndex(index);
@@ -133,7 +136,7 @@ export function BlockInsertMenu({ onInsert, onClose }) {
133
136
  return;
134
137
  }
135
138
  }
136
- return (_jsxs("div", { role: "listbox", "aria-label": "Blocks", onKeyDown: handleKeyDown, className: "min-w-64 p-1", children: [_jsx("div", { className: "px-2 py-1 text-xs font-semibold text-text-tertiary", children: "Blocks: from your templates" }), listings.map((listing, index) => {
139
+ return (_jsxs("div", { role: "listbox", "aria-label": s("blockMenu.label"), onKeyDown: handleKeyDown, className: "min-w-64 p-1", children: [_jsx("div", { className: "px-2 py-1 text-xs font-semibold text-text-tertiary", children: s("blockMenu.heading") }), listings.map((listing, index) => {
137
140
  const selected = index === activeIndex;
138
141
  return (_jsxs("div", { ref: (el) => {
139
142
  optionRefs.current[index] = el;
@@ -1,19 +1,21 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo, useRef, useState } from "react";
3
3
  import { cn } from "@kardalum/ui";
4
+ import { useSdkString } from "../sdk-strings.js";
4
5
  // The Aa Style dropdown's popover body: a proper ARIA listbox (role
5
- // listbox/option), not a menu — it's a single-select "pick one" widget,
6
+ // listbox/option), not a menu: it's a single-select "pick one" widget,
6
7
  // same pattern as IconPickerDialog's grid (roving tabindex, Arrow/Home/End,
7
8
  // Enter/Space commits).
8
9
  export function StyleListbox({ styles, loading, activeStyleKey, onSelect, onClear, onClose }) {
9
10
  const options = useMemo(() => [...styles.map((style) => ({ kind: "style", style })), { kind: "clear" }], [styles]);
11
+ const s = useSdkString();
10
12
  const [activeIndex, setActiveIndex] = useState(0);
11
13
  const optionRefs = useRef([]);
12
14
  if (loading) {
13
- return (_jsx("div", { role: "listbox", "aria-label": "Text styles", className: "min-w-44 p-2 text-xs text-text-secondary", children: "Loading\u2026" }));
15
+ return (_jsx("div", { role: "listbox", "aria-label": s("styleMenu.label"), className: "min-w-44 p-2 text-xs text-text-secondary", children: s("styleMenu.loading") }));
14
16
  }
15
17
  if (styles.length === 0) {
16
- return (_jsx("div", { role: "listbox", "aria-label": "Text styles", className: "min-w-44 p-2 text-xs text-text-secondary", children: "No theme styles declared" }));
18
+ return (_jsx("div", { role: "listbox", "aria-label": s("styleMenu.label"), className: "min-w-44 p-2 text-xs text-text-secondary", children: s("styleMenu.none") }));
17
19
  }
18
20
  function focusIndex(index) {
19
21
  setActiveIndex(index);
@@ -60,10 +62,10 @@ export function StyleListbox({ styles, loading, activeStyleKey, onSelect, onClea
60
62
  return;
61
63
  }
62
64
  }
63
- return (_jsx("div", { role: "listbox", "aria-label": "Text styles", onKeyDown: handleKeyDown, className: "min-w-44 p-1", children: options.map((option, index) => {
65
+ return (_jsx("div", { role: "listbox", "aria-label": s("styleMenu.label"), onKeyDown: handleKeyDown, className: "min-w-44 p-1", children: options.map((option, index) => {
64
66
  const selected = option.kind === "style" && option.style.key === activeStyleKey;
65
67
  return (_jsx("div", { ref: (el) => {
66
68
  optionRefs.current[index] = el;
67
- }, role: "option", "aria-selected": selected, tabIndex: index === activeIndex ? 0 : -1, onFocus: () => setActiveIndex(index), onClick: () => commit(index), className: cn("cursor-pointer rounded-sm px-2 py-1 text-sm outline-hidden", "focus-visible:ring-2 focus-visible:ring-primary-600", selected ? "bg-primary-100 text-primary-800" : "text-text-primary hover:bg-background-hover", option.kind === "clear" && "mt-1 border-t border-border-default pt-1 text-text-secondary"), children: option.kind === "style" ? option.style.label : "Clear style" }, option.kind === "style" ? option.style.key : "__clear__"));
69
+ }, role: "option", "aria-selected": selected, tabIndex: index === activeIndex ? 0 : -1, onFocus: () => setActiveIndex(index), onClick: () => commit(index), className: cn("cursor-pointer rounded-sm px-2 py-1 text-sm outline-hidden", "focus-visible:ring-2 focus-visible:ring-primary-600", selected ? "bg-primary-100 text-primary-800" : "text-text-primary hover:bg-background-hover", option.kind === "clear" && "mt-1 border-t border-border-default pt-1 text-text-secondary"), children: option.kind === "style" ? option.style.label : s("styleMenu.clear") }, option.kind === "style" ? option.style.key : "__clear__"));
68
70
  }) }));
69
71
  }
@@ -9,7 +9,7 @@ export const TextStyleClass = Mark.create({
9
9
  return {
10
10
  styleKey: {
11
11
  default: null,
12
- // The class carries the value — nothing to read from a bare
12
+ // The class carries the value, so there is nothing to read from a bare
13
13
  // attribute, and nothing to render as one (see renderHTML below,
14
14
  // which builds the class directly from mark.attrs.styleKey).
15
15
  parseHTML: (element) => STYLE_KEY_PATTERN.exec(element.getAttribute("class") ?? "")?.[1] ?? null,
@@ -0,0 +1,285 @@
1
+ import { type ReactNode } from "react";
2
+ export declare const SDK_STRINGS_EN: {
3
+ readonly "shared.unexpectedAnswer": "unexpected answer";
4
+ readonly "shared.uploadFailed": "Upload failed ({{status}})";
5
+ readonly "shared.mediaStoreSwitchedOff": "The media store was switched off while the file was saved. Upload it again.";
6
+ readonly "text.placeholderLabel": "Placeholder text";
7
+ readonly "text.maxLengthLabel": "Max length";
8
+ readonly "text.maxLengthHelp": "Blocks typing past this many characters. Leave blank for no limit.";
9
+ readonly "boolean.yes": "Yes";
10
+ readonly "boolean.no": "No";
11
+ readonly "dateRange.start": "Start";
12
+ readonly "dateRange.end": "End";
13
+ readonly "html.loading": "Loading code editor…";
14
+ readonly "html.trustedLabel": "Trusted";
15
+ readonly "html.trustedHelp": "Trusted HTML renders exactly as written: including scripts. Only enable for fields edited by people you'd let deploy code.";
16
+ readonly "contentList.caption": "Children";
17
+ readonly "contentList.pageOnly": "Shown on a page's editing screen.";
18
+ readonly "contentList.propertyName": "Name";
19
+ readonly "contentList.propertyId": "Id";
20
+ readonly "contentList.propertyUrl": "URL";
21
+ readonly "contentList.propertyStatus": "Status";
22
+ readonly "contentList.propertyUpdatedAt": "Updated";
23
+ readonly "contentList.propertyPublishedAt": "Published";
24
+ readonly "contentList.statusDraft": "Draft";
25
+ readonly "contentList.statusPublished": "Published";
26
+ readonly "contentList.statusChanges": "Changes not published";
27
+ readonly "contentList.loadError": "Could not load the children.";
28
+ readonly "contentList.restrictedForYou": "Restricted for you";
29
+ readonly "contentList.restricted": "Restricted";
30
+ readonly "contentList.yes": "Yes";
31
+ readonly "contentList.no": "No";
32
+ readonly "contentList.valueRichText": "Rich text";
33
+ readonly "contentList.valueImage": "Image";
34
+ readonly "contentList.valueDateRange": "Date range";
35
+ readonly "contentList.value": "Value";
36
+ readonly "contentList.search": "Search by name";
37
+ readonly "contentList.new": "New";
38
+ readonly "contentList.retry": "Retry";
39
+ readonly "contentList.loading": "Loading…";
40
+ readonly "contentList.noMatches": "Nothing matches.";
41
+ readonly "contentList.noChildren": "No children yet.";
42
+ readonly "contentList.loadMore": "Load more";
43
+ readonly "contentListSettings.fieldColumn": "{{alias}} ({{type}}: {{field}})";
44
+ readonly "contentListSettings.label": "Label";
45
+ readonly "contentListSettings.moveUp": "Move up";
46
+ readonly "contentListSettings.moveUpNamed": "Move up {{column}}";
47
+ readonly "contentListSettings.moveDown": "Move down";
48
+ readonly "contentListSettings.moveDownNamed": "Move down {{column}}";
49
+ readonly "contentListSettings.remove": "Remove";
50
+ readonly "contentListSettings.removeNamed": "Remove {{column}}";
51
+ readonly "contentListSettings.addColumn": "Add column";
52
+ readonly "contentListSettings.chooseColumn": "Choose a column";
53
+ readonly "contentListSettings.properties": "Properties";
54
+ readonly "contentListSettings.fieldOption": "{{field}} ({{alias}})";
55
+ readonly "contentListSettings.otherAlias": "Other alias";
56
+ readonly "contentListSettings.add": "Add";
57
+ readonly "crop.cannotCut": "This format cannot be cut.";
58
+ readonly "crop.notCut": "Not cut yet.";
59
+ readonly "crop.cutRegion": "Cut from a region {{width}} wide and {{height}} tall.";
60
+ readonly "crop.ratio": "Ratio {{ratio}}";
61
+ readonly "crop.noRatio": "No ratio set.";
62
+ readonly "crop.savesAs": "Saves as the {{name}} rendition.";
63
+ readonly "crop.maxWidth": "At most {{width}} px wide.";
64
+ readonly "crop.ratioError": "A ratio looks like 3:4, with no leading zeros.";
65
+ readonly "crop.maxWidthError": "A maximum width is a whole number of pixels, at least 1.";
66
+ readonly "crop.ratioLabel": "Ratio";
67
+ readonly "crop.required": "Required";
68
+ readonly "crop.ratioHelp": "The shape the cropper locks to, width first, such as 3:4.";
69
+ readonly "crop.maxWidthLabel": "Maximum width";
70
+ readonly "crop.maxWidthHelp": "A ceiling in pixels. Leave blank for none: the cut then keeps the source region's own resolution, and it never enlarges.";
71
+ readonly "thumbnail.cannotCut": "This format cannot be cut.";
72
+ readonly "thumbnail.automatic": "Automatic";
73
+ readonly "thumbnail.longestEdge": "Longest edge {{size}} px.";
74
+ readonly "thumbnail.savesAs": "Saves as the {{name}} rendition.";
75
+ readonly "thumbnail.longestEdgeError": "A longest edge is a whole number of pixels, at least 1.";
76
+ readonly "thumbnail.longestEdgeLabel": "Longest edge";
77
+ readonly "thumbnail.required": "Required";
78
+ readonly "thumbnail.longestEdgeHelp": "The thumbnail's longer side in pixels. The shorter side follows the source's own shape.";
79
+ readonly "fileUpload.size": "{{size}} bytes";
80
+ readonly "fileUpload.accepts": "Accepts: {{extensions}}";
81
+ readonly "fileUpload.acceptsAny": "Accepts any file type.";
82
+ readonly "fileUpload.noFile": "No file yet.";
83
+ readonly "fileUpload.extensionsLabel": "Accepted extensions";
84
+ readonly "fileUpload.extensionsHelp": "Comma-separated extensions, no dot, e.g. jpg,png,pdf. Leave blank to accept any file.";
85
+ readonly "fileUpload.maxSizeLabel": "Max file size (bytes)";
86
+ readonly "fileUpload.maxSizeHelp": "e.g. 5000000 for ~5MB. Leave blank for no limit. Enforced on upload and on replace.";
87
+ readonly "image.loadFailed": "Failed to load media ({{status}})";
88
+ readonly "image.loading": "Loading…";
89
+ readonly "image.cropOf": "{{crop}} of {{file}}";
90
+ readonly "image.fullImage": "full image";
91
+ readonly "image.tooLarge": "File is too large ({{size}} bytes): the configured limit is {{limit}} bytes.";
92
+ readonly "image.choose": "Choose";
93
+ readonly "image.upload": "Upload";
94
+ readonly "image.uploading": "Uploading…";
95
+ readonly "image.remove": "Remove";
96
+ readonly "image.uploadAria": "Upload an image";
97
+ readonly "image.asksFor": "This field asks for the {{shape}} rendition. An image without one is shown at full size.";
98
+ readonly "image.documentTypesFailed": "Failed to load document types ({{detail}})";
99
+ readonly "image.dataTypesFailed": "Failed to load data types ({{detail}})";
100
+ readonly "image.loadingCrops": "Loading the crops your media types declare…";
101
+ readonly "image.typesTruncated": "Only the first {{limit}} types could be read, so a crop declared beyond them is missing from this list.";
102
+ readonly "image.acceptedTypesLabel": "Accepted file types";
103
+ readonly "image.acceptedTypesHelp": "Comma-separated MIME types, e.g. image/png,image/jpeg. Leave blank to accept any image.";
104
+ readonly "image.maxSizeLabel": "Max file size (bytes)";
105
+ readonly "image.maxSizeHelp": "e.g. 5000000 for ~5MB. Leave blank for no limit.";
106
+ readonly "image.cropLabel": "Crop";
107
+ readonly "image.cropHelp": "The shape this field asks its picture for. A page gets that crop when the picture has one, and the full image when it does not.";
108
+ readonly "image.noCrop": "No particular crop";
109
+ readonly "image.undeclaredCrop": "{{shape}} (no media type declares this crop)";
110
+ readonly "image.cropChoice": "{{caption}} {{shape}}";
111
+ readonly "picker.root": "Root";
112
+ readonly "picker.foldersFailed": "Failed to load media folders ({{detail}})";
113
+ readonly "picker.foldersTruncated": "Only the first {{limit}} media folders could be read";
114
+ readonly "picker.loadFailed": "Failed to load media ({{status}})";
115
+ readonly "picker.title": "Choose an image";
116
+ readonly "picker.description": "Showing images from your library.";
117
+ readonly "picker.asksForCrop": "This field asks for a {{shape}} crop.";
118
+ readonly "picker.location": "Folder location";
119
+ readonly "picker.folders": "Folders";
120
+ readonly "picker.loading": "Loading…";
121
+ readonly "picker.nothingAccepted": "Nothing here is a kind this field accepts.";
122
+ readonly "picker.emptyLibrary": "No images in the media library yet.";
123
+ readonly "picker.emptyFolder": "No images in this folder yet.";
124
+ readonly "picker.library": "Media library";
125
+ readonly "picker.neverCut": "{{file}}: this format is never cut, so this field shows the full image.";
126
+ readonly "picker.noCropYet": "{{file}}: no {{shape}} crop yet, so this field shows the full image.";
127
+ readonly "picker.fullImage": "full image";
128
+ readonly "picker.loadMore": "Load more";
129
+ readonly "picker.altLabel": "Alt text";
130
+ readonly "picker.altPlaceholder": "Describe this image for screen readers (optional)";
131
+ readonly "picker.uploadPrompt": "Or {{action}}";
132
+ readonly "picker.uploadInto": "upload into {{folder}}";
133
+ readonly "picker.uploadingInto": "uploading into {{folder}}…";
134
+ readonly "picker.uploadIntoAria": "Upload into {{folder}}";
135
+ readonly "picker.cancel": "Cancel";
136
+ readonly "picker.insert": "Insert";
137
+ readonly "picker.close": "Close";
138
+ readonly "richText.toolbar": "Formatting";
139
+ readonly "richText.boldMark": "B";
140
+ readonly "richText.bold": "Bold";
141
+ readonly "richText.italicMark": "I";
142
+ readonly "richText.italic": "Italic";
143
+ readonly "richText.link": "Link";
144
+ readonly "richText.linkUrl": "Link URL";
145
+ readonly "richText.removeLink": "Remove link";
146
+ readonly "richText.apply": "Apply";
147
+ readonly "richText.h2Mark": "H2";
148
+ readonly "richText.heading2": "Heading 2";
149
+ readonly "richText.h3Mark": "H3";
150
+ readonly "richText.heading3": "Heading 3";
151
+ readonly "richText.quote": "Quote";
152
+ readonly "richText.list": "List";
153
+ readonly "richText.bulletedList": "Bulleted list";
154
+ readonly "richText.style": "Style";
155
+ readonly "richText.image": "Image";
156
+ readonly "richText.block": "Block";
157
+ readonly "richText.source": "Source";
158
+ readonly "richText.toggleSource": "Toggle HTML source view";
159
+ readonly "richText.editOnPage": "Edit on page";
160
+ readonly "richText.sourceStale": "Content changed elsewhere. Leaving source view will overwrite it.";
161
+ readonly "richText.sourceLabel": "HTML source";
162
+ readonly "styleMenu.label": "Text styles";
163
+ readonly "styleMenu.loading": "Loading…";
164
+ readonly "styleMenu.none": "No theme styles declared";
165
+ readonly "styleMenu.clear": "Clear style";
166
+ readonly "blockMenu.label": "Blocks";
167
+ readonly "blockMenu.loading": "Loading…";
168
+ readonly "blockMenu.empty": "No blocks declared by your templates yet.";
169
+ readonly "blockMenu.heading": "Blocks: from your templates";
170
+ readonly "blockMenu.loadFailed": "Failed to load blocks ({{status}})";
171
+ readonly "blockPanel.close": "Close";
172
+ readonly "blockPanel.livePreview": "Live preview.";
173
+ readonly "blockPanel.livePreviewBody": "This block is rendered by your own template on the server. What you see on the page is exactly what visitors will get.";
174
+ readonly "blockPanel.removeBlock": "Remove block";
175
+ readonly "blockPanel.done": "Done";
176
+ readonly "blockPanel.change": "Change";
177
+ readonly "blockPanel.noImage": "No image selected";
178
+ readonly "blockPanel.partial": "partial: {{partial}}.liquid";
179
+ readonly "blockPanel.fieldsUnavailable": "This block's fields couldn't be loaded. Its template declaration may be missing or the render service is unavailable.";
180
+ readonly "blockPanel.previewLabel": "Preview: {{partial}}";
181
+ readonly "blockPanel.previewLoading": "Loading preview…";
182
+ readonly "blockPanel.previewFailed": "Failed to render preview ({{status}})";
183
+ readonly "simpleStorage.loadFailed": "Failed to load plugin value ({{status}})";
184
+ readonly "simpleStorage.saveFailed": "Failed to save plugin value ({{status}})";
185
+ readonly "simpleStorage.roleCannotRead": "Could not save this field. Your role cannot view pages.";
186
+ readonly "simpleStorage.roleCannotCreate": "Could not save this field. Your role cannot create pages.";
187
+ readonly "simpleStorage.roleCannotUpdate": "Could not save this field. Your role cannot edit pages.";
188
+ readonly "simpleStorage.roleCannotPublish": "Could not save this field. Your role cannot publish pages.";
189
+ readonly "simpleStorage.roleCannotDelete": "Could not save this field. Your role cannot delete pages.";
190
+ readonly "simpleStorage.restrictedRead": "Could not save this field. Viewing is restricted at {{place}} to: {{who}}.";
191
+ readonly "simpleStorage.restrictedCreate": "Could not save this field. Creating pages is restricted at {{place}} to: {{who}}.";
192
+ readonly "simpleStorage.restrictedUpdate": "Could not save this field. Editing is restricted at {{place}} to: {{who}}.";
193
+ readonly "simpleStorage.restrictedPublish": "Could not save this field. Publishing is restricted at {{place}} to: {{who}}.";
194
+ readonly "simpleStorage.restrictedDelete": "Could not save this field. Deleting is restricted at {{place}} to: {{who}}.";
195
+ readonly "simpleStorage.pageYouCannotView": "a page you cannot view";
196
+ readonly "simpleStorage.aUser": "a user";
197
+ readonly "simpleStorage.adminsOnly": "admins only";
198
+ readonly "simpleStorage.listSeparator": ", ";
199
+ };
200
+ /** Placeholder names an SDK string may not use. The admin hands a view's
201
+ * `vars` straight to i18next as its options, and i18next reads these names as
202
+ * instructions (which language, which namespace, a fallback text, an
203
+ * ordinal), not as values to put in a slot. `count` is the one exception
204
+ * with a rule: i18next picks a plural form by it, so it is allowed only in a
205
+ * plural form's key (`<name>_one`, `<name>_other`, ...), where choosing the
206
+ * form is what it is for. A test holds SDK_STRINGS_EN to this list. */
207
+ export declare const RESERVED_SDK_VARIABLES: readonly string[];
208
+ export type SdkStringKey = keyof typeof SDK_STRINGS_EN;
209
+ export type SdkStringVars = Record<string, string | number>;
210
+ /** What the host answers a key with: the admin binds it to its own `sdk` strings. */
211
+ export type SdkTranslate = (key: SdkStringKey, vars?: SdkStringVars) => string;
212
+ export type AdminDirection = "ltr" | "rtl";
213
+ /** `{{name}}` replaced from `vars` by one left-to-right scan (no pattern
214
+ * matching over the text). A name `vars` does not hold, and a `{{` that is
215
+ * never closed, stay as they are. */
216
+ export declare function interpolateSdkString(template: string, vars: SdkStringVars | undefined): string;
217
+ interface SdkHost {
218
+ t: SdkTranslate;
219
+ dir: AdminDirection;
220
+ locale: string | undefined;
221
+ lang: string | undefined;
222
+ }
223
+ export interface SdkHostProviderProps {
224
+ t: SdkTranslate;
225
+ dir: AdminDirection;
226
+ /** The BCP 47 tag the host wants dates and numbers formatted in. Omitted,
227
+ * the views format by the browser's own locale. */
228
+ locale?: string;
229
+ /** The admin's language as an HTML `lang` value ("ar", "de"), set on the
230
+ * views' chrome (buttons, labels, size lines) so a screen reader voices it
231
+ * in the admin's language and the language's type rules apply, even when
232
+ * the field sits inside the content's `lang`. Omitted, the chrome takes no
233
+ * `lang` of its own and inherits its ancestors'. */
234
+ lang?: string;
235
+ children: ReactNode;
236
+ }
237
+ /** Rendered once by the host admin, above every view it mounts. */
238
+ export declare function SdkHostProvider({ t, dir, locale, lang, children }: SdkHostProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<SdkHost | null>>;
239
+ /** The admin's language for a view's chrome: undefined outside a host, or
240
+ * when the host did not set one. */
241
+ export declare function useAdminLanguage(): string | undefined;
242
+ /** The attributes a view puts on its chrome root (S366f D10): the admin's
243
+ * direction always, and its language when the host gave one. A field's
244
+ * controls are the admin's words, so they read in the admin's order and
245
+ * voice even inside a field wrapped in the content's language. */
246
+ export declare function useAdminChromeProps(): {
247
+ dir: AdminDirection;
248
+ lang?: string;
249
+ };
250
+ export interface ContentLanguage {
251
+ /** The content's language, an HTML `lang` value. */
252
+ lang: string;
253
+ dir: AdminDirection;
254
+ }
255
+ export interface SdkContentLanguageProviderProps extends ContentLanguage {
256
+ children: ReactNode;
257
+ }
258
+ /** Rendered by the host around one field, with the language its value is
259
+ * written in. A view's typing surface nested inside its chrome (a search box,
260
+ * the media picker's alt text) reads it back through useContentTypingProps(). */
261
+ export declare function SdkContentLanguageProvider({ lang, dir, children }: SdkContentLanguageProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<ContentLanguage | null>>;
262
+ /** The field's content language, or undefined outside a host that set one. */
263
+ export declare function useContentLanguage(): ContentLanguage | undefined;
264
+ /** The attributes a typing surface inside a view's chrome takes: the
265
+ * content's `lang` and `dir`, or nothing (inherit) when no content language
266
+ * is known. */
267
+ export declare function useContentTypingProps(): {
268
+ lang?: string;
269
+ dir?: AdminDirection;
270
+ };
271
+ /** The host's formatting locale: undefined outside a host, or when the host
272
+ * did not set one, which is what `Intl` and `toLocaleString` read as "the
273
+ * browser's own". */
274
+ export declare function useSdkLocale(): string | undefined;
275
+ /** The words of the SDK's own views: the host's, or English outside one. */
276
+ export declare function useSdkString(): SdkTranslate;
277
+ /** The admin's direction, for chrome around content (a toolbar, a picker's
278
+ * controls) and for a plugin's own Radix roots, which cannot see the admin's
279
+ * direction provider. Outside a host, the document's own direction. */
280
+ export declare function useAdminDirection(): AdminDirection;
281
+ /** A sentence with React nodes in it (a name set in a code face, a button
282
+ * inside a sentence): the host translates the whole sentence, then the nodes
283
+ * are put back where the translation placed them. */
284
+ export declare function sdkStringWithNodes(s: SdkTranslate, key: SdkStringKey, nodes: Record<string, ReactNode>, vars?: SdkStringVars): ReactNode;
285
+ export {};