@alexgorbatchev/shadcn 0.0.97 → 0.0.99

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 (34) hide show
  1. package/dist/{chunk-fm1b6e79.js → chunk-04hj9jyt.js} +1 -1
  2. package/dist/{chunk-3qq9yhn2.js → chunk-4xd8araz.js} +1 -1
  3. package/dist/{chunk-jet31v57.js → chunk-55hw5nd8.js} +1 -1
  4. package/dist/{chunk-px6bcbj3.js → chunk-77s4s3mv.js} +1 -1
  5. package/dist/{chunk-zdpm4kf4.js → chunk-92hepa7b.js} +1 -1
  6. package/dist/{chunk-m7rs4v5x.js → chunk-dd2tnvgv.js} +1 -1
  7. package/dist/{chunk-9zx5b34m.js → chunk-jegx00xt.js} +1 -1
  8. package/dist/{chunk-yg5ft104.js → chunk-qy62vymz.js} +1 -1
  9. package/dist/{chunk-k1f35j55.js → chunk-r7krv555.js} +1 -1
  10. package/dist/{chunk-qhtbsdcg.js → chunk-rpjkf15t.js} +1 -1
  11. package/dist/{chunk-z6kyewpg.js → chunk-wqtk5vkd.js} +1 -1
  12. package/dist/{chunk-09x5ne2y.js → chunk-x9p6qh9d.js} +1 -1
  13. package/dist/{chunk-6grp5fhy.js → chunk-yt4xp9xa.js} +1 -1
  14. package/dist/components/assistant-ui/elements/BackgroundInbox.js +2 -2
  15. package/dist/components/assistant-ui/elements/Chart.js +2 -2
  16. package/dist/components/assistant-ui/elements/CodeDiff.js +2 -2
  17. package/dist/components/assistant-ui/elements/DataTable.js +2 -2
  18. package/dist/components/assistant-ui/elements/EditMessage.js +2 -2
  19. package/dist/components/assistant-ui/elements/ElicitationForm.js +2 -2
  20. package/dist/components/assistant-ui/elements/FeedbackDialog.js +2 -2
  21. package/dist/components/assistant-ui/elements/FileTree.js +2 -2
  22. package/dist/components/assistant-ui/elements/FlowGraph.js +2 -2
  23. package/dist/components/assistant-ui/elements/McpServerPanel.js +2 -2
  24. package/dist/components/assistant-ui/elements/ModelPicker.js +2 -2
  25. package/dist/components/assistant-ui/index.js +12 -12
  26. package/dist/components/image-viewer/ImageViewer.d.ts +4 -1
  27. package/dist/components/image-viewer/index.js +1 -1
  28. package/dist/components/input-otp/index.js +1 -1
  29. package/dist/components/json-render/index.js +2 -2
  30. package/dist/index.js +2 -2
  31. package/dist/prototype.js +1 -1
  32. package/llms/components/data-display/ImageViewer.md +21 -1
  33. package/llms.txt +1 -1
  34. package/package.json +1 -1
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  Card2,
6
6
  CardContent2
7
- } from "./chunk-k1f35j55.js";
7
+ } from "./chunk-r7krv555.js";
8
8
  import {
9
9
  take
10
10
  } from "./chunk-v8ks0cfq.js";
@@ -4,7 +4,7 @@ import {
4
4
  CardTitle2,
5
5
  CardDescription2,
6
6
  CardContent2
7
- } from "./chunk-k1f35j55.js";
7
+ } from "./chunk-r7krv555.js";
8
8
  import {
9
9
  take
10
10
  } from "./chunk-v8ks0cfq.js";
@@ -7,7 +7,7 @@ import {
7
7
  CardTitle2,
8
8
  CardDescription2,
9
9
  CardContent2
10
- } from "./chunk-k1f35j55.js";
10
+ } from "./chunk-r7krv555.js";
11
11
 
12
12
  // src/components/assistant-ui/elements/BackgroundInbox.tsx
