@lmb-it/kitsconcerto-native 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.
- package/components/ActionCard/index.cjs +10 -0
- package/components/ActionCard/index.cjs.map +1 -0
- package/components/ActionCard/index.js +6 -0
- package/components/ActionCard/index.js.map +1 -0
- package/components/BarChart/index.cjs +10 -0
- package/components/BarChart/index.cjs.map +1 -0
- package/components/BarChart/index.js +6 -0
- package/components/BarChart/index.js.map +1 -0
- package/components/Delta/index.cjs +10 -0
- package/components/Delta/index.cjs.map +1 -0
- package/components/Delta/index.js +6 -0
- package/components/Delta/index.js.map +1 -0
- package/components/Donut/index.cjs +10 -0
- package/components/Donut/index.cjs.map +1 -0
- package/components/Donut/index.js +6 -0
- package/components/Donut/index.js.map +1 -0
- package/components/Gauge/index.cjs +10 -0
- package/components/Gauge/index.cjs.map +1 -0
- package/components/Gauge/index.js +6 -0
- package/components/Gauge/index.js.map +1 -0
- package/components/GroupedBars/index.cjs +10 -0
- package/components/GroupedBars/index.cjs.map +1 -0
- package/components/GroupedBars/index.js +6 -0
- package/components/GroupedBars/index.js.map +1 -0
- package/components/Legend/index.cjs +10 -0
- package/components/Legend/index.cjs.map +1 -0
- package/components/Legend/index.js +6 -0
- package/components/Legend/index.js.map +1 -0
- package/components/LineChart/index.cjs +10 -0
- package/components/LineChart/index.cjs.map +1 -0
- package/components/LineChart/index.js +6 -0
- package/components/LineChart/index.js.map +1 -0
- package/components/MapTile/index.cjs +10 -0
- package/components/MapTile/index.cjs.map +1 -0
- package/components/MapTile/index.js +6 -0
- package/components/MapTile/index.js.map +1 -0
- package/components/MetricCard/index.cjs +10 -0
- package/components/MetricCard/index.cjs.map +1 -0
- package/components/MetricCard/index.js +6 -0
- package/components/MetricCard/index.js.map +1 -0
- package/components/Radar/index.cjs +10 -0
- package/components/Radar/index.cjs.map +1 -0
- package/components/Radar/index.js +6 -0
- package/components/Radar/index.js.map +1 -0
- package/components/RankedList/index.cjs +10 -0
- package/components/RankedList/index.cjs.map +1 -0
- package/components/RankedList/index.js +6 -0
- package/components/RankedList/index.js.map +1 -0
- package/components/Rise/index.cjs +12 -0
- package/components/Rise/index.cjs.map +1 -0
- package/components/Rise/index.js +8 -0
- package/components/Rise/index.js.map +1 -0
- package/components/Sparkline/index.cjs +10 -0
- package/components/Sparkline/index.cjs.map +1 -0
- package/components/Sparkline/index.js +6 -0
- package/components/Sparkline/index.js.map +1 -0
- package/components/StackedBars/index.cjs +10 -0
- package/components/StackedBars/index.cjs.map +1 -0
- package/components/StackedBars/index.js +6 -0
- package/components/StackedBars/index.js.map +1 -0
- package/components/StatusCard/index.cjs +10 -0
- package/components/StatusCard/index.cjs.map +1 -0
- package/components/StatusCard/index.js +6 -0
- package/components/StatusCard/index.js.map +1 -0
- package/components/Tip/index.cjs +10 -0
- package/components/Tip/index.cjs.map +1 -0
- package/components/Tip/index.js +6 -0
- package/components/Tip/index.js.map +1 -0
- package/components/WidgetPanel/index.cjs +10 -0
- package/components/WidgetPanel/index.cjs.map +1 -0
- package/components/WidgetPanel/index.js +6 -0
- package/components/WidgetPanel/index.js.map +1 -0
- package/hooks/useCountUp.cjs +49 -0
- package/hooks/useCountUp.cjs.map +1 -0
- package/hooks/useCountUp.js +44 -0
- package/hooks/useCountUp.js.map +1 -0
- package/hooks/useEnter.cjs +25 -0
- package/hooks/useEnter.cjs.map +1 -0
- package/hooks/useEnter.js +20 -0
- package/hooks/useEnter.js.map +1 -0
- package/hooks/useMeasuredWidth.cjs +14 -0
- package/hooks/useMeasuredWidth.cjs.map +1 -0
- package/hooks/useMeasuredWidth.js +9 -0
- package/hooks/useMeasuredWidth.js.map +1 -0
- package/hooks/useReducedMotion/context.cjs +10 -0
- package/hooks/useReducedMotion/context.cjs.map +1 -0
- package/hooks/useReducedMotion/context.js +7 -0
- package/hooks/useReducedMotion/context.js.map +1 -0
- package/hooks/useReducedMotion/index.cjs +13 -0
- package/hooks/useReducedMotion/index.cjs.map +1 -0
- package/hooks/useReducedMotion/index.js +11 -0
- package/hooks/useReducedMotion/index.js.map +1 -0
- package/index.cjs +200 -140
- package/index.cjs.map +1 -1
- package/index.d.ts +597 -2
- package/index.js +30 -0
- package/index.js.map +1 -1
- package/motion/index.cjs +53 -0
- package/motion/index.cjs.map +1 -0
- package/motion/index.js +51 -0
- package/motion/index.js.map +1 -0
- package/package.json +1 -1
- package/primitives/AccentEdge/index.cjs +10 -0
- package/primitives/AccentEdge/index.cjs.map +1 -0
- package/primitives/AccentEdge/index.js +6 -0
- package/primitives/AccentEdge/index.js.map +1 -0
- package/primitives/DotGrid/index.cjs +10 -0
- package/primitives/DotGrid/index.cjs.map +1 -0
- package/primitives/DotGrid/index.js +6 -0
- package/primitives/DotGrid/index.js.map +1 -0
- package/primitives/Striped/index.cjs +10 -0
- package/primitives/Striped/index.cjs.map +1 -0
- package/primitives/Striped/index.js +6 -0
- package/primitives/Striped/index.js.map +1 -0
- package/primitives/Wash/index.cjs +10 -0
- package/primitives/Wash/index.cjs.map +1 -0
- package/primitives/Wash/index.js +6 -0
- package/primitives/Wash/index.js.map +1 -0
- package/utils/Color.cjs +8 -0
- package/utils/Color.cjs.map +1 -0
- package/utils/Color.js +6 -0
- package/utils/Color.js.map +1 -0
- package/utils/Number.cjs +8 -0
- package/utils/Number.cjs.map +1 -0
- package/utils/Number.js +6 -0
- package/utils/Number.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCountUp.js","sources":["../../../src/hooks/useCountUp.ts"],"sourcesContent":["import {useEffect, useState} from \"react\";\nimport {useReducedMotion} from \"./useReducedMotion\";\nimport {kitsMotion} from \"../motion\";\n\nexport interface IUseCountUpOptions {\n /** Animation duration in ms. @default kitsMotion.duration.countUp */\n duration?: number;\n /** Delay before the count starts, in ms. @default 0 */\n delay?: number;\n /** Gate: the count runs only while true (pair with `useEnter`). While false the value stays at 0. @default true */\n run?: boolean;\n /** Decimal places; when > 0 the hook returns a fixed-point string. @default 0 */\n decimals?: number;\n}\n\n/**\n * Animates a number from 0 to `target` (ease-out cubic, rAF), landing\n * exactly on `target`. With reduced motion the target is returned\n * immediately — no animation. Formatting and locale are the caller's\n * concern (see `formatNumber`).\n */\nexport function useCountUp(\n target: number,\n {\n duration = kitsMotion.duration.countUp,\n delay = 0,\n run = true,\n decimals = 0,\n }: IUseCountUpOptions = {},\n): number | string {\n const reduced = useReducedMotion();\n const [value, setValue] = useState(reduced ? target : 0);\n\n useEffect(() => {\n if (reduced) {\n setValue(target);\n return;\n }\n if (!run) {\n setValue(0);\n return;\n }\n let raf = 0;\n let start: number | null = null;\n const step = (now: number) => {\n if (start === null) start = now;\n const progress = Math.min(1, (now - start) / duration);\n const eased = 1 - Math.pow(1 - progress, 3);\n setValue(target * eased);\n if (progress < 1) raf = requestAnimationFrame(step);\n else setValue(target);\n };\n const timer = setTimeout(() => {\n raf = requestAnimationFrame(step);\n }, delay);\n return () => {\n clearTimeout(timer);\n cancelAnimationFrame(raf);\n };\n }, [target, run, duration, delay, reduced]);\n\n return decimals > 0 ? value.toFixed(decimals) : Math.round(value);\n}\n\nexport default useCountUp;\n"],"names":[],"mappings":";;;;AAqBO,SAAS,WACZ,MAAA,EACA;AAAA,EACI,QAAA,GAAW,WAAW,QAAA,CAAS,OAAA;AAAA,EAC/B,KAAA,GAAQ,CAAA;AAAA,EACR,GAAA,GAAM,IAAA;AAAA,EACN,QAAA,GAAW;AACf,CAAA,GAAwB,EAAC,EACV;AACf,EAAA,MAAM,UAAU,gBAAA,EAAiB;AACjC,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,IAAI,QAAA,CAAS,OAAA,GAAU,SAAS,CAAC,CAAA;AAEvD,EAAA,SAAA,CAAU,MAAM;AACZ,IAAA,IAAI,OAAA,EAAS;AACT,MAAA,QAAA,CAAS,MAAM,CAAA;AACf,MAAA;AAAA,IACJ;AACA,IAAA,IAAI,CAAC,GAAA,EAAK;AACN,MAAA,QAAA,CAAS,CAAC,CAAA;AACV,MAAA;AAAA,IACJ;AACA,IAAA,IAAI,GAAA,GAAM,CAAA;AACV,IAAA,IAAI,KAAA,GAAuB,IAAA;AAC3B,IAAA,MAAM,IAAA,GAAO,CAAC,GAAA,KAAgB;AAC1B,MAAA,IAAI,KAAA,KAAU,MAAM,KAAA,GAAQ,GAAA;AAC5B,MAAA,MAAM,WAAW,IAAA,CAAK,GAAA,CAAI,CAAA,EAAA,CAAI,GAAA,GAAM,SAAS,QAAQ,CAAA;AACrD,MAAA,MAAM,QAAQ,CAAA,GAAI,IAAA,CAAK,GAAA,CAAI,CAAA,GAAI,UAAU,CAAC,CAAA;AAC1C,MAAA,QAAA,CAAS,SAAS,KAAK,CAAA;AACvB,MAAA,IAAI,QAAA,GAAW,CAAA,EAAG,GAAA,GAAM,qBAAA,CAAsB,IAAI,CAAA;AAAA,oBACpC,MAAM,CAAA;AAAA,IACxB,CAAA;AACA,IAAA,MAAM,KAAA,GAAQ,WAAW,MAAM;AAC3B,MAAA,GAAA,GAAM,sBAAsB,IAAI,CAAA;AAAA,IACpC,GAAG,KAAK,CAAA;AACR,IAAA,OAAO,MAAM;AACT,MAAA,YAAA,CAAa,KAAK,CAAA;AAClB,MAAA,oBAAA,CAAqB,GAAG,CAAA;AAAA,IAC5B,CAAA;AAAA,EACJ,GAAG,CAAC,MAAA,EAAQ,KAAK,QAAA,EAAU,KAAA,EAAO,OAAO,CAAC,CAAA;AAE1C,EAAA,OAAO,QAAA,GAAW,IAAI,KAAA,CAAM,OAAA,CAAQ,QAAQ,CAAA,GAAI,IAAA,CAAK,MAAM,KAAK,CAAA;AACpE;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var index_native = require('./useReducedMotion/index.cjs');
|
|
7
|
+
var index = require('../motion/index.cjs');
|
|
8
|
+
|
|
9
|
+
function useEnter(delay = 0) {
|
|
10
|
+
const reduced = index_native.useReducedMotion();
|
|
11
|
+
const [on, setOn] = React.useState(reduced);
|
|
12
|
+
React.useEffect(() => {
|
|
13
|
+
if (reduced) {
|
|
14
|
+
setOn(true);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const timer = setTimeout(() => setOn(true), index.kitsMotion.enterBaseDelay + delay);
|
|
18
|
+
return () => clearTimeout(timer);
|
|
19
|
+
}, [reduced, delay]);
|
|
20
|
+
return on;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.default = useEnter;
|
|
24
|
+
exports.useEnter = useEnter;
|
|
25
|
+
//# sourceMappingURL=useEnter.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEnter.cjs","sources":["../../../src/hooks/useEnter.ts"],"sourcesContent":["import {useEffect, useState} from \"react\";\nimport {useReducedMotion} from \"./useReducedMotion\";\nimport {kitsMotion} from \"../motion\";\n\n/**\n * Entrance trigger: `false` on mount, flips to `true` after\n * `kitsMotion.enterBaseDelay + delay` ms so a CSS transition can play\n * from the initial state. With reduced motion it is `true` from the first\n * render — the element appears directly in its final state.\n *\n * Replay by remounting (key change); the timer does not restart on\n * re-renders.\n */\nexport function useEnter(delay = 0): boolean {\n const reduced = useReducedMotion();\n const [on, setOn] = useState(reduced);\n\n useEffect(() => {\n if (reduced) {\n setOn(true);\n return;\n }\n const timer = setTimeout(() => setOn(true), kitsMotion.enterBaseDelay + delay);\n return () => clearTimeout(timer);\n }, [reduced, delay]);\n\n return on;\n}\n\nexport default useEnter;\n"],"names":["useReducedMotion","useState","useEffect","kitsMotion"],"mappings":";;;;;;;;AAaO,SAAS,QAAA,CAAS,QAAQ,CAAA,EAAY;AACzC,EAAA,MAAM,UAAUA,6BAAA,EAAiB;AACjC,EAAA,MAAM,CAAC,EAAA,EAAI,KAAK,CAAA,GAAIC,eAAS,OAAO,CAAA;AAEpC,EAAAC,eAAA,CAAU,MAAM;AACZ,IAAA,IAAI,OAAA,EAAS;AACT,MAAA,KAAA,CAAM,IAAI,CAAA;AACV,MAAA;AAAA,IACJ;AACA,IAAA,MAAM,KAAA,GAAQ,WAAW,MAAM,KAAA,CAAM,IAAI,CAAA,EAAGC,gBAAA,CAAW,iBAAiB,KAAK,CAAA;AAC7E,IAAA,OAAO,MAAM,aAAa,KAAK,CAAA;AAAA,EACnC,CAAA,EAAG,CAAC,OAAA,EAAS,KAAK,CAAC,CAAA;AAEnB,EAAA,OAAO,EAAA;AACX;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import { useReducedMotion } from './useReducedMotion/index.js';
|
|
3
|
+
import { kitsMotion } from '../motion/index.js';
|
|
4
|
+
|
|
5
|
+
function useEnter(delay = 0) {
|
|
6
|
+
const reduced = useReducedMotion();
|
|
7
|
+
const [on, setOn] = useState(reduced);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (reduced) {
|
|
10
|
+
setOn(true);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const timer = setTimeout(() => setOn(true), kitsMotion.enterBaseDelay + delay);
|
|
14
|
+
return () => clearTimeout(timer);
|
|
15
|
+
}, [reduced, delay]);
|
|
16
|
+
return on;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { useEnter as default, useEnter };
|
|
20
|
+
//# sourceMappingURL=useEnter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEnter.js","sources":["../../../src/hooks/useEnter.ts"],"sourcesContent":["import {useEffect, useState} from \"react\";\nimport {useReducedMotion} from \"./useReducedMotion\";\nimport {kitsMotion} from \"../motion\";\n\n/**\n * Entrance trigger: `false` on mount, flips to `true` after\n * `kitsMotion.enterBaseDelay + delay` ms so a CSS transition can play\n * from the initial state. With reduced motion it is `true` from the first\n * render — the element appears directly in its final state.\n *\n * Replay by remounting (key change); the timer does not restart on\n * re-renders.\n */\nexport function useEnter(delay = 0): boolean {\n const reduced = useReducedMotion();\n const [on, setOn] = useState(reduced);\n\n useEffect(() => {\n if (reduced) {\n setOn(true);\n return;\n }\n const timer = setTimeout(() => setOn(true), kitsMotion.enterBaseDelay + delay);\n return () => clearTimeout(timer);\n }, [reduced, delay]);\n\n return on;\n}\n\nexport default useEnter;\n"],"names":[],"mappings":";;;;AAaO,SAAS,QAAA,CAAS,QAAQ,CAAA,EAAY;AACzC,EAAA,MAAM,UAAU,gBAAA,EAAiB;AACjC,EAAA,MAAM,CAAC,EAAA,EAAI,KAAK,CAAA,GAAI,SAAS,OAAO,CAAA;AAEpC,EAAA,SAAA,CAAU,MAAM;AACZ,IAAA,IAAI,OAAA,EAAS;AACT,MAAA,KAAA,CAAM,IAAI,CAAA;AACV,MAAA;AAAA,IACJ;AACA,IAAA,MAAM,KAAA,GAAQ,WAAW,MAAM,KAAA,CAAM,IAAI,CAAA,EAAG,UAAA,CAAW,iBAAiB,KAAK,CAAA;AAC7E,IAAA,OAAO,MAAM,aAAa,KAAK,CAAA;AAAA,EACnC,CAAA,EAAG,CAAC,OAAA,EAAS,KAAK,CAAC,CAAA;AAEnB,EAAA,OAAO,EAAA;AACX;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
function useMeasuredWidth() {
|
|
8
|
+
const ref = React.useRef(null);
|
|
9
|
+
return [ref, 0];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
exports.default = useMeasuredWidth;
|
|
13
|
+
exports.useMeasuredWidth = useMeasuredWidth;
|
|
14
|
+
//# sourceMappingURL=useMeasuredWidth.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMeasuredWidth.cjs","sources":["../../../src/hooks/useMeasuredWidth.native.ts"],"sourcesContent":["import {useRef, type RefObject} from \"react\";\n\n/**\n * Native stub — the widget family is web-only for now (matches the\n * `Widgets.*` charts precedent). Always reports width 0, so measured\n * drawings render nothing on native.\n */\nexport function useMeasuredWidth<T = unknown>(): [RefObject<T | null>, number] {\n const ref = useRef<T | null>(null);\n return [ref, 0];\n}\n\nexport default useMeasuredWidth;\n"],"names":["useRef"],"mappings":";;;;;;AAOO,SAAS,gBAAA,GAA+D;AAC3E,EAAA,MAAM,GAAA,GAAMA,aAAiB,IAAI,CAAA;AACjC,EAAA,OAAO,CAAC,KAAK,CAAC,CAAA;AAClB;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMeasuredWidth.js","sources":["../../../src/hooks/useMeasuredWidth.native.ts"],"sourcesContent":["import {useRef, type RefObject} from \"react\";\n\n/**\n * Native stub — the widget family is web-only for now (matches the\n * `Widgets.*` charts precedent). Always reports width 0, so measured\n * drawings render nothing on native.\n */\nexport function useMeasuredWidth<T = unknown>(): [RefObject<T | null>, number] {\n const ref = useRef<T | null>(null);\n return [ref, 0];\n}\n\nexport default useMeasuredWidth;\n"],"names":[],"mappings":";;AAOO,SAAS,gBAAA,GAA+D;AAC3E,EAAA,MAAM,GAAA,GAAM,OAAiB,IAAI,CAAA;AACjC,EAAA,OAAO,CAAC,KAAK,CAAC,CAAA;AAClB;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
const ReducedMotionContext = React.createContext(null);
|
|
6
|
+
const ReducedMotionProvider = ReducedMotionContext.Provider;
|
|
7
|
+
|
|
8
|
+
exports.ReducedMotionContext = ReducedMotionContext;
|
|
9
|
+
exports.ReducedMotionProvider = ReducedMotionProvider;
|
|
10
|
+
//# sourceMappingURL=context.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.cjs","sources":["../../../../src/hooks/useReducedMotion/context.ts"],"sourcesContent":["import {createContext} from \"react\";\n\n/**\n * Optional override for `useReducedMotion`. `null` (the default) means\n * \"no override — read the platform signal\". Wrap a subtree in\n * `ReducedMotionProvider` to force a value (stories and tests use this,\n * since the OS media query cannot be toggled per-story).\n */\nexport const ReducedMotionContext = createContext<boolean | null>(null);\n\nexport const ReducedMotionProvider = ReducedMotionContext.Provider;\n"],"names":["createContext"],"mappings":";;;;AAQO,MAAM,oBAAA,GAAuBA,oBAA8B,IAAI;AAE/D,MAAM,wBAAwB,oBAAA,CAAqB;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../../src/hooks/useReducedMotion/context.ts"],"sourcesContent":["import {createContext} from \"react\";\n\n/**\n * Optional override for `useReducedMotion`. `null` (the default) means\n * \"no override — read the platform signal\". Wrap a subtree in\n * `ReducedMotionProvider` to force a value (stories and tests use this,\n * since the OS media query cannot be toggled per-story).\n */\nexport const ReducedMotionContext = createContext<boolean | null>(null);\n\nexport const ReducedMotionProvider = ReducedMotionContext.Provider;\n"],"names":[],"mappings":";;AAQO,MAAM,oBAAA,GAAuB,cAA8B,IAAI;AAE/D,MAAM,wBAAwB,oBAAA,CAAqB;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var context = require('./context.cjs');
|
|
5
|
+
|
|
6
|
+
function useReducedMotion() {
|
|
7
|
+
const override = React.useContext(context.ReducedMotionContext);
|
|
8
|
+
return override ?? false;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
exports.ReducedMotionProvider = context.ReducedMotionProvider;
|
|
12
|
+
exports.useReducedMotion = useReducedMotion;
|
|
13
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/hooks/useReducedMotion/index.native.ts"],"sourcesContent":["import {useContext} from \"react\";\nimport {ReducedMotionContext, ReducedMotionProvider} from \"./context\";\n\n/**\n * Native counterpart of `useReducedMotion`. The widget family is currently\n * web-only, so the platform signal (AccessibilityInfo.isReduceMotionEnabled)\n * is not wired yet — that is a future unit. Only the `ReducedMotionProvider`\n * override is honoured; without one this returns false.\n */\nexport function useReducedMotion(): boolean {\n const override = useContext(ReducedMotionContext);\n return override ?? false;\n}\n\nexport {ReducedMotionProvider};\nexport default useReducedMotion;\n"],"names":["useContext","ReducedMotionContext"],"mappings":";;;;;AASO,SAAS,gBAAA,GAA4B;AACxC,EAAA,MAAM,QAAA,GAAWA,iBAAWC,4BAAoB,CAAA;AAChD,EAAA,OAAO,QAAA,IAAY,KAAA;AACvB;;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { ReducedMotionContext } from './context.js';
|
|
3
|
+
export { ReducedMotionProvider } from './context.js';
|
|
4
|
+
|
|
5
|
+
function useReducedMotion() {
|
|
6
|
+
const override = useContext(ReducedMotionContext);
|
|
7
|
+
return override ?? false;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { useReducedMotion };
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/hooks/useReducedMotion/index.native.ts"],"sourcesContent":["import {useContext} from \"react\";\nimport {ReducedMotionContext, ReducedMotionProvider} from \"./context\";\n\n/**\n * Native counterpart of `useReducedMotion`. The widget family is currently\n * web-only, so the platform signal (AccessibilityInfo.isReduceMotionEnabled)\n * is not wired yet — that is a future unit. Only the `ReducedMotionProvider`\n * override is honoured; without one this returns false.\n */\nexport function useReducedMotion(): boolean {\n const override = useContext(ReducedMotionContext);\n return override ?? false;\n}\n\nexport {ReducedMotionProvider};\nexport default useReducedMotion;\n"],"names":[],"mappings":";;;;AASO,SAAS,gBAAA,GAA4B;AACxC,EAAA,MAAM,QAAA,GAAW,WAAW,oBAAoB,CAAA;AAChD,EAAA,OAAO,QAAA,IAAY,KAAA;AACvB;;;;"}
|