@cosmicdrift/kumiko-renderer 0.414.0 → 0.416.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 (209) hide show
  1. package/dist/app/action-form-body.d.ts +1 -1
  2. package/dist/app/action-form-body.js +43 -16
  3. package/dist/app/action-form-support.d.ts +4 -1
  4. package/dist/app/action-form-support.js +8 -4
  5. package/dist/app/client-actions.js +6 -4
  6. package/dist/app/config-edit-body.js +13 -4
  7. package/dist/app/entity-list-screen.js +12 -9
  8. package/dist/app/extension-sections.d.ts +2 -0
  9. package/dist/app/list-facets.d.ts +1 -0
  10. package/dist/app/list-facets.js +10 -1
  11. package/dist/app/named-filter-facet.d.ts +0 -1
  12. package/dist/app/named-filter-facet.js +19 -10
  13. package/dist/app/projection-detail-body.js +8 -6
  14. package/dist/app/projection-detail-guidance-data.js +3 -1
  15. package/dist/app/projection-detail-guidance.d.ts +1 -1
  16. package/dist/app/projection-detail-guidance.js +45 -33
  17. package/dist/app/projection-detail-header-model.d.ts +1 -1
  18. package/dist/app/projection-detail-header-model.js +10 -5
  19. package/dist/app/projection-detail-header.js +5 -4
  20. package/dist/app/projection-detail-navigation.d.ts +6 -0
  21. package/dist/app/projection-detail-navigation.js +18 -4
  22. package/dist/app/screen-access.js +1 -2
  23. package/dist/app/screen-shared.d.ts +1 -0
  24. package/dist/app/screen-shared.js +23 -3
  25. package/dist/app/use-entity-list-payload.d.ts +2 -1
  26. package/dist/app/use-entity-list-payload.js +4 -2
  27. package/dist/app/use-projection-detail-actions.d.ts +14 -0
  28. package/dist/app/use-projection-detail-actions.js +40 -16
  29. package/dist/app/use-projection-detail-data.d.ts +2 -0
  30. package/dist/app/use-projection-detail-data.js +37 -10
  31. package/dist/app/use-row-decoration.d.ts +6 -4
  32. package/dist/app/use-row-decoration.js +67 -19
  33. package/dist/app/use-screen-list-rows.js +1 -1
  34. package/dist/card-options.d.ts +25 -0
  35. package/dist/card-options.js +1 -0
  36. package/dist/components/ai-assist-payload.d.ts +2 -0
  37. package/dist/components/ai-assist-payload.js +8 -0
  38. package/dist/components/edit-mounts.d.ts +3 -2
  39. package/dist/components/edit-mounts.js +2 -2
  40. package/dist/components/list-empty-state.d.ts +5 -0
  41. package/dist/components/list-empty-state.js +17 -1
  42. package/dist/components/multi-select-chips.d.ts +10 -0
  43. package/dist/components/multi-select-chips.js +18 -0
  44. package/dist/components/related-list-section.js +44 -32
  45. package/dist/components/related-photo-grid.d.ts +11 -0
  46. package/dist/components/related-photo-grid.js +40 -0
  47. package/dist/components/render-edit-action-button.d.ts +2 -2
  48. package/dist/components/render-edit-field-grid.js +3 -3
  49. package/dist/components/render-edit-header-actions.d.ts +2 -1
  50. package/dist/components/render-edit-header-actions.js +18 -1
  51. package/dist/components/render-edit-layout.js +2 -2
  52. package/dist/components/render-edit-logic.js +1 -0
  53. package/dist/components/render-edit-section-kinds.js +11 -0
  54. package/dist/components/render-edit-types.d.ts +11 -1
  55. package/dist/components/render-field-ai-assist.d.ts +13 -0
  56. package/dist/components/render-field-ai-assist.js +89 -0
  57. package/dist/components/render-field-choice-inputs.js +4 -0
  58. package/dist/components/render-field-control.d.ts +1 -1
  59. package/dist/components/render-field-control.js +18 -8
  60. package/dist/components/render-field-value-chips.d.ts +9 -0
  61. package/dist/components/render-field-value-chips.js +45 -0
  62. package/dist/components/render-field-write-only.js +12 -4
  63. package/dist/components/render-list-hint-columns.d.ts +2 -0
  64. package/dist/components/render-list-hint-columns.js +23 -0
  65. package/dist/components/render-list-toolbar-model.d.ts +2 -2
  66. package/dist/components/use-render-edit-sections.js +5 -1
  67. package/dist/components/use-render-list-columns.js +3 -3
  68. package/dist/context/screen-focus-context.d.ts +1 -1
  69. package/dist/context/screen-focus-context.js +3 -3
  70. package/dist/data-table-facet-types.d.ts +4 -0
  71. package/dist/headless/format/index.d.ts +1 -0
  72. package/dist/headless/format/index.js +20 -0
  73. package/dist/headless/format/phone.d.ts +1 -0
  74. package/dist/headless/format/phone.js +8 -0
  75. package/dist/headless/format/relative-time.d.ts +13 -0
  76. package/dist/headless/format/relative-time.js +60 -0
  77. package/dist/headless/format/safe-locale.d.ts +1 -0
  78. package/dist/headless/format/safe-locale.js +13 -0
  79. package/dist/headless/index.d.ts +3 -3
  80. package/dist/headless/index.js +3 -3
  81. package/dist/headless/pwa-service-worker-meta.d.ts +3 -0
  82. package/dist/headless/pwa-service-worker-meta.js +10 -0
  83. package/dist/headless/view-model/edit.d.ts +3 -2
  84. package/dist/headless/view-model/edit.js +78 -2
  85. package/dist/headless/view-model/field-text.d.ts +9 -0
  86. package/dist/headless/view-model/field-text.js +19 -0
  87. package/dist/headless/view-model/index.d.ts +1 -0
  88. package/dist/headless/view-model/index.js +1 -0
  89. package/dist/headless/view-model/types.d.ts +33 -3
  90. package/dist/i18n-defaults.js +4 -1
  91. package/dist/index.d.ts +1 -1
  92. package/dist/metric-types.d.ts +2 -0
  93. package/dist/primitives-record-guidance.d.ts +30 -1
  94. package/dist/primitives.d.ts +17 -27
  95. package/dist/web/app/dashboard-body.js +3 -2
  96. package/dist/web/app/dashboard-header.js +1 -1
  97. package/dist/web/app/dashboard-list-panel.js +9 -13
  98. package/dist/web/app/dashboard-panel-columns.d.ts +9 -0
  99. package/dist/web/app/dashboard-panel-columns.js +14 -0
  100. package/dist/web/app/dashboard-panels.d.ts +1 -0
  101. package/dist/web/app/dashboard-panels.js +9 -7
  102. package/dist/web/app/dashboard-reference-list-table.js +1 -0
  103. package/dist/web/app/dashboard-shared.js +3 -2
  104. package/dist/web/app/dashboard-stat-group-panel.d.ts +1 -0
  105. package/dist/web/app/dashboard-stat-group-panel.js +22 -8
  106. package/dist/web/app/dashboard-text-panel.d.ts +1 -0
  107. package/dist/web/app/dashboard-text-panel.js +18 -12
  108. package/dist/web/app/relative-time.d.ts +0 -5
  109. package/dist/web/app/relative-time.js +1 -20
  110. package/dist/web/drawn-icons.d.ts +6 -0
  111. package/dist/web/drawn-icons.js +30 -0
  112. package/dist/web/icons.js +6 -5
  113. package/dist/web/index.d.ts +2 -0
  114. package/dist/web/index.js +2 -0
  115. package/dist/web/layout/default-app-shell.js +3 -3
  116. package/dist/web/layout/nav-collapse-state.d.ts +2 -0
  117. package/dist/web/layout/nav-collapse-state.js +10 -0
  118. package/dist/web/layout/nav-tree.js +46 -23
  119. package/dist/web/layout/notification-bell.d.ts +7 -2
  120. package/dist/web/layout/notification-bell.js +16 -5
  121. package/dist/web/layout/shell-focus.d.ts +2 -2
  122. package/dist/web/layout/shell-focus.js +7 -3
  123. package/dist/web/layout/shell-header.d.ts +2 -1
  124. package/dist/web/layout/shell-header.js +56 -27
  125. package/dist/web/layout/shell-style.d.ts +3 -0
  126. package/dist/web/layout/shell-style.js +6 -0
  127. package/dist/web/layout/workspace-shell.d.ts +11 -1
  128. package/dist/web/layout/workspace-shell.js +6 -4
  129. package/dist/web/primitives/banner.d.ts +1 -1
  130. package/dist/web/primitives/banner.js +19 -9
  131. package/dist/web/primitives/card.js +18 -8
  132. package/dist/web/primitives/data-table/actions-column.d.ts +1 -1
  133. package/dist/web/primitives/data-table/actions-column.js +3 -1
  134. package/dist/web/primitives/data-table/card-body.d.ts +1 -1
  135. package/dist/web/primitives/data-table/card-body.js +11 -6
  136. package/dist/web/primitives/data-table/card-row.js +27 -18
  137. package/dist/web/primitives/data-table/data-cell-props.d.ts +2 -0
  138. package/dist/web/primitives/data-table/data-cell-props.js +2 -0
  139. package/dist/web/primitives/data-table/hint-cell.d.ts +1 -3
  140. package/dist/web/primitives/data-table/hint-cell.js +4 -10
  141. package/dist/web/primitives/data-table/row-click-guard.d.ts +2 -0
  142. package/dist/web/primitives/data-table/row-click-guard.js +19 -0
  143. package/dist/web/primitives/data-table/row-render-parts.d.ts +1 -1
  144. package/dist/web/primitives/data-table/row-render-parts.js +3 -2
  145. package/dist/web/primitives/data-table/sort-options-select.js +3 -3
  146. package/dist/web/primitives/data-table/table-body.js +2 -1
  147. package/dist/web/primitives/data-table/table-content.js +10 -6
  148. package/dist/web/primitives/data-table/table-view.js +8 -3
  149. package/dist/web/primitives/data-table/toolbar.d.ts +2 -0
  150. package/dist/web/primitives/data-table/toolbar.js +44 -9
  151. package/dist/web/primitives/data-table/totals-footer.js +4 -3
  152. package/dist/web/primitives/data-table-cell.d.ts +4 -1
  153. package/dist/web/primitives/data-table-cell.js +60 -20
  154. package/dist/web/primitives/default-form.js +6 -3
  155. package/dist/web/primitives/drawer.js +5 -1
  156. package/dist/web/primitives/facet-filter.d.ts +1 -1
  157. package/dist/web/primitives/facet-filter.js +16 -8
  158. package/dist/web/primitives/facet-search-filter.d.ts +2 -1
  159. package/dist/web/primitives/facet-search-filter.js +3 -2
  160. package/dist/web/primitives/facet-trigger-label.d.ts +8 -0
  161. package/dist/web/primitives/facet-trigger-label.js +9 -0
  162. package/dist/web/primitives/file-view-action.js +4 -1
  163. package/dist/web/primitives/form-footer-parts.js +4 -1
  164. package/dist/web/primitives/form.js +6 -8
  165. package/dist/web/primitives/index.js +4 -0
  166. package/dist/web/primitives/layout-elements.d.ts +1 -1
  167. package/dist/web/primitives/layout-elements.js +3 -3
  168. package/dist/web/primitives/locale-number.d.ts +0 -1
  169. package/dist/web/primitives/locale-number.js +1 -13
  170. package/dist/web/primitives/metric.js +17 -5
  171. package/dist/web/primitives/money-input.js +2 -1
  172. package/dist/web/primitives/narrow-pinned-footer.js +7 -3
  173. package/dist/web/primitives/number-input.js +2 -1
  174. package/dist/web/primitives/page-header.js +3 -2
  175. package/dist/web/primitives/pager.d.ts +3 -2
  176. package/dist/web/primitives/pager.js +16 -20
  177. package/dist/web/primitives/photo-grid.d.ts +3 -0
  178. package/dist/web/primitives/photo-grid.js +5 -0
  179. package/dist/web/primitives/record-breadcrumb.js +1 -1
  180. package/dist/web/primitives/record-steps.d.ts +1 -1
  181. package/dist/web/primitives/record-steps.js +11 -6
  182. package/dist/web/primitives/record-summary.d.ts +1 -1
  183. package/dist/web/primitives/record-summary.js +8 -3
  184. package/dist/web/primitives/segmented-select.js +6 -3
  185. package/dist/web/primitives/step-list.d.ts +3 -0
  186. package/dist/web/primitives/step-list.js +11 -0
  187. package/dist/web/primitives/tabs.js +6 -1
  188. package/dist/web/pwa/pwa-support.js +19 -1
  189. package/dist/web/ui/sidebar.d.ts +2 -1
  190. package/dist/web/ui/sidebar.js +4 -3
  191. package/dist/web/widgets/ai-text-field.js +3 -2
  192. package/dist/web/widgets/dashboard-list-cards.js +6 -14
  193. package/dist/web/widgets/dashboard-list.d.ts +10 -0
  194. package/dist/web/widgets/dashboard-list.js +36 -10
  195. package/dist/web/widgets/drawer-panel-class.d.ts +1 -0
  196. package/dist/web/widgets/drawer-panel-class.js +9 -1
  197. package/dist/web/widgets/drawer.js +2 -2
  198. package/dist/web/widgets/pdf-viewer-toolbar.js +3 -2
  199. package/dist/web/widgets/sheet-parts.js +3 -1
  200. package/dist/web/widgets/stat-box-cell.js +1 -1
  201. package/dist/web/widgets/stat.d.ts +7 -1
  202. package/dist/web/widgets/stat.js +12 -4
  203. package/dist/web/widgets/step-list-row.d.ts +4 -0
  204. package/dist/web/widgets/step-list-row.js +22 -14
  205. package/dist/web/widgets/step-list.d.ts +12 -4
  206. package/dist/web/widgets/step-list.js +38 -20
  207. package/package.json +5 -5
  208. package/src/changes.json +126 -0
  209. package/src/web/styles.css +6 -0
