@kardalum/plugin-sdk 0.20.0 → 0.21.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 (323) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/admin-section-registry.d.ts +33 -1
  3. package/dist/admin-section-registry.js +67 -0
  4. package/dist/capabilities.js +46 -1
  5. package/dist/consent-entry.d.ts +11 -0
  6. package/dist/consent-entry.js +18 -0
  7. package/dist/content-library.d.ts +17 -0
  8. package/dist/content-list-extensions.d.ts +50 -0
  9. package/dist/content-list-extensions.js +11 -0
  10. package/dist/content-picker/page-picker-sheet.d.ts +2 -0
  11. package/dist/content-picker/page-picker-sheet.js +1 -1
  12. package/dist/content-picker/page-picker.d.ts +18 -0
  13. package/dist/content-picker/page-picker.js +20 -0
  14. package/dist/datatype-validation.js +10 -2
  15. package/dist/datatypes-entry.d.ts +1 -0
  16. package/dist/datatypes-entry.js +2 -0
  17. package/dist/entitlement-types.d.ts +18 -1
  18. package/dist/host-entry.d.ts +7 -1
  19. package/dist/host-entry.js +14 -1
  20. package/dist/index.d.ts +35 -7
  21. package/dist/index.js +46 -5
  22. package/dist/mail.d.ts +6 -2
  23. package/dist/manifest-entry.d.ts +22 -4
  24. package/dist/manifest-entry.js +25 -1
  25. package/dist/manifest-schema.d.ts +570 -31
  26. package/dist/manifest-schema.js +240 -12
  27. package/dist/manifest.d.ts +757 -32
  28. package/dist/manifest.js +8 -4
  29. package/dist/plugin-context.d.ts +47 -0
  30. package/dist/plugin-context.js +27 -0
  31. package/dist/plugin-permissions.d.ts +18 -0
  32. package/dist/plugin-permissions.js +25 -0
  33. package/dist/plugin-screen-context.d.ts +152 -11
  34. package/dist/plugin-screen-context.js +30 -0
  35. package/dist/providers.d.ts +47 -2
  36. package/dist/render-page.d.ts +15 -0
  37. package/dist/render-page.js +20 -0
  38. package/dist/richtext/block-panel.d.ts +12 -1
  39. package/dist/richtext/block-panel.js +27 -21
  40. package/dist/richtext/button-view.d.ts +11 -0
  41. package/dist/richtext/button-view.js +45 -0
  42. package/dist/richtext/content-guard.d.ts +4 -0
  43. package/dist/richtext/content-guard.js +27 -0
  44. package/dist/richtext/editor-handle.d.ts +34 -0
  45. package/dist/richtext/editor-handle.js +225 -0
  46. package/dist/richtext/extensions.d.ts +6 -0
  47. package/dist/richtext/extensions.js +16 -0
  48. package/dist/richtext/insert-menu.d.ts +6 -1
  49. package/dist/richtext/insert-menu.js +38 -18
  50. package/dist/richtext/item-attributes.d.ts +6 -0
  51. package/dist/richtext/item-attributes.js +19 -0
  52. package/dist/richtext/item-panel.d.ts +25 -0
  53. package/dist/richtext/item-panel.js +118 -0
  54. package/dist/richtext/item-view.d.ts +58 -0
  55. package/dist/richtext/item-view.js +172 -0
  56. package/dist/richtext/mark-form.d.ts +10 -0
  57. package/dist/richtext/mark-form.js +38 -0
  58. package/dist/richtext/paste-choice.d.ts +9 -0
  59. package/dist/richtext/paste-choice.js +13 -0
  60. package/dist/richtext/plugin-items.d.ts +72 -0
  61. package/dist/richtext/plugin-items.js +562 -0
  62. package/dist/richtext/plugin-mark-tooltips.d.ts +5 -0
  63. package/dist/richtext/plugin-mark-tooltips.js +44 -0
  64. package/dist/richtext/plugin-toolbar.d.ts +57 -0
  65. package/dist/richtext/plugin-toolbar.js +186 -0
  66. package/dist/richtext/rich-item-icons.d.ts +5 -0
  67. package/dist/richtext/rich-item-icons.js +42 -0
  68. package/dist/richtext/rich-items.d.ts +42 -0
  69. package/dist/richtext/rich-items.js +68 -0
  70. package/dist/richtext/rich-text-view-host.d.ts +24 -0
  71. package/dist/richtext/rich-text-view-host.js +11 -0
  72. package/dist/richtext/toolbar-button.d.ts +16 -0
  73. package/dist/richtext/toolbar-button.js +9 -0
  74. package/dist/richtext/url-paste.d.ts +20 -0
  75. package/dist/richtext/url-paste.js +82 -0
  76. package/dist/richtext-html-entry.d.ts +5 -0
  77. package/dist/richtext-html-entry.js +11 -0
  78. package/dist/sdk-strings.d.ts +59 -0
  79. package/dist/sdk-strings.js +64 -0
  80. package/dist/service-contract.d.ts +17 -0
  81. package/dist/service-contract.js +39 -0
  82. package/dist/services.d.ts +114 -0
  83. package/dist/services.js +1 -0
  84. package/dist/structured-storage-types.d.ts +124 -4
  85. package/dist/tailwind.js +10 -5
  86. package/dist/template-reads.d.ts +16 -0
  87. package/dist/template-reads.js +21 -0
  88. package/dist/testing-entry.d.ts +38 -0
  89. package/dist/testing-entry.js +173 -0
  90. package/dist/text-entry.d.ts +1 -1
  91. package/dist/text-entry.js +3 -2
  92. package/dist/tokens/system-dark.css +1 -0
  93. package/dist/tokens/tailwind-theme.css +2 -0
  94. package/dist/tokens/tokens.css +4 -0
  95. package/dist/tokens/tokens.json +5 -1
  96. package/dist/uploads.d.ts +43 -0
  97. package/dist/uploads.js +1 -0
  98. package/dist/user-library.d.ts +51 -0
  99. package/dist/user-library.js +15 -0
  100. package/dist/view-helpers.d.ts +18 -0
  101. package/dist/view-helpers.js +64 -0
  102. package/dist/views/content-list-view.js +207 -8
  103. package/dist/views/content-picker-view.js +1 -1
  104. package/dist/views/rich-text-view.d.ts +2 -0
  105. package/dist/views/rich-text-view.js +182 -24
  106. package/dist/views/unreadable-rich-text.d.ts +17 -0
  107. package/dist/views/unreadable-rich-text.js +40 -0
  108. package/dist/visitors.d.ts +81 -0
  109. package/dist/visitors.js +1 -0
  110. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.d.ts +21 -0
  111. package/node_modules/@kardalum/api-schemas/dist/ai-app-hosts.js +39 -0
  112. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.d.ts +2 -0
  113. package/node_modules/@kardalum/api-schemas/dist/ai-app-redirects.js +31 -0
  114. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.d.ts +127 -8
  115. package/node_modules/@kardalum/api-schemas/dist/ai-connections.schema.js +82 -7
  116. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.d.ts +5 -1
  117. package/node_modules/@kardalum/api-schemas/dist/audit-api.schema.js +2 -2
  118. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.d.ts +7 -0
  119. package/node_modules/@kardalum/api-schemas/dist/built-in-editor-ids.js +11 -0
  120. package/node_modules/@kardalum/api-schemas/dist/capability-detail.d.ts +1 -1
  121. package/node_modules/@kardalum/api-schemas/dist/capability-detail.js +18 -0
  122. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.d.ts +80 -0
  123. package/node_modules/@kardalum/api-schemas/dist/content-list.schema.js +41 -2
  124. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.d.ts +213 -0
  125. package/node_modules/@kardalum/api-schemas/dist/content-reads.schema.js +234 -0
  126. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.d.ts +11 -0
  127. package/node_modules/@kardalum/api-schemas/dist/contribution-issues.js +14 -0
  128. package/node_modules/@kardalum/api-schemas/dist/core-actions.d.ts +50 -13
  129. package/node_modules/@kardalum/api-schemas/dist/core-actions.js +19 -10
  130. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.d.ts +77 -0
  131. package/node_modules/@kardalum/api-schemas/dist/document-type-api.schema.js +37 -0
  132. package/node_modules/@kardalum/api-schemas/dist/experimental-points.d.ts +19 -0
  133. package/node_modules/@kardalum/api-schemas/dist/experimental-points.js +250 -0
  134. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.d.ts +29 -0
  135. package/node_modules/@kardalum/api-schemas/dist/form-protection-callers.js +31 -0
  136. package/node_modules/@kardalum/api-schemas/dist/html-scan.d.ts +22 -0
  137. package/node_modules/@kardalum/api-schemas/dist/html-scan.js +122 -0
  138. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.d.ts +48 -0
  139. package/node_modules/@kardalum/api-schemas/dist/html-start-tags.js +381 -0
  140. package/node_modules/@kardalum/api-schemas/dist/index.d.ts +52 -14
  141. package/node_modules/@kardalum/api-schemas/dist/index.js +53 -9
  142. package/node_modules/@kardalum/api-schemas/dist/json-depth.d.ts +3 -0
  143. package/node_modules/@kardalum/api-schemas/dist/json-depth.js +20 -0
  144. package/node_modules/@kardalum/api-schemas/dist/mail-rules.d.ts +4 -2
  145. package/node_modules/@kardalum/api-schemas/dist/mail-rules.js +6 -1
  146. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.d.ts +178 -2
  147. package/node_modules/@kardalum/api-schemas/dist/marketplace-listing-api.schema.js +10 -0
  148. package/node_modules/@kardalum/api-schemas/dist/mcp-plugins.schema.d.ts +3 -3
  149. package/node_modules/@kardalum/api-schemas/dist/media-api.schema.d.ts +16 -0
  150. package/node_modules/@kardalum/api-schemas/dist/media.schema.d.ts +4 -0
  151. package/node_modules/@kardalum/api-schemas/dist/media.schema.js +4 -0
  152. package/node_modules/@kardalum/api-schemas/dist/nested-validation.d.ts +7 -0
  153. package/node_modules/@kardalum/api-schemas/dist/nested-validation.js +51 -2
  154. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.d.ts +87 -0
  155. package/node_modules/@kardalum/api-schemas/dist/page-audience.schema.js +44 -0
  156. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.d.ts +11 -0
  157. package/node_modules/@kardalum/api-schemas/dist/plugin-admin-slots.js +61 -0
  158. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.d.ts +4 -2
  159. package/node_modules/@kardalum/api-schemas/dist/plugin-content-access.js +12 -2
  160. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.d.ts +136 -0
  161. package/node_modules/@kardalum/api-schemas/dist/plugin-content-slots.js +254 -0
  162. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.d.ts +22 -0
  163. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-checks.js +66 -0
  164. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.d.ts +130 -0
  165. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-document.js +173 -0
  166. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.d.ts +16 -0
  167. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-fetch.js +112 -0
  168. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.d.ts +70 -0
  169. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-schema.js +380 -0
  170. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.d.ts +3 -0
  171. package/node_modules/@kardalum/api-schemas/dist/plugin-contract-types.js +68 -0
  172. package/node_modules/@kardalum/api-schemas/dist/plugin-docs-api.schema.d.ts +18 -0
  173. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.d.ts +18 -0
  174. package/node_modules/@kardalum/api-schemas/dist/plugin-docs.js +5 -2
  175. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.d.ts +10 -2
  176. package/node_modules/@kardalum/api-schemas/dist/plugin-durable-hooks.js +48 -1
  177. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.d.ts +5 -2
  178. package/node_modules/@kardalum/api-schemas/dist/plugin-editor-extensions.js +6 -4
  179. package/node_modules/@kardalum/api-schemas/dist/plugin-events.d.ts +24 -0
  180. package/node_modules/@kardalum/api-schemas/dist/plugin-events.js +53 -0
  181. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.d.ts +112 -0
  182. package/node_modules/@kardalum/api-schemas/dist/plugin-guards.js +118 -0
  183. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.d.ts +12 -0
  184. package/node_modules/@kardalum/api-schemas/dist/plugin-held-embeds.js +3 -0
  185. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.d.ts +2 -0
  186. package/node_modules/@kardalum/api-schemas/dist/plugin-install-record.schema.js +3 -0
  187. package/node_modules/@kardalum/api-schemas/dist/plugin-install.d.ts +67 -0
  188. package/node_modules/@kardalum/api-schemas/dist/plugin-install.js +15 -0
  189. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.d.ts +138 -0
  190. package/node_modules/@kardalum/api-schemas/dist/plugin-kept-parts.js +110 -0
  191. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.d.ts +80 -15
  192. package/node_modules/@kardalum/api-schemas/dist/plugin-management-api.schema.js +67 -23
  193. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.d.ts +10 -3
  194. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-actions.js +33 -8
  195. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.d.ts +2 -1
  196. package/node_modules/@kardalum/api-schemas/dist/plugin-manifest-api-routes.js +7 -1
  197. package/node_modules/@kardalum/api-schemas/dist/plugin-outbound.d.ts +1 -1
  198. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.d.ts +43 -7
  199. package/node_modules/@kardalum/api-schemas/dist/plugin-providers.js +36 -5
  200. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.d.ts +638 -0
  201. package/node_modules/@kardalum/api-schemas/dist/plugin-rich-text.js +533 -0
  202. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.d.ts +36 -0
  203. package/node_modules/@kardalum/api-schemas/dist/plugin-service-call.js +32 -0
  204. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.d.ts +193 -0
  205. package/node_modules/@kardalum/api-schemas/dist/plugin-service-connections.js +123 -0
  206. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.d.ts +209 -0
  207. package/node_modules/@kardalum/api-schemas/dist/plugin-service-declarations.js +372 -0
  208. package/node_modules/@kardalum/api-schemas/dist/plugin-services.d.ts +90 -0
  209. package/node_modules/@kardalum/api-schemas/dist/plugin-services.js +204 -0
  210. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.d.ts +10 -0
  211. package/node_modules/@kardalum/api-schemas/dist/plugin-settings.js +10 -1
  212. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.d.ts +171 -4
  213. package/node_modules/@kardalum/api-schemas/dist/plugin-site-extensions.js +406 -42
  214. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.d.ts +69 -0
  215. package/node_modules/@kardalum/api-schemas/dist/plugin-site-requests.js +149 -0
  216. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.d.ts +5 -0
  217. package/node_modules/@kardalum/api-schemas/dist/plugin-styles.js +13 -0
  218. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.d.ts +96 -0
  219. package/node_modules/@kardalum/api-schemas/dist/plugin-uploads.js +185 -0
  220. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.d.ts +213 -0
  221. package/node_modules/@kardalum/api-schemas/dist/plugin-user-accounts.js +131 -0
  222. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.d.ts +54 -0
  223. package/node_modules/@kardalum/api-schemas/dist/plugin-view-kit.js +154 -0
  224. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.d.ts +37 -0
  225. package/node_modules/@kardalum/api-schemas/dist/plugin-visitor-points.js +124 -0
  226. package/node_modules/@kardalum/api-schemas/dist/render-cache.d.ts +126 -0
  227. package/node_modules/@kardalum/api-schemas/dist/render-cache.js +263 -0
  228. package/node_modules/@kardalum/api-schemas/dist/render-editing.d.ts +303 -0
  229. package/node_modules/@kardalum/api-schemas/dist/render-editing.js +61 -0
  230. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.d.ts +14 -0
  231. package/node_modules/@kardalum/api-schemas/dist/rich-text-paste-hosts.js +108 -0
  232. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.d.ts +66 -1
  233. package/node_modules/@kardalum/api-schemas/dist/rich-text-shape.js +465 -7
  234. package/node_modules/@kardalum/api-schemas/dist/rich-text-text.js +15 -118
  235. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.d.ts +110 -0
  236. package/node_modules/@kardalum/api-schemas/dist/sandbox-attach.schema.js +36 -0
  237. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.d.ts +64 -0
  238. package/node_modules/@kardalum/api-schemas/dist/security-overview.schema.js +38 -0
  239. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.d.ts +9 -2
  240. package/node_modules/@kardalum/api-schemas/dist/server-settings-api.schema.js +7 -2
  241. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.d.ts +26 -0
  242. package/node_modules/@kardalum/api-schemas/dist/setup-api.schema.js +19 -0
  243. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.d.ts +724 -0
  244. package/node_modules/@kardalum/api-schemas/dist/sign-in-steps.js +408 -0
  245. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.d.ts +5 -3
  246. package/node_modules/@kardalum/api-schemas/dist/sign-in.schema.js +3 -1
  247. package/node_modules/@kardalum/api-schemas/dist/site-consent.d.ts +77 -0
  248. package/node_modules/@kardalum/api-schemas/dist/site-consent.js +122 -0
  249. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.d.ts +4 -0
  250. package/node_modules/@kardalum/api-schemas/dist/structured-fields.schema.js +28 -0
  251. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.d.ts +33 -0
  252. package/node_modules/@kardalum/api-schemas/dist/template-api.schema.js +26 -1
  253. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.d.ts +14 -0
  254. package/node_modules/@kardalum/api-schemas/dist/user-api.schema.js +2 -0
  255. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.d.ts +482 -0
  256. package/node_modules/@kardalum/api-schemas/dist/visitor-accounts.js +380 -0
  257. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.d.ts +109 -0
  258. package/node_modules/@kardalum/api-schemas/dist/visitor-groups.js +62 -0
  259. package/node_modules/@kardalum/api-schemas/package.json +1 -0
  260. package/node_modules/@kardalum/design-tokens/dist/build-css.js +9 -1
  261. package/node_modules/@kardalum/design-tokens/dist/system-dark.css +1 -0
  262. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.css +2 -0
  263. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.d.ts +1 -0
  264. package/node_modules/@kardalum/design-tokens/dist/tailwind-theme.js +2 -0
  265. package/node_modules/@kardalum/design-tokens/dist/tokens.css +4 -0
  266. package/node_modules/@kardalum/design-tokens/dist/tokens.js +6 -0
  267. package/node_modules/@kardalum/design-tokens/dist/tokens.json +5 -1
  268. package/node_modules/@kardalum/design-tokens/dist/types.d.ts +4 -0
  269. package/node_modules/@kardalum/plugin-package/dist/build-reference.d.ts +17 -0
  270. package/node_modules/@kardalum/plugin-package/dist/build-reference.js +9 -0
  271. package/node_modules/@kardalum/plugin-package/dist/capabilities.d.ts +1 -1
  272. package/node_modules/@kardalum/plugin-package/dist/capabilities.js +276 -19
  273. package/node_modules/@kardalum/plugin-package/dist/client-bundle.d.ts +1 -1
  274. package/node_modules/@kardalum/plugin-package/dist/client-bundle.js +23 -0
  275. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.d.ts +17 -0
  276. package/node_modules/@kardalum/plugin-package/dist/contract-fingerprint.js +39 -0
  277. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.d.ts +23 -0
  278. package/node_modules/@kardalum/plugin-package/dist/delivery/admin-styles.js +351 -0
  279. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.d.ts +2 -0
  280. package/node_modules/@kardalum/plugin-package/dist/delivery/bundle.js +1 -1
  281. package/node_modules/@kardalum/plugin-package/dist/delivery/content-access.js +21 -8
  282. package/node_modules/@kardalum/plugin-package/dist/delivery/contributions.js +1 -1
  283. package/node_modules/@kardalum/plugin-package/dist/delivery/editor-extensions.js +23 -10
  284. package/node_modules/@kardalum/plugin-package/dist/delivery/icons.js +3 -2
  285. package/node_modules/@kardalum/plugin-package/dist/delivery/index.d.ts +2 -0
  286. package/node_modules/@kardalum/plugin-package/dist/delivery/index.js +2 -0
  287. package/node_modules/@kardalum/plugin-package/dist/delivery/label-languages.js +30 -2
  288. package/node_modules/@kardalum/plugin-package/dist/delivery/licence-check.js +6 -2
  289. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.d.ts +6 -0
  290. package/node_modules/@kardalum/plugin-package/dist/delivery/limits.js +6 -0
  291. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.d.ts +2 -0
  292. package/node_modules/@kardalum/plugin-package/dist/delivery/providers.js +24 -6
  293. package/node_modules/@kardalum/plugin-package/dist/delivery/registry.js +15 -0
  294. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.d.ts +2 -0
  295. package/node_modules/@kardalum/plugin-package/dist/delivery/rich-text.js +173 -0
  296. package/node_modules/@kardalum/plugin-package/dist/delivery/sample-content.js +1 -1
  297. package/node_modules/@kardalum/plugin-package/dist/delivery/server-powers.js +14 -4
  298. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.d.ts +3 -0
  299. package/node_modules/@kardalum/plugin-package/dist/delivery/services-events.js +35 -0
  300. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.d.ts +3 -0
  301. package/node_modules/@kardalum/plugin-package/dist/delivery/sign-in-steps.js +71 -0
  302. package/node_modules/@kardalum/plugin-package/dist/delivery/site-extensions.js +44 -11
  303. package/node_modules/@kardalum/plugin-package/dist/delivery/types.d.ts +7 -0
  304. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.d.ts +3 -0
  305. package/node_modules/@kardalum/plugin-package/dist/delivery/user-accounts.js +36 -0
  306. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.d.ts +3 -0
  307. package/node_modules/@kardalum/plugin-package/dist/delivery/visitor-points.js +33 -0
  308. package/node_modules/@kardalum/plugin-package/dist/index.d.ts +4 -0
  309. package/node_modules/@kardalum/plugin-package/dist/index.js +5 -0
  310. package/node_modules/@kardalum/plugin-package/dist/public-suffix.d.ts +7 -0
  311. package/node_modules/@kardalum/plugin-package/dist/public-suffix.js +23 -0
  312. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.d.ts +1 -0
  313. package/node_modules/@kardalum/plugin-package/dist/rich-text-summary.js +27 -0
  314. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.d.ts +2 -0
  315. package/node_modules/@kardalum/plugin-package/dist/stylesheet-load-hook.js +28 -0
  316. package/node_modules/@kardalum/plugin-package/package.json +4 -0
  317. package/node_modules/@kardalum/ui/dist/components/select.d.ts +6 -0
  318. package/node_modules/@kardalum/ui/dist/components/select.js +7 -0
  319. package/node_modules/@kardalum/ui/dist/components/textarea.d.ts +6 -0
  320. package/node_modules/@kardalum/ui/dist/components/textarea.js +7 -0
  321. package/node_modules/@kardalum/ui/dist/index.d.ts +2 -0
  322. package/node_modules/@kardalum/ui/dist/index.js +2 -0
  323. package/package.json +15 -3
