@openpawlabs/diy-guides-ui 1.5.4 → 1.6.0

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 (28) hide show
  1. package/dist/components/GuideLayout/GuideLayout.d.ts +9 -4
  2. package/dist/components/GuideLayout/GuideLayout.d.ts.map +1 -1
  3. package/dist/components/GuideLayout/GuideLayout.stories.d.ts +2 -1
  4. package/dist/components/GuideLayout/GuideLayout.stories.d.ts.map +1 -1
  5. package/dist/components/GuideStep/GuideStep.d.ts.map +1 -1
  6. package/dist/components/GuideStep/GuideStep.stories.d.ts.map +1 -1
  7. package/dist/components/MediaFigure/MediaFigure.d.ts +7 -2
  8. package/dist/components/MediaFigure/MediaFigure.d.ts.map +1 -1
  9. package/dist/components/MediaFigure/MediaFigureAnnotationEditor.d.ts.map +1 -1
  10. package/dist/components/MediaFigure/MediaFigureAnnotations.d.ts +10 -0
  11. package/dist/components/MediaFigure/MediaFigureAnnotations.d.ts.map +1 -0
  12. package/dist/components/MediaFigure/MediaFigureClipFrame.d.ts +31 -0
  13. package/dist/components/MediaFigure/MediaFigureClipFrame.d.ts.map +1 -0
  14. package/dist/components/MediaFigure/MediaFigureThumbnail.d.ts +14 -5
  15. package/dist/components/MediaFigure/MediaFigureThumbnail.d.ts.map +1 -1
  16. package/dist/diy-guides-ui.cjs +6 -6
  17. package/dist/diy-guides-ui.cjs.map +1 -1
  18. package/dist/diy-guides-ui.js +3215 -3091
  19. package/dist/diy-guides-ui.js.map +1 -1
  20. package/dist/hooks/useElementSize.d.ts +32 -0
  21. package/dist/hooks/useElementSize.d.ts.map +1 -0
  22. package/dist/hooks/useElementSize.test.d.ts +2 -0
  23. package/dist/hooks/useElementSize.test.d.ts.map +1 -0
  24. package/dist/stories/Welcome.stories.d.ts.map +1 -1
  25. package/dist/style.css +1 -1
  26. package/package.json +1 -1
  27. package/dist/components/MediaFigure/MediaFigureMedia.d.ts +0 -9
  28. package/dist/components/MediaFigure/MediaFigureMedia.d.ts.map +0 -1
@@ -0,0 +1,32 @@
1
+ export interface ElementSize {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ export interface UseElementSizeOptions {
6
+ /**
7
+ * Keep sampling size for this many milliseconds after mount and whenever
8
+ * `layoutSettleKey` changes — catches modal enter transitions and container-query
9
+ * layout that finishes after the first paint.
10
+ */
11
+ settleMs?: number;
12
+ /** Also observe the parent element for size changes (container queries, flex). */
13
+ observeParent?: boolean;
14
+ /**
15
+ * Re-measure when the element becomes fully visible — useful for content mounted
16
+ * inside animated modals.
17
+ */
18
+ remeasureWhenVisible?: boolean;
19
+ /** Changing this value triggers a fresh settle sampling window. */
20
+ layoutSettleKey?: boolean | number | string;
21
+ }
22
+ /**
23
+ * Tracks an element's border-box size via layout effect + ResizeObserver, with
24
+ * helpers for async layout (image decode, modal enter animation, container queries).
25
+ */
26
+ export declare function useElementSize<T extends HTMLElement>(options?: UseElementSizeOptions): {
27
+ ref: import("react").RefObject<T | null>;
28
+ size: ElementSize | null;
29
+ measure: () => void;
30
+ measureAfterLayout: () => void;
31
+ };
32
+ //# sourceMappingURL=useElementSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementSize.d.ts","sourceRoot":"","sources":["../../src/hooks/useElementSize.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mEAAmE;IACnE,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;CAC7C;AAwBD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,EAClD,OAAO,GAAE,qBAA0B;;;;;EAkHpC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=useElementSize.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementSize.test.d.ts","sourceRoot":"","sources":["../../src/hooks/useElementSize.test.tsx"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Welcome.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Welcome.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA8D5D;;;;;GAKG;AACH,QAAA,MAAM,IAAI;;;;;CAKM,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAiVnC,eAAO,MAAM,QAAQ,EAAE,KAqGtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAkD1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA0D7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAuG/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAoFhC,CAAC"}
1
+ {"version":3,"file":"Welcome.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Welcome.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA8D5D;;;;;GAKG;AACH,QAAA,MAAM,IAAI;;;;;CAKM,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAmVnC,eAAO,MAAM,QAAQ,EAAE,KAqGtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAkD1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA0D7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAuG/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAoFhC,CAAC"}