@cosmicdrift/kumiko-renderer-web 0.113.1 → 1.0.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.113.1",
3
+ "version": "1.0.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.113.1",
20
- "@cosmicdrift/kumiko-headless": "0.113.1",
21
- "@cosmicdrift/kumiko-renderer": "0.113.1",
19
+ "@cosmicdrift/kumiko-dispatcher-live": "1.0.0",
20
+ "@cosmicdrift/kumiko-headless": "1.0.0",
21
+ "@cosmicdrift/kumiko-renderer": "1.0.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 { afterEach, describe, expect, mock, spyOn, test } from "bun:test";
1
+ import { describe, expect, mock, spyOn, test } from "bun:test";
2
2
  import type {
3
3
  EntityDefinition,
4
4
  EntityListScreenDefinition,
@@ -188,21 +188,13 @@ describe("RenderList — slots.header", () => {
188
188
  });
189
189
 
190
190
  test("slots.header gesetzt, aber Component nicht registriert → kein Crash, kein Header", () => {
191
- spyOn(console, "warn").mockImplementation(() => {});
191
+ const warn = spyOn(console, "warn").mockImplementation(() => {});
192
192
  render(
193
193
  <ExtensionSectionsProvider value={{}}>
194
194
  <RenderList screen={screenWithHeader} entity={taskEntity} rows={[]} featureName="tasks" />
195
195
  </ExtensionSectionsProvider>,
196
196
  );
197
197
  expect(screen.queryByTestId("list-header-slot")).toBeNull();
198
+ warn.mockRestore();
198
199
  });
199
200
  });
200
-
201
- // 573/1: a mid-test assertion throw would skip the trailing warn.mockRestore()
202
- // above, leaking the spy into every later test — this backstop restores
203
- // unconditionally regardless of how the test exited.
204
- afterEach(() => {
205
- // biome-ignore lint/suspicious/noConsole: reading the spy handle to restore it, not logging
206
- const warn = console.warn as unknown as { mockRestore?: () => void };
207
- warn.mockRestore?.();
208
- });
@@ -192,14 +192,8 @@ export function NavTree({
192
192
  // schiebt ihn ans rechte Ende; das truncate-Label gibt nach.
193
193
  // ponytail: nur an screen/target-Leaves verdrahtet, nicht an Container-
194
194
  // Knoten (die tragen den ml-auto-Chevron) — Tier-Badge ist ein Leaf.
195
- // Defense-in-depth (555/4): every current call site already guards on
196
- // node.screen/node.target !== undefined before rendering <NavBadge>, so this
197
- // early-return changes no current behavior — it's here so a future call
198
- // site added without that guard can't silently show a leaf's badge on an
199
- // unrelated container node that happens to share its last-segment.
200
195
  function NavBadge({ node }: { readonly node: NavNode }): ReactNode {
201
196
  const badges = useContext(NavBadgesContext);
202
- if (node.screen === undefined && node.target === undefined) return null;
203
197
  const badge = badges.get(lastSegment(node.qualifiedName));
204
198
  if (badge === undefined) return null;
205
199
  return <span className="ml-auto shrink-0">{badge}</span>;