@mindees/atlas 0.14.0 → 0.16.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.
@@ -44,6 +44,8 @@ interface PlatformEnvironment {
44
44
  readonly colorScheme: ColorScheme;
45
45
  readonly safeAreaInsets: SafeAreaInsets;
46
46
  readonly keyboard: KeyboardState;
47
+ /** Whether the user prefers reduced motion (OS accessibility setting / `prefers-reduced-motion`). */
48
+ readonly reducedMotion: boolean;
47
49
  }
48
50
  /**
49
51
  * Update the platform environment. The host/runtime calls this — once on launch and
@@ -61,6 +63,11 @@ declare function useColorScheme(): () => ColorScheme;
61
63
  declare function useSafeAreaInsets(): () => SafeAreaInsets;
62
64
  /** Reactive accessor for the soft-keyboard state. */
63
65
  declare function useKeyboard(): () => KeyboardState;
66
+ /**
67
+ * Reactive accessor for the user's reduced-motion preference (a11y). Honor it by skipping/shortening
68
+ * animations — e.g. `timing(x, { to, duration: useReducedMotion()() ? 0 : 250 })`.
69
+ */
70
+ declare function useReducedMotion(): () => boolean;
64
71
  //#endregion
65
- export { ColorScheme, KeyboardState, PlatformEnvironment, SafeAreaInsets, WindowDimensions, getEnvironment, setEnvironment, useColorScheme, useKeyboard, useSafeAreaInsets, useWindowDimensions };
72
+ export { ColorScheme, KeyboardState, PlatformEnvironment, SafeAreaInsets, WindowDimensions, getEnvironment, setEnvironment, useColorScheme, useKeyboard, useReducedMotion, useSafeAreaInsets, useWindowDimensions };
66
73
  //# sourceMappingURL=environment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"environment.d.ts","names":[],"sources":["../src/environment.ts"],"mappings":";;AAiBA;;;;;;;;;AAQoB;AAIpB;;;UAZiB,gBAAA;EAaN;EAAA,SAXA,KAAA;EAaA;EAAA,SAXA,MAAA;EAYI;EAAA,SAVJ,KAAA;EAcM;EAAA,SAZN,SAAA;AAAA;;UAIM,cAAA;EAAA,SACN,GAAA;EAAA,SACA,KAAA;EAAA,SACA,MAAA;EAAA,SACA,IAAA;AAAA;AAcX;AAAA,UAViB,aAAA;EAAA,SACN,OAAA;EAUQ;EAAA,SARR,MAAM;AAAA;;KAIL,WAAA;;UAGK,mBAAA;EAAA,SACN,MAAA,EAAQ,gBAAA;EAAA,SACR,WAAA,EAAa,WAAA;EAAA,SACb,cAAA,EAAgB,cAAA;EAAA,SAChB,QAAA,EAAU,aAAA;AAAA;;;;AAAa;AAalC;iBAAgB,cAAA,CAAe,GAAA,EAAK,OAAO,CAAC,mBAAA;;iBAQ5B,cAAA,IAAkB,mBAAmB;;iBAUrC,mBAAA,UAA6B,gBAAgB;;iBAK7C,cAAA,UAAwB,WAAW;AAvBa;AAAA,iBA4BhD,iBAAA,UAA2B,cAAc;;iBAKzC,WAAA,UAAqB,aAAa"}
1
+ {"version":3,"file":"environment.d.ts","names":[],"sources":["../src/environment.ts"],"mappings":";;AAiBA;;;;;;;;;AAQoB;AAIpB;;;UAZiB,gBAAA;EAaN;EAAA,SAXA,KAAA;EAaA;EAAA,SAXA,MAAA;EAYI;EAAA,SAVJ,KAAA;EAcM;EAAA,SAZN,SAAA;AAAA;;UAIM,cAAA;EAAA,SACN,GAAA;EAAA,SACA,KAAA;EAAA,SACA,MAAA;EAAA,SACA,IAAA;AAAA;AAcX;AAAA,UAViB,aAAA;EAAA,SACN,OAAA;EAUQ;EAAA,SARR,MAAM;AAAA;;KAIL,WAAA;;UAGK,mBAAA;EAAA,SACN,MAAA,EAAQ,gBAAA;EAAA,SACR,WAAA,EAAa,WAAA;EAAA,SACb,cAAA,EAAgB,cAAA;EAAA,SAChB,QAAA,EAAU,aAAA;EADM;EAAA,SAGhB,aAAA;AAAA;;;AAAa;AAcxB;;iBAAgB,cAAA,CAAe,GAAA,EAAK,OAAO,CAAC,mBAAA;;iBAS5B,cAAA,IAAkB,mBAAmB;;iBAWrC,mBAAA,UAA6B,gBAAgB;;iBAK7C,cAAA,UAAwB,WAAW;AAhBnD;AAAA,iBAqBgB,iBAAA,UAA2B,cAAc;;iBAKzC,WAAA,UAAqB,aAAa;AA1BG;AAWrD;;;AAXqD,iBAkCrC,gBAAA"}
@@ -30,6 +30,7 @@ const keyboardSignal = signal({
30
30
  visible: false,
31
31
  height: 0
32
32
  });
33
+ const reducedMotionSignal = signal(false);
33
34
  /**
34
35
  * Update the platform environment. The host/runtime calls this — once on launch and
35
36
  * again on changes (rotation, theme switch, keyboard show/hide). Only provided fields
@@ -40,6 +41,7 @@ function setEnvironment(env) {
40
41
  if (env.colorScheme) colorSchemeSignal.set(env.colorScheme);
41
42
  if (env.safeAreaInsets) safeAreaSignal.set(env.safeAreaInsets);
42
43
  if (env.keyboard) keyboardSignal.set(env.keyboard);
44
+ if (env.reducedMotion !== void 0) reducedMotionSignal.set(env.reducedMotion);
43
45
  }
44
46
  /** A snapshot of the current environment (non-reactive; for one-off reads). */
