@thelacanians/vue-native-runtime 0.1.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.cjs +1847 -0
- package/dist/index.d.cts +1844 -0
- package/dist/index.d.ts +1844 -0
- package/dist/index.js +1773 -0
- package/package.json +48 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1844 @@
|
|
|
1
|
+
import * as _vue_runtime_core from '@vue/runtime-core';
|
|
2
|
+
import { Directive, App, Component } from '@vue/runtime-core';
|
|
3
|
+
export * from '@vue/runtime-core';
|
|
4
|
+
import * as _vue_reactivity from '@vue/reactivity';
|
|
5
|
+
|
|
6
|
+
interface NativeNode {
|
|
7
|
+
id: number;
|
|
8
|
+
type: string;
|
|
9
|
+
props: Record<string, any>;
|
|
10
|
+
children: NativeNode[];
|
|
11
|
+
parent: NativeNode | null;
|
|
12
|
+
isText: boolean;
|
|
13
|
+
text?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Reset the node ID counter. Used for testing and hot reload teardown.
|
|
17
|
+
*/
|
|
18
|
+
declare function resetNodeId(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Create a NativeNode representing a native UIKit view element.
|
|
21
|
+
* The node is wrapped with markRaw() to prevent Vue's reactivity system
|
|
22
|
+
* from deeply tracking its internals, which would cause performance issues
|
|
23
|
+
* and unnecessary re-renders.
|
|
24
|
+
*/
|
|
25
|
+
declare function createNativeNode(type: string): NativeNode;
|
|
26
|
+
/**
|
|
27
|
+
* Create a text node representing raw text content.
|
|
28
|
+
* Text nodes use the special '__TEXT__' type and carry their content
|
|
29
|
+
* in the `text` property.
|
|
30
|
+
*/
|
|
31
|
+
declare function createTextNode(text: string): NativeNode;
|
|
32
|
+
/**
|
|
33
|
+
* Create a comment node used as a placeholder by Vue's virtual DOM.
|
|
34
|
+
* Comments are no-ops on the native side — they exist only so Vue
|
|
35
|
+
* can track insertion points for conditional/list rendering.
|
|
36
|
+
*/
|
|
37
|
+
declare function createCommentNode(text: string): NativeNode;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The Vue 3 custom renderer instance for native iOS views.
|
|
41
|
+
*/
|
|
42
|
+
declare const render: _vue_runtime_core.RootRenderFunction<NativeNode>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* StyleSheet utility for Vue Native.
|
|
46
|
+
*
|
|
47
|
+
* Provides a createStyleSheet helper similar to React Native's StyleSheet.create().
|
|
48
|
+
* In development mode, validates style property names against a known list.
|
|
49
|
+
* In production, skips validation for performance.
|
|
50
|
+
* The returned style object is frozen to prevent accidental mutation.
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* Complete list of valid style property names recognized by the native layout
|
|
54
|
+
* engine (Yoga-based) and the UIKit rendering layer.
|
|
55
|
+
*/
|
|
56
|
+
declare const validStyleProperties: ReadonlySet<string>;
|
|
57
|
+
/**
|
|
58
|
+
* A single style declaration — a flat object of style properties.
|
|
59
|
+
*/
|
|
60
|
+
type StyleProp = Record<string, any>;
|
|
61
|
+
/**
|
|
62
|
+
* The result type of createStyleSheet — keys are the same as the input,
|
|
63
|
+
* values are frozen style objects.
|
|
64
|
+
*/
|
|
65
|
+
type StyleSheet<T extends Record<string, StyleProp>> = Readonly<{
|
|
66
|
+
[K in keyof T]: Readonly<T[K]>;
|
|
67
|
+
}>;
|
|
68
|
+
/**
|
|
69
|
+
* Create a style sheet object. This is the recommended way to define styles
|
|
70
|
+
* for Vue Native components.
|
|
71
|
+
*
|
|
72
|
+
* In development mode, each style property is validated against the known
|
|
73
|
+
* list of valid properties. Unknown properties will trigger a console warning.
|
|
74
|
+
*
|
|
75
|
+
* The returned object and each individual style are Object.freeze()'d to
|
|
76
|
+
* prevent accidental mutation.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const styles = createStyleSheet({
|
|
81
|
+
* container: {
|
|
82
|
+
* flex: 1,
|
|
83
|
+
* backgroundColor: '#ffffff',
|
|
84
|
+
* padding: 16,
|
|
85
|
+
* },
|
|
86
|
+
* title: {
|
|
87
|
+
* fontSize: 24,
|
|
88
|
+
* fontWeight: 'bold',
|
|
89
|
+
* color: '#333333',
|
|
90
|
+
* },
|
|
91
|
+
* })
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
declare function createStyleSheet<T extends Record<string, StyleProp>>(styles: T): StyleSheet<T>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* VView — the fundamental container component in Vue Native.
|
|
98
|
+
*
|
|
99
|
+
* Maps to UIView on iOS. Supports flexbox layout via the native Yoga
|
|
100
|
+
* layout engine. This is the equivalent of a <div> in web development.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```vue
|
|
104
|
+
* <VView :style="{ flex: 1, padding: 16, backgroundColor: '#fff' }">
|
|
105
|
+
* <VText>Hello World</VText>
|
|
106
|
+
* </VView>
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
declare const VView: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
110
|
+
style: ObjectConstructor;
|
|
111
|
+
testID: StringConstructor;
|
|
112
|
+
accessibilityLabel: StringConstructor;
|
|
113
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
114
|
+
[key: string]: any;
|
|
115
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
116
|
+
style: ObjectConstructor;
|
|
117
|
+
testID: StringConstructor;
|
|
118
|
+
accessibilityLabel: StringConstructor;
|
|
119
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* VText — component for displaying text content.
|
|
123
|
+
*
|
|
124
|
+
* Maps to UILabel on iOS. All text in Vue Native must be wrapped in a
|
|
125
|
+
* VText component — raw text outside of VText will not be rendered.
|
|
126
|
+
*
|
|
127
|
+
* Supports text-specific styling such as fontSize, fontWeight, color,
|
|
128
|
+
* lineHeight, letterSpacing, textAlign, and more.
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```vue
|
|
132
|
+
* <VText :style="{ fontSize: 18, color: '#333' }" :numberOfLines="2">
|
|
133
|
+
* Hello, Vue Native!
|
|
134
|
+
* </VText>
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
declare const VText: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
138
|
+
style: ObjectConstructor;
|
|
139
|
+
numberOfLines: NumberConstructor;
|
|
140
|
+
selectable: {
|
|
141
|
+
type: BooleanConstructor;
|
|
142
|
+
default: boolean;
|
|
143
|
+
};
|
|
144
|
+
accessibilityRole: StringConstructor;
|
|
145
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
146
|
+
[key: string]: any;
|
|
147
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
148
|
+
style: ObjectConstructor;
|
|
149
|
+
numberOfLines: NumberConstructor;
|
|
150
|
+
selectable: {
|
|
151
|
+
type: BooleanConstructor;
|
|
152
|
+
default: boolean;
|
|
153
|
+
};
|
|
154
|
+
accessibilityRole: StringConstructor;
|
|
155
|
+
}>> & Readonly<{}>, {
|
|
156
|
+
selectable: boolean;
|
|
157
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* VButton — a pressable button component.
|
|
161
|
+
*
|
|
162
|
+
* Maps to a tappable UIView on iOS with built-in press animation.
|
|
163
|
+
* Provides onPress and onLongPress event handling. The activeOpacity
|
|
164
|
+
* controls how transparent the button becomes when pressed.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```vue
|
|
168
|
+
* <VButton
|
|
169
|
+
* :style="{ backgroundColor: '#007AFF', padding: 12, borderRadius: 8 }"
|
|
170
|
+
* :onPress="handleTap"
|
|
171
|
+
* :disabled="isLoading"
|
|
172
|
+
* >
|
|
173
|
+
* <VText :style="{ color: '#fff', textAlign: 'center' }">Tap Me</VText>
|
|
174
|
+
* </VButton>
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
declare const VButton: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
178
|
+
style: ObjectConstructor;
|
|
179
|
+
disabled: {
|
|
180
|
+
type: BooleanConstructor;
|
|
181
|
+
default: boolean;
|
|
182
|
+
};
|
|
183
|
+
activeOpacity: {
|
|
184
|
+
type: NumberConstructor;
|
|
185
|
+
default: number;
|
|
186
|
+
};
|
|
187
|
+
onPress: FunctionConstructor;
|
|
188
|
+
onLongPress: FunctionConstructor;
|
|
189
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
190
|
+
[key: string]: any;
|
|
191
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
192
|
+
style: ObjectConstructor;
|
|
193
|
+
disabled: {
|
|
194
|
+
type: BooleanConstructor;
|
|
195
|
+
default: boolean;
|
|
196
|
+
};
|
|
197
|
+
activeOpacity: {
|
|
198
|
+
type: NumberConstructor;
|
|
199
|
+
default: number;
|
|
200
|
+
};
|
|
201
|
+
onPress: FunctionConstructor;
|
|
202
|
+
onLongPress: FunctionConstructor;
|
|
203
|
+
}>> & Readonly<{}>, {
|
|
204
|
+
disabled: boolean;
|
|
205
|
+
activeOpacity: number;
|
|
206
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* VInput — a text input component with v-model support.
|
|
210
|
+
*
|
|
211
|
+
* Maps to UITextField (single-line) or UITextView (multiline) on iOS.
|
|
212
|
+
* Implements Vue's v-model convention by accepting a `modelValue` prop
|
|
213
|
+
* and emitting `update:modelValue` on text change.
|
|
214
|
+
*
|
|
215
|
+
* The component maps `modelValue` to the native `text` prop and listens
|
|
216
|
+
* for `changetext` events from the native side to update the model.
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```vue
|
|
220
|
+
* <VInput
|
|
221
|
+
* v-model="username"
|
|
222
|
+
* placeholder="Enter your name"
|
|
223
|
+
* :style="{ borderWidth: 1, borderColor: '#ccc', padding: 8 }"
|
|
224
|
+
* @focus="onFocus"
|
|
225
|
+
* @blur="onBlur"
|
|
226
|
+
* />
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
declare const VInput: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
230
|
+
modelValue: {
|
|
231
|
+
type: StringConstructor;
|
|
232
|
+
default: string;
|
|
233
|
+
};
|
|
234
|
+
placeholder: StringConstructor;
|
|
235
|
+
secureTextEntry: {
|
|
236
|
+
type: BooleanConstructor;
|
|
237
|
+
default: boolean;
|
|
238
|
+
};
|
|
239
|
+
keyboardType: {
|
|
240
|
+
type: StringConstructor;
|
|
241
|
+
default: string;
|
|
242
|
+
};
|
|
243
|
+
returnKeyType: {
|
|
244
|
+
type: StringConstructor;
|
|
245
|
+
default: string;
|
|
246
|
+
};
|
|
247
|
+
autoCapitalize: {
|
|
248
|
+
type: StringConstructor;
|
|
249
|
+
default: string;
|
|
250
|
+
};
|
|
251
|
+
autoCorrect: {
|
|
252
|
+
type: BooleanConstructor;
|
|
253
|
+
default: boolean;
|
|
254
|
+
};
|
|
255
|
+
maxLength: NumberConstructor;
|
|
256
|
+
multiline: {
|
|
257
|
+
type: BooleanConstructor;
|
|
258
|
+
default: boolean;
|
|
259
|
+
};
|
|
260
|
+
style: ObjectConstructor;
|
|
261
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
262
|
+
[key: string]: any;
|
|
263
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur" | "submit")[], "update:modelValue" | "focus" | "blur" | "submit", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
264
|
+
modelValue: {
|
|
265
|
+
type: StringConstructor;
|
|
266
|
+
default: string;
|
|
267
|
+
};
|
|
268
|
+
placeholder: StringConstructor;
|
|
269
|
+
secureTextEntry: {
|
|
270
|
+
type: BooleanConstructor;
|
|
271
|
+
default: boolean;
|
|
272
|
+
};
|
|
273
|
+
keyboardType: {
|
|
274
|
+
type: StringConstructor;
|
|
275
|
+
default: string;
|
|
276
|
+
};
|
|
277
|
+
returnKeyType: {
|
|
278
|
+
type: StringConstructor;
|
|
279
|
+
default: string;
|
|
280
|
+
};
|
|
281
|
+
autoCapitalize: {
|
|
282
|
+
type: StringConstructor;
|
|
283
|
+
default: string;
|
|
284
|
+
};
|
|
285
|
+
autoCorrect: {
|
|
286
|
+
type: BooleanConstructor;
|
|
287
|
+
default: boolean;
|
|
288
|
+
};
|
|
289
|
+
maxLength: NumberConstructor;
|
|
290
|
+
multiline: {
|
|
291
|
+
type: BooleanConstructor;
|
|
292
|
+
default: boolean;
|
|
293
|
+
};
|
|
294
|
+
style: ObjectConstructor;
|
|
295
|
+
}>> & Readonly<{
|
|
296
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
297
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
298
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
299
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
300
|
+
}>, {
|
|
301
|
+
modelValue: string;
|
|
302
|
+
secureTextEntry: boolean;
|
|
303
|
+
keyboardType: string;
|
|
304
|
+
returnKeyType: string;
|
|
305
|
+
autoCapitalize: string;
|
|
306
|
+
autoCorrect: boolean;
|
|
307
|
+
multiline: boolean;
|
|
308
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* VSwitch — a boolean toggle switch component.
|
|
312
|
+
*
|
|
313
|
+
* Maps to UISwitch on iOS. Supports v-model for two-way binding.
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* ```vue
|
|
317
|
+
* <VSwitch v-model="notificationsEnabled" :onTintColor="'#34C759'" />
|
|
318
|
+
* ```
|
|
319
|
+
*/
|
|
320
|
+
declare const VSwitch: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
321
|
+
modelValue: {
|
|
322
|
+
type: BooleanConstructor;
|
|
323
|
+
default: boolean;
|
|
324
|
+
};
|
|
325
|
+
disabled: {
|
|
326
|
+
type: BooleanConstructor;
|
|
327
|
+
default: boolean;
|
|
328
|
+
};
|
|
329
|
+
onTintColor: StringConstructor;
|
|
330
|
+
thumbTintColor: StringConstructor;
|
|
331
|
+
style: ObjectConstructor;
|
|
332
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
333
|
+
[key: string]: any;
|
|
334
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
335
|
+
modelValue: {
|
|
336
|
+
type: BooleanConstructor;
|
|
337
|
+
default: boolean;
|
|
338
|
+
};
|
|
339
|
+
disabled: {
|
|
340
|
+
type: BooleanConstructor;
|
|
341
|
+
default: boolean;
|
|
342
|
+
};
|
|
343
|
+
onTintColor: StringConstructor;
|
|
344
|
+
thumbTintColor: StringConstructor;
|
|
345
|
+
style: ObjectConstructor;
|
|
346
|
+
}>> & Readonly<{
|
|
347
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
348
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
349
|
+
}>, {
|
|
350
|
+
disabled: boolean;
|
|
351
|
+
modelValue: boolean;
|
|
352
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* VActivityIndicator — a loading spinner component.
|
|
356
|
+
*
|
|
357
|
+
* Maps to UIActivityIndicatorView on iOS.
|
|
358
|
+
* Automatically hides when not animating (configurable via hidesWhenStopped).
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* ```vue
|
|
362
|
+
* <VActivityIndicator :animating="isLoading" color="#007AFF" size="large" />
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
365
|
+
declare const VActivityIndicator: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
366
|
+
animating: {
|
|
367
|
+
type: BooleanConstructor;
|
|
368
|
+
default: boolean;
|
|
369
|
+
};
|
|
370
|
+
color: StringConstructor;
|
|
371
|
+
size: {
|
|
372
|
+
type: StringConstructor;
|
|
373
|
+
default: string;
|
|
374
|
+
};
|
|
375
|
+
hidesWhenStopped: {
|
|
376
|
+
type: BooleanConstructor;
|
|
377
|
+
default: boolean;
|
|
378
|
+
};
|
|
379
|
+
style: ObjectConstructor;
|
|
380
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
381
|
+
[key: string]: any;
|
|
382
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
383
|
+
animating: {
|
|
384
|
+
type: BooleanConstructor;
|
|
385
|
+
default: boolean;
|
|
386
|
+
};
|
|
387
|
+
color: StringConstructor;
|
|
388
|
+
size: {
|
|
389
|
+
type: StringConstructor;
|
|
390
|
+
default: string;
|
|
391
|
+
};
|
|
392
|
+
hidesWhenStopped: {
|
|
393
|
+
type: BooleanConstructor;
|
|
394
|
+
default: boolean;
|
|
395
|
+
};
|
|
396
|
+
style: ObjectConstructor;
|
|
397
|
+
}>> & Readonly<{}>, {
|
|
398
|
+
size: string;
|
|
399
|
+
animating: boolean;
|
|
400
|
+
hidesWhenStopped: boolean;
|
|
401
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* VScrollView — a scrollable container component.
|
|
405
|
+
*
|
|
406
|
+
* Maps to UIScrollView on iOS. Children are automatically added to an
|
|
407
|
+
* inner content view so Yoga can compute their natural size unconstrained
|
|
408
|
+
* by the scroll view's visible bounds.
|
|
409
|
+
*
|
|
410
|
+
* @example
|
|
411
|
+
* ```vue
|
|
412
|
+
* <VScrollView :style="{ flex: 1 }">
|
|
413
|
+
* <VView v-for="item in items" :key="item.id" :style="styles.row">
|
|
414
|
+
* <VText>{{ item.title }}</VText>
|
|
415
|
+
* </VView>
|
|
416
|
+
* </VScrollView>
|
|
417
|
+
* ```
|
|
418
|
+
*/
|
|
419
|
+
declare const VScrollView: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
420
|
+
horizontal: {
|
|
421
|
+
type: BooleanConstructor;
|
|
422
|
+
default: boolean;
|
|
423
|
+
};
|
|
424
|
+
showsVerticalScrollIndicator: {
|
|
425
|
+
type: BooleanConstructor;
|
|
426
|
+
default: boolean;
|
|
427
|
+
};
|
|
428
|
+
showsHorizontalScrollIndicator: {
|
|
429
|
+
type: BooleanConstructor;
|
|
430
|
+
default: boolean;
|
|
431
|
+
};
|
|
432
|
+
scrollEnabled: {
|
|
433
|
+
type: BooleanConstructor;
|
|
434
|
+
default: boolean;
|
|
435
|
+
};
|
|
436
|
+
bounces: {
|
|
437
|
+
type: BooleanConstructor;
|
|
438
|
+
default: boolean;
|
|
439
|
+
};
|
|
440
|
+
pagingEnabled: {
|
|
441
|
+
type: BooleanConstructor;
|
|
442
|
+
default: boolean;
|
|
443
|
+
};
|
|
444
|
+
contentContainerStyle: ObjectConstructor;
|
|
445
|
+
/** Whether the pull-to-refresh indicator is active */
|
|
446
|
+
refreshing: {
|
|
447
|
+
type: BooleanConstructor;
|
|
448
|
+
default: boolean;
|
|
449
|
+
};
|
|
450
|
+
style: ObjectConstructor;
|
|
451
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
452
|
+
[key: string]: any;
|
|
453
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("scroll" | "refresh")[], "scroll" | "refresh", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
454
|
+
horizontal: {
|
|
455
|
+
type: BooleanConstructor;
|
|
456
|
+
default: boolean;
|
|
457
|
+
};
|
|
458
|
+
showsVerticalScrollIndicator: {
|
|
459
|
+
type: BooleanConstructor;
|
|
460
|
+
default: boolean;
|
|
461
|
+
};
|
|
462
|
+
showsHorizontalScrollIndicator: {
|
|
463
|
+
type: BooleanConstructor;
|
|
464
|
+
default: boolean;
|
|
465
|
+
};
|
|
466
|
+
scrollEnabled: {
|
|
467
|
+
type: BooleanConstructor;
|
|
468
|
+
default: boolean;
|
|
469
|
+
};
|
|
470
|
+
bounces: {
|
|
471
|
+
type: BooleanConstructor;
|
|
472
|
+
default: boolean;
|
|
473
|
+
};
|
|
474
|
+
pagingEnabled: {
|
|
475
|
+
type: BooleanConstructor;
|
|
476
|
+
default: boolean;
|
|
477
|
+
};
|
|
478
|
+
contentContainerStyle: ObjectConstructor;
|
|
479
|
+
/** Whether the pull-to-refresh indicator is active */
|
|
480
|
+
refreshing: {
|
|
481
|
+
type: BooleanConstructor;
|
|
482
|
+
default: boolean;
|
|
483
|
+
};
|
|
484
|
+
style: ObjectConstructor;
|
|
485
|
+
}>> & Readonly<{
|
|
486
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
487
|
+
onRefresh?: ((...args: any[]) => any) | undefined;
|
|
488
|
+
}>, {
|
|
489
|
+
horizontal: boolean;
|
|
490
|
+
showsVerticalScrollIndicator: boolean;
|
|
491
|
+
showsHorizontalScrollIndicator: boolean;
|
|
492
|
+
scrollEnabled: boolean;
|
|
493
|
+
bounces: boolean;
|
|
494
|
+
pagingEnabled: boolean;
|
|
495
|
+
refreshing: boolean;
|
|
496
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* VImage — the image display component in Vue Native.
|
|
500
|
+
*
|
|
501
|
+
* Maps to UIImageView on iOS. Loads images from URIs asynchronously
|
|
502
|
+
* with built-in caching. Supports various resize modes.
|
|
503
|
+
*
|
|
504
|
+
* @example
|
|
505
|
+
* ```vue
|
|
506
|
+
* <VImage
|
|
507
|
+
* :source="{ uri: 'https://example.com/photo.jpg' }"
|
|
508
|
+
* resizeMode="cover"
|
|
509
|
+
* :style="{ width: 200, height: 150 }"
|
|
510
|
+
* @load="onImageLoad"
|
|
511
|
+
* @error="onImageError"
|
|
512
|
+
* />
|
|
513
|
+
* ```
|
|
514
|
+
*/
|
|
515
|
+
declare const VImage: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
516
|
+
source: () => {
|
|
517
|
+
uri: string;
|
|
518
|
+
};
|
|
519
|
+
resizeMode: {
|
|
520
|
+
type: () => "cover" | "contain" | "stretch" | "center";
|
|
521
|
+
default: string;
|
|
522
|
+
};
|
|
523
|
+
style: ObjectConstructor;
|
|
524
|
+
testID: StringConstructor;
|
|
525
|
+
accessibilityLabel: StringConstructor;
|
|
526
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
527
|
+
[key: string]: any;
|
|
528
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("load" | "error")[], "load" | "error", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
529
|
+
source: () => {
|
|
530
|
+
uri: string;
|
|
531
|
+
};
|
|
532
|
+
resizeMode: {
|
|
533
|
+
type: () => "cover" | "contain" | "stretch" | "center";
|
|
534
|
+
default: string;
|
|
535
|
+
};
|
|
536
|
+
style: ObjectConstructor;
|
|
537
|
+
testID: StringConstructor;
|
|
538
|
+
accessibilityLabel: StringConstructor;
|
|
539
|
+
}>> & Readonly<{
|
|
540
|
+
onLoad?: ((...args: any[]) => any) | undefined;
|
|
541
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
542
|
+
}>, {
|
|
543
|
+
resizeMode: "cover" | "contain" | "stretch" | "center";
|
|
544
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* VKeyboardAvoiding — a container that adjusts its bottom padding when
|
|
548
|
+
* the keyboard appears, preventing content from being obscured.
|
|
549
|
+
*
|
|
550
|
+
* Maps to a native UIView that observes keyboard notifications and
|
|
551
|
+
* automatically adjusts the Yoga bottom padding.
|
|
552
|
+
*
|
|
553
|
+
* @example
|
|
554
|
+
* ```vue
|
|
555
|
+
* <VKeyboardAvoiding :style="{ flex: 1 }">
|
|
556
|
+
* <VInput placeholder="Type here..." />
|
|
557
|
+
* </VKeyboardAvoiding>
|
|
558
|
+
* ```
|
|
559
|
+
*/
|
|
560
|
+
declare const VKeyboardAvoiding: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
561
|
+
style: ObjectConstructor;
|
|
562
|
+
testID: StringConstructor;
|
|
563
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
564
|
+
[key: string]: any;
|
|
565
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
566
|
+
style: ObjectConstructor;
|
|
567
|
+
testID: StringConstructor;
|
|
568
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
569
|
+
|
|
570
|
+
declare const VSafeArea: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
571
|
+
style: {
|
|
572
|
+
type: ObjectConstructor;
|
|
573
|
+
default: () => {};
|
|
574
|
+
};
|
|
575
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
576
|
+
[key: string]: any;
|
|
577
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
578
|
+
style: {
|
|
579
|
+
type: ObjectConstructor;
|
|
580
|
+
default: () => {};
|
|
581
|
+
};
|
|
582
|
+
}>> & Readonly<{}>, {
|
|
583
|
+
style: Record<string, any>;
|
|
584
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
585
|
+
|
|
586
|
+
declare const VSlider: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
587
|
+
modelValue: {
|
|
588
|
+
type: NumberConstructor;
|
|
589
|
+
default: number;
|
|
590
|
+
};
|
|
591
|
+
min: {
|
|
592
|
+
type: NumberConstructor;
|
|
593
|
+
default: number;
|
|
594
|
+
};
|
|
595
|
+
max: {
|
|
596
|
+
type: NumberConstructor;
|
|
597
|
+
default: number;
|
|
598
|
+
};
|
|
599
|
+
style: {
|
|
600
|
+
type: ObjectConstructor;
|
|
601
|
+
default: () => {};
|
|
602
|
+
};
|
|
603
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
604
|
+
[key: string]: any;
|
|
605
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
606
|
+
modelValue: {
|
|
607
|
+
type: NumberConstructor;
|
|
608
|
+
default: number;
|
|
609
|
+
};
|
|
610
|
+
min: {
|
|
611
|
+
type: NumberConstructor;
|
|
612
|
+
default: number;
|
|
613
|
+
};
|
|
614
|
+
max: {
|
|
615
|
+
type: NumberConstructor;
|
|
616
|
+
default: number;
|
|
617
|
+
};
|
|
618
|
+
style: {
|
|
619
|
+
type: ObjectConstructor;
|
|
620
|
+
default: () => {};
|
|
621
|
+
};
|
|
622
|
+
}>> & Readonly<{
|
|
623
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
624
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
625
|
+
}>, {
|
|
626
|
+
style: Record<string, any>;
|
|
627
|
+
modelValue: number;
|
|
628
|
+
min: number;
|
|
629
|
+
max: number;
|
|
630
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* VList — A virtualized list component backed by UITableView on iOS.
|
|
634
|
+
*
|
|
635
|
+
* Renders each item in `data` via the default `#item` slot.
|
|
636
|
+
* Supports thousands of items with smooth scrolling and cell recycling.
|
|
637
|
+
*
|
|
638
|
+
* @example
|
|
639
|
+
* <VList
|
|
640
|
+
* :data="items"
|
|
641
|
+
* :estimatedItemHeight="72"
|
|
642
|
+
* :style="{ flex: 1 }"
|
|
643
|
+
* @endReached="loadMore"
|
|
644
|
+
* >
|
|
645
|
+
* <template #item="{ item, index }">
|
|
646
|
+
* <VView :style="rowStyle">
|
|
647
|
+
* <VText>{{ item.title }}</VText>
|
|
648
|
+
* </VView>
|
|
649
|
+
* </template>
|
|
650
|
+
* </VList>
|
|
651
|
+
*/
|
|
652
|
+
declare const VList: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
653
|
+
/** Array of data items to render */
|
|
654
|
+
data: {
|
|
655
|
+
type: () => any[];
|
|
656
|
+
required: true;
|
|
657
|
+
};
|
|
658
|
+
/** Extract a unique key from each item. Defaults to index as string. */
|
|
659
|
+
keyExtractor: {
|
|
660
|
+
type: () => (item: any, index: number) => string;
|
|
661
|
+
default: (_item: any, index: number) => string;
|
|
662
|
+
};
|
|
663
|
+
/** Estimated height per row in points. Used before layout runs. Default: 44 */
|
|
664
|
+
estimatedItemHeight: {
|
|
665
|
+
type: NumberConstructor;
|
|
666
|
+
default: number;
|
|
667
|
+
};
|
|
668
|
+
/** Show vertical scroll indicator. Default: true */
|
|
669
|
+
showsScrollIndicator: {
|
|
670
|
+
type: BooleanConstructor;
|
|
671
|
+
default: boolean;
|
|
672
|
+
};
|
|
673
|
+
/** Enable bounce at scroll boundaries. Default: true */
|
|
674
|
+
bounces: {
|
|
675
|
+
type: BooleanConstructor;
|
|
676
|
+
default: boolean;
|
|
677
|
+
};
|
|
678
|
+
/** Render list horizontally. Default: false */
|
|
679
|
+
horizontal: {
|
|
680
|
+
type: BooleanConstructor;
|
|
681
|
+
default: boolean;
|
|
682
|
+
};
|
|
683
|
+
style: {
|
|
684
|
+
type: ObjectConstructor;
|
|
685
|
+
default: () => {};
|
|
686
|
+
};
|
|
687
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
688
|
+
[key: string]: any;
|
|
689
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("scroll" | "endReached")[], "scroll" | "endReached", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
690
|
+
/** Array of data items to render */
|
|
691
|
+
data: {
|
|
692
|
+
type: () => any[];
|
|
693
|
+
required: true;
|
|
694
|
+
};
|
|
695
|
+
/** Extract a unique key from each item. Defaults to index as string. */
|
|
696
|
+
keyExtractor: {
|
|
697
|
+
type: () => (item: any, index: number) => string;
|
|
698
|
+
default: (_item: any, index: number) => string;
|
|
699
|
+
};
|
|
700
|
+
/** Estimated height per row in points. Used before layout runs. Default: 44 */
|
|
701
|
+
estimatedItemHeight: {
|
|
702
|
+
type: NumberConstructor;
|
|
703
|
+
default: number;
|
|
704
|
+
};
|
|
705
|
+
/** Show vertical scroll indicator. Default: true */
|
|
706
|
+
showsScrollIndicator: {
|
|
707
|
+
type: BooleanConstructor;
|
|
708
|
+
default: boolean;
|
|
709
|
+
};
|
|
710
|
+
/** Enable bounce at scroll boundaries. Default: true */
|
|
711
|
+
bounces: {
|
|
712
|
+
type: BooleanConstructor;
|
|
713
|
+
default: boolean;
|
|
714
|
+
};
|
|
715
|
+
/** Render list horizontally. Default: false */
|
|
716
|
+
horizontal: {
|
|
717
|
+
type: BooleanConstructor;
|
|
718
|
+
default: boolean;
|
|
719
|
+
};
|
|
720
|
+
style: {
|
|
721
|
+
type: ObjectConstructor;
|
|
722
|
+
default: () => {};
|
|
723
|
+
};
|
|
724
|
+
}>> & Readonly<{
|
|
725
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
726
|
+
onEndReached?: ((...args: any[]) => any) | undefined;
|
|
727
|
+
}>, {
|
|
728
|
+
style: Record<string, any>;
|
|
729
|
+
horizontal: boolean;
|
|
730
|
+
bounces: boolean;
|
|
731
|
+
keyExtractor: (item: any, index: number) => string;
|
|
732
|
+
estimatedItemHeight: number;
|
|
733
|
+
showsScrollIndicator: boolean;
|
|
734
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Window-level modal overlay component.
|
|
738
|
+
* Renders its children in a full-screen overlay on the key window.
|
|
739
|
+
*
|
|
740
|
+
* @example
|
|
741
|
+
* <VModal :visible="showModal" @dismiss="showModal = false">
|
|
742
|
+
* <VView style="..."><VText>Hello</VText></VView>
|
|
743
|
+
* </VModal>
|
|
744
|
+
*/
|
|
745
|
+
declare const VModal: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
746
|
+
visible: {
|
|
747
|
+
type: BooleanConstructor;
|
|
748
|
+
default: boolean;
|
|
749
|
+
};
|
|
750
|
+
style: {
|
|
751
|
+
type: ObjectConstructor;
|
|
752
|
+
default: () => {};
|
|
753
|
+
};
|
|
754
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
755
|
+
[key: string]: any;
|
|
756
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, "dismiss"[], "dismiss", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
757
|
+
visible: {
|
|
758
|
+
type: BooleanConstructor;
|
|
759
|
+
default: boolean;
|
|
760
|
+
};
|
|
761
|
+
style: {
|
|
762
|
+
type: ObjectConstructor;
|
|
763
|
+
default: () => {};
|
|
764
|
+
};
|
|
765
|
+
}>> & Readonly<{
|
|
766
|
+
onDismiss?: ((...args: any[]) => any) | undefined;
|
|
767
|
+
}>, {
|
|
768
|
+
style: Record<string, any>;
|
|
769
|
+
visible: boolean;
|
|
770
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
771
|
+
|
|
772
|
+
interface AlertButton {
|
|
773
|
+
label: string;
|
|
774
|
+
style?: 'default' | 'cancel' | 'destructive';
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* Native alert dialog component.
|
|
778
|
+
*
|
|
779
|
+
* @example
|
|
780
|
+
* <VAlertDialog
|
|
781
|
+
* :visible="showAlert"
|
|
782
|
+
* title="Confirm"
|
|
783
|
+
* message="Are you sure?"
|
|
784
|
+
* :buttons="[{ label: 'Cancel', style: 'cancel' }, { label: 'Delete', style: 'destructive' }]"
|
|
785
|
+
* @confirm="onConfirm"
|
|
786
|
+
* @cancel="showAlert = false"
|
|
787
|
+
* />
|
|
788
|
+
*/
|
|
789
|
+
declare const VAlertDialog: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
790
|
+
visible: {
|
|
791
|
+
type: BooleanConstructor;
|
|
792
|
+
default: boolean;
|
|
793
|
+
};
|
|
794
|
+
title: {
|
|
795
|
+
type: StringConstructor;
|
|
796
|
+
default: string;
|
|
797
|
+
};
|
|
798
|
+
message: {
|
|
799
|
+
type: StringConstructor;
|
|
800
|
+
default: string;
|
|
801
|
+
};
|
|
802
|
+
buttons: {
|
|
803
|
+
type: () => AlertButton[];
|
|
804
|
+
default: () => never[];
|
|
805
|
+
};
|
|
806
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
807
|
+
[key: string]: any;
|
|
808
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("confirm" | "cancel" | "action")[], "confirm" | "cancel" | "action", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
809
|
+
visible: {
|
|
810
|
+
type: BooleanConstructor;
|
|
811
|
+
default: boolean;
|
|
812
|
+
};
|
|
813
|
+
title: {
|
|
814
|
+
type: StringConstructor;
|
|
815
|
+
default: string;
|
|
816
|
+
};
|
|
817
|
+
message: {
|
|
818
|
+
type: StringConstructor;
|
|
819
|
+
default: string;
|
|
820
|
+
};
|
|
821
|
+
buttons: {
|
|
822
|
+
type: () => AlertButton[];
|
|
823
|
+
default: () => never[];
|
|
824
|
+
};
|
|
825
|
+
}>> & Readonly<{
|
|
826
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
827
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
828
|
+
onAction?: ((...args: any[]) => any) | undefined;
|
|
829
|
+
}>, {
|
|
830
|
+
visible: boolean;
|
|
831
|
+
title: string;
|
|
832
|
+
message: string;
|
|
833
|
+
buttons: AlertButton[];
|
|
834
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
835
|
+
|
|
836
|
+
type StatusBarStyle = 'default' | 'light-content' | 'dark-content';
|
|
837
|
+
/**
|
|
838
|
+
* Control the system status bar appearance.
|
|
839
|
+
*
|
|
840
|
+
* @example
|
|
841
|
+
* <VStatusBar bar-style="light-content" />
|
|
842
|
+
*/
|
|
843
|
+
declare const VStatusBar: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
844
|
+
barStyle: {
|
|
845
|
+
type: () => StatusBarStyle;
|
|
846
|
+
default: string;
|
|
847
|
+
};
|
|
848
|
+
hidden: {
|
|
849
|
+
type: BooleanConstructor;
|
|
850
|
+
default: boolean;
|
|
851
|
+
};
|
|
852
|
+
animated: {
|
|
853
|
+
type: BooleanConstructor;
|
|
854
|
+
default: boolean;
|
|
855
|
+
};
|
|
856
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
857
|
+
[key: string]: any;
|
|
858
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
859
|
+
barStyle: {
|
|
860
|
+
type: () => StatusBarStyle;
|
|
861
|
+
default: string;
|
|
862
|
+
};
|
|
863
|
+
hidden: {
|
|
864
|
+
type: BooleanConstructor;
|
|
865
|
+
default: boolean;
|
|
866
|
+
};
|
|
867
|
+
animated: {
|
|
868
|
+
type: BooleanConstructor;
|
|
869
|
+
default: boolean;
|
|
870
|
+
};
|
|
871
|
+
}>> & Readonly<{}>, {
|
|
872
|
+
barStyle: StatusBarStyle;
|
|
873
|
+
hidden: boolean;
|
|
874
|
+
animated: boolean;
|
|
875
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
876
|
+
|
|
877
|
+
interface WebViewSource {
|
|
878
|
+
uri?: string;
|
|
879
|
+
html?: string;
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* Embedded web view component backed by WKWebView.
|
|
883
|
+
*
|
|
884
|
+
* @example
|
|
885
|
+
* <VWebView :source="{ uri: 'https://example.com' }" style="flex: 1" @load="onLoad" />
|
|
886
|
+
*/
|
|
887
|
+
declare const VWebView: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
888
|
+
source: {
|
|
889
|
+
type: () => WebViewSource;
|
|
890
|
+
required: true;
|
|
891
|
+
};
|
|
892
|
+
style: {
|
|
893
|
+
type: ObjectConstructor;
|
|
894
|
+
default: () => {};
|
|
895
|
+
};
|
|
896
|
+
javaScriptEnabled: {
|
|
897
|
+
type: BooleanConstructor;
|
|
898
|
+
default: boolean;
|
|
899
|
+
};
|
|
900
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
901
|
+
[key: string]: any;
|
|
902
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("load" | "error" | "message")[], "load" | "error" | "message", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
903
|
+
source: {
|
|
904
|
+
type: () => WebViewSource;
|
|
905
|
+
required: true;
|
|
906
|
+
};
|
|
907
|
+
style: {
|
|
908
|
+
type: ObjectConstructor;
|
|
909
|
+
default: () => {};
|
|
910
|
+
};
|
|
911
|
+
javaScriptEnabled: {
|
|
912
|
+
type: BooleanConstructor;
|
|
913
|
+
default: boolean;
|
|
914
|
+
};
|
|
915
|
+
}>> & Readonly<{
|
|
916
|
+
onLoad?: ((...args: any[]) => any) | undefined;
|
|
917
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
918
|
+
onMessage?: ((...args: any[]) => any) | undefined;
|
|
919
|
+
}>, {
|
|
920
|
+
style: Record<string, any>;
|
|
921
|
+
javaScriptEnabled: boolean;
|
|
922
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* Horizontal progress indicator bar.
|
|
926
|
+
*
|
|
927
|
+
* @example
|
|
928
|
+
* <VProgressBar :progress="0.75" progressTintColor="#007AFF" />
|
|
929
|
+
*/
|
|
930
|
+
declare const VProgressBar: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
931
|
+
progress: {
|
|
932
|
+
type: NumberConstructor;
|
|
933
|
+
default: number;
|
|
934
|
+
};
|
|
935
|
+
progressTintColor: {
|
|
936
|
+
type: StringConstructor;
|
|
937
|
+
default: undefined;
|
|
938
|
+
};
|
|
939
|
+
trackTintColor: {
|
|
940
|
+
type: StringConstructor;
|
|
941
|
+
default: undefined;
|
|
942
|
+
};
|
|
943
|
+
animated: {
|
|
944
|
+
type: BooleanConstructor;
|
|
945
|
+
default: boolean;
|
|
946
|
+
};
|
|
947
|
+
style: {
|
|
948
|
+
type: ObjectConstructor;
|
|
949
|
+
default: () => {};
|
|
950
|
+
};
|
|
951
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
952
|
+
[key: string]: any;
|
|
953
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, {}, string, _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
954
|
+
progress: {
|
|
955
|
+
type: NumberConstructor;
|
|
956
|
+
default: number;
|
|
957
|
+
};
|
|
958
|
+
progressTintColor: {
|
|
959
|
+
type: StringConstructor;
|
|
960
|
+
default: undefined;
|
|
961
|
+
};
|
|
962
|
+
trackTintColor: {
|
|
963
|
+
type: StringConstructor;
|
|
964
|
+
default: undefined;
|
|
965
|
+
};
|
|
966
|
+
animated: {
|
|
967
|
+
type: BooleanConstructor;
|
|
968
|
+
default: boolean;
|
|
969
|
+
};
|
|
970
|
+
style: {
|
|
971
|
+
type: ObjectConstructor;
|
|
972
|
+
default: () => {};
|
|
973
|
+
};
|
|
974
|
+
}>> & Readonly<{}>, {
|
|
975
|
+
style: Record<string, any>;
|
|
976
|
+
animated: boolean;
|
|
977
|
+
progress: number;
|
|
978
|
+
progressTintColor: string;
|
|
979
|
+
trackTintColor: string;
|
|
980
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* Date/time picker component.
|
|
984
|
+
*
|
|
985
|
+
* @example
|
|
986
|
+
* <VPicker mode="date" :value="date" @change="date = $event.value" />
|
|
987
|
+
*/
|
|
988
|
+
declare const VPicker: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
989
|
+
mode: {
|
|
990
|
+
type: () => "date" | "time" | "datetime";
|
|
991
|
+
default: string;
|
|
992
|
+
};
|
|
993
|
+
value: {
|
|
994
|
+
type: NumberConstructor;
|
|
995
|
+
default: undefined;
|
|
996
|
+
};
|
|
997
|
+
minimumDate: {
|
|
998
|
+
type: NumberConstructor;
|
|
999
|
+
default: undefined;
|
|
1000
|
+
};
|
|
1001
|
+
maximumDate: {
|
|
1002
|
+
type: NumberConstructor;
|
|
1003
|
+
default: undefined;
|
|
1004
|
+
};
|
|
1005
|
+
minuteInterval: {
|
|
1006
|
+
type: NumberConstructor;
|
|
1007
|
+
default: number;
|
|
1008
|
+
};
|
|
1009
|
+
style: {
|
|
1010
|
+
type: ObjectConstructor;
|
|
1011
|
+
default: () => {};
|
|
1012
|
+
};
|
|
1013
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
1014
|
+
[key: string]: any;
|
|
1015
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, "change"[], "change", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
1016
|
+
mode: {
|
|
1017
|
+
type: () => "date" | "time" | "datetime";
|
|
1018
|
+
default: string;
|
|
1019
|
+
};
|
|
1020
|
+
value: {
|
|
1021
|
+
type: NumberConstructor;
|
|
1022
|
+
default: undefined;
|
|
1023
|
+
};
|
|
1024
|
+
minimumDate: {
|
|
1025
|
+
type: NumberConstructor;
|
|
1026
|
+
default: undefined;
|
|
1027
|
+
};
|
|
1028
|
+
maximumDate: {
|
|
1029
|
+
type: NumberConstructor;
|
|
1030
|
+
default: undefined;
|
|
1031
|
+
};
|
|
1032
|
+
minuteInterval: {
|
|
1033
|
+
type: NumberConstructor;
|
|
1034
|
+
default: number;
|
|
1035
|
+
};
|
|
1036
|
+
style: {
|
|
1037
|
+
type: ObjectConstructor;
|
|
1038
|
+
default: () => {};
|
|
1039
|
+
};
|
|
1040
|
+
}>> & Readonly<{
|
|
1041
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
1042
|
+
}>, {
|
|
1043
|
+
style: Record<string, any>;
|
|
1044
|
+
mode: "date" | "time" | "datetime";
|
|
1045
|
+
value: number;
|
|
1046
|
+
minimumDate: number;
|
|
1047
|
+
maximumDate: number;
|
|
1048
|
+
minuteInterval: number;
|
|
1049
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* Segmented control (tab strip) component.
|
|
1053
|
+
*
|
|
1054
|
+
* @example
|
|
1055
|
+
* <VSegmentedControl
|
|
1056
|
+
* :values="['Day', 'Week', 'Month']"
|
|
1057
|
+
* :selectedIndex="0"
|
|
1058
|
+
* @change="onSegmentChange"
|
|
1059
|
+
* />
|
|
1060
|
+
*/
|
|
1061
|
+
declare const VSegmentedControl: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
1062
|
+
values: {
|
|
1063
|
+
type: () => string[];
|
|
1064
|
+
required: true;
|
|
1065
|
+
};
|
|
1066
|
+
selectedIndex: {
|
|
1067
|
+
type: NumberConstructor;
|
|
1068
|
+
default: number;
|
|
1069
|
+
};
|
|
1070
|
+
tintColor: {
|
|
1071
|
+
type: StringConstructor;
|
|
1072
|
+
default: undefined;
|
|
1073
|
+
};
|
|
1074
|
+
enabled: {
|
|
1075
|
+
type: BooleanConstructor;
|
|
1076
|
+
default: boolean;
|
|
1077
|
+
};
|
|
1078
|
+
style: {
|
|
1079
|
+
type: ObjectConstructor;
|
|
1080
|
+
default: () => {};
|
|
1081
|
+
};
|
|
1082
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
1083
|
+
[key: string]: any;
|
|
1084
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, "change"[], "change", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
1085
|
+
values: {
|
|
1086
|
+
type: () => string[];
|
|
1087
|
+
required: true;
|
|
1088
|
+
};
|
|
1089
|
+
selectedIndex: {
|
|
1090
|
+
type: NumberConstructor;
|
|
1091
|
+
default: number;
|
|
1092
|
+
};
|
|
1093
|
+
tintColor: {
|
|
1094
|
+
type: StringConstructor;
|
|
1095
|
+
default: undefined;
|
|
1096
|
+
};
|
|
1097
|
+
enabled: {
|
|
1098
|
+
type: BooleanConstructor;
|
|
1099
|
+
default: boolean;
|
|
1100
|
+
};
|
|
1101
|
+
style: {
|
|
1102
|
+
type: ObjectConstructor;
|
|
1103
|
+
default: () => {};
|
|
1104
|
+
};
|
|
1105
|
+
}>> & Readonly<{
|
|
1106
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
1107
|
+
}>, {
|
|
1108
|
+
style: Record<string, any>;
|
|
1109
|
+
selectedIndex: number;
|
|
1110
|
+
tintColor: string;
|
|
1111
|
+
enabled: boolean;
|
|
1112
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
1113
|
+
|
|
1114
|
+
interface ActionSheetAction {
|
|
1115
|
+
label: string;
|
|
1116
|
+
style?: 'default' | 'cancel' | 'destructive';
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Native action sheet (bottom sheet with multiple actions).
|
|
1120
|
+
*
|
|
1121
|
+
* @example
|
|
1122
|
+
* <VActionSheet
|
|
1123
|
+
* :visible="showSheet"
|
|
1124
|
+
* title="Choose an option"
|
|
1125
|
+
* :actions="[
|
|
1126
|
+
* { label: 'Edit' },
|
|
1127
|
+
* { label: 'Delete', style: 'destructive' },
|
|
1128
|
+
* { label: 'Cancel', style: 'cancel' },
|
|
1129
|
+
* ]"
|
|
1130
|
+
* @action="onAction"
|
|
1131
|
+
* @cancel="showSheet = false"
|
|
1132
|
+
* />
|
|
1133
|
+
*/
|
|
1134
|
+
declare const VActionSheet: _vue_runtime_core.DefineComponent<_vue_runtime_core.ExtractPropTypes<{
|
|
1135
|
+
visible: {
|
|
1136
|
+
type: BooleanConstructor;
|
|
1137
|
+
default: boolean;
|
|
1138
|
+
};
|
|
1139
|
+
title: {
|
|
1140
|
+
type: StringConstructor;
|
|
1141
|
+
default: undefined;
|
|
1142
|
+
};
|
|
1143
|
+
message: {
|
|
1144
|
+
type: StringConstructor;
|
|
1145
|
+
default: undefined;
|
|
1146
|
+
};
|
|
1147
|
+
actions: {
|
|
1148
|
+
type: () => ActionSheetAction[];
|
|
1149
|
+
default: () => never[];
|
|
1150
|
+
};
|
|
1151
|
+
}>, () => _vue_runtime_core.VNode<_vue_runtime_core.RendererNode, _vue_runtime_core.RendererElement, {
|
|
1152
|
+
[key: string]: any;
|
|
1153
|
+
}>, {}, {}, {}, _vue_runtime_core.ComponentOptionsMixin, _vue_runtime_core.ComponentOptionsMixin, ("cancel" | "action")[], "cancel" | "action", _vue_runtime_core.PublicProps, Readonly<_vue_runtime_core.ExtractPropTypes<{
|
|
1154
|
+
visible: {
|
|
1155
|
+
type: BooleanConstructor;
|
|
1156
|
+
default: boolean;
|
|
1157
|
+
};
|
|
1158
|
+
title: {
|
|
1159
|
+
type: StringConstructor;
|
|
1160
|
+
default: undefined;
|
|
1161
|
+
};
|
|
1162
|
+
message: {
|
|
1163
|
+
type: StringConstructor;
|
|
1164
|
+
default: undefined;
|
|
1165
|
+
};
|
|
1166
|
+
actions: {
|
|
1167
|
+
type: () => ActionSheetAction[];
|
|
1168
|
+
default: () => never[];
|
|
1169
|
+
};
|
|
1170
|
+
}>> & Readonly<{
|
|
1171
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
1172
|
+
onAction?: ((...args: any[]) => any) | undefined;
|
|
1173
|
+
}>, {
|
|
1174
|
+
visible: boolean;
|
|
1175
|
+
title: string;
|
|
1176
|
+
message: string;
|
|
1177
|
+
actions: ActionSheetAction[];
|
|
1178
|
+
}, {}, {}, {}, string, _vue_runtime_core.ComponentProvideOptions, true, {}, any>;
|
|
1179
|
+
|
|
1180
|
+
/**
|
|
1181
|
+
* v-show directive for Vue Native.
|
|
1182
|
+
* Maps to the 'hidden' prop on native views (view.isHidden in Swift).
|
|
1183
|
+
*/
|
|
1184
|
+
declare const vShow: Directive<NativeNode>;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Haptic feedback composable.
|
|
1188
|
+
*
|
|
1189
|
+
* Wraps the native Haptics module to provide tactile feedback.
|
|
1190
|
+
*
|
|
1191
|
+
* @example
|
|
1192
|
+
* ```ts
|
|
1193
|
+
* const { vibrate, selectionChanged } = useHaptics()
|
|
1194
|
+
* vibrate('medium')
|
|
1195
|
+
* ```
|
|
1196
|
+
*/
|
|
1197
|
+
declare function useHaptics(): {
|
|
1198
|
+
vibrate: (style?: "light" | "medium" | "heavy" | "rigid" | "soft") => Promise<void>;
|
|
1199
|
+
notificationFeedback: (type?: "success" | "warning" | "error") => Promise<void>;
|
|
1200
|
+
selectionChanged: () => Promise<void>;
|
|
1201
|
+
};
|
|
1202
|
+
|
|
1203
|
+
/**
|
|
1204
|
+
* Async key-value storage composable backed by UserDefaults.
|
|
1205
|
+
*
|
|
1206
|
+
* All operations are Promise-based and run on a background thread.
|
|
1207
|
+
*
|
|
1208
|
+
* @example
|
|
1209
|
+
* ```ts
|
|
1210
|
+
* const storage = useAsyncStorage()
|
|
1211
|
+
* await storage.setItem('theme', 'dark')
|
|
1212
|
+
* const theme = await storage.getItem('theme')
|
|
1213
|
+
* ```
|
|
1214
|
+
*/
|
|
1215
|
+
declare function useAsyncStorage(): {
|
|
1216
|
+
getItem: (key: string) => Promise<string | null>;
|
|
1217
|
+
setItem: (key: string, value: string) => Promise<void>;
|
|
1218
|
+
removeItem: (key: string) => Promise<void>;
|
|
1219
|
+
getAllKeys: () => Promise<string[]>;
|
|
1220
|
+
clear: () => Promise<void>;
|
|
1221
|
+
};
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* Clipboard composable providing read/write access to UIPasteboard.
|
|
1225
|
+
*
|
|
1226
|
+
* `content` is a reactive ref that updates when `paste()` is called.
|
|
1227
|
+
*
|
|
1228
|
+
* @example
|
|
1229
|
+
* ```ts
|
|
1230
|
+
* const { copy, paste, content } = useClipboard()
|
|
1231
|
+
* await copy('Hello, World!')
|
|
1232
|
+
* const text = await paste()
|
|
1233
|
+
* ```
|
|
1234
|
+
*/
|
|
1235
|
+
declare function useClipboard(): {
|
|
1236
|
+
copy: (text: string) => Promise<void>;
|
|
1237
|
+
paste: () => Promise<string>;
|
|
1238
|
+
content: _vue_reactivity.Ref<string, string>;
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Device information composable.
|
|
1243
|
+
*
|
|
1244
|
+
* Fetches device info once on mount and exposes reactive refs.
|
|
1245
|
+
*
|
|
1246
|
+
* @example
|
|
1247
|
+
* ```ts
|
|
1248
|
+
* const { model, screenWidth, screenHeight } = useDeviceInfo()
|
|
1249
|
+
* ```
|
|
1250
|
+
*/
|
|
1251
|
+
declare function useDeviceInfo(): {
|
|
1252
|
+
model: _vue_reactivity.Ref<string, string>;
|
|
1253
|
+
systemVersion: _vue_reactivity.Ref<string, string>;
|
|
1254
|
+
systemName: _vue_reactivity.Ref<string, string>;
|
|
1255
|
+
name: _vue_reactivity.Ref<string, string>;
|
|
1256
|
+
screenWidth: _vue_reactivity.Ref<number, number>;
|
|
1257
|
+
screenHeight: _vue_reactivity.Ref<number, number>;
|
|
1258
|
+
scale: _vue_reactivity.Ref<number, number>;
|
|
1259
|
+
isLoaded: _vue_reactivity.Ref<boolean, boolean>;
|
|
1260
|
+
fetchInfo: () => Promise<void>;
|
|
1261
|
+
};
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* Keyboard state composable.
|
|
1265
|
+
*
|
|
1266
|
+
* Provides reactive keyboard visibility state and a dismiss function.
|
|
1267
|
+
* The `isVisible` and `height` refs are updated by native keyboard events
|
|
1268
|
+
* dispatched through a special keyboard node.
|
|
1269
|
+
*
|
|
1270
|
+
* @example
|
|
1271
|
+
* ```ts
|
|
1272
|
+
* const { isVisible, height, dismiss } = useKeyboard()
|
|
1273
|
+
* ```
|
|
1274
|
+
*/
|
|
1275
|
+
declare function useKeyboard(): {
|
|
1276
|
+
isVisible: _vue_reactivity.Ref<boolean, boolean>;
|
|
1277
|
+
height: _vue_reactivity.Ref<number, number>;
|
|
1278
|
+
dismiss: () => Promise<void>;
|
|
1279
|
+
getHeight: () => Promise<{
|
|
1280
|
+
height: number;
|
|
1281
|
+
isVisible: boolean;
|
|
1282
|
+
}>;
|
|
1283
|
+
};
|
|
1284
|
+
|
|
1285
|
+
declare const Easing: {
|
|
1286
|
+
readonly linear: "linear";
|
|
1287
|
+
readonly ease: "ease";
|
|
1288
|
+
readonly easeIn: "easeIn";
|
|
1289
|
+
readonly easeOut: "easeOut";
|
|
1290
|
+
readonly easeInOut: "easeInOut";
|
|
1291
|
+
};
|
|
1292
|
+
type EasingType = typeof Easing[keyof typeof Easing];
|
|
1293
|
+
interface TimingConfig {
|
|
1294
|
+
duration?: number;
|
|
1295
|
+
easing?: EasingType;
|
|
1296
|
+
delay?: number;
|
|
1297
|
+
}
|
|
1298
|
+
interface SpringConfig {
|
|
1299
|
+
tension?: number;
|
|
1300
|
+
friction?: number;
|
|
1301
|
+
mass?: number;
|
|
1302
|
+
velocity?: number;
|
|
1303
|
+
delay?: number;
|
|
1304
|
+
}
|
|
1305
|
+
interface KeyframeStep {
|
|
1306
|
+
offset: number;
|
|
1307
|
+
opacity?: number;
|
|
1308
|
+
translateX?: number;
|
|
1309
|
+
translateY?: number;
|
|
1310
|
+
scale?: number;
|
|
1311
|
+
scaleX?: number;
|
|
1312
|
+
scaleY?: number;
|
|
1313
|
+
}
|
|
1314
|
+
interface SequenceAnimation {
|
|
1315
|
+
type: 'timing' | 'spring';
|
|
1316
|
+
viewId: number;
|
|
1317
|
+
toStyles: Record<string, any>;
|
|
1318
|
+
options: TimingConfig | SpringConfig;
|
|
1319
|
+
}
|
|
1320
|
+
type TimingOptions = TimingConfig;
|
|
1321
|
+
type SpringOptions = SpringConfig;
|
|
1322
|
+
/**
|
|
1323
|
+
* Imperative animation API backed by native UIView/CALayer animations.
|
|
1324
|
+
*
|
|
1325
|
+
* @example
|
|
1326
|
+
* const { timing, spring, keyframe, sequence, parallel } = useAnimation()
|
|
1327
|
+
*
|
|
1328
|
+
* // Fade in
|
|
1329
|
+
* await timing(viewId, { opacity: 1 }, { duration: 300 })
|
|
1330
|
+
*
|
|
1331
|
+
* // Spring bounce
|
|
1332
|
+
* await spring(viewId, { translateY: 0 }, { tension: 40, friction: 7 })
|
|
1333
|
+
*
|
|
1334
|
+
* // Keyframe flash
|
|
1335
|
+
* await keyframe(viewId, [
|
|
1336
|
+
* { offset: 0, opacity: 1 },
|
|
1337
|
+
* { offset: 0.5, opacity: 0 },
|
|
1338
|
+
* { offset: 1, opacity: 1 },
|
|
1339
|
+
* ], { duration: 600 })
|
|
1340
|
+
*
|
|
1341
|
+
* // Sequence: fade then slide
|
|
1342
|
+
* await sequence([
|
|
1343
|
+
* { type: 'timing', viewId, toStyles: { opacity: 0 }, options: { duration: 200 } },
|
|
1344
|
+
* { type: 'timing', viewId, toStyles: { translateX: 100 }, options: { duration: 300 } },
|
|
1345
|
+
* ])
|
|
1346
|
+
*
|
|
1347
|
+
* // Parallel: fade + scale at once
|
|
1348
|
+
* await parallel([
|
|
1349
|
+
* { type: 'timing', viewId, toStyles: { opacity: 0 }, options: { duration: 300 } },
|
|
1350
|
+
* { type: 'spring', viewId, toStyles: { scale: 0 }, options: { tension: 50, friction: 10 } },
|
|
1351
|
+
* ])
|
|
1352
|
+
*/
|
|
1353
|
+
declare function useAnimation(): {
|
|
1354
|
+
timing: (viewId: number, toStyles: Record<string, any>, config?: TimingConfig) => Promise<void>;
|
|
1355
|
+
spring: (viewId: number, toStyles: Record<string, any>, config?: SpringConfig) => Promise<void>;
|
|
1356
|
+
keyframe: (viewId: number, steps: KeyframeStep[], config?: {
|
|
1357
|
+
duration?: number;
|
|
1358
|
+
}) => Promise<void>;
|
|
1359
|
+
sequence: (animations: SequenceAnimation[]) => Promise<void>;
|
|
1360
|
+
parallel: (animations: SequenceAnimation[]) => Promise<void>;
|
|
1361
|
+
fadeIn: (viewId: number, duration?: number) => Promise<void>;
|
|
1362
|
+
fadeOut: (viewId: number, duration?: number) => Promise<void>;
|
|
1363
|
+
slideInFromRight: (viewId: number, duration?: number) => Promise<void>;
|
|
1364
|
+
slideOutToRight: (viewId: number, duration?: number) => Promise<void>;
|
|
1365
|
+
Easing: {
|
|
1366
|
+
readonly linear: "linear";
|
|
1367
|
+
readonly ease: "ease";
|
|
1368
|
+
readonly easeIn: "easeIn";
|
|
1369
|
+
readonly easeOut: "easeOut";
|
|
1370
|
+
readonly easeInOut: "easeInOut";
|
|
1371
|
+
};
|
|
1372
|
+
};
|
|
1373
|
+
|
|
1374
|
+
type ConnectionType = 'wifi' | 'cellular' | 'ethernet' | 'none' | 'unknown';
|
|
1375
|
+
interface NetworkState {
|
|
1376
|
+
isConnected: boolean;
|
|
1377
|
+
connectionType: ConnectionType;
|
|
1378
|
+
}
|
|
1379
|
+
/**
|
|
1380
|
+
* Reactive network connectivity status.
|
|
1381
|
+
* Subscribes to native NWPathMonitor push events.
|
|
1382
|
+
*
|
|
1383
|
+
* @example
|
|
1384
|
+
* const { isConnected, connectionType } = useNetwork()
|
|
1385
|
+
*/
|
|
1386
|
+
declare function useNetwork(): {
|
|
1387
|
+
isConnected: _vue_reactivity.Ref<boolean, boolean>;
|
|
1388
|
+
connectionType: _vue_reactivity.Ref<ConnectionType, ConnectionType>;
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1391
|
+
type AppStateStatus = 'active' | 'inactive' | 'background' | 'unknown';
|
|
1392
|
+
/**
|
|
1393
|
+
* Reactive app foreground/background state.
|
|
1394
|
+
* Subscribes to native UIApplication lifecycle notifications.
|
|
1395
|
+
*
|
|
1396
|
+
* @example
|
|
1397
|
+
* const { state } = useAppState()
|
|
1398
|
+
* watch(state, s => { if (s === 'background') saveData() })
|
|
1399
|
+
*/
|
|
1400
|
+
declare function useAppState(): {
|
|
1401
|
+
state: _vue_reactivity.Ref<AppStateStatus, AppStateStatus>;
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* Utilities for opening URLs and checking URL scheme support.
|
|
1406
|
+
*
|
|
1407
|
+
* @example
|
|
1408
|
+
* const { openURL, canOpenURL } = useLinking()
|
|
1409
|
+
* await openURL('https://example.com')
|
|
1410
|
+
*/
|
|
1411
|
+
declare function useLinking(): {
|
|
1412
|
+
openURL: (url: string) => Promise<void>;
|
|
1413
|
+
canOpenURL: (url: string) => Promise<boolean>;
|
|
1414
|
+
};
|
|
1415
|
+
|
|
1416
|
+
interface ShareContent {
|
|
1417
|
+
message?: string;
|
|
1418
|
+
url?: string;
|
|
1419
|
+
}
|
|
1420
|
+
interface ShareResult {
|
|
1421
|
+
shared: boolean;
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Show the native share sheet.
|
|
1425
|
+
*
|
|
1426
|
+
* @example
|
|
1427
|
+
* const { share } = useShare()
|
|
1428
|
+
* await share({ message: 'Hello from Vue Native!', url: 'https://example.com' })
|
|
1429
|
+
*/
|
|
1430
|
+
declare function useShare(): {
|
|
1431
|
+
share: (content: ShareContent) => Promise<ShareResult>;
|
|
1432
|
+
};
|
|
1433
|
+
|
|
1434
|
+
type Permission = 'camera' | 'microphone' | 'photos' | 'location' | 'locationAlways' | 'notifications';
|
|
1435
|
+
type PermissionStatus = 'granted' | 'denied' | 'restricted' | 'limited' | 'notDetermined';
|
|
1436
|
+
/**
|
|
1437
|
+
* Check and request runtime permissions.
|
|
1438
|
+
*
|
|
1439
|
+
* @example
|
|
1440
|
+
* const { request, check } = usePermissions()
|
|
1441
|
+
* const status = await request('camera')
|
|
1442
|
+
* if (status === 'granted') { ... }
|
|
1443
|
+
*/
|
|
1444
|
+
declare function usePermissions(): {
|
|
1445
|
+
request: (permission: Permission) => Promise<PermissionStatus>;
|
|
1446
|
+
check: (permission: Permission) => Promise<PermissionStatus>;
|
|
1447
|
+
};
|
|
1448
|
+
|
|
1449
|
+
interface GeoCoordinates {
|
|
1450
|
+
latitude: number;
|
|
1451
|
+
longitude: number;
|
|
1452
|
+
altitude: number;
|
|
1453
|
+
accuracy: number;
|
|
1454
|
+
altitudeAccuracy: number;
|
|
1455
|
+
heading: number;
|
|
1456
|
+
speed: number;
|
|
1457
|
+
timestamp: number;
|
|
1458
|
+
}
|
|
1459
|
+
/**
|
|
1460
|
+
* GPS location access with optional continuous watching.
|
|
1461
|
+
*
|
|
1462
|
+
* @example
|
|
1463
|
+
* const { coords, getCurrentPosition } = useGeolocation()
|
|
1464
|
+
* await getCurrentPosition()
|
|
1465
|
+
* console.log(coords.value?.latitude)
|
|
1466
|
+
*/
|
|
1467
|
+
declare function useGeolocation(): {
|
|
1468
|
+
coords: _vue_reactivity.Ref<{
|
|
1469
|
+
latitude: number;
|
|
1470
|
+
longitude: number;
|
|
1471
|
+
altitude: number;
|
|
1472
|
+
accuracy: number;
|
|
1473
|
+
altitudeAccuracy: number;
|
|
1474
|
+
heading: number;
|
|
1475
|
+
speed: number;
|
|
1476
|
+
timestamp: number;
|
|
1477
|
+
} | null, GeoCoordinates | {
|
|
1478
|
+
latitude: number;
|
|
1479
|
+
longitude: number;
|
|
1480
|
+
altitude: number;
|
|
1481
|
+
accuracy: number;
|
|
1482
|
+
altitudeAccuracy: number;
|
|
1483
|
+
heading: number;
|
|
1484
|
+
speed: number;
|
|
1485
|
+
timestamp: number;
|
|
1486
|
+
} | null>;
|
|
1487
|
+
error: _vue_reactivity.Ref<string | null, string | null>;
|
|
1488
|
+
getCurrentPosition: () => Promise<GeoCoordinates>;
|
|
1489
|
+
watchPosition: () => Promise<number>;
|
|
1490
|
+
clearWatch: (id: number) => Promise<void>;
|
|
1491
|
+
};
|
|
1492
|
+
|
|
1493
|
+
interface CameraOptions {
|
|
1494
|
+
mediaType?: 'photo' | 'video';
|
|
1495
|
+
quality?: number;
|
|
1496
|
+
selectionLimit?: number;
|
|
1497
|
+
}
|
|
1498
|
+
interface CameraResult {
|
|
1499
|
+
uri: string;
|
|
1500
|
+
width: number;
|
|
1501
|
+
height: number;
|
|
1502
|
+
type: string;
|
|
1503
|
+
didCancel?: boolean;
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Launch the camera or image library.
|
|
1507
|
+
*
|
|
1508
|
+
* @example
|
|
1509
|
+
* const { launchCamera, launchImageLibrary } = useCamera()
|
|
1510
|
+
* const result = await launchImageLibrary()
|
|
1511
|
+
* if (!result.didCancel) imageUri.value = result.uri
|
|
1512
|
+
*/
|
|
1513
|
+
declare function useCamera(): {
|
|
1514
|
+
launchCamera: (options?: CameraOptions) => Promise<CameraResult>;
|
|
1515
|
+
launchImageLibrary: (options?: CameraOptions) => Promise<CameraResult>;
|
|
1516
|
+
};
|
|
1517
|
+
|
|
1518
|
+
interface LocalNotification {
|
|
1519
|
+
id?: string;
|
|
1520
|
+
title: string;
|
|
1521
|
+
body: string;
|
|
1522
|
+
delay?: number;
|
|
1523
|
+
sound?: 'default' | null;
|
|
1524
|
+
badge?: number;
|
|
1525
|
+
data?: Record<string, any>;
|
|
1526
|
+
}
|
|
1527
|
+
interface NotificationPayload {
|
|
1528
|
+
id: string;
|
|
1529
|
+
title: string;
|
|
1530
|
+
body: string;
|
|
1531
|
+
data: Record<string, any>;
|
|
1532
|
+
action?: string;
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* Local notification scheduling and permission management.
|
|
1536
|
+
*
|
|
1537
|
+
* @example
|
|
1538
|
+
* const { requestPermission, scheduleLocal, onNotification } = useNotifications()
|
|
1539
|
+
* await requestPermission()
|
|
1540
|
+
* await scheduleLocal({ title: 'Reminder', body: 'Don\'t forget!', delay: 5 })
|
|
1541
|
+
*/
|
|
1542
|
+
declare function useNotifications(): {
|
|
1543
|
+
isGranted: _vue_reactivity.Ref<boolean, boolean>;
|
|
1544
|
+
requestPermission: () => Promise<boolean>;
|
|
1545
|
+
getPermissionStatus: () => Promise<string>;
|
|
1546
|
+
scheduleLocal: (notification: LocalNotification) => Promise<string>;
|
|
1547
|
+
cancel: (id: string) => Promise<void>;
|
|
1548
|
+
cancelAll: () => Promise<void>;
|
|
1549
|
+
onNotification: (handler: (payload: NotificationPayload) => void) => () => void;
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1552
|
+
type BiometryType = 'faceID' | 'touchID' | 'opticID' | 'none';
|
|
1553
|
+
interface BiometryResult {
|
|
1554
|
+
success: boolean;
|
|
1555
|
+
error?: string;
|
|
1556
|
+
}
|
|
1557
|
+
/**
|
|
1558
|
+
* Biometric authentication (Face ID / Touch ID).
|
|
1559
|
+
*
|
|
1560
|
+
* @example
|
|
1561
|
+
* const { authenticate, getSupportedBiometry } = useBiometry()
|
|
1562
|
+
* const type = await getSupportedBiometry() // 'faceID' | 'touchID' | 'none'
|
|
1563
|
+
* const result = await authenticate('Confirm your identity')
|
|
1564
|
+
*/
|
|
1565
|
+
declare function useBiometry(): {
|
|
1566
|
+
authenticate: (reason?: string) => Promise<BiometryResult>;
|
|
1567
|
+
getSupportedBiometry: () => Promise<BiometryType>;
|
|
1568
|
+
isAvailable: () => Promise<boolean>;
|
|
1569
|
+
};
|
|
1570
|
+
|
|
1571
|
+
interface HttpRequestConfig {
|
|
1572
|
+
baseURL?: string;
|
|
1573
|
+
headers?: Record<string, string>;
|
|
1574
|
+
timeout?: number;
|
|
1575
|
+
}
|
|
1576
|
+
interface HttpResponse<T = any> {
|
|
1577
|
+
data: T;
|
|
1578
|
+
status: number;
|
|
1579
|
+
ok: boolean;
|
|
1580
|
+
headers: Record<string, string>;
|
|
1581
|
+
}
|
|
1582
|
+
/**
|
|
1583
|
+
* HTTP client composable with reactive loading/error state.
|
|
1584
|
+
* Uses the native fetch polyfill under the hood.
|
|
1585
|
+
*
|
|
1586
|
+
* @example
|
|
1587
|
+
* const http = useHttp({ baseURL: 'https://api.example.com' })
|
|
1588
|
+
* const users = await http.get<User[]>('/users')
|
|
1589
|
+
*/
|
|
1590
|
+
declare function useHttp(config?: HttpRequestConfig): {
|
|
1591
|
+
loading: _vue_reactivity.Ref<boolean, boolean>;
|
|
1592
|
+
error: _vue_reactivity.Ref<string | null, string | null>;
|
|
1593
|
+
get: <T = any>(url: string, headers?: Record<string, string>) => Promise<HttpResponse<T>>;
|
|
1594
|
+
post: <T = any>(url: string, body?: any, headers?: Record<string, string>) => Promise<HttpResponse<T>>;
|
|
1595
|
+
put: <T = any>(url: string, body?: any, headers?: Record<string, string>) => Promise<HttpResponse<T>>;
|
|
1596
|
+
patch: <T = any>(url: string, body?: any, headers?: Record<string, string>) => Promise<HttpResponse<T>>;
|
|
1597
|
+
delete: <T = any>(url: string, headers?: Record<string, string>) => Promise<HttpResponse<T>>;
|
|
1598
|
+
};
|
|
1599
|
+
|
|
1600
|
+
type ColorScheme = 'light' | 'dark';
|
|
1601
|
+
/**
|
|
1602
|
+
* Reactive dark mode / color scheme detection.
|
|
1603
|
+
* Updates automatically when the user switches between light and dark mode.
|
|
1604
|
+
*
|
|
1605
|
+
* @example
|
|
1606
|
+
* const { colorScheme, isDark } = useColorScheme()
|
|
1607
|
+
*
|
|
1608
|
+
* const bgColor = computed(() => isDark.value ? '#000' : '#FFF')
|
|
1609
|
+
*/
|
|
1610
|
+
declare function useColorScheme(): {
|
|
1611
|
+
colorScheme: _vue_reactivity.Ref<ColorScheme, ColorScheme>;
|
|
1612
|
+
isDark: _vue_reactivity.Ref<boolean, boolean>;
|
|
1613
|
+
};
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* useBackHandler — intercept the hardware back button press (Android).
|
|
1617
|
+
*
|
|
1618
|
+
* The callback should return `true` if the back press was handled
|
|
1619
|
+
* (preventing default behavior), or `false` to allow default navigation.
|
|
1620
|
+
*
|
|
1621
|
+
* On iOS this is a no-op since there is no hardware back button,
|
|
1622
|
+
* but the event can still be dispatched programmatically.
|
|
1623
|
+
*
|
|
1624
|
+
* @example
|
|
1625
|
+
* ```ts
|
|
1626
|
+
* useBackHandler(() => {
|
|
1627
|
+
* if (hasUnsavedChanges.value) {
|
|
1628
|
+
* showDiscardDialog()
|
|
1629
|
+
* return true // prevent default back
|
|
1630
|
+
* }
|
|
1631
|
+
* return false // allow default back
|
|
1632
|
+
* })
|
|
1633
|
+
* ```
|
|
1634
|
+
*/
|
|
1635
|
+
declare function useBackHandler(handler: () => boolean): void;
|
|
1636
|
+
|
|
1637
|
+
/**
|
|
1638
|
+
* NativeBridge -- the communication layer between JavaScript and Swift/UIKit.
|
|
1639
|
+
*
|
|
1640
|
+
* All renderer operations (create, update, insert, remove) are batched into
|
|
1641
|
+
* a pending operations array. On the first enqueue within a microtask cycle,
|
|
1642
|
+
* a queueMicrotask callback is scheduled. When the microtask fires, all
|
|
1643
|
+
* accumulated operations are JSON-serialized and sent to Swift via
|
|
1644
|
+
* `globalThis.__VN_flushOperations(json)`.
|
|
1645
|
+
*
|
|
1646
|
+
* Operation format:
|
|
1647
|
+
* { op: "<name>", args: [arg0, arg1, ...] }
|
|
1648
|
+
*
|
|
1649
|
+
* This matches the Swift NativeBridge.processOperations() parser which
|
|
1650
|
+
* extracts `operation["op"]` and `operation["args"]`.
|
|
1651
|
+
*
|
|
1652
|
+
* This batching strategy ensures that all synchronous Vue updates triggered
|
|
1653
|
+
* by a single state change are coalesced into one native bridge call,
|
|
1654
|
+
* minimizing JS-to-native context switches.
|
|
1655
|
+
*/
|
|
1656
|
+
type EventCallback = (payload: any) => void;
|
|
1657
|
+
declare class NativeBridgeImpl {
|
|
1658
|
+
/** Pending operations waiting to be flushed to native */
|
|
1659
|
+
private pendingOps;
|
|
1660
|
+
/** Whether a microtask flush has been scheduled */
|
|
1661
|
+
private flushScheduled;
|
|
1662
|
+
/** Event handler registry: "nodeId:eventName" -> callback */
|
|
1663
|
+
private eventHandlers;
|
|
1664
|
+
/** Pending async callbacks from native module invocations */
|
|
1665
|
+
private pendingCallbacks;
|
|
1666
|
+
/** Auto-incrementing callback ID for async native module calls */
|
|
1667
|
+
private nextCallbackId;
|
|
1668
|
+
/** Global event listeners: eventName -> Set of callbacks */
|
|
1669
|
+
private globalEventHandlers;
|
|
1670
|
+
/**
|
|
1671
|
+
* Enqueue an operation to be sent to the native side.
|
|
1672
|
+
* If this is the first operation in the current microtask cycle,
|
|
1673
|
+
* schedule a flush via queueMicrotask.
|
|
1674
|
+
*/
|
|
1675
|
+
private enqueue;
|
|
1676
|
+
/**
|
|
1677
|
+
* Flush all pending operations to the native side by calling
|
|
1678
|
+
* __VN_flushOperations with the JSON-serialized operation array.
|
|
1679
|
+
*/
|
|
1680
|
+
private flush;
|
|
1681
|
+
/**
|
|
1682
|
+
* Force an immediate synchronous flush. Used for testing and for
|
|
1683
|
+
* critical operations that must be committed before the next microtask.
|
|
1684
|
+
*/
|
|
1685
|
+
flushSync(): void;
|
|
1686
|
+
/**
|
|
1687
|
+
* Return the number of pending operations. Useful for testing.
|
|
1688
|
+
*/
|
|
1689
|
+
getPendingCount(): number;
|
|
1690
|
+
/**
|
|
1691
|
+
* Tell native to create a new view node.
|
|
1692
|
+
* Swift handler: handleCreate(args: [nodeId, type])
|
|
1693
|
+
*/
|
|
1694
|
+
createNode(nodeId: number, type: string): void;
|
|
1695
|
+
/**
|
|
1696
|
+
* Tell native to create a text node.
|
|
1697
|
+
* Swift handler: handleCreateText(args: [nodeId, text])
|
|
1698
|
+
*/
|
|
1699
|
+
createTextNode(nodeId: number, text: string): void;
|
|
1700
|
+
/**
|
|
1701
|
+
* Update the text content of a text node.
|
|
1702
|
+
* Swift handler: handleSetText(args: [nodeId, text])
|
|
1703
|
+
*/
|
|
1704
|
+
setText(nodeId: number, text: string): void;
|
|
1705
|
+
/**
|
|
1706
|
+
* Set the text content of an element node (replaces all children with text).
|
|
1707
|
+
* Swift handler: handleSetElementText(args: [nodeId, text])
|
|
1708
|
+
*/
|
|
1709
|
+
setElementText(nodeId: number, text: string): void;
|
|
1710
|
+
/**
|
|
1711
|
+
* Update a single property on a native view.
|
|
1712
|
+
* Swift handler: handleUpdateProp(args: [nodeId, key, value])
|
|
1713
|
+
*/
|
|
1714
|
+
updateProp(nodeId: number, key: string, value: any): void;
|
|
1715
|
+
/**
|
|
1716
|
+
* Update a single style property on a native view.
|
|
1717
|
+
* Swift handler: handleUpdateStyle(args: [nodeId, { key: value }])
|
|
1718
|
+
*
|
|
1719
|
+
* Each style property update is sent as a dictionary with one key,
|
|
1720
|
+
* matching the Swift side which iterates over the dictionary entries.
|
|
1721
|
+
*/
|
|
1722
|
+
updateStyle(nodeId: number, key: string, value: any): void;
|
|
1723
|
+
/**
|
|
1724
|
+
* Append a child node to a parent node.
|
|
1725
|
+
* Swift handler: handleAppendChild(args: [parentId, childId])
|
|
1726
|
+
*/
|
|
1727
|
+
appendChild(parentId: number, childId: number): void;
|
|
1728
|
+
/**
|
|
1729
|
+
* Insert a child node before a reference node within a parent.
|
|
1730
|
+
* Swift handler: handleInsertBefore(args: [parentId, childId, beforeId])
|
|
1731
|
+
*/
|
|
1732
|
+
insertBefore(parentId: number, childId: number, anchorId: number): void;
|
|
1733
|
+
/**
|
|
1734
|
+
* Remove a child node from its parent.
|
|
1735
|
+
* Swift handler: handleRemoveChild(args: [childId])
|
|
1736
|
+
* Note: Swift only needs the childId since it calls removeFromSuperview().
|
|
1737
|
+
*/
|
|
1738
|
+
removeChild(_parentId: number, childId: number): void;
|
|
1739
|
+
/**
|
|
1740
|
+
* Register an event listener for a node.
|
|
1741
|
+
* The native side will call __VN_handleEvent when this event fires.
|
|
1742
|
+
* Swift handler: handleAddEventListener(args: [nodeId, eventName])
|
|
1743
|
+
*/
|
|
1744
|
+
addEventListener(nodeId: number, eventName: string, callback: EventCallback): void;
|
|
1745
|
+
/**
|
|
1746
|
+
* Remove a previously registered event listener.
|
|
1747
|
+
* Swift handler: handleRemoveEventListener(args: [nodeId, eventName])
|
|
1748
|
+
*/
|
|
1749
|
+
removeEventListener(nodeId: number, eventName: string): void;
|
|
1750
|
+
/**
|
|
1751
|
+
* Called from Swift via globalThis.__VN_handleEvent when a native event fires.
|
|
1752
|
+
* Looks up the registered handler and invokes it with the event payload.
|
|
1753
|
+
*/
|
|
1754
|
+
handleNativeEvent(nodeId: number, eventName: string, payload: any): void;
|
|
1755
|
+
/**
|
|
1756
|
+
* Tell native which node ID is the root of the view tree.
|
|
1757
|
+
* Swift handler: handleSetRootView(args: [nodeId])
|
|
1758
|
+
*/
|
|
1759
|
+
setRootView(nodeId: number): void;
|
|
1760
|
+
/**
|
|
1761
|
+
* Invoke a native module method asynchronously. Returns a Promise that
|
|
1762
|
+
* resolves when Swift/Kotlin calls __VN_resolveCallback with the matching callbackId.
|
|
1763
|
+
*
|
|
1764
|
+
* A 30-second timeout is applied. If the native side never responds (e.g. due to
|
|
1765
|
+
* a crash or unregistered module), the Promise rejects with a clear error instead
|
|
1766
|
+
* of hanging forever.
|
|
1767
|
+
*/
|
|
1768
|
+
invokeNativeModule(moduleName: string, methodName: string, args?: any[], timeoutMs?: number): Promise<any>;
|
|
1769
|
+
/**
|
|
1770
|
+
* Invoke a native module method synchronously.
|
|
1771
|
+
* This sends the operation immediately and expects no callback.
|
|
1772
|
+
* Use sparingly -- prefer the async variant.
|
|
1773
|
+
*/
|
|
1774
|
+
invokeNativeModuleSync(moduleName: string, methodName: string, args?: any[]): void;
|
|
1775
|
+
/**
|
|
1776
|
+
* Called from Swift via globalThis.__VN_resolveCallback when an async
|
|
1777
|
+
* native module invocation completes.
|
|
1778
|
+
*/
|
|
1779
|
+
resolveCallback(callbackId: number, result: any, error: any): void;
|
|
1780
|
+
/**
|
|
1781
|
+
* Register a handler for a push-based global event from native.
|
|
1782
|
+
* Returns an unsubscribe function.
|
|
1783
|
+
*/
|
|
1784
|
+
onGlobalEvent(eventName: string, handler: (payload: any) => void): () => void;
|
|
1785
|
+
/**
|
|
1786
|
+
* Called from Swift via globalThis.__VN_handleGlobalEvent when a push event fires.
|
|
1787
|
+
*/
|
|
1788
|
+
handleGlobalEvent(eventName: string, payloadJSON: string): void;
|
|
1789
|
+
/**
|
|
1790
|
+
* Reset all internal state. Used for testing.
|
|
1791
|
+
*/
|
|
1792
|
+
reset(): void;
|
|
1793
|
+
}
|
|
1794
|
+
/**
|
|
1795
|
+
* Singleton bridge instance used by the renderer and application code.
|
|
1796
|
+
*/
|
|
1797
|
+
declare const NativeBridge: NativeBridgeImpl;
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* @thelacanians/vue-native-runtime — Vue 3 custom renderer for native iOS views.
|
|
1801
|
+
*
|
|
1802
|
+
* This is the main entry point for the Vue Native runtime. It provides:
|
|
1803
|
+
* - A createApp() function that sets up the native renderer
|
|
1804
|
+
* - All Vue 3 Composition API exports (ref, reactive, computed, watch, etc.)
|
|
1805
|
+
* - Built-in native components (VView, VText, VButton, VInput)
|
|
1806
|
+
* - createStyleSheet() for defining native styles
|
|
1807
|
+
* - NativeBridge for advanced native interop
|
|
1808
|
+
*/
|
|
1809
|
+
|
|
1810
|
+
/**
|
|
1811
|
+
* Extended App interface with the .start() method for mounting to native.
|
|
1812
|
+
*/
|
|
1813
|
+
interface NativeApp extends App {
|
|
1814
|
+
/**
|
|
1815
|
+
* Mount the application to a virtual root node and tell the native side
|
|
1816
|
+
* to begin rendering. This replaces the web-style app.mount('#app').
|
|
1817
|
+
*
|
|
1818
|
+
* @returns The virtual root NativeNode
|
|
1819
|
+
*/
|
|
1820
|
+
start(): NativeNode;
|
|
1821
|
+
}
|
|
1822
|
+
/**
|
|
1823
|
+
* Create a Vue Native application.
|
|
1824
|
+
*
|
|
1825
|
+
* This is the primary entry point for creating a Vue Native app. It wraps
|
|
1826
|
+
* Vue 3's createApp with native-specific setup:
|
|
1827
|
+
*
|
|
1828
|
+
* 1. Creates the app using the custom native renderer
|
|
1829
|
+
* 2. Registers all built-in components (VView, VText, VButton, VInput)
|
|
1830
|
+
* 3. Adds a `.start()` method that creates a virtual root, tells the bridge
|
|
1831
|
+
* to register it as the root view, and mounts the Vue app to it.
|
|
1832
|
+
*
|
|
1833
|
+
* @example
|
|
1834
|
+
* ```ts
|
|
1835
|
+
* import { createApp } from '@thelacanians/vue-native-runtime'
|
|
1836
|
+
* import App from './App.vue'
|
|
1837
|
+
*
|
|
1838
|
+
* const app = createApp(App)
|
|
1839
|
+
* app.start()
|
|
1840
|
+
* ```
|
|
1841
|
+
*/
|
|
1842
|
+
declare function createApp(rootComponent: Component, rootProps?: Record<string, any>): NativeApp;
|
|
1843
|
+
|
|
1844
|
+
export { type ActionSheetAction, type AlertButton, type AppStateStatus, type BiometryResult, type BiometryType, type CameraOptions, type CameraResult, type ColorScheme, type ConnectionType, type GeoCoordinates, type HttpRequestConfig, type HttpResponse, type LocalNotification, type NativeApp, NativeBridge, type NativeNode, type NetworkState, type NotificationPayload, type Permission, type PermissionStatus, type ShareContent, type ShareResult, type SpringOptions, type StatusBarStyle, type StyleProp, type StyleSheet, type TimingOptions, VActionSheet, VActivityIndicator, VAlertDialog, VButton, VImage, VInput, VKeyboardAvoiding, VList, VModal, VPicker, VProgressBar, VSafeArea, VScrollView, VSegmentedControl, VSlider, VStatusBar, VSwitch, VText, VView, VWebView, type WebViewSource, createApp, createCommentNode, createNativeNode, createStyleSheet, createTextNode, render, resetNodeId, useAnimation, useAppState, useAsyncStorage, useBackHandler, useBiometry, useCamera, useClipboard, useColorScheme, useDeviceInfo, useGeolocation, useHaptics, useHttp, useKeyboard, useLinking, useNetwork, useNotifications, usePermissions, useShare, vShow, validStyleProperties };
|