13
13
  import { CheckIcon, Loader2Icon, XIcon } from "lucide-react";
@@ -8,7 +8,7 @@ import {
8
8
  CardDescription2,
9
9
  CardContent2,
10
10
  CardFooter2
11
- } from "./chunk-k1f35j55.js";
11
+ } from "./chunk-r7krv555.js";
12
12
  import {
13
13
  Field2,
14
14
  FieldLabel2
@@ -7,7 +7,7 @@ import {
7
7
  CardTitle2,
8
8
  CardDescription2,
9
9
  CardContent2
10
- } from "./chunk-k1f35j55.js";
10
+ } from "./chunk-r7krv555.js";
11
11
  import {
12
12
  codeScroll,
13
13
  codeSurface
@@ -87,7 +87,7 @@ import {
87
87
  CardDescription2,
88
88
  CardContent2,
89
89
  CardFooter2
90
- } from "./chunk-k1f35j55.js";
90
+ } from "./chunk-r7krv555.js";
91
91
  import {
92
92
  Combobox2,
93
93
  ComboboxValue2,
@@ -5,7 +5,7 @@ import {
5
5
  Card2,
6
6
  CardContent2,
7
7
  CardFooter2
8
- } from "./chunk-k1f35j55.js";
8
+ } from "./chunk-r7krv555.js";
9
9
  import {
10
10
  Field2,
11
11
  FieldLabel2
@@ -10,7 +10,7 @@ import {
10
10
  CardTitle2,
11
11
  CardDescription2,
12
12
  CardContent2
13
- } from "./chunk-k1f35j55.js";
13
+ } from "./chunk-r7krv555.js";
14
14
  import {
15
15
  Collapsible2,
16
16
  CollapsibleTrigger2,
@@ -60,7 +60,7 @@ function useCardSpotlight() {
60
60
 
61
61
  // src/components/Card.tsx
62
62
  import { jsx } from "react/jsx-runtime";
63
- var cardVariants = cva("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-md bg-card py-(--card-spacing) text-sm text-card-foreground border [--card-spacing:var(--ag-panel-padding)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:var(--ag-panel-padding-sm)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-md *:[img:last-child]:rounded-b-md", {
63
+ var cardVariants = cva("group/card flex flex-col gap-(--card-spacing) overflow-clip rounded-md bg-card py-(--card-spacing) text-sm text-card-foreground border [--card-spacing:var(--ag-panel-padding)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:var(--ag-panel-padding-sm)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-md *:[img:last-child]:rounded-b-md", {
64
64
  variants: {
65
65
  variant: {
66
66
  default: "border-border",
@@ -25,7 +25,7 @@ import {
25
25
  CardDescription2,
26
26
  CardContent2,
27
27
  CardFooter2
28
- } from "./chunk-k1f35j55.js";
28
+ } from "./chunk-r7krv555.js";
29
29
  import {
30
30
  Switch2
31
31
  } from "./chunk-m98d89xc.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-32t5kc0y.js";
16
16
  import {
17
17
  Card2
18
- } from "./chunk-k1f35j55.js";
18
+ } from "./chunk-r7krv555.js";
19
19
  import {
20
20
  Table2,
21
21
  TableHeader2,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  Card2,
6
6
  CardContent2
7
- } from "./chunk-k1f35j55.js";
7
+ } from "./chunk-r7krv555.js";
8
8
  import {
9
9
  FieldSet2,
10
10
  FieldLegend2,
@@ -4,7 +4,7 @@ import {
4
4
  CardTitle2,
5
5
  CardDescription2,
6
6
  CardContent2
7
- } from "./chunk-k1f35j55.js";
7
+ } from "./chunk-r7krv555.js";
8
8
  import {
9
9
  cn2
10
10
  } from "./chunk-en44w1pn.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  BackgroundInbox2
3
- } from "../../../chunk-jet31v57.js";
4
- import"../../../chunk-k1f35j55.js";
3
+ } from "../../../chunk-55hw5nd8.js";
4
+ import"../../../chunk-r7krv555.js";
5
5
  import"../../../chunk-32t5kc0y.js";
6
6
  import"../../../chunk-x90xmrba.js";
7
7
  import"../../../chunk-jpvw9xqy.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Chart2
3
- } from "../../../chunk-6grp5fhy.js";
4
- import"../../../chunk-k1f35j55.js";
3
+ } from "../../../chunk-yt4xp9xa.js";
4
+ import"../../../chunk-r7krv555.js";
5
5
  import"../../../chunk-6fvcqd48.js";
6
6
  import"../../../chunk-tcefvfr8.js";
7
7
  import"../../../chunk-jpvw9xqy.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CodeDiff2
3
- } from "../../../chunk-zdpm4kf4.js";
4
- import"../../../chunk-k1f35j55.js";
3
+ } from "../../../chunk-92hepa7b.js";
4
+ import"../../../chunk-r7krv555.js";
5
5
  import"../../../chunk-en44w1pn.js";
