@cosmicdrift/kumiko-samples 0.410.0 → 0.411.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 (51) hide show
  1. package/package.json +1 -1
  2. package/packages/bundled-features/package.json +31 -1
  3. package/packages/bundled-features/src/auth-email-password/changes.json +24 -0
  4. package/packages/bundled-features/src/auth-email-password/seeding.ts +84 -6
  5. package/packages/bundled-features/src/auth-email-password/web/i18n.ts +1 -0
  6. package/packages/bundled-features/src/auth-email-password/web/signup-screen.tsx +48 -3
  7. package/packages/bundled-features/src/auth-email-password/web/static-account.ts +190 -0
  8. package/packages/bundled-features/src/auth-email-password/web/static-client.ts +226 -0
  9. package/packages/bundled-features/src/foundation-shared/demo-admin-env.ts +11 -0
  10. package/packages/bundled-features/src/foundation-shared/index.ts +5 -1
  11. package/packages/bundled-features/src/inbound-provider-imap/changes.json +6 -0
  12. package/packages/bundled-features/src/inbound-provider-imap/imap-client.ts +3 -1
  13. package/packages/bundled-features/src/presence/changes.json +8 -0
  14. package/packages/bundled-features/src/presence/feature.ts +25 -0
  15. package/packages/bundled-features/src/presence/handlers/heartbeat.write.ts +52 -0
  16. package/packages/bundled-features/src/presence/handlers/leave.write.ts +41 -0
  17. package/packages/bundled-features/src/presence/handlers/list.query.ts +39 -0
  18. package/packages/bundled-features/src/presence/index.ts +7 -0
  19. package/packages/bundled-features/src/presence/options.ts +30 -0
  20. package/packages/bundled-features/src/presence/payloads.ts +26 -0
  21. package/packages/bundled-features/src/presence/room.ts +65 -0
  22. package/packages/bundled-features/src/presence/store.ts +185 -0
  23. package/packages/bundled-features/src/sessions/feature.ts +6 -2
  24. package/packages/bundled-features/src/sessions/handlers/last-activity-probe.route.ts +19 -0
  25. package/packages/bundled-features/src/tenant-inactivity/changes.json +12 -0
  26. package/packages/bundled-features/src/tenant-inactivity/check-inactive-tenants.ts +14 -6
  27. package/packages/bundled-features/src/tenant-inactivity/constants.ts +4 -1
  28. package/packages/bundled-features/src/tenant-inactivity/handlers/inactivity-state.query.ts +2 -1
  29. package/packages/bundled-features/src/tenant-inactivity/handlers/keep-account.write.ts +2 -1
  30. package/packages/bundled-features/src/tenant-inactivity/options.ts +1 -0
  31. package/packages/bundled-features/src/tenant-inactivity/remote-activity.ts +6 -1
  32. package/packages/bundled-features/src/tenant-inactivity/static-keep-account.ts +37 -0
  33. package/packages/bundled-features/src/tenant-lifecycle/constants.ts +2 -0
  34. package/packages/bundled-features/src/tenant-lifecycle/handlers/cancel-destruction.write.ts +6 -2
  35. package/packages/bundled-features/src/tenant-lifecycle/handlers/request-destruction.write.ts +2 -1
  36. package/packages/bundled-features/src/tenant-lifecycle/index.ts +1 -0
  37. package/packages/bundled-features/src/waitlist/changes.json +6 -0
  38. package/packages/bundled-features/src/waitlist/static-submit.ts +56 -0
  39. package/samples/apps/styleguide/src/features/widgets/i18n.ts +143 -0
  40. package/samples/apps/styleguide/src/features/widgets/web/VariantsDemo.tsx +276 -0
  41. package/samples/apps/styleguide/src/features/widgets/web/Widgets.tsx +3 -0
  42. package/samples/apps/styleguide/src/features/workboard/feature.ts +1 -0
  43. package/samples/apps/use-all-bundled/feature-manifest.json +23 -1
  44. package/samples/apps/use-all-bundled/src/run-config.ts +3 -0
  45. package/samples/recipes/realtime-sse/README.md +1 -0
  46. package/samples/recipes/realtime-sse/package.json +1 -0
  47. package/samples/recipes/realtime-sse/src/feature.ts +9 -0
  48. package/samples/recipes/record-detail-layout/README.md +1 -0
  49. package/samples/recipes/record-detail-layout/src/feature.ts +10 -0
  50. package/samples/recipes/wizard-form/README.md +9 -0
  51. package/samples/recipes/wizard-form/src/feature.ts +13 -2
