@mindees/atlas 0.4.0 → 0.5.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.
@@ -0,0 +1,25 @@
1
+ import { BaseProps } from "./host.js";
2
+ import { Component, MindeesNode } from "@mindees/core";
3
+
4
+ //#region src/gesture.d.ts
5
+ /** The minimal recognizer shape `GestureView` needs (any factory or `composeGestures` result fits). */
6
+ interface AttachableGesture {
7
+ readonly handlers: {
8
+ onPointerDown(e: unknown): void;
9
+ onPointerMove(e: unknown): void;
10
+ onPointerUp(e: unknown): void;
11
+ onPointerCancel(e: unknown): void;
12
+ };
13
+ reset(): void;
14
+ }
15
+ /** Props for {@link GestureView}. */
16
+ interface GestureViewProps extends BaseProps {
17
+ /** The recognizer (or `composeGestures(...)`) to attach. */
18
+ readonly gesture: AttachableGesture;
19
+ readonly children?: MindeesNode;
20
+ }
21
+ /** A view wired to a gesture recognizer (pointer handlers attached, auto-reset on unmount). */
22
+ declare const GestureView: Component<GestureViewProps>;
23
+ //#endregion
24
+ export { AttachableGesture, GestureView, GestureViewProps };
25
+ //# sourceMappingURL=gesture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gesture.d.ts","names":[],"sources":["../src/gesture.ts"],"mappings":";;;;;UAiBiB,iBAAA;EAAA,SACN,QAAA;IACP,aAAA,CAAc,CAAA;IACd,aAAA,CAAc,CAAA;IACd,WAAA,CAAY,CAAA;IACZ,eAAA,CAAgB,CAAA;EAAA;EAElB,KAAA;AAAA;;UAIe,gBAAA,SAAyB,SAAA;EAAS;EAAA,SAExC,OAAA,EAAS,iBAAA;EAAA,SACT,QAAA,GAAW,WAAA;AAAA;;cAIT,WAAA,EAAa,SAAS,CAAC,gBAAA"}
@@ -0,0 +1,28 @@
1
+ import { toHostProps } from "./host.js";
2
+ import { createElement, getOwner, onCleanup } from "@mindees/core";
3
+ //#region src/gesture.ts
4
+ /**
5
+ * Atlas `GestureView` — attach a gesture {@link Recognizer} to a view. Spreads the recognizer's
6
+ * pointer handlers onto a RAW host `view` (the curated primitives don't forward arbitrary
7
+ * `onPointer*` props) and registers `onCleanup(reset)` so an unmount mid-gesture clears the
8
+ * recognizer's pointer/timer state. Compose multiple recognizers with `composeGestures` first.
9
+ *
10
+ * @example
11
+ * const drag = panAnimated(x, y, { release: () => ({ x: 0, y: 0 }) })
12
+ * <GestureView gesture={drag} style={() => ({ transform: `translate(${x()}px, ${y()}px)` })}>…</GestureView>
13
+ *
14
+ * @module
15
+ */
16
+ /** A view wired to a gesture recognizer (pointer handlers attached, auto-reset on unmount). */
17
+ const GestureView = (props) => {
18
+ const { gesture, children, ...rest } = props;
19
+ if (getOwner() !== null) onCleanup(() => gesture.reset());
20
+ return createElement("view", {
21
+ ...toHostProps(rest),
22
+ ...gesture.handlers
23
+ }, children);
24
+ };
25
+ //#endregion
26
+ export { GestureView };
27
+
28
+ //# sourceMappingURL=gesture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gesture.js","names":[],"sources":["../src/gesture.ts"],"sourcesContent":["/**\n * Atlas `GestureView` — attach a gesture {@link Recognizer} to a view. Spreads the recognizer's\n * pointer handlers onto a RAW host `view` (the curated primitives don't forward arbitrary\n * `onPointer*` props) and registers `onCleanup(reset)` so an unmount mid-gesture clears the\n * recognizer's pointer/timer state. Compose multiple recognizers with `composeGestures` first.\n *\n * @example\n * const drag = panAnimated(x, y, { release: () => ({ x: 0, y: 0 }) })\n * <GestureView gesture={drag} style={() => ({ transform: `translate(${x()}px, ${y()}px)` })}>…</GestureView>\n *\n * @module\n */\n\nimport { type Component, createElement, getOwner, type MindeesNode, onCleanup } from '@mindees/core'\nimport { type BaseProps, toHostProps } from './host'\n\n/** The minimal recognizer shape `GestureView` needs (any factory or `composeGestures` result fits). */\nexport interface AttachableGesture {\n readonly handlers: {\n onPointerDown(e: unknown): void\n onPointerMove(e: unknown): void\n onPointerUp(e: unknown): void\n onPointerCancel(e: unknown): void\n }\n reset(): void\n}\n\n/** Props for {@link GestureView}. */\nexport interface GestureViewProps extends BaseProps {\n /** The recognizer (or `composeGestures(...)`) to attach. */\n readonly gesture: AttachableGesture\n readonly children?: MindeesNode\n}\n\n/** A view wired to a gesture recognizer (pointer handlers attached, auto-reset on unmount). */\nexport const GestureView: Component<GestureViewProps> = (props) => {\n const { gesture, children, ...rest } = props\n if (getOwner() !== null) onCleanup(() => gesture.reset())\n return createElement('view', { ...toHostProps(rest), ...gesture.handlers }, children)\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmCA,MAAa,eAA4C,UAAU;CACjE,MAAM,EAAE,SAAS,UAAU,GAAG,SAAS;CACvC,IAAI,SAAS,MAAM,MAAM,gBAAgB,QAAQ,MAAM,CAAC;CACxD,OAAO,cAAc,QAAQ;EAAE,GAAG,YAAY,IAAI;EAAG,GAAG,QAAQ;CAAS,GAAG,QAAQ;AACtF"}
package/dist/index.d.ts CHANGED
@@ -3,16 +3,18 @@ import { StyleInput, StyleObject, StyleValue, flattenStyle } from "./style.js";
3
3
  import { BaseProps, Reactive, resolveStyle, toHostProps } from "./host.js";
