@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
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ export declare const ContentVersionSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ contentId: z.ZodString;
5
+ version: z.ZodNumber;
6
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
7
+ cultureData: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
8
+ createdAt: z.ZodString;
9
+ createdBy: z.ZodString;
10
+ }, z.core.$strip>;
11
+ export type ContentVersion = z.infer<typeof ContentVersionSchema>;
12
+ /**
13
+ * One version's values for `culture` exactly as stored, flattened: the
14
+ * invariant slice with that culture's own slice over it, no fallback. This
15
+ * is the shape a save takes, so it is what an editor edits and what a
16
+ * write merges over.
17
+ */
18
+ export declare function flattenForCulture(version: Pick<ContentVersion, "data" | "cultureData">, culture: string): Record<string, unknown>;
@@ -0,0 +1,22 @@
1
+ import { z } from "zod";
2
+ export const ContentVersionSchema = z.object({
3
+ id: z.string().uuid(),
4
+ contentId: z.string().uuid(),
5
+ version: z.number().int().positive(),
6
+ data: z.record(z.string(), z.unknown()),
7
+ // S229b: the per-culture slice. `data` above is the invariant slice and
8
+ // keeps its exact meaning. Null or absent on every version written
9
+ // before a field was marked as varying.
10
+ cultureData: z.record(z.string(), z.record(z.string(), z.unknown())).nullish(),
11
+ createdAt: z.string().datetime(),
12
+ createdBy: z.string().uuid(),
13
+ });
14
+ /**
15
+ * One version's values for `culture` exactly as stored, flattened: the
16
+ * invariant slice with that culture's own slice over it, no fallback. This
17
+ * is the shape a save takes, so it is what an editor edits and what a
18
+ * write merges over.
19
+ */
20
+ export function flattenForCulture(version, culture) {
21
+ return { ...version.data, ...(version.cultureData?.[culture] ?? {}) };
22
+ }
@@ -0,0 +1,17 @@
1
+ import { z } from "zod";
2
+ export declare const ContentNodeSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ parentId: z.ZodNullable<z.ZodString>;
5
+ path: z.ZodString;
6
+ depth: z.ZodNumber;
7
+ sortOrder: z.ZodNumber;
8
+ documentTypeId: z.ZodString;
9
+ publishedAt: z.ZodNullable<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ export type ContentNode = z.infer<typeof ContentNodeSchema>;
12
+ export declare const NodeCultureSchema: z.ZodObject<{
13
+ culture: z.ZodString;
14
+ currentVersion: z.ZodNumber;
15
+ publishedAt: z.ZodNullable<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ export type NodeCulture = z.infer<typeof NodeCultureSchema>;
@@ -0,0 +1,20 @@
1
+ import { z } from "zod";
2
+ export const ContentNodeSchema = z.object({
3
+ id: z.string().uuid(),
4
+ parentId: z.string().uuid().nullable(),
5
+ path: z.string().min(1),
6
+ depth: z.number().int().nonnegative(),
7
+ sortOrder: z.number().int(),
8
+ documentTypeId: z.string().uuid(),
9
+ // Published in at least one culture: the most recent publish across all
10
+ // of them, maintained by setNodeCulture. Which version each culture
11
+ // serves is NodeCulture, not the node.
12
+ publishedAt: z.string().datetime().nullable(),
13
+ });
14
+ // One culture's publish state for one node (content_node_cultures). A node
15
+ // holds every language; each culture points at the version it serves.
16
+ export const NodeCultureSchema = z.object({
17
+ culture: z.string().min(2),
18
+ currentVersion: z.number().int().positive(),
19
+ publishedAt: z.string().datetime().nullable(),
20
+ });
@@ -0,0 +1,302 @@
1
+ export interface CoreAction {
2
+ action: string;
3
+ adminGatedToday: boolean;
4
+ label: string;
5
+ /** The route this action governs, as "<METHOD> <path>", and the gate it
6
+ * carried when S270 annotated it. This is the evidence for
7
+ * `adminGatedToday`, kept beside it so that changing a gate in a route
8
+ * file and not changing this is a visible inconsistency rather than an
9
+ * invisible one. Where the flag is true, and for the content rows, these routes
10
+ * carry requireAction(<action>); the other false rows are scheduled separately. */
11
+ route: string;
12
+ }
13
+ export declare const CORE_ACTIONS: readonly [{
14
+ readonly action: "content.read";
15
+ readonly adminGatedToday: false;
16
+ readonly label: "View content and mint preview links";
17
+ readonly route: "GET /api/content/by-path, GET /api/content/by-address, GET /api/content/:id, GET /api/content/roots, GET /api/content/:id/children, GET /api/content/:id/list, GET /api/content/:id/url-impact, GET /api/content/:id/move-impact, GET /api/content/:id/versions, GET /api/content/:id/versions/latest, GET /api/content/:id/versions/:version, POST /api/content/:id/preview-token, GET /api/plugins/:pluginId/storage/:contentId/:fieldId";
18
+ }, {
19
+ readonly action: "content.create";
20
+ readonly adminGatedToday: false;
21
+ readonly label: "Create and copy content";
22
+ readonly route: "POST /api/content, POST /api/content/:id/copy";
23
+ }, {
24
+ readonly action: "content.update";
25
+ readonly adminGatedToday: false;
26
+ readonly label: "Edit, move and reorder content";
27
+ readonly route: "PUT /api/content/:id, POST /api/content/:id/move, POST /api/content/roots/reorder, POST /api/content/:id/children/reorder, PUT /api/plugins/:pluginId/storage/:contentId/:fieldId";
28
+ }, {
29
+ readonly action: "content.publish";
30
+ readonly adminGatedToday: false;
31
+ readonly label: "Publish content";
32
+ readonly route: "POST /api/content/:id/publish, POST /api/content/:id/publish-all";
33
+ }, {
34
+ readonly action: "content.delete";
35
+ readonly adminGatedToday: true;
36
+ readonly label: "Move content to the trash";
37
+ readonly route: "DELETE /api/content/:id";
38
+ }, {
39
+ readonly action: "content.readTrash";
40
+ readonly adminGatedToday: true;
41
+ readonly label: "View trashed content";
42
+ readonly route: "GET /api/content/trash";
43
+ }, {
44
+ readonly action: "content.restore";
45
+ readonly adminGatedToday: true;
46
+ readonly label: "Restore trashed content";
47
+ readonly route: "POST /api/content/:id/restore";
48
+ }, {
49
+ readonly action: "content.managePermissions";
50
+ readonly adminGatedToday: true;
51
+ readonly label: "Manage permissions on content";
52
+ readonly route: "GET /api/content/:id/permissions, PUT /api/content/:id/permissions, GET /api/content/permission-subjects, DELETE /api/content/:id/restrictions, GET /api/content/:id/explain, GET /api/content/:id/explain-operation, GET /api/content/:id/who-can";
53
+ }, {
54
+ readonly action: "media.read";
55
+ readonly adminGatedToday: false;
56
+ readonly label: "View media";
57
+ readonly route: "GET /api/media, GET /api/media/trash, GET /api/media/trash/references, GET /api/media/:id, GET /api/media/:id/versions, GET /api/media/:id/references, GET /api/media/:id/renditions, GET /api/media/folders, POST /api/media/:id/link";
58
+ }, {
59
+ readonly action: "media.create";
60
+ readonly adminGatedToday: false;
61
+ readonly label: "Upload media";
62
+ readonly route: "POST /api/media, POST /api/media/folders, POST /api/media/:id/renditions";
63
+ }, {
64
+ readonly action: "media.update";
65
+ readonly adminGatedToday: false;
66
+ readonly label: "Edit media and media folders";
67
+ readonly route: "PATCH /api/media/:id, PATCH /api/media/folders/:id, POST /api/media/:id/replace, POST /api/media/:id/versions/:version/make-current, DELETE /api/media/folders/:id";
68
+ }, {
69
+ readonly action: "media.delete";
70
+ readonly adminGatedToday: false;
71
+ readonly label: "Move media to the trash";
72
+ readonly route: "DELETE /api/media/:id";
73
+ }, {
74
+ readonly action: "media.restore";
75
+ readonly adminGatedToday: false;
76
+ readonly label: "Restore trashed media";
77
+ readonly route: "POST /api/media/:id/restore";
78
+ }, {
79
+ readonly action: "media.deletePermanent";
80
+ readonly adminGatedToday: true;
81
+ readonly label: "Permanently delete media and media versions";
82
+ readonly route: "DELETE /api/media/:id/permanent, POST /api/media/trash/empty, DELETE /api/media/:id/versions/:version";
83
+ }, {
84
+ readonly action: "documentTypes.read";
85
+ readonly adminGatedToday: false;
86
+ readonly label: "View document types";
87
+ readonly route: "GET /api/document-types";
88
+ }, {
89
+ readonly action: "documentTypes.create";
90
+ readonly adminGatedToday: false;
91
+ readonly label: "Create document types";
92
+ readonly route: "POST /api/document-types";
93
+ }, {
94
+ readonly action: "documentTypes.update";
95
+ readonly adminGatedToday: false;
96
+ readonly label: "Edit document types";
97
+ readonly route: "PUT /api/document-types/:id, PATCH /api/document-types/:id/default-template";
98
+ }, {
99
+ readonly action: "documentTypes.delete";
100
+ readonly adminGatedToday: false;
101
+ readonly label: "Delete document types";
102
+ readonly route: "DELETE /api/document-types/:id";
103
+ }, {
104
+ readonly action: "dataTypes.read";
105
+ readonly adminGatedToday: false;
106
+ readonly label: "View data types";
107
+ readonly route: "GET /api/data-types, GET /api/data-types/:id";
108
+ }, {
109
+ readonly action: "dataTypes.create";
110
+ readonly adminGatedToday: false;
111
+ readonly label: "Create data types";
112
+ readonly route: "POST /api/data-types";
113
+ }, {
114
+ readonly action: "dataTypes.update";
115
+ readonly adminGatedToday: false;
116
+ readonly label: "Configure data types";
117
+ readonly route: "PATCH /api/data-types/:id";
118
+ }, {
119
+ readonly action: "templates.read";
120
+ readonly adminGatedToday: false;
121
+ readonly label: "View templates";
122
+ readonly route: "GET /api/templates, GET /api/templates/:id";
123
+ }, {
124
+ readonly action: "templates.create";
125
+ readonly adminGatedToday: true;
126
+ readonly label: "Create templates";
127
+ readonly route: "POST /api/templates";
128
+ }, {
129
+ readonly action: "templates.update";
130
+ readonly adminGatedToday: true;
131
+ readonly label: "Edit templates";
132
+ readonly route: "PATCH /api/templates/:id";
133
+ }, {
134
+ readonly action: "templates.delete";
135
+ readonly adminGatedToday: true;
136
+ readonly label: "Delete templates";
137
+ readonly route: "DELETE /api/templates/:id";
138
+ }, {
139
+ readonly action: "templates.sync";
140
+ readonly adminGatedToday: true;
141
+ readonly label: "Sync templates from disk";
142
+ readonly route: "POST /api/templates/sync";
143
+ }, {
144
+ readonly action: "assets.read";
145
+ readonly adminGatedToday: false;
146
+ readonly label: "View site assets";
147
+ readonly route: "GET /api/assets/tree, GET /api/assets/content, GET /api/assets/raw";
148
+ }, {
149
+ readonly action: "assets.create";
150
+ readonly adminGatedToday: true;
151
+ readonly label: "Upload site assets and create folders";
152
+ readonly route: "POST /api/assets/upload, POST /api/assets/extract-zip, POST /api/assets/folder";
153
+ }, {
154
+ readonly action: "assets.update";
155
+ readonly adminGatedToday: true;
156
+ readonly label: "Edit and rename site assets";
157
+ readonly route: "PUT /api/assets/content, PATCH /api/assets/rename";
158
+ }, {
159
+ readonly action: "assets.delete";
160
+ readonly adminGatedToday: true;
161
+ readonly label: "Delete site assets";
162
+ readonly route: "DELETE /api/assets";
163
+ }, {
164
+ readonly action: "assets.sync";
165
+ readonly adminGatedToday: true;
166
+ readonly label: "Sync site assets from disk";
167
+ readonly route: "POST /api/assets/sync";
168
+ }, {
169
+ readonly action: "render.read";
170
+ readonly adminGatedToday: true;
171
+ readonly label: "View text styles and embeddable blocks";
172
+ readonly route: "GET /api/render/text-styles, GET /api/render/blocks";
173
+ }, {
174
+ readonly action: "render.preview";
175
+ readonly adminGatedToday: true;
176
+ readonly label: "Render a block preview";
177
+ readonly route: "POST /api/render/block";
178
+ }, {
179
+ readonly action: "settings.read";
180
+ readonly adminGatedToday: false;
181
+ readonly label: "View settings";
182
+ readonly route: "GET /api/settings/render, GET /api/settings/cultures, GET /api/settings/sites, GET /api/settings/nav";
183
+ }, {
184
+ readonly action: "settings.update";
185
+ readonly adminGatedToday: true;
186
+ readonly label: "Change settings";
187
+ readonly route: "PUT /api/settings/render, PUT /api/settings/cultures, PUT /api/settings/nav";
188
+ }, {
189
+ readonly action: "sites.manage";
190
+ readonly adminGatedToday: true;
191
+ readonly label: "Manage sites";
192
+ readonly route: "GET /api/sites, PUT /api/settings/sites/default, PUT /api/settings/sites/:siteId/hostnames";
193
+ }, {
194
+ readonly action: "users.read";
195
+ readonly adminGatedToday: true;
196
+ readonly label: "View users";
197
+ readonly route: "GET /api/users";
198
+ }, {
199
+ readonly action: "users.create";
200
+ readonly adminGatedToday: true;
201
+ readonly label: "Invite users";
202
+ readonly route: "POST /api/users";
203
+ }, {
204
+ readonly action: "users.update";
205
+ readonly adminGatedToday: true;
206
+ readonly label: "Change user roles";
207
+ readonly route: "PATCH /api/users/:id/role";
208
+ }, {
209
+ readonly action: "roles.read";
210
+ readonly adminGatedToday: true;
211
+ readonly label: "View roles and the actions they grant";
212
+ readonly route: "GET /api/roles, GET /api/actions";
213
+ }, {
214
+ readonly action: "roles.create";
215
+ readonly adminGatedToday: true;
216
+ readonly label: "Create roles";
217
+ readonly route: "POST /api/roles, POST /api/plugin-management/plugins/:pluginId/offered-roles/:roleId";
218
+ }, {
219
+ readonly action: "roles.update";
220
+ readonly adminGatedToday: true;
221
+ readonly label: "Edit a role's label and actions";
222
+ readonly route: "PATCH /api/roles/:id";
223
+ }, {
224
+ readonly action: "roles.delete";
225
+ readonly adminGatedToday: true;
226
+ readonly label: "Delete roles";
227
+ readonly route: "DELETE /api/roles/:id";
228
+ }, {
229
+ readonly action: "apiKeys.read";
230
+ readonly adminGatedToday: true;
231
+ readonly label: "View API keys";
232
+ readonly route: "GET /api/api-keys";
233
+ }, {
234
+ readonly action: "apiKeys.create";
235
+ readonly adminGatedToday: true;
236
+ readonly label: "Create API keys";
237
+ readonly route: "POST /api/api-keys";
238
+ }, {
239
+ readonly action: "apiKeys.revoke";
240
+ readonly adminGatedToday: true;
241
+ readonly label: "Revoke API keys";
242
+ readonly route: "POST /api/api-keys/:id/revoke";
243
+ }, {
244
+ readonly action: "apiPlayground.read";
245
+ readonly adminGatedToday: true;
246
+ readonly label: "Use the API playground";
247
+ readonly route: "GET /api/api-playground/openapi";
248
+ }, {
249
+ readonly action: "plugins.read";
250
+ readonly adminGatedToday: true;
251
+ readonly label: "View installed plugins";
252
+ readonly route: "GET /api/plugin-management/plugins, GET /api/plugin-management/marketplace-status, GET /api/plugin-management/plugins/:pluginId/snapshot-groups, GET /api/plugin-management/docs, GET /api/plugin-management/docs/search-index, GET /api/plugin-management/docs/:pluginId/pages/:slug, GET /api/plugin-management/docs/:pluginId/reference";
253
+ }, {
254
+ readonly action: "plugins.browse";
255
+ readonly adminGatedToday: true;
256
+ readonly label: "Browse the plugin marketplace";
257
+ readonly route: "GET /api/plugin-management/marketplace/listings, GET /api/plugin-management/marketplace/listings/:pluginId";
258
+ }, {
259
+ readonly action: "plugins.install";
260
+ readonly adminGatedToday: true;
261
+ readonly label: "Install plugins";
262
+ readonly route: "POST /api/plugin-management/marketplace/install, POST /api/plugins/upload";
263
+ }, {
264
+ readonly action: "plugins.update";
265
+ readonly adminGatedToday: true;
266
+ readonly label: "Enable or disable plugins";
267
+ readonly route: "POST /api/plugin-management/plugins/:pluginId/activate, POST /api/plugin-management/plugins/:pluginId/deactivate, POST /api/plugin-management/plugins/:pluginId/license/recheck";
268
+ }, {
269
+ readonly action: "plugins.delete";
270
+ readonly adminGatedToday: true;
271
+ readonly label: "Uninstall plugins";
272
+ readonly route: "DELETE /api/plugin-management/plugins/:pluginId";
273
+ }, {
274
+ readonly action: "plugins.restore";
275
+ readonly adminGatedToday: true;
276
+ readonly label: "Restore a plugin from a snapshot";
277
+ readonly route: "POST /api/plugin-management/plugins/:pluginId/snapshot-groups/restore";
278
+ }, {
279
+ readonly action: "snapshots.read";
280
+ readonly adminGatedToday: true;
281
+ readonly label: "View snapshots";
282
+ readonly route: "GET /api/snapshots";
283
+ }, {
284
+ readonly action: "snapshots.create";
285
+ readonly adminGatedToday: true;
286
+ readonly label: "Create snapshots";
287
+ readonly route: "POST /api/snapshots";
288
+ }, {
289
+ readonly action: "snapshots.restore";
290
+ readonly adminGatedToday: true;
291
+ readonly label: "Restore a snapshot";
292
+ readonly route: "POST /api/snapshots/:id/restore";
293
+ }];
294
+ /** Every core action as a literal union, so a mistyped action string is a
295
+ * compile error at the call site rather than a permission nobody holds. */
296
+ export type CoreActionString = (typeof CORE_ACTIONS)[number]["action"];
297
+ export declare const CORE_ACTION_STRINGS: readonly string[];
298
+ /** Whether this is one of core's own actions, as opposed to a plugin's. */
299
+ export declare function isCoreAction(value: string): boolean;
300
+ type AssertTrue<T extends true> = T;
301
+ type CoreActionStringIsNarrow = AssertTrue<string extends CoreActionString ? false : true>;
302
+ export type { CoreActionStringIsNarrow };
@@ -0,0 +1,97 @@
1
+ // Core's own action vocabulary (S270, theme G1).
2
+ //
3
+ // `adminGatedToday` recorded whether the surface this action governs was
4
+ // behind requireAdmin when S270 annotated it. That annotation is not
5
+ // decoration: it is what makes the seeded admin and editor roles DERIVED
6
+ // rather than invented, because requireAdmin was the only thing separating
7
+ // the two roles then. S271 converted those call sites and used this as its
8
+ // checklist. Since S271 the `adminGatedToday: true` routes carry
9
+ // requireAction(<action>), and since S276 and S277 so do all the content rows.
10
+ // The other `adminGatedToday: false` rows (media, document types, data types,
11
+ // templates, assets and the settings reads) still ask only for a session and
12
+ // are scheduled separately. The flag remains what the seeded editor role is
13
+ // derived from.
14
+ //
15
+ // Each value was read from the route that serves the action, per route and
16
+ // not per file: content.ts and media.ts mix requireAdmin and requireAuth.
17
+ // Where one verb spans routes with different gates (media trash versus
18
+ // permanent delete) it is split into two actions, so one string never
19
+ // stands for both a gated and an ungated route.
20
+ //
21
+ // `label` exists because nothing ever shows an operator a raw action
22
+ // string. The role editor renders this, the same way CAPABILITY_LABELS
23
+ // renders capabilities.
24
+ export const CORE_ACTIONS = [
25
+ { action: "content.read", adminGatedToday: false, label: "View content and mint preview links", route: "GET /api/content/by-path, GET /api/content/by-address, GET /api/content/:id, GET /api/content/roots, GET /api/content/:id/children, GET /api/content/:id/list, GET /api/content/:id/url-impact, GET /api/content/:id/move-impact, GET /api/content/:id/versions, GET /api/content/:id/versions/latest, GET /api/content/:id/versions/:version, POST /api/content/:id/preview-token, GET /api/plugins/:pluginId/storage/:contentId/:fieldId" },
26
+ { action: "content.create", adminGatedToday: false, label: "Create and copy content", route: "POST /api/content, POST /api/content/:id/copy" },
27
+ { action: "content.update", adminGatedToday: false, label: "Edit, move and reorder content", route: "PUT /api/content/:id, POST /api/content/:id/move, POST /api/content/roots/reorder, POST /api/content/:id/children/reorder, PUT /api/plugins/:pluginId/storage/:contentId/:fieldId" },
28
+ { action: "content.publish", adminGatedToday: false, label: "Publish content", route: "POST /api/content/:id/publish, POST /api/content/:id/publish-all" },
29
+ { action: "content.delete", adminGatedToday: true, label: "Move content to the trash", route: "DELETE /api/content/:id" },
30
+ { action: "content.readTrash", adminGatedToday: true, label: "View trashed content", route: "GET /api/content/trash" },
31
+ { action: "content.restore", adminGatedToday: true, label: "Restore trashed content", route: "POST /api/content/:id/restore" },
32
+ // S278: reading and saving a node's restrictions, and the search for the
33
+ // roles and users a restriction can name. New with the permissions tab, so
34
+ // there was no earlier gate to read; admin-gated because it decides who
35
+ // may reach a page at all.
36
+ { action: "content.managePermissions", adminGatedToday: true, label: "Manage permissions on content", route: "GET /api/content/:id/permissions, PUT /api/content/:id/permissions, GET /api/content/permission-subjects, DELETE /api/content/:id/restrictions, GET /api/content/:id/explain, GET /api/content/:id/explain-operation, GET /api/content/:id/who-can" },
37
+ { action: "media.read", adminGatedToday: false, label: "View media", route: "GET /api/media, GET /api/media/trash, GET /api/media/trash/references, GET /api/media/:id, GET /api/media/:id/versions, GET /api/media/:id/references, GET /api/media/:id/renditions, GET /api/media/folders, POST /api/media/:id/link" },
38
+ { action: "media.create", adminGatedToday: false, label: "Upload media", route: "POST /api/media, POST /api/media/folders, POST /api/media/:id/renditions" },
39
+ { action: "media.update", adminGatedToday: false, label: "Edit media and media folders", route: "PATCH /api/media/:id, PATCH /api/media/folders/:id, POST /api/media/:id/replace, POST /api/media/:id/versions/:version/make-current, DELETE /api/media/folders/:id" },
40
+ { action: "media.delete", adminGatedToday: false, label: "Move media to the trash", route: "DELETE /api/media/:id" },
41
+ { action: "media.restore", adminGatedToday: false, label: "Restore trashed media", route: "POST /api/media/:id/restore" },
42
+ { action: "media.deletePermanent", adminGatedToday: true, label: "Permanently delete media and media versions", route: "DELETE /api/media/:id/permanent, POST /api/media/trash/empty, DELETE /api/media/:id/versions/:version" },
43
+ { action: "documentTypes.read", adminGatedToday: false, label: "View document types", route: "GET /api/document-types" },
44
+ { action: "documentTypes.create", adminGatedToday: false, label: "Create document types", route: "POST /api/document-types" },
45
+ { action: "documentTypes.update", adminGatedToday: false, label: "Edit document types", route: "PUT /api/document-types/:id, PATCH /api/document-types/:id/default-template" },
46
+ { action: "documentTypes.delete", adminGatedToday: false, label: "Delete document types", route: "DELETE /api/document-types/:id" },
47
+ { action: "dataTypes.read", adminGatedToday: false, label: "View data types", route: "GET /api/data-types, GET /api/data-types/:id" },
48
+ { action: "dataTypes.create", adminGatedToday: false, label: "Create data types", route: "POST /api/data-types" },
49
+ { action: "dataTypes.update", adminGatedToday: false, label: "Configure data types", route: "PATCH /api/data-types/:id" },
50
+ { action: "templates.read", adminGatedToday: false, label: "View templates", route: "GET /api/templates, GET /api/templates/:id" },
51
+ { action: "templates.create", adminGatedToday: true, label: "Create templates", route: "POST /api/templates" },
52
+ { action: "templates.update", adminGatedToday: true, label: "Edit templates", route: "PATCH /api/templates/:id" },
53
+ { action: "templates.delete", adminGatedToday: true, label: "Delete templates", route: "DELETE /api/templates/:id" },
54
+ { action: "templates.sync", adminGatedToday: true, label: "Sync templates from disk", route: "POST /api/templates/sync" },
55
+ { action: "assets.read", adminGatedToday: false, label: "View site assets", route: "GET /api/assets/tree, GET /api/assets/content, GET /api/assets/raw" },
56
+ { action: "assets.create", adminGatedToday: true, label: "Upload site assets and create folders", route: "POST /api/assets/upload, POST /api/assets/extract-zip, POST /api/assets/folder" },
57
+ { action: "assets.update", adminGatedToday: true, label: "Edit and rename site assets", route: "PUT /api/assets/content, PATCH /api/assets/rename" },
58
+ { action: "assets.delete", adminGatedToday: true, label: "Delete site assets", route: "DELETE /api/assets" },
59
+ { action: "assets.sync", adminGatedToday: true, label: "Sync site assets from disk", route: "POST /api/assets/sync" },
60
+ { action: "render.read", adminGatedToday: true, label: "View text styles and embeddable blocks", route: "GET /api/render/text-styles, GET /api/render/blocks" },
61
+ { action: "render.preview", adminGatedToday: true, label: "Render a block preview", route: "POST /api/render/block" },
62
+ { action: "settings.read", adminGatedToday: false, label: "View settings", route: "GET /api/settings/render, GET /api/settings/cultures, GET /api/settings/sites, GET /api/settings/nav" },
63
+ { action: "settings.update", adminGatedToday: true, label: "Change settings", route: "PUT /api/settings/render, PUT /api/settings/cultures, PUT /api/settings/nav" },
64
+ // S277d: a site's domains and the choice of default site. New with the
65
+ // Site tab, so there was no earlier gate to read; admin-gated because it
66
+ // decides which content every address of the install shows.
67
+ { action: "sites.manage", adminGatedToday: true, label: "Manage sites", route: "GET /api/sites, PUT /api/settings/sites/default, PUT /api/settings/sites/:siteId/hostnames" },
68
+ { action: "users.read", adminGatedToday: true, label: "View users", route: "GET /api/users" },
69
+ { action: "users.create", adminGatedToday: true, label: "Invite users", route: "POST /api/users" },
70
+ { action: "users.update", adminGatedToday: true, label: "Change user roles", route: "PATCH /api/users/:id/role" },
71
+ // S272: new with the role editor, so there was no requireAdmin gate to
72
+ // read. Marked admin-gated because granting the role editor to the seeded
73
+ // editor would let that role grant itself anything.
74
+ { action: "roles.read", adminGatedToday: true, label: "View roles and the actions they grant", route: "GET /api/roles, GET /api/actions" },
75
+ { action: "roles.create", adminGatedToday: true, label: "Create roles", route: "POST /api/roles, POST /api/plugin-management/plugins/:pluginId/offered-roles/:roleId" },
76
+ { action: "roles.update", adminGatedToday: true, label: "Edit a role's label and actions", route: "PATCH /api/roles/:id" },
77
+ { action: "roles.delete", adminGatedToday: true, label: "Delete roles", route: "DELETE /api/roles/:id" },
78
+ { action: "apiKeys.read", adminGatedToday: true, label: "View API keys", route: "GET /api/api-keys" },
79
+ { action: "apiKeys.create", adminGatedToday: true, label: "Create API keys", route: "POST /api/api-keys" },
80
+ { action: "apiKeys.revoke", adminGatedToday: true, label: "Revoke API keys", route: "POST /api/api-keys/:id/revoke" },
81
+ { action: "apiPlayground.read", adminGatedToday: true, label: "Use the API playground", route: "GET /api/api-playground/openapi" },
82
+ { action: "plugins.read", adminGatedToday: true, label: "View installed plugins", route: "GET /api/plugin-management/plugins, GET /api/plugin-management/marketplace-status, GET /api/plugin-management/plugins/:pluginId/snapshot-groups, GET /api/plugin-management/docs, GET /api/plugin-management/docs/search-index, GET /api/plugin-management/docs/:pluginId/pages/:slug, GET /api/plugin-management/docs/:pluginId/reference" },
83
+ { action: "plugins.browse", adminGatedToday: true, label: "Browse the plugin marketplace", route: "GET /api/plugin-management/marketplace/listings, GET /api/plugin-management/marketplace/listings/:pluginId" },
84
+ { action: "plugins.install", adminGatedToday: true, label: "Install plugins", route: "POST /api/plugin-management/marketplace/install, POST /api/plugins/upload" },
85
+ { action: "plugins.update", adminGatedToday: true, label: "Enable or disable plugins", route: "POST /api/plugin-management/plugins/:pluginId/activate, POST /api/plugin-management/plugins/:pluginId/deactivate, POST /api/plugin-management/plugins/:pluginId/license/recheck" },
86
+ { action: "plugins.delete", adminGatedToday: true, label: "Uninstall plugins", route: "DELETE /api/plugin-management/plugins/:pluginId" },
87
+ { action: "plugins.restore", adminGatedToday: true, label: "Restore a plugin from a snapshot", route: "POST /api/plugin-management/plugins/:pluginId/snapshot-groups/restore" },
88
+ { action: "snapshots.read", adminGatedToday: true, label: "View snapshots", route: "GET /api/snapshots" },
89
+ { action: "snapshots.create", adminGatedToday: true, label: "Create snapshots", route: "POST /api/snapshots" },
90
+ { action: "snapshots.restore", adminGatedToday: true, label: "Restore a snapshot", route: "POST /api/snapshots/:id/restore" },
91
+ ];
92
+ export const CORE_ACTION_STRINGS = CORE_ACTIONS.map((entry) => entry.action);
93
+ const CORE_SET = new Set(CORE_ACTION_STRINGS);
94
+ /** Whether this is one of core's own actions, as opposed to a plugin's. */
95
+ export function isCoreAction(value) {
96
+ return CORE_SET.has(value);
97
+ }
@@ -0,0 +1 @@
1
+ export declare function cultureDirection(code: string): "ltr" | "rtl";
@@ -0,0 +1,9 @@
1
+ // S231: the one place Kardalum decides whether a language is written right
2
+ // to left. The server puts it on a rendered page's <html>, and the admin
3
+ // puts it on the fields that hold that language's text. Decided by primary
4
+ // subtag, so ar and ar-EG agree without listing every region.
5
+ const RTL_LANGUAGES = new Set(["ar", "he", "fa", "ur", "ps", "sd", "yi", "dv", "ckb"]);
6
+ export function cultureDirection(code) {
7
+ const primary = (code.split("-")[0] ?? "").toLowerCase();
8
+ return RTL_LANGUAGES.has(primary) ? "rtl" : "ltr";
9
+ }
@@ -0,0 +1,36 @@
1
+ import { z } from "zod";
2
+ export declare const CreateDataTypeRequestSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ editorId: z.ZodString;
5
+ settings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6
+ }, z.core.$strict>;
7
+ export type CreateDataTypeRequest = z.infer<typeof CreateDataTypeRequestSchema>;
8
+ export declare const UpdateDataTypeRequestSchema: z.ZodObject<{
9
+ name: z.ZodOptional<z.ZodString>;
10
+ settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11
+ }, z.core.$strict>;
12
+ export type UpdateDataTypeRequest = z.infer<typeof UpdateDataTypeRequestSchema>;
13
+ export declare const DataTypeResponseSchema: z.ZodObject<{
14
+ dataType: z.ZodObject<{
15
+ id: z.ZodString;
16
+ name: z.ZodString;
17
+ editorId: z.ZodString;
18
+ settings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
19
+ }, z.core.$strict>;
20
+ }, z.core.$strip>;
21
+ export type DataTypeResponse = z.infer<typeof DataTypeResponseSchema>;
22
+ export declare const DataTypeListQuerySchema: z.ZodObject<{
23
+ cursor: z.ZodOptional<z.ZodString>;
24
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
25
+ }, z.core.$strip>;
26
+ export type DataTypeListQuery = z.infer<typeof DataTypeListQuerySchema>;
27
+ export declare const DataTypeListResponseSchema: z.ZodObject<{
28
+ items: z.ZodArray<z.ZodObject<{
29
+ id: z.ZodString;
30
+ name: z.ZodString;
31
+ editorId: z.ZodString;
32
+ settings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
33
+ }, z.core.$strict>>;
34
+ nextCursor: z.ZodNullable<z.ZodString>;
35
+ }, z.core.$strip>;
36
+ export type DataTypeListResponse = z.infer<typeof DataTypeListResponseSchema>;
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ import { DataTypeConfigSchema } from "./data-type-config.schema.js";
3
+ export const CreateDataTypeRequestSchema = z
4
+ .object({
5
+ name: z.string().min(1),
6
+ editorId: z.string().min(1),
7
+ settings: z.record(z.string(), z.unknown()).default({}),
8
+ })
9
+ .strict();
10
+ // editorId is deliberately absent — immutable after creation (see
11
+ // DataTypeConfigSchema). At least the route merges partial updates onto
12
+ // the loaded config, so both fields are optional here.
13
+ export const UpdateDataTypeRequestSchema = z
14
+ .object({
15
+ name: z.string().min(1).optional(),
16
+ settings: z.record(z.string(), z.unknown()).optional(),
17
+ })
18
+ .strict();
19
+ export const DataTypeResponseSchema = z.object({
20
+ dataType: DataTypeConfigSchema,
21
+ });
22
+ // Ordered name ASC (id ASC tiebreak) for the Settings tree; cursor = id
23
+ // of the previous page's last config.
24
+ export const DataTypeListQuerySchema = z.object({
25
+ cursor: z.string().uuid().optional(),
26
+ limit: z.coerce.number().int().min(1).max(100).default(50),
27
+ });
28
+ export const DataTypeListResponseSchema = z.object({
29
+ items: z.array(DataTypeConfigSchema),
30
+ // null = no more pages.
31
+ nextCursor: z.string().uuid().nullable(),
32
+ });
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+ export declare const DataTypeConfigSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ editorId: z.ZodString;
6
+ settings: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7
+ }, z.core.$strict>;
8
+ export type DataTypeConfig = z.infer<typeof DataTypeConfigSchema>;
9
+ export declare const BUILT_IN_DATA_TYPE_CONFIGS: readonly DataTypeConfig[];
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ // A Data Type is a named, admin-created CONFIGURATION of a registry
3
+ // editor (Umbraco's split: the editor is the input-control code shipped
4
+ // by core/plugins; the Data Type is "Richtext: limited toolbar").
5
+ // Document type fields reference a Data Type's id — configure once,
6
+ // reuse across document types. Settings are validated against the
7
+ // editor's settingsSchema when the plugin settings pipeline lands
8
+ // (Month 6); until then they are a free-form record.
9
+ export const DataTypeConfigSchema = z
10
+ .object({
11
+ id: z.string().uuid(),
12
+ name: z.string().min(1),
13
+ // Registry editor id, e.g. 'com.kardalum.richtext'. Immutable after
14
+ // creation — swapping the editor under fields that already store
15
+ // values in the old editor's shape is a data footgun.
16
+ editorId: z.string().min(1),
17
+ settings: z.record(z.string(), z.unknown()).default({}),
18
+ })
19
+ .strict();
20
+ // Every built-in editor seeds one default config in migration
21
+ // 0006_data_types, with these FIXED ids — the single source of truth
22
+ // shared by the migrations, tests, and any code that needs "the plain
23
+ // Text data type" without a lookup. Version-4/variant-8 shaped so
24
+ // z.string().uuid() accepts them.
25
+ export const BUILT_IN_DATA_TYPE_CONFIGS = [
26
+ { id: "b1e00000-0000-4000-8000-000000000001", name: "Text", editorId: "com.kardalum.text", settings: {} },
27
+ { id: "b1e00000-0000-4000-8000-000000000002", name: "Number", editorId: "com.kardalum.number", settings: {} },
28
+ { id: "b1e00000-0000-4000-8000-000000000003", name: "Boolean", editorId: "com.kardalum.boolean", settings: {} },
29
+ { id: "b1e00000-0000-4000-8000-000000000004", name: "Date", editorId: "com.kardalum.date", settings: {} },
30
+ { id: "b1e00000-0000-4000-8000-000000000005", name: "Image", editorId: "com.kardalum.image", settings: {} },
31
+ { id: "b1e00000-0000-4000-8000-000000000006", name: "Rich Text", editorId: "com.kardalum.richtext", settings: {} },
32
+ ];