45
47
  function getEnvironment() {
@@ -47,7 +49,8 @@ function getEnvironment() {
47
49
  window: windowSignal(),
48
50
  colorScheme: colorSchemeSignal(),
49
51
  safeAreaInsets: safeAreaSignal(),
50
- keyboard: keyboardSignal()
52
+ keyboard: keyboardSignal(),
53
+ reducedMotion: reducedMotionSignal()
51
54
  };
52
55
  }
53
56
  /** Reactive accessor for the window dimensions (updates on resize/rotation). */
@@ -66,7 +69,14 @@ function useSafeAreaInsets() {
66
69
  function useKeyboard() {
67
70
  return keyboardSignal;
68
71
  }
72
+ /**
73
+ * Reactive accessor for the user's reduced-motion preference (a11y). Honor it by skipping/shortening
74
+ * animations — e.g. `timing(x, { to, duration: useReducedMotion()() ? 0 : 250 })`.
75
+ */
76
+ function useReducedMotion() {
77
+ return reducedMotionSignal;
78
+ }
69
79
  //#endregion
70
- export { getEnvironment, setEnvironment, useColorScheme, useKeyboard, useSafeAreaInsets, useWindowDimensions };
80
+ export { getEnvironment, setEnvironment, useColorScheme, useKeyboard, useReducedMotion, useSafeAreaInsets, useWindowDimensions };
71
81
 
72
82
  //# sourceMappingURL=environment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","names":[],"sources":["../src/environment.ts"],"sourcesContent":["/**\n * Platform environment + device hooks — the signal-backed equivalents of React\n * Native's `useWindowDimensions`, `useColorScheme`, `useSafeAreaInsets`, `Keyboard`.\n *\n * The environment is a small set of signals the host/runtime feeds via\n * {@link setEnvironment} (e.g. the native host on launch/rotation/theme change, or a\n * web adapter wired to `window`/`matchMedia`). The hooks return Quantum-style reactive\n * **accessors**, so reads are fine-grained — only the nodes that use a value re-run\n * when it changes (e.g. rotating the device updates exactly the layout that reads\n * window size), with no whole-tree re-render.\n *\n * @module\n */\n\nimport { signal } from '@mindees/core'\n\n/** Logical window size + density (RN's `useWindowDimensions`). */\nexport interface WindowDimensions {\n /** Logical width (dp/pt). */\n readonly width: number\n /** Logical height (dp/pt). */\n readonly height: number\n /** Device pixel ratio. */\n readonly scale: number\n /** User font-scaling factor (Dynamic Type / font size setting). */\n readonly fontScale: number\n}\n\n/** Safe-area insets in dp/pt (notch, status bar, home indicator, gesture areas). */\nexport interface SafeAreaInsets {\n readonly top: number\n readonly right: number\n readonly bottom: number\n readonly left: number\n}\n\n/** Soft-keyboard state. */\nexport interface KeyboardState {\n readonly visible: boolean\n /** Keyboard height in dp/pt when visible, else 0. */\n readonly height: number\n}\n\n/** The active color scheme (RN's `useColorScheme`). */\nexport type ColorScheme = 'light' | 'dark'\n\n/** The full platform environment. */\nexport interface PlatformEnvironment {\n readonly window: WindowDimensions\n readonly colorScheme: ColorScheme\n readonly safeAreaInsets: SafeAreaInsets\n readonly keyboard: KeyboardState\n}\n\nconst windowSignal = signal<WindowDimensions>({ width: 0, height: 0, scale: 1, fontScale: 1 })\nconst colorSchemeSignal = signal<ColorScheme>('light')\nconst safeAreaSignal = signal<SafeAreaInsets>({ top: 0, right: 0, bottom: 0, left: 0 })\nconst keyboardSignal = signal<KeyboardState>({ visible: false, height: 0 })\n\n/**\n * Update the platform environment. The host/runtime calls this — once on launch and\n * again on changes (rotation, theme switch, keyboard show/hide). Only provided fields\n * change; each is a fine-grained signal write, so only the readers of that field re-run.\n */\nexport function setEnvironment(env: Partial<PlatformEnvironment>): void {\n if (env.window) windowSignal.set(env.window)\n if (env.colorScheme) colorSchemeSignal.set(env.colorScheme)\n if (env.safeAreaInsets) safeAreaSignal.set(env.safeAreaInsets)\n if (env.keyboard) keyboardSignal.set(env.keyboard)\n}\n\n/** A snapshot of the current environment (non-reactive; for one-off reads). */\nexport function getEnvironment(): PlatformEnvironment {\n return {\n window: windowSignal(),\n colorScheme: colorSchemeSignal(),\n safeAreaInsets: safeAreaSignal(),\n keyboard: keyboardSignal(),\n }\n}\n\n/** Reactive accessor for the window dimensions (updates on resize/rotation). */\nexport function useWindowDimensions(): () => WindowDimensions {\n return windowSignal\n}\n\n/** Reactive accessor for the active color scheme (updates on theme change). */\nexport function useColorScheme(): () => ColorScheme {\n return colorSchemeSignal\n}\n\n/** Reactive accessor for the safe-area insets. */\nexport function useSafeAreaInsets(): () => SafeAreaInsets {\n return safeAreaSignal\n}\n\n/** Reactive accessor for the soft-keyboard state. */\nexport function useKeyboard(): () => KeyboardState {\n return keyboardSignal\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsDA,MAAM,eAAe,OAAyB;CAAE,OAAO;CAAG,QAAQ;CAAG,OAAO;CAAG,WAAW;AAAE,CAAC;AAC7F,MAAM,oBAAoB,OAAoB,OAAO;AACrD,MAAM,iBAAiB,OAAuB;CAAE,KAAK;CAAG,OAAO;CAAG,QAAQ;CAAG,MAAM;AAAE,CAAC;AACtF,MAAM,iBAAiB,OAAsB;CAAE,SAAS;CAAO,QAAQ;AAAE,CAAC;;;;;;AAO1E,SAAgB,eAAe,KAAyC;CACtE,IAAI,IAAI,QAAQ,aAAa,IAAI,IAAI,MAAM;CAC3C,IAAI,IAAI,aAAa,kBAAkB,IAAI,IAAI,WAAW;CAC1D,IAAI,IAAI,gBAAgB,eAAe,IAAI,IAAI,cAAc;CAC7D,IAAI,IAAI,UAAU,eAAe,IAAI,IAAI,QAAQ;AACnD;;AAGA,SAAgB,iBAAsC;CACpD,OAAO;EACL,QAAQ,aAAa;EACrB,aAAa,kBAAkB;EAC/B,gBAAgB,eAAe;EAC/B,UAAU,eAAe;CAC3B;AACF;;AAGA,SAAgB,sBAA8C;CAC5D,OAAO;AACT;;AAGA,SAAgB,iBAAoC;CAClD,OAAO;AACT;;AAGA,SAAgB,oBAA0C;CACxD,OAAO;AACT;;AAGA,SAAgB,cAAmC;CACjD,OAAO;AACT"}
1
+ {"version":3,"file":"environment.js","names":[],"sources":["../src/environment.ts"],"sourcesContent":["/**\n * Platform environment + device hooks — the signal-backed equivalents of React\n * Native's `useWindowDimensions`, `useColorScheme`, `useSafeAreaInsets`, `Keyboard`.\n *\n * The environment is a small set of signals the host/runtime feeds via\n * {@link setEnvironment} (e.g. the native host on launch/rotation/theme change, or a\n * web adapter wired to `window`/`matchMedia`). The hooks return Quantum-style reactive\n * **accessors**, so reads are fine-grained — only the nodes that use a value re-run\n * when it changes (e.g. rotating the device updates exactly the layout that reads\n * window size), with no whole-tree re-render.\n *\n * @module\n */\n\nimport { signal } from '@mindees/core'\n\n/** Logical window size + density (RN's `useWindowDimensions`). */\nexport interface WindowDimensions {\n /** Logical width (dp/pt). */\n readonly width: number\n /** Logical height (dp/pt). */\n readonly height: number\n /** Device pixel ratio. */\n readonly scale: number\n /** User font-scaling factor (Dynamic Type / font size setting). */\n readonly fontScale: number\n}\n\n/** Safe-area insets in dp/pt (notch, status bar, home indicator, gesture areas). */\nexport interface SafeAreaInsets {\n readonly top: number\n readonly right: number\n readonly bottom: number\n readonly left: number\n}\n\n/** Soft-keyboard state. */\nexport interface KeyboardState {\n readonly visible: boolean\n /** Keyboard height in dp/pt when visible, else 0. */\n readonly height: number\n}\n\n/** The active color scheme (RN's `useColorScheme`). */\nexport type ColorScheme = 'light' | 'dark'\n\n/** The full platform environment. */\nexport interface PlatformEnvironment {\n readonly window: WindowDimensions\n readonly colorScheme: ColorScheme\n readonly safeAreaInsets: SafeAreaInsets\n readonly keyboard: KeyboardState\n /** Whether the user prefers reduced motion (OS accessibility setting / `prefers-reduced-motion`). */\n readonly reducedMotion: boolean\n}\n\nconst windowSignal = signal<WindowDimensions>({ width: 0, height: 0, scale: 1, fontScale: 1 })\nconst colorSchemeSignal = signal<ColorScheme>('light')\nconst safeAreaSignal = signal<SafeAreaInsets>({ top: 0, right: 0, bottom: 0, left: 0 })\nconst keyboardSignal = signal<KeyboardState>({ visible: false, height: 0 })\nconst reducedMotionSignal = signal<boolean>(false)\n\n/**\n * Update the platform environment. The host/runtime calls this — once on launch and\n * again on changes (rotation, theme switch, keyboard show/hide). Only provided fields\n * change; each is a fine-grained signal write, so only the readers of that field re-run.\n */\nexport function setEnvironment(env: Partial<PlatformEnvironment>): void {\n if (env.window) windowSignal.set(env.window)\n if (env.colorScheme) colorSchemeSignal.set(env.colorScheme)\n if (env.safeAreaInsets) safeAreaSignal.set(env.safeAreaInsets)\n if (env.keyboard) keyboardSignal.set(env.keyboard)\n if (env.reducedMotion !== undefined) reducedMotionSignal.set(env.reducedMotion)\n}\n\n/** A snapshot of the current environment (non-reactive; for one-off reads). */\nexport function getEnvironment(): PlatformEnvironment {\n return {\n window: windowSignal(),\n colorScheme: colorSchemeSignal(),\n safeAreaInsets: safeAreaSignal(),\n keyboard: keyboardSignal(),\n reducedMotion: reducedMotionSignal(),\n }\n}\n\n/** Reactive accessor for the window dimensions (updates on resize/rotation). */\nexport function useWindowDimensions(): () => WindowDimensions {\n return windowSignal\n}\n\n/** Reactive accessor for the active color scheme (updates on theme change). */\nexport function useColorScheme(): () => ColorScheme {\n return colorSchemeSignal\n}\n\n/** Reactive accessor for the safe-area insets. */\nexport function useSafeAreaInsets(): () => SafeAreaInsets {\n return safeAreaSignal\n}\n\n/** Reactive accessor for the soft-keyboard state. */\nexport function useKeyboard(): () => KeyboardState {\n return keyboardSignal\n}\n\n/**\n * Reactive accessor for the user's reduced-motion preference (a11y). Honor it by skipping/shortening\n * animations — e.g. `timing(x, { to, duration: useReducedMotion()() ? 0 : 250 })`.\n */\nexport function useReducedMotion(): () => boolean {\n return reducedMotionSignal\n}\n"],"mappings":";;;;;;;;;;;;;;;AAwDA,MAAM,eAAe,OAAyB;CAAE,OAAO;CAAG,QAAQ;CAAG,OAAO;CAAG,WAAW;AAAE,CAAC;AAC7F,MAAM,oBAAoB,OAAoB,OAAO;AACrD,MAAM,iBAAiB,OAAuB;CAAE,KAAK;CAAG,OAAO;CAAG,QAAQ;CAAG,MAAM;AAAE,CAAC;AACtF,MAAM,iBAAiB,OAAsB;CAAE,SAAS;CAAO,QAAQ;AAAE,CAAC;AAC1E,MAAM,sBAAsB,OAAgB,KAAK;;;;;;AAOjD,SAAgB,eAAe,KAAyC;CACtE,IAAI,IAAI,QAAQ,aAAa,IAAI,IAAI,MAAM;CAC3C,IAAI,IAAI,aAAa,kBAAkB,IAAI,IAAI,WAAW;CAC1D,IAAI,IAAI,gBAAgB,eAAe,IAAI,IAAI,cAAc;CAC7D,IAAI,IAAI,UAAU,eAAe,IAAI,IAAI,QAAQ;CACjD,IAAI,IAAI,kBAAkB,KAAA,GAAW,oBAAoB,IAAI,IAAI,aAAa;AAChF;;AAGA,SAAgB,iBAAsC;CACpD,OAAO;EACL,QAAQ,aAAa;EACrB,aAAa,kBAAkB;EAC/B,gBAAgB,eAAe;EAC/B,UAAU,eAAe;EACzB,eAAe,oBAAoB;CACrC;AACF;;AAGA,SAAgB,sBAA8C;CAC5D,OAAO;AACT;;AAGA,SAAgB,iBAAoC;CAClD,OAAO;AACT;;AAGA,SAAgB,oBAA0C;CACxD,OAAO;AACT;;AAGA,SAAgB,cAAmC;CACjD,OAAO;AACT;;;;;AAMA,SAAgB,mBAAkC;CAChD,OAAO;AACT"}
@@ -0,0 +1,15 @@
1
+ import { MindeesNode } from "@mindees/core";
2
+
3
+ //#region src/error-boundary.d.ts
4
+ /** Props for {@link ErrorBoundary}. */
5
+ interface ErrorBoundaryProps {
6
+ /** Rendered when `children` throws. `reset` re-runs `children` (retry). */
7
+ readonly fallback: (error: unknown, reset: () => void) => MindeesNode;
8
+ /** The guarded subtree, as a thunk so it's evaluated (and re-evaluated) inside the boundary. */
9
+ readonly children: () => MindeesNode;
10
+ }
11
+ /** Render `children`; if it throws, render `fallback(error, reset)` instead. Returns a reactive region. */
12
+ declare function ErrorBoundary(props: ErrorBoundaryProps): () => MindeesNode;
13
+ //#endregion
14
+ export { ErrorBoundary, ErrorBoundaryProps };
15
+ //# sourceMappingURL=error-boundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-boundary.d.ts","names":[],"sources":["../src/error-boundary.ts"],"mappings":";;;;UAuBiB,kBAAA;EAQ0D;EAAA,SANhE,QAAA,GAAW,KAAA,WAAgB,KAAA,iBAAsB,WAAA;;WAEjD,QAAA,QAAgB,WAAW;AAAA;;iBAItB,aAAA,CAAc,KAAA,EAAO,kBAAA,SAA2B,WAAW"}
@@ -0,0 +1,40 @@
1
+ import { signal, untrack } from "@mindees/core";
2
+ //#region src/error-boundary.ts
3
+ /**
4
+ * Atlas `ErrorBoundary` — catch errors thrown while rendering a subtree and show a fallback instead of
5
+ * letting the whole app fail (RN/React's `<ErrorBoundary>`, signals-native). The children are a thunk
6
+ * evaluated inside a **reactive region**: if it throws, the region renders `fallback(error, reset)`;
7
+ * `reset()` re-runs the children (retry after the cause is fixed), and any signal the children read
8
+ * before throwing also re-runs the region automatically when it changes.
9
+ *
10
+ * Scope: this catches **synchronous render-time** errors (a component throwing while building its
11
+ * view). Errors thrown later inside an `effect` run on their own and are not routed here — handle
12
+ * those where the effect lives.
13
+ *
14
+ * @example
15
+ * ErrorBoundary({
16
+ * fallback: (err, reset) => <Button title="Retry" onPress={reset} />,
17
+ * children: () => <RiskyScreen />,
18
+ * })
19
+ *
20
+ * @module
21
+ */
22
+ /** Render `children`; if it throws, render `fallback(error, reset)` instead. Returns a reactive region. */
23
+ function ErrorBoundary(props) {
24
+ const resetKey = signal(0);
25
+ const reset = () => {
26
+ resetKey.set(untrack(resetKey) + 1);
27
+ };
28
+ return () => {
29
+ resetKey();
30
+ try {
31
+ return props.children();
32
+ } catch (error) {
33
+ return props.fallback(error, reset);
34
+ }
35
+ };
36
+ }
37
+ //#endregion
38
+ export { ErrorBoundary };
39
+
40
+ //# sourceMappingURL=error-boundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-boundary.js","names":[],"sources":["../src/error-boundary.ts"],"sourcesContent":["/**\n * Atlas `ErrorBoundary` — catch errors thrown while rendering a subtree and show a fallback instead of\n * letting the whole app fail (RN/React's `<ErrorBoundary>`, signals-native). The children are a thunk\n * evaluated inside a **reactive region**: if it throws, the region renders `fallback(error, reset)`;\n * `reset()` re-runs the children (retry after the cause is fixed), and any signal the children read\n * before throwing also re-runs the region automatically when it changes.\n *\n * Scope: this catches **synchronous render-time** errors (a component throwing while building its\n * view). Errors thrown later inside an `effect` run on their own and are not routed here — handle\n * those where the effect lives.\n *\n * @example\n * ErrorBoundary({\n * fallback: (err, reset) => <Button title=\"Retry\" onPress={reset} />,\n * children: () => <RiskyScreen />,\n * })\n *\n * @module\n */\n\nimport { type MindeesNode, signal, untrack } from '@mindees/core'\n\n/** Props for {@link ErrorBoundary}. */\nexport interface ErrorBoundaryProps {\n /** Rendered when `children` throws. `reset` re-runs `children` (retry). */\n readonly fallback: (error: unknown, reset: () => void) => MindeesNode\n /** The guarded subtree, as a thunk so it's evaluated (and re-evaluated) inside the boundary. */\n readonly children: () => MindeesNode\n}\n\n/** Render `children`; if it throws, render `fallback(error, reset)` instead. Returns a reactive region. */\nexport function ErrorBoundary(props: ErrorBoundaryProps): () => MindeesNode {\n const resetKey = signal(0)\n const reset = (): void => {\n resetKey.set(untrack(resetKey) + 1)\n }\n return () => {\n resetKey() // track: reset() (and tracked children deps) re-run this region, retrying\n try {\n return props.children()\n } catch (error) {\n return props.fallback(error, reset)\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+BA,SAAgB,cAAc,OAA8C;CAC1E,MAAM,WAAW,OAAO,CAAC;CACzB,MAAM,cAAoB;EACxB,SAAS,IAAI,QAAQ,QAAQ,IAAI,CAAC;CACpC;CACA,aAAa;EACX,SAAS;EACT,IAAI;GACF,OAAO,MAAM,SAAS;EACxB,SAAS,OAAO;GACd,OAAO,MAAM,SAAS,OAAO,KAAK;EACpC;CACF;AACF"}
package/dist/index.d.ts CHANGED
@@ -2,7 +2,8 @@ import { A11yProps, A11yState, Role, toA11yProps } from "./a11y.js";
2
2
  import { StyleInput, StyleObject, StyleValue, flattenStyle } from "./style.js";
3
3
  import { BaseProps, Reactive, resolveStyle, toHostProps } from "./host.js";
4
4
  import { Accordion, AccordionProps, AccordionSection, ActivityIndicator, ActivityIndicatorProps, Avatar, AvatarProps, Badge, BadgeProps, Card, CardProps, Checkbox, CheckboxProps, Chip, ChipProps, Divider, DividerProps, KeyboardAvoidingView, KeyboardAvoidingViewProps, ProgressBar, ProgressBarProps, RadioGroup, RadioGroupProps, RadioOption, SafeAreaView, SafeAreaViewProps, Segment, SegmentedControl, SegmentedControlProps, Skeleton, SkeletonProps, Stepper, StepperProps, Switch, SwitchProps, TabItem, Tabs, TabsProps } from "./components.js";
5
- import { ColorScheme, KeyboardState, PlatformEnvironment, SafeAreaInsets, WindowDimensions, getEnvironment, setEnvironment, useColorScheme, useKeyboard, useSafeAreaInsets, useWindowDimensions } from "./environment.js";
5
+ import { ColorScheme, KeyboardState, PlatformEnvironment, SafeAreaInsets, WindowDimensions, getEnvironment, setEnvironment, useColorScheme, useKeyboard, useReducedMotion, useSafeAreaInsets, useWindowDimensions } from "./environment.js";
6
+ import { ErrorBoundary, ErrorBoundaryProps } from "./error-boundary.js";
6
7
  import { Field, FormApi, UseFormOptions, useForm } from "./form.js";
7
8
  import { AttachableGesture, GestureView, GestureViewProps } from "./gesture.js";
8
9
  import { AsyncState, Counter, PersistentSignalOptions, SignalStorage, Toggle, useAsync, useCounter, useDebounce, useInterval, usePersistentSignal, usePrevious, useReducer, useTimeout, useToggle } from "./hooks.js";
@@ -16,7 +17,7 @@ import { Maturity, NotImplementedError, PackageInfo, notImplemented } from "@min
16
17
  /** The npm package name. */
17
18
  declare const name = "@mindees/atlas";
18
19
  /** The package version. All `@mindees/*` packages share one locked version line. */
19
- declare const VERSION = "0.14.0";
20
+ declare const VERSION = "0.16.0";
20
21
  /** Current maturity of this package. See the repository `STATUS.md`. */
21
22
  declare const maturity: Maturity;
22
23
  /**
@@ -26,5 +27,5 @@ declare const maturity: Maturity;
26
27
  */
27
28
  declare const info: PackageInfo;
28
29
  //#endregion
29
- export { type A11yProps, type A11yState, Accordion, type AccordionProps, type AccordionSection, ActivityIndicator, type ActivityIndicatorProps, type AsyncState, type AttachableGesture, Avatar, type AvatarProps, Badge, type BadgeProps, type BaseProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, type ColorScheme, Column, type Counter, Divider, type DividerProps, type Field, FocusScope, type FocusScopeProps, type FormApi, GestureView, type GestureViewProps, Image, type ImageProps, type InteractionState, KeyboardAvoidingView, type KeyboardAvoidingViewProps, type KeyboardState, type Maturity, Modal, type ModalProps, NotImplementedError, type PackageInfo, type PersistentSignalOptions, type PlatformEnvironment, Pressable, type PressableProps, ProgressBar, type ProgressBarProps, RadioGroup, type RadioGroupProps, type RadioOption, type Reactive, type Role, Row, type SafeAreaInsets, SafeAreaView, type SafeAreaViewProps, ScrollView, type ScrollViewProps, type Segment, SegmentedControl, type SegmentedControlProps, type SignalStorage, Skeleton, type SkeletonProps, Spacer, type SpacerProps, Stack, type StackProps, Stepper, type StepperProps, type StyleInput, type StyleObject, type StyleValue, Switch, type SwitchProps, type TabItem, Tabs, type TabsProps, Text, TextInput, type TextInputProps, type TextProps, type Theme, type ThemeColors, Toast, type ToastProps, type Toggle, type UseFormOptions, VERSION, View, type ViewProps, type WindowDimensions, animateTo, duration, easing, flattenStyle, fontSize, fontWeight, getEnvironment, getTheme, info, lineHeight, maturity, motion, name, notImplemented, palette, radius, resolveStyle, setEnvironment, space, toA11yProps, toHostProps, tokens, useAsync, useColorScheme, useCounter, useDebounce, useForm, useInterval, useKeyboard, usePersistentSignal, usePressable, usePrevious, useReducer, useSafeAreaInsets, useTheme, useTimeout, useToggle, useWindowDimensions };
30
+ export { type A11yProps, type A11yState, Accordion, type AccordionProps, type AccordionSection, ActivityIndicator, type ActivityIndicatorProps, type AsyncState, type AttachableGesture, Avatar, type AvatarProps, Badge, type BadgeProps, type BaseProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, type ColorScheme, Column, type Counter, Divider, type DividerProps, ErrorBoundary, type ErrorBoundaryProps, type Field, FocusScope, type FocusScopeProps, type FormApi, GestureView, type GestureViewProps, Image, type ImageProps, type InteractionState, KeyboardAvoidingView, type KeyboardAvoidingViewProps, type KeyboardState, type Maturity, Modal, type ModalProps, NotImplementedError, type PackageInfo, type PersistentSignalOptions, type PlatformEnvironment, Pressable, type PressableProps, ProgressBar, type ProgressBarProps, RadioGroup, type RadioGroupProps, type RadioOption, type Reactive, type Role, Row, type SafeAreaInsets, SafeAreaView, type SafeAreaViewProps, ScrollView, type ScrollViewProps, type Segment, SegmentedControl, type SegmentedControlProps, type SignalStorage, Skeleton, type SkeletonProps, Spacer, type SpacerProps, Stack, type StackProps, Stepper, type StepperProps, type StyleInput, type StyleObject, type StyleValue, Switch, type SwitchProps, type TabItem, Tabs, type TabsProps, Text, TextInput, type TextInputProps, type TextProps, type Theme, type ThemeColors, Toast, type ToastProps, type Toggle, type UseFormOptions, VERSION, View, type ViewProps, type WindowDimensions, animateTo, duration, easing, flattenStyle, fontSize, fontWeight, getEnvironment, getTheme, info, lineHeight, maturity, motion, name, notImplemented, palette, radius, resolveStyle, setEnvironment, space, toA11yProps, toHostProps, tokens, useAsync, useColorScheme, useCounter, useDebounce, useForm, useInterval, useKeyboard, usePersistentSignal, usePressable, usePrevious, useReducedMotion, useReducer, useSafeAreaInsets, useTheme, useTimeout, useToggle, useWindowDimensions };
30
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;cAea,IAAA;;cAGA,OAAA;;cAGA,QAAA,EAAU,QAAyB;;AAN/B;AAGjB;;;cAUa,IAAA,EAAM,WAAiE"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;cAea,IAAA;;cAGA,OAAA;AAHb;AAAA,cAMa,QAAA,EAAU,QAAyB;;;AAN/B;AAGjB;;cAUa,IAAA,EAAM,WAAiE"}
package/dist/index.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import { toA11yProps } from "./a11y.js";
2
- import { getEnvironment, setEnvironment, useColorScheme, useKeyboard, useSafeAreaInsets, useWindowDimensions } from "./environment.js";
2
+ import { getEnvironment, setEnvironment, useColorScheme, useKeyboard, useReducedMotion, useSafeAreaInsets, useWindowDimensions } from "./environment.js";
3
3
  import { flattenStyle } from "./style.js";
