@cosmicdrift/kumiko-samples 0.374.0 → 0.378.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 (247) hide show
  1. package/package.json +1 -1
  2. package/packages/bundled-features/package.json +6 -4
  3. package/packages/bundled-features/src/account-security/changes.json +6 -0
  4. package/packages/bundled-features/src/account-security/constants.ts +1 -0
  5. package/packages/bundled-features/src/account-security/index.ts +1 -0
  6. package/packages/bundled-features/src/admin-shell/web/client-plugin.tsx +1 -1
  7. package/packages/bundled-features/src/audit/web/client-plugin.tsx +1 -1
  8. package/packages/bundled-features/src/auth-email-password/mail-notifications.ts +1 -1
  9. package/packages/bundled-features/src/auth-email-password/web/auth-client.ts +1 -1
  10. package/packages/bundled-features/src/auth-email-password/web/auth-form-primitives.tsx +1 -1
  11. package/packages/bundled-features/src/auth-email-password/web/client-plugin.ts +3 -3
  12. package/packages/bundled-features/src/auth-email-password/web/default-topbar-actions.tsx +1 -1
  13. package/packages/bundled-features/src/auth-email-password/web/index.ts +1 -1
  14. package/packages/bundled-features/src/auth-email-password/web/session.tsx +1 -1
  15. package/packages/bundled-features/src/auth-email-password/web/tenant-menu-items.tsx +1 -1
  16. package/packages/bundled-features/src/auth-email-password/web/tenant-switcher.tsx +1 -1
  17. package/packages/bundled-features/src/auth-email-password/web/user-menu.tsx +1 -1
  18. package/packages/bundled-features/src/auth-foundation/changes.json +6 -0
  19. package/packages/bundled-features/src/auth-foundation/env.ts +27 -0
  20. package/packages/bundled-features/src/auth-foundation/index.ts +1 -0
  21. package/packages/bundled-features/src/billing-foundation/changes.json +6 -0
  22. package/packages/bundled-features/src/billing-foundation/consumer-protection/confirmation-mail.ts +1 -1
  23. package/packages/bundled-features/src/billing-foundation/consumer-protection/termination-pages.ts +1 -1
  24. package/packages/bundled-features/src/billing-foundation/contact-card.ts +14 -0
  25. package/packages/bundled-features/src/billing-foundation/handlers/billing-plans.query.ts +1 -1
  26. package/packages/bundled-features/src/billing-foundation/index.ts +1 -0
  27. package/packages/bundled-features/src/billing-foundation/plan-catalog.ts +1 -0
  28. package/packages/bundled-features/src/billing-foundation/types.ts +12 -0
  29. package/packages/bundled-features/src/billing-foundation/validate-options.ts +16 -0
  30. package/packages/bundled-features/src/billing-foundation/web/billing-contact-plan.tsx +32 -0
  31. package/packages/bundled-features/src/billing-foundation/web/billing-plans-panel.tsx +5 -15
  32. package/packages/bundled-features/src/billing-foundation/web/cancel-contract-dialog.tsx +2 -2
  33. package/packages/bundled-features/src/billing-foundation/web/checkout-consent-dialog.tsx +1 -1
  34. package/packages/bundled-features/src/billing-foundation/web/client-plugin.tsx +1 -1
  35. package/packages/bundled-features/src/billing-foundation/web/localized-params.ts +14 -0
  36. package/packages/bundled-features/src/cap-counter/changes.json +12 -0
  37. package/packages/bundled-features/src/cap-counter/stock-cap-guard.ts +9 -0
  38. package/packages/bundled-features/src/cap-overview/web/cap-cards-panel.tsx +3 -3
  39. package/packages/bundled-features/src/cap-overview/web/client-plugin.tsx +1 -1
  40. package/packages/bundled-features/src/channel-email/changes.json +6 -0
  41. package/packages/bundled-features/src/channel-email/email-channel.ts +2 -1
  42. package/packages/bundled-features/src/compliance-profiles/web/client-plugin.tsx +1 -1
  43. package/packages/bundled-features/src/config/feature.ts +2 -2
  44. package/packages/bundled-features/src/config/web/i18n.ts +1 -0
  45. package/packages/bundled-features/src/crypto-shredding/changes.json +6 -0
  46. package/packages/bundled-features/src/custom-fields/web/client-plugin.tsx +1 -1
  47. package/packages/bundled-features/src/delivery/unsubscribe-page.ts +1 -1
  48. package/packages/bundled-features/src/delivery/web/client-plugin.tsx +1 -1
  49. package/packages/bundled-features/src/delivery/web/delivery-status-cell.tsx +1 -1
  50. package/packages/bundled-features/src/feature-toggles/web/client-plugin.tsx +1 -1
  51. package/packages/bundled-features/src/file-provider-s3/changes.json +6 -0
  52. package/packages/bundled-features/src/file-provider-s3/env-named-feature.ts +45 -0
  53. package/packages/bundled-features/src/file-provider-s3/env-schema.ts +20 -13
  54. package/packages/bundled-features/src/file-provider-s3/index.ts +4 -0
  55. package/packages/bundled-features/src/folders/web/client-plugin.tsx +1 -1
  56. package/packages/bundled-features/src/folders/web/folder-section.tsx +3 -4
  57. package/packages/bundled-features/src/host-routing/README.md +7 -0
  58. package/packages/bundled-features/src/host-routing/changes.json +6 -0
  59. package/packages/bundled-features/src/host-routing/constants.ts +4 -0
  60. package/packages/bundled-features/src/host-routing/dispatch.ts +34 -26
  61. package/packages/bundled-features/src/host-routing/feature.ts +122 -41
  62. package/packages/bundled-features/src/host-routing/host.ts +28 -1
  63. package/packages/bundled-features/src/host-routing/index.ts +3 -0
  64. package/packages/bundled-features/src/host-routing/options.ts +45 -2
  65. package/packages/bundled-features/src/host-routing/redirects.ts +33 -0
  66. package/packages/bundled-features/src/host-routing/tenant-lookup.ts +65 -0
  67. package/packages/bundled-features/src/host-routing/validate-options.ts +48 -1
  68. package/packages/bundled-features/src/inbound-mail-foundation/changes.json +13 -0
  69. package/packages/bundled-features/src/inbound-mail-foundation/feature.ts +8 -0
  70. package/packages/bundled-features/src/inbound-mail-foundation/handlers/list-accounts.query.ts +11 -4
  71. package/packages/bundled-features/src/inbound-mail-foundation/i18n.ts +42 -0
  72. package/packages/bundled-features/src/inbound-mail-foundation/index.ts +4 -0
  73. package/packages/bundled-features/src/inbound-mail-foundation/screens.ts +100 -0
  74. package/packages/bundled-features/src/inbound-mail-foundation/types.ts +2 -2
  75. package/packages/bundled-features/src/jobs/web/client-plugin.tsx +1 -1
  76. package/packages/bundled-features/src/legal-pages/changes.json +6 -0
  77. package/packages/bundled-features/src/legal-pages/feature.ts +14 -1
  78. package/packages/bundled-features/src/legal-pages/layout.ts +6 -6
  79. package/packages/bundled-features/src/legal-pages/web/client-plugin.ts +1 -1
  80. package/packages/bundled-features/src/mail-foundation/changes.json +6 -0
  81. package/packages/bundled-features/src/mail-foundation/feature.ts +21 -22
  82. package/packages/bundled-features/src/mail-foundation/i18n.ts +3 -2
  83. package/packages/bundled-features/src/mail-transport-smtp/i18n.ts +1 -1
  84. package/packages/bundled-features/src/managed-pages/web/client-plugin.tsx +1 -1
  85. package/packages/bundled-features/src/notes-history/web/client-plugin.tsx +1 -1
  86. package/packages/bundled-features/src/page-render/branding.ts +1 -1
  87. package/packages/bundled-features/src/page-render/layout.ts +2 -2
  88. package/packages/bundled-features/src/page-render/markdown.ts +1 -1
  89. package/packages/bundled-features/src/personal-access-tokens/i18n.ts +1 -1
  90. package/packages/bundled-features/src/personal-access-tokens/screens.ts +1 -1
  91. package/packages/bundled-features/src/secrets/feature.ts +4 -4
  92. package/packages/bundled-features/src/seo/sitemap.ts +1 -1
  93. package/packages/bundled-features/src/shared/mail-template-body.ts +1 -1
  94. package/packages/bundled-features/src/shared/purge-files-reaching-subject.ts +127 -2
  95. package/packages/bundled-features/src/tags/web/client-plugin.tsx +1 -1
  96. package/packages/bundled-features/src/template-resolver/changes.json +38 -0
  97. package/packages/bundled-features/src/template-resolver/compile-document-body.ts +61 -3
  98. package/packages/bundled-features/src/template-resolver/constants.ts +3 -0
  99. package/packages/bundled-features/src/template-resolver/document-blocks.ts +36 -0
  100. package/packages/bundled-features/src/template-resolver/document-images.ts +29 -0
  101. package/packages/bundled-features/src/template-resolver/document-ops.ts +515 -0
  102. package/packages/bundled-features/src/template-resolver/document-sanitizer.ts +44 -0
  103. package/packages/bundled-features/src/template-resolver/document-schema.ts +5 -0
  104. package/packages/bundled-features/src/template-resolver/feature.ts +79 -34
  105. package/packages/bundled-features/src/template-resolver/handlers/bundle-import.ts +1 -0
  106. package/packages/bundled-features/src/template-resolver/handlers/collection-item.query.ts +1 -1
  107. package/packages/bundled-features/src/template-resolver/handlers/collection-list.query.ts +1 -1
  108. package/packages/bundled-features/src/template-resolver/handlers/collection-set.write.ts +2 -6
  109. package/packages/bundled-features/src/template-resolver/handlers/collection-shared.ts +0 -6
  110. package/packages/bundled-features/src/template-resolver/handlers/copy-locale.write.ts +67 -58
  111. package/packages/bundled-features/src/template-resolver/handlers/discard-draft.write.ts +36 -13
  112. package/packages/bundled-features/src/template-resolver/handlers/document-base.ts +86 -0
  113. package/packages/bundled-features/src/template-resolver/handlers/document-blocks.query.ts +48 -0
  114. package/packages/bundled-features/src/template-resolver/handlers/export-bundle.query.ts +11 -3
  115. package/packages/bundled-features/src/template-resolver/handlers/import-bundle.write.ts +37 -28
  116. package/packages/bundled-features/src/template-resolver/handlers/overview.query.ts +66 -62
  117. package/packages/bundled-features/src/template-resolver/handlers/patch-draft.write.ts +134 -0
  118. package/packages/bundled-features/src/template-resolver/handlers/preview.query.ts +2 -1
  119. package/packages/bundled-features/src/template-resolver/handlers/reset-to-system.write.ts +62 -49
  120. package/packages/bundled-features/src/template-resolver/handlers/resource-link-pdf.write.ts +44 -29
  121. package/packages/bundled-features/src/template-resolver/handlers/resource-remove.write.ts +52 -36
  122. package/packages/bundled-features/src/template-resolver/handlers/resource-upload.write.ts +126 -106
  123. package/packages/bundled-features/src/template-resolver/handlers/send-test-shared.ts +38 -0
  124. package/packages/bundled-features/src/template-resolver/handlers/send-test-status.query.ts +31 -0
  125. package/packages/bundled-features/src/template-resolver/handlers/send-test.write.ts +105 -110
  126. package/packages/bundled-features/src/template-resolver/handlers/set.write.ts +110 -103
  127. package/packages/bundled-features/src/template-resolver/handlers/template-write.ts +22 -1
  128. package/packages/bundled-features/src/template-resolver/handlers/toggle-status.write.ts +56 -28
  129. package/packages/bundled-features/src/template-resolver/handlers/upsert-tenant.write.ts +38 -29
  130. package/packages/bundled-features/src/template-resolver/handlers/validate.query.ts +24 -9
  131. package/packages/bundled-features/src/template-resolver/index.ts +8 -1
  132. package/packages/bundled-features/src/template-resolver/{web/placeholder-text.ts → placeholder-text.ts} +1 -1
  133. package/packages/bundled-features/src/template-resolver/qualified-names.ts +4 -0
  134. package/packages/bundled-features/src/template-resolver/seeding.ts +3 -1
  135. package/packages/bundled-features/src/template-resolver/template-bundle.ts +6 -1
  136. package/packages/bundled-features/src/template-resolver/template-edit-policy.ts +91 -0
  137. package/packages/bundled-features/src/template-resolver/template-preview.ts +32 -10
  138. package/packages/bundled-features/src/template-resolver/template-validation.ts +32 -11
  139. package/packages/bundled-features/src/template-resolver/web/client-plugin.tsx +3 -3
  140. package/packages/bundled-features/src/template-resolver/web/document-editor-extensions.ts +29 -0
  141. package/packages/bundled-features/src/template-resolver/web/document-tiptap-editor.tsx +43 -5
  142. package/packages/bundled-features/src/template-resolver/web/document-toolbar-blocks.ts +9 -33
  143. package/packages/bundled-features/src/template-resolver/web/i18n.ts +30 -0
  144. package/packages/bundled-features/src/template-resolver/web/placeholder-line-editor.tsx +2 -2
  145. package/packages/bundled-features/src/tenant/web/client-plugin.tsx +1 -1
  146. package/packages/bundled-features/src/tenant/web/member-status-cell.tsx +1 -1
  147. package/packages/bundled-features/src/tier-engine/web/client-plugin.tsx +1 -1
  148. package/packages/bundled-features/src/user-data-rights/changes.json +6 -0
  149. package/packages/bundled-features/src/user-data-rights/env.ts +15 -0
  150. package/packages/bundled-features/src/user-data-rights/feature.ts +4 -2
  151. package/packages/bundled-features/src/user-data-rights/index.ts +1 -0
  152. package/packages/bundled-features/src/user-data-rights/lib/mail-transport-resolver.ts +1 -1
  153. package/packages/bundled-features/src/user-data-rights/lib/storage-provider-resolver.ts +1 -1
  154. package/packages/bundled-features/src/user-data-rights/mail-notifications.ts +1 -1
  155. package/packages/bundled-features/src/user-data-rights/web/client-plugin.tsx +1 -1
  156. package/packages/bundled-features/src/user-data-rights/web/privacy-center-screen.tsx +2 -2
  157. package/packages/bundled-features/src/waitlist/changes.json +6 -0
  158. package/packages/bundled-features/src/waitlist/legacy-migrate.ts +51 -2
  159. package/samples/apps/admin-console/package.json +0 -3
  160. package/samples/apps/admin-console/src/app/client.tsx +1 -1
  161. package/samples/apps/admin-console/src/app/shell.tsx +1 -1
  162. package/samples/apps/config-demo/package.json +1 -3
  163. package/samples/apps/config-demo/src/app/client.tsx +1 -1
  164. package/samples/apps/config-demo/src/app/shell.tsx +2 -2
  165. package/samples/apps/config-demo/src/features/demo/web/index.ts +1 -1
  166. package/samples/apps/config-demo/tsconfig.json +0 -12
  167. package/samples/apps/marketing-demo/package.json +1 -3
  168. package/samples/apps/marketing-demo/src/app/client.tsx +1 -1
  169. package/samples/apps/marketing-demo/src/app/shell.tsx +1 -1
  170. package/samples/apps/marketing-demo/src/features/assets/web/index.ts +1 -1
  171. package/samples/apps/marketing-demo/src/features/helpdesk/web/index.ts +1 -1
  172. package/samples/apps/showcase/package.json +1 -3
  173. package/samples/apps/showcase/src/app/client.tsx +1 -1
  174. package/samples/apps/showcase/src/app/shell.tsx +1 -1
  175. package/samples/apps/showcase/src/features/demos/web/index.ts +1 -1
  176. package/samples/apps/showcase/src/features/demos/web/pages/sidebar-panel.tsx +1 -1
  177. package/samples/apps/showcase/src/features/demos/web/pages/toast.tsx +1 -1
  178. package/samples/apps/showcase/src/features/items/web/index.ts +1 -1
  179. package/samples/apps/styleguide/package.json +1 -3
  180. package/samples/apps/styleguide/src/app/client.tsx +1 -1
  181. package/samples/apps/styleguide/src/app/shell.tsx +2 -2
  182. package/samples/apps/styleguide/src/features/ai-settings/web.ts +1 -1
  183. package/samples/apps/styleguide/src/features/content/web.tsx +2 -2
  184. package/samples/apps/styleguide/src/features/demo/web.ts +1 -1
  185. package/samples/apps/styleguide/src/features/examples/web.ts +1 -1
  186. package/samples/apps/styleguide/src/features/gallery/web/Gallery.tsx +1 -1
  187. package/samples/apps/styleguide/src/features/gallery/web/index.ts +1 -1
  188. package/samples/apps/styleguide/src/features/widgets/demo-locale.ts +1 -1
  189. package/samples/apps/styleguide/src/features/widgets/lib/format.ts +1 -1
  190. package/samples/apps/styleguide/src/features/widgets/web/DashboardFilterEcho.tsx +1 -1
  191. package/samples/apps/styleguide/src/features/widgets/web/FormExamples.tsx +1 -1
  192. package/samples/apps/styleguide/src/features/widgets/web/Widgets.tsx +1 -1
  193. package/samples/apps/styleguide/src/features/widgets/web/index.ts +1 -1
  194. package/samples/apps/styleguide/tsconfig.json +0 -12
  195. package/samples/apps/ui-walkthrough/package.json +1 -3
  196. package/samples/apps/ui-walkthrough/src/app/client.tsx +1 -1
  197. package/samples/apps/ui-walkthrough/src/app/help-action.tsx +37 -0
  198. package/samples/apps/ui-walkthrough/src/app/seed-templates.ts +2 -0
  199. package/samples/apps/ui-walkthrough/src/app/shell.tsx +7 -1
  200. package/samples/apps/ui-walkthrough/src/app/template-seed-data.ts +20 -0
  201. package/samples/apps/ui-walkthrough/src/features/billing/web/index.ts +1 -1
  202. package/samples/apps/ui-walkthrough/src/features/rental/feature.ts +65 -1
  203. package/samples/apps/ui-walkthrough/src/features/rental/i18n.ts +70 -0
  204. package/samples/apps/ui-walkthrough/src/features/rental/invoice-receive.ts +20 -0
  205. package/samples/apps/ui-walkthrough/src/features/rental/lease-support.ts +15 -0
  206. package/samples/apps/ui-walkthrough/src/features/rental/qualified-names.ts +2 -0
  207. package/samples/apps/ui-walkthrough/src/features/rental/screens.ts +79 -0
  208. package/samples/apps/ui-walkthrough/src/features/rental/web/index.ts +3 -1
  209. package/samples/apps/ui-walkthrough/src/features/rental/web/upload-standard-layout.tsx +61 -0
  210. package/samples/apps/ui-walkthrough/src/features/tasks/i18n.ts +8 -0
  211. package/samples/apps/ui-walkthrough/src/features/tasks/web/index.ts +1 -1
  212. package/samples/apps/ui-walkthrough/src/features/vehicles/web/index.ts +1 -1
  213. package/samples/apps/ui-walkthrough/src/run-config.ts +32 -3
  214. package/samples/apps/use-all-bundled/bin/main.ts +3 -2
  215. package/samples/apps/use-all-bundled/e2e-billing-gallery/gallery-features.ts +12 -0
  216. package/samples/apps/use-all-bundled/e2e-billing-gallery/server.ts +1 -1
  217. package/samples/apps/use-all-bundled/feature-manifest.json +3 -2
  218. package/samples/apps/use-all-bundled/package.json +1 -3
  219. package/samples/apps/use-all-bundled/src/app/client.tsx +1 -1
  220. package/samples/apps/use-all-bundled/src/app/dev-app-options.ts +5 -4
  221. package/samples/apps/use-all-bundled/src/app/shell.tsx +1 -1
  222. package/samples/apps/use-all-bundled/src/run-config.ts +10 -1
  223. package/samples/apps/workspaces/package.json +1 -3
  224. package/samples/apps/workspaces/src/app/client.tsx +1 -1
  225. package/samples/apps/workspaces/src/app/shell.tsx +1 -1
  226. package/samples/apps/workspaces/src/features/demo/web/index.ts +1 -1
  227. package/samples/apps/workspaces/src/features/demo-driver/web/index.ts +1 -1
  228. package/samples/recipes/apex-landing/package.json +1 -1
  229. package/samples/recipes/apex-landing/src/feature.ts +1 -1
  230. package/samples/recipes/apex-surface-auth/README.md +1 -1
  231. package/samples/recipes/apex-surface-auth/src/feature.ts +2 -2
  232. package/samples/recipes/compose-stacks/README.md +7 -4
  233. package/samples/recipes/delivery-notifications/README.md +1 -1
  234. package/samples/recipes/embedded/README.md +8 -0
  235. package/samples/recipes/embedded/src/feature.ts +8 -0
  236. package/samples/recipes/embedded/src/handlers/invoice-receive.write.ts +38 -0
  237. package/samples/recipes/embedded/src/screens/invoice-receive.screen.ts +59 -0
  238. package/samples/recipes/embedded-entity-form/package.json +0 -1
  239. package/samples/recipes/embedded-entity-form/src/web/accept-suggestion-drawer.tsx +1 -1
  240. package/samples/recipes/notes-history-basic/README.md +1 -1
  241. package/samples/recipes/record-detail-layout/package.json +0 -1
  242. package/samples/recipes/tags-basic/README.md +1 -1
  243. package/samples/recipes/user-profile/README.md +1 -1
  244. package/samples/recipes/wizard-form/package.json +0 -1
  245. package/samples/recipes/wizard-form/src/web/index.ts +2 -2
  246. package/samples/recipes/wizard-form/src/web/listing-review-section.tsx +2 -2
  247. package/samples/recipes/writeform-section/package.json +0 -1
