@tarojs/runtime 3.7.0-alpha.0 → 3.7.0-alpha.1
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/bom/history.d.ts +2 -2
- package/dist/bom/location.d.ts +2 -2
- package/dist/dom/tree.d.ts +1 -1
- package/dist/dom-external/inner-html/parser.d.ts +1 -1
- package/dist/dom-external/mutation-observer/implements.d.ts +1 -1
- package/dist/dom-external/node.d.ts +1 -1
- package/dist/dsl/instance.d.ts +1 -1
- package/dist/emitter/emitter.d.ts +1 -1
- package/dist/interface/event.d.ts +1 -1
- package/dist/interface/hydrate.d.ts +2 -2
- package/dist/interface/node.d.ts +2 -2
- package/dist/interface/utils.d.ts +2 -2
- package/dist/runtime.esm.d.ts +5 -5
- package/dist/runtime.esm.js +6 -6
- package/dist/runtime.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/bom/history.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ export interface HistoryState {
|
|
|
6
6
|
title: string;
|
|
7
7
|
url: string;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
type Options = {
|
|
10
10
|
window: any;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type HistoryContext = {
|
|
13
13
|
location: LocationType.Location;
|
|
14
14
|
stack: HistoryState[];
|
|
15
15
|
cur: number;
|
package/dist/bom/location.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Events } from '../emitter/emitter';
|
|
2
2
|
import { RuntimeCache } from '../utils/cache';
|
|
3
|
-
|
|
3
|
+
type Options = {
|
|
4
4
|
window: any;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type LocationContext = {
|
|
7
7
|
lastHref: string;
|
|
8
8
|
};
|
|
9
9
|
export declare class Location extends Events {
|
package/dist/dom/tree.d.ts
CHANGED
|
@@ -20,6 +20,6 @@ export interface Element extends Node {
|
|
|
20
20
|
export interface ParsedTaroElement extends TaroElement {
|
|
21
21
|
h5tagName?: string;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
type ChildNode = Comment | Text | Element;
|
|
24
24
|
export declare function parser(html: string, document: TaroDocument): (import("../..").TaroText | TaroElement)[];
|
|
25
25
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TaroNode } from '../../dom/node';
|
|
2
2
|
import type { MutationRecord } from './record';
|
|
3
|
-
export
|
|
3
|
+
export type MutationCallback = (mutations: MutationRecord[]) => any;
|
|
4
4
|
/**
|
|
5
5
|
* @see https://dom.spec.whatwg.org/#dictdef-mutationobserverinit
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TaroNode } from '../dom/node';
|
|
2
|
-
export
|
|
2
|
+
export type IPosition = 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend';
|
|
3
3
|
/**
|
|
4
4
|
* An implementation of `Element.insertAdjacentHTML()`
|
|
5
5
|
* to support Vue 3 with a version of or greater than `vue@3.1.2`
|
package/dist/dsl/instance.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface Instance<T = Record<string, any>> extends Component<T>, Show, P
|
|
|
13
13
|
export interface VueAppInstance extends ComponentOptions<VueCtor> {
|
|
14
14
|
$options: AppInstance;
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export type VueInstance<M = Record<string, any>, P = Record<string, any>> = CombinedVueInstance<VueCtor, Record<string, any>, M, P, Record<never, any>> & VueInternal;
|
|
17
17
|
interface VueInternal {
|
|
18
18
|
_render(): VNode;
|
|
19
19
|
_update(vnode: VNode, hyrate: boolean): void;
|
|
@@ -25,6 +25,6 @@ interface MiniTextData {
|
|
|
25
25
|
[Shortcuts.Text]: string;
|
|
26
26
|
[Shortcuts.NodeName]: string;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
29
|
-
export
|
|
28
|
+
export type MiniData = MiniElementData | MiniTextData;
|
|
29
|
+
export type HydratedData = () => MiniData | MiniData[];
|
|
30
30
|
export {};
|
package/dist/interface/node.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HydratedData } from './index';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type UpdatePayloadValue = string | boolean | HydratedData;
|
|
3
|
+
export type DataTree = Record<string, UpdatePayloadValue | ReturnType<HydratedData>>;
|
|
4
4
|
export interface UpdatePayload {
|
|
5
5
|
path: string;
|
|
6
6
|
value: UpdatePayloadValue;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type Func = (...args: any[]) => any;
|
|
2
|
+
export type Ctx = Record<string, any>;
|
package/dist/runtime.esm.d.ts
CHANGED
|
@@ -578,7 +578,7 @@ declare class MutationObserver {
|
|
|
578
578
|
takeRecords(): MutationRecord[];
|
|
579
579
|
static record(record: MutationRecord): void;
|
|
580
580
|
}
|
|
581
|
-
interface Instance<T
|
|
581
|
+
interface Instance<T = Record<string, any>> extends Component<T>, Show, PageInstance {
|
|
582
582
|
tid?: string;
|
|
583
583
|
$forceUpdate?(): void;
|
|
584
584
|
$nextTick?(cb: () => void): void;
|
|
@@ -587,7 +587,7 @@ interface Instance<T> extends Component<T>, Show, PageInstance {
|
|
|
587
587
|
interface VueAppInstance extends ComponentOptions<VueCtor> {
|
|
588
588
|
$options: AppInstance;
|
|
589
589
|
}
|
|
590
|
-
type VueInstance<M, P
|
|
590
|
+
type VueInstance<M = Record<string, any>, P = Record<string, any>> = CombinedVueInstance<VueCtor, Record<string, any>, M, P, Record<never, any>> & VueInternal;
|
|
591
591
|
interface VueInternal {
|
|
592
592
|
_render(): VNode;
|
|
593
593
|
_update(vnode: VNode, hyrate: boolean): void;
|
|
@@ -595,13 +595,13 @@ interface VueInternal {
|
|
|
595
595
|
interface PageProps {
|
|
596
596
|
tid?: string;
|
|
597
597
|
}
|
|
598
|
-
interface ReactPageComponent<T> extends ComponentClass<T>, PageInstance {
|
|
598
|
+
interface ReactPageComponent<T = PageProps> extends ComponentClass<T>, PageInstance {
|
|
599
599
|
}
|
|
600
|
-
interface ReactPageInstance<T> extends Component<T>, PageInstance {
|
|
600
|
+
interface ReactPageInstance<T = PageProps> extends Component<T>, PageInstance {
|
|
601
601
|
componentDidShow?(): void;
|
|
602
602
|
componentDidHide?(): void;
|
|
603
603
|
}
|
|
604
|
-
interface ReactAppInstance<T> extends Component<T>, AppInstance {
|
|
604
|
+
interface ReactAppInstance<T = AppInstance> extends Component<T>, AppInstance {
|
|
605
605
|
}
|
|
606
606
|
interface PageLifeCycle extends Show {
|
|
607
607
|
eh?(event: MpEvent): void;
|
package/dist/runtime.esm.js
CHANGED
|
@@ -2879,6 +2879,12 @@ _URLSearchParams_dict = new WeakMap();
|
|
|
2879
2879
|
|
|
2880
2880
|
var _URL_hash, _URL_hostname, _URL_pathname, _URL_port, _URL_protocol, _URL_search;
|
|
2881
2881
|
class URL {
|
|
2882
|
+
static createObjectURL() {
|
|
2883
|
+
throw new Error('Oops, not support URL.createObjectURL() in miniprogram.');
|
|
2884
|
+
}
|
|
2885
|
+
static revokeObjectURL() {
|
|
2886
|
+
throw new Error('Oops, not support URL.revokeObjectURL() in miniprogram.');
|
|
2887
|
+
}
|
|
2882
2888
|
constructor(url, base) {
|
|
2883
2889
|
/* private property */
|
|
2884
2890
|
_URL_hash.set(this, '');
|
|
@@ -2898,12 +2904,6 @@ class URL {
|
|
|
2898
2904
|
__classPrivateFieldSet(this, _URL_protocol, protocol, "f");
|
|
2899
2905
|
__classPrivateFieldSet(this, _URL_search, new URLSearchParams(search), "f");
|
|
2900
2906
|
}
|
|
2901
|
-
static createObjectURL() {
|
|
2902
|
-
throw new Error('Oops, not support URL.createObjectURL() in miniprogram.');
|
|
2903
|
-
}
|
|
2904
|
-
static revokeObjectURL() {
|
|
2905
|
-
throw new Error('Oops, not support URL.revokeObjectURL() in miniprogram.');
|
|
2906
|
-
}
|
|
2907
2907
|
/* public property */
|
|
2908
2908
|
get protocol() {
|
|
2909
2909
|
return __classPrivateFieldGet(this, _URL_protocol, "f");
|