@@ -10,20 +10,26 @@ import { useStepFold } from "./step-list-fit.js";
10
10
  import { StepActionButton, StepRow, } from "./step-list-row.js";
11
11
  import { resolveStepSelection, toggleAllStepSelection, toggleStepSelection, } from "./step-list-selection.js";
12
12
  function selectionFooterActions(selection, summary, t) {
13
- return selection.actions.map((action) => ({
14
- id: action.id,
15
- label: t("kumiko.widget.step-list.actionWithCount", {
16
- label: action.label,
17
- count: summary.selectedCount,
18
- }),
19
- onClick: () => action.onClick(summary.effectiveIds),
20
- variant: action.variant,
21
- disabled: action.disabled,
22
- pending: action.pending,
23
- }));
13
+ const count = summary.selectedCount;
14
+ return selection.actions.map((action) => {
15
+ const ignoresSelection = action.ignoresSelection === true;
16
+ const label = ignoresSelection
17
+ ? action.label
18
+ : action.labelForCount !== undefined
19
+ ? action.labelForCount(count)
20
+ : t("kumiko.widget.step-list.actionWithCount", { label: action.label, count });
21
+ return {
22
+ id: action.id,
23
+ label,
24
+ onClick: () => action.onClick(summary.effectiveIds),
25
+ variant: action.variant,
26
+ disabled: action.disabled === true || (!ignoresSelection && count === 0),
27
+ pending: action.pending,
28
+ };
29
+ });
24
30
  }