@@ -1,6 +1,6 @@
1
1
  import { emailPasswordClient } from "@cosmicdrift/kumiko-bundled-features/auth-email-password/web";
2
2
  import { localeDeClient } from "@cosmicdrift/kumiko-locale-de/web";
3
- import { createKumikoApp } from "@cosmicdrift/kumiko-renderer-web";
3
+ import { createKumikoApp } from "@cosmicdrift/kumiko-renderer/web";
4
4
  import { demoClient } from "../features/demo/web";
5
5
  import { driverClient } from "../features/demo-driver/web";
6
6
  import { AppShell } from "./shell";
@@ -5,7 +5,7 @@ import {
5
5
  DefaultTopbarActions,
6
6
  useShellUser,
7
7
  } from "@cosmicdrift/kumiko-bundled-features/auth-email-password/web";
8
- import { type AppSchema, WorkspaceShell } from "@cosmicdrift/kumiko-renderer-web";
8
+ import { type AppSchema, WorkspaceShell } from "@cosmicdrift/kumiko-renderer/web";
9
9
  import { MoonStar, Sun } from "lucide-react";
10
10
  import type { ReactNode } from "react";
11
11
 
@@ -1,4 +1,4 @@
1
- import type { ClientFeatureDefinition } from "@cosmicdrift/kumiko-renderer-web";
1
+ import type { ClientFeatureDefinition } from "@cosmicdrift/kumiko-renderer/web";
2
2
  import { demoTranslations } from "../i18n";