@@ -0,0 +1,204 @@
1
+ import { PLUGIN_ID_MAX, isPluginManifestId } from "./plugin-id-rules.js";
2
+ import { isLowerToken } from "./plugin-providers.js";
3
+ // M35 B1a (W16): the rules of plugins offering services and events to each other, read by the SDK's
4
+ // manifest check, `kardalum plugin validate`, the marketplace door and the server, so the four never
5
+ // differ. Every reader caps the length first and then reads the text in one loop: no pattern ever
6
+ // meets an author's or a caller's text, and no message quotes a value.
7
+ /** A contract name, method name, event name or refusal code: 1 to 40 characters. */
8
+ export const SERVICE_NAME_MAX = 40;
9
+ /** The most of each declaration one plugin makes. */
10
+ export const SERVICE_CONTRACTS_MAX = 10;
11
+ export const SERVICE_OFFERS_MAX = 20;
12
+ export const SERVICE_USES_MAX = 20;
13
+ export const PLUGIN_EVENTS_MAX = 20;
14
+ /** The most methods one contract declares, and refusal codes one method declares. */
15
+ export const SERVICE_METHODS_MAX = 16;
16
+ export const SERVICE_REFUSALS_MAX = 16;
17
+ /** The most personal output fields one contract declares across its methods: the install summary lists each. */
18
+ export const SERVICE_PERSONAL_OUTPUT_MAX = 256;
19
+ /** The most plugin events one plugin hooks: the install summary lists each. */
20
+ export const PLUGIN_EVENT_LISTENS_MAX = 64;
21
+ /** A method's time limit, in milliseconds: the owner's `timeMs`, at least the minimum, at most the mail sender's limit. */
22
+ export const SERVICE_CALL_TIME_MS_DEFAULT = 5_000;
23
+ export const SERVICE_CALL_TIME_MS_MIN = 100;
24
+ export const SERVICE_CALL_TIME_MS_MAX = 30_000;
25
+ /** The most calls running at once for one provider; a call past it answers `busy`. */
26
+ export const SERVICE_CALLS_RUNNING_MAX = 8;
27
+ /** A call still running after this long gives its slot back; it keeps running uncounted, as a hook's handler does. */
28
+ export const SERVICE_SLOT_RELEASE_MS = 30_000;
29
+ /** The most calls in one chain (a consumer's call, a nested call, a call inside that). */
30
+ export const SERVICE_CALL_DEPTH_MAX = 3;
31
+ /** The most calls one connection makes in a minute; past it a call answers `tooMany`. */
32
+ export const SERVICE_CALLS_PER_MINUTE_MAX = 600;
33
+ /** The largest input and output, measured on their JSON in UTF-8 bytes. */
34
+ export const SERVICE_PAYLOAD_BYTES_MAX = 262_144;
35
+ /** The largest plugin event payload, the most raises one plugin makes a minute, and the deepest raise chain. */
36
+ export const PLUGIN_EVENT_PAYLOAD_BYTES_MAX = 16_384;
37
+ export const PLUGIN_EVENTS_PER_MINUTE_MAX = 600;
38
+ export const PLUGIN_EVENT_DEPTH_MAX = 3;
39
+ /** How long an instance trusts its read of the connection approvals; a revoke reaches every instance within it. */
40
+ export const SERVICE_GRANTS_MEMO_MS = 5_000;
41
+ /** The largest major or minor part of a contract version. */
42
+ export const CONTRACT_VERSION_PART_MAX = 999;
43
+ /** Design 4.4: why a call answered no value. A closed list that only grows. */
44
+ export const SERVICE_FAILURE_REASONS = [
45
+ "missing",
46
+ "off",
47
+ "notGranted",
48
+ "incompatible",
49
+ "unlicensed",
50
+ "ambiguous",
51
+ "notImplemented",
52
+ "busy",
53
+ "timeout",
54
+ "failed",
55
+ "invalidAnswer",
56
+ "refused",
57
+ "loop",
58
+ "tooMany",
59
+ ];
60
+ /** Design 4.3: a provider's state as `context.services.list` answers it. */
61
+ export const SERVICE_PROVIDER_STATES = ["ready", "off", "notGranted", "unlicensed", "incompatible"];
62
+ /** Design 4.10: why a raise was not raised. `tooDeep` (plan decision 8): past PLUGIN_EVENT_DEPTH_MAX. */
63
+ export const PLUGIN_EVENT_REFUSALS = ["invalid", "unknownEvent", "tooLarge", "tooMany", "inactive", "tooDeep"];
64
+ const HYPHEN = 45;
65
+ const DOT = 46;
66
+ /** A contract name: the action id alphabet, a-z first, a-z, 0-9 and "-" after, no "-" last, 1 to SERVICE_NAME_MAX. */
67
+ export function isContractName(value) {
68
+ return typeof value === "string" && isLowerToken(value, SERVICE_NAME_MAX, HYPHEN, false);
69
+ }
70
+ /** A method name, event name or refusal code: a-z first, then a-z, A-Z and 0-9, 1 to SERVICE_NAME_MAX. */
71
+ export function isServiceMemberName(value) {
72
+ if (typeof value !== "string" || value.length === 0 || value.length > SERVICE_NAME_MAX)
73
+ return false;
74
+ const first = value.charCodeAt(0);
75
+ if (first < 97 || first > 122)
76
+ return false;
77
+ for (let i = 1; i < value.length; i++) {
78
+ const code = value.charCodeAt(i);
79
+ const lower = code >= 97 && code <= 122;
80
+ const upper = code >= 65 && code <= 90;
81
+ const digit = code >= 48 && code <= 57;
82
+ if (!lower && !upper && !digit)
83
+ return false;
84
+ }
85
+ return true;
86
+ }
87
+ /** One decimal part, 0 to CONTRACT_VERSION_PART_MAX, no leading zero, or null. */
88
+ function readPart(text) {
89
+ if (text.length === 0 || text.length > 3)
90
+ return null;
91
+ if (text.length > 1 && text.charCodeAt(0) === 48)
92
+ return null;
93
+ let value = 0;
94
+ for (let i = 0; i < text.length; i++) {
95
+ const code = text.charCodeAt(i);
96
+ if (code < 48 || code > 57)
97
+ return null;
98
+ value = value * 10 + (code - 48);
99
+ }
100
+ return value <= CONTRACT_VERSION_PART_MAX ? value : null;
101
+ }
102
+ /** `<major>.<minor>`, or null. */
103
+ export function parseContractVersion(value) {
104
+ if (typeof value !== "string" || value.length < 3 || value.length > 7)
105
+ return null;
106
+ const dot = value.indexOf(".");
107
+ if (dot === -1 || value.indexOf(".", dot + 1) !== -1)
108
+ return null;
109
+ const major = readPart(value.slice(0, dot));
110
+ const minor = readPart(value.slice(dot + 1));
111
+ return major === null || minor === null ? null : { major, minor };
112
+ }
113
+ export function formatContractVersion(version) {
114
+ return `${version.major}.${version.minor}`;
115
+ }
116
+ /** Plan decision 3: `^<major>.<minor>` or an exact `<major>.<minor>`, or null. */
117
+ export function parseContractRange(value) {
118
+ if (typeof value !== "string" || value.length === 0 || value.length > 8)
119
+ return null;
120
+ const caret = value.charCodeAt(0) === 94;
121
+ const version = parseContractVersion(caret ? value.slice(1) : value);
122
+ return version === null ? null : { ...version, exact: !caret };
123
+ }
124
+ /** Whether `version` is inside `range`; an unreadable range or version admits nothing. */
125
+ export function contractRangeAllows(range, version) {
126
+ const wanted = parseContractRange(range);
127
+ const offered = parseContractVersion(version);
128
+ if (wanted === null || offered === null || wanted.major !== offered.major)
129
+ return false;
130
+ return wanted.exact ? offered.minor === wanted.minor : offered.minor >= wanted.minor;
131
+ }
132
+ /** A contract's full id, `<owner plugin id>/<name>`. */
133
+ export function contractId(ownerId, name) {
134
+ return `${ownerId}/${name}`;
135
+ }
136
+ /** A contract id split at its one "/", or null: the length is capped before anything reads it. */
137
+ export function parseContractId(value) {
138
+ if (typeof value !== "string" || value.length === 0 || value.length > PLUGIN_ID_MAX + 1 + SERVICE_NAME_MAX)
139
+ return null;
140
+ const slash = value.indexOf("/");
141
+ if (slash <= 0 || value.indexOf("/", slash + 1) !== -1)
142
+ return null;
143
+ const ownerId = value.slice(0, slash);
144
+ const name = value.slice(slash + 1);
145
+ return isPluginManifestId(ownerId) && isContractName(name) ? { ownerId, name } : null;
146
+ }
147
+ /** M35 B1c (plan decision 3): the prefix of a contract version's fingerprint. */
148
+ export const CONTRACT_FINGERPRINT_PREFIX = "sha256:";
149
+ /** `sha256:` and 64 lower-case hex digits, read by a linear scan. */
150
+ export function isContractFingerprint(value) {
151
+ if (typeof value !== "string" || value.length !== CONTRACT_FINGERPRINT_PREFIX.length + 64 || !value.startsWith(CONTRACT_FINGERPRINT_PREFIX))
152
+ return false;
153
+ for (let i = CONTRACT_FINGERPRINT_PREFIX.length; i < value.length; i++) {
154
+ const code = value.charCodeAt(i);
155
+ if (!((code >= 48 && code <= 57) || (code >= 97 && code <= 102)))
156
+ return false;
157
+ }
158
+ return true;
159
+ }
160
+ /** A plugin event's hook key, `<plugin id>:<name>`. A core event has no "." before its ":", a plugin id always has one. */
161
+ export function pluginEventKey(pluginId, name) {
162
+ return `${pluginId}:${name}`;
163
+ }
164
+ /** A plugin event key split at its one ":", or null; a core event (no dot in its first part) is never one. */
165
+ export function parsePluginEventKey(value) {
166
+ if (typeof value !== "string" || value.length === 0 || value.length > PLUGIN_ID_MAX + 1 + SERVICE_NAME_MAX)
167
+ return null;
168
+ const colon = value.indexOf(":");
169
+ if (colon <= 0 || value.indexOf(":", colon + 1) !== -1)
170
+ return null;
171
+ const pluginId = value.slice(0, colon);
172
+ const name = value.slice(colon + 1);
173
+ if (pluginId.indexOf(String.fromCharCode(DOT)) === -1)
174
+ return null;
175
+ return isPluginManifestId(pluginId) && isServiceMemberName(name) ? { pluginId, name } : null;
176
+ }
177
+ /** Plan decision 4: the key of a provider's refusal answer. */
178
+ export const REFUSAL_ANSWER_KEY = "refused";
179
+ /** The code of `{ refused: "<code>" }`, a plain object whose only own key is `refused`, or null. */
180
+ export function readRefusalAnswer(value) {
181
+ if (value === null || typeof value !== "object" || Array.isArray(value))
182
+ return null;
183
+ const proto = Object.getPrototypeOf(value);
184
+ if (proto !== Object.prototype && proto !== null)
185
+ return null;
186
+ const keys = Object.keys(value);
187
+ if (keys.length !== 1 || keys[0] !== REFUSAL_ANSWER_KEY)
188
+ return null;
189
+ const code = value[REFUSAL_ANSWER_KEY];
190
+ return isServiceMemberName(code) ? code : null;
191
+ }
192
+ /** Design 4.7: the words a contract field's name may not hold, compared lower-cased with "_" and "-" dropped. */
193
+ export const SECRET_LIKE_WORDS = ["secret", "password", "token", "apikey"];
194
+ /** Whether a property name holds one of SECRET_LIKE_WORDS. At most 200 characters are read. */
195
+ export function isSecretLikeName(name) {
196
+ let folded = "";
197
+ for (let i = 0; i < name.length && i < 200; i++) {
198
+ const code = name.charCodeAt(i);
199
+ if (code === 95 || code === 45)
200
+ continue;
201
+ folded += code >= 65 && code <= 90 ? String.fromCharCode(code + 32) : name[i];
202
+ }
203
+ return SECRET_LIKE_WORDS.some((word) => folded.includes(word));
204
+ }
@@ -28,6 +28,7 @@ export declare const PluginSettingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObj
28
28
  default: z.ZodOptional<z.ZodString>;