@@ -275,4 +275,147 @@ export const WIDGETS_I18N = {
275
275
  "widgets:catalog:plan-contact-sales": { de: "Vertrieb kontaktieren", en: "Contact sales" },
276
276
  "widgets:catalog:plan-credits": { de: "Credit-Paket", en: "Credit pack" },
277
277
  "widgets:catalog:plan-buy": { de: "Kaufen", en: "Buy" },
278
+ "widgets:catalog:variants-title": { de: "Neue Varianten", en: "New variants" },
279
+ "widgets:catalog:variants-heading-group": { de: "Gruppen-Überschrift", en: "Group heading" },
280
+ "widgets:catalog:variants-heading-section": {
281
+ de: "Abschnitts-Überschrift",
282
+ en: "Section heading",
283
+ },
284
+ "widgets:catalog:variants-detail-normal": {
285
+ de: "Details mit normalen Werten",
286
+ en: "Details with normal-weight values",
287
+ },
288
+ "widgets:catalog:variants-detail-sidebar": {
289
+ de: "Details in der Seitenspalte",
290
+ en: "Details in a side column",
291
+ },
292
+ "widgets:catalog:variants-label-owner": { de: "Inhaber", en: "Owner" },
293
+ "widgets:catalog:variants-value-owner": { de: "Jamie Rivera", en: "Jamie Rivera" },
294
+ "widgets:catalog:variants-label-region": { de: "Region", en: "Region" },
295
+ "widgets:catalog:variants-value-region": { de: "Frankfurt", en: "Frankfurt" },
296
+ "widgets:catalog:variants-label-plan": { de: "Tarif", en: "Plan" },
297
+ "widgets:catalog:variants-value-plan": { de: "Team", en: "Team" },
298
+ "widgets:catalog:variants-composer": { de: "Chat-Eingabe", en: "Chat composer" },
299
+ "widgets:catalog:variants-composer-placeholder": {
300
+ de: "Nachricht schreiben",
301
+ en: "Write a message",
302
+ },
303
+ "widgets:catalog:variants-composer-send": { de: "Senden", en: "Send" },
304
+ "widgets:catalog:variants-textarea-placeholder": {
305
+ de: "Notiz mit Platzhalter",
306
+ en: "Note with placeholder",
307
+ },
308
+ "widgets:catalog:variants-textarea-hint": {
309
+ de: "Beschreibe kurz, was zu tun ist",
310
+ en: "Describe briefly what needs doing",
311
+ },
312
+ "widgets:catalog:variants-mode-switch": {
313
+ de: "Modus mit gesperrter und markierter Option",
314
+ en: "Mode switch with disabled and flagged option",
315
+ },
316
+ "widgets:catalog:variants-mode-a": { de: "Automatisch", en: "Automatic" },
317
+ "widgets:catalog:variants-mode-b": { de: "Manuell", en: "Manual" },
318
+ "widgets:catalog:variants-mode-c": { de: "Offene Fragen", en: "Open questions" },
319
+ "widgets:catalog:variants-mode-d": { de: "Gesperrt", en: "Locked" },
320
+ "widgets:catalog:variants-section-nav": {
321
+ de: "Abschnittsnavigation für eigene Screens",
322
+ en: "Section navigation for custom screens",
323
+ },
324
+ "widgets:catalog:variants-nav-profile": { de: "Profil", en: "Profile" },
325
+ "widgets:catalog:variants-nav-billing": { de: "Abrechnung", en: "Billing" },
326
+ "widgets:catalog:variants-nav-security": { de: "Sicherheit", en: "Security" },
327
+ "widgets:catalog:variants-nav-body": {
328
+ de: "Die Liste rechts springt zum Abschnitt und folgt dem Scrollen.",
329
+ en: "The list on the right jumps to the section and follows the scroll position.",
330
+ },
331
+ "widgets:catalog:variants-banner": {
332
+ de: "Hinweis mit Symbol und Hervorhebung",
333
+ en: "Banner with icon and emphasis",
334
+ },
335
+ "widgets:catalog:variants-banner-lead": {
336
+ de: "Vor dem Löschen bitte ",
337
+ en: "Before deleting, please ",
338
+ },
339
+ "widgets:catalog:variants-banner-strong": { de: "ein Backup anlegen", en: "create a backup" },
340
+ "widgets:catalog:variants-banner-tail": {
341
+ de: ". Das Löschen ist endgültig.",
342
+ en: ". Deleting is permanent.",
343
+ },
344
+ "widgets:catalog:variants-round2-title": {
345
+ de: "Studio-Varianten, zweite Runde",
346
+ en: "Studio variants, round two",
347
+ },
348
+ "widgets:catalog:variants-choice": {
349
+ de: "Auswahlkarten, drei Spalten, Radio",
350
+ en: "Choice cards, three columns, radio",
351
+ },
352
+ "widgets:catalog:variants-choice-label": { de: "Womit beginnen?", en: "Where to start?" },
353
+ "widgets:catalog:variants-choice-empty": { de: "Leer beginnen", en: "Start empty" },
354
+ "widgets:catalog:variants-choice-empty-desc": {
355
+ de: "Nur Anmeldung und Benutzer",
356
+ en: "Sign-in and users only",
357
+ },
358
+ "widgets:catalog:variants-choice-service": {
359
+ de: "Wartung und Prüfung",
360
+ en: "Service and checks",
361
+ },
362
+ "widgets:catalog:variants-choice-service-desc": {
363
+ de: "Vorlage: Anlagen, Intervalle, Prüfprotokolle",
364
+ en: "Template: assets, intervals, inspection reports",
365
+ },
366
+ "widgets:catalog:variants-choice-guests": { de: "Gästeliste", en: "Guest list" },
367
+ "widgets:catalog:variants-choice-guests-desc": {
368
+ de: "Vorlage: Veranstaltung, Zusage per Link",
369
+ en: "Template: event, RSVP by link",
370
+ },
371
+ "widgets:catalog:variants-mode-wide": {
372
+ de: "Modus mit breiten Segmenten, Warnrahmen um den ganzen Schalter",
373
+ en: "Mode switch with wide segments, warning frame around the whole switch",
374
+ },
375
+ "widgets:catalog:variants-compare": {
376
+ de: "Vergleichstabelle, Zeilenköpfe in Textfarbe",
377
+ en: "Comparison table, row headers in text colour",
378
+ },
379
+ "widgets:catalog:variants-compare-field": { de: "Angabe", en: "Item" },
380
+ "widgets:catalog:variants-compare-left": { de: "Aus dem Dokument", en: "From the document" },
381
+ "widgets:catalog:variants-compare-right": { de: "Im Bestand", en: "In stock" },
382
+ "widgets:catalog:variants-compare-name": { de: "Name", en: "Name" },
383
+ "widgets:catalog:variants-compare-city": { de: "Ort", en: "City" },
384
+ "widgets:catalog:variants-docked": {
385
+ de: "Angedockte Chat-Eingabe",
386
+ en: "Docked chat composer",
387
+ },
388
+ "widgets:catalog:variants-docked-message": {
389
+ de: "Der Verlauf scrollt, die Eingabe bleibt unten sichtbar.",
390
+ en: "The thread scrolls, the composer stays visible at the bottom.",
391
+ },
392
+ "widgets:catalog:variants-banner-below": {
393
+ de: "Hinweis mit Aktion unter dem Text",
394
+ en: "Banner with the action below the text",
395
+ },
396
+ "widgets:catalog:variants-banner-below-title": {
397
+ de: "Veröffentlichen gescheitert",
398
+ en: "Publishing failed",
399
+ },
400
+ "widgets:catalog:variants-banner-below-body": {
401
+ de: "Die Prüfung ist fehlgeschlagen. Bitte erneut versuchen.",
402
+ en: "The check failed. Please try again.",
403
+ },
404
+ "widgets:catalog:variants-banner-below-action": { de: "Erneut versuchen", en: "Try again" },
405
+ "widgets:catalog:variants-rail": {
406
+ de: "Wizard-Leiste: Schritt ohne Untertitel, Hinweis im Kasten",
407
+ en: "Wizard rail: active step without subtitle, hint in the box",
408
+ },
409
+ "widgets:catalog:variants-rail-heading": { de: "Schritt 1 von 2", en: "Step 1 of 2" },
410
+ "widgets:catalog:variants-rail-step-one": { de: "Beschreiben", en: "Describe" },
411
+ "widgets:catalog:variants-rail-step-two": { de: "Steckbrief", en: "Profile" },
412
+ "widgets:catalog:variants-rail-subtitle": {
413
+ de: "Rollen, Funktionen, Personendaten und noch ein langer Zusatz, der umbricht",
414
+ en: "Roles, features, personal data and a long addition that wraps",
415
+ },
416
+ "widgets:catalog:variants-rail-up-next": { de: "Als Nächstes", en: "Up next" },
417
+ "widgets:catalog:variants-rail-hint": {
418
+ de: "Die KI fragt nur nach, was offen ist",
419
+ en: "The AI only asks about what is open",
420
+ },
278
421
  } as const;