3
3
 
4
4
  export const demoClient: ClientFeatureDefinition = {
@@ -1,4 +1,4 @@
1
- import type { ClientFeatureDefinition } from "@cosmicdrift/kumiko-renderer-web";
1
+ import type { ClientFeatureDefinition } from "@cosmicdrift/kumiko-renderer/web";
2
2
  import { driverTranslations } from "../i18n";
3
3
 
4
4
  export const driverClient: ClientFeatureDefinition = {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@cosmicdrift/kumiko-bundled-features": "workspace:*",
11
- "@cosmicdrift/kumiko-headless": "workspace:*"
11
+ "@cosmicdrift/kumiko-renderer": "workspace:*"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@cosmicdrift/kumiko-testing": "workspace:*",
@@ -18,7 +18,7 @@ import {
18
18
  type ApexPage,
19
19
  type ApexPricingTier,
20
20
  renderApexPage,
21
- } from "@cosmicdrift/kumiko-headless/apex";
21
+ } from "@cosmicdrift/kumiko-renderer/headless/apex";
22
22
  import { HERO_SCREENSHOT } from "./constants";
23
23
 
24
24
  // --- Inputs: shapes the surrounding features hand you -----------------------
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  RequestAccountDeletionScreen, ConfirmAccountDeletionScreen,
36
36
  } from "@cosmicdrift/kumiko-bundled-features/user-data-rights/web";
