@cosmicdrift/kumiko-renderer 0.24.0 → 0.25.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.
|
|
3
|
+
"version": "0.25.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>",
|
|
@@ -54,9 +54,12 @@ export function ExtensionSectionsProvider({
|
|
|
54
54
|
/** Schaut die Component für einen extension-section-Namen nach. Returnt
|
|
55
55
|
* undefined wenn weder Provider gemounted noch der Name in der Map
|
|
56
56
|
* registriert ist — der Caller (RenderEdit) zeigt dann seinen
|
|
57
|
-
* Placeholder-Banner.
|
|
58
|
-
|
|
57
|
+
* Placeholder-Banner. `name` ist optional damit Caller den Hook
|
|
58
|
+
* unkonditional aufrufen können (Rules-of-Hooks), ohne einen Stub-Key
|
|
59
|
+
* wie `""` reichen zu müssen — analog `useColumnRenderer`. */
|
|
60
|
+
export function useExtensionSectionComponent(name?: string): ExtensionSectionComponent | undefined {
|
|
59
61
|
const map = useContext(ExtensionSectionsContext);
|
|
62
|
+
if (name === undefined || name === "") return undefined;
|
|
60
63
|
if (map === undefined) return undefined;
|
|
61
64
|
return map[name];
|
|
62
65
|
}
|
|
@@ -105,7 +105,7 @@ function ExtensionSectionMount({
|
|
|
105
105
|
}): ReactNode {
|
|
106
106
|
const { Banner, Section, Text } = usePrimitives();
|
|
107
107
|
const name = extensionSectionName(section.component);
|
|
108
|
-
const Component = useExtensionSectionComponent(name
|
|
108
|
+
const Component = useExtensionSectionComponent(name);
|
|
109
109
|
if (Component === undefined) {
|
|
110
110
|
return (
|
|
111
111
|
<Section
|