@ddwang/magnitude-core 0.3.1-ddwang.2 → 0.3.1-ddwang.21
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/cli.cjs +2 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.mjs +1 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index.cjs +2704 -1522
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +188 -50
- package/dist/index.d.ts +1147 -23
- package/dist/index.mjs +2527 -1362
- package/dist/index.mjs.map +1 -0
- package/node_modules/patchright-core/README.md +3 -0
- package/node_modules/patchright-core/ThirdPartyNotices.txt +13 -0
- package/node_modules/patchright-core/bin/install_media_pack.ps1 +5 -0
- package/node_modules/patchright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/node_modules/patchright-core/browsers.json +52 -0
- package/node_modules/patchright-core/cli.js +22 -0
- package/node_modules/patchright-core/index.d.ts +17 -0
- package/node_modules/patchright-core/index.js +17 -0
- package/node_modules/patchright-core/index.mjs +28 -0
- package/node_modules/patchright-core/lib/bootstrap.js +149 -0
- package/node_modules/patchright-core/lib/coreBundle.js +80653 -0
- package/node_modules/patchright-core/lib/entry/cliDaemon.js +5 -0
- package/node_modules/patchright-core/lib/entry/dashboardApp.js +3 -0
- package/node_modules/patchright-core/lib/entry/mcp.js +10 -0
- package/node_modules/patchright-core/lib/entry/oopBrowserDownload.js +3 -0
- package/node_modules/patchright-core/lib/package.js +50 -0
- package/node_modules/patchright-core/lib/server/chromium/appIcon.png +0 -0
- package/node_modules/patchright-core/lib/server/electron/loader.js +112 -0
- package/node_modules/patchright-core/lib/serverRegistry.js +1939 -0
- package/node_modules/patchright-core/lib/serverRegistry.js.LICENSE +65 -0
- package/node_modules/patchright-core/lib/tools/cli-client/channelSessions.js +141 -0
- package/node_modules/patchright-core/lib/tools/cli-client/cli.js +7 -0
- package/node_modules/patchright-core/lib/tools/cli-client/help.json +808 -0
- package/node_modules/patchright-core/lib/tools/cli-client/minimist.js +128 -0
- package/node_modules/patchright-core/lib/tools/cli-client/output.js +352 -0
- package/node_modules/patchright-core/lib/tools/cli-client/program.js +422 -0
- package/node_modules/patchright-core/lib/tools/cli-client/registry.js +180 -0
- package/node_modules/patchright-core/lib/tools/cli-client/session.js +261 -0
- package/node_modules/patchright-core/lib/tools/dashboard/appIcon.png +0 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/SKILL.md +493 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/running-code.md +245 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/session-management.md +227 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/video-recording.md +216 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-trace/SKILL.md +174 -0
- package/node_modules/patchright-core/lib/tools/utils/extension.js +112 -0
- package/node_modules/patchright-core/lib/tools/utils/socketConnection.js +108 -0
- package/node_modules/patchright-core/lib/utilsBundle.js +86225 -0
- package/node_modules/patchright-core/lib/utilsBundle.js.LICENSE +1890 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/index.html +29 -0
- package/node_modules/patchright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/node_modules/patchright-core/lib/vite/htmlReport/index.html +16 -0
- package/node_modules/patchright-core/lib/vite/htmlReport/report.css +2 -0
- package/node_modules/patchright-core/lib/vite/htmlReport/report.js +32 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/codeMirrorModule-GBnsXk4c.js +32 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/index-CVDOfo-j.js +129 -0
- package/node_modules/patchright-core/lib/vite/recorder/index.html +29 -0
- package/node_modules/patchright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/codeMirrorModule-G79327TW.js +32 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/defaultSettingsView-D9EV0iaS.js +184 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/xtermModule-Al_u-Nk5.js +7 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/index.CMB2-c8e.js +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/index.html +44 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/snapshot.html +10 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.C3yLoy2G.js +5 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.html +18 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/node_modules/patchright-core/lib/webp_codec.LICENSE +173 -0
- package/node_modules/patchright-core/lib/webp_codec.wasm +0 -0
- package/node_modules/patchright-core/lib/xdg-open +1267 -0
- package/node_modules/patchright-core/package.json +34 -0
- package/node_modules/patchright-core/types/protocol.d.ts +24776 -0
- package/node_modules/patchright-core/types/structs.d.ts +52 -0
- package/node_modules/patchright-core/types/types.d.ts +27167 -0
- package/node_modules/playwright/.bun-tag-91d746a6045e143f +0 -0
- package/node_modules/playwright/README.md +300 -0
- package/node_modules/playwright/ThirdPartyNotices.txt +14 -0
- package/node_modules/playwright/cli.js +19 -0
- package/node_modules/playwright/index.d.ts +17 -0
- package/node_modules/playwright/index.js +17 -0
- package/node_modules/playwright/index.mjs +18 -0
- package/node_modules/playwright/lib/agents/agentParser.js +89 -0
- package/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
- package/node_modules/playwright/lib/agents/generateAgents.js +395 -0
- package/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
- package/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
- package/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
- package/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
- package/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +56 -0
- package/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
- package/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +74 -0
- package/node_modules/playwright/lib/cli/reportActions.js +78 -0
- package/node_modules/playwright/lib/cli/testActions.js +217 -0
- package/node_modules/playwright/lib/common/index.js +2937 -0
- package/node_modules/playwright/lib/common/index.js.txt +33 -0
- package/node_modules/playwright/lib/errorContext.js +129 -0
- package/node_modules/playwright/lib/globals.js +58 -0
- package/node_modules/playwright/lib/index.js +827 -0
- package/node_modules/playwright/lib/isomorphic.js +260 -0
- package/node_modules/playwright/lib/isomorphic.js.txt +9 -0
- package/node_modules/playwright/lib/loader/loaderProcessEntry.js +34 -0
- package/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +9 -0
- package/node_modules/playwright/lib/matchers/expect.js +13496 -0
- package/node_modules/playwright/lib/matchers/expect.js.LICENSE +640 -0
- package/node_modules/playwright/lib/matchers/expect.js.txt +67 -0
- package/node_modules/playwright/lib/mcp/test/browserBackend.js +135 -0
- package/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
- package/node_modules/playwright/lib/mcp/test/plannerTools.js +150 -0
- package/node_modules/playwright/lib/mcp/test/seed.js +82 -0
- package/node_modules/playwright/lib/mcp/test/streams.js +44 -0
- package/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
- package/node_modules/playwright/lib/mcp/test/testContext.js +306 -0
- package/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
- package/node_modules/playwright/lib/mcp/test/testTools.js +98 -0
- package/node_modules/playwright/lib/package.js +47 -0
- package/node_modules/playwright/lib/program.js +242 -0
- package/node_modules/playwright/lib/runner/index.js +8721 -0
- package/node_modules/playwright/lib/runner/index.js.txt +62 -0
- package/node_modules/playwright/lib/transform/babelBundle.js +72490 -0
- package/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
- package/node_modules/playwright/lib/transform/babelBundle.js.txt +328 -0
- package/node_modules/playwright/lib/transform/esmLoader.js +8213 -0
- package/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +355 -0
- package/node_modules/playwright/lib/transform/esmLoader.js.txt +60 -0
- package/node_modules/playwright/lib/util.js +373 -0
- package/node_modules/playwright/lib/worker/workerProcessEntry.js +1860 -0
- package/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
- package/node_modules/playwright/package.json +50 -0
- package/node_modules/playwright/test.d.ts +18 -0
- package/node_modules/playwright/test.js +24 -0
- package/node_modules/playwright/test.mjs +35 -0
- package/node_modules/playwright/types/test.d.ts +11191 -0
- package/node_modules/playwright/types/testReporter.d.ts +950 -0
- package/package.json +21 -12
- package/dist/actions/desktopActions.d.ts +0 -58
- package/dist/actions/desktopActions.js +0 -155
- package/dist/actions/index.d.ts +0 -27
- package/dist/actions/index.js +0 -11
- package/dist/actions/memoryActions.d.ts +0 -9
- package/dist/actions/memoryActions.js +0 -34
- package/dist/actions/taskActions.d.ts +0 -8
- package/dist/actions/taskActions.js +0 -27
- package/dist/actions/types.d.ts +0 -35
- package/dist/actions/types.js +0 -5
- package/dist/actions/util.d.ts +0 -21
- package/dist/actions/util.js +0 -280
- package/dist/actions/webActions.d.ts +0 -87
- package/dist/actions/webActions.js +0 -214
- package/dist/actions/webActions.test.d.ts +0 -1
- package/dist/actions/webActions.test.js +0 -43
- package/dist/agent/browserAgent.d.ts +0 -31
- package/dist/agent/browserAgent.js +0 -136
- package/dist/agent/errors.d.ts +0 -22
- package/dist/agent/errors.js +0 -97
- package/dist/agent/index.d.ts +0 -64
- package/dist/agent/index.js +0 -505
- package/dist/agent/narrator.d.ts +0 -4
- package/dist/agent/narrator.js +0 -63
- package/dist/agent/pause.test.d.ts +0 -1
- package/dist/agent/pause.test.js +0 -194
- package/dist/ai/baml_client/async_client.d.ts +0 -64
- package/dist/ai/baml_client/async_client.js +0 -284
- package/dist/ai/baml_client/async_request.d.ts +0 -39
- package/dist/ai/baml_client/async_request.js +0 -134
- package/dist/ai/baml_client/config.d.ts +0 -11
- package/dist/ai/baml_client/config.js +0 -20
- package/dist/ai/baml_client/globals.d.ts +0 -16
- package/dist/ai/baml_client/globals.js +0 -37
- package/dist/ai/baml_client/index.d.ts +0 -17
- package/dist/ai/baml_client/index.js +0 -42
- package/dist/ai/baml_client/inlinedbaml.d.ts +0 -19
- package/dist/ai/baml_client/inlinedbaml.js +0 -31
- package/dist/ai/baml_client/parser.d.ts +0 -53
- package/dist/ai/baml_client/parser.js +0 -86
- package/dist/ai/baml_client/partial_types.d.ts +0 -61
- package/dist/ai/baml_client/partial_types.js +0 -10
- package/dist/ai/baml_client/sync_client.d.ts +0 -57
- package/dist/ai/baml_client/sync_client.js +0 -142
- package/dist/ai/baml_client/sync_request.d.ts +0 -37
- package/dist/ai/baml_client/sync_request.js +0 -134
- package/dist/ai/baml_client/tracing.d.ts +0 -16
- package/dist/ai/baml_client/tracing.js +0 -18
- package/dist/ai/baml_client/type_builder.d.ts +0 -40
- package/dist/ai/baml_client/type_builder.js +0 -120
- package/dist/ai/baml_client/types.d.ts +0 -69
- package/dist/ai/baml_client/types.js +0 -15
- package/dist/ai/baml_client/watchers.d.ts +0 -32
- package/dist/ai/baml_client/watchers.js +0 -50
- package/dist/ai/baseten.d.ts +0 -4
- package/dist/ai/baseten.js +0 -10
- package/dist/ai/claudeCode.d.ts +0 -1
- package/dist/ai/claudeCode.js +0 -186
- package/dist/ai/modelHarness.d.ts +0 -39
- package/dist/ai/modelHarness.js +0 -324
- package/dist/ai/modelResponseError.d.ts +0 -4
- package/dist/ai/modelResponseError.js +0 -8
- package/dist/ai/multiModelHarness.d.ts +0 -24
- package/dist/ai/multiModelHarness.js +0 -52
- package/dist/ai/plannerResponse.d.ts +0 -34
- package/dist/ai/plannerResponse.js +0 -96
- package/dist/ai/plannerResponse.test.d.ts +0 -1
- package/dist/ai/plannerResponse.test.js +0 -112
- package/dist/ai/structuredOutput.d.ts +0 -11
- package/dist/ai/structuredOutput.js +0 -94
- package/dist/ai/structuredOutput.test.d.ts +0 -1
- package/dist/ai/structuredOutput.test.js +0 -91
- package/dist/ai/types.d.ts +0 -119
- package/dist/ai/types.js +0 -5
- package/dist/ai/util.d.ts +0 -13
- package/dist/ai/util.js +0 -200
- package/dist/ai/util.test.d.ts +0 -1
- package/dist/ai/util.test.js +0 -95
- package/dist/cli.js +0 -3
- package/dist/common/actions.js +0 -14
- package/dist/common/events.d.ts +0 -17
- package/dist/common/events.js +0 -3
- package/dist/common/failure.d.ts +0 -68
- package/dist/common/failure.js +0 -1
- package/dist/common/index.d.ts +0 -3
- package/dist/common/index.js +0 -3
- package/dist/common/operation.d.ts +0 -31
- package/dist/common/operation.js +0 -102
- package/dist/common/operation.test.d.ts +0 -1
- package/dist/common/operation.test.js +0 -53
- package/dist/common/retry.d.ts +0 -16
- package/dist/common/retry.js +0 -35
- package/dist/common/util.d.ts +0 -23
- package/dist/common/util.js +0 -139
- package/dist/connectors/browserConnector.d.ts +0 -53
- package/dist/connectors/browserConnector.js +0 -290
- package/dist/connectors/desktopConnector.d.ts +0 -58
- package/dist/connectors/desktopConnector.js +0 -68
- package/dist/connectors/index.d.ts +0 -14
- package/dist/connectors/index.js +0 -2
- package/dist/index.js +0 -28
- package/dist/logger.d.ts +0 -3
- package/dist/logger.js +0 -15
- package/dist/memory/agentMemory.d.ts +0 -47
- package/dist/memory/agentMemory.js +0 -167
- package/dist/memory/agentMemory.test.d.ts +0 -1
- package/dist/memory/agentMemory.test.js +0 -150
- package/dist/memory/image.d.ts +0 -28
- package/dist/memory/image.js +0 -95
- package/dist/memory/image.test.d.ts +0 -1
- package/dist/memory/image.test.js +0 -46
- package/dist/memory/index.d.ts +0 -3
- package/dist/memory/index.js +0 -3
- package/dist/memory/masking.d.ts +0 -7
- package/dist/memory/masking.js +0 -141
- package/dist/memory/masking.test.d.ts +0 -1
- package/dist/memory/masking.test.js +0 -117
- package/dist/memory/notebook.d.ts +0 -58
- package/dist/memory/notebook.js +0 -75
- package/dist/memory/notebook.test.d.ts +0 -1
- package/dist/memory/notebook.test.js +0 -99
- package/dist/memory/observation.d.ts +0 -38
- package/dist/memory/observation.js +0 -79
- package/dist/memory/rendering/index.d.ts +0 -10
- package/dist/memory/rendering/index.js +0 -13
- package/dist/memory/rendering/renderJsonParts.d.ts +0 -3
- package/dist/memory/rendering/renderJsonParts.js +0 -115
- package/dist/memory/rendering/renderJsonParts.test.d.ts +0 -1
- package/dist/memory/rendering/renderJsonParts.test.js +0 -217
- package/dist/memory/rendering/renderXmlParts.d.ts +0 -7
- package/dist/memory/rendering/renderXmlParts.js +0 -127
- package/dist/memory/serde.d.ts +0 -20
- package/dist/memory/serde.js +0 -67
- package/dist/memory/serde.test.d.ts +0 -1
- package/dist/memory/serde.test.js +0 -64
- package/dist/memory/util.d.ts +0 -2
- package/dist/memory/util.js +0 -17
- package/dist/telemetry/events.d.ts +0 -9
- package/dist/telemetry/events.js +0 -80
- package/dist/telemetry/index.d.ts +0 -6
- package/dist/telemetry/index.js +0 -91
- package/dist/types.d.ts +0 -30
- package/dist/types.js +0 -1
- package/dist/util.d.ts +0 -1
- package/dist/util.js +0 -12
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -3
- package/dist/web/browserProvider.d.ts +0 -24
- package/dist/web/browserProvider.js +0 -164
- package/dist/web/browserProvider.test.d.ts +0 -1
- package/dist/web/browserProvider.test.js +0 -44
- package/dist/web/harness.d.ts +0 -109
- package/dist/web/harness.js +0 -401
- package/dist/web/recovery.d.ts +0 -46
- package/dist/web/recovery.js +0 -137
- package/dist/web/recovery.test.d.ts +0 -1
- package/dist/web/recovery.test.js +0 -182
- package/dist/web/stability.d.ts +0 -57
- package/dist/web/stability.js +0 -323
- package/dist/web/tabs.d.ts +0 -58
- package/dist/web/tabs.js +0 -293
- package/dist/web/transformer.d.ts +0 -7
- package/dist/web/transformer.js +0 -41
- package/dist/web/types.d.ts +0 -37
- package/dist/web/types.js +0 -2
- package/dist/web/util.d.ts +0 -3
- package/dist/web/util.js +0 -81
- package/dist/web/visualizer/cursor.d.ts +0 -16
- package/dist/web/visualizer/cursor.js +0 -153
- package/dist/web/visualizer/index.d.ts +0 -22
- package/dist/web/visualizer/index.js +0 -47
- package/dist/web/visualizer/mouseEffects.d.ts +0 -18
- package/dist/web/visualizer/mouseEffects.js +0 -287
- package/dist/web/visualizer/typeEffects.d.ts +0 -10
- package/dist/web/visualizer/typeEffects.js +0 -190
- package/dist/web/zodReexport.test.d.ts +0 -1
- package/dist/web/zodReexport.test.js +0 -14
- /package/{dist/common/actions.d.ts → node_modules/patchright-core/.bun-tag-19f23bd68c84ec1f} +0 -0
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { CursorVisual } from "./cursor";
|
|
2
|
-
import { MouseEffectVisual } from "./mouseEffects";
|
|
3
|
-
import { TypeEffectVisual } from "./typeEffects";
|
|
4
|
-
export class ActionVisualizer {
|
|
5
|
-
options;
|
|
6
|
-
context;
|
|
7
|
-
page;
|
|
8
|
-
cursor;
|
|
9
|
-
mouseEffects;
|
|
10
|
-
typeEffects;
|
|
11
|
-
constructor(context, options) {
|
|
12
|
-
this.context = context;
|
|
13
|
-
this.options = {
|
|
14
|
-
showCursor: options.showCursor ?? true,
|
|
15
|
-
showHoverCircle: options.showHoverCircle ?? false,
|
|
16
|
-
showClickRipple: options.showClickRipple ?? true,
|
|
17
|
-
showDragLine: options.showDragLine ?? false,
|
|
18
|
-
showTypeEffects: options.showTypeEffects ?? true
|
|
19
|
-
};
|
|
20
|
-
this.cursor = new CursorVisual();
|
|
21
|
-
this.mouseEffects = new MouseEffectVisual(this.options);
|
|
22
|
-
this.typeEffects = new TypeEffectVisual();
|
|
23
|
-
}
|
|
24
|
-
async setup() {
|
|
25
|
-
// await this.mouseEffects.setContext(this.context);
|
|
26
|
-
// if (this.options.showTypeEffects) {
|
|
27
|
-
// await this.typeEffects.setContext(this.context);
|
|
28
|
-
// }
|
|
29
|
-
//this.showAll();
|
|
30
|
-
}
|
|
31
|
-
async setActivePage(page) {
|
|
32
|
-
this.page = page;
|
|
33
|
-
await this.cursor.setActivePage(page);
|
|
34
|
-
await this.mouseEffects.setActivePage(page);
|
|
35
|
-
await this.typeEffects.setActivePage(page);
|
|
36
|
-
}
|
|
37
|
-
async moveVirtualCursor(x, y) {
|
|
38
|
-
// Takes like 300ms for smooth anim
|
|
39
|
-
await this.cursor.move(x, y);
|
|
40
|
-
}
|
|
41
|
-
async hideAll() {
|
|
42
|
-
await this.cursor.hide();
|
|
43
|
-
}
|
|
44
|
-
async showAll() {
|
|
45
|
-
await this.cursor.show();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Page } from "playwright";
|
|
2
|
-
interface MouseEffectOptions {
|
|
3
|
-
baseOpacity?: number;
|
|
4
|
-
showHoverCircle?: boolean;
|
|
5
|
-
showClickRipple?: boolean;
|
|
6
|
-
showDragLine?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare class MouseEffectVisual {
|
|
9
|
-
private baseOpacity;
|
|
10
|
-
private showHoverCircle;
|
|
11
|
-
private showClickRipple;
|
|
12
|
-
private showDragLine;
|
|
13
|
-
private page;
|
|
14
|
-
constructor(options?: MouseEffectOptions);
|
|
15
|
-
setActivePage(page: Page): Promise<void>;
|
|
16
|
-
setupOnPage(): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
import { retryOnErrorIsSuccess } from "@/common";
|
|
2
|
-
export class MouseEffectVisual {
|
|
3
|
-
baseOpacity;
|
|
4
|
-
showHoverCircle;
|
|
5
|
-
showClickRipple;
|
|
6
|
-
showDragLine;
|
|
7
|
-
page;
|
|
8
|
-
constructor(options = {}) {
|
|
9
|
-
this.baseOpacity = options.baseOpacity ?? 0.5;
|
|
10
|
-
this.showHoverCircle = options.showHoverCircle ?? true;
|
|
11
|
-
this.showClickRipple = options.showClickRipple ?? true;
|
|
12
|
-
this.showDragLine = options.showDragLine ?? true;
|
|
13
|
-
}
|
|
14
|
-
async setActivePage(page) {
|
|
15
|
-
this.page = page;
|
|
16
|
-
page.on('load', async () => {
|
|
17
|
-
// Clear the initialized flag on navigation to ensure re-initialization
|
|
18
|
-
await page.evaluate(() => {
|
|
19
|
-
window.__mouseEffectsInitialized = false;
|
|
20
|
-
}).catch(() => { }); // Ignore errors
|
|
21
|
-
await retryOnErrorIsSuccess(this.setupOnPage.bind(this), { mode: 'retry_all', delayMs: 200, retryLimit: 10 });
|
|
22
|
-
});
|
|
23
|
-
await retryOnErrorIsSuccess(this.setupOnPage.bind(this), { mode: 'retry_all', delayMs: 200, retryLimit: 10 });
|
|
24
|
-
}
|
|
25
|
-
async setupOnPage() {
|
|
26
|
-
await this.page.evaluate((options) => {
|
|
27
|
-
if (window.__mouseEffectsInitialized) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
window.__mouseEffectsInitialized = true;
|
|
31
|
-
// Create custom cursor element only if enabled
|
|
32
|
-
let cursor = null;
|
|
33
|
-
if (options.showHoverCircle) {
|
|
34
|
-
cursor = document.createElement('div');
|
|
35
|
-
cursor.id = 'custom-cursor';
|
|
36
|
-
cursor.style.cssText = `
|
|
37
|
-
position: fixed;
|
|
38
|
-
width: 20px;
|
|
39
|
-
height: 20px;
|
|
40
|
-
border: 2px solid rgba(0, 150, 255, ${options.opacity});
|
|
41
|
-
border-radius: 50%;
|
|
42
|
-
background: rgba(0, 150, 255, ${options.opacity * 0.5});
|
|
43
|
-
pointer-events: none;
|
|
44
|
-
z-index: 1000000050;
|
|
45
|
-
transition: transform 0.1s ease-out;
|
|
46
|
-
`;
|
|
47
|
-
document.body.appendChild(cursor);
|
|
48
|
-
}
|
|
49
|
-
// Create drag line element only if enabled
|
|
50
|
-
let dragLine = null;
|
|
51
|
-
let line = null;
|
|
52
|
-
if (options.showDragLine) {
|
|
53
|
-
dragLine = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
54
|
-
dragLine.id = 'drag-line';
|
|
55
|
-
dragLine.style.cssText = `
|
|
56
|
-
position: fixed;
|
|
57
|
-
top: 0;
|
|
58
|
-
left: 0;
|
|
59
|
-
width: 100vw;
|
|
60
|
-
height: 100vh;
|
|
61
|
-
pointer-events: none;
|
|
62
|
-
z-index: 1000000030;
|
|
63
|
-
overflow: visible;
|
|
64
|
-
`;
|
|
65
|
-
line = document.createElementNS('http://www.w3.org/2000/svg', 'line');
|
|
66
|
-
line.setAttribute('stroke', '#0096ff');
|
|
67
|
-
line.setAttribute('stroke-width', '2');
|
|
68
|
-
line.setAttribute('stroke-dasharray', '5,5');
|
|
69
|
-
line.setAttribute('opacity', '0.8');
|
|
70
|
-
line.style.display = 'none';
|
|
71
|
-
dragLine.appendChild(line);
|
|
72
|
-
document.body.appendChild(dragLine);
|
|
73
|
-
}
|
|
74
|
-
let isMouseDown = false;
|
|
75
|
-
let dragStartX = 0;
|
|
76
|
-
let dragStartY = 0;
|
|
77
|
-
const activeRipples = new Set();
|
|
78
|
-
// Track mouse movement
|
|
79
|
-
document.addEventListener('mousemove', (e) => {
|
|
80
|
-
// Update cursor position - always center on mouse
|
|
81
|
-
if (cursor) {
|
|
82
|
-
cursor.style.left = e.clientX - 10 + 'px';
|
|
83
|
-
cursor.style.top = e.clientY - 10 + 'px';
|
|
84
|
-
}
|
|
85
|
-
// Update drag line if dragging
|
|
86
|
-
if (isMouseDown && line) {
|
|
87
|
-
line.setAttribute('x1', dragStartX.toString());
|
|
88
|
-
line.setAttribute('y1', dragStartY.toString());
|
|
89
|
-
line.setAttribute('x2', e.clientX.toString());
|
|
90
|
-
line.setAttribute('y2', e.clientY.toString());
|
|
91
|
-
line.style.display = 'block';
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
// Mouse down - start drag and shrink cursor
|
|
95
|
-
document.addEventListener('mousedown', (e) => {
|
|
96
|
-
isMouseDown = true;
|
|
97
|
-
dragStartX = e.clientX;
|
|
98
|
-
dragStartY = e.clientY;
|
|
99
|
-
// Use transform scale instead of changing width/height
|
|
100
|
-
if (cursor) {
|
|
101
|
-
cursor.style.transform = 'scale(0.5)';
|
|
102
|
-
cursor.style.background = `rgba(0, 150, 255, ${options.opacity * 1.5})`;
|
|
103
|
-
cursor.style.border = `2px solid rgba(0, 150, 255, ${options.opacity * 2})`;
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
// Mouse up - end drag and restore cursor
|
|
107
|
-
document.addEventListener('mouseup', (e) => {
|
|
108
|
-
isMouseDown = false;
|
|
109
|
-
// Hide drag line
|
|
110
|
-
if (line) {
|
|
111
|
-
line.style.display = 'none';
|
|
112
|
-
}
|
|
113
|
-
// Restore cursor
|
|
114
|
-
if (cursor) {
|
|
115
|
-
cursor.style.transform = 'scale(1)';
|
|
116
|
-
cursor.style.background = `rgba(0, 150, 255, ${options.opacity * 0.5})`;
|
|
117
|
-
cursor.style.border = `2px solid rgba(0, 150, 255, ${options.opacity})`;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
// Visualize clicks
|
|
121
|
-
document.addEventListener('click', (e) => {
|
|
122
|
-
if (options.showClickRipple) {
|
|
123
|
-
// Add ripple animation styles once
|
|
124
|
-
if (!document.querySelector('style[data-cursor-effects]')) {
|
|
125
|
-
const style = document.createElement('style');
|
|
126
|
-
style.setAttribute('data-cursor-effects', 'true');
|
|
127
|
-
style.textContent = `
|
|
128
|
-
@keyframes ripple {
|
|
129
|
-
0% {
|
|
130
|
-
transform: scale(0);
|
|
131
|
-
opacity: 1;
|
|
132
|
-
}
|
|
133
|
-
100% {
|
|
134
|
-
transform: scale(2);
|
|
135
|
-
opacity: 0;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
.click-ripple {
|
|
139
|
-
position: fixed;
|
|
140
|
-
width: 60px;
|
|
141
|
-
height: 60px;
|
|
142
|
-
border: 3px solid #0096ff;
|
|
143
|
-
border-radius: 50%;
|
|
144
|
-
pointer-events: none;
|
|
145
|
-
z-index: 1000000040;
|
|
146
|
-
transform: scale(0);
|
|
147
|
-
opacity: 0;
|
|
148
|
-
}
|
|
149
|
-
.click-ripple.active {
|
|
150
|
-
animation: ripple 0.6s ease-out forwards;
|
|
151
|
-
}
|
|
152
|
-
`;
|
|
153
|
-
document.head.appendChild(style);
|
|
154
|
-
}
|
|
155
|
-
// Create ripple effect
|
|
156
|
-
const ripple = document.createElement('div');
|
|
157
|
-
ripple.className = 'click-ripple';
|
|
158
|
-
ripple.style.left = `${e.clientX - 30}px`;
|
|
159
|
-
ripple.style.top = `${e.clientY - 30}px`;
|
|
160
|
-
document.body.appendChild(ripple);
|
|
161
|
-
activeRipples.add(ripple);
|
|
162
|
-
// Trigger animation on next frame to ensure proper initialization
|
|
163
|
-
requestAnimationFrame(() => {
|
|
164
|
-
ripple.classList.add('active');
|
|
165
|
-
});
|
|
166
|
-
// Remove ripple after animation
|
|
167
|
-
setTimeout(() => {
|
|
168
|
-
ripple.remove();
|
|
169
|
-
activeRipples.delete(ripple);
|
|
170
|
-
}, 600);
|
|
171
|
-
}
|
|
172
|
-
// Flash the cursor only if not already scaled down
|
|
173
|
-
if (cursor) {
|
|
174
|
-
const currentTransform = cursor.style.transform;
|
|
175
|
-
if (currentTransform !== 'scale(0.5)') {
|
|
176
|
-
cursor.style.background = `rgba(0, 150, 255, ${options.opacity * 1.5})`;
|
|
177
|
-
cursor.style.border = `2px solid rgba(0, 150, 255, 1)`;
|
|
178
|
-
cursor.style.transform = 'scale(1.5)';
|
|
179
|
-
setTimeout(() => {
|
|
180
|
-
cursor.style.background = `rgba(0, 150, 255, ${options.opacity * 0.5})`;
|
|
181
|
-
cursor.style.border = `2px solid rgba(0, 150, 255, ${options.opacity})`;
|
|
182
|
-
cursor.style.transform = 'scale(1)';
|
|
183
|
-
}, 200);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
// Also track right clicks
|
|
188
|
-
document.addEventListener('contextmenu', (e) => {
|
|
189
|
-
// Don't prevent default - let context menu show
|
|
190
|
-
if (options.showClickRipple) {
|
|
191
|
-
// Create ripple for right click (reuse same styles)
|
|
192
|
-
const ripple = document.createElement('div');
|
|
193
|
-
ripple.className = 'click-ripple';
|
|
194
|
-
ripple.style.left = `${e.clientX - 30}px`;
|
|
195
|
-
ripple.style.top = `${e.clientY - 30}px`;
|
|
196
|
-
document.body.appendChild(ripple);
|
|
197
|
-
activeRipples.add(ripple);
|
|
198
|
-
// Trigger animation on next frame
|
|
199
|
-
requestAnimationFrame(() => {
|
|
200
|
-
ripple.classList.add('active');
|
|
201
|
-
});
|
|
202
|
-
setTimeout(() => {
|
|
203
|
-
ripple.remove();
|
|
204
|
-
activeRipples.delete(ripple);
|
|
205
|
-
}, 600);
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
// Scroll visualization
|
|
209
|
-
let scrollTimeout;
|
|
210
|
-
let scrollArrow = null;
|
|
211
|
-
// Create the single scroll arrow
|
|
212
|
-
scrollArrow = document.createElement('div');
|
|
213
|
-
scrollArrow.style.cssText = `
|
|
214
|
-
position: fixed;
|
|
215
|
-
width: 40px;
|
|
216
|
-
height: 40px;
|
|
217
|
-
font-size: 24px;
|
|
218
|
-
color: #0096ff;
|
|
219
|
-
text-align: center;
|
|
220
|
-
line-height: 40px;
|
|
221
|
-
pointer-events: none;
|
|
222
|
-
z-index: 1000000045;
|
|
223
|
-
display: none;
|
|
224
|
-
transition: transform 0.1s ease-out, opacity 0.2s ease-out;
|
|
225
|
-
`;
|
|
226
|
-
document.body.appendChild(scrollArrow);
|
|
227
|
-
// Handle both wheel and scroll events
|
|
228
|
-
const handleScroll = (e) => {
|
|
229
|
-
if (!scrollArrow)
|
|
230
|
-
return;
|
|
231
|
-
// Skip if no vertical scroll
|
|
232
|
-
if (Math.abs(e.deltaY) < 0.5)
|
|
233
|
-
return;
|
|
234
|
-
// Clear existing timeout
|
|
235
|
-
if (scrollTimeout) {
|
|
236
|
-
clearTimeout(scrollTimeout);
|
|
237
|
-
}
|
|
238
|
-
// Update arrow
|
|
239
|
-
const scrollDirection = e.deltaY > 0 ? 'down' : 'up';
|
|
240
|
-
scrollArrow.textContent = scrollDirection === 'down' ? '▼' : '▲';
|
|
241
|
-
// Position above/below cursor based on direction
|
|
242
|
-
// Arrow is 40px tall, cursor is ~20px, add 10px spacing
|
|
243
|
-
const offset = scrollDirection === 'down' ? 30 : -30;
|
|
244
|
-
scrollArrow.style.left = `${e.clientX - 20}px`;
|
|
245
|
-
scrollArrow.style.top = `${e.clientY + offset - 20}px`; // -20 to account for arrow center
|
|
246
|
-
// Scale based on deltaY magnitude
|
|
247
|
-
const scale = 0.8 + Math.min(Math.abs(e.deltaY) / 10, 0.4);
|
|
248
|
-
scrollArrow.style.transform = `scale(${scale})`;
|
|
249
|
-
scrollArrow.style.opacity = '0.4';
|
|
250
|
-
scrollArrow.style.display = 'block';
|
|
251
|
-
// Hide after scroll stops
|
|
252
|
-
scrollTimeout = setTimeout(() => {
|
|
253
|
-
if (scrollArrow) {
|
|
254
|
-
scrollArrow.style.opacity = '0';
|
|
255
|
-
setTimeout(() => {
|
|
256
|
-
if (scrollArrow)
|
|
257
|
-
scrollArrow.style.display = 'none';
|
|
258
|
-
}, 200);
|
|
259
|
-
}
|
|
260
|
-
}, 150);
|
|
261
|
-
};
|
|
262
|
-
// Add event listeners for both wheel and scroll events
|
|
263
|
-
document.addEventListener('wheel', handleScroll, { passive: true });
|
|
264
|
-
// Also listen to scroll events on window and document.body for better compatibility
|
|
265
|
-
window.addEventListener('wheel', handleScroll, { passive: true });
|
|
266
|
-
document.body.addEventListener('wheel', handleScroll, { passive: true });
|
|
267
|
-
// Hide cursor when it leaves the viewport
|
|
268
|
-
document.addEventListener('mouseleave', () => {
|
|
269
|
-
if (cursor) {
|
|
270
|
-
cursor.style.display = 'none';
|
|
271
|
-
}
|
|
272
|
-
// Clean up any active ripples
|
|
273
|
-
activeRipples.forEach(ripple => ripple.remove());
|
|
274
|
-
activeRipples.clear();
|
|
275
|
-
// Hide scroll arrow
|
|
276
|
-
if (scrollArrow) {
|
|
277
|
-
scrollArrow.style.display = 'none';
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
document.addEventListener('mouseenter', () => {
|
|
281
|
-
if (cursor) {
|
|
282
|
-
cursor.style.display = 'block';
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
}, { opacity: this.baseOpacity, showHoverCircle: this.showHoverCircle, showClickRipple: this.showClickRipple, showDragLine: this.showDragLine });
|
|
286
|
-
}
|
|
287
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Page } from "playwright";
|
|
2
|
-
export declare class TypeEffectVisual {
|
|
3
|
-
private baseOpacity;
|
|
4
|
-
private displayDuration;
|
|
5
|
-
private maxKeys;
|
|
6
|
-
private page;
|
|
7
|
-
constructor(baseOpacity?: number, displayDuration?: number, maxKeys?: number);
|
|
8
|
-
setActivePage(page: Page): Promise<void>;
|
|
9
|
-
setupOnPage(): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { retryOnErrorIsSuccess } from "@/common";
|
|
2
|
-
export class TypeEffectVisual {
|
|
3
|
-
baseOpacity;
|
|
4
|
-
displayDuration;
|
|
5
|
-
maxKeys;
|
|
6
|
-
page;
|
|
7
|
-
constructor(baseOpacity = 0.6, displayDuration = 2000, maxKeys = 5) {
|
|
8
|
-
this.baseOpacity = baseOpacity;
|
|
9
|
-
this.displayDuration = displayDuration;
|
|
10
|
-
this.maxKeys = maxKeys;
|
|
11
|
-
}
|
|
12
|
-
async setActivePage(page) {
|
|
13
|
-
this.page = page;
|
|
14
|
-
page.on('load', async () => {
|
|
15
|
-
await retryOnErrorIsSuccess(this.setupOnPage.bind(this), { mode: 'retry_all', delayMs: 200, retryLimit: 10 });
|
|
16
|
-
});
|
|
17
|
-
await retryOnErrorIsSuccess(this.setupOnPage.bind(this), { mode: 'retry_all', delayMs: 200, retryLimit: 5 });
|
|
18
|
-
}
|
|
19
|
-
async setupOnPage() {
|
|
20
|
-
await this.page.evaluate((options) => {
|
|
21
|
-
if (window.__typeEffectsInitialized) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
window.__typeEffectsInitialized = true;
|
|
25
|
-
// Create container for key badges
|
|
26
|
-
const container = document.createElement('div');
|
|
27
|
-
container.id = 'type-effects-container';
|
|
28
|
-
container.style.cssText = `
|
|
29
|
-
position: fixed;
|
|
30
|
-
bottom: 40px;
|
|
31
|
-
left: 50%;
|
|
32
|
-
transform: translateX(-50%);
|
|
33
|
-
display: flex;
|
|
34
|
-
gap: 8px;
|
|
35
|
-
align-items: center;
|
|
36
|
-
pointer-events: none;
|
|
37
|
-
z-index: 1000000060;
|
|
38
|
-
`;
|
|
39
|
-
document.body.appendChild(container);
|
|
40
|
-
// Add styles for key badges
|
|
41
|
-
const style = document.createElement('style');
|
|
42
|
-
style.setAttribute('data-type-effects', 'true');
|
|
43
|
-
style.textContent = `
|
|
44
|
-
@keyframes keyIn {
|
|
45
|
-
0% {
|
|
46
|
-
opacity: 0;
|
|
47
|
-
transform: scale(0.5) translateY(20px);
|
|
48
|
-
}
|
|
49
|
-
100% {
|
|
50
|
-
opacity: 1;
|
|
51
|
-
transform: scale(1) translateY(0);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
@keyframes keyOut {
|
|
55
|
-
0% {
|
|
56
|
-
opacity: 1;
|
|
57
|
-
transform: scale(1) translateY(0);
|
|
58
|
-
}
|
|
59
|
-
100% {
|
|
60
|
-
opacity: 0;
|
|
61
|
-
transform: scale(0.8) translateY(10px);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
.key-badge {
|
|
65
|
-
display: inline-flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
min-width: 40px;
|
|
69
|
-
height: 40px;
|
|
70
|
-
padding: 0 12px;
|
|
71
|
-
background: rgba(0, 100, 200, ${options.opacity * 0.9});
|
|
72
|
-
border: none;
|
|
73
|
-
border-radius: 6px;
|
|
74
|
-
font-family: monospace;
|
|
75
|
-
font-size: 16px;
|
|
76
|
-
font-weight: bold;
|
|
77
|
-
color: white;
|
|
78
|
-
animation: keyIn 0.2s ease-out forwards;
|
|
79
|
-
white-space: nowrap;
|
|
80
|
-
user-select: none;
|
|
81
|
-
-webkit-user-select: none;
|
|
82
|
-
-moz-user-select: none;
|
|
83
|
-
-ms-user-select: none;
|
|
84
|
-
}
|
|
85
|
-
.key-badge.fading {
|
|
86
|
-
animation: keyOut 0.3s ease-out forwards;
|
|
87
|
-
}
|
|
88
|
-
`;
|
|
89
|
-
document.head.appendChild(style);
|
|
90
|
-
// Define special keys to track (excluding modifiers on their own)
|
|
91
|
-
const specialKeys = {
|
|
92
|
-
'Enter': '↵ Enter',
|
|
93
|
-
'Tab': '⇥ Tab',
|
|
94
|
-
'Delete': '⌦ Del',
|
|
95
|
-
'Escape': '⎋ Esc',
|
|
96
|
-
'ArrowUp': '↑',
|
|
97
|
-
'ArrowDown': '↓',
|
|
98
|
-
'ArrowLeft': '←',
|
|
99
|
-
'ArrowRight': '→',
|
|
100
|
-
'Home': '⇱ Home',
|
|
101
|
-
'End': '⇲ End',
|
|
102
|
-
'PageUp': '⇞ PgUp',
|
|
103
|
-
'PageDown': '⇟ PgDn',
|
|
104
|
-
'Insert': 'Ins',
|
|
105
|
-
};
|
|
106
|
-
// Active badges
|
|
107
|
-
const activeBadges = [];
|
|
108
|
-
// Handle keydown events
|
|
109
|
-
document.addEventListener('keydown', (e) => {
|
|
110
|
-
const key = e.key;
|
|
111
|
-
// Check if we have meaningful modifiers (Ctrl or Cmd)
|
|
112
|
-
const hasMeaningfulModifiers = e.ctrlKey || e.metaKey;
|
|
113
|
-
// For modifier combos, we want to show them with ANY key (including letters/numbers)
|
|
114
|
-
if (hasMeaningfulModifiers) {
|
|
115
|
-
// Skip if it's just a modifier key by itself
|
|
116
|
-
if (['Control', 'Alt', 'Shift', 'Meta'].includes(key)) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
// Build the combo display
|
|
120
|
-
let modifiers = [];
|
|
121
|
-
if (e.ctrlKey)
|
|
122
|
-
modifiers.push('Ctrl');
|
|
123
|
-
if (e.metaKey)
|
|
124
|
-
modifiers.push('⌘');
|
|
125
|
-
// Include Shift/Alt only if Ctrl or Cmd is also pressed
|
|
126
|
-
if ((e.ctrlKey || e.metaKey) && e.shiftKey)
|
|
127
|
-
modifiers.push('Shift');
|
|
128
|
-
if ((e.ctrlKey || e.metaKey) && e.altKey)
|
|
129
|
-
modifiers.push('Alt');
|
|
130
|
-
// Get the key display
|
|
131
|
-
let keyDisplay = specialKeys[key] || key.toUpperCase();
|
|
132
|
-
if (key.length === 1) {
|
|
133
|
-
keyDisplay = key.toUpperCase();
|
|
134
|
-
}
|
|
135
|
-
const displayText = modifiers.join('+') + '+' + keyDisplay;
|
|
136
|
-
// Create badge
|
|
137
|
-
createBadge(displayText);
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
// No modifiers - only show if it's a special key
|
|
141
|
-
const keyDisplay = specialKeys[key];
|
|
142
|
-
if (keyDisplay) {
|
|
143
|
-
createBadge(keyDisplay);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
function createBadge(displayText) {
|
|
148
|
-
// Create badge element
|
|
149
|
-
const badge = document.createElement('div');
|
|
150
|
-
badge.className = 'key-badge';
|
|
151
|
-
badge.textContent = displayText;
|
|
152
|
-
// Add to container
|
|
153
|
-
container.appendChild(badge);
|
|
154
|
-
// Set up removal timeout
|
|
155
|
-
const timeout = setTimeout(() => {
|
|
156
|
-
badge.classList.add('fading');
|
|
157
|
-
setTimeout(() => {
|
|
158
|
-
badge.remove();
|
|
159
|
-
// Remove from active badges
|
|
160
|
-
const index = activeBadges.findIndex(b => b.element === badge);
|
|
161
|
-
if (index !== -1) {
|
|
162
|
-
activeBadges.splice(index, 1);
|
|
163
|
-
}
|
|
164
|
-
}, 300);
|
|
165
|
-
}, options.displayDuration);
|
|
166
|
-
// Track active badge
|
|
167
|
-
activeBadges.push({ element: badge, timeout });
|
|
168
|
-
// Remove oldest badges if we exceed max
|
|
169
|
-
while (activeBadges.length > options.maxKeys) {
|
|
170
|
-
const oldest = activeBadges.shift();
|
|
171
|
-
if (oldest) {
|
|
172
|
-
clearTimeout(oldest.timeout);
|
|
173
|
-
oldest.element.classList.add('fading');
|
|
174
|
-
setTimeout(() => oldest.element.remove(), 300);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
// Clean up on page hide
|
|
179
|
-
document.addEventListener('visibilitychange', () => {
|
|
180
|
-
if (document.hidden) {
|
|
181
|
-
activeBadges.forEach(({ element, timeout }) => {
|
|
182
|
-
clearTimeout(timeout);
|
|
183
|
-
element.remove();
|
|
184
|
-
});
|
|
185
|
-
activeBadges.length = 0;
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
}, { opacity: this.baseOpacity, displayDuration: this.displayDuration, maxKeys: this.maxKeys });
|
|
189
|
-
}
|
|
190
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { describe, expect, test } from 'bun:test';
|
|
2
|
-
describe('z re-export', () => {
|
|
3
|
-
test('z.object() returns a valid schema via entry point', async () => {
|
|
4
|
-
const { z } = await import('@/index');
|
|
5
|
-
const schema = z.object({ name: z.string() });
|
|
6
|
-
const result = schema.safeParse({ name: 'test' });
|
|
7
|
-
expect(result.success).toBe(true);
|
|
8
|
-
});
|
|
9
|
-
test('re-exported z is the same zod instance', async () => {
|
|
10
|
-
const { z: reexported } = await import('@/index');
|
|
11
|
-
const { z: direct } = await import('zod');
|
|
12
|
-
expect(reexported).toBe(direct);
|
|
13
|
-
});
|
|
14
|
-
});
|
/package/{dist/common/actions.d.ts → node_modules/patchright-core/.bun-tag-19f23bd68c84ec1f}
RENAMED
|
File without changes
|