@thelacanians/vue-native-runtime 0.4.14 → 0.6.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.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _vue_runtime_core from '@vue/runtime-core';
2
- import { PropType, Directive, App, Component } from '@vue/runtime-core';
2
+ import { PropType, VNode, Ref, Component, Directive, ComputedRef, App } from '@vue/runtime-core';
3
3
  export * from '@vue/runtime-core';
4
4
  import * as _vue_reactivity from '@vue/reactivity';
5
5
 
@@ -13,7 +13,7 @@ interface NativeNode {
13
13
  text?: string;
14
14
  }
15
15
  /**
16
- * Reset the node ID counter. Used for testing and hot reload teardown.
16
+ * Reset the node ID counter and active ID set. Used for testing and hot reload teardown.
17
17
  */
18
18
  declare function resetNodeId(): void;
19
19
  /**
@@ -151,8 +151,8 @@ interface ViewStyle {
151
151
  accessibilityLabel?: string;
152
152
  accessibilityRole?: string;
153
153
  accessibilityHint?: string;
154
- accessibilityState?: Record<string, any>;
155
- accessibilityValue?: Record<string, any>;
154
+ accessibilityState?: Record<string, unknown>;
155
+ accessibilityValue?: Record<string, unknown>;
156
156
  accessible?: boolean;
157
157
  importantForAccessibility?: ImportantForAccessibility;
158
158
  }
@@ -194,12 +194,12 @@ declare const validStyleProperties: ReadonlySet<string>;
194
194
  * Can be a ViewStyle, TextStyle, or ImageStyle from the typed interfaces,
195
195
  * or a plain record for backwards compatibility.
196
196
  */
197
- type StyleProp = Record<string, any>;
197
+ type StyleProp = Record<string, unknown>;
198
198
  /**
199
199
  * The result type of createStyleSheet — keys are the same as the input,
200
200
  * values are frozen style objects.
201
201
  */
202
- type StyleSheet<T extends Record<string, StyleProp>> = Readonly<{
202
+ type StyleSheet<T extends Record<string, object>> = Readonly<{
203
203
  [K in keyof T]: Readonly<T[K]>;
204
204
  }>;
205
205
 
@@ -231,7 +231,7 @@ type AnyStyle = ViewStyle | TextStyle | ImageStyle;
231
231
  * })
