@lynx-js/react 0.123.1 → 0.123.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 (27) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/runtime/lib/element-template/background/commit-hook.js +3 -0
  4. package/runtime/lib/element-template/background/commit-hook.js.map +1 -1
  5. package/runtime/lib/element-template/prop-adapters/spread.js +11 -11
  6. package/runtime/lib/element-template/prop-adapters/spread.js.map +1 -1
  7. package/runtime/lib/element-template/protocol/types.d.ts +1 -0
  8. package/runtime/lib/shared/attribute-name.d.ts +3 -0
  9. package/runtime/lib/shared/attribute-name.js +91 -0
  10. package/runtime/lib/shared/attribute-name.js.map +1 -0
  11. package/runtime/lib/snapshot/lifecycle/patch/commit.js +3 -0
  12. package/runtime/lib/snapshot/lifecycle/patch/commit.js.map +1 -1
  13. package/runtime/lib/snapshot/renderToOpcodes/hydrate.js +19 -0
  14. package/runtime/lib/snapshot/renderToOpcodes/hydrate.js.map +1 -1
  15. package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js +97 -65
  16. package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js.map +1 -1
  17. package/runtime/lib/snapshot/snapshot/platformInfo.js +20 -9
  18. package/runtime/lib/snapshot/snapshot/platformInfo.js.map +1 -1
  19. package/runtime/lib/snapshot/snapshot/spread.js +27 -17
  20. package/runtime/lib/snapshot/snapshot/spread.js.map +1 -1
  21. package/runtime/lib/snapshot/snapshot/utils.js +8 -3
  22. package/runtime/lib/snapshot/snapshot/utils.js.map +1 -1
  23. package/runtime/lib/tsconfig.tsbuildinfo +1 -1
  24. package/testing-library/dist/env/index.js +5 -0
  25. package/testing-library/dist/index.d.ts +1 -0
  26. package/transform/dist/wasm.cjs +1 -1
  27. package/transform/index.d.ts +43 -0
@@ -220,6 +220,9 @@ const initElementTree = ()=>{
220
220
  __GetAttributeByName(ele, name) {
221
221
  return ele.getAttribute(name);
222
222
  }
223
+ __GetComputedStyleByKey(ele, key) {
224
+ return lynxTestingEnv.env.window.getComputedStyle(ele).getPropertyValue(key);
225
+ }
223
226
  __ElementAnimate(element, args) {
224
227
  const [operation, name] = args;
225
228
  switch(operation){
@@ -478,6 +481,7 @@ function injectMainThreadGlobals(target, polyfills) {
478
481
  target.__FIRST_SCREEN_SYNC_TIMING__ = 'immediately';
479
482
  target.__TESTING_FORCE_RENDER_TO_OPCODE__ = false;
480
483
  target.__ENABLE_SSR__ = false;
484
+ target.__EXPERIMENTAL_TRANSFORM_BUILTIN_ATTRIBUTE_NAMES__ = false;
481
485
  target.globDynamicComponentEntry = '__Card__';
482
486
  const native = {
483
487
  _listeners: {},
@@ -557,6 +561,7 @@ function injectBackgroundThreadGlobals(target, polyfills) {
557
561
  target.__BACKGROUND__ = true;
558
562
  target.__MAIN_THREAD__ = false;
559
563
  target.__ENABLE_SSR__ = false;
564
+ target.__EXPERIMENTAL_TRANSFORM_BUILTIN_ATTRIBUTE_NAMES__ = false;
560
565
  target.globDynamicComponentEntry = '__Card__';
561
566
  target.lynxCoreInject = {};
562
567
  target.lynxCoreInject.tt = {
@@ -785,6 +785,7 @@ declare const initElementTree: () => {
785
785
  __CreateList(parentComponentUniqueId: number, componentAtIndex: any, enqueueComponent: any): LynxElement;
786
786
  __GetTag(ele: LynxElement): string;
787
787
  __GetAttributeByName(ele: LynxElement, name: string): string | null;
788
+ __GetComputedStyleByKey(ele: LynxElement, key: string): string;
788
789
  /** @internal */
789
790
  animationMap: Map<string, {
790
791
  element: LynxElement;