@lynx-js/react 0.121.0 → 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.
- package/CHANGELOG.md +34 -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/commit-context.d.ts +8 -0
- package/runtime/lib/core/commit-context.js +18 -0
- package/runtime/lib/core/commit-context.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/core/component.js +79 -0
- package/runtime/lib/core/component.js.map +1 -0
- package/runtime/lib/core/forceRootRender.d.ts +7 -0
- package/runtime/lib/core/forceRootRender.js +40 -0
- package/runtime/lib/core/forceRootRender.js.map +1 -0
- package/runtime/lib/core/globalProps.d.ts +31 -0
- package/runtime/lib/core/globalProps.js +55 -0
- package/runtime/lib/core/globalProps.js.map +1 -0
- package/runtime/lib/core/hooks/useLynxGlobalEventListener.js +1 -1
- package/runtime/lib/core/hooks/useLynxGlobalEventListener.js.map +1 -1
- package/runtime/lib/{snapshot/compat → core}/initData.d.ts +1 -1
- package/runtime/lib/{snapshot/compat → core}/initData.js +4 -5
- package/runtime/lib/core/initData.js.map +1 -0
- 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-data-processors.d.ts +2 -0
- package/runtime/lib/core/lynx-data-processors.js +53 -0
- package/runtime/lib/core/lynx-data-processors.js.map +1 -0
- package/runtime/lib/core/lynx-page-data.d.ts +1 -0
- package/runtime/lib/core/lynx-page-data.js +14 -0
- package/runtime/lib/core/lynx-page-data.js.map +1 -0
- package/runtime/lib/core/lynx-update-data.d.ts +11 -0
- package/runtime/lib/core/lynx-update-data.js +21 -0
- package/runtime/lib/core/lynx-update-data.js.map +1 -0
- 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/ref.d.ts +37 -0
- package/runtime/lib/core/ref.js +108 -0
- package/runtime/lib/core/ref.js.map +1 -0
- package/runtime/lib/core/reload-version.d.ts +2 -0
- package/runtime/lib/{snapshot/lifecycle/pass.js → core/reload-version.js} +4 -5
- package/runtime/lib/core/reload-version.js.map +1 -0
- package/runtime/lib/element-template/background/attr-slots.d.ts +6 -1
- package/runtime/lib/element-template/background/attr-slots.js +35 -2
- package/runtime/lib/element-template/background/attr-slots.js.map +1 -1
- package/runtime/lib/element-template/background/commit-context.d.ts +3 -3
- package/runtime/lib/element-template/background/commit-context.js +15 -18
- package/runtime/lib/element-template/background/commit-context.js.map +1 -1
- package/runtime/lib/element-template/background/commit-hook.d.ts +1 -1
- package/runtime/lib/element-template/background/commit-hook.js +68 -43
- package/runtime/lib/element-template/background/commit-hook.js.map +1 -1
- package/runtime/lib/element-template/background/destroy.js +9 -6
- package/runtime/lib/element-template/background/destroy.js.map +1 -1
- package/runtime/lib/element-template/background/document.js +5 -5
- 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 +247 -74
- package/runtime/lib/element-template/background/hydrate.js.map +1 -1
- package/runtime/lib/element-template/background/hydration-listener.js +49 -22
- package/runtime/lib/element-template/background/hydration-listener.js.map +1 -1
- package/runtime/lib/element-template/background/instance.d.ts +38 -9
- package/runtime/lib/element-template/background/instance.js +292 -113
- package/runtime/lib/element-template/background/instance.js.map +1 -1
- package/runtime/lib/element-template/client/root.d.ts +7 -0
- package/runtime/lib/element-template/client/root.js +3 -6
- package/runtime/lib/element-template/client/root.js.map +1 -1
- package/runtime/lib/element-template/debug/alog.d.ts +21 -0
- package/runtime/lib/element-template/debug/alog.js +33 -0
- package/runtime/lib/element-template/debug/alog.js.map +1 -1
- package/runtime/lib/element-template/debug/elementPAPICall.js +5 -0
- package/runtime/lib/element-template/debug/elementPAPICall.js.map +1 -1
- package/runtime/lib/element-template/hydration-map.d.ts +5 -0
- package/runtime/lib/element-template/hydration-map.js +12 -0
- package/runtime/lib/element-template/hydration-map.js.map +1 -0
- package/runtime/lib/element-template/index.d.ts +25 -3
- package/runtime/lib/element-template/index.js +38 -9
- package/runtime/lib/element-template/index.js.map +1 -1
- package/runtime/lib/element-template/internal.d.ts +5 -1
- package/runtime/lib/element-template/internal.js +6 -7
- package/runtime/lib/element-template/internal.js.map +1 -1
- package/runtime/lib/element-template/lynx/env.js +5 -48
- 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.d.ts +1 -1
- package/runtime/lib/element-template/native/index.js +28 -2
- package/runtime/lib/element-template/native/index.js.map +1 -1
- package/runtime/lib/element-template/native/main-thread-api.js +27 -5
- package/runtime/lib/element-template/native/main-thread-api.js.map +1 -1
- package/runtime/lib/element-template/native/mts-destroy.js +2 -0
- package/runtime/lib/element-template/native/mts-destroy.js.map +1 -1
- package/runtime/lib/element-template/native/patch-listener.js +6 -2
- 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-background.js +39 -0
- package/runtime/lib/element-template/native/reload-background.js.map +1 -0
- package/runtime/lib/element-template/native/reload-main-thread.d.ts +1 -0
- package/runtime/lib/element-template/native/reload-main-thread.js +35 -0
- package/runtime/lib/element-template/native/reload-main-thread.js.map +1 -0
- package/runtime/lib/element-template/prop-adapters/event.d.ts +1 -0
- package/runtime/lib/element-template/prop-adapters/event.js +4 -1
- package/runtime/lib/element-template/prop-adapters/event.js.map +1 -1
- package/runtime/lib/element-template/prop-adapters/ref.d.ts +26 -0
- package/runtime/lib/element-template/prop-adapters/ref.js +107 -0
- package/runtime/lib/element-template/prop-adapters/ref.js.map +1 -0
- package/runtime/lib/element-template/prop-adapters/spread.js +8 -1
- package/runtime/lib/element-template/prop-adapters/spread.js.map +1 -1
- package/runtime/lib/element-template/protocol/opcodes.d.ts +4 -0
- package/runtime/lib/element-template/protocol/opcodes.js +4 -0
- package/runtime/lib/element-template/protocol/opcodes.js.map +1 -1
- package/runtime/lib/element-template/protocol/template-type.d.ts +6 -0
- package/runtime/lib/element-template/protocol/template-type.js +20 -0
- package/runtime/lib/element-template/protocol/template-type.js.map +1 -0
- package/runtime/lib/element-template/protocol/types.d.ts +74 -6
- 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/page/page.d.ts +5 -2
- package/runtime/lib/element-template/runtime/page/page.js +12 -0
- package/runtime/lib/element-template/runtime/page/page.js.map +1 -1
- package/runtime/lib/element-template/runtime/patch.js +210 -38
- package/runtime/lib/element-template/runtime/patch.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-main-thread.d.ts +3 -1
- package/runtime/lib/element-template/runtime/render/render-main-thread.js +38 -7
- package/runtime/lib/element-template/runtime/render/render-main-thread.js.map +1 -1
- package/runtime/lib/element-template/runtime/render/render-opcodes.js +80 -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 +41 -4
- 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 +1 -0
- package/runtime/lib/element-template/runtime/template/attr-slot-plan.js +4 -0
- 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 +5 -1
- package/runtime/lib/element-template/runtime/template/handle.js.map +1 -1
- package/runtime/lib/element-template/runtime/template/registry.d.ts +2 -0
- package/runtime/lib/element-template/runtime/template/registry.js +6 -1
- 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 +1 -1
- package/runtime/lib/index.js +3 -1
- 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 +3 -8
- package/runtime/lib/lynx-api.js +8 -45
- 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/debug/vnodeSource.js +1 -1
- package/runtime/lib/snapshot/debug/vnodeSource.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/commit.d.ts +0 -1
- package/runtime/lib/snapshot/lifecycle/patch/commit.js +4 -9
- package/runtime/lib/snapshot/lifecycle/patch/commit.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/patch/updateMainThread.js +2 -2
- package/runtime/lib/snapshot/lifecycle/patch/updateMainThread.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/ref/delay.d.ts +6 -13
- package/runtime/lib/snapshot/lifecycle/ref/delay.js +9 -30
- package/runtime/lib/snapshot/lifecycle/ref/delay.js.map +1 -1
- package/runtime/lib/snapshot/lifecycle/reload.js +2 -2
- package/runtime/lib/snapshot/lifecycle/reload.js.map +1 -1
- package/runtime/lib/snapshot/list/list.js +1 -1
- package/runtime/lib/snapshot/list/list.js.map +1 -1
- package/runtime/lib/snapshot/list/listUpdateInfo.js +3 -2
- package/runtime/lib/snapshot/list/listUpdateInfo.js.map +1 -1
- package/runtime/lib/snapshot/lynx/calledByNative.js +3 -9
- package/runtime/lib/snapshot/lynx/calledByNative.js.map +1 -1
- package/runtime/lib/snapshot/lynx/env.js +5 -51
- package/runtime/lib/snapshot/lynx/env.js.map +1 -1
- 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/runWithForce.js +9 -39
- package/runtime/lib/snapshot/lynx/runWithForce.js.map +1 -1
- package/runtime/lib/snapshot/lynx/tt.js +10 -30
- package/runtime/lib/snapshot/lynx/tt.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js +4 -4
- package/runtime/lib/snapshot/snapshot/backgroundSnapshot.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/list.js +1 -1
- package/runtime/lib/snapshot/snapshot/list.js.map +1 -1
- package/runtime/lib/snapshot/snapshot/ref.d.ts +3 -5
- package/runtime/lib/snapshot/snapshot/ref.js +16 -59
- package/runtime/lib/snapshot/snapshot/ref.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/snapshot/snapshotInstanceHydrationMap.js +1 -1
- package/runtime/lib/snapshot/snapshot/snapshotInstanceHydrationMap.js.map +1 -1
- package/runtime/lib/tsconfig.tsbuildinfo +1 -1
- package/runtime/lib/worklet-runtime/workletRuntime.js +1 -1
- package/runtime/lib/worklet-runtime/workletRuntime.js.map +1 -1
- package/runtime/worklet-runtime/dev.js +2 -3
- 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/index.js +2 -8
- package/testing-library/dist/env/vitest.js +1 -1
- package/testing-library/dist/plugins/index.js +13 -2
- 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/runtime/lib/element-template/hooks/react.d.ts +0 -14
- package/runtime/lib/element-template/hooks/react.js +0 -24
- package/runtime/lib/element-template/hooks/react.js.map +0 -1
- package/runtime/lib/element-template/runtime/components/slot.js +0 -11
- package/runtime/lib/element-template/runtime/components/slot.js.map +0 -1
- package/runtime/lib/snapshot/compat/initData.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/lifecycle/pass.d.ts +0 -3
- package/runtime/lib/snapshot/lifecycle/pass.js.map +0 -1
- package/runtime/lib/snapshot/lynx/component.js +0 -73
- 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/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/element-template/{runtime/components/slot.d.ts → runtime-backend-marker.d.ts} +0 -0
- /package/runtime/lib/{snapshot/lynx/component.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 { };
|