29
29
  maxLength: z.ZodOptional<z.ZodNumber>;
30
30
  multiline: z.ZodOptional<z.ZodBoolean>;
31
+ inViews: z.ZodOptional<z.ZodBoolean>;
31
32
  id: z.ZodString;
32
33
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
33
34
  en: z.ZodString;
@@ -42,6 +43,7 @@ export declare const PluginSettingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObj
42
43
  min: z.ZodOptional<z.ZodNumber>;
43
44
  max: z.ZodOptional<z.ZodNumber>;
44
45
  integer: z.ZodOptional<z.ZodBoolean>;
46
+ inViews: z.ZodOptional<z.ZodBoolean>;
45
47
  id: z.ZodString;
46
48
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
47
49
  en: z.ZodString;
@@ -53,6 +55,7 @@ export declare const PluginSettingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObj
53
55
  }, z.core.$strict>, z.ZodObject<{
54
56
  type: z.ZodLiteral<"onOff">;
55
57
  default: z.ZodOptional<z.ZodBoolean>;
58
+ inViews: z.ZodOptional<z.ZodBoolean>;
56
59
  id: z.ZodString;
57
60
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
58
61
  en: z.ZodString;
@@ -70,6 +73,7 @@ export declare const PluginSettingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObj
70
73
  en: z.ZodString;
71
74
  }, z.core.$catchall<z.ZodString>>, unknown>]>;