4
4
  import { ActivityIndicator, ActivityIndicatorProps, Avatar, AvatarProps, Badge, BadgeProps, Card, CardProps, Chip, ChipProps, Divider, DividerProps, KeyboardAvoidingView, KeyboardAvoidingViewProps, ProgressBar, ProgressBarProps, SafeAreaView, SafeAreaViewProps, Switch, SwitchProps } from "./components.js";
5
5
  import { ColorScheme, KeyboardState, PlatformEnvironment, SafeAreaInsets, WindowDimensions, getEnvironment, setEnvironment, useColorScheme, useKeyboard, useSafeAreaInsets, useWindowDimensions } from "./environment.js";
6
+ import { AttachableGesture, GestureView, GestureViewProps } from "./gesture.js";
7
+ import { Theme, ThemeColors, duration, easing, fontSize, fontWeight, getTheme, lineHeight, palette, radius, space, tokens, useTheme } from "./tokens.js";
8
+ import { animateTo, motion } from "./motion.js";
6
9
  import { FocusScope, FocusScopeProps, Modal, ModalProps } from "./overlay.js";
7
10
  import { Button, ButtonProps, Column, Image, ImageProps, InteractionState, Pressable, PressableProps, Row, ScrollView, ScrollViewProps, Spacer, SpacerProps, Stack, StackProps, Text, TextInput, TextInputProps, TextProps, View, ViewProps, usePressable } from "./primitives.js";
8
- import { Theme, ThemeColors, duration, easing, fontSize, fontWeight, getTheme, lineHeight, palette, radius, space, tokens, useTheme } from "./tokens.js";
9
11
  import { Maturity, NotImplementedError, PackageInfo, notImplemented } from "@mindees/core";
10
12
 
11
13
  //#region src/index.d.ts
12
14
  /** The npm package name. */
13
15
  declare const name = "@mindees/atlas";
14
16
  /** The package version. All `@mindees/*` packages share one locked version line. */
15
- declare const VERSION = "0.4.0";
17
+ declare const VERSION = "0.5.0";
16
18
  /** Current maturity of this package. See the repository `STATUS.md`. */
17
19
  declare const maturity: Maturity;
18
20
  /**
@@ -22,5 +24,5 @@ declare const maturity: Maturity;
22
24
  */
23
25
  declare const info: PackageInfo;
24
26
  //#endregion