37
- import { createPublicSurface } from "@cosmicdrift/kumiko-renderer-web";
37
+ import { createPublicSurface } from "@cosmicdrift/kumiko-renderer/web";
38
38
 
39
39
  // createLoginRoute, not a raw LoginScreen render — it owns the challenge-
40
40
  // swap for a second factor, so mounting auth-mfa later doesn't need this
@@ -11,7 +11,7 @@
11
11
  // 2. Client (Kommentar unten + README): wie createPublicSurface + AuthShell
12
12
  // die Screens in der Apex-Chrome mounten.
13
13
  //
14
- // CLIENT-WIRING (apex.tsx der App — renderer-web, hier nur als Referenz, da
14
+ // CLIENT-WIRING (apex.tsx der App — renderer/web, hier nur als Referenz, da
15
15
  // Recipes keine Browser-Deps ziehen):
16
16
  //
17
17
  // import {
@@ -22,7 +22,7 @@
22
22
  // RequestAccountDeletionScreen, ConfirmAccountDeletionScreen,
23
23
  // defaultTranslations as deletionI18n,
24
24
  // } from "@cosmicdrift/kumiko-bundled-features/user-data-rights/web";
25
- // import { createPublicSurface } from "@cosmicdrift/kumiko-renderer-web";
25
+ // import { createPublicSurface } from "@cosmicdrift/kumiko-renderer/web";
26
26
  //