4
4
  import { resolveStyle, toHostProps } from "./host.js";
5
5
  import { Button, Column, Image, Pressable, Row, ScrollView, Spacer, Stack, Text, TextInput, View, usePressable } from "./primitives.js";
6
6
  import { duration, easing, fontSize, fontWeight, getTheme, lineHeight, palette, radius, space, tokens, useTheme } from "./tokens.js";
7
7
  import { Accordion, ActivityIndicator, Avatar, Badge, Card, Checkbox, Chip, Divider, KeyboardAvoidingView, ProgressBar, RadioGroup, SafeAreaView, SegmentedControl, Skeleton, Stepper, Switch, Tabs } from "./components.js";
8
+ import { ErrorBoundary } from "./error-boundary.js";
8
9
  import { useForm } from "./form.js";
9
10
  import { GestureView } from "./gesture.js";
10
11
  import { useAsync, useCounter, useDebounce, useInterval, usePersistentSignal, usePrevious, useReducer, useTimeout, useToggle } from "./hooks.js";
@@ -15,7 +16,7 @@ import { NotImplementedError, notImplemented } from "@mindees/core";
15
16
  /** The npm package name. */
16
17
  const name = "@mindees/atlas";
17
18
  /** The package version. All `@mindees/*` packages share one locked version line. */
