@kardalum/plugin-sdk 0.0.0-stage → 0.15.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 (312) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/LICENSE +202 -0
  3. package/README.md +70 -2
  4. package/dist/admin-section-registry.d.ts +34 -0
  5. package/dist/admin-section-registry.js +49 -0
  6. package/dist/built-in-serializers.d.ts +3 -0
  7. package/dist/built-in-serializers.js +18 -0
  8. package/dist/built-in-settings-schemas.d.ts +14 -0
  9. package/dist/built-in-settings-schemas.js +225 -0
  10. package/dist/built-in-value-schemas.d.ts +4 -0
  11. package/dist/built-in-value-schemas.js +47 -0
  12. package/dist/built-ins.d.ts +1 -0
  13. package/dist/built-ins.js +257 -0
  14. package/dist/capabilities.d.ts +99 -0
  15. package/dist/capabilities.js +363 -0
  16. package/dist/data-type-plugin.d.ts +28 -0
  17. package/dist/data-type-plugin.js +1 -0
  18. package/dist/datatype-validation.d.ts +26 -0
  19. package/dist/datatype-validation.js +110 -0
  20. package/dist/datatypes-entry.d.ts +4 -0
  21. package/dist/datatypes-entry.js +18 -0
  22. package/dist/define-plugin.d.ts +25 -0
  23. package/dist/define-plugin.js +51 -0
  24. package/dist/entitlement-entry.d.ts +5 -0
  25. package/dist/entitlement-entry.js +24 -0
  26. package/dist/entitlement-gate.d.ts +36 -0
  27. package/dist/entitlement-gate.js +201 -0
  28. package/dist/entitlement-types.d.ts +39 -0
  29. package/dist/entitlement-types.js +1 -0
  30. package/dist/entitlement.d.ts +57 -0
  31. package/dist/entitlement.js +170 -0
  32. package/dist/host-entry.d.ts +1 -0
  33. package/dist/host-entry.js +11 -0
  34. package/dist/icon-name.d.ts +1 -0
  35. package/dist/icon-name.js +1 -0
  36. package/dist/icons.d.ts +2 -0
  37. package/dist/icons.js +10 -0
  38. package/dist/index.d.ts +28 -0
  39. package/dist/index.js +93 -0
  40. package/dist/license-verdict-keys.d.ts +18 -0
  41. package/dist/license-verdict-keys.js +22 -0
  42. package/dist/local-host.d.ts +3 -0
  43. package/dist/local-host.js +38 -0
  44. package/dist/manifest-entry.d.ts +8 -0
  45. package/dist/manifest-entry.js +13 -0
  46. package/dist/manifest-schema.d.ts +408 -0
  47. package/dist/manifest-schema.js +774 -0
  48. package/dist/manifest.d.ts +546 -0
  49. package/dist/manifest.js +86 -0
  50. package/dist/media/media-picker.d.ts +39 -0
  51. package/dist/media/media-picker.js +438 -0
  52. package/dist/media/upload-error.d.ts +12 -0
  53. package/dist/media/upload-error.js +30 -0
  54. package/dist/plugin-context.d.ts +75 -0
  55. package/dist/plugin-context.js +70 -0
  56. package/dist/plugin-screen-context.d.ts +40 -0
  57. package/dist/plugin-screen-context.js +16 -0
  58. package/dist/register-built-ins.d.ts +1 -0
  59. package/dist/register-built-ins.js +41 -0
  60. package/dist/registry.d.ts +4 -0
  61. package/dist/registry.js +17 -0
  62. package/dist/rendition-eligibility.d.ts +24 -0
  63. package/dist/rendition-eligibility.js +40 -0
  64. package/dist/richtext/block-panel.d.ts +27 -0
  65. package/dist/richtext/block-panel.js +232 -0
  66. package/dist/richtext/extensions.d.ts +19 -0
  67. package/dist/richtext/extensions.js +56 -0
  68. package/dist/richtext/insert-menu.d.ts +24 -0
  69. package/dist/richtext/insert-menu.js +142 -0
  70. package/dist/richtext/kardalum-block.d.ts +33 -0
  71. package/dist/richtext/kardalum-block.js +282 -0
  72. package/dist/richtext/style-listbox.d.ts +10 -0
  73. package/dist/richtext/style-listbox.js +69 -0
  74. package/dist/richtext/text-style-class.d.ts +18 -0
  75. package/dist/richtext/text-style-class.js +36 -0
  76. package/dist/simple-storage-value-provider.d.ts +9 -0
  77. package/dist/simple-storage-value-provider.js +96 -0
  78. package/dist/structured-storage-types.d.ts +61 -0
  79. package/dist/structured-storage-types.js +11 -0
  80. package/dist/tailwind.d.ts +1 -0
  81. package/dist/tailwind.js +5 -0
  82. package/dist/tokens/system-dark.css +75 -0
  83. package/dist/tokens/tokens.css +239 -0
  84. package/dist/tokens/tokens.json +212 -0
  85. package/dist/tokens.d.ts +1 -0
  86. package/dist/tokens.js +11 -0
  87. package/dist/ui-entry.d.ts +5 -0
  88. package/dist/ui-entry.js +42 -0
  89. package/dist/views/content-list-preview.d.ts +1 -0
  90. package/dist/views/content-list-preview.js +14 -0
  91. package/dist/views/content-list-settings-view.d.ts +1 -0
  92. package/dist/views/content-list-settings-view.js +97 -0
  93. package/dist/views/content-list-view.d.ts +19 -0
  94. package/dist/views/content-list-view.js +248 -0
  95. package/dist/views/crop-view.d.ts +55 -0
  96. package/dist/views/crop-view.js +161 -0
  97. package/dist/views/date-range-view.d.ts +6 -0
  98. package/dist/views/date-range-view.js +55 -0
  99. package/dist/views/file-upload-view.d.ts +43 -0
  100. package/dist/views/file-upload-view.js +104 -0
  101. package/dist/views/html-code-editor.d.ts +10 -0
  102. package/dist/views/html-code-editor.js +101 -0
  103. package/dist/views/html-view.d.ts +3 -0
  104. package/dist/views/html-view.js +53 -0
  105. package/dist/views/image-view.d.ts +3 -0
  106. package/dist/views/image-view.js +387 -0
  107. package/dist/views/rich-text-view.d.ts +2 -0
  108. package/dist/views/rich-text-view.js +429 -0
  109. package/node_modules/@kardalum/api-schemas/LICENSE +202 -0
  110. package/node_modules/@kardalum/api-schemas/README.md +56 -0
  111. package/node_modules/@kardalum/api-schemas/dist/action.schema.d.ts +30 -0
  112. package/node_modules/@kardalum/api-schemas/dist/action.schema.js +88 -0
  113. package/node_modules/@kardalum/api-schemas/dist/api-error.schema.d.ts +5 -0
  114. package/node_modules/@kardalum/api-schemas/dist/api-error.schema.js +6 -0
  115. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.d.ts +75 -0
  116. package/node_modules/@kardalum/api-schemas/dist/api-key-api.schema.js +36 -0
  117. package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.d.ts +89 -0
  118. package/node_modules/@kardalum/api-schemas/dist/asset-api.schema.js +60 -0
  119. package/node_modules/@kardalum/api-schemas/dist/asset.schema.d.ts +24 -0
  120. package/node_modules/@kardalum/api-schemas/dist/asset.schema.js +47 -0
  121. package/node_modules/@kardalum/api-schemas/dist/auth.schema.d.ts +38 -0
  122. package/node_modules/@kardalum/api-schemas/dist/auth.schema.js +38 -0
  123. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.d.ts +537 -0
  124. package/node_modules/@kardalum/api-schemas/dist/content-api.schema.js +353 -0
  125. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +158 -0
  126. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +139 -0
  127. package/node_modules/@kardalum/api-schemas/dist/content-path.d.ts +125 -0
  128. package/node_modules/@kardalum/api-schemas/dist/content-path.js +256 -0
  129. package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.d.ts +20 -0
  130. package/node_modules/@kardalum/api-schemas/dist/content-trash-api.schema.js +23 -0
  131. package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.d.ts +151 -0
  132. package/node_modules/@kardalum/api-schemas/dist/content-trash.schema.js +82 -0
  133. package/node_modules/@kardalum/api-schemas/dist/content-version.schema.d.ts +18 -0
  134. package/node_modules/@kardalum/api-schemas/dist/content-version.schema.js +22 -0
  135. package/node_modules/@kardalum/api-schemas/dist/content.schema.d.ts +17 -0
  136. package/node_modules/@kardalum/api-schemas/dist/content.schema.js +20 -0
  137. package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +302 -0
  138. package/node_modules/@kardalum/api-schemas/dist/core-actions.js +97 -0
  139. package/node_modules/@kardalum/api-schemas/dist/culture-direction.d.ts +1 -0
  140. package/node_modules/@kardalum/api-schemas/dist/culture-direction.js +9 -0
  141. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.d.ts +36 -0
  142. package/node_modules/@kardalum/api-schemas/dist/data-type-api.schema.js +32 -0
  143. package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.d.ts +9 -0
  144. package/node_modules/@kardalum/api-schemas/dist/data-type-config.schema.js +32 -0
  145. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +296 -0
  146. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +138 -0
  147. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.d.ts +121 -0
  148. package/node_modules/@kardalum/api-schemas/dist/document-type.schema.js +147 -0
  149. package/node_modules/@kardalum/api-schemas/dist/health.schema.d.ts +6 -0
  150. package/node_modules/@kardalum/api-schemas/dist/health.schema.js +5 -0
  151. package/node_modules/@kardalum/api-schemas/dist/html-entities.d.ts +4 -0
  152. package/node_modules/@kardalum/api-schemas/dist/html-entities.js +250 -0
  153. package/node_modules/@kardalum/api-schemas/dist/index.d.ts +102 -0
  154. package/node_modules/@kardalum/api-schemas/dist/index.js +58 -0
  155. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.d.ts +15 -0
  156. package/node_modules/@kardalum/api-schemas/dist/licensing.schema.js +14 -0
  157. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +381 -0
  158. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +197 -0
  159. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +167 -0
  160. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.js +214 -0
  161. package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.d.ts +77 -0
  162. package/node_modules/@kardalum/api-schemas/dist/media-reference-api.schema.js +53 -0
  163. package/node_modules/@kardalum/api-schemas/dist/media-reference-use.d.ts +75 -0
  164. package/node_modules/@kardalum/api-schemas/dist/media-reference-use.js +117 -0
  165. package/node_modules/@kardalum/api-schemas/dist/media-reference.d.ts +27 -0
  166. package/node_modules/@kardalum/api-schemas/dist/media-reference.js +279 -0
  167. package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.d.ts +74 -0
  168. package/node_modules/@kardalum/api-schemas/dist/media-rendition.schema.js +157 -0
  169. package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +80 -0
  170. package/node_modules/@kardalum/api-schemas/dist/media.schema.js +156 -0
  171. package/node_modules/@kardalum/api-schemas/dist/nav.schema.d.ts +23 -0
  172. package/node_modules/@kardalum/api-schemas/dist/nav.schema.js +55 -0
  173. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.d.ts +846 -0
  174. package/node_modules/@kardalum/api-schemas/dist/node-access.schema.js +356 -0
  175. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.d.ts +20 -0
  176. package/node_modules/@kardalum/api-schemas/dist/plugin-actions.schema.js +27 -0
  177. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +169 -0
  178. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.js +80 -0
  179. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.d.ts +65 -0
  180. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-text.js +889 -0
  181. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +89 -0
  182. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +134 -0
  183. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.d.ts +31 -0
  184. package/node_modules/@kardalum/api-schemas/dist/plugin-id-rules.js +38 -0
  185. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +369 -0
  186. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +393 -0
  187. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +22 -0
  188. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +87 -0
  189. package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.d.ts +31 -0
  190. package/node_modules/@kardalum/api-schemas/dist/plugin-registry-api.schema.js +25 -0
  191. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.d.ts +15 -0
  192. package/node_modules/@kardalum/api-schemas/dist/plugin-storage-api.schema.js +24 -0
  193. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.d.ts +306 -0
  194. package/node_modules/@kardalum/api-schemas/dist/public-api.schema.js +328 -0
  195. package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +79 -0
  196. package/node_modules/@kardalum/api-schemas/dist/render-editing.js +50 -0
  197. package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.d.ts +9 -0
  198. package/node_modules/@kardalum/api-schemas/dist/render-settings-api.schema.js +13 -0
  199. package/node_modules/@kardalum/api-schemas/dist/reserved-slugs.d.ts +2 -0
  200. package/node_modules/@kardalum/api-schemas/dist/reserved-slugs.js +16 -0
  201. package/node_modules/@kardalum/api-schemas/dist/role.schema.d.ts +90 -0
  202. package/node_modules/@kardalum/api-schemas/dist/role.schema.js +69 -0
  203. package/node_modules/@kardalum/api-schemas/dist/sample-content-outcome.schema.d.ts +17 -0
  204. package/node_modules/@kardalum/api-schemas/dist/sample-content-outcome.schema.js +27 -0
  205. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +108 -0
  206. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +93 -0
  207. package/node_modules/@kardalum/api-schemas/dist/sites.schema.d.ts +243 -0
  208. package/node_modules/@kardalum/api-schemas/dist/sites.schema.js +296 -0
  209. package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.d.ts +43 -0
  210. package/node_modules/@kardalum/api-schemas/dist/snapshot-api.schema.js +25 -0
  211. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.d.ts +30 -0
  212. package/node_modules/@kardalum/api-schemas/dist/snapshot.schema.js +19 -0
  213. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +112 -0
  214. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +74 -0
  215. package/node_modules/@kardalum/api-schemas/dist/template.schema.d.ts +41 -0
  216. package/node_modules/@kardalum/api-schemas/dist/template.schema.js +39 -0
  217. package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.d.ts +21 -0
  218. package/node_modules/@kardalum/api-schemas/dist/theme-api.schema.js +14 -0
  219. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +89 -0
  220. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +68 -0
  221. package/node_modules/@kardalum/api-schemas/package.json +35 -0
  222. package/node_modules/@kardalum/design-tokens/LICENSE +202 -0
  223. package/node_modules/@kardalum/design-tokens/README.md +29 -0
  224. package/node_modules/@kardalum/design-tokens/dist/build-css.d.ts +32 -0
  225. package/node_modules/@kardalum/design-tokens/dist/build-css.js +88 -0
  226. package/node_modules/@kardalum/design-tokens/dist/generate.d.ts +1 -0
  227. package/node_modules/@kardalum/design-tokens/dist/generate.js +18 -0
  228. package/node_modules/@kardalum/design-tokens/dist/index.d.ts +6 -0
  229. package/node_modules/@kardalum/design-tokens/dist/index.js +4 -0
  230. package/node_modules/@kardalum/design-tokens/dist/system-dark.css +75 -0
  231. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +33 -0
  232. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +54 -0
  233. package/node_modules/@kardalum/design-tokens/dist/theme-css.d.ts +12 -0
  234. package/node_modules/@kardalum/design-tokens/dist/theme-css.js +42 -0
  235. package/node_modules/@kardalum/design-tokens/dist/theme-types.d.ts +43 -0
  236. package/node_modules/@kardalum/design-tokens/dist/theme-types.js +1 -0
  237. package/node_modules/@kardalum/design-tokens/dist/themes/dark.d.ts +13 -0
  238. package/node_modules/@kardalum/design-tokens/dist/themes/dark.js +120 -0
  239. package/node_modules/@kardalum/design-tokens/dist/themes/index.d.ts +5 -0
  240. package/node_modules/@kardalum/design-tokens/dist/themes/index.js +4 -0
  241. package/node_modules/@kardalum/design-tokens/dist/themes/light.d.ts +9 -0
  242. package/node_modules/@kardalum/design-tokens/dist/themes/light.js +13 -0
  243. package/node_modules/@kardalum/design-tokens/dist/tokens.css +239 -0
  244. package/node_modules/@kardalum/design-tokens/dist/tokens.d.ts +25 -0
  245. package/node_modules/@kardalum/design-tokens/dist/tokens.js +276 -0
  246. package/node_modules/@kardalum/design-tokens/dist/tokens.json +212 -0
  247. package/node_modules/@kardalum/design-tokens/dist/types.d.ts +91 -0
  248. package/node_modules/@kardalum/design-tokens/dist/types.js +5 -0
  249. package/node_modules/@kardalum/design-tokens/package.json +42 -0
  250. package/node_modules/@kardalum/plugin-package/LICENSE +202 -0
  251. package/node_modules/@kardalum/plugin-package/README.md +71 -0
  252. package/node_modules/@kardalum/plugin-package/dist/docs-contract.d.ts +50 -0
  253. package/node_modules/@kardalum/plugin-package/dist/docs-contract.js +659 -0
  254. package/node_modules/@kardalum/plugin-package/dist/envelope.d.ts +19 -0
  255. package/node_modules/@kardalum/plugin-package/dist/envelope.js +104 -0
  256. package/node_modules/@kardalum/plugin-package/dist/extract.d.ts +37 -0
  257. package/node_modules/@kardalum/plugin-package/dist/extract.js +199 -0
  258. package/node_modules/@kardalum/plugin-package/dist/hash.d.ts +17 -0
  259. package/node_modules/@kardalum/plugin-package/dist/hash.js +69 -0
  260. package/node_modules/@kardalum/plugin-package/dist/index.d.ts +11 -0
  261. package/node_modules/@kardalum/plugin-package/dist/index.js +7 -0
  262. package/node_modules/@kardalum/plugin-package/dist/license-verdict.d.ts +185 -0
  263. package/node_modules/@kardalum/plugin-package/dist/license-verdict.js +236 -0
  264. package/node_modules/@kardalum/plugin-package/dist/package-contract.d.ts +50 -0
  265. package/node_modules/@kardalum/plugin-package/dist/package-contract.js +115 -0
  266. package/node_modules/@kardalum/plugin-package/dist/sample-content.d.ts +1 -0
  267. package/node_modules/@kardalum/plugin-package/dist/sample-content.js +17 -0
  268. package/node_modules/@kardalum/plugin-package/dist/types.d.ts +45 -0
  269. package/node_modules/@kardalum/plugin-package/dist/types.js +1 -0
  270. package/node_modules/@kardalum/plugin-package/package.json +49 -0
  271. package/node_modules/@kardalum/ui/LICENSE +202 -0
  272. package/node_modules/@kardalum/ui/README.md +35 -0
  273. package/node_modules/@kardalum/ui/dist/components/alert-dialog.d.ts +14 -0
  274. package/node_modules/@kardalum/ui/dist/components/alert-dialog.js +38 -0
  275. package/node_modules/@kardalum/ui/dist/components/badge.d.ts +9 -0
  276. package/node_modules/@kardalum/ui/dist/components/badge.js +30 -0
  277. package/node_modules/@kardalum/ui/dist/components/button.d.ts +11 -0
  278. package/node_modules/@kardalum/ui/dist/components/button.js +37 -0
  279. package/node_modules/@kardalum/ui/dist/components/checkbox.d.ts +5 -0
  280. package/node_modules/@kardalum/ui/dist/components/checkbox.js +7 -0
  281. package/node_modules/@kardalum/ui/dist/components/dialog.d.ts +17 -0
  282. package/node_modules/@kardalum/ui/dist/components/dialog.js +48 -0
  283. package/node_modules/@kardalum/ui/dist/components/dropdown-menu.d.ts +18 -0
  284. package/node_modules/@kardalum/ui/dist/components/dropdown-menu.js +53 -0
  285. package/node_modules/@kardalum/ui/dist/components/empty-state.d.ts +30 -0
  286. package/node_modules/@kardalum/ui/dist/components/empty-state.js +9 -0
  287. package/node_modules/@kardalum/ui/dist/components/input.d.ts +4 -0
  288. package/node_modules/@kardalum/ui/dist/components/input.js +6 -0
  289. package/node_modules/@kardalum/ui/dist/components/panel.d.ts +5 -0
  290. package/node_modules/@kardalum/ui/dist/components/panel.js +6 -0
  291. package/node_modules/@kardalum/ui/dist/components/property-field.d.ts +19 -0
  292. package/node_modules/@kardalum/ui/dist/components/property-field.js +86 -0
  293. package/node_modules/@kardalum/ui/dist/components/sheet.d.ts +17 -0
  294. package/node_modules/@kardalum/ui/dist/components/sheet.js +55 -0
  295. package/node_modules/@kardalum/ui/dist/components/skeleton.d.ts +3 -0
  296. package/node_modules/@kardalum/ui/dist/components/skeleton.js +9 -0
  297. package/node_modules/@kardalum/ui/dist/components/switch.d.ts +5 -0
  298. package/node_modules/@kardalum/ui/dist/components/switch.js +7 -0
  299. package/node_modules/@kardalum/ui/dist/components/tab-strip.d.ts +34 -0
  300. package/node_modules/@kardalum/ui/dist/components/tab-strip.js +72 -0
  301. package/node_modules/@kardalum/ui/dist/components/toast.d.ts +18 -0
  302. package/node_modules/@kardalum/ui/dist/components/toast.js +42 -0
  303. package/node_modules/@kardalum/ui/dist/components/toaster.d.ts +12 -0
  304. package/node_modules/@kardalum/ui/dist/components/toaster.js +11 -0
  305. package/node_modules/@kardalum/ui/dist/components/use-toast.d.ts +17 -0
  306. package/node_modules/@kardalum/ui/dist/components/use-toast.js +62 -0
  307. package/node_modules/@kardalum/ui/dist/index.d.ts +18 -0
  308. package/node_modules/@kardalum/ui/dist/index.js +18 -0
  309. package/node_modules/@kardalum/ui/dist/lib/cn.d.ts +2 -0
  310. package/node_modules/@kardalum/ui/dist/lib/cn.js +5 -0
  311. package/node_modules/@kardalum/ui/package.json +63 -0
  312. package/package.json +146 -4