27
27
  // // AuthShell: die Auth-Card rendert in der Marketing-Chrome statt
28
28
  // // Fullscreen. Default (ohne Provider) bleibt der Fullscreen-Wrapper.
@@ -36,22 +36,25 @@ the option.
36
36
  | `composeGdprStack` | `kmsMode` | `kms` or `allowPlaintextPii` |
37
37
  | `composeGdprStack({ selfService })`, `composeUserDataRightsStack` | `mail` | a mounted `channel-email` |
38
38
  | `composeSecurityStack` | `kmsMode`, `rateLimit` not `false` | `kms` or `allowPlaintextPii` |
39
- | `composeSaasStack({ billing: "stripe" })` | `billing` | a mounted subscription provider |
39
+ | `composeSaasStack({ billing: "stripe" })` | `billing` (warning only) | a mounted subscription provider |
40
40
 
41
41
  A missing option fails the boot with:
42
42
 
43
43
  ```
44
44
  [runProdApp] stacks in `features` need boot options that are not set:
45
- - composeSaasStack needs the boot option `billing`: set billing: { stripe: { priceToTier }, defaultTier }
45
+ - composeGdprStack needs the boot option `kmsMode`: set kmsMode: "required" (or { plaintextReason } for a demo)
46
46
  ```
47
47
 
