@alexgorbatchev/shadcn 0.0.165 → 0.0.167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-crvagbjs.js → chunk-14g20hm9.js} +1 -1
- package/dist/{chunk-7a940cxw.js → chunk-3v24rvqd.js} +1 -1
- package/dist/{chunk-tskx0wgf.js → chunk-4vm4bf82.js} +1 -1
- package/dist/{chunk-xndv627n.js → chunk-5ytmm515.js} +1 -1
- package/dist/{chunk-r7e0z5pn.js → chunk-9gd41g45.js} +1 -1
- package/dist/{chunk-53qy2k6m.js → chunk-bff3679h.js} +1 -1
- package/dist/{chunk-kjkznhqe.js → chunk-bjrjee0a.js} +1 -1
- package/dist/{chunk-pp8ez02x.js → chunk-hhghp4xx.js} +1 -1
- package/dist/{chunk-dbe9ppwf.js → chunk-mdt1n179.js} +22 -4
- package/dist/{chunk-cqwg3q9q.js → chunk-r33vtp7w.js} +1 -1
- package/dist/{chunk-xdefvgvq.js → chunk-v0xe6q6q.js} +1 -1
- package/dist/{chunk-mm4c6wxz.js → chunk-v6ze0by1.js} +1 -1
- package/dist/{chunk-732drvzb.js → chunk-wtzcpkk5.js} +1 -1
- package/dist/{chunk-6r4457jk.js → chunk-xs70dj2n.js} +2 -2
- package/dist/{chunk-xb79xnjp.js → chunk-ygrvagz1.js} +1 -1
- package/dist/{chunk-kevm8s2n.js → chunk-zgkysawj.js} +1 -1
- package/dist/components/Badge.d.ts +7 -2
- package/dist/components/assistant-ui/elements/DataTable.js +2 -2
- package/dist/components/assistant-ui/elements/DiffViewer.js +5 -5
- package/dist/components/assistant-ui/elements/DiffViewerFileBadge.js +2 -2
- package/dist/components/assistant-ui/elements/DiffViewerHeader.js +4 -4
- package/dist/components/assistant-ui/elements/DiffViewerStats.js +2 -2
- package/dist/components/assistant-ui/elements/DirectiveText.js +2 -2
- package/dist/components/assistant-ui/elements/LauncherBubble.js +2 -2
- package/dist/components/assistant-ui/elements/McpServerPanel.js +2 -2
- package/dist/components/assistant-ui/elements/ModelPicker.js +2 -2
- package/dist/components/assistant-ui/elements/ScoreBreakdown.js +2 -2
- package/dist/components/assistant-ui/index.js +11 -11
- package/dist/components/assistant-ui/native/DirectiveText.js +3 -3
- package/dist/components/assistant-ui/native/McpConfigDialog.js +2 -2
- package/dist/components/assistant-ui/native/Sources.js +2 -2
- package/dist/components/assistant-ui/native/index.js +5 -5
- package/dist/components/data-grid/index.js +1 -1
- package/dist/components/gantt/index.js +2 -2
- package/dist/components/image-viewer/index.js +33 -29
- package/dist/components/json-render/index.js +3 -3
- package/dist/index.js +3 -3
- package/dist/prototype.js +1 -1
- package/llms/components/data-display/Badge.md +17 -0
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
7
|
import { useRender } from "@base-ui/react/use-render";
|
|
8
8
|
import { cva } from "class-variance-authority";
|
|
9
|
-
var badgeVariants2 = cva("group/badge inline-flex
|
|
9
|
+
var badgeVariants2 = cva("group/badge inline-flex w-fit items-center justify-center gap-1 overflow-hidden rounded-sm border border-transparent px-tag-x text-xs font-medium transition-colors focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
12
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
@@ -17,22 +17,40 @@ var badgeVariants2 = cva("group/badge inline-flex h-tag w-fit shrink-0 items-cen
|
|
|
17
17
|
success: "bg-success text-success-foreground",
|
|
18
18
|
warning: "bg-warning text-warning-foreground",
|
|
19
19
|
link: "text-primary underline-offset-4 hover:underline"
|
|
20
|
+
},
|
|
21
|
+
wrap: {
|
|
22
|
+
false: "h-tag shrink-0 py-0 whitespace-nowrap",
|
|
23
|
+
true: "h-auto min-h-tag max-w-full shrink py-0.5 text-start leading-snug whitespace-normal break-words"
|
|
20
24
|
}
|
|
21
25
|
},
|
|
26
|
+
compoundVariants: [
|
|
27
|
+
{
|
|
28
|
+
variant: "outline",
|
|
29
|
+
wrap: true,
|
|
30
|
+
className: "rounded-[10px] px-2.5"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
variant: "warning",
|
|
34
|
+
wrap: true,
|
|
35
|
+
className: "px-2"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
22
38
|
defaultVariants: {
|
|
23
|
-
variant: "default"
|
|
39
|
+
variant: "default",
|
|
40
|
+
wrap: false
|
|
24
41
|
}
|
|
25
42
|
});
|
|
26
|
-
function Badge2({ density, className, variant = "default", render, ...props }) {
|
|
43
|
+
function Badge2({ density, className, variant = "default", wrap = false, render, ...props }) {
|
|
27
44
|
return useRender({
|
|
28
45
|
defaultTagName: "span",
|
|
29
46
|
props: mergeProps({
|
|
30
|
-
className: cn2(badgeVariants2({ variant }), className)
|
|
47
|
+
className: cn2(badgeVariants2({ variant, wrap }), className)
|
|
31
48
|
}, props),
|
|
32
49
|
render,
|
|
33
50
|
state: {
|
|
34
51
|
slot: "badge",
|
|
35
52
|
variant,
|
|
53
|
+
wrap,
|
|
36
54
|
density
|
|
37
55
|
}
|
|
38
56
|
});
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./chunk-6synj4j9.js";
|
|
10
10
|
import {
|
|
11
11
|
DiffViewerFileBadge2
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-hhghp4xx.js";
|
|
13
13
|
import {
|
|
14
14
|
DiffViewerStats2
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-v6ze0by1.js";
|
|
16
16
|
|
|
17
17
|
// src/components/assistant-ui/elements/DiffViewerHeader.tsx
|
|
18
18
|
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
@@ -4,12 +4,17 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
4
4
|
import { type VariantProps } from "class-variance-authority";
|
|
5
5
|
declare const badgeVariants: (props?: ({
|
|
6
6
|
variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | "success" | "warning" | null | undefined;
|
|
7
|
+
wrap?: boolean | null | undefined;
|
|
7
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
9
|
type BadgeState = {
|
|
9
10
|
slot: "badge";
|
|
10
11
|
variant: VariantProps<typeof badgeVariants>["variant"];
|
|
12
|
+
wrap: boolean;
|
|
11
13
|
density?: Density;
|
|
12
14
|
};
|
|
13
|
-
type BadgeProps = useRender.ComponentProps<"span", BadgeState> & VariantProps<typeof badgeVariants> & IDensityProps
|
|
14
|
-
|
|
15
|
+
type BadgeProps = useRender.ComponentProps<"span", BadgeState> & Omit<VariantProps<typeof badgeVariants>, "wrap"> & IDensityProps & {
|
|
16
|
+
/** Allow long labels to wrap onto multiple lines within the available width. */
|
|
17
|
+
wrap?: boolean;
|
|
18
|
+
};
|
|
19
|
+
declare function Badge({ density, className, variant, wrap, render, ...props }: BadgeProps): ReactElement;
|
|
15
20
|
export { Badge, badgeVariants };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataTable2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-bjrjee0a.js";
|
|
4
4
|
import"../../../chunk-1wz92wgg.js";
|
|
5
5
|
import"../../../chunk-qn4a3gg4.js";
|
|
6
6
|
import"../../../chunk-jc3cbwyg.js";
|
|
7
7
|
import"../../../chunk-m4geb1s5.js";
|
|
8
|
-
import"../../../chunk-
|
|
8
|
+
import"../../../chunk-mdt1n179.js";
|
|
9
9
|
import"../../../chunk-2sx8m8b2.js";
|
|
10
10
|
import"../../../chunk-x90xmrba.js";
|
|
11
11
|
import"../../../chunk-jpvw9xqy.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DiffViewer2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-4vm4bf82.js";
|
|
4
4
|
import"../../../chunk-k7gzvk6n.js";
|
|
5
5
|
import"../../../chunk-r0g0gwv6.js";
|
|
6
|
-
import"../../../chunk-
|
|
7
|
-
import"../../../chunk-
|
|
8
|
-
import"../../../chunk-
|
|
6
|
+
import"../../../chunk-xs70dj2n.js";
|
|
7
|
+
import"../../../chunk-hhghp4xx.js";
|
|
8
|
+
import"../../../chunk-v6ze0by1.js";
|
|
9
9
|
import"../../../chunk-6synj4j9.js";
|
|
10
10
|
import"../../../chunk-4e96tpw0.js";
|
|
11
|
-
import"../../../chunk-
|
|
11
|
+
import"../../../chunk-mdt1n179.js";
|
|
12
12
|
import"../../../chunk-txwykmer.js";
|
|
13
13
|
import"../../../chunk-gq28gd3g.js";
|
|
14
14
|
import"../../../chunk-31kppqkn.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DiffViewerFileBadge2
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import"../../../chunk-
|
|
3
|
+
} from "../../../chunk-hhghp4xx.js";
|
|
4
|
+
import"../../../chunk-mdt1n179.js";
|
|
5
5
|
import"../../../chunk-en44w1pn.js";
|
|
6
6
|
export {
|
|
7
7
|
DiffViewerFileBadge2 as DiffViewerFileBadge
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DiffViewerHeader2
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import"../../../chunk-
|
|
5
|
-
import"../../../chunk-
|
|
3
|
+
} from "../../../chunk-xs70dj2n.js";
|
|
4
|
+
import"../../../chunk-hhghp4xx.js";
|
|
5
|
+
import"../../../chunk-v6ze0by1.js";
|
|
6
6
|
import"../../../chunk-6synj4j9.js";
|
|
7
|
-
import"../../../chunk-
|
|
7
|
+
import"../../../chunk-mdt1n179.js";
|
|
8
8
|
import"../../../chunk-2sx8m8b2.js";
|
|
9
9
|
import"../../../chunk-x90xmrba.js";
|
|
10
10
|
import"../../../chunk-jpvw9xqy.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DiffViewerStats2
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import"../../../chunk-
|
|
3
|
+
} from "../../../chunk-v6ze0by1.js";
|
|
4
|
+
import"../../../chunk-mdt1n179.js";
|
|
5
5
|
import"../../../chunk-en44w1pn.js";
|
|
6
6
|
export {
|
|
7
7
|
DiffViewerStats2 as DiffViewerStats
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LauncherBubble2
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import"../../../chunk-
|
|
3
|
+
} from "../../../chunk-9gd41g45.js";
|
|
4
|
+
import"../../../chunk-mdt1n179.js";
|
|
5
5
|
import"../../../chunk-2sx8m8b2.js";
|
|
6
6
|
import"../../../chunk-x90xmrba.js";
|
|
7
7
|
import"../../../chunk-jpvw9xqy.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
McpServerPanel2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-3v24rvqd.js";
|
|
4
4
|
import"../../../chunk-jc3cbwyg.js";
|
|
5
|
-
import"../../../chunk-
|
|
5
|
+
import"../../../chunk-mdt1n179.js";
|
|
6
6
|
import"../../../chunk-fw86vanx.js";
|
|
7
7
|
import"../../../chunk-2sx8m8b2.js";
|
|
8
8
|
import"../../../chunk-x90xmrba.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ModelPicker2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-5ytmm515.js";
|
|
4
4
|
import"../../../chunk-kgqe8gpb.js";
|
|
5
5
|
import"../../../chunk-5ez5vgkn.js";
|
|
6
6
|
import"../../../chunk-jc3cbwyg.js";
|
|
7
|
-
import"../../../chunk-
|
|
7
|
+
import"../../../chunk-mdt1n179.js";
|
|
8
8
|
import"../../../chunk-4m2x9jfb.js";
|
|
9
9
|
import"../../../chunk-52aadmkc.js";
|
|
10
10
|
import"../../../chunk-5mydsjp3.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ScoreBreakdown2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-r33vtp7w.js";
|
|
4
4
|
import"../../../chunk-mammcx1w.js";
|
|
5
|
-
import"../../../chunk-
|
|
5
|
+
import"../../../chunk-mdt1n179.js";
|
|
6
6
|
import"../../../chunk-en44w1pn.js";
|
|
7
7
|
export {
|
|
8
8
|
ScoreBreakdown2 as ScoreBreakdown
|
|
@@ -200,10 +200,10 @@ import {
|
|
|
200
200
|
CostMeter2
|
|
201
201
|
} from "../../chunk-amdsd0g4.js";
|
|
202
202
|
import"../../chunk-1wz92wgg.js";
|
|
203
|
-
import"../../chunk-
|
|
203
|
+
import"../../chunk-mdt1n179.js";
|
|
204
204
|
import {
|
|
205
205
|
DataTable2
|
|
206
|
-
} from "../../chunk-
|
|
206
|
+
} from "../../chunk-bjrjee0a.js";
|
|
207
207
|
import"../../chunk-qn4a3gg4.js";
|
|
208
208
|
import {
|
|
209
209
|
DaySeparator2
|
|
@@ -213,7 +213,7 @@ import {
|
|
|
213
213
|
} from "../../chunk-mh7ssanf.js";
|
|
214
214
|
import {
|
|
215
215
|
DirectiveText3
|
|
216
|
-
} from "../../chunk-
|
|
216
|
+
} from "../../chunk-wtzcpkk5.js";
|
|
217
217
|
import {
|
|
218
218
|
DocumentReference2
|
|
219
219
|
} from "../../chunk-1psesp5k.js";
|
|
@@ -327,7 +327,7 @@ import {
|
|
|
327
327
|
} from "../../chunk-5famk67x.js";
|
|
328
328
|
import {
|
|
329
329
|
LauncherBubble2
|
|
330
|
-
} from "../../chunk-
|
|
330
|
+
} from "../../chunk-9gd41g45.js";
|
|
331
331
|
import {
|
|
332
332
|
LinkPreview2
|
|
333
333
|
} from "../../chunk-hp9vkfh5.js";
|
|
@@ -346,7 +346,7 @@ import {
|
|
|
346
346
|
} from "../../chunk-0ybqnkcy.js";
|
|
347
347
|
import {
|
|
348
348
|
McpServerPanel2
|
|
349
|
-
} from "../../chunk-
|
|
349
|
+
} from "../../chunk-3v24rvqd.js";
|
|
350
350
|
import {
|
|
351
351
|
MemoryChips2
|
|
352
352
|
} from "../../chunk-40jpafh1.js";
|
|
@@ -373,7 +373,7 @@ import {
|
|
|
373
373
|
} from "../../chunk-k872qrgx.js";
|
|
374
374
|
import {
|
|
375
375
|
ModelPicker2
|
|
376
|
-
} from "../../chunk-
|
|
376
|
+
} from "../../chunk-5ytmm515.js";
|
|
377
377
|
import"../../chunk-kp3jgjng.js";
|
|
378
378
|
import {
|
|
379
379
|
ModelSelectorRoot2
|
|
@@ -502,7 +502,7 @@ import {
|
|
|
502
502
|
} from "../../chunk-rghpa4yc.js";
|
|
503
503
|
import {
|
|
504
504
|
ScoreBreakdown2
|
|
505
|
-
} from "../../chunk-
|
|
505
|
+
} from "../../chunk-r33vtp7w.js";
|
|
506
506
|
import {
|
|
507
507
|
ScrollAnchor2
|
|
508
508
|
} from "../../chunk-4531ygnr.js";
|
|
@@ -631,13 +631,13 @@ import {
|
|
|
631
631
|
} from "../../chunk-r0g0gwv6.js";
|
|
632
632
|
import {
|
|
633
633
|
DiffViewerFileBadge2
|
|
634
|
-
} from "../../chunk-
|
|
634
|
+
} from "../../chunk-hhghp4xx.js";
|
|
635
635
|
import {
|
|
636
636
|
DiffViewerStats2
|
|
637
|
-
} from "../../chunk-
|
|
637
|
+
} from "../../chunk-v6ze0by1.js";
|
|
638
638
|
import {
|
|
639
639
|
DiffViewerHeader2
|
|
640
|
-
} from "../../chunk-
|
|
640
|
+
} from "../../chunk-xs70dj2n.js";
|
|
641
641
|
import {
|
|
642
642
|
DiffViewerLine2
|
|
643
643
|
} from "../../chunk-gq28gd3g.js";
|
|
@@ -646,7 +646,7 @@ import {
|
|
|
646
646
|
} from "../../chunk-31kppqkn.js";
|
|
647
647
|
import {
|
|
648
648
|
DiffViewer2
|
|
649
|
-
} from "../../chunk-
|
|
649
|
+
} from "../../chunk-4vm4bf82.js";
|
|
650
650
|
import {
|
|
651
651
|
eveAskQuestionToolkit2
|
|
652
652
|
} from "../../chunk-5e9c6m71.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DirectiveText2
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import"../../../chunk-
|
|
5
|
-
import"../../../chunk-
|
|
3
|
+
} from "../../../chunk-v0xe6q6q.js";
|
|
4
|
+
import"../../../chunk-wtzcpkk5.js";
|
|
5
|
+
import"../../../chunk-mdt1n179.js";
|
|
6
6
|
import"../../../chunk-en44w1pn.js";
|
|
7
7
|
export {
|
|
8
8
|
DirectiveText2 as DirectiveText
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
McpConfigDialog2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-zgkysawj.js";
|
|
4
4
|
import"../../../chunk-m4geb1s5.js";
|
|
5
|
-
import"../../../chunk-
|
|
5
|
+
import"../../../chunk-mdt1n179.js";
|
|
6
6
|
import"../../../chunk-4m2x9jfb.js";
|
|
7
7
|
import"../../../chunk-tcefvfr8.js";
|
|
8
8
|
import"../../../chunk-h45mqwpq.js";
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
SourceTitle2,
|
|
5
5
|
Source2,
|
|
6
6
|
Sources3
|
|
7
|
-
} from "../../../chunk-
|
|
7
|
+
} from "../../../chunk-bff3679h.js";
|
|
8
8
|
import"../../../chunk-m4geb1s5.js";
|
|
9
|
-
import"../../../chunk-
|
|
9
|
+
import"../../../chunk-mdt1n179.js";
|
|
10
10
|
import"../../../chunk-5mydsjp3.js";
|
|
11
11
|
import"../../../chunk-8ssktt4b.js";
|
|
12
12
|
import"../../../chunk-7ny0vyek.js";
|
|
@@ -128,17 +128,17 @@ import {
|
|
|
128
128
|
ConversationMapAui2
|
|
129
129
|
} from "../../../chunk-jvmm6k16.js";
|
|
130
130
|
import"../../../chunk-jy57625a.js";
|
|
131
|
-
import"../../../chunk-
|
|
132
|
-
import"../../../chunk-
|
|
131
|
+
import"../../../chunk-mdt1n179.js";
|
|
132
|
+
import"../../../chunk-wtzcpkk5.js";
|
|
133
133
|
import {
|
|
134
134
|
DirectiveText2
|
|
135
|
-
} from "../../../chunk-
|
|
135
|
+
} from "../../../chunk-v0xe6q6q.js";
|
|
136
136
|
import"../../../chunk-h45mqwpq.js";
|
|
137
137
|
import"../../../chunk-4m2x9jfb.js";
|
|
138
138
|
import"../../../chunk-52aadmkc.js";
|
|
139
139
|
import {
|
|
140
140
|
McpConfigDialog2
|
|
141
|
-
} from "../../../chunk-
|
|
141
|
+
} from "../../../chunk-zgkysawj.js";
|
|
142
142
|
import"../../../chunk-ywaq50sv.js";
|
|
143
143
|
import"../../../chunk-cdx1h86b.js";
|
|
144
144
|
import {
|
|
@@ -183,7 +183,7 @@ import {
|
|
|
183
183
|
SourceTitle2,
|
|
184
184
|
Source2,
|
|
185
185
|
Sources3
|
|
186
|
-
} from "../../../chunk-
|
|
186
|
+
} from "../../../chunk-bff3679h.js";
|
|
187
187
|
import"../../../chunk-n2n7k3he.js";
|
|
188
188
|
import {
|
|
189
189
|
SyntaxHighlighter3
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
DragSource2,
|
|
8
8
|
DropTarget2,
|
|
9
9
|
Kanban2
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-ygrvagz1.js";
|
|
11
11
|
import"../../chunk-en44w1pn.js";
|
|
12
|
-
import"../../chunk-
|
|
12
|
+
import"../../chunk-mdt1n179.js";
|
|
13
13
|
import"../../chunk-7ny0vyek.js";
|
|
14
14
|
import"../../chunk-8ssktt4b.js";
|
|
15
15
|
import"../../chunk-e6hk39ev.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
} from "../../chunk-2jsgsjas.js";
|
|
39
39
|
import {
|
|
40
40
|
Badge2
|
|
41
|
-
} from "../../chunk-
|
|
41
|
+
} from "../../chunk-mdt1n179.js";
|
|
42
42
|
import {
|
|
43
43
|
Dialog2,
|
|
44
44
|
DialogContent2,
|
|
@@ -895,6 +895,7 @@ function DiagramViewer({
|
|
|
895
895
|
});
|
|
896
896
|
const center = useRef4({ x: 0.5, y: 0.5 });
|
|
897
897
|
const viewportRef = useRef4(null);
|
|
898
|
+
const toolbarContainerRef = useRef4(null);
|
|
898
899
|
const toolbarRef = useRef4(null);
|
|
899
900
|
const mergedStageRef = useMergedRefs3(viewportRef, stageRef);
|
|
900
901
|
const viewportSize = useElementSize(viewportRef);
|
|
@@ -906,26 +907,33 @@ function DiagramViewer({
|
|
|
906
907
|
const hasToolbar = showZoomControl || toolbar !== undefined;
|
|
907
908
|
const updateToolbarOverflow = useCallback(() => {
|
|
908
909
|
const el = toolbarRef.current;
|
|
910
|
+
const outer = toolbarContainerRef.current;
|
|
909
911
|
if (!el) {
|
|
910
912
|
setToolbarOverflow((current) => current.left || current.right ? { left: false, right: false } : current);
|
|
911
913
|
return;
|
|
912
914
|
}
|
|
913
|
-
const
|
|
914
|
-
const
|
|
915
|
+
const availableWidth = outer?.clientWidth ?? el.clientWidth;
|
|
916
|
+
const hasOverflow = el.scrollWidth > availableWidth + 1;
|
|
917
|
+
const left = hasOverflow && el.scrollLeft > 1;
|
|
918
|
+
const right = hasOverflow && el.scrollLeft + el.clientWidth < el.scrollWidth - 1;
|
|
915
919
|
setToolbarOverflow((current) => current.left === left && current.right === right ? current : { left, right });
|
|
916
920
|
}, []);
|
|
917
921
|
useIsoLayoutEffect4(() => {
|
|
918
922
|
const el = toolbarRef.current;
|
|
923
|
+
const outer = toolbarContainerRef.current;
|
|
919
924
|
if (!el)
|
|
920
925
|
return;
|
|
921
926
|
updateToolbarOverflow();
|
|
922
927
|
const observer = new ResizeObserver(updateToolbarOverflow);
|
|
923
928
|
observer.observe(el);
|
|
929
|
+
if (outer)
|
|
930
|
+
observer.observe(outer);
|
|
924
931
|
return () => observer.disconnect();
|
|
925
932
|
}, [hasToolbar, updateToolbarOverflow]);
|
|
926
933
|
const scrollToolbar = (delta) => {
|
|
927
934
|
toolbarRef.current?.scrollBy({ left: delta, behavior: "smooth" });
|
|
928
935
|
};
|
|
936
|
+
const toolbarMaskImage = toolbarOverflow.left && toolbarOverflow.right ? "linear-gradient(to right, transparent, black 24px, black calc(100% - 24px), transparent)" : toolbarOverflow.left ? "linear-gradient(to right, transparent, black 24px)" : toolbarOverflow.right ? "linear-gradient(to right, black calc(100% - 24px), transparent)" : undefined;
|
|
929
937
|
useIsoLayoutEffect4(() => {
|
|
930
938
|
if (zoom !== undefined || openingZoom !== undefined || !naturalSize || !viewportSize)
|
|
931
939
|
return;
|
|
@@ -950,12 +958,24 @@ function DiagramViewer({
|
|
|
950
958
|
className: "flex size-full min-h-0 min-w-0 flex-1 flex-col gap-2",
|
|
951
959
|
children: [
|
|
952
960
|
hasToolbar && /* @__PURE__ */ jsxs5("div", {
|
|
953
|
-
|
|
961
|
+
ref: toolbarContainerRef,
|
|
962
|
+
className: "flex min-w-0 shrink-0 items-center gap-control-gap",
|
|
954
963
|
children: [
|
|
964
|
+
toolbarOverflow.left && /* @__PURE__ */ jsx5(Button2, {
|
|
965
|
+
type: "button",
|
|
966
|
+
variant: "outline",
|
|
967
|
+
size: "icon-sm",
|
|
968
|
+
density,
|
|
969
|
+
"aria-label": "Scroll toolbar left",
|
|
970
|
+
className: "shrink-0",
|
|
971
|
+
onClick: () => scrollToolbar(-120),
|
|
972
|
+
children: /* @__PURE__ */ jsx5(ChevronLeftIcon, {})
|
|
973
|
+
}),
|
|
955
974
|
/* @__PURE__ */ jsxs5("div", {
|
|
956
975
|
ref: toolbarRef,
|
|
957
976
|
"data-slot": "diagram-viewer-toolbar",
|
|
958
977
|
onScroll: updateToolbarOverflow,
|
|
978
|
+
style: toolbarMaskImage ? { maskImage: toolbarMaskImage, WebkitMaskImage: toolbarMaskImage } : undefined,
|
|
959
979
|
className: "flex min-w-0 flex-1 flex-wrap items-center gap-control-gap *:shrink-0 [@media(max-height:280px)]:flex-nowrap [@media(max-height:280px)]:overflow-x-auto [@media(max-height:280px)]:[scrollbar-width:none] [@media(max-height:280px)]:[&::-webkit-scrollbar]:hidden",
|
|
960
980
|
children: [
|
|
961
981
|
showZoomControl && /* @__PURE__ */ jsx5(ImageZoomControl, {
|
|
@@ -968,31 +988,15 @@ function DiagramViewer({
|
|
|
968
988
|
toolbar
|
|
969
989
|
]
|
|
970
990
|
}),
|
|
971
|
-
toolbarOverflow.
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
onClick: () => scrollToolbar(-120),
|
|
981
|
-
children: /* @__PURE__ */ jsx5(ChevronLeftIcon, {})
|
|
982
|
-
})
|
|
983
|
-
}),
|
|
984
|
-
toolbarOverflow.right && /* @__PURE__ */ jsx5("div", {
|
|
985
|
-
className: "pointer-events-none absolute inset-y-0 right-0 flex items-center bg-gradient-to-l from-background via-background/95 to-transparent ps-4",
|
|
986
|
-
children: /* @__PURE__ */ jsx5(Button2, {
|
|
987
|
-
type: "button",
|
|
988
|
-
variant: "outline",
|
|
989
|
-
size: "icon-sm",
|
|
990
|
-
density,
|
|
991
|
-
"aria-label": "Scroll toolbar right",
|
|
992
|
-
className: "pointer-events-auto bg-background",
|
|
993
|
-
onClick: () => scrollToolbar(120),
|
|
994
|
-
children: /* @__PURE__ */ jsx5(ChevronRightIcon, {})
|
|
995
|
-
})
|
|
991
|
+
toolbarOverflow.right && /* @__PURE__ */ jsx5(Button2, {
|
|
992
|
+
type: "button",
|
|
993
|
+
variant: "outline",
|
|
994
|
+
size: "icon-sm",
|
|
995
|
+
density,
|
|
996
|
+
"aria-label": "Scroll toolbar right",
|
|
997
|
+
className: "shrink-0",
|
|
998
|
+
onClick: () => scrollToolbar(120),
|
|
999
|
+
children: /* @__PURE__ */ jsx5(ChevronRightIcon, {})
|
|
996
1000
|
})
|
|
997
1001
|
]
|
|
998
1002
|
}),
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
PaginationPrevious2,
|
|
27
27
|
PaginationNext2,
|
|
28
28
|
PaginationEllipsis2
|
|
29
|
-
} from "../../chunk-
|
|
29
|
+
} from "../../chunk-14g20hm9.js";
|
|
30
30
|
import {
|
|
31
31
|
MenuPopup,
|
|
32
32
|
MenuItem2,
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
} from "../../chunk-kgqe8gpb.js";
|
|
86
86
|
import {
|
|
87
87
|
Badge2
|
|
88
|
-
} from "../../chunk-
|
|
88
|
+
} from "../../chunk-mdt1n179.js";
|
|
89
89
|
import {
|
|
90
90
|
Card2,
|
|
91
91
|
CardHeader2,
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
TabsList2,
|
|
101
101
|
TabsTrigger2,
|
|
102
102
|
TabsContent2
|
|
103
|
-
} from "../../chunk-
|
|
103
|
+
} from "../../chunk-ygrvagz1.js";
|
|
104
104
|
import"../../chunk-4e96tpw0.js";
|
|
105
105
|
import {
|
|
106
106
|
Checkbox2
|
package/dist/index.js
CHANGED
|
@@ -188,7 +188,7 @@ import {
|
|
|
188
188
|
DashboardLayout2,
|
|
189
189
|
BillingUsage2,
|
|
190
190
|
SelectionAction2
|
|
191
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-14g20hm9.js";
|
|
192
192
|
import {
|
|
193
193
|
statusDotVariants2,
|
|
194
194
|
StatusDot2
|
|
@@ -225,7 +225,7 @@ import {
|
|
|
225
225
|
useDropTarget2,
|
|
226
226
|
DropTarget2,
|
|
227
227
|
Kanban2
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-ygrvagz1.js";
|
|
229
229
|
import {
|
|
230
230
|
NumberField2,
|
|
231
231
|
NumberFieldGroup2,
|
|
@@ -403,7 +403,7 @@ import"./chunk-m4geb1s5.js";
|
|
|
403
403
|
import {
|
|
404
404
|
badgeVariants2,
|
|
405
405
|
Badge2
|
|
406
|
-
} from "./chunk-
|
|
406
|
+
} from "./chunk-mdt1n179.js";
|
|
407
407
|
import {
|
|
408
408
|
Collapsible2,
|
|
409
409
|
CollapsibleTrigger2,
|
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.
|
|
2054
|
+
version: "0.0.167",
|
|
2055
2055
|
description: "Sharp, monospace React components with compact, comfortable, and touch densities.",
|
|
2056
2056
|
license: "MIT",
|
|
2057
2057
|
repository: {
|
|
@@ -32,6 +32,7 @@ Badge
|
|
|
32
32
|
control: "select",
|
|
33
33
|
options: ["default", "secondary", "outline", "destructive", "ghost", "success", "warning", "link"],
|
|
34
34
|
},
|
|
35
|
+
wrap: { control: "boolean" },
|
|
35
36
|
}
|
|
36
37
|
```
|
|
37
38
|
|
|
@@ -230,3 +231,19 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
230
231
|
</div>)
|
|
231
232
|
}
|
|
232
233
|
```
|
|
234
|
+
|
|
235
|
+
### Wrap
|
|
236
|
+
|
|
237
|
+
```tsx
|
|
238
|
+
{
|
|
239
|
+
render: () => (<div data-testid="Badge--wrap-container" className="flex w-64 flex-col items-start gap-2">
|
|
240
|
+
<Badge variant="outline">Short</Badge>
|
|
241
|
+
<Badge variant="outline" wrap>
|
|
242
|
+
Reviewed · sent to your agent 10:35 · picked up 10:36 · follow-up in progress
|
|
243
|
+
</Badge>
|
|
244
|
+
<Badge variant="warning" wrap>
|
|
245
|
+
Reviewed · sent to your agent 10:06 · not picked up yet · 35 min
|
|
246
|
+
</Badge>
|
|
247
|
+
</div>)
|
|
248
|
+
}
|
|
249
|
+
```
|