6
6
  export {
7
7
  CodeDiff2 as CodeDiff
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  DataTable2
3
- } from "../../../chunk-z6kyewpg.js";
3
+ } from "../../../chunk-wqtk5vkd.js";
4
4
  import"../../../chunk-1wz92wgg.js";
5
5
  import"../../../chunk-qn4a3gg4.js";
6
- import"../../../chunk-k1f35j55.js";
6
+ import"../../../chunk-r7krv555.js";
7
7
  import"../../../chunk-m4geb1s5.js";
8
8
  import"../../../chunk-9t530p75.js";
9
9
  import"../../../chunk-32t5kc0y.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  EditMessage2
3
- } from "../../../chunk-9zx5b34m.js";
3
+ } from "../../../chunk-jegx00xt.js";
4
4
  import"../../../chunk-vxvaaptq.js";
5
5
  import"../../../chunk-9n0axzd5.js";
6
- import"../../../chunk-k1f35j55.js";
6
+ import"../../../chunk-r7krv555.js";
7
7
  import"../../../chunk-m32ptxf3.js";
8
8
  import"../../../chunk-er6e5fj8.js";
9
9
  import"../../../chunk-7jpsybag.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ElicitationForm2
3
- } from "../../../chunk-qhtbsdcg.js";
3
+ } from "../../../chunk-rpjkf15t.js";
4
4
  import"../../../chunk-vxvaaptq.js";
5
5
  import"../../../chunk-kgqe8gpb.js";
6
6
  import"../../../chunk-m98d89xc.js";
7
7
  import"../../../chunk-9n0axzd5.js";
8
- import"../../../chunk-k1f35j55.js";
8
+ import"../../../chunk-r7krv555.js";
9
9
  import"../../../chunk-m32ptxf3.js";
10
10
  import"../../../chunk-7vg045gd.js";
11
11
  import"../../../chunk-7jpsybag.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  FeedbackDialog2
3
- } from "../../../chunk-px6bcbj3.js";
3
+ } from "../../../chunk-77s4s3mv.js";
4
4
  import"../../../chunk-9n617bte.js";
5
5
  import"../../../chunk-9n0axzd5.js";
6
- import"../../../chunk-k1f35j55.js";
6
+ import"../../../chunk-r7krv555.js";
7
7
  import"../../../chunk-m32ptxf3.js";
8
8
  import"../../../chunk-er6e5fj8.js";
9
9
  import"../../../chunk-7jpsybag.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FileTree2
3
- } from "../../../chunk-3qq9yhn2.js";
4
- import"../../../chunk-k1f35j55.js";
3
+ } from "../../../chunk-4xd8araz.js";
4
+ import"../../../chunk-r7krv555.js";
5
5
  import"../../../chunk-en44w1pn.js";
6
6
  export {
7
7
  FileTree2 as FileTree
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FlowGraph2
3
- } from "../../../chunk-fm1b6e79.js";
4
- import"../../../chunk-k1f35j55.js";
3
+ } from "../../../chunk-04hj9jyt.js";
4
+ import"../../../chunk-r7krv555.js";
5
5
  import"../../../chunk-en44w1pn.js";
