@dcloudio/uni-shared 0.0.1-nvue3.3030820220125001

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,815 @@
1
+ import type { ComponentInternalInstance } from '@vue/runtime-core';
2
+ import { ComponentOptionsBase } from '@vue/runtime-core';
3
+ import type { ComponentPublicInstance } from '@vue/runtime-core';
4
+ import { ComponentPublicInstance as ComponentPublicInstance_2 } from 'vue';
5
+ import { createApp } from 'vue';
6
+ import { RendererNode } from '@vue/runtime-core';
7
+
8
+ export declare const ACTION_TYPE_ADD_EVENT = 8;
9
+
10
+ export declare const ACTION_TYPE_ADD_WXS_EVENT = 12;
11
+
12
+ export declare const ACTION_TYPE_CREATE = 3;
13
+
14
+ export declare const ACTION_TYPE_EVENT = 20;
15
+
16
+ export declare const ACTION_TYPE_INSERT = 4;
17
+
18
+ export declare const ACTION_TYPE_PAGE_CREATE = 1;
19
+
20
+ export declare const ACTION_TYPE_PAGE_CREATED = 2;
21
+
22
+ export declare const ACTION_TYPE_PAGE_SCROLL = 15;
23
+
24
+ export declare const ACTION_TYPE_REMOVE = 5;
25
+
26
+ export declare const ACTION_TYPE_REMOVE_ATTRIBUTE = 7;
27
+
28
+ export declare const ACTION_TYPE_REMOVE_EVENT = 9;
29
+
30
+ export declare const ACTION_TYPE_SET_ATTRIBUTE = 6;
31
+
32
+ export declare const ACTION_TYPE_SET_TEXT = 10;
33
+
34
+ /**
35
+ * nodeId
36
+ * event
37
+ * flag
38
+ */
39
+ export declare type AddEventAction = [
40
+ typeof ACTION_TYPE_ADD_EVENT,
41
+ number,
42
+ string | number,
43
+ number
44
+ ];
45
+
46
+ export declare function addFont(family: string, source: string, desc?: FontFaceDescriptors): Promise<void>;
47
+
48
+ export declare function addLeadingSlash(str: string): string;
49
+
50
+ /**
51
+ * nodeId
52
+ * event
53
+ * wxsEvent
54
+ * flag
55
+ */
56
+ export declare type AddWxsEventAction = [
57
+ typeof ACTION_TYPE_ADD_WXS_EVENT,
58
+ number,
59
+ string | number,
60
+ string | number,
61
+ number
62
+ ];
63
+
64
+ export declare const ATTR_CHANGE_PREFIX = "change:";
65
+
66
+ export declare const ATTR_CLASS = "class";
67
+
68
+ export declare const ATTR_INNER_HTML = "innerHTML";
69
+
70
+ export declare const ATTR_STYLE = "style";
71
+
72
+ export declare const ATTR_TEXT_CONTENT = "textContent";
73
+
74
+ export declare const ATTR_V_OWNER_ID = ".vOwnerId";
75
+
76
+ export declare const ATTR_V_RENDERJS = ".vRenderjs";
77
+
78
+ export declare const ATTR_V_SHOW = ".vShow";
79
+
80
+ export declare const BACKGROUND_COLOR = "#f7f7f7";
81
+
82
+ export declare const BUILT_IN_TAG_NAMES: string[];
83
+
84
+ export declare const BUILT_IN_TAGS: string[];
85
+
86
+ export declare function cache<T>(fn: (str: string) => T): (str: string) => T;
87
+
88
+ export declare function cacheStringFunction(fn: (string: string) => string): (str: string) => string;
89
+
90
+ export declare function callOptions(options: Options, errMsg: string): void;
91
+
92
+ export declare function callOptions(options: Options, data: {
93
+ [key: string]: any;
94
+ errMsg: string;
95
+ }): void;
96
+
97
+ export declare const COMPONENT_NAME_PREFIX = "VUni";
98
+
99
+ export declare const COMPONENT_PREFIX: string;
100
+
101
+ export declare const COMPONENT_SELECTOR_PREFIX = "uni-";
102
+
103
+ /**
104
+ * nodeId
105
+ * tag
106
+ * parentNodeId
107
+ * refNodeId
108
+ * nodeJson
109
+ */
110
+ export declare type CreateAction = [
111
+ typeof ACTION_TYPE_CREATE,
112
+ number,
113
+ string | number,
114
+ number,
115
+ number,
116
+ Partial<UniNodeJSON | UniNodeJSONMinify>?
117
+ ];
118
+
119
+ export declare function createIsCustomElement(tags?: string[]): (tag: string) => boolean;
120
+
121
+ export declare function createRpx2Unit(unit: string, unitRatio: number, unitPrecision: number): (val: string) => string;
122
+
123
+ export declare function createUniEvent(evt: Record<string, any>): UniEvent;
124
+
125
+ export declare function customizeEvent(str: string): string;
126
+
127
+ export declare const DATA_RE: RegExp;
128
+
129
+ export declare function debounce(fn: Function, delay: number): {
130
+ (this: any): void;
131
+ cancel(): void;
132
+ };
133
+
134
+ /**
135
+ * Decode text using `decodeURIComponent`. Returns the original text if it
136
+ * fails.
137
+ *
138
+ * @param text - string to decode
139
+ * @returns decoded string
140
+ */
141
+ export declare function decode(text: string | number): string;
142
+
143
+ export declare function decodedQuery(query?: Record<string, any>): Record<string, string>;
144
+
145
+ export declare const defaultMiniProgramRpx2Unit: {
146
+ unit: string;
147
+ unitRatio: number;
148
+ unitPrecision: number;
149
+ };
150
+
151
+ export declare const defaultNVueRpx2Unit: {
152
+ unit: string;
153
+ unitRatio: number;
154
+ unitPrecision: number;
155
+ };
156
+
157
+ export declare const defaultRpx2Unit: {
158
+ unit: string;
159
+ unitRatio: number;
160
+ unitPrecision: number;
161
+ };
162
+
163
+ declare type DictArray = [number, number][];
164
+
165
+ export declare function dynamicSlotName(name: string): string;
166
+
167
+ export declare class EventChannel {
168
+ id?: number;
169
+ private listener;
170
+ private emitCache;
171
+ constructor(id?: number, events?: NavigateToOptionEvents);
172
+ emit(eventName: string, ...args: any[]): number | undefined;
173
+ on(eventName: string, fn: EventChannelListener['fn']): void;
174
+ once(eventName: string, fn: EventChannelListener['fn']): void;
175
+ off(eventName: string, fn: EventChannelListener['fn']): void;
176
+ _clearCache(eventName: string): void;
177
+ _addListener(eventName: string, type: EventChannelListener['type'], fn: EventChannelListener['fn']): void;
178
+ }
179
+
180
+ declare interface EventChannelListener {
181
+ type: 'on' | 'once';
182
+ fn: (...args: any[]) => void;
183
+ }
184
+
185
+ export declare const EventModifierFlags: {
186
+ stop: number;
187
+ prevent: number;
188
+ self: number;
189
+ };
190
+
191
+ export declare const forcePatchProp: (el: {
192
+ nodeName: string;
193
+ }, key: string) => boolean;
194
+
195
+ export declare function formatAppLog(type: 'log' | 'info' | 'debug' | 'warn' | 'error', filename: string, ...args: unknown[]): void;
196
+
197
+ export declare function formatDateTime({ date, mode }: {
198
+ date?: Date | undefined;
199
+ mode?: string | undefined;
200
+ }): string;
201
+
202
+ export declare function formatH5Log(type: keyof Console, filename: string, ...args: unknown[]): void;
203
+
204
+ export declare function formatLog(module: string, ...args: any[]): string;
205
+
206
+ export declare function getCustomDataset(el: HTMLElement | HTMLElementWithDataset): DOMStringMap & Record<string, any>;
207
+
208
+ export declare function getEnvLocale(): string;
209
+
210
+ export declare function getLen(str?: string): number;
211
+
212
+ export declare function getValueByDataPath(obj: any, path: string): unknown;
213
+
214
+ declare interface HTMLElementWithDataset extends HTMLElement {
215
+ __uniDataset?: Record<string, any>;
216
+ }
217
+
218
+ export declare const I18N_JSON_DELIMITERS: [string, string];
219
+
220
+ export declare function initCustomDataset(): void;
221
+
222
+ /**
223
+ * nodeId
224
+ * parentNodeId
225
+ * refNodeId
226
+ */
227
+ export declare type InsertAction = [typeof ACTION_TYPE_INSERT, number, number, number];
228
+
229
+ export declare const invokeArrayFns: (fns: Function[], arg?: any) => any;
230
+
231
+ export declare function isAppNativeTag(tag: string): boolean;
232
+
233
+ export declare function isAppNVueNativeTag(tag: string): boolean;
234
+
235
+ export declare function isBuiltInComponent(tag: string): boolean;
236
+
237
+ export declare function isComponentInternalInstance(vm: unknown): vm is ComponentInternalInstance;
238
+
239
+ export declare function isComponentTag(tag: string): boolean;
240
+
241
+ export declare function isH5CustomElement(tag: string): boolean;
242
+
243
+ export declare function isH5NativeTag(tag: string): boolean;
244
+
245
+ export declare function isMiniProgramNativeTag(tag: string): boolean;
246
+
247
+ export declare function isRootHook(name: string): boolean;
248
+
249
+ export declare interface IUniPageNode {
250
+ pageId: number;
251
+ pageNode: IUniPageNode | null;
252
+ isUnmounted: boolean;
253
+ genId: () => number;
254
+ push: (...args: any[]) => void;
255
+ onCreate: (thisNode: UniNode, nodeName: string | number) => UniNode;
256
+ onInsertBefore: (thisNode: UniNode, newChild: UniNode, refChild: UniNode | null) => UniNode;
257
+ onRemoveChild: (oldChild: UniNode) => UniNode;
258
+ onAddEvent: (thisNode: UniNode, name: string, flag: number) => void;
259
+ onAddWxsEvent: (thisNode: UniNode, name: string, wxsEvent: string, flag: number) => void;
260
+ onRemoveEvent: (thisNode: UniNode, name: string) => void;
261
+ onSetAttribute: (thisNode: UniNode, qualifiedName: string, value: unknown) => void;
262
+ onRemoveAttribute: (thisNode: UniNode, qualifiedName: string) => void;
263
+ onTextContent: (thisNode: UniNode, text: string) => void;
264
+ onNodeValue: (thisNode: UniNode, val: string | null) => void;
265
+ }
266
+
267
+ export declare const JSON_PROTOCOL = "json://";
268
+
269
+ export declare const LINEFEED = "\n";
270
+
271
+ export declare const MINI_PROGRAM_PAGE_RUNTIME_HOOKS: {
272
+ readonly onPageScroll: 1;
273
+ readonly onShareAppMessage: number;
274
+ readonly onShareTimeline: number;
275
+ };
276
+
277
+ export declare const NAVBAR_HEIGHT = 44;
278
+
279
+ declare type NavigateToOptionEvents = Record<string, (...args: any[]) => void>;
280
+
281
+ export declare const NODE_TYPE_COMMENT = 8;
282
+
283
+ export declare const NODE_TYPE_ELEMENT = 1;
284
+
285
+ export declare const NODE_TYPE_PAGE = 0;
286
+
287
+ export declare const NODE_TYPE_TEXT = 3;
288
+
289
+ export declare function normalizeDataset(el: Element): any;
290
+
291
+ export declare function normalizeEventType(type: string, options?: AddEventListenerOptions): string;
292
+
293
+ export declare function normalizeTarget(el: HTMLElement): {
294
+ id: string;
295
+ dataset: DOMStringMap & Record<string, any>;
296
+ offsetTop: number;
297
+ offsetLeft: number;
298
+ };
299
+
300
+ export declare interface NVue {
301
+ config: NVueConfigAPI;
302
+ document: NVueDocument;
303
+ requireModule: (name: string) => Record<string, unknown> | void;
304
+ supports: (condition: string) => boolean | void;
305
+ isRegisteredModule: (name: string, method?: string) => boolean;
306
+ isRegisteredComponent: (name: string) => boolean;
307
+ }
308
+
309
+ export declare const NVUE_BUILT_IN_TAGS: string[];
310
+
311
+ export declare const NVUE_U_BUILT_IN_TAGS: string[];
312
+
313
+ export declare interface NVueConfigAPI {
314
+ bundleUrl: string;
315
+ bundleType: string;
316
+ env: NVueEnvironment;
317
+ }
318
+
319
+ export declare interface NVueDocument {
320
+ id: string;
321
+ URL: string;
322
+ taskCenter: NVueTaskCenter;
323
+ open: () => void;
324
+ close: () => void;
325
+ createElement: (tagName: string, props?: Record<string, unknown>) => NVueElement;
326
+ createComment: (text: string) => Record<string, unknown>;
327
+ fireEvent: (type: string) => void;
328
+ destroy: () => void;
329
+ }
330
+
331
+ export declare interface NVueElement {
332
+ nodeType: number;
333
+ nodeId: string;
334
+ type: string;
335
+ ref: string;
336
+ text?: string;
337
+ parentNode: NVueElement | null;
338
+ children: Array<NVueElement>;
339
+ previousSibling: NVueElement | null;
340
+ nextSibling: NVueElement | null;
341
+ appendChild: (node: NVueElement) => void;
342
+ removeChild: (node: NVueElement, preserved?: boolean) => void;
343
+ insertBefore: (node: NVueElement, before: NVueElement) => void;
344
+ insertAfter: (node: NVueElement, after: NVueElement) => void;
345
+ setAttr: (key: string, value: any, silent?: boolean) => void;
346
+ setAttrs: (attrs: Record<string, unknown>, silent?: boolean) => void;
347
+ setStyle: (key: string, value: any, silent?: boolean) => void;
348
+ setStyles: (attrs: Record<string, unknown>, silent?: boolean) => void;
349
+ addEvent: (type: string, handler: Function, args?: Array<any>) => void;
350
+ removeEvent: (type: string) => void;
351
+ fireEvent: (type: string) => void;
352
+ destroy: () => void;
353
+ }
354
+
355
+ export declare interface NVueEnvironment {
356
+ platform: string;
357
+ osName: string;
358
+ osVersion: string;
359
+ appName: string;
360
+ appVersion: string;
361
+ deviceModel: string;
362
+ deviceWidth: number;
363
+ deviceHeight: number;
364
+ scale: number;
365
+ userAgent?: string;
366
+ dpr?: number;
367
+ rem?: number;
368
+ }
369
+
370
+ export declare interface NVueInstanceContext {
371
+ Vue: Vue;
372
+ }
373
+
374
+ export declare interface NVueInstanceOption {
375
+ instanceId: string;
376
+ config: NVueConfigAPI;
377
+ document?: NVueDocument;
378
+ Vue?: Vue;
379
+ app?: ComponentPublicInstance_2;
380
+ data?: Record<string, unknown>;
381
+ }
382
+
383
+ export declare interface NVueRuntimeContext {
384
+ nvue: NVue;
385
+ service: Record<string, unknown>;
386
+ BroadcastChannel?: Function;
387
+ SharedObject: Record<string, unknown>;
388
+ }
389
+
390
+ export declare interface NVueTaskCenter {
391
+ instanceId: string;
392
+ callbackManager: unknown;
393
+ send: (type: string, params: Record<string, unknown>, args: any[], options?: Record<string, unknown>) => void;
394
+ registerHook: (componentId: string, type: string, hook: string, fn: Function) => void;
395
+ updateData: (componentId: string, data: Record<string, unknown> | void, callback?: Function) => void;
396
+ }
397
+
398
+ export declare class NVueTextNode {
399
+ instanceId: string;
400
+ nodeId: number;
401
+ parentNode: null | NVueElement;
402
+ nodeType: 3;
403
+ text: string;
404
+ children: unknown[];
405
+ constructor(text: string);
406
+ }
407
+
408
+ export declare const ON_ADD_TO_FAVORITES = "onAddToFavorites";
409
+
410
+ export declare const ON_APP_ENTER_BACKGROUND = "onAppEnterBackground";
411
+
412
+ export declare const ON_APP_ENTER_FOREGROUND = "onAppEnterForeground";
413
+
414
+ export declare const ON_BACK_PRESS = "onBackPress";
415
+
416
+ export declare const ON_ERROR = "onError";
417
+
418
+ export declare const ON_HIDE = "onHide";
419
+
420
+ export declare const ON_KEYBOARD_HEIGHT_CHANGE = "onKeyboardHeightChange";
421
+
422
+ export declare const ON_LAUNCH = "onLaunch";
423
+
424
+ export declare const ON_LOAD = "onLoad";
425
+
426
+ export declare const ON_NAVIGATION_BAR_BUTTON_TAP = "onNavigationBarButtonTap";
427
+
428
+ export declare const ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED = "onNavigationBarSearchInputChanged";
429
+
430
+ export declare const ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED = "onNavigationBarSearchInputClicked";
431
+
432
+ export declare const ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED = "onNavigationBarSearchInputConfirmed";
433
+
434
+ export declare const ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED = "onNavigationBarSearchInputFocusChanged";
435
+
436
+ export declare const ON_PAGE_NOT_FOUND = "onPageNotFound";
437
+
438
+ export declare const ON_PAGE_SCROLL = "onPageScroll";
439
+
440
+ export declare const ON_PULL_DOWN_REFRESH = "onPullDownRefresh";
441
+
442
+ export declare const ON_REACH_BOTTOM = "onReachBottom";
443
+
444
+ export declare const ON_REACH_BOTTOM_DISTANCE = 50;
445
+
446
+ export declare const ON_READY = "onReady";
447
+
448
+ export declare const ON_RESIZE = "onResize";
449
+
450
+ export declare const ON_SHARE_APP_MESSAGE = "onShareAppMessage";
451
+
452
+ export declare const ON_SHARE_TIMELINE = "onShareTimeline";
453
+
454
+ export declare const ON_SHOW = "onShow";
455
+
456
+ export declare const ON_TAB_ITEM_TAP = "onTabItemTap";
457
+
458
+ export declare const ON_THEME_CHANGE = "onThemeChange";
459
+
460
+ export declare const ON_UNHANDLE_REJECTION = "onUnhandledRejection";
461
+
462
+ export declare const ON_UNLOAD = "onUnload";
463
+
464
+ export declare const ON_WEB_INVOKE_APP_SERVICE = "onWebInvokeAppService";
465
+
466
+ export declare const ON_WXS_INVOKE_CALL_METHOD = "onWxsInvokeCallMethod";
467
+
468
+ export declare function once<T extends (...args: any[]) => any>(fn: T, ctx?: unknown): T;
469
+
470
+ declare interface Options {
471
+ success?: (res: any) => void;
472
+ fail?: (res: any) => void;
473
+ complete?: (res: any) => void;
474
+ }
475
+
476
+ export declare type PageAction = PageCreateAction | PageCreatedAction | PageUpdateAction | PageScrollAction;
477
+
478
+ export declare type PageCreateAction = [typeof ACTION_TYPE_PAGE_CREATE, PageCreateData];
479
+
480
+ export declare type PageCreatedAction = [typeof ACTION_TYPE_PAGE_CREATED];
481
+
482
+ export declare interface PageCreateData extends PageNodeOptions {
483
+ }
484
+
485
+ export declare interface PageNodeOptions {
486
+ css: boolean;
487
+ route: string;
488
+ version: number;
489
+ locale: string;
490
+ platform: string;
491
+ pixelRatio: number;
492
+ windowWidth: number;
493
+ disableScroll: boolean;
494
+ onPageScroll: boolean;
495
+ onPageReachBottom: boolean;
496
+ onReachBottomDistance: number;
497
+ statusbarHeight: number;
498
+ windowTop: number;
499
+ windowBottom: number;
500
+ }
501
+
502
+ /**
503
+ * onReachBottomDistance
504
+ */
505
+ export declare type PageScrollAction = [typeof ACTION_TYPE_PAGE_SCROLL, number];
506
+
507
+ export declare type PageUpdateAction = CreateAction | InsertAction | RemoveAction | AddEventAction | AddWxsEventAction | RemoveEventAction | SetAttributeAction | RemoveAttributeAction | SetTextAction;
508
+
509
+ export declare function parseEventName(name: string): [string, EventListenerOptions | undefined];
510
+
511
+ /**
512
+ * https://github.com/vuejs/vue-router-next/blob/master/src/query.ts
513
+ * @internal
514
+ *
515
+ * @param search - search string to parse
516
+ * @returns a query object
517
+ */
518
+ export declare function parseQuery(search: string): Record<string, any>;
519
+
520
+ export declare function parseUrl(url: string): {
521
+ path: string;
522
+ query: Record<string, any>;
523
+ };
524
+
525
+ export declare function passive(passive: boolean): {
526
+ passive: boolean;
527
+ };
528
+
529
+ export declare const PLUS_RE: RegExp;
530
+
531
+ export declare function plusReady(callback: () => void): void;
532
+
533
+ export declare const PRIMARY_COLOR = "#007aff";
534
+
535
+ /**
536
+ * nodeId
537
+ */
538
+ export declare type RemoveAction = [typeof ACTION_TYPE_REMOVE, number];
539
+
540
+ /**
541
+ * nodeId
542
+ * name
543
+ */
544
+ export declare type RemoveAttributeAction = [
545
+ typeof ACTION_TYPE_REMOVE_ATTRIBUTE,
546
+ number,
547
+ string | number
548
+ ];
549
+
550
+ /**
551
+ * nodeId
552
+ * event
553
+ */
554
+ export declare type RemoveEventAction = [
555
+ typeof ACTION_TYPE_REMOVE_EVENT,
556
+ number,
557
+ string | number
558
+ ];
559
+
560
+ export declare function removeLeadingSlash(str: string): string;
561
+
562
+ export declare const RENDERJS_MODULES = "renderjsModules";
563
+
564
+ export declare function resolveComponentInstance(instance?: ComponentInternalInstance | ComponentPublicInstance): ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | undefined;
565
+
566
+ export declare function resolveOwnerEl(instance: ComponentInternalInstance): RendererNode | null;
567
+
568
+ export declare function resolveOwnerVm(vm: ComponentInternalInstance): ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | undefined;
569
+
570
+ export declare const RESPONSIVE_MIN_WIDTH = 768;
571
+
572
+ export declare type Rpx2UnitOptions = typeof defaultRpx2Unit;
573
+
574
+ export declare const sanitise: (val: unknown) => any;
575
+
576
+ export declare const SCHEME_RE: RegExp;
577
+
578
+ declare function scrollTo_2(scrollTop: number | string, duration: number): void;
579
+ export { scrollTo_2 as scrollTo }
580
+
581
+ export declare const SELECTED_COLOR = "#0062cc";
582
+
583
+ /**
584
+ * nodeId
585
+ * name
586
+ * value
587
+ */
588
+ export declare type SetAttributeAction = [
589
+ typeof ACTION_TYPE_SET_ATTRIBUTE,
590
+ number,
591
+ string | number,
592
+ unknown | number
593
+ ];
594
+
595
+ /**
596
+ * nodeId
597
+ * text
598
+ */
599
+ export declare type SetTextAction = [
600
+ typeof ACTION_TYPE_SET_TEXT,
601
+ number,
602
+ string | number
603
+ ];
604
+
605
+ export declare const SLOT_DEFAULT_NAME = "d";
606
+
607
+ export declare function stringifyQuery(obj?: Record<string, any>, encodeStr?: typeof encodeURIComponent): string;
608
+
609
+ export declare const TABBAR_HEIGHT = 50;
610
+
611
+ export declare const TAGS: string[];
612
+
613
+ export declare const UNI_SSR = "__uniSSR";
614
+
615
+ export declare const UNI_SSR_DATA = "data";
616
+
617
+ export declare const UNI_SSR_GLOBAL_DATA = "globalData";
618
+
619
+ export declare const UNI_SSR_STORE = "store";
620
+
621
+ export declare const UNI_SSR_TITLE = "title";
622
+
623
+ export declare const UNI_STORAGE_LOCALE = "UNI_LOCALE";
624
+
625
+ export declare class UniBaseNode extends UniNode {
626
+ attributes: Record<string, unknown>;
627
+ style: null | string | Record<string, string | string[]>;
628
+ vShow: null | boolean;
629
+ protected _html: string | null;
630
+ constructor(nodeType: UniNodeType, nodeName: string, container: UniElement | IUniPageNode);
631
+ get className(): string;
632
+ set className(val: string);
633
+ get innerHTML(): string;
634
+ set innerHTML(html: string);
635
+ addEventListener(type: string, listener: UniEventListener, options?: AddEventListenerOptions): void;
636
+ removeEventListener(type: string, callback: UniEventListener, options?: EventListenerOptions): void;
637
+ getAttribute(qualifiedName: string): unknown;
638
+ removeAttribute(qualifiedName: string): void;
639
+ setAttribute(qualifiedName: string, value: unknown): void;
640
+ toJSON({ attr, normalize, }?: {
641
+ attr?: boolean;
642
+ children?: boolean;
643
+ normalize?: (val: any, includeValue?: boolean) => any | number;
644
+ }): Partial<UniNodeJSON>;
645
+ }
646
+
647
+ export declare class UniCommentNode extends UniNode {
648
+ constructor(text: string, container: UniElement | IUniPageNode);
649
+ toJSON(opts?: {
650
+ attr?: boolean;
651
+ }): {
652
+ i?: undefined;
653
+ } | {
654
+ i: number;
655
+ };
656
+ }
657
+
658
+ declare type UniCSSStyleDeclarationJSON = string | null | Record<string, string | string[]> | [string, Record<string, string | string[]>];
659
+
660
+ export declare class UniElement extends UniBaseNode {
661
+ tagName: string;
662
+ constructor(nodeName: string, container: UniElement | IUniPageNode);
663
+ }
664
+
665
+ export declare class UniEvent {
666
+ type: string;
667
+ bubbles: boolean;
668
+ cancelable: boolean;
669
+ defaultPrevented: boolean;
670
+ detail?: Record<string, any>;
671
+ timeStamp: number;
672
+ _stop: boolean;
673
+ _end: boolean;
674
+ constructor(type: string, opts: UniEventOptions);
675
+ preventDefault(): void;
676
+ stopImmediatePropagation(): void;
677
+ stopPropagation(): void;
678
+ }
679
+
680
+ export declare interface UniEventListener {
681
+ (evt: UniEvent): void;
682
+ modifiers?: string[];
683
+ wxsEvent?: string;
684
+ }
685
+
686
+ declare interface UniEventOptions {
687
+ bubbles: boolean;
688
+ cancelable: boolean;
689
+ }
690
+
691
+ declare class UniEventTarget {
692
+ listeners: Record<string, UniEventListener[]>;
693
+ dispatchEvent(evt: UniEvent): boolean;
694
+ addEventListener(type: string, listener: UniEventListener, options?: AddEventListenerOptions): void;
695
+ removeEventListener(type: string, callback: UniEventListener, options?: AddEventListenerOptions): void;
696
+ }
697
+
698
+ export declare class UniInputElement extends UniElement {
699
+ get value(): string | number;
700
+ set value(val: string | number);
701
+ }
702
+
703
+ export declare const UniLifecycleHooks: readonly ["onShow", "onHide", "onLaunch", "onError", "onThemeChange", "onPageNotFound", "onUnhandledRejection", "onLoad", "onReady", "onUnload", "onResize", "onBackPress", "onPageScroll", "onTabItemTap", "onReachBottom", "onPullDownRefresh", "onShareTimeline", "onAddToFavorites", "onShareAppMessage", "onNavigationBarButtonTap", "onNavigationBarSearchInputClicked", "onNavigationBarSearchInputChanged", "onNavigationBarSearchInputConfirmed", "onNavigationBarSearchInputFocusChanged"];
704
+
705
+ export declare class UniNode extends UniEventTarget {
706
+ nodeId?: number;
707
+ nodeType: UniNodeType;
708
+ nodeName: string;
709
+ childNodes: UniNode[];
710
+ pageNode: IUniPageNode | null;
711
+ parentNode: UniNode | null;
712
+ __vueParentComponent?: ComponentInternalInstance;
713
+ protected _text: string | null;
714
+ constructor(nodeType: UniNodeType, nodeName: string, container: UniElement | IUniPageNode);
715
+ get firstChild(): UniNode | null;
716
+ get lastChild(): UniNode | null;
717
+ get nextSibling(): UniNode | null;
718
+ get nodeValue(): string | null;
719
+ set nodeValue(_val: string | null);
720
+ get textContent(): string;
721
+ set textContent(text: string);
722
+ get parentElement(): UniElement | null;
723
+ get previousSibling(): UniNode | null;
724
+ appendChild(newChild: UniNode): UniNode;
725
+ cloneNode(deep?: boolean): UniNode;
726
+ insertBefore(newChild: UniNode, refChild: UniNode | null): UniNode;
727
+ removeChild(oldChild: UniNode): UniNode;
728
+ }
729
+
730
+ export declare interface UniNodeJSON {
731
+ /**
732
+ * nodeId
733
+ */
734
+ i: number;
735
+ /**
736
+ * nodeName
737
+ */
738
+ n: string | number;
739
+ /**
740
+ * attributes
741
+ */
742
+ a: Record<string, unknown>;
743
+ /**
744
+ * listeners
745
+ */
746
+ e: Record<string, number>;
747
+ /**
748
+ * wxs listeners
749
+ */
750
+ w: Record<string, [string, number]>;
751
+ /**
752
+ * style
753
+ */
754
+ s?: UniCSSStyleDeclarationJSON;
755
+ /**
756
+ * text
757
+ */
758
+ t?: string;
759
+ }
760
+
761
+ declare interface UniNodeJSONMinify {
762
+ /**
763
+ * nodeId
764
+ */
765
+ i: number;
766
+ /**
767
+ * nodeName
768
+ */
769
+ n: string | number;
770
+ /**
771
+ * attributes
772
+ */
773
+ a: DictArray;
774
+ /**
775
+ * listeners
776
+ */
777
+ e: DictArray;
778
+ /**
779
+ * wxs listeners
780
+ */
781
+ w: [number, [number, number]][];
782
+ /**
783
+ * style
784
+ */
785
+ s?: DictArray;
786
+ /**
787
+ * text
788
+ */
789
+ t?: number;
790
+ }
791
+
792
+ declare type UniNodeType = typeof NODE_TYPE_PAGE | typeof NODE_TYPE_ELEMENT | typeof NODE_TYPE_TEXT | typeof NODE_TYPE_COMMENT;
793
+
794
+ export declare class UniTextAreaElement extends UniInputElement {
795
+ }
796
+
797
+ export declare class UniTextNode extends UniBaseNode {
798
+ constructor(text: string, container: UniElement | IUniPageNode);
799
+ get nodeValue(): string;
800
+ set nodeValue(text: string);
801
+ }
802
+
803
+ export declare function updateElementStyle(element: HTMLElement, styles: Partial<CSSStyleDeclaration>): void;
804
+
805
+ export declare interface Vue {
806
+ createApp: typeof createApp;
807
+ }
808
+
809
+ export declare const WEB_INVOKE_APPSERVICE = "WEB_INVOKE_APPSERVICE";
810
+
811
+ export declare const WXS_MODULES = "wxsModules";
812
+
813
+ export declare const WXS_PROTOCOL = "wxs://";
814
+
815
+ export { }