232
232
  * ```
233
233
  */
234
- declare function createStyleSheet<T extends Record<string, StyleProp>>(styles: T): StyleSheet<T>;
234
+ declare function createStyleSheet<T extends Record<string, object>>(styles: T): StyleSheet<T>;
235
235
 
236
236
  /**
237
237
  * TypeScript prop interfaces for Vue Native components.
@@ -245,7 +245,7 @@ interface AccessibilityProps {
245
245
  accessibilityLabel?: string;
246
246
  accessibilityRole?: string;
247
247
  accessibilityHint?: string;
248
- accessibilityState?: Record<string, any>;
248
+ accessibilityState?: Record<string, unknown>;
249
249
  }
250
250
  interface VViewProps extends AccessibilityProps {
251
251
  style?: ViewStyle;
@@ -314,9 +314,9 @@ interface VSliderProps extends AccessibilityProps {
314
314
  max?: number;
315
315
  style?: ViewStyle;
316
316
  }
317
- interface VListProps {
318
- data: any[];
319
- keyExtractor?: (item: any, index: number) => string;
317
+ interface VListProps<T = unknown> {
318
+ data: T[];
319
+ keyExtractor?: (item: T, index: number) => string;
320
320
  estimatedItemHeight?: number;
321
321
  showsScrollIndicator?: boolean;
322
322
  bounces?: boolean;
@@ -451,18 +451,59 @@ interface VVideoProps extends AccessibilityProps {
451
451
  style?: ViewStyle;
452
452
  testID?: string;
453
453
  }
454
- interface VSectionListProps {
455
- sections: Array<{
456
- title: string;
457
- data: any[];
458
- }>;
459
- keyExtractor?: (item: any, index: number) => string;
454
+ interface VSectionListSection<T = unknown> {
455
+ title: string;
456
+ data: T[];
457
+ }
458
+ interface VSectionListProps<T = unknown> {
459
+ sections: VSectionListSection<T>[];
460
+ keyExtractor?: (item: T, index: number) => string;
460
461
  estimatedItemHeight?: number;
461
462
  stickySectionHeaders?: boolean;
462
463
  showsScrollIndicator?: boolean;
463
464
  bounces?: boolean;
464
465
  style?: ViewStyle;
465
466
  }
467
+ interface VFlatListProps<T = unknown, TRendered = unknown> {
468
+ data: T[];
469
+ renderItem?: (info: {
470
+ item: T;
471
+ index: number;
472
+ }) => TRendered;
473
+ keyExtractor?: (item: T, index: number) => string | number;
474
+ itemHeight: number;
475
+ windowSize?: number;
476
+ style?: ViewStyle;
477
+ showsScrollIndicator?: boolean;
478
+ bounces?: boolean;
479
+ headerHeight?: number;
480
+ endReachedThreshold?: number;
481
+ }
482
+ interface VTabBarProps {
483
+ tabs: Array<{
484
+ id: string;
485
+ label: string;
486
+ icon?: string;
487
+ badge?: number | string;
488
+ }>;
489
+ activeTab: string;
490
+ position?: 'top' | 'bottom';
491
+ }
492
+ interface VDrawerProps {
493
+ open?: boolean;
494
+ position?: 'left' | 'right';
495
+ width?: number;
496
+ closeOnPress?: boolean;
497
+ }
498
+ interface VDrawerItemProps extends AccessibilityProps {
499
+ icon?: string;
500
+ label: string;
501
+ badge?: number | string | null;
502
+ disabled?: boolean;
503
+ }
504
+ interface VDrawerSectionProps {
505
+ title?: string;
506
+ }
466
507
 
467
508
  /**
468
509
  * VView — the fundamental container component in Vue Native.
@@ -976,10 +1017,10 @@ declare const VImage: _vue_runtime_core.DefineComponent<_vue_runtime_core.Extrac
976
1017
  accessibilityHint: StringConstructor;
977
1018
  accessibilityState: ObjectConstructor;
978
1019
  }>> & Readonly<{
979
- onLoad?: ((...args: any[]) => any) | undefined;
980
1020
  onError?: ((...args: any[]) => any) | undefined;
1021
+ onLoad?: ((...args: any[]) => any) | undefined;
981
1022
  }>, {
982
- resizeMode: "cover" | "contain" | "stretch" | "center";
1023
+ resizeMode: "center" | "stretch" | "cover" | "contain";
983
1024
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
984
1025
 
985
1026
  /**
@@ -1099,13 +1140,13 @@ declare const VSlider: _vue_runtime_core.DefineComponent<_vue_runtime_core.Extra
1099
1140
  declare const VList: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
1100
1141
  /** Array of data items to render */
1101
1142
  data: {
1102
- type: () => any[];
1143
+ type: PropType<unknown[]>;
1103
1144
  required: true;
1104
1145
  };
1105
1146
  /** Extract a unique key from each item. Defaults to index as string. */
1106
1147
  keyExtractor: {
1107
- type: () => (item: any, index: number) => string;
1108
- default: (_item: any, index: number) => string;
1148
+ type: PropType<(item: unknown, index: number) => string>;
1149
+ default: (_item: unknown, index: number) => string;
1109
1150
  };
1110
1151
  /** Estimated height per row in points. Used before layout runs. Default: 44 */
1111
1152
  estimatedItemHeight: {
@@ -1131,18 +1172,18 @@ declare const VList: _vue_runtime_core.DefineComponent<_vue_runtime_core.Extract
1131
1172
  type: PropType<ViewStyle>;
1132
1173
  default: () => {};
1133
1174
  };
1134
- }>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
1175
+ }>, () => VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
1135
1176
  [key: string]: any;
1136
1177
  }>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("scroll" | "endReached")[], "scroll" | "endReached", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
1137
1178
  /** Array of data items to render */
1138
1179
  data: {
1139
- type: () => any[];
1180
+ type: PropType<unknown[]>;
1140
1181
  required: true;
1141
1182
  };
1142
1183
  /** Extract a unique key from each item. Defaults to index as string. */
1143
1184
  keyExtractor: {
1144
- type: () => (item: any, index: number) => string;
1145
- default: (_item: any, index: number) => string;
1185
+ type: PropType<(item: unknown, index: number) => string>;
1186
+ default: (_item: unknown, index: number) => string;
1146
1187
  };
1147
1188
  /** Estimated height per row in points. Used before layout runs. Default: 44 */
1148
1189
  estimatedItemHeight: {
@@ -1175,7 +1216,7 @@ declare const VList: _vue_runtime_core.DefineComponent<_vue_runtime_core.Extract
1175
1216
  style: ViewStyle;
1176
1217
  horizontal: boolean;
1177
1218
  bounces: boolean;
1178
- keyExtractor: (item: any, index: number) => string;
1219
+ keyExtractor: (item: unknown, index: number) => string;
1179
1220
  estimatedItemHeight: number;
1180
1221
  showsScrollIndicator: boolean;
1181
1222
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
@@ -1260,7 +1301,7 @@ declare const VAlertDialog: _vue_runtime_core.DefineComponent<_vue_runtime_core.
1260
1301
  };
1261
1302
  }>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
1262
1303
  [key: string]: any;
1263
- }>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("confirm" | "cancel" | "action")[], "confirm" | "cancel" | "action", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
1304
+ }>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("cancel" | "confirm" | "action")[], "cancel" | "confirm" | "action", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
1264
1305
  visible: {
1265
1306
  type: BooleanConstructor;
1266
1307
  default: boolean;
@@ -1286,12 +1327,12 @@ declare const VAlertDialog: _vue_runtime_core.DefineComponent<_vue_runtime_core.
1286
1327
  default: string;
1287
1328
  };
1288
1329
  }>> & Readonly<{
1289
- onConfirm?: ((...args: any[]) => any) | undefined;
1290
1330
  onCancel?: ((...args: any[]) => any) | undefined;
1331
+ onConfirm?: ((...args: any[]) => any) | undefined;
1291
1332
  onAction?: ((...args: any[]) => any) | undefined;
1292
1333
  }>, {
1293
- visible: boolean;
1294
1334
  title: string;
1335
+ visible: boolean;
1295
1336
  message: string;
1296
1337
  buttons: AlertButton[];
1297
1338
  confirmText: string;
@@ -1334,8 +1375,8 @@ declare const VStatusBar: _vue_runtime_core.DefineComponent<_vue_runtime_core.Ex
1334
1375
  default: boolean;
1335
1376
  };
1336
1377
  }>> & Readonly<{}>, {
1337
- barStyle: StatusBarStyle;
1338
1378
  hidden: boolean;
1379
+ barStyle: StatusBarStyle;
1339
1380
  animated: boolean;
1340
1381
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
1341
1382
 
@@ -1381,8 +1422,8 @@ declare const VWebView: _vue_runtime_core.DefineComponent<_vue_runtime_core.Extr
1381
1422
  default: boolean;
1382
1423
  };
1383
1424
  }>> & Readonly<{
1384
- onLoad?: ((...args: any[]) => any) | undefined;
1385
1425
  onError?: ((...args: any[]) => any) | undefined;
1426
+ onLoad?: ((...args: any[]) => any) | undefined;
1386
1427
  onMessage?: ((...args: any[]) => any) | undefined;
1387
1428
  }>, {
1388
1429
  style: ViewStyle;
@@ -1574,8 +1615,8 @@ declare const VSegmentedControl: _vue_runtime_core.DefineComponent<_vue_runtime_
1574
1615
  onChange?: ((...args: any[]) => any) | undefined;
1575
1616
  }>, {
1576
1617
  style: ViewStyle;
1577
- selectedIndex: number;
1578
1618
  tintColor: string;
1619
+ selectedIndex: number;
1579
1620
  enabled: boolean;
1580
1621
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
1581
1622
 
@@ -1639,8 +1680,8 @@ declare const VActionSheet: _vue_runtime_core.DefineComponent<_vue_runtime_core.
1639
1680
  onCancel?: ((...args: any[]) => any) | undefined;
1640
1681
  onAction?: ((...args: any[]) => any) | undefined;
1641
1682
  }>, {
1642
- visible: boolean;
1643
1683
  title: string;
1684
+ visible: boolean;
1644
1685
  message: string;
1645
1686
  actions: ActionSheetAction[];
1646
1687
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
@@ -1784,18 +1825,18 @@ declare const VPressable: _vue_runtime_core.DefineComponent<_vue_runtime_core.Ex
1784
1825
  */
1785
1826
  interface Section {
1786
1827
  title: string;
1787
- data: any[];
1828
+ data: unknown[];
1788
1829
  }
1789
1830
  declare const VSectionList: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
1790
1831
  /** Array of section objects, each with a title and data array */
1791
1832
  sections: {
1792
- type: () => Section[];
1833
+ type: PropType<Section[]>;
1793
1834
  required: true;
1794
1835
  };
1795
1836
  /** Extract a unique key from each item. Defaults to index as string. */
1796
1837
  keyExtractor: {
1797
- type: () => (item: any, index: number) => string;
1798
- default: (_item: any, index: number) => string;
1838
+ type: PropType<(item: unknown, index: number) => string>;
1839
+ default: (_item: unknown, index: number) => string;
1799
1840
  };
1800
1841
  /** Estimated height per row in points. Default: 44 */
1801
1842
  estimatedItemHeight: {
@@ -1821,18 +1862,18 @@ declare const VSectionList: _vue_runtime_core.DefineComponent<_vue_runtime_core.
1821
1862
  type: ObjectConstructor;
1822
1863
  default: () => {};
1823
1864
  };
1824
- }>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
1865
+ }>, () => VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
1825
1866
  [key: string]: any;
1826
1867
  }>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("scroll" | "endReached")[], "scroll" | "endReached", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
1827
1868
  /** Array of section objects, each with a title and data array */
1828
1869
  sections: {
1829
- type: () => Section[];
1870
+ type: PropType<Section[]>;
1830
1871
  required: true;
1831
1872
  };
1832
1873
  /** Extract a unique key from each item. Defaults to index as string. */
1833
1874
  keyExtractor: {
1834
- type: () => (item: any, index: number) => string;
1835
- default: (_item: any, index: number) => string;
1875
+ type: PropType<(item: unknown, index: number) => string>;
1876
+ default: (_item: unknown, index: number) => string;
1836
1877
  };
1837
1878
  /** Estimated height per row in points. Default: 44 */
1838
1879
  estimatedItemHeight: {
@@ -1864,7 +1905,7 @@ declare const VSectionList: _vue_runtime_core.DefineComponent<_vue_runtime_core.
1864
1905
  }>, {
1865
1906
  style: Record<string, any>;
1866
1907
  bounces: boolean;
1867
- keyExtractor: (item: any, index: number) => string;
1908
+ keyExtractor: (item: unknown, index: number) => string;
1868
1909
  estimatedItemHeight: number;
1869
1910
  showsScrollIndicator: boolean;
1870
1911
  stickySectionHeaders: boolean;
@@ -1923,9 +1964,9 @@ declare const VCheckbox: _vue_runtime_core.DefineComponent<_vue_runtime_core.Ext
1923
1964
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
1924
1965
  onChange?: ((...args: any[]) => any) | undefined;
1925
1966
  }>, {
1967
+ label: string;
1926
1968
  disabled: boolean;
1927
1969
  modelValue: boolean;
1928
- label: string;
1929
1970
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
1930
1971
 
1931
1972
  interface RadioOption {
@@ -2168,7 +2209,7 @@ declare const VVideo: _vue_runtime_core.DefineComponent<_vue_runtime_core.Extrac
2168
2209
  onPause?: ((...args: any[]) => any) | undefined;
2169
2210
  onEnd?: ((...args: any[]) => any) | undefined;
2170
2211
  }>, {
2171
- resizeMode: "cover" | "contain" | "stretch" | "center";
2212
+ resizeMode: "center" | "stretch" | "cover" | "contain";
2172
2213
  autoplay: boolean;
2173
2214
  loop: boolean;
2174
2215
  muted: boolean;
@@ -2177,130 +2218,398 @@ declare const VVideo: _vue_runtime_core.DefineComponent<_vue_runtime_core.Extrac
2177
2218
  volume: number;
2178
2219
  }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
2179
2220
 
2180
- declare const ErrorBoundary: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
2181
- onError: PropType<(error: Error, info: string) => void>;
2182
- resetKeys: {
2183
- type: PropType<any[]>;
2184
- default: () => never[];
2185
- };
2186
- }>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
2187
- [key: string]: any;
2188
- }>[] | undefined, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
2189
- onError: PropType<(error: Error, info: string) => void>;
2190
- resetKeys: {
2191
- type: PropType<any[]>;
2192
- default: () => never[];
2193
- };
2194
- }>> & Readonly<{}>, {
2195
- resetKeys: any[];
2196
- }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
2197
-
2198
2221
  /**
2199
- * v-show directive for Vue Native.
2200
- * Maps to the 'hidden' prop on native views (view.isHidden in Swift).
2222
+ * Information provided to the renderItem function.
2201
2223
  */
2202
- declare const vShow: Directive<NativeNode>;
2203
-
2224
+ interface FlatListRenderItemInfo<T = unknown> {
2225
+ item: T;
2226
+ index: number;
2227
+ }
2228
+ declare function getDefaultItemKey(item: unknown, index: number): string | number;
2204
2229
  /**
2205
- * Haptic feedback composable.
2230
+ * VFlatList A high-performance virtualized list for large datasets.
2206
2231
  *
2207
- * Wraps the native Haptics module to provide tactile feedback.
2232
+ * Unlike VList (which renders all items), VFlatList only creates native views
2233
+ * for items currently visible on screen plus a configurable buffer. This reduces
2234
+ * memory usage from O(n) to O(visible) — critical for lists with 1000+ items.
2235
+ *
2236
+ * Uses VScrollView internally with absolutely-positioned items in a tall
2237
+ * content container. The scroll position drives which items are mounted.
2208
2238
  *
2209
2239
  * @example
2210
- * ```ts
2211
- * const { vibrate, selectionChanged } = useHaptics()
2212
- * vibrate('medium')
2213
- * ```
2214
- */
2215
- declare function useHaptics(): {
2216
- vibrate: (style?: "light" | "medium" | "heavy" | "rigid" | "soft") => Promise<void>;
2217
- notificationFeedback: (type?: "success" | "warning" | "error") => Promise<void>;
2218
- selectionChanged: () => Promise<void>;
2219
- };
2220
-
2221
- /**
2222
- * Async key-value storage composable backed by UserDefaults.
2240
+ * ```vue
2241
+ * <script setup>
2242
+ * import { VFlatList } from '@thelacanians/vue-native-runtime'
2223
2243
  *
2224
- * All operations are Promise-based and run on a background thread.
2225
- * Write operations (setItem, removeItem) are serialized per key to
2226
- * prevent race conditions from concurrent access.
2244
+ * const data = Array.from({ length: 10000 }, (_, i) => ({ id: i, title: `Item ${i}` }))
2227
2245
  *
2228
- * @example
2229
- * ```ts
2230
- * const storage = useAsyncStorage()
2231
- * await storage.setItem('theme', 'dark')
2232
- * const theme = await storage.getItem('theme')
2246
+ * function renderItem({ item, index }) {
2247
+ * return h('VView', { style: { padding: 16 } }, [
2248
+ * h('VText', {}, `${item.title}`),
2249
+ * ])
2250
+ * }
2251
+ * </script>
2252
+ *
2253
+ * <template>
2254
+ * <VFlatList
2255
+ * :data="data"
2256
+ * :renderItem="renderItem"
2257
+ * :itemHeight="52"
2258
+ * :style="{ flex: 1 }"
2259
+ * @endReached="loadMore"
2260
+ * />
2261
+ * </template>
2233
2262
  * ```
2234
- */
2235
- declare function useAsyncStorage(): {
2236
- getItem: (key: string) => Promise<string | null>;
2237
- setItem: (key: string, value: string) => Promise<void>;
2238
- removeItem: (key: string) => Promise<void>;
2239
- getAllKeys: () => Promise<string[]>;
2240
- clear: () => Promise<void>;
2241
- };
2242
-
2243
- /**
2244
- * Clipboard composable providing read/write access to UIPasteboard.
2245
- *
2246
- * `content` is a reactive ref that updates when `paste()` is called.
2247
2263
  *
2248
- * @example
2249
- * ```ts
2250
- * const { copy, paste, content } = useClipboard()
2251
- * await copy('Hello, World!')
2252
- * const text = await paste()
2264
+ * For slot-based usage:
2265
+ * ```vue
2266
+ * <VFlatList :data="data" :itemHeight="52" :style="{ flex: 1 }">
2267
+ * <template #item="{ item, index }">
2268
+ * <VText>{{ item.title }}</VText>
2269
+ * </template>
2270
+ * </VFlatList>
2253
2271
  * ```
2254
2272
  */
