@weapp-vite/web 1.0.0 → 1.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.d.ts +3 -2
- package/dist/index.mjs +2665 -14626
- package/dist/{plugin-D_a0z32j.d.ts → plugin-C1f_qgnH.d.ts} +19 -0
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.mjs +1048 -14244
- package/dist/runtime/index.d.ts +447 -7
- package/dist/runtime/index.mjs +1396 -147
- package/package.json +4 -1
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
2
|
+
import { ChildNode as ChildNode$1 } from 'domhandler';
|
|
3
|
+
|
|
4
|
+
interface ButtonFormConfig {
|
|
5
|
+
preventDefault?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare function ensureButtonDefined(): void;
|
|
8
|
+
declare function setButtonFormConfig(next: ButtonFormConfig): void;
|
|
9
|
+
|
|
10
|
+
type LegacyTemplateScope = Record<string, any>;
|
|
11
|
+
type LegacyTemplateRenderer = (scope?: LegacyTemplateScope) => string;
|
|
12
|
+
declare function renderTemplate(nodes: ChildNode$1[], scope?: LegacyTemplateScope): string;
|
|
13
|
+
declare function createTemplate(source: string): LegacyTemplateRenderer;
|
|
2
14
|
|
|
3
15
|
type TemplateScope = Record<string, any>;
|
|
4
|
-
type TemplateRenderer = (scope
|
|
5
|
-
|
|
6
|
-
|
|
16
|
+
type TemplateRenderer = (scope: TemplateScope, ctx: RenderContext) => TemplateResult | string | unknown;
|
|
17
|
+
|
|
18
|
+
interface RenderContext {
|
|
19
|
+
instance: ComponentPublicInstance;
|
|
20
|
+
eval: (expression: string, scope: TemplateScope, wxs?: Record<string, any>) => any;
|
|
21
|
+
createScope: (parent: TemplateScope, locals?: Record<string, any>) => TemplateScope;
|
|
22
|
+
mergeScope: (parent: TemplateScope, data?: any) => TemplateScope;
|
|
23
|
+
normalizeList: (value: any) => any[];
|
|
24
|
+
key: (rawKey: string, item: any, index: number, scope: TemplateScope, wxs?: Record<string, any>) => any;
|
|
25
|
+
renderTemplate: (templates: Record<string, any>, name: any, scope: TemplateScope, ctx: RenderContext) => any;
|
|
26
|
+
event: (eventName: string, handlerName: any, scope: TemplateScope, wxs?: Record<string, any>, flags?: {
|
|
27
|
+
catch?: boolean;
|
|
28
|
+
capture?: boolean;
|
|
29
|
+
}) => (event: Event) => void;
|
|
30
|
+
createWxsModule: (code: string, id: string, requireMap?: Record<string, any>) => Record<string, any>;
|
|
31
|
+
}
|
|
32
|
+
declare function createRenderContext(instance: ComponentPublicInstance, methods: Record<string, (event: any) => any>): RenderContext;
|
|
7
33
|
|
|
8
34
|
type DataRecord = Record<string, any>;
|
|
9
35
|
interface PropertyOption {
|
|
@@ -34,7 +60,395 @@ interface ComponentPublicInstance extends HTMLElement {
|
|
|
34
60
|
setData: (patch: DataRecord) => void;
|
|
35
61
|
triggerEvent: (name: string, detail?: any) => void;
|
|
36
62
|
}
|
|
37
|
-
|
|
63
|
+
type ComponentConstructor = CustomElementConstructor & {
|
|
64
|
+
__weappUpdate?: (options: DefineComponentOptions) => void;
|
|
65
|
+
};
|
|
66
|
+
declare function defineComponent(tagName: string, options: DefineComponentOptions): ComponentConstructor | {
|
|
67
|
+
new (): {
|
|
68
|
+
"__#private@#state": DataRecord;
|
|
69
|
+
"__#private@#properties": DataRecord;
|
|
70
|
+
"__#private@#methods": Record<string, (event: any) => any>;
|
|
71
|
+
"__#private@#isMounted": boolean;
|
|
72
|
+
"__#private@#renderContext": RenderContext;
|
|
73
|
+
"__#private@#usesLegacyTemplate": boolean;
|
|
74
|
+
"__#private@#readyFired": boolean;
|
|
75
|
+
get data(): DataRecord;
|
|
76
|
+
get properties(): DataRecord;
|
|
77
|
+
setData(patch: DataRecord): void;
|
|
78
|
+
triggerEvent(name: string, detail?: any): void;
|
|
79
|
+
connectedCallback(): void;
|
|
80
|
+
disconnectedCallback(): void;
|
|
81
|
+
attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string | null): void;
|
|
82
|
+
firstUpdated(): void;
|
|
83
|
+
updated(): void;
|
|
84
|
+
render(): unknown;
|
|
85
|
+
requestUpdate(name?: PropertyKey, oldValue?: unknown, options?: unknown): any;
|
|
86
|
+
"__#private@#applyAttributes"(): void;
|
|
87
|
+
"__#private@#applyDataPatch"(patch: DataRecord): void;
|
|
88
|
+
"__#private@#setProperty"(name: string, value: any): void;
|
|
89
|
+
"__#private@#syncMethods"(nextMethods: ComponentOptions["methods"]): void;
|
|
90
|
+
__weappSync(nextMethods: ComponentOptions["methods"]): void;
|
|
91
|
+
"__#private@#renderLegacy"(): void;
|
|
92
|
+
accessKey: string;
|
|
93
|
+
readonly accessKeyLabel: string;
|
|
94
|
+
autocapitalize: string;
|
|
95
|
+
autocorrect: boolean;
|
|
96
|
+
dir: string;
|
|
97
|
+
draggable: boolean;
|
|
98
|
+
hidden: boolean;
|
|
99
|
+
inert: boolean;
|
|
100
|
+
innerText: string;
|
|
101
|
+
lang: string;
|
|
102
|
+
readonly offsetHeight: number;
|
|
103
|
+
readonly offsetLeft: number;
|
|
104
|
+
readonly offsetParent: Element | null;
|
|
105
|
+
readonly offsetTop: number;
|
|
106
|
+
readonly offsetWidth: number;
|
|
107
|
+
outerText: string;
|
|
108
|
+
popover: string | null;
|
|
109
|
+
spellcheck: boolean;
|
|
110
|
+
title: string;
|
|
111
|
+
translate: boolean;
|
|
112
|
+
writingSuggestions: string;
|
|
113
|
+
attachInternals(): ElementInternals;
|
|
114
|
+
click(): void;
|
|
115
|
+
hidePopover(): void;
|
|
116
|
+
showPopover(): void;
|
|
117
|
+
togglePopover(options?: boolean): boolean;
|
|
118
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
119
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
120
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
121
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
122
|
+
readonly attributes: NamedNodeMap;
|
|
123
|
+
get classList(): DOMTokenList;
|
|
124
|
+
set classList(value: string);
|
|
125
|
+
className: string;
|
|
126
|
+
readonly clientHeight: number;
|
|
127
|
+
readonly clientLeft: number;
|
|
128
|
+
readonly clientTop: number;
|
|
129
|
+
readonly clientWidth: number;
|
|
130
|
+
readonly currentCSSZoom: number;
|
|
131
|
+
id: string;
|
|
132
|
+
innerHTML: string;
|
|
133
|
+
readonly localName: string;
|
|
134
|
+
readonly namespaceURI: string | null;
|
|
135
|
+
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
136
|
+
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
137
|
+
outerHTML: string;
|
|
138
|
+
readonly ownerDocument: Document;
|
|
139
|
+
get part(): DOMTokenList;
|
|
140
|
+
set part(value: string);
|
|
141
|
+
readonly prefix: string | null;
|
|
142
|
+
readonly scrollHeight: number;
|
|
143
|
+
scrollLeft: number;
|
|
144
|
+
scrollTop: number;
|
|
145
|
+
readonly scrollWidth: number;
|
|
146
|
+
readonly shadowRoot: ShadowRoot | null;
|
|
147
|
+
slot: string;
|
|
148
|
+
readonly tagName: string;
|
|
149
|
+
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
150
|
+
checkVisibility(options?: CheckVisibilityOptions): boolean;
|
|
151
|
+
closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
152
|
+
closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
|
|
153
|
+
closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
|
|
154
|
+
closest<E extends Element = Element>(selectors: string): E | null;
|
|
155
|
+
computedStyleMap(): StylePropertyMapReadOnly;
|
|
156
|
+
getAttribute(qualifiedName: string): string | null;
|
|
157
|
+
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
158
|
+
getAttributeNames(): string[];
|
|
159
|
+
getAttributeNode(qualifiedName: string): Attr | null;
|
|
160
|
+
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
161
|
+
getBoundingClientRect(): DOMRect;
|
|
162
|
+
getClientRects(): DOMRectList;
|
|
163
|
+
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
164
|
+
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
|
|
165
|
+
getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
|
|
166
|
+
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
|
|
167
|
+
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
168
|
+
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
169
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
170
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
171
|
+
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
|
|
172
|
+
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
173
|
+
getHTML(options?: GetHTMLOptions): string;
|
|
174
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
175
|
+
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
176
|
+
hasAttributes(): boolean;
|
|
177
|
+
hasPointerCapture(pointerId: number): boolean;
|
|
178
|
+
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
179
|
+
insertAdjacentHTML(position: InsertPosition, string: string): void;
|
|
180
|
+
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
181
|
+
matches(selectors: string): boolean;
|
|
182
|
+
releasePointerCapture(pointerId: number): void;
|
|
183
|
+
removeAttribute(qualifiedName: string): void;
|
|
184
|
+
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
185
|
+
removeAttributeNode(attr: Attr): Attr;
|
|
186
|
+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
187
|
+
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
188
|
+
scroll(options?: ScrollToOptions): void;
|
|
189
|
+
scroll(x: number, y: number): void;
|
|
190
|
+
scrollBy(options?: ScrollToOptions): void;
|
|
191
|
+
scrollBy(x: number, y: number): void;
|
|
192
|
+
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
193
|
+
scrollTo(options?: ScrollToOptions): void;
|
|
194
|
+
scrollTo(x: number, y: number): void;
|
|
195
|
+
setAttribute(qualifiedName: string, value: string): void;
|
|
196
|
+
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
197
|
+
setAttributeNode(attr: Attr): Attr | null;
|
|
198
|
+
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
199
|
+
setHTMLUnsafe(html: string): void;
|
|
200
|
+
setPointerCapture(pointerId: number): void;
|
|
201
|
+
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
202
|
+
webkitMatchesSelector(selectors: string): boolean;
|
|
203
|
+
get textContent(): string;
|
|
204
|
+
set textContent(value: string | null);
|
|
205
|
+
readonly baseURI: string;
|
|
206
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
207
|
+
readonly firstChild: ChildNode | null;
|
|
208
|
+
readonly isConnected: boolean;
|
|
209
|
+
readonly lastChild: ChildNode | null;
|
|
210
|
+
readonly nextSibling: ChildNode | null;
|
|
211
|
+
readonly nodeName: string;
|
|
212
|
+
readonly nodeType: number;
|
|
213
|
+
nodeValue: string | null;
|
|
214
|
+
readonly parentElement: HTMLElement | null;
|
|
215
|
+
readonly parentNode: ParentNode | null;
|
|
216
|
+
readonly previousSibling: ChildNode | null;
|
|
217
|
+
appendChild<T extends Node>(node: T): T;
|
|
218
|
+
cloneNode(subtree?: boolean): Node;
|
|
219
|
+
compareDocumentPosition(other: Node): number;
|
|
220
|
+
contains(other: Node | null): boolean;
|
|
221
|
+
getRootNode(options?: GetRootNodeOptions): Node;
|
|
222
|
+
hasChildNodes(): boolean;
|
|
223
|
+
insertBefore<T extends Node>(node: T, child: Node | null): T;
|
|
224
|
+
isDefaultNamespace(namespace: string | null): boolean;
|
|
225
|
+
isEqualNode(otherNode: Node | null): boolean;
|
|
226
|
+
isSameNode(otherNode: Node | null): boolean;
|
|
227
|
+
lookupNamespaceURI(prefix: string | null): string | null;
|
|
228
|
+
lookupPrefix(namespace: string | null): string | null;
|
|
229
|
+
normalize(): void;
|
|
230
|
+
removeChild<T extends Node>(child: T): T;
|
|
231
|
+
replaceChild<T extends Node>(node: Node, child: T): T;
|
|
232
|
+
readonly ELEMENT_NODE: 1;
|
|
233
|
+
readonly ATTRIBUTE_NODE: 2;
|
|
234
|
+
readonly TEXT_NODE: 3;
|
|
235
|
+
readonly CDATA_SECTION_NODE: 4;
|
|
236
|
+
readonly ENTITY_REFERENCE_NODE: 5;
|
|
237
|
+
readonly ENTITY_NODE: 6;
|
|
238
|
+
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
239
|
+
readonly COMMENT_NODE: 8;
|
|
240
|
+
readonly DOCUMENT_NODE: 9;
|
|
241
|
+
readonly DOCUMENT_TYPE_NODE: 10;
|
|
242
|
+
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
243
|
+
readonly NOTATION_NODE: 12;
|
|
244
|
+
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
245
|
+
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
246
|
+
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
247
|
+
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
248
|
+
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
249
|
+
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
250
|
+
dispatchEvent(event: Event): boolean;
|
|
251
|
+
ariaActiveDescendantElement: Element | null;
|
|
252
|
+
ariaAtomic: string | null;
|
|
253
|
+
ariaAutoComplete: string | null;
|
|
254
|
+
ariaBrailleLabel: string | null;
|
|
255
|
+
ariaBrailleRoleDescription: string | null;
|
|
256
|
+
ariaBusy: string | null;
|
|
257
|
+
ariaChecked: string | null;
|
|
258
|
+
ariaColCount: string | null;
|
|
259
|
+
ariaColIndex: string | null;
|
|
260
|
+
ariaColIndexText: string | null;
|
|
261
|
+
ariaColSpan: string | null;
|
|
262
|
+
ariaControlsElements: ReadonlyArray<Element> | null;
|
|
263
|
+
ariaCurrent: string | null;
|
|
264
|
+
ariaDescribedByElements: ReadonlyArray<Element> | null;
|
|
265
|
+
ariaDescription: string | null;
|
|
266
|
+
ariaDetailsElements: ReadonlyArray<Element> | null;
|
|
267
|
+
ariaDisabled: string | null;
|
|
268
|
+
ariaErrorMessageElements: ReadonlyArray<Element> | null;
|
|
269
|
+
ariaExpanded: string | null;
|
|
270
|
+
ariaFlowToElements: ReadonlyArray<Element> | null;
|
|
271
|
+
ariaHasPopup: string | null;
|
|
272
|
+
ariaHidden: string | null;
|
|
273
|
+
ariaInvalid: string | null;
|
|
274
|
+
ariaKeyShortcuts: string | null;
|
|
275
|
+
ariaLabel: string | null;
|
|
276
|
+
ariaLabelledByElements: ReadonlyArray<Element> | null;
|
|
277
|
+
ariaLevel: string | null;
|
|
278
|
+
ariaLive: string | null;
|
|
279
|
+
ariaModal: string | null;
|
|
280
|
+
ariaMultiLine: string | null;
|
|
281
|
+
ariaMultiSelectable: string | null;
|
|
282
|
+
ariaOrientation: string | null;
|
|
283
|
+
ariaOwnsElements: ReadonlyArray<Element> | null;
|
|
284
|
+
ariaPlaceholder: string | null;
|
|
285
|
+
ariaPosInSet: string | null;
|
|
286
|
+
ariaPressed: string | null;
|
|
287
|
+
ariaReadOnly: string | null;
|
|
288
|
+
ariaRelevant: string | null;
|
|
289
|
+
ariaRequired: string | null;
|
|
290
|
+
ariaRoleDescription: string | null;
|
|
291
|
+
ariaRowCount: string | null;
|
|
292
|
+
ariaRowIndex: string | null;
|
|
293
|
+
ariaRowIndexText: string | null;
|
|
294
|
+
ariaRowSpan: string | null;
|
|
295
|
+
ariaSelected: string | null;
|
|
296
|
+
ariaSetSize: string | null;
|
|
297
|
+
ariaSort: string | null;
|
|
298
|
+
ariaValueMax: string | null;
|
|
299
|
+
ariaValueMin: string | null;
|
|
300
|
+
ariaValueNow: string | null;
|
|
301
|
+
ariaValueText: string | null;
|
|
302
|
+
role: string | null;
|
|
303
|
+
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
|
|
304
|
+
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
305
|
+
after(...nodes: (Node | string)[]): void;
|
|
306
|
+
before(...nodes: (Node | string)[]): void;
|
|
307
|
+
remove(): void;
|
|
308
|
+
replaceWith(...nodes: (Node | string)[]): void;
|
|
309
|
+
readonly nextElementSibling: Element | null;
|
|
310
|
+
readonly previousElementSibling: Element | null;
|
|
311
|
+
readonly childElementCount: number;
|
|
312
|
+
readonly children: HTMLCollection;
|
|
313
|
+
readonly firstElementChild: Element | null;
|
|
314
|
+
readonly lastElementChild: Element | null;
|
|
315
|
+
append(...nodes: (Node | string)[]): void;
|
|
316
|
+
prepend(...nodes: (Node | string)[]): void;
|
|
317
|
+
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
|
|
318
|
+
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
|
|
319
|
+
querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
|
|
320
|
+
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
|
|
321
|
+
querySelector<E extends Element = Element>(selectors: string): E | null;
|
|
322
|
+
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
323
|
+
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
|
|
324
|
+
querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
325
|
+
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
326
|
+
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
327
|
+
replaceChildren(...nodes: (Node | string)[]): void;
|
|
328
|
+
readonly assignedSlot: HTMLSlotElement | null;
|
|
329
|
+
readonly attributeStyleMap: StylePropertyMap;
|
|
330
|
+
get style(): CSSStyleDeclaration;
|
|
331
|
+
set style(cssText: string);
|
|
332
|
+
contentEditable: string;
|
|
333
|
+
enterKeyHint: string;
|
|
334
|
+
inputMode: string;
|
|
335
|
+
readonly isContentEditable: boolean;
|
|
336
|
+
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
337
|
+
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
338
|
+
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
339
|
+
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
340
|
+
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
341
|
+
onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
342
|
+
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
343
|
+
onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
344
|
+
onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
345
|
+
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
346
|
+
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
347
|
+
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
348
|
+
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
349
|
+
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
350
|
+
onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
351
|
+
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
352
|
+
oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
353
|
+
oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
354
|
+
oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
355
|
+
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
356
|
+
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
357
|
+
oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
358
|
+
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
359
|
+
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
360
|
+
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
361
|
+
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
362
|
+
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
363
|
+
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
364
|
+
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
365
|
+
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
366
|
+
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
367
|
+
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
368
|
+
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
369
|
+
onerror: OnErrorEventHandler;
|
|
370
|
+
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
371
|
+
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
372
|
+
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
373
|
+
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
374
|
+
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
375
|
+
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
376
|
+
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
377
|
+
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
378
|
+
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
379
|
+
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
380
|
+
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
381
|
+
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
382
|
+
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
383
|
+
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
384
|
+
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
385
|
+
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
386
|
+
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
387
|
+
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
388
|
+
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
389
|
+
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
390
|
+
onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
391
|
+
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
392
|
+
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
393
|
+
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
394
|
+
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
395
|
+
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
396
|
+
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
397
|
+
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
398
|
+
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
399
|
+
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
400
|
+
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
401
|
+
onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
402
|
+
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
403
|
+
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
404
|
+
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
405
|
+
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
406
|
+
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
407
|
+
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
408
|
+
onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
409
|
+
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
410
|
+
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
411
|
+
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
412
|
+
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
413
|
+
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
414
|
+
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
415
|
+
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
416
|
+
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
417
|
+
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
418
|
+
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
419
|
+
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
420
|
+
ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
|
|
421
|
+
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
422
|
+
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
423
|
+
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
424
|
+
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
425
|
+
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
426
|
+
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
427
|
+
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
428
|
+
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
429
|
+
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
430
|
+
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
431
|
+
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
432
|
+
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
433
|
+
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
434
|
+
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
435
|
+
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
436
|
+
autofocus: boolean;
|
|
437
|
+
readonly dataset: DOMStringMap;
|
|
438
|
+
nonce?: string;
|
|
439
|
+
tabIndex: number;
|
|
440
|
+
blur(): void;
|
|
441
|
+
focus(options?: FocusOptions): void;
|
|
442
|
+
};
|
|
443
|
+
get observedAttributes(): string[];
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
interface NavigationBarMetrics {
|
|
447
|
+
statusBarHeight?: number;
|
|
448
|
+
navContentHeight?: number;
|
|
449
|
+
safeAreaTop?: number;
|
|
450
|
+
}
|
|
451
|
+
declare function setNavigationBarMetrics(next: NavigationBarMetrics): void;
|
|
38
452
|
|
|
39
453
|
interface RegisterMeta {
|
|
40
454
|
id: string;
|
|
@@ -63,7 +477,14 @@ interface AppLaunchOptions {
|
|
|
63
477
|
}
|
|
64
478
|
type PageRawOptions = ComponentOptions & PageHooks & Record<string, unknown>;
|
|
65
479
|
type ComponentRawOptions = ComponentOptions & Record<string, unknown>;
|
|
66
|
-
declare function initializePageRoutes(ids: string[]
|
|
480
|
+
declare function initializePageRoutes(ids: string[], options?: {
|
|
481
|
+
rpx?: {
|
|
482
|
+
designWidth?: number;
|
|
483
|
+
varName?: string;
|
|
484
|
+
};
|
|
485
|
+
navigationBar?: NavigationBarMetrics;
|
|
486
|
+
form?: ButtonFormConfig;
|
|
487
|
+
}): void;
|
|
67
488
|
declare function registerPage<T extends PageRawOptions | undefined>(options: T, meta: RegisterMeta): T;
|
|
68
489
|
declare function registerComponent<T extends ComponentRawOptions | undefined>(options: T, meta: RegisterMeta): T;
|
|
69
490
|
declare function registerApp<T extends AppRuntime | undefined>(options: T, _meta?: RegisterMeta): T;
|
|
@@ -82,8 +503,27 @@ declare function switchTab(options: {
|
|
|
82
503
|
declare function navigateBack(options?: {
|
|
83
504
|
delta?: number;
|
|
84
505
|
}): Promise<void>;
|
|
506
|
+
declare function setNavigationBarTitle(options: {
|
|
507
|
+
title: string;
|
|
508
|
+
}): Promise<void>;
|
|
509
|
+
declare function setNavigationBarColor(options: {
|
|
510
|
+
frontColor?: string;
|
|
511
|
+
backgroundColor?: string;
|
|
512
|
+
animation?: {
|
|
513
|
+
duration?: number;
|
|
514
|
+
timingFunction?: string;
|
|
515
|
+
};
|
|
516
|
+
}): Promise<void>;
|
|
517
|
+
declare function showNavigationBarLoading(): Promise<void>;
|
|
518
|
+
declare function hideNavigationBarLoading(): Promise<void>;
|
|
519
|
+
|
|
520
|
+
interface RpxConfig {
|
|
521
|
+
designWidth?: number;
|
|
522
|
+
varName?: string;
|
|
523
|
+
}
|
|
524
|
+
declare function setupRpx(config?: RpxConfig): void;
|
|
85
525
|
|
|
86
526
|
declare function removeStyle(id: string): void;
|
|
87
527
|
declare function injectStyle(css: string, id?: string): () => void;
|
|
88
528
|
|
|
89
|
-
export { type TemplateRenderer, type TemplateScope, createTemplate, defineComponent, initializePageRoutes, injectStyle, navigateBack, navigateTo, reLaunch, redirectTo, registerApp, registerComponent, registerPage, removeStyle, renderTemplate, switchTab };
|
|
529
|
+
export { type ButtonFormConfig, type NavigationBarMetrics, type RenderContext, type RpxConfig, type TemplateRenderer, type TemplateScope, createRenderContext, createTemplate, defineComponent, ensureButtonDefined, hideNavigationBarLoading, initializePageRoutes, injectStyle, navigateBack, navigateTo, reLaunch, redirectTo, registerApp, registerComponent, registerPage, removeStyle, renderTemplate, setButtonFormConfig, setNavigationBarColor, setNavigationBarMetrics, setNavigationBarTitle, setupRpx, showNavigationBarLoading, switchTab };
|