72
75
  }, z.core.$strict>>;
76
+ inViews: z.ZodOptional<z.ZodBoolean>;
73
77
  id: z.ZodString;
74
78
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
75
79
  en: z.ZodString;
@@ -96,6 +100,7 @@ export declare const PluginSettingsDeclarationSchema: z.ZodArray<z.ZodDiscrimina
96
100
  default: z.ZodOptional<z.ZodString>;
97
101
  maxLength: z.ZodOptional<z.ZodNumber>;
98
102
  multiline: z.ZodOptional<z.ZodBoolean>;
103
+ inViews: z.ZodOptional<z.ZodBoolean>;
99
104
  id: z.ZodString;
100
105
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
101
106
  en: z.ZodString;
@@ -110,6 +115,7 @@ export declare const PluginSettingsDeclarationSchema: z.ZodArray<z.ZodDiscrimina
110
115
  min: z.ZodOptional<z.ZodNumber>;
111
116
  max: z.ZodOptional<z.ZodNumber>;
112
117
  integer: z.ZodOptional<z.ZodBoolean>;
118
+ inViews: z.ZodOptional<z.ZodBoolean>;
113
119
  id: z.ZodString;
114
120
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
115
121
  en: z.ZodString;
@@ -121,6 +127,7 @@ export declare const PluginSettingsDeclarationSchema: z.ZodArray<z.ZodDiscrimina
121
127
  }, z.core.$strict>, z.ZodObject<{
122
128
  type: z.ZodLiteral<"onOff">;
123
129
  default: z.ZodOptional<z.ZodBoolean>;
130
+ inViews: z.ZodOptional<z.ZodBoolean>;
124
131
  id: z.ZodString;
125
132
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
126
133
  en: z.ZodString;
@@ -138,6 +145,7 @@ export declare const PluginSettingsDeclarationSchema: z.ZodArray<z.ZodDiscrimina
138
145
  en: z.ZodString;
139
146
  }, z.core.$catchall<z.ZodString>>, unknown>]>;