@@ -0,0 +1,276 @@
1
+ // Opt-in widget variants, one block each, for screenshot review.
2
+
3
+ import { usePrimitives, useTranslation } from "@cosmicdrift/kumiko-renderer";
4
+ import {
5
+ ChoiceCards,
6
+ Composer,
7
+ DetailList,
8
+ ModeSwitch,
9
+ PageSection,
10
+ SectionCard,
11
+ SectionNavLayout,
12
+ SideBySideTable,
13
+ StepBar,
14
+ TextareaField,
15
+ } from "@cosmicdrift/kumiko-renderer/web";
16
+ import { type ReactNode, useState } from "react";
17
+
18
+ type DemoMode = "auto" | "manual" | "questions" | "locked";
19
+
20
+ type DemoChoice = "empty" | "service" | "guests";
21
+
22
+ export function VariantsRoundTwoDemo(): ReactNode {
23
+ const t = useTranslation();
24
+ const { Heading, Banner, Button, Text } = usePrimitives();
25
+ const [choice, setChoice] = useState<DemoChoice | null>("service");
26
+ const [mode, setMode] = useState<DemoMode>("manual");
27
+ const [message, setMessage] = useState("");
28
+
29
+ return (
30
+ <SectionCard title={t("widgets:catalog:variants-round2-title")} testId="variants-round2-demo">
31
+ <div className="flex flex-col gap-6">
32
+ <div className="flex flex-col gap-2" data-testid="variants-choice">
33
+ <Heading variant="group">{t("widgets:catalog:variants-choice")}</Heading>
34
+ <ChoiceCards
35
+ value={choice}
36
+ onChange={setChoice}
37
+ columns={3}
38
+ variant="radio"
39
+ label={t("widgets:catalog:variants-choice-label")}
40
+ options={[
41
+ {
42
+ value: "empty",
43
+ title: t("widgets:catalog:variants-choice-empty"),
44
+ description: t("widgets:catalog:variants-choice-empty-desc"),
45
+ },
46
+ {
47
+ value: "service",
48
+ title: t("widgets:catalog:variants-choice-service"),
49
+ description: t("widgets:catalog:variants-choice-service-desc"),
50
+ },
51
+ {
52
+ value: "guests",
53
+ title: t("widgets:catalog:variants-choice-guests"),
54
+ description: t("widgets:catalog:variants-choice-guests-desc"),
55
+ },
56
+ ]}
57
+ />
58
+ </div>
59
+
60
+ <div className="flex flex-col gap-2" data-testid="variants-mode-wide">
61
+ <Heading variant="group">{t("widgets:catalog:variants-mode-wide")}</Heading>
62
+ <ModeSwitch
63
+ value={mode}
64
+ onChange={setMode}
65
+ segmentWidth="wide"
66
+ className="w-fit"
67
+ options={[
68
+ { value: "auto", label: t("widgets:catalog:variants-mode-a") },
69
+ { value: "manual", label: t("widgets:catalog:variants-mode-b") },
70
+ { value: "questions", label: t("widgets:catalog:variants-mode-c"), tone: "warning" },
71
+ ]}
72
+ />
73
+ </div>
74
+
75
+ <div className="flex flex-col gap-2" data-testid="variants-compare">
76
+ <Heading variant="group">{t("widgets:catalog:variants-compare")}</Heading>
77
+ <SideBySideTable
78
+ caption={t("widgets:catalog:variants-compare")}
79
+ rowHeaderLabel={t("widgets:catalog:variants-compare-field")}
80
+ rowHeaderTone="foreground"
81
+ columns={[
82
+ { id: "doc", label: t("widgets:catalog:variants-compare-left") },
83
+ { id: "stock", label: t("widgets:catalog:variants-compare-right") },
84
+ ]}
85
+ rows={[
86
+ {
87
+ id: "name",
88
+ header: t("widgets:catalog:variants-compare-name"),
89
+ cells: [{ content: t("widgets:catalog:variants-value-owner"), colSpan: 2 }],
90
+ },
91
+ {
92
+ id: "city",
93
+ header: t("widgets:catalog:variants-compare-city"),
94
+ cells: [{ content: "Frankfurt" }, { content: "Hamburg" }],
95
+ },
96
+ ]}
97
+ />
98
+ </div>
99
+
100
+ <div className="flex flex-col gap-2" data-testid="variants-docked">
101
+ <Heading variant="group">{t("widgets:catalog:variants-docked")}</Heading>
102
+ <div className="h-64 overflow-y-auto rounded-md border border-border">
103
+ <PageSection className="flex min-h-full flex-col">
104
+ {Array.from({ length: 12 }, (_, index) => (
105
+ <Text key={`line-${index.toString()}`} variant="muted">
106
+ {t("widgets:catalog:variants-docked-message")}
107
+ </Text>
108
+ ))}
109
+ <Composer
110
+ docked
111
+ value={message}
112
+ onChange={setMessage}
113
+ onSubmit={() => setMessage("")}
114
+ placeholder={t("widgets:catalog:variants-composer-placeholder")}
115
+ submitLabel={t("widgets:catalog:variants-composer-send")}
116
+ testId="variants-docked-composer"
117
+ />
118
+ </PageSection>
119
+ </div>
120
+ </div>
121
+
122
+ <div className="flex flex-col gap-2" data-testid="variants-banner-below">
123
+ <Heading variant="group">{t("widgets:catalog:variants-banner-below")}</Heading>
124
+ <Banner
125
+ variant="error"
126
+ icon="alert-triangle"
127
+ title={t("widgets:catalog:variants-banner-below-title")}
128
+ actionsPlacement="below"
129
+ actions={
130
+ <Button variant="secondary" size="sm">
131
+ {t("widgets:catalog:variants-banner-below-action")}
132
+ </Button>
133
+ }
134
+ >
135
+ {t("widgets:catalog:variants-banner-below-body")}
136
+ </Banner>
137
+ </div>
138
+
139
+ <div className="flex flex-col gap-2" data-testid="variants-rail">
140
+ <Heading variant="group">{t("widgets:catalog:variants-rail")}</Heading>
141
+ <div className="flex h-96 border border-border">
142
+ <StepBar
143
+ orientation="vertical"
144
+ steps={[
145
+ t("widgets:catalog:variants-rail-step-one"),
146
+ t("widgets:catalog:variants-rail-step-two"),
147
+ ]}
148
+ currentIndex={0}
149
+ compactLabel={t("widgets:catalog:variants-rail-heading")}
150
+ heading={t("widgets:catalog:variants-rail-heading")}
151
+ subtitles={[undefined, t("widgets:catalog:variants-rail-subtitle")]}
152
+ upNext={{
153
+ heading: t("widgets:catalog:variants-rail-up-next"),
154
+ title: t("widgets:catalog:variants-rail-step-two"),
155
+ subtitle: t("widgets:catalog:variants-rail-hint"),
156
+ }}
157
+ testId="variants-rail-steps"
158
+ />
159
+ </div>
160
+ </div>
161
+ </div>
162
+ </SectionCard>
163
+ );
164
+ }
165
+
166
+ export function VariantsDemo(): ReactNode {
167
+ const t = useTranslation();
168
+ const { Heading, Banner } = usePrimitives();
169
+ const [mode, setMode] = useState<DemoMode>("auto");
170
+ const [note, setNote] = useState("");
171
+ const [message, setMessage] = useState("");
172
+
173
+ const detailRows = [
174
+ {
175
+ label: t("widgets:catalog:variants-label-owner"),
176
+ value: t("widgets:catalog:variants-value-owner"),
177
+ },
178
+ {
179
+ label: t("widgets:catalog:variants-label-region"),
180
+ value: t("widgets:catalog:variants-value-region"),
181
+ },
182
+ {
183
+ label: t("widgets:catalog:variants-label-plan"),
184
+ value: t("widgets:catalog:variants-value-plan"),
185
+ },
186
+ ];
187
+
188
+ const navSections = ["profile", "billing", "security"].map((id) => ({
189
+ id: `variants-nav-${id}`,
190
+ title: t(`widgets:catalog:variants-nav-${id}`),
191
+ }));
192
+
193
+ return (
194
+ <SectionCard title={t("widgets:catalog:variants-title")} testId="variants-demo">
195
+ <div className="flex flex-col gap-6">
196
+ <div className="flex flex-col gap-2" data-testid="variants-heading">
197
+ <Heading variant="group">{t("widgets:catalog:variants-heading-group")}</Heading>
198
+ <Heading variant="section">{t("widgets:catalog:variants-heading-section")}</Heading>
199
+ </div>
200
+
201
+ <div className="grid gap-6 md:grid-cols-[1fr_280px]">
202
+ <div data-testid="variants-detail-normal">
203
+ <Heading variant="group">{t("widgets:catalog:variants-detail-normal")}</Heading>
204
+ <DetailList rows={detailRows} valueWeight="normal" />
205
+ </div>
206
+ <div data-testid="variants-detail-sidebar">
207
+ <Heading variant="group">{t("widgets:catalog:variants-detail-sidebar")}</Heading>
208
+ <DetailList rows={detailRows} valueWeight="normal" layout="sidebar" />
209
+ </div>
210
+ </div>
211
+
212
+ <div className="flex flex-col gap-2" data-testid="variants-mode-switch">
213
+ <Heading variant="group">{t("widgets:catalog:variants-mode-switch")}</Heading>
214
+ <ModeSwitch
215
+ value={mode}
216
+ onChange={setMode}
217
+ options={[
218
+ { value: "auto", label: t("widgets:catalog:variants-mode-a") },
219
+ { value: "manual", label: t("widgets:catalog:variants-mode-b") },
220
+ { value: "questions", label: t("widgets:catalog:variants-mode-c"), tone: "warning" },
221
+ { value: "locked", label: t("widgets:catalog:variants-mode-d"), disabled: true },
222
+ ]}
223
+ />
224
+ </div>
225
+
226
+ <div data-testid="variants-banner">
227
+ <Banner
228
+ variant="warning"
229
+ icon="alert-triangle"
230
+ parts={[
231
+ { text: t("widgets:catalog:variants-banner-lead") },
232
+ { text: t("widgets:catalog:variants-banner-strong"), strong: true },
233
+ { text: t("widgets:catalog:variants-banner-tail") },
234
+ ]}
235
+ />
236
+ </div>
237
+
238
+ <TextareaField
239
+ label={t("widgets:catalog:variants-textarea-placeholder")}
240
+ id="variants-textarea"
241
+ name="variants-textarea"
242
+ value={note}
243
+ onChange={setNote}
244
+ placeholder={t("widgets:catalog:variants-textarea-hint")}
245
+ testId="variants-textarea"
246
+ />
247
+
248
+ <div className="flex min-h-40 flex-col" data-testid="variants-composer-host">
249
+ <Heading variant="group">{t("widgets:catalog:variants-composer")}</Heading>
250
+ <Composer
251
+ value={message}
252
+ onChange={setMessage}
253
+ onSubmit={() => setMessage("")}
254
+ placeholder={t("widgets:catalog:variants-composer-placeholder")}
255
+ submitLabel={t("widgets:catalog:variants-composer-send")}
256
+ testId="variants-composer"
257
+ />
258
+ </div>
259
+
260
+ <div className="flex flex-col gap-2" data-testid="variants-section-nav">
261
+ <Heading variant="group">{t("widgets:catalog:variants-section-nav")}</Heading>
262
+ <SectionNavLayout items={navSections} testId="variants-section-nav-layout">
263
+ {navSections.map((section) => (
264
+ <section key={section.id} id={section.id} className="flex flex-col gap-1">
265
+ <Heading variant="group">{section.title}</Heading>
266
+ <p className="text-sm text-muted-foreground">
267
+ {t("widgets:catalog:variants-nav-body")}
268
+ </p>
269
+ </section>
270
+ ))}
271
+ </SectionNavLayout>
272
+ </div>
273
+ </div>
274
+ </SectionCard>
275
+ );
276
+ }
@@ -42,6 +42,7 @@ import { Wallet } from "lucide-react";
42
42
  import { type ReactNode, useEffect, useMemo, useState } from "react";
