@cosmicdrift/kumiko-renderer-web 0.72.0 → 0.73.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-renderer-web",
3
- "version": "0.72.0",
3
+ "version": "0.73.0",
4
4
  "description": "Web-platform bindings for @cosmicdrift/kumiko-renderer. HTML default-primitives, browser history-based navigation, EventSource-backed live events, and a one-call createKumikoApp that mounts the whole stack via react-dom.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -16,9 +16,9 @@
16
16
  "./styles.css": "./src/styles.css"
17
17
  },
18
18
  "dependencies": {
19
- "@cosmicdrift/kumiko-dispatcher-live": "0.72.0",
20
- "@cosmicdrift/kumiko-headless": "0.72.0",
21
- "@cosmicdrift/kumiko-renderer": "0.72.0",
19
+ "@cosmicdrift/kumiko-dispatcher-live": "0.73.0",
20
+ "@cosmicdrift/kumiko-headless": "0.73.0",
21
+ "@cosmicdrift/kumiko-renderer": "0.73.0",
22
22
  "@radix-ui/react-dialog": "^1.1.15",
23
23
  "@radix-ui/react-dropdown-menu": "^2.1.16",
24
24
  "@radix-ui/react-label": "^2.1.8",
@@ -1,4 +1,4 @@
1
- import { describe, expect, mock, test } from "bun:test";
1
+ import { describe, expect, mock, spyOn, test } from "bun:test";
2
2
  import type {
3
3
  EntityDefinition,
4
4
  EntityListScreenDefinition,
@@ -184,11 +184,13 @@ describe("RenderList — slots.header", () => {
184
184
  });
185
185
 
186
186
  test("slots.header gesetzt, aber Component nicht registriert → kein Crash, kein Header", () => {
187
+ const warn = spyOn(console, "warn").mockImplementation(() => {});
187
188
  render(
188
189
  <ExtensionSectionsProvider value={{}}>
189
190
  <RenderList screen={screenWithHeader} entity={taskEntity} rows={[]} featureName="tasks" />
190
191
  </ExtensionSectionsProvider>,
191
192
  );
192
193
  expect(screen.queryByTestId("list-header-slot")).toBeNull();
194
+ warn.mockRestore();
193
195
  });
194
196
  });
@@ -1,7 +1,7 @@
1
1
  // SidebarBrand — der TeamSwitcher-Header aus shadcns sidebar-07: Logo-Kachel +
2
- // Name + Plan/Tagline + ChevronsUpDown. App-Author reicht ihn als `brand` an
3
- // DefaultAppShell. Reiner Look (kein Team-Switch-Dropdown) — eine App hat
4
- // meist EINE Identität; wer wechseln will, baut den Dropdown selbst drumrum.
2
+ // Name + Plan/Tagline. App-Author reicht ihn als `brand` an DefaultAppShell.
3
+ // Reiner Look (kein Team-Switch-Dropdown) — eine App hat meist EINE Identität;
4
+ // wer wechseln will, baut den Dropdown selbst drumrum und setzt `collapsible`.
5
5
 
6
6
  import { ChevronsUpDown } from "lucide-react";
7
7
  import type { ReactNode } from "react";
@@ -15,9 +15,18 @@ export type SidebarBrandProps = {
15
15
  /** Logo in der Kachel — typisch ein Lucide-Icon. Fehlt es, steht der
16
16
  * erste Buchstabe des Namens. */
17
17
  readonly logo?: ReactNode;
18
+ /** Zeigt das ChevronsUpDown-Icon (Aufklapp-Affordance) nur wenn die App den
19
+ * Brand tatsächlich in ein Dropdown wrappt. Default false: ohne Dropdown
20
+ * ist das Chevron irreführend (suggeriert ein Menü, das nicht aufgeht). */
21
+ readonly collapsible?: boolean;
18
22
  };
19
23
 
20
- export function SidebarBrand({ name, plan, logo }: SidebarBrandProps): ReactNode {
24
+ export function SidebarBrand({
25
+ name,
26
+ plan,
27
+ logo,
28
+ collapsible = false,
29
+ }: SidebarBrandProps): ReactNode {
21
30
  return (
22
31
  <SidebarMenu>
23
32
  <SidebarMenuItem>
@@ -32,7 +41,7 @@ export function SidebarBrand({ name, plan, logo }: SidebarBrandProps): ReactNode
32
41
  <span className="truncate font-semibold">{name}</span>
33
42
  {plan !== undefined && <span className="truncate text-xs">{plan}</span>}
34
43
  </div>
35
- <ChevronsUpDown className="ml-auto" />
44
+ {collapsible && <ChevronsUpDown className="ml-auto" />}
36
45
  </SidebarMenuButton>
37
46
  </SidebarMenuItem>
38
47
  </SidebarMenu>
@@ -605,8 +605,10 @@ function tableInner(
605
605
  <TableHead
606
606
  data-testid="column-actions"
607
607
  // sticky right-0 + bg-muted (= Header-Ton) damit die Action-
608
- // Spalte beim horizontalen Scroll am rechten Rand bleibt.
609
- className="sticky right-0 z-10 w-px border-l bg-muted text-right text-muted-foreground"
608
+ // Spalte beim horizontalen Scroll am rechten Rand bleibt. Kein
609
+ // border-l: der ständige Trenner wirkt schwer; die sticky-bg
610
+ // grenzt die Spalte beim Scroll ohnehin ab.
611
+ className="sticky right-0 z-10 w-px bg-muted text-right text-muted-foreground"
610
612
  aria-label="Actions"
611
613
  />
612
614
  )}
@@ -646,9 +648,9 @@ function tableInner(
646
648
  <TableCell
647
649
  data-testid={`cell-${row.id}-actions`}
648
650
  // Sticky-right damit beim horizontalen Scroll die Actions
649
- // am rechten Rand sichtbar bleiben. bg-background +
650
- // border-l für den visuellen Abschluss.
651
- className="sticky right-0 z-10 border-l bg-background text-right"
651
+ // am rechten Rand sichtbar bleiben. bg-background grenzt die
652
+ // Spalte beim Scroll ab — kein border-l (Trenner zu schwer).
653
+ className="sticky right-0 z-10 bg-background text-right"
652
654
  // Action-Cell-Events dürfen nicht den Row-Click/Activation
653
655
  // triggern (typisch "Open Detail" — der User wollte ja die
654
656
  // Action, nicht navigieren). Wir stopPropagation für Mouse