48
+ A stripe `composeSaasStack` without `billing` boots and logs the same line as a warning, so an
49
+ app can go live before its prices exist.
50
+
48
51
  ## Flow
49
52
 
50
53
  1. `src/app.ts` lists the stacks and the boot options they need.
51
54
  2. The test boots with `KUMIKO_DRY_RUN_ENV=boot`, which runs the whole
52
55
  validation and stops before any DB or Redis connection: with the options
53
- the boot passes, without `billing` or `kmsMode` it fails and names the
54
- stacks.
56
+ the boot passes, without `kmsMode` it fails and names the stacks, and
57
+ without `billing` it warns.
55
58
 
56
59
  ## Tests
57
60
 
@@ -8,7 +8,7 @@ Shows how a feature sends notifications to multiple channels (InApp + Email + Pu
8
8
 
9
9
  **Mail text is stored data:** The boot seed (`seedNotificationTemplates`) writes the declared `template` and `meta` into the template store as system templates. The email channel renders them with `renderer-mail-html`. A notification routed to email without `template` and `meta` fails its delivery.
10
10
 
11
- **Tenant override:** A tenant admin overrides the text through the template-resolver handlers (`upsertTenant`, then `publish`). The next mail for that tenant uses the override; the system text stays for everyone else.
11
+ **Tenant override:** Only a SystemAdmin edits templates unless the app unlocks them. The app lists the mail in `createTemplateResolverFeature({ tenantEditable: [{ kind: "mail", slug, access: { roles: ["TenantAdmin"] } }] })`; then a tenant admin overrides the text through the template-resolver handlers (`upsertTenant`, then `publish`) and every other template is refused with 403. The next mail for that tenant uses the override; the system text stays for everyone else.
12
12
 
13
13
  **Sending:** The write handler calls `ctx.notify(type, { to, data })`. The `data` keys are the template variables; sending fails loudly when a required variable is missing.
14
14
 
@@ -19,6 +19,14 @@ object and an embedded list rendered by a declarative `entityEdit` screen.
19
19
  `createEmbeddedListField`; its renderer receives `embeddedListCells`, so no
20
20
  custom screen component is required.
21
21
 
22
+ - **Derived head totals** (`src/screens/invoice-receive.screen.ts`): an
23
+ `actionForm` declares `derive` so net, VAT, and gross follow the lines
24
+ (`listSum`), or follow a typed net and VAT rate while the list is empty
25
+ (`whenEmpty`, `percent`). The renderer shows them read-only and live; the
26
+ handler wraps its schema with `withFormDerivations(schema, screen)`
27
+ (`src/handlers/invoice-receive.write.ts`), so totals sent by the client are
28
+ replaced on the server.
29
+
22
30
  ## When to reach for it
23
31
 
24
32
  Use an embedded field or list when the nested data is created, changed, and
@@ -15,6 +15,9 @@
15
15
  // on its `lines` sub-fields (Issue #1835), plus a declarative
16
16
  // entityEdit screen that renders the list end-to-end via
17
17
  // EmbeddedListField, no custom-screen code required
18
+ // invoice-receive — actionForm whose net/VAT/gross head fields are derived
19
+ // from the lines (`derive`); the handler recomputes them with
20
+ // `withFormDerivations`, so client-sent totals are never trusted
18
21
 
19
22
  import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
20
23
  import { contactEntity } from "./entities/contact";
@@ -22,6 +25,8 @@ import { invoiceEntity } from "./entities/invoice";
22
25
  import { productEntity } from "./entities/product";
23
26
  import { contactCreate } from "./handlers/contact-create.write";
24
27
  import { contactDetail } from "./handlers/contact-detail.query";
28
+ import { invoiceReceive } from "./handlers/invoice-receive.write";
29
+ import { invoiceReceiveScreen } from "./screens/invoice-receive.screen";
25
30
 
26
31
  export { contactEntity } from "./entities/contact";
27
32
  export { invoiceEntity } from "./entities/invoice";
@@ -43,6 +48,7 @@ export const embeddedFeature = defineFeature("contacts", (r) => {
43
48
 
44
49
  r.writeHandler(contactCreate);
45
50
  r.queryHandler(contactDetail);
51
+ r.writeHandler(invoiceReceive);
46
52
 
47
53
  r.crud("product", productEntity, { write: adminWrite, read: openRead });
48
54
  r.crud("invoice", invoiceEntity, { write: adminWrite, read: openRead });
@@ -55,4 +61,6 @@ export const embeddedFeature = defineFeature("contacts", (r) => {
55
61
  sections: [{ columns: 1, fields: ["customer", "lines"] }],
56
62
  },
57
63
  });
64
+
65
+ r.screen(invoiceReceiveScreen);
58
66
  });
