@tarojs/runtime 3.6.22-alpha.4 → 3.6.22-nightly.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.
|
@@ -35,7 +35,6 @@ export declare const KEY_CODE = "keyCode";
|
|
|
35
35
|
export declare const TOUCHMOVE = "touchmove";
|
|
36
36
|
export declare const DATE = "Date";
|
|
37
37
|
export declare const SET_TIMEOUT = "setTimeout";
|
|
38
|
-
export declare const COMPILE_MODE = "compileMode";
|
|
39
38
|
export declare const CATCHMOVE = "catchMove";
|
|
40
39
|
export declare const CATCH_VIEW = "catch-view";
|
|
41
40
|
export declare const COMMENT = "comment";
|
|
@@ -21,9 +21,10 @@ export interface MiniElementData {
|
|
|
21
21
|
sid: string;
|
|
22
22
|
[key: string]: unknown;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
interface MiniTextData {
|
|
25
25
|
[Shortcuts.Text]: string;
|
|
26
26
|
[Shortcuts.NodeName]: string;
|
|
27
27
|
}
|
|
28
28
|
export type MiniData = MiniElementData | MiniTextData;
|
|
29
29
|
export type HydratedData = () => MiniData | MiniData[];
|
|
30
|
+
export {};
|
package/dist/runtime.esm.d.ts
CHANGED
|
@@ -626,7 +626,6 @@ declare const KEY_CODE = "keyCode";
|
|
|
626
626
|
declare const TOUCHMOVE = "touchmove";
|
|
627
627
|
declare const DATE = "Date";
|
|
628
628
|
declare const SET_TIMEOUT = "setTimeout";
|
|
629
|
-
declare const COMPILE_MODE = "compileMode";
|
|
630
629
|
declare const CATCHMOVE = "catchMove";
|
|
631
630
|
declare const CATCH_VIEW = "catch-view";
|
|
632
631
|
declare const COMMENT = "comment";
|
|
@@ -779,4 +778,4 @@ declare const options: Options;
|
|
|
779
778
|
declare const incrementId: () => () => string;
|
|
780
779
|
declare function isHasExtractProp(el: TaroElement): boolean;
|
|
781
780
|
export { hooks } from '@tarojs/shared';
|
|
782
|
-
export { document, getComputedStyle, History, Location, nav as navigator, _caf as cancelAnimationFrame, now, _raf as requestAnimationFrame, parseUrl, URL, URLSearchParams, history, location, window, TaroElement, createEvent, eventHandler, TaroEvent, FormElement, TaroNode, TaroRootElement, Style, SVGElement, TaroText, MutationObserver, env, PROPERTY_THRESHOLD, TARO_RUNTIME, HOOKS_APP_ID, SET_DATA, PAGE_INIT, ROOT_STR, HTML, HEAD, BODY, APP, CONTAINER, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, ID, UID, CLASS, STYLE, FOCUS, VIEW, STATIC_VIEW, PURE_VIEW, PROPS, DATASET, OBJECT, VALUE, INPUT, CHANGE, CUSTOM_WRAPPER, TARGET, CURRENT_TARGET, TYPE, CONFIRM, TIME_STAMP, KEY_CODE, TOUCHMOVE, DATE, SET_TIMEOUT,
|
|
781
|
+
export { document, getComputedStyle, History, Location, nav as navigator, _caf as cancelAnimationFrame, now, _raf as requestAnimationFrame, parseUrl, URL, URLSearchParams, history, location, window, TaroElement, createEvent, eventHandler, TaroEvent, FormElement, TaroNode, TaroRootElement, Style, SVGElement, TaroText, MutationObserver, env, PROPERTY_THRESHOLD, TARO_RUNTIME, HOOKS_APP_ID, SET_DATA, PAGE_INIT, ROOT_STR, HTML, HEAD, BODY, APP, CONTAINER, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, ID, UID, CLASS, STYLE, FOCUS, VIEW, STATIC_VIEW, PURE_VIEW, PROPS, DATASET, OBJECT, VALUE, INPUT, CHANGE, CUSTOM_WRAPPER, TARGET, CURRENT_TARGET, TYPE, CONFIRM, TIME_STAMP, KEY_CODE, TOUCHMOVE, DATE, SET_TIMEOUT, CATCHMOVE, CATCH_VIEW, COMMENT, ON_LOAD, ON_READY, ON_SHOW, ON_HIDE, OPTIONS, EXTERNAL_CLASSES, EVENT_CALLBACK_RESULT, BEHAVIORS, A, CONTEXT_ACTIONS, Current, getCurrentInstance, eventSource, addLeadingSlash, createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify, EventsType, eventCenter, Events, hydrate, nextTick, options, incrementId, isHasExtractProp, Instance, VueAppInstance, VueInstance, PageProps, ReactPageComponent, ReactPageInstance, ReactAppInstance, PageLifeCycle, PageInstance, AppInstance, Attributes, EventOptions, MpEvent, EventListenerOptions, AddEventListenerOptions, EventHandler, MpInstance, MiniElementData, MiniData, HydratedData, UpdatePayloadValue, DataTree, UpdatePayload, Options$0 as Options, Func, Ctx };
|
package/dist/runtime.esm.js
CHANGED
|
@@ -38,7 +38,6 @@ const KEY_CODE = 'keyCode';
|
|
|
38
38
|
const TOUCHMOVE = 'touchmove';
|
|
39
39
|
const DATE = 'Date';
|
|
40
40
|
const SET_TIMEOUT = 'setTimeout';
|
|
41
|
-
const COMPILE_MODE = 'compileMode';
|
|
42
41
|
const CATCHMOVE = 'catchMove';
|
|
43
42
|
const CATCH_VIEW = 'catch-view';
|
|
44
43
|
const COMMENT = 'comment';
|
|
@@ -409,10 +408,14 @@ let componentsAlias;
|
|
|
409
408
|
*/
|
|
410
409
|
function hydrate(node) {
|
|
411
410
|
var _a;
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
411
|
+
if (!componentsAlias) {
|
|
412
|
+
// 初始化 componentsAlias
|
|
413
|
+
componentsAlias = getComponentsAlias();
|
|
414
|
+
}
|
|
415
|
+
if (!SPECIAL_NODES) {
|
|
416
|
+
// 初始化 SPECIAL_NODES
|
|
417
|
+
SPECIAL_NODES = hooks.call('getSpecialNodes');
|
|
418
|
+
}
|
|
416
419
|
const nodeName = node.nodeName;
|
|
417
420
|
if (isText(node)) {
|
|
418
421
|
return {
|
|
@@ -441,19 +444,22 @@ function hydrate(node) {
|
|
|
441
444
|
prop !== CLASS &&
|
|
442
445
|
prop !== STYLE &&
|
|
443
446
|
prop !== ID &&
|
|
444
|
-
propInCamelCase !== CATCHMOVE
|
|
445
|
-
propInCamelCase !== COMPILE_MODE) {
|
|
447
|
+
propInCamelCase !== CATCHMOVE) {
|
|
446
448
|
data[propInCamelCase] = props[prop];
|
|
447
449
|
}
|
|
448
450
|
if (nodeName === VIEW && propInCamelCase === CATCHMOVE && props[prop] !== false) {
|
|
449
451
|
data["nn" /* Shortcuts.NodeName */] = CATCH_VIEW;
|
|
450
452
|
}
|
|
451
|
-
if (propInCamelCase === COMPILE_MODE) {
|
|
452
|
-
data["nn" /* Shortcuts.NodeName */] = props[prop];
|
|
453
|
-
}
|
|
454
453
|
}
|
|
455
|
-
|
|
456
|
-
|
|
454
|
+
let { childNodes } = node;
|
|
455
|
+
// 过滤 comment 节点
|
|
456
|
+
childNodes = childNodes.filter(node => !isComment(node));
|
|
457
|
+
if (childNodes.length > 0) {
|
|
458
|
+
data["cn" /* Shortcuts.Childnodes */] = childNodes.map(hydrate);
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
data["cn" /* Shortcuts.Childnodes */] = [];
|
|
462
|
+
}
|
|
457
463
|
if (node.className !== '') {
|
|
458
464
|
data["cl" /* Shortcuts.Class */] = node.className;
|
|
459
465
|
}
|
|
@@ -4246,5 +4252,5 @@ const nextTick = (cb, ctx) => {
|
|
|
4246
4252
|
next();
|
|
4247
4253
|
};
|
|
4248
4254
|
|
|
4249
|
-
export { A, APP, BEHAVIORS, BODY, CATCHMOVE, CATCH_VIEW, CHANGE, CLASS, COMMENT,
|
|
4255
|
+
export { A, APP, BEHAVIORS, BODY, CATCHMOVE, CATCH_VIEW, CHANGE, CLASS, COMMENT, CONFIRM, CONTAINER, CONTEXT_ACTIONS, CURRENT_TARGET, CUSTOM_WRAPPER, Current, DATASET, DATE, DOCUMENT_ELEMENT_NAME, DOCUMENT_FRAGMENT, EVENT_CALLBACK_RESULT, EXTERNAL_CLASSES, FOCUS, FormElement, HEAD, HOOKS_APP_ID, HTML, History, ID, INPUT, KEY_CODE, Location, MutationObserver, OBJECT, ON_HIDE, ON_LOAD, ON_READY, ON_SHOW, OPTIONS, PAGE_INIT, PROPERTY_THRESHOLD, PROPS, PURE_VIEW, ROOT_STR, SET_DATA, SET_TIMEOUT, STATIC_VIEW, STYLE, SVGElement, Style, TARGET, TARO_RUNTIME, TIME_STAMP, TOUCHMOVE, TYPE, TaroElement, TaroEvent, TaroNode, TaroRootElement, TaroText, UID, URL, URLSearchParams, VALUE, VIEW, addLeadingSlash, _caf as cancelAnimationFrame, createComponentConfig, createEvent, createPageConfig, createRecursiveComponentConfig, document$1 as document, env, eventCenter, eventHandler, eventSource, getComputedStyle, getCurrentInstance, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, history, hydrate, incrementId, injectPageInstance, isHasExtractProp, location, nav as navigator, nextTick, now, options, parseUrl, removePageInstance, _raf as requestAnimationFrame, safeExecute, stringify, window$1 as window };
|
|
4250
4256
|
//# sourceMappingURL=runtime.esm.js.map
|