140
147
  }, z.core.$strict>>;
148
+ inViews: z.ZodOptional<z.ZodBoolean>;
141
149
  id: z.ZodString;
142
150
  label: z.ZodUnion<readonly [z.ZodString, z.ZodPreprocess<z.ZodObject<{
143
151
  en: z.ZodString;
@@ -206,6 +214,7 @@ export declare const PluginSettingsFieldViewSchema: z.ZodObject<{
206
214
  en: z.ZodString;
207
215
  }, z.core.$catchall<z.ZodString>>, unknown>]>>;
208
216
  askAtInstall: z.ZodBoolean;
217
+ inViews: z.ZodBoolean;
209
218
  value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
210
219
  default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
211
220
  set: z.ZodOptional<z.ZodBoolean>;
@@ -282,6 +291,7 @@ export declare const PluginSettingsResponseSchema: z.ZodObject<{
282
291
  en: z.ZodString;
283
292
  }, z.core.$catchall<z.ZodString>>, unknown>]>>;
284
293
  askAtInstall: z.ZodBoolean;
294
+ inViews: z.ZodBoolean;
285
295
  value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
286
296
  default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
287
297
  set: z.ZodOptional<z.ZodBoolean>;
@@ -48,6 +48,9 @@ const base = {
48
48
  description: PluginSettingDescriptionSchema.optional(),
49
49
  askAtInstall: z.boolean().optional(),
50
50
  };