6
6
  export {
7
7
  FlowGraph2 as FlowGraph
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  McpServerPanel2
3
- } from "../../../chunk-yg5ft104.js";
4
- import"../../../chunk-k1f35j55.js";
3
+ } from "../../../chunk-qy62vymz.js";
4
+ import"../../../chunk-r7krv555.js";
5
5
  import"../../../chunk-9t530p75.js";
6
6
  import"../../../chunk-fw86vanx.js";
7
7
  import"../../../chunk-32t5kc0y.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ModelPicker2
3
- } from "../../../chunk-09x5ne2y.js";
3
+ } from "../../../chunk-x9p6qh9d.js";
4
4
  import"../../../chunk-kgqe8gpb.js";
5
5
  import"../../../chunk-9n0axzd5.js";
6
- import"../../../chunk-k1f35j55.js";
6
+ import"../../../chunk-r7krv555.js";
7
7
  import"../../../chunk-9t530p75.js";
8
8
  import"../../../chunk-m32ptxf3.js";
9
9
  import"../../../chunk-52aadmkc.js";
@@ -39,10 +39,10 @@ import {
39
39
  AudioPlayer2
40
40
  } from "../../chunk-kqtsvprx.js";
41
41
  import"../../chunk-pb8tsrdf.js";
42
- import"../../chunk-k1f35j55.js";
42
+ import"../../chunk-r7krv555.js";
43
43
  import {
44
44
  BackgroundInbox2
45
- } from "../../chunk-jet31v57.js";
45
+ } from "../../chunk-55hw5nd8.js";
46
46
  import {
47
47
  CanvasSplit2,
48
48
  CanvasSplitThread2,
@@ -56,7 +56,7 @@ import"../../chunk-tcefvfr8.js";
56
56
  import"../../chunk-6fvcqd48.js";
57
57
  import {
58
58
  Chart2
59
- } from "../../chunk-6grp5fhy.js";
59
+ } from "../../chunk-yt4xp9xa.js";
60
60
  import"../../chunk-7vg045gd.js";
61
61
  import"../../chunk-er6e5fj8.js";
62
62
  import"../../chunk-4j3fsft3.js";
@@ -81,7 +81,7 @@ import {
81
81
  } from "../../chunk-kjx7n6a7.js";
82
82
  import {
83
83
  CodeDiff2
84
- } from "../../chunk-zdpm4kf4.js";
84
+ } from "../../chunk-92hepa7b.js";
85
85
  import {
86
86
  CodeRunner2
87
87
  } from "../../chunk-r1qyx0ke.js";
@@ -203,7 +203,7 @@ import"../../chunk-1wz92wgg.js";
203
203
  import"../../chunk-9t530p75.js";
204
204
  import {
205
205
  DataTable2
206
- } from "../../chunk-z6kyewpg.js";
206
+ } from "../../chunk-wqtk5vkd.js";
207
207
  import"../../chunk-qn4a3gg4.js";
208
208
  import {
209
209
  DaySeparator2
@@ -229,12 +229,12 @@ import"../../chunk-52aadmkc.js";
229
229
  import"../../chunk-9n0axzd5.js";
230
230
  import {
231
231
  EditMessage2
232
- } from "../../chunk-9zx5b34m.js";
232
+ } from "../../chunk-jegx00xt.js";
233
233
  import"../../chunk-kgqe8gpb.js";
234
234
  import"../../chunk-m98d89xc.js";
235
235
  import {
236
236
  ElicitationForm2
237
- } from "../../chunk-qhtbsdcg.js";
237
+ } from "../../chunk-rpjkf15t.js";
238
238
  import"../../chunk-4e96tpw0.js";
