@tarojs/runtime 4.0.12 → 4.0.13-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.
Files changed (72) hide show
  1. package/dist/bom/URL.d.ts +3 -6
  2. package/dist/bom/URLSearchParams.d.ts +1 -2
  3. package/dist/bom/document.d.ts +2 -3
  4. package/dist/bom/getComputedStyle.d.ts +4 -5
  5. package/dist/bom/history.d.ts +5 -7
  6. package/dist/bom/location.d.ts +3 -5
  7. package/dist/bom/navigator.d.ts +1 -2
  8. package/dist/bom/raf.d.ts +2 -2
  9. package/dist/bom/window.d.ts +8 -9
  10. package/dist/constants/index.d.ts +52 -53
  11. package/dist/current.d.ts +5 -5
  12. package/dist/dom/anchor-element.d.ts +2 -3
  13. package/dist/dom/class-list.d.ts +2 -3
  14. package/dist/dom/document.d.ts +6 -10
  15. package/dist/dom/element.d.ts +6 -7
  16. package/dist/dom/event-source.d.ts +3 -3
  17. package/dist/dom/event-target.d.ts +2 -3
  18. package/dist/dom/event.d.ts +5 -6
  19. package/dist/dom/form.d.ts +3 -4
  20. package/dist/dom/node.d.ts +8 -39
  21. package/dist/{node_types-9ac5b4dd.d.ts → dom/node_types.d.ts} +1 -2
  22. package/dist/dom/root.d.ts +3 -4
  23. package/dist/dom/style.d.ts +2 -3
  24. package/dist/dom/style_properties.js +1 -0
  25. package/dist/dom/style_properties.js.map +1 -1
  26. package/dist/dom/svg.d.ts +2 -3
  27. package/dist/dom/text.d.ts +3 -4
  28. package/dist/dom/transfer.d.ts +2 -3
  29. package/dist/dom/tree.d.ts +3 -3
  30. package/dist/dom-external/element.d.ts +3 -4
  31. package/dist/dom-external/inner-html/html.d.ts +2 -3
  32. package/dist/dom-external/inner-html/parser.d.ts +7 -7
  33. package/dist/dom-external/inner-html/scaner.d.ts +3 -3
  34. package/dist/dom-external/inner-html/style.d.ts +3 -3
  35. package/dist/dom-external/inner-html/tags.d.ts +5 -6
  36. package/dist/dom-external/inner-html/utils.d.ts +1 -2
  37. package/dist/dom-external/mutation-observer/implements.d.ts +6 -25
  38. package/dist/dom-external/mutation-observer/index.d.ts +6 -5
  39. package/dist/{record-32b054d8.d.ts → dom-external/mutation-observer/record.d.ts} +3 -4
  40. package/dist/dom-external/node.d.ts +5 -6
  41. package/dist/dsl/common.d.ts +14 -15
  42. package/dist/{instance-530729bd.d.ts → dsl/instance.d.ts} +13 -14
  43. package/dist/emitter/emitter.d.ts +2 -2
  44. package/dist/env.d.ts +2 -2
  45. package/dist/hydrate.d.ts +4 -5
  46. package/dist/index.cjs.js +5 -4
  47. package/dist/index.cjs.js.map +1 -1
  48. package/dist/index.d.ts +33 -32
  49. package/dist/interface/element.d.ts +4 -0
  50. package/dist/interface/event-target.d.ts +11 -0
  51. package/dist/interface/event.d.ts +15 -0
  52. package/dist/interface/hydrate.d.ts +29 -0
  53. package/dist/interface/index.d.ts +7 -0
  54. package/dist/interface/node.d.ts +7 -0
  55. package/dist/{options-530729bd.d.ts → interface/options.d.ts} +4 -5
  56. package/dist/interface/utils.d.ts +2 -0
  57. package/dist/next-tick.d.ts +2 -3
  58. package/dist/options.d.ts +2 -3
  59. package/dist/perf.d.ts +2 -2
  60. package/dist/polyfill/array.d.ts +2 -3
  61. package/dist/polyfill/intersection-observer.d.ts +1 -2
  62. package/dist/polyfill/object.d.ts +3 -4
  63. package/dist/runtime.esm.js +1 -0
  64. package/dist/runtime.esm.js.map +1 -1
  65. package/dist/utils/cache.d.ts +1 -2
  66. package/dist/utils/index.d.ts +17 -18
  67. package/dist/utils/lodash.d.ts +2 -3
  68. package/dist/utils/router.d.ts +7 -8
  69. package/package.json +7 -5
  70. package/dist/index-26658829.d.ts +0 -23
  71. package/dist/index.cjs.d.ts +0 -813
  72. package/dist/runtime.esm.d.ts +0 -813
package/dist/index.d.ts CHANGED
@@ -1,34 +1,35 @@
1
- import env from "./env.js";
1
+ import './dom-external';
2
+ import env from './env';
2
3
  export { hooks } from '@tarojs/shared';