25
31
  /** Ordered plan of steps with status icons, progress header and per-step actions. */
26
- export function StepList({ title, subtitle, status, steps, footerActions, collapsedAfter, collapseWhen = "always", surface = "ai", fill = false, progress = "full", emptyContent, selection, phoneCard = false, testId = "step-list", }) {
32
+ export function StepList({ title, subtitle, status, steps, footerActions, footerNote, collapsedAfter, collapseWhen = "always", surface = "ai", fill = false, progress = "full", emptyContent, selection, phoneCard = false, testId = "step-list", }) {
27
33
  const [expanded, setExpanded] = useState(false);
28
34
  const { total, done } = countProgress(steps);
29
35
  const { visibleSteps, hiddenCount, listRef } = useStepFolding({
@@ -36,7 +42,8 @@ export function StepList({ title, subtitle, status, steps, footerActions, collap
36
42
  const { summary, footer, selectionFooterActive } = model;
37
43
  return (_jsxs("section", { "aria-label": title, "data-testid": testId, className: cn(
38
44
  // Px on phones: an app may shrink its root font for desktop density, the phone reading size stays.
39
- "flex min-h-0 flex-col text-sm max-md:text-[14px]", fill && "h-full", surface === "ai" && "bg-ai-surface", phoneCard && "max-md:rounded-md max-md:p-3"), children: [_jsx(StepListHeader, { title: title, subtitle: subtitle, status: status, progress: progress, done: done, total: total, phoneCard: phoneCard, testId: testId }), _jsx(SelectAllSection, { steps: steps, selection: selection, summary: summary, phoneCard: phoneCard }), steps.length === 0 ? (emptyContent) : (_jsx(StepListRows, { steps: steps, visibleSteps: visibleSteps, hiddenCount: hiddenCount, listRef: listRef, selection: selection, summary: summary, phoneCard: phoneCard, onExpand: () => setExpanded(true), testId: testId })), _jsx(StepListFooter, { footer: footer, selectionActive: selectionFooterActive })] }));
45
+ "flex min-h-0 flex-col text-sm max-md:text-[14px]", fill && "h-full", surface === "ai" && "bg-ai-surface", phoneCard && "max-md:rounded-md max-md:p-3", selection?.compact === true &&
46
+ "overflow-hidden rounded-lg border border-border bg-card max-md:p-0"), children: [_jsx(StepListHeader, { title: title, subtitle: subtitle, status: status, progress: progress, done: done, total: total, phoneCard: phoneCard, compact: selection?.compact === true, testId: testId }), _jsx(SelectAllSection, { steps: steps, selection: selection, summary: summary, phoneCard: phoneCard }), steps.length === 0 ? (emptyContent) : (_jsx(StepListRows, { steps: steps, visibleSteps: visibleSteps, hiddenCount: hiddenCount, listRef: listRef, selection: selection, summary: summary, phoneCard: phoneCard, onExpand: () => setExpanded(true), testId: testId })), _jsx(StepListFooter, { footer: footer, note: footerNote, selectionActive: selectionFooterActive, compact: selection?.compact === true })] }));
40
47
  }
41
48
  function countProgress(steps) {
42
49
  return {
@@ -60,7 +67,9 @@ function useStepFolding(input) {
60
67
  function useSelectionModel(steps, selection, footerActions) {
61
68
  const t = useTranslation();
62
69
  const summary = selection === undefined ? undefined : resolveStepSelection(steps, selection.selectedIds);
63
- if (selection !== undefined && summary !== undefined && summary.selectedCount > 0) {
70
+ if (selection !== undefined &&
71
+ summary !== undefined &&
72
+ (summary.selectedCount > 0 || selection.compact === true)) {
64
73
  return {
65
74
  summary,
66
75
  footer: selectionFooterActions(selection, summary, t),
@@ -72,12 +81,15 @@ function useSelectionModel(steps, selection, footerActions) {
72
81
  function SelectAllSection({ steps, selection, summary, phoneCard, }) {
73
82
  if (selection === undefined || summary === undefined || steps.length === 0)
74
83
  return null;
84
+ if (selection.compact === true)
85
+ return null;
75
86
  return (_jsx(SelectAllRow, { summary: summary, phoneCard: phoneCard, onToggle: () => selection.onSelectionChange(toggleAllStepSelection(steps, selection.selectedIds)) }));
76
87
  }
77
88
  function rowSelectionFor(step, steps, selection, summary) {
78
89
  if (selection === undefined || summary === undefined)
79
90
  return undefined;
80
91
  return {
92
+ ...(selection.compact === true && { compact: true }),
81
93
  state: summary.states.get(step.id) ?? { kind: "none" },
82
94
  onToggle: () => selection.onSelectionChange(toggleStepSelection(steps, selection.selectedIds, step.id)),
83
95
  };
@@ -86,18 +98,22 @@ function StepListRows({ steps, visibleSteps, hiddenCount, listRef, selection, su
86
98
  const t = useTranslation();
87
99
  const { Button } = usePrimitives();
88
100
  return (_jsxs("ol", { ref: listRef, className: cn("m-0 min-h-0 grow list-none overflow-y-auto p-0", phoneCard &&
89
- "max-md:rounded-md max-md:border max-md:border-border max-md:bg-card max-md:[&>li:last-child]:border-b-0 max-md:[&>li]:px-3 max-md:[&>li]:py-2.5", selection !== undefined && phoneCard && "max-md:rounded-t-none"), children: [visibleSteps.map((step) => {
101
+ "max-md:rounded-md max-md:border max-md:border-border max-md:bg-card max-md:[&>li:last-child]:border-b-0 max-md:[&>li]:px-3 max-md:[&>li]:py-2.5", selection !== undefined && phoneCard && "max-md:rounded-t-none", selection?.compact === true && "border-t border-border-row [&>li:last-child]:border-b-0"), children: [visibleSteps.map((step) => {
90
102
  const rowSelection = rowSelectionFor(step, steps, selection, summary);
91
103
  return (_jsx(StepRow, { step: step, phoneCard: phoneCard, ...(rowSelection !== undefined && { selection: rowSelection }) }, step.id));
92
104
  }), hiddenCount > 0 && (_jsx("li", { className: "px-4 py-3", children: _jsx(Button, { variant: "link", size: "sm", className: "text-[13px] font-normal text-foreground-secondary hover:text-foreground", onClick: onExpand, testId: `${testId}-more`, children: t("kumiko.widget.step-list.moreSteps", { count: hiddenCount }) }) }))] }));
93
105
  }
94
- function StepListFooter({ footer, selectionActive, }) {
95
- if (footer.length === 0)
106
+ function StepListFooter({ footer, note, selectionActive, compact, }) {
107
+ if (footer.length === 0 && note === undefined)
96
108
  return null;
109
+ const noteLine = note !== undefined && (_jsx("p", { className: "m-0 w-full text-[11.5px] text-muted-foreground", "data-testid": "step-list-note", children: note }));
110
+ if (compact) {
111
+ return (_jsxs("div", { className: "flex shrink-0 flex-wrap items-center gap-2 border-t border-border px-3 py-2.5", children: [footer.map((action) => (_jsx(StepActionButton, { action: action, className: "h-[26px] px-[9px] text-[12.5px] max-md:text-[12.5px]" }, action.id))), noteLine] }));
112
+ }
97
113
  const leading = footer.filter((action) => action.variant === "ghost");
98
114
  const trailing = footer.filter((action) => action.variant !== "ghost");
99
115
  const phoneHeight = selectionActive ? "max-md:h-11" : undefined;
100
- return (_jsxs("div", { className: "flex shrink-0 items-center gap-2 border-t border-border px-4 py-2.5", children: [leading.map((action) => (_jsx(StepActionButton, { action: action, className: phoneHeight }, action.id))), _jsx("div", { className: cn("grow", selectionActive && "max-md:hidden") }), trailing.map((action) => (_jsx(StepActionButton, { action: action, className: cn(phoneHeight, selectionActive && "max-md:grow max-md:justify-center") }, action.id)))] }));
116
+ return (_jsxs("div", { className: cn("flex shrink-0 items-center gap-2 border-t border-border px-4 py-2.5", note !== undefined && "flex-wrap"), children: [leading.map((action) => (_jsx(StepActionButton, { action: action, className: phoneHeight }, action.id))), _jsx("div", { className: cn("grow", selectionActive && "max-md:hidden") }), trailing.map((action) => (_jsx(StepActionButton, { action: action, className: cn(phoneHeight, selectionActive && "max-md:grow max-md:justify-center") }, action.id))), noteLine] }));
101
117
  }
102
118
  function SelectAllRow({ summary, phoneCard, onToggle, }) {
103
119
  const t = useTranslation();
@@ -115,7 +131,9 @@ function SelectAllRow({ summary, phoneCard, onToggle, }) {
115
131
  return (_jsxs("div", { className: cn("flex shrink-0 items-center gap-2.5 border-b border-border bg-card/60 px-4 py-2", phoneCard &&
116
132
  "max-md:rounded-t-md max-md:border max-md:border-b-0 max-md:bg-card max-md:px-3"), "data-testid": "step-list-select-all", children: [_jsx(Checkbox, { "aria-label": t("kumiko.widget.step-list.selectAll"), checked: checked, disabled: !summary.hasSelectableSteps, onCheckedChange: onToggle }), _jsx("span", { className: "text-[13px] font-medium", children: t("kumiko.widget.step-list.selectAll") }), _jsxs("span", { className: "grow text-right text-[13px] text-muted-foreground", children: [countText, missingText] })] }));
117
133
  }
118
- function StepListHeader({ title, subtitle, status, progress, done, total, phoneCard, testId, }) {
134
+ function StepListHeader({ title, subtitle, status, progress, done, total, phoneCard, compact, testId, }) {
119
135
  const t = useTranslation();
120
- return (_jsxs("div", { className: cn("flex shrink-0 flex-col gap-2 border-b border-border px-4 pb-3 pt-3.5", phoneCard && "max-md:border-b-0 max-md:px-0 max-md:pb-1.5 max-md:pt-0"), children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("h3", { className: "m-0 grow text-[15px] font-semibold", children: title }), status !== undefined && (_jsx(StatusBadge, { tone: status.tone, testId: `${testId}-status`, children: status.label })), progress !== "none" && (_jsx("span", { className: "text-[13px] text-muted-foreground", "data-testid": `${testId}-progress`, children: t("kumiko.widget.step-list.progress", { done, total }) }))] }), subtitle !== undefined && (_jsx("p", { className: "m-0 text-[13px] text-foreground-secondary", "data-testid": `${testId}-subtitle`, children: subtitle })), progress === "full" && (_jsx("div", { className: cn(phoneCard && "max-md:hidden"), children: _jsx(ProgressBar, { size: "thin", value: total === 0 ? 0 : done / total, ariaLabel: t("kumiko.widget.step-list.progressLabel") }) }))] }));
136
+ return (_jsxs("div", { className: cn("flex shrink-0 flex-col gap-2 border-b border-border px-4 pb-3 pt-3.5", phoneCard && "max-md:border-b-0 max-md:px-0 max-md:pb-1.5 max-md:pt-0", compact && "border-b-0 bg-muted px-3 py-2.5 max-md:px-3 max-md:py-2.5"), children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("h3", { className: cn("m-0 grow text-[15px] font-semibold", compact && "text-[13px]"), children: title }), status !== undefined && (_jsx(StatusBadge, { tone: status.tone, testId: `${testId}-status`, children: status.label })), progress !== "none" && (_jsx("span", { className: cn("text-[13px] text-muted-foreground", compact && "text-xs"), "data-testid": `${testId}-progress`, children: progress === "total"
137
+ ? t(pluralKey("kumiko.widget.step-list.total", total), { count: total })
138
+ : t("kumiko.widget.step-list.progress", { done, total }) }))] }), subtitle !== undefined && (_jsx("p", { className: "m-0 text-[13px] text-foreground-secondary", "data-testid": `${testId}-subtitle`, children: subtitle })), progress === "full" && (_jsx("div", { className: cn(phoneCard && "max-md:hidden"), children: _jsx(ProgressBar, { size: "thin", value: total === 0 ? 0 : done / total, ariaLabel: t("kumiko.widget.step-list.progressLabel") }) }))] }));
121
139
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-renderer",
3
- "version": "0.414.0",
3
+ "version": "0.416.0",
4
4
  "description": "React renderer for Kumiko screens. The root export holds the platform-agnostic logic (primitives contract, hooks, KumikoScreen, navigation and SSE abstractions); ./headless the DOM-free UI logic, ./live the HTTP dispatcher, ./web the browser bindings (HTML primitives, history navigation, EventSource live events, createKumikoApp).",
5
5
  "license": "MIT",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -48,8 +48,8 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@cosmicdrift/kumiko-framework": "0.414.0",
52
- "@cosmicdrift/kumiko-types": "0.414.0",
51
+ "@cosmicdrift/kumiko-framework": "0.416.0",
52
+ "@cosmicdrift/kumiko-types": "0.416.0",
53
53
  "@types/qrcode": "^1.5.6",
54
54
  "class-variance-authority": "^0.7.1",
55
55
  "clsx": "^2.1.1",
@@ -79,8 +79,8 @@
79
79
  }
80
80
  },
81
81
  "devDependencies": {
82
- "@cosmicdrift/kumiko-locale-de": "0.414.0",
83
- "@cosmicdrift/kumiko-testing": "0.414.0",
82
+ "@cosmicdrift/kumiko-locale-de": "0.416.0",
83
+ "@cosmicdrift/kumiko-testing": "0.416.0",
84
84
  "@tailwindcss/cli": "^4.3.3",
85
85
  "@testing-library/react": "^16.3.3",
86
86
  "@testing-library/user-event": "^14.6.8",
package/src/changes.json CHANGED
@@ -1,4 +1,130 @@
1
1
  [
2
+ {
3
+ "version": "0.416.0",
4
+ "type": "fix",
5
+ "title": "projectionDetail on a phone keeps metrics above the tabs and start-aligned footer actions visible",
6
+ "detail": "With `metricsPlacement: { narrow: \"after-guidance\" }` the metrics and tabs stay above the tab content on a phone. `footerActions` that mix an `align: \"start\"` action with others stay in the pinned footer instead of folding into the \"…\" menu; the start group fills the row."
7
+ },
8
+ {
9
+ "version": "0.416.0",
10
+ "type": "improvement",
11
+ "title": "relativeTime options style, withTime, absoluteAfterDays, timeZone",
12
+ "detail": "A column renderer or metric format { format: \"relativeTime\" } accepts style \"short\" (41 min. ago), withTime (yesterday, 10:18 and the absolute date with the clock time), absoluteAfterDays n (absolute date such as 29 Oct 2026 from n days on) and timeZone. Boot validation rejects a bad style, a non-integer absoluteAfterDays below 1 and a non-boolean withTime. Without options the text is unchanged."
13
+ },
14
+ {
15
+ "version": "0.416.0",
16
+ "type": "fix",
17
+ "title": "projectionDetail metrics format relativeTime in the UI locale",
18
+ "detail": "A metric with format { format: \"relativeTime\" } fell back to the browser language (\"42 minutes ago\" in a German UI). The metric now passes the UI locale, unless the format sets its own locale."
19
+ },
20
+ {
21
+ "version": "0.416.0",
22
+ "type": "fix",
23
+ "title": "Inline card meta wraps instead of truncating equal-width columns",
24
+ "detail": "On phones, narrowInline list columns sit in a wrapping row with natural widths; only a single over-long element is truncated."
25
+ },
26
+ {
27
+ "version": "0.416.0",
28
+ "type": "fix",
29
+ "title": "Banner actions wrap below the text on phones",
30
+ "detail": "A banner with actions (such as the projectionDetail banner) squeezed its text into a narrow column next to the buttons on phone widths. Below sm the row now wraps: the text keeps the line and the actions take their own line. Desktop is unchanged."
31
+ },
32
+ {
33
+ "version": "0.416.0",
34
+ "type": "fix",
35
+ "title": "relativeTime counts calendar days and falls back to the browser language",
36
+ "detail": "\"Yesterday\" and the day count now come from calendar days in the format's timeZone (default: the runtime zone) instead of rounded hours, so a value from the day before yesterday no longer reads \"yesterday, 22:00\" shortly after midnight. Without a locale the format used en-US instead of the browser language."
37
+ },
38
+ {
39
+ "version": "0.416.0",
40
+ "type": "fix",
41
+ "title": "Read-only settings fields offer no reset button",
42
+ "detail": "A configEdit field marked readOnly in the layout (including keys with mask.readOnly) no longer shows the \"reset override\" button in its cascade display."
43
+ },
44
+ {
45
+ "version": "0.416.0",
46
+ "type": "fix",
47
+ "title": "Row click ignores controls inside custom cells and portaled content",
48
+ "detail": "A list with a row click opened the row when a button, link or input inside a custom cell was clicked, and also on clicks inside a drawer or menu portaled from that row. Those clicks now stay with their control."
49
+ },
50
+ {
51
+ "version": "0.416.0",
52
+ "type": "improvement",
53
+ "title": "Column format relativeTime",
54
+ "detail": "A list column with renderer { format: \"relativeTime\" } shows an ISO timestamp or epoch ms as \"5 minutes ago\" in the user locale. The text is computed at render time and does not tick."
55
+ },
56
+ {
57
+ "version": "0.415.0",
58
+ "type": "fix",
59
+ "title": "Card meta limit counts lines, projection list facets honour narrowPlacement",
60
+ "detail": "The boot rule `list/card-meta-overflow` counted every meta column, so a run of `narrowInline` columns that the card draws on one line failed the boot. It now counts lines. `ListFacetSpec` takes `narrowPlacement`, so a facet of a projection list can open behind the filter icon on a phone, as on entity lists."
61
+ },
62
+ {
63
+ "version": "0.415.0",
64
+ "type": "fix",
65
+ "title": "Bottom drawers stay docked on narrow viewports",
66
+ "detail": "Below the narrow breakpoint every Drawer went full-screen and ignored `side`. With `side=\"bottom\"` the panel now stays at the bottom edge with the dimmed page behind it. Other sides keep the full-screen layout."
67
+ },
68
+ {
69
+ "version": "0.415.0",
70
+ "type": "fix",
71
+ "title": "detail pages show one h1 at a time, stat warn tone uses status-warn",
72
+ "detail": "DefaultPageHeader sets the bodyTitle flag in a layout effect, so the shell breadcrumb no longer paints its own h1 next to the page's h1 under a slow CPU. The `warn` tone of StatCard, StatStripCell and MiniStat used the destructive color; it now uses `status-warn` and `status-warn-surface` like the other widgets."
73
+ },
74
+ {
75
+ "version": "0.415.0",
76
+ "type": "improvement",
77
+ "title": "board gaps round 11, drawn icons, facet labels, empty list header, short forms, bell in the menu",
78
+ "detail": "Visible change for all apps: the search, sparkles, wand and pencil icons (`Icon` keys `search`, `sparkles`, `wand`, `pencil`), the list search field, the nav search and the filter toggle use new drawn icons, exported from renderer/web as `DrawnSearch`, `DrawnSparkles`, `DrawnPencil`, `DrawnFilter`, `DrawnWand`, `DrawnPanel`. `navStyle` plain shows `DrawnPanel` on every width instead of the hamburger. Facet triggers split \"Label: \" grey from the value in its own span (`facet-<field>-value`), the sort select too (`<testId>-value`); with `narrowFacets` pills an empty select shows the label only. New options - `NamedFilterFacetOptions.hideEmpty` (zero-hit entries leave the select, \"all\" and the active entry stay; the counts are requested without `showCounts`), `ListColumnHint.narrowField` (shorter sentence on the phone card), `RecordStep.narrowTitle`, `RecordNotice.narrowTitle` and `narrowText` (also `BannerProps`), `WorkspaceShell.notificationBellPlacement: \"header\" | \"overflow\"` (overflow moves the bell into the always-visible \"…\" menu). `narrowPlacement: \"behind-filter\"` now works on lists that do not fill their height (search and filter toggle share one row below sm). A `frame: \"card\"` list from sm up keeps its header row when empty, with the empty state in the same card. Boot rule `query/output-field-missing` also checks `hint.narrowField`; the projectionList count-acceptance rule also applies to `hideEmpty`."
79
+ },
80
+ {
81
+ "version": "0.415.0",
82
+ "type": "improvement",
83
+ "title": "WorkspaceShell contentSurface and navStyle, board look for lists, panels and detail pages",
84
+ "detail": "`WorkspaceShell` takes `contentSurface?: \"card\" | \"background\"` (default \"card\") and `navStyle?: \"default\" | \"plain\"` (default \"default\"). `plain` drops the leading icons of the expanded sidebar, styles groups, entries, active entry and search like the board, shows the create plus of an entry only on hover and focus (always on coarse pointers), renders a visible plus on a group's label, shows the hamburger in the header (also in the Akte header on desktop) and sets the header to 58px. Defaults changed for all apps: the notification bell has no border, its counter is a small destructive pill; the dashboard panel header has no divider and board spacing, the titled stat strip is a grid, panel stat tiles use the page background; the pager footer reads \"1–10 von 26 · 10 pro Seite\" (no noun, no arrow at the page size, plain page buttons); the summary and totals row of a table keep their background under the sticky actions column; select-facet triggers show the label grey and the value in foreground or primary when set; select-facet dropdown counters sit right and a chip can set `separatorAfter` (new on `EntityListFacetExtraOption`); tab counts are pills; metric tiles show `sub` on its own line; Fristen date cells are mono; button columns of a dashboard list are right-aligned. `kumiko.pager.status.noun` is removed (unused). Also new: `NamedListFilterRef.emptyState` takes `paramsQuery` (a registered query QN without payload, run only while the empty state is on screen; its result object becomes the translation params of `description`; without data the description is not rendered; boot rules `list/named-filter-empty-state-params-query-empty`, `...-without-description` and `query/not-registered`); `NamedListFilterRef.separatorAfter`; `narrowPlacement: \"behind-filter\"` on `EntityListFacetConfig` and `NamedFilterFacetOptions` (the remaining facets follow the usual phone rules, both clusters share one filter toggle); `prefix` on a detail header subtitle part; `MetricSpec.subFieldNarrow`; `steps.narrowMoreLabel`, a plural base key (`<key>.one` and `<key>.other` with `{count}`; default `kumiko.detail.steps.more`). Phone cards and dashboard cards draw the tone as an inner 4px stripe instead of a left border; table row tone stripes are 4px; further step actions are grey 12.5px; the phone stat strip has no tone border; the chain panel beside the steps stretches to their height. Phone detail pages and lists: new list column option `narrowInline` (consecutive columns with it share one line of values with a 12px gap on a phone card, no separator; other apps are unaffected until they set it); new `CardOptions.headerLayout: \"stacked\" | \"inline\"` (inline puts title, subtitle and actions on one row without a divider; the chain panel uses it); `StatCard` takes `boardPadding`; the pager of a phone card list is plain text on the page without bar or border and the sort sentence is a muted 12px line; the lead paragraph of a dashboard text panel is followed by a smaller dated hint line; the page heading is 20px on a phone, detail pages use 16px side insets there, steps are divided rows with a 4px tone stripe and a \"more steps\" toggle row, the record summary has a heading-face sentence with a left stripe, metric tiles use 2-column phone spacing with a short `narrowSub` beside the value, and tab strips scroll sideways with tighter spacing on a phone. `StepList` for a plan card: `StepListSelection.compact` (no select-all row, selection actions visible at 0 selected, muted header, left-aligned footer, the checkbox replaces the status icon of selectable rows), `StepSelectionAction.labelForCount(count)` (replaces the appended \" (n)\", the action is disabled at 0), `StepSelectionAction.ignoresSelection` (no counter, always enabled, `onClick` still gets the selection), `StepTag.side` (tag in the right column above a trailing link), `progress: \"total\"` (\"n steps\", keys `kumiko.widget.step-list.total.one` and `.other`) and `footerNote`. In a list or dashboard panel with row tones every narrow card now carries the stripe, grey for neutral rows, so all cards share one inset. A filter toggle on the phone is marked active while a facet behind it is set."
85
+ },
86
+ {
87
+ "version": "0.415.0",
88
+ "type": "fix",
89
+ "title": "Dropping the pwa option retires the leftover service worker",
90
+ "detail": "Without the shell meta, the web client unregisters the service worker for its own scope when it is served as `/sw.js` and a cache with that scope's `kumiko-pwa-<scope hash>-` prefix exists, then deletes those caches. App-owned workers and other apps on the same origin have no such cache and stay untouched. `PWA_CACHE_NAME_PREFIX` now lives in the renderer headless entry and is re-exported by the server runtime script module."
91
+ },
92
+ {
93
+ "version": "0.415.0",
94
+ "type": "fix",
95
+ "title": "Row decoration sends only new ids and keeps earlier answers",
96
+ "detail": "In an infinite list each decoration call carries only the ids that have no answer yet; answers are merged across calls and dropped when the list's filter or sort changes. A reload after a write still asks for every id. A decoration query can now cap `ids` at the page size without losing the decoration once more pages are loaded."
97
+ },
98
+ {
99
+ "version": "0.415.0",
100
+ "type": "fix",
101
+ "title": "Non-searchable entity lists ignore a stale q in the URL",
102
+ "detail": "The entity list payload now gates `search` on the same searchable decision as the toolbar, like the projection list already did. A leftover `?q=` can no longer reach a query handler that does not accept it, and the keys sent match what the boot validator derives."
103
+ },
104
+ {
105
+ "version": "0.415.0",
106
+ "type": "fix",
107
+ "title": "Renderer review fixes for file view, badge cells, dashboard lists, steps and the page editor",
108
+ "detail": "The PDF View action and its drawer stop click propagation so a row click does not fire. A badge or button column shows the same text as the cell without display (lookup renderer, FormatSpec) and only computes it when needed. Dashboard list columns honour emptyPlaceholder false. Steps keep their further actions in their own row below sm. Payload-less write and client actions of guidance items are left out when the shown record id is unknown. Summary footer cells get unique keys. The managed-pages editor reports clean right after a successful save and computes its initial draft once."
109
+ },
110
+ {
111
+ "version": "0.415.0",
112
+ "type": "fix",
113
+ "title": "Renderer review fixes for shell focus, logout and locale formatting",
114
+ "detail": "`ShellTopbarActionsProvider` carries the shell's topbar actions in a context of its own, so `ShellFocusContext` consumers no longer re-render with every shell render and `useShellFocusHost` takes no argument. `useSetScreenFocus` only clears the focus it set itself. `clearNavCollapseState` runs on logout. The dashboard list phone line uses `dashboardListCellText` (bar as percent, i18n keys translated, `renderValue`), and the pager and the sort summary format numbers with the app locale."
115
+ },
116
+ {
117
+ "version": "0.415.0",
118
+ "type": "fix",
119
+ "title": "Titled stat strip drops tiles the user may not open",
120
+ "detail": "The strip wrapped every stat in its own cell, so a gated tile left an empty cell with a dangling separator. Gated tiles are now filtered before the cell is drawn. The dashboard card headline reuses the table's hint sentence class, the createPlacement and rowActionMode docs match the code, and TEMPLATE_EDITOR_SCREENS is read-only."
121
+ },
122
+ {
123
+ "version": "0.415.0",
124
+ "type": "fix",
125
+ "title": "Long segment labels end in an ellipsis instead of being clipped by the group",
126
+ "detail": "A segment is now at most as wide as its group, cuts its label with an ellipsis and names the full label in title. Short labels look the same and segments still wrap to the next row."
127
+ },
2
128
  {
3
129
  "version": "0.414.0",
4
130
  "type": "fix",
@@ -314,6 +314,12 @@
314
314
  :root:has([data-kumiko-layout="shell-header"]) {
315
315
  --shell-header-height: 3.5rem;
316
316
  }
317
+ :root:has([data-kumiko-layout="shell-header"][data-nav-style="plain"]),
318
+ :root:has([data-kumiko-layout="shell-header"][data-nav-style="plain"]):has(
319
+ [data-collapsible="icon"]
320
+ ) {
321
+ --shell-header-height: 58px;
322
+ }
317
323
  :root:has([data-kumiko-layout="shell-header"]):has([data-collapsible="icon"]) {
318
324
  --shell-header-height: 3.5rem;
319
325
  }