239
239
  import {
240
240
  EmptyState2
@@ -262,7 +262,7 @@ import {
262
262
  import"../../chunk-9n617bte.js";
263
263
  import {
264
264
  FeedbackDialog2
265
- } from "../../chunk-px6bcbj3.js";
265
+ } from "../../chunk-77s4s3mv.js";
266
266
  import {
267
267
  FileRoot2,
268
268
  FileIconDisplay2,
@@ -277,10 +277,10 @@ import {
277
277
  } from "../../chunk-wrvxzfdb.js";
278
278
  import {
279
279
  FileTree2
280
- } from "../../chunk-3qq9yhn2.js";
280
+ } from "../../chunk-4xd8araz.js";
281
281
  import {
282
282
  FlowGraph2
283
- } from "../../chunk-fm1b6e79.js";
283
+ } from "../../chunk-04hj9jyt.js";
284
284
  import {
285
285
  Frac2
286
286
  } from "../../chunk-4mmxn1c3.js";
@@ -346,7 +346,7 @@ import {
346
346
  } from "../../chunk-0ybqnkcy.js";
347
347
  import {
348
348
  McpServerPanel2
349
- } from "../../chunk-yg5ft104.js";
349
+ } from "../../chunk-qy62vymz.js";
350
350
  import {
351
351
  MemoryChips2
352
352
  } from "../../chunk-cvg1bn5z.js";
@@ -373,7 +373,7 @@ import {
373
373
  } from "../../chunk-ydz0pe6z.js";
374
374
  import {
375
375
  ModelPicker2
376
- } from "../../chunk-09x5ne2y.js";
376
+ } from "../../chunk-x9p6qh9d.js";
377
377
  import"../../chunk-kp3jgjng.js";
