@llmnative/react 1.10.3 → 1.11.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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +52 -45
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/components/blocks/SideNav.d.ts +18 -1
- package/package.json +1 -1
|
@@ -24,7 +24,24 @@ export interface SideNavProps {
|
|
|
24
24
|
menuKey?: string;
|
|
25
25
|
/** Explicit items — alternative to menuKey */
|
|
26
26
|
items?: SideNavItemDef[];
|
|
27
|
+
/** Initial collapsed state for UNCONTROLLED usage (ignored once `collapsed` is passed —
|
|
28
|
+
* see below). Default false. */
|
|
27
29
|
defaultCollapsed?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Controlled collapsed state — pass this (together with `onCollapsedChange`) when the
|
|
32
|
+
* consumer needs to decide collapse state itself, e.g. auto-collapsing to icon-only once
|
|
33
|
+
* its own layout detects the content area has gotten too narrow (a sibling panel opened,
|
|
34
|
+
* a responsive breakpoint, ...). SideNav has no notion of viewport/layout on its own by
|
|
35
|
+
* design (a reusable block can't assume what surrounds it) — the consumer computes the
|
|
36
|
+
* decision and controls this component the standard React way. Omit both props (the
|
|
37
|
+
* default) for the previous uncontrolled behavior, driven entirely by the footer toggle
|
|
38
|
+
* button and `defaultCollapsed`. */
|
|
39
|
+
collapsed?: boolean;
|
|
40
|
+
/** Required together with `collapsed` — called with the next value on every user action
|
|
41
|
+
* that would otherwise flip internal state (the footer toggle button). The consumer owns
|
|
42
|
+
* the state and decides whether/how to apply it (e.g. only honoring the toggle when its
|
|
43
|
+
* own auto-collapse condition isn't currently forcing collapsed). */
|
|
44
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
28
45
|
/** Show icon slot. Default true. */
|
|
29
46
|
showIcons?: boolean;
|
|
30
47
|
/** Show collapse/expand toggle button in the footer. Default true. */
|
|
@@ -42,4 +59,4 @@ export interface SideNavProps {
|
|
|
42
59
|
*/
|
|
43
60
|
embedded?: boolean;
|
|
44
61
|
}
|
|
45
|
-
export default function SideNav({ menuKey, items: itemsProp, defaultCollapsed, showIcons, showCollapseButton, footer, header, embedded, }: SideNavProps): React.JSX.Element | null;
|
|
62
|
+
export default function SideNav({ menuKey, items: itemsProp, defaultCollapsed, collapsed: collapsedProp, onCollapsedChange, showIcons, showCollapseButton, footer, header, embedded, }: SideNavProps): React.JSX.Element | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmnative/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "LLM-native React framework for deterministic UI generation. Data-driven by default, schema-driven optional. Ultra-low token consumption — built for AI agents, not just humans.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|