@exegia/corpora-ui 0.16.0 → 0.18.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.
Files changed (115) hide show
  1. package/dist-lib/components/blocks/nav/sidebar-block.d.ts +1 -1
  2. package/dist-lib/components/blocks/scaffold/__tests__/scaffold.test.d.ts +1 -0
  3. package/dist-lib/components/blocks/scaffold/constants.d.ts +20 -0
  4. package/dist-lib/components/blocks/scaffold/index.d.ts +25 -0
  5. package/dist-lib/components/blocks/scaffold/panel-close-button.d.ts +4 -0
  6. package/dist-lib/components/blocks/scaffold/panel-menu-button.d.ts +7 -0
  7. package/dist-lib/components/blocks/scaffold/scaffold-actions.d.ts +9 -0
  8. package/dist-lib/components/blocks/scaffold/scaffold-canvas.d.ts +7 -0
  9. package/dist-lib/components/blocks/scaffold/scaffold-context.d.ts +5 -0
  10. package/dist-lib/components/blocks/scaffold/scaffold-inspector.d.ts +9 -0
  11. package/dist-lib/components/blocks/scaffold/scaffold-main.d.ts +8 -0
  12. package/dist-lib/components/blocks/scaffold/scaffold-panel.d.ts +10 -0
  13. package/dist-lib/components/blocks/scaffold/scaffold-root.d.ts +8 -0
  14. package/dist-lib/components/blocks/scaffold/scaffold-sidebar.d.ts +7 -0
  15. package/dist-lib/components/blocks/scaffold/scaffold-sub-panel.d.ts +3 -0
  16. package/dist-lib/components/blocks/scaffold/type.d.ts +133 -0
  17. package/dist-lib/components/blocks/scaffold/use-scaffold.d.ts +8 -0
  18. package/dist-lib/components/blocks/scaffold/utils.d.ts +15 -0
  19. package/dist-lib/components/blocks/shell/animated-panel-inset.d.ts +2 -0
  20. package/dist-lib/components/blocks/shell/animated-panel-provider.d.ts +2 -0
  21. package/dist-lib/components/blocks/shell/animated-panel-trigger.d.ts +2 -0
  22. package/dist-lib/components/blocks/shell/animated-panel.d.ts +2 -0
  23. package/dist-lib/components/blocks/shell/animated-sidebar-content.d.ts +2 -0
  24. package/dist-lib/components/blocks/shell/animated-sidebar-footer.d.ts +2 -0
  25. package/dist-lib/components/blocks/shell/animated-sidebar-group-content.d.ts +2 -0
  26. package/dist-lib/components/blocks/shell/animated-sidebar-group-label.d.ts +2 -0
  27. package/dist-lib/components/blocks/shell/animated-sidebar-group.d.ts +2 -0
  28. package/dist-lib/components/blocks/shell/animated-sidebar-header.d.ts +2 -0
  29. package/dist-lib/components/blocks/shell/animated-sidebar-menu-button.d.ts +3 -0
  30. package/dist-lib/components/blocks/shell/animated-sidebar-menu-item.d.ts +2 -0
  31. package/dist-lib/components/blocks/shell/animated-sidebar-menu-sub-button.d.ts +3 -0
  32. package/dist-lib/components/blocks/shell/animated-sidebar-menu-sub-item.d.ts +2 -0
  33. package/dist-lib/components/blocks/shell/animated-sidebar-menu-sub.d.ts +2 -0
  34. package/dist-lib/components/blocks/shell/animated-sidebar-menu.d.ts +2 -0
  35. package/dist-lib/components/blocks/shell/index.d.ts +16 -0
  36. package/dist-lib/components/blocks/shell/shell-layout.d.ts +1 -1
  37. package/dist-lib/components/blocks/shell/type.d.ts +91 -4
  38. package/dist-lib/components/blocks/shell/utils.d.ts +37 -0
  39. package/dist-lib/components/motion/index.d.ts +1 -0
  40. package/dist-lib/components/motion/overflow-actions.d.ts +35 -0
  41. package/dist-lib/components/ui/button-group.d.ts +11 -0
  42. package/dist-lib/components/ui/glasscn/glass-button-group.d.ts +5 -0
  43. package/dist-lib/components/ui/glasscn/glass-container.d.ts +7 -0
  44. package/dist-lib/components/ui/glasscn/glass-separator.d.ts +5 -0
  45. package/dist-lib/components/ui/group.d.ts +17 -0
  46. package/dist-lib/components/ui/separator.d.ts +2 -3
  47. package/dist-lib/components/ui/sheet.d.ts +14 -0
  48. package/dist-lib/components/ui/tooltip.d.ts +6 -0
  49. package/dist-lib/index.d.ts +2 -1
  50. package/dist-lib/index.js +1432 -932
  51. package/dist-lib/index.js.map +1 -1
  52. package/dist-lib/lib/ease.d.ts +3 -0
  53. package/dist-lib/lib/hooks/use-hover-capable.d.ts +6 -0
  54. package/package.json +2 -1
  55. package/src/components/beste/piece/browser-frame.tsx +2 -2
  56. package/src/components/blocks/nav/sidebar-block.tsx +5 -5
  57. package/src/components/blocks/nav/sidebar-nav-row.tsx +4 -5
  58. package/src/components/blocks/scaffold/__tests__/scaffold.test.tsx +203 -0
  59. package/src/components/blocks/scaffold/constants.ts +28 -0
  60. package/src/components/blocks/scaffold/index.ts +38 -0
  61. package/src/components/blocks/scaffold/panel-close-button.tsx +36 -0
  62. package/src/components/blocks/scaffold/panel-menu-button.tsx +240 -0
  63. package/src/components/blocks/scaffold/scaffold-actions.tsx +97 -0
  64. package/src/components/blocks/scaffold/scaffold-canvas.tsx +29 -0
  65. package/src/components/blocks/scaffold/scaffold-context.ts +18 -0
  66. package/src/components/blocks/scaffold/scaffold-inspector.tsx +57 -0
  67. package/src/components/blocks/scaffold/scaffold-main.tsx +28 -0
  68. package/src/components/blocks/scaffold/scaffold-panel.tsx +98 -0
  69. package/src/components/blocks/scaffold/scaffold-root.tsx +68 -0
  70. package/src/components/blocks/scaffold/scaffold-sidebar.tsx +31 -0
  71. package/src/components/blocks/scaffold/scaffold-sub-panel.tsx +51 -0
  72. package/src/components/blocks/scaffold/type.ts +171 -0
  73. package/src/components/blocks/scaffold/use-scaffold.ts +48 -0
  74. package/src/components/blocks/scaffold/utils.ts +30 -0
  75. package/src/components/blocks/shell/__tests__/shell-layout.test.tsx +3 -3
  76. package/src/components/blocks/shell/animated-panel-inset.tsx +23 -0
  77. package/src/components/blocks/shell/animated-panel-provider.tsx +155 -0
  78. package/src/components/blocks/shell/animated-panel-trigger.tsx +42 -0
  79. package/src/components/blocks/shell/animated-panel.tsx +135 -0
  80. package/src/components/blocks/shell/animated-sidebar-content.tsx +19 -0
  81. package/src/components/blocks/shell/animated-sidebar-footer.tsx +19 -0
  82. package/src/components/blocks/shell/animated-sidebar-group-content.tsx +16 -0
  83. package/src/components/blocks/shell/animated-sidebar-group-label.tsx +29 -0
  84. package/src/components/blocks/shell/animated-sidebar-group.tsx +16 -0
  85. package/src/components/blocks/shell/animated-sidebar-header.tsx +16 -0
  86. package/src/components/blocks/shell/animated-sidebar-menu-button.tsx +151 -0
  87. package/src/components/blocks/shell/animated-sidebar-menu-item.tsx +20 -0
  88. package/src/components/blocks/shell/animated-sidebar-menu-sub-button.tsx +85 -0
  89. package/src/components/blocks/shell/animated-sidebar-menu-sub-item.tsx +19 -0
  90. package/src/components/blocks/shell/animated-sidebar-menu-sub.tsx +44 -0
  91. package/src/components/blocks/shell/animated-sidebar-menu.tsx +26 -0
  92. package/src/components/blocks/shell/index.ts +18 -0
  93. package/src/components/blocks/shell/shell-layout.tsx +44 -64
  94. package/src/components/blocks/shell/type.ts +113 -6
  95. package/src/components/blocks/shell/use-shell-panels.ts +1 -1
  96. package/src/components/blocks/shell/utils.ts +142 -1
  97. package/src/components/docs/demo-controls.tsx +1 -1
  98. package/src/components/motion/index.ts +0 -0
  99. package/src/components/motion/overflow-actions.tsx +376 -0
  100. package/src/components/ui/button-group.tsx +88 -0
  101. package/src/components/ui/button.tsx +3 -3
  102. package/src/components/ui/glasscn/glass-button-group.tsx +48 -0
  103. package/src/components/ui/glasscn/glass-container.tsx +125 -0
  104. package/src/components/ui/glasscn/glass-separator.tsx +39 -0
  105. package/src/components/ui/glasscn/liquid-glass.tsx +250 -210
  106. package/src/components/ui/group.tsx +92 -0
  107. package/src/components/ui/separator.tsx +11 -11
  108. package/src/components/ui/sheet.tsx +135 -0
  109. package/src/components/ui/tooltip.tsx +66 -0
  110. package/src/index.css +1 -1
  111. package/src/index.ts +13 -1
  112. package/src/lib/ease.ts +26 -0
  113. package/src/lib/hooks/use-hover-capable.ts +23 -0
  114. package/dist-lib/components/motion/animated-sidebar.d.ts +0 -109
  115. package/src/components/motion/animated-sidebar.tsx +0 -1196