378
378
  import {
379
379
  ModelSelectorRoot2
@@ -24,7 +24,10 @@ export interface IImageViewerProps extends IDensityProps {
24
24
  * `ImageZoomToggle` yourself instead to put a simpler control in a header.
25
25
  */
26
26
  showZoomControl?: boolean;
27
- /** Further controls in the toolbar row after the zoom bar, such as comment actions. Renders the row on its own too. */
27
+ /**
28
+ * Further controls in the toolbar row after the zoom bar, such as comment actions. Renders the row on its own too.
29
+ * Controls that do not fit wrap onto further rows, so every control stays visible on narrow screens.
30
+ */
28
31
  toolbar?: ReactNode;
29
32
  /**
30
33
  * Content sized and positioned exactly over the rendered image at every zoom level, such as region selections or
@@ -537,7 +537,7 @@ function ImageViewer({
537
537
  children: [
538
538
  (showZoomControl || toolbar !== undefined) && /* @__PURE__ */ jsxs2("div", {
539
539
  "data-slot": "image-viewer-toolbar",
540
- className: "flex shrink-0 flex-nowrap items-center gap-control-gap overflow-x-auto overscroll-x-contain *:shrink-0",
540
+ className: "flex shrink-0 flex-wrap items-center gap-control-gap *:shrink-0",
541
541
  children: [
542
542
  showZoomControl && /* @__PURE__ */ jsx3(ImageZoomControl, {
543
543
  zoom: shownZoom,
@@ -21,7 +21,7 @@ import {
21
21
  CardDescription2,
22
22
  CardContent2,
23
23
  CardFooter2
24
- } from "../../chunk-k1f35j55.js";
24
+ } from "../../chunk-r7krv555.js";
25
25
  import"../../chunk-m32ptxf3.js";
26
26
  import"../../chunk-52aadmkc.js";
27
27
  import {
@@ -26,7 +26,7 @@ import {
26
26
  PaginationPrevious2,
27
27
  PaginationNext2,
28
28
  PaginationEllipsis2
29
- } from "../../chunk-m7rs4v5x.js";
29
+ } from "../../chunk-dd2tnvgv.js";
30
30
  import {
31
31
  MenuPopup,
32
32
  MenuItem2,
@@ -90,7 +90,7 @@ import {
90
90
  CardTitle2,
91
91
  CardDescription2,
92
92
  CardContent2
93
- } from "../../chunk-k1f35j55.js";
93
+ } from "../../chunk-r7krv555.js";
94
94
  import"../../chunk-4j3fsft3.js";
95
95
  import"../../chunk-kmqx7c48.js";
96
96
  import {
package/dist/index.js CHANGED
@@ -165,7 +165,7 @@ import {
165
165
  StatusTracker2,
166
166
  DashboardLayout2,
167
167
  BillingUsage2
168
- } from "./chunk-m7rs4v5x.js";
168
+ } from "./chunk-dd2tnvgv.js";
169
169
  import {
170
170
  Combobox2,
171
171
  ComboboxValue2,
@@ -319,7 +319,7 @@ import {
319
319
  CardAction2,
320
320
  CardContent2,
321
321
  CardFooter2
322
- } from "./chunk-k1f35j55.js";
322
+ } from "./chunk-r7krv555.js";
323
323
  import {
324
324
  Sheet2,
325
325
  SheetTrigger2,
package/dist/prototype.js CHANGED
@@ -2051,7 +2051,7 @@ var program = new Command;
2051
2051
  // package.json
2052
2052
  var package_default = {
2053
2053
  name: "@alexgorbatchev/shadcn",
2054
- version: "0.0.97",
2054
+ version: "0.0.99",
2055
2055
  description: "Sharp, monospace React components with compact and comfortable densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
@@ -1,6 +1,6 @@
1
1
  # ImageViewer
2
2
 
3
- Import from `@alexgorbatchev/shadcn/image-viewer`. ImageViewer fills the container it is given, such as a `DialogContent size="fullscreen"` body, and shows one framed image in a native scroll viewport. `fit` scales the image down proportionally to fit both dimensions, centered and without scrollbars, and never upscales it; `fit-width` fills the width and scrolls vertically; a number is a scale from the fitted one up to 4 (400%), so `1` shows natural size. Without `zoom` or `defaultZoom` it opens at `fit`, or at `fit-width` for an image much taller than the stage, and never narrower than `openingWidth`. Zooming keeps the viewed center. The stage, named "<alt>, <percent>", owns its gestures: a drag pans, two fingers pinch-zoom and Mod+wheel zooms around the pointer, so a touch never reaches overlay content unless it handles the pointer itself, such as `ImageRegionSelect`; while focused it takes + or = (zoom in), − (zoom out), 0 (fit), 1 (100%) and arrows (pan while larger than the stage), and `onStageKeyDown` runs first to add or replace keys. `showZoomControl` shows the zoom bar (Fit, Fit width, −, percent, +) in a toolbar row, and `toolbar` adds further controls to that row. `overlay` renders content sized and positioned exactly over the rendered image at every zoom, `imageRef` and `overlayRef` expose the rendered image box, and `getNormalizedImagePoint(event, box)` maps pointer coordinates to 0–1 image coordinates.
3
+ Import from `@alexgorbatchev/shadcn/image-viewer`. ImageViewer fills the container it is given, such as a `DialogContent size="fullscreen"` body, and shows one framed image in a native scroll viewport. `fit` scales the image down proportionally to fit both dimensions, centered and without scrollbars, and never upscales it; `fit-width` fills the width and scrolls vertically; a number is a scale from the fitted one up to 4 (400%), so `1` shows natural size. Without `zoom` or `defaultZoom` it opens at `fit`, or at `fit-width` for an image much taller than the stage, and never narrower than `openingWidth`. Zooming keeps the viewed center. The stage, named "<alt>, <percent>", owns its gestures: a drag pans, two fingers pinch-zoom and Mod+wheel zooms around the pointer, so a touch never reaches overlay content unless it handles the pointer itself, such as `ImageRegionSelect`; while focused it takes + or = (zoom in), − (zoom out), 0 (fit), 1 (100%) and arrows (pan while larger than the stage), and `onStageKeyDown` runs first to add or replace keys. `showZoomControl` shows the zoom bar (Fit, Fit width, −, percent, +) in a toolbar row, and `toolbar` adds further controls to that row, which wraps onto further rows when its controls do not fit. `overlay` renders content sized and positioned exactly over the rendered image at every zoom, `imageRef` and `overlayRef` expose the rendered image box, and `getNormalizedImagePoint(event, box)` maps pointer coordinates to 0–1 image coordinates.
4
4
 
5
5
  Story: @alexgorbatchev/shadcn/components/data-display/ImageViewer
6
6
  Source: src/components/stories/data-display/ImageViewer.stories.tsx
@@ -102,6 +102,26 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
102
102
  }
103
103
  ```
104
104
 
105
+ ### NarrowToolbar
106
+
107
+ ```tsx
108
+ {
109
+ args: { defaultZoom: "fit", showZoomControl: true },
110
+ render: (args) => (
111
+ // A 320 px phone with 16 px gutters leaves 288 px for the toolbar.
112
+ <div className="flex h-96 w-72 flex-col border border-border">
113
+ <ImageViewer {...args} toolbar={<>
114
+ <Toggle variant="outline" size="sm">
115
+ Comment on a region
116
+ </Toggle>
117
+ <Button variant="outline" size="sm">
118
+ Comment on image
119
+ </Button>
120
+ </>}/>
121
+ </div>)
122
+ }
123
+ ```
124
+
105
125
  ### RegionTool
106
126
 
107
127
  ```tsx
package/llms.txt CHANGED
@@ -345,7 +345,7 @@ Generated from the public package exports and Storybook sources.
345
345
  - [Heading](./llms/components/data-display/Heading.md): Heading renders `h1`–`h6` from the required `level` so the document outline stays correct, while `size` (sm, base, lg, xl) sets the visual size independently. Sizes default by level: 1 xl, 2 lg, 3 base, 4–6 sm. `truncate` keeps one line.
346
346
  - [ImageComparison](./llms/components/data-display/ImageComparison.md): Import from `@alexgorbatchev/shadcn/image-viewer`. ImageComparison fills its container and compares `before` and `after` images (`{ src, alt, crossOrigin? }`) labelled by `beforeLabel` and `afterLabel` (default "Before" and "After"). `toggle` (the default) shows the after image and the "Hold to show before" button shows the before image while a pointer, Space, or Enter is held. `swipe` stacks both images; the divider is a slider (0–100, arrows ±1, Page Up/Page Down ±10, Home/End) whose handle drags with pointer capture. `side-by-side` shows labelled panes left and right (`horizontal`) or top and bottom (`vertical`) that scroll in sync when zoomed. Every mode starts fitted and offers original size (zoom `1`); the focused stage also takes the ImageViewer stage keys, Mod+wheel and pinch, and its name ends with the zoom percent. A differently sized before image is drawn inside the after image box, and the toolbar reports the mismatch. "Highlight differences" compares pixels on first use, caches the result per image pair, outlines changed regions, and summarizes them; it is disabled with a reason when pixels cannot be read. `mode`, `orientation`, `zoom`, and `showDifferences` are controllable with matching `default*` and `on*Change` props; `showToolbar={false}` hides the controls, which sit beside wide comparisons and below narrow ones.
347
347
  - [ImageRegionMarker](./llms/components/data-display/ImageRegionMarker.md): Import from `@alexgorbatchev/shadcn/image-viewer`. Outlines a region over an image: a 2px outline 1px outside the region over a 4px halo in the page background, so the outline keeps 3:1 against any screenshot in both themes; forced colours draw it in Highlight. Variants: `comment` (a saved comment's region), `draft` (dashed, a region being drawn) and `difference` (changed pixels, used by ImageComparison's Highlight differences). Position it with `region` (left, top, width, height in pixels or any CSS length) over a positioned image box. `ImageRegionMarkerBadge` pins an interactive control, such as a comment count, beside the marker with the same outline and halo; place it with `position`, and pass `interactive={false}` while another gesture owns the pointer. The theme's `target-emphasis` utility is the matching two-tone mark for a jump target on the page.
348
- - [ImageViewer](./llms/components/data-display/ImageViewer.md): Import from `@alexgorbatchev/shadcn/image-viewer`. ImageViewer fills the container it is given, such as a `DialogContent size="fullscreen"` body, and shows one framed image in a native scroll viewport. `fit` scales the image down proportionally to fit both dimensions, centered and without scrollbars, and never upscales it; `fit-width` fills the width and scrolls vertically; a number is a scale from the fitted one up to 4 (400%), so `1` shows natural size. Without `zoom` or `defaultZoom` it opens at `fit`, or at `fit-width` for an image much taller than the stage, and never narrower than `openingWidth`. Zooming keeps the viewed center. The stage, named "<alt>, <percent>", owns its gestures: a drag pans, two fingers pinch-zoom and Mod+wheel zooms around the pointer, so a touch never reaches overlay content unless it handles the pointer itself, such as `ImageRegionSelect`; while focused it takes + or = (zoom in), − (zoom out), 0 (fit), 1 (100%) and arrows (pan while larger than the stage), and `onStageKeyDown` runs first to add or replace keys. `showZoomControl` shows the zoom bar (Fit, Fit width, −, percent, +) in a toolbar row, and `toolbar` adds further controls to that row. `overlay` renders content sized and positioned exactly over the rendered image at every zoom, `imageRef` and `overlayRef` expose the rendered image box, and `getNormalizedImagePoint(event, box)` maps pointer coordinates to 0–1 image coordinates.
348
+ - [ImageViewer](./llms/components/data-display/ImageViewer.md): Import from `@alexgorbatchev/shadcn/image-viewer`. ImageViewer fills the container it is given, such as a `DialogContent size="fullscreen"` body, and shows one framed image in a native scroll viewport. `fit` scales the image down proportionally to fit both dimensions, centered and without scrollbars, and never upscales it; `fit-width` fills the width and scrolls vertically; a number is a scale from the fitted one up to 4 (400%), so `1` shows natural size. Without `zoom` or `defaultZoom` it opens at `fit`, or at `fit-width` for an image much taller than the stage, and never narrower than `openingWidth`. Zooming keeps the viewed center. The stage, named "<alt>, <percent>", owns its gestures: a drag pans, two fingers pinch-zoom and Mod+wheel zooms around the pointer, so a touch never reaches overlay content unless it handles the pointer itself, such as `ImageRegionSelect`; while focused it takes + or = (zoom in), − (zoom out), 0 (fit), 1 (100%) and arrows (pan while larger than the stage), and `onStageKeyDown` runs first to add or replace keys. `showZoomControl` shows the zoom bar (Fit, Fit width, −, percent, +) in a toolbar row, and `toolbar` adds further controls to that row, which wraps onto further rows when its controls do not fit. `overlay` renders content sized and positioned exactly over the rendered image at every zoom, `imageRef` and `overlayRef` expose the rendered image box, and `getNormalizedImagePoint(event, box)` maps pointer coordinates to 0–1 image coordinates.
349
349
  - [ImageZoomToggle](./llms/components/data-display/ImageZoomToggle.md): Import from `@alexgorbatchev/shadcn/image-viewer`. A two-option toggle for ImageViewer and ImageComparison zoom that consumers place in a header or toolbar. "Fit to screen" and "Original size" are pressed-state toggles with constant names, so assistive technology announces the active zoom through `aria-pressed`. Original size sets zoom `1`; other numeric zooms, such as 150% from the ImageViewer zoom bar, press neither option. `label` names the group (default "Zoom"); `size`, `orientation`, `layout`, `disabled`, and `density` follow ToggleGroup.
350
350
  - [Item](./llms/components/data-display/Item.md)
351
351
  - [JsonRender](./llms/components/data-display/JsonRender.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.97",
3
+ "version": "0.0.99",
4
4
  "description": "Sharp, monospace React components with compact and comfortable densities.",
5
5
  "license": "MIT",
6
6
  "repository": {