@miethe/ui 0.2.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 (251) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/README.md +1536 -0
  3. package/dist/bulk-actions/Button.d.ts +28 -0
  4. package/dist/bulk-actions/Button.d.ts.map +1 -0
  5. package/dist/bulk-actions/Button.js +45 -0
  6. package/dist/bulk-actions/Button.js.map +1 -0
  7. package/dist/bulk-actions/bulk-action-bar.d.ts +91 -0
  8. package/dist/bulk-actions/bulk-action-bar.d.ts.map +1 -0
  9. package/dist/bulk-actions/bulk-action-bar.js +94 -0
  10. package/dist/bulk-actions/bulk-action-bar.js.map +1 -0
  11. package/dist/bulk-actions/index.d.ts +5 -0
  12. package/dist/bulk-actions/index.d.ts.map +1 -0
  13. package/dist/bulk-actions/index.js +7 -0
  14. package/dist/bulk-actions/index.js.map +1 -0
  15. package/dist/bulk-actions/utils.d.ts +6 -0
  16. package/dist/bulk-actions/utils.d.ts.map +1 -0
  17. package/dist/bulk-actions/utils.js +9 -0
  18. package/dist/bulk-actions/utils.js.map +1 -0
  19. package/dist/components/ui/alert.d.ts +9 -0
  20. package/dist/components/ui/alert.d.ts.map +1 -0
  21. package/dist/components/ui/alert.js +23 -0
  22. package/dist/components/ui/alert.js.map +1 -0
  23. package/dist/components/ui/button.d.ts +12 -0
  24. package/dist/components/ui/button.d.ts.map +1 -0
  25. package/dist/components/ui/button.js +34 -0
  26. package/dist/components/ui/button.js.map +1 -0
  27. package/dist/components/ui/collapsible.d.ts +6 -0
  28. package/dist/components/ui/collapsible.d.ts.map +1 -0
  29. package/dist/components/ui/collapsible.js +7 -0
  30. package/dist/components/ui/collapsible.js.map +1 -0
  31. package/dist/components/ui/skeleton.d.ts +4 -0
  32. package/dist/components/ui/skeleton.d.ts.map +1 -0
  33. package/dist/components/ui/skeleton.js +7 -0
  34. package/dist/components/ui/skeleton.js.map +1 -0
  35. package/dist/content-viewer/ContentPane.d.ts +107 -0
  36. package/dist/content-viewer/ContentPane.d.ts.map +1 -0
  37. package/dist/content-viewer/ContentPane.js +247 -0
  38. package/dist/content-viewer/ContentPane.js.map +1 -0
  39. package/dist/content-viewer/ContentViewerProvider.d.ts +83 -0
  40. package/dist/content-viewer/ContentViewerProvider.d.ts.map +1 -0
  41. package/dist/content-viewer/ContentViewerProvider.js +92 -0
  42. package/dist/content-viewer/ContentViewerProvider.js.map +1 -0
  43. package/dist/content-viewer/FileTree.d.ts +71 -0
  44. package/dist/content-viewer/FileTree.d.ts.map +1 -0
  45. package/dist/content-viewer/FileTree.js +294 -0
  46. package/dist/content-viewer/FileTree.js.map +1 -0
  47. package/dist/content-viewer/adapters.d.ts +101 -0
  48. package/dist/content-viewer/adapters.d.ts.map +1 -0
  49. package/dist/content-viewer/adapters.js +32 -0
  50. package/dist/content-viewer/adapters.js.map +1 -0
  51. package/dist/content-viewer/index.d.ts +8 -0
  52. package/dist/content-viewer/index.d.ts.map +1 -0
  53. package/dist/content-viewer/index.js +5 -0
  54. package/dist/content-viewer/index.js.map +1 -0
  55. package/dist/diff/DiffViewer.d.ts +112 -0
  56. package/dist/diff/DiffViewer.d.ts.map +1 -0
  57. package/dist/diff/DiffViewer.js +414 -0
  58. package/dist/diff/DiffViewer.js.map +1 -0
  59. package/dist/diff/diff.d.ts +32 -0
  60. package/dist/diff/diff.d.ts.map +1 -0
  61. package/dist/diff/diff.js +8 -0
  62. package/dist/diff/diff.js.map +1 -0
  63. package/dist/diff/index.d.ts +4 -0
  64. package/dist/diff/index.d.ts.map +1 -0
  65. package/dist/diff/index.js +3 -0
  66. package/dist/diff/index.js.map +1 -0
  67. package/dist/display/FilePreviewPane.d.ts +31 -0
  68. package/dist/display/FilePreviewPane.d.ts.map +1 -0
  69. package/dist/display/FilePreviewPane.js +144 -0
  70. package/dist/display/FilePreviewPane.js.map +1 -0
  71. package/dist/display/FrontmatterDisplay.d.ts +33 -0
  72. package/dist/display/FrontmatterDisplay.d.ts.map +1 -0
  73. package/dist/display/FrontmatterDisplay.js +79 -0
  74. package/dist/display/FrontmatterDisplay.js.map +1 -0
  75. package/dist/display/index.d.ts +5 -0
  76. package/dist/display/index.d.ts.map +1 -0
  77. package/dist/display/index.js +4 -0
  78. package/dist/display/index.js.map +1 -0
  79. package/dist/editor/MarkdownEditor.d.ts +28 -0
  80. package/dist/editor/MarkdownEditor.d.ts.map +1 -0
  81. package/dist/editor/MarkdownEditor.js +160 -0
  82. package/dist/editor/MarkdownEditor.js.map +1 -0
  83. package/dist/editor/SplitPreview.d.ts +28 -0
  84. package/dist/editor/SplitPreview.d.ts.map +1 -0
  85. package/dist/editor/SplitPreview.js +34 -0
  86. package/dist/editor/SplitPreview.js.map +1 -0
  87. package/dist/editor/index.d.ts +5 -0
  88. package/dist/editor/index.d.ts.map +1 -0
  89. package/dist/editor/index.js +4 -0
  90. package/dist/editor/index.js.map +1 -0
  91. package/dist/filters/filters-dropdown.d.ts +24 -0
  92. package/dist/filters/filters-dropdown.d.ts.map +1 -0
  93. package/dist/filters/filters-dropdown.js +36 -0
  94. package/dist/filters/filters-dropdown.js.map +1 -0
  95. package/dist/filters/index.d.ts +9 -0
  96. package/dist/filters/index.d.ts.map +1 -0
  97. package/dist/filters/index.js +5 -0
  98. package/dist/filters/index.js.map +1 -0
  99. package/dist/filters/sort-dropdown.d.ts +13 -0
  100. package/dist/filters/sort-dropdown.d.ts.map +1 -0
  101. package/dist/filters/sort-dropdown.js +20 -0
  102. package/dist/filters/sort-dropdown.js.map +1 -0
  103. package/dist/filters/tag-filter-popover.d.ts +39 -0
  104. package/dist/filters/tag-filter-popover.d.ts.map +1 -0
  105. package/dist/filters/tag-filter-popover.js +72 -0
  106. package/dist/filters/tag-filter-popover.js.map +1 -0
  107. package/dist/filters/tool-filter-popover.d.ts +42 -0
  108. package/dist/filters/tool-filter-popover.d.ts.map +1 -0
  109. package/dist/filters/tool-filter-popover.js +67 -0
  110. package/dist/filters/tool-filter-popover.js.map +1 -0
  111. package/dist/hooks/use-debounce.d.ts +9 -0
  112. package/dist/hooks/use-debounce.d.ts.map +1 -0
  113. package/dist/hooks/use-debounce.js +21 -0
  114. package/dist/hooks/use-debounce.js.map +1 -0
  115. package/dist/hooks/use-intersection-observer.d.ts +11 -0
  116. package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
  117. package/dist/hooks/use-intersection-observer.js +25 -0
  118. package/dist/hooks/use-intersection-observer.js.map +1 -0
  119. package/dist/index.d.ts +10 -0
  120. package/dist/index.d.ts.map +1 -0
  121. package/dist/index.js +10 -0
  122. package/dist/index.js.map +1 -0
  123. package/dist/pickers/EntityPickerDialog.d.ts +233 -0
  124. package/dist/pickers/EntityPickerDialog.d.ts.map +1 -0
  125. package/dist/pickers/EntityPickerDialog.js +355 -0
  126. package/dist/pickers/EntityPickerDialog.js.map +1 -0
  127. package/dist/pickers/EntityPickerViewToggle.d.ts +8 -0
  128. package/dist/pickers/EntityPickerViewToggle.d.ts.map +1 -0
  129. package/dist/pickers/EntityPickerViewToggle.js +17 -0
  130. package/dist/pickers/EntityPickerViewToggle.js.map +1 -0
  131. package/dist/pickers/index.d.ts +5 -0
  132. package/dist/pickers/index.d.ts.map +1 -0
  133. package/dist/pickers/index.js +3 -0
  134. package/dist/pickers/index.js.map +1 -0
  135. package/dist/primitives/Badge.d.ts +16 -0
  136. package/dist/primitives/Badge.d.ts.map +1 -0
  137. package/dist/primitives/Badge.js +43 -0
  138. package/dist/primitives/Badge.js.map +1 -0
  139. package/dist/primitives/BaseArtifactModal.d.ts +114 -0
  140. package/dist/primitives/BaseArtifactModal.d.ts.map +1 -0
  141. package/dist/primitives/BaseArtifactModal.js +76 -0
  142. package/dist/primitives/BaseArtifactModal.js.map +1 -0
  143. package/dist/primitives/Dialog.d.ts +20 -0
  144. package/dist/primitives/Dialog.d.ts.map +1 -0
  145. package/dist/primitives/Dialog.js +24 -0
  146. package/dist/primitives/Dialog.js.map +1 -0
  147. package/dist/primitives/DropdownMenu.d.ts +28 -0
  148. package/dist/primitives/DropdownMenu.d.ts.map +1 -0
  149. package/dist/primitives/DropdownMenu.js +34 -0
  150. package/dist/primitives/DropdownMenu.js.map +1 -0
  151. package/dist/primitives/EnterpriseOwnerBadge.d.ts +9 -0
  152. package/dist/primitives/EnterpriseOwnerBadge.d.ts.map +1 -0
  153. package/dist/primitives/EnterpriseOwnerBadge.js +12 -0
  154. package/dist/primitives/EnterpriseOwnerBadge.js.map +1 -0
  155. package/dist/primitives/GroupedSelect.d.ts +30 -0
  156. package/dist/primitives/GroupedSelect.d.ts.map +1 -0
  157. package/dist/primitives/GroupedSelect.js +47 -0
  158. package/dist/primitives/GroupedSelect.js.map +1 -0
  159. package/dist/primitives/Input.d.ts +6 -0
  160. package/dist/primitives/Input.d.ts.map +1 -0
  161. package/dist/primitives/Input.js +9 -0
  162. package/dist/primitives/Input.js.map +1 -0
  163. package/dist/primitives/LockIcon.d.ts +11 -0
  164. package/dist/primitives/LockIcon.d.ts.map +1 -0
  165. package/dist/primitives/LockIcon.js +15 -0
  166. package/dist/primitives/LockIcon.js.map +1 -0
  167. package/dist/primitives/MaskedSecretInput.d.ts +16 -0
  168. package/dist/primitives/MaskedSecretInput.d.ts.map +1 -0
  169. package/dist/primitives/MaskedSecretInput.js +42 -0
  170. package/dist/primitives/MaskedSecretInput.js.map +1 -0
  171. package/dist/primitives/ModalHeader.d.ts +66 -0
  172. package/dist/primitives/ModalHeader.d.ts.map +1 -0
  173. package/dist/primitives/ModalHeader.js +58 -0
  174. package/dist/primitives/ModalHeader.js.map +1 -0
  175. package/dist/primitives/Popover.d.ts +9 -0
  176. package/dist/primitives/Popover.d.ts.map +1 -0
  177. package/dist/primitives/Popover.js +13 -0
  178. package/dist/primitives/Popover.js.map +1 -0
  179. package/dist/primitives/ScrollArea.d.ts +6 -0
  180. package/dist/primitives/ScrollArea.d.ts.map +1 -0
  181. package/dist/primitives/ScrollArea.js +11 -0
  182. package/dist/primitives/ScrollArea.js.map +1 -0
  183. package/dist/primitives/SearchableCombobox.d.ts +30 -0
  184. package/dist/primitives/SearchableCombobox.d.ts.map +1 -0
  185. package/dist/primitives/SearchableCombobox.js +124 -0
  186. package/dist/primitives/SearchableCombobox.js.map +1 -0
  187. package/dist/primitives/SearchablePickerDialog.d.ts +20 -0
  188. package/dist/primitives/SearchablePickerDialog.d.ts.map +1 -0
  189. package/dist/primitives/SearchablePickerDialog.js +78 -0
  190. package/dist/primitives/SearchablePickerDialog.js.map +1 -0
  191. package/dist/primitives/StatusBadge.d.ts +21 -0
  192. package/dist/primitives/StatusBadge.d.ts.map +1 -0
  193. package/dist/primitives/StatusBadge.js +25 -0
  194. package/dist/primitives/StatusBadge.js.map +1 -0
  195. package/dist/primitives/TabNavigation.d.ts +68 -0
  196. package/dist/primitives/TabNavigation.d.ts.map +1 -0
  197. package/dist/primitives/TabNavigation.js +74 -0
  198. package/dist/primitives/TabNavigation.js.map +1 -0
  199. package/dist/primitives/Tabs.d.ts +8 -0
  200. package/dist/primitives/Tabs.d.ts.map +1 -0
  201. package/dist/primitives/Tabs.js +14 -0
  202. package/dist/primitives/Tabs.js.map +1 -0
  203. package/dist/primitives/Tooltip.d.ts +8 -0
  204. package/dist/primitives/Tooltip.d.ts.map +1 -0
  205. package/dist/primitives/Tooltip.js +12 -0
  206. package/dist/primitives/Tooltip.js.map +1 -0
  207. package/dist/primitives/VerticalTabNavigation.d.ts +75 -0
  208. package/dist/primitives/VerticalTabNavigation.d.ts.map +1 -0
  209. package/dist/primitives/VerticalTabNavigation.js +166 -0
  210. package/dist/primitives/VerticalTabNavigation.js.map +1 -0
  211. package/dist/primitives/ViewModeToggle.d.ts +12 -0
  212. package/dist/primitives/ViewModeToggle.d.ts.map +1 -0
  213. package/dist/primitives/ViewModeToggle.js +56 -0
  214. package/dist/primitives/ViewModeToggle.js.map +1 -0
  215. package/dist/primitives/WizardShell.d.ts +81 -0
  216. package/dist/primitives/WizardShell.d.ts.map +1 -0
  217. package/dist/primitives/WizardShell.js +73 -0
  218. package/dist/primitives/WizardShell.js.map +1 -0
  219. package/dist/primitives/index.d.ts +38 -0
  220. package/dist/primitives/index.d.ts.map +1 -0
  221. package/dist/primitives/index.js +24 -0
  222. package/dist/primitives/index.js.map +1 -0
  223. package/dist/primitives/utils.d.ts +6 -0
  224. package/dist/primitives/utils.d.ts.map +1 -0
  225. package/dist/primitives/utils.js +9 -0
  226. package/dist/primitives/utils.js.map +1 -0
  227. package/dist/types/index.d.ts +63 -0
  228. package/dist/types/index.d.ts.map +1 -0
  229. package/dist/types/index.js +9 -0
  230. package/dist/types/index.js.map +1 -0
  231. package/dist/utils/frontmatter.d.ts +63 -0
  232. package/dist/utils/frontmatter.d.ts.map +1 -0
  233. package/dist/utils/frontmatter.js +345 -0
  234. package/dist/utils/frontmatter.js.map +1 -0
  235. package/dist/utils/index.d.ts +6 -0
  236. package/dist/utils/index.d.ts.map +1 -0
  237. package/dist/utils/index.js +6 -0
  238. package/dist/utils/index.js.map +1 -0
  239. package/dist/utils/perf-marks.d.ts +28 -0
  240. package/dist/utils/perf-marks.d.ts.map +1 -0
  241. package/dist/utils/perf-marks.js +45 -0
  242. package/dist/utils/perf-marks.js.map +1 -0
  243. package/dist/utils/readme-utils.d.ts +67 -0
  244. package/dist/utils/readme-utils.d.ts.map +1 -0
  245. package/dist/utils/readme-utils.js +164 -0
  246. package/dist/utils/readme-utils.js.map +1 -0
  247. package/dist/utils/type-colors.d.ts +70 -0
  248. package/dist/utils/type-colors.d.ts.map +1 -0
  249. package/dist/utils/type-colors.js +118 -0
  250. package/dist/utils/type-colors.js.map +1 -0
  251. package/package.json +131 -0
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Button — minimal shadcn-compatible button primitive for the bulk-actions submodule.
3
+ *
4
+ * Mirrors the API of the shadcn `Button` component with `variant` and `size`
5
+ * props backed by `class-variance-authority`. Self-contained within the
6
+ * `@miethe/ui/bulk-actions` subpath — no cross-submodule imports required.
7
+ */
8
+ import * as React from 'react';
9
+ import { type VariantProps } from 'class-variance-authority';
10
+ declare const buttonVariants: (props?: ({
11
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
12
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
13
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
14
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
15
+ /**
16
+ * When true, the Button renders its child element directly via Radix Slot,
17
+ * forwarding all props and the ref. Useful for composing with anchor tags.
18
+ * @default false
19
+ */
20
+ asChild?: boolean;
21
+ }
22
+ /**
23
+ * A polymorphic button primitive supporting CVA-driven variants and sizes.
24
+ * Forwards refs to the underlying `<button>` element (or slotted child).
25
+ */
26
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
27
+ export { Button, buttonVariants };
28
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/bulk-actions/Button.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,cAAc;;;8EA0BnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,QAAA,MAAM,MAAM,uFAOX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Button — minimal shadcn-compatible button primitive for the bulk-actions submodule.
4
+ *
5
+ * Mirrors the API of the shadcn `Button` component with `variant` and `size`
6
+ * props backed by `class-variance-authority`. Self-contained within the
7
+ * `@miethe/ui/bulk-actions` subpath — no cross-submodule imports required.
8
+ */
9
+ import * as React from 'react';
10
+ import { Slot } from '@radix-ui/react-slot';
11
+ import { cva } from 'class-variance-authority';
12
+ import { cn } from './utils';
13
+ const buttonVariants = cva('inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', {
14
+ variants: {
15
+ variant: {
16
+ default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
17
+ destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
18
+ outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
19
+ secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
20
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
21
+ link: 'text-primary underline-offset-4 hover:underline',
22
+ },
23
+ size: {
24
+ default: 'h-9 px-4 py-2',
25
+ sm: 'h-8 rounded-md px-3 text-xs',
26
+ lg: 'h-10 rounded-md px-8',
27
+ icon: 'h-9 w-9',
28
+ },
29
+ },
30
+ defaultVariants: {
31
+ variant: 'default',
32
+ size: 'default',
33
+ },
34
+ });
35
+ /**
36
+ * A polymorphic button primitive supporting CVA-driven variants and sizes.
37
+ * Forwards refs to the underlying `<button>` element (or slotted child).
38
+ */
39
+ const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
40
+ const Comp = asChild ? Slot : 'button';
41
+ return (_jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
42
+ });
43
+ Button.displayName = 'Button';
44
+ export { Button, buttonVariants };
45
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/bulk-actions/Button.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,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/**
2
+ * BulkActionBar
3
+ *
4
+ * Generic floating bulk action bar that appears when items are selected.
5
+ * Renders fixed at the bottom-center of the viewport with a smooth slide-up
6
+ * transition when `hasSelection` becomes true.
7
+ *
8
+ * This component is fully props-driven with no dependencies on SkillMeat
9
+ * services, hooks, or API clients — it is safe to use in any React project
10
+ * that includes Tailwind CSS and lucide-react.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * const actions: BulkAction[] = [
15
+ * {
16
+ * id: 'delete',
17
+ * label: 'Delete',
18
+ * icon: <Trash2 className="h-3.5 w-3.5" />,
19
+ * variant: 'destructive',
20
+ * onClick: handleDelete,
21
+ * },
22
+ * ];
23
+ *
24
+ * <BulkActionBar
25
+ * selectedCount={selected.size}
26
+ * hasSelection={selected.size > 0}
27
+ * actions={actions}
28
+ * onClearSelection={() => setSelected(new Set())}
29
+ * />
30
+ * ```
31
+ *
32
+ * Accessibility:
33
+ * - role="toolbar" with aria-label describing the selection count
34
+ * - aria-hidden when not visible
35
+ * - aria-live region announces selection count changes
36
+ * - Each button has an explicit aria-label
37
+ * - Clear button is keyboard-reachable and labelled
38
+ */
39
+ import * as React from 'react';
40
+ /**
41
+ * Defines a single action button rendered inside the BulkActionBar.
42
+ */
43
+ export interface BulkAction {
44
+ /** Unique identifier for this action. Used as the React key and loading state key. */
45
+ id: string;
46
+ /** Human-readable label displayed on the button. */
47
+ label: string;
48
+ /** Optional icon rendered to the left of the label. */
49
+ icon?: React.ReactNode;
50
+ /**
51
+ * Visual variant for the button.
52
+ * @default 'ghost'
53
+ */
54
+ variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost';
55
+ /**
56
+ * Called when the user clicks the action button.
57
+ * May return a Promise — the button enters a loading state until the promise
58
+ * resolves or rejects.
59
+ */
60
+ onClick: () => void | Promise<void>;
61
+ /** When true, the button is rendered in a disabled state. */
62
+ disabled?: boolean;
63
+ }
64
+ /**
65
+ * Props for the BulkActionBar component.
66
+ */
67
+ export interface BulkActionBarProps {
68
+ /** Number of currently selected items. Shown in the count label and used in aria-labels. */
69
+ selectedCount: number;
70
+ /**
71
+ * Controls visibility.
72
+ * - `true` → slide up into view (opacity 100, pointer-events enabled)
73
+ * - `false` → slide down out of view (opacity 0, pointer-events disabled)
74
+ */
75
+ hasSelection: boolean;
76
+ /** Action buttons to render in the bar, in order. */
77
+ actions: BulkAction[];
78
+ /** Called when the user clicks the Clear / X button to deselect all items. */
79
+ onClearSelection: () => void;
80
+ /** Optional extra className applied to the outer fixed positioning wrapper. */
81
+ className?: string;
82
+ }
83
+ /**
84
+ * Floating bulk action toolbar that slides up from the bottom of the viewport
85
+ * whenever one or more items are selected.
86
+ *
87
+ * Handles async action callbacks with per-action loading spinners and global
88
+ * disabled state during in-flight requests.
89
+ */
90
+ export declare function BulkActionBar({ selectedCount, hasSelection, actions, onClearSelection, className, }: BulkActionBarProps): import("react/jsx-runtime").JSX.Element;
91
+ //# sourceMappingURL=bulk-action-bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bulk-action-bar.d.ts","sourceRoot":"","sources":["../../src/bulk-actions/bulk-action-bar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,sFAAsF;IACtF,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;IACxE;;;;OAIG;IACH,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,4FAA4F;IAC5F,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB,qDAAqD;IACrD,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,8EAA8E;IAC9E,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAC5B,aAAa,EACb,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,SAAS,GACV,EAAE,kBAAkB,2CAwGpB"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * BulkActionBar
3
+ *
4
+ * Generic floating bulk action bar that appears when items are selected.
5
+ * Renders fixed at the bottom-center of the viewport with a smooth slide-up
6
+ * transition when `hasSelection` becomes true.
7
+ *
8
+ * This component is fully props-driven with no dependencies on SkillMeat
9
+ * services, hooks, or API clients — it is safe to use in any React project
10
+ * that includes Tailwind CSS and lucide-react.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * const actions: BulkAction[] = [
15
+ * {
16
+ * id: 'delete',
17
+ * label: 'Delete',
18
+ * icon: <Trash2 className="h-3.5 w-3.5" />,
19
+ * variant: 'destructive',
20
+ * onClick: handleDelete,
21
+ * },
22
+ * ];
23
+ *
24
+ * <BulkActionBar
25
+ * selectedCount={selected.size}
26
+ * hasSelection={selected.size > 0}
27
+ * actions={actions}
28
+ * onClearSelection={() => setSelected(new Set())}
29
+ * />
30
+ * ```
31
+ *
32
+ * Accessibility:
33
+ * - role="toolbar" with aria-label describing the selection count
34
+ * - aria-hidden when not visible
35
+ * - aria-live region announces selection count changes
36
+ * - Each button has an explicit aria-label
37
+ * - Clear button is keyboard-reachable and labelled
38
+ */
39
+ 'use client';
40
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
41
+ import * as React from 'react';
42
+ import { X, Loader2 } from 'lucide-react';
43
+ import { cn } from './utils';
44
+ import { Button } from './Button';
45
+ // ---------------------------------------------------------------------------
46
+ // BulkActionBar
47
+ // ---------------------------------------------------------------------------
48
+ /**
49
+ * Floating bulk action toolbar that slides up from the bottom of the viewport
50
+ * whenever one or more items are selected.
51
+ *
52
+ * Handles async action callbacks with per-action loading spinners and global
53
+ * disabled state during in-flight requests.
54
+ */
55
+ export function BulkActionBar({ selectedCount, hasSelection, actions, onClearSelection, className, }) {
56
+ // Track which action id is currently loading.
57
+ const [loadingId, setLoadingId] = React.useState(null);
58
+ // Dismiss on Escape when the bar is visible (C1 — keyboard accessibility)
59
+ React.useEffect(() => {
60
+ if (!hasSelection)
61
+ return;
62
+ function handleKeyDown(e) {
63
+ if (e.key === 'Escape') {
64
+ onClearSelection();
65
+ }
66
+ }
67
+ document.addEventListener('keydown', handleKeyDown);
68
+ return () => document.removeEventListener('keydown', handleKeyDown);
69
+ }, [hasSelection, onClearSelection]);
70
+ const isAnyLoading = loadingId !== null;
71
+ async function handleAction(action) {
72
+ if (isAnyLoading || action.disabled)
73
+ return;
74
+ setLoadingId(action.id);
75
+ try {
76
+ await action.onClick();
77
+ }
78
+ finally {
79
+ setLoadingId(null);
80
+ }
81
+ }
82
+ const itemLabel = selectedCount === 1 ? 'item' : 'items';
83
+ return (_jsx("div", { className: cn(
84
+ // Positioning — fixed to bottom, centered
85
+ 'fixed bottom-6 left-1/2 -translate-x-1/2 z-50',
86
+ // Visibility transition (slide + fade)
87
+ 'transition-all duration-200 ease-out', hasSelection
88
+ ? 'translate-y-0 opacity-100 pointer-events-auto'
89
+ : 'translate-y-4 opacity-0 pointer-events-none', className), "aria-hidden": !hasSelection, children: _jsxs("div", { className: cn('flex items-center gap-2 rounded-xl border border-border/60', 'bg-background/95 backdrop-blur-sm shadow-xl px-4 py-2.5'), role: "toolbar", "aria-label": `Bulk actions for ${selectedCount} selected ${itemLabel}`, children: [_jsx("span", { className: "text-sm font-medium text-foreground pr-2 border-r border-border/50 mr-1", children: _jsxs("span", { "aria-live": "polite", "aria-atomic": "true", children: [selectedCount, " selected"] }) }), actions.map((action) => {
90
+ const isCurrentlyLoading = loadingId === action.id;
91
+ return (_jsxs(Button, { variant: action.variant ?? 'ghost', size: "sm", className: cn('h-8 gap-1.5 text-sm font-medium px-2.5', isCurrentlyLoading && 'opacity-70'), disabled: isAnyLoading || !!action.disabled, "aria-label": `${action.label} ${selectedCount} selected ${itemLabel}`, onClick: () => handleAction(action), children: [isCurrentlyLoading ? (_jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin", "aria-hidden": "true" })) : action.icon != null ? (_jsx("span", { className: "h-3.5 w-3.5 flex items-center justify-center", "aria-hidden": "true", children: action.icon })) : null, action.label] }, action.id));
92
+ }), _jsx("div", { className: "h-5 w-px bg-border/50 mx-1", "aria-hidden": "true" }), _jsx(Button, { variant: "ghost", size: "icon", className: "h-7 w-7 text-muted-foreground hover:text-foreground", "aria-label": "Clear selection", onClick: onClearSelection, disabled: isAnyLoading, children: _jsx(X, { className: "h-3.5 w-3.5", "aria-hidden": "true" }) })] }) }));
93
+ }
94
+ //# sourceMappingURL=bulk-action-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bulk-action-bar.js","sourceRoot":"","sources":["../../src/bulk-actions/bulk-action-bar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAmDlC,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,aAAa,EACb,YAAY,EACZ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Q,EAAE,YAAY,YAEtB,KAAC,CAAC,IAAC,SAAS,EAAC,aAAa,iBAAa,MAAM,GAAG,GACzC,IACL,GACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { BulkActionBar } from './bulk-action-bar';
2
+ export type { BulkActionBarProps, BulkAction } from './bulk-action-bar';
3
+ export { Button, buttonVariants } from './Button';
4
+ export type { ButtonProps } from './Button';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bulk-actions/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIxE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAClD,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,7 @@
1
+ // @miethe/ui — bulk-actions submodule
2
+ // Floating bulk action toolbar for multi-select interfaces.
3
+ export { BulkActionBar } from './bulk-action-bar';
4
+ // Button is exported for consumers who want to render custom action buttons
5
+ // with matching styling outside the BulkActionBar itself.
6
+ export { Button, buttonVariants } from './Button';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bulk-actions/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,4DAA4D;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,4EAA4E;AAC5E,0DAA0D;AAC1D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type ClassValue } from 'clsx';
2
+ /**
3
+ * Merge Tailwind and conditional class names.
4
+ */
5
+ export declare function cn(...inputs: ClassValue[]): string;
6
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/bulk-actions/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C;;GAEG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -0,0 +1,9 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ /**
4
+ * Merge Tailwind and conditional class names.
5
+ */
6
+ export function cn(...inputs) {
7
+ return twMerge(clsx(inputs));
8
+ }
9
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/bulk-actions/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC;;GAEG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
4
+ variant?: "default" | "destructive" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
7
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
8
+ export { Alert, AlertTitle, AlertDescription };
9
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAoBlE,QAAA,MAAM,KAAK;;sHAKT,CAAC;AAGH,QAAA,MAAM,UAAU,uHAQf,CAAC;AAGF,QAAA,MAAM,gBAAgB,yHAKpB,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { cva } from 'class-variance-authority';
4
+ import { cn } from '../../primitives/utils';
5
+ const alertVariants = cva('relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7', {
6
+ variants: {
7
+ variant: {
8
+ default: 'bg-background text-foreground',
9
+ destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
10
+ },
11
+ },
12
+ defaultVariants: {
13
+ variant: 'default',
14
+ },
15
+ });
16
+ const Alert = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx("div", { ref: ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props })));
17
+ Alert.displayName = 'Alert';
18
+ const AlertTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("h5", { ref: ref, className: cn('mb-1 font-medium leading-none tracking-tight', className), ...props })));
19
+ AlertTitle.displayName = 'AlertTitle';
20
+ const AlertDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('text-sm [&_p]:leading-relaxed', className), ...props })));
21
+ AlertDescription.displayName = 'AlertDescription';
22
+ export { Alert, AlertTitle, AlertDescription };
23
+ //# sourceMappingURL=alert.js.map
@@ -0,0 +1 @@
1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AAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACxF,CAAC,CAAC;AACH,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAElD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Button, buttonVariants };
12
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,cAAc;;;8EAyBnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFAOX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { Slot } from '@radix-ui/react-slot';
4
+ import { cva } from 'class-variance-authority';
5
+ import { cn } from '../../primitives/utils';
6
+ const buttonVariants = cva('inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', {
7
+ variants: {
8
+ variant: {
9
+ default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
10
+ destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
11
+ outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
12
+ secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
13
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
14
+ link: 'text-primary underline-offset-4 hover:underline',
15
+ },
16
+ size: {
17
+ default: 'h-9 px-4 py-2',
18
+ sm: 'h-8 rounded-md px-3 text-xs',
19
+ lg: 'h-10 rounded-md px-8',
20
+ icon: 'h-9 w-9',
21
+ },
22
+ },
23
+ defaultVariants: {
24
+ variant: 'default',
25
+ size: 'default',
26
+ },
27
+ });
28
+ const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
29
+ const Comp = asChild ? Slot : 'button';
30
+ return (_jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
31
+ });
32
+ Button.displayName = 'Button';
33
+ export { Button, buttonVariants };
34
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAE5C,MAAM,cAAc,GAAG,GAAG,CACxB,qOAAqO,EACrO;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,+DAA+D;YACxE,WAAW,EAAE,8EAA8E;YAC3F,OAAO,EACL,0FAA0F;YAC5F,SAAS,EAAE,wEAAwE;YACnF,KAAK,EAAE,8CAA8C;YACrD,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,eAAe;YACxB,EAAE,EAAE,6BAA6B;YACjC,EAAE,EAAE,sBAAsB;YAC1B,IAAI,EAAE,SAAS;SAChB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AAQF,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC/D,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IACvC,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAC3F,CAAC;AACJ,CAAC,CACF,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
2
+ declare const Collapsible: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
4
+ declare const CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
5
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
6
+ //# sourceMappingURL=collapsible.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/ui/collapsible.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AAEpE,QAAA,MAAM,WAAW,kIAA4B,CAAC;AAE9C,QAAA,MAAM,kBAAkB,4IAA0C,CAAC;AAEnE,QAAA,MAAM,kBAAkB,yIAA0C,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
3
+ const Collapsible = CollapsiblePrimitive.Root;
4
+ const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
5
+ const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
6
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
7
+ //# sourceMappingURL=collapsible.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collapsible.js","sourceRoot":"","sources":["../../../src/components/ui/collapsible.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AAEpE,MAAM,WAAW,GAAG,oBAAoB,CAAC,IAAI,CAAC;AAE9C,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,kBAAkB,CAAC;AAEnE,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,kBAAkB,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
3
+ export { Skeleton };
4
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/ui/skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,2CAE9E;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from '../../primitives/utils';
3
+ function Skeleton({ className, ...props }) {
4
+ return _jsx("div", { className: cn('animate-pulse rounded-md bg-primary/10', className), ...props });
5
+ }
6
+ export { Skeleton };
7
+ //# sourceMappingURL=skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../../src/components/ui/skeleton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAE5C,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwC;IAC7E,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,wCAAwC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AAChG,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Truncation information for large files
3
+ */
4
+ export interface TruncationInfo {
5
+ /** Whether the content was truncated */
6
+ truncated: boolean;
7
+ /** Original file size in bytes (before truncation) */
8
+ originalSize?: number;
9
+ /** URL to view the full file (e.g., on GitHub) */
10
+ fullFileUrl?: string;
11
+ }
12
+ export interface ContentPaneProps {
13
+ path: string | null;
14
+ content: string | null;
15
+ isLoading?: boolean;
16
+ error?: string | null;
17
+ /**
18
+ * When true, hides edit/save buttons and disables editing.
19
+ * Content viewing with syntax highlighting remains functional.
20
+ * @default false
21
+ */
22
+ readOnly?: boolean;
23
+ /**
24
+ * Truncation information for large files.
25
+ * When provided and truncated is true, displays a warning banner.
26
+ */
27
+ truncationInfo?: TruncationInfo;
28
+ isEditing?: boolean;
29
+ editedContent?: string;
30
+ onEditStart?: () => void;
31
+ onEditChange?: (content: string) => void;
32
+ onSave?: (content: string) => void | Promise<void>;
33
+ onCancel?: () => void;
34
+ /**
35
+ * Accessible label for the content pane region.
36
+ * @default "File content viewer"
37
+ */
38
+ ariaLabel?: string;
39
+ /**
40
+ * Deprecated. Frontmatter is now automatically stripped from content
41
+ * when FrontmatterDisplay component is shown (when frontmatter exists).
42
+ * This prop is kept for backwards compatibility but no longer affects behavior.
43
+ * @default false
44
+ * @deprecated
45
+ */
46
+ showFrontmatter?: boolean;
47
+ }
48
+ /**
49
+ * ContentPane - File content viewer and editor component
50
+ *
51
+ * Displays the contents of a selected file with features like breadcrumb navigation,
52
+ * optional line numbers, and edit functionality for supported file types.
53
+ *
54
+ * ## Bundle cost / optional editor loading
55
+ *
56
+ * The CodeMirror editor (via SplitPreview and MarkdownEditor) is **lazy-loaded**.
57
+ * The editor chunk is only fetched from the network when the component actually
58
+ * needs to render it — that is, when the file is a Markdown file (`*.md`) and the
59
+ * component is mounted. While the chunk loads a skeleton placeholder is shown
60
+ * via a React `Suspense` boundary.
61
+ *
62
+ * - **Read-only mode** (`readOnly={true}`): The SplitPreview/MarkdownEditor module
63
+ * is still lazy-imported for markdown files because the preview panel is always
64
+ * rendered. However, callers that pass `readOnly` avoid the full edit bundle
65
+ * cost for non-markdown file types entirely — only the markdown renderer
66
+ * (react-markdown, which is much lighter) loads in that case.
67
+ *
68
+ * - **Edit mode** (`readOnly={false}`, default): CodeMirror loads on first render
69
+ * of a markdown file. Subsequent renders use the cached module.
70
+ *
71
+ * - **Non-markdown files** (`.ts`, `.json`, `.py`, …): SplitPreview is never
72
+ * rendered; CodeMirror is never loaded regardless of `readOnly`.
73
+ *
74
+ * ## Props controlling edit mode
75
+ *
76
+ * | Prop | Purpose |
77
+ * |----------------|----------------------------------------------------------------------|
78
+ * | `readOnly` | When `true`, hides all edit/save UI and disables edit mode entirely |
79
+ * | `isEditing` | Lifted state — `true` when the user has clicked "Edit" |
80
+ * | `onEditStart` | Called when user clicks the "Edit" button |
81
+ * | `onEditChange` | Called on every keystroke in the editor with the updated content |
82
+ * | `onSave` | Called when the user confirms the save; receives final content |
83
+ * | `onCancel` | Called when the user dismisses the editor without saving |
84
+ *
85
+ * @example
86
+ * ```tsx
87
+ * // Editable mode (default) — CodeMirror loads when user opens a .md file
88
+ * <ContentPane
89
+ * path="src/index.ts"
90
+ * content={fileContent}
91
+ * isLoading={isLoading}
92
+ * error={error}
93
+ * onEditStart={() => handleEdit()}
94
+ * onSave={(content) => handleSave(content)}
95
+ * />
96
+ *
97
+ * // Read-only mode — no edit controls rendered; CodeMirror NOT loaded for
98
+ * // non-markdown files; markdown files render preview only (no editor panel)
99
+ * <ContentPane
100
+ * path="README.md"
101
+ * content={fileContent}
102
+ * readOnly={true}
103
+ * />
104
+ * ```
105
+ */
106
+ export declare function ContentPane({ path, content, isLoading, error, readOnly, truncationInfo, isEditing, editedContent, onEditStart, onEditChange, onSave, onCancel, ariaLabel, showFrontmatter: _showFrontmatter, }: ContentPaneProps): import("react/jsx-runtime").JSX.Element;
107
+ //# sourceMappingURL=ContentPane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentPane.d.ts","sourceRoot":"","sources":["../../src/content-viewer/ContentPane.tsx"],"names":[],"mappings":"AAkCA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAA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