@@ -8,7 +8,7 @@ export type { ISidebarBlockProps as SidebarBlockProps, ISidebarNavItem as Sideba
8
8
  * beside your own content. It owns its own sidebar context (⌘B toggles it);
9
9
  * pass `open`/`onOpenChange` to drive the rail, and `openMobile`/
10
10
  * `onOpenMobileChange` to open the drawer from a header button of your own.
11
- * Compose the underlying `AnimatedSidebar*` parts directly when a screen
11
+ * Compose the underlying `AnimatedPanel*` parts directly when a screen
12
12
  * needs something this API does not cover.
13
13
  */
14
14
  export declare function SidebarBlock({ sections, activeId, onNavigate, header, footer, showTrigger, side, variant, collapsible, open, defaultOpen, onOpenChange, openMobile, defaultOpenMobile, onOpenMobileChange, width, iconWidth, mobileWidth, ariaLabel, className, }: ISidebarBlockProps): React.ReactElement;
@@ -0,0 +1,20 @@
1
+ /** Icon-rail width in px (the rail sits directly on the desktop backdrop). */
2
+ export declare const SCAFFOLD_SIDEBAR_WIDTH = 64;
3
+ /** Inspector drawer width in px. */
4
+ export declare const SCAFFOLD_INSPECTOR_WIDTH = 272;
5
+ /** Gap in px between the drawer/actions and the viewport edges. */
6
+ export declare const SCAFFOLD_EDGE_GUTTER = 10;
7
+ /** Vertical room in px reserved above the canvas for the actions cluster. */
8
+ export declare const SCAFFOLD_HEADER_HEIGHT = 52;
9
+ /** Height in px of a panel's secondary strip. */
10
+ export declare const SCAFFOLD_SECONDARY_HEIGHT = 52;
11
+ /** Gap in px between a panel's primary surface and its secondary strip. */
12
+ export declare const SCAFFOLD_PANEL_GAP = 10;
13
+ /** How long the seam menu lingers expanded after the pointer leaves it (ms)
14
+ * before it collapses back to the compact toggle. The timer keeps counting
15
+ * even when the pointer leaves the window entirely. */
16
+ export declare const SCAFFOLD_MENU_COLLAPSE_DELAY = 4000;
17
+ /** Morph duration in seconds for drawer slides and panel layout shifts. */
18
+ export declare const SCAFFOLD_MORPH_DURATION = 0.3;
19
+ /** `--ease-smooth-out` as a motion/react easing tuple. */
20
+ export declare const SCAFFOLD_EASE: readonly [0.22, 1, 0.36, 1];
@@ -0,0 +1,25 @@
1
+ import { PanelCloseButton } from './panel-close-button';
2
+ import { PanelMenuButton } from './panel-menu-button.tsx';
3
+ import { ScaffoldActions } from './scaffold-actions';
4
+ import { ScaffoldCanvas } from './scaffold-canvas';
5
+ import { ScaffoldInspector } from './scaffold-inspector';
6
+ import { ScaffoldMain } from './scaffold-main';
7
+ import { ScaffoldPanel } from './scaffold-panel';
8
+ import { ScaffoldRoot } from './scaffold-root';
9
+ import { ScaffoldSidebar } from './scaffold-sidebar';
10
+ import { ScaffoldSubPanel } from './scaffold-sub-panel.tsx';
11
+ export { useScaffoldContext } from './scaffold-context';
12
+ export { useScaffold } from './use-scaffold';
13
+ export type * from './type';
14
+ export * from './constants';
15
+ export { PanelCloseButton, PanelMenuButton, ScaffoldActions, ScaffoldCanvas, ScaffoldInspector, ScaffoldMain, ScaffoldPanel, ScaffoldRoot, ScaffoldSidebar, };
16
+ export declare const Scaffold: {
17
+ Root: typeof ScaffoldRoot;
18
+ Sidebar: typeof ScaffoldSidebar;
19
+ Main: typeof ScaffoldMain;
20
+ Actions: typeof ScaffoldActions;
21
+ Canvas: typeof ScaffoldCanvas;
22
+ Panel: typeof ScaffoldPanel;
23
+ Inspector: typeof ScaffoldInspector;
24
+ SubPanel: typeof ScaffoldSubPanel;
25
+ };
@@ -0,0 +1,4 @@
1
+ import { PanelFloatingButtonProps } from './type';
2
+ import * as React from "react";
3
+ /** Floating close affordance in a panel's top-right corner. */
4
+ export declare function PanelCloseButton({ onClick, label, sound, className, }: PanelFloatingButtonProps): React.ReactElement;
@@ -0,0 +1,7 @@
1
+ import { PanelMenuButtonProps } from './type';
2
+ import * as React from "react";
3
+ /**
4
+ * Floating swap affordance centered on the seam between a panel's primary
5
+ * surface and its secondary strip.
6
+ */
7
+ export declare function PanelMenuButton({ onClick, onExpand, secondaryExpanded, label, sound, className, }: PanelMenuButtonProps): React.ReactElement;
@@ -0,0 +1,9 @@
1
+ import { ScaffoldActionsProps } from './type';
2
+ import * as React from "react";
3
+ /**
4
+ * The floating pill cluster in the main region's top-right corner — the
5
+ * design's "Panel Context Menu": an Add segment plus an overflow segment
6
+ * whose badge counts the non-visible panels. Slides left in step with the
7
+ * inspector opening.
8
+ */
9
+ export declare function ScaffoldActions({ onAdd, addLabel, addIcon, overflowCount, onBrowse, browseLabel, sound, className, children, ...rest }: ScaffoldActionsProps): React.ReactElement;
@@ -0,0 +1,7 @@
1
+ import { ScaffoldCanvasProps } from './type';
2
+ import * as React from "react";
3
+ /**
4
+ * The panel row below the action cluster: 8px gutters, 8px gaps, panels
5
+ * side by side. Key each `Scaffold.Panel` child so closes animate out.
6
+ */
7
+ export declare function ScaffoldCanvas({ className, children, ...rest }: ScaffoldCanvasProps): React.ReactElement;
@@ -0,0 +1,5 @@
1
+ import { ScaffoldContextValue } from './type';
2
+ import * as React from "react";
3
+ export declare const ScaffoldContext: React.Context<ScaffoldContextValue | null>;
4
+ /** Read the scaffold's shared state; must run under `Scaffold.Root`. */
5
+ export declare function useScaffoldContext(): ScaffoldContextValue;
@@ -0,0 +1,9 @@
1
+ import { ScaffoldInspectorProps } from './type';
2
+ import * as React from "react";
3
+ /**
4
+ * The right-hand drawer: a brighter card that slides in over the canvas,
5
+ * inset from the viewport edges. Open state lives on `Scaffold.Root` (or
6
+ * `useScaffold().providerProps`); the drawer stays mounted so it can slide
7
+ * back out.
8
+ */
9
+ export declare function ScaffoldInspector({ children, name, className, ...rest }: ScaffoldInspectorProps): React.ReactElement;
@@ -0,0 +1,8 @@
1
+ import { ScaffoldMainProps } from './type';
2
+ import * as React from "react";
3
+ /**
4
+ * The region right of the rail. Hosts `Scaffold.Actions` (top-right),
5
+ * `Scaffold.Canvas` and the `Scaffold.Inspector` overlay — all positioned
6
+ * against this box.
7
+ */
8
+ export declare function ScaffoldMain({ className, children, ...rest }: ScaffoldMainProps): React.ReactElement;
@@ -0,0 +1,10 @@
1
+ import { ScaffoldPanelProps } from './type';
2
+ import * as React from "react";
3
+ /**
4
+ * A canvas panel: a primary card plus an optional secondary strip below it,
5
+ * separated by a slice of the desktop backdrop. Floating close and swap
6
+ * buttons reveal on hover when their callbacks are provided. Swapping trades
7
+ * the two cards with a layout morph — the strip glides up and grows into the
8
+ * primary slot while the primary card shrinks down into the strip.
9
+ */
10
+ export declare function ScaffoldPanel({ children, SecondaryPanel, onClose, onSwap, name, closeLabel, swapLabel, sound, className, }: ScaffoldPanelProps): React.ReactElement;
@@ -0,0 +1,8 @@
1
+ import { ScaffoldRootProps } from './type';
2
+ import * as React from "react";
3
+ /**
4
+ * The scaffold's viewport: desktop backdrop + horizontal row of rail and
5
+ * main region, and the provider for the shared inspector state. Fills its
6
+ * container — size it from the outside (e.g. `h-svh` for a full page).
7
+ */
8
+ export declare function ScaffoldRoot({ inspectorOpen: inspectorOpenProp, defaultInspectorOpen, onInspectorOpenChange, inspectorWidth, className, children, ...rest }: ScaffoldRootProps): React.ReactElement;
@@ -0,0 +1,7 @@
1
+ import { ScaffoldSidebarProps } from './type';
2
+ import * as React from "react";
3
+ /**
4
+ * The 64px icon rail on the left edge. Transparent — it sits directly on
5
+ * the desktop backdrop; fill it with icon buttons.
6
+ */
7
+ export declare function ScaffoldSidebar({ className, children, ...rest }: ScaffoldSidebarProps): React.ReactElement;
@@ -0,0 +1,3 @@
1
+ import { ScaffoldSubPanelProps } from './type';
2
+ import * as React from "react";
3
+ export declare function ScaffoldSubPanel({ className, children, variant, primary, expanded, ...rest }: ScaffoldSubPanelProps): React.ReactElement;
@@ -0,0 +1,133 @@
1
+ import { default as React, ComponentProps, ReactElement, ReactNode } from 'react';
2
+ /** Inspector state shared by every scaffold part through ScaffoldContext. */
3
+ export interface ScaffoldContextValue {
4
+ /** Whether the inspector drawer is currently shown. */
5
+ inspectorOpen: boolean;
6
+ /** Drawer width in px — Actions reads it to slide out of the drawer's way. */
7
+ inspectorWidth: number;
8
+ setInspectorOpen: (open: boolean) => void;
9
+ toggleInspector: () => void;
10
+ }
11
+ export interface ScaffoldRootProps extends ComponentProps<"div"> {
12
+ /** Controlled inspector state — pair with `onInspectorOpenChange`, or
13
+ * spread `useScaffold().providerProps` instead of wiring by hand. */
14
+ inspectorOpen?: boolean;
15
+ /** Initial inspector state when uncontrolled. Closed by default. */
16
+ defaultInspectorOpen?: boolean;
17
+ onInspectorOpenChange?: (open: boolean) => void;
18
+ /** Drawer width in px. Also drives how far Actions slides aside. */
19
+ inspectorWidth?: number;
20
+ }
21
+ export type ScaffoldSidebarProps = ComponentProps<"nav">;
22
+ export type ScaffoldMainProps = ComponentProps<"div">;
23
+ export type ScaffoldCanvasProps = ComponentProps<"div">;
24
+ /** React's drag/animation DOM handlers collide with motion's gesture props
25
+ * on `motion.*` elements — strip them from pass-through HTML props. */
26
+ type MotionSafe<T> = Omit<T, "onDrag" | "onDragStart" | "onDragEnd" | "onAnimationStart" | "onAnimationEnd" | "onAnimationIteration">;
27
+ export interface ScaffoldActionsProps extends MotionSafe<Omit<ComponentProps<"div">, "children">> {
28
+ /** Called when the Add segment is pressed. */
29
+ onAdd?: () => void;
30
+ /** Label of the Add segment. */
31
+ addLabel?: ReactNode;
32
+ /** Replaces the default add icon. */
33
+ addIcon?: ReactNode;
34
+ /** Number of non-visible panels tucked into the overflow dropdown —
35
+ * the badge on the browse segment. The segment renders when this or
36
+ * `onBrowse` is present; the badge only when > 0. Per the design
37
+ * comments the dropdown menu itself is a later iteration; for now the
38
+ * segment just keeps the count. */
39
+ overflowCount?: number;
40
+ /** Called when the overflow (stacked-panels) segment is pressed. */
41
+ onBrowse?: () => void;
42
+ /** Accessible name of the overflow segment. */
43
+ browseLabel?: string;
44
+ /** Extra segments appended after the built-in ones. */
45
+ children?: ReactNode;
46
+ /** Emit interaction-sound attributes (inert until an app binds cuelume). */
47
+ sound?: boolean;
48
+ }
49
+ export type TScaffoldPanelChild<T extends ScaffoldSubPanelProps = ScaffoldSubPanelProps> = ReactElement<T, React.JSXElementConstructor<T>>;
50
+ export interface ScaffoldPanelProps {
51
+ /** The panel's content, rendered in a card with a drop shadow. */
52
+ children: ReactNode;
53
+ /** The panel's content, rendered in a card with a drop shadow. */
54
+ SecondaryPanel?: TScaffoldPanelChild;
55
+ /** Renders the floating close button in the panel's top-right corner. */
56
+ onClose?: () => void;
57
+ /** Renders the floating swap button over the primary/secondary gap.
58
+ * Only shown when `secondary` is present. Clicking it trades the two
59
+ * cards with a layout morph — flip the slot content here so each card
60
+ * carries its subject to its new home. */
61
+ onSwap?: () => void;
62
+ /** Controlled swap state — while true the strip's card sits in the
63
+ * primary slot. Omit letting the panel toggle it on swap clicks. */
64
+ swapped?: boolean;
65
+ /** Initial swap state when uncontrolled. */
66
+ defaultSwapped?: boolean;
67
+ /** Fixed width in px; omitted, the panel flexes to share the canvas. */
68
+ width?: number;
69
+ /** Accessible name of the panel region. */
70
+ name?: string;
71
+ /** Emit interaction-sound attributes on the floating buttons. */
72
+ sound?: boolean;
73
+ /** Accessible name of the close button. */
74
+ closeLabel?: string;
75
+ /** Accessible name of the swap button. */
76
+ swapLabel?: string;
77
+ /** Extra class names for the panel's root element. */
78
+ className?: string;
79
+ }
80
+ export type TSubPanelPosition = "bottom" | "top";
81
+ export type TSubPanelVariant = "card" | "subtle" | "inset";
82
+ export interface ScaffoldSubPanelProps extends MotionSafe<Omit<ComponentProps<"div">, "children">> {
83
+ children?: ReactNode;
84
+ /** Accessible name of the sub-panel region. */
85
+ name?: string;
86
+ /** Whether this is the primary or secondary sub-panel. */
87
+ primary?: boolean;
88
+ /** Whether this sub-panel holds the flexible slot. Defaults to `primary` —
89
+ * the panel flips it when the Expand action trades the slots. */
90
+ expanded?: boolean;
91
+ /** Visual style of the sub-panel. */
92
+ variant?: TSubPanelVariant;
93
+ /** Fixed width in px; omitted, the sub-panel flexes to share the canvas. */
94
+ width?: number;
95
+ /** Emit interaction-sound attributes on the floating buttons. */
96
+ sound?: boolean;
97
+ /** Extra class names for the sub-panel's root element. */
98
+ className?: string;
99
+ }
100
+ export interface ScaffoldInspectorProps extends MotionSafe<Omit<ComponentProps<"aside">, "children">> {
101
+ children?: ReactNode;
102
+ /** Accessible name of the drawer region. */
103
+ name?: string;
104
+ }
105
+ export interface PanelFloatingButtonProps {
106
+ onClick?: () => void;
107
+ /** Accessible name — the button is icon-only. */
108
+ label: string;
109
+ sound?: boolean;
110
+ className?: string;
111
+ }
112
+ export interface PanelMenuButtonProps extends PanelFloatingButtonProps {
113
+ /** Called when the Expand action is pressed — the panel trades which
114
+ * sub-panel holds the flexible slot. */
115
+ onExpand?: () => void;
116
+ /** Whether the secondary strip currently holds the flexible slot —
117
+ * flips the Expand chevron between down and up. */
118
+ secondaryExpanded?: boolean;
119
+ }
120
+ export interface UseScaffoldOptions {
121
+ /** Initial inspector state. Closed by default. */
122
+ defaultInspectorOpen?: boolean;
123
+ /** Fires on every inspector open/close. */
124
+ onInspectorChange?: (open: boolean) => void;
125
+ }
126
+ export interface ScaffoldControls {
127
+ inspectorOpen: boolean;
128
+ setInspectorOpen: (open: boolean) => void;
129
+ toggleInspector: () => void;
130
+ /** Spread onto Scaffold.Root. */
131
+ providerProps: Pick<ScaffoldRootProps, "inspectorOpen" | "onInspectorOpenChange">;
132
+ }
133
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ScaffoldControls, UseScaffoldOptions } from './type';
2
+ /**
3
+ * Owns the scaffold's inspector state for UI living outside the scaffold
4
+ * (title-bar buttons, command palette, shortcuts). Spread the returned
5
+ * `providerProps` onto `Scaffold.Root`; without this hook the root manages
6
+ * the same state internally via `defaultInspectorOpen`.
7
+ */
8
+ export declare function useScaffold({ defaultInspectorOpen, onInspectorChange, }?: UseScaffoldOptions): ScaffoldControls;
@@ -0,0 +1,15 @@
1
+ import { ClassNameValue } from 'tailwind-merge';
2
+ import { TSubPanelVariant } from './type.ts';
3
+ /** Desktop backdrop the whole scaffold sits on — a soft warm-gray wash. */
4
+ export declare const scaffoldBackgroundClass: ClassNameValue;
5
+ /** Card surface shared by a panel's primary area and secondary strip. */
6
+ export declare const panelSurfaceClass: ClassNameValue;
7
+ /** Floating icon button hovering over a panel (close, swap). */
8
+ export declare const floatingButtonClass: ClassNameValue;
9
+ /** Hidden until the pointer rests on the panel (always shown for touch and
10
+ * while focused) — the affordances stay quiet until the panel is engaged. */
11
+ export declare const revealOnPanelHoverClass: ClassNameValue;
12
+ /** Pill segment inside the actions cluster (Add, browse). */
13
+ export declare const actionSegmentClass: ClassNameValue;
14
+ /** Map of sub-panel variants to their corresponding side. */
15
+ export declare const subPanelVariant: Record<TSubPanelVariant, ClassNameValue>;
@@ -0,0 +1,2 @@
1
+ import { AnimatedSidebarInsetProps } from './type';
2
+ export declare const AnimatedPanelInset: import('react').ForwardRefExoticComponent<Omit<AnimatedSidebarInsetProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,2 @@
1
+ import { AnimatedSidebarProviderProps } from './type';
2
+ export declare function AnimatedPanelProvider({ children, open, defaultOpen, onOpenChange, openMobile, defaultOpenMobile, onOpenMobileChange, className, style, ...props }: AnimatedSidebarProviderProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { AnimatedSidebarTriggerProps } from './type';
2
+ export declare const AnimatedPanelTrigger: import('react').ForwardRefExoticComponent<AnimatedSidebarTriggerProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,2 @@
1
+ import { AnimatedSidebarProps } from './type';
2
+ export declare function AnimatedPanel({ side, variant, collapsible, ariaLabel, children, className, panelClassName, style, ref, ...props }: AnimatedSidebarProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare const AnimatedSidebarContent: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare const AnimatedSidebarFooter: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare const AnimatedSidebarGroupContent: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare const AnimatedSidebarGroupLabel: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare const AnimatedSidebarGroup: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare const AnimatedSidebarHeader: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,3 @@
1
+ import { AnimatedSidebarMenuButtonProps } from './type';
2
+ import type * as React from "react";
3
+ export declare function AnimatedSidebarMenuButton({ children, icon, badge, href, isActive, ariaExpanded, disabled, closeOnSelect, target, rel, onSelect, className, }: AnimatedSidebarMenuButtonProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { HTMLMotionProps } from 'motion/react';
2
+ export declare const AnimatedSidebarMenuItem: import('react').ForwardRefExoticComponent<Omit<HTMLMotionProps<"li">, "ref"> & import('react').RefAttributes<HTMLLIElement>>;
@@ -0,0 +1,3 @@
1
+ import { AnimatedSidebarMenuSubButtonProps } from './type';
2
+ import type * as React from "react";
3
+ export declare function AnimatedSidebarMenuSubButton({ children, icon, href, isActive, disabled, closeOnSelect, target, rel, onSelect, className, }: AnimatedSidebarMenuSubButtonProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { HTMLMotionProps } from 'motion/react';
2
+ export declare const AnimatedSidebarMenuSubItem: import('react').ForwardRefExoticComponent<Omit<HTMLMotionProps<"li">, "ref"> & import('react').RefAttributes<HTMLLIElement>>;
@@ -0,0 +1,2 @@
1
+ import { AnimatedSidebarMenuSubProps } from './type';
2
+ export declare const AnimatedSidebarMenuSub: import('react').ForwardRefExoticComponent<Omit<AnimatedSidebarMenuSubProps, "ref"> & import('react').RefAttributes<HTMLUListElement>>;
@@ -0,0 +1,2 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare const AnimatedSidebarMenu: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & import('react').RefAttributes<HTMLUListElement>>;
@@ -2,4 +2,20 @@ import { ShellLayout } from './shell-layout';
2
2
  export type * from './type';
3
3
  export * from './use-shell-panels';
4
4
  export * from './utils';
5
+ export * from './animated-panel';
6
+ export * from './animated-panel-inset';
7
+ export * from './animated-panel-provider';
8
+ export * from './animated-panel-trigger';
9
+ export * from './animated-sidebar-header';
10
+ export * from './animated-sidebar-content';
11
+ export * from './animated-sidebar-footer';
12
+ export * from './animated-sidebar-group';
13
+ export * from './animated-sidebar-group-label';
14
+ export * from './animated-sidebar-group-content';
15
+ export * from './animated-sidebar-menu';
16
+ export * from './animated-sidebar-menu-item';
17
+ export * from './animated-sidebar-menu-sub';
18
+ export * from './animated-sidebar-menu-sub-item';
19
+ export * from './animated-sidebar-menu-sub-button';
20
+ export * from './animated-sidebar-menu-button';
5
21
  export { ShellLayout as default };
@@ -1,3 +1,3 @@
1
1
  import { ShellLayoutProps } from './type';
2
2
  import * as React from "react";
3
- export declare function ShellLayout({ children, variant, panels, className, defaultOpen, ...panelControlProps }: ShellLayoutProps): React.ReactElement;
3
+ export declare function ShellLayout({ children, variant, panels, className, header, defaultOpen, ...panelControlProps }: ShellLayoutProps): React.ReactElement;
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { AnimatedSidebarProviderProps, SidebarSide } from '../../motion/animated-sidebar';
1
+ import { ReactNode, ButtonHTMLAttributes, CSSProperties, HTMLAttributes } from 'react';
2
+ import { HTMLMotionProps } from 'motion/react';
3
3
  export interface ShellAction {
4
4
  id: string;
5
5
  label: string;
@@ -35,7 +35,7 @@ export type TPanelSide = IPanel["side"];
35
35
  * wins. */
36
36
  export type TPanelMap<Side extends TPanelSide = TPanelSide> = Partial<Record<Side, IPanel>>;
37
37
  /** The open/close surface of the shell's panels, lifted straight from
38
- * AnimatedSidebarProvider — every prop is keyed by side, there are no
38
+ * AnimatedPanelProvider — every prop is keyed by side, there are no
39
39
  * explicit per-side props. `useShellPanels` produces the controlled subset
40
40
  * of these as `providerProps`. */
41
41
  export type ShellPanelControlProps = Pick<AnimatedSidebarProviderProps, "open" | "defaultOpen" | "onOpenChange" | "openMobile" | "defaultOpenMobile" | "onOpenMobileChange">;
@@ -60,7 +60,7 @@ export interface ShellPanelControls {
60
60
  /** Desktop-only convenience — the in-shell triggers already pick the
61
61
  * mobile state themselves when the viewport is narrow. */
62
62
  toggle: (side: SidebarSide) => void;
63
- /** Spread onto ShellLayout (or AnimatedSidebarProvider directly). */
63
+ /** Spread onto ShellLayout (or AnimatedPanelProvider directly). */
64
64
  providerProps: ShellPanelControlProps;
65
65
  }
66
66
  export interface ShellLayoutProps extends ShellPanelControlProps {
@@ -68,6 +68,93 @@ export interface ShellLayoutProps extends ShellPanelControlProps {
68
68
  /** Content for the shell's panels, keyed by the side. The shell renders
69
69
  * the `left` rail and the `right` drawer; other sides are reserved. */
70
70
  panels?: TPanelMap;
71
+ header?: ReactNode;
71
72
  className?: string;
72
73
  variant?: "web" | "desktop";
73
74
  }
75
+ export type SidebarSide = "left" | "right";
76
+ /** Open flags keyed by the side. Sides left out stay uncontrolled / at their
77
+ * default — there is no per-side prop, the record IS the API. */
78
+ export type SidebarOpenState = Partial<Record<SidebarSide, boolean>>;
79
+ export type SidebarVariant = "sidebar" | "floating" | "inset";
80
+ export type SidebarCollapsible = "offcanvas" | "icon" | "none";
81
+ export interface AnimatedSidebarContextValue {
82
+ isMobile: boolean;
83
+ layoutId: string;
84
+ /** Desktop open state, keyed by side. */
85
+ open: Record<SidebarSide, boolean>;
86
+ /** Mobile overlay open state, keyed by side. */
87
+ openMobile: Record<SidebarSide, boolean>;
88
+ reduce: boolean;
89
+ setOpen: (open: boolean, side: SidebarSide) => void;
90
+ setOpenMobile: (open: boolean, side: SidebarSide) => void;
91
+ /** Mobile-aware: toggles the overlay below md, the docked panel above. */
92
+ toggleSidebar: (side: SidebarSide) => void;
93
+ triggerRefs: Record<SidebarSide, React.RefObject<HTMLButtonElement | null>>;
94
+ }
95
+ export interface AnimatedSidebarProviderProps extends HTMLAttributes<HTMLDivElement> {
96
+ /** Controlled desktop open state, keyed by the side. A side left undefined
97
+ * stays uncontrolled. */
98
+ open?: SidebarOpenState;
99
+ /** Initial desktop open state, merged over `{ left: true, right: false }`. */
100
+ defaultOpen?: SidebarOpenState;
101
+ onOpenChange?: (open: boolean, side: SidebarSide) => void;
102
+ /** Controlled mobile overlay state, keyed by side. */
103
+ openMobile?: SidebarOpenState;
104
+ /** Initial mobile overlay state — every side starts closed. */
105
+ defaultOpenMobile?: SidebarOpenState;
106
+ onOpenMobileChange?: (open: boolean, side: SidebarSide) => void;
107
+ style?: SidebarProviderStyle;
108
+ }
109
+ export type SidebarProviderStyle = CSSProperties & {
110
+ "--sidebar-width"?: string;
111
+ "--sidebar-width-icon"?: string;
112
+ "--sidebar-width-mobile"?: string;
113
+ };
114
+ export type AnimatedSidebarInsetProps = HTMLMotionProps<"main">;
115
+ export interface AnimatedSidebarTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
116
+ side?: SidebarSide;
117
+ }
118
+ export interface AnimatedSidebarPanelContextValue {
119
+ collapsed: boolean;
120
+ collapsible: SidebarCollapsible;
121
+ side: SidebarSide;
122
+ }
123
+ export interface AnimatedSidebarProps extends Omit<HTMLMotionProps<"aside">, "children"> {
124
+ children?: ReactNode;
125
+ side?: SidebarSide;
126
+ variant?: SidebarVariant;
127
+ collapsible?: SidebarCollapsible;
128
+ ariaLabel?: string;
129
+ panelClassName?: string;
130
+ }
131
+ export interface AnimatedSidebarMenuSubProps extends Omit<HTMLMotionProps<"ul">, "children"> {
132
+ open: boolean;
133
+ children?: ReactNode;
134
+ }
135
+ export interface AnimatedSidebarMenuSubButtonProps {
136
+ children: ReactNode;
137
+ icon?: ReactNode;
138
+ href?: string;
139
+ isActive?: boolean;
140
+ disabled?: boolean;
141
+ closeOnSelect?: boolean;
142
+ target?: "_blank" | "_self" | "_parent" | "_top";
143
+ rel?: string;
144
+ onSelect?: () => void;
145
+ className?: string;
146
+ }
147
+ export interface AnimatedSidebarMenuButtonProps {
148
+ children: ReactNode;
149
+ icon?: ReactNode;
150
+ badge?: ReactNode;
151
+ href?: string;
152
+ isActive?: boolean;
153
+ ariaExpanded?: boolean;
154
+ disabled?: boolean;
155
+ closeOnSelect?: boolean;
156
+ target?: "_blank" | "_self" | "_parent" | "_top";
157
+ rel?: string;
158
+ onSelect?: () => void;
159
+ className?: string;
160
+ }
@@ -1 +1,38 @@
1
+ import { Variants } from 'motion/react';
2
+ import { AnimatedSidebarContextValue, AnimatedSidebarPanelContextValue } from './type';
1
3
  export declare const TITLE_BAR_HEIGHT = 48;
4
+ export declare const SIDEBAR_MORPH_TRANSITION: {
5
+ readonly type: "spring";
6
+ readonly stiffness: 380;
7
+ readonly damping: 35;
8
+ readonly mass: 0.75;
9
+ };
10
+ export declare const LABEL_ENTER_TRANSITION: {
11
+ readonly duration: 0.2;
12
+ readonly delay: 0.08;
13
+ readonly ease: readonly [0.16, 1, 0.3, 1];
14
+ };
15
+ export declare const LABEL_EXIT_TRANSITION: {
16
+ readonly duration: 0.12;
17
+ readonly ease: readonly [0.16, 1, 0.3, 1];
18
+ };
19
+ export declare const PANEL_TRANSITION: {
20
+ readonly duration: 0.36;
21
+ readonly ease: readonly [0.32, 0.72, 0, 1];
22
+ };
23
+ export declare const REDUCED_TRANSITION: {
24
+ readonly duration: 0.16;
25
+ readonly ease: readonly [0.16, 1, 0.3, 1];
26
+ };
27
+ export declare const SUBMENU_VARIANTS: Variants;
28
+ export declare const SUBMENU_ITEM_VARIANTS: Variants;
29
+ export declare const FOCUSABLE_SELECTOR: string;
30
+ export declare const MOBILE_QUERY = "(max-width: 767px)";
31
+ export declare const SIDEBAR_KEYBOARD_SHORTCUT = "b";
32
+ export declare const AnimatedSidebarContext: import('react').Context<AnimatedSidebarContextValue | null>;
33
+ export declare const AnimatedSidebarPanelContext: import('react').Context<AnimatedSidebarPanelContextValue | null>;
34
+ export declare function useAnimatedSidebar(): AnimatedSidebarContextValue;
35
+ export declare function getMobileSnapshot(): boolean;
36
+ export declare function getServerMobileSnapshot(): boolean;
37
+ export declare function useIsMobile(): boolean;
38
+ export declare function useAnimatedSidebarPanel(): AnimatedSidebarPanelContextValue;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ import { ReactNode } from 'react';
2
+ export type OverflowActionsSize = "sm" | "md";
3
+ export type OverflowActionItem = {
4
+ id: string;
5
+ label: ReactNode;
6
+ icon?: ReactNode;
7
+ onClick?: () => void;
8
+ disabled?: boolean;
9
+ ariaLabel?: string;
10
+ };
11
+ export type OverflowActionsClassNames = {
12
+ root?: string;
13
+ track?: string;
14
+ action?: string;
15
+ primaryAction?: string;
16
+ overflowAction?: string;
17
+ toggle?: string;
18
+ icon?: string;
19
+ label?: string;
20
+ };
21
+ export interface OverflowActionsProps {
22
+ primaryActions: OverflowActionItem[];
23
+ overflowActions: OverflowActionItem[];
24
+ expanded?: boolean;
25
+ defaultExpanded?: boolean;
26
+ onExpandedChange?: (expanded: boolean) => void;
27
+ onAction?: (item: OverflowActionItem) => void;
28
+ collapseOnAction?: boolean;
29
+ size?: OverflowActionsSize;
30
+ openLabel?: string;
31
+ closeLabel?: string;
32
+ className?: string;
33
+ classNames?: OverflowActionsClassNames;
34
+ }
35
+ export declare function OverflowActions({ primaryActions, overflowActions, expanded, defaultExpanded, onExpandedChange, onAction, collapseOnAction, size, openLabel, closeLabel, className, classNames, }: OverflowActionsProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { useRender } from '@base-ui/react/use-render';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { HTMLMotionProps } from 'framer-motion';
4
+ import { Separator } from './separator';
5
+ declare const buttonGroupVariants: (props?: ({
6
+ orientation?: "horizontal" | "vertical" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ declare function ButtonGroup({ className, orientation, ...props }: HTMLMotionProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react").JSX.Element;
9
+ declare function ButtonGroupText({ className, render, ...props }: useRender.ComponentProps<"div">): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
10
+ declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): import("react").JSX.Element;
11
+ export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };