@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.
Files changed (139) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/package.json +4 -4
  3. package/runtime/lazy/element-template-import.js +73 -0
  4. package/runtime/lazy/import.js +4 -0
  5. package/runtime/lazy/target.js +23 -0
  6. package/runtime/lib/{snapshot/legacy-react-runtime/index.d.ts → core/compat/legacy-react-runtime.d.ts} +4 -4
  7. package/runtime/lib/{snapshot/legacy-react-runtime/index.js → core/compat/legacy-react-runtime.js} +6 -6
  8. package/runtime/lib/core/compat/legacy-react-runtime.js.map +1 -0
  9. package/runtime/lib/{snapshot → core}/compat/lynxComponent.d.ts +2 -1
  10. package/runtime/lib/{snapshot → core}/compat/lynxComponent.js +11 -5
  11. package/runtime/lib/core/compat/lynxComponent.js.map +1 -0
  12. package/runtime/lib/core/component.d.ts +2 -0
  13. package/runtime/lib/{snapshot/lynx → core}/component.js +37 -31
  14. package/runtime/lib/core/component.js.map +1 -0
  15. package/runtime/lib/{snapshot/lynx/dynamic-js.js → core/lynx/dynamic-import.js} +1 -1
  16. package/runtime/lib/core/lynx/dynamic-import.js.map +1 -0
  17. package/runtime/lib/core/lynx/lazy-bundle.js.map +1 -0
  18. package/runtime/lib/core/lynx/runtime-backend.d.ts +5 -0
  19. package/runtime/lib/core/lynx/runtime-backend.js +20 -0
  20. package/runtime/lib/core/lynx/runtime-backend.js.map +1 -0
  21. package/runtime/lib/core/performance.d.ts +30 -0
  22. package/runtime/lib/core/performance.js +145 -0
  23. package/runtime/lib/core/performance.js.map +1 -0
  24. package/runtime/lib/element-template/background/commit-hook.js +2 -2
  25. package/runtime/lib/element-template/background/commit-hook.js.map +1 -1
  26. package/runtime/lib/element-template/background/document.js +7 -1
  27. package/runtime/lib/element-template/background/document.js.map +1 -1
  28. package/runtime/lib/element-template/background/hydrate.d.ts +2 -3
  29. package/runtime/lib/element-template/background/hydrate.js +211 -55
  30. package/runtime/lib/element-template/background/hydrate.js.map +1 -1
  31. package/runtime/lib/element-template/background/hydration-listener.js +6 -25
  32. package/runtime/lib/element-template/background/hydration-listener.js.map +1 -1
  33. package/runtime/lib/element-template/background/instance.d.ts +30 -3
  34. package/runtime/lib/element-template/background/instance.js +209 -28
  35. package/runtime/lib/element-template/background/instance.js.map +1 -1
  36. package/runtime/lib/element-template/debug/alog.d.ts +14 -0
  37. package/runtime/lib/element-template/debug/alog.js +23 -0
  38. package/runtime/lib/element-template/debug/alog.js.map +1 -1
  39. package/runtime/lib/element-template/debug/elementPAPICall.js +1 -0
  40. package/runtime/lib/element-template/debug/elementPAPICall.js.map +1 -1
  41. package/runtime/lib/element-template/index.d.ts +3 -2
  42. package/runtime/lib/element-template/index.js +6 -7
  43. package/runtime/lib/element-template/index.js.map +1 -1
  44. package/runtime/lib/element-template/internal.d.ts +4 -0
  45. package/runtime/lib/element-template/internal.js +4 -4
  46. package/runtime/lib/element-template/internal.js.map +1 -1
  47. package/runtime/lib/element-template/lynx/performance.d.ts +0 -21
  48. package/runtime/lib/element-template/lynx/performance.js +4 -121
  49. package/runtime/lib/element-template/lynx/performance.js.map +1 -1
  50. package/runtime/lib/element-template/native/index.js +1 -1
  51. package/runtime/lib/element-template/native/index.js.map +1 -1
  52. package/runtime/lib/element-template/native/main-thread-api.js +1 -1
  53. package/runtime/lib/element-template/native/main-thread-api.js.map +1 -1
  54. package/runtime/lib/element-template/native/mts-destroy.js +2 -0
  55. package/runtime/lib/element-template/native/mts-destroy.js.map +1 -1
  56. package/runtime/lib/element-template/native/patch-listener.js +1 -1
  57. package/runtime/lib/element-template/native/patch-listener.js.map +1 -1
  58. package/runtime/lib/element-template/native/reload-background.d.ts +1 -0
  59. package/runtime/lib/element-template/native/{reload.js → reload-background.js} +1 -26
  60. package/runtime/lib/element-template/native/reload-background.js.map +1 -0
  61. package/runtime/lib/element-template/native/{reload.d.ts → reload-main-thread.d.ts} +0 -1
  62. package/runtime/lib/element-template/native/reload-main-thread.js +35 -0
  63. package/runtime/lib/element-template/native/reload-main-thread.js.map +1 -0
  64. package/runtime/lib/element-template/protocol/opcodes.d.ts +3 -0
  65. package/runtime/lib/element-template/protocol/opcodes.js +3 -0
  66. package/runtime/lib/element-template/protocol/opcodes.js.map +1 -1
  67. package/runtime/lib/element-template/protocol/template-type.d.ts +6 -0
  68. package/runtime/lib/element-template/protocol/template-type.js +20 -0
  69. package/runtime/lib/element-template/protocol/template-type.js.map +1 -0
  70. package/runtime/lib/element-template/protocol/types.d.ts +33 -13
  71. package/runtime/lib/element-template/runtime/list/list.d.ts +65 -0
  72. package/runtime/lib/element-template/runtime/list/list.js +587 -0
  73. package/runtime/lib/element-template/runtime/list/list.js.map +1 -0
  74. package/runtime/lib/element-template/runtime/patch.js +177 -74
  75. package/runtime/lib/element-template/runtime/patch.js.map +1 -1
  76. package/runtime/lib/element-template/runtime/render/render-main-thread.js +13 -0
  77. package/runtime/lib/element-template/runtime/render/render-main-thread.js.map +1 -1
  78. package/runtime/lib/element-template/runtime/render/render-opcodes.js +80 -43
  79. package/runtime/lib/element-template/runtime/render/render-opcodes.js.map +1 -1
  80. package/runtime/lib/element-template/runtime/render/render-to-opcodes.js +32 -1
  81. package/runtime/lib/element-template/runtime/render/render-to-opcodes.js.map +1 -1
  82. package/runtime/lib/element-template/runtime/template/handle.d.ts +3 -2
  83. package/runtime/lib/element-template/runtime/template/handle.js +5 -0
  84. package/runtime/lib/element-template/runtime/template/handle.js.map +1 -1
  85. package/runtime/lib/element-template/runtime/template/registry.d.ts +2 -0
  86. package/runtime/lib/element-template/runtime/template/registry.js +5 -0
  87. package/runtime/lib/element-template/runtime/template/registry.js.map +1 -1
  88. package/runtime/lib/element-template/runtime-backend-marker.js +6 -0
  89. package/runtime/lib/element-template/runtime-backend-marker.js.map +1 -0
  90. package/runtime/lib/index.d.ts +1 -1
  91. package/runtime/lib/index.js +3 -1
  92. package/runtime/lib/index.js.map +1 -1
  93. package/runtime/lib/internal.d.ts +4 -3
  94. package/runtime/lib/internal.js +5 -4
  95. package/runtime/lib/internal.js.map +1 -1
  96. package/runtime/lib/runtime-backend-marker.d.ts +1 -0
  97. package/runtime/lib/runtime-backend-marker.js +6 -0
  98. package/runtime/lib/runtime-backend-marker.js.map +1 -0
  99. package/runtime/lib/snapshot/lifecycle/patch/commit.js +1 -1
  100. package/runtime/lib/snapshot/lifecycle/patch/commit.js.map +1 -1
  101. package/runtime/lib/snapshot/lifecycle/patch/updateMainThread.js +1 -1
  102. package/runtime/lib/snapshot/lifecycle/patch/updateMainThread.js.map +1 -1
  103. package/runtime/lib/snapshot/lynx/calledByNative.js +1 -1
  104. package/runtime/lib/snapshot/lynx/calledByNative.js.map +1 -1
  105. package/runtime/lib/snapshot/lynx/performance.d.ts +0 -21
  106. package/runtime/lib/snapshot/lynx/performance.js +7 -121
  107. package/runtime/lib/snapshot/lynx/performance.js.map +1 -1
  108. package/runtime/lib/snapshot/lynx/tt.js +1 -1
  109. package/runtime/lib/snapshot/lynx/tt.js.map +1 -1
  110. package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js +1 -1
  111. package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js.map +1 -1
  112. package/runtime/lib/snapshot/snapshot/snapshot.js +1 -1
  113. package/runtime/lib/snapshot/snapshot/snapshot.js.map +1 -1
  114. package/runtime/lib/tsconfig.tsbuildinfo +1 -1
  115. package/runtime/worklet-runtime/dev.js +1 -2
  116. package/runtime/worklet-runtime/main.js +1 -1
  117. package/testing-library/dist/{rslib-runtime.js → 0~rslib-runtime.js} +14 -13
  118. package/testing-library/dist/env/vitest.js +1 -1
  119. package/testing-library/dist/plugins/index.js +1 -1
  120. package/testing-library/dist/pure.js +18 -18
  121. package/testing-library/dist/rstest-config.js +2 -4
  122. package/testing-library/dist/setupFiles/common/bootstrap.js +1 -0
  123. package/testing-library/dist/setupFiles/common/runtime-setup.js +1 -1
  124. package/testing-library/dist/setupFiles/inner/rstest.js +2 -1
  125. package/testing-library/dist/setupFiles/inner/vitest.js +2 -1
  126. package/testing-library/dist/type-entry/index.js +1 -0
  127. package/transform/dist/wasm.cjs +113 -40
  128. package/runtime/lib/element-template/native/reload.js.map +0 -1
  129. package/runtime/lib/snapshot/compat/lynxComponent.js.map +0 -1
  130. package/runtime/lib/snapshot/legacy-react-runtime/index.js.map +0 -1
  131. package/runtime/lib/snapshot/lynx/component.js.map +0 -1
  132. package/runtime/lib/snapshot/lynx/dynamic-js.js.map +0 -1
  133. package/runtime/lib/snapshot/lynx/lazy-bundle.js.map +0 -1
  134. package/testing-library/dist/881.js +0 -1
  135. /package/runtime/lib/{snapshot/lynx/dynamic-js.d.ts → core/lynx/dynamic-import.d.ts} +0 -0
  136. /package/runtime/lib/{snapshot → core}/lynx/lazy-bundle.d.ts +0 -0
  137. /package/runtime/lib/{snapshot → core}/lynx/lazy-bundle.js +0 -0
  138. /package/runtime/lib/{snapshot/lynx/component.d.ts → element-template/runtime-backend-marker.d.ts} +0 -0
  139. /package/testing-library/dist/{0~123.js → 0~@rstest/adapter-rsbuild.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @lynx-js/react
2
2
 
3
+ ## 0.121.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix `addComponentElement` compat transforms so explicit `removeComponentElement={true}` is honored consistently even when it appears before a JSX spread like `{...props}`. ([#2758](https://github.com/lynx-family/lynx-stack/pull/2758))
8
+
9
+ Previously, the compat transform could short-circuit while scanning opening attributes and treat:
10
+
11
+ ```jsx
12
+ <Component removeComponentElement={true} {...props} />;
13
+ ```
14
+
15
+ differently from:
16
+
17
+ ```jsx
18
+ <Component {...props} removeComponentElement={true} />;
19
+ ```
20
+
21
+ The transform now collects the full opening-attribute state first, so both prop orders compile the same way in normal and `compilerOnly` modes.
22
+
23
+ - Fix directive DCE for TypeScript async output with nested `"background only"` directives. ([#2830](https://github.com/lynx-family/lynx-stack/pull/2830))
24
+
25
+ - Rename the `bundle-url` element attribute to `lazy-bundle-url`. ([#2723](https://github.com/lynx-family/lynx-stack/pull/2723))
26
+
27
+ The attribute set on lazy bundle border elements (when a child belongs to a different lazy bundle entry than its parent) is renamed from `bundle-url` to `lazy-bundle-url` to make its purpose explicit.
28
+
3
29
  ## 0.121.1
4
30
 
5
31
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react",
3
- "version": "0.121.1",
3
+ "version": "0.121.2",
4
4
  "description": "ReactLynx is a framework for developing Lynx applications with familiar React.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -112,9 +112,9 @@
112
112
  "default": "./runtime/lib/worklet-runtime/bindings/index.js"
113
113
  },
114
114
  "./legacy-react-runtime": {
115
- "types": "./runtime/lib/snapshot/legacy-react-runtime/index.d.ts",
115
+ "types": "./runtime/lib/core/compat/legacy-react-runtime.d.ts",
116
116
  "lazy": "./runtime/lazy/legacy-react-runtime.js",
117
- "default": "./runtime/lib/snapshot/legacy-react-runtime/index.js"
117
+ "default": "./runtime/lib/core/compat/legacy-react-runtime.js"
118
118
  },
119
119
  "./testing-library": {
120
120
  "types": "./testing-library/types/index.d.ts",
@@ -202,7 +202,7 @@
202
202
  "./runtime/lib/worklet-runtime/bindings/index.d.ts"
203
203
  ],
204
204
  "legacy-react-runtime": [
205
- "./runtime/lib/snapshot/legacy-react-runtime/index.d.ts"
205
+ "./runtime/lib/core/compat/legacy-react-runtime.d.ts"
206
206
  ]
207
207
  }
208
208
  },
@@ -0,0 +1,73 @@
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 * as ReactAPIs from '@lynx-js/react/element-template';
5
+ import * as ReactCompatAPIS from '@lynx-js/react/compat';
6
+ import * as ReactInternal from '@lynx-js/react/element-template/internal';
7
+ import * as ReactJSXDevRuntime from '@lynx-js/react/jsx-dev-runtime';
8
+ import * as ReactJSXRuntime from '@lynx-js/react/jsx-runtime';
9
+ import * as ReactLegacyReactRuntime from '@lynx-js/react/legacy-react-runtime';
10
+
11
+ import {
12
+ RUNTIME_BACKEND_ELEMENT_TEMPLATE,
13
+ registerLazyRuntimeBackend,
14
+ sExportsJSXDevRuntime,
15
+ sExportsJSXRuntime,
16
+ sExportsLegacyReactRuntime,
17
+ sExportsReact,
18
+ sExportsReactCompat,
19
+ sExportsReactInternal,
20
+ sExportsReactLepus,
21
+ target,
22
+ } from './target.js';
23
+
24
+ registerLazyRuntimeBackend(RUNTIME_BACKEND_ELEMENT_TEMPLATE);
25
+
26
+ Object.defineProperty(target, sExportsReact, {
27
+ value: ReactAPIs,
28
+ enumerable: false,
29
+ writable: false,
30
+ configurable: true,
31
+ });
32
+
33
+ Object.defineProperty(target, sExportsReactLepus, {
34
+ value: ReactAPIs,
35
+ enumerable: false,
36
+ writable: false,
37
+ configurable: true,
38
+ });
39
+
40
+ Object.defineProperty(target, sExportsReactCompat, {
41
+ value: ReactCompatAPIS,
42
+ enumerable: false,
43
+ writable: false,
44
+ configurable: true,
45
+ });
46
+
47
+ Object.defineProperty(target, sExportsReactInternal, {
48
+ value: ReactInternal,
49
+ enumerable: false,
50
+ writable: false,
51
+ configurable: true,
52
+ });
53
+
54
+ Object.defineProperty(target, sExportsJSXRuntime, {
55
+ value: ReactJSXRuntime,
56
+ enumerable: false,
57
+ writable: false,
58
+ configurable: true,
59
+ });
60
+
61
+ Object.defineProperty(target, sExportsJSXDevRuntime, {
62
+ value: ReactJSXDevRuntime,
63
+ enumerable: false,
64
+ writable: false,
65
+ configurable: true,
66
+ });
67
+
68
+ Object.defineProperty(target, sExportsLegacyReactRuntime, {
69
+ value: ReactLegacyReactRuntime,
70
+ enumerable: false,
71
+ writable: false,
72
+ configurable: true,
73
+ });
@@ -10,6 +10,8 @@ import * as ReactLegacyReactRuntime from '@lynx-js/react/legacy-react-runtime';
10
10
  import * as ReactLepusAPIs from '@lynx-js/react/lepus';
11
11
 
12
12
  import {
13
+ RUNTIME_BACKEND_SNAPSHOT,
14
+ registerLazyRuntimeBackend,
13
15
  sExportsJSXDevRuntime,
14
16
  sExportsJSXRuntime,
15
17
  sExportsLegacyReactRuntime,
@@ -20,6 +22,8 @@ import {
20
22
  target,
21
23
  } from './target.js';
22
24
 
25
+ registerLazyRuntimeBackend(RUNTIME_BACKEND_SNAPSHOT);
26
+
23
27
  Object.defineProperty(target, sExportsReact, {
24
28
  value: ReactAPIs,
25
29
  enumerable: false,
@@ -3,6 +3,10 @@
3
3
  // LICENSE file in the root directory of this source tree.
4
4
  export const target = __LEPUS__ ? globalThis : lynx;
5
5
 
6
+ export const RUNTIME_BACKEND_SNAPSHOT = 'Snapshot';
7
+ export const RUNTIME_BACKEND_ELEMENT_TEMPLATE = 'Element Template';
8
+ export const sRuntimeBackend = Symbol.for('__REACT_LYNX_RUNTIME_BACKEND__');
9
+
6
10
  export const sExportsReact = Symbol.for('__REACT_LYNX_EXPORTS__(@lynx-js/react)');
7
11
  export const sExportsReactCompat = Symbol.for('__REACT_LYNX_EXPORTS__(@lynx-js/react/compat)');
8
12
  export const sExportsReactLepus = Symbol.for('__REACT_LYNX_EXPORTS__(@lynx-js/react/lepus)');
@@ -10,3 +14,22 @@ export const sExportsReactInternal = Symbol.for('__REACT_LYNX_EXPORTS__(@lynx-js
10
14
  export const sExportsJSXRuntime = Symbol.for('__REACT_LYNX_EXPORTS__(@lynx-js/react/jsx-runtime)');
11
15
  export const sExportsJSXDevRuntime = Symbol.for('__REACT_LYNX_EXPORTS__(@lynx-js/react/jsx-dev-runtime)');
12
16
  export const sExportsLegacyReactRuntime = Symbol.for('__REACT_LYNX_EXPORTS__(@lynx-js/react/legacy-react-runtime)');
17
+
18
+ export function registerLazyRuntimeBackend(backend) {
19
+ const currentBackend = target[sRuntimeBackend];
20
+
21
+ if (currentBackend !== undefined && currentBackend !== backend) {
22
+ throw new Error(
23
+ `ReactLynx runtime backend mismatch: the current template uses ${
24
+ String(currentBackend)
25
+ }, but this bundle was built for ${backend}. Snapshot and Element Template templates cannot share lazy bundles. Rebuild the main template and lazy bundle with the same elementTemplate setting.`,
26
+ );
27
+ }
28
+
29
+ Object.defineProperty(target, sRuntimeBackend, {
30
+ value: backend,
31
+ enumerable: false,
32
+ writable: false,
33
+ configurable: true,
34
+ });
35
+ }
@@ -1,9 +1,9 @@
1
1
  import { createRef } from 'preact';
2
- import { useRef } from '../../core/hooks/react.js';
2
+ import { useRef } from '../hooks/react.js';
3
3
  declare function __runInJS<T>(value: T): T | undefined | null;
4
- export { ComponentFromReactRuntime as Component } from '../compat/lynxComponent.js';
5
- export { ComponentFromReactRuntime as PureComponent } from '../compat/lynxComponent.js';
4
+ export { ComponentFromReactRuntime as Component } from './lynxComponent.js';
5
+ export { ComponentFromReactRuntime as PureComponent } from './lynxComponent.js';
6
6
  export { createContext } from 'preact';
7
7
  export { lazy } from 'preact/compat';
8
- export { useState, useReducer, useEffect, useMemo, useCallback } from '../../core/hooks/react.js';
8
+ export { useState, useReducer, useEffect, useMemo, useCallback } from '../hooks/react.js';
9
9
  export { __runInJS, createRef, useRef };
@@ -3,18 +3,18 @@
3
3
  // LICENSE file in the root directory of this source tree.
4
4
  import { createContext, createRef } from 'preact';
5
5
  import { lazy } from 'preact/compat';
6
- import { useCallback, useEffect, useMemo, useReducer, useRef, useState } from '../../core/hooks/react.js';
7
- import { ComponentFromReactRuntime as Component, ComponentFromReactRuntime as PureComponent, } from '../compat/lynxComponent.js';
6
+ import { ComponentFromReactRuntime as Component, ComponentFromReactRuntime as PureComponent } from './lynxComponent.js';
7
+ import { useCallback, useEffect, useMemo, useReducer, useRef, useState } from '../hooks/react.js';
8
8
  /* v8 ignore next 3 */
9
9
  function __runInJS(value) {
10
10
  return value;
11
11
  }
12
12
  // should mirror @lynx-js/react-runtime's exports
13
- export { ComponentFromReactRuntime as Component } from '../compat/lynxComponent.js';
14
- export { ComponentFromReactRuntime as PureComponent } from '../compat/lynxComponent.js';
13
+ export { ComponentFromReactRuntime as Component } from './lynxComponent.js';
14
+ export { ComponentFromReactRuntime as PureComponent } from './lynxComponent.js';
15
15
  export { createContext } from 'preact';
16
16
  export { lazy } from 'preact/compat';
17
- export { useState, useReducer, useEffect, useMemo, useCallback /*, useInstance */ } from '../../core/hooks/react.js';
17
+ export { useState, useReducer, useEffect, useMemo, useCallback /*, useInstance */ } from '../hooks/react.js';
18
18
  export { __runInJS, createRef, useRef };
19
19
  /**
20
20
  * @internal
@@ -33,4 +33,4 @@ export default {
33
33
  useCallback,
34
34
  __runInJS,
35
35
  };
36
- //# sourceMappingURL=index.js.map
36
+ //# sourceMappingURL=legacy-react-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy-react-runtime.js","sourceRoot":"","sources":["../../../src/core/compat/legacy-react-runtime.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,yBAAyB,IAAI,SAAS,EAAE,yBAAyB,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElG,sBAAsB;AACtB,SAAS,SAAS,CAAI,KAAQ;IAC5B,OAAO,KAAK,CAAC;AACf,CAAC;AAED,iDAAiD;AACjD,OAAO,EAAE,yBAAyB,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,yBAAyB,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,CAAC,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC7G,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;AAExC;;GAEG;AACH,eAAe;IACb,SAAS;IACT,aAAa;IACb,aAAa;IACb,SAAS;IACT,IAAI;IACJ,QAAQ;IACR,UAAU;IACV,MAAM;IACN,SAAS;IACT,OAAO;IACP,WAAW;IACX,SAAS;CACV,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { Component } from 'preact';
2
2
  import type { ReactNode } from 'react';
3
- export declare function wrapWithLynxComponent(jsxSnapshot: (c: ReactNode, spread?: Record<string, any>) => ReactNode, jsxComponent: any): ReactNode;
3
+ export declare function wrapWithLynxComponent(jsxSnapshot: (c: ReactNode, spread?: Record<string, unknown>) => ReactNode, jsxComponent: ReactNode): ReactNode;
4
4
  export declare class ComponentFromReactRuntime extends Component {
5
+ render(): null;
5
6
  }
@@ -3,22 +3,28 @@
3
3
  // LICENSE file in the root directory of this source tree.
4
4
  import { Component } from 'preact';
5
5
  export function wrapWithLynxComponent(jsxSnapshot, jsxComponent) {
6
- const C = jsxComponent.type;
7
- if (typeof C === 'function' && (C === ComponentFromReactRuntime || C.prototype instanceof ComponentFromReactRuntime)) {
6
+ const componentVNode = jsxComponent;
7
+ const C = componentVNode.type;
8
+ if (typeof C === 'function'
9
+ && (C === ComponentFromReactRuntime
10
+ || C.prototype instanceof ComponentFromReactRuntime)) {
8
11
  if (jsxSnapshot.length === 1) {
9
12
  return jsxSnapshot(jsxComponent);
10
13
  }
11
14
  else {
12
15
  // spread
13
- if (!jsxComponent.props.removeComponentElement) {
14
- return jsxSnapshot(jsxComponent, takeComponentAttributes(jsxComponent));
16
+ if (!componentVNode.props['removeComponentElement']) {
17
+ return jsxSnapshot(jsxComponent, takeComponentAttributes(componentVNode));
15
18
  }
16
19
  }
17
20
  }
18
21
  return jsxComponent;
19
22
  }
20
- // @ts-expect-error
21
23
  export class ComponentFromReactRuntime extends Component {
24
+ /* v8 ignore next 3 -- marker component, never rendered directly. */
25
+ render() {
26
+ return null;
27
+ }
22
28
  }
23
29
  const __COMPONENT_ATTRIBUTES__ = /* @__PURE__ */ new Set([
24
30
  'name',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lynxComponent.js","sourceRoot":"","sources":["../../../src/core/compat/lynxComponent.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAQnC,MAAM,UAAU,qBAAqB,CACnC,WAA0E,EAC1E,YAAuB;IAEvB,MAAM,cAAc,GAAG,YAAoC,CAAC;IAC5D,MAAM,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC;IAC9B,IACE,OAAO,CAAC,KAAK,UAAU;WACpB,CAAC,CAAC,KAAK,yBAAyB;eAC7B,CAA6B,CAAC,SAAS,YAAY,yBAAyB,CAAC,EACnF,CAAC;QACD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,OAAO,WAAW,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,SAAS;YACT,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAC;gBACpD,OAAO,WAAW,CAAC,YAAY,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAC,CAAC;YAC5E,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,MAAM,OAAO,yBAA0B,SAAQ,SAAS;IACtD,oEAAoE;IACpE,MAAM;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,MAAM,wBAAwB,GAAG,eAAe,CAAC,IAAI,GAAG,CAAC;IACvD,MAAM;IACN,OAAO;IACP,OAAO;IACP,SAAS;IACT,aAAa;IACb,SAAS;IACT,0BAA0B;IAC1B,4BAA4B;IAC5B,oBAAoB;IACpB,kBAAkB;IAClB,uBAAuB;IACvB,wBAAwB;IACxB,sBAAsB;IACtB,gBAAgB;IAChB,aAAa;IACb,4BAA4B;IAC5B,+BAA+B;IAC/B,6BAA6B;IAC7B,8BAA8B;IAC9B,WAAW;IACX,aAAa;IACb,qBAAqB;IACrB,uBAAuB;IACvB,sBAAsB;IACtB,qBAAqB;CACtB,CAAC,CAAC;AAEH,SAAS,uBAAuB,CAAC,YAAkC;IACjE,MAAM,UAAU,GAA4B,EAAE,CAAC;IAC/C,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QAC5C,sGAAsG;QACtG,wDAAwD;QACxD,IACE,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC;eAC5B,CAAC,KAAK,IAAI;eACV,CAAC,KAAK,WAAW;eACjB,CAAC,KAAK,SAAS;eACf,CAAC,KAAK,UAAU;eAChB,CAAC,KAAK,wBAAwB;eAC9B,CAAC,kEAAkE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;eAC5E,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EACjC,CAAC;YACD,UAAU,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACtC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ declare function installComponentCompat(): void;
2
+ export { installComponentCompat };
@@ -1,44 +1,48 @@
1
- // Copyright 2024 The Lynx Authors. All rights reserved.
1
+ // Copyright 2026 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
4
  /* eslint-disable */
5
5
  import { Component } from 'preact';
6
+ import { globalCommitContext } from './commit-context.js';
6
7
  import { PerfSpecificKey, markTimingLegacy } from './performance.js';
7
- import { globalCommitContext } from '../../core/commit-context.js';
8
- import { NEXT_STATE } from '../../shared/render-constants.js';
9
- if (__JS__) {
10
- function reportRefDeprecationError(fnName, newFnName) {
11
- if (__DEV__ && !__DISABLE_CREATE_SELECTOR_QUERY_INCOMPATIBLE_WARNING__) {
12
- lynx.reportError(new Error(`${fnName} is deprecated and has different behavior in ReactLynx 3.0, please use ref or ${newFnName} instead.`));
13
- }
8
+ import { NEXT_STATE } from '../shared/render-constants.js';
9
+ const OriginalSetStateKey = '__reactLynxOriginalSetState';
10
+ function reportRefDeprecationError(fnName, newFnName) {
11
+ if (__DEV__ && !__DISABLE_CREATE_SELECTOR_QUERY_INCOMPATIBLE_WARNING__) {
12
+ lynx.reportError(new Error(`${fnName} is deprecated and has different behavior in ReactLynx 3.0, please use ref or ${newFnName} instead.`));
13
+ }
14
+ }
15
+ function getReactAppInstance() {
16
+ return lynxCoreInject.tt;
17
+ }
18
+ function getLegacyNativeApp() {
19
+ return lynxCoreInject.tt._nativeApp;
20
+ }
21
+ function getLegacyReactComponent() {
22
+ return lynxCoreInject.tt._reactLynx.ReactComponent.prototype;
23
+ }
24
+ function createLegacyComponentReceiver(reactAppInstance, nativeApp) {
25
+ return {
26
+ _type: '',
27
+ _nativeApp: nativeApp,
28
+ _uiModule: nativeApp.nativeModuleProxy.LynxUIMethodModule,
29
+ _reactAppInstance: reactAppInstance,
30
+ };
31
+ }
32
+ function installComponentCompat() {
33
+ if (!__JS__) {
34
+ return;
14
35
  }
15
36
  const __Component = Component;
16
- __Component.prototype._reactAppInstance = lynxCoreInject.tt;
37
+ const reactAppInstance = getReactAppInstance();
38
+ __Component.prototype._reactAppInstance = reactAppInstance;
17
39
  __Component.prototype.getNodeRef = function (a, b) {
18
40
  reportRefDeprecationError('getNodeRef', 'lynx.createSelectorQuery');
19
- // @ts-expect-error hack lynx-kernel
20
- return lynxCoreInject.tt._reactLynx.ReactComponent.prototype.getNodeRef
21
- .call({
22
- _type: '',
23
- // @ts-expect-error hack lynx-kernel
24
- _nativeApp: lynxCoreInject.tt._nativeApp,
25
- // @ts-expect-error hack lynx-kernel
26
- _uiModule: lynxCoreInject.tt._nativeApp.nativeModuleProxy.LynxUIMethodModule,
27
- _reactAppInstance: lynxCoreInject.tt,
28
- }, a, b);
41
+ return getLegacyReactComponent().getNodeRef.call(createLegacyComponentReceiver(getReactAppInstance(), getLegacyNativeApp()), a, b);
29
42
  };
30
43
  __Component.prototype.getNodeRefFromRoot = function (a) {
31
44
  reportRefDeprecationError('getNodeRefFromRoot', 'lynx.createSelectorQuery');
32
- // @ts-expect-error hack lynx-kernel
33
- return lynxCoreInject.tt._reactLynx.ReactComponent.prototype
34
- .getNodeRefFromRoot.call({
35
- _type: '',
36
- // @ts-expect-error hack lynx-kernel
37
- _nativeApp: lynxCoreInject.tt._nativeApp,
38
- // @ts-expect-error hack lynx-kernel
39
- _uiModule: lynxCoreInject.tt._nativeApp.nativeModuleProxy.LynxUIMethodModule,
40
- _reactAppInstance: lynxCoreInject.tt,
41
- }, a);
45
+ return getLegacyReactComponent().getNodeRefFromRoot.call(createLegacyComponentReceiver(getReactAppInstance(), getLegacyNativeApp()), a);
42
46
  };
43
47
  __Component.prototype.registerModule = function (name, module) {
44
48
  this._reactAppInstance.registerModule(name, module);
@@ -53,12 +57,13 @@ if (__JS__) {
53
57
  reportRefDeprecationError('getElementById', 'lynx.getElementById');
54
58
  return lynx.getElementById(id);
55
59
  };
56
- __Component.prototype.GlobalEventEmitter = lynxCoreInject.tt.GlobalEventEmitter;
60
+ __Component.prototype.GlobalEventEmitter = reactAppInstance.GlobalEventEmitter;
57
61
  __Component.prototype.createSelectorQuery = function () {
58
62
  reportRefDeprecationError('createSelectorQuery on component instance', 'lynx.createSelectorQuery');
59
63
  return lynx.createSelectorQuery();
60
64
  };
61
- const oldSetState = __Component.prototype.setState;
65
+ const oldSetState = __Component.prototype[OriginalSetStateKey] ?? __Component.prototype.setState;
66
+ __Component.prototype[OriginalSetStateKey] = oldSetState;
62
67
  __Component.prototype.setState = function (state, callback) {
63
68
  oldSetState.call(this, state, callback);
64
69
  // @ts-ignore
@@ -70,4 +75,5 @@ if (__JS__) {
70
75
  }
71
76
  };
72
77
  }
78
+ export { installComponentCompat };
73
79
  //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/core/component.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,oBAAoB;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAmB3D,MAAM,mBAAmB,GAAG,6BAA6B,CAAC;AAE1D,SAAS,yBAAyB,CAAC,MAAc,EAAE,SAAiB;IAClE,IAAI,OAAO,IAAI,CAAC,sDAAsD,EAAE,CAAC;QACvE,IAAI,CAAC,WAAW,CACd,IAAI,KAAK,CACP,GAAG,MAAM,iFAAiF,SAAS,WAAW,CAC/G,CACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO,cAAc,CAAC,EAAiC,CAAC;AAC1D,CAAC;AAED,SAAS,kBAAkB;IACzB,OAAQ,cAAc,CAAC,EAAU,CAAC,UAAU,CAAC;AAC/C,CAAC;AAED,SAAS,uBAAuB;IAC9B,OAAQ,cAAc,CAAC,EAAU,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,CAAC;AACxE,CAAC;AAED,SAAS,6BAA6B,CACpC,gBAAkC,EAClC,SAA0B;IAE1B,OAAO;QACL,KAAK,EAAE,EAAE;QACT,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,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,EAAE,sBAAsB,EAAE,CAAC"}
@@ -28,4 +28,4 @@ export function __dynamicImport(url, options) {
28
28
  return loadDynamicJS(url);
29
29
  }
30
30
  }
31
- //# sourceMappingURL=dynamic-js.js.map
31
+ //# sourceMappingURL=dynamic-import.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-import.js","sourceRoot":"","sources":["../../../src/core/lynx/dynamic-import.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,UAAU,aAAa,CAAI,GAAW;IAC1C,IAAI,SAAS,EAAE,CAAC;QACd,YAAY,CACV,IAAI,KAAK,CAAC,yBAAyB,GAAG,+BAA+B,CAAC,EACtE,EAAE,SAAS,EAAE,GAAG,EAAE,CACnB,CAAC;QACF,2EAA2E;QAC3E,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,CAAC,kBAAkB,CAAI,GAAG,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAC5C,IAAI,GAAG,EAAE,CAAC;gBACR,MAAM,CAAC,GAAG,CAAC,CAAC;YACd,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,IAAS,CAAC,CAAC;YACrB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,GAAW,EACX,OAA2D;IAE3D,MAAM,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC;IAC9B,IAAI,CAAC,KAAK,WAAW,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC;QACpD,OAAO,cAAc,CAAM,GAAG,CAAC,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,a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OAAO,EAAE,CAAC,MAAS,EAAQ,EAAE;YAC3B,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;QAC3B,CAAC;QACD,MAAM,EAAE,CAAC,KAAY,EAAQ,EAAE;YAC7B,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;QACzB,CAAC;QACD,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;KACZ,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const RUNTIME_BACKEND_SNAPSHOT = "Snapshot";
2
+ export declare const RUNTIME_BACKEND_ELEMENT_TEMPLATE = "Element Template";
3
+ export type RuntimeBackend = typeof RUNTIME_BACKEND_SNAPSHOT | typeof RUNTIME_BACKEND_ELEMENT_TEMPLATE;
4
+ export declare const sRuntimeBackend: symbol;
5
+ export declare function registerRuntimeBackend(backend: RuntimeBackend): void;
@@ -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 const RUNTIME_BACKEND_SNAPSHOT = 'Snapshot';
5
+ export const RUNTIME_BACKEND_ELEMENT_TEMPLATE = 'Element Template';
6
+ export const sRuntimeBackend = Symbol.for('__REACT_LYNX_RUNTIME_BACKEND__');
7
+ export function registerRuntimeBackend(backend) {
8
+ const target = (__LEPUS__ ? globalThis : lynx);
9
+ const currentBackend = target[sRuntimeBackend];
10
+ if (currentBackend !== undefined && currentBackend !== backend) {
11
+ throw new Error(`ReactLynx runtime backend mismatch: the current template uses ${currentBackend}, but this bundle was built for ${backend}. Snapshot and Element Template templates cannot share lazy bundles. Rebuild the main template and lazy bundle with the same elementTemplate setting.`);
12
+ }
13
+ Object.defineProperty(target, sRuntimeBackend, {
14
+ value: backend,
15
+ enumerable: false,
16
+ writable: false,
17
+ configurable: true,
18
+ });
19
+ }
20
+ //# sourceMappingURL=runtime-backend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-backend.js","sourceRoot":"","sources":["../../../src/core/lynx/runtime-backend.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAU,CAAC;AACnD,MAAM,CAAC,MAAM,gCAAgC,GAAG,kBAAkB,CAAC;AAMnE,MAAM,CAAC,MAAM,eAAe,GAAW,MAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;AAEpF,MAAM,UAAU,sBAAsB,CAAC,OAAuB;IAC5D,MAAM,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAgD,CAAC;IAC9F,MAAM,cAAc,GAAG,MAAM,CAAC,eAAe,CAA+B,CAAC;IAE7E,IAAI,cAAc,KAAK,SAAS,IAAI,cAAc,KAAK,OAAO,EAAE,CAAC;QAC/D,MAAM,IAAI,KAAK,CACb,iEAAiE,cAAc,mCAAmC,OAAO,uJAAuJ,CACjR,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE;QAC7C,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,30 @@
1
+ declare const PerformanceTimingKeys: readonly ["updateSetStateTrigger", "updateDiffVdomStart", "updateDiffVdomEnd", "diffVdomStart", "diffVdomEnd", "packChangesStart", "packChangesEnd", "parseChangesStart", "parseChangesEnd", "patchChangesStart", "patchChangesEnd", "hydrateParseSnapshotStart", "hydrateParseSnapshotEnd", "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 PerformanceTimingKey = typeof PerformanceTimingKeys[number];
10
+ type PipelineOrigin = typeof PipelineOrigins[keyof typeof PipelineOrigins];
11
+ /**
12
+ * @deprecated used by old timing api(setState timing flag)
13
+ */
14
+ declare const PerfSpecificKey = "__lynx_timing_flag";
15
+ declare let globalPipelineOptions: PipelineOptions | undefined;
16
+ interface TimingAPIOptions {
17
+ shouldStartUpdatePipeline: () => boolean;
18
+ beginPipeline?: typeof beginPipeline;
19
+ }
20
+ /**
21
+ * @deprecated used by old timing api(setState timing flag)
22
+ */
23
+ declare function markTimingLegacy(key: PerformanceTimingKey, timingFlag_?: string): void;
24
+ declare function beginPipeline(needTimestamps: boolean, pipelineOrigin: PipelineOrigin, timingFlag?: string): void;
25
+ declare function setPipeline(pipeline: PipelineOptions | undefined): void;
26
+ declare function resetTimingState(): void;
27
+ declare function markTiming(timestampKey: PerformanceTimingKey, force?: boolean): void;
28
+ declare function initTimingAPI(timingAPIOptions: TimingAPIOptions): void;
29
+ export { PerformanceTimingFlags, PipelineOrigins, PerfSpecificKey, markTimingLegacy, initTimingAPI, beginPipeline, markTiming, setPipeline, resetTimingState, globalPipelineOptions, };
30
+ export type { PerformanceTimingKey, PipelineOrigin };
@@ -0,0 +1,145 @@
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 { options } from 'preact';
5
+ import { RENDER_COMPONENT, ROOT } from '../shared/render-constants.js';
6
+ import { hook, isSdkVersionGt } from '../utils.js';
7
+ const PerformanceTimingKeys = [
8
+ 'updateSetStateTrigger',
9
+ 'updateDiffVdomStart',
10
+ 'updateDiffVdomEnd',
11
+ // updateSetStateTrigger, updateDiffVdomStart and updateDiffVdomEnd is deprecated
12
+ 'diffVdomStart',
13
+ 'diffVdomEnd',
14
+ 'packChangesStart',
15
+ 'packChangesEnd',
16
+ 'parseChangesStart',
17
+ 'parseChangesEnd',
18
+ 'patchChangesStart',
19
+ 'patchChangesEnd',
20
+ 'hydrateParseSnapshotStart',
21
+ 'hydrateParseSnapshotEnd',
22
+ 'mtsRenderStart',
23
+ 'mtsRenderEnd',
24
+ ];
25
+ const PerformanceTimingFlags = {
26
+ reactLynxHydrate: 'react_lynx_hydrate',
27
+ };
28
+ const PipelineOrigins = {
29
+ reactLynxHydrate: 'reactLynxHydrate',
30
+ updateTriggeredByBts: 'updateTriggeredByBts',
31
+ };
32
+ /**
33
+ * @deprecated used by old timing api(setState timing flag)
34
+ */
35
+ const PerfSpecificKey = '__lynx_timing_flag';
36
+ let timingFlag;
37
+ let shouldMarkDiffVdomStart = false;
38
+ let shouldMarkDiffVdomEnd = false;
39
+ let globalPipelineOptions;
40
+ let activeTimingAPIOptions;
41
+ let didInstallTimingAPIHooks = false;
42
+ /**
43
+ * @deprecated used by old timing api(setState timing flag)
44
+ */
45
+ function markTimingLegacy(key, timingFlag_) {
46
+ switch (key) {
47
+ case 'updateSetStateTrigger': {
48
+ shouldMarkDiffVdomStart = true;
49
+ shouldMarkDiffVdomEnd = true;
50
+ timingFlag = timingFlag_;
51
+ break;
52
+ }
53
+ case 'updateDiffVdomStart': {
54
+ if (!shouldMarkDiffVdomStart) {
55
+ return;
56
+ }
57
+ shouldMarkDiffVdomStart = false;
58
+ break;
59
+ }
60
+ case 'updateDiffVdomEnd': {
61
+ if (!shouldMarkDiffVdomEnd) {
62
+ return;
63
+ }
64
+ shouldMarkDiffVdomEnd = false;
65
+ break;
66
+ }
67
+ }
68
+ lynx.getNativeApp().markTiming?.(timingFlag, key);
69
+ }
70
+ function beginPipeline(needTimestamps, pipelineOrigin, timingFlag) {
71
+ globalPipelineOptions = lynx.performance?._generatePipelineOptions?.();
72
+ if (globalPipelineOptions) {
73
+ globalPipelineOptions.needTimestamps = needTimestamps;
74
+ globalPipelineOptions.pipelineOrigin = pipelineOrigin;
75
+ globalPipelineOptions.dsl = 'reactLynx';
76
+ switch (pipelineOrigin) {
77
+ case PipelineOrigins.reactLynxHydrate:
78
+ globalPipelineOptions.stage = 'hydrate';
79
+ break;
80
+ case PipelineOrigins.updateTriggeredByBts:
81
+ globalPipelineOptions.stage = 'update';
82
+ break;
83
+ }
84
+ if (isSdkVersionGt(3, 0)) {
85
+ lynx.performance?._onPipelineStart?.(globalPipelineOptions.pipelineID, globalPipelineOptions);
86
+ }
87
+ else {
88
+ lynx.performance?._onPipelineStart?.(globalPipelineOptions.pipelineID);
89
+ }
90
+ if (timingFlag) {
91
+ lynx.performance?._bindPipelineIdWithTimingFlag?.(globalPipelineOptions.pipelineID, timingFlag);
92
+ }
93
+ }
94
+ }
95
+ function setPipeline(pipeline) {
96
+ globalPipelineOptions = pipeline;
97
+ }
98
+ function resetTimingState() {
99
+ timingFlag = undefined;
100
+ shouldMarkDiffVdomStart = false;
101
+ shouldMarkDiffVdomEnd = false;
102
+ globalPipelineOptions = undefined;
103
+ }
104
+ function markTiming(timestampKey, force) {
105
+ if (globalPipelineOptions && (force || globalPipelineOptions.needTimestamps)) {
106
+ lynx.performance?._markTiming?.(globalPipelineOptions.pipelineID, timestampKey);
107
+ }
108
+ }
109
+ function initTimingAPI(timingAPIOptions) {
110
+ activeTimingAPIOptions = timingAPIOptions;
111
+ resetTimingState();
112
+ if (didInstallTimingAPIHooks) {
113
+ return;
114
+ }
115
+ didInstallTimingAPIHooks = true;
116
+ const helper = () => {
117
+ const timingAPIOptions = activeTimingAPIOptions;
118
+ /* v8 ignore start */
119
+ if (!timingAPIOptions) {
120
+ return;
121
+ }
122
+ /* v8 ignore stop */
123
+ const startPipeline = timingAPIOptions.beginPipeline ?? beginPipeline;
124
+ if (__JS__ && timingAPIOptions.shouldStartUpdatePipeline()) {
125
+ if (!globalPipelineOptions) {
126
+ startPipeline(false, PipelineOrigins.updateTriggeredByBts);
127
+ markTiming('diffVdomStart', true);
128
+ }
129
+ if (shouldMarkDiffVdomStart) {
130
+ markTimingLegacy('updateDiffVdomStart');
131
+ }
132
+ }
133
+ };
134
+ const onHook = (old, ...args) => {
135
+ helper();
136
+ /* v8 ignore start */
137
+ if (old)
138
+ old(...args);
139
+ /* v8 ignore stop */
140
+ };
141
+ hook(options, RENDER_COMPONENT, onHook);
142
+ hook(options, ROOT, onHook);
143
+ }
144
+ export { PerformanceTimingFlags, PipelineOrigins, PerfSpecificKey, markTimingLegacy, initTimingAPI, beginPipeline, markTiming, setPipeline, resetTimingState, globalPipelineOptions, };
145
+ //# sourceMappingURL=performance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance.js","sourceRoot":"","sources":["../../src/core/performance.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,qBAAqB,GAAG;IAC5B,uBAAuB;IACvB,qBAAqB;IACrB,mBAAmB;IACnB,iFAAiF;IACjF,eAAe;IACf,aAAa;IACb,kBAAkB;IAClB,gBAAgB;IAChB,mBAAmB;IACnB,iBAAiB;IACjB,mBAAmB;IACnB,iBAAiB;IACjB,2BAA2B;IAC3B,yBAAyB;IACzB,gBAAgB;IAChB,cAAc;CACN,CAAC;AAEX,MAAM,sBAAsB,GAAG;IAC7B,gBAAgB,EAAE,oBAAoB;CAC9B,CAAC;AAEX,MAAM,eAAe,GAAG;IACtB,gBAAgB,EAAE,kBAAkB;IACpC,oBAAoB,EAAE,sBAAsB;CACpC,CAAC;AAKX;;GAEG;AACH,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAE7C,IAAI,UAA8B,CAAC;AACnC,IAAI,uBAAuB,GAAG,KAAK,CAAC;AACpC,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAElC,IAAI,qBAA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