@@ -0,0 +1,38 @@
1
+ import {
2
+ defineWriteHandler,
3
+ fieldToZod,
4
+ withFormDerivations,
5
+ } from "@cosmicdrift/kumiko-framework/engine";
6
+ import { z } from "zod";
7
+ import { invoiceReceiveLines, invoiceReceiveScreen } from "../screens/invoice-receive.screen";
8
+
9
+ const moneyPayload = z.object({ amount: z.number(), currency: z.string().min(1) });
10
+
11
+ // The preprocess recomputes net/VAT/gross before validation: totals sent by the
12
+ // client never reach the handler.
13
+ const receiveInput = withFormDerivations(
14
+ z.object({
15
+ supplier: z.string().min(1),
16
+ invoiceNumber: z.string().min(1),
17
+ lines: fieldToZod(invoiceReceiveLines, ["EUR"]),
18
+ netTotal: moneyPayload,
19
+ vatRate: z.number().optional(),
20
+ vatTotal: moneyPayload,
21
+ grossTotal: moneyPayload,
22
+ }),
23
+ invoiceReceiveScreen,
24
+ );
25
+
26
+ export const invoiceReceive = defineWriteHandler({
27
+ name: "invoice:receive",
28
+ schema: receiveInput,
29
+ access: { roles: ["Admin"] },
30
+ handler: async (event) => ({
31
+ isSuccess: true,
32
+ data: {
33
+ netTotal: event.payload.netTotal,
34
+ vatTotal: event.payload.vatTotal,
35
+ grossTotal: event.payload.grossTotal,
36
+ },
37
+ }),
38
+ });
@@ -0,0 +1,59 @@
1
+ import {
2
+ type ActionFormScreenDefinition,
3
+ createDecimalField,
4
+ createEmbeddedListField,
5
+ createTextField,
6
+ } from "@cosmicdrift/kumiko-framework/engine";
7
+
8
+ const euro = { kind: "literal", code: "EUR" } as const;
9
+
10
+ export const invoiceReceiveLines = createEmbeddedListField(
11
+ {
12
+ description: { type: "text", required: true },
13
+ amount: { type: "money", required: true },
14
+ vatRate: { type: "decimal", scale: 2, required: true },
15
+ vatAmount: { type: "money" },
16
+ },
17
+ {
18
+ derived: { vatAmount: { op: "percent", from: ["amount", "vatRate"] } },
19
+ totals: ["amount", "vatAmount"],
20
+ },
21
+ );
22
+
23
+ // Net/VAT/gross are derived: with line items they are the sum of the lines,
24
+ // without lines the net amount and the VAT rate are typed and VAT/gross follow.
25
+ export const invoiceReceiveScreen: ActionFormScreenDefinition = {
26
+ id: "invoice-receive",
27
+ type: "actionForm",
28
+ handler: "contacts:write:invoice:receive",
29
+ fields: {
30
+ supplier: createTextField({ required: true, personal: "tenant", find: "none" }),
31
+ invoiceNumber: createTextField({
32
+ required: true,
33
+ personal: false,
34
+ reason: "is_business_data",
35
+ }),
36
+ lines: invoiceReceiveLines,
37
+ netTotal: { type: "money", currency: euro },
38
+ vatRate: createDecimalField({ precision: 5, scale: 2 }),
39
+ vatTotal: { type: "money", currency: euro },
40
+ grossTotal: { type: "money", currency: euro },
41
+ },
42
+ derive: {
43
+ netTotal: { op: "listSum", list: "lines", cell: "amount" },
44
+ vatTotal: {
45
+ op: "listSum",
46
+ list: "lines",
47
+ cell: "vatAmount",
48
+ whenEmpty: { op: "percent", from: ["netTotal", "vatRate"] },
49
+ },
50
+ grossTotal: { op: "sum", from: ["netTotal", "vatTotal"] },
51
+ },
52
+ layout: {
53
+ sections: [
54
+ { columns: 2, fields: ["supplier", "invoiceNumber"] },
55
+ { columns: 1, fields: ["lines"] },
56
+ { columns: 2, fields: ["netTotal", "vatRate", "vatTotal", "grossTotal"] },
57
+ ],
58
+ },
59
+ };
@@ -5,7 +5,6 @@
5
5
  "dependencies": {
6
6
  "@cosmicdrift/kumiko-framework": "workspace:*",
7
7
  "@cosmicdrift/kumiko-renderer": "workspace:*",
8
- "@cosmicdrift/kumiko-renderer-web": "workspace:*",
9
8
  "react": "^19.2.6"
10
9
  },
