@lynx-js/react 0.111.1 → 0.111.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 (134) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/components/lib/DeferredListItem.d.ts +3 -1
  3. package/components/lib/DeferredListItem.jsx +4 -2
  4. package/components/lib/DeferredListItem.jsx.map +1 -1
  5. package/components/src/DeferredListItem.tsx +5 -3
  6. package/package.json +6 -1
  7. package/refresh/.turbo/turbo-build.log +1 -1
  8. package/runtime/debug/index.cjs +8 -0
  9. package/runtime/debug/index.d.ts +4 -0
  10. package/runtime/debug/index.js +5 -0
  11. package/runtime/lib/alog/index.d.ts +1 -0
  12. package/runtime/lib/alog/index.js +8 -0
  13. package/runtime/lib/alog/index.js.map +1 -0
  14. package/runtime/lib/alog/render.d.ts +1 -0
  15. package/runtime/lib/alog/render.js +19 -0
  16. package/runtime/lib/alog/render.js.map +1 -0
  17. package/runtime/lib/backgroundSnapshot.d.ts +1 -0
  18. package/runtime/lib/backgroundSnapshot.js +31 -17
  19. package/runtime/lib/backgroundSnapshot.js.map +1 -1
  20. package/runtime/lib/debug/component-stack.d.ts +33 -0
  21. package/runtime/lib/debug/component-stack.js +145 -0
  22. package/runtime/lib/debug/component-stack.js.map +1 -0
  23. package/runtime/lib/debug/formatPatch.d.ts +2 -0
  24. package/runtime/lib/debug/formatPatch.js +27 -0
  25. package/runtime/lib/debug/formatPatch.js.map +1 -0
  26. package/runtime/lib/debug/printSnapshot.d.ts +1 -1
  27. package/runtime/lib/debug/printSnapshot.js +0 -4
  28. package/runtime/lib/debug/printSnapshot.js.map +1 -1
  29. package/runtime/lib/debug/profile.js +1 -3
  30. package/runtime/lib/debug/profile.js.map +1 -1
  31. package/runtime/lib/hydrate.js +11 -7
  32. package/runtime/lib/hydrate.js.map +1 -1
  33. package/runtime/lib/lifecycle/patch/commit.js +1 -1
  34. package/runtime/lib/lifecycle/patch/commit.js.map +1 -1
  35. package/runtime/lib/lifecycle/patch/snapshotPatch.d.ts +4 -0
  36. package/runtime/lib/lifecycle/patch/snapshotPatch.js +28 -0
  37. package/runtime/lib/lifecycle/patch/snapshotPatch.js.map +1 -1
  38. package/runtime/lib/lynx.js +9 -0
  39. package/runtime/lib/lynx.js.map +1 -1
  40. package/runtime/lib/pendingListUpdates.d.ts +2 -1
  41. package/runtime/lib/pendingListUpdates.js +16 -4
  42. package/runtime/lib/pendingListUpdates.js.map +1 -1
  43. package/runtime/lib/renderToOpcodes/constants.d.ts +2 -0
  44. package/runtime/lib/renderToOpcodes/constants.js +2 -0
  45. package/runtime/lib/renderToOpcodes/constants.js.map +1 -1
  46. package/runtime/lib/root.d.ts +6 -0
  47. package/runtime/lib/root.js +4 -0
  48. package/runtime/lib/root.js.map +1 -1
  49. package/runtime/lib/snapshot/platformInfo.js +5 -3
  50. package/runtime/lib/snapshot/platformInfo.js.map +1 -1
  51. package/runtime/lib/snapshot/ref.d.ts +2 -2
  52. package/runtime/lib/snapshot/spread.js +3 -1
  53. package/runtime/lib/snapshot/spread.js.map +1 -1
  54. package/runtime/lib/snapshot.js +13 -7
  55. package/runtime/lib/snapshot.js.map +1 -1
  56. package/runtime/lib/utils.d.ts +2 -0
  57. package/runtime/lib/utils.js +23 -2
  58. package/runtime/lib/utils.js.map +1 -1
  59. package/testing-library/dist/env/vitest.js +12 -4
  60. package/types/react.d.ts +13 -1
  61. package/runtime/src/backgroundSnapshot.ts +0 -501
  62. package/runtime/src/compat/componentIs.ts +0 -30
  63. package/runtime/src/compat/initData.ts +0 -150
  64. package/runtime/src/compat/lynxComponent.ts +0 -79
  65. package/runtime/src/debug/debug.ts +0 -9
  66. package/runtime/src/debug/printSnapshot.ts +0 -28
  67. package/runtime/src/debug/profile.ts +0 -55
  68. package/runtime/src/document.ts +0 -84
  69. package/runtime/src/gesture/processGesture.ts +0 -89
  70. package/runtime/src/gesture/processGestureBagkround.ts +0 -19
  71. package/runtime/src/gesture/types.ts +0 -44
  72. package/runtime/src/hooks/react.ts +0 -62
  73. package/runtime/src/hooks/useLynxGlobalEventListener.ts +0 -59
  74. package/runtime/src/hydrate.ts +0 -368
  75. package/runtime/src/index.ts +0 -94
  76. package/runtime/src/internal.ts +0 -63
  77. package/runtime/src/legacy-react-runtime/index.ts +0 -42
  78. package/runtime/src/lifecycle/destroy.ts +0 -34
  79. package/runtime/src/lifecycle/event/delayEvents.ts +0 -11
  80. package/runtime/src/lifecycle/event/delayLifecycleEvents.ts +0 -15
  81. package/runtime/src/lifecycle/event/jsReady.ts +0 -34
  82. package/runtime/src/lifecycle/pass.ts +0 -14
  83. package/runtime/src/lifecycle/patch/commit.ts +0 -214
  84. package/runtime/src/lifecycle/patch/error.ts +0 -61
  85. package/runtime/src/lifecycle/patch/isMainThreadHydrationFinished.ts +0 -13
  86. package/runtime/src/lifecycle/patch/snapshotPatch.ts +0 -65
  87. package/runtime/src/lifecycle/patch/snapshotPatchApply.ts +0 -145
  88. package/runtime/src/lifecycle/patch/updateMainThread.ts +0 -64
  89. package/runtime/src/lifecycle/ref/delay.ts +0 -99
  90. package/runtime/src/lifecycle/reload.ts +0 -97
  91. package/runtime/src/lifecycle/render.ts +0 -54
  92. package/runtime/src/lifecycleConstant.ts +0 -21
  93. package/runtime/src/list.ts +0 -307
  94. package/runtime/src/listUpdateInfo.ts +0 -221
  95. package/runtime/src/lynx/calledByNative.ts +0 -160
  96. package/runtime/src/lynx/component.ts +0 -113
  97. package/runtime/src/lynx/dynamic-js.ts +0 -36
  98. package/runtime/src/lynx/env.ts +0 -109
  99. package/runtime/src/lynx/injectLepusMethods.ts +0 -53
  100. package/runtime/src/lynx/lazy-bundle.ts +0 -175
  101. package/runtime/src/lynx/performance.ts +0 -148
  102. package/runtime/src/lynx/runWithForce.ts +0 -67
  103. package/runtime/src/lynx/tt.ts +0 -215
  104. package/runtime/src/lynx-api.ts +0 -455
  105. package/runtime/src/lynx.ts +0 -58
  106. package/runtime/src/opcodes.ts +0 -155
  107. package/runtime/src/pendingListUpdates.ts +0 -18
  108. package/runtime/src/renderToOpcodes/constants.ts +0 -24
  109. package/runtime/src/renderToOpcodes/index.ts +0 -306
  110. package/runtime/src/root.ts +0 -23
  111. package/runtime/src/snapshot/dynamicPartType.ts +0 -16
  112. package/runtime/src/snapshot/event.ts +0 -33
  113. package/runtime/src/snapshot/gesture.ts +0 -30
  114. package/runtime/src/snapshot/list.ts +0 -36
  115. package/runtime/src/snapshot/platformInfo.ts +0 -62
  116. package/runtime/src/snapshot/ref.ts +0 -139
  117. package/runtime/src/snapshot/spread.ts +0 -330
  118. package/runtime/src/snapshot/workletEvent.ts +0 -35
  119. package/runtime/src/snapshot/workletRef.ts +0 -88
  120. package/runtime/src/snapshot.ts +0 -634
  121. package/runtime/src/snapshotInstanceHydrationMap.ts +0 -17
  122. package/runtime/src/utils.ts +0 -44
  123. package/runtime/src/worklet/ctx.ts +0 -22
  124. package/runtime/src/worklet/destroy.ts +0 -16
  125. package/runtime/src/worklet/execMap.ts +0 -51
  126. package/runtime/src/worklet/functionCall.ts +0 -42
  127. package/runtime/src/worklet/functionality.ts +0 -29
  128. package/runtime/src/worklet/hmr.ts +0 -34
  129. package/runtime/src/worklet/indexMap.ts +0 -23
  130. package/runtime/src/worklet/runOnBackground.ts +0 -147
  131. package/runtime/src/worklet/runOnMainThread.ts +0 -50
  132. package/runtime/src/worklet/transformToWorklet.ts +0 -26
  133. package/runtime/src/worklet/workletRef.ts +0 -231
  134. package/runtime/src/worklet/workletRefPool.ts +0 -29
@@ -1,29 +0,0 @@
1
- // Copyright 2024 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
-
5
- import { isMtsEnabled } from './functionality.js';
6
-
7
- let initValuePatch: [number, unknown][] = [];
8
- const initValueIdSet = /*#__PURE__*/ new Set<number>();
9
-
10
- /**
11
- * @internal
12
- */
13
- export function addWorkletRefInitValue(id: number, value: unknown): void {
14
- if (!isMtsEnabled()) {
15
- return;
16
- }
17
-
18
- initValueIdSet.add(id);
19
- initValuePatch.push([id, value]);
20
- }
21
-
22
- /**
23
- * @internal
24
- */
25
- export function takeWorkletRefInitValuePatch(): [number, unknown][] {
26
- const res = initValuePatch;
27
- initValuePatch = [];
28
- return res;
29
- }