@lynx-js/react 0.121.1 → 0.122.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.
- package/CHANGELOG.md +44 -0
- package/package.json +5 -5
- 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/core/background-function/exec-map.d.ts +11 -0
- package/runtime/lib/core/background-function/exec-map.js +39 -0
- package/runtime/lib/core/background-function/exec-map.js.map +1 -0
- package/runtime/lib/core/background-function/handle.d.ts +8 -0
- package/runtime/lib/core/background-function/handle.js +25 -0
- package/runtime/lib/core/background-function/handle.js.map +1 -0
- package/runtime/lib/core/background-function/run-on-background.d.ts +8 -0
- package/runtime/lib/{snapshot/worklet/call/runOnBackground.js → core/background-function/run-on-background.js} +39 -33
- package/runtime/lib/core/background-function/run-on-background.js.map +1 -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/core/initData.js +35 -0
- package/runtime/lib/core/initData.js.map +1 -1
- 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/lynx-page-data.js +6 -0
- package/runtime/lib/core/lynx-page-data.js.map +1 -1
- package/runtime/lib/core/lynx-update-data.js +6 -0
- package/runtime/lib/core/lynx-update-data.js.map +1 -1
- 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/core/runtime-destroy.d.ts +4 -0
- package/runtime/lib/core/runtime-destroy.js +18 -0
- package/runtime/lib/core/runtime-destroy.js.map +1 -0
- package/runtime/lib/core/thread-function-call/main-thread.d.ts +5 -0
- package/runtime/lib/core/thread-function-call/main-thread.js +69 -0
- package/runtime/lib/core/thread-function-call/main-thread.js.map +1 -0
- package/runtime/lib/core/thread-function-call/return-value.d.ts +2 -0
- package/runtime/lib/core/thread-function-call/return-value.js +67 -0
- package/runtime/lib/core/thread-function-call/return-value.js.map +1 -0
- package/runtime/lib/element-template/background/attr-slots.d.ts +1 -1
- package/runtime/lib/element-template/background/attr-slots.js +8 -7
- package/runtime/lib/element-template/background/attr-slots.js.map +1 -1
- package/runtime/lib/element-template/background/commit-hook.js +81 -61
- package/runtime/lib/element-template/background/commit-hook.js.map +1 -1
- package/runtime/lib/element-template/background/destroy.js +4 -0
- package/runtime/lib/element-template/background/destroy.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 +237 -58
- package/runtime/lib/element-template/background/hydrate.js.map +1 -1
- package/runtime/lib/element-template/background/hydration-listener.js +38 -38
- package/runtime/lib/element-template/background/hydration-listener.js.map +1 -1
- package/runtime/lib/element-template/background/instance.d.ts +31 -4
- package/runtime/lib/element-template/background/instance.js +219 -31
- package/runtime/lib/element-template/background/instance.js.map +1 -1
- package/runtime/lib/element-template/background/render-scope.d.ts +4 -0
- package/runtime/lib/element-template/background/render-scope.js +43 -0
- package/runtime/lib/element-template/background/render-scope.js.map +1 -0
- 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 +5 -2
- package/runtime/lib/element-template/index.js +8 -7
- package/runtime/lib/element-template/index.js.map +1 -1
- package/runtime/lib/element-template/internal.d.ts +7 -0
- package/runtime/lib/element-template/internal.js +9 -9
- package/runtime/lib/element-template/internal.js.map +1 -1
- package/runtime/lib/element-template/lynx/env.js +2 -0
- package/runtime/lib/element-template/lynx/env.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 +3 -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 +6 -0
- package/runtime/lib/element-template/native/mts-destroy.js.map +1 -1
- package/runtime/lib/element-template/native/patch-listener.js +42 -17
- 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 +39 -0
- package/runtime/lib/element-template/native/reload-main-thread.js.map +1 -0
- package/runtime/lib/element-template/prop-adapters/spread.d.ts +1 -4
- package/runtime/lib/element-template/prop-adapters/spread.js +1 -1
- package/runtime/lib/element-template/prop-adapters/spread.js.map +1 -1
- 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 +25 -0
- package/runtime/lib/element-template/protocol/template-type.js +42 -0
- package/runtime/lib/element-template/protocol/template-type.js.map +1 -0
- package/runtime/lib/element-template/protocol/types.d.ts +38 -15
- package/runtime/lib/element-template/protocol/types.js.map +1 -1
- package/runtime/lib/element-template/protocol/update-event.d.ts +15 -0
- package/runtime/lib/element-template/protocol/update-event.js +24 -0
- package/runtime/lib/element-template/protocol/update-event.js.map +1 -0
- 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.d.ts +1 -1
- package/runtime/lib/element-template/runtime/patch.js +198 -75
- 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 +83 -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/attr-slot-plan.d.ts +7 -5
- package/runtime/lib/element-template/runtime/template/attr-slot-plan.js +17 -4
- package/runtime/lib/element-template/runtime/template/attr-slot-plan.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 +11 -0
- package/runtime/lib/element-template/runtime/template/handle.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/main-thread-background-function.d.ts +10 -0
- package/runtime/lib/element-template/runtime/template/main-thread-background-function.js +30 -0
- package/runtime/lib/element-template/runtime/template/main-thread-background-function.js.map +1 -0
- package/runtime/lib/element-template/runtime/template/main-thread-dynamic-attr-state.d.ts +15 -0
- package/runtime/lib/element-template/runtime/template/main-thread-dynamic-attr-state.js +91 -0
- package/runtime/lib/element-template/runtime/template/main-thread-dynamic-attr-state.js.map +1 -0
- package/runtime/lib/element-template/runtime/template/main-thread-event-ctx.d.ts +15 -0
- package/runtime/lib/element-template/runtime/template/main-thread-event-ctx.js +29 -0
- package/runtime/lib/element-template/runtime/template/main-thread-event-ctx.js.map +1 -0
- package/runtime/lib/element-template/runtime/template/main-thread-function.d.ts +6 -0
- package/runtime/lib/element-template/runtime/template/main-thread-function.js +24 -0
- package/runtime/lib/element-template/runtime/template/main-thread-function.js.map +1 -0
- 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 +4 -2
- package/runtime/lib/index.js +5 -2
- package/runtime/lib/index.js.map +1 -1
- package/runtime/lib/internal.d.ts +5 -4
- package/runtime/lib/internal.js +6 -5
- package/runtime/lib/internal.js.map +1 -1
- package/runtime/lib/lynx-api.d.ts +1 -1
- package/runtime/lib/lynx-api.js +1 -1
- package/runtime/lib/lynx-api.js.map +1 -1
- package/runtime/lib/runtime-backend-marker.js +6 -0
- package/runtime/lib/runtime-backend-marker.js.map +1 -0
- package/runtime/lib/{snapshot/worklet/indexMap.d.ts → shared/index-map.d.ts} +2 -2
- package/runtime/lib/{snapshot/worklet/indexMap.js → shared/index-map.js} +5 -3
- package/runtime/lib/shared/index-map.js.map +1 -0
- package/runtime/lib/snapshot/lifecycle/patch/commit.js +2 -2
- 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/children.d.ts +13 -0
- package/runtime/lib/snapshot/lynx/children.js +19 -0
- package/runtime/lib/snapshot/lynx/children.js.map +1 -0
- 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 +2 -2
- 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/snapshot/worklet/call/runOnMainThread.js +10 -31
- package/runtime/lib/snapshot/worklet/call/runOnMainThread.js.map +1 -1
- package/runtime/lib/snapshot/worklet/ctx.js +2 -2
- package/runtime/lib/snapshot/worklet/ctx.js.map +1 -1
- package/runtime/lib/snapshot/worklet/destroy.d.ts +0 -1
- package/runtime/lib/snapshot/worklet/destroy.js +2 -5
- package/runtime/lib/snapshot/worklet/destroy.js.map +1 -1
- package/runtime/lib/tsconfig.tsbuildinfo +1 -1
- package/runtime/lib/worklet-runtime/bindings/observers.d.ts +7 -0
- package/runtime/lib/worklet-runtime/bindings/observers.js +14 -1
- package/runtime/lib/worklet-runtime/bindings/observers.js.map +1 -1
- package/runtime/lib/worklet-runtime/delayRunOnBackground.d.ts +2 -1
- package/runtime/lib/worklet-runtime/delayRunOnBackground.js +6 -2
- package/runtime/lib/worklet-runtime/delayRunOnBackground.js.map +1 -1
- package/runtime/lib/worklet-runtime/hydrate.js +3 -0
- package/runtime/lib/worklet-runtime/hydrate.js.map +1 -1
- package/runtime/lib/worklet-runtime/jsFunctionLifecycle.d.ts +1 -1
- package/runtime/lib/worklet-runtime/jsFunctionLifecycle.js +1 -1
- package/runtime/lib/worklet-runtime/jsFunctionLifecycle.js.map +1 -1
- package/runtime/lib/worklet-runtime/workletRuntime.js +17 -2
- package/runtime/lib/worklet-runtime/workletRuntime.js.map +1 -1
- package/runtime/worklet-runtime/dev.js +26 -9
- 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/types/react.docs.d.ts +14 -0
- 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/runtime/lib/snapshot/worklet/call/delayedRunOnMainThreadData.d.ts +0 -3
- package/runtime/lib/snapshot/worklet/call/delayedRunOnMainThreadData.js +0 -10
- package/runtime/lib/snapshot/worklet/call/delayedRunOnMainThreadData.js.map +0 -1
- package/runtime/lib/snapshot/worklet/call/execMap.js +0 -43
- package/runtime/lib/snapshot/worklet/call/execMap.js.map +0 -1
- package/runtime/lib/snapshot/worklet/call/functionCall.d.ts +0 -1
- package/runtime/lib/snapshot/worklet/call/functionCall.js +0 -33
- package/runtime/lib/snapshot/worklet/call/functionCall.js.map +0 -1
- package/runtime/lib/snapshot/worklet/call/runOnBackground.d.ts +0 -20
- package/runtime/lib/snapshot/worklet/call/runOnBackground.js.map +0 -1
- package/runtime/lib/snapshot/worklet/call/transformToWorklet.d.ts +0 -1
- package/runtime/lib/snapshot/worklet/call/transformToWorklet.js +0 -22
- package/runtime/lib/snapshot/worklet/call/transformToWorklet.js.map +0 -1
- package/runtime/lib/snapshot/worklet/indexMap.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/runtime/lib/{snapshot/worklet/call/execMap.d.ts → runtime-backend-marker.d.ts} +0 -0
- /package/testing-library/dist/{0~123.js → 0~@rstest/adapter-rsbuild.js} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
1
|
+
/*! LICENSE: pure.js.LICENSE.txt */
|
|
3
2
|
import { jsx } from "@lynx-js/react/jsx-runtime";
|
|
4
3
|
import { cloneElement, createRef, h, render } from "preact";
|
|
5
4
|
import { useEffect } from "preact/hooks";
|
|
@@ -7,6 +6,7 @@ import { act } from "preact/test-utils";
|
|
|
7
6
|
import { __root } from "@lynx-js/react/internal";
|
|
8
7
|
import { flushDelayedLifecycleEvents } from "../../runtime/lib/snapshot/lynx/tt.js";
|
|
9
8
|
import { clearPage } from "../../runtime/lib/snapshot/index.js";
|
|
9
|
+
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
10
10
|
__webpack_require__.add({
|
|
11
11
|
"../../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js" (module1) {
|
|
12
12
|
module1.exports = ({ onlyFirst = false } = {})=>{
|
|
@@ -9507,7 +9507,7 @@ __webpack_require__.add({
|
|
|
9507
9507
|
exports["default"] = _default;
|
|
9508
9508
|
},
|
|
9509
9509
|
"../../../node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
9510
|
-
exports.
|
|
9510
|
+
exports.Ot = exports.wZ = exports._s = void 0;
|
|
9511
9511
|
var _ariaPropsMap = _interopRequireDefault(__webpack_require__("../../../node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/ariaPropsMap.js"));
|
|
9512
9512
|
var _domMap = _interopRequireDefault(__webpack_require__("../../../node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/domMap.js"));
|
|
9513
9513
|
var _rolesMap = _interopRequireDefault(__webpack_require__("../../../node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/rolesMap.js"));
|
|
@@ -9521,11 +9521,11 @@ __webpack_require__.add({
|
|
|
9521
9521
|
_ariaPropsMap.default;
|
|
9522
9522
|
_domMap.default;
|
|
9523
9523
|
var roles = _rolesMap.default;
|
|
9524
|
-
exports.
|
|
9524
|
+
exports.Ot = roles;
|
|
9525
9525
|
var elementRoles = _elementRoleMap.default;
|
|
9526
|
-
exports.
|
|
9526
|
+
exports._s = elementRoles;
|
|
9527
9527
|
var roleElements = _roleElementMap.default;
|
|
9528
|
-
exports.
|
|
9528
|
+
exports.wZ = roleElements;
|
|
9529
9529
|
},
|
|
9530
9530
|
"../../../node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/roleElementMap.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
9531
9531
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -12582,7 +12582,7 @@ function getNodeText(node) {
|
|
|
12582
12582
|
if (node.matches('input[type=submit], input[type=button], input[type=reset]')) return node.value;
|
|
12583
12583
|
return Array.from(node.childNodes).filter((child)=>child.nodeType === TEXT_NODE && Boolean(child.textContent)).map((c)=>c.textContent).join('');
|
|
12584
12584
|
}
|
|
12585
|
-
const elementRoleList = buildElementRoleList(lib.
|
|
12585
|
+
const elementRoleList = buildElementRoleList(lib._s);
|
|
12586
12586
|
function isSubtreeInaccessible(element) {
|
|
12587
12587
|
if (true === element.hidden) return true;
|
|
12588
12588
|
if ('true' === element.getAttribute('aria-hidden')) return true;
|
|
@@ -13255,46 +13255,46 @@ const queryAllByRole = function(container, role, _temp) {
|
|
|
13255
13255
|
checkContainerType(container);
|
|
13256
13256
|
if (void 0 !== selected) {
|
|
13257
13257
|
var _allRoles$get;
|
|
13258
|
-
if ((null == (_allRoles$get = lib.
|
|
13258
|
+
if ((null == (_allRoles$get = lib.Ot.get(role)) ? void 0 : _allRoles$get.props['aria-selected']) === void 0) throw new Error("\"aria-selected\" is not supported on role \"" + role + "\".");
|
|
13259
13259
|
}
|
|
13260
13260
|
if (void 0 !== busy) {
|
|
13261
13261
|
var _allRoles$get2;
|
|
13262
|
-
if ((null == (_allRoles$get2 = lib.
|
|
13262
|
+
if ((null == (_allRoles$get2 = lib.Ot.get(role)) ? void 0 : _allRoles$get2.props['aria-busy']) === void 0) throw new Error("\"aria-busy\" is not supported on role \"" + role + "\".");
|
|
13263
13263
|
}
|
|
13264
13264
|
if (void 0 !== checked) {
|
|
13265
13265
|
var _allRoles$get3;
|
|
13266
|
-
if ((null == (_allRoles$get3 = lib.
|
|
13266
|
+
if ((null == (_allRoles$get3 = lib.Ot.get(role)) ? void 0 : _allRoles$get3.props['aria-checked']) === void 0) throw new Error("\"aria-checked\" is not supported on role \"" + role + "\".");
|
|
13267
13267
|
}
|
|
13268
13268
|
if (void 0 !== pressed) {
|
|
13269
13269
|
var _allRoles$get4;
|
|
13270
|
-
if ((null == (_allRoles$get4 = lib.
|
|
13270
|
+
if ((null == (_allRoles$get4 = lib.Ot.get(role)) ? void 0 : _allRoles$get4.props['aria-pressed']) === void 0) throw new Error("\"aria-pressed\" is not supported on role \"" + role + "\".");
|
|
13271
13271
|
}
|
|
13272
13272
|
if (void 0 !== current) {
|
|
13273
13273
|
var _allRoles$get5;
|
|
13274
|
-
if ((null == (_allRoles$get5 = lib.
|
|
13274
|
+
if ((null == (_allRoles$get5 = lib.Ot.get(role)) ? void 0 : _allRoles$get5.props['aria-current']) === void 0) throw new Error("\"aria-current\" is not supported on role \"" + role + "\".");
|
|
13275
13275
|
}
|
|
13276
13276
|
if (void 0 !== level) {
|
|
13277
13277
|
if ('heading' !== role) throw new Error("Role \"" + role + "\" cannot have \"level\" property.");
|
|
13278
13278
|
}
|
|
13279
13279
|
if (void 0 !== valueNow) {
|
|
13280
13280
|
var _allRoles$get6;
|
|
13281
|
-
if ((null == (_allRoles$get6 = lib.
|
|
13281
|
+
if ((null == (_allRoles$get6 = lib.Ot.get(role)) ? void 0 : _allRoles$get6.props['aria-valuenow']) === void 0) throw new Error("\"aria-valuenow\" is not supported on role \"" + role + "\".");
|
|
13282
13282
|
}
|
|
13283
13283
|
if (void 0 !== valueMax) {
|
|
13284
13284
|
var _allRoles$get7;
|
|
13285
|
-
if ((null == (_allRoles$get7 = lib.
|
|
13285
|
+
if ((null == (_allRoles$get7 = lib.Ot.get(role)) ? void 0 : _allRoles$get7.props['aria-valuemax']) === void 0) throw new Error("\"aria-valuemax\" is not supported on role \"" + role + "\".");
|
|
13286
13286
|
}
|
|
13287
13287
|
if (void 0 !== valueMin) {
|
|
13288
13288
|
var _allRoles$get8;
|
|
13289
|
-
if ((null == (_allRoles$get8 = lib.
|
|
13289
|
+
if ((null == (_allRoles$get8 = lib.Ot.get(role)) ? void 0 : _allRoles$get8.props['aria-valuemin']) === void 0) throw new Error("\"aria-valuemin\" is not supported on role \"" + role + "\".");
|
|
13290
13290
|
}
|
|
13291
13291
|
if (void 0 !== valueText) {
|
|
13292
13292
|
var _allRoles$get9;
|
|
13293
|
-
if ((null == (_allRoles$get9 = lib.
|
|
13293
|
+
if ((null == (_allRoles$get9 = lib.Ot.get(role)) ? void 0 : _allRoles$get9.props['aria-valuetext']) === void 0) throw new Error("\"aria-valuetext\" is not supported on role \"" + role + "\".");
|
|
13294
13294
|
}
|
|
13295
13295
|
if (void 0 !== expanded) {
|
|
13296
13296
|
var _allRoles$get0;
|
|
13297
|
-
if ((null == (_allRoles$get0 = lib.
|
|
13297
|
+
if ((null == (_allRoles$get0 = lib.Ot.get(role)) ? void 0 : _allRoles$get0.props['aria-expanded']) === void 0) throw new Error("\"aria-expanded\" is not supported on role \"" + role + "\".");
|
|
13298
13298
|
}
|
|
13299
13299
|
const subtreeIsInaccessibleCache = new WeakMap();
|
|
13300
13300
|
function cachedIsSubtreeInaccessible(element) {
|
|
@@ -13348,7 +13348,7 @@ const queryAllByRole = function(container, role, _temp) {
|
|
|
13348
13348
|
function makeRoleSelector(role) {
|
|
13349
13349
|
var _roleElements$get;
|
|
13350
13350
|
const explicitRoleSelector = "*[role~=\"" + role + "\"]";
|
|
13351
|
-
const roleRelations = null != (_roleElements$get = lib.
|
|
13351
|
+
const roleRelations = null != (_roleElements$get = lib.wZ.get(role)) ? _roleElements$get : new Set();
|
|
13352
13352
|
const implicitRoleSelectors = new Set(Array.from(roleRelations).map((_ref)=>{
|
|
13353
13353
|
let { name } = _ref;
|
|
13354
13354
|
return name;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createRequire } from "
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
2
|
const rstest_config_require = createRequire(import.meta.url);
|
|
3
3
|
function createDefaultRstestConfig() {
|
|
4
4
|
return {
|
|
@@ -29,9 +29,7 @@ function withLynxConfig(options) {
|
|
|
29
29
|
cwd: options?.rootPath,
|
|
30
30
|
configPath: options?.configPath
|
|
31
31
|
});
|
|
32
|
-
const { toRstestConfig } = await import("./0
|
|
33
|
-
toRstestConfig: mod.toRstestConfig
|
|
34
|
-
}));
|
|
32
|
+
const { toRstestConfig } = await import("./0~@rstest/adapter-rsbuild.js");
|
|
35
33
|
const rstestConfig = toRstestConfig({
|
|
36
34
|
rsbuildConfig: lynxConfig.content
|
|
37
35
|
});
|
|
@@ -14,7 +14,7 @@ import { initApiEnv } from "../../../../runtime/lib/worklet-runtime/api/lynxApi.
|
|
|
14
14
|
import { initEventListeners } from "../../../../runtime/lib/worklet-runtime/listeners.js";
|
|
15
15
|
import { initWorklet } from "../../../../runtime/lib/worklet-runtime/workletRuntime.js";
|
|
16
16
|
import { setupBackgroundDocument, setupDocument } from "../../../../runtime/lib/document.js";
|
|
17
|
-
const { onInjectMainThreadGlobals, onInjectBackgroundThreadGlobals, onResetLynxTestingEnv, onSwitchedToMainThread, onSwitchedToBackgroundThread, onInitWorkletRuntime } = globalThis;
|
|
17
|
+
const { onInjectMainThreadGlobals: onInjectMainThreadGlobals, onInjectBackgroundThreadGlobals: onInjectBackgroundThreadGlobals, onResetLynxTestingEnv: onResetLynxTestingEnv, onSwitchedToMainThread: onSwitchedToMainThread, onSwitchedToBackgroundThread: onSwitchedToBackgroundThread, onInitWorkletRuntime: onInitWorkletRuntime } = globalThis;
|
|
18
18
|
injectCalledByNative();
|
|
19
19
|
injectUpdateMainThread();
|
|
20
20
|
injectUpdateMTRefInitValue();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
const { onInjectBackgroundThreadGlobals } = globalThis;
|
|
1
|
+
const { onInjectBackgroundThreadGlobals: onInjectBackgroundThreadGlobals } = globalThis;
|
|
2
2
|
globalThis.onInjectBackgroundThreadGlobals = (target)=>{
|
|
3
3
|
if (onInjectBackgroundThreadGlobals) onInjectBackgroundThreadGlobals(target);
|
|
4
4
|
target.lynx.requireModuleAsync = async (url, _callback)=>{
|
|
5
5
|
throw new Error('lynx.requireModuleAsync not implemented for rstest');
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
+
export { };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { onInjectBackgroundThreadGlobals } = globalThis;
|
|
1
|
+
const { onInjectBackgroundThreadGlobals: onInjectBackgroundThreadGlobals } = globalThis;
|
|
2
2
|
globalThis.onInjectBackgroundThreadGlobals = (target)=>{
|
|
3
3
|
if (onInjectBackgroundThreadGlobals) onInjectBackgroundThreadGlobals(target);
|
|
4
4
|
target.lynx.requireModuleAsync = async (url, callback)=>{
|
|
@@ -9,3 +9,4 @@ globalThis.onInjectBackgroundThreadGlobals = (target)=>{
|
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|