@photoroom/ui 0.1.245 → 0.1.247

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.
@@ -3,11 +3,8 @@ export type HomeHeroBlockProps = Omit<React.ComponentProps<"section">, "title" |
3
3
  title?: React.ReactNode;
4
4
  subtitle?: React.ReactNode;
5
5
  ctas?: React.ReactNode;
6
- /** 9:4 video. Defines the hero height on `lg`+ and renders behind the content. */
7
6
  wideVisual?: React.ReactNode;
8
- /** 16:9 video, rendered below the content on screens narrower than `lg`. */
9
7
  standardVisual?: React.ReactNode;
10
- /** Block background surface. Defaults to `sand-50`. */
11
8
  background?: BlockBackgroundVariant;
12
9
  }>;
13
10
  export declare function HomeHeroBlock({ title, subtitle, ctas, wideVisual, standardVisual, background, className, ...rest }: HomeHeroBlockProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"HomeHeroBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/website/HomeHeroBlock/HomeHeroBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAElF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,GAC1F,QAAQ,CAAC;IACP,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,kFAAkF;IAClF,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,4EAA4E;IAC5E,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,uDAAuD;IACvD,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC,CAAC,CAAC;AAEL,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,cAAc,EACd,UAAsB,EACtB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,kBAAkB,2CAgEpB"}
1
+ {"version":3,"file":"HomeHeroBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/website/HomeHeroBlock/HomeHeroBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAElF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,GAC1F,QAAQ,CAAC;IACP,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC,CAAC,CAAC;AAEL,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,cAAc,EACd,UAAsB,EACtB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,kBAAkB,2CAiEpB"}
package/hooks/index.d.ts CHANGED
@@ -8,5 +8,6 @@ export * from "./useImageLoadStatus";
8
8
  export * from "./useIsClient";
9
9
  export * from "./useLazyLoadVideo";
10
10
  export * from "./usePasteFilesHandler";
11
+ export * from "./useResizeObserver";
11
12
  export * from "./useWindowDragEvents";
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,37 @@
1
+ export type ObservedSize = {
2
+ width: number | undefined;
3
+ height: number | undefined;
4
+ };
5
+ type UseResizeObserverOptions<T extends HTMLElement> = {
6
+ /**
7
+ * Observe an externally-managed ref instead of the returned `ref` callback.
8
+ * - `undefined`: attach the returned `ref` callback to the element to observe.
9
+ * - a ref object: observe its current element.
10
+ * - `null`: disable observation entirely.
11
+ *
12
+ * Limitation: the observer is (re)subscribed only when the ref object's
13
+ * identity changes (or on mount), not when `ref.current` is mutated to point
14
+ * at a different node behind the same ref object. If the element is swapped
15
+ * without a re-render that changes the ref identity, the hook keeps observing
16
+ * the stale node. This is fine for a stable element (or when you toggle the
17
+ * ref object itself), but if the observed node can change in place, prefer the
18
+ * returned `ref` callback instead — it re-subscribes on every node change.
19
+ */
20
+ ref?: React.RefObject<T | null> | null;
21
+ /**
22
+ * Called on every resize with the new size. When provided, the hook does not
23
+ * store the size in state, so it never triggers a re-render of its own.
24
+ */
25
+ onResize?: (size: ObservedSize) => void;
26
+ };
27
+ type UseResizeObserverResult<T extends HTMLElement> = {
28
+ ref: (element: T | null) => void;
29
+ width: number | undefined;
30
+ height: number | undefined;
31
+ };
32
+ /**
33
+ * Observe an element's content-box size with a `ResizeObserver`.
34
+ */
35
+ export declare function useResizeObserver<T extends HTMLElement = HTMLElement>(options?: UseResizeObserverOptions<T>): UseResizeObserverResult<T>;
36
+ export {};
37
+ //# sourceMappingURL=useResizeObserver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../src/hooks/useResizeObserver.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,KAAK,wBAAwB,CAAC,CAAC,SAAS,WAAW,IAAI;IACrD;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IACvC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,KAAK,uBAAuB,CAAC,CAAC,SAAS,WAAW,IAAI;IACpD,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACjC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EACnE,OAAO,GAAE,wBAAwB,CAAC,CAAC,CAAM,GACxC,uBAAuB,CAAC,CAAC,CAAC,CA+C5B"}