3
- export { taroDocumentProvider as document } from "./bom/document.js";
4
- export { taroGetComputedStyleProvider as getComputedStyle } from "./bom/getComputedStyle.js";
5
- export { History } from "./bom/history.js";
6
- export { Location } from "./bom/location.js";
7
- export { nav as navigator } from "./bom/navigator.js";
8
- export { caf as cancelAnimationFrame, now, raf as requestAnimationFrame } from "./bom/raf.js";
9
- export { parseUrl, TaroURLProvider as URL } from "./bom/URL.js";
10
- export { URLSearchParams } from "./bom/URLSearchParams.js";
11
- export { taroHistoryProvider as history, taroLocationProvider as location, taroWindowProvider as window } from "./bom/window.js";
12
- export { TaroElement } from "./dom/element.js";
13
- export { createEvent, eventHandler, TaroEvent } from "./dom/event.js";
14
- export { FormElement } from "./dom/form.js";
15
- export { TaroNode } from "./dom/node.js";
16
- export { TaroRootElement } from "./dom/root.js";
17
- export { Style } from "./dom/style.js";
18
- export { SVGElement } from "./dom/svg.js";
19
- export { TaroText } from "./dom/text.js";
20
- export { MutationObserver } from "./dom-external/mutation-observer/index.js";
4
+ export { taroDocumentProvider as document } from './bom/document';
5
+ export { taroGetComputedStyleProvider as getComputedStyle } from './bom/getComputedStyle';
6
+ export { History } from './bom/history';
7
+ export { Location } from './bom/location';
8
+ export { nav as navigator } from './bom/navigator';
9
+ export { caf as cancelAnimationFrame, now, raf as requestAnimationFrame } from './bom/raf';
10
+ export { parseUrl, TaroURLProvider as URL } from './bom/URL';
11
+ export { URLSearchParams } from './bom/URLSearchParams';
12
+ export { taroHistoryProvider as history, taroLocationProvider as location, taroWindowProvider as window } from './bom/window';
13
+ export { TaroElement } from './dom/element';
14
+ export { createEvent, eventHandler, TaroEvent } from './dom/event';
15
+ export { FormElement } from './dom/form';
16
+ export { TaroNode } from './dom/node';
17
+ export { TaroRootElement } from './dom/root';
18
+ export { Style } from './dom/style';
19
+ export { SVGElement } from './dom/svg';
20
+ export { TaroText } from './dom/text';
21
+ export { MutationObserver } from './dom-external/mutation-observer';
21
22
  export { env };