25
- export { type A11yProps, type A11yState, ActivityIndicator, type ActivityIndicatorProps, Avatar, type AvatarProps, Badge, type BadgeProps, type BaseProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, type ColorScheme, Column, Divider, type DividerProps, FocusScope, type FocusScopeProps, Image, type ImageProps, type InteractionState, KeyboardAvoidingView, type KeyboardAvoidingViewProps, type KeyboardState, type Maturity, Modal, type ModalProps, NotImplementedError, type PackageInfo, type PlatformEnvironment, Pressable, type PressableProps, ProgressBar, type ProgressBarProps, type Reactive, type Role, Row, type SafeAreaInsets, SafeAreaView, type SafeAreaViewProps, ScrollView, type ScrollViewProps, Spacer, type SpacerProps, Stack, type StackProps, type StyleInput, type StyleObject, type StyleValue, Switch, type SwitchProps, Text, TextInput, type TextInputProps, type TextProps, type Theme, type ThemeColors, VERSION, View, type ViewProps, type WindowDimensions, duration, easing, flattenStyle, fontSize, fontWeight, getEnvironment, getTheme, info, lineHeight, maturity, name, notImplemented, palette, radius, resolveStyle, setEnvironment, space, toA11yProps, toHostProps, tokens, useColorScheme, useKeyboard, usePressable, useSafeAreaInsets, useTheme, useWindowDimensions };
27
+ export { type A11yProps, type A11yState, ActivityIndicator, type ActivityIndicatorProps, type AttachableGesture, Avatar, type AvatarProps, Badge, type BadgeProps, type BaseProps, Button, type ButtonProps, Card, type CardProps, Chip, type ChipProps, type ColorScheme, Column, Divider, type DividerProps, FocusScope, type FocusScopeProps, GestureView, type GestureViewProps, Image, type ImageProps, type InteractionState, KeyboardAvoidingView, type KeyboardAvoidingViewProps, type KeyboardState, type Maturity, Modal, type ModalProps, NotImplementedError, type PackageInfo, type PlatformEnvironment, Pressable, type PressableProps, ProgressBar, type ProgressBarProps, type Reactive, type Role, Row, type SafeAreaInsets, SafeAreaView, type SafeAreaViewProps, ScrollView, type ScrollViewProps, Spacer, type SpacerProps, Stack, type StackProps, type StyleInput, type StyleObject, type StyleValue, Switch, type SwitchProps, Text, TextInput, type TextInputProps, type TextProps, type Theme, type ThemeColors, 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, useColorScheme, useKeyboard, usePressable, useSafeAreaInsets, useTheme, useWindowDimensions };
26
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;cAea,IAAA;;cAGA,OAAA;AAAb;AAAA,cAGa,QAAA,EAAU,QAAyB;;;AAH5B;AAGpB;;cAOa,IAAA,EAAM,WAAiE"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;cAea,IAAA;;cAGA,OAAA;;cAGA,QAAA,EAAU,QAAyB;AAHhD;;;;AAAoB;AAApB,cAUa,IAAA,EAAM,WAAiE"}
package/dist/index.js CHANGED
@@ -5,13 +5,15 @@ 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 { ActivityIndicator, Avatar, Badge, Card, Chip, Divider, KeyboardAvoidingView, ProgressBar, SafeAreaView, Switch } from "./components.js";
8
+ import { GestureView } from "./gesture.js";
9
+ import { animateTo, motion } from "./motion.js";
8
10
  import { FocusScope, Modal } from "./overlay.js";
9
11
  import { NotImplementedError, notImplemented } from "@mindees/core";
10
12
  //#region src/index.ts
11
13
  /** The npm package name. */
12
14
  const name = "@mindees/atlas";
13
15
  /** The package version. All `@mindees/*` packages share one locked version line. */
14
- const VERSION = "0.4.0";
16
+ const VERSION = "0.5.0";
15
17
  /** Current maturity of this package. See the repository `STATUS.md`. */
16
18
  const maturity = "experimental";
17
19
  /**
@@ -25,6 +27,6 @@ const info = Object.freeze({
25
27
  maturity
26
28
  });
27
29
  //#endregion
28
- export { ActivityIndicator, Avatar, Badge, Button, Card, Chip, Column, Divider, FocusScope, Image, KeyboardAvoidingView, Modal, NotImplementedError, Pressable, ProgressBar, Row, SafeAreaView, ScrollView, Spacer, Stack, Switch, Text, TextInput, VERSION, View, duration, easing, flattenStyle, fontSize, fontWeight, getEnvironment, getTheme, info, lineHeight, maturity, name, notImplemented, palette, radius, resolveStyle, setEnvironment, space, toA11yProps, toHostProps, tokens, useColorScheme, useKeyboard, usePressable, useSafeAreaInsets, useTheme, useWindowDimensions };
30
+ export { ActivityIndicator, Avatar, Badge, Button, Card, Chip, Column, Divider, FocusScope, GestureView, Image, KeyboardAvoidingView, Modal, NotImplementedError, Pressable, ProgressBar, Row, SafeAreaView, ScrollView, Spacer, Stack, Switch, Text, TextInput, VERSION, View, animateTo, duration, easing, flattenStyle, fontSize, fontWeight, getEnvironment, getTheme, info, lineHeight, maturity, motion, name, notImplemented, palette, radius, resolveStyle, setEnvironment, space, toA11yProps, toHostProps, tokens, useColorScheme, useKeyboard, usePressable, useSafeAreaInsets, useTheme, useWindowDimensions };
29
31
 
30
32
  //# 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.4.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 ActivityIndicator,\n type ActivityIndicatorProps,\n Avatar,\n type AvatarProps,\n Badge,\n type BadgeProps,\n Card,\n type CardProps,\n Chip,\n type ChipProps,\n Divider,\n type DividerProps,\n KeyboardAvoidingView,\n type KeyboardAvoidingViewProps,\n ProgressBar,\n type ProgressBarProps,\n SafeAreaView,\n type SafeAreaViewProps,\n Switch,\n type SwitchProps,\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 BaseProps, type Reactive, resolveStyle, toHostProps } from './host'\nexport {\n FocusScope,\n type FocusScopeProps,\n Modal,\n type ModalProps,\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.5.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 ActivityIndicator,\n type ActivityIndicatorProps,\n Avatar,\n type AvatarProps,\n Badge,\n type BadgeProps,\n Card,\n type CardProps,\n Chip,\n type ChipProps,\n Divider,\n type DividerProps,\n KeyboardAvoidingView,\n type KeyboardAvoidingViewProps,\n ProgressBar,\n type ProgressBarProps,\n SafeAreaView,\n type SafeAreaViewProps,\n Switch,\n type SwitchProps,\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 AttachableGesture, GestureView, type GestureViewProps } from './gesture'\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} 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"}
@@ -0,0 +1,15 @@
1
+ import { easing } from "./tokens.js";
2
+ import { AnimatedValue, AnimationHandle, Easing } from "@mindees/core";
3
+
4
+ //#region src/motion.d.ts
5
+ /** The token easing curves as ready-to-use core {@link Easing} functions (same control points). */
6
+ declare const motion: Readonly<Record<keyof typeof easing, Easing>>;
7
+ /** `timing` pre-bound to Atlas's standard duration + easing — the common app animation. */
8
+ declare function animateTo(value: AnimatedValue, to: number, opts?: {
9
+ readonly duration?: number;
10
+ readonly easing?: Easing;
11
+ readonly onComplete?: (finished: boolean) => void;
12
+ }): AnimationHandle;
13
+ //#endregion
14
+ export { animateTo, motion };
15
+ //# sourceMappingURL=motion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion.d.ts","names":[],"sources":["../src/motion.ts"],"mappings":";;;;;cAuBa,MAAA,EAAQ,QAAA,CAAS,MAAA,cAAoB,MAAA,EAAQ,MAAA;;iBAO1C,SAAA,CACd,KAAA,EAAO,aAAA,EACP,EAAA,UACA,IAAA;EAAA,SACW,QAAA;EAAA,SACA,MAAA,GAAS,MAAA;EAAA,SACT,UAAA,IAAc,QAAA;AAAA,IAExB,eAAA"}
package/dist/motion.js ADDED
@@ -0,0 +1,34 @@
1
+ import { duration, easing } from "./tokens.js";
2
+ import { cubicBezier, timing } from "@mindees/core";
3
+ //#region src/motion.ts
4
+ /**
5
+ * Atlas motion — binds the design-token easing/duration to the core animation engine, so callers
6
+ * animate with token NAMES (`motion.standard`, `duration.standard`) instead of raw cubic-béziers.
7
+ * Core owns the math (`cubicBezier`/`timing`); this is the thin token shim (atlas → core only).
8
+ *
9
+ * @example
10
+ * const x = animate(0)
11
+ * animateTo(x, 100) // standard duration + easing
12
+ * animateTo(x, 0, { easing: motion.accelerate, duration: duration.large })
13
+ *
14
+ * @module
15
+ */
16
+ /** The token easing curves as ready-to-use core {@link Easing} functions (same control points). */
17
+ const motion = {
18
+ standard: cubicBezier(easing.standard),
19
+ decelerate: cubicBezier(easing.decelerate),
20
+ accelerate: cubicBezier(easing.accelerate)
21
+ };
22
+ /** `timing` pre-bound to Atlas's standard duration + easing — the common app animation. */
23
+ function animateTo(value, to, opts) {
24
+ return timing(value, {
25
+ to,
26
+ duration: opts?.duration ?? duration.standard,
27
+ easing: opts?.easing ?? motion.standard,
28
+ ...opts?.onComplete ? { onComplete: opts.onComplete } : {}
29
+ });
30
+ }
31
+ //#endregion
32
+ export { animateTo, motion };
33
+
34
+ //# sourceMappingURL=motion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion.js","names":[],"sources":["../src/motion.ts"],"sourcesContent":["/**\n * Atlas motion — binds the design-token easing/duration to the core animation engine, so callers\n * animate with token NAMES (`motion.standard`, `duration.standard`) instead of raw cubic-béziers.\n * Core owns the math (`cubicBezier`/`timing`); this is the thin token shim (atlas → core only).\n *\n * @example\n * const x = animate(0)\n * animateTo(x, 100) // standard duration + easing\n * animateTo(x, 0, { easing: motion.accelerate, duration: duration.large })\n *\n * @module\n */\n\nimport {\n type AnimatedValue,\n type AnimationHandle,\n cubicBezier,\n type Easing,\n timing,\n} from '@mindees/core'\nimport { duration, easing } from './tokens'\n\n/** The token easing curves as ready-to-use core {@link Easing} functions (same control points). */\nexport const motion: Readonly<Record<keyof typeof easing, Easing>> = {\n standard: cubicBezier(easing.standard),\n decelerate: cubicBezier(easing.decelerate),\n accelerate: cubicBezier(easing.accelerate),\n}\n\n/** `timing` pre-bound to Atlas's standard duration + easing — the common app animation. */\nexport function animateTo(\n value: AnimatedValue,\n to: number,\n opts?: {\n readonly duration?: number\n readonly easing?: Easing\n readonly onComplete?: (finished: boolean) => void\n },\n): AnimationHandle {\n return timing(value, {\n to,\n duration: opts?.duration ?? duration.standard,\n easing: opts?.easing ?? motion.standard,\n ...(opts?.onComplete ? { onComplete: opts.onComplete } : {}),\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAuBA,MAAa,SAAwD;CACnE,UAAU,YAAY,OAAO,QAAQ;CACrC,YAAY,YAAY,OAAO,UAAU;CACzC,YAAY,YAAY,OAAO,UAAU;AAC3C;;AAGA,SAAgB,UACd,OACA,IACA,MAKiB;CACjB,OAAO,OAAO,OAAO;EACnB;EACA,UAAU,MAAM,YAAY,SAAS;EACrC,QAAQ,MAAM,UAAU,OAAO;EAC/B,GAAI,MAAM,aAAa,EAAE,YAAY,KAAK,WAAW,IAAI,CAAC;CAC5D,CAAC;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindees/atlas",
3
- "version": "0.4.0",
3
+ "version": "0.5.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",
@@ -35,11 +35,11 @@
35
35
  "directory": "packages/atlas"
36
36
  },
37
37
  "dependencies": {
38
- "@mindees/core": "0.4.0"
38
+ "@mindees/core": "0.5.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "happy-dom": "20.9.0",
42
- "@mindees/renderer": "0.4.0"
42
+ "@mindees/renderer": "0.5.0"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "tsdown",