@cosmicdrift/kumiko-renderer 0.276.0 → 0.278.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",
3
- "version": "0.276.0",
3
+ "version": "0.278.0",
4
4
  "description": "Platform-agnostic React renderer for Kumiko screens. Contains the shared logic — primitives-contract, hooks, KumikoScreen, navigation & SSE abstractions — that any platform-specific renderer (web, native) composes. No DOM, no EventSource, no react-dom.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -15,9 +15,9 @@
15
15
  }
16
16
  },
17
17
  "dependencies": {
18
- "@cosmicdrift/kumiko-framework": "0.276.0",
19
- "@cosmicdrift/kumiko-headless": "0.276.0",
20
- "@cosmicdrift/kumiko-types": "0.276.0",
18
+ "@cosmicdrift/kumiko-framework": "0.278.0",
19
+ "@cosmicdrift/kumiko-headless": "0.278.0",
20
+ "@cosmicdrift/kumiko-types": "0.278.0",
21
21
  "react": "^19.2.6",
22
22
  "temporal-polyfill": "^0.3.2",
23
23
  "zod": "^4.4.3"
@@ -28,7 +28,7 @@
28
28
  "@types/react-dom": "^19.2.3",
29
29
  "jsdom": "^29.1.1",
30
30
  "react-dom": "^19.2.6",
31
- "@cosmicdrift/kumiko-locale-de": "0.276.0"
31
+ "@cosmicdrift/kumiko-locale-de": "0.278.0"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",
@@ -35,6 +35,7 @@ function buildEntity(): EntityDefinition {
35
35
  function renderEditCapturingForm(
36
36
  screen: EntityEditScreenDefinition,
37
37
  extraTranslations?: TranslationsByLocale,
38
+ hideSectionTitles = false,
38
39
  ): {
39
40
  captured: FormProps | undefined;
40
41
  } {
@@ -78,6 +79,7 @@ function renderEditCapturingForm(
78
79
  entity={buildEntity()}
79
80
  featureName="widgets"
80
81
  initial={{ name: "" }}
82
+ {...(hideSectionTitles && { hideSectionTitles: true })}
81
83
  />
82
84
  </PrimitivesProvider>
83
85
  </LocaleProvider>,
@@ -129,4 +131,22 @@ describe("RenderEdit — screen.description as form subtitle (fw#2723)", () => {
129
131
  expect(captured).toBeDefined();
130
132
  expect(captured && "subtitle" in captured).toBe(false);
131
133
  });
134
+
135
+ test("tabs mode suppresses a description whose key matches the subtitle probe", () => {
136
+ const screen: EntityEditScreenDefinition = {
137
+ id: "widget-edit",
138
+ type: "entityEdit",
139
+ entity: "widget",
140
+ description: "screen:widget-edit.subtitle",
141
+ layout: { mode: "tabs", sections: [{ title: "Basics", fields: ["name"] }] },
142
+ };
143
+
144
+ const { captured } = renderEditCapturingForm(
145
+ screen,
146
+ { "en-US": { "screen:widget-edit.subtitle": "Widget details." } },
147
+ true,
148
+ );
149
+
150
+ expect(captured && "subtitle" in captured).toBe(false);
151
+ });
132
152
  });
@@ -1193,10 +1193,10 @@ export function RenderEdit<TValues extends FormValues, TCtx = unknown>(
1193
1193
  // screen.description is head-card copy, not tab content — in tabs mode
1194
1194
  // (hideSectionTitles) the head card already carries title/subtitle/status.
1195
1195
  const formSubtitle =
1196
- resolveScreenText("subtitle") ??
1197
- (hideSectionTitles !== true && screen.description !== undefined
1198
- ? translate(screen.description)
1199
- : undefined);
1196
+ hideSectionTitles !== true
1197
+ ? (resolveScreenText("subtitle") ??
1198
+ (screen.description !== undefined ? translate(screen.description) : undefined))
1199
+ : undefined;
1200
1200
 
1201
1201
  return (
1202
1202
  <ExtensionFormRegistryProvider value={extensionFormRegistry}>