@lynx-js/react 0.121.1 → 0.121.2
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/CHANGELOG.md +26 -0
- package/package.json +4 -4
- package/runtime/lazy/element-template-import.js +73 -0
- package/runtime/lazy/import.js +4 -0
- package/runtime/lazy/target.js +23 -0
- package/runtime/lib/{snapshot/legacy-react-runtime/index.d.ts → core/compat/legacy-react-runtime.d.ts} +4 -4
- package/runtime/lib/{snapshot/legacy-react-runtime/index.js → core/compat/legacy-react-runtime.js} +6 -6
- package/runtime/lib/core/compat/legacy-react-runtime.js.map +1 -0
- package/runtime/lib/{snapshot → core}/compat/lynxComponent.d.ts +2 -1
- package/runtime/lib/{snapshot → core}/compat/lynxComponent.js +11 -5
- package/runtime/lib/core/compat/lynxComponent.js.map +1 -0
- package/runtime/lib/core/component.d.ts +2 -0
- package/runtime/lib/{snapshot/lynx → core}/component.js +37 -31
- package/runtime/lib/core/component.js.map +1 -0
- package/runtime/lib/{snapshot/lynx/dynamic-js.js → core/lynx/dynamic-import.js} +1 -1
- package/runtime/lib/core/lynx/dynamic-import.js.map +1 -0
- package/runtime/lib/core/lynx/lazy-bundle.js.map +1 -0
- package/runtime/lib/core/lynx/runtime-backend.d.ts +5 -0
- package/runtime/lib/core/lynx/runtime-backend.js +20 -0
- package/runtime/lib/core/lynx/runtime-backend.js.map +1 -0
- package/runtime/lib/core/performance.d.ts +30 -0
- package/runtime/lib/core/performance.js +145 -0
- package/runtime/lib/core/performance.js.map +1 -0
- package/runtime/lib/element-template/background/commit-hook.js +2 -2
- package/runtime/lib/element-template/background/commit-hook.js.map +1 -1
- package/runtime/lib/element-template/background/document.js +7 -1
- package/runtime/lib/element-template/background/document.js.map +1 -1
- package/runtime/lib/element-template/background/hydrate.d.ts +2 -3
- package/runtime/lib/element-template/background/hydrate.js +211 -55
- package/runtime/lib/element-template/background/hydrate.js.map +1 -1
- package/runtime/lib/element-template/background/hydration-listener.js +6 -25
- package/runtime/lib/element-template/background/hydration-listener.js.map +1 -1
- package/runtime/lib/element-template/background/instance.d.ts +30 -3
- package/runtime/lib/element-template/background/instance.js +209 -28
- package/runtime/lib/element-template/background/instance.js.map +1 -1
- package/runtime/lib/element-template/debug/alog.d.ts +14 -0
- package/runtime/lib/element-template/debug/alog.js +23 -0
- package/runtime/lib/element-template/debug/alog.js.map +1 -1
- package/runtime/lib/element-template/debug/elementPAPICall.js +1 -0
- package/runtime/lib/element-template/debug/elementPAPICall.js.map +1 -1
- package/runtime/lib/element-template/index.d.ts +3 -2
- package/runtime/lib/element-template/index.js +6 -7
- package/runtime/lib/element-template/index.js.map +1 -1
- package/runtime/lib/element-template/internal.d.ts +4 -0
- package/runtime/lib/element-template/internal.js +4 -4
- package/runtime/lib/element-template/internal.js.map +1 -1
- package/runtime/lib/element-template/lynx/performance.d.ts +0 -21
- package/runtime/lib/element-template/lynx/performance.js +4 -121
- package/runtime/lib/element-template/lynx/performance.js.map +1 -1
- package/runtime/lib/element-template/native/index.js +1 -1
- package/runtime/lib/element-template/native/index.js.map +1 -1
- package/runtime/lib/element-template/native/main-thread-api.js +1 -1
- package/runtime/lib/element-template/native/main-thread-api.js.map +1 -1
- package/runtime/lib/element-template/native/mts-destroy.js +2 -0
- package/runtime/lib/element-template/native/mts-destroy.js.map +1 -1
- package/runtime/lib/element-template/native/patch-listener.js +1 -1
- package/runtime/lib/element-template/native/patch-listener.js.map +1 -1
- package/runtime/lib/element-template/native/reload-background.d.ts +1 -0
- package/runtime/lib/element-template/native/{reload.js → reload-background.js} +1 -26
- package/runtime/lib/element-template/native/reload-background.js.map +1 -0
- package/runtime/lib/element-template/native/{reload.d.ts → reload-main-thread.d.ts} +0 -1
- package/runtime/lib/element-template/native/reload-main-thread.js +35 -0
- package/runtime/lib/element-template/native/reload-main-thread.js.map +1 -0
- package/runtime/lib/element-template/protocol/opcodes.d.ts +3 -0
- package/runtime/lib/element-template/protocol/opcodes.js +3 -0
- package/runtime/lib/element-template/protocol/opcodes.js.map +1 -1
- package/runtime/lib/element-template/protocol/template-type.d.ts +6 -0
- package/runtime/lib/element-template/protocol/template-type.js +20 -0
- package/runtime/lib/element-template/protocol/template-type.js.map +1 -0
- package/runtime/lib/element-template/protocol/types.d.ts +33 -13
- package/runtime/lib/element-template/runtime/list/list.d.ts +65 -0
- package/runtime/lib/element-template/runtime/list/list.js +587 -0
- package/runtime/lib/element-template/runtime/list/list.js.map +1 -0
- package/runtime/lib/element-template/runtime/patch.js +177 -74
- package/runtime/lib/element-template/runtime/patch.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-main-thread.js +13 -0
- package/runtime/lib/element-template/runtime/render/render-main-thread.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-opcodes.js +80 -43
- package/runtime/lib/element-template/runtime/render/render-opcodes.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-to-opcodes.js +32 -1
- package/runtime/lib/element-template/runtime/render/render-to-opcodes.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/handle.d.ts +3 -2
- package/runtime/lib/element-template/runtime/template/handle.js +5 -0
- package/runtime/lib/element-template/runtime/template/handle.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/registry.d.ts +2 -0
- package/runtime/lib/element-template/runtime/template/registry.js +5 -0
- package/runtime/lib/element-template/runtime/template/registry.js.map +1 -1
- package/runtime/lib/element-template/runtime-backend-marker.js +6 -0
- package/runtime/lib/element-template/runtime-backend-marker.js.map +1 -0
- package/runtime/lib/index.d.ts +1 -1
- package/runtime/lib/index.js +3 -1
- package/runtime/lib/index.js.map +1 -1
- package/runtime/lib/internal.d.ts +4 -3
- package/runtime/lib/internal.js +5 -4
- package/runtime/lib/internal.js.map +1 -1
- package/runtime/lib/runtime-backend-marker.d.ts +1 -0
- package/runtime/lib/runtime-backend-marker.js +6 -0
- package/runtime/lib/runtime-backend-marker.js.map +1 -0
- package/runtime/lib/snapshot/lifecycle/patch/commit.js +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/commit.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/updateMainThread.js +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/updateMainThread.js.map +1 -1
- package/runtime/lib/snapshot/lynx/calledByNative.js +1 -1
- package/runtime/lib/snapshot/lynx/calledByNative.js.map +1 -1
- package/runtime/lib/snapshot/lynx/performance.d.ts +0 -21
- package/runtime/lib/snapshot/lynx/performance.js +7 -121
- package/runtime/lib/snapshot/lynx/performance.js.map +1 -1
- package/runtime/lib/snapshot/lynx/tt.js +1 -1
- package/runtime/lib/snapshot/lynx/tt.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js +1 -1
- package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/snapshot.js +1 -1
- package/runtime/lib/snapshot/snapshot/snapshot.js.map +1 -1
- package/runtime/lib/tsconfig.tsbuildinfo +1 -1
- package/runtime/worklet-runtime/dev.js +1 -2
- package/runtime/worklet-runtime/main.js +1 -1
- package/testing-library/dist/{rslib-runtime.js → 0~rslib-runtime.js} +14 -13
- package/testing-library/dist/env/vitest.js +1 -1
- package/testing-library/dist/plugins/index.js +1 -1
- package/testing-library/dist/pure.js +18 -18
- package/testing-library/dist/rstest-config.js +2 -4
- package/testing-library/dist/setupFiles/common/bootstrap.js +1 -0
- package/testing-library/dist/setupFiles/common/runtime-setup.js +1 -1
- package/testing-library/dist/setupFiles/inner/rstest.js +2 -1
- package/testing-library/dist/setupFiles/inner/vitest.js +2 -1
- package/testing-library/dist/type-entry/index.js +1 -0
- package/transform/dist/wasm.cjs +113 -40
- package/runtime/lib/element-template/native/reload.js.map +0 -1
- package/runtime/lib/snapshot/compat/lynxComponent.js.map +0 -1
- package/runtime/lib/snapshot/legacy-react-runtime/index.js.map +0 -1
- package/runtime/lib/snapshot/lynx/component.js.map +0 -1
- package/runtime/lib/snapshot/lynx/dynamic-js.js.map +0 -1
- package/runtime/lib/snapshot/lynx/lazy-bundle.js.map +0 -1
- package/testing-library/dist/881.js +0 -1
- /package/runtime/lib/{snapshot/lynx/dynamic-js.d.ts → core/lynx/dynamic-import.d.ts} +0 -0
- /package/runtime/lib/{snapshot → core}/lynx/lazy-bundle.d.ts +0 -0
- /package/runtime/lib/{snapshot → core}/lynx/lazy-bundle.js +0 -0
- /package/runtime/lib/{snapshot/lynx/component.d.ts → element-template/runtime-backend-marker.d.ts} +0 -0
- /package/testing-library/dist/{0~123.js → 0~@rstest/adapter-rsbuild.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/element-template/internal.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,iEAAiE;AACjE,mCAAmC;AAEnC,OAAO,mBAAmB,CAAC;AAE3B,kEAAkE;AAClE,oDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/element-template/internal.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,iEAAiE;AACjE,mCAAmC;AAEnC,OAAO,6BAA6B,CAAC;AACrC,OAAO,mBAAmB,CAAC;AAE3B,kEAAkE;AAClE,oDAAoD;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IACR;IAAnB,YAAmB,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;QAC7B,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;IAC9F,CAAC;CACF;AAED,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,OAAO,EACL,OAAO;AACP,+EAA+E;AAC/E,SAAS,EACT,OAAO,GACR,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE;;GAEG;AACH,qFAAqF;AACrF,sEAAsE;AACtE,uDAAuD;AACvD,oBAAoB;AACpB,KAAK;AAEL,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,0FAA0F;AAC1F,8EAA8E;AAC9E,mEAAmE;AACnE,gFAAgF;AAChF,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,sCAAsC,CAAC"}
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
declare const PerformanceTimingKeys: readonly ["updateSetStateTrigger", "updateDiffVdomStart", "updateDiffVdomEnd", "diffVdomStart", "diffVdomEnd", "packChangesStart", "packChangesEnd", "parseChangesStart", "parseChangesEnd", "patchChangesStart", "patchChangesEnd", "hydrateParsePayloadStart", "hydrateParsePayloadEnd", "mtsRenderStart", "mtsRenderEnd"];
|
|
2
|
-
declare const PerformanceTimingFlags: {
|
|
3
|
-
readonly reactLynxHydrate: "react_lynx_hydrate";
|
|
4
|
-
};
|
|
5
|
-
declare const PipelineOrigins: {
|
|
6
|
-
readonly reactLynxHydrate: "reactLynxHydrate";
|
|
7
|
-
readonly updateTriggeredByBts: "updateTriggeredByBts";
|
|
8
|
-
};
|
|
9
|
-
type PipelineOrigin = typeof PipelineOrigins[keyof typeof PipelineOrigins];
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated used by old timing api(setState timing flag)
|
|
12
|
-
*/
|
|
13
|
-
declare const PerfSpecificKey = "__lynx_timing_flag";
|
|
14
|
-
declare let globalPipelineOptions: PipelineOptions | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated used by old timing api(setState timing flag)
|
|
17
|
-
*/
|
|
18
|
-
declare function markTimingLegacy(key: typeof PerformanceTimingKeys[number], timingFlag_?: string): void;
|
|
19
|
-
declare function beginPipeline(needTimestamps: boolean, pipelineOrigin: PipelineOrigin, timingFlag?: string): void;
|
|
20
|
-
declare function setPipeline(pipeline: PipelineOptions | undefined): void;
|
|
21
|
-
declare function markTiming(timestampKey: typeof PerformanceTimingKeys[number], force?: boolean): void;
|
|
22
1
|
declare function initTimingAPI(): void;
|
|
23
2
|
export {};
|
|
@@ -1,135 +1,18 @@
|
|
|
1
1
|
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
|
-
import {
|
|
5
|
-
import { RENDER_COMPONENT, ROOT } from '../../shared/render-constants.js';
|
|
6
|
-
import { hook } from '../../utils.js';
|
|
4
|
+
import { initTimingAPI as initCoreTimingAPI } from '../../core/performance.js';
|
|
7
5
|
import { globalCommitContext } from '../background/commit-context.js';
|
|
8
|
-
const PerformanceTimingKeys = [
|
|
9
|
-
'updateSetStateTrigger',
|
|
10
|
-
'updateDiffVdomStart',
|
|
11
|
-
'updateDiffVdomEnd',
|
|
12
|
-
// updateSetStateTrigger, updateDiffVdomStart and updateDiffVdomEnd is deprecated
|
|
13
|
-
'diffVdomStart',
|
|
14
|
-
'diffVdomEnd',
|
|
15
|
-
'packChangesStart',
|
|
16
|
-
'packChangesEnd',
|
|
17
|
-
'parseChangesStart',
|
|
18
|
-
'parseChangesEnd',
|
|
19
|
-
'patchChangesStart',
|
|
20
|
-
'patchChangesEnd',
|
|
21
|
-
'hydrateParsePayloadStart',
|
|
22
|
-
'hydrateParsePayloadEnd',
|
|
23
|
-
'mtsRenderStart',
|
|
24
|
-
'mtsRenderEnd',
|
|
25
|
-
];
|
|
26
|
-
const PerformanceTimingFlags = {
|
|
27
|
-
reactLynxHydrate: 'react_lynx_hydrate',
|
|
28
|
-
};
|
|
29
|
-
const PipelineOrigins = {
|
|
30
|
-
reactLynxHydrate: 'reactLynxHydrate',
|
|
31
|
-
updateTriggeredByBts: 'updateTriggeredByBts',
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated used by old timing api(setState timing flag)
|
|
35
|
-
*/
|
|
36
|
-
const PerfSpecificKey = '__lynx_timing_flag';
|
|
37
|
-
let timingFlag;
|
|
38
|
-
let shouldMarkDiffVdomStart = false;
|
|
39
|
-
let shouldMarkDiffVdomEnd = false;
|
|
40
|
-
let globalPipelineOptions;
|
|
41
|
-
/**
|
|
42
|
-
* @deprecated used by old timing api(setState timing flag)
|
|
43
|
-
*/
|
|
44
|
-
function markTimingLegacy(key, timingFlag_) {
|
|
45
|
-
switch (key) {
|
|
46
|
-
case 'updateSetStateTrigger': {
|
|
47
|
-
shouldMarkDiffVdomStart = true;
|
|
48
|
-
shouldMarkDiffVdomEnd = true;
|
|
49
|
-
timingFlag = timingFlag_;
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
case 'updateDiffVdomStart': {
|
|
53
|
-
if (!shouldMarkDiffVdomStart) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
shouldMarkDiffVdomStart = false;
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
case 'updateDiffVdomEnd': {
|
|
60
|
-
if (!shouldMarkDiffVdomEnd) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
shouldMarkDiffVdomEnd = false;
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
lynx.getNativeApp().markTiming?.(timingFlag, key);
|
|
68
|
-
}
|
|
69
|
-
function beginPipeline(needTimestamps, pipelineOrigin, timingFlag) {
|
|
70
|
-
globalPipelineOptions = lynx.performance?._generatePipelineOptions?.();
|
|
71
|
-
if (globalPipelineOptions) {
|
|
72
|
-
globalPipelineOptions.needTimestamps = needTimestamps;
|
|
73
|
-
globalPipelineOptions.pipelineOrigin = pipelineOrigin;
|
|
74
|
-
globalPipelineOptions.dsl = 'reactLynx';
|
|
75
|
-
switch (pipelineOrigin) {
|
|
76
|
-
case PipelineOrigins.reactLynxHydrate:
|
|
77
|
-
globalPipelineOptions.stage = 'hydrate';
|
|
78
|
-
break;
|
|
79
|
-
case PipelineOrigins.updateTriggeredByBts:
|
|
80
|
-
globalPipelineOptions.stage = 'update';
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
lynx.performance?._onPipelineStart?.(globalPipelineOptions.pipelineID, globalPipelineOptions);
|
|
84
|
-
if (timingFlag) {
|
|
85
|
-
lynx.performance?._bindPipelineIdWithTimingFlag?.(globalPipelineOptions.pipelineID, timingFlag);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function setPipeline(pipeline) {
|
|
90
|
-
globalPipelineOptions = pipeline;
|
|
91
|
-
}
|
|
92
|
-
function markTiming(timestampKey, force) {
|
|
93
|
-
if (globalPipelineOptions && (force || globalPipelineOptions.needTimestamps)) {
|
|
94
|
-
lynx.performance?._markTiming?.(globalPipelineOptions.pipelineID, timestampKey);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
6
|
function shouldStartUpdatePipeline() {
|
|
98
7
|
return globalCommitContext.ops.length > 0;
|
|
99
8
|
}
|
|
100
9
|
function initTimingAPI() {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
// Check update ops to make sure this only runs after hydrate
|
|
104
|
-
if (__JS__ && shouldStartUpdatePipeline()) {
|
|
105
|
-
if (!globalPipelineOptions) {
|
|
106
|
-
beginPipeline(false, PipelineOrigins.updateTriggeredByBts);
|
|
107
|
-
markTiming('diffVdomStart', true);
|
|
108
|
-
}
|
|
109
|
-
if (shouldMarkDiffVdomStart) {
|
|
110
|
-
markTimingLegacy('updateDiffVdomStart');
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
hook(options, RENDER_COMPONENT, (old, vnode, c) => {
|
|
115
|
-
helper();
|
|
116
|
-
/* v8 ignore start */
|
|
117
|
-
if (old) {
|
|
118
|
-
old(vnode, c);
|
|
119
|
-
}
|
|
120
|
-
/* v8 ignore stop */
|
|
121
|
-
});
|
|
122
|
-
hook(options, ROOT, (old, vnode, parentDom) => {
|
|
123
|
-
helper();
|
|
124
|
-
/* v8 ignore start */
|
|
125
|
-
if (old) {
|
|
126
|
-
old(vnode, parentDom);
|
|
127
|
-
}
|
|
128
|
-
/* v8 ignore stop */
|
|
10
|
+
initCoreTimingAPI({
|
|
11
|
+
shouldStartUpdatePipeline,
|
|
129
12
|
});
|
|
130
13
|
}
|
|
131
14
|
/**
|
|
132
15
|
* @internal
|
|
133
16
|
*/
|
|
134
|
-
export {
|
|
17
|
+
export { initTimingAPI };
|
|
135
18
|
//# sourceMappingURL=performance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"performance.js","sourceRoot":"","sources":["../../../src/element-template/lynx/performance.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"performance.js","sourceRoot":"","sources":["../../../src/element-template/lynx/performance.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,SAAS,yBAAyB;IAChC,OAAO,mBAAmB,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,aAAa;IACpB,iBAAiB,CAAC;QAChB,yBAAyB;KAC1B,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { callDestroyLifetimeFun } from './callDestroyLifetimeFun.js';
|
|
|
7
7
|
import { injectCalledByNative } from './main-thread-api.js';
|
|
8
8
|
import { installOnMtsDestruction } from './mts-destroy.js';
|
|
9
9
|
import { installElementTemplatePatchListener } from './patch-listener.js';
|
|
10
|
-
import { reloadBackground } from './reload.js';
|
|
10
|
+
import { reloadBackground } from './reload-background.js';
|
|
11
11
|
import { runWithForceRootRender } from '../../core/forceRootRender.js';
|
|
12
12
|
import { updateGlobalProps as updateGlobalPropsCore } from '../../core/globalProps.js';
|
|
13
13
|
import { installMainThreadHooks } from '../../core/hooks/mainThreadImpl.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/element-template/native/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/element-template/native/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAA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1,7 +1,7 @@
|
|
|
1
1
|
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
|
-
import { reloadMainThread } from './reload.js';
|
|
4
|
+
import { reloadMainThread } from './reload-main-thread.js';
|
|
5
5
|
import { applyUpdatePageData } from '../../core/lynx-page-data.js';
|
|
6
6
|
import { __page, createElementTemplatePage, setupPage } from '../runtime/page/page.js';
|
|
7
7
|
import { renderMainThread, resetMainThreadRootRefs } from '../runtime/render/render-main-thread.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-thread-api.js","sourceRoot":"","sources":["../../../src/element-template/native/main-thread-api.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"main-thread-api.js","sourceRoot":"","sources":["../../../src/element-template/native/main-thread-api.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAEpG,SAAS,oBAAoB;IAC3B,MAAM,cAAc,GAAqB;QACvC,UAAU;QACV,UAAU;QACV,iBAAiB;QACjB,WAAW,EAAE;YACX,OAAO,IAAI,CAAC;QACd,CAAC;QACD,gBAAgB,EAAE,cAAkB,CAAC;KACtC,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,UAAU,CAAC,IAAyC;IAC3D,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC;IAC7B,SAAS,CAAC,yBAAyB,EAAE,CAAC,CAAC;IACvC,uBAAuB,EAAE,CAAC;IAC1B,gBAAgB,EAAE,CAAC;AACrB,CAAC;AAED,SAAS,UAAU,CAAC,IAAyC,EAAE,OAA0B;IACvF,IAAI,4BAA4B,KAAK,aAAa,EAAE,CAAC;QACnD,OAAO;IACT,CAAC;IAED,IAAI,OAAO,EAAE,cAAc,EAAE,CAAC;QAC5B,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAChC,OAAO;IACT,CAAC;IAED,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,kBAAkB,CAAC,MAAM,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAc,EAAE,OAA0B;IACnE,IAAI,OAAO,EAAE,CAAC;QACZ,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;SAAM,CAAC;QACN,kBAAkB,EAAE,CAAC;IACvB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
4
|
import { resetElementTemplatePatchListener } from './patch-listener.js';
|
|
5
|
+
import { destroyAllElementTemplateListStates } from '../runtime/list/list.js';
|
|
5
6
|
import { elementTemplateRegistry } from '../runtime/template/registry.js';
|
|
6
7
|
export function installOnMtsDestruction() {
|
|
7
8
|
lynx.getNative?.().addEventListener('__DestroyLifetime', onMtsDestruction);
|
|
@@ -29,6 +30,7 @@ export function destroyElementTemplateMainThreadRuntime() {
|
|
|
29
30
|
}
|
|
30
31
|
// The registry is the main-thread strong-reference owner for ET refs. Clear it
|
|
31
32
|
// even if listener reset fails so destroy does not leave removed pages retained.
|
|
33
|
+
destroyAllElementTemplateListStates();
|
|
32
34
|
elementTemplateRegistry.clear();
|
|
33
35
|
if (didPatchListenerResetThrow) {
|
|
34
36
|
throw patchListenerResetError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mts-destroy.js","sourceRoot":"","sources":["../../../src/element-template/native/mts-destroy.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,OAAO,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,MAAM,UAAU,uBAAuB;IACrC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IACrC,WAAW,EAAE,YAAY,EAAE,CAAC,6BAA6B,CAAC,CAAC;IAC3D,IAAI,CAAC;QACH,uCAAuC,EAAE,CAAC;IAC5C,CAAC;YAAS,CAAC;QACT,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;QAC5B,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,mBAAmB,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;IAChF,CAAC;AACH,CAAC;AAED,MAAM,UAAU,uCAAuC;IACrD,IAAI,uBAAgC,CAAC;IACrC,IAAI,0BAA0B,GAAG,KAAK,CAAC;IACvC,IAAI,CAAC;QACH,iCAAiC,EAAE,CAAC;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,uBAAuB,GAAG,KAAK,CAAC;QAChC,0BAA0B,GAAG,IAAI,CAAC;IACpC,CAAC;IAED,+EAA+E;IAC/E,iFAAiF;IACjF,uBAAuB,CAAC,KAAK,EAAE,CAAC;IAEhC,IAAI,0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AC;QAC/B,MAAM,uBAAuB,CAAC;IAChC,CAAC;AACH,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
import { markTiming, setPipeline } from '../../core/performance.js';
|
|
4
5
|
import { getReloadVersion } from '../../core/reload-version.js';
|
|
5
6
|
import { formatElementTemplateUpdateCommands } from '../debug/alog.js';
|
|
6
|
-
import { markTiming, setPipeline } from '../lynx/performance.js';
|
|
7
7
|
import { ElementTemplateLifecycleConstant } from '../protocol/lifecycle-constant.js';
|
|
8
8
|
import { __page } from '../runtime/page/page.js';
|
|
9
9
|
import { applyElementTemplateUpdateCommands } from '../runtime/patch.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch-listener.js","sourceRoot":"","sources":["../../../src/element-template/native/patch-listener.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"patch-listener.js","sourceRoot":"","sources":["../../../src/element-template/native/patch-listener.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mCAAmC,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AAErF,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,kCAAkC,EAAE,MAAM,qBAAqB,CAAC;AAEzE,IAAI,QAES,CAAC;AAEd,MAAM,UAAU,mCAAmC;IACjD,iCAAiC,EAAE,CAAC;IAEpC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AG,EAAE,mCAAmC,CAAC,OAAO,CAAC,GAAG,CAAC;wBACrD,YAAY;wBACZ,OAAO;qBACR,EACD,IAAI,EACJ,CAAC,CACF,CACJ,CAAC;YACJ,CAAC;YACD,UAAU,CAAC,gBAAgB,CAAC,CAAC;YAC7B,UAAU,CAAC,mBAAmB,CAAC,CAAC;YAChC,UAAU,CAAC,iBAAiB,CAAC,CAAC;YAC9B,UAAU,CAAC,mBAAmB,CAAC,CAAC;YAChC,IAAI,CAAC;gBACH,kCAAkC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAClD,CAAC;oBAAS,CAAC;gBACT,UAAU,CAAC,iBAAiB,CAAC,CAAC;gBAC9B,UAAU,CAAC,cAAc,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;QAED,kBAAkB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAEzC,IAAI,kBAAkB,EAAE,CAAC;YACvB,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;QAChC,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,CAAC,YAAY,EAAE,CAAC,gBAAgB,CAClC,gCAAgC,CAAC,MAAM,EACvC,QAAQ,CACT,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iCAAiC;IAC/C,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,CAAC,YAAY,EAAE,CAAC,mBAAmB,CACrC,gCAAgC,CAAC,MAAM,EACvC,QAAQ,CACT,CAAC;IACJ,CAAC;IACD,QAAQ,GAAG,SAAS,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function reloadBackground(updateData: unknown): void;
|
|
@@ -10,32 +10,7 @@ import { installElementTemplateHydrationListener } from '../background/hydration
|
|
|
10
10
|
import { BackgroundElementTemplateInstance } from '../background/instance.js';
|
|
11
11
|
import { profileEnd, profileStart } from '../debug/profile.js';
|
|
12
12
|
import { resetEventStateForRuntime } from '../prop-adapters/event.js';
|
|
13
|
-
import { __page } from '../runtime/page/page.js';
|
|
14
13
|
import { __root, setRoot } from '../runtime/page/root-instance.js';
|
|
15
|
-
import { removeMainThreadRootRefs, renderMainThread } from '../runtime/render/render-main-thread.js';
|
|
16
|
-
import { resetTemplateId } from '../runtime/template/handle.js';
|
|
17
|
-
import { elementTemplateRegistry } from '../runtime/template/registry.js';
|
|
18
|
-
export function reloadMainThread(data, options) {
|
|
19
|
-
if (typeof __PROFILE__ !== 'undefined' && __PROFILE__) {
|
|
20
|
-
profileStart('ReactLynx::reloadMainThread');
|
|
21
|
-
}
|
|
22
|
-
try {
|
|
23
|
-
increaseReloadVersion();
|
|
24
|
-
applyUpdatePageData(data, options);
|
|
25
|
-
elementTemplateRegistry.clear();
|
|
26
|
-
resetTemplateId();
|
|
27
|
-
const oldRoot = __root;
|
|
28
|
-
removeMainThreadRootRefs();
|
|
29
|
-
setRoot({ __jsx: oldRoot.__jsx });
|
|
30
|
-
renderMainThread();
|
|
31
|
-
__FlushElementTree(__page, options);
|
|
32
|
-
}
|
|
33
|
-
finally {
|
|
34
|
-
if (typeof __PROFILE__ !== 'undefined' && __PROFILE__) {
|
|
35
|
-
profileEnd();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
14
|
export function reloadBackground(updateData) {
|
|
40
15
|
if (typeof __PROFILE__ !== 'undefined' && __PROFILE__) {
|
|
41
16
|
profileStart('ReactLynx::reloadBackground');
|
|
@@ -61,4 +36,4 @@ export function reloadBackground(updateData) {
|
|
|
61
36
|
}
|
|
62
37
|
}
|
|
63
38
|
}
|
|
64
|
-
//# sourceMappingURL=reload.js.map
|
|
39
|
+
//# sourceMappingURL=reload-background.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reload-background.js","sourceRoot":"","sources":["../../../src/element-template/native/reload-background.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAG1D,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAA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AAW,IAAI,WAAW,EAAE,CAAC;YACtD,UAAU,EAAE,CAAC;QACf,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright 2026 The Lynx Authors. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
+
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
import { applyUpdatePageData } from '../../core/lynx-page-data.js';
|
|
5
|
+
import { increaseReloadVersion } from '../../core/reload-version.js';
|
|
6
|
+
import { profileEnd, profileStart } from '../debug/profile.js';
|
|
7
|
+
import { destroyAllElementTemplateListStates } from '../runtime/list/list.js';
|
|
8
|
+
import { __page } from '../runtime/page/page.js';
|
|
9
|
+
import { __root, setRoot } from '../runtime/page/root-instance.js';
|
|
10
|
+
import { removeMainThreadRootRefs, renderMainThread } from '../runtime/render/render-main-thread.js';
|
|
11
|
+
import { resetTemplateId } from '../runtime/template/handle.js';
|
|
12
|
+
import { elementTemplateRegistry } from '../runtime/template/registry.js';
|
|
13
|
+
export function reloadMainThread(data, options) {
|
|
14
|
+
if (typeof __PROFILE__ !== 'undefined' && __PROFILE__) {
|
|
15
|
+
profileStart('ReactLynx::reloadMainThread');
|
|
16
|
+
}
|
|
17
|
+
try {
|
|
18
|
+
increaseReloadVersion();
|
|
19
|
+
applyUpdatePageData(data, options);
|
|
20
|
+
destroyAllElementTemplateListStates();
|
|
21
|
+
elementTemplateRegistry.clear();
|
|
22
|
+
resetTemplateId();
|
|
23
|
+
const oldRoot = __root;
|
|
24
|
+
removeMainThreadRootRefs();
|
|
25
|
+
setRoot({ __jsx: oldRoot.__jsx });
|
|
26
|
+
renderMainThread();
|
|
27
|
+
__FlushElementTree(__page, options);
|
|
28
|
+
}
|
|
29
|
+
finally {
|
|
30
|
+
if (typeof __PROFILE__ !== 'undefined' && __PROFILE__) {
|
|
31
|
+
profileEnd();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=reload-main-thread.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reload-main-thread.js","sourceRoot":"","sources":["../../../src/element-template/native/reload-main-thread.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AACrG,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,MAAM,UAAU,gBAAgB,CAAC,IAAa,EAAE,OAAyB;IACvE,IAAI,OAAO,WAAW,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;QACtD,YAAY,CAAC,6BAA6B,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,CAAC;QACH,qBAAqB,EAAE,CAAC;QACxB,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEnC,mCAAmC,EAAE,CAAC;QACtC,uBAAuB,CAAC,KAAK,EAAE,CAAC;QAChC,eAAe,EAAE,CAAC;QAElB,MAAM,OAAO,GAAG,MAAM,CAAC;QACvB,wBAAwB,EAAE,CAAC;QAC3B,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QAClC,gBAAgB,EAAE,CAAC;QAEnB,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;YAAS,CAAC;QACT,IAAI,OAAO,WAAW,KAAK,WAAW,IAAI,WAAW,EAAE,CAAC;YACtD,UAAU,EAAE,CAAC;QACf,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -4,5 +4,8 @@ export declare const ElementTemplateUpdateOps: {
|
|
|
4
4
|
readonly insertNode: 3;
|
|
5
5
|
readonly removeNode: 4;
|
|
6
6
|
readonly createTypedElement: 5;
|
|
7
|
+
readonly insertTypedListItem: 6;
|
|
8
|
+
readonly removeTypedListItem: 7;
|
|
9
|
+
readonly updateTypedListItem: 8;
|
|
7
10
|
};
|
|
8
11
|
export type ElementTemplateUpdateOp = typeof ElementTemplateUpdateOps[keyof typeof ElementTemplateUpdateOps];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opcodes.js","sourceRoot":"","sources":["../../../src/element-template/protocol/opcodes.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,cAAc,EAAE,CAAC;IACjB,YAAY,EAAE,CAAC;IACf,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,CAAC;IACb,kBAAkB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"opcodes.js","sourceRoot":"","sources":["../../../src/element-template/protocol/opcodes.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,cAAc,EAAE,CAAC;IACjB,YAAY,EAAE,CAAC;IACf,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,CAAC;IACb,kBAAkB,EAAE,CAAC;IACrB,mBAAmB,EAAE,CAAC;IACtB,mBAAmB,EAAE,CAAC;IACtB,mBAAmB,EAAE,CAAC;CACd,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface ParsedElementTemplateType {
|
|
2
|
+
templateKey: string;
|
|
3
|
+
bundleUrl: string | null;
|
|
4
|
+
}
|
|
5
|
+
export declare function parseElementTemplateType(type: string): ParsedElementTemplateType;
|
|
6
|
+
export declare function elementTemplateIdentityKey(templateKey: string, bundleUrl: string | null | undefined): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright 2026 The Lynx Authors. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
+
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
export function parseElementTemplateType(type) {
|
|
5
|
+
const delimiter = type.lastIndexOf(':');
|
|
6
|
+
if (delimiter < 0) {
|
|
7
|
+
return {
|
|
8
|
+
templateKey: type,
|
|
9
|
+
bundleUrl: null,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
templateKey: type.slice(delimiter + 1),
|
|
14
|
+
bundleUrl: type.slice(0, delimiter),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export function elementTemplateIdentityKey(templateKey, bundleUrl) {
|
|
18
|
+
return bundleUrl == null ? templateKey : `${bundleUrl}:${templateKey}`;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=template-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-type.js","sourceRoot":"","sources":["../../../src/element-template/protocol/template-type.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAO1D,MAAM,UAAU,wBAAwB,CAAC,IAAY;IACnD,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACxC,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO;YACL,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;SAChB,CAAC;IACJ,CAAC;IACD,OAAO;QACL,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC;QACtC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,WAAmB,EACnB,SAAoC;IAEpC,OAAO,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,WAAW,EAAE,CAAC;AACzE,CAAC"}
|
|
@@ -11,12 +11,19 @@ export type RuntimeAttributeSlotValue = SerializableValue | ((...args: unknown[]
|
|
|
11
11
|
};
|
|
12
12
|
export type RuntimeTypedElementAttributes = Record<string, RuntimeAttributeSlotValue>;
|
|
13
13
|
export type TypedElementAttributesCommand = Record<string, SerializableValue>;
|
|
14
|
+
export type RuntimeElementSlots = Array<ElementRef[] | null | undefined>;
|
|
15
|
+
export type ElementTemplateHandleSlotsCommand = Array<number[] | null | undefined>;
|
|
16
|
+
export type SerializedEtNodeSlots = Array<SerializedEtNode[] | null | undefined>;
|
|
14
17
|
export interface ElementTemplateHandleRefCommandValue {
|
|
15
18
|
__etHandleRef: number;
|
|
16
19
|
[key: string]: SerializableValue;
|
|
17
20
|
}
|
|
21
|
+
export interface UpdateTypedListItemCommand extends ElementTemplateHandleRefCommandValue {
|
|
22
|
+
type: string;
|
|
23
|
+
platformInfo: Record<string, SerializableValue>;
|
|
24
|
+
}
|
|
18
25
|
export interface RuntimeOptionsCommand extends Record<string, SerializableValue> {
|
|
19
|
-
listChildren?:
|
|
26
|
+
listChildren?: UpdateTypedListItemCommand[];
|
|
20
27
|
}
|
|
21
28
|
export type SerializedRuntimeOptionValue = SerializableValue | SerializedEtNode | SerializedRuntimeOptionValue[] | {
|
|
22
29
|
[key: string]: SerializedRuntimeOptionValue;
|
|
@@ -24,29 +31,25 @@ export type SerializedRuntimeOptionValue = SerializableValue | SerializedEtNode
|
|
|
24
31
|
export type SerializedRuntimeOptions = Record<string, SerializedRuntimeOptionValue>;
|
|
25
32
|
export interface SerializedEtNodeBase {
|
|
26
33
|
attributeSlots?: SerializableValue[] | null;
|
|
27
|
-
elementSlots?:
|
|
34
|
+
elementSlots?: SerializedEtNodeSlots | null;
|
|
28
35
|
uid: number | string;
|
|
29
36
|
options?: SerializedRuntimeOptions | null;
|
|
30
37
|
}
|
|
31
38
|
export interface SerializedCompiledNode extends SerializedEtNodeBase {
|
|
32
39
|
templateKey: string;
|
|
33
40
|
bundleUrl?: string;
|
|
41
|
+
attributeSlots?: SerializableValue[] | null;
|
|
34
42
|
}
|
|
35
43
|
export interface SerializedTypedNode extends SerializedEtNodeBase {
|
|
36
|
-
|
|
44
|
+
tag: string;
|
|
45
|
+
attributes?: TypedElementAttributesCommand | null;
|
|
37
46
|
}
|
|
38
47
|
export type SerializedEtNode = SerializedCompiledNode | SerializedTypedNode;
|
|
39
48
|
export interface ElementTemplateHydrateCommitContext {
|
|
40
49
|
instances: SerializedEtNode[];
|
|
41
50
|
reloadVersion?: number;
|
|
42
51
|
}
|
|
43
|
-
export interface SerializedElementTemplate {
|
|
44
|
-
templateKey: string;
|
|
45
|
-
bundleUrl?: string;
|
|
46
|
-
attributeSlots?: SerializableValue[] | null;
|
|
47
|
-
elementSlots?: SerializedElementTemplate[][] | null;
|
|
48
|
-
uid: number | string;
|
|
49
|
-
options?: SerializedRuntimeOptions | null;
|
|
52
|
+
export interface SerializedElementTemplate extends SerializedCompiledNode {
|
|
50
53
|
}
|
|
51
54
|
export type CreateTemplateCommand = [
|
|
52
55
|
typeof ElementTemplateUpdateOps.createTemplate,
|
|
@@ -54,7 +57,7 @@ export type CreateTemplateCommand = [
|
|
|
54
57
|
templateKey: string,
|
|
55
58
|
bundleUrl: string | null | undefined,
|
|
56
59
|
attributeSlots: SerializableValue[] | null | undefined,
|
|
57
|
-
elementSlots:
|
|
60
|
+
elementSlots: ElementTemplateHandleSlotsCommand | null | undefined
|
|
58
61
|
];
|
|
59
62
|
export type SetAttributeCommand = [
|
|
60
63
|
typeof ElementTemplateUpdateOps.setAttribute,
|
|
@@ -81,10 +84,27 @@ export type CreateTypedElementCommand = [
|
|
|
81
84
|
handleId: number,
|
|
82
85
|
type: string,
|
|
83
86
|
attributes: TypedElementAttributesCommand | null | undefined,
|
|
84
|
-
elementSlots:
|
|
87
|
+
elementSlots: ElementTemplateHandleSlotsCommand | null | undefined,
|
|
85
88
|
options: RuntimeOptionsCommand | null | undefined
|
|
86
89
|
];
|
|
87
|
-
export type
|
|
90
|
+
export type InsertTypedListItemCommand = [
|
|
91
|
+
typeof ElementTemplateUpdateOps.insertTypedListItem,
|
|
92
|
+
listHandleId: number,
|
|
93
|
+
item: UpdateTypedListItemCommand,
|
|
94
|
+
beforeHandleId: number
|
|
95
|
+
];
|
|
96
|
+
export type RemoveTypedListItemCommand = [
|
|
97
|
+
typeof ElementTemplateUpdateOps.removeTypedListItem,
|
|
98
|
+
listHandleId: number,
|
|
99
|
+
itemHandleId: number,
|
|
100
|
+
removedSubtreeHandleIds: number[]
|
|
101
|
+
];
|
|
102
|
+
export type UpdateTypedListItemInfoCommand = [
|
|
103
|
+
typeof ElementTemplateUpdateOps.updateTypedListItem,
|
|
104
|
+
listHandleId: number,
|
|
105
|
+
item: UpdateTypedListItemCommand
|
|
106
|
+
];
|
|
107
|
+
export type ElementTemplateUpdateCommand = CreateTemplateCommand | SetAttributeCommand | InsertNodeCommand | RemoveNodeCommand | CreateTypedElementCommand | InsertTypedListItemCommand | RemoveTypedListItemCommand | UpdateTypedListItemInfoCommand;
|
|
88
108
|
export type ElementTemplateUpdateCommandStream = ElementTemplateUpdateCommand[number][];
|
|
89
109
|
export interface ElementTemplateFlushOptions {
|
|
90
110
|
pipelineOptions?: PipelineOptions;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { RuntimeTypedElementAttributes, SerializableValue } from '../../protocol/types.js';
|
|
2
|
+
export type ETListItemPlatformInfo = Record<string, SerializableValue>;
|
|
3
|
+
export interface ETListItemMeta {
|
|
4
|
+
templateKey: string;
|
|
5
|
+
platformInfo: ETListItemPlatformInfo;
|
|
6
|
+
}
|
|
7
|
+
interface ETListItemRecord extends ETListItemMeta {
|
|
8
|
+
uid: number;
|
|
9
|
+
ref: ElementRef;
|
|
10
|
+
attached: boolean;
|
|
11
|
+
needsAttachMove: boolean;
|
|
12
|
+
skipNextEnqueue: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface ETListCallbacks {
|
|
15
|
+
componentAtIndex: ComponentAtIndexCallback;
|
|
16
|
+
componentAtIndexes: ComponentAtIndexesCallback;
|
|
17
|
+
enqueueComponent: EnqueueComponentCallback;
|
|
18
|
+
}
|
|
19
|
+
export interface ETListState {
|
|
20
|
+
listHandleId: number | null;
|
|
21
|
+
holderRef: ElementRef | null;
|
|
22
|
+
items: ETListItemRecord[];
|
|
23
|
+
callbackItemBySign: Map<number, ETListItemRecord>;
|
|
24
|
+
destroyed: boolean;
|
|
25
|
+
hasAttachedMoves: boolean;
|
|
26
|
+
attributes: RuntimeTypedElementAttributes;
|
|
27
|
+
callbacks: ETListCallbacks;
|
|
28
|
+
}
|
|
29
|
+
export interface ETListUpdateItem extends ETListItemMeta {
|
|
30
|
+
uid: number;
|
|
31
|
+
ref: ElementRef;
|
|
32
|
+
}
|
|
33
|
+
export interface ETListUpdateInfo {
|
|
34
|
+
insertAction: Array<{
|
|
35
|
+
position: number;
|
|
36
|
+
type: string;
|
|
37
|
+
} & ETListItemPlatformInfo>;
|
|
38
|
+
removeAction: number[];
|
|
39
|
+
updateAction: Array<{
|
|
40
|
+
from: number;
|
|
41
|
+
to: number;
|
|
42
|
+
type: string;
|
|
43
|
+
flush: boolean;
|
|
44
|
+
} & ETListItemPlatformInfo>;
|
|
45
|
+
}
|
|
46
|
+
export interface ETListFlushResult {
|
|
47
|
+
uid: number;
|
|
48
|
+
attributes: RuntimeTypedElementAttributes;
|
|
49
|
+
removedSubtreeHandleIds?: number[];
|
|
50
|
+
}
|
|
51
|
+
export declare function registerElementTemplateListItem(uid: number, ref: ElementRef, meta: ETListItemMeta): void;
|
|
52
|
+
export declare function createElementTemplateListState(listItemUids: readonly number[], attributes?: RuntimeTypedElementAttributes | null): ETListState;
|
|
53
|
+
export declare function createElementTemplateListInitialUpdateInfo(state: ETListState): ETListUpdateInfo;
|
|
54
|
+
export declare function createElementTemplateListStateFromItems(items: ETListUpdateItem[], attributes?: RuntimeTypedElementAttributes | null): ETListState;
|
|
55
|
+
export declare function registerElementTemplateListState(uid: number, state: ETListState, needsInitialFlush: boolean, holderRef: ElementRef): void;
|
|
56
|
+
export declare function markElementTemplateListDestroyed(uid: number): number[] | undefined;
|
|
57
|
+
export declare function destroyAllElementTemplateListStates(): void;
|
|
58
|
+
export declare function updateElementTemplateListAttributes(uid: number, attributes: RuntimeTypedElementAttributes | null | undefined, updateListInfo?: ETListUpdateInfo): RuntimeTypedElementAttributes | null;
|
|
59
|
+
export declare function insertElementTemplateListItem(uid: number, item: ETListUpdateItem, beforeUid: number): void;
|
|
60
|
+
export declare function removeElementTemplateListItem(uid: number, itemUid: number, removedSubtreeHandleIds: readonly number[]): void;
|
|
61
|
+
export declare function updateElementTemplateListItem(uid: number, item: ETListUpdateItem): void;
|
|
62
|
+
export declare function flushPendingElementTemplateListUpdates(): ETListFlushResult[];
|
|
63
|
+
export declare function flushInitialElementTemplateListUpdates(): ETListFlushResult[];
|
|
64
|
+
export declare function composeElementTemplateListAttributes(attributes: RuntimeTypedElementAttributes | null | undefined, state: ETListState, updateListInfo?: ETListUpdateInfo): RuntimeTypedElementAttributes;
|
|
65
|
+
export {};
|