@lynx-js/react 0.118.0 → 0.119.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/package.json +25 -3
  3. package/refresh/.turbo/turbo-build.log +1 -1
  4. package/runtime/lib/alog/elementPAPICall.js +1 -0
  5. package/runtime/lib/alog/elementPAPICall.js.map +1 -1
  6. package/runtime/lib/debug/component-stack.d.ts +0 -6
  7. package/runtime/lib/debug/component-stack.js.map +1 -1
  8. package/runtime/lib/gesture/processGesture.js +103 -11
  9. package/runtime/lib/gesture/processGesture.js.map +1 -1
  10. package/runtime/lib/hooks/mainThread.d.ts +17 -0
  11. package/runtime/lib/hooks/mainThread.js +152 -0
  12. package/runtime/lib/hooks/mainThread.js.map +1 -0
  13. package/runtime/lib/hooks/react.d.ts +1 -2
  14. package/runtime/lib/hooks/react.js +8 -14
  15. package/runtime/lib/hooks/react.js.map +1 -1
  16. package/runtime/lib/lifecycle/event/jsReady.js +3 -1
  17. package/runtime/lib/lifecycle/event/jsReady.js.map +1 -1
  18. package/runtime/lib/lifecycle/render.js +0 -6
  19. package/runtime/lib/lifecycle/render.js.map +1 -1
  20. package/runtime/lib/renderToOpcodes/constants.d.ts +1 -0
  21. package/runtime/lib/renderToOpcodes/constants.js +1 -0
  22. package/runtime/lib/renderToOpcodes/constants.js.map +1 -1
  23. package/runtime/lib/renderToOpcodes/index.js +3 -1
  24. package/runtime/lib/renderToOpcodes/index.js.map +1 -1
  25. package/runtime/lib/tsconfig.tsbuildinfo +1 -1
  26. package/testing-library/README.md +48 -9
  27. package/testing-library/dist/0~123.js +43 -0
  28. package/testing-library/dist/881.js +1 -0
  29. package/testing-library/dist/entry.d.ts +1 -0
  30. package/testing-library/dist/env/index.d.ts +2 -0
  31. package/testing-library/dist/env/index.js +661 -0
  32. package/testing-library/dist/env/rstest.d.ts +1 -0
  33. package/testing-library/dist/env/rstest.js +6 -0
  34. package/testing-library/dist/env/vitest.d.ts +3 -0
  35. package/testing-library/dist/env/vitest.js +8 -662
  36. package/testing-library/dist/fire-event.d.ts +111 -0
  37. package/testing-library/dist/index.d.ts +18 -6
  38. package/testing-library/dist/plugins/index.d.ts +2 -0
  39. package/testing-library/dist/plugins/index.js +282 -0
  40. package/testing-library/dist/plugins/vitest.d.ts +26 -0
  41. package/testing-library/dist/pure.js +2 -2
  42. package/testing-library/dist/rstest-config.d.ts +25 -0
  43. package/testing-library/dist/rstest-config.js +61 -0
  44. package/testing-library/dist/setupFiles/common/bootstrap.js +2 -0
  45. package/testing-library/dist/{vitest-global-setup.js → setupFiles/common/runtime-setup.js} +25 -39
  46. package/testing-library/dist/setupFiles/inner/rstest.js +7 -0
  47. package/testing-library/dist/setupFiles/inner/vitest.js +11 -0
  48. package/testing-library/dist/setupFiles/rstest.js +21 -0
  49. package/testing-library/dist/setupFiles/vitest.js +20 -0
  50. package/testing-library/dist/vitest.config.d.ts +6 -0
  51. package/testing-library/dist/vitest.config.js +4 -257
  52. package/transform/dist/wasm.cjs +1 -1
  53. package/transform/index.d.ts +10 -0
  54. package/testing-library/types/vitest-config.d.ts +0 -20
@@ -44,6 +44,13 @@ export interface PartialLocation {
44
44
  lineText?: string
45
45
  suggestion?: string
46
46
  }
47
+ export interface UiSourceMapRecord {
48
+ uiSourceMap: number
49
+ filename: string
50
+ lineNumber: number
51
+ columnNumber: number
52
+ snapshotId: string
53
+ }
47
54
  export interface DarkModeConfig {
48
55
  /**
49
56
  * @public
@@ -588,6 +595,8 @@ export interface JsxTransformerConfig {
588
595
  /** @internal */
589
596
  target: 'LEPUS' | 'JS' | 'MIXED'
590
597
  /** @internal */
598
+ enableUiSourceMap?: boolean
599
+ /** @internal */
591
600
  isDynamicComponent?: boolean
592
601
  }
593
602
  export interface WorkletVisitorConfig {
@@ -643,6 +652,7 @@ export interface TransformNodiffOutput {
643
652
  map?: string
644
653
  errors: Array<PartialMessage>
645
654
  warnings: Array<PartialMessage>
655
+ uiSourceMapRecords: Array<UiSourceMapRecord>
646
656
  }
647
657
  export function transformReactLynxSync(code: string, options?: TransformNodiffOptions | undefined | null): TransformNodiffOutput
648
658
  export function transformReactLynx(code: string, options?: TransformNodiffOptions | undefined | null): Promise<TransformNodiffOutput>
@@ -1,20 +0,0 @@
1
- import type { ViteUserConfig } from 'vitest/config.js';
2
-
3
- export interface CreateVitestConfigOptions {
4
- /**
5
- * The package name of the ReactLynx runtime package.
6
- *
7
- * @defaultValue `@lynx-js/react`
8
- */
9
- runtimePkgName?: string;
10
- /**
11
- * Enable React Compiler for this build.
12
- *
13
- * @link https://react.dev/learn/react-compiler
14
- *
15
- * @defaultValue false
16
- */
17
- experimental_enableReactCompiler?: boolean;
18
- }
19
-
20
- export function createVitestConfig(options?: CreateVitestConfigOptions): Promise<ViteUserConfig>;