@exegia/corpora-ui 0.25.0 → 0.27.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 (48) hide show
  1. package/dist-lib/components/blocks/shell/animated-panel-provider.d.ts +1 -1
  2. package/dist-lib/components/blocks/shell/shell-layout.d.ts +1 -1
  3. package/dist-lib/components/blocks/shell/type.d.ts +21 -1
  4. package/dist-lib/components/icons/__tests__/icons.test.d.ts +1 -0
  5. package/dist-lib/components/icons/file-badge-cfm.d.ts +7 -0
  6. package/dist-lib/components/icons/file-badge-corpus.d.ts +7 -0
  7. package/dist-lib/components/icons/file-badge-pdf.d.ts +7 -0
  8. package/dist-lib/components/icons/file-badge-tei.d.ts +7 -0
  9. package/dist-lib/components/icons/file-badge-tf.d.ts +7 -0
  10. package/dist-lib/components/icons/file-badge-txt.d.ts +7 -0
  11. package/dist-lib/components/icons/file-badge-xml.d.ts +7 -0
  12. package/dist-lib/components/icons/file-wordmark-cfm.d.ts +7 -0
  13. package/dist-lib/components/icons/file-wordmark-corpus.d.ts +7 -0
  14. package/dist-lib/components/icons/file-wordmark-pdf.d.ts +7 -0
  15. package/dist-lib/components/icons/file-wordmark-tei.d.ts +7 -0
  16. package/dist-lib/components/icons/file-wordmark-tf.d.ts +7 -0
  17. package/dist-lib/components/icons/file-wordmark-txt.d.ts +7 -0
  18. package/dist-lib/components/icons/file-wordmark-xml.d.ts +7 -0
  19. package/dist-lib/components/icons/index.d.ts +15 -0
  20. package/dist-lib/components/icons/types.d.ts +7 -0
  21. package/dist-lib/index.d.ts +1 -0
  22. package/dist-lib/index.js +9134 -1920
  23. package/dist-lib/index.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/components/blocks/shell/__tests__/shell-layout.test.tsx +65 -0
  26. package/src/components/blocks/shell/animated-panel-provider.tsx +2 -0
  27. package/src/components/blocks/shell/shell-layout.tsx +28 -16
  28. package/src/components/blocks/shell/type.ts +22 -0
  29. package/src/components/blocks/shell/use-shell-panels.ts +30 -1
  30. package/src/components/icons/README.md +91 -0
  31. package/src/components/icons/__tests__/icons.test.tsx +58 -0
  32. package/src/components/icons/file-badge-cfm.tsx +615 -0
  33. package/src/components/icons/file-badge-corpus.tsx +604 -0
  34. package/src/components/icons/file-badge-pdf.tsx +570 -0
  35. package/src/components/icons/file-badge-tei.tsx +524 -0
  36. package/src/components/icons/file-badge-tf.tsx +620 -0
  37. package/src/components/icons/file-badge-txt.tsx +607 -0
  38. package/src/components/icons/file-badge-xml.tsx +576 -0
  39. package/src/components/icons/file-wordmark-cfm.tsx +424 -0
  40. package/src/components/icons/file-wordmark-corpus.tsx +454 -0
  41. package/src/components/icons/file-wordmark-pdf.tsx +470 -0
  42. package/src/components/icons/file-wordmark-tei.tsx +424 -0
  43. package/src/components/icons/file-wordmark-tf.tsx +406 -0
  44. package/src/components/icons/file-wordmark-txt.tsx +421 -0
  45. package/src/components/icons/file-wordmark-xml.tsx +424 -0
  46. package/src/components/icons/index.ts +16 -0
  47. package/src/components/icons/types.ts +8 -0
  48. package/src/index.ts +3 -0
@@ -1,2 +1,2 @@
1
1
  import { AnimatedSidebarProviderProps } from './type';
