@limrun/ui 0.7.0 → 0.8.1
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/dist/components/inspect-overlay.d.ts +33 -0
- package/dist/components/remote-control.d.ts +88 -0
- package/dist/core/ax-fetcher.d.ts +49 -0
- package/dist/core/ax-tree.d.ts +99 -0
- package/dist/demo.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1501 -771
- package/index.html +199 -0
- package/package.json +47 -43
- package/src/components/inspect-overlay.css +223 -0
- package/src/components/inspect-overlay.tsx +437 -0
- package/src/components/remote-control.css +1 -1
- package/src/components/remote-control.tsx +768 -118
- package/src/core/ax-fetcher.test.ts +418 -0
- package/src/core/ax-fetcher.ts +377 -0
- package/src/core/ax-tree.test.ts +491 -0
- package/src/core/ax-tree.ts +416 -0
- package/src/demo.tsx +268 -0
- package/src/index.ts +17 -0
- package/tsconfig.json +25 -25
- package/tsconfig.node.json +25 -25
- package/vitest.config.ts +23 -0
package/src/index.ts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
export { RemoteControl } from './components/remote-control';
|
|
2
2
|
export type { RemoteControlHandle } from './components/remote-control';
|
|
3
|
+
|
|
4
|
+
// Accessibility / inspect-mode types and helpers. Exported so customers can
|
|
5
|
+
// build their own side panels, search UIs, or agent-driven inspectors on top
|
|
6
|
+
// of the snapshots delivered via `onAxSnapshotChange`.
|
|
7
|
+
export type { AxSnapshot, AxElement, AxRect, AxSelectors, AxPlatform } from './core/ax-tree';
|
|
8
|
+
export type { AxStatus } from './core/ax-fetcher';
|
|
9
|
+
export {
|
|
10
|
+
axElementAtPoint,
|
|
11
|
+
axElementSelectorExpression,
|
|
12
|
+
axElementSummary,
|
|
13
|
+
axElementsEqual,
|
|
14
|
+
axSnapshotsEqual,
|
|
15
|
+
clampAxFrameForScreen,
|
|
16
|
+
normalizeAndroidTree,
|
|
17
|
+
normalizeIosTree,
|
|
18
|
+
AX_UNAVAILABLE_ERROR,
|
|
19
|
+
} from './core/ax-tree';
|
package/tsconfig.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"allowImportingTsExtensions": false,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"noEmit": false,
|
|
13
|
+
"emitDeclarationOnly": true,
|
|
14
|
+
"declaration": true,
|
|
15
|
+
"declarationDir": "dist",
|
|
16
|
+
"jsx": "react-jsx",
|
|
17
|
+
"strict": true,
|
|
18
|
+
"noUnusedLocals": true,
|
|
19
|
+
"noUnusedParameters": true,
|
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
|
21
|
+
"outDir": "dist"
|
|
22
|
+
},
|
|
23
|
+
"include": ["src"],
|
|
24
|
+
"exclude": ["**/*.test.ts", "**/*.test.tsx", "node_modules", "dist"],
|
|
25
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
26
|
+
}
|
package/tsconfig.node.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"composite": true,
|
|
4
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
5
|
+
"target": "ES2022",
|
|
6
|
+
"lib": ["ES2023"],
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
|
|
10
|
+
/* Bundler mode */
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"allowImportingTsExtensions": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"moduleDetection": "force",
|
|
15
|
+
"noEmit": false,
|
|
16
|
+
"emitDeclarationOnly": true,
|
|
17
|
+
|
|
18
|
+
/* Linting */
|
|
19
|
+
"strict": true,
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true,
|
|
23
|
+
"noUncheckedSideEffectImports": true
|
|
24
|
+
},
|
|
25
|
+
"include": ["vite.config.ts"]
|
|
26
|
+
}
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config';
|
|
2
|
+
|
|
3
|
+
// Vitest config for @limrun/ui unit tests.
|
|
4
|
+
//
|
|
5
|
+
// We use jsdom as the default environment because the runtime code uses
|
|
6
|
+
// browser globals (window.setTimeout, window.requestAnimationFrame, etc.).
|
|
7
|
+
// Pure modules can opt back into the node env per-file via:
|
|
8
|
+
//
|
|
9
|
+
// // @vitest-environment node
|
|
10
|
+
//
|
|
11
|
+
// at the top of the test file.
|
|
12
|
+
//
|
|
13
|
+
// The actual <RemoteControl> component is intentionally NOT under unit
|
|
14
|
+
// test here — its WebRTC plumbing is integration-tested via the demo +
|
|
15
|
+
// staging instance. These tests cover the smaller, pure-logic modules:
|
|
16
|
+
// `core/ax-tree.ts` and `core/ax-fetcher.ts`.
|
|
17
|
+
export default defineConfig({
|
|
18
|
+
test: {
|
|
19
|
+
environment: 'jsdom',
|
|
20
|
+
include: ['src/**/*.test.ts', 'src/**/*.test.tsx'],
|
|
21
|
+
globals: false,
|
|
22
|
+
},
|
|
23
|
+
});
|