@photoroom/ui 0.1.106 → 0.1.107

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.
@@ -1,3 +1,5 @@
1
+ import type { FloatingInputReferenceImages } from "./types";
2
+ export type { FloatingInputReferenceImage, FloatingInputReferenceImages } from "./types";
1
3
  export type FloatingInputProps = {
2
4
  /** Current input value (controlled) */
3
5
  value: string;
@@ -24,6 +26,12 @@ export type FloatingInputProps = {
24
26
  * should keep the typed value (e.g. a blur-based dismiss).
25
27
  */
26
28
  onDismiss?: (clearValue: boolean) => void;
29
+ /**
30
+ * Optional reference-image picker shown as a footer below the input. When
31
+ * provided, the input row collapses to a single line (textarea inline with
32
+ * the submit button) and the textarea grows up to 3 lines before scrolling.
33
+ */
34
+ referenceImages?: FloatingInputReferenceImages;
27
35
  /** Additional className for the root container */
28
36
  className?: string;
29
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/FloatingInput/FloatingInput.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,+FAA+F;IAC/F,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,aAAa,oHAgFzB,CAAC"}
1
+ {"version":3,"file":"FloatingInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/FloatingInput/FloatingInput.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAE5D,YAAY,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAEzF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,+FAA+F;IAC/F,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C;;;;OAIG;IACH,eAAe,CAAC,EAAE,4BAA4B,CAAC;IAC/C,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,aAAa,oHAiGzB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { FloatingInputReferenceImages } from "./types";
2
+ type ReferenceImageFooterProps = {
3
+ referenceImages: FloatingInputReferenceImages;
4
+ disabled: boolean;
5
+ };
6
+ export declare const ReferenceImageFooter: ({ referenceImages, disabled }: ReferenceImageFooterProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=ReferenceImageFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReferenceImageFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/input/FloatingInput/ReferenceImageFooter.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAO5D,KAAK,yBAAyB,GAAG;IAC/B,eAAe,EAAE,4BAA4B,CAAC;IAC9C,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,+BAA+B,yBAAyB,4CAgF5F,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { FloatingInput } from "./FloatingInput";
2
- export type { FloatingInputProps } from "./FloatingInput";
2
+ export type { FloatingInputProps, FloatingInputReferenceImage, FloatingInputReferenceImages, } from "./FloatingInput";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/input/FloatingInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/input/FloatingInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,kBAAkB,EAClB,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,18 @@
1
+ export type FloatingInputReferenceImage = {
2
+ /** Stable identifier — also used as the selection key */
3
+ id: string;
4
+ /** Image URL rendered as the thumbnail background */
5
+ url: string;
6
+ alt: string;
7
+ };
8
+ export type FloatingInputReferenceImages = {
9
+ /** Label rendered above the thumbnails (e.g. "Select the correct reference photo") */
10
+ label: string;
11
+ /** Thumbnails shown in the footer; one is selected at a time */
12
+ items: FloatingInputReferenceImage[];
13
+ /** Currently selected image id */
14
+ selectedId: string;
15
+ /** Called when the user picks a different reference image */
16
+ onSelect: (id: string) => void;
17
+ };
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/input/FloatingInput/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,2BAA2B,GAAG;IACxC,yDAAyD;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,KAAK,EAAE,2BAA2B,EAAE,CAAC;IACrC,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,CAAC"}
@@ -6,6 +6,17 @@ export type ImageWidgetProps = {
6
6
  flexibleWidth?: boolean;
7
7
  fill?: boolean;
8
8
  isLoading?: boolean;
9
+ /**
10
+ * When true, the visual frame's border switches from the default 1px
11
+ * misc-border to a 2px content-accent border, matching the design-system
12
+ * selected state.
13
+ */
14
+ selected?: boolean;
15
+ /**
16
+ * When true, suppresses the hover/active overlay so the widget reads as
17
+ * non-interactive. Useful when the surrounding control is disabled.
18
+ */
19
+ disabled?: boolean;
9
20
  buttonIcon?: React.ComponentType<{
10
21
  className?: string;
11
22
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"ImageWidget.d.ts","sourceRoot":"","sources":["../../../../src/components/input/ImageWidget/ImageWidget.tsx"],"names":[],"mappings":"AAYA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,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