51
+ // M35 C3 (W28, experimental): the value reaches the plugin's views through GET /plugins/:pluginId/view-settings.
52
+ // Spread into the four non-secret field schemas only: the secret field's schema stays strict, so it refuses the flag.
53
+ const inViews = { inViews: z.boolean().optional() };
51
54
  const choiceSchema = z
52
55
  .object({
53
56
  value: z.string().min(1).max(PLUGIN_SETTING_CHOICE_VALUE_MAX),
@@ -58,6 +61,7 @@ const finite = z.number().finite();
58
61
  const textFieldSchema = z
59
62
  .object({
60
63
  ...base,
64
+ ...inViews,
61
65
  type: z.literal("text"),
62
66
  default: z.string().optional(),
63
67
  maxLength: z.number().int().min(1).max(PLUGIN_SETTING_TEXT_MAX).optional(),
@@ -73,6 +77,7 @@ const textFieldSchema = z
73
77
  const numberFieldSchema = z
74
78
  .object({
75
79
  ...base,
80
+ ...inViews,
76
81
  type: z.literal("number"),
77
82
  default: finite.optional(),
78
83
  min: finite.optional(),
@@ -94,10 +99,11 @@ const numberFieldSchema = z
94
99
  if (field.integer === true && !Number.isInteger(d))
95
100
  ctx.addIssue({ code: "custom", path: ["default"], message: "default is not a whole number" });
96
101
  });
97
- const onOffFieldSchema = z.object({ ...base, type: z.literal("onOff"), default: z.boolean().optional() }).strict();
102
+ const onOffFieldSchema = z.object({ ...base, ...inViews, type: z.literal("onOff"), default: z.boolean().optional() }).strict();
98
103
  const choiceFieldSchema = z
99
104
  .object({
100
105
  ...base,
106
+ ...inViews,
101
107
  type: z.literal("choice"),
102
108
  default: z.string().optional(),
103
109
  choices: z.array(choiceSchema).min(1).max(PLUGIN_SETTING_CHOICES_MAX),
@@ -251,6 +257,8 @@ export const PluginSettingsFieldViewSchema = z
251
257
  label: PluginLabelSchema,
252
258
  description: PluginSettingDescriptionSchema.nullable(),
253
259
  askAtInstall: z.boolean(),
260
+ /** M35 C3 (W28): true when the plugin's views read the value (never on a secret field). */
261
+ inViews: z.boolean(),
254
262
  value: SettingValueSchema.optional(),
255
263
  /** What "Reset to default" puts back. A secret field has none. */
256
264
  default: SettingValueSchema.optional(),
@@ -282,6 +290,7 @@ export function pluginSettingsFieldView(field, language, state = {}) {
282
290
  label: text(field.label),
283
291
  description: field.description === undefined ? null : text(field.description),
284
292
  askAtInstall: field.askAtInstall === true,
293
+ inViews: field.type !== "secret" && field.inViews === true,
285
294
  };
286
295
  if (field.type === "secret")
287
296
  return { ...base, secret: field.secret, set: state.set === true };
@@ -10,6 +10,22 @@ export declare const SITE_ROUTE_SEGMENT_MAX = 100;
10
10
  export declare const SITE_ROUTE_BODY_LIMIT_BYTES = 65536;
11
11
  export declare const SITE_ROUTE_FORM_FIELDS_MAX = 200;
12
12
  export declare const SITE_ROUTE_ANSWER_LIMIT_BYTES = 5242880;
13
+ /** M35 P3 (W18): the parameters one site route path holds at most. */
14
+ export declare const SITE_ROUTE_PARAMS_MAX = 4;
15
+ /** M35 P3 (W18): the longest parameter name, in characters. */
16
+ export declare const SITE_ROUTE_PARAM_NAME_MAX = 32;
17
+ /** M35 P3 (W18): the longest decoded segment a parameter takes; a longer one matches no pattern. */
18
+ export declare const SITE_ROUTE_PARAM_VALUE_MAX = 200;
19
+ /** M35 P3 (W18): the longest rest a trailing "*" takes, decoded segments joined with "/". */
20
+ export declare const SITE_ROUTE_REST_MAX = 1000;
21
+ /** M35 P3 (W18): the most segments a trailing "*" takes. */
22
+ export declare const SITE_ROUTE_REST_SEGMENTS_MAX = 16;
23
+ /** M35 P3 (W18): the longest raw path the core reads for a pattern; a longer one matches none. */
24
+ export declare const SITE_ROUTE_MATCH_PATH_MAX = 2000;
25
+ /** M35 P3 (W18): the key a trailing "*" puts its rest under in request.params. */
26
+ export declare const SITE_ROUTE_REST_PARAM = "*";
27
+ /** M35 P3 (W18): first segments no route that answers after the pages may take: the visitor account pages (35-U2a). */
28
+ export declare const SITE_ROUTE_PATTERN_RESERVED_PREFIXES: readonly string[];
13
29
  export declare const SITE_FALLBACK_TIME_MS = 250;
14
30
  export declare const SITE_REDIRECT_STATUSES: readonly [301, 302, 307, 308];
15
31
  /** M33 K34: the longest a plugin may let a browser keep its fallback redirect, one day, in seconds. */
@@ -26,6 +42,26 @@ export declare const TEMPLATE_DATA_DEPTH_MAX = 8;
26
42
  export declare const TEMPLATE_DATA_VALUES_MAX = 10000;
27
43
  export declare const TEMPLATE_DATA_TEXT_MAX_BYTES = 262144;
28
44
  export declare const TEMPLATE_OUTPUT_LIMIT_BYTES = 65536;
45
+ /** M35 P3 (W19): the largest rendered body a block tag is handed, in UTF-8 bytes; a larger one is handed as null. */
46
+ export declare const TEMPLATE_BLOCK_BODY_MAX_BYTES = 262144;
47
+ /** M35 P3 (W19): the longest class a block tag's wrap names, in characters. */
48
+ export declare const TEMPLATE_BLOCK_CLASS_MAX = 200;
49
+ /** M35 P3 (W19): the elements a block tag's wrap may put the body in. */
50
+ export declare const TEMPLATE_BLOCK_WRAP_ELEMENTS: readonly ["div", "section", "span", "figure", "blockquote"];
51
+ export type TemplateBlockWrapElement = (typeof TEMPLATE_BLOCK_WRAP_ELEMENTS)[number];
52
+ /** M35 P3 (W19): what a block tag writes when it cannot answer: the author's body (the default) or nothing. */
53
+ export declare const TEMPLATE_BLOCK_ON_FAILURE: readonly ["body", "nothing"];
54
+ export type TemplateBlockOnFailure = (typeof TEMPLATE_BLOCK_ON_FAILURE)[number];
55
+ /** M35 P3 (evidence 116): what a filter prints when it cannot answer: its value (the default) or nothing. */
56
+ export declare const TEMPLATE_FILTER_ON_FAILURE: readonly ["value", "nothing"];
57
+ export type TemplateFilterOnFailure = (typeof TEMPLATE_FILTER_ON_FAILURE)[number];
58
+ /** M35 P3 (W19): the published reads all plugin template calls of one render make together, on the render's list read budget. */
59
+ export declare const TEMPLATE_PLUGIN_READS_PER_RENDER_MAX = 20;
60
+ /** M35 P3 (W19): of those, the searches. */
61
+ export declare const TEMPLATE_PLUGIN_SEARCHES_PER_RENDER_MAX = 2;
62
+ /** M35 P3 (W19): why a template call's read was refused: a budget is spent, the call has ended, or no reader is wired. */
63
+ export declare const TEMPLATE_READ_REFUSALS: readonly ["spent", "ended", "unavailable"];
64
+ export type TemplateReadRefusal = (typeof TEMPLATE_READ_REFUSALS)[number];
29
65
  export declare const PAGE_HEAD_ENTRIES_MAX = 20;
30
66
  export declare const PAGE_HEAD_LIMIT_BYTES = 65536;
31
67
  export declare const PAGE_HEAD_SCRIPT_ORIGINS_MAX = 10;
@@ -40,6 +76,20 @@ export declare const PAGE_HEAD_TITLE_MAX = 300;
40
76
  /** M33 K27: how much of a rendered page the core reads to find its <title> or </head>, in bytes. */
41
77
  export declare const PAGE_TITLE_SCAN_BYTES = 65536;
42
78
  export declare const PAGE_HEAD_LINK_RELS: readonly ["canonical", "alternate", "icon", "manifest", "preconnect", "dns-prefetch", "stylesheet"];
79
+ /** M35 P1 (W40): the longest inline snippet a head entry carries, in UTF-8 bytes. */
80
+ export declare const PAGE_HEAD_INLINE_TEXT_MAX_BYTES = 16384;
81
+ /** M35 P1 (W40): the inline snippets one plugin's head writes in a render; a fifth is dropped. Counted among PAGE_HEAD_ENTRIES_MAX and PAGE_HEAD_LIMIT_BYTES. */
82
+ export declare const PAGE_HEAD_INLINE_SNIPPETS_MAX = 4;
83
+ /** M35 P1 (W3): the page output transforms one render runs, in plugin id order; later ones are skipped. */
84
+ export declare const PAGE_OUTPUT_TRANSFORMS_MAX = 8;
85
+ /** M35 P1 (W3): how long the core waits for one transform, in milliseconds. */
86
+ export declare const PAGE_OUTPUT_TIME_MS = 100;
87
+ /** M35 P1 (W3): how long the core waits for all transforms of one render together; its own budget, apart from the template calls'. */
88
+ export declare const PAGE_OUTPUT_TIME_PER_RENDER_MS = 250;
89
+ /** M35 P1 (W3): the largest page handed to transforms, in UTF-8 bytes; a larger page is served as rendered. */
90
+ export declare const PAGE_OUTPUT_INPUT_MAX_BYTES = 2097152;
91
+ /** M35 P1 (W3): how many UTF-8 bytes one transform's answer may add to the page it was handed. */
92
+ export declare const PAGE_OUTPUT_GROWTH_MAX_BYTES = 262144;
43
93
  export declare const PUBLISHED_PAGES_LIMIT_DEFAULT = 100;
44
94
  export declare const PUBLISHED_PAGES_LIMIT_MAX = 500;
45
95
  export declare const PUBLISHED_PAGES_BATCHES_MAX = 5;
@@ -47,7 +97,9 @@ export declare const PAGE_ADDRESSES_TARGETS_MAX = 100;
47
97
  export declare const RESERVED_TEMPLATE_WORDS: readonly string[];
48
98
  /** M33 K71: the facts a template reads off `page` (and a listed page) ahead of a field of the same
49
99
  * id, so a field with one of these ids is reached there only as `page.fields.<id>`. The renderer
50
- * answers them by these names, and the document type editor warns on a field id among them. */
100
+ * answers them by these names, and the document type editor warns on a field id among them.
101
+ * M35 P4: `name` (`_name`) is answered on `page` only until 35-C5 adds `child._name`; on a listed
102
+ * page it reads a field of that id, which none can be. */
51
103
  export declare const TEMPLATE_PAGE_FACTS: {
52
104
  readonly children: "children";
53
105
  readonly culture: "culture";
@@ -59,6 +111,8 @@ export declare const TEMPLATE_PAGE_FACTS: {
59
111
  readonly locale: "locale";
60
112
  readonly publishedAt: "publishedAt";
61
113
  readonly fields: "fields";
114
+ /** M35 P4 (evidence 33): the page's own published name. A field id starts with a letter, so none can be `_name`. */
115
+ readonly name: "_name";
62
116
  };
63
117
  /** The tags Kardalum's engine adds to Liquid's own, each written with no block body. A parse-only
64
118
  * engine (the CLI's templates check) knows them by name; the server's plugin-template-binding test
@@ -68,8 +122,60 @@ export declare const KARDALUM_TEMPLATE_TAGS: readonly string[];
68
122
  export type TemplateData = string | number | boolean | null | TemplateData[] | {
69
123
  [key: string]: TemplateData;
70
124
  };
71
- /** M32 F2 (D2, D3): why a declared site route path is refused, or null. */
125
+ /** M35 P3 (W18): one segment of a site route path as declared. */
126
+ export type SiteRouteSegment = {
127
+ kind: "literal";
128
+ value: string;
129
+ } | {
130
+ kind: "param";
131
+ name: string;
132
+ } | {
133
+ kind: "rest";
134
+ };
135
+ /** M35 P3 (W18): where a route answers: before the pages (a file address, a fixed POST) or after them. */
136
+ export type SiteRoutePhase = "fixed" | "afterPages";
137
+ export interface SiteRoutePattern {
138
+ method: SiteRouteMethod;
139
+ segments: readonly SiteRouteSegment[];
140
+ phase: SiteRoutePhase;
141
+ /** The first segment, a literal: the address area the route lives in. */
142
+ prefix: string;
143
+ /** The method and the path with every parameter as ":" and the rest as "*": one per plugin. */
144
+ shape: string;
145
+ /** The parameter names in order, "*" last for a rest. */
146
+ params: readonly string[];
147
+ }
148
+ /**
149
+ * M32 F2 (D2, D3), M35 P3 (W18): a declared site route path read left to right, once, into its
150
+ * segments, or the first reason it is refused. The length is checked before any segment is read.
151
+ */
152
+ export declare function readSiteRoutePath(method: string, path: string): {
153
+ ok: true;
154
+ pattern: SiteRoutePattern;
155
+ } | {
156
+ ok: false;
157
+ problem: string;
158
+ };
159
+ /** M32 F2 (D2, D3): why a declared site route path is refused, or null. M35 P3: over readSiteRoutePath. */
72
160
  export declare function siteRoutePathProblem(method: string, path: string): string | null;
161
+ /**
162
+ * M35 P3 (W18): a visitor's raw path (before "?") as decoded segments, or null when it matches no
163
+ * pattern: over SITE_ROUTE_MATCH_PATH_MAX characters, not starting with "/", an empty, "." or ".."
164
+ * segment (raw or decoded), a segment that does not decode, a decoded "/" or control character, or
165
+ * more than SITE_ROUTE_SEGMENTS_MAX + SITE_ROUTE_REST_SEGMENTS_MAX segments. Split first, then each
166
+ * segment decoded once, so an encoded "/" never makes a second segment.
167
+ */
168
+ export declare function readAddressSegments(rawPath: string): string[] | null;
169
+ /** M35 P3 (W18): the parameters of `segments` under `pattern`, frozen with no prototype, or null. */
170
+ export declare function matchSiteRoutePattern(pattern: SiteRoutePattern, segments: readonly string[]): Readonly<Record<string, string>> | null;
171
+ /** M35 P3 (W18): negative when `a` is more specific, segment by segment from the left: a literal, then a parameter, then the rest. */
172
+ export declare function compareSiteRouteSpecificity(a: SiteRoutePattern, b: SiteRoutePattern): number;
173
+ /** M35 P2 (W21): why a site route's `rawBody` cannot stand, or null when it can (absent, or `true` on a
174
+ * POST route): the exact bytes of a body sent to be signed. GET has no body. */
175
+ export declare function siteRouteRawBodyProblem(route: {
176
+ method?: unknown;
177
+ rawBody?: unknown;
178
+ }): string | null;
73
179
  /**
74
180
  * M33 K33: the path a site fallback receives for an address: the address's path, percent-decoded, exactly as
75
181
  * sent (a trailing slash stays). Null for an escape that does not decode and for a control character.
@@ -96,6 +202,25 @@ export declare function templatePrefixOf(pluginId: string): string;
96
202
  export declare function templateNameOf(pluginId: string, name: string): string;
97
203
  /** M32 F2 (D14): why a plugin id cannot carry template filters or tags, or null. */
98
204
  export declare function templatePrefixProblem(pluginId: string): string | null;
205
+ /** M35 P3 (W19): the tag that closes a plugin's block tag. */
206
+ export declare function templateBlockEndNameOf(fullName: string): string;
207
+ /** M35 P3 (W19): why a block tag's wrap class is refused, or null. One scan after the length check; the reason never quotes the value. */
208
+ export declare function templateBlockClassProblem(value: unknown): string | null;
209
+ /**
210
+ * M35 P3 (W19): a block tag's `{ keepBody: true, before?, after?, wrap? }` answer read without trusting it,
211
+ * or null when it is out of shape. `before` and `after` are text the binding cleans; the binding also measures
212
+ * them against TEMPLATE_OUTPUT_LIMIT_BYTES, before and after cleaning, so a long answer is reported as too large,
213
+ * not as out of shape. `wrap` names one of TEMPLATE_BLOCK_WRAP_ELEMENTS and an optional class. No other key. A
214
+ * null `before`, `after`, `wrap` or wrap `class` is read as absent, all four alike.
215
+ */
216
+ export declare function readTemplateBlockKeep(answer: TemplateData): {
217
+ before: string;
218
+ after: string;
219
+ wrap: {
220
+ element: TemplateBlockWrapElement;
221
+ class: string | null;
222
+ } | null;
223
+ } | null;
99
224
  /** M32 F2: one entry a plugin adds to a page's <head>. */
100
225
  export declare const PageHeadEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
101
226
  tag: z.ZodLiteral<"meta">;
@@ -106,8 +231,8 @@ export declare const PageHeadEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
106
231
  tag: z.ZodLiteral<"link">;
107
232
  rel: z.ZodEnum<{
108
233
  canonical: "canonical";
109
- icon: "icon";
110
234
  alternate: "alternate";
235
+ icon: "icon";
111
236
  manifest: "manifest";
112
237
  preconnect: "preconnect";
113
238
  "dns-prefetch": "dns-prefetch";
@@ -127,12 +252,32 @@ export declare const PageHeadEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
127
252
  integrity: z.ZodOptional<z.ZodString>;
128
253
  crossorigin: z.ZodOptional<z.ZodLiteral<"anonymous">>;
129
254
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
255
+ consent: z.ZodOptional<z.ZodEnum<{
256
+ media: "media";
257
+ preferences: "preferences";
258
+ statistics: "statistics";
259
+ marketing: "marketing";
260
+ }>>;
130
261
  }, z.core.$strict>, z.ZodObject<{
131
262
  tag: z.ZodLiteral<"jsonLd">;
132
263
  data: z.ZodUnknown;
133
264
  }, z.core.$strict>, z.ZodObject<{
134
265
  tag: z.ZodLiteral<"title">;
135
266
  text: z.ZodString;
267
+ }, z.core.$strict>, z.ZodObject<{
268
+ tag: z.ZodLiteral<"inlineScript">;
269
+ text: z.ZodString;
270
+ module: z.ZodOptional<z.ZodBoolean>;
271
+ consent: z.ZodOptional<z.ZodEnum<{
272
+ media: "media";
273
+ preferences: "preferences";
274
+ statistics: "statistics";
275
+ marketing: "marketing";
276
+ }>>;
277
+ }, z.core.$strict>, z.ZodObject<{
278
+ tag: z.ZodLiteral<"inlineStyle">;
279
+ text: z.ZodString;
280
+ media: z.ZodOptional<z.ZodString>;
136
281
  }, z.core.$strict>], "tag">;
137
282
  export type PageHeadEntry = z.infer<typeof PageHeadEntrySchema>;
138
283
  /** M33 K48: the longest file path the rule accepts, in characters. */
@@ -145,12 +290,25 @@ export declare const PLUGIN_PUBLIC_FILE_PATH_MAX = 200;
145
290
  * change what the address names. One linear scan; the length is checked first.
146
291
  */
147
292
  export declare function isPluginPublicFilePath(path: string): boolean;
293
+ /**
294
+ * M35 P1 (W40): why an inline snippet's text is refused, or null. The core writes the text between
295
+ * `<script>` and `</script>` (or `<style>` and `</style>`) exactly as given, so it never holds what
296
+ * could end its element or change how the browser reads it: for a script `<!--`, `<script` and
297
+ * `</script` in any ASCII case, for a style `</style`. No control character (C0, DEL or C1, U+0080
298
+ * to U+009F) but tab, line feed and carriage return, and no lone surrogate (the bytes served must be
299
+ * the bytes hashed; plugin-head.ts serves a carriage return as a line feed, as a browser reads it). At most
300
+ * PAGE_HEAD_INLINE_TEXT_MAX_BYTES of UTF-8. The length is checked before the scan, which reads each
301
+ * code unit once. The reason never quotes the text.
302
+ */
303
+ export declare function inlineSnippetProblem(tag: "inlineScript" | "inlineStyle", text: string): string | null;
148
304
  /** M32 F2: a page head entry checked against the plugin that gave it. The reason never quotes the value.
149
- * M33 K27: a title entry only from a plugin whose attached declaration says `setsTitle: true`. */
305
+ * M33 K27: a title entry only from a plugin whose attached declaration says `setsTitle: true`.
306
+ * M35 P1 (W40): an inline entry only from one whose declaration says `inlineSnippets: true`. */
150
307
  export declare function checkPageHeadEntry(entry: unknown, scope: {
151
308
  pluginId: string;
152
309
  scriptOrigins: readonly string[];
153
310
  setsTitle?: boolean;
311
+ inlineSnippets?: boolean;
154
312
  }): {
155
313
  ok: true;
156
314
  entry: PageHeadEntry;
@@ -158,6 +316,15 @@ export declare function checkPageHeadEntry(entry: unknown, scope: {
158
316
  ok: false;
159
317
  reason: string;
160
318
  };
319
+ /** M35 P2 (W2): a redirect a plugin answers instead of the page: the site fallback's, and a request guard's.
320
+ * A site path or an http or https URL (siteLocationProblem), one of SITE_REDIRECT_STATUSES. */
321
+ export declare const SiteRedirectAnswerSchema: z.ZodObject<{
322
+ redirect: z.ZodObject<{
323
+ location: z.ZodString;
324
+ status: z.ZodLiteral<301 | 302 | 307 | 308>;
325
+ maxAgeSeconds: z.ZodOptional<z.ZodNumber>;
326
+ }, z.core.$strict>;
327
+ }, z.core.$strict>;
161
328
  /** M32 F2: what a plugin's site fallback answers for an address no page holds. */
162
329
  export declare const SiteFallbackAnswerSchema: z.ZodUnion<readonly [z.ZodObject<{
163
330
  redirect: z.ZodObject<{