@mindees/atlas 0.22.1 → 0.22.3
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.d.ts.map +1 -1
- package/dist/components.js +1 -1
- package/dist/components.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/components.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","names":[],"sources":["../src/components.ts"],"mappings":";;;;;;UAqDiB,SAAA,SAAkB,SAAS;EAAA,SACjC,QAAA,GAAW,WAAA;EAQT;EAAA,SANF,OAAA;;WAEA,OAAA;EAI2B;EAAA,SAF3B,MAAA;AAAA;AAAA,cAEE,IAAA,EAAM,SAAS,CAAC,SAAA;;UA4BZ,YAAA,SAAqB,SAAS;EAAA,SACpC,WAAA;EAAA,SACA,SAAA;EAEA;EAAA,SAAA,KAAA;AAAA;AAAA,cAEE,OAAA,EAAS,SAAS,CAAC,YAAA;AAAA,KAoBpB,SAAA;;UAUK,UAAA,SAAmB,SAAA;EAAA,SACzB,QAAA,GAAW,WAAA;EAAA,SACX,IAAA,GAAO,SAAA;AAAA;AAAA,cAEL,KAAA,EAAO,SAAS,CAAC,UAAA;;UAwCb,WAAA,SAAoB,SAAS;EAAA,SACnC,GAAA;EAAA,SACA,IAAA;;WAEA,IAAA;AAAA;AAAA,cAEE,MAAA,EAAQ,SAAS,CAAC,WAAA;;UA2Cd,SAAA,SAAkB,IAAA,CAAK,SAAA;EAAA,SAC7B,KAAA;EAAA,SACA,QAAA,GAAW,QAAA;EAAA,SACX,QAAA;EAAA,SACA,OAAA;EAAA,SACA,OAAA,GAAU,WAAA;EAAA,SACV,QAAA,GAAW,WAAA;EAAA,SACX,KAAA,GAAQ,QAAA,CAAS,UAAA;AAAA;AAAA,cAEf,IAAA,EAAM,SAAS,CAAC,SAAA;;UA4DZ,WAAA,SAA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AiB,KAAA;EAAA,SACjB,KAAA,GAAQ,QAAA,CAAS,UAAA;AAAA;;cAIf,IAAA,EAAM,SAAS,CAAC,SAAA;AAzSyB;AAAA,UA8WrC,gBAAA;EAAA,SACN,EAAA;EAAA,SACA,MAAA,EAAQ,WAAA;EAAA,SACR,OAAA,EAAS,WAAW;AAAA;;UAId,cAAA,SAAuB,IAAA,CAAK,SAAA;EAAA,SAClC,QAAA,WAAmB,gBAAA;EA/VG;EAAA,SAiWtB,QAAA;EA1VV;EAAA,SA4VU,WAAA;EAAA,SACA,KAAA,GAAQ,QAAA,CAAS,UAAA;AAAA;AAtV5B;AAAA,cA0Va,SAAA,EAAW,SAAS,CAAC,cAAA;;UA8DjB,YAAA,SAAqB,IAAA,CAAK,SAAA;EAxZD;EAAA,SA0Z/B,KAAA,EAAO,QAAA;EAAA,SACP,GAAA;EAAA,SACA,GAAA;EAxZA;EAAA,SA0ZA,IAAA;EAAA,SACA,aAAA,IAAiB,KAAA;EAAA,SACjB,QAAA;EAAA,SACA,KAAA,GAAQ,QAAA,CAAS,UAAA;AAAA;;cAIf,OAAA,EAAS,SAAS,CAAC,YAAA;AA9ZoB;AAAA,UAmenC,OAAA;EAAA,SACN,KAAA;EAAA,SACA,KAAA,EAAO,WAAW;AAAA;;UAIZ,qBAAA,SAA8B,IAAA,CAAK,SAAA;EAAA,SACzC,KAAA,EAAO,QAAA;EAAA,SACP,QAAA,WAAmB,OAAA;EAAA,SACnB,aAAA,IAAiB,KAAA;EAAA,SACjB,QAAA;EAAA,SACA,KAAA,GAAQ,QAAA,CAAS,UAAA;AAAA;;cAIf,gBAAA,EAAkB,SAAS,CAAC,qBAAA"}
|
package/dist/components.js
CHANGED
|
@@ -466,7 +466,7 @@ const Tabs = (props) => {
|
|
|
466
466
|
const Accordion = (props) => {
|
|
467
467
|
const theme = useTheme();
|
|
468
468
|
const { sections, multiple, defaultOpen = [], style, ...rest } = props;
|
|
469
|
-
const open = signal(new Set(defaultOpen));
|
|
469
|
+
const open = signal(new Set(multiple ? defaultOpen : defaultOpen.slice(0, 1)));
|
|
470
470
|
const isOpen = (id) => open().has(id);
|
|
471
471
|
const toggle = (id) => {
|
|
472
472
|
const next = new Set(untrack(open));
|
package/dist/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","names":["radiusScale","radius"],"sources":["../src/components.ts"],"sourcesContent":["/**\n * Atlas components — higher-level building blocks composed purely from the primitives\n * (View/Text/Pressable/Image) + the device hooks. No new host concepts, so every one\n * renders on web *and* native today, and stays fine-grained: reactive bits are accessor\n * styles, so only the changed node re-runs (no component re-render).\n *\n * Colors come from the design tokens via {@link useTheme}, so components re-theme\n * automatically light↔dark (handbook §23/§31). Spacing/radius/type use the token scales.\n *\n * @module\n */\n\nimport {\n type Accessor,\n type Component,\n createElement,\n type MindeesNode,\n signal,\n untrack,\n} from '@mindees/core'\nimport { useKeyboard, useSafeAreaInsets } from './environment'\nimport { type BaseProps, type Reactive, toHostProps } from './host'\nimport { Image, Pressable, Text, View } from './primitives'\nimport { flattenStyle, type StyleInput } from './style'\nimport { fontWeight, radius as radiusScale, space, type Theme, useTheme } from './tokens'\n\n/** Merge a base style with a caller's (possibly reactive) style, staying reactive if either is. */\nfunction mergeStyle(\n base: StyleInput | Accessor<StyleInput>,\n style: Reactive<StyleInput> | undefined,\n): Reactive<StyleInput> {\n const baseFn = typeof base === 'function' ? (base as Accessor<StyleInput>) : null\n const styleFn = typeof style === 'function' ? (style as Accessor<StyleInput>) : null\n if (baseFn || styleFn) {\n // In each branch the non-fn side isn't a function, so the StyleInput cast is sound.\n const baseVal = base as StyleInput\n const styleVal = style as StyleInput\n return () => flattenStyle([baseFn ? baseFn() : baseVal, styleFn ? styleFn() : styleVal])\n }\n return flattenStyle([base as StyleInput, style as StyleInput])\n}\n\n/** Normalize a `Reactive<T>` to an accessor. */\nfunction toAccessor<T>(value: Reactive<T>, fallback: T): Accessor<T> {\n if (typeof value === 'function') return value as Accessor<T>\n return () => (value === undefined ? fallback : value)\n}\n\n// ---------------------------------------------------------------------------\n// Card\n// ---------------------------------------------------------------------------\n\n/** A surface that groups one coherent unit of content. */\nexport interface CardProps extends BaseProps {\n readonly children?: MindeesNode\n /** Visual emphasis. `elevated` (default) lifts off the bg; `filled` is a soft tint; `outlined` is a hairline. */\n readonly variant?: 'elevated' | 'filled' | 'outlined'\n /** Internal padding (handbook default 16). */\n readonly padding?: number | string\n /** Corner radius (handbook 12–16 for app cards). */\n readonly radius?: number\n}\nexport const Card: Component<CardProps> = (props) => {\n const theme = useTheme()\n const {\n variant = 'elevated',\n padding = space.md,\n radius = radiusScale.lg,\n style,\n children,\n ...rest\n } = props\n const base: Accessor<StyleInput> = () => {\n const c = theme().color\n const surface: StyleInput =\n variant === 'outlined'\n ? { borderWidth: 1, borderColor: c.border }\n : variant === 'filled'\n ? { backgroundColor: c.surfaceVariant }\n : { backgroundColor: c.surface, borderWidth: 1, borderColor: c.border }\n return { padding, borderRadius: radius, ...surface }\n }\n return createElement(View, { ...rest, style: mergeStyle(base, style) }, children)\n}\n\n// ---------------------------------------------------------------------------\n// Divider\n// ---------------------------------------------------------------------------\n\n/** A thin rule separating content. */\nexport interface DividerProps extends BaseProps {\n readonly orientation?: 'horizontal' | 'vertical'\n readonly thickness?: number\n /** Override color (defaults to the theme border). */\n readonly color?: string\n}\nexport const Divider: Component<DividerProps> = (props) => {\n const theme = useTheme()\n const { orientation = 'horizontal', thickness = 1, color, style, ...rest } = props\n const base: Accessor<StyleInput> = () => {\n const bg = color ?? theme().color.border\n return orientation === 'horizontal'\n ? { height: thickness, alignSelf: 'stretch', backgroundColor: bg }\n : { width: thickness, alignSelf: 'stretch', backgroundColor: bg }\n }\n return createElement(View, {\n ...rest,\n role: rest.role ?? 'separator',\n style: mergeStyle(base, style),\n })\n}\n\n// ---------------------------------------------------------------------------\n// Badge\n// ---------------------------------------------------------------------------\n\nexport type BadgeTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger'\n\n/** Resolve a tone to its {bg, fg} in the active theme. */\nfunction toneColors(tone: BadgeTone, theme: Theme): { bg: string; fg: string } {\n const c = theme.color\n if (tone === 'neutral') return { bg: c.surfaceVariant, fg: c.text }\n return { bg: c[tone], fg: c.onTone }\n}\n\n/** A compact status/count pill. */\nexport interface BadgeProps extends BaseProps {\n readonly children?: MindeesNode\n readonly tone?: BadgeTone\n}\nexport const Badge: Component<BadgeProps> = (props) => {\n const theme = useTheme()\n const { tone = 'neutral', style, children, ...rest } = props\n const base: Accessor<StyleInput> = () => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n paddingTop: space['3xs'],\n paddingBottom: space['3xs'],\n paddingLeft: space.xs,\n paddingRight: space.xs,\n borderRadius: radiusScale.full,\n backgroundColor: toneColors(tone, theme()).bg,\n })\n const textStyle: Accessor<StyleInput> = () => ({\n fontSize: 12,\n fontWeight: fontWeight.semibold,\n color: toneColors(tone, theme()).fg,\n })\n return createElement(\n View,\n { ...rest, role: rest.role ?? 'status', style: mergeStyle(base, style) },\n createElement(Text, { style: textStyle }, children),\n )\n}\n\n// ---------------------------------------------------------------------------\n// Avatar\n// ---------------------------------------------------------------------------\n\n/** Up-to-two-letter initials from a name. */\nfunction initialsOf(name: string): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean)\n if (parts.length === 0) return '?'\n const first = parts[0]?.[0] ?? ''\n const last = parts.length > 1 ? (parts[parts.length - 1]?.[0] ?? '') : ''\n return (first + last).toUpperCase()\n}\n\n/** A circular user image, falling back to initials. */\nexport interface AvatarProps extends BaseProps {\n readonly src?: string\n readonly name?: string\n /** Diameter in px (default 40). */\n readonly size?: number\n}\nexport const Avatar: Component<AvatarProps> = (props) => {\n const theme = useTheme()\n const { src, name, size = 40, style, ...rest } = props\n const base: Accessor<StyleInput> = () => ({\n width: size,\n height: size,\n borderRadius: size / 2,\n overflow: 'hidden',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme().color.surfaceVariant,\n })\n const content = src\n ? createElement(Image, {\n src,\n label: name ?? '',\n ...(name ? {} : { decorative: true }),\n style: { width: size, height: size },\n })\n : createElement(\n Text,\n {\n style: () => ({\n fontSize: Math.round(size * 0.4),\n fontWeight: fontWeight.semibold,\n color: theme().color.text,\n }),\n },\n name ? initialsOf(name) : '?',\n )\n return createElement(\n View,\n { ...rest, label: rest.label ?? name, style: mergeStyle(base, style) },\n content,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Chip\n// ---------------------------------------------------------------------------\n\n/** A compact, optionally-selectable token (filter/choice/input). */\nexport interface ChipProps extends Omit<BaseProps, 'style'> {\n readonly label: string\n readonly selected?: Reactive<boolean>\n readonly disabled?: boolean\n readonly onPress?: () => void\n readonly leading?: MindeesNode\n readonly trailing?: MindeesNode\n readonly style?: Reactive<StyleInput>\n}\nexport const Chip: Component<ChipProps> = (props) => {\n const theme = useTheme()\n const { label, selected = false, disabled, onPress, leading, trailing, style, ...rest } = props\n const isSelected = toAccessor(selected, false)\n const base: Accessor<StyleInput> = () => {\n const c = theme().color\n const on = isSelected()\n return {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: space['2xs'],\n minHeight: 32,\n paddingTop: space['2xs'],\n paddingBottom: space['2xs'],\n paddingLeft: space.sm,\n paddingRight: space.sm,\n borderRadius: radiusScale.full,\n borderWidth: 1,\n borderColor: on ? c.primary : c.border,\n backgroundColor: on ? c.primary : 'transparent',\n opacity: disabled ? 0.5 : 1,\n }\n }\n const text = createElement(\n Text,\n {\n style: () => ({\n fontSize: 14,\n fontWeight: fontWeight.medium,\n color: isSelected() ? theme().color.onPrimary : theme().color.text,\n }),\n },\n label,\n )\n const inner: MindeesNode = [leading, text, trailing].filter((n) => n != null) as MindeesNode\n return createElement(\n Pressable,\n {\n ...rest,\n role: rest.role ?? 'button',\n // Reactive `aria-pressed` so a toggle chip announces its selected state as it changes.\n state: () => ({\n ...(typeof rest.state === 'function' ? rest.state() : (rest.state ?? {})),\n pressed: isSelected(),\n }),\n ...(onPress ? { onPress } : {}),\n ...(disabled ? { disabled: true } : {}),\n style: mergeStyle(base, style),\n },\n inner,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Switch\n// ---------------------------------------------------------------------------\n\n/** A binary on/off toggle (composed track + knob; flips instantly on press). */\nexport interface SwitchProps extends Omit<BaseProps, 'style'> {\n /** Controlled state (static or reactive). */\n readonly value: Reactive<boolean>\n readonly onValueChange?: (value: boolean) => void\n readonly disabled?: boolean\n readonly style?: Reactive<StyleInput>\n}\nexport const Switch: Component<SwitchProps> = (props) => {\n const theme = useTheme()\n const { value, onValueChange, disabled, style, ...rest } = props\n const isOn = toAccessor(value, false)\n const track: Accessor<StyleInput> = () => ({\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: isOn() ? 'flex-end' : 'flex-start',\n width: 52,\n height: 32,\n borderRadius: radiusScale.full,\n padding: 3,\n backgroundColor: isOn() ? theme().color.primary : theme().color.textMuted,\n opacity: disabled ? 0.5 : 1,\n })\n const knob = createElement(View, {\n style: () => ({\n width: 26,\n height: 26,\n borderRadius: 13,\n backgroundColor: theme().color.onPrimary,\n }),\n })\n const handlePress = onValueChange && !disabled ? () => onValueChange(!isOn()) : undefined\n return createElement(\n Pressable,\n {\n ...rest,\n role: rest.role ?? 'switch',\n // Reactive state → `aria-checked` tracks the toggle (a static object would bake it once).\n state: () => ({\n ...(typeof rest.state === 'function' ? rest.state() : (rest.state ?? {})),\n checked: isOn(),\n }),\n ...(disabled ? { disabled: true } : {}),\n ...(handlePress ? { onPress: handlePress } : {}),\n style: mergeStyle(track, style),\n },\n knob,\n )\n}\n\n// ---------------------------------------------------------------------------\n// SafeAreaView\n// ---------------------------------------------------------------------------\n\n/** A container that pads itself by the live safe-area insets (notch, home indicator, …). */\nexport interface SafeAreaViewProps extends BaseProps {\n readonly children?: MindeesNode\n /** Which edges to inset (default: all four). */\n readonly edges?: ReadonlyArray<'top' | 'right' | 'bottom' | 'left'>\n}\nexport const SafeAreaView: Component<SafeAreaViewProps> = (props) => {\n const insets = useSafeAreaInsets()\n const { edges, style, children, ...rest } = props\n const wants = (edge: 'top' | 'right' | 'bottom' | 'left'): boolean =>\n !edges || edges.includes(edge)\n const base: Accessor<StyleInput> = () => {\n const i = insets()\n return {\n paddingTop: wants('top') ? i.top : 0,\n paddingRight: wants('right') ? i.right : 0,\n paddingBottom: wants('bottom') ? i.bottom : 0,\n paddingLeft: wants('left') ? i.left : 0,\n }\n }\n return createElement(View, { ...rest, style: mergeStyle(base, style) }, children)\n}\n\n// ---------------------------------------------------------------------------\n// KeyboardAvoidingView\n// ---------------------------------------------------------------------------\n\n/** A container that pads its bottom by the live keyboard height so content stays visible. */\nexport interface KeyboardAvoidingViewProps extends BaseProps {\n readonly children?: MindeesNode\n}\nexport const KeyboardAvoidingView: Component<KeyboardAvoidingViewProps> = (props) => {\n const keyboard = useKeyboard()\n const { style, children, ...rest } = props\n const base: Accessor<StyleInput> = () => ({ paddingBottom: keyboard().height })\n return createElement(View, { ...rest, style: mergeStyle(base, style) }, children)\n}\n\n// ---------------------------------------------------------------------------\n// ProgressBar (determinate)\n// ---------------------------------------------------------------------------\n\n/** A determinate progress bar (track + reactive fill). */\nexport interface ProgressBarProps extends BaseProps {\n /** Progress 0..1 (static or reactive). Values outside the range are clamped. */\n readonly value?: Reactive<number>\n readonly trackColor?: string\n readonly color?: string\n readonly height?: number\n}\nexport const ProgressBar: Component<ProgressBarProps> = (props) => {\n const theme = useTheme()\n const { value = 0, trackColor, color, height = 6, style, ...rest } = props\n const progress = toAccessor(value, 0)\n const track: Accessor<StyleInput> = () => ({\n width: '100%',\n height,\n borderRadius: height / 2,\n overflow: 'hidden',\n backgroundColor: trackColor ?? theme().color.surfaceVariant,\n })\n const fill: Accessor<StyleInput> = () => ({\n height,\n borderRadius: height / 2,\n backgroundColor: color ?? theme().color.primary,\n width: `${Math.max(0, Math.min(1, progress())) * 100}%`,\n })\n return createElement(\n View,\n {\n ...rest,\n role: rest.role ?? 'progressbar',\n // A progressbar with no value is inaccessible — emit a reactive aria-valuenow (0..1 range).\n valueMin: 0,\n valueMax: 1,\n valueNow: () => Math.max(0, Math.min(1, progress())),\n style: mergeStyle(track, style),\n },\n createElement(View, { style: fill }),\n )\n}\n\n// ---------------------------------------------------------------------------\n// ActivityIndicator\n// ---------------------------------------------------------------------------\n\n/**\n * A spinning loading indicator. Emits the `activityindicator` host tag, which each backend\n * renders natively: web → a CSS keyframe spinner (size from `width`/`height`, arc from `color`),\n * Android → an indeterminate `ProgressBar`. Size/color flow through ordinary style keys.\n */\nexport interface ActivityIndicatorProps extends BaseProps {\n /** Diameter in px (default 24). */\n readonly size?: number\n /** Spinner color (defaults to the theme primary). */\n readonly color?: string\n /** When false, renders nothing (so callers can gate it without a conditional). */\n readonly animating?: boolean\n}\nexport const ActivityIndicator: Component<ActivityIndicatorProps> = (props) => {\n const theme = useTheme()\n const { size = 24, color, animating = true, style, ...rest } = props\n if (animating === false) return null\n const base: Accessor<StyleInput> = () => ({\n width: size,\n height: size,\n color: color ?? theme().color.primary,\n })\n const host = toHostProps({ ...rest, style: mergeStyle(base, style) })\n if (!host.role) host.role = 'status'\n host['aria-busy'] = 'true'\n return createElement('activityindicator', host)\n}\n\n// ---------------------------------------------------------------------------\n// Checkbox\n// ---------------------------------------------------------------------------\n\n/** Props for {@link Checkbox}. (`label` is omitted from a11y to repurpose it as the visible label.) */\nexport interface CheckboxProps extends Omit<BaseProps, 'style' | 'label'> {\n /** Controlled checked state (static or reactive). */\n readonly value: Reactive<boolean>\n readonly onValueChange?: (value: boolean) => void\n readonly disabled?: boolean\n /** Optional visible label rendered beside the box (a string becomes a `Text`). */\n readonly label?: MindeesNode\n readonly style?: Reactive<StyleInput>\n}\n\n/** An accessible checkbox (RN ships none built-in). Toggles `value`; `aria-checked` tracks it. */\nexport const Checkbox: Component<CheckboxProps> = (props) => {\n const theme = useTheme()\n const { value, onValueChange, disabled, label, style, ...rest } = props\n const isOn = toAccessor(value, false)\n const box: Accessor<StyleInput> = () => ({\n width: 22,\n height: 22,\n borderRadius: radiusScale.sm,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n borderColor: isOn() ? theme().color.primary : theme().color.textMuted,\n backgroundColor: isOn() ? theme().color.primary : 'transparent',\n opacity: disabled ? 0.5 : 1,\n })\n const check = createElement(\n Text,\n {\n style: () => ({ color: theme().color.onPrimary, fontSize: 14, fontWeight: fontWeight.bold }),\n },\n () => (isOn() ? '✓' : ''),\n )\n const handlePress = onValueChange && !disabled ? () => onValueChange(!isOn()) : undefined\n const boxEl = createElement(\n Pressable,\n {\n ...rest,\n role: rest.role ?? 'checkbox',\n state: () => ({\n ...(typeof rest.state === 'function' ? rest.state() : (rest.state ?? {})),\n checked: isOn(),\n }),\n ...(disabled ? { disabled: true } : {}),\n ...(handlePress ? { onPress: handlePress } : {}),\n style: mergeStyle(box, style),\n },\n check,\n )\n if (label === undefined) return boxEl\n return createElement(\n View,\n { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: space.sm } },\n boxEl,\n typeof label === 'string' ? createElement(Text, {}, label) : label,\n )\n}\n\n// ---------------------------------------------------------------------------\n// RadioGroup\n// ---------------------------------------------------------------------------\n\n/** One option in a {@link RadioGroup}. */\nexport interface RadioOption {\n readonly value: string\n readonly label: MindeesNode\n}\n\n/** Props for {@link RadioGroup}. */\nexport interface RadioGroupProps extends Omit<BaseProps, 'style'> {\n /** Controlled selected value (static or reactive). */\n readonly value: Reactive<string>\n readonly options: readonly RadioOption[]\n readonly onValueChange?: (value: string) => void\n readonly disabled?: boolean\n readonly style?: Reactive<StyleInput>\n}\n\n/** A single-select radio group (RN ships none built-in). Each row is `role=\"radio\"`. */\nexport const RadioGroup: Component<RadioGroupProps> = (props) => {\n const theme = useTheme()\n const { value, options, onValueChange, disabled, style, ...rest } = props\n const selected = toAccessor(value, '')\n const rows = options.map((option) => {\n const checked = (): boolean => selected() === option.value\n const dot = createElement(View, {\n style: () => ({\n width: 12,\n height: 12,\n borderRadius: radiusScale.full,\n backgroundColor: checked() ? theme().color.primary : 'transparent',\n }),\n })\n const ring = createElement(\n View,\n {\n style: () => ({\n width: 22,\n height: 22,\n borderRadius: radiusScale.full,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n borderColor: checked() ? theme().color.primary : theme().color.textMuted,\n }),\n },\n dot,\n )\n const handlePress = onValueChange && !disabled ? () => onValueChange(option.value) : undefined\n return createElement(\n Pressable,\n {\n role: 'radio',\n state: () => ({ checked: checked() }),\n ...(disabled ? { disabled: true } : {}),\n ...(handlePress ? { onPress: handlePress } : {}),\n style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: space.sm },\n },\n ring,\n typeof option.label === 'string' ? createElement(Text, {}, option.label) : option.label,\n )\n })\n return createElement(\n View,\n {\n ...toHostProps({ ...rest, style }),\n role: rest.role ?? 'radiogroup',\n style: mergeStyle({ display: 'flex', flexDirection: 'column', gap: space.sm }, style),\n },\n ...rows,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Skeleton\n// ---------------------------------------------------------------------------\n\n/** Props for {@link Skeleton}. */\nexport interface SkeletonProps extends Omit<BaseProps, 'style'> {\n readonly width?: number | string\n readonly height?: number | string\n readonly radius?: number\n readonly style?: Reactive<StyleInput>\n}\n\n/** A muted loading placeholder block (RN ships none built-in). */\nexport const Skeleton: Component<SkeletonProps> = (props) => {\n const theme = useTheme()\n const { width = '100%', height = 16, radius = radiusScale.sm, style, ...rest } = props\n const base: Accessor<StyleInput> = () => ({\n width,\n height,\n borderRadius: radius,\n backgroundColor: theme().color.surfaceVariant,\n })\n const host = toHostProps({ ...rest, style: mergeStyle(base, style) })\n if (!host.role) host.role = 'status'\n host['aria-busy'] = 'true'\n return createElement('view', host)\n}\n\n// ---------------------------------------------------------------------------\n// Tabs\n// ---------------------------------------------------------------------------\n\n/** One tab: a value, a header label, and its panel content. */\nexport interface TabItem {\n readonly value: string\n readonly label: MindeesNode\n readonly content: MindeesNode\n}\n\n/** Props for {@link Tabs}. */\nexport interface TabsProps extends Omit<BaseProps, 'style'> {\n /** Controlled selected tab value (static or reactive). */\n readonly value: Reactive<string>\n readonly tabs: readonly TabItem[]\n readonly onValueChange?: (value: string) => void\n readonly style?: Reactive<StyleInput>\n}\n\n/** An accessible tab strip + panel (RN ships none built-in). Only the active panel region re-renders. */\nexport const Tabs: Component<TabsProps> = (props) => {\n const theme = useTheme()\n const { value, tabs, onValueChange, style, ...rest } = props\n const selected = toAccessor(value, tabs[0]?.value ?? '')\n const tabBar = createElement(\n View,\n {\n role: 'tablist',\n style: () => ({\n display: 'flex',\n flexDirection: 'row',\n gap: space.xs,\n borderBottomWidth: 1,\n borderColor: theme().color.border,\n }),\n },\n ...tabs.map((t) => {\n const active = (): boolean => selected() === t.value\n return createElement(\n Pressable,\n {\n role: 'tab',\n state: () => ({ selected: active() }),\n ...(onValueChange ? { onPress: () => onValueChange(t.value) } : {}),\n style: () => ({\n paddingTop: space.xs,\n paddingBottom: space.xs,\n paddingLeft: space.sm,\n paddingRight: space.sm,\n borderBottomWidth: 2,\n borderColor: active() ? theme().color.primary : 'transparent',\n }),\n },\n typeof t.label === 'string'\n ? createElement(\n Text,\n {\n style: () => ({\n color: active() ? theme().color.primary : theme().color.text,\n ...(active() ? { fontWeight: fontWeight.semibold } : {}),\n }),\n },\n t.label,\n )\n : t.label,\n )\n }),\n )\n // The active panel is a reactive region: switching tabs re-runs ONLY this region.\n const panel = createElement(View, { role: 'tabpanel', style: { padding: space.md } }, () => {\n const active = tabs.find((t) => t.value === selected())\n return active ? active.content : null\n })\n return createElement(\n View,\n {\n ...toHostProps({ ...rest, style }),\n style: mergeStyle({ display: 'flex', flexDirection: 'column' }, style),\n },\n tabBar,\n panel,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Accordion\n// ---------------------------------------------------------------------------\n\n/** One collapsible accordion section. */\nexport interface AccordionSection {\n readonly id: string\n readonly header: MindeesNode\n readonly content: MindeesNode\n}\n\n/** Props for {@link Accordion}. */\nexport interface AccordionProps extends Omit<BaseProps, 'style'> {\n readonly sections: readonly AccordionSection[]\n /** Allow more than one section open at once (default: single-open). */\n readonly multiple?: boolean\n /** Section ids open on first render. */\n readonly defaultOpen?: readonly string[]\n readonly style?: Reactive<StyleInput>\n}\n\n/** Collapsible sections (RN ships none built-in). Each header is `aria-expanded`; panels mount lazily. */\nexport const Accordion: Component<AccordionProps> = (props) => {\n const theme = useTheme()\n const { sections, multiple, defaultOpen = [], style, ...rest } = props\n const open = signal<ReadonlySet<string>>(new Set(defaultOpen))\n const isOpen = (id: string): boolean => open().has(id)\n const toggle = (id: string): void => {\n const next = new Set(untrack(open))\n if (next.has(id)) next.delete(id)\n else {\n if (!multiple) next.clear()\n next.add(id)\n }\n open.set(next)\n }\n const rows = sections.map((section) => {\n const header = createElement(\n Pressable,\n {\n role: 'button',\n state: () => ({ expanded: isOpen(section.id) }),\n onPress: () => toggle(section.id),\n style: () => ({\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingTop: space.sm,\n paddingBottom: space.sm,\n borderBottomWidth: 1,\n borderColor: theme().color.border,\n }),\n },\n typeof section.header === 'string' ? createElement(Text, {}, section.header) : section.header,\n createElement(Text, { style: () => ({ color: theme().color.textMuted }) }, () =>\n isOpen(section.id) ? '▾' : '▸',\n ),\n )\n // The panel region re-runs only when THIS section toggles.\n const panel = createElement(View, { style: { padding: space.sm } }, () =>\n isOpen(section.id) ? section.content : null,\n )\n return createElement(View, {}, header, panel)\n })\n return createElement(\n View,\n {\n ...toHostProps({ ...rest, style }),\n style: mergeStyle({ display: 'flex', flexDirection: 'column' }, style),\n },\n ...rows,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Stepper\n// ---------------------------------------------------------------------------\n\n/** Props for {@link Stepper}. */\nexport interface StepperProps extends Omit<BaseProps, 'style'> {\n /** Controlled numeric value (static or reactive). */\n readonly value: Reactive<number>\n readonly min?: number\n readonly max?: number\n /** Increment/decrement amount (default 1). */\n readonly step?: number\n readonly onValueChange?: (value: number) => void\n readonly disabled?: boolean\n readonly style?: Reactive<StyleInput>\n}\n\n/** A −/+ number stepper (RN ships none built-in). Flex-only, so it renders on web + native alike. */\nexport const Stepper: Component<StepperProps> = (props) => {\n const theme = useTheme()\n const {\n value,\n min = Number.NEGATIVE_INFINITY,\n max = Number.POSITIVE_INFINITY,\n step = 1,\n onValueChange,\n disabled,\n style,\n ...rest\n } = props\n const current = toAccessor(value, 0)\n const clamp = (v: number): number => Math.min(max, Math.max(min, v))\n const button = (label: string, delta: number, enabled: () => boolean) =>\n createElement(\n Pressable,\n {\n role: 'button',\n state: () => ({ disabled: disabled === true || !enabled() }),\n ...(disabled\n ? {}\n : { onPress: () => enabled() && onValueChange?.(clamp(current() + delta)) }),\n style: () => ({\n width: 36,\n height: 36,\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 1,\n borderColor: theme().color.border,\n borderRadius: radiusScale.md,\n }),\n },\n createElement(\n Text,\n {\n style: () => ({\n fontSize: 20,\n color: enabled() && disabled !== true ? theme().color.text : theme().color.textMuted,\n }),\n },\n label,\n ),\n )\n return createElement(\n View,\n {\n ...toHostProps({ ...rest, style }),\n role: rest.role ?? 'group',\n style: mergeStyle(\n { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: space.sm },\n style,\n ),\n },\n button('−', -step, () => current() > min), // minus\n createElement(\n Text,\n { style: () => ({ minWidth: 32, textAlign: 'center', color: theme().color.text }) },\n () => String(current()),\n ),\n button('+', step, () => current() < max),\n )\n}\n\n// ---------------------------------------------------------------------------\n// SegmentedControl\n// ---------------------------------------------------------------------------\n\n/** One segment: a value + a label. */\nexport interface Segment {\n readonly value: string\n readonly label: MindeesNode\n}\n\n/** Props for {@link SegmentedControl}. */\nexport interface SegmentedControlProps extends Omit<BaseProps, 'style'> {\n readonly value: Reactive<string>\n readonly segments: readonly Segment[]\n readonly onValueChange?: (value: string) => void\n readonly disabled?: boolean\n readonly style?: Reactive<StyleInput>\n}\n\n/** A compact connected single-select (iOS-style segmented control). Flex-only → web + native. */\nexport const SegmentedControl: Component<SegmentedControlProps> = (props) => {\n const theme = useTheme()\n const { value, segments, onValueChange, disabled, style, ...rest } = props\n const selected = toAccessor(value, segments[0]?.value ?? '')\n return createElement(\n View,\n {\n ...toHostProps({ ...rest, style }),\n role: rest.role ?? 'radiogroup',\n style: mergeStyle(\n () => ({\n display: 'flex',\n flexDirection: 'row',\n borderWidth: 1,\n borderColor: theme().color.border,\n borderRadius: radiusScale.md,\n overflow: 'hidden',\n }),\n style,\n ),\n },\n ...segments.map((seg) => {\n const active = (): boolean => selected() === seg.value\n return createElement(\n Pressable,\n {\n role: 'radio',\n state: () => ({ selected: active(), disabled }),\n ...(disabled ? {} : { onPress: () => onValueChange?.(seg.value) }),\n style: () => ({\n paddingTop: space.xs,\n paddingBottom: space.xs,\n paddingLeft: space.md,\n paddingRight: space.md,\n backgroundColor: active() ? theme().color.primary : 'transparent',\n }),\n },\n typeof seg.label === 'string'\n ? createElement(\n Text,\n {\n style: () => ({\n color: active() ? theme().color.onTone : theme().color.text,\n ...(active() ? { fontWeight: fontWeight.semibold } : {}),\n }),\n },\n seg.label,\n )\n : seg.label,\n )\n }),\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2BA,SAAS,WACP,MACA,OACsB;CACtB,MAAM,SAAS,OAAO,SAAS,aAAc,OAAgC;CAC7E,MAAM,UAAU,OAAO,UAAU,aAAc,QAAiC;CAChF,IAAI,UAAU,SAAS;EAErB,MAAM,UAAU;EAChB,MAAM,WAAW;EACjB,aAAa,aAAa,CAAC,SAAS,OAAO,IAAI,SAAS,UAAU,QAAQ,IAAI,QAAQ,CAAC;CACzF;CACA,OAAO,aAAa,CAAC,MAAoB,KAAmB,CAAC;AAC/D;;AAGA,SAAS,WAAc,OAAoB,UAA0B;CACnE,IAAI,OAAO,UAAU,YAAY,OAAO;CACxC,aAAc,UAAU,K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GACA,OAAO,IAAI,UAAU,WACjB,cACE,MACA,EACE,cAAc;GACZ,OAAO,OAAO,IAAI,MAAM,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM;GACvD,GAAI,OAAO,IAAI,EAAE,YAAY,WAAW,SAAS,IAAI,CAAC;EACxD,GACF,GACA,IAAI,KACN,IACA,IAAI,KACV;CACF,CAAC,CACH;AACF"}
|
|
1
|
+
{"version":3,"file":"components.js","names":["radiusScale","radius"],"sources":["../src/components.ts"],"sourcesContent":["/**\n * Atlas components — higher-level building blocks composed purely from the primitives\n * (View/Text/Pressable/Image) + the device hooks. No new host concepts, so every one\n * renders on web *and* native today, and stays fine-grained: reactive bits are accessor\n * styles, so only the changed node re-runs (no component re-render).\n *\n * Colors come from the design tokens via {@link useTheme}, so components re-theme\n * automatically light↔dark (handbook §23/§31). Spacing/radius/type use the token scales.\n *\n * @module\n */\n\nimport {\n type Accessor,\n type Component,\n createElement,\n type MindeesNode,\n signal,\n untrack,\n} from '@mindees/core'\nimport { useKeyboard, useSafeAreaInsets } from './environment'\nimport { type BaseProps, type Reactive, toHostProps } from './host'\nimport { Image, Pressable, Text, View } from './primitives'\nimport { flattenStyle, type StyleInput } from './style'\nimport { fontWeight, radius as radiusScale, space, type Theme, useTheme } from './tokens'\n\n/** Merge a base style with a caller's (possibly reactive) style, staying reactive if either is. */\nfunction mergeStyle(\n base: StyleInput | Accessor<StyleInput>,\n style: Reactive<StyleInput> | undefined,\n): Reactive<StyleInput> {\n const baseFn = typeof base === 'function' ? (base as Accessor<StyleInput>) : null\n const styleFn = typeof style === 'function' ? (style as Accessor<StyleInput>) : null\n if (baseFn || styleFn) {\n // In each branch the non-fn side isn't a function, so the StyleInput cast is sound.\n const baseVal = base as StyleInput\n const styleVal = style as StyleInput\n return () => flattenStyle([baseFn ? baseFn() : baseVal, styleFn ? styleFn() : styleVal])\n }\n return flattenStyle([base as StyleInput, style as StyleInput])\n}\n\n/** Normalize a `Reactive<T>` to an accessor. */\nfunction toAccessor<T>(value: Reactive<T>, fallback: T): Accessor<T> {\n if (typeof value === 'function') return value as Accessor<T>\n return () => (value === undefined ? fallback : value)\n}\n\n// ---------------------------------------------------------------------------\n// Card\n// ---------------------------------------------------------------------------\n\n/** A surface that groups one coherent unit of content. */\nexport interface CardProps extends BaseProps {\n readonly children?: MindeesNode\n /** Visual emphasis. `elevated` (default) lifts off the bg; `filled` is a soft tint; `outlined` is a hairline. */\n readonly variant?: 'elevated' | 'filled' | 'outlined'\n /** Internal padding (handbook default 16). */\n readonly padding?: number | string\n /** Corner radius (handbook 12–16 for app cards). */\n readonly radius?: number\n}\nexport const Card: Component<CardProps> = (props) => {\n const theme = useTheme()\n const {\n variant = 'elevated',\n padding = space.md,\n radius = radiusScale.lg,\n style,\n children,\n ...rest\n } = props\n const base: Accessor<StyleInput> = () => {\n const c = theme().color\n const surface: StyleInput =\n variant === 'outlined'\n ? { borderWidth: 1, borderColor: c.border }\n : variant === 'filled'\n ? { backgroundColor: c.surfaceVariant }\n : { backgroundColor: c.surface, borderWidth: 1, borderColor: c.border }\n return { padding, borderRadius: radius, ...surface }\n }\n return createElement(View, { ...rest, style: mergeStyle(base, style) }, children)\n}\n\n// ---------------------------------------------------------------------------\n// Divider\n// ---------------------------------------------------------------------------\n\n/** A thin rule separating content. */\nexport interface DividerProps extends BaseProps {\n readonly orientation?: 'horizontal' | 'vertical'\n readonly thickness?: number\n /** Override color (defaults to the theme border). */\n readonly color?: string\n}\nexport const Divider: Component<DividerProps> = (props) => {\n const theme = useTheme()\n const { orientation = 'horizontal', thickness = 1, color, style, ...rest } = props\n const base: Accessor<StyleInput> = () => {\n const bg = color ?? theme().color.border\n return orientation === 'horizontal'\n ? { height: thickness, alignSelf: 'stretch', backgroundColor: bg }\n : { width: thickness, alignSelf: 'stretch', backgroundColor: bg }\n }\n return createElement(View, {\n ...rest,\n role: rest.role ?? 'separator',\n style: mergeStyle(base, style),\n })\n}\n\n// ---------------------------------------------------------------------------\n// Badge\n// ---------------------------------------------------------------------------\n\nexport type BadgeTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger'\n\n/** Resolve a tone to its {bg, fg} in the active theme. */\nfunction toneColors(tone: BadgeTone, theme: Theme): { bg: string; fg: string } {\n const c = theme.color\n if (tone === 'neutral') return { bg: c.surfaceVariant, fg: c.text }\n return { bg: c[tone], fg: c.onTone }\n}\n\n/** A compact status/count pill. */\nexport interface BadgeProps extends BaseProps {\n readonly children?: MindeesNode\n readonly tone?: BadgeTone\n}\nexport const Badge: Component<BadgeProps> = (props) => {\n const theme = useTheme()\n const { tone = 'neutral', style, children, ...rest } = props\n const base: Accessor<StyleInput> = () => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n paddingTop: space['3xs'],\n paddingBottom: space['3xs'],\n paddingLeft: space.xs,\n paddingRight: space.xs,\n borderRadius: radiusScale.full,\n backgroundColor: toneColors(tone, theme()).bg,\n })\n const textStyle: Accessor<StyleInput> = () => ({\n fontSize: 12,\n fontWeight: fontWeight.semibold,\n color: toneColors(tone, theme()).fg,\n })\n return createElement(\n View,\n { ...rest, role: rest.role ?? 'status', style: mergeStyle(base, style) },\n createElement(Text, { style: textStyle }, children),\n )\n}\n\n// ---------------------------------------------------------------------------\n// Avatar\n// ---------------------------------------------------------------------------\n\n/** Up-to-two-letter initials from a name. */\nfunction initialsOf(name: string): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean)\n if (parts.length === 0) return '?'\n const first = parts[0]?.[0] ?? ''\n const last = parts.length > 1 ? (parts[parts.length - 1]?.[0] ?? '') : ''\n return (first + last).toUpperCase()\n}\n\n/** A circular user image, falling back to initials. */\nexport interface AvatarProps extends BaseProps {\n readonly src?: string\n readonly name?: string\n /** Diameter in px (default 40). */\n readonly size?: number\n}\nexport const Avatar: Component<AvatarProps> = (props) => {\n const theme = useTheme()\n const { src, name, size = 40, style, ...rest } = props\n const base: Accessor<StyleInput> = () => ({\n width: size,\n height: size,\n borderRadius: size / 2,\n overflow: 'hidden',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme().color.surfaceVariant,\n })\n const content = src\n ? createElement(Image, {\n src,\n label: name ?? '',\n ...(name ? {} : { decorative: true }),\n style: { width: size, height: size },\n })\n : createElement(\n Text,\n {\n style: () => ({\n fontSize: Math.round(size * 0.4),\n fontWeight: fontWeight.semibold,\n color: theme().color.text,\n }),\n },\n name ? initialsOf(name) : '?',\n )\n return createElement(\n View,\n { ...rest, label: rest.label ?? name, style: mergeStyle(base, style) },\n content,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Chip\n// ---------------------------------------------------------------------------\n\n/** A compact, optionally-selectable token (filter/choice/input). */\nexport interface ChipProps extends Omit<BaseProps, 'style'> {\n readonly label: string\n readonly selected?: Reactive<boolean>\n readonly disabled?: boolean\n readonly onPress?: () => void\n readonly leading?: MindeesNode\n readonly trailing?: MindeesNode\n readonly style?: Reactive<StyleInput>\n}\nexport const Chip: Component<ChipProps> = (props) => {\n const theme = useTheme()\n const { label, selected = false, disabled, onPress, leading, trailing, style, ...rest } = props\n const isSelected = toAccessor(selected, false)\n const base: Accessor<StyleInput> = () => {\n const c = theme().color\n const on = isSelected()\n return {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n gap: space['2xs'],\n minHeight: 32,\n paddingTop: space['2xs'],\n paddingBottom: space['2xs'],\n paddingLeft: space.sm,\n paddingRight: space.sm,\n borderRadius: radiusScale.full,\n borderWidth: 1,\n borderColor: on ? c.primary : c.border,\n backgroundColor: on ? c.primary : 'transparent',\n opacity: disabled ? 0.5 : 1,\n }\n }\n const text = createElement(\n Text,\n {\n style: () => ({\n fontSize: 14,\n fontWeight: fontWeight.medium,\n color: isSelected() ? theme().color.onPrimary : theme().color.text,\n }),\n },\n label,\n )\n const inner: MindeesNode = [leading, text, trailing].filter((n) => n != null) as MindeesNode\n return createElement(\n Pressable,\n {\n ...rest,\n role: rest.role ?? 'button',\n // Reactive `aria-pressed` so a toggle chip announces its selected state as it changes.\n state: () => ({\n ...(typeof rest.state === 'function' ? rest.state() : (rest.state ?? {})),\n pressed: isSelected(),\n }),\n ...(onPress ? { onPress } : {}),\n ...(disabled ? { disabled: true } : {}),\n style: mergeStyle(base, style),\n },\n inner,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Switch\n// ---------------------------------------------------------------------------\n\n/** A binary on/off toggle (composed track + knob; flips instantly on press). */\nexport interface SwitchProps extends Omit<BaseProps, 'style'> {\n /** Controlled state (static or reactive). */\n readonly value: Reactive<boolean>\n readonly onValueChange?: (value: boolean) => void\n readonly disabled?: boolean\n readonly style?: Reactive<StyleInput>\n}\nexport const Switch: Component<SwitchProps> = (props) => {\n const theme = useTheme()\n const { value, onValueChange, disabled, style, ...rest } = props\n const isOn = toAccessor(value, false)\n const track: Accessor<StyleInput> = () => ({\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: isOn() ? 'flex-end' : 'flex-start',\n width: 52,\n height: 32,\n borderRadius: radiusScale.full,\n padding: 3,\n backgroundColor: isOn() ? theme().color.primary : theme().color.textMuted,\n opacity: disabled ? 0.5 : 1,\n })\n const knob = createElement(View, {\n style: () => ({\n width: 26,\n height: 26,\n borderRadius: 13,\n backgroundColor: theme().color.onPrimary,\n }),\n })\n const handlePress = onValueChange && !disabled ? () => onValueChange(!isOn()) : undefined\n return createElement(\n Pressable,\n {\n ...rest,\n role: rest.role ?? 'switch',\n // Reactive state → `aria-checked` tracks the toggle (a static object would bake it once).\n state: () => ({\n ...(typeof rest.state === 'function' ? rest.state() : (rest.state ?? {})),\n checked: isOn(),\n }),\n ...(disabled ? { disabled: true } : {}),\n ...(handlePress ? { onPress: handlePress } : {}),\n style: mergeStyle(track, style),\n },\n knob,\n )\n}\n\n// ---------------------------------------------------------------------------\n// SafeAreaView\n// ---------------------------------------------------------------------------\n\n/** A container that pads itself by the live safe-area insets (notch, home indicator, …). */\nexport interface SafeAreaViewProps extends BaseProps {\n readonly children?: MindeesNode\n /** Which edges to inset (default: all four). */\n readonly edges?: ReadonlyArray<'top' | 'right' | 'bottom' | 'left'>\n}\nexport const SafeAreaView: Component<SafeAreaViewProps> = (props) => {\n const insets = useSafeAreaInsets()\n const { edges, style, children, ...rest } = props\n const wants = (edge: 'top' | 'right' | 'bottom' | 'left'): boolean =>\n !edges || edges.includes(edge)\n const base: Accessor<StyleInput> = () => {\n const i = insets()\n return {\n paddingTop: wants('top') ? i.top : 0,\n paddingRight: wants('right') ? i.right : 0,\n paddingBottom: wants('bottom') ? i.bottom : 0,\n paddingLeft: wants('left') ? i.left : 0,\n }\n }\n return createElement(View, { ...rest, style: mergeStyle(base, style) }, children)\n}\n\n// ---------------------------------------------------------------------------\n// KeyboardAvoidingView\n// ---------------------------------------------------------------------------\n\n/** A container that pads its bottom by the live keyboard height so content stays visible. */\nexport interface KeyboardAvoidingViewProps extends BaseProps {\n readonly children?: MindeesNode\n}\nexport const KeyboardAvoidingView: Component<KeyboardAvoidingViewProps> = (props) => {\n const keyboard = useKeyboard()\n const { style, children, ...rest } = props\n const base: Accessor<StyleInput> = () => ({ paddingBottom: keyboard().height })\n return createElement(View, { ...rest, style: mergeStyle(base, style) }, children)\n}\n\n// ---------------------------------------------------------------------------\n// ProgressBar (determinate)\n// ---------------------------------------------------------------------------\n\n/** A determinate progress bar (track + reactive fill). */\nexport interface ProgressBarProps extends BaseProps {\n /** Progress 0..1 (static or reactive). Values outside the range are clamped. */\n readonly value?: Reactive<number>\n readonly trackColor?: string\n readonly color?: string\n readonly height?: number\n}\nexport const ProgressBar: Component<ProgressBarProps> = (props) => {\n const theme = useTheme()\n const { value = 0, trackColor, color, height = 6, style, ...rest } = props\n const progress = toAccessor(value, 0)\n const track: Accessor<StyleInput> = () => ({\n width: '100%',\n height,\n borderRadius: height / 2,\n overflow: 'hidden',\n backgroundColor: trackColor ?? theme().color.surfaceVariant,\n })\n const fill: Accessor<StyleInput> = () => ({\n height,\n borderRadius: height / 2,\n backgroundColor: color ?? theme().color.primary,\n width: `${Math.max(0, Math.min(1, progress())) * 100}%`,\n })\n return createElement(\n View,\n {\n ...rest,\n role: rest.role ?? 'progressbar',\n // A progressbar with no value is inaccessible — emit a reactive aria-valuenow (0..1 range).\n valueMin: 0,\n valueMax: 1,\n valueNow: () => Math.max(0, Math.min(1, progress())),\n style: mergeStyle(track, style),\n },\n createElement(View, { style: fill }),\n )\n}\n\n// ---------------------------------------------------------------------------\n// ActivityIndicator\n// ---------------------------------------------------------------------------\n\n/**\n * A spinning loading indicator. Emits the `activityindicator` host tag, which each backend\n * renders natively: web → a CSS keyframe spinner (size from `width`/`height`, arc from `color`),\n * Android → an indeterminate `ProgressBar`. Size/color flow through ordinary style keys.\n */\nexport interface ActivityIndicatorProps extends BaseProps {\n /** Diameter in px (default 24). */\n readonly size?: number\n /** Spinner color (defaults to the theme primary). */\n readonly color?: string\n /** When false, renders nothing (so callers can gate it without a conditional). */\n readonly animating?: boolean\n}\nexport const ActivityIndicator: Component<ActivityIndicatorProps> = (props) => {\n const theme = useTheme()\n const { size = 24, color, animating = true, style, ...rest } = props\n if (animating === false) return null\n const base: Accessor<StyleInput> = () => ({\n width: size,\n height: size,\n color: color ?? theme().color.primary,\n })\n const host = toHostProps({ ...rest, style: mergeStyle(base, style) })\n if (!host.role) host.role = 'status'\n host['aria-busy'] = 'true'\n return createElement('activityindicator', host)\n}\n\n// ---------------------------------------------------------------------------\n// Checkbox\n// ---------------------------------------------------------------------------\n\n/** Props for {@link Checkbox}. (`label` is omitted from a11y to repurpose it as the visible label.) */\nexport interface CheckboxProps extends Omit<BaseProps, 'style' | 'label'> {\n /** Controlled checked state (static or reactive). */\n readonly value: Reactive<boolean>\n readonly onValueChange?: (value: boolean) => void\n readonly disabled?: boolean\n /** Optional visible label rendered beside the box (a string becomes a `Text`). */\n readonly label?: MindeesNode\n readonly style?: Reactive<StyleInput>\n}\n\n/** An accessible checkbox (RN ships none built-in). Toggles `value`; `aria-checked` tracks it. */\nexport const Checkbox: Component<CheckboxProps> = (props) => {\n const theme = useTheme()\n const { value, onValueChange, disabled, label, style, ...rest } = props\n const isOn = toAccessor(value, false)\n const box: Accessor<StyleInput> = () => ({\n width: 22,\n height: 22,\n borderRadius: radiusScale.sm,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n borderColor: isOn() ? theme().color.primary : theme().color.textMuted,\n backgroundColor: isOn() ? theme().color.primary : 'transparent',\n opacity: disabled ? 0.5 : 1,\n })\n const check = createElement(\n Text,\n {\n style: () => ({ color: theme().color.onPrimary, fontSize: 14, fontWeight: fontWeight.bold }),\n },\n () => (isOn() ? '✓' : ''),\n )\n const handlePress = onValueChange && !disabled ? () => onValueChange(!isOn()) : undefined\n const boxEl = createElement(\n Pressable,\n {\n ...rest,\n role: rest.role ?? 'checkbox',\n state: () => ({\n ...(typeof rest.state === 'function' ? rest.state() : (rest.state ?? {})),\n checked: isOn(),\n }),\n ...(disabled ? { disabled: true } : {}),\n ...(handlePress ? { onPress: handlePress } : {}),\n style: mergeStyle(box, style),\n },\n check,\n )\n if (label === undefined) return boxEl\n return createElement(\n View,\n { style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: space.sm } },\n boxEl,\n typeof label === 'string' ? createElement(Text, {}, label) : label,\n )\n}\n\n// ---------------------------------------------------------------------------\n// RadioGroup\n// ---------------------------------------------------------------------------\n\n/** One option in a {@link RadioGroup}. */\nexport interface RadioOption {\n readonly value: string\n readonly label: MindeesNode\n}\n\n/** Props for {@link RadioGroup}. */\nexport interface RadioGroupProps extends Omit<BaseProps, 'style'> {\n /** Controlled selected value (static or reactive). */\n readonly value: Reactive<string>\n readonly options: readonly RadioOption[]\n readonly onValueChange?: (value: string) => void\n readonly disabled?: boolean\n readonly style?: Reactive<StyleInput>\n}\n\n/** A single-select radio group (RN ships none built-in). Each row is `role=\"radio\"`. */\nexport const RadioGroup: Component<RadioGroupProps> = (props) => {\n const theme = useTheme()\n const { value, options, onValueChange, disabled, style, ...rest } = props\n const selected = toAccessor(value, '')\n const rows = options.map((option) => {\n const checked = (): boolean => selected() === option.value\n const dot = createElement(View, {\n style: () => ({\n width: 12,\n height: 12,\n borderRadius: radiusScale.full,\n backgroundColor: checked() ? theme().color.primary : 'transparent',\n }),\n })\n const ring = createElement(\n View,\n {\n style: () => ({\n width: 22,\n height: 22,\n borderRadius: radiusScale.full,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n borderColor: checked() ? theme().color.primary : theme().color.textMuted,\n }),\n },\n dot,\n )\n const handlePress = onValueChange && !disabled ? () => onValueChange(option.value) : undefined\n return createElement(\n Pressable,\n {\n role: 'radio',\n state: () => ({ checked: checked() }),\n ...(disabled ? { disabled: true } : {}),\n ...(handlePress ? { onPress: handlePress } : {}),\n style: { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: space.sm },\n },\n ring,\n typeof option.label === 'string' ? createElement(Text, {}, option.label) : option.label,\n )\n })\n return createElement(\n View,\n {\n ...toHostProps({ ...rest, style }),\n role: rest.role ?? 'radiogroup',\n style: mergeStyle({ display: 'flex', flexDirection: 'column', gap: space.sm }, style),\n },\n ...rows,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Skeleton\n// ---------------------------------------------------------------------------\n\n/** Props for {@link Skeleton}. */\nexport interface SkeletonProps extends Omit<BaseProps, 'style'> {\n readonly width?: number | string\n readonly height?: number | string\n readonly radius?: number\n readonly style?: Reactive<StyleInput>\n}\n\n/** A muted loading placeholder block (RN ships none built-in). */\nexport const Skeleton: Component<SkeletonProps> = (props) => {\n const theme = useTheme()\n const { width = '100%', height = 16, radius = radiusScale.sm, style, ...rest } = props\n const base: Accessor<StyleInput> = () => ({\n width,\n height,\n borderRadius: radius,\n backgroundColor: theme().color.surfaceVariant,\n })\n const host = toHostProps({ ...rest, style: mergeStyle(base, style) })\n if (!host.role) host.role = 'status'\n host['aria-busy'] = 'true'\n return createElement('view', host)\n}\n\n// ---------------------------------------------------------------------------\n// Tabs\n// ---------------------------------------------------------------------------\n\n/** One tab: a value, a header label, and its panel content. */\nexport interface TabItem {\n readonly value: string\n readonly label: MindeesNode\n readonly content: MindeesNode\n}\n\n/** Props for {@link Tabs}. */\nexport interface TabsProps extends Omit<BaseProps, 'style'> {\n /** Controlled selected tab value (static or reactive). */\n readonly value: Reactive<string>\n readonly tabs: readonly TabItem[]\n readonly onValueChange?: (value: string) => void\n readonly style?: Reactive<StyleInput>\n}\n\n/** An accessible tab strip + panel (RN ships none built-in). Only the active panel region re-renders. */\nexport const Tabs: Component<TabsProps> = (props) => {\n const theme = useTheme()\n const { value, tabs, onValueChange, style, ...rest } = props\n const selected = toAccessor(value, tabs[0]?.value ?? '')\n const tabBar = createElement(\n View,\n {\n role: 'tablist',\n style: () => ({\n display: 'flex',\n flexDirection: 'row',\n gap: space.xs,\n borderBottomWidth: 1,\n borderColor: theme().color.border,\n }),\n },\n ...tabs.map((t) => {\n const active = (): boolean => selected() === t.value\n return createElement(\n Pressable,\n {\n role: 'tab',\n state: () => ({ selected: active() }),\n ...(onValueChange ? { onPress: () => onValueChange(t.value) } : {}),\n style: () => ({\n paddingTop: space.xs,\n paddingBottom: space.xs,\n paddingLeft: space.sm,\n paddingRight: space.sm,\n borderBottomWidth: 2,\n borderColor: active() ? theme().color.primary : 'transparent',\n }),\n },\n typeof t.label === 'string'\n ? createElement(\n Text,\n {\n style: () => ({\n color: active() ? theme().color.primary : theme().color.text,\n ...(active() ? { fontWeight: fontWeight.semibold } : {}),\n }),\n },\n t.label,\n )\n : t.label,\n )\n }),\n )\n // The active panel is a reactive region: switching tabs re-runs ONLY this region.\n const panel = createElement(View, { role: 'tabpanel', style: { padding: space.md } }, () => {\n const active = tabs.find((t) => t.value === selected())\n return active ? active.content : null\n })\n return createElement(\n View,\n {\n ...toHostProps({ ...rest, style }),\n style: mergeStyle({ display: 'flex', flexDirection: 'column' }, style),\n },\n tabBar,\n panel,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Accordion\n// ---------------------------------------------------------------------------\n\n/** One collapsible accordion section. */\nexport interface AccordionSection {\n readonly id: string\n readonly header: MindeesNode\n readonly content: MindeesNode\n}\n\n/** Props for {@link Accordion}. */\nexport interface AccordionProps extends Omit<BaseProps, 'style'> {\n readonly sections: readonly AccordionSection[]\n /** Allow more than one section open at once (default: single-open). */\n readonly multiple?: boolean\n /** Section ids open on first render. */\n readonly defaultOpen?: readonly string[]\n readonly style?: Reactive<StyleInput>\n}\n\n/** Collapsible sections (RN ships none built-in). Each header is `aria-expanded`; panels mount lazily. */\nexport const Accordion: Component<AccordionProps> = (props) => {\n const theme = useTheme()\n const { sections, multiple, defaultOpen = [], style, ...rest } = props\n // Honor single-open mode from the FIRST frame: in single-open mode keep at most one default-open id\n // (the toggle handler already enforces it thereafter, but the initial seed bypassed it).\n const open = signal<ReadonlySet<string>>(\n new Set(multiple ? defaultOpen : defaultOpen.slice(0, 1)),\n )\n const isOpen = (id: string): boolean => open().has(id)\n const toggle = (id: string): void => {\n const next = new Set(untrack(open))\n if (next.has(id)) next.delete(id)\n else {\n if (!multiple) next.clear()\n next.add(id)\n }\n open.set(next)\n }\n const rows = sections.map((section) => {\n const header = createElement(\n Pressable,\n {\n role: 'button',\n state: () => ({ expanded: isOpen(section.id) }),\n onPress: () => toggle(section.id),\n style: () => ({\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingTop: space.sm,\n paddingBottom: space.sm,\n borderBottomWidth: 1,\n borderColor: theme().color.border,\n }),\n },\n typeof section.header === 'string' ? createElement(Text, {}, section.header) : section.header,\n createElement(Text, { style: () => ({ color: theme().color.textMuted }) }, () =>\n isOpen(section.id) ? '▾' : '▸',\n ),\n )\n // The panel region re-runs only when THIS section toggles.\n const panel = createElement(View, { style: { padding: space.sm } }, () =>\n isOpen(section.id) ? section.content : null,\n )\n return createElement(View, {}, header, panel)\n })\n return createElement(\n View,\n {\n ...toHostProps({ ...rest, style }),\n style: mergeStyle({ display: 'flex', flexDirection: 'column' }, style),\n },\n ...rows,\n )\n}\n\n// ---------------------------------------------------------------------------\n// Stepper\n// ---------------------------------------------------------------------------\n\n/** Props for {@link Stepper}. */\nexport interface StepperProps extends Omit<BaseProps, 'style'> {\n /** Controlled numeric value (static or reactive). */\n readonly value: Reactive<number>\n readonly min?: number\n readonly max?: number\n /** Increment/decrement amount (default 1). */\n readonly step?: number\n readonly onValueChange?: (value: number) => void\n readonly disabled?: boolean\n readonly style?: Reactive<StyleInput>\n}\n\n/** A −/+ number stepper (RN ships none built-in). Flex-only, so it renders on web + native alike. */\nexport const Stepper: Component<StepperProps> = (props) => {\n const theme = useTheme()\n const {\n value,\n min = Number.NEGATIVE_INFINITY,\n max = Number.POSITIVE_INFINITY,\n step = 1,\n onValueChange,\n disabled,\n style,\n ...rest\n } = props\n const current = toAccessor(value, 0)\n const clamp = (v: number): number => Math.min(max, Math.max(min, v))\n const button = (label: string, delta: number, enabled: () => boolean) =>\n createElement(\n Pressable,\n {\n role: 'button',\n state: () => ({ disabled: disabled === true || !enabled() }),\n ...(disabled\n ? {}\n : { onPress: () => enabled() && onValueChange?.(clamp(current() + delta)) }),\n style: () => ({\n width: 36,\n height: 36,\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 1,\n borderColor: theme().color.border,\n borderRadius: radiusScale.md,\n }),\n },\n createElement(\n Text,\n {\n style: () => ({\n fontSize: 20,\n color: enabled() && disabled !== true ? theme().color.text : theme().color.textMuted,\n }),\n },\n label,\n ),\n )\n return createElement(\n View,\n {\n ...toHostProps({ ...rest, style }),\n role: rest.role ?? 'group',\n style: mergeStyle(\n { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: space.sm },\n style,\n ),\n },\n button('−', -step, () => current() > min), // minus\n createElement(\n Text,\n { style: () => ({ minWidth: 32, textAlign: 'center', color: theme().color.text }) },\n () => String(current()),\n ),\n button('+', step, () => current() < max),\n )\n}\n\n// ---------------------------------------------------------------------------\n// SegmentedControl\n// ---------------------------------------------------------------------------\n\n/** One segment: a value + a label. */\nexport interface Segment {\n readonly value: string\n readonly label: MindeesNode\n}\n\n/** Props for {@link SegmentedControl}. */\nexport interface SegmentedControlProps extends Omit<BaseProps, 'style'> {\n readonly value: Reactive<string>\n readonly segments: readonly Segment[]\n readonly onValueChange?: (value: string) => void\n readonly disabled?: boolean\n readonly style?: Reactive<StyleInput>\n}\n\n/** A compact connected single-select (iOS-style segmented control). Flex-only → web + native. */\nexport const SegmentedControl: Component<SegmentedControlProps> = (props) => {\n const theme = useTheme()\n const { value, segments, onValueChange, disabled, style, ...rest } = props\n const selected = toAccessor(value, segments[0]?.value ?? '')\n return createElement(\n View,\n {\n ...toHostProps({ ...rest, style }),\n role: rest.role ?? 'radiogroup',\n style: mergeStyle(\n () => ({\n display: 'flex',\n flexDirection: 'row',\n borderWidth: 1,\n borderColor: theme().color.border,\n borderRadius: radiusScale.md,\n overflow: 'hidden',\n }),\n style,\n ),\n },\n ...segments.map((seg) => {\n const active = (): boolean => selected() === seg.value\n return createElement(\n Pressable,\n {\n role: 'radio',\n state: () => ({ selected: active(), disabled }),\n ...(disabled ? {} : { onPress: () => onValueChange?.(seg.value) }),\n style: () => ({\n paddingTop: space.xs,\n paddingBottom: space.xs,\n paddingLeft: space.md,\n paddingRight: space.md,\n backgroundColor: active() ? theme().color.primary : 'transparent',\n }),\n },\n typeof seg.label === 'string'\n ? createElement(\n Text,\n {\n style: () => ({\n color: active() ? theme().color.onTone : theme().color.text,\n ...(active() ? { fontWeight: fontWeight.semibold } : {}),\n }),\n },\n seg.label,\n )\n : seg.label,\n )\n }),\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2BA,SAAS,WACP,MACA,OACsB;CACtB,MAAM,SAAS,OAAO,SAAS,aAAc,OAAgC;CAC7E,MAAM,UAAU,OAAO,UAAU,aAAc,QAAiC;CAChF,IAAI,UAAU,SAAS;EAErB,MAAM,UAAU;EAChB,MAAM,WAAW;EACjB,aAAa,aAAa,CAAC,SAAS,OAAO,IAAI,SAAS,UAA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GAAI,WAAW,CAAC,IAAI,EAAE,eAAe,gBAAgB,IAAI,KAAK,EAAE;GAChE,cAAc;IACZ,YAAY,MAAM;IAClB,eAAe,MAAM;IACrB,aAAa,MAAM;IACnB,cAAc,MAAM;IACpB,iBAAiB,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU;GACtD;EACF,GACA,OAAO,IAAI,UAAU,WACjB,cACE,MACA,EACE,cAAc;GACZ,OAAO,OAAO,IAAI,MAAM,EAAE,MAAM,SAAS,MAAM,EAAE,MAAM;GACvD,GAAI,OAAO,IAAI,EAAE,YAAY,WAAW,SAAS,IAAI,CAAC;EACxD,GACF,GACA,IAAI,KACN,IACA,IAAI,KACV;CACF,CAAC,CACH;AACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ import { Maturity, NotImplementedError, PackageInfo, notImplemented } from "@min
|
|
|
18
18
|
/** The npm package name. */
|
|
19
19
|
declare const name = "@mindees/atlas";
|
|
20
20
|
/** The package version. All `@mindees/*` packages share one locked version line. */
|
|
21
|
-
declare const VERSION = "0.22.
|
|
21
|
+
declare const VERSION = "0.22.3";
|
|
22
22
|
/** Current maturity of this package. See the repository `STATUS.md`. */
|
|
23
23
|
declare const maturity: Maturity;
|
|
24
24
|
/**
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { NotImplementedError, notImplemented } from "@mindees/core";
|
|
|
17
17
|
/** The npm package name. */
|
|
18
18
|
const name = "@mindees/atlas";
|
|
19
19
|
/** The package version. All `@mindees/*` packages share one locked version line. */
|
|
20
|
-
const VERSION = "0.22.
|
|
20
|
+
const VERSION = "0.22.3";
|
|
21
21
|
/** Current maturity of this package. See the repository `STATUS.md`. */
|
|
22
22
|
const maturity = "experimental";
|
|
23
23
|
/**
|
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.22.
|
|
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.22.3'\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 { Show, type ShowProps } from './show'\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.22.
|
|
3
|
+
"version": "0.22.3",
|
|
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.22.
|
|
43
|
-
"@mindees/router": "0.22.
|
|
42
|
+
"@mindees/core": "0.22.3",
|
|
43
|
+
"@mindees/router": "0.22.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"happy-dom": "20.9.0",
|
|
47
|
-
"@mindees/renderer": "0.22.
|
|
47
|
+
"@mindees/renderer": "0.22.3"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsdown",
|