43
43
  import { euro, percent } from "../lib/format";
44
44
  import { InboxReaderExamples } from "./InboxReaderExamples";
45
+ import { VariantsDemo, VariantsRoundTwoDemo } from "./VariantsDemo";
45
46
 
46
47
  const RESPONSE_TIMES = Array.from({ length: 48 }, (_, i) => ({
47
48
  atMs: i * 30 * 60 * 1000,
@@ -329,6 +330,8 @@ export function Widgets(): ReactNode {
329
330
  <ComparisonDemo />
330
331
  <AiTextDemo />
331
332
  <PlanCatalogDemo />
333
+ <VariantsDemo />
334
+ <VariantsRoundTwoDemo />
332
335
  </div>
333
336
  );
334
337
  }
@@ -133,6 +133,7 @@ export const workboardFeature = defineFeature("workboard", (r) => {
133
133
  searchable: true,
134
134
  facets: { estimateHours: { display: "range" } },
135
135
  table: {
136
+ compactHeader: true,
136
137
  grouping: { field: "status", collapsedWhen: "done", userChoice: true, fields: ["priority"] },
137
138
  totals: [{ field: "estimateHours", kind: "sum" }],
138
139
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "source": "samples/apps/use-all-bundled APP_FEATURES (composeFeatures includeBundled + signup)",
3
- "featureCount": 92,
3
+ "featureCount": 93,
4
4
  "features": [
5
5
  {
6
6
  "name": "account-security",
@@ -2249,6 +2249,28 @@
2249
2249
  "recommended": false
2250
2250
  }
2251
2251
  },
2252
+ {
2253
+ "name": "presence",
2254
+ "description": "Who else is on this record right now: a browser sends a heartbeat every 15 seconds for one row of an allow-listed entity and gets the other viewers and editors back, with a live signal to them on a change. State is ephemeral (Redis hash per tenant, entity and row, in-memory without Redis), keyed by the session tenant, expires after ttlSeconds without a heartbeat and holds user ids only; display names are looked up per response. A caller sees presence only for rows visible to them. Mount with createPresenceFeature({ entities: [\"task\"] }).",
2255
+ "toggleableDefault": null,
2256
+ "requires": [],
2257
+ "optionalRequires": [],
2258
+ "configReads": [],
2259
+ "exposesApis": [],
2260
+ "usesApis": [],
2261
+ "extensionsUsed": [],
2262
+ "configKeys": [],
2263
+ "secrets": [],
2264
+ "writeHandlers": [
2265
+ "presence:write:heartbeat",
2266
+ "presence:write:leave"
2267
+ ],
2268
+ "uiHints": {
2269
+ "displayLabel": "Presence",
2270
+ "category": "communication",
2271
+ "recommended": false
2272
+ }
2273
+ },
2252
2274
  {
2253
2275
  "name": "rate-limiting",
2254
2276
  "description": "Adds an ops-side `rate-limiting:query:status` query handler for inspecting current bucket state; the actual request throttling is wired automatically by the dispatcher when any handler declares a `rateLimit` option (e.g. `{ per: 'user', limit: 3, windowSeconds: 60 }`) or when you pass `context.rateLimit` to `buildServer`. Loading this feature is optional if you only need L3 per-handler rate limits and have no need for ops introspection.",
@@ -74,6 +74,7 @@ import {
74
74
  import { createNotesHistoryFeature } from "@cosmicdrift/kumiko-bundled-features/notes-history";
75
75
  import { createNotesHistoryUserDataFeature } from "@cosmicdrift/kumiko-bundled-features/notes-history-user-data";
76
76
  import { createPersonalAccessTokensFeature } from "@cosmicdrift/kumiko-bundled-features/personal-access-tokens";
77
+ import { createPresenceFeature } from "@cosmicdrift/kumiko-bundled-features/presence";
77
78
  import { createReadinessFeature } from "@cosmicdrift/kumiko-bundled-features/readiness";
78
79
  import { createRendererFoundationFeature } from "@cosmicdrift/kumiko-bundled-features/renderer-foundation";
79
80
  import { createRendererPdfFeature } from "@cosmicdrift/kumiko-bundled-features/renderer-pdf";
@@ -421,6 +422,8 @@ export const APP_FEATURES = [
421
422
  // notes-history: default roles are TenantAdmin/TenantMember; same
422
423
  // SystemAdmin-operator reasoning as tags above.
423
424
  createNotesHistoryFeature({ roles: ["TenantAdmin", "TenantMember", "SystemAdmin"] }),
425
+ // presence: no host entity in this sample opts in, so it only mounts the handlers.
426
+ createPresenceFeature(),
424
427
  // notes-history-user-data: GDPR export/erase coverage for note-entry.
425
428
  // Depends (optionally) on notes-history + (hard) on user-data-rights —
426
429
  // both mounted here.
@@ -6,6 +6,7 @@ Server-sent events — live updates without F5.
6
6
 
7
7
  - Entity writes that fan out over SSE
8
8
  - Client subscription shape for live lists
9
+ - Presence: `createPresenceFeature({ entities: ["message"] })` answers who else has a message open; the heartbeat is a write, the others get an SSE frame addressed to their user id (no names inside)
9
10
 
10
11
  ## Source
11
12
 
@@ -3,6 +3,7 @@
3
3
  "description": "Server-sent events demo. Goodbye F5.",
4
4
  "private": true,
5
5
  "dependencies": {
6
+ "@cosmicdrift/kumiko-bundled-features": "workspace:*",
6
7
  "@cosmicdrift/kumiko-framework": "workspace:*"
7
8
  },
8
9
  "devDependencies": {
@@ -1,3 +1,4 @@
1
+ import { createPresenceFeature } from "@cosmicdrift/kumiko-bundled-features/presence";
1
2
  import {
2
3
  createEntity,
3
4
  createTextField,
@@ -25,3 +26,11 @@ export const chatFeature = defineFeature("chat", (r) => {
25
26
  });
26
27
  r.writeHandler(defineEntityDeleteHandler("message", messageEntity, adminWrite));
27
28
  });
29
+
30
+ // Who else has a message open. The heartbeat is an ordinary write; the others learn about a
31
+ // change through an SSE frame addressed to them (`presence:event:changed`, no names inside),
32
+ // then refetch with `usePresence` / `usePresenceList` on the client.
33
+ export const presenceFeature = createPresenceFeature({
34
+ entities: ["message"],
35
+ roles: ["Admin", "User"],
36
+ });
@@ -9,6 +9,7 @@ header, a metrics band, and a tabbed layout instead of one long stacked form.
9
9
  rendered from the columns of the screen's own query row
10
10
  - `layout.mode: "tabs"` with two `relatedList` tabs (order items, payments)
11
11
  and one `fields` tab (master data) — each `relatedList` runs its own query
12
+ - a header action with `showOnTabs: ["payments"]`, shown only while that tab is active
12
13
  - boot-validator catching two common author mistakes: a `metrics` entry
13
14
  with an empty `label`, and a `tabs` layout with fewer than two
14
15
  sections
@@ -16,6 +16,8 @@
16
16
  // not inside any tab's Card. `inlineActions` keeps download-invoice a visible
17
17
  // button next to it where the page header would otherwise fold it into the menu.
18
18
  //
19
+ // 6. `showOnTabs` limits the record-payment action to the payments tab.
20
+ //
19
21
  // projectionDetail has no entity — it binds to an explicit query instead, so
20
22
  // every field name below (header, metrics, fields) is a column of that
21
23
  // query's row, not an entity field.
@@ -158,6 +160,14 @@ export function createOrderDeskFeature(): FeatureDefinition {
158
160
  screen: "order-detail",
159
161
  icon: "download",
160
162
  },
163
+ {
164
+ kind: "navigate",
165
+ id: "record-payment",
166
+ label: "order-desk.action.recordPayment",
167
+ screen: "order-detail",
168
+ icon: "plus",
169
+ showOnTabs: ["payments"],
170
+ },
161
171
  ],
162
172
  inlineActions: ["download-invoice"],
163
173
  access: { roles: ["Support", "Admin"] },
@@ -24,6 +24,15 @@ the user left off.
24
24
  mounted alongside this one (both enforced at boot). The actual
25
25
  save/resume/discard wiring happens automatically inside `RenderEdit` —
26
26
  this recipe never calls a form-draft handler from its own code.
27
+ - **Step rail texts** — a section's `subtitle` is the line under its step in
28
+ the rail (opt-in, `description` is never used there); `summaryField`
29
+ replaces it with the entered value once the step is done. `wizard.aside`
30
+ adds the "up next" card, and `finishDescription` the finish card on the
31
+ last step. Extension steps take the same three texts; on an `actionForm`
32
+ `summaryField` and `submitDisabledWhen` may name a field of its `fields`.
33
+ - **Footer options** — `wizard.saveAndCloseOnCreate` offers "Save and close" (also on the last step)
34
+ while creating; `wizard.submitDisabledWhen` disables Finish while a field
35
+ condition holds. It is UI-only: enforce the rule in a validation hook too.
27
36
 
28
37
  ## Feature composition
29
38
 
@@ -33,9 +33,20 @@ export const listingsFeature = defineFeature("listings", (r) => {
33
33
  layout: {
34
34
  mode: "wizard",
35
35
  draft: true,
36
+ wizard: {
37
+ aside: { upNext: true, finishDescription: "Publishes the listing." },
38
+ saveAndCloseOnCreate: true,
39
+ // UI-only: the write handler would still accept a vehicle listing.
40
+ submitDisabledWhen: { field: "category", eq: "vehicles" },
41
+ },
36
42
  sections: [
37
- { title: "Basics", fields: ["title", "category"] },
38
- { title: "Pricing", fields: ["price", "condition"] },
43
+ {
44
+ title: "Basics",
45
+ subtitle: "Title and category",
46
+ summaryField: "title",
47
+ fields: ["title", "category"],
48
+ },
49
+ { title: "Pricing", subtitle: "Price and condition", fields: ["price", "condition"] },
39
50
  {
40
51
  kind: "extension",
41
52
  title: "Review",