@orangecheck/app-design 0.3.0 → 0.3.1
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/components.js +2 -1
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +2 -1
- package/dist/components.mjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.js +1 -0
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +1 -0
- package/dist/primitives.mjs.map +1 -1
- package/package.json +1 -1
package/dist/components.mjs
CHANGED
|
@@ -153,7 +153,7 @@ function useActiveHeading(ids) {
|
|
|
153
153
|
const key = ids.join("|");
|
|
154
154
|
useEffect(() => {
|
|
155
155
|
const els = key.split("|").map((id) => document.getElementById(id)).filter((el) => el !== null);
|
|
156
|
-
if (els.length === 0) return;
|
|
156
|
+
if (els.length === 0 || typeof IntersectionObserver === "undefined") return;
|
|
157
157
|
const io = new IntersectionObserver(
|
|
158
158
|
(entries) => {
|
|
159
159
|
const hit = entries.filter((e) => e.isIntersecting).sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top)[0];
|
|
@@ -314,6 +314,7 @@ function ScrollFade({ fade = "var(--card)", className, innerClassName, children,
|
|
|
314
314
|
const el = ref.current;
|
|
315
315
|
if (!el) return;
|
|
316
316
|
measure();
|
|
317
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
317
318
|
const ro = new ResizeObserver(measure);
|
|
318
319
|
ro.observe(el);
|
|
319
320
|
if (el.firstElementChild) ro.observe(el.firstElementChild);
|