11
10
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  import type { RenderEditControls } from "@cosmicdrift/kumiko-renderer";
2
2
  import { RenderEdit, useDispatcher, usePrimitives } from "@cosmicdrift/kumiko-renderer";
3
- import { Drawer } from "@cosmicdrift/kumiko-renderer-web";
3
+ import { Drawer } from "@cosmicdrift/kumiko-renderer/web";
4
4
  import { type ReactNode, useMemo, useRef, useState } from "react";
5
5
  import { z } from "zod";
6
6
  import { prospectEntity } from "../entities/prospect";
@@ -47,7 +47,7 @@ handler as above. Register `notesHistoryClient()` once (for its component +
47
47
  i18n), then mount it either way:
48
48
 
49
49
  ```tsx illustration
50
- import { createKumikoApp } from "@cosmicdrift/kumiko-renderer-web";
50
+ import { createKumikoApp } from "@cosmicdrift/kumiko-renderer/web";
51
51
  import { notesHistoryClient, NotesSection, NOTES_SECTION_EXTENSION_NAME } from "@cosmicdrift/kumiko-bundled-features/notes-history/web";
52
52
 
53
53
  // once, at app boot — required even for standalone use (registers i18n):
@@ -9,7 +9,6 @@
9
9
  "dependencies": {
10
10
  "@cosmicdrift/kumiko-framework": "workspace:*",
11
11
  "@cosmicdrift/kumiko-renderer": "workspace:*",
12
- "@cosmicdrift/kumiko-renderer-web": "workspace:*",
13
12
  "react": "^19.2.6"
14
13
  },
15
14
  "devDependencies": {
@@ -48,7 +48,7 @@ as above. Register `tagsClient()` once (for its component + i18n), then mount it
48
48
  either way:
49
49
 
50
50
  ```tsx illustration
51
- import { createKumikoApp } from "@cosmicdrift/kumiko-renderer-web";
51
+ import { createKumikoApp } from "@cosmicdrift/kumiko-renderer/web";
52
52
  import { tagsClient, TagSection, TAGS_SECTION_EXTENSION_NAME } from "@cosmicdrift/kumiko-bundled-features/tags/web";
53
53
 
54
54
  // once, at app boot — required even for standalone use (registers i18n):
@@ -46,7 +46,7 @@ itself needs no client registration):
46
46
  ```tsx illustration
47
47
  import { userProfileClient } from "@cosmicdrift/kumiko-bundled-features/user-profile/web";
48
48
  import { emailPasswordClient } from "@cosmicdrift/kumiko-bundled-features/auth-email-password/web";
49
- import { createKumikoApp } from "@cosmicdrift/kumiko-renderer-web";
49
+ import { createKumikoApp } from "@cosmicdrift/kumiko-renderer/web";
50
50
 
51
51
  createKumikoApp({
52
52
  clientFeatures: [emailPasswordClient(), userProfileClient()],
@@ -10,7 +10,6 @@
10
10
  "@cosmicdrift/kumiko-bundled-features": "workspace:*",
11
11
  "@cosmicdrift/kumiko-framework": "workspace:*",
12
12
  "@cosmicdrift/kumiko-renderer": "workspace:*",
13
- "@cosmicdrift/kumiko-renderer-web": "workspace:*",
14
13
  "react": "^19.2.6"
15
14
  },
16
15
  "devDependencies": {
@@ -3,11 +3,11 @@
3
3
  // A `kind: "extension"` section only resolves through
4
4
  // clientFeatures.extensionSectionComponents (createKumikoApp → ExtensionSectionsProvider)
5
5
  // — never imported directly from feature.ts, which keeps the server file
6
- // free of the renderer-web graph. Without registering this export, an app
6
+ // free of the renderer/web graph. Without registering this export, an app
7
7
  // mounting this recipe gets RenderEdit's fallback placeholder instead of
8
8
  // the real review step.
9
9
 
10
- import type { ClientFeatureDefinition } from "@cosmicdrift/kumiko-renderer-web";
10
+ import type { ClientFeatureDefinition } from "@cosmicdrift/kumiko-renderer/web";
11
11
  import { ListingReviewSection } from "./listing-review-section";
12
12
 
13
13
  export const listingsClient: ClientFeatureDefinition = {
@@ -1,11 +1,11 @@
1
1
  import type { ExtensionSectionProps } from "@cosmicdrift/kumiko-renderer";
2
- import { DetailList } from "@cosmicdrift/kumiko-renderer-web";
2
+ import { DetailList } from "@cosmicdrift/kumiko-renderer/web";
3
3
  import type { ReactNode } from "react";
4
4
 
5
5
  // Registered under the `__component` name the feature's review section
6
6
  // points at (see feature.ts) — never imported by feature.ts itself, the
7
7
  // string name is the only link so the server file stays free of the
8
- // renderer-web graph.
8
+ // renderer/web graph.
9
9
  export function ListingReviewSection({ values }: ExtensionSectionProps): ReactNode {
10
10
  return (
11
11
  <DetailList
@@ -10,7 +10,6 @@
10
10
  "dependencies": {
11
11
  "@cosmicdrift/kumiko-framework": "workspace:*",
12
12
  "@cosmicdrift/kumiko-renderer": "workspace:*",
13
- "@cosmicdrift/kumiko-renderer-web": "workspace:*",
14
13
  "react": "^19.2.6"
15
14
  },
16
15
  "devDependencies": {