@alexgorbatchev/shadcn 0.0.148 → 0.0.152
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-m32ptxf3.js → chunk-4m2x9jfb.js} +1 -1
- package/dist/{chunk-p0d89mze.js → chunk-5q0670jv.js} +1 -1
- package/dist/{chunk-bfv4qesg.js → chunk-9e1yb90r.js} +1 -1
- package/dist/{chunk-ngttdb6m.js → chunk-fbajrfv6.js} +1 -1
- package/dist/{chunk-cbyqgfv4.js → chunk-kevm8s2n.js} +1 -1
- package/dist/{chunk-3dttg1b6.js → chunk-ncskzkqr.js} +1 -1
- package/dist/{chunk-v1semj30.js → chunk-rf70907h.js} +41 -16
- package/dist/{chunk-7q8kp3t5.js → chunk-ywr2pqhc.js} +1 -1
- package/dist/components/Item.d.ts +3 -1
- package/dist/components/OptionCardGroup.d.ts +23 -8
- package/dist/components/assistant-ui/elements/EditMessage.js +3 -3
- package/dist/components/assistant-ui/elements/ElicitationForm.js +3 -3
- package/dist/components/assistant-ui/elements/FeedbackDialog.js +3 -3
- package/dist/components/assistant-ui/elements/ModelPicker.js +3 -3
- package/dist/components/assistant-ui/index.js +6 -6
- package/dist/components/assistant-ui/native/McpConfigDialog.js +2 -2
- package/dist/components/assistant-ui/native/index.js +2 -2
- package/dist/components/data-grid/index.js +1 -1
- package/dist/components/event-calendar/index.js +2 -2
- package/dist/components/image-viewer/ImageComparison.d.ts +7 -2
- package/dist/components/image-viewer/ImageComparisonToolbar.d.ts +4 -2
- package/dist/components/image-viewer/ImageGallery.d.ts +41 -0
- package/dist/components/image-viewer/MediaShell.d.ts +19 -0
- package/dist/components/image-viewer/index.d.ts +5 -1
- package/dist/components/image-viewer/index.js +292 -75
- package/dist/components/image-viewer/types.d.ts +2 -0
- package/dist/components/input-otp/index.js +2 -2
- package/dist/components/json-render/JsonForm.d.ts +3 -1
- package/dist/components/json-render/index.js +16 -9
- package/dist/index.js +3 -3
- package/dist/prototype.js +1 -1
- package/llms/components/data-display/ImageComparison.md +10 -1
- package/llms/components/data-display/ImageGallery.md +62 -0
- package/llms/components/data-display/Item.md +36 -0
- package/llms/components/data-display/JsonRenderForm.md +11 -1
- package/llms/components/forms/Label.md +14 -0
- package/llms/components/forms/OptionCardGroup.md +46 -0
- package/llms/components/layout/Accordion.md +29 -0
- package/llms.txt +2 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ function Label2({ density, className, ...props }) {
|
|
|
9
9
|
return /* @__PURE__ */ jsx("label", {
|
|
10
10
|
"data-density": density,
|
|
11
11
|
"data-slot": "label",
|
|
12
|
-
className: cn2("flex items-center gap-2 text-sm leading-
|
|
12
|
+
className: cn2("flex min-w-0 items-center gap-2 text-sm leading-snug font-medium wrap-break-word select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
13
13
|
...props
|
|
14
14
|
});
|
|
15
15
|
}
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
Field2,
|
|
72
72
|
FieldLabel2,
|
|
73
73
|
FieldDescription2
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-9e1yb90r.js";
|
|
75
75
|
import {
|
|
76
76
|
Textarea2
|
|
77
77
|
} from "./chunk-p51p95er.js";
|
|
@@ -442,7 +442,7 @@ function AccordionItem2({ density, className, ...props }) {
|
|
|
442
442
|
return /* @__PURE__ */ jsx5(AccordionPrimitive.Item, {
|
|
443
443
|
"data-density": density,
|
|
444
444
|
"data-slot": "accordion-item",
|
|
445
|
-
className: (state) => cn2("not-last:border-b", typeof className === "function" ? className(state) : className),
|
|
445
|
+
className: (state) => cn2("min-w-0 not-last:border-b", typeof className === "function" ? className(state) : className),
|
|
446
446
|
...props
|
|
447
447
|
});
|
|
448
448
|
}
|
|
@@ -454,12 +454,12 @@ function AccordionTrigger2({
|
|
|
454
454
|
...props
|
|
455
455
|
}) {
|
|
456
456
|
return /* @__PURE__ */ jsx5(AccordionPrimitive.Header, {
|
|
457
|
-
className: "flex",
|
|
457
|
+
className: "flex min-w-0",
|
|
458
458
|
children: /* @__PURE__ */ jsxs3(AccordionPrimitive.Trigger, {
|
|
459
459
|
"data-density": density,
|
|
460
460
|
"data-slot": "accordion-trigger",
|
|
461
461
|
"data-chevron-placement": chevronPlacement,
|
|
462
|
-
className: (state) => cn2("group/accordion-trigger relative flex flex-1 items-start rounded-sm border border-transparent py-2.5 text-start text-sm font-medium transition-colors outline-none hover:underline focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground", chevronPlacement === "end" ? "justify-between **:data-[slot=accordion-trigger-icon]:ms-auto" : "justify-start gap-2 **:data-[slot=accordion-trigger-icon]:mt-0.5", typeof className === "function" ? className(state) : className),
|
|
462
|
+
className: (state) => cn2("group/accordion-trigger relative flex min-w-0 flex-1 items-start rounded-sm border border-transparent py-2.5 text-start text-sm font-medium wrap-break-word transition-colors outline-none hover:underline focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground", chevronPlacement === "end" ? "justify-between **:data-[slot=accordion-trigger-icon]:ms-auto" : "justify-start gap-2 **:data-[slot=accordion-trigger-icon]:mt-0.5", typeof className === "function" ? className(state) : className),
|
|
463
463
|
...props,
|
|
464
464
|
children: [
|
|
465
465
|
children,
|
|
@@ -482,7 +482,7 @@ function AccordionContent2({ density, className, children, ...props }) {
|
|
|
482
482
|
className: (state) => cn2("h-(--accordion-panel-height) overflow-hidden text-sm transition-[height] duration-200 ease-out data-ending-style:h-0 data-starting-style:h-0", typeof className === "function" ? className(state) : className),
|
|
483
483
|
...props,
|
|
484
484
|
children: /* @__PURE__ */ jsx5("div", {
|
|
485
|
-
className: "pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [
|
|
485
|
+
className: "min-w-0 pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&>p:not(:last-child)]:mb-4",
|
|
486
486
|
children
|
|
487
487
|
})
|
|
488
488
|
});
|
|
@@ -496,28 +496,44 @@ import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
|
496
496
|
import { CheckIcon } from "lucide-react";
|
|
497
497
|
import { jsx as jsx6, jsxs as jsxs4, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
498
498
|
"use client";
|
|
499
|
-
|
|
500
|
-
|
|
499
|
+
function getGroupClass(layout) {
|
|
500
|
+
return cn2("grid w-full gap-2", layout === "row" && "grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))]");
|
|
501
|
+
}
|
|
502
|
+
function OptionCardGroup2({
|
|
503
|
+
analytics,
|
|
504
|
+
density,
|
|
505
|
+
layout = "stack",
|
|
506
|
+
className,
|
|
507
|
+
...props
|
|
508
|
+
}) {
|
|
501
509
|
const trackedOnValueChange = useAnalyticsCallback("OptionCardGroup", analytics, { name: "ui.change-request" }, props.onValueChange);
|
|
502
510
|
return /* @__PURE__ */ jsx6(RadioGroupPrimitive, {
|
|
503
511
|
"data-density": density,
|
|
504
512
|
"data-slot": "option-card-group",
|
|
505
|
-
|
|
513
|
+
"data-layout": layout,
|
|
514
|
+
className: (state) => cn2(getGroupClass(layout), typeof className === "function" ? className(state) : className),
|
|
506
515
|
...props,
|
|
507
516
|
onValueChange: trackedOnValueChange
|
|
508
517
|
});
|
|
509
518
|
}
|
|
510
|
-
function OptionCheckboxGroup2({
|
|
519
|
+
function OptionCheckboxGroup2({
|
|
520
|
+
analytics,
|
|
521
|
+
density,
|
|
522
|
+
layout = "stack",
|
|
523
|
+
className,
|
|
524
|
+
...props
|
|
525
|
+
}) {
|
|
511
526
|
const trackedOnValueChange = useAnalyticsCallback("OptionCheckboxGroup", analytics, { name: "ui.change-request" }, props.onValueChange);
|
|
512
527
|
return /* @__PURE__ */ jsx6(CheckboxGroupPrimitive, {
|
|
513
528
|
"data-density": density,
|
|
514
529
|
"data-slot": "option-checkbox-group",
|
|
515
|
-
|
|
530
|
+
"data-layout": layout,
|
|
531
|
+
className: (state) => cn2(getGroupClass(layout), typeof className === "function" ? className(state) : className),
|
|
516
532
|
...props,
|
|
517
533
|
onValueChange: trackedOnValueChange
|
|
518
534
|
});
|
|
519
535
|
}
|
|
520
|
-
var CARD_CLASS = "group/option-card grid w-full cursor-pointer grid-cols-[1.25rem_minmax(0,1fr)] items-start gap-x-2 rounded-md border border-input bg-card p-panel-sm text-start text-sm text-card-foreground transition-colors outline-none hover:bg-muted/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid data-checked:border-primary data-checked:ring-1 data-checked:ring-primary forced-colors:data-checked:border-[color:Highlight] aria-invalid:not-data-checked:border-destructive data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:hover:bg-card data-readonly:cursor-default data-folding:pb-10";
|
|
536
|
+
var CARD_CLASS = "group/option-card grid h-full w-full cursor-pointer grid-cols-[1.25rem_minmax(0,1fr)] items-start gap-x-2 rounded-md border border-input bg-card p-panel-sm text-start text-sm text-card-foreground transition-colors outline-none hover:bg-muted/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid data-checked:border-primary data-checked:ring-1 data-checked:ring-primary forced-colors:data-checked:border-[color:Highlight] aria-invalid:not-data-checked:border-destructive data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:hover:bg-card data-readonly:cursor-default data-folding:pb-10";
|
|
521
537
|
var CARD_CONTROL_SELECTOR = '[data-slot="option-card"], [data-slot="option-checkbox-card"]';
|
|
522
538
|
function useFold(lines) {
|
|
523
539
|
const ref = useRef(null);
|
|
@@ -663,6 +679,7 @@ function OptionCard2({
|
|
|
663
679
|
reason,
|
|
664
680
|
image,
|
|
665
681
|
marker,
|
|
682
|
+
span = "auto",
|
|
666
683
|
density,
|
|
667
684
|
className,
|
|
668
685
|
...props
|
|
@@ -694,7 +711,8 @@ function OptionCard2({
|
|
|
694
711
|
};
|
|
695
712
|
return /* @__PURE__ */ jsxs4("div", {
|
|
696
713
|
"data-slot": "option-card-item",
|
|
697
|
-
|
|
714
|
+
"data-span": span === "full" ? "full" : undefined,
|
|
715
|
+
className: cn2("relative min-w-0", span === "full" && "col-span-full"),
|
|
698
716
|
children: [
|
|
699
717
|
/* @__PURE__ */ jsx6(RadioPrimitive.Root, {
|
|
700
718
|
"data-density": density,
|
|
@@ -726,6 +744,7 @@ function OptionCheckboxCard2({
|
|
|
726
744
|
recommendedLabel,
|
|
727
745
|
reason,
|
|
728
746
|
image,
|
|
747
|
+
span = "auto",
|
|
729
748
|
density,
|
|
730
749
|
className,
|
|
731
750
|
...props
|
|
@@ -742,7 +761,8 @@ function OptionCheckboxCard2({
|
|
|
742
761
|
const content = { label, description, descriptionLines, recommended, recommendedLabel, reason, image, marker };
|
|
743
762
|
return /* @__PURE__ */ jsxs4("div", {
|
|
744
763
|
"data-slot": "option-card-item",
|
|
745
|
-
|
|
764
|
+
"data-span": span === "full" ? "full" : undefined,
|
|
765
|
+
className: cn2("relative min-w-0", span === "full" && "col-span-full"),
|
|
746
766
|
children: [
|
|
747
767
|
/* @__PURE__ */ jsx6(CheckboxPrimitive.Root, {
|
|
748
768
|
"data-density": density,
|
|
@@ -1912,15 +1932,20 @@ function ItemContent2({ density, className, ...props }) {
|
|
|
1912
1932
|
return /* @__PURE__ */ jsx21("div", {
|
|
1913
1933
|
"data-density": density,
|
|
1914
1934
|
"data-slot": "item-content",
|
|
1915
|
-
className: cn2("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
|
|
1935
|
+
className: cn2("flex min-w-0 flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
|
|
1916
1936
|
...props
|
|
1917
1937
|
});
|
|
1918
1938
|
}
|
|
1919
|
-
function ItemTitle2({ density, className, wrap = false, ...props }) {
|
|
1939
|
+
function ItemTitle2({ density, className, wrap = false, truncate = false, ...props }) {
|
|
1920
1940
|
return /* @__PURE__ */ jsx21("div", {
|
|
1921
1941
|
"data-density": density,
|
|
1922
1942
|
"data-slot": "item-title",
|
|
1923
|
-
|
|
1943
|
+
"data-truncated": truncate || undefined,
|
|
1944
|
+
className: cn2(truncate ? "block min-w-0 max-w-full truncate text-start text-sm leading-snug font-medium underline-offset-4" : [
|
|
1945
|
+
!wrap && "line-clamp-1",
|
|
1946
|
+
"flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
|
|
1947
|
+
wrap && "min-w-0 max-w-full wrap-anywhere"
|
|
1948
|
+
], className),
|
|
1924
1949
|
...props
|
|
1925
1950
|
});
|
|
1926
1951
|
}
|
|
@@ -22,8 +22,10 @@ declare function ItemContent({ density, className, ...props }: ItemContentProps)
|
|
|
22
22
|
type ItemTitleProps = ComponentProps<"div"> & IDensityProps & {
|
|
23
23
|
/** Keep the complete title visible, including long unbroken names. */
|
|
24
24
|
wrap?: boolean;
|
|
25
|
+
/** Clip to a single line with an ellipsis only when the title overflows its available width. */
|
|
26
|
+
truncate?: boolean;
|
|
25
27
|
};
|
|
26
|
-
declare function ItemTitle({ density, className, wrap, ...props }: ItemTitleProps): ReactElement;
|
|
28
|
+
declare function ItemTitle({ density, className, wrap, truncate, ...props }: ItemTitleProps): ReactElement;
|
|
27
29
|
type ItemDescriptionProps = ComponentProps<"p"> & IDensityProps;
|
|
28
30
|
declare function ItemDescription({ density, className, ...props }: ItemDescriptionProps): ReactElement;
|
|
29
31
|
type ItemActionsProps = ComponentProps<"div"> & IDensityProps;
|
|
@@ -5,18 +5,26 @@ import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
|
5
5
|
import { CheckboxGroup as CheckboxGroupPrimitive } from "@base-ui/react/checkbox-group";
|
|
6
6
|
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
7
7
|
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* How a group places its cards: `stack` (the default) puts one card per row; `row` puts cards side by side in equal
|
|
10
|
+
* columns at least 14rem wide, as many as the group's width fits, so options with images can be compared at a glance.
|
|
11
|
+
*/
|
|
12
|
+
type OptionCardGroupLayout = "stack" | "row";
|
|
13
|
+
interface IOptionCardGroupLayoutProps {
|
|
14
|
+
layout?: OptionCardGroupLayout;
|
|
15
|
+
}
|
|
16
|
+
type OptionCardGroupProps = IAnalyticsProps & RadioGroupPrimitive.Props & IDensityProps & IOptionCardGroupLayoutProps;
|
|
9
17
|
/**
|
|
10
18
|
* A single-choice group of option cards. Each card is a radio: arrow keys move the selection between cards, Space
|
|
11
19
|
* selects the focused card, and `name`, `required` and `form` take part in native form submission and validation.
|
|
12
20
|
*/
|
|
13
|
-
declare function OptionCardGroup({ analytics, density, className, ...props }: OptionCardGroupProps): ReactElement;
|
|
14
|
-
type OptionCheckboxGroupProps = IAnalyticsProps & CheckboxGroupPrimitive.Props & IDensityProps;
|
|
21
|
+
declare function OptionCardGroup({ analytics, density, layout, className, ...props }: OptionCardGroupProps): ReactElement;
|
|
22
|
+
type OptionCheckboxGroupProps = IAnalyticsProps & CheckboxGroupPrimitive.Props & IDensityProps & IOptionCardGroupLayoutProps;
|
|
15
23
|
/**
|
|
16
24
|
* A multiple-choice group of option cards, laid out like `OptionCardGroup`. Each card is a checkbox: Tab moves between
|
|
17
25
|
* cards and Space toggles the focused one. `value` lists the checked cards' values.
|
|
18
26
|
*/
|
|
19
|
-
declare function OptionCheckboxGroup({ analytics, density, className, ...props }: OptionCheckboxGroupProps): ReactElement;
|
|
27
|
+
declare function OptionCheckboxGroup({ analytics, density, layout, className, ...props }: OptionCheckboxGroupProps): ReactElement;
|
|
20
28
|
interface IOptionCardContentProps {
|
|
21
29
|
/** The option's name, shown in bold and used as its accessible name. */
|
|
22
30
|
label: ReactNode;
|
|
@@ -42,18 +50,25 @@ interface IOptionCardContentProps {
|
|
|
42
50
|
*/
|
|
43
51
|
marker?: ReactNode;
|
|
44
52
|
}
|
|
45
|
-
|
|
53
|
+
interface IOptionCardSpanProps {
|
|
54
|
+
/**
|
|
55
|
+
* How many columns the card occupies in a `layout="row"` group: `auto` (the default) takes one column; `full`
|
|
56
|
+
* spans the entire row, for a trailing text-only option such as "Something else" below image cards.
|
|
57
|
+
*/
|
|
58
|
+
span?: "auto" | "full";
|
|
59
|
+
}
|
|
60
|
+
type OptionCardProps = Omit<RadioPrimitive.Root.Props, "children"> & IDensityProps & IOptionCardContentProps & IOptionCardSpanProps;
|
|
46
61
|
/**
|
|
47
62
|
* One option of an `OptionCardGroup`: a bordered card with a leading radio mark and letter, a bold label and a muted
|
|
48
63
|
* description. The radio mark shows the choice by shape as well as colour, and sets single choice apart from an
|
|
49
64
|
* `OptionCheckboxCard`'s checkbox.
|
|
50
65
|
*/
|
|
51
|
-
declare function OptionCard({ label, description, descriptionLines, recommended, recommendedLabel, reason, image, marker, density, className, ...props }: OptionCardProps): ReactElement;
|
|
52
|
-
type OptionCheckboxCardProps = Omit<CheckboxPrimitive.Root.Props, "children"> & IDensityProps & IOptionCardContentProps;
|
|
66
|
+
declare function OptionCard({ label, description, descriptionLines, recommended, recommendedLabel, reason, image, marker, span, density, className, ...props }: OptionCardProps): ReactElement;
|
|
67
|
+
type OptionCheckboxCardProps = Omit<CheckboxPrimitive.Root.Props, "children"> & IDensityProps & IOptionCardContentProps & IOptionCardSpanProps;
|
|
53
68
|
/**
|
|
54
69
|
* One option of an `OptionCheckboxGroup`: the same card as `OptionCard`, with a checkbox in the leading column so the
|
|
55
70
|
* group reads as "choose any".
|
|
56
71
|
*/
|
|
57
|
-
declare function OptionCheckboxCard({ label, description, descriptionLines, recommended, recommendedLabel, reason, image, density, className, ...props }: OptionCheckboxCardProps): ReactElement;
|
|
72
|
+
declare function OptionCheckboxCard({ label, description, descriptionLines, recommended, recommendedLabel, reason, image, span, density, className, ...props }: OptionCheckboxCardProps): ReactElement;
|
|
58
73
|
export { OptionCardGroup, OptionCard, OptionCheckboxGroup, OptionCheckboxCard };
|
|
59
74
|
export type { OptionCardGroupProps, OptionCardProps, OptionCheckboxGroupProps, OptionCheckboxCardProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EditMessage2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-5q0670jv.js";
|
|
4
4
|
import"../../../chunk-vxvaaptq.js";
|
|
5
|
-
import"../../../chunk-
|
|
5
|
+
import"../../../chunk-9e1yb90r.js";
|
|
6
6
|
import"../../../chunk-jc3cbwyg.js";
|
|
7
|
-
import"../../../chunk-
|
|
7
|
+
import"../../../chunk-4m2x9jfb.js";
|
|
8
8
|
import"../../../chunk-p51p95er.js";
|
|
9
9
|
import"../../../chunk-7jpsybag.js";
|
|
10
10
|
import"../../../chunk-52aadmkc.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ElicitationForm2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-ncskzkqr.js";
|
|
4
4
|
import"../../../chunk-vxvaaptq.js";
|
|
5
5
|
import"../../../chunk-kgqe8gpb.js";
|
|
6
6
|
import"../../../chunk-m98d89xc.js";
|
|
7
|
-
import"../../../chunk-
|
|
7
|
+
import"../../../chunk-9e1yb90r.js";
|
|
8
8
|
import"../../../chunk-jc3cbwyg.js";
|
|
9
|
-
import"../../../chunk-
|
|
9
|
+
import"../../../chunk-4m2x9jfb.js";
|
|
10
10
|
import"../../../chunk-7vg045gd.js";
|
|
11
11
|
import"../../../chunk-7jpsybag.js";
|
|
12
12
|
import"../../../chunk-52aadmkc.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FeedbackDialog2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-fbajrfv6.js";
|
|
4
4
|
import"../../../chunk-32ah7jyp.js";
|
|
5
|
-
import"../../../chunk-
|
|
5
|
+
import"../../../chunk-9e1yb90r.js";
|
|
6
6
|
import"../../../chunk-jc3cbwyg.js";
|
|
7
|
-
import"../../../chunk-
|
|
7
|
+
import"../../../chunk-4m2x9jfb.js";
|
|
8
8
|
import"../../../chunk-p51p95er.js";
|
|
9
9
|
import"../../../chunk-7jpsybag.js";
|
|
10
10
|
import"../../../chunk-52aadmkc.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ModelPicker2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-ywr2pqhc.js";
|
|
4
4
|
import"../../../chunk-kgqe8gpb.js";
|
|
5
|
-
import"../../../chunk-
|
|
5
|
+
import"../../../chunk-9e1yb90r.js";
|
|
6
6
|
import"../../../chunk-jc3cbwyg.js";
|
|
7
7
|
import"../../../chunk-dbe9ppwf.js";
|
|
8
|
-
import"../../../chunk-
|
|
8
|
+
import"../../../chunk-4m2x9jfb.js";
|
|
9
9
|
import"../../../chunk-52aadmkc.js";
|
|
10
10
|
import"../../../chunk-5mydsjp3.js";
|
|
11
11
|
import"../../../chunk-8ssktt4b.js";
|
|
@@ -224,17 +224,17 @@ import {
|
|
|
224
224
|
import {
|
|
225
225
|
DraftRestore2
|
|
226
226
|
} from "../../chunk-fvxzrt3b.js";
|
|
227
|
-
import"../../chunk-
|
|
227
|
+
import"../../chunk-4m2x9jfb.js";
|
|
228
228
|
import"../../chunk-52aadmkc.js";
|
|
229
|
-
import"../../chunk-
|
|
229
|
+
import"../../chunk-9e1yb90r.js";
|
|
230
230
|
import {
|
|
231
231
|
EditMessage2
|
|
232
|
-
} from "../../chunk-
|
|
232
|
+
} from "../../chunk-5q0670jv.js";
|
|
233
233
|
import"../../chunk-kgqe8gpb.js";
|
|
234
234
|
import"../../chunk-m98d89xc.js";
|
|
235
235
|
import {
|
|
236
236
|
ElicitationForm2
|
|
237
|
-
} from "../../chunk-
|
|
237
|
+
} from "../../chunk-ncskzkqr.js";
|
|
238
238
|
import"../../chunk-4e96tpw0.js";
|
|
239
239
|
import {
|
|
240
240
|
EmptyState2
|
|
@@ -262,7 +262,7 @@ import {
|
|
|
262
262
|
import"../../chunk-32ah7jyp.js";
|
|
263
263
|
import {
|
|
264
264
|
FeedbackDialog2
|
|
265
|
-
} from "../../chunk-
|
|
265
|
+
} from "../../chunk-fbajrfv6.js";
|
|
266
266
|
import {
|
|
267
267
|
FileRoot2,
|
|
268
268
|
FileIconDisplay2,
|
|
@@ -373,7 +373,7 @@ import {
|
|
|
373
373
|
} from "../../chunk-k872qrgx.js";
|
|
374
374
|
import {
|
|
375
375
|
ModelPicker2
|
|
376
|
-
} from "../../chunk-
|
|
376
|
+
} from "../../chunk-ywr2pqhc.js";
|
|
377
377
|
import"../../chunk-kp3jgjng.js";
|
|
378
378
|
import {
|
|
379
379
|
ModelSelectorRoot2
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
McpConfigDialog2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-kevm8s2n.js";
|
|
4
4
|
import"../../../chunk-m4geb1s5.js";
|
|
5
5
|
import"../../../chunk-dbe9ppwf.js";
|
|
6
|
-
import"../../../chunk-
|
|
6
|
+
import"../../../chunk-4m2x9jfb.js";
|
|
7
7
|
import"../../../chunk-tcefvfr8.js";
|
|
8
8
|
import"../../../chunk-h45mqwpq.js";
|
|
9
9
|
import"../../../chunk-d22t4qx6.js";
|
|
@@ -134,11 +134,11 @@ import {
|
|
|
134
134
|
DirectiveText2
|
|
135
135
|
} from "../../../chunk-xdefvgvq.js";
|
|
136
136
|
import"../../../chunk-h45mqwpq.js";
|
|
137
|
-
import"../../../chunk-
|
|
137
|
+
import"../../../chunk-4m2x9jfb.js";
|
|
138
138
|
import"../../../chunk-52aadmkc.js";
|
|
139
139
|
import {
|
|
140
140
|
McpConfigDialog2
|
|
141
|
-
} from "../../../chunk-
|
|
141
|
+
} from "../../../chunk-kevm8s2n.js";
|
|
142
142
|
import"../../../chunk-ywaq50sv.js";
|
|
143
143
|
import"../../../chunk-cdx1h86b.js";
|
|
144
144
|
import {
|
|
@@ -9,13 +9,13 @@ import"../../chunk-jpvw9xqy.js";
|
|
|
9
9
|
import {
|
|
10
10
|
Button2
|
|
11
11
|
} from "../../chunk-2sx8m8b2.js";
|
|
12
|
-
import"../../chunk-
|
|
12
|
+
import"../../chunk-4m2x9jfb.js";
|
|
13
13
|
import"../../chunk-52aadmkc.js";
|
|
14
14
|
import {
|
|
15
15
|
FieldGroup2,
|
|
16
16
|
Field2,
|
|
17
17
|
FieldLabel2
|
|
18
|
-
} from "../../chunk-
|
|
18
|
+
} from "../../chunk-9e1yb90r.js";
|
|
19
19
|
import"../../chunk-7jpsybag.js";
|
|
20
20
|
import {
|
|
21
21
|
Input2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
2
|
import type { IDensityProps } from "../../density/types.js";
|
|
3
|
-
import type { IImageComparisonSource, ImageComparisonMode, ImageComparisonOrientation, ImageZoom } from "./types.js";
|
|
3
|
+
import type { IImageComparisonSource, ImageComparisonMode, ImageComparisonOrientation, ImageComparisonSide, ImageZoom } from "./types.js";
|
|
4
4
|
export interface IImageComparisonProps extends IDensityProps {
|
|
5
5
|
before: IImageComparisonSource;
|
|
6
6
|
after: IImageComparisonSource;
|
|
@@ -13,6 +13,11 @@ export interface IImageComparisonProps extends IDensityProps {
|
|
|
13
13
|
/** Initial mode when uncontrolled. Defaults to `toggle`. */
|
|
14
14
|
defaultMode?: ImageComparisonMode;
|
|
15
15
|
onModeChange?: (mode: ImageComparisonMode) => void;
|
|
16
|
+
/** Controlled image shown in `toggle` mode. */
|
|
17
|
+
side?: ImageComparisonSide;
|
|
18
|
+
/** Initial image shown in `toggle` mode when uncontrolled. Defaults to `after`. */
|
|
19
|
+
defaultSide?: ImageComparisonSide;
|
|
20
|
+
onSideChange?: (side: ImageComparisonSide) => void;
|
|
16
21
|
/** Controlled side-by-side arrangement. */
|
|
17
22
|
orientation?: ImageComparisonOrientation;
|
|
18
23
|
/** Initial side-by-side arrangement when uncontrolled. Defaults to `horizontal` (left and right). */
|
|
@@ -38,4 +43,4 @@ export interface IImageComparisonProps extends IDensityProps {
|
|
|
38
43
|
* fitted to the available space and offers original size with scrolling. A differently sized before image is drawn
|
|
39
44
|
* inside the after image's box. Highlighting differences compares pixels on first use and caches the result per pair.
|
|
40
45
|
*/
|
|
41
|
-
export declare function ImageComparison({ before, after, beforeLabel, afterLabel, mode: modeProp, defaultMode, onModeChange, orientation: orientationProp, defaultOrientation, onOrientationChange, zoom: zoomProp, defaultZoom, onZoomChange, showDifferences: showDifferencesProp, defaultShowDifferences, onShowDifferencesChange, showToolbar, label, density, }: IImageComparisonProps): ReactElement;
|
|
46
|
+
export declare function ImageComparison({ before, after, beforeLabel, afterLabel, mode: modeProp, defaultMode, onModeChange, side: sideProp, defaultSide, onSideChange, orientation: orientationProp, defaultOrientation, onOrientationChange, zoom: zoomProp, defaultZoom, onZoomChange, showDifferences: showDifferencesProp, defaultShowDifferences, onShowDifferencesChange, showToolbar, label, density, }: IImageComparisonProps): ReactElement;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type ReactElement } from "react";
|
|
2
2
|
import type { IDensityProps } from "../../density/types.js";
|
|
3
|
-
import type { IImageSize, ImageComparisonMode, ImageComparisonOrientation, ImageDifferenceState, ImageZoom } from "./types.js";
|
|
3
|
+
import type { IImageSize, ImageComparisonMode, ImageComparisonOrientation, ImageComparisonSide, ImageDifferenceState, ImageZoom } from "./types.js";
|
|
4
4
|
interface IImageComparisonToolbarProps extends IDensityProps {
|
|
5
5
|
mode: ImageComparisonMode;
|
|
6
6
|
onModeChange: (mode: ImageComparisonMode) => void;
|
|
7
|
+
side: ImageComparisonSide;
|
|
8
|
+
onSideChange: (side: ImageComparisonSide) => void;
|
|
7
9
|
orientation: ImageComparisonOrientation;
|
|
8
10
|
onOrientationChange: (orientation: ImageComparisonOrientation) => void;
|
|
9
11
|
zoom: ImageZoom;
|
|
@@ -18,5 +20,5 @@ interface IImageComparisonToolbarProps extends IDensityProps {
|
|
|
18
20
|
afterSize?: IImageSize;
|
|
19
21
|
}
|
|
20
22
|
/** Comparison controls: a side panel when the comparison is wide and a wrapping bar below it when narrow. */
|
|
21
|
-
export declare function ImageComparisonToolbar({ mode, onModeChange, orientation, onOrientationChange, zoom, onZoomChange, showDifferences, onShowDifferencesChange, differences, onPeekChange, beforeLabel, afterLabel, beforeSize, afterSize, density, }: IImageComparisonToolbarProps): ReactElement;
|
|
23
|
+
export declare function ImageComparisonToolbar({ mode, onModeChange, side, onSideChange, orientation, onOrientationChange, zoom, onZoomChange, showDifferences, onShowDifferencesChange, differences, onPeekChange, beforeLabel, afterLabel, beforeSize, afterSize, density, }: IImageComparisonToolbarProps): ReactElement;
|
|
22
24
|
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type KeyboardEvent, type ReactElement, type ReactNode, type Ref } from "react";
|
|
2
|
+
import type { IDensityProps } from "../../density/types.js";
|
|
3
|
+
export interface IImageGalleryItem {
|
|
4
|
+
/** Stable identity of the item, such as an option value. */
|
|
5
|
+
key: string;
|
|
6
|
+
src: string;
|
|
7
|
+
alt: string;
|
|
8
|
+
/** The item's name, used in the step announcement: "Bold · 2 of 3". */
|
|
9
|
+
label: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IImageGalleryProps extends IDensityProps {
|
|
12
|
+
items: readonly IImageGalleryItem[];
|
|
13
|
+
/** The shown item's position in `items`. */
|
|
14
|
+
index: number;
|
|
15
|
+
onIndexChange: (index: number) => void;
|
|
16
|
+
/** Width in CSS pixels the first shown image had where it was opened from; see `ImageViewer`. */
|
|
17
|
+
openingWidth?: number;
|
|
18
|
+
/** Accessible name of the stage, followed by the zoom percent. Defaults to the shown item's label. */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** Accessible name of the step back button. Defaults to "Previous image". */
|
|
21
|
+
previousLabel?: string;
|
|
22
|
+
/** Accessible name of the step forward button. Defaults to "Next image". */
|
|
23
|
+
nextLabel?: string;
|
|
24
|
+
/** Further controls in the toolbar row after the stepper, such as a Choose action. */
|
|
25
|
+
toolbar?: ReactNode;
|
|
26
|
+
/** Content positioned over the shown image; see `ImageViewer`. */
|
|
27
|
+
overlay?: ReactNode;
|
|
28
|
+
imageRef?: Ref<HTMLImageElement>;
|
|
29
|
+
stageRef?: Ref<HTMLDivElement>;
|
|
30
|
+
/** Runs for keys on the focused stage before the gallery's own; call `preventDefault()` to replace one. */
|
|
31
|
+
onStageKeyDown?: (event: KeyboardEvent<HTMLDivElement>) => void;
|
|
32
|
+
/** Further `aria-keyshortcuts` of the stage, such as "R". */
|
|
33
|
+
stageKeyShortcuts?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Steps through a set of images in one `ImageViewer`, keeping its zoom and viewed position, so the same area of each
|
|
37
|
+
* image can be compared. The toolbar holds the zoom bar, Previous, "2 of 3" and Next, then `toolbar`; Left and Right
|
|
38
|
+
* step on the focused stage only at Fit, where arrows do not pan. Each step is announced politely with the item's
|
|
39
|
+
* label and position. Compose it inside `MediaShell` and name the shell after the shown item.
|
|
40
|
+
*/
|
|
41
|
+
export declare function ImageGallery({ items, index, onIndexChange, openingWidth, label, previousLabel, nextLabel, toolbar, overlay, imageRef, stageRef, onStageKeyDown, stageKeyShortcuts, density, }: IImageGalleryProps): ReactElement;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentProps, ReactElement, ReactNode } from "react";
|
|
2
|
+
import type { IDensityProps } from "../../density/types.js";
|
|
3
|
+
import { Dialog } from "../Dialog.js";
|
|
4
|
+
export interface IMediaShellProps extends IDensityProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Receives Base UI's change details, so Escape can close an inner layer first by calling `details.cancel()`. */
|
|
7
|
+
onOpenChange: ComponentProps<typeof Dialog>["onOpenChange"];
|
|
8
|
+
/** The shown item's name, such as an image's alt text or an option's label. Truncates to one line. */
|
|
9
|
+
title: ReactNode;
|
|
10
|
+
/** A one-line hint or status under the title, such as the keys the stage takes. */
|
|
11
|
+
description?: ReactNode;
|
|
12
|
+
/** The stage: an `ImageViewer`, `ImageGallery` or `ImageComparison`, optionally inside a side panel layout. */
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The full-screen shell every image, comparison, gallery and diagram opens in: a header with the shown item's name, a
|
|
17
|
+
* hint line and an always visible Close, then a stage that fills the rest of the screen. Escape and Close close it.
|
|
18
|
+
*/
|
|
19
|
+
export declare function MediaShell({ open, onOpenChange, title, description, children, density, }: IMediaShellProps): ReactElement;
|
|
@@ -11,11 +11,15 @@ export type { IImageRegionFieldsProps } from "./ImageRegionFields.js";
|
|
|
11
11
|
export { IMAGE_REGION_STEP, MIN_IMAGE_REGION_SIZE, applyImageRegionKey, clampImageRegion, formatImageRegion, getImageRegionFromCorners, placeImageRegion, } from "./imageRegion.js";
|
|
12
12
|
export { FramedImage } from "./FramedImage.js";
|
|
13
13
|
export type { FramedImageSize, IFramedImageProps } from "./FramedImage.js";
|
|
14
|
+
export { ImageGallery } from "./ImageGallery.js";
|
|
15
|
+
export type { IImageGalleryItem, IImageGalleryProps } from "./ImageGallery.js";
|
|
16
|
+
export { MediaShell } from "./MediaShell.js";
|
|
17
|
+
export type { IMediaShellProps } from "./MediaShell.js";
|
|
14
18
|
export { ImageComparison } from "./ImageComparison.js";
|
|
15
19
|
export type { IImageComparisonProps } from "./ImageComparison.js";
|
|
16
20
|
export { computeImageDiff } from "./computeImageDiff.js";
|
|
17
21
|
export { getNormalizedImagePoint } from "./getNormalizedImagePoint.js";
|
|
18
22
|
export { IMAGE_ZOOM_STEPS, MAX_IMAGE_ZOOM, formatImageZoom, getImageZoomScales, getNextImageZoom, getOpeningImageZoom, getPreviousImageZoom, resolveImageZoomScale, } from "./imageZoom.js";
|
|
19
|
-
export type { IImageComparisonSource, IImageDiff, IImageDiffOptions, IImageDiffRegion, IImagePixels, IImageRect, IImageSize, IImageZoomScales, INormalizedImagePoint, ImageComparisonMode, ImageComparisonOrientation, ImageZoom, } from "./types.js";
|
|
23
|
+
export type { IImageComparisonSource, IImageDiff, IImageDiffOptions, IImageDiffRegion, IImagePixels, IImageRect, IImageSize, IImageZoomScales, INormalizedImagePoint, ImageComparisonMode, ImageComparisonOrientation, ImageComparisonSide, ImageZoom, } from "./types.js";
|
|
20
24
|
export { ImageRegionMarker, ImageRegionMarkerBadge } from "./ImageRegionMarker.js";
|
|
21
25
|
export type { IImageRegionBadgePosition, IImageRegionBox, IImageRegionMarkerProps, IImageRegionMarkerBadgeProps, ImageRegionLength, ImageRegionMarkerVariant, } from "./ImageRegionMarker.js";
|