package/dist/index.js ADDED
@@ -0,0 +1,93 @@
1
+ // S280: the one rule for which language of a slot's label to show.
2
+ export { slotLabel } from "./manifest.js";
3
+ // S268 Task 5: the derived capability list. A capability is computed
4
+ // from what the manifest declares, never declared beside it, so the
5
+ // install screen, marketplace review and the generated reference page
6
+ // all read one source. Exported from the package index as well as the
7
+ // ./manifest subpath because the admin UI renders it.
8
+ export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, deriveCapabilities, isActionGated, } from "./capabilities.js";
9
+ export { BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, DataTypePluginSchema, validatePluginManifest, } from "./manifest-schema.js";
10
+ export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
11
+ export { registerDataType, getDataType, listDataTypes } from "./registry.js";
12
+ // The slot registry (spec D8) is not exported here: the host registers a
13
+ // plugin's slots from its manifest, through the host-only
14
+ // `@kardalum/plugin-sdk/host` subpath (host-entry.ts). Federation shares
15
+ // the bare package name only, not that subpath, so a plugin that imports it
16
+ // anyway registers into its own bundled copy, never the host's registry.
17
+ export { PluginValueProvider, PluginSettingsProvider, PluginApiProvider, ContentHostProvider, usePluginValue, usePluginSettings, usePluginSettingsValue, usePluginApi, useContentHost, } from "./plugin-context.js";
18
+ // S280 (spec D7): what a plugin screen (a section, its rail entries, a rail
19
+ // entry in a built-in section) learns about where it is rendered.
20
+ export { PluginScreenProvider, usePluginScreen, } from "./plugin-screen-context.js";
21
+ export { SimpleStorageValueProvider } from "./simple-storage-value-provider.js";
22
+ // S284b: the entitlement in a view. The verifier for plugin SERVER code is
23
+ // the separate `@kardalum/plugin-sdk/entitlement` subpath (it needs
24
+ // node:crypto); these two verify in the browser and import nothing Node.
25
+ export { EntitlementGate, useEntitlement, } from "./entitlement-gate.js";
26
+ export { buildRichtextExtensions, TextStyleClass, KardalumBlock, KardalumBlockOnPage, selectedKardalumBlock, findKardalumBlocks, setBlockHtml, unavailableBlockHtml, moveSelectionPastBlock, } from "./richtext/extensions.js";
27
+ // Exported so a later on-page task can reuse the same modal from admin-ui
28
+ // (S197 Task 2) rather than forking it.
29
+ export { MediaPicker } from "./media/media-picker.js";
30
+ // S234a: the file upload editor's field stores no value of its own (see
31
+ // file-upload-view.tsx's doc comment), so the host has no `data` key to
32
+ // hand it a current file through. Exported here so the media item screen
33
+ // (S234a Task 7) can wrap a media item's DocumentTypeForm in this
34
+ // provider with the real row's filename/size/mimeType, the same reason
35
+ // MediaPicker is exported above.
36
+ // S234b Task 6 adds the other direction through the same provider: the
37
+ // host hands down a replace handler and its label, and the view renders a
38
+ // Replace control only when it gets one, so the Data Types editor's
39
+ // preview (which has no media item) keeps rendering a plain display.
40
+ export { MediaFileProvider, useMediaFile, useMediaFileReplace, } from "./views/file-upload-view.js";
41
+ // S234c: the same arrangement for the rendition fields. The crop tile
42
+ // shows what the field holds, and the host (the media item screen's Crops
43
+ // tab) hands down which file is on screen and the one action, so the
44
+ // cropper dialog can stay in the admin where the item's versions and API
45
+ // are. RENDITION_INELIGIBLE_TYPES is exported beside them because the
46
+ // browser cut and the Crops tab must refuse exactly what the tile refuses:
47
+ // one set, not a copy per caller. It is declared in
48
+ // rendition-eligibility.ts, which crop-view re-exports, so the server can
49
+ // read the same set through ./datatypes without importing React.
50
+ export { MediaRenditionProvider, useMediaRendition, isRenditionIneligible, RENDITION_INELIGIBLE_TYPES, } from "./views/crop-view.js";
51
+ // The "Aa Style ▾" listbox body, extracted out of rich-text-view.tsx (S197
52
+ // Task 11) so the on-page bubble toolbar (apps/admin-ui) can reuse the
53
+ // exact same widget instead of forking it — same reasoning as MediaPicker.
54
+ export { StyleListbox } from "./richtext/style-listbox.js";
55
+ // Block insert menu + param panel (S197 Task 3) — exported for the same
56
+ // reason MediaPicker is: the later on-page mount reuses these rather than
57
+ // forking its own.
58
+ export { BlockInsertMenu, defaultBlockParams, useBlockListings, } from "./richtext/insert-menu.js";
59
+ export { BlockPanel, BlockPreviewPopover, BlockParamFields, } from "./richtext/block-panel.js";
60
+ // The SDK's curated re-export of @kardalum/ui. @kardalum/ui is published
61
+ // (not private) because @kardalum/plugin-sdk has a runtime dependency on
62
+ // it — a registry install of the SDK would be unresolvable otherwise. This
63
+ // is the first consumer to actually need it — built-ins.tsx
64
+ // still imports @kardalum/ui directly, a documented TEMPORARY shortcut valid
65
+ // only because built-ins are compiled into the same admin bundle. Google
66
+ // Maps (Session 74) is a separate package on the real public SDK surface, so
67
+ // it goes through here instead, proving the boundary external plugin authors
68
+ // will actually use. Grow this list as plugins need more of @kardalum/ui, not
69
+ // preemptively.
70
+ export { Panel } from "@kardalum/ui";
71
+ export { PropertyField,
72
+ // An input view is handed to PropertyField as a COMPONENT, so the
73
+ // field's <label> has no child element to point at. Spreading this hook
74
+ // onto the view's own control is how a third-party data type gets an
75
+ // accessible name (WCAG 4.1.2) — see the datatype plugin contract docs.
76
+ usePropertyFieldControl, } from "@kardalum/ui";
77
+ export { Input } from "@kardalum/ui";
78
+ export { Button } from "@kardalum/ui";
79
+ export { Switch } from "@kardalum/ui";
80
+ export { Badge } from "@kardalum/ui";
81
+ export { cn } from "@kardalum/ui";
82
+ // S197 final-review fix F5: this used to end with a bare
83
+ // `import "./built-ins.js"` side effect — importing ANYTHING from this
84
+ // package incidentally registered the six built-in datatypes, whether the
85
+ // consumer wanted that or not. That made this entry point permanently
86
+ // heavy (TipTap always, CodeMirror/lezer since S197 Task 8's HTML
87
+ // datatype), which every first-party plugin's Module Federation `shared`
88
+ // config (pointing at this exact bare specifier) then packaged a dead-
89
+ // weight fallback copy of into its own artifact — see
90
+ // `register-built-ins.ts`'s own doc comment for the full story. Built-in
91
+ // registration is now that separate, explicitly-imported subpath
92
+ // (`@kardalum/plugin-sdk/register-built-ins`): apps/admin-ui's
93
+ // bootstrap (main.tsx) and vitest setup are its only two real consumers.
@@ -0,0 +1,18 @@
1
+ import type { TrustedKey } from "@kardalum/plugin-package";
2
+ /**
3
+ * The public keys a plugin trusts to sign a licence verdict (S284b, design
4
+ * 3.2). Public halves only, by key id. `requireEntitlement` (server) and
5
+ * `useEntitlement` (browser) both verify against this list unless a caller
6
+ * passes its own `trustedKeys`, which is how the tests inject a test key.
7
+ *
8
+ * It holds the separated licence verdict key `license-2026-10` (S284b Task
9
+ * 6), the same list as the host's SHIPPED_LICENSE_VERDICT_KEYS in
10
+ * apps/server/src/plugins/trusted-signing-keys.ts. The two must name the
11
+ * same keys, because the plugin checks the verdict the host stored; the
12
+ * server's trusted-keys.test.ts imports this list and fails if they differ.
13
+ * The package signing key is deliberately not here.
14
+ *
15
+ * Type-only import above, so the browser entry can read this list without
16
+ * loading @kardalum/plugin-package.
17
+ */
18
+ export declare const LICENSE_VERDICT_PUBLIC_KEYS: TrustedKey[];
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The public keys a plugin trusts to sign a licence verdict (S284b, design
3
+ * 3.2). Public halves only, by key id. `requireEntitlement` (server) and
4
+ * `useEntitlement` (browser) both verify against this list unless a caller
5
+ * passes its own `trustedKeys`, which is how the tests inject a test key.
6
+ *
7
+ * It holds the separated licence verdict key `license-2026-10` (S284b Task
8
+ * 6), the same list as the host's SHIPPED_LICENSE_VERDICT_KEYS in
9
+ * apps/server/src/plugins/trusted-signing-keys.ts. The two must name the
10
+ * same keys, because the plugin checks the verdict the host stored; the
11
+ * server's trusted-keys.test.ts imports this list and fails if they differ.
12
+ * The package signing key is deliberately not here.
13
+ *
14
+ * Type-only import above, so the browser entry can read this list without
15
+ * loading @kardalum/plugin-package.
16
+ */
17
+ export const LICENSE_VERDICT_PUBLIC_KEYS = [
18
+ {
19
+ keyId: "a4c4a883bf1392a6",
20
+ publicKey: "MCowBQYDK2VwAyEA5GCT1TohzY/oOnB0xZ+7pnvCddka2IBFoJNmmYGu9PI=",
21
+ },
22
+ ];
@@ -0,0 +1,3 @@
1
+ /** True for `localhost`, `127.0.0.1`, `::1` and any `*.localhost` host, with
2
+ * or without a port; false for anything else. */
3
+ export declare function isLocalHost(host: string): boolean;
@@ -0,0 +1,38 @@
1
+ // Whether a host is a local one (S284b, correction C9). Browser-safe: it is
2
+ // used by the server-only verifier (`requireEntitlement`, which honours an
3
+ // `exempt` entitlement only for a request that arrived on a local host) and
4
+ // by the browser's `<EntitlementGate>` (which honours it only when the page
5
+ // itself is served from a local host).
6
+ //
7
+ // The rule is a copy of the host's own (apps/server/src/licensing/
8
+ // production-domain.ts): `localhost`, `127.0.0.1`, `::1` and any
9
+ // `*.localhost` host, on any port, are local; everything else, an empty
10
+ // host included, is not. A copy because the SDK cannot import server code;
11
+ // local-host.test.ts pins the cases. One difference, in the direction the
12
+ // rule's own wording takes: a bare `::1` (no brackets) is local here, where
13
+ // the host's port split reads it as `:` on port 1. A Host header always
14
+ // brackets an IPv6 address, so the two agree on every request.
15
+ /** Strips a port (bare `host:port`, or bracketed `[ipv6]:port`) and
16
+ * lower-cases what is left. */
17
+ function hostnameOf(host) {
18
+ const trimmed = host.trim();
19
+ if (trimmed.startsWith("[")) {
20
+ const closeBracket = trimmed.indexOf("]");
21
+ return (closeBracket === -1 ? trimmed : trimmed.slice(1, closeBracket)).toLowerCase();
22
+ }
23
+ const lastColon = trimmed.lastIndexOf(":");
24
+ // A bare IPv6 address (more than one colon, no brackets) carries no port:
25
+ // a Host header always brackets one, but a caller may hand the address
26
+ // itself, and `::1` must not be read as `:` on port 1.
27
+ const bareIpv6 = trimmed.indexOf(":") !== lastColon;
28
+ if (lastColon !== -1 && !bareIpv6 && /^\d+$/.test(trimmed.slice(lastColon + 1))) {
29
+ return trimmed.slice(0, lastColon).toLowerCase();
30
+ }
31
+ return trimmed.toLowerCase();
32
+ }
33
+ /** True for `localhost`, `127.0.0.1`, `::1` and any `*.localhost` host, with
34
+ * or without a port; false for anything else. */
35
+ export function isLocalHost(host) {
36
+ const hostname = hostnameOf(host);
37
+ return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost");
38
+ }
@@ -0,0 +1,8 @@
1
+ export type { DataTypePlugin, DataTypePluginViews } from "./data-type-plugin.js";
2
+ export type { PluginType, DatabaseDialect, DatabaseCompatibility, PluginAssertion, PluginAssertions, PluginMigrationContext, PluginMigration, PluginMigrationValidation, PluginMigrationHooks, HookEvent, HookHandler, PluginHooks, ContentLifecycleHookPayload, PluginHookContext, AdminSectionContribution, BuiltInRailEntryContribution, BuiltInRailSection, RailEntryContribution, SlotLabel, DashboardWidgetContribution, ApiRouteContribution, ScheduledTaskContribution, MediaProcessorContribution, SettingsPageContribution, ContentTreeActionContribution, EditorToolbarContribution, ExposedServiceContribution, BundledTemplateContribution, SerializerContext, CustomFormatContribution, SerializerContribution, PluginContributions, ViewBearingContribution, PluginManifestBase, PluginManifest, } from "./manifest.js";
3
+ export { VIEW_BEARING_CONTRIBUTIONS, declaresClientBundle, slotLabel } from "./manifest.js";
4
+ export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, deriveCapabilities, isActionGated, type Capability, type CapabilityAudience, type CapabilityLabels, type CapabilityMediation, type CapabilityPayload, } from "./capabilities.js";
5
+ export { ASSERTION_KINDS, AssertionsSchema, BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, CONTRIBUTION_KEYS, DataTypePluginSchema, formatIssues, validatePluginManifest, type ValidatePluginManifestResult, } from "./manifest-schema.js";
6
+ export type { PluginColumnType, PluginColumnSchema, PluginIndexSchema, PluginTableSchema, StructuredQueryBuilder, StructuredStorageTransaction, ScopedStructuredStorage, PublishedContent, PluginApiRouteContext, } from "./structured-storage-types.js";
7
+ export type { Entitlement, EntitlementErrorCode, EntitlementVerdict, PluginTaskContext } from "./entitlement-types.js";
8
+ export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
@@ -0,0 +1,13 @@
1
+ // The `@kardalum/plugin-sdk/manifest` subpath: manifest contract + runtime
2
+ // validation ONLY. Exists for non-browser consumers (apps/server's plugin
3
+ // registry, the future `kardalum plugin validate` CLI), unlike the package
4
+ // index, importing this pulls in no React components, no TipTap, no
5
+ // @kardalum/ui, and does NOT side-effect-register the built-in datatypes.
6
+ // Runtime deps: zod + @kardalum/api-schemas, both server-safe.
7
+ export { VIEW_BEARING_CONTRIBUTIONS, declaresClientBundle, slotLabel } from "./manifest.js";
8
+ // The derived capability list (S268 Task 5). Pure data in, pure data
9
+ // out: no React, no zod, so every non-browser reader of the manifest
10
+ // contract can compute it.
11
+ export { CAPABILITY_IDS, CAPABILITY_LABELS, capabilityLabel, deriveCapabilities, isActionGated, } from "./capabilities.js";
12
+ export { ASSERTION_KINDS, AssertionsSchema, BUILT_IN_RAIL_SECTIONS, CMSPluginSchema, CONTRIBUTION_KEYS, DataTypePluginSchema, formatIssues, validatePluginManifest, } from "./manifest-schema.js";
13
+ export { definePlugin, PluginDefinitionError } from "./define-plugin.js";
@@ -0,0 +1,408 @@
1
+ import type { ComponentType } from "react";
2
+ import type { JSONSchema7 } from "json-schema";
3
+ import { z } from "zod";
4
+ import type { HookHandler, PluginAssertions, PluginContributions, PluginManifest } from "./manifest.js";
5
+ export declare const AssertionsSchema: z.ZodObject<{
6
+ externalNetwork: z.ZodOptional<z.ZodObject<{
7
+ reason: z.ZodString;
8
+ }, z.core.$strict>>;
9
+ filesystemAccess: z.ZodOptional<z.ZodObject<{
10
+ reason: z.ZodString;
11
+ }, z.core.$strict>>;
12
+ }, z.core.$strict>;
13
+ /**
14
+ * Every assertion kind this contract defines, at runtime, derived from
15
+ * the shape above so it cannot drift from it.
16
+ *
17
+ * Exists for the same reason CONTRIBUTION_KEYS does: the marketplace
18
+ * carries a hand-maintained static mirror of AssertionsSchema (its
19
+ * Next.js runtime never imports plugin tooling), that mirror is
20
+ * `.strict()`, and a kind added here but not there turns into a publish
21
+ * refusal for an artifact that built fine. Exporting the kinds and the
22
+ * schema gives the mirror something to be pinned against.
23
+ */
24
+ export declare const ASSERTION_KINDS: (keyof PluginAssertions)[];
25
+ export declare const DataTypePluginSchema: z.ZodObject<{
26
+ id: z.ZodString;
27
+ name: z.ZodString;
28
+ icon: z.ZodString;
29
+ version: z.ZodString;
30
+ type: z.ZodLiteral<"datatype">;
31
+ schema: z.ZodCustom<JSONSchema7, JSONSchema7>;
32
+ settingsSchema: z.ZodCustom<JSONSchema7, JSONSchema7>;
33
+ defaultSettings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
34
+ views: z.ZodObject<{
35
+ input: z.ZodCustom<ComponentType, ComponentType>;
36
+ readOnly: z.ZodCustom<ComponentType, ComponentType>;
37
+ settings: z.ZodCustom<ComponentType, ComponentType>;
38
+ preview: z.ZodOptional<z.ZodCustom<ComponentType, ComponentType>>;
39
+ }, z.core.$strict>;
40
+ serialize: z.ZodCustom<(value: unknown, settings: Record<string, unknown>) => unknown, (value: unknown, settings: Record<string, unknown>) => unknown>;
41
+ deserialize: z.ZodCustom<(raw: unknown, settings: Record<string, unknown>) => unknown, (raw: unknown, settings: Record<string, unknown>) => unknown>;
42
+ validate: z.ZodOptional<z.ZodCustom<import("./datatype-validation.js").DataTypeValidateHook, import("./datatype-validation.js").DataTypeValidateHook>>;
43
+ isEmpty: z.ZodOptional<z.ZodCustom<(value: unknown) => boolean, (value: unknown) => boolean>>;
44
+ }, z.core.$strict>;
45
+ /**
46
+ * The built-in sections whose rail a plugin may add an entry to. Plugin
47
+ * management is not among them: it is the operator's screen for plugins,
48
+ * not a host for them. A plugin cannot take over any built-in section's
49
+ * landing page (spec D2), only add to its rail.
50
+ */
51
+ export declare const BUILT_IN_RAIL_SECTIONS: readonly ["content", "media", "settings", "users"];
52
+ /**
53
+ * Every contribution key this contract defines, at runtime, derived from
54
+ * the schema above so it cannot drift from it.
55
+ *
56
+ * Exists for the conformance tests that partition these keys into
57
+ * view-bearing and not (S268 Task 3 review, F3). Splitting a list by hand
58
+ * has a third outcome besides "in the right half" and "in the wrong
59
+ * half": in neither half, and therefore never exercised, which is how a
60
+ * mirror of VIEW_BEARING_CONTRIBUTIONS can diverge and still be green.
61
+ * Counting against this set is what closes that.
62
+ */
63
+ export declare const CONTRIBUTION_KEYS: (keyof PluginContributions)[];
64
+ export declare const CMSPluginSchema: z.ZodObject<{
65
+ type: z.ZodEnum<{
66
+ datatype: "datatype";
67
+ section: "section";
68
+ template: "template";
69
+ theme: "theme";
70
+ integration: "integration";
71
+ utility: "utility";
72
+ bundle: "bundle";
73
+ }>;
74
+ contributions: z.ZodObject<{
75
+ dataTypes: z.ZodOptional<z.ZodArray<z.ZodObject<{
76
+ id: z.ZodString;
77
+ name: z.ZodString;
78
+ icon: z.ZodString;
79
+ version: z.ZodString;
80
+ type: z.ZodLiteral<"datatype">;
81
+ schema: z.ZodCustom<JSONSchema7, JSONSchema7>;
82
+ settingsSchema: z.ZodCustom<JSONSchema7, JSONSchema7>;
83
+ defaultSettings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
84
+ views: z.ZodObject<{
85
+ input: z.ZodCustom<ComponentType, ComponentType>;
86
+ readOnly: z.ZodCustom<ComponentType, ComponentType>;
87
+ settings: z.ZodCustom<ComponentType, ComponentType>;
88
+ preview: z.ZodOptional<z.ZodCustom<ComponentType, ComponentType>>;
89
+ }, z.core.$strict>;
90
+ serialize: z.ZodCustom<(value: unknown, settings: Record<string, unknown>) => unknown, (value: unknown, settings: Record<string, unknown>) => unknown>;
91
+ deserialize: z.ZodCustom<(raw: unknown, settings: Record<string, unknown>) => unknown, (raw: unknown, settings: Record<string, unknown>) => unknown>;
92
+ validate: z.ZodOptional<z.ZodCustom<import("./datatype-validation.js").DataTypeValidateHook, import("./datatype-validation.js").DataTypeValidateHook>>;
93
+ isEmpty: z.ZodOptional<z.ZodCustom<(value: unknown) => boolean, (value: unknown) => boolean>>;
94
+ }, z.core.$strict>>>;
95
+ adminSections: z.ZodOptional<z.ZodArray<z.ZodObject<{
96
+ id: z.ZodString;
97
+ label: z.ZodObject<{
98
+ en: z.ZodString;
99
+ }, z.core.$catchall<z.ZodString>>;
100
+ icon: z.ZodString;
101
+ action: z.ZodString;
102
+ view: z.ZodCustom<ComponentType, ComponentType>;
103
+ rail: z.ZodOptional<z.ZodArray<z.ZodObject<{
104
+ id: z.ZodString;
105
+ label: z.ZodObject<{
106
+ en: z.ZodString;
107
+ }, z.core.$catchall<z.ZodString>>;
108
+ icon: z.ZodOptional<z.ZodString>;
109
+ action: z.ZodString;
110
+ view: z.ZodCustom<ComponentType, ComponentType>;
111
+ }, z.core.$strict>>>;
112
+ name: z.ZodOptional<z.ZodNever>;
113
+ }, z.core.$strict>>>;
114
+ railEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
115
+ id: z.ZodString;
116
+ section: z.ZodEnum<{
117
+ media: "media";
118
+ settings: "settings";
119
+ content: "content";
120
+ users: "users";
121
+ }>;
122
+ label: z.ZodObject<{
123
+ en: z.ZodString;
124
+ }, z.core.$catchall<z.ZodString>>;
125
+ icon: z.ZodOptional<z.ZodString>;
126
+ action: z.ZodString;
127
+ view: z.ZodCustom<ComponentType, ComponentType>;
128
+ }, z.core.$strict>>>;
129
+ dashboardWidgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
130
+ id: z.ZodString;
131
+ name: z.ZodString;
132
+ view: z.ZodCustom<ComponentType, ComponentType>;
133
+ action: z.ZodString;
134
+ }, z.core.$strict>>>;
135
+ apiRoutes: z.ZodOptional<z.ZodArray<z.ZodObject<{
136
+ method: z.ZodEnum<{
137
+ GET: "GET";
138
+ POST: "POST";
139
+ PUT: "PUT";
140
+ PATCH: "PATCH";
141
+ DELETE: "DELETE";
142
+ }>;
143
+ path: z.ZodString;
144
+ access: z.ZodOptional<z.ZodEnum<{
145
+ admin: "admin";
146
+ apiKey: "apiKey";
147
+ public: "public";
148
+ }>>;
149
+ action: z.ZodOptional<z.ZodString>;
150
+ schema: z.ZodOptional<z.ZodObject<{
151
+ body: z.ZodOptional<z.ZodCustom<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
152
+ querystring: z.ZodOptional<z.ZodCustom<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
153
+ params: z.ZodOptional<z.ZodCustom<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
154
+ }, z.core.$strict>>;
155
+ handler: z.ZodCustom<(request: unknown, reply: unknown, context: import("./structured-storage-types.js").PluginApiRouteContext) => unknown, (request: unknown, reply: unknown, context: import("./structured-storage-types.js").PluginApiRouteContext) => unknown>;
156
+ }, z.core.$strict>>>;
157
+ hooks: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
158
+ "content:beforeSave": "content:beforeSave";
159
+ "content:afterSave": "content:afterSave";
160
+ "content:beforePublish": "content:beforePublish";
161
+ "content:afterPublish": "content:afterPublish";
162
+ "content:afterTrash": "content:afterTrash";
163
+ "content:afterRestore": "content:afterRestore";
164
+ "content:beforeDelete": "content:beforeDelete";
165
+ "media:afterUpload": "media:afterUpload";
166
+ "user:afterLogin": "user:afterLogin";
167
+ "api:beforeResponse": "api:beforeResponse";
168
+ }> & z.core.$partial, z.ZodCustom<HookHandler, HookHandler>>>;
169
+ scheduledTasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
170
+ id: z.ZodString;
171
+ name: z.ZodString;
172
+ cron: z.ZodString;
173
+ run: z.ZodCustom<(context?: import("./entitlement-types.js").PluginTaskContext) => void | Promise<void>, (context?: import("./entitlement-types.js").PluginTaskContext) => void | Promise<void>>;
174
+ }, z.core.$strict>>>;
175
+ mediaProcessors: z.ZodOptional<z.ZodArray<z.ZodObject<{
176
+ id: z.ZodString;
177
+ name: z.ZodString;
178
+ process: z.ZodCustom<(file: unknown) => unknown | Promise<unknown>, (file: unknown) => unknown | Promise<unknown>>;
179
+ }, z.core.$strict>>>;
180
+ settingsPages: z.ZodOptional<z.ZodArray<z.ZodObject<{
181
+ id: z.ZodString;
182
+ name: z.ZodString;
183
+ view: z.ZodCustom<ComponentType, ComponentType>;
184
+ action: z.ZodString;
185
+ }, z.core.$strict>>>;
186
+ contentTreeActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
187
+ id: z.ZodString;
188
+ label: z.ZodString;
189
+ onSelect: z.ZodCustom<(nodeId: string) => void | Promise<void>, (nodeId: string) => void | Promise<void>>;
190
+ action: z.ZodString;
191
+ }, z.core.$strict>>>;
192
+ editorToolbar: z.ZodOptional<z.ZodArray<z.ZodObject<{
193
+ id: z.ZodString;
194
+ label: z.ZodString;
195
+ icon: z.ZodString;
196
+ onClick: z.ZodCustom<() => void | Promise<void>, () => void | Promise<void>>;
197
+ action: z.ZodString;
198
+ }, z.core.$strict>>>;
199
+ exposedServices: z.ZodOptional<z.ZodArray<z.ZodObject<{
200
+ id: z.ZodString;
201
+ name: z.ZodString;
202
+ service: z.ZodUnknown;
203
+ }, z.core.$strict>>>;
204
+ serializers: z.ZodOptional<z.ZodObject<{
205
+ extendContentResponse: z.ZodOptional<z.ZodCustom<(context: import("./manifest.js").SerializerContext) => Record<string, unknown> | Promise<Record<string, unknown>>, (context: import("./manifest.js").SerializerContext) => Record<string, unknown> | Promise<Record<string, unknown>>>>;
206
+ customFormats: z.ZodOptional<z.ZodArray<z.ZodObject<{
207
+ name: z.ZodString;
208
+ build: z.ZodCustom<(context: import("./manifest.js").SerializerContext) => unknown | Promise<unknown>, (context: import("./manifest.js").SerializerContext) => unknown | Promise<unknown>>;
209
+ }, z.core.$strict>>>;
210
+ }, z.core.$strict>>;
211
+ documentTypes: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
212
+ name: z.ZodString;
213
+ icon: z.ZodDefault<z.ZodOptional<z.ZodString>>;
214
+ kind: z.ZodLiteral<"page">;
215
+ fields: z.ZodArray<z.ZodObject<{
216
+ id: z.ZodString;
217
+ name: z.ZodString;
218
+ datatypeId: z.ZodString;
219
+ validation: z.ZodOptional<z.ZodObject<{
220
+ required: z.ZodOptional<z.ZodBoolean>;
221
+ minLength: z.ZodOptional<z.ZodNumber>;
222
+ maxLength: z.ZodOptional<z.ZodNumber>;
223
+ min: z.ZodOptional<z.ZodNumber>;
224
+ max: z.ZodOptional<z.ZodNumber>;
225
+ pattern: z.ZodOptional<z.ZodString>;
226
+ }, z.core.$strict>>;
227
+ tabId: z.ZodOptional<z.ZodString>;
228
+ varies: z.ZodOptional<z.ZodBoolean>;
229
+ }, z.core.$strict>>;
230
+ treeRules: z.ZodObject<{
231
+ allowedAtRoot: z.ZodBoolean;
232
+ allowedParentTypes: z.ZodArray<z.ZodString>;
233
+ allowedChildTypes: z.ZodArray<z.ZodString>;
234
+ }, z.core.$strip>;
235
+ tabs: z.ZodDefault<z.ZodArray<z.ZodObject<{
236
+ id: z.ZodString;
237
+ name: z.ZodString;
238
+ }, z.core.$strict>>>;
239
+ translationMandatory: z.ZodOptional<z.ZodBoolean>;
240
+ collection: z.ZodOptional<z.ZodBoolean>;
241
+ }, z.core.$strict>, z.ZodObject<{
242
+ name: z.ZodString;
243
+ icon: z.ZodDefault<z.ZodOptional<z.ZodString>>;
244
+ kind: z.ZodLiteral<"element">;
245
+ fields: z.ZodArray<z.ZodObject<{
246
+ id: z.ZodString;
247
+ name: z.ZodString;
248
+ datatypeId: z.ZodString;
249
+ validation: z.ZodOptional<z.ZodObject<{
250
+ required: z.ZodOptional<z.ZodBoolean>;
251
+ minLength: z.ZodOptional<z.ZodNumber>;
252
+ maxLength: z.ZodOptional<z.ZodNumber>;
253
+ min: z.ZodOptional<z.ZodNumber>;
254
+ max: z.ZodOptional<z.ZodNumber>;
255
+ pattern: z.ZodOptional<z.ZodString>;
256
+ }, z.core.$strict>>;
257
+ tabId: z.ZodOptional<z.ZodString>;
258
+ varies: z.ZodOptional<z.ZodBoolean>;
259
+ }, z.core.$strict>>;
260
+ tabs: z.ZodDefault<z.ZodArray<z.ZodObject<{
261
+ id: z.ZodString;
262
+ name: z.ZodString;
263
+ }, z.core.$strict>>>;
264
+ }, z.core.$strict>, z.ZodObject<{
265
+ name: z.ZodString;
266
+ icon: z.ZodDefault<z.ZodOptional<z.ZodString>>;
267
+ kind: z.ZodLiteral<"media">;
268
+ fields: z.ZodArray<z.ZodObject<{
269
+ id: z.ZodString;
270
+ name: z.ZodString;
271
+ datatypeId: z.ZodString;
272
+ validation: z.ZodOptional<z.ZodObject<{
273
+ required: z.ZodOptional<z.ZodBoolean>;
274
+ minLength: z.ZodOptional<z.ZodNumber>;
275
+ maxLength: z.ZodOptional<z.ZodNumber>;
276
+ min: z.ZodOptional<z.ZodNumber>;
277
+ max: z.ZodOptional<z.ZodNumber>;
278
+ pattern: z.ZodOptional<z.ZodString>;
279
+ }, z.core.$strict>>;
280
+ tabId: z.ZodOptional<z.ZodString>;
281
+ varies: z.ZodOptional<z.ZodBoolean>;
282
+ }, z.core.$strict>>;
283
+ tabs: z.ZodDefault<z.ZodArray<z.ZodObject<{
284
+ id: z.ZodString;
285
+ name: z.ZodString;
286
+ }, z.core.$strict>>>;
287
+ sortOrder: z.ZodOptional<z.ZodNumber>;
288
+ catchAll: z.ZodOptional<z.ZodBoolean>;
289
+ }, z.core.$strict>], "kind">>>;
290
+ themeTokens: z.ZodOptional<z.ZodObject<{
291
+ color: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
292
+ radius: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
293
+ }, z.core.$strict>>;
294
+ templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
295
+ file: z.ZodString;
296
+ name: z.ZodString;
297
+ alias: z.ZodString;
298
+ kind: z.ZodEnum<{
299
+ page: "page";
300
+ layout: "layout";
301
+ partial: "partial";
302
+ }>;
303
+ documentType: z.ZodOptional<z.ZodString>;
304
+ }, z.core.$strict>>>;
305
+ assets: z.ZodOptional<z.ZodArray<z.ZodString>>;
306
+ bundledPlugins: z.ZodOptional<z.ZodArray<z.ZodString>>;
307
+ bundledTemplate: z.ZodOptional<z.ZodObject<{
308
+ name: z.ZodString;
309
+ description: z.ZodOptional<z.ZodString>;
310
+ repository: z.ZodOptional<z.ZodString>;
311
+ }, z.core.$strict>>;
312
+ }, z.core.$strict>;
313
+ id: z.ZodString;
314
+ name: z.ZodString;
315
+ version: z.ZodString;
316
+ description: z.ZodString;
317
+ author: z.ZodString;
318
+ license: z.ZodString;
319
+ price: z.ZodOptional<z.ZodNumber>;
320
+ signature: z.ZodOptional<z.ZodString>;
321
+ cmsVersion: z.ZodString;
322
+ pluginDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
323
+ databaseCompatibility: z.ZodObject<{
324
+ storageType: z.ZodEnum<{
325
+ structured: "structured";
326
+ simple: "simple";
327
+ }>;
328
+ supported: z.ZodArray<z.ZodEnum<{
329
+ postgresql: "postgresql";
330
+ mysql: "mysql";
331
+ sqlite: "sqlite";
332
+ mssql: "mssql";
333
+ mongodb: "mongodb";
334
+ }>>;
335
+ unsupportedReason: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
336
+ postgresql: "postgresql";
337
+ mysql: "mysql";
338
+ sqlite: "sqlite";
339
+ mssql: "mssql";
340
+ mongodb: "mongodb";
341
+ }> & z.core.$partial, z.ZodString>>;
342
+ }, z.core.$strict>;
343
+ assertions: z.ZodOptional<z.ZodObject<{
344
+ externalNetwork: z.ZodOptional<z.ZodObject<{
345
+ reason: z.ZodString;
346
+ }, z.core.$strict>>;
347
+ filesystemAccess: z.ZodOptional<z.ZodObject<{
348
+ reason: z.ZodString;
349
+ }, z.core.$strict>>;
350
+ }, z.core.$strict>>;
351
+ migrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
352
+ id: z.ZodString;
353
+ name: z.ZodString;
354
+ up: z.ZodCustom<(ctx: import("./manifest.js").PluginMigrationContext) => void | Promise<void>, (ctx: import("./manifest.js").PluginMigrationContext) => void | Promise<void>>;
355
+ down: z.ZodCustom<(ctx: import("./manifest.js").PluginMigrationContext) => void | Promise<void>, (ctx: import("./manifest.js").PluginMigrationContext) => void | Promise<void>>;
356
+ }, z.core.$strict>>>;
357
+ onInstall: z.ZodOptional<z.ZodCustom<() => void | Promise<void>, () => void | Promise<void>>>;
358
+ onUninstall: z.ZodOptional<z.ZodCustom<() => void | Promise<void>, () => void | Promise<void>>>;
359
+ onActivate: z.ZodOptional<z.ZodCustom<() => void | Promise<void>, () => void | Promise<void>>>;
360
+ onDeactivate: z.ZodOptional<z.ZodCustom<() => void | Promise<void>, () => void | Promise<void>>>;
361
+ onUpdate: z.ZodOptional<z.ZodCustom<(ctx: {
362
+ fromVersion: string;
363
+ }) => void | Promise<void>, (ctx: {
364
+ fromVersion: string;
365
+ }) => void | Promise<void>>>;
366
+ migrationHooks: z.ZodOptional<z.ZodObject<{
367
+ beforeMigration: z.ZodOptional<z.ZodCustom<(from: import("./manifest.js").DatabaseDialect, to: import("./manifest.js").DatabaseDialect) => void | Promise<void>, (from: import("./manifest.js").DatabaseDialect, to: import("./manifest.js").DatabaseDialect) => void | Promise<void>>>;
368
+ transformRow: z.ZodOptional<z.ZodCustom<(table: string, row: Record<string, unknown>, from: import("./manifest.js").DatabaseDialect, to: import("./manifest.js").DatabaseDialect) => Record<string, unknown> | Promise<Record<string, unknown>>, (table: string, row: Record<string, unknown>, from: import("./manifest.js").DatabaseDialect, to: import("./manifest.js").DatabaseDialect) => Record<string, unknown> | Promise<Record<string, unknown>>>>;
369
+ afterMigration: z.ZodOptional<z.ZodCustom<(from: import("./manifest.js").DatabaseDialect, to: import("./manifest.js").DatabaseDialect) => void | Promise<void>, (from: import("./manifest.js").DatabaseDialect, to: import("./manifest.js").DatabaseDialect) => void | Promise<void>>>;
370
+ validateMigration: z.ZodOptional<z.ZodCustom<(from: import("./manifest.js").DatabaseDialect, to: import("./manifest.js").DatabaseDialect) => import("./manifest.js").PluginMigrationValidation | Promise<import("./manifest.js").PluginMigrationValidation>, (from: import("./manifest.js").DatabaseDialect, to: import("./manifest.js").DatabaseDialect) => import("./manifest.js").PluginMigrationValidation | Promise<import("./manifest.js").PluginMigrationValidation>>>;
371
+ }, z.core.$strict>>;
372
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
373
+ id: z.ZodString;
374
+ label: z.ZodString;
375
+ }, z.core.$strip>>>;
376
+ roles: z.ZodOptional<z.ZodArray<z.ZodObject<{
377
+ id: z.ZodString;
378
+ label: z.ZodString;
379
+ actions: z.ZodArray<z.ZodString>;
380
+ }, z.core.$strip>>>;
381
+ docs: z.ZodOptional<z.ZodArray<z.ZodObject<{
382
+ role: z.ZodEnum<{
383
+ overview: "overview";
384
+ setup: "setup";
385
+ configuration: "configuration";
386
+ guide: "guide";
387
+ troubleshooting: "troubleshooting";
388
+ }>;
389
+ path: z.ZodString;
390
+ title: z.ZodString;
391
+ }, z.core.$strict>>>;
392
+ }, z.core.$strict>;
393
+ export declare function formatIssues(issues: z.core.$ZodIssue[]): string[];
394
+ export type ValidatePluginManifestResult = {
395
+ ok: true;
396
+ manifest: PluginManifest;
397
+ } | {
398
+ ok: false;
399
+ errors: string[];
400
+ };
401
+ /**
402
+ * Validate an untrusted value as a plugin manifest. The registry's
403
+ * install() (Session 62) and `kardalum plugin validate` (Month 7) both go
404
+ * through this: errors come back as readable `path: message` strings
405
+ * (e.g. `contributions.adminSection: Unrecognized key ...` for a key this
406
+ * contract does not define).
407
+ */
408
+ export declare function validatePluginManifest(value: unknown): ValidatePluginManifestResult;