18
- const VERSION = "0.14.0";
19
+ const VERSION = "0.16.0";
19
20
  /** Current maturity of this package. See the repository `STATUS.md`. */
20
21
  const maturity = "experimental";
21
22
  /**
@@ -29,6 +30,6 @@ const info = Object.freeze({
29
30
  maturity
30
31
  });
31
32
  //#endregion
32
- export { Accordion, ActivityIndicator, Avatar, Badge, Button, Card, Checkbox, Chip, Column, Divider, FocusScope, GestureView, Image, KeyboardAvoidingView, Modal, NotImplementedError, Pressable, ProgressBar, RadioGroup, Row, SafeAreaView, ScrollView, SegmentedControl, Skeleton, Spacer, Stack, Stepper, Switch, Tabs, Text, TextInput, Toast, VERSION, View, animateTo, duration, easing, flattenStyle, fontSize, fontWeight, getEnvironment, getTheme, info, lineHeight, maturity, motion, name, notImplemented, palette, radius, resolveStyle, setEnvironment, space, toA11yProps, toHostProps, tokens, useAsync, useColorScheme, useCounter, useDebounce, useForm, useInterval, useKeyboard, usePersistentSignal, usePressable, usePrevious, useReducer, useSafeAreaInsets, useTheme, useTimeout, useToggle, useWindowDimensions };
33
+ export { Accordion, ActivityIndicator, Avatar, Badge, Button, Card, Checkbox, Chip, Column, Divider, ErrorBoundary, FocusScope, GestureView, Image, KeyboardAvoidingView, Modal, NotImplementedError, Pressable, ProgressBar, RadioGroup, Row, SafeAreaView, ScrollView, SegmentedControl, Skeleton, Spacer, Stack, Stepper, Switch, Tabs, Text, TextInput, Toast, VERSION, View, animateTo, duration, easing, flattenStyle, fontSize, fontWeight, getEnvironment, getTheme, info, lineHeight, maturity, motion, name, notImplemented, palette, radius, resolveStyle, setEnvironment, space, toA11yProps, toHostProps, tokens, useAsync, useColorScheme, useCounter, useDebounce, useForm, useInterval, useKeyboard, usePersistentSignal, usePressable, usePrevious, useReducedMotion, useReducer, useSafeAreaInsets, useTheme, useTimeout, useToggle, useWindowDimensions };
33
34
 
34
35
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * `@mindees/atlas` (Atlas) — accessible, signals-native UI primitives. Function components\n * over `@mindees/core`'s `createElement` that return renderer-agnostic `MindeesNode` trees:\n * web rendering is real via the Helix DOM backend; native is a labeled 🔬 research track (the\n * same serializable tree, interpreted by a native host later). A curated cross-platform\n * `StyleObject`, typed accessibility, and a structural theme (on the `@mindees/atlas/theme`\n * subpath). The virtualized recycling `List` is on the `@mindees/atlas/list` subpath.\n *\n * @module\n */\n\nimport type { Maturity, PackageInfo } from '@mindees/core'\nimport { NotImplementedError, notImplemented } from '@mindees/core'\n\n/** The npm package name. */\nexport const name = '@mindees/atlas'\n\n/** The package version. All `@mindees/*` packages share one locked version line. */\nexport const VERSION = '0.14.0'\n\n/** Current maturity of this package. See the repository `STATUS.md`. */\nexport const maturity: Maturity = 'experimental'\n\n/**\n * Static identity + maturity metadata for this package. Frozen so the\n * self-reported identity tooling introspects cannot be mutated at runtime,\n * matching the `readonly` fields of {@link PackageInfo}.\n */\nexport const info: PackageInfo = Object.freeze({ name, version: VERSION, maturity })\n\nexport { type A11yProps, type A11yState, type Role, toA11yProps } from './a11y'\nexport {\n Accordion,\n type AccordionProps,\n type AccordionSection,\n ActivityIndicator,\n type ActivityIndicatorProps,\n Avatar,\n type AvatarProps,\n Badge,\n type BadgeProps,\n Card,\n type CardProps,\n Checkbox,\n type CheckboxProps,\n Chip,\n type ChipProps,\n Divider,\n type DividerProps,\n KeyboardAvoidingView,\n type KeyboardAvoidingViewProps,\n ProgressBar,\n type ProgressBarProps,\n RadioGroup,\n type RadioGroupProps,\n type RadioOption,\n SafeAreaView,\n type SafeAreaViewProps,\n type Segment,\n SegmentedControl,\n type SegmentedControlProps,\n Skeleton,\n type SkeletonProps,\n Stepper,\n type StepperProps,\n Switch,\n type SwitchProps,\n type TabItem,\n Tabs,\n type TabsProps,\n} from './components'\nexport {\n type ColorScheme,\n getEnvironment,\n type KeyboardState,\n type PlatformEnvironment,\n type SafeAreaInsets,\n setEnvironment,\n useColorScheme,\n useKeyboard,\n useSafeAreaInsets,\n useWindowDimensions,\n type WindowDimensions,\n} from './environment'\nexport { type Field, type FormApi, type UseFormOptions, useForm } from './form'\nexport { type AttachableGesture, GestureView, type GestureViewProps } from './gesture'\nexport {\n type AsyncState,\n type Counter,\n type PersistentSignalOptions,\n type SignalStorage,\n type Toggle,\n useAsync,\n useCounter,\n useDebounce,\n useInterval,\n usePersistentSignal,\n usePrevious,\n useReducer,\n useTimeout,\n useToggle,\n} from './hooks'\nexport { type BaseProps, type Reactive, resolveStyle, toHostProps } from './host'\nexport { animateTo, motion } from './motion'\nexport {\n FocusScope,\n type FocusScopeProps,\n Modal,\n type ModalProps,\n Toast,\n type ToastProps,\n} from './overlay'\nexport {\n Button,\n type ButtonProps,\n Column,\n Image,\n type ImageProps,\n type InteractionState,\n Pressable,\n type PressableProps,\n Row,\n ScrollView,\n type ScrollViewProps,\n Spacer,\n type SpacerProps,\n Stack,\n type StackProps,\n Text,\n TextInput,\n type TextInputProps,\n type TextProps,\n usePressable,\n View,\n type ViewProps,\n} from './primitives'\nexport { flattenStyle, type StyleInput, type StyleObject, type StyleValue } from './style'\nexport {\n duration,\n easing,\n fontSize,\n fontWeight,\n getTheme,\n lineHeight,\n palette,\n radius,\n space,\n type Theme,\n type ThemeColors,\n tokens,\n useTheme,\n} from './tokens'\nexport type { Maturity, PackageInfo }\nexport { NotImplementedError, notImplemented }\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAa,OAAO;;AAGpB,MAAa,UAAU;;AAGvB,MAAa,WAAqB;;;;;;AAOlC,MAAa,OAAoB,OAAO,OAAO;CAAE;CAAM,SAAS;CAAS;AAAS,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * `@mindees/atlas` (Atlas) — accessible, signals-native UI primitives. Function components\n * over `@mindees/core`'s `createElement` that return renderer-agnostic `MindeesNode` trees:\n * web rendering is real via the Helix DOM backend; native is a labeled 🔬 research track (the\n * same serializable tree, interpreted by a native host later). A curated cross-platform\n * `StyleObject`, typed accessibility, and a structural theme (on the `@mindees/atlas/theme`\n * subpath). The virtualized recycling `List` is on the `@mindees/atlas/list` subpath.\n *\n * @module\n */\n\nimport type { Maturity, PackageInfo } from '@mindees/core'\nimport { NotImplementedError, notImplemented } from '@mindees/core'\n\n/** The npm package name. */\nexport const name = '@mindees/atlas'\n\n/** The package version. All `@mindees/*` packages share one locked version line. */\nexport const VERSION = '0.16.0'\n\n/** Current maturity of this package. See the repository `STATUS.md`. */\nexport const maturity: Maturity = 'experimental'\n\n/**\n * Static identity + maturity metadata for this package. Frozen so the\n * self-reported identity tooling introspects cannot be mutated at runtime,\n * matching the `readonly` fields of {@link PackageInfo}.\n */\nexport const info: PackageInfo = Object.freeze({ name, version: VERSION, maturity })\n\nexport { type A11yProps, type A11yState, type Role, toA11yProps } from './a11y'\nexport {\n Accordion,\n type AccordionProps,\n type AccordionSection,\n ActivityIndicator,\n type ActivityIndicatorProps,\n Avatar,\n type AvatarProps,\n Badge,\n type BadgeProps,\n Card,\n type CardProps,\n Checkbox,\n type CheckboxProps,\n Chip,\n type ChipProps,\n Divider,\n type DividerProps,\n KeyboardAvoidingView,\n type KeyboardAvoidingViewProps,\n ProgressBar,\n type ProgressBarProps,\n RadioGroup,\n type RadioGroupProps,\n type RadioOption,\n SafeAreaView,\n type SafeAreaViewProps,\n type Segment,\n SegmentedControl,\n type SegmentedControlProps,\n Skeleton,\n type SkeletonProps,\n Stepper,\n type StepperProps,\n Switch,\n type SwitchProps,\n type TabItem,\n Tabs,\n type TabsProps,\n} from './components'\nexport {\n type ColorScheme,\n getEnvironment,\n type KeyboardState,\n type PlatformEnvironment,\n type SafeAreaInsets,\n setEnvironment,\n useColorScheme,\n useKeyboard,\n useReducedMotion,\n useSafeAreaInsets,\n useWindowDimensions,\n type WindowDimensions,\n} from './environment'\nexport { ErrorBoundary, type ErrorBoundaryProps } from './error-boundary'\nexport { type Field, type FormApi, type UseFormOptions, useForm } from './form'\nexport { type AttachableGesture, GestureView, type GestureViewProps } from './gesture'\nexport {\n type AsyncState,\n type Counter,\n type PersistentSignalOptions,\n type SignalStorage,\n type Toggle,\n useAsync,\n useCounter,\n useDebounce,\n useInterval,\n usePersistentSignal,\n usePrevious,\n useReducer,\n useTimeout,\n useToggle,\n} from './hooks'\nexport { type BaseProps, type Reactive, resolveStyle, toHostProps } from './host'\nexport { animateTo, motion } from './motion'\nexport {\n FocusScope,\n type FocusScopeProps,\n Modal,\n type ModalProps,\n Toast,\n type ToastProps,\n} from './overlay'\nexport {\n Button,\n type ButtonProps,\n Column,\n Image,\n type ImageProps,\n type InteractionState,\n Pressable,\n type PressableProps,\n Row,\n ScrollView,\n type ScrollViewProps,\n Spacer,\n type SpacerProps,\n Stack,\n type StackProps,\n Text,\n TextInput,\n type TextInputProps,\n type TextProps,\n usePressable,\n View,\n type ViewProps,\n} from './primitives'\nexport { flattenStyle, type StyleInput, type StyleObject, type StyleValue } from './style'\nexport {\n duration,\n easing,\n fontSize,\n fontWeight,\n getTheme,\n lineHeight,\n palette,\n radius,\n space,\n type Theme,\n type ThemeColors,\n tokens,\n useTheme,\n} from './tokens'\nexport type { Maturity, PackageInfo }\nexport { NotImplementedError, notImplemented }\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,MAAa,OAAO;;AAGpB,MAAa,UAAU;;AAGvB,MAAa,WAAqB;;;;;;AAOlC,MAAa,OAAoB,OAAO,OAAO;CAAE;CAAM,SAAS;CAAS;AAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindees/atlas",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "MindeesNative Atlas - accessible, signals-native UI primitives + a virtualized recycling list. Renderer-agnostic (web real, native research track).",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",
@@ -39,12 +39,12 @@
39
39
  "directory": "packages/atlas"
40
40
  },
41
41
  "dependencies": {
42
- "@mindees/core": "0.14.0",
43
- "@mindees/router": "0.14.0"
42
+ "@mindees/core": "0.16.0",
43
+ "@mindees/router": "0.16.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "happy-dom": "20.9.0",
47
- "@mindees/renderer": "0.14.0"
47
+ "@mindees/renderer": "0.16.0"
48
48
  },
49
49
  "scripts": {
50
50
  "build": "tsdown",