22
- export * from "./constants/index.js";
23
- export { Current, getCurrentInstance } from "./current.js";
24
- export { eventSource } from "./dom/event-source.js";
25
- export { createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify } from "./dsl/common.js";
26
- export * from "./emitter/emitter.js";
27
- export { hydrate } from "./hydrate.js";
28
- export { nextTick } from "./next-tick.js";
29
- export { options } from "./options.js";
30
- export * from "./perf.js";
31
- export * from "./utils/index.js";
32
- export * from "./instance-530729bd.js";
33
- export * from "./index-26658829.js";
34
- export * from "./polyfill/index.js";
23
+ export * from './constants';
24
+ export { Current, getCurrentInstance } from './current';
25
+ export { eventSource } from './dom/event-source';
26
+ export { createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify } from './dsl/common';
27
+ export * from './emitter/emitter';
28
+ export { hydrate } from './hydrate';
29
+ export { nextTick } from './next-tick';
30
+ export { options } from './options';
31
+ export * from './perf';
32
+ export * from './utils';
33
+ export * from './dsl/instance';
34
+ export * from './interface';
35
+ export * from './polyfill';
@@ -0,0 +1,4 @@
1
+ export interface Attributes {
2
+ name: string;
3
+ value: string;
4
+ }
@@ -0,0 +1,11 @@
1
+ export interface EventListenerOptions {
2
+ capture?: boolean;
3
+ }
4
+ export interface AddEventListenerOptions extends EventListenerOptions {
5
+ once?: boolean;
6
+ passive?: boolean;
7
+ }
8
+ export interface EventHandler<T = any, R = void> {
9
+ (...args: T[]): R;
10
+ _stop?: boolean;
11
+ }
@@ -0,0 +1,15 @@
1
+ export interface EventOptions {
2
+ bubbles: boolean;
3
+ cancelable: boolean;
4
+ }
5
+ type Target = Record<string, unknown> & {
6
+ dataset: Record<string, unknown>;
7
+ id: string;
8
+ };
9
+ export interface MpEvent {
10
+ type: string;
11
+ detail: Record<string, unknown>;
12
+ target: Target;
13
+ currentTarget: Target;
14
+ }
15
+ export {};
@@ -0,0 +1,29 @@
1
+ import type { Shortcuts } from '@tarojs/shared';
2
+ import type { PageConfig } from './utils';
3
+ export interface MpInstance {
4
+ config: PageConfig;
5
+ setData: (data: unknown, cb: () => void) => void;
6
+ route?: string;
7
+ __route__: string;
8
+ $taroParams?: Record<string, unknown>;
9
+ $taroPath: string;
10
+ __data__: any;
11
+ data: any;
12
+ exitState?: any;
13
+ selectComponent: (selector: string) => any;
14
+ }
15
+ export interface MiniElementData {
16
+ [Shortcuts.Childnodes]?: MiniData[];
17
+ [Shortcuts.NodeName]: string;
18
+ [Shortcuts.Class]?: string;
19
+ [Shortcuts.Style]?: string;
20
+ uid?: string;
21
+ sid: string;
22
+ [key: string]: unknown;
23
+ }
24
+ export interface MiniTextData {
25
+ [Shortcuts.Text]: string;
26
+ [Shortcuts.NodeName]: string;
27
+ }
28
+ export type MiniData = MiniElementData | MiniTextData;
29
+ export type HydratedData = () => MiniData | MiniData[];
@@ -0,0 +1,7 @@
1
+ export * from './element';
2
+ export * from './event';
3
+ export * from './event-target';
4
+ export * from './hydrate';
5
+ export * from './node';
6
+ export * from './options';
7
+ export * from './utils';
@@ -0,0 +1,7 @@
1
+ import { HydratedData } from './index';
2
+ export type UpdatePayloadValue = string | boolean | HydratedData;
3
+ export type DataTree = Record<string, UpdatePayloadValue | ReturnType<HydratedData>>;
4
+ export interface UpdatePayload {
5
+ path: string;
6
+ value: UpdatePayloadValue;
7
+ }
@@ -1,7 +1,7 @@
1
- import { TaroElement } from "./dom/element.js";
2
- import { TaroText } from "./dom/text.js";
3
- import { Element, Text } from "./dom-external/inner-html/parser.js";
4
- interface Options {
1
+ import type { TaroElement } from '../dom/element';
2
+ import type { TaroText } from '../dom/text';
3
+ import type { Element, Text } from '../dom-external/inner-html/parser';
4
+ export interface Options {
5
5
  prerender: boolean;
6
6
  debug: boolean;
7
7
  html?: {
@@ -14,4 +14,3 @@ interface Options {
14
14
  };
15
15
  miniGlobal?: any;
16
16
  }
17
- export { Options };
@@ -0,0 +1,2 @@
1
+ export type TFunc = (...args: any[]) => any;
2
+ export type PageConfig = Record<string, any>;
@@ -1,3 +1,2 @@
1
- import { TFunc } from "./index-26658829.js";
2
- declare const nextTick: (cb: TFunc, ctx?: Record<string, any>) => void;
3
- export { nextTick };
1
+ import type { TFunc } from './interface';
2
+ export declare const nextTick: (cb: TFunc, ctx?: Record<string, any>) => void;
package/dist/options.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import { Options } from "./index-26658829.js";
2
- declare const options: Options;
3
- export { options };
1
+ import type { Options } from './interface';
2
+ export declare const options: Options;
package/dist/perf.d.ts CHANGED
@@ -5,5 +5,5 @@ declare class Performance {
5
5
  stop(id: string, now?: number): void;
6
6
  delayStop(id: string, delay?: number): ((...args: any[]) => void) | undefined;
7
7
  }
8
- declare const perf: Performance;
9
- export { perf };
8
+ export declare const perf: Performance;
9
+ export {};
@@ -1,3 +1,2 @@
1
- declare function handleArrayFindPolyfill(): void;
2
- declare function handleArrayIncludesPolyfill(): void;
3
- export { handleArrayFindPolyfill, handleArrayIncludesPolyfill };
1
+ export declare function handleArrayFindPolyfill(): void;
2
+ export declare function handleArrayIncludesPolyfill(): void;
@@ -1,2 +1 @@
1
- declare function handleIntersectionObserverPolyfill(): void;
2
- export { handleIntersectionObserverPolyfill };
1
+ export declare function handleIntersectionObserverPolyfill(): void;
@@ -1,4 +1,3 @@
1
- declare function handleObjectAssignPolyfill(): void;
2
- declare function handleObjectEntriesPolyfill(): void;
3
- declare function handleObjectDefinePropertyPolyfill(): void;
4
- export { handleObjectAssignPolyfill, handleObjectEntriesPolyfill, handleObjectDefinePropertyPolyfill };
1
+ export declare function handleObjectAssignPolyfill(): void;
2
+ export declare function handleObjectEntriesPolyfill(): void;
3
+ export declare function handleObjectDefinePropertyPolyfill(): void;
@@ -1763,6 +1763,7 @@ const WEBKIT = 'webkit';
1763
1763
  const styleProperties = [
1764
1764
  'all',
1765
1765
  'appearance',
1766
+ 'backdropFilter',
1766
1767
  'blockOverflow',
1767
1768
  'blockSize',
1768
1769
  'bottom',