2
- export declare function AnimatedPanelProvider({ children, shellId, defaultPanelWidth, open, defaultOpen, onOpenChange, openMobile, defaultOpenMobile, onOpenMobileChange, onNarrowChange, className, style, ...props }: AnimatedSidebarProviderProps): import("react").JSX.Element;
2
+ export declare function AnimatedPanelProvider({ children, shellId, defaultPanelWidth, open, defaultOpen, onOpenChange, openMobile, defaultOpenMobile, onOpenMobileChange, onNarrowChange, panelComponents: _panelComponents, className, style, ...props }: AnimatedSidebarProviderProps): import("react").JSX.Element;
@@ -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, header, defaultOpen, ...panelControlProps }: ShellLayoutProps): React.ReactElement;
3
+ export declare function ShellLayout({ children, variant, panels, className, header, trailing, defaultOpen, panelComponents, ...panelControlProps }: ShellLayoutProps): React.ReactElement;
@@ -97,11 +97,15 @@ export type TPanelSide = IPanel["side"];
97
97
  * key. Where an entry's own `side` field disagrees with its key, the key
98
98
  * wins. */
99
99
  export type TPanelMap<Side extends TPanelSide = TPanelSide> = Partial<Record<Side, IPanel>>;
100
+ /** Dynamic panel content keyed by side — filled by
101
+ * `useShellPanels().openPanel(side, component)` and read by ShellLayout,
102
+ * where a side's entry wins over the static `panels` map's `component`. */
103
+ export type SidebarComponentMap = Partial<Record<SidebarSide, ReactNode>>;
100
104
  /** The open/close surface of the shell's panels, lifted straight from
101
105
  * AnimatedPanelProvider — every prop is keyed by side, there are no
102
106
  * explicit per-side props. `useShellPanels` produces the controlled subset
103
107
  * of these as `providerProps`. */
104
- export type ShellPanelControlProps = Pick<AnimatedSidebarProviderProps, "open" | "defaultOpen" | "onOpenChange" | "openMobile" | "defaultOpenMobile" | "onOpenMobileChange" | "shellId" | "defaultPanelWidth">;
108
+ export type ShellPanelControlProps = Pick<AnimatedSidebarProviderProps, "open" | "defaultOpen" | "onOpenChange" | "openMobile" | "defaultOpenMobile" | "onOpenMobileChange" | "shellId" | "defaultPanelWidth" | "panelComponents">;
105
109
  export interface UseShellPanelsOptions {
106
110
  /** The id the shell's fit state is filed under. Name it to read the same
107
111
  * shell from elsewhere (`useShellFitState("app-shell")`) and to keep a
@@ -149,6 +153,13 @@ export interface ShellPanelControls {
149
153
  * mobile state themselves when the viewport is narrow. Carries the same
150
154
  * `isNarrow` refusal as `setOpen`. */
151
155
  toggle: (side: SidebarSide) => void;
156
+ /** Open a side's panel and, when given, swap in the content it shows.
157
+ * The component travels through `providerProps.panelComponents` into
158
+ * ShellLayout, where it wins over the static `panels` entry for that
159
+ * side, and sticks until the next `openPanel(side, component)` replaces
160
+ * it — closing the panel leaves it in place for the exit animation and
161
+ * the next open. Carries the same `isNarrow` refusal as `setOpen`. */
162
+ openPanel: (side: SidebarSide, component?: ReactNode) => void;
152
163
  /** Spread onto ShellLayout (or AnimatedPanelProvider directly). */
153
164
  providerProps: ShellPanelControlProps;
154
165
  }
@@ -158,6 +169,10 @@ export interface ShellLayoutProps extends ShellPanelControlProps {
158
169
  * the `left` rail and the `right` drawer; other sides are reserved. */
159
170
  panels?: TPanelMap;
160
171
  header?: ReactNode;
172
+ /** Actions pinned to the header's right edge, rendered just before the
173
+ * right panel's trigger. The cluster hugs the trailing edge no matter
174
+ * which of `header` / the left rail / the right panel are present. */
175
+ trailing?: ReactNode;
161
176
  className?: string;
162
177
  variant?: "web" | "desktop";
163
178
  }
@@ -205,6 +220,11 @@ export interface AnimatedSidebarProviderProps extends HTMLAttributes<HTMLDivElem
205
220
  /** Initial mobile overlay state — every side starts closed. */
206
221
  defaultOpenMobile?: SidebarOpenState;
207
222
  onOpenMobileChange?: (open: boolean, side: SidebarSide) => void;
223
+ /** Content pushed into a side's panel by `useShellPanels().openPanel`. It
224
+ * rides along in `providerProps` so the record can be spread on either
225
+ * surface: ShellLayout renders it in that side's panel; the bare provider
226
+ * renders no panels, so it only swallows the prop to keep it off the DOM. */
227
+ panelComponents?: SidebarComponentMap;
208
228
  /** Fires when the shell crosses the width a secondary panel needs (rail +
209
229
  * body + panel at their floors). An imperative escape hatch for a consumer
210
230
  * that mounts the provider on its own; anything under `ExegiaProvider` can
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * CFM file icon — badge variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileBadgeCfm({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileBadgeCfm;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * Corpus file icon — badge variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileBadgeCorpus({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileBadgeCorpus;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * PDF file icon — badge variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileBadgePdf({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileBadgePdf;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * TEI file icon — badge variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileBadgeTei({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileBadgeTei;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * TF file icon — badge variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileBadgeTf({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileBadgeTf;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * TXT file icon — badge variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileBadgeTxt({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileBadgeTxt;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * XML file icon — badge variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileBadgeXml({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileBadgeXml;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * CFM file icon — wordmark variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileWordmarkCfm({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileWordmarkCfm;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * Corpus file icon — wordmark variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileWordmarkCorpus({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileWordmarkCorpus;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * PDF file icon — wordmark variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileWordmarkPdf({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileWordmarkPdf;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * TEI file icon — wordmark variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileWordmarkTei({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileWordmarkTei;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * TF file icon — wordmark variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileWordmarkTf({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileWordmarkTf;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * TXT file icon — wordmark variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileWordmarkTxt({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileWordmarkTxt;
@@ -0,0 +1,7 @@
1
+ import { FileIconProps } from './types';
2
+ /**
3
+ * XML file icon — wordmark variant.
4
+ * Light/dark artwork layers switch on Tailwind's `dark` variant.
5
+ */
6
+ export declare function FileWordmarkXml({ size, title, className, ...props }: FileIconProps): import("react").JSX.Element;
7
+ export default FileWordmarkXml;
@@ -0,0 +1,15 @@
1
+ export type { FileIconProps } from './types';
2
+ export { FileBadgeCfm } from './file-badge-cfm';
3
+ export { FileBadgeCorpus } from './file-badge-corpus';
4
+ export { FileBadgePdf } from './file-badge-pdf';
5
+ export { FileBadgeTei } from './file-badge-tei';
6
+ export { FileBadgeTf } from './file-badge-tf';
7
+ export { FileBadgeTxt } from './file-badge-txt';
8
+ export { FileBadgeXml } from './file-badge-xml';
9
+ export { FileWordmarkCfm } from './file-wordmark-cfm';
10
+ export { FileWordmarkCorpus } from './file-wordmark-corpus';
11
+ export { FileWordmarkPdf } from './file-wordmark-pdf';
12
+ export { FileWordmarkTei } from './file-wordmark-tei';
13
+ export { FileWordmarkTf } from './file-wordmark-tf';
14
+ export { FileWordmarkTxt } from './file-wordmark-txt';
15
+ export { FileWordmarkXml } from './file-wordmark-xml';
@@ -0,0 +1,7 @@
1
+ import { SVGProps } from 'react';
2
+ export interface FileIconProps extends Omit<SVGProps<SVGSVGElement>, 'width' | 'height'> {
3
+ /** Rendered width and height. Defaults to 64. */
4
+ size?: number | string;
5
+ /** Accessible name. Pass `null` to mark the icon decorative. */
6
+ title?: string | null;
7
+ }
@@ -20,6 +20,7 @@ export * from './components/ui/separator';
20
20
  export * from './components/ui/skeleton';
21
21
  export * from './components/ui/spinner';
22
22
  export * from './components/ui/textarea';
23
+ export * from './components/icons';
23
24
  export * from './components/composed/logo';
24
25
  export * from './components/composed/password-input';
25
26
  export * from './components/composed/social-providers';