2255
- declare function useClipboard(): {
2256
- copy: (text: string) => Promise<void>;
2257
- paste: () => Promise<string>;
2258
- content: _vue_reactivity.Ref<string, string>;
2259
- };
2273
+ declare const VFlatList: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
2274
+ /** Array of data items to render. */
2275
+ data: {
2276
+ type: PropType<unknown[]>;
2277
+ required: true;
2278
+ };
2279
+ /**
2280
+ * Render function for each item. Receives { item, index } and returns a VNode.
2281
+ * If not provided, the `#item` slot is used instead.
2282
+ */
2283
+ renderItem: {
2284
+ type: PropType<(info: FlatListRenderItemInfo<unknown>) => VNode>;
2285
+ default: undefined;
2286
+ };
2287
+ /** Extract a unique key from each item. Defaults to item.id, item.key, or index. */
2288
+ keyExtractor: {
2289
+ type: PropType<(item: unknown, index: number) => string | number>;
2290
+ default: typeof getDefaultItemKey;
2291
+ };
2292
+ /** Fixed height for each item in points. Required for virtualization math. */
2293
+ itemHeight: {
2294
+ type: NumberConstructor;
2295
+ required: true;
2296
+ };
2297
+ /**
2298
+ * Number of viewport-heights to render above and below the visible area.
2299
+ * Higher values reduce blank flashes during fast scrolling but use more memory.
2300
+ * Default: 3 (3 viewports above + 3 below = 7 total viewports of items).
2301
+ */
2302
+ windowSize: {
2303
+ type: NumberConstructor;
2304
+ default: number;
2305
+ };
2306
+ /** Style for the outer scroll container. */
2307
+ style: {
2308
+ type: PropType<ViewStyle>;
2309
+ default: () => {};
2310
+ };
2311
+ /** Show vertical scroll indicator. Default: true */
2312
+ showsScrollIndicator: {
2313
+ type: BooleanConstructor;
2314
+ default: boolean;
2315
+ };
2316
+ /** Enable bounce at scroll boundaries. Default: true */
2317
+ bounces: {
2318
+ type: BooleanConstructor;
2319
+ default: boolean;
2320
+ };
2321
+ /** Height of the header slot in points. Used to offset items below the header. */
2322
+ headerHeight: {
2323
+ type: NumberConstructor;
2324
+ default: number;
2325
+ };
2326
+ /**
2327
+ * How far from the end (in viewport fractions) to trigger endReached.
2328
+ * Default: 0.5 (trigger when within 50% of a viewport from the bottom).
2329
+ */
2330
+ endReachedThreshold: {
2331
+ type: NumberConstructor;
2332
+ default: number;
2333
+ };
2334
+ }>, () => VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
2335
+ [key: string]: any;
2336
+ }>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("scroll" | "endReached")[], "scroll" | "endReached", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
2337
+ /** Array of data items to render. */
2338
+ data: {
2339
+ type: PropType<unknown[]>;
2340
+ required: true;
2341
+ };
2342
+ /**
2343
+ * Render function for each item. Receives { item, index } and returns a VNode.
2344
+ * If not provided, the `#item` slot is used instead.
2345
+ */
2346
+ renderItem: {
2347
+ type: PropType<(info: FlatListRenderItemInfo<unknown>) => VNode>;
2348
+ default: undefined;
2349
+ };
2350
+ /** Extract a unique key from each item. Defaults to item.id, item.key, or index. */
2351
+ keyExtractor: {
2352
+ type: PropType<(item: unknown, index: number) => string | number>;
2353
+ default: typeof getDefaultItemKey;
2354
+ };
2355
+ /** Fixed height for each item in points. Required for virtualization math. */
2356
+ itemHeight: {
2357
+ type: NumberConstructor;
2358
+ required: true;
2359
+ };
2360
+ /**
2361
+ * Number of viewport-heights to render above and below the visible area.
2362
+ * Higher values reduce blank flashes during fast scrolling but use more memory.
2363
+ * Default: 3 (3 viewports above + 3 below = 7 total viewports of items).
2364
+ */
2365
+ windowSize: {
2366
+ type: NumberConstructor;
2367
+ default: number;
2368
+ };
2369
+ /** Style for the outer scroll container. */
2370
+ style: {
2371
+ type: PropType<ViewStyle>;
2372
+ default: () => {};
2373
+ };
2374
+ /** Show vertical scroll indicator. Default: true */
2375
+ showsScrollIndicator: {
2376
+ type: BooleanConstructor;
2377
+ default: boolean;
2378
+ };
2379
+ /** Enable bounce at scroll boundaries. Default: true */
2380
+ bounces: {
2381
+ type: BooleanConstructor;
2382
+ default: boolean;
2383
+ };
2384
+ /** Height of the header slot in points. Used to offset items below the header. */
2385
+ headerHeight: {
2386
+ type: NumberConstructor;
2387
+ default: number;
2388
+ };
2389
+ /**
2390
+ * How far from the end (in viewport fractions) to trigger endReached.
2391
+ * Default: 0.5 (trigger when within 50% of a viewport from the bottom).
2392
+ */
2393
+ endReachedThreshold: {
2394
+ type: NumberConstructor;
2395
+ default: number;
2396
+ };
2397
+ }>> & Readonly<{
2398
+ onScroll?: ((...args: any[]) => any) | undefined;
2399
+ onEndReached?: ((...args: any[]) => any) | undefined;
2400
+ }>, {
2401
+ style: ViewStyle;
2402
+ bounces: boolean;
2403
+ keyExtractor: (item: unknown, index: number) => string | number;
2404
+ showsScrollIndicator: boolean;
2405
+ renderItem: (info: FlatListRenderItemInfo<unknown>) => VNode;
2406
+ windowSize: number;
2407
+ headerHeight: number;
2408
+ endReachedThreshold: number;
2409
+ }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
2260
2410
 
2411
+ interface TabConfig {
2412
+ id: string;
2413
+ label: string;
2414
+ icon?: string;
2415
+ badge?: number | string;
2416
+ }
2261
2417
  /**
2262
- * Device information composable.
2263
- *
2264
- * Fetches device info once on mount and exposes reactive refs.
2418
+ * VTabBar - Tab bar navigation component
2265
2419
  *
2266
2420
  * @example
2267
- * ```ts
2268
- * const { model, screenWidth, screenHeight } = useDeviceInfo()
2421
+ * ```vue
2422
+ * <VTabBar
2423
+ * :tabs="tabs"
2424
+ * :activeTab="activeTab"
2425
+ * @change="handleTabChange"
2426
+ * />
2269
2427
  * ```
2270
2428
  */
2271
- declare function useDeviceInfo(): {
2272
- model: _vue_reactivity.Ref<string, string>;
2273
- systemVersion: _vue_reactivity.Ref<string, string>;
2274
- systemName: _vue_reactivity.Ref<string, string>;
2275
- name: _vue_reactivity.Ref<string, string>;
2276
- screenWidth: _vue_reactivity.Ref<number, number>;
2277
- screenHeight: _vue_reactivity.Ref<number, number>;
2278
- scale: _vue_reactivity.Ref<number, number>;
2279
- isLoaded: _vue_reactivity.Ref<boolean, boolean>;
2280
- fetchInfo: () => Promise<void>;
2281
- };
2429
+ declare const VTabBar: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
2430
+ /** Array of tab configurations */
2431
+ tabs: {
2432
+ type: PropType<TabConfig[]>;
2433
+ required: true;
2434
+ };
2435
+ /** Currently active tab ID */
2436
+ activeTab: {
2437
+ type: StringConstructor;
2438
+ required: true;
2439
+ };
2440
+ /** Position: 'top' | 'bottom' */
2441
+ position: {
2442
+ type: PropType<"top" | "bottom">;
2443
+ default: string;
2444
+ };
2445
+ }>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
2446
+ [key: string]: any;
2447
+ }>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, "change"[], "change", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
2448
+ /** Array of tab configurations */
2449
+ tabs: {
2450
+ type: PropType<TabConfig[]>;
2451
+ required: true;
2452
+ };
2453
+ /** Currently active tab ID */
2454
+ activeTab: {
2455
+ type: StringConstructor;
2456
+ required: true;
2457
+ };
2458
+ /** Position: 'top' | 'bottom' */
2459
+ position: {
2460
+ type: PropType<"top" | "bottom">;
2461
+ default: string;
2462
+ };
2463
+ }>> & Readonly<{
2464
+ onChange?: ((...args: any[]) => any) | undefined;
2465
+ }>, {
2466
+ position: "top" | "bottom";
2467
+ }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
2282
2468
 
2283
2469
  /**
2284
- * Keyboard state composable.
2285
- *
2286
- * Provides reactive keyboard visibility state and a dismiss function.
2287
- * The `isVisible` and `height` refs are updated by native keyboard events
2288
- * dispatched through a special keyboard node.
2470
+ * VDrawer - Drawer navigation component (side menu)
2289
2471
  *
2290
2472
  * @example
2291
- * ```ts
2292
- * const { isVisible, height, dismiss } = useKeyboard()
2473
+ * ```vue
2474
+ * <VDrawer v-model:open="drawerOpen">
2475
+ * <template #header>
2476
+ * <VText>Menu Header</VText>
2477
+ * </template>
2478
+ * <VDrawer.Item
2479
+ * icon="🏠"
2480
+ * label="Home"
2481
+ * @press="navigateTo('home')"
2482
+ * />
2483
+ * </VDrawer>
2293
2484
  * ```
2294
2485
  */
2295
- declare function useKeyboard(): {
2296
- isVisible: _vue_reactivity.Ref<boolean, boolean>;
2297
- height: _vue_reactivity.Ref<number, number>;
2298
- dismiss: () => Promise<void>;
2299
- getHeight: () => Promise<{
2300
- height: number;
2301
- isVisible: boolean;
2302
- }>;
2303
- };
2486
+ declare const VDrawer: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
2487
+ /** Whether the drawer is open */
2488
+ open: {
2489
+ type: BooleanConstructor;
2490
+ default: boolean;
2491
+ };
2492
+ /** Drawer position: 'left' | 'right' */
2493
+ position: {
2494
+ type: PropType<"left" | "right">;
2495
+ default: string;
2496
+ };
2497
+ /** Drawer width */
2498
+ width: {
2499
+ type: NumberConstructor;
2500
+ default: number;
2501
+ };
2502
+ /** Close on item press */
2503
+ closeOnPress: {
2504
+ type: BooleanConstructor;
2505
+ default: boolean;
2506
+ };
2507
+ }>, () => (VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
2508
+ [key: string]: any;
2509
+ }> | null)[] | null, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("update:open" | "close")[], "update:open" | "close", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
2510
+ /** Whether the drawer is open */
2511
+ open: {
2512
+ type: BooleanConstructor;
2513
+ default: boolean;
2514
+ };
2515
+ /** Drawer position: 'left' | 'right' */
2516
+ position: {
2517
+ type: PropType<"left" | "right">;
2518
+ default: string;
2519
+ };
2520
+ /** Drawer width */
2521
+ width: {
2522
+ type: NumberConstructor;
2523
+ default: number;
2524
+ };
2525
+ /** Close on item press */
2526
+ closeOnPress: {
2527
+ type: BooleanConstructor;
2528
+ default: boolean;
2529
+ };
2530
+ }>> & Readonly<{
2531
+ "onUpdate:open"?: ((...args: any[]) => any) | undefined;
2532
+ onClose?: ((...args: any[]) => any) | undefined;
2533
+ }>, {
2534
+ position: "left" | "right";
2535
+ open: boolean;
2536
+ width: number;
2537
+ closeOnPress: boolean;
2538
+ }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
2539
+ /**
2540
+ * VDrawer.Item - Drawer menu item component
2541
+ */
2542
+ declare const VDrawerItem: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
2543
+ /** Icon (emoji or icon name) */
2544
+ icon: {
2545
+ type: StringConstructor;
2546
+ default: string;
2547
+ };
2548
+ /** Label text */
2549
+ label: {
2550
+ type: StringConstructor;
2551
+ required: true;
2552
+ };
2553
+ /** Badge count */
2554
+ badge: {
2555
+ type: (StringConstructor | NumberConstructor)[];
2556
+ default: null;
2557
+ };
2558
+ /** Disabled state */
2559
+ disabled: {
2560
+ type: BooleanConstructor;
2561
+ default: boolean;
2562
+ };
2563
+ }>, () => VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
2564
+ [key: string]: any;
2565
+ }>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, "press"[], "press", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
2566
+ /** Icon (emoji or icon name) */
2567
+ icon: {
2568
+ type: StringConstructor;
2569
+ default: string;
2570
+ };
2571
+ /** Label text */
2572
+ label: {
2573
+ type: StringConstructor;
2574
+ required: true;
2575
+ };
2576
+ /** Badge count */
2577
+ badge: {
2578
+ type: (StringConstructor | NumberConstructor)[];
2579
+ default: null;
2580
+ };
2581
+ /** Disabled state */
2582
+ disabled: {
2583
+ type: BooleanConstructor;
2584
+ default: boolean;
2585
+ };
2586
+ }>> & Readonly<{
2587
+ onPress?: ((...args: any[]) => any) | undefined;
2588
+ }>, {
2589
+ icon: string;
2590
+ badge: string | number;
2591
+ disabled: boolean;
2592
+ }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
2593
+ /**
2594
+ * VDrawer.Section - Drawer section divider
2595
+ */
2596
+ declare const VDrawerSection: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
2597
+ /** Section title */
2598
+ title: {
2599
+ type: StringConstructor;
2600
+ default: string;
2601
+ };
2602
+ }>, () => VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
2603
+ [key: string]: any;
2604
+ }>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
2605
+ /** Section title */
2606
+ title: {
2607
+ type: StringConstructor;
2608
+ default: string;
2609
+ };
2610
+ }>> & Readonly<{}>, {
2611
+ title: string;
2612
+ }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
2304
2613
 
2305
2614
  declare const Easing: {
2306
2615
  readonly linear: "linear";
@@ -2334,25 +2643,47 @@ interface KeyframeStep {
2334
2643
  interface SequenceAnimation {
2335
2644
  type: 'timing' | 'spring';
2336
2645
  viewId: number;
2337
- toStyles: Record<string, any>;
2646
+ toStyles: Record<string, unknown>;
2338
2647
  options: TimingConfig | SpringConfig;
2339
2648
  }
2340
2649
  type TimingOptions = TimingConfig;
2341
2650
  type SpringOptions = SpringConfig;
2651
+ /**
2652
+ * Accepted view target for animation methods.
2653
+ * - `number` — raw node ID (backward compatible)
2654
+ * - `Ref` — a Vue template ref whose `.value` has an `id` (NativeNode)
2655
+ * - `NativeNode` — a node object directly
2656
+ *
2657
+ * @example
2658
+ * const myView = ref() // template ref
2659
+ * await timing(myView, { opacity: 1 }, { duration: 300 })
2660
+ */
2661
+ type AnimatableNode$1 = NativeNode | {
2662
+ id: number;
2663
+ };
2664
+ type AnimationTargetRef = Ref<AnimatableNode$1 | null | undefined>;
2665
+ type AnimationTarget = number | AnimationTargetRef | AnimatableNode$1;
2342
2666
  /**
2343
2667
  * Imperative animation API backed by native UIView/CALayer animations.
2344
2668
  *
2669
+ * All methods accept either a raw node ID (number), a template ref, or
2670
+ * a NativeNode object as the first argument.
2671
+ *
2345
2672
  * @example
2346
- * const { timing, spring, keyframe, sequence, parallel } = useAnimation()
2673
+ * const myView = ref() // <VView ref="myView" ...>
2674
+ * const { timing, spring, fadeIn } = useAnimation()
2347
2675
  *
2348
- * // Fade in
2349
- * await timing(viewId, { opacity: 1 }, { duration: 300 })
2676
+ * // Using template ref (recommended)
2677
+ * await timing(myView, { opacity: 1 }, { duration: 300 })
2678
+ *
2679
+ * // Using raw node ID (still works)
2680
+ * await timing(42, { opacity: 1 }, { duration: 300 })
2350
2681
  *
2351
2682
  * // Spring bounce
2352
- * await spring(viewId, { translateY: 0 }, { tension: 40, friction: 7 })
2683
+ * await spring(myView, { translateY: 0 }, { tension: 40, friction: 7 })
2353
2684
  *
2354
2685
  * // Keyframe flash
2355
- * await keyframe(viewId, [
2686
+ * await keyframe(myView, [
2356
2687
  * { offset: 0, opacity: 1 },
2357
2688
  * { offset: 0.5, opacity: 0 },
2358
2689
  * { offset: 1, opacity: 1 },
@@ -2360,28 +2691,23 @@ type SpringOptions = SpringConfig;
2360
2691
  *
2361
2692
  * // Sequence: fade then slide
2362
2693
  * await sequence([
2363
- * { type: 'timing', viewId, toStyles: { opacity: 0 }, options: { duration: 200 } },
2364
- * { type: 'timing', viewId, toStyles: { translateX: 100 }, options: { duration: 300 } },
2365
- * ])
2366
- *
2367
- * // Parallel: fade + scale at once
2368
- * await parallel([
2369
- * { type: 'timing', viewId, toStyles: { opacity: 0 }, options: { duration: 300 } },
2370
- * { type: 'spring', viewId, toStyles: { scale: 0 }, options: { tension: 50, friction: 10 } },
2694
+ * { type: 'timing', viewId: resolveId(myView), toStyles: { opacity: 0 }, options: { duration: 200 } },
2695
+ * { type: 'timing', viewId: resolveId(myView), toStyles: { translateX: 100 }, options: { duration: 300 } },
2371
2696
  * ])
2372
2697
  */
2373
2698
  declare function useAnimation(): {
2374
- timing: (viewId: number, toStyles: Record<string, any>, config?: TimingConfig) => Promise<void>;
2375
- spring: (viewId: number, toStyles: Record<string, any>, config?: SpringConfig) => Promise<void>;
2376
- keyframe: (viewId: number, steps: KeyframeStep[], config?: {
2699
+ timing: (target: AnimationTarget, toStyles: Record<string, unknown>, config?: TimingConfig) => Promise<void>;
2700
+ spring: (target: AnimationTarget, toStyles: Record<string, unknown>, config?: SpringConfig) => Promise<void>;
2701
+ keyframe: (target: AnimationTarget, steps: KeyframeStep[], config?: {
2377
2702
  duration?: number;
2378
2703
  }) => Promise<void>;
2379
2704
  sequence: (animations: SequenceAnimation[]) => Promise<void>;
2380
2705
  parallel: (animations: SequenceAnimation[]) => Promise<void>;
2381
- fadeIn: (viewId: number, duration?: number) => Promise<void>;
2382
- fadeOut: (viewId: number, duration?: number) => Promise<void>;
2383
- slideInFromRight: (viewId: number, duration?: number) => Promise<void>;
2384
- slideOutToRight: (viewId: number, duration?: number) => Promise<void>;
2706
+ fadeIn: (target: AnimationTarget, duration?: number) => Promise<void>;
2707
+ fadeOut: (target: AnimationTarget, duration?: number) => Promise<void>;
2708
+ slideInFromRight: (target: AnimationTarget, duration?: number) => Promise<void>;
2709
+ slideOutToRight: (target: AnimationTarget, duration?: number) => Promise<void>;
2710
+ resolveId: (target: AnimationTarget) => number;
2385
2711
  Easing: {
2386
2712
  readonly linear: "linear";
2387
2713
  readonly ease: "ease";
@@ -2391,6 +2717,158 @@ declare function useAnimation(): {
2391
2717
  };
2392
2718
  };
2393
2719
 
2720
+ /**
2721
+ * Built-in Vue Native components.
2722
+ *
2723
+ * These components are automatically registered when using createApp()
2724
+ * from @thelacanians/vue-native-runtime, so they can be used directly in templates
2725
+ * without explicit imports. They can also be imported individually for
2726
+ * use in render functions or JSX.
2727
+ */
2728
+
2729
+ declare const builtInComponents: Record<string, Component>;
2730
+
2731
+ declare const ErrorBoundary: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
2732
+ onError: PropType<(error: Error, info: string) => void>;
2733
+ resetKeys: {
2734
+ type: PropType<unknown[]>;
2735
+ default: () => unknown[];
2736
+ };
2737
+ }>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
2738
+ [key: string]: any;
2739
+ }>[] | undefined, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
2740
+ onError: PropType<(error: Error, info: string) => void>;
2741
+ resetKeys: {
2742
+ type: PropType<unknown[]>;
2743
+ default: () => unknown[];
2744
+ };
2745
+ }>> & Readonly<{}>, {
2746
+ resetKeys: unknown[];
2747
+ }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
2748
+
2749
+ /**
2750
+ * v-show directive for Vue Native.
2751
+ * Maps to the 'hidden' prop on native views (view.isHidden in Swift).
2752
+ */
2753
+ declare const vShow: Directive<NativeNode>;
2754
+
2755
+ /**
2756
+ * v-model directive for native inputs.
2757
+ *
2758
+ * Provides two-way data binding for form elements like VInput, VSwitch, VSlider, etc.
2759
+ *
2760
+ * @example
2761
+ * ```vue
2762
+ * <VInput v-model="text" />
2763
+ * <VSwitch v-model="enabled" />
2764
+ * <VInput v-model.lazy="text" />
2765
+ * <VInput v-model.number="count" />
2766
+ * <VInput v-model.trim="text" />
2767
+ * ```
2768
+ */
2769
+ declare const vModel: Directive<NativeNode>;
2770
+
2771
+ /**
2772
+ * Haptic feedback composable.
2773
+ *
2774
+ * Wraps the native Haptics module to provide tactile feedback.
2775
+ *
2776
+ * @example
2777
+ * ```ts
2778
+ * const { vibrate, selectionChanged } = useHaptics()
2779
+ * vibrate('medium')
2780
+ * ```
2781
+ */
2782
+ declare function useHaptics(): {
2783
+ vibrate: (style?: "light" | "medium" | "heavy" | "rigid" | "soft") => Promise<void>;
2784
+ notificationFeedback: (type?: "success" | "warning" | "error") => Promise<void>;
2785
+ selectionChanged: () => Promise<void>;
2786
+ };
2787
+
2788
+ /**
2789
+ * Async key-value storage composable backed by UserDefaults.
2790
+ *
2791
+ * All operations are Promise-based and run on a background thread.
2792
+ * Write operations (setItem, removeItem) are serialized per key to
2793
+ * prevent race conditions from concurrent access.
2794
+ *
2795
+ * @example
2796
+ * ```ts
2797
+ * const storage = useAsyncStorage()
2798
+ * await storage.setItem('theme', 'dark')
2799
+ * const theme = await storage.getItem('theme')
2800
+ * ```
2801
+ */
2802
+ declare function useAsyncStorage(): {
2803
+ getItem: (key: string) => Promise<string | null>;
2804
+ setItem: (key: string, value: string) => Promise<void>;
2805
+ removeItem: (key: string) => Promise<void>;
2806
+ getAllKeys: () => Promise<string[]>;
2807
+ clear: () => Promise<void>;
2808
+ };
2809
+
2810
+ /**
2811
+ * Clipboard composable providing read/write access to UIPasteboard.
2812
+ *
2813
+ * `content` is a reactive ref that updates when `paste()` is called.
2814
+ *
2815
+ * @example
2816
+ * ```ts
2817
+ * const { copy, paste, content } = useClipboard()
2818
+ * await copy('Hello, World!')
2819
+ * const text = await paste()
2820
+ * ```
2821
+ */
2822
+ declare function useClipboard(): {
2823
+ copy: (text: string) => Promise<void>;
2824
+ paste: () => Promise<string>;
2825
+ content: _vue_reactivity.Ref<string, string>;
2826
+ };
2827
+
2828
+ /**
2829
+ * Device information composable.
2830
+ *
2831
+ * Fetches device info once on mount and exposes reactive refs.
2832
+ *
2833
+ * @example
2834
+ * ```ts
2835
+ * const { model, screenWidth, screenHeight } = useDeviceInfo()
2836
+ * ```
2837
+ */
2838
+ declare function useDeviceInfo(): {
2839
+ model: _vue_reactivity.Ref<string, string>;
2840
+ systemVersion: _vue_reactivity.Ref<string, string>;
2841
+ systemName: _vue_reactivity.Ref<string, string>;
2842
+ name: _vue_reactivity.Ref<string, string>;
2843
+ screenWidth: _vue_reactivity.Ref<number, number>;
2844
+ screenHeight: _vue_reactivity.Ref<number, number>;
2845
+ scale: _vue_reactivity.Ref<number, number>;
2846
+ isLoaded: _vue_reactivity.Ref<boolean, boolean>;
2847
+ fetchInfo: () => Promise<void>;
2848
+ };
2849
+
2850
+ /**
2851
+ * Keyboard state composable.
2852
+ *
2853
+ * Provides reactive keyboard visibility state and a dismiss function.
2854
+ * The `isVisible` and `height` refs are updated by native keyboard events
2855
+ * dispatched through a special keyboard node.
2856
+ *
2857
+ * @example
2858
+ * ```ts
2859
+ * const { isVisible, height, dismiss } = useKeyboard()
2860
+ * ```
2861
+ */
2862
+ declare function useKeyboard(): {
2863
+ isVisible: _vue_reactivity.Ref<boolean, boolean>;
2864
+ height: _vue_reactivity.Ref<number, number>;
2865
+ dismiss: () => Promise<void>;
2866
+ getHeight: () => Promise<{
2867
+ height: number;
2868
+ isVisible: boolean;
2869
+ }>;
2870
+ };
2871
+
2394
2872
  type ConnectionType = 'wifi' | 'cellular' | 'ethernet' | 'none' | 'unknown';
2395
2873
  interface NetworkState {
2396
2874
  isConnected: boolean;
@@ -2585,19 +3063,19 @@ interface LocalNotification {
2585
3063
  delay?: number;
2586
3064
  sound?: 'default' | null;
2587
3065
  badge?: number;
2588
- data?: Record<string, any>;
3066
+ data?: Record<string, unknown>;
2589
3067
  }
2590
3068
  interface NotificationPayload {
2591
3069
  id: string;
2592
3070
  title: string;
2593
3071
  body: string;
2594
- data: Record<string, any>;
3072
+ data: Record<string, unknown>;
2595
3073
  action?: string;
2596
3074
  }
2597
3075
  interface PushNotificationPayload {
2598
3076
  title: string;
2599
3077
  body: string;
2600
- data: Record<string, any>;
3078
+ data: Record<string, unknown>;
2601
3079
  remote: true;
2602
3080
  }
2603
3081
  /**
@@ -2651,6 +3129,9 @@ declare function useBiometry(): {
2651
3129
  isAvailable: () => Promise<boolean>;
2652
3130
  };
2653
3131
 
3132
+ declare global {
3133
+ var __VN_configurePins: ((pinsJson: string) => void) | undefined;
3134
+ }
2654
3135
  interface HttpRequestConfig {
2655
3136
  baseURL?: string;
2656
3137
  headers?: Record<string, string>;
@@ -2667,12 +3148,16 @@ interface HttpRequestConfig {
2667
3148
  */
2668
3149
  pins?: Record<string, string[]>;
2669
3150
  }
2670
- interface HttpResponse<T = any> {
3151
+ interface HttpResponse<T = unknown> {
2671
3152
  data: T;
2672
3153
  status: number;
2673
3154
  ok: boolean;
2674
3155
  headers: Record<string, string>;
2675
3156
  }
3157
+ interface QueryRequestOptions {
3158
+ params?: Record<string, string>;
3159
+ headers?: Record<string, string>;
3160
+ }
2676
3161
  /**
2677
3162
  * HTTP client composable with reactive loading/error state.
2678
3163
  * Uses the native fetch polyfill under the hood.
@@ -2684,20 +3169,14 @@ interface HttpResponse<T = any> {
2684
3169
  declare function useHttp(config?: HttpRequestConfig): {
2685
3170
  loading: _vue_reactivity.Ref<boolean, boolean>;
2686
3171
  error: _vue_reactivity.Ref<string | null, string | null>;
2687
- get: <T = any>(url: string, options?: {
2688
- params?: Record<string, string>;
2689
- headers?: Record<string, string>;
2690
- } | Record<string, string>) => Promise<HttpResponse<T>>;
2691
- post: <T = any>(url: string, body?: any, headers?: Record<string, string>) => Promise<HttpResponse<T>>;
2692
- put: <T = any>(url: string, body?: any, headers?: Record<string, string>) => Promise<HttpResponse<T>>;
2693
- patch: <T = any>(url: string, body?: any, headers?: Record<string, string>) => Promise<HttpResponse<T>>;
2694
- delete: <T = any>(url: string, options?: {
2695
- params?: Record<string, string>;
2696
- headers?: Record<string, string>;
2697
- } | Record<string, string>) => Promise<HttpResponse<T>>;
3172
+ get: <T = unknown>(url: string, options?: QueryRequestOptions | Record<string, string>) => Promise<HttpResponse<T>>;
3173
+ post: <T = unknown>(url: string, body?: unknown, headers?: Record<string, string>) => Promise<HttpResponse<T>>;
3174
+ put: <T = unknown>(url: string, body?: unknown, headers?: Record<string, string>) => Promise<HttpResponse<T>>;
3175
+ patch: <T = unknown>(url: string, body?: unknown, headers?: Record<string, string>) => Promise<HttpResponse<T>>;
3176
+ delete: <T = unknown>(url: string, options?: QueryRequestOptions | Record<string, string>) => Promise<HttpResponse<T>>;
2698
3177
  };
2699
3178
 
2700
- type ColorScheme = 'light' | 'dark';
3179
+ type ColorScheme$1 = 'light' | 'dark';
2701
3180
  /**
2702
3181
  * Reactive dark mode / color scheme detection.
2703
3182
  * Updates automatically when the user switches between light and dark mode.
@@ -2708,7 +3187,7 @@ type ColorScheme = 'light' | 'dark';
2708
3187
  * const bgColor = computed(() => isDark.value ? '#000' : '#FFF')
2709
3188
  */
2710
3189
  declare function useColorScheme(): {
2711
- colorScheme: _vue_reactivity.Ref<ColorScheme, ColorScheme>;
3190
+ colorScheme: _vue_reactivity.Ref<ColorScheme$1, ColorScheme$1>;
2712
3191
  isDark: _vue_reactivity.Ref<boolean, boolean>;
2713
3192
  };
2714
3193
 
@@ -2759,22 +3238,26 @@ declare function useI18n(): {
2759
3238
  locale: _vue_reactivity.Ref<string, string>;
2760
3239
  };
2761
3240
 
2762
- type Platform = 'ios' | 'android';
3241
+ type Platform = 'ios' | 'android' | 'macos';
2763
3242
  /**
2764
- * Returns the current platform ('ios' or 'android').
3243
+ * Returns the current platform and convenience boolean flags.
2765
3244
  *
2766
3245
  * Relies on the `__PLATFORM__` compile-time constant injected by the Vite plugin.
2767
3246
  * Falls back to 'ios' if not defined.
2768
3247
  *
2769
3248
  * @example
2770
3249
  * ```ts
2771
- * const { platform, isIOS, isAndroid } = usePlatform()
3250
+ * const { platform, isIOS, isAndroid, isMacOS, isApple, isDesktop, isMobile } = usePlatform()
2772
3251
  * ```
2773
3252
  */
2774
3253
  declare function usePlatform(): {
2775
3254
  platform: Platform;
2776
3255
  isIOS: boolean;
2777
3256
  isAndroid: boolean;
3257
+ isMacOS: boolean;
3258
+ isApple: boolean;
3259
+ isDesktop: boolean;
3260
+ isMobile: boolean;
2778
3261
  };
2779
3262
 
2780
3263
  interface Dimensions {
@@ -2965,10 +3448,10 @@ interface ExecuteResult {
2965
3448
  rowsAffected: number;
2966
3449
  insertId?: number;
2967
3450
  }
2968
- type Row = Record<string, any>;
3451
+ type Row = Record<string, unknown>;
2969
3452
  interface TransactionContext {
2970
- execute: (sql: string, params?: any[]) => Promise<ExecuteResult>;
2971
- query: <T extends Row = Row>(sql: string, params?: any[]) => Promise<T[]>;
3453
+ execute: (sql: string, params?: unknown[]) => Promise<ExecuteResult>;
3454
+ query: <T extends Row = Row>(sql: string, params?: unknown[]) => Promise<T[]>;
2972
3455
  }
2973
3456
  /**
2974
3457
  * Reactive SQLite database access. Opens a named database on first use
@@ -2995,8 +3478,8 @@ interface TransactionContext {
2995
3478
  * })
2996
3479
  */
2997
3480
  declare function useDatabase(name?: string): {
2998
- execute: (sql: string, params?: any[]) => Promise<ExecuteResult>;
2999
- query: <T extends Row = Row>(sql: string, params?: any[]) => Promise<T[]>;
3481
+ execute: (sql: string, params?: unknown[]) => Promise<ExecuteResult>;
3482
+ query: <T extends Row = Row>(sql: string, params?: unknown[]) => Promise<T[]>;
3000
3483
  transaction: (callback: (ctx: TransactionContext) => Promise<void>) => Promise<void>;
3001
3484
  close: () => Promise<void>;
3002
3485
  isOpen: _vue_reactivity.Ref<boolean, boolean>;
@@ -3496,26 +3979,328 @@ declare function useContacts(): {
3496
3979
  error: _vue_reactivity.Ref<string | null, string | null>;
3497
3980
  };
3498
3981
 
3982
+ interface WindowInfo {
3983
+ width: number;
3984
+ height: number;
3985
+ x: number;
3986
+ y: number;
3987
+ isFullScreen: boolean;
3988
+ isVisible: boolean;
3989
+ title: string;
3990
+ }
3991
+ /**
3992
+ * macOS-only composable for window management.
3993
+ * No-op on iOS and Android.
3994
+ *
3995
+ * @example
3996
+ * ```ts
3997
+ * const { setTitle, setSize, center, minimize, toggleFullScreen, getInfo } = useWindow()
3998
+ * setTitle('My App')
3999
+ * setSize(1024, 768)
4000
+ * ```
4001
+ */
4002
+ declare function useWindow(): {
4003
+ setTitle: (title: string) => Promise<void>;
4004
+ setSize: (width: number, height: number) => Promise<void>;
4005
+ center: () => Promise<void>;
4006
+ minimize: () => Promise<void>;
4007
+ toggleFullScreen: () => Promise<void>;
4008
+ close: () => Promise<void>;
4009
+ getInfo: () => Promise<WindowInfo | null>;
4010
+ };
4011
+
4012
+ interface MenuItem {
4013
+ id?: string;
4014
+ title: string;
4015
+ key?: string;
4016
+ disabled?: boolean;
4017
+ separator?: boolean;
4018
+ }
4019
+ interface MenuSection {
4020
+ title: string;
4021
+ items: MenuItem[];
4022
+ }
4023
+ /**
4024
+ * macOS-only composable for menu bar and context menu control.
4025
+ * No-op on iOS and Android.
4026
+ *
4027
+ * @example
4028
+ * ```ts
4029
+ * const { setAppMenu, showContextMenu, onMenuItemClick } = useMenu()
4030
+ *
4031
+ * setAppMenu([
4032
+ * { title: 'File', items: [{ id: 'new', title: 'New', key: 'n' }] },
4033
+ * { title: 'Edit', items: [{ id: 'copy', title: 'Copy', key: 'c' }] },
4034
+ * ])
4035
+ *
4036
+ * onMenuItemClick((id, title) => {
4037
+ * console.log('Clicked:', id, title)
4038
+ * })
4039
+ * ```
4040
+ */
4041
+ declare function useMenu(): {
4042
+ setAppMenu: (sections: MenuSection[]) => Promise<void>;
4043
+ showContextMenu: (items: MenuItem[]) => Promise<void>;
4044
+ onMenuItemClick: (callback: (id: string, title: string) => void) => () => void;
4045
+ };
4046
+
4047
+ interface OpenFileOptions {
4048
+ multiple?: boolean;
4049
+ allowedTypes?: string[];
4050
+ title?: string;
4051
+ }
4052
+ interface SaveFileOptions {
4053
+ title?: string;
4054
+ defaultName?: string;
4055
+ }
3499
4056
  /**
3500
- * NativeBridge -- the communication layer between JavaScript and Swift/UIKit.
4057
+ * macOS-only composable for native file open/save dialogs.
4058
+ * No-op on iOS and Android.
3501
4059
  *
3502
- * All renderer operations (create, update, insert, remove) are batched into
3503
- * a pending operations array. On the first enqueue within a microtask cycle,
3504
- * a queueMicrotask callback is scheduled. When the microtask fires, all
3505
- * accumulated operations are JSON-serialized and sent to Swift via
3506
- * `globalThis.__VN_flushOperations(json)`.
4060
+ * @example
4061
+ * ```ts
4062
+ * const { openFile, openDirectory, saveFile } = useFileDialog()
3507
4063
  *
3508
- * Operation format:
3509
- * { op: "<name>", args: [arg0, arg1, ...] }
4064
+ * const files = await openFile({ multiple: true, allowedTypes: ['png', 'jpg'] })
4065
+ * const dir = await openDirectory()
4066
+ * const savePath = await saveFile({ defaultName: 'export.json' })
4067
+ * ```
4068
+ */
4069
+ declare function useFileDialog(): {
4070
+ openFile: (options?: OpenFileOptions) => Promise<string[] | null>;
4071
+ openDirectory: (options?: {
4072
+ title?: string;
4073
+ }) => Promise<string | null>;
4074
+ saveFile: (options?: SaveFileOptions) => Promise<string | null>;
4075
+ };
4076
+
4077
+ /**
4078
+ * macOS-only composable for drag and drop.
4079
+ * No-op on iOS and Android.
4080
+ *
4081
+ * @example
4082
+ * ```ts
4083
+ * const { enableDropZone, onDrop, isDragging } = useDragDrop()
4084
+ *
4085
+ * enableDropZone()
4086
+ * onDrop((files) => {
4087
+ * console.log('Dropped files:', files)
4088
+ * })
4089
+ * ```
4090
+ */
4091
+ declare function useDragDrop(): {
4092
+ enableDropZone: () => Promise<void>;
4093
+ onDrop: (callback: (files: string[]) => void) => () => void;
4094
+ onDragEnter: (callback: () => void) => () => void;
4095
+ onDragLeave: (callback: () => void) => () => void;
4096
+ isDragging: Readonly<_vue_reactivity.Ref<boolean, boolean>>;
4097
+ };
4098
+
4099
+ /**
4100
+ * Composable for programmatic teleportation.
4101
+ * Allows moving native nodes to different containers (e.g., modal, root).
3510
4102
  *
3511
- * This matches the Swift NativeBridge.processOperations() parser which
3512
- * extracts `operation["op"]` and `operation["args"]`.
4103
+ * @param target - Teleport target name ('modal', 'root', etc.)
4104
+ * @returns Object with teleport function
3513
4105
  *
3514
- * This batching strategy ensures that all synchronous Vue updates triggered
3515
- * by a single state change are coalesced into one native bridge call,
3516
- * minimizing JS-to-native context switches.
4106
+ * @example
4107
+ * ```ts
4108
+ * import { useTeleport } from '@thelacanians/vue-native-runtime'
4109
+ *
4110
+ * const { teleport } = useTeleport('modal')
4111
+ * const node = createNativeNode('VView')
4112
+ * teleport(node)
4113
+ * ```
3517
4114
  */
3518
- type EventCallback = (payload: any) => void;
4115
+ declare function useTeleport(target: string): {
4116
+ teleport: (node: NativeNode) => void;
4117
+ };
4118
+
4119
+ interface PanGestureState {
4120
+ translationX: number;
4121
+ translationY: number;
4122
+ velocityX: number;
4123
+ velocityY: number;
4124
+ state: 'began' | 'changed' | 'ended' | 'cancelled';
4125
+ }
4126
+ interface PinchGestureState {
4127
+ scale: number;
4128
+ velocity: number;
4129
+ state: 'began' | 'changed' | 'ended' | 'cancelled';
4130
+ }
4131
+ interface RotateGestureState {
4132
+ rotation: number;
4133
+ velocity: number;
4134
+ state: 'began' | 'changed' | 'ended' | 'cancelled';
4135
+ }
4136
+ interface SwipeGestureState {
4137
+ direction: 'left' | 'right' | 'up' | 'down';
4138
+ locationX: number;
4139
+ locationY: number;
4140
+ }
4141
+ interface TapGestureState {
4142
+ locationX: number;
4143
+ locationY: number;
4144
+ tapCount: number;
4145
+ }
4146
+ interface ForceTouchState {
4147
+ force: number;
4148
+ locationX: number;
4149
+ locationY: number;
4150
+ stage: number;
4151
+ }
4152
+ interface HoverState {
4153
+ locationX: number;
4154
+ locationY: number;
4155
+ state: 'entered' | 'moved' | 'exited';
4156
+ }
4157
+ type GestureState = PanGestureState | PinchGestureState | RotateGestureState | SwipeGestureState | TapGestureState | ForceTouchState | HoverState;
4158
+ interface GestureConfig {
4159
+ enabled?: boolean;
4160
+ simultaneousGestures?: string[];
4161
+ exclusiveGestures?: string[];
4162
+ threshold?: number;
4163
+ minPointers?: number;
4164
+ maxPointers?: number;
4165
+ waitFor?: Ref<GestureHandler | null>[];
4166
+ }
4167
+ interface GestureHandler {
4168
+ id: symbol;
4169
+ event: string;
4170
+ config: GestureConfig;
4171
+ callback: (state: GestureState) => void;
4172
+ }
4173
+ type AnimatableNode = NativeNode | {
4174
+ id: number;
4175
+ };
4176
+ type GestureTargetRef = Ref<AnimatableNode | null | undefined>;
4177
+ type GestureTarget = number | GestureTargetRef | AnimatableNode;
4178
+ interface GestureEventMap {
4179
+ pan: PanGestureState;
4180
+ pinch: PinchGestureState;
4181
+ rotate: RotateGestureState;
4182
+ swipeLeft: SwipeGestureState;
4183
+ swipeRight: SwipeGestureState;
4184
+ swipeUp: SwipeGestureState;
4185
+ swipeDown: SwipeGestureState;
4186
+ press: TapGestureState;
4187
+ longPress: TapGestureState;
4188
+ doubleTap: TapGestureState;
4189
+ forceTouch: ForceTouchState;
4190
+ hover: HoverState;
4191
+ }
4192
+ type AnyGestureState = PanGestureState | PinchGestureState | RotateGestureState | SwipeGestureState | TapGestureState | ForceTouchState | HoverState;
4193
+ interface UseGestureReturn {
4194
+ pan: Ref<PanGestureState | null>;
4195
+ pinch: Ref<PinchGestureState | null>;
4196
+ rotate: Ref<RotateGestureState | null>;
4197
+ swipeLeft: Ref<SwipeGestureState | null>;
4198
+ swipeRight: Ref<SwipeGestureState | null>;
4199
+ swipeUp: Ref<SwipeGestureState | null>;
4200
+ swipeDown: Ref<SwipeGestureState | null>;
4201
+ press: Ref<TapGestureState | null>;
4202
+ longPress: Ref<TapGestureState | null>;
4203
+ doubleTap: Ref<TapGestureState | null>;
4204
+ forceTouch: Ref<ForceTouchState | null>;
4205
+ hover: Ref<HoverState | null>;
4206
+ gestureState: Ref<AnyGestureState | null>;
4207
+ activeGesture: Ref<string | null>;
4208
+ isGesturing: Ref<boolean>;
4209
+ attach: (target: GestureTarget) => void;
4210
+ detach: () => void;
4211
+ on: <K extends keyof GestureEventMap>(event: K, callback: (state: GestureEventMap[K]) => void) => () => void;
4212
+ }
4213
+ interface UseGestureOptions {
4214
+ pan?: boolean | GestureConfig;
4215
+ pinch?: boolean | GestureConfig;
4216
+ rotate?: boolean | GestureConfig;
4217
+ swipeLeft?: boolean | GestureConfig;
4218
+ swipeRight?: boolean | GestureConfig;
4219
+ swipeUp?: boolean | GestureConfig;
4220
+ swipeDown?: boolean | GestureConfig;
4221
+ press?: boolean | GestureConfig;
4222
+ longPress?: boolean | GestureConfig;
4223
+ doubleTap?: boolean | GestureConfig;
4224
+ forceTouch?: boolean | GestureConfig;
4225
+ hover?: boolean | GestureConfig;
4226
+ simultaneousGestures?: string[];
4227
+ }
4228
+ declare function useGesture(target?: GestureTarget, options?: UseGestureOptions): UseGestureReturn;
4229
+ interface GestureCompositionOptions {
4230
+ enabled?: Ref<boolean>;
4231
+ }
4232
+ interface ComposedGesture {
4233
+ pan: Ref<PanGestureState | null>;
4234
+ pinch: Ref<PinchGestureState | null>;
4235
+ rotate: Ref<RotateGestureState | null>;
4236
+ gestureState: Ref<AnyGestureState | null>;
4237
+ activeGesture: Ref<string | null>;
4238
+ isGesturing: Ref<boolean>;
4239
+ isPinchingAndRotating: Ref<boolean>;
4240
+ isPanningAndPinching: Ref<boolean>;
4241
+ }
4242
+ declare function useComposedGestures(target: GestureTarget, options?: GestureCompositionOptions & UseGestureOptions): ComposedGesture;
4243
+
4244
+ type ColorScheme = 'light' | 'dark';
4245
+ interface ThemeDefinition<T extends Record<string, unknown> = Record<string, unknown>> {
4246
+ light: T;
4247
+ dark: T;
4248
+ }
4249
+ interface ThemeContext<T> {
4250
+ /** The current resolved theme object (reactive). */
4251
+ theme: ComputedRef<T>;
4252
+ /** Current color scheme. */
4253
+ colorScheme: Ref<ColorScheme>;
4254
+ /** Toggle between light and dark mode. */
4255
+ toggleColorScheme: () => void;
4256
+ /** Set a specific color scheme. */
4257
+ setColorScheme: (scheme: ColorScheme) => void;
4258
+ }
4259
+ /**
4260
+ * Create a theme system with light and dark variants.
4261
+ *
4262
+ * Returns a `ThemeProvider` component (wraps children with provide) and a
4263
+ * `useTheme` composable for consuming the theme in any descendant component.
4264
+ */
4265
+ declare function createTheme<T extends Record<string, unknown>>(definition: ThemeDefinition<T>): {
4266
+ ThemeProvider: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
4267
+ initialColorScheme: {
4268
+ type: () => ColorScheme;
4269
+ default: string;
4270
+ };
4271
+ }>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
4272
+ [key: string]: any;
4273
+ }>[] | undefined, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
4274
+ initialColorScheme: {
4275
+ type: () => ColorScheme;
4276
+ default: string;
4277
+ };
4278
+ }>> & Readonly<{}>, {
4279
+ initialColorScheme: ColorScheme;
4280
+ }, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
4281
+ useTheme: () => ThemeContext<T>;
4282
+ };
4283
+ /**
4284
+ * Create a computed stylesheet that automatically re-evaluates when the theme changes.
4285
+ *
4286
+ * @param theme - A reactive/computed theme object (from `useTheme().theme`)
4287
+ * @param factory - A function that receives the current theme and returns a style map
4288
+ * @returns A computed ref containing the frozen stylesheet
4289
+ *
4290
+ * @example
4291
+ * ```ts
4292
+ * const { theme } = useTheme()
4293
+ * const styles = createDynamicStyleSheet(theme, (t) => ({
4294
+ * container: { flex: 1, backgroundColor: t.colors.background },
4295
+ * text: { color: t.colors.text, fontSize: 16 },
4296
+ * }))
4297
+ * ```
4298
+ */
4299
+ declare function createDynamicStyleSheet<T extends Record<string, unknown>, S extends Record<string, AnyStyle>>(theme: ComputedRef<T> | Ref<T>, factory: (themeValue: T) => S): ComputedRef<StyleSheet<S>>;
4300
+
4301
+ type EventCallback<T = unknown> = {
4302
+ bivarianceHack(payload: T): void;
4303
+ }['bivarianceHack'];
3519
4304
  declare class NativeBridgeImpl {
3520
4305
  /** Pending operations waiting to be flushed to native */
3521
4306
  private pendingOps;
@@ -3578,7 +4363,7 @@ declare class NativeBridgeImpl {
3578
4363
  * Update a single property on a native view.
3579
4364
  * Swift handler: handleUpdateProp(args: [nodeId, key, value])
3580
4365
  */
3581
- updateProp(nodeId: number, key: string, value: any): void;
4366
+ updateProp(nodeId: number, key: string, value: unknown): void;
3582
4367
  /**
3583
4368
  * Update a single style property on a native view.
3584
4369
  * Swift handler: handleUpdateStyle(args: [nodeId, { key: value }])
@@ -3586,7 +4371,15 @@ declare class NativeBridgeImpl {
3586
4371
  * Each style property update is sent as a dictionary with one key,
3587
4372
  * matching the Swift side which iterates over the dictionary entries.
3588
4373
  */
3589
- updateStyle(nodeId: number, key: string, value: any): void;
4374
+ updateStyle(nodeId: number, key: string, value: unknown): void;
4375
+ /**
4376
+ * Update multiple style properties on a native view in a single bridge op.
4377
+ * Swift/Kotlin handler: handleUpdateStyle(args: [nodeId, { key1: val1, key2: val2, ... }])
4378
+ *
4379
+ * More efficient than calling updateStyle() per property — sends one op
4380
+ * instead of N ops, reducing JSON overhead and bridge dispatch.
4381
+ */
4382
+ updateStyles(nodeId: number, styles: Record<string, unknown>): void;
3590
4383
  /**
3591
4384
  * Append a child node to a parent node.
3592
4385
  * Swift handler: handleAppendChild(args: [parentId, childId])
@@ -3608,7 +4401,7 @@ declare class NativeBridgeImpl {
3608
4401
  * The native side will call __VN_handleEvent when this event fires.
3609
4402
  * Swift handler: handleAddEventListener(args: [nodeId, eventName])
3610
4403
  */
3611
- addEventListener(nodeId: number, eventName: string, callback: EventCallback): void;
4404
+ addEventListener<T = unknown>(nodeId: number, eventName: string, callback: EventCallback<T>): void;
3612
4405
  /**
3613
4406
  * Remove a previously registered event listener.
3614
4407
  * Swift handler: handleRemoveEventListener(args: [nodeId, eventName])
@@ -3618,7 +4411,7 @@ declare class NativeBridgeImpl {
3618
4411
  * Called from Swift via globalThis.__VN_handleEvent when a native event fires.
3619
4412
  * Looks up the registered handler and invokes it with the event payload.
3620
4413
  */
3621
- handleNativeEvent(nodeId: number, eventName: string, payload: any): void;
4414
+ handleNativeEvent(nodeId: number, eventName: string, payload: unknown): void;
3622
4415
  /**
3623
4416
  * Tell native which node ID is the root of the view tree.
3624
4417
  * Swift handler: handleSetRootView(args: [nodeId])
@@ -3632,23 +4425,39 @@ declare class NativeBridgeImpl {
3632
4425
  * a crash or unregistered module), the Promise rejects with a clear error instead
3633
4426
  * of hanging forever.
3634
4427
  */
3635
- invokeNativeModule(moduleName: string, methodName: string, args?: any[], timeoutMs?: number): Promise<any>;
4428
+ invokeNativeModule(moduleName: string, methodName: string, args?: unknown[], timeoutMs?: number): Promise<any>;
3636
4429
  /**
3637
4430
  * Invoke a native module method synchronously.
3638
4431
  * This sends the operation immediately and expects no callback.
3639
4432
  * Use sparingly -- prefer the async variant.
3640
4433
  */
3641
- invokeNativeModuleSync(moduleName: string, methodName: string, args?: any[]): void;
4434
+ invokeNativeModuleSync(moduleName: string, methodName: string, args?: unknown[]): void;
3642
4435
  /**
3643
4436
  * Called from Swift via globalThis.__VN_resolveCallback when an async
3644
4437
  * native module invocation completes.
3645
4438
  */
3646
- resolveCallback(callbackId: number, result: any, error: any): void;
4439
+ resolveCallback(callbackId: number, result: unknown, error: unknown): void;
4440
+ /**
4441
+ * Create teleport markers in native.
4442
+ * Used for Teleport component to render content outside parent hierarchy.
4443
+ */
4444
+ createTeleport(parentId: number, startId: number, endId: number): void;
4445
+ /**
4446
+ * Remove teleport markers from native.
4447
+ * Cleans up teleport containers and markers.
4448
+ */
4449
+ removeTeleport(parentId: number, startId: number, endId: number): void;
4450
+ /**
4451
+ * Move a node to a teleport target.
4452
+ * @param target - Teleport target name ('modal', 'root', etc.)
4453
+ * @param nodeId - Node ID to teleport
4454
+ */
4455
+ teleportTo(target: string, nodeId: number): void;
3647
4456
  /**
3648
4457
  * Register a handler for a push-based global event from native.
3649
4458
  * Returns an unsubscribe function.
3650
4459
  */
3651
- onGlobalEvent(eventName: string, handler: (payload: any) => void): () => void;
4460
+ onGlobalEvent<T = unknown>(eventName: string, handler: EventCallback<T>): () => void;
3652
4461
  /**
3653
4462
  * Called from Swift via globalThis.__VN_handleGlobalEvent when a push event fires.
3654
4463
  */
@@ -3706,6 +4515,6 @@ interface NativeApp extends App {
3706
4515
  * app.start()
3707
4516
  * ```
3708
4517
  */
3709
- declare function createApp(rootComponent: Component, rootProps?: Record<string, any>): NativeApp;
4518
+ declare function createApp(rootComponent: Component, rootProps?: Record<string, unknown>): NativeApp;
3710
4519
 
3711
- export { type AccessibilityProps, type ActionSheetAction, type AlertButton, type AlignContent, type AlignItems, type AlignSelf, type AnyStyle, type AppStateStatus, type AudioPlayOptions, type AudioRecordOptions, type AudioRecordResult, type AuthResult, type BLECharacteristic, type BLECharacteristicChange, type BLEDevice, type BLEState, type BackgroundTaskOptions, type BackgroundTaskType, type BiometryResult, type BiometryType, type BorderStyle, type Calendar, type CalendarEvent, type CameraOptions, type CameraResult, type ColorScheme, type ConnectionType, type Contact, type ContactField, type CreateContactData, type CreateEventOptions, type Dimensions, type Direction, type Display, type DropdownOption, ErrorBoundary, type ExecuteResult, type FileStat, type FlexDirection, type FlexWrap, type FontStyle, type FontWeight, type GeoCoordinates, type HttpRequestConfig, type HttpResponse, type ImageStyle, type ImportantForAccessibility, type JustifyContent, type LocalNotification, type NativeApp, NativeBridge, type NativeNode, type NetworkState, type NotificationPayload, type Overflow, type PerformanceMetrics, type Permission, type PermissionStatus, type Platform, type Position, type Product, type ProductType, type Purchase, type PushNotificationPayload, type QRCodeResult, type RadioOption, type ResizeMode, type Row, type SensorData, type SensorOptions, type ShadowOffset, type ShareContent, type ShareResult, type SharedElementFrame, type SharedElementRegistration, type SocialUser, type SpringOptions, type StatusBarStyle, type StyleProp, type StyleSheet, type TextAlign, type TextDecorationLine, type TextDecorationStyle, type TextStyle, type TextTransform, type TimingOptions, type TransactionContext, type TransactionState, type TransactionUpdate, type TransformValue, type UpdateInfo, type UpdateStatus, VActionSheet, type VActionSheetProps, VActivityIndicator, type VActivityIndicatorProps, VAlertDialog, type VAlertDialogProps, VButton, type VButtonProps, VCheckbox, type VCheckboxProps, VDropdown, type VDropdownProps, VImage, type VImageProps, VInput, type VInputProps, VKeyboardAvoiding, type VKeyboardAvoidingProps, VList, type VListProps, VModal, type VModalProps, VPicker, type VPickerProps, VPressable, type VPressableProps, VProgressBar, type VProgressBarProps, VRadio, type VRadioProps, VRefreshControl, type VRefreshControlProps, VSafeArea, type VSafeAreaProps, VScrollView, type VScrollViewProps, VSectionList, type VSectionListProps, VSegmentedControl, type VSegmentedControlProps, VSlider, type VSliderProps, VStatusBar, type VStatusBarProps, VSwitch, type VSwitchProps, VText, type VTextProps, VVideo, type VVideoProps, VView, type VViewProps, VWebView, type VWebViewProps, type VersionInfo, type VideoCaptureOptions, type VideoCaptureResult, type ViewStyle, type WebSocketOptions, type WebSocketStatus, type WebViewSource, clearSharedElementRegistry, createApp, createCommentNode, createNativeNode, createStyleSheet, createTextNode, getRegisteredSharedElements, getSharedElementViewId, measureViewFrame, render, resetNodeId, useAccelerometer, useAnimation, useAppState, useAppleSignIn, useAsyncStorage, useAudio, useBackHandler, useBackgroundTask, useBiometry, useBluetooth, useCalendar, useCamera, useClipboard, useColorScheme, useContacts, useDatabase, useDeviceInfo, useDimensions, useFileSystem, useGeolocation, useGoogleSignIn, useGyroscope, useHaptics, useHttp, useI18n, useIAP, useKeyboard, useLinking, useNetwork, useNotifications, useOTAUpdate, usePerformance, usePermissions, usePlatform, useSecureStorage, useShare, useSharedElementTransition, useWebSocket, vShow, validStyleProperties };
4520
+ export { type AccessibilityProps, type ActionSheetAction, type AlertButton, type AlignContent, type AlignItems, type AlignSelf, type AnyStyle, type AppStateStatus, type AudioPlayOptions, type AudioRecordOptions, type AudioRecordResult, type AuthResult, type BLECharacteristic, type BLECharacteristicChange, type BLEDevice, type BLEState, type BackgroundTaskOptions, type BackgroundTaskType, type BiometryResult, type BiometryType, type BorderStyle, type Calendar, type CalendarEvent, type CameraOptions, type CameraResult, type ColorScheme$1 as ColorScheme, type ComposedGesture, type ConnectionType, type Contact, type ContactField, type CreateContactData, type CreateEventOptions, type Dimensions, type Direction, type Display, type DropdownOption, ErrorBoundary, type ExecuteResult, type FileStat, type FlatListRenderItemInfo, type FlexDirection, type FlexWrap, type FontStyle, type FontWeight, type ForceTouchState, type GeoCoordinates, type GestureConfig, type GestureState, type HoverState, type HttpRequestConfig, type HttpResponse, type ImageStyle, type ImportantForAccessibility, type JustifyContent, type LocalNotification, type MenuItem, type MenuSection, type NativeApp, NativeBridge, type NativeNode, type NetworkState, type NotificationPayload, type OpenFileOptions, type Overflow, type PanGestureState, type PerformanceMetrics, type Permission, type PermissionStatus, type PinchGestureState, type Platform, type Position, type Product, type ProductType, type Purchase, type PushNotificationPayload, type QRCodeResult, type RadioOption, type ResizeMode, type RotateGestureState, type Row, type SaveFileOptions, type SensorData, type SensorOptions, type ShadowOffset, type ShareContent, type ShareResult, type SharedElementFrame, type SharedElementRegistration, type SocialUser, type SpringOptions, type StatusBarStyle, type StyleProp, type StyleSheet, type SwipeGestureState, type TabConfig, type TapGestureState, type TextAlign, type TextDecorationLine, type TextDecorationStyle, type TextStyle, type TextTransform, type ThemeContext, type ThemeDefinition, type TimingOptions, type TransactionContext, type TransactionState, type TransactionUpdate, type TransformValue, type UpdateInfo, type UpdateStatus, type UseGestureOptions, type UseGestureReturn, VActionSheet, type VActionSheetProps, VActivityIndicator, type VActivityIndicatorProps, VAlertDialog, type VAlertDialogProps, VButton, type VButtonProps, VCheckbox, type VCheckboxProps, VDrawer, VDrawerItem, type VDrawerItemProps, type VDrawerProps, VDrawerSection, type VDrawerSectionProps, VDropdown, type VDropdownProps, VFlatList, type VFlatListProps, VImage, type VImageProps, VInput, type VInputProps, VKeyboardAvoiding, type VKeyboardAvoidingProps, VList, type VListProps, VModal, type VModalProps, VPicker, type VPickerProps, VPressable, type VPressableProps, VProgressBar, type VProgressBarProps, VRadio, type VRadioProps, VRefreshControl, type VRefreshControlProps, VSafeArea, type VSafeAreaProps, VScrollView, type VScrollViewProps, VSectionList, type VSectionListProps, VSegmentedControl, type VSegmentedControlProps, VSlider, type VSliderProps, VStatusBar, type VStatusBarProps, VSwitch, type VSwitchProps, VTabBar, type VTabBarProps, VText, type VTextProps, VVideo, type VVideoProps, VView, type VViewProps, VWebView, type VWebViewProps, type VersionInfo, type VideoCaptureOptions, type VideoCaptureResult, type ViewStyle, type WebSocketOptions, type WebSocketStatus, type WebViewSource, type WindowInfo, builtInComponents, clearSharedElementRegistry, createApp, createCommentNode, createDynamicStyleSheet, createNativeNode, createStyleSheet, createTextNode, createTheme, getRegisteredSharedElements, getSharedElementViewId, measureViewFrame, render, resetNodeId, useAccelerometer, useAnimation, useAppState, useAppleSignIn, useAsyncStorage, useAudio, useBackHandler, useBackgroundTask, useBiometry, useBluetooth, useCalendar, useCamera, useClipboard, useColorScheme, useComposedGestures, useContacts, useDatabase, useDeviceInfo, useDimensions, useDragDrop, useFileDialog, useFileSystem, useGeolocation, useGesture, useGoogleSignIn, useGyroscope, useHaptics, useHttp, useI18n, useIAP, useKeyboard, useLinking, useMenu, useNetwork, useNotifications, useOTAUpdate, usePerformance, usePermissions, usePlatform, useSecureStorage, useShare, useSharedElementTransition, useTeleport, useWebSocket, useWindow, vModel, vShow, validStyleProperties };