simdeck 0.1.4 → 0.1.5
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/README.md +34 -14
- package/build/simdeck-bin +0 -0
- package/client/dist/assets/index-D2-CFde1.css +1 -0
- package/client/dist/assets/index-E1gIgaOR.js +9 -0
- package/client/dist/chrome-devtools-ui/Images/3d-center.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/3d-pan.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/3d-rotate.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/Images.js +296 -0
- package/client/dist/chrome-devtools-ui/Images/accelerometer-back.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/accelerometer-bottom.png +0 -0
- package/client/dist/chrome-devtools-ui/Images/accelerometer-front.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/accelerometer-left.png +0 -0
- package/client/dist/chrome-devtools-ui/Images/accelerometer-right.png +0 -0
- package/client/dist/chrome-devtools-ui/Images/accelerometer-top.png +0 -0
- package/client/dist/chrome-devtools-ui/Images/account-tree.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-content-center.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-content-end.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-content-space-around.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-content-space-between.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-content-space-evenly.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-content-start.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-content-stretch.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-items-baseline.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-items-center.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-items-end.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-items-start.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-items-stretch.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-self-center.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-self-end.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-self-start.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/align-self-stretch.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/animation.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/arrow-back.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/arrow-collapse.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/arrow-down.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/arrow-drop-down-dark.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/arrow-drop-down-light.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/arrow-drop-down.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/arrow-forward.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/arrow-right-circle.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/arrow-up-down-circle.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/arrow-up-down.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/arrow-up.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/bell.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/bezier-curve-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/bin.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/bottom-panel-close.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/bottom-panel-open.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/brackets.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/breakpoint-circle.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/breakpoint-crossed-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/breakpoint-crossed.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/brush-2.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/brush-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/brush.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/bug.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/bundle.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/button-magic.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/calendar-today.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/center-focus-weak.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/check-circle.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/check-double.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/checker.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/checkmark.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/chevron-double-right.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/chevron-down.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/chevron-left-dot.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/chevron-left.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/chevron-right.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/chevron-up.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/chromeLeft.avif +0 -0
- package/client/dist/chrome-devtools-ui/Images/chromeMiddle.avif +0 -0
- package/client/dist/chrome-devtools-ui/Images/chromeRight.avif +0 -0
- package/client/dist/chrome-devtools-ui/Images/class.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/clear-list.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/clear.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/cloud.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/code-circle.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/code.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/colon.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/color-picker-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/color-picker.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/compress.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/console-conditional-breakpoint.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/console-logpoint.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/cookie.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/cookie_off.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/copy.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/corporate-fare.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/credit-card.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/cross-circle-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/cross-circle.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/cross.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/cssoverview_icons_2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/Images/custom-typography.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/database.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/deployed.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/device-fold.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/devices.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/devtools-thumbnail.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/devtools-tips.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/devtools.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/difference.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/dock-bottom.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/dock-left.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/dock-right.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/dock-window.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/document.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/dog-paw.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/domain.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/dots-horizontal.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/dots-vertical.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/download.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/edit.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/empty.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/errorWave.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/exclamation.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/experiment-check.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/experiment.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/extension.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/eye.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/favicon.ico +0 -0
- package/client/dist/chrome-devtools-ui/Images/file-document.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-fetch-xhr.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-font.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-generic.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-image.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-json.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-manifest.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-media.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-script.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-snippet.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-stylesheet.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-wasm.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/file-websocket.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/filter-clear.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/filter-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/filter.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/flex-direction.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/flex-no-wrap.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/flex-wrap.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/flow.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/fold-more.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/folder.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/frame-crossed.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/frame-icon.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/frame.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/gear-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/gear.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/gears.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/global.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/google.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/goto-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/grid-on.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/group.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/heap-snapshot.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/heap-snapshots.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/help.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/history.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/home.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/hover.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/iframe-crossed.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/iframe.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/import.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/indeterminate-question-box.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/info-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/info.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/issue-cross-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/issue-exclamation-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/issue-questionmark-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/issue-text-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/justify-content-center.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/justify-content-end.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/justify-content-space-around.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/justify-content-space-between.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/justify-content-space-evenly.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/justify-content-start.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/justify-items-center.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/justify-items-end.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/justify-items-start.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/justify-items-stretch.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/keyboard-arrow-right.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/keyboard-full.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/keyboard-pen.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/keyboard.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/label.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/large-arrow-right-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/layers-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/layers.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/left-panel-close.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/left-panel-open.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/lightbulb-spark.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/lightbulb.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/lighthouse_logo.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/list.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/location-on.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/lock.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/match-case.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/match-whole-word.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/memory.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/minus.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/mop.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/mouse.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/navigationControls.png +0 -0
- package/client/dist/chrome-devtools-ui/Images/navigationControls_2x.png +0 -0
- package/client/dist/chrome-devtools-ui/Images/network-settings.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/node-stack-icon.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/nodeIcon.avif +0 -0
- package/client/dist/chrome-devtools-ui/Images/open-externally.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/override.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/palette.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/pause-circle.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/pause.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/pen-spark.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/performance-panel-delete-annotation.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/performance-panel-diagram.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/performance-panel-entry-label.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/performance-panel-time-range.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/performance.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/person.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/photo-camera.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/play.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/plus.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/policy.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/popoverArrows.png +0 -0
- package/client/dist/chrome-devtools-ui/Images/popup.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/preview_feature_video_thumbnail.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/profile.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/psychiatry.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/react_native/learn-debugging-basics.jpg +0 -0
- package/client/dist/chrome-devtools-ui/Images/react_native/learn-native-debugging.jpg +0 -0
- package/client/dist/chrome-devtools-ui/Images/react_native/learn-react-native-devtools.jpg +0 -0
- package/client/dist/chrome-devtools-ui/Images/react_native/welcomeIcon.png +0 -0
- package/client/dist/chrome-devtools-ui/Images/record-start.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/record-stop.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/redo.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/refresh.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/regular-expression.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/replace.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/replay.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/report.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/resizeDiagonal.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/resizeHorizontal.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/resizeVertical.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/resume.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/review.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/right-panel-close.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/right-panel-open.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/scissors.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/screen-rotation.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/search.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/select-element.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/send.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/shadow.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/small-status-dot.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/smart-assistant.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/snippet.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/spark-info.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/star.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/step-into.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/step-out.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/step-over.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/step.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/stop.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/symbol.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/sync.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/table.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/terminal.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/thumb-down-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/thumb-down.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/thumb-up-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/thumb-up.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/tonality.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/toolbarResizerVertical.png +0 -0
- package/client/dist/chrome-devtools-ui/Images/top-panel-close.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/top-panel-open.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/touch-app.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/touchCursor.png +0 -0
- package/client/dist/chrome-devtools-ui/Images/touchCursor_2x.png +0 -0
- package/client/dist/chrome-devtools-ui/Images/triangle-bottom-right.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/triangle-down.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/triangle-left.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/triangle-right.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/triangle-up.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/tune.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/undo.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/warning-filled.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/warning.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/watch.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/whatsnew.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/width.svg +1 -0
- package/client/dist/chrome-devtools-ui/Images/zoom-in.svg +1 -0
- package/client/dist/chrome-devtools-ui/Tests.js +1700 -0
- package/client/dist/chrome-devtools-ui/application_tokens.css +407 -0
- package/client/dist/chrome-devtools-ui/core/common/common.js +1 -0
- package/client/dist/chrome-devtools-ui/core/dom_extension/dom_extension.js +1 -0
- package/client/dist/chrome-devtools-ui/core/host/host.js +1 -0
- package/client/dist/chrome-devtools-ui/core/i18n/i18n.js +1 -0
- package/client/dist/chrome-devtools-ui/core/i18n/locales/en-US.json +1 -0
- package/client/dist/chrome-devtools-ui/core/i18n/locales/zh.json +1 -0
- package/client/dist/chrome-devtools-ui/core/platform/platform.js +1 -0
- package/client/dist/chrome-devtools-ui/core/protocol_client/protocol_client.js +1 -0
- package/client/dist/chrome-devtools-ui/core/rn_experiments/rn_experiments.js +1 -0
- package/client/dist/chrome-devtools-ui/core/root/root.js +1 -0
- package/client/dist/chrome-devtools-ui/core/sdk/sdk-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/core/sdk/sdk.js +1 -0
- package/client/dist/chrome-devtools-ui/design_system_tokens.css +782 -0
- package/client/dist/chrome-devtools-ui/device_mode_emulation_frame.html +24 -0
- package/client/dist/chrome-devtools-ui/devtools_app.html +24 -0
- package/client/dist/chrome-devtools-ui/devtools_compatibility.js +1741 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPad-landscape.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPad-portrait.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
- package/client/dist/chrome-devtools-ui/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
- package/client/dist/chrome-devtools-ui/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/devtools_app/devtools_app.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/formatter_worker/FormatterActions.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/formatter_worker/formatter_worker-entrypoint.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/formatter_worker/formatter_worker.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/heap_snapshot_worker/heap_snapshot_worker.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/inspector/inspector.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/inspector_main/inspector_main-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/inspector_main/inspector_main.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/js_app/js_app.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/lighthouse_worker/lighthouse_worker.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/main/main-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/main/main.js +48 -0
- package/client/dist/chrome-devtools-ui/entrypoints/ndb_app/ndb_app.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/node_app/node_app.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/rehydrated_devtools_app/rehydrated_devtools_app.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/rn_fusebox/rn_fusebox.js +24 -0
- package/client/dist/chrome-devtools-ui/entrypoints/shell/shell.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/wasmparser_worker/wasmparser_worker.js +1 -0
- package/client/dist/chrome-devtools-ui/entrypoints/worker_app/worker_app.js +1 -0
- package/client/dist/chrome-devtools-ui/inspector.html +24 -0
- package/client/dist/chrome-devtools-ui/integration_test_runner.html +40 -0
- package/client/dist/chrome-devtools-ui/js_app.html +24 -0
- package/client/dist/chrome-devtools-ui/legacy_test_runner/legacy_test_runner.js +13 -0
- package/client/dist/chrome-devtools-ui/legacy_test_runner/test_runner/test_runner.js +1 -0
- package/client/dist/chrome-devtools-ui/models/ai_assistance/ai_assistance.js +1 -0
- package/client/dist/chrome-devtools-ui/models/autofill_manager/autofill_manager.js +1 -0
- package/client/dist/chrome-devtools-ui/models/bindings/bindings.js +1 -0
- package/client/dist/chrome-devtools-ui/models/breakpoints/breakpoints.js +1 -0
- package/client/dist/chrome-devtools-ui/models/cpu_profile/cpu_profile.js +1 -0
- package/client/dist/chrome-devtools-ui/models/crux-manager/crux-manager.js +1 -0
- package/client/dist/chrome-devtools-ui/models/emulation/emulation.js +1 -0
- package/client/dist/chrome-devtools-ui/models/extensions/extensions.js +1 -0
- package/client/dist/chrome-devtools-ui/models/formatter/formatter.js +1 -0
- package/client/dist/chrome-devtools-ui/models/har/har.js +1 -0
- package/client/dist/chrome-devtools-ui/models/heap_snapshot_model/heap_snapshot_model.js +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CoepCorpNotSameOrigin.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CoepCorpNotSameSite.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CompatibilityModeQuirks.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/LowTextContrast.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeRead.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeSet.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteExcludeNavigationContextDowngrade.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteInvalidSameParty.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeRead.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeSet.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInsecureContext.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInvalidInfoHeader.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +6 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNoRegisterOsSourceHeader.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNoRegisterOsTriggerHeader.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNoRegisterSourceHeader.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNoRegisterTriggerHeader.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arNoWebOrOsSupport.md +4 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arOsSourceIgnored.md +18 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arOsTriggerIgnored.md +19 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +9 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arSourceIgnored.md +13 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arTriggerIgnored.md +12 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +10 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/arWebAndOsHeaders.md +11 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/bounceTrackingMitigations.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +4 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md +11 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludePortMismatch.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludeSchemeMismatch.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md +11 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieWarnMetadataGrantRead.md +4 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieWarnMetadataGrantSet.md +4 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsAllowCredentialsRequired.md +6 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsDisabledScheme.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsDisallowedByMode.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsInsecurePrivateNetwork.md +10 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsInvalidHeaderValues.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsOriginMismatch.md +6 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsPreflightAllowPrivateNetworkError.md +10 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsPreflightResponseInvalid.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsPrivateNetworkPermissionDenied.md +10 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsRedirectContainsCredentials.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/corsWildcardOriginNotAllowed.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cspEvalViolation.md +9 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cspInlineViolation.md +10 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cspTrustedTypesPolicyViolation.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cspTrustedTypesSinkViolation.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/cspURLViolation.md +10 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/deprecation.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestCanceled.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestClientMetadataHttpNotFound.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestClientMetadataInvalidResponse.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestClientMetadataNoResponse.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestErrorIdToken.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthRequestTooManyRequests.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/fetchingPartitionedBlobURL.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormAriaLabelledByToNonExistingId.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormDuplicateIdForInputError.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormInputWithNoLabelError.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormLabelForNameError.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericFormLabelHasNeitherForNorNestedInput.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/genericResponseWasBlockedByORB.md +4 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/heavyAd.md +10 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/mixedContent.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/navigatingPartitionedBlobURL.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/propertyRuleInvalidNameIssue.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/propertyRuleIssue.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedArrayBuffer.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriInvalidSignatureHeader.md +14 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriInvalidSignatureInputHeader.md +15 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriMissingSignatureHeader.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriMissingSignatureInputHeader.md +7 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriValidationFailedIntegrityMismatch.md +12 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriValidationFailedInvalidLength.md +5 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriValidationFailedSignatureExpired.md +6 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/sriValidationFailedSignatureMismatch.md +11 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/stylesheetLateImport.md +4 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/descriptions/stylesheetRequestFailed.md +3 -0
- package/client/dist/chrome-devtools-ui/models/issues_manager/issues_manager.js +1 -0
- package/client/dist/chrome-devtools-ui/models/javascript_metadata/javascript_metadata.js +1 -0
- package/client/dist/chrome-devtools-ui/models/live-metrics/live-metrics.js +1 -0
- package/client/dist/chrome-devtools-ui/models/live-metrics/web-vitals-injected/spec/spec.js +1 -0
- package/client/dist/chrome-devtools-ui/models/live-metrics/web-vitals-injected/web-vitals-injected.generated.js +1 -0
- package/client/dist/chrome-devtools-ui/models/logs/logs-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/models/logs/logs.js +1 -0
- package/client/dist/chrome-devtools-ui/models/persistence/persistence-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/models/persistence/persistence.js +1 -0
- package/client/dist/chrome-devtools-ui/models/project_settings/project_settings.js +1 -0
- package/client/dist/chrome-devtools-ui/models/react_native/react_native.js +1 -0
- package/client/dist/chrome-devtools-ui/models/source_map_scopes/source_map_scopes.js +1 -0
- package/client/dist/chrome-devtools-ui/models/text_utils/text_utils.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/extras/extras.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/handlers/handlers.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/helpers/helpers.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/insights/insights.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/lantern/core/core.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/lantern/graph/graph.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/lantern/lantern.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/lantern/metrics/metrics.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/lantern/simulation/simulation.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/lantern/types/types.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/trace.js +1 -0
- package/client/dist/chrome-devtools-ui/models/trace/types/types.js +1 -0
- package/client/dist/chrome-devtools-ui/models/workspace/workspace.js +1 -0
- package/client/dist/chrome-devtools-ui/models/workspace_diff/workspace_diff.js +1 -0
- package/client/dist/chrome-devtools-ui/ndb_app.html +24 -0
- package/client/dist/chrome-devtools-ui/node_app.html +24 -0
- package/client/dist/chrome-devtools-ui/panels/accessibility/accessibility-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/accessibility/accessibility.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/ai_assistance/ai_assistance-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/ai_assistance/ai_assistance.js +512 -0
- package/client/dist/chrome-devtools-ui/panels/animation/animation-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/animation/animation.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/application/application-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/application/application.js +107 -0
- package/client/dist/chrome-devtools-ui/panels/application/components/components.js +765 -0
- package/client/dist/chrome-devtools-ui/panels/application/preloading/components/components.js +362 -0
- package/client/dist/chrome-devtools-ui/panels/application/preloading/helper/helper.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/autofill/autofill-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/autofill/autofill.js +107 -0
- package/client/dist/chrome-devtools-ui/panels/browser_debugger/browser_debugger-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/browser_debugger/browser_debugger.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/changes/changes-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/changes/changes.js +31 -0
- package/client/dist/chrome-devtools-ui/panels/common/common.js +45 -0
- package/client/dist/chrome-devtools-ui/panels/console/console-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/console/console.js +6 -0
- package/client/dist/chrome-devtools-ui/panels/console_counters/console_counters-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/console_counters/console_counters.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/coverage/coverage-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/coverage/coverage.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/css_overview/components/components.js +23 -0
- package/client/dist/chrome-devtools-ui/panels/css_overview/css_overview-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/css_overview/css_overview.js +148 -0
- package/client/dist/chrome-devtools-ui/panels/developer_resources/developer_resources-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/developer_resources/developer_resources.js +48 -0
- package/client/dist/chrome-devtools-ui/panels/elements/components/components.js +250 -0
- package/client/dist/chrome-devtools-ui/panels/elements/elements-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/elements/elements.js +67 -0
- package/client/dist/chrome-devtools-ui/panels/emulation/components/components.js +39 -0
- package/client/dist/chrome-devtools-ui/panels/emulation/emulation-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/emulation/emulation.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/event_listeners/event_listeners.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/explain/explain-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/explain/explain.js +231 -0
- package/client/dist/chrome-devtools-ui/panels/issues/components/components.js +14 -0
- package/client/dist/chrome-devtools-ui/panels/issues/issues-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/issues/issues.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/js_timeline/js_timeline-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/js_timeline/js_timeline.js +2 -0
- package/client/dist/chrome-devtools-ui/panels/layer_viewer/layer_viewer-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/layer_viewer/layer_viewer.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/layers/layers-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/layers/layers.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/lighthouse/lighthouse-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/lighthouse/lighthouse.js +65 -0
- package/client/dist/chrome-devtools-ui/panels/linear_memory_inspector/components/components.js +179 -0
- package/client/dist/chrome-devtools-ui/panels/linear_memory_inspector/linear_memory_inspector-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/linear_memory_inspector/linear_memory_inspector.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/media/media-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/media/media.js +25 -0
- package/client/dist/chrome-devtools-ui/panels/mobile_throttling/mobile_throttling-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/mobile_throttling/mobile_throttling.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/network/components/components.js +346 -0
- package/client/dist/chrome-devtools-ui/panels/network/forward/forward.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/network/network-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/network/network.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/performance_monitor/performance_monitor-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/performance_monitor/performance_monitor.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/profiler/profiler-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/profiler/profiler.js +8 -0
- package/client/dist/chrome-devtools-ui/panels/protocol_monitor/protocol_monitor-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/protocol_monitor/protocol_monitor.js +293 -0
- package/client/dist/chrome-devtools-ui/panels/react_devtools/react_devtools.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/react_devtools/react_devtools_components-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/react_devtools/react_devtools_profiler-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/recorder/components/components.js +686 -0
- package/client/dist/chrome-devtools-ui/panels/recorder/controllers/controllers.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/recorder/converters/converters.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/recorder/extensions/extensions.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/recorder/injected/injected.generated.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/recorder/injected/injected.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/recorder/models/models.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/recorder/recorder-actions/recorder-actions.js +3 -0
- package/client/dist/chrome-devtools-ui/panels/recorder/recorder-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/recorder/recorder.js +126 -0
- package/client/dist/chrome-devtools-ui/panels/recorder/util/util.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/rn_welcome/rn_welcome-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/rn_welcome/rn_welcome.js +62 -0
- package/client/dist/chrome-devtools-ui/panels/screencast/screencast-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/screencast/screencast.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/search/search.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/security/security-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/security/security.js +178 -0
- package/client/dist/chrome-devtools-ui/panels/sensors/sensors-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/sensors/sensors.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/settings/components/components.js +22 -0
- package/client/dist/chrome-devtools-ui/panels/settings/emulation/components/components.js +221 -0
- package/client/dist/chrome-devtools-ui/panels/settings/emulation/emulation-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/settings/emulation/emulation.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/settings/emulation/utils/utils.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/settings/settings-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/settings/settings.js +91 -0
- package/client/dist/chrome-devtools-ui/panels/snippets/snippets.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/sources/components/components.js +162 -0
- package/client/dist/chrome-devtools-ui/panels/sources/sources-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/sources/sources.js +2 -0
- package/client/dist/chrome-devtools-ui/panels/timeline/components/components.js +1063 -0
- package/client/dist/chrome-devtools-ui/panels/timeline/components/insights/insights.js +262 -0
- package/client/dist/chrome-devtools-ui/panels/timeline/extensions/extensions.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/timeline/overlays/components/components.js +190 -0
- package/client/dist/chrome-devtools-ui/panels/timeline/overlays/overlays.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/timeline/timeline-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/timeline/timeline.js +43 -0
- package/client/dist/chrome-devtools-ui/panels/timeline/utils/utils.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/utils/utils.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/web_audio/graph_visualizer/graph_visualizer.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/web_audio/web_audio-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/web_audio/web_audio.js +19 -0
- package/client/dist/chrome-devtools-ui/panels/webauthn/webauthn-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/webauthn/webauthn.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/whats_new/resources/WNDT.md +6 -0
- package/client/dist/chrome-devtools-ui/panels/whats_new/whats_new-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/panels/whats_new/whats_new.js +32 -0
- package/client/dist/chrome-devtools-ui/rehydrated_devtools_app.html +24 -0
- package/client/dist/chrome-devtools-ui/rn_fusebox.html +24 -0
- package/client/dist/chrome-devtools-ui/services/puppeteer/puppeteer.js +1 -0
- package/client/dist/chrome-devtools-ui/services/trace_bounds/trace_bounds.js +1 -0
- package/client/dist/chrome-devtools-ui/services/tracing/tracing.js +1 -0
- package/client/dist/chrome-devtools-ui/services/window_bounds/window_bounds.js +1 -0
- package/client/dist/chrome-devtools-ui/third_party/acorn/acorn.js +1 -0
- package/client/dist/chrome-devtools-ui/third_party/chromium/client-variations/client-variations.js +1 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/angular.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/codemirror.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/cpp.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/java.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/legacy.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/less.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/markdown.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/php.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/python.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/sass.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/svelte.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/vue.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/wast.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/chunk/xml.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/codemirror.next/codemirror.next.js +2 -0
- package/client/dist/chrome-devtools-ui/third_party/csp_evaluator/csp_evaluator.js +194 -0
- package/client/dist/chrome-devtools-ui/third_party/diff/diff.js +1 -0
- package/client/dist/chrome-devtools-ui/third_party/i18n/i18n.js +1 -0
- package/client/dist/chrome-devtools-ui/third_party/intl-messageformat/intl-messageformat.js +15 -0
- package/client/dist/chrome-devtools-ui/third_party/json5/json5.js +1 -0
- package/client/dist/chrome-devtools-ui/third_party/legacy-javascript/legacy-javascript.js +7 -0
- package/client/dist/chrome-devtools-ui/third_party/lighthouse/lighthouse-dt-bundle.js +3023 -0
- package/client/dist/chrome-devtools-ui/third_party/lighthouse/report/report.js +39 -0
- package/client/dist/chrome-devtools-ui/third_party/lit/lit.js +121 -0
- package/client/dist/chrome-devtools-ui/third_party/marked/marked.js +1 -0
- package/client/dist/chrome-devtools-ui/third_party/puppeteer/puppeteer.js +373 -0
- package/client/dist/chrome-devtools-ui/third_party/puppeteer-replay/puppeteer-replay.js +1 -0
- package/client/dist/chrome-devtools-ui/third_party/react-devtools/react-devtools.js +41 -0
- package/client/dist/chrome-devtools-ui/third_party/third-party-web/third-party-web.js +1 -0
- package/client/dist/chrome-devtools-ui/third_party/wasmparser/wasmparser.js +1 -0
- package/client/dist/chrome-devtools-ui/third_party/web-vitals/web-vitals.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/components/adorners/adorners.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/components/buttons/buttons.js +17 -0
- package/client/dist/chrome-devtools-ui/ui/components/cards/cards.js +10 -0
- package/client/dist/chrome-devtools-ui/ui/components/chrome_link/chrome_link.js +6 -0
- package/client/dist/chrome-devtools-ui/ui/components/code_highlighter/code_highlighter.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/components/dialogs/dialogs.js +61 -0
- package/client/dist/chrome-devtools-ui/ui/components/diff_view/diff_view.js +8 -0
- package/client/dist/chrome-devtools-ui/ui/components/expandable_list/expandable_list.js +17 -0
- package/client/dist/chrome-devtools-ui/ui/components/floating_button/floating_button.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/components/helpers/helpers.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/components/highlighting/highlighting.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/components/icon_button/icon_button.js +13 -0
- package/client/dist/chrome-devtools-ui/ui/components/input/input.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/components/issue_counter/issue_counter.js +10 -0
- package/client/dist/chrome-devtools-ui/ui/components/legacy_wrapper/legacy_wrapper.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/components/linkifier/linkifier.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/components/markdown_view/markdown_view.js +51 -0
- package/client/dist/chrome-devtools-ui/ui/components/menus/menus.js +71 -0
- package/client/dist/chrome-devtools-ui/ui/components/node_text/node_text.js +3 -0
- package/client/dist/chrome-devtools-ui/ui/components/panel_feedback/panel_feedback.js +37 -0
- package/client/dist/chrome-devtools-ui/ui/components/panel_introduction_steps/panel_introduction_steps.js +9 -0
- package/client/dist/chrome-devtools-ui/ui/components/render_coordinator/render_coordinator.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/components/report_view/report_view.js +21 -0
- package/client/dist/chrome-devtools-ui/ui/components/request_link_icon/request_link_icon.js +8 -0
- package/client/dist/chrome-devtools-ui/ui/components/settings/settings.js +20 -0
- package/client/dist/chrome-devtools-ui/ui/components/spinners/spinners.js +16 -0
- package/client/dist/chrome-devtools-ui/ui/components/srgb_overlay/srgb_overlay.js +6 -0
- package/client/dist/chrome-devtools-ui/ui/components/suggestion_input/suggestion_input.js +29 -0
- package/client/dist/chrome-devtools-ui/ui/components/survey_link/survey_link.js +7 -0
- package/client/dist/chrome-devtools-ui/ui/components/switch/switch.js +10 -0
- package/client/dist/chrome-devtools-ui/ui/components/text_editor/text_editor.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/components/text_prompt/text_prompt.js +4 -0
- package/client/dist/chrome-devtools-ui/ui/components/tooltips/tooltips.js +7 -0
- package/client/dist/chrome-devtools-ui/ui/components/tree_outline/tree_outline.js +32 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/color_picker/color_picker.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/cookie_table/cookie_table.js +85 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/data_grid/data_grid.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/inline_editor/inline_editor.js +58 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/object_ui/object_ui-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/object_ui/object_ui.js +7 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/perf_ui/perf_ui-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/perf_ui/perf_ui.js +60 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/quick_open/quick_open-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/quick_open/quick_open.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/source_frame/source_frame-meta.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/source_frame/source_frame.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/components/utils/utils.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/legacy.js +59 -0
- package/client/dist/chrome-devtools-ui/ui/legacy/theme_support/theme_support.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/lit/lit.js +1 -0
- package/client/dist/chrome-devtools-ui/ui/visual_logging/visual_logging.js +1 -0
- package/client/dist/chrome-devtools-ui/worker_app.html +24 -0
- package/client/dist/index.html +3 -3
- package/package.json +4 -1
- package/packages/simdeck-test/dist/index.d.ts +7 -1
- package/client/dist/assets/index-BHTf_1bs.js +0 -9
- package/client/dist/assets/index-PP2opq5o.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"../../../core/common/common.js";import*as t from"../../../core/platform/platform.js";import*as i from"../../../core/sdk/sdk.js";import*as n from"../models/models.js";import*as a from"../util/util.js";const s="captureSelectors";class r extends Event{static eventName="selectorpicked";data;constructor(e){super(r.eventName,{bubbles:!0,composed:!0}),this.data=e}}class o extends Event{static eventName="requestselectorattribute";send;constructor(e){super(o.eventName,{bubbles:!0,composed:!0}),this.send=e}}class c{static get#e(){return i.TargetManager.TargetManager.instance()}#t;#i;#n=new e.Mutex.Mutex;active=!1;constructor(e){this.#t=e}start=()=>this.#n.run((async()=>{this.active||(this.active=!0,this.#i=await new Promise(((e,t)=>{const i=setTimeout(t,1e3);this.#t.dispatchEvent(new o((t=>{clearTimeout(i),e(t)})))})),c.#e.observeTargets(this),this.#t.requestUpdate())}));stop=()=>this.#n.run((async()=>{this.active&&(this.active=!1,c.#e.unobserveTargets(this),c.#e.targets().map(this.targetRemoved.bind(this)),this.#i=void 0,this.#t.requestUpdate())}));toggle=()=>this.active?this.stop():this.start();#a=new Map;targetAdded(t){if(t.type()!==i.Target.Type.FRAME)return;let n=this.#a.get(t);n||(n=new e.Mutex.Mutex,this.#a.set(t,n)),n.run((async()=>{await this.#s(t),await this.#r(t)}))}targetRemoved(e){const t=this.#a.get(e);t&&t.run((async()=>{try{await this.#o(e),await this.#c(e)}catch{}}))}#d=e=>{if(e.data.name!==s)return;const t=e.data.executionContextId,a=i.TargetManager.TargetManager.instance().targets(),o=n.SDKUtils.findTargetByExecutionContext(a,t),c=n.SDKUtils.findFrameIdByExecutionContext(a,t);if(!o||!c)throw new Error(`No execution context found for the binding call + ${JSON.stringify(e.data)}`);const d=o.model(i.ResourceTreeModel.ResourceTreeModel);if(!d)throw new Error(`ResourceTreeModel instance is missing for the target: ${o.id()}`);const l=d.frameForId(c);if(!l)throw new Error("Frame is not found");this.#t.dispatchEvent(new r({...JSON.parse(e.data.payload),...n.SDKUtils.getTargetFrameContext(o,l)})),this.stop()};#l=new Map;async#r(e){const t=`${await a.InjectedScript.get()};DevToolsRecorder.startSelectorPicker({getAccessibleName, getAccessibleRole}, ${JSON.stringify(this.#i?this.#i:void 0)}, ${a.isDebugBuild})`,[{identifier:i}]=await Promise.all([e.pageAgent().invoke_addScriptToEvaluateOnNewDocument({source:t,worldName:a.DEVTOOLS_RECORDER_WORLD_NAME,includeCommandLineAPI:!0}),n.SDKUtils.evaluateInAllFrames(a.DEVTOOLS_RECORDER_WORLD_NAME,e,t)]);this.#l.set(e,i)}async#o(e){const i=this.#l.get(e);t.assertNotNullOrUndefined(i),this.#l.delete(e),await e.pageAgent().invoke_removeScriptToEvaluateOnNewDocument({identifier:i});await n.SDKUtils.evaluateInAllFrames(a.DEVTOOLS_RECORDER_WORLD_NAME,e,"DevToolsRecorder.stopSelectorPicker()")}async#s(e){const n=e.model(i.RuntimeModel.RuntimeModel);t.assertNotNullOrUndefined(n),n.addEventListener(i.RuntimeModel.Events.BindingCalled,this.#d),await n.addBinding({name:s,executionContextName:a.DEVTOOLS_RECORDER_WORLD_NAME})}async#c(e){await e.runtimeAgent().invoke_removeBinding({name:s});const n=e.model(i.RuntimeModel.RuntimeModel);t.assertNotNullOrUndefined(n),n.removeEventListener(i.RuntimeModel.Events.BindingCalled,this.#d)}}var d=Object.freeze({__proto__:null,RequestSelectorAttributeEvent:o,SelectorPickedEvent:r,SelectorPicker:c});export{d as SelectorPicker};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"../../../third_party/puppeteer-replay/puppeteer-replay.js";import"../models/models.js";var t=Object.freeze({__proto__:null});const n="extension_";var r=Object.freeze({__proto__:null,EXTENSION_PREFIX:n,ExtensionConverter:class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}getId(){return n+this.#e}getFormatName(){return this.#t.getName()}getMediaType(){return this.#t.getMediaType()}getFilename(e){const t=this.#n(this.#t.getMediaType());return`${e.title}${t}`}async stringify(t){const n=await this.#t.stringify(t),r=e.parseSourceMap(n);return[e.stripSourceMap(n),r]}async stringifyStep(e){return await this.#t.stringifyStep(e)}#n(e){switch(e){case"application/json":return".json";case"application/javascript":case"text/javascript":return".js";case"application/typescript":case"text/typescript":return".ts";default:return""}}}});var i=Object.freeze({__proto__:null,JSONConverter:class{#r;constructor(e){this.#r=e}getId(){return"json"}getFormatName(){return"JSON"}getFilename(e){return`${e.title}.json`}async stringify(t){const n=await e.stringify(t,{extension:new e.JSONStringifyExtension,indentation:this.#r}),r=e.parseSourceMap(n);return[e.stripSourceMap(n),r]}async stringifyStep(t){return await e.stringifyStep(t,{extension:new e.JSONStringifyExtension,indentation:this.#r})}getMediaType(){return"application/json"}}});var s=Object.freeze({__proto__:null,LighthouseConverter:class{#r;constructor(e){this.#r=e}getId(){return"lighthouse"}getFormatName(){return"Puppeteer (including Lighthouse analysis)"}getFilename(e){return`${e.title}.js`}async stringify(t){const n=await e.stringify(t,{extension:new e.LighthouseStringifyExtension,indentation:this.#r}),r=e.parseSourceMap(n);return[e.stripSourceMap(n),r]}async stringifyStep(t){return await e.stringifyStep(t,{indentation:this.#r})}getMediaType(){return"text/javascript"}}});class a{#r;#t;constructor(e){this.#r=e,this.#t=this.createExtension()}getId(){return"puppeteer"}createExtension(){return new e.PuppeteerStringifyExtension}getFormatName(){return"Puppeteer"}getFilename(e){return`${e.title}.js`}async stringify(t){const n=await e.stringify(t,{indentation:this.#r,extension:this.#t}),r=e.parseSourceMap(n);return[e.stripSourceMap(n),r]}async stringifyStep(t){return await e.stringifyStep(t,{indentation:this.#r,extension:this.#t})}getMediaType(){return"text/javascript"}}var o=Object.freeze({__proto__:null,PuppeteerConverter:a});var p=Object.freeze({__proto__:null,PuppeteerFirefoxConverter:class extends a{getId(){return"puppeteer-firefox"}createExtension(){return new e.PuppeteerStringifyExtension("firefox")}getFormatName(){return"Puppeteer (for Firefox)"}}});var u=Object.freeze({__proto__:null,PuppeteerReplayConverter:class{#r;constructor(e){this.#r=e}getId(){return"@puppeteer/replay"}getFormatName(){return"@puppeteer/replay"}getFilename(e){return`${e.title}.js`}async stringify(t){const n=await e.stringify(t,{extension:new e.PuppeteerReplayStringifyExtension,indentation:this.#r}),r=e.parseSourceMap(n);return[e.stripSourceMap(n),r]}async stringifyStep(t){return await e.stringifyStep(t,{extension:new e.PuppeteerReplayStringifyExtension})}getMediaType(){return"text/javascript"}}});export{t as Converter,r as ExtensionConverter,i as JSONConverter,s as LighthouseConverter,o as PuppeteerConverter,p as PuppeteerFirefoxConverter,u as PuppeteerReplayConverter};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"../../../core/common/common.js";import*as i from"../../../models/extensions/extensions.js";let n=null;class t extends e.ObjectWrapper.ObjectWrapper{static instance(){return n||(n=new t),n}#e=new Map;constructor(){super(),this.attach()}attach(){const e=i.RecorderPluginManager.RecorderPluginManager.instance();e.addEventListener("pluginAdded",this.#i),e.addEventListener("pluginRemoved",this.#i),e.addEventListener("viewRegistered",this.#n);for(const i of e.views())this.#n({data:i})}detach(){const e=i.RecorderPluginManager.RecorderPluginManager.instance();e.removeEventListener("pluginAdded",this.#i),e.removeEventListener("pluginRemoved",this.#i),e.removeEventListener("viewRegistered",this.#n),this.#e.clear()}extensions(){return i.RecorderPluginManager.RecorderPluginManager.instance().plugins()}getView(e){const i=this.#e.get(e);if(!i)throw new Error("View not found");return i}#i=()=>{this.dispatchEventToListeners("extensionsUpdated",this.extensions())};#n=e=>{const i=e.data;this.#e.has(i.id)||this.#e.set(i.id,new s(i))}}class s{#t;#s;#r=!1;#o=!1;constructor(e){this.#t=e,this.#s=document.createElement("iframe"),this.#s.src=e.pagePath,this.#s.onload=this.#a}#a=()=>{this.#o=!0,this.#r&&this.#t.onShown()};show(){this.#r||(this.#r=!0,this.#o&&this.#t.onShown())}hide(){this.#r&&(this.#r=!1,this.#o=!1,this.#t.onHidden())}frame(){return this.#s}}var r=Object.freeze({__proto__:null,ExtensionManager:t});export{r as ExtensionManager};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){"use strict";const e=()=>{};class t{#e;#t;#n;constructor(t){"silent"===t?(this.#e=e,this.#t=e,this.#n=e):(this.#e=console.log,this.#t=console.time,this.#n=console.timeEnd)}log(...e){this.#e(...e)}timed(e,t){this.#t(e);const n=t();return this.#n(e),n}}class n{#o=new WeakMap;#s=1;getOrInsert=e=>{const t=this.#o.get(e);return void 0!==t?t:(this.#o.set(e,this.#s),this.#s++,this.#s-1)}}class o{#i;constructor(e){this.#i=e}#r=(e,t)=>{const n=[];let o=document;for(const s of e){let e=this.#c(o,s.name);if(e)n.push(s.name),o=e;else if(t&&(e=this.#l(o,s.role),e))n.push(`[role="${s.role}"]`),o=e;else{if(e=this.#a(o,s.name,s.role),!e)return;n.push(`${s.name}[role="${s.role}"]`),o=e}}return n};#c=(e,t)=>{if(!t)return null;const n=this.#h(e,t,void 0,2);return 1!==n.length?null:n[0]};#l=(e,t)=>{if(!t)return null;const n=this.#h(e,void 0,t,2);return 1!==n.length?null:n[0]};#a=(e,t,n)=>{if(!n||!t)return null;const o=this.#h(e,t,n,2);return 1!==o.length?null:o[0]};#h=(e,t,n,o=0)=>{const s=[];if(!t&&!n)throw new Error("Both role and name are empty");const i=Boolean(t),r=Boolean(n),c=e=>{const l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);do{const e=l.currentNode;if(e.shadowRoot&&c(e.shadowRoot),!(e instanceof ShadowRoot)&&(!i||this.#i.getAccessibleName(e)===t)&&(!r||this.#i.getAccessibleRole(e)===n)&&(s.push(e),o&&s.length>=o))return}while(l.nextNode())};return c(e instanceof Document?document.documentElement:e),s};compute=e=>{let t,n=e;const o=[];for(;n;){const s=this.#i.getAccessibleRole(n),i=this.#i.getAccessibleName(n);if(s||i){if(o.unshift({name:i,role:s}),t=this.#r(o,n!==e),t)break;n!==e&&o.shift()}else if(n===e)break;n=n.parentNode,n instanceof ShadowRoot&&(n=n.host)}return t}}class s{value;optimized;constructor(e,t){this.value=e,this.optimized=t||!1}toString(){return this.value}}const i=e=>`#${CSS.escape(e)}`,r=(e,t)=>`[${e}='${CSS.escape(t)}']`,c=([e,t],n)=>{n.self??=e=>e;let o,s,i=n.inc(e);do{for(o=n.valueOf(e),s=!0;i!==t;)if(e=n.self(i),i=n.inc(e),!n.gte(o,i)){s=!1;break}}while(!s);return o};class l{#d=[[]];#u;#f=0;constructor(e=[]){this.#u=e}inc(e){return e.parentNode??e.getRootNode()}valueOf(e){const t=((e,t=[])=>{if(!(e instanceof Element))return;for(const n of t){const t=e.getAttribute(n);if(t)return new s(r(n,t),!0)}if((e=>Boolean(e.id)&&1===e.getRootNode().querySelectorAll(i(e.id)).length)(e))return new s(i(e.id),!0);const n=e.tagName.toLowerCase();switch(e.tagName){case"BODY":case"HEAD":case"HTML":return new s(n,!0)}const o=e.parentNode;if(!o)return new s(n,!0);const c=o.children;if(((e,t)=>{for(const n of t)if(n!==e&&n.tagName===e.tagName)return!1;return!0})(e,c))return new s(n,!0);if(e instanceof HTMLInputElement&&((e,t)=>{for(const n of t)if(n!==e&&n instanceof HTMLInputElement&&n.type===e.type)return!1;return!0})(e,c))return new s(((e,t)=>`${e}${r("type",t)}`)(n,e.type),!0);const l=((e,t)=>{const n=new Set(e.classList);for(const o of t)if(o!==e){for(const e of o.classList)n.delete(e);if(0===n.size)break}if(n.size>0)return n.values().next().value})(e,c);return void 0!==l?new s(((e,t)=>`${e}.${CSS.escape(t)}`)(n,l),!0):new s(((e,t)=>`${e}:nth-of-type(${t+1})`)(n,((e,t)=>{let n=0;for(const o of t){if(o===e)return n;o.tagName===e.tagName&&++n}throw new Error("Node not found in children")})(e,c)),!1)})(e,this.#u);if(!t)throw new Error("Node is not an element");return this.#f>1?this.#d.unshift([t]):this.#d[0].unshift(t),this.#f=0,this.#d.map((e=>e.join(" > "))).join(" ")}gte(e,t){return++this.#f,1===t.querySelectorAll(e).length}}class a{#w=[[]];#u;#f=0;constructor(e=[]){this.#u=e}inc(e){return e.getRootNode()}self(e){return e instanceof ShadowRoot?e.host:e}valueOf(e){const t=c([e,e.getRootNode()],new l(this.#u));return this.#f>1?this.#w.unshift([t]):this.#w[0].unshift(t),this.#f=0,this.#w}gte(e,t){return++this.#f,1===((e,t)=>{const n=[],o=e=>{const s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);do{const i=s.currentNode;i.shadowRoot&&o(i.shadowRoot),i instanceof ShadowRoot||i!==e&&i.matches(t)&&n.push(i)}while(s.nextNode())};return e instanceof Document&&(e=e.documentElement),o(e),n})(t,e[0][0]).length}}const h=new Set(["checkbox","image","radio"]),d=new Set(["SCRIPT","STYLE"]),u=e=>!d.has(e.nodeName)&&!document.head?.contains(e),f=new WeakMap,w=e=>{for(;e;)f.delete(e),e=e instanceof ShadowRoot?e.host:e.parentNode},m=new WeakSet,g=new MutationObserver((e=>{for(const t of e)w(t.target)})),p=e=>{let t=f.get(e);if(t)return t;if(t={full:"",immediate:[]},!u(e))return t;let n="";if((o=e)instanceof HTMLSelectElement||o instanceof HTMLTextAreaElement||o instanceof HTMLInputElement&&!h.has(o.type))t.full=e.value,t.immediate.push(e.value),e.addEventListener("input",(e=>{w(e.target)}),{once:!0,capture:!0});else{for(let o=e.firstChild;o;o=o.nextSibling)o.nodeType!==Node.TEXT_NODE?(n&&t.immediate.push(n),n="",o.nodeType===Node.ELEMENT_NODE&&(t.full+=p(o).full)):(t.full+=o.nodeValue??"",n+=o.nodeValue??"");n&&t.immediate.push(n),e instanceof Element&&e.shadowRoot&&(t.full+=p(e.shadowRoot).full),m.has(e)||(g.observe(e,{childList:!0,characterData:!0,subtree:!0}),m.add(e))}var o;return f.set(e,t),t},E=function*(e,t){let n=!1;for(const o of e.childNodes)if(o instanceof Element&&u(o)){let e;e=o.shadowRoot?E(o.shadowRoot,t):E(o,t);for(const t of e)yield t,n=!0}!n&&e instanceof Element&&u(e)&&p(e).full.includes(t)&&(yield e)},S=(e,t=1/0)=>{const n=[];for(const o of e){if(t<=0)break;n.push(o),--t}return n},N=(e,t)=>`//*[@${e}=${JSON.stringify(t)}]`,T=(e,t,n=[])=>{let o;switch(e.nodeType){case Node.ELEMENT_NODE:if(!(e instanceof Element))return;if(t)for(const t of n)if(o=e.getAttribute(t)??"",o)return new s(N(t,o),!0);if(e.id)return new s(N("id",e.id),!0);o=e.localName;break;case Node.ATTRIBUTE_NODE:o="@"+e.nodeName;break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:o="text()";break;case Node.PROCESSING_INSTRUCTION_NODE:o="processing-instruction()";break;case Node.COMMENT_NODE:o="comment()";break;case Node.DOCUMENT_NODE:default:o=""}const i=v(e);return i>0&&(o+=`[${i}]`),new s(o,e.nodeType===Node.DOCUMENT_NODE)},v=e=>{function t(e,t){return e===t||(e instanceof Element&&t instanceof Element?e.localName===t.localName:e.nodeType===t.nodeType||(e.nodeType===Node.CDATA_SECTION_NODE?Node.TEXT_NODE:e.nodeType)===(t.nodeType===Node.CDATA_SECTION_NODE?Node.TEXT_NODE:t.nodeType))}const n=e.parentNode?e.parentNode.children:null;if(!n)return 0;let o;for(let s=0;s<n.length;++s)if(t(e,n[s])&&n[s]!==e){o=!0;break}if(!o)return 0;let s=1;for(let o=0;o<n.length;++o)if(t(e,n[o])){if(n[o]===e)return s;++s}throw new Error("This is impossible; a child must be the child of the parent")},y=(e,t)=>{if(void 0!==e)return"string"==typeof e?`${t}/${e}`:e.map((e=>`${t}/${e}`))};class b{#m=["data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing"];#i;#g;#p=new n;#E;constructor(e,t,n="",o){this.#i=e,this.#g=t;let s=["aria","css","xpath","pierce","text"];n&&(this.#m.unshift(n),s=["css","xpath","pierce","aria","text"]),this.#E=s.filter((e=>!o||o.includes(e))).map((e=>{switch(e){case"css":return this.getCSSSelector.bind(this);case"xpath":return this.getXPathSelector.bind(this);case"pierce":return this.getPierceSelector.bind(this);case"aria":return this.getARIASelector.bind(this);case"text":return this.getTextSelector.bind(this);default:throw new Error("Unknown selector type: "+e)}}))}getSelectors(e){const t=[];for(const n of this.#E){const o=n(e);o&&t.push(o)}return t}getCSSSelector(e){return this.#g.timed(`getCSSSelector: ${this.#p.getOrInsert(e)} ${e.nodeName}`,(()=>((e,t)=>{const n=[];try{let o;for(;e instanceof Element;)o=e.getRootNode(),n.unshift(c([e,o],new l(t))),e=o instanceof ShadowRoot?o.host:o}catch{return}return n})(e,this.#m)))}getTextSelector(e){return this.#g.timed(`getTextSelector: ${this.#p.getOrInsert(e)} ${e.nodeName}`,(()=>y((e=>{const t=p(e).full.trim();if(!t)return;if(t.length<=12){const n=S(E(document,t),2);if(1!==n.length||n[0]!==e)return;return[t]}if(t.length>64)return;let n=12,o=t.length;for(;n<=o;){const s=n+(o-n>>2),i=S(E(document,t.slice(0,s)),2);1!==i.length||i[0]!==e?n=s+1:o=s-1}if(o===t.length)return;const s=o+1,i=t.slice(s,s+64);return[t.slice(0,s+i.search(/ |$/))]})(e),"text")))}getXPathSelector(e){return this.#g.timed(`getXPathSelector: ${this.#p.getOrInsert(e)} ${e.nodeName}`,(()=>y(((e,t,n)=>{if(e.nodeType===Node.DOCUMENT_NODE)return"/";const o=[],s=[];let i=e;for(;i!==document&&i;){const e=T(i,true,n);if(!e)return;s.unshift(e),i=e.optimized?i.getRootNode():i.parentNode,i instanceof ShadowRoot&&(o.unshift((s[0].optimized?"":"/")+s.join("/")),s.splice(0,s.length),i=i.host)}return s.length&&o.unshift((s[0].optimized?"":"/")+s.join("/")),!o.length||o.length>1?void 0:o})(e,0,this.#m),"xpath")))}getPierceSelector(e){return this.#g.timed(`getPierceSelector: ${this.#p.getOrInsert(e)} ${e.nodeName}`,(()=>y(((e,t)=>{try{const n=new a(t);return c([e,document],n).flat()}catch{return}})(e,this.#m),"pierce")))}getARIASelector(e){return this.#g.timed(`getARIASelector: ${this.#p.getOrInsert(e)} ${e.nodeName}`,(()=>y(((e,t)=>new o(t).compute(e))(e,this.#i),"aria")))}}const k=e=>{e.preventDefault(),e.stopImmediatePropagation()},R=(e,t)=>{const n=t.getBoundingClientRect();return{offsetX:e.clientX-n.x,offsetY:e.clientY-n.y}},O=e=>{for(const t of e.composedPath()){if(!(t instanceof Element))continue;const e=t.getBoundingClientRect();if(0!==e.width&&0!==e.height)return t}throw new Error(`No target is found in event of type ${e.type}`)},L=e=>Object.values(e).filter((e=>!!e)).length.toString();class C{static defaultSetupOptions=Object.freeze({debug:!1,allowUntrustedEvents:!1,selectorTypesToRecord:["aria","css","text","xpath","pierce"]});#S;#N=e=>e.isTrusted;#T=[];#g;constructor(e,n=C.defaultSetupOptions){this.#g=new t(n.debug?"debug":"silent"),this.#g.log("creating a RecordingClient"),this.#S=new b(e,this.#g,n.selectorAttribute,n.selectorTypesToRecord),n.allowUntrustedEvents&&(this.#N=()=>!0),this.#T=n.stopShortcuts??[]}start=()=>{this.#g.log("Setting up recording listeners"),window.addEventListener("keydown",this.#v,!0),window.addEventListener("beforeinput",this.#y,!0),window.addEventListener("input",this.#b,!0),window.addEventListener("keyup",this.#k,!0),window.addEventListener("pointerdown",this.#R,!0),window.addEventListener("click",this.#O,!0),window.addEventListener("auxclick",this.#O,!0),window.addEventListener("beforeunload",this.#L,!0)};stop=()=>{this.#g.log("Tearing down client listeners"),window.removeEventListener("keydown",this.#v,!0),window.removeEventListener("beforeinput",this.#y,!0),window.removeEventListener("input",this.#b,!0),window.removeEventListener("keyup",this.#k,!0),window.removeEventListener("pointerdown",this.#R,!0),window.removeEventListener("click",this.#O,!0),window.removeEventListener("auxclick",this.#O,!0),window.removeEventListener("beforeunload",this.#L,!0)};getSelectors=e=>this.#S.getSelectors(e);getCSSSelector=e=>this.#S.getCSSSelector(e);getTextSelector=e=>this.#S.getTextSelector(e);queryCSSSelectorAllForTesting=e=>(e=>{if("string"==typeof e)e=[e];else if(0===e.length)return[];let t=[[document.documentElement]];do{const n=e.shift(),o=[];for(const e of t)for(const t of e){const e=(t.shadowRoot??t).querySelectorAll(n);e.length>0&&o.push(e)}t=o}while(e.length>0&&t.length>0);return t.flatMap((e=>[...e]))})(e);#C=e=>{for(const t of this.#T??[])if(e.shiftKey===t.shift&&e.ctrlKey===t.ctrl&&e.metaKey===t.meta&&e.keyCode===t.keyCode)return this.stop(),k(e),window.stopShortcut(L(t)),!0;return!1};#$={element:document.documentElement,selectors:[]};#D=e=>{const t=e.composedPath()[0];!function(e){if(!e)throw new Error("Assertion failed!")}(t instanceof Element),this.#$.element!==t&&(this.#$={element:t,selectors:this.getSelectors(t)})};#v=e=>{this.#N(e)&&(this.#C(e)||(this.#D(e),this.#x({type:"keyDown",key:e.key})))};#y=e=>{this.#N(e)&&this.#D(e)};#b=e=>{if(!this.#N(e))return;if(this.#D(e),(e=>{if(e instanceof HTMLInputElement)switch(e.type){case"checkbox":case"radio":return!0}return!1})(this.#$.element))return;const{element:t,selectors:n}=this.#$;this.#x({type:"change",selectors:n,value:"value"in t?t.value:t.textContent})};#k=e=>{this.#N(e)&&this.#x({type:"keyUp",key:e.key})};#A={element:document.documentElement,selectors:[]};#M=e=>{const t=O(e);this.#A.element!==t&&(this.#A={element:t,selectors:this.#S.getSelectors(t)})};#I=0;#R=e=>{this.#N(e)&&(this.#I=e.timeStamp,this.#M(e))};#O=e=>{if(!this.#N(e))return;this.#M(e);const t=((e,t)=>{let n;if(e instanceof PointerEvent)switch(e.pointerType){case"mouse":break;case"pen":case"touch":n=e.pointerType;break;default:return}const{offsetX:o,offsetY:s}=R(e,t);if(!(o<0||s<0))return{button:["auxiliary","secondary","back","forward"][e.button-1],deviceType:n,offsetX:o,offsetY:s}})(e,this.#A.element);if(!t)return;const n=e.timeStamp-this.#I;this.#x({type:2===e.detail?"doubleClick":"click",selectors:this.#A.selectors,duration:n>350?n:void 0,...t})};#L=e=>{this.#g.log("Unloading..."),this.#N(e)&&this.#x({type:"beforeUnload"})};#x=e=>{const t=JSON.stringify(e);this.#g.log(`Adding step: ${t}`),window.addStep(t)}}class ${#g;#S;constructor(e,n="",o=!0){this.#g=new t(o?"debug":"silent"),this.#g.log("Creating a SelectorPicker"),this.#S=new b(e,this.#g,n)}#_=e=>{k(e);const t=O(e);window.captureSelectors(JSON.stringify({selectors:this.#S.getSelectors(t),...R(e,t)}))};start=()=>{this.#g.log("Setting up selector listeners"),window.addEventListener("click",this.#_,!0),window.addEventListener("mousedown",k,!0),window.addEventListener("mouseup",k,!0)};stop=()=>{this.#g.log("Tearing down selector listeners"),window.removeEventListener("click",this.#_,!0),window.removeEventListener("mousedown",k,!0),window.removeEventListener("mouseup",k,!0)}}window.DevToolsRecorder||(window.DevToolsRecorder=new class{#B;startRecording(e,t){if(this.#B)throw new Error("Recording client already started.");if(this.#P)throw new Error("Selector picker is active.");this.#B=new C(e,t),this.#B.start()}stopRecording(){if(!this.#B)throw new Error("Recording client was not started.");this.#B.stop(),this.#B=void 0}get recordingClientForTesting(){if(!this.#B)throw new Error("Recording client was not started.");return this.#B}#P;startSelectorPicker(e,t,n){if(this.#P)throw new Error("Selector picker already started.");this.#B&&this.#B.stop(),this.#P=new $(e,t,n),this.#P.start()}stopSelectorPicker(){if(!this.#P)throw new Error("Selector picker was not started.");this.#P.stop(),this.#P=void 0,this.#B&&this.#B.start()}})}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=()=>{};class t{#e;#t;#n;constructor(t){if("silent"===t)this.#e=e,this.#t=e,this.#n=e;else this.#e=console.log,this.#t=console.time,this.#n=console.timeEnd}log(...e){this.#e(...e)}timed(e,t){this.#t(e);const n=t();return this.#n(e),n}}class n{#o=new WeakMap;#r=1;getOrInsert=e=>{const t=this.#o.get(e);return void 0!==t?t:(this.#o.set(e,this.#r),this.#r++,this.#r-1)}}class o{#i;constructor(e){this.#i=e}#s=(e,t)=>{const n=[];let o=document;for(const r of e){let e=this.#c(o,r.name);if(e)n.push(r.name),o=e;else if(t&&(e=this.#l(o,r.role),e))n.push(`[role="${r.role}"]`),o=e;else{if(e=this.#a(o,r.name,r.role),!e)return;n.push(`${r.name}[role="${r.role}"]`),o=e}}return n};#c=(e,t)=>{if(!t)return null;const n=this.#d(e,t,void 0,2);return 1!==n.length?null:n[0]};#l=(e,t)=>{if(!t)return null;const n=this.#d(e,void 0,t,2);return 1!==n.length?null:n[0]};#a=(e,t,n)=>{if(!n||!t)return null;const o=this.#d(e,t,n,2);return 1!==o.length?null:o[0]};#d=(e,t,n,o=0)=>{const r=[];if(!t&&!n)throw new Error("Both role and name are empty");const i=Boolean(t),s=Boolean(n),c=e=>{const l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);do{const e=l.currentNode;if(e.shadowRoot&&c(e.shadowRoot),!(e instanceof ShadowRoot)&&(!i||this.#i.getAccessibleName(e)===t)&&(!s||this.#i.getAccessibleRole(e)===n)&&(r.push(e),o&&r.length>=o))return}while(l.nextNode())};return c(e instanceof Document?document.documentElement:e),r};compute=e=>{let t,n=e;const o=[];for(;n;){const r=this.#i.getAccessibleRole(n),i=this.#i.getAccessibleName(n);if(r||i){if(o.unshift({name:i,role:r}),t=this.#s(o,n!==e),t)break;n!==e&&o.shift()}else if(n===e)break;n=n.parentNode,n instanceof ShadowRoot&&(n=n.host)}return t}}class r{value;optimized;constructor(e,t){this.value=e,this.optimized=t||!1}toString(){return this.value}}const i=e=>`#${CSS.escape(e)}`,s=(e,t)=>`[${e}='${CSS.escape(t)}']`,c=(e,t=[])=>{if(!(e instanceof Element))return;for(const n of t){const t=e.getAttribute(n);if(t)return new r(s(n,t),!0)}if((e=>Boolean(e.id)&&1===e.getRootNode().querySelectorAll(i(e.id)).length)(e))return new r(i(e.id),!0);const n=e.tagName.toLowerCase();switch(e.tagName){case"BODY":case"HEAD":case"HTML":return new r(n,!0)}const o=e.parentNode;if(!o)return new r(n,!0);const c=o.children;if(((e,t)=>{for(const n of t)if(n!==e&&n.tagName===e.tagName)return!1;return!0})(e,c))return new r(n,!0);if(e instanceof HTMLInputElement&&((e,t)=>{for(const n of t)if(n!==e&&n instanceof HTMLInputElement&&n.type===e.type)return!1;return!0})(e,c))return new r(((e,t)=>`${e}${s("type",t)}`)(n,e.type),!0);const l=((e,t)=>{const n=new Set(e.classList);for(const o of t)if(o!==e){for(const e of o.classList)n.delete(e);if(0===n.size)break}if(n.size>0)return n.values().next().value})(e,c);return void 0!==l?new r(((e,t)=>`${e}.${CSS.escape(t)}`)(n,l),!0):new r(((e,t)=>`${e}:nth-of-type(${t+1})`)(n,((e,t)=>{let n=0;for(const o of t){if(o===e)return n;o.tagName===e.tagName&&++n}throw new Error("Node not found in children")})(e,c)),!1)},l=([e,t],n)=>{n.self??=e=>e;let o,r,i=n.inc(e);do{for(o=n.valueOf(e),r=!0;i!==t;)if(e=n.self(i),i=n.inc(e),!n.gte(o,i)){r=!1;break}}while(!r);return o};class a{#u=[[]];#h;#f=0;constructor(e=[]){this.#h=e}inc(e){return e.parentNode??e.getRootNode()}valueOf(e){const t=c(e,this.#h);if(!t)throw new Error("Node is not an element");return this.#f>1?this.#u.unshift([t]):this.#u[0].unshift(t),this.#f=0,this.#u.map((e=>e.join(" > "))).join(" ")}gte(e,t){return++this.#f,1===t.querySelectorAll(e).length}}const d=(e,t)=>{const n=[],o=e=>{const r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);do{const i=r.currentNode;i.shadowRoot&&o(i.shadowRoot),i instanceof ShadowRoot||i!==e&&i.matches(t)&&n.push(i)}while(r.nextNode())};return e instanceof Document&&(e=e.documentElement),o(e),n};class u{#g=[[]];#h;#f=0;constructor(e=[]){this.#h=e}inc(e){return e.getRootNode()}self(e){return e instanceof ShadowRoot?e.host:e}valueOf(e){const t=l([e,e.getRootNode()],new a(this.#h));return this.#f>1?this.#g.unshift([t]):this.#g[0].unshift(t),this.#f=0,this.#g}gte(e,t){return++this.#f,1===d(t,e[0][0]).length}}const h=new Set(["checkbox","image","radio"]),f=new Set(["SCRIPT","STYLE"]),g=e=>!f.has(e.nodeName)&&!document.head?.contains(e),p=new WeakMap,m=e=>{for(;e;)p.delete(e),e=e instanceof ShadowRoot?e.host:e.parentNode},w=new WeakSet,E=new MutationObserver((e=>{for(const t of e)m(t.target)})),T=e=>{let t=p.get(e);if(t)return t;if(t={full:"",immediate:[]},!g(e))return t;let n="";if((o=e)instanceof HTMLSelectElement||o instanceof HTMLTextAreaElement||o instanceof HTMLInputElement&&!h.has(o.type))t.full=e.value,t.immediate.push(e.value),e.addEventListener("input",(e=>{m(e.target)}),{once:!0,capture:!0});else{for(let o=e.firstChild;o;o=o.nextSibling)o.nodeType!==Node.TEXT_NODE?(n&&t.immediate.push(n),n="",o.nodeType===Node.ELEMENT_NODE&&(t.full+=T(o).full)):(t.full+=o.nodeValue??"",n+=o.nodeValue??"");n&&t.immediate.push(n),e instanceof Element&&e.shadowRoot&&(t.full+=T(e.shadowRoot).full),w.has(e)||(E.observe(e,{childList:!0,characterData:!0,subtree:!0}),w.add(e))}var o;return p.set(e,t),t},S=function*(e,t){let n=!1;for(const o of e.childNodes)if(o instanceof Element&&g(o)){let e;e=o.shadowRoot?S(o.shadowRoot,t):S(o,t);for(const t of e)yield t,n=!0}if(!n&&e instanceof Element&&g(e)){T(e).full.includes(t)&&(yield e)}},y=(e,t=1/0)=>{const n=[];for(const o of e){if(t<=0)break;n.push(o),--t}return n},N=(e,t)=>`//*[@${e}=${JSON.stringify(t)}]`,v=(e,t,n=[])=>{let o;switch(e.nodeType){case Node.ELEMENT_NODE:if(!(e instanceof Element))return;if(t)for(const t of n)if(o=e.getAttribute(t)??"",o)return new r(N(t,o),!0);if(e.id)return new r(N("id",e.id),!0);o=e.localName;break;case Node.ATTRIBUTE_NODE:o="@"+e.nodeName;break;case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:o="text()";break;case Node.PROCESSING_INSTRUCTION_NODE:o="processing-instruction()";break;case Node.COMMENT_NODE:o="comment()";break;case Node.DOCUMENT_NODE:default:o=""}const i=b(e);return i>0&&(o+=`[${i}]`),new r(o,e.nodeType===Node.DOCUMENT_NODE)},b=e=>{function t(e,t){if(e===t)return!0;if(e instanceof Element&&t instanceof Element)return e.localName===t.localName;if(e.nodeType===t.nodeType)return!0;return(e.nodeType===Node.CDATA_SECTION_NODE?Node.TEXT_NODE:e.nodeType)===(t.nodeType===Node.CDATA_SECTION_NODE?Node.TEXT_NODE:t.nodeType)}const n=e.parentNode?e.parentNode.children:null;if(!n)return 0;let o;for(let r=0;r<n.length;++r)if(t(e,n[r])&&n[r]!==e){o=!0;break}if(!o)return 0;let r=1;for(let o=0;o<n.length;++o)if(t(e,n[o])){if(n[o]===e)return r;++r}throw new Error("This is impossible; a child must be the child of the parent")},k=(e,t)=>{if(void 0!==e)return"string"==typeof e?`${t}/${e}`:e.map((e=>`${t}/${e}`))};class C{#p=["data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing"];#i;#m;#w=new n;#E;constructor(e,t,n="",o){this.#i=e,this.#m=t;let r=["aria","css","xpath","pierce","text"];n&&(this.#p.unshift(n),r=["css","xpath","pierce","aria","text"]),this.#E=r.filter((e=>!o||o.includes(e))).map((e=>{switch(e){case"css":return this.getCSSSelector.bind(this);case"xpath":return this.getXPathSelector.bind(this);case"pierce":return this.getPierceSelector.bind(this);case"aria":return this.getARIASelector.bind(this);case"text":return this.getTextSelector.bind(this);default:throw new Error("Unknown selector type: "+e)}}))}getSelectors(e){const t=[];for(const n of this.#E){const o=n(e);o&&t.push(o)}return t}getCSSSelector(e){return this.#m.timed(`getCSSSelector: ${this.#w.getOrInsert(e)} ${e.nodeName}`,(()=>((e,t)=>{const n=[];try{let o;for(;e instanceof Element;)o=e.getRootNode(),n.unshift(l([e,o],new a(t))),e=o instanceof ShadowRoot?o.host:o}catch{return}return n})(e,this.#p)))}getTextSelector(e){return this.#m.timed(`getTextSelector: ${this.#w.getOrInsert(e)} ${e.nodeName}`,(()=>k((e=>{const t=T(e).full.trim();if(!t)return;if(t.length<=12){const n=y(S(document,t),2);if(1!==n.length||n[0]!==e)return;return[t]}if(t.length>64)return;let n=12,o=t.length;for(;n<=o;){const r=n+(o-n>>2),i=y(S(document,t.slice(0,r)),2);1!==i.length||i[0]!==e?n=r+1:o=r-1}if(o===t.length)return;const r=o+1,i=t.slice(r,r+64);return[t.slice(0,r+i.search(/ |$/))]})(e),"text")))}getXPathSelector(e){return this.#m.timed(`getXPathSelector: ${this.#w.getOrInsert(e)} ${e.nodeName}`,(()=>k(((e,t,n)=>{if(e.nodeType===Node.DOCUMENT_NODE)return"/";const o=[],r=[];let i=e;for(;i!==document&&i;){const e=v(i,t,n);if(!e)return;r.unshift(e),i=e.optimized?i.getRootNode():i.parentNode,i instanceof ShadowRoot&&(o.unshift((r[0].optimized?"":"/")+r.join("/")),r.splice(0,r.length),i=i.host)}return r.length&&o.unshift((r[0].optimized?"":"/")+r.join("/")),!o.length||o.length>1?void 0:o})(e,!0,this.#p),"xpath")))}getPierceSelector(e){return this.#m.timed(`getPierceSelector: ${this.#w.getOrInsert(e)} ${e.nodeName}`,(()=>k(((e,t)=>{try{const n=new u(t);return l([e,document],n).flat()}catch{return}})(e,this.#p),"pierce")))}getARIASelector(e){return this.#m.timed(`getARIASelector: ${this.#w.getOrInsert(e)} ${e.nodeName}`,(()=>k(((e,t)=>new o(t).compute(e))(e,this.#i),"aria")))}}const I=e=>{e.preventDefault(),e.stopImmediatePropagation()},O=(e,t)=>{const n=t.getBoundingClientRect();return{offsetX:e.clientX-n.x,offsetY:e.clientY-n.y}},A=e=>{for(const t of e.composedPath()){if(!(t instanceof Element))continue;const e=t.getBoundingClientRect();if(0!==e.width&&0!==e.height)return t}throw new Error(`No target is found in event of type ${e.type}`)},R=e=>Object.values(e).filter((e=>!!e)).length.toString();class D{static defaultSetupOptions=Object.freeze({debug:!1,allowUntrustedEvents:!1,selectorTypesToRecord:["aria","css","text","xpath","pierce"]});#T;#S=e=>e.isTrusted;#y=[];#m;constructor(e,n=D.defaultSetupOptions){this.#m=new t(n.debug?"debug":"silent"),this.#m.log("creating a RecordingClient"),this.#T=new C(e,this.#m,n.selectorAttribute,n.selectorTypesToRecord),n.allowUntrustedEvents&&(this.#S=()=>!0),this.#y=n.stopShortcuts??[]}start=()=>{this.#m.log("Setting up recording listeners"),window.addEventListener("keydown",this.#N,!0),window.addEventListener("beforeinput",this.#v,!0),window.addEventListener("input",this.#b,!0),window.addEventListener("keyup",this.#k,!0),window.addEventListener("pointerdown",this.#C,!0),window.addEventListener("click",this.#I,!0),window.addEventListener("auxclick",this.#I,!0),window.addEventListener("beforeunload",this.#O,!0)};stop=()=>{this.#m.log("Tearing down client listeners"),window.removeEventListener("keydown",this.#N,!0),window.removeEventListener("beforeinput",this.#v,!0),window.removeEventListener("input",this.#b,!0),window.removeEventListener("keyup",this.#k,!0),window.removeEventListener("pointerdown",this.#C,!0),window.removeEventListener("click",this.#I,!0),window.removeEventListener("auxclick",this.#I,!0),window.removeEventListener("beforeunload",this.#O,!0)};getSelectors=e=>this.#T.getSelectors(e);getCSSSelector=e=>this.#T.getCSSSelector(e);getTextSelector=e=>this.#T.getTextSelector(e);queryCSSSelectorAllForTesting=e=>(e=>{if("string"==typeof e)e=[e];else if(0===e.length)return[];let t=[[document.documentElement]];do{const n=e.shift(),o=[];for(const e of t)for(const t of e){const e=(t.shadowRoot??t).querySelectorAll(n);e.length>0&&o.push(e)}t=o}while(e.length>0&&t.length>0);return t.flatMap((e=>[...e]))})(e);#A=e=>{for(const t of this.#y??[])if(e.shiftKey===t.shift&&e.ctrlKey===t.ctrl&&e.metaKey===t.meta&&e.keyCode===t.keyCode)return this.stop(),I(e),window.stopShortcut(R(t)),!0;return!1};#R={element:document.documentElement,selectors:[]};#D=e=>{const t=e.composedPath()[0];!function(e){if(!e)throw new Error("Assertion failed!")}(t instanceof Element),this.#R.element!==t&&(this.#R={element:t,selectors:this.getSelectors(t)})};#N=e=>{this.#S(e)&&(this.#A(e)||(this.#D(e),this.#L({type:"keyDown",key:e.key})))};#v=e=>{this.#S(e)&&this.#D(e)};#b=e=>{if(!this.#S(e))return;if(this.#D(e),(e=>{if(e instanceof HTMLInputElement)switch(e.type){case"checkbox":case"radio":return!0}return!1})(this.#R.element))return;const{element:t,selectors:n}=this.#R;this.#L({type:"change",selectors:n,value:"value"in t?t.value:t.textContent})};#k=e=>{this.#S(e)&&this.#L({type:"keyUp",key:e.key})};#P={element:document.documentElement,selectors:[]};#x=e=>{const t=A(e);this.#P.element!==t&&(this.#P={element:t,selectors:this.#T.getSelectors(t)})};#$=0;#C=e=>{this.#S(e)&&(this.#$=e.timeStamp,this.#x(e))};#I=e=>{if(!this.#S(e))return;this.#x(e);const t=((e,t)=>{let n;if(e instanceof PointerEvent)switch(e.pointerType){case"mouse":break;case"pen":case"touch":n=e.pointerType;break;default:return}const{offsetX:o,offsetY:r}=O(e,t);if(!(o<0||r<0))return{button:["auxiliary","secondary","back","forward"][e.button-1],deviceType:n,offsetX:o,offsetY:r}})(e,this.#P.element);if(!t)return;const n=e.timeStamp-this.#$;this.#L({type:2===e.detail?"doubleClick":"click",selectors:this.#P.selectors,duration:n>350?n:void 0,...t})};#O=e=>{this.#m.log("Unloading..."),this.#S(e)&&this.#L({type:"beforeUnload"})};#L=e=>{const t=JSON.stringify(e);this.#m.log(`Adding step: ${t}`),window.addStep(t)}}class L{#m;#T;constructor(e,n="",o=!0){this.#m=new t(o?"debug":"silent"),this.#m.log("Creating a SelectorPicker"),this.#T=new C(e,this.#m,n)}#_=e=>{I(e);const t=A(e);window.captureSelectors(JSON.stringify({selectors:this.#T.getSelectors(t),...O(e,t)}))};start=()=>{this.#m.log("Setting up selector listeners"),window.addEventListener("click",this.#_,!0),window.addEventListener("mousedown",I,!0),window.addEventListener("mouseup",I,!0)};stop=()=>{this.#m.log("Tearing down selector listeners"),window.removeEventListener("click",this.#_,!0),window.removeEventListener("mousedown",I,!0),window.removeEventListener("mouseup",I,!0)}}class P{#B;startRecording(e,t){if(this.#B)throw new Error("Recording client already started.");if(this.#M)throw new Error("Selector picker is active.");this.#B=new D(e,t),this.#B.start()}stopRecording(){if(!this.#B)throw new Error("Recording client was not started.");this.#B.stop(),this.#B=void 0}get recordingClientForTesting(){if(!this.#B)throw new Error("Recording client was not started.");return this.#B}#M;startSelectorPicker(e,t,n){if(this.#M)throw new Error("Selector picker already started.");this.#B&&this.#B.stop(),this.#M=new L(e,t,n),this.#M.start()}stopSelectorPicker(){if(!this.#M)throw new Error("Selector picker was not started.");this.#M.stop(),this.#M=void 0,this.#B&&this.#B.start()}}window.DevToolsRecorder||(window.DevToolsRecorder=new P);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"../../../core/common/common.js";import*as t from"../../../core/i18n/i18n.js";import*as r from"../../../third_party/puppeteer-replay/puppeteer-replay.js";import{AssertedEventType as s,SelectorType as n,StepType as i}from"../../../third_party/puppeteer-replay/puppeteer-replay.js";import*as a from"../../../ui/legacy/legacy.js";import*as o from"../../../core/sdk/sdk.js";import*as c from"../../../services/puppeteer/puppeteer.js";import*as d from"../../../core/platform/platform.js";import*as l from"../util/util.js";var g=Object.freeze({__proto__:null}),p=Object.freeze({__proto__:null,AssertedEventType:s,SelectorType:n,StepType:i});const h={defaultRecordingName:"Recording {DATE} at {TIME}"},u=t.i18n.registerUIStrings("panels/recorder/models/RecorderSettings.ts",h),m=t.i18n.getLocalizedString.bind(void 0,u);var f=Object.freeze({__proto__:null,RecorderSettings:class{#e=e.Settings.Settings.instance().createSetting("recorder-selector-attribute","");#t=e.Settings.Settings.instance().createSetting("recorder-panel-replay-speed","normal");#r=e.Settings.Settings.instance().createSetting("recorder-panel-replay-extension","");#s=new Map;#n=e.Settings.Settings.instance().createSetting("recorder-preferred-copy-format","json");constructor(){for(const t of Object.values(n))this.#s.set(t,e.Settings.Settings.instance().createSetting(`recorder-${t}-selector-enabled`,!0))}get selectorAttribute(){return this.#e.get()}set selectorAttribute(e){this.#e.set(e)}get speed(){return this.#t.get()}set speed(e){this.#t.set(e)}get replayExtension(){return this.#r.get()}set replayExtension(e){this.#r.set(e)}get defaultTitle(){const e=new Date;return m(h.defaultRecordingName,{DATE:e.toLocaleDateString(),TIME:e.toLocaleTimeString()})}get defaultSelectors(){return Object.values(n).filter((e=>this.getSelectorByType(e)))}getSelectorByType(e){return this.#s.get(e)?.get()}setSelectorByType(e,t){this.#s.get(e)?.set(t)}get preferredCopyFormat(){return this.#n.get()}set preferredCopyFormat(e){this.#n.set(e)}}});var y=Object.freeze({__proto__:null,RecorderShortcutHelper:class{#i;#a=null;#o;constructor(e=200){this.#o=e,this.#i=new AbortController}#c(){this.#i.abort(),this.#a&&clearTimeout(this.#a),this.#i=new AbortController}#d(e){this.#c(),e()}handleShortcut(e){this.#c(),document.addEventListener("keyup",(t=>{a.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(t)&&this.#d(e)}),{signal:this.#i.signal}),this.#a=setTimeout((()=>this.#d(e)),this.#o)}}});const w={normal:0,slow:500,very_slow:1e3,extremely_slow:2e3};function v(t){return e.ParsedURL.schemeIs(t.url,"devtools:")||"page"===t.type||"background_page"===t.type||"webview"===t.type}class T extends e.ObjectWrapper.ObjectWrapper{userFlow;speed;timeout;breakpointIndexes;steppingOver=!1;aborted=!1;#l=Promise.withResolvers();#g=Promise.withResolvers();#p;constructor(e,{speed:t,breakpointIndexes:r=new Set}){super(),this.userFlow=e,this.speed=t,this.timeout=e.timeout||5e3,this.breakpointIndexes=r}#h(){this.#l.resolve(),this.#l=Promise.withResolvers()}static async connectPuppeteer(){const e=o.TargetManager.TargetManager.instance().rootTarget();if(!e)throw new Error("Could not find the root target");const t=o.TargetManager.TargetManager.instance().primaryPageTarget();if(!t)throw new Error("Could not find the primary page target");const r=t.model(o.ChildTargetManager.ChildTargetManager);if(!r)throw new Error("Could not get childTargetManager");const s=t.model(o.ResourceTreeModel.ResourceTreeModel);if(!s)throw new Error("Could not get resource tree model");if(!s.mainFrame)throw new Error("Could not find main frame");const n=e.model(o.ChildTargetManager.ChildTargetManager);if(!n)throw new Error("Could not find the child target manager class for the root target");const i=(await n.createParallelConnection((()=>{}))).connection,a=await r.getParentTargetId(),d=await n.getParentTargetId(),{page:l,browser:g,puppeteerConnection:p}=await c.PuppeteerConnection.PuppeteerConnectionHelper.connectPuppeteerToConnectionViaTab({connection:i,rootTargetId:d,isPageTargetCallback:v});if(!l)throw new Error("could not find main page!");return g.on("targetdiscovered",(e=>{"page"===e.type&&e.targetId!==a&&e.openerId===a&&p._createSession(e,!0)})),{page:l,browser:g}}static async disconnectPuppeteer(e){try{const t=await e.pages();for(const e of t){const t=e._client();await t.send("Network.disable"),await t.send("Page.disable"),await t.send("Log.disable"),await t.send("Performance.disable"),await t.send("Runtime.disable"),await t.send("Emulation.clearDeviceMetricsOverride"),await t.send("Emulation.setAutomationOverride",{enabled:!1});for(const t of e.frames()){const e=t.client;await e.send("Network.disable"),await e.send("Page.disable"),await e.send("Log.disable"),await e.send("Performance.disable"),await e.send("Runtime.disable"),await e.send("Emulation.setAutomationOverride",{enabled:!1})}}await e.disconnect()}catch(e){console.error("Error disconnecting Puppeteer",e.message)}}async stop(){await Promise.race([this.#l,this.#g])}get abortPromise(){return this.#g.promise}abort(){this.aborted=!0,this.#g.resolve(),this.#p?.abort()}disposeForTesting(){this.#l.resolve(),this.#g.resolve()}continue(){this.steppingOver=!1,this.#h()}stepOver(){this.steppingOver=!0,this.#h()}updateBreakpointIndexes(e){this.breakpointIndexes=e}async play(){const{page:t,browser:s}=await T.connectPuppeteer();this.aborted=!1;const n=this;class i extends r.PuppeteerRunnerExtension{#t;constructor(e,t,{timeout:r,speed:s}){super(e,t,{timeout:r}),this.#t=s}async beforeEachStep(e,t){const{resolve:r,promise:s}=Promise.withResolvers();n.dispatchEventToListeners("Step",{step:e,resolve:r}),await s;const i=t.steps.indexOf(e),a=n.steppingOver||n.breakpointIndexes.has(i),o="setViewport"!==e.type&&"navigate"!==e.type&&!n.aborted;a?(n.dispatchEventToListeners("Stop"),await n.stop(),n.dispatchEventToListeners("Continue")):o&&await Promise.race([new Promise((e=>setTimeout(e,w[this.#t]))),n.abortPromise])}async runStep(r,s){if(!e.ParsedURL.schemeIs(t?.url(),"devtools:")||"setViewport"!==r.type&&"navigate"!==r.type){if("navigate"===r.type&&e.ParsedURL.schemeIs(r.url,"chrome:"))throw new Error("Not allowed to replay on chrome:// URLs");await this.page.bringToFront(),await super.runStep(r,s)}}}const a=new i(s,t,{timeout:this.timeout,speed:this.speed});let o;this.#p=await r.createRunner(this.userFlow,a);try{await this.#p.run()}catch(e){o=e,console.error("Replay error",e.message)}finally{await T.disconnectPuppeteer(s)}this.aborted?this.dispatchEventToListeners("Abort"):o?this.dispatchEventToListeners("Error",o):this.dispatchEventToListeners("Done")}}var S=Object.freeze({__proto__:null,RecordingPlayer:T,defaultTimeout:5e3});function b(e){return{type:i.SetViewport,width:e.clientWidth,height:e.clientHeight,deviceScaleFactor:1,isMobile:!1,hasTouch:!1,isLandscape:!1}}function E(e){return{type:i.EmulateNetworkConditions,download:e.download,upload:e.upload,latency:e.latency}}function C(e,t){return"selectors"in e&&"selectors"in t?JSON.stringify(e.selectors)===JSON.stringify(t.selectors):!("selectors"in e)&&!("selectors"in t)}const R=r.parse,M=r.parseStep;var k=Object.freeze({__proto__:null,areSelectorsEqual:C,createEmulateNetworkConditionsStep:E,createViewportStep:b,maxTimeout:3e4,minTimeout:1,parse:R,parseStep:M});function A(e){return o.TargetManager.TargetManager.instance().primaryPageTarget()===e||"main"===e.id()?"main":e.inspectedURL()}function _(e,t){const r=[];for(;t;){const e=t.sameTargetParentFrame();if(!e)break;const s=e.childFrames.indexOf(t);r.unshift(s),t=e}return{target:A(e),frame:r}}async function N(e,t,r){const s=t.model(o.RuntimeModel.RuntimeModel).executionContexts(),n=t.model(o.ResourceTreeModel.ResourceTreeModel);for(const i of n.frames()){if(!s.find((e=>e.frameId===i.id)))continue;const{executionContextId:n}=await t.pageAgent().invoke_createIsolatedWorld({frameId:i.id,worldName:e});await t.runtimeAgent().invoke_evaluate({expression:r,includeCommandLineAPI:!0,contextId:n})}}var I=Object.freeze({__proto__:null,evaluateInAllFrames:N,findFrameIdByExecutionContext:function(e,t){for(const r of e){const e=r.model(o.RuntimeModel.RuntimeModel);if(e)for(const r of e.executionContexts())if(r.id===t&&void 0!==r.frameId)return r.frameId}},findTargetByExecutionContext:function(e,t){for(const r of e){const e=r.model(o.RuntimeModel.RuntimeModel);if(e)for(const s of e.executionContexts())if(s.id===t)return r}},getTargetFrameContext:_,getTargetName:A,isFrameTargetInfo:e=>"page"===e.type||"iframe"===e.type});const P=d.StringUtilities.formatAsJSLiteral,x=new Set(["typed","address_bar","auto_bookmark","auto_subframe","generated","auto_toplevel","reload","keyword","keyword_generated"]),O=Object.freeze({addStep:"addStep",stopShortcut:"stopShortcut"});class F extends e.ObjectWrapper.ObjectWrapper{#u;#m;#f;#y;#w;#v=new Map;#T=new Map;#S=new Map;#b=new Map;#E=new Map;#C=new Map;#R=new e.Mutex.Mutex;#M;#k=new Map;#A=!1;#_=[];constructor(e,t){super(),this.#u=e,this.#m=e.pageAgent(),this.#f=e.targetAgent(),this.#y=o.NetworkManager.MultitargetNetworkManager.instance();const r=e.model(o.ResourceTreeModel.ResourceTreeModel);if(!r)throw new Error("ResourceTreeModel is missing for the target: "+e.id());this.#w=r,this.#u=e,this.#M={title:t.title,selectorAttribute:t.selectorAttribute,steps:[]},this.#_=t.selectorTypesToRecord}cloneUserFlow(){return structuredClone(this.#M)}overwriteUserFlow(e){this.#M=structuredClone(e)}async start(){if(this.#A)throw new Error("The session has started");this.#A=!0,this.#y.addEventListener("ConditionsChanged",this.#N,this),await this.#I(),await this.#m.invoke_bringToFront(),await this.#P(this.#u)}async stop(){await this.#x(),this.#R.acquire(),await Promise.all([...this.#v.values()].map(this.#O)),this.#y.removeEventListener("ConditionsChanged",this.#N,this)}async#I(){const e=this.#w.mainFrame;if(!e)throw new Error("Could not find mainFrame.");this.#y.networkConditions()!==o.NetworkManager.NoThrottlingConditions&&this.#N();const{cssLayoutViewport:t}=await this.#u.pageAgent().invoke_getLayoutMetrics();this.#F(b(t));const r=await this.#w.navigationHistory();if(r){const e=r.entries[r.currentIndex];this.#T.set(this.#u.id(),e.id),this.#S.set(this.#u.id(),r.entries.map((e=>e.id))),this.#M.steps.push({type:i.Navigate,url:e.url,assertedEvents:[{type:s.Navigation,url:e.url,title:e.title}]})}else this.#M.steps.push({type:i.Navigate,url:e.url,assertedEvents:[{type:s.Navigation,url:e.url,title:await this.#L(this.#u)}]});this.#x()}async#L(e){const t=await e.runtimeAgent().invoke_evaluate({expression:"document.title"});return t.result?.value||""}#N(){const e=this.#y.networkConditions();this.#F(E(e))}#D;#B=[];#x(){return this.#D&&clearTimeout(this.#D),this.#D=setTimeout((()=>{this.dispatchEventToListeners("recordingupdated",structuredClone(this.#M)),this.#D=void 0;for(const e of this.#B)e();this.#B.length=0}),100),new Promise((e=>{this.#B.push(e)}))}get#U(){return this.#M.steps.slice(-1)[0]}#j=new Set;#F(e){switch(e.type){case"doubleClick":for(let t=this.#M.steps.length-1;t>0;t--){const r=this.#M.steps[t];if("click"===r.type){e.selectors=r.selectors,this.#M.steps.splice(t,1);break}}break;case"change":{const t=this.#U;if(!t)break;switch(t.type){case"change":if(!C(e,t))break;return this.#M.steps[this.#M.steps.length-1]=e,void this.#x();case"keyDown":return this.#j.add(t.key),this.#M.steps.pop(),void this.#F(e)}break}case"keyDown":if(this.#j.has(e.key))return;break;case"keyUp":if(this.#j.has(e.key))return void this.#j.delete(e.key)}this.#M.steps.push(e),this.#x()}#z(e,t){const r=this.#M.steps[this.#M.steps.length-1];if(r&&!r.assertedEvents?.find((e=>e.type===s.Navigation))){const n=e.target||"main",i=(e.frame||[]).join(","),a=r.target||"main",o=(("frame"in r?r.frame:[])||[]).join(",");n===a&&i===o&&(r.assertedEvents=[{type:s.Navigation}],this.#k.set(t.id(),r),this.#x())}}#W(e,t){const r=this.#k.get(e.id());if(!r)return;const n=r;if(!n.assertedEvents)return;const i=n.assertedEvents.find((e=>e.type===s.Navigation));i&&!i.url&&(i.url=t.url,i.title=t.title,this.#x())}#K(e){const t=Number(e.data.payload);for(let e=0;e<t-1;e++)this.#M.steps.pop();this.dispatchEventToListeners("recordingstopped",structuredClone(this.#M))}#H(e,t){switch(t.data.name){case O.stopShortcut:return void this.#K(t);case O.addStep:return void this.#$(e,t);default:return}}#$(e,t){const r=t.data.executionContextId;let s;const n=e.model(o.RuntimeModel.RuntimeModel);if(n)for(const e of n.executionContexts())if(e.id===r){s=e.frameId;break}if(!s)throw new Error("No execution context found for the binding call + "+JSON.stringify(t.data));const i=JSON.parse(t.data.payload),a=e.model(o.ResourceTreeModel.ResourceTreeModel).frameForId(s);if(!a)throw new Error("Could not find frame.");const c=_(e,a);if("beforeUnload"!==i.type)switch(i.type){case"change":this.#F({type:"change",value:i.value,selectors:i.selectors,frame:c.frame.length?c.frame:void 0,target:c.target});break;case"doubleClick":this.#F({type:"doubleClick",target:c.target,selectors:i.selectors,offsetY:i.offsetY,offsetX:i.offsetX,frame:c.frame.length?c.frame:void 0,deviceType:i.deviceType,button:i.button});break;case"click":this.#F({type:"click",target:c.target,selectors:i.selectors,offsetY:i.offsetY,offsetX:i.offsetX,frame:c.frame.length?c.frame:void 0,duration:i.duration,deviceType:i.deviceType,button:i.button});break;case"keyUp":this.#F({type:"keyUp",key:i.key,frame:c.frame.length?c.frame:void 0,target:c.target});break;case"keyDown":this.#F({type:"keyDown",frame:c.frame.length?c.frame:void 0,target:c.target,key:i.key});break;default:throw new Error("Unhandled client event")}else this.#z(c,e)}#V(){return(e=>{const t=[];for(const r of e)for(const e of r){const r={meta:!1,ctrl:!1,shift:!1,alt:!1,keyCode:-1},{keyCode:s,modifiers:n}=a.KeyboardShortcut.KeyboardShortcut.keyCodeAndModifiersFromKey(e);r.keyCode=s;const i=a.KeyboardShortcut.Modifiers;r.ctrl=Boolean(n&i.Ctrl.value),r.meta=Boolean(n&i.Meta.value),r.shift=Boolean(n&i.Shift.value),r.shift=Boolean(n&i.Alt.value),-1!==r.keyCode&&t.push(r)}return t})(a.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction("chrome-recorder.start-recording").map((e=>e.descriptors.map((e=>e.key)))))}static get#G(){try{return e.Settings.Settings.instance().settingForTest("untrusted-recorder-events"),!0}catch{}return!1}#P=async e=>{if(e.type()!==o.Target.Type.FRAME)return;this.#v.set(e.id(),e);const t=e.model(o.AccessibilityModel.AccessibilityModel);d.assertNotNullOrUndefined(t),await t.resumeModel(),await this.#J(e),await this.#q(e);const r=e.model(o.ChildTargetManager.ChildTargetManager);d.assertNotNullOrUndefined(r),this.#C.set(e,[r.addEventListener("TargetCreated",this.#X.bind(this,e)),r.addEventListener("TargetDestroyed",this.#Y.bind(this,e)),r.addEventListener("TargetInfoChanged",this.#Q.bind(this,e))]),await Promise.all(r.childTargets().map(this.#P))};#O=async t=>{const r=this.#C.get(t);r&&e.EventTarget.removeEventListeners(r),await this.#Z(t),await this.#ee(t)};async#J(e){const t=e.model(o.RuntimeModel.RuntimeModel);d.assertNotNullOrUndefined(t),this.#E.set(e,[t.addEventListener(o.RuntimeModel.Events.BindingCalled,this.#H.bind(this,e))]),await Promise.all(Object.values(O).map((e=>t.addBinding({name:e,executionContextName:l.DEVTOOLS_RECORDER_WORLD_NAME}))))}async#ee(t){await Promise.all(Object.values(O).map((e=>t.runtimeAgent().invoke_removeBinding({name:e}))));const r=this.#E.get(t);r&&e.EventTarget.removeEventListeners(r)}async#q(e){const t=`\n ${await l.InjectedScript.get()};DevToolsRecorder.startRecording({getAccessibleName, getAccessibleRole}, {\n debug: ${l.isDebugBuild},\n allowUntrustedEvents: ${F.#G},\n selectorTypesToRecord: ${JSON.stringify(this.#_)},\n selectorAttribute: ${this.#M.selectorAttribute?P(this.#M.selectorAttribute):void 0},\n stopShortcuts: ${JSON.stringify(this.#V())},\n });\n `,[{identifier:r}]=await Promise.all([e.pageAgent().invoke_addScriptToEvaluateOnNewDocument({source:t,worldName:l.DEVTOOLS_RECORDER_WORLD_NAME,includeCommandLineAPI:!0}),N(l.DEVTOOLS_RECORDER_WORLD_NAME,e,t)]);this.#b.set(e.id(),r)}async#Z(e){const t=this.#b.get(e.id());t&&(await e.pageAgent().invoke_removeScriptToEvaluateOnNewDocument({identifier:t}),await(async(e,t,r)=>{await Promise.all(t.map((t=>N(e,t,r))))})(l.DEVTOOLS_RECORDER_WORLD_NAME,[...this.#v.values()],"DevToolsRecorder.stopRecording()"))}#X(e,t){this.#te({type:"targetCreated",event:t,target:e})}#Y(e,t){const r=this.#v.get(t.data);r&&this.#te({type:"targetClosed",event:t,target:r})}#Q(e,t){const r=this.#v.get(t.data.targetId)||e;this.#te({type:"targetInfoChanged",event:t,target:r})}#te(e){return this.#R.run((async()=>{try{switch(l.isDebugBuild&&console.time(`Processing ${JSON.stringify(e)}`),e.type){case"targetClosed":await this.#re(e);break;case"targetCreated":await this.#se(e);break;case"targetInfoChanged":await this.#ne(e)}l.isDebugBuild&&console.timeEnd(`Processing ${JSON.stringify(e)}`)}catch(e){console.error("Error happened while processing recording events: ",e.message,e.stack)}}))}async#se(e){if("page"!==e.event.data.type&&"iframe"!==e.event.data.type)return;await this.#f.invoke_attachToTarget({targetId:e.event.data.targetId,flatten:!0});const t=o.TargetManager.TargetManager.instance().targets().find((t=>t.id()===e.event.data.targetId));if(!t)throw new Error("Could not find target.");await this.#P(t),window.dispatchEvent(new Event("recorderAttachedToTarget"))}async#re(e){const t=this.#k.get(e.target.id());t&&(delete t.assertedEvents,this.#k.delete(e.target.id()))}async#ie(e,t){const r=await e.navigationHistory();if(!r)return!1;const n=r.entries[r.currentIndex];if(this.#T.get(t.id())===n.id)return!0;this.#T.set(t.id(),n.id);const a=this.#S.get(t.id())||[];if(this.#S.set(t.id(),r.entries.map((e=>e.id))),x.has(n.transitionType)||a.includes(n.id)){const e=this.#k.get(t.id());e&&(delete e.assertedEvents,this.#k.delete(t.id())),this.#F({type:i.Navigate,url:n.url,assertedEvents:[{type:s.Navigation,url:n.url,title:n.title}]})}else this.#W(t,{type:s.Navigation,url:n.url,title:n.title});return!0}async#ne(e){if("page"!==e.event.data.type&&"iframe"!==e.event.data.type)return;const t=e.target,r=t.model(o.ResourceTreeModel.ResourceTreeModel);if(!r)throw new Error("ResourceTreeModel is missing in handleNavigation");if("iframe"===e.event.data.type)this.#W(t,{type:s.Navigation,url:e.event.data.url,title:await this.#L(t)});else if("page"===e.event.data.type){if(await this.#ie(r,t))return;await this.#ae(r,500),this.#W(t,{type:s.Navigation,url:e.event.data.url,title:await this.#L(t)})}}async#ae(e,t){const{resolve:r,promise:s}=Promise.withResolvers(),n=()=>{e.removeEventListener(o.ResourceTreeModel.Events.DOMContentLoaded,n),r()};e.addEventListener(o.ResourceTreeModel.Events.DOMContentLoaded,n),await Promise.any([s,new Promise((r=>setTimeout((()=>{e.removeEventListener(o.ResourceTreeModel.Events.DOMContentLoaded,n),r()}),t)))])}}var L=Object.freeze({__proto__:null,RecordingSession:F}),D=Object.freeze({__proto__:null});let B=null;class U{next(){return crypto.randomUUID()}}class j{#oe;#R=new e.Mutex.Mutex;#ce=new U;constructor(){this.#oe=e.Settings.Settings.instance().createSetting("recorder-recordings-ng",[])}clearForTest(){this.#oe.set([]),this.#ce=new U}setIdGeneratorForTest(e){this.#ce=e}async saveRecording(e){const t=await this.#R.acquire();try{const t=await this.#oe.forceGet(),r={storageName:this.#ce.next(),flow:e};return t.push(r),this.#oe.set(t),r}finally{t()}}async updateRecording(e,t){const r=await this.#R.acquire();try{const r=await this.#oe.forceGet(),s=r.find((t=>t.storageName===e));if(!s)throw new Error("No recording is found during updateRecording");return s.flow=t,this.#oe.set(r),s}finally{r()}}async deleteRecording(e){const t=await this.#R.acquire();try{const t=await this.#oe.forceGet();this.#oe.set(t.filter((t=>t.storageName!==e)))}finally{t()}}getRecording(e){return this.#oe.get().find((t=>t.storageName===e))}getRecordings(){return this.#oe.get()}static instance(){return B||(B=new j),B}}var z=Object.freeze({__proto__:null,RecordingStorage:j});let W=null;const K=52428800;class H{#de;#le;#ge;constructor(t=52428800){this.#de=e.Settings.Settings.instance().createSetting("recorder-screenshots",[]),this.#le=this.#pe(),this.#ge=t}clear(){this.#de.set([]),this.#le=new Map}getScreenshotForSection(e,t){const r=this.#le.get(this.#he(e,t));return r?(this.#ue(r),r.data):null}storeScreenshotForSection(e,t,r){const s={recordingName:e,index:t,data:r};this.#le.set(this.#he(e,t),s),this.#ue(s)}deleteScreenshotsForRecording(e){for(const[t,r]of this.#le)r.recordingName===e&&this.#le.delete(t);this.#ue()}#he(e,t){return`${e}:${t}`}#pe(){const e=new Map,t=this.#de.get();for(const r of t)e.set(this.#he(r.recordingName,r.index),r);return e}#ue(e){if(e){const t=this.#he(e.recordingName,e.index);this.#le.delete(t),this.#le.set(t,e)}const t=[];let r=0;for(const[e,s]of Array.from(this.#le.entries()).reverse())r<this.#ge?(r+=s.data.length,t.push(s)):this.#le.delete(e);this.#de.set(t.reverse())}static instance(e={forceNew:null,maxStorageSize:K}){const{forceNew:t,maxStorageSize:r}=e;return W&&!t||(W=new H(r)),W}}var $=Object.freeze({__proto__:null,ScreenshotStorage:H});async function V(e){const t=new Image,r=new Promise((e=>{t.onload=e}));t.src=e,await r;const s=document.createElement("canvas"),n=s.getContext("2d");if(!n)throw new Error("Could not create context.");const i=t.width/t.height;s.width=160,s.height=Math.min(240,160/i);const a=await createImageBitmap(t,{resizeWidth:160,resizeQuality:"high"});return n.drawImage(a,0,0),s.toDataURL("image/png")}var G=Object.freeze({__proto__:null,resizeScreenshot:V,takeScreenshot:async function(){const e=await async function(){const e=o.TargetManager.TargetManager.instance().primaryPageTarget();if(!e)throw new Error("Could not find main target");const{data:t}=await e.pageAgent().invoke_captureScreenshot({});return t?"data:image/png;base64,"+t:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}();return await V(e)}});function J(e){const t=e.assertedEvents?.find((e=>"navigation"===e.type));return"navigate"===e.type?{title:t?.title||"",url:e.url,steps:[],causingStep:e}:t?{title:t.title||"",url:t.url||"",steps:[]}:null}var q=Object.freeze({__proto__:null,buildSections:function(e){let t=null;const r=[];for(const s of e){if(t)t.steps.push(s);else{if("navigate"===s.type){t=J(s);continue}t={title:"Current page",url:"",steps:[s]}}const e=J(s);e&&(t&&r.push(t),t=e)}return!t||r.length&&!t.steps.length||r.push(t),r}});var X=Object.freeze({__proto__:null,getTooltipForActions:function(e,t){let r=e;const s=a.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction(t);for(const e of s)r+=` - ${e.title()}`;return r}});export{g as ConverterIds,f as RecorderSettings,y as RecorderShortcutHelper,S as RecordingPlayer,L as RecordingSession,D as RecordingSettings,z as RecordingStorage,I as SDKUtils,p as Schema,k as SchemaUtils,$ as ScreenshotStorage,G as ScreenshotUtils,q as Section,X as Tooltip};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"../../core/i18n/i18n.js";import*as r from"../../ui/legacy/legacy.js";const o={recorder:"Recorder",showRecorder:"Show Recorder",startStopRecording:"Start/Stop recording",createRecording:"Create a new recording",replayRecording:"Replay recording",toggleCode:"Toggle code view"},t=e.i18n.registerUIStrings("panels/recorder/recorder-meta.ts",o),n=e.i18n.getLazilyComputedLocalizedString.bind(void 0,t);let c;async function i(){return c||(c=await import("./recorder.js")),c}function a(e,r){return void 0===c?[]:r&&c.RecorderPanel.RecorderPanel.instance().isActionPossible(r)?e(c):[]}const d="chrome-recorder";r.ViewManager.defaultOptionsForTabs[d]=!0,r.ViewManager.registerViewExtension({location:"panel",id:d,commandPrompt:n(o.showRecorder),title:n(o.recorder),order:90,persistence:"closeable",loadView:async()=>(await i()).RecorderPanel.RecorderPanel.instance()}),r.ActionRegistration.registerActionExtension({category:"RECORDER",actionId:"chrome-recorder.create-recording",title:n(o.createRecording),loadActionDelegate:async()=>new((await i()).RecorderPanel.ActionDelegate)}),r.ActionRegistration.registerActionExtension({category:"RECORDER",actionId:"chrome-recorder.start-recording",title:n(o.startStopRecording),contextTypes:()=>a((e=>[e.RecorderPanel.RecorderPanel]),"chrome-recorder.start-recording"),loadActionDelegate:async()=>new((await i()).RecorderPanel.ActionDelegate),bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),r.ActionRegistration.registerActionExtension({category:"RECORDER",actionId:"chrome-recorder.replay-recording",title:n(o.replayRecording),contextTypes:()=>a((e=>[e.RecorderPanel.RecorderPanel]),"chrome-recorder.replay-recording"),loadActionDelegate:async()=>new((await i()).RecorderPanel.ActionDelegate),bindings:[{shortcut:"Ctrl+Enter",platform:"windows,linux"},{shortcut:"Meta+Enter",platform:"mac"}]}),r.ActionRegistration.registerActionExtension({category:"RECORDER",actionId:"chrome-recorder.toggle-code-view",title:n(o.toggleCode),contextTypes:()=>a((e=>[e.RecorderPanel.RecorderPanel]),"chrome-recorder.toggle-code-view"),loadActionDelegate:async()=>new((await i()).RecorderPanel.ActionDelegate),bindings:[{shortcut:"Ctrl+B",platform:"windows,linux"},{shortcut:"Meta+B",platform:"mac"}]});
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import*as e from"../../core/common/common.js";import*as t from"../../core/host/host.js";import*as r from"../../core/i18n/i18n.js";import*as o from"../../core/platform/platform.js";import*as i from"../../core/root/root.js";import*as n from"../../core/sdk/sdk.js";import*as s from"../../models/bindings/bindings.js";import*as a from"../../models/extensions/extensions.js";import*as c from"../common/common.js";import*as d from"../emulation/emulation.js";import*as l from"../timeline/timeline.js";import*as g from"../../services/tracing/tracing.js";import"../../ui/components/buttons/buttons.js";import*as h from"../../ui/components/helpers/helpers.js";import*as p from"../../ui/legacy/legacy.js";import*as u from"../../ui/lit/lit.js";import*as v from"../../ui/visual_logging/visual_logging.js";import*as m from"./components/components.js";import*as w from"./converters/converters.js";import*as R from"./extensions/extensions.js";import*as y from"./models/models.js";var f={cssText:`*{margin:0;padding:0;box-sizing:border-box;font-size:inherit}*:focus,\n*:focus-visible{outline:none}:host{overflow-x:auto}:host,\ndevtools-recording-view,\ndevtools-create-recording-view{display:flex;flex-direction:column;flex:1;min-height:0}.wrapper{display:flex;flex-direction:column;height:100%}.header{background-color:var(--sys-color-cdt-base-container);display:flex;flex-flow:row wrap;align-items:center;border-bottom:1px solid var(--sys-color-divider);padding:0 5px;gap:3px}.separator{background-color:var(--sys-color-divider);width:1px;height:17px;margin:0}select{appearance:none;user-select:none;border:none;border-radius:var(--sys-shape-corner-extra-small);height:var(--sys-size-9);max-width:140px;min-width:140px;padding:0 var(--sys-size-6) 0 var(--sys-size-5);position:relative;color:var(--sys-color-on-surface);background-color:transparent;text-overflow:ellipsis;background-image:var(--combobox-dropdown-arrow);background-position:right center;background-repeat:no-repeat;&:hover{background-color:var(--sys-color-state-hover-on-subtle)}&:active{background-color:var(--sys-color-state-ripple-neutral-on-subtle)}&:hover:active{background:var(--combobox-dropdown-arrow),linear-gradient(var(--sys-color-state-hover-on-subtle),var(--sys-color-state-hover-on-subtle)),linear-gradient(var(--sys-color-state-ripple-neutral-on-subtle),var(--sys-color-state-ripple-neutral-on-subtle));background-position:right center;background-repeat:no-repeat}&:disabled{pointer-events:none;color:var(--sys-color-state-disabled);background-color:var(--sys-color-state-disabled-container)}&:focus-visible{outline:var(--sys-size-2) solid var(--sys-color-state-focus-ring)}}select option{background-color:var(--sys-color-cdt-base-container);color:var(--sys-color-on-surface)}devtools-menu{width:0;height:0;position:absolute}devtools-recording-list-view{overflow:auto}.error{color:var(--sys-color-error);border:1px solid var(--sys-color-error);background-color:var(--sys-color-error-container);padding:4px}.feedback{margin-left:auto;margin-right:4px}.feedback .x-link{letter-spacing:0.03em;text-decoration-line:underline;font-size:9px;line-height:16px;color:var(--sys-color-on-surface-subtle);outline-offset:3px}.feedback .x-link:focus-visible,\n.empty-state-description .x-link:focus-visible{outline:-webkit-focus-ring-color auto 1px}.empty-state{margin:var(--sys-size-5);display:flex;flex-grow:1;justify-content:center;align-items:center;flex-direction:column;text-align:center;min-height:fit-content;min-width:fit-content;> *{max-width:var(--sys-size-29)}.empty-state-header{font:var(--sys-typescale-headline5);margin-bottom:var(--sys-size-3)}.empty-state-description{font:var(--sys-typescale-body4-regular);color:var(--sys-color-on-surface-subtle);> x-link{white-space:nowrap;margin-left:var(--sys-size-3);cursor:pointer;text-decoration:underline;color:var(--sys-color-primary);outline-offset:var(--sys-size-2)}}> devtools-button{margin-top:var(--sys-size-7)}}\n/*# sourceURL=${import.meta.resolve("./recorderController.css")} */\n`};class S extends Event{static eventName="replayfinished";constructor(){super(S.eventName,{bubbles:!0,composed:!0})}}class x extends Event{recording;static eventName="recordingstatechanged";constructor(e){super(x.eventName,{bubbles:!0,composed:!0}),this.recording=e}}var b=Object.freeze({__proto__:null,RecordingStateChangedEvent:x,ReplayFinishedEvent:S}),P=self&&self.__decorate||function(e,t,r,o){var i,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};const C=new CSSStyleSheet;C.replaceSync(f.cssText);const{html:E,Decorators:k,LitElement:$}=u,{customElement:N,state:T}=k,I={createRecording:"Create recording",importRecording:"Import recording",deleteRecording:"Delete recording",noRecordings:"No recordings",numberOfRecordings:"recording(s)",continueReplay:"Continue",stepOverReplay:"Execute one step",exportRecording:"Export",startStopRecording:"Start/Stop recording",replayRecording:"Replay recording",copyShortcut:"Copy recording or selected step",toggleCode:"Toggle code view",export:"Export",exportViaExtensions:"Export via extensions",getExtensions:"Get extensions…",sendFeedback:"Send feedback",header:"Nothing recorded yet",recordingDescription:"Use recordings to create automated end-to-end tests or performance traces.",learnMore:"Learn more",doYouTrustThisCode:"Do you trust this recording?",doNotImport:"Don't import recordings you do not understand or have not reviewed yourself into DevTools. This could allow attackers to steal your identity or take control of your computer. Please type ''{PH1}'' below to allow importing.",allowImporting:"allow importing",typeAllowImporting:"Type ''{PH1}''"},M=r.i18n.registerUIStrings("panels/recorder/RecorderController.ts",I),F=r.i18n.getLocalizedString.bind(void 0,M),A="get-extensions-link",j={json:2,"@puppeteer/replay":3,puppeteer:1,"puppeteer-firefox":1,lighthouse:5};let B=class extends ${static styles=[C];#e=y.RecordingStorage.RecordingStorage.instance();#t=y.ScreenshotStorage.ScreenshotStorage.instance();#r=!0;#o={isPlaying:!1,isPausedOnBreakpoint:!1};#i;#n;#s=new Set;#a;#c=new y.RecorderSettings.RecorderSettings;#d=new y.RecorderShortcutHelper.RecorderShortcutHelper;#l=e.Settings.Settings.instance().createSetting("disable-recorder-import-warning",!1,"Synced");#g=e.Settings.Settings.instance().createSetting("disable-self-xss-warning",!1,"Synced");constructor(){super(),this.isRecording=!1,this.isToggling=!1,this.exportMenuExpanded=!1,this.currentPage="StartPage",this.#e.getRecordings().length&&this.#h("AllRecordingsPage");const t=e.Settings.Settings.instance().moduleSetting("text-editor-indent").get();this.#a=Object.freeze([new w.JSONConverter.JSONConverter(t),new w.PuppeteerReplayConverter.PuppeteerReplayConverter(t),new w.PuppeteerConverter.PuppeteerConverter(t),new w.PuppeteerFirefoxConverter.PuppeteerFirefoxConverter(t),new w.LighthouseConverter.LighthouseConverter(t)]);const r=R.ExtensionManager.ExtensionManager.instance();this.#p(r.extensions()),r.addEventListener("extensionsUpdated",(e=>{this.#p(e.data)})),this.addEventListener("setrecording",(e=>this.#u(e)))}disconnectedCallback(){super.disconnectedCallback(),this.currentRecordingSession&&this.currentRecordingSession.stop()}#p(e){this.extensionConverters=e.filter((e=>e.getCapabilities().includes("export"))).map(((e,t)=>new w.ExtensionConverter.ExtensionConverter(t,e))),this.replayExtensions=e.filter((e=>e.getCapabilities().includes("replay")))}setIsRecordingStateForTesting(e){this.isRecording=e}setRecordingStateForTesting(e){this.#o.isPlaying=e.isPlaying,this.#o.isPausedOnBreakpoint=e.isPausedOnBreakpoint}setCurrentPageForTesting(e){this.#h(e)}getCurrentPageForTesting(){return this.currentPage}getCurrentRecordingForTesting(){return this.currentRecording}getStepBreakpointIndexesForTesting(){return[...this.#s.values()]}#v(){this.importError=void 0}async#m(t){const r=new e.StringOutputStream.StringOutputStream,o=new s.FileUtils.ChunkedFileReader(t,1e7);if(!await o.read(r))throw o.error()??new Error("Unknown");let i;try{i=y.SchemaUtils.parse(JSON.parse(r.data()))}catch(e){return void(this.importError=e)}this.#w(await this.#e.saveRecording(i)),this.#h("RecordingPage"),this.#v()}setCurrentRecordingForTesting(e){this.#w(e)}getSectionsForTesting(){return this.sections}#w(e,t={}){const{keepBreakpoints:r=!1,updateSession:o=!1}=t;this.recordingPlayer?.abort(),this.currentStep=void 0,this.recordingError=void 0,this.lastReplayResult=void 0,this.recordingPlayer=void 0,this.#o.isPlaying=!1,this.#o.isPausedOnBreakpoint=!1,this.#s=r?this.#s:new Set,e?(this.currentRecording=e,this.sections=y.Section.buildSections(e.flow.steps),this.settings=this.#R(e.flow),o&&this.currentRecordingSession&&this.currentRecordingSession.overwriteUserFlow(e.flow)):(this.currentRecording=void 0,this.sections=void 0,this.settings=void 0),this.#y()}#h(e){e!==this.currentPage&&(this.previousPage=this.currentPage,this.currentPage=e)}#R(e){const t=e.steps,r=t.findIndex((e=>"navigate"===e.type)),o={timeout:e.timeout};for(let e=r-1;e>=0;e--){const r=t[e];if(o.viewportSettings||"setViewport"!==r.type||(o.viewportSettings=r),!o.networkConditionsSettings&&"emulateNetworkConditions"===r.type){o.networkConditionsSettings={...r};for(const e of[n.NetworkManager.OfflineConditions,n.NetworkManager.Slow3GConditions,n.NetworkManager.Slow4GConditions,n.NetworkManager.Fast4GConditions])n.NetworkManager.networkConditionsEqual({...e,title:e.i18nTitleKey||""},{...r,title:e.i18nTitleKey||""})&&(o.networkConditionsSettings.title=e.title instanceof Function?e.title():e.title,o.networkConditionsSettings.i18nTitleKey=e.i18nTitleKey)}}return o}#f(){const e=n.TargetManager.TargetManager.instance().primaryPageTarget();if(!e)throw new Error("Missing main page target");return e}#S(e){if(!this.sections)return null;for(const t of this.sections)if(-1!==t.steps.indexOf(e))return t;return null}#y(){if(!this.sections||!this.currentRecording)return;const e=this.currentRecording.storageName;for(let t=0;t<this.sections.length;t++){const r=this.#t.getScreenshotForSection(e,t);this.sections[t].screenshot=r||void 0}this.requestUpdate()}#x(){this.recordingPlayer?.abort()}async#b(e){if(!this.currentRecording||!this.#r)return;const r=a.RecorderPluginManager.RecorderPluginManager.instance().once("showViewRequested");e.replay(this.currentRecording.flow);const o=await r;this.viewDescriptor=o,t.userMetrics.recordingReplayStarted(3)}async#P(e){if(!this.currentRecording||!this.#r)return;if(this.viewDescriptor&&(this.viewDescriptor=void 0),e.data.extension)return await this.#b(e.data.extension);t.userMetrics.recordingReplayStarted("chrome-recorder"!==e.data.targetPanel?2:1),this.#o.isPlaying=!0,this.currentStep=void 0,this.recordingError=void 0,this.lastReplayResult=void 0;const r=this.currentRecording;this.#v(),await this.#C(),this.recordingPlayer=new y.RecordingPlayer.RecordingPlayer(this.currentRecording.flow,{speed:e.data.speed,breakpointIndexes:this.#s});const o="timeline"===e.data.targetPanel,i=new Set;this.recordingPlayer.addEventListener("Step",(async({data:{step:e,resolve:t}})=>{this.currentStep=e;const o=this.#S(e);if(this.sections&&o&&!i.has(o)){i.add(o);const e=this.sections.indexOf(o),t=await y.ScreenshotUtils.takeScreenshot();o.screenshot=t,y.ScreenshotStorage.ScreenshotStorage.instance().storeScreenshotForSection(r.storageName,e,t)}t()})),this.recordingPlayer.addEventListener("Stop",(()=>{this.#o.isPausedOnBreakpoint=!0,this.requestUpdate()})),this.recordingPlayer.addEventListener("Continue",(()=>{this.#o.isPausedOnBreakpoint=!1,this.requestUpdate()})),this.recordingPlayer.addEventListener("Error",(({data:e})=>{this.recordingError=e,o||(this.#o.isPlaying=!1,this.recordingPlayer=void 0),this.lastReplayResult="Failure";const r=e.message.toLowerCase();r.startsWith("could not find element")?t.userMetrics.recordingReplayFinished(2):r.startsWith("waiting for target failed")?t.userMetrics.recordingReplayFinished(3):t.userMetrics.recordingReplayFinished(4),this.dispatchEvent(new S)})),this.recordingPlayer.addEventListener("Done",(()=>{o||(this.#o.isPlaying=!1,this.recordingPlayer=void 0),this.lastReplayResult="Success",this.dispatchEvent(new S),t.userMetrics.recordingReplayFinished(1)})),this.recordingPlayer.addEventListener("Abort",(()=>{this.currentStep=void 0,this.recordingError=void 0,this.lastReplayResult=void 0,this.#o.isPlaying=!1}));let n=e=>{};const s=new Promise((e=>{n=e}));let a=null;if("timeline"===e.data?.targetPanel)a=new g.PerformanceTracing.PerformanceTracing(this.#f(),{tracingBufferUsage(){},eventsRetrievalProgress(){},tracingComplete(e){n(e)}});if(a&&await a.start(),this.#E(!1),await this.recordingPlayer.play(),this.#E(!0),a){await a.stop();const t=await s;if(this.#o.isPlaying=!1,this.recordingPlayer=void 0,await p.InspectorView.InspectorView.instance().showPanel(e.data?.targetPanel),"timeline"===e.data?.targetPanel)l.TimelinePanel.TimelinePanel.instance().loadFromEvents(t)}}async#C(){try{const e=d.DeviceModeWrapper.DeviceModeWrapper.instance();if(e.isDeviceModeOn()){e.toggleDeviceMode();const t=this.#f().model(n.EmulationModel.EmulationModel);await(t?.emulateDevice(null))}}catch{}}#E(e){const t=this.#f().model(n.EmulationModel.EmulationModel);t?.setTouchEmulationAllowed(e)}async#u(e){const t=JSON.parse(e.detail);this.#w(await this.#e.saveRecording(y.SchemaUtils.parse(t))),this.#h("RecordingPage"),this.#v()}getUserFlow(){return this.currentRecording?.flow}async#k(e){if(!this.currentRecording)throw new Error("Current recording expected to be defined.");const t={...this.currentRecording,flow:{...this.currentRecording.flow,steps:this.currentRecording.flow.steps.map((t=>t===e.currentStep?e.newStep:t))}};this.#w(await this.#e.updateRecording(t.storageName,t.flow),{keepBreakpoints:!0,updateSession:!0})}async#$(e){if(!this.currentRecording)throw new Error("Current recording expected to be defined.");const r=e.stepOrSection;let o,i=e.position;if("steps"in r){const t=this.sections?.indexOf(r);if(void 0===t||-1===t)throw new Error("There is no section to add a step to");if("after"===e.position)this.sections?.[t].steps.length?(o=this.sections?.[t].steps[0],i="before"):(o=this.sections?.[t].causingStep,i="after");else{if(t<=0)throw new Error("There is no section to add a step to");const e=this.sections?.[t-1];o=e?.steps[e.steps.length-1],i="after"}}else o=r;if(!o)throw new Error("Anchor step is not found when adding a step");const n=this.currentRecording.flow.steps,s=n.indexOf(o)+("before"===i?0:1);n.splice(s,0,{type:y.Schema.StepType.WaitForElement,selectors:["body"]});const a={...this.currentRecording,flow:{...this.currentRecording.flow,steps:n}};t.userMetrics.recordingEdited(2),this.#s=new Set([...this.#s.values()].map((e=>s>e?e:e+1))),this.#w(await this.#e.updateRecording(a.storageName,a.flow),{keepBreakpoints:!0,updateSession:!0})}async#N(e){if(!this.currentRecording)throw new Error("Current recording expected to be defined.");const t={...this.currentRecording.flow,title:e.title};this.#w(await this.#e.updateRecording(this.currentRecording.storageName,t))}async#T(e){if(!this.currentRecording)throw new Error("Current recording expected to be defined.");const r=this.currentRecording.flow.steps,o=r.indexOf(e.step);r.splice(o,1);const i={...this.currentRecording.flow,steps:r};t.userMetrics.recordingEdited(3),this.#s=new Set([...this.#s.values()].map((e=>o>e?e:o===e?-1:e-1)).filter((e=>e>=0))),this.#w(await this.#e.updateRecording(this.currentRecording.storageName,i),{keepBreakpoints:!0,updateSession:!0})}async#I(e){if(!this.currentRecording)throw new Error("Current recording expected to be defined.");const t=this.currentRecording.flow.steps.findIndex((e=>"navigate"===e.type));if(-1===t)throw new Error("Current recording does not have a navigate step");const r=this.currentRecording.flow.steps.findIndex(((e,r)=>!(r>=t)&&"emulateNetworkConditions"===e.type));if(e.data)if(-1===r)this.currentRecording.flow.steps.splice(0,0,y.SchemaUtils.createEmulateNetworkConditionsStep({download:e.data.download,upload:e.data.upload,latency:e.data.latency}));else{const t=this.currentRecording.flow.steps[r];t.download=e.data.download,t.upload=e.data.upload,t.latency=e.data.latency}else-1!==r&&this.currentRecording.flow.steps.splice(r,1);this.#w(await this.#e.updateRecording(this.currentRecording.storageName,this.currentRecording.flow))}async#M(e){if(!this.currentRecording)throw new Error("Current recording expected to be defined.");this.currentRecording.flow.timeout=e.data,this.#w(await this.#e.updateRecording(this.currentRecording.storageName,this.currentRecording.flow))}async#F(e){if(e.stopPropagation(),e instanceof m.RecordingListView.DeleteRecordingEvent)await this.#e.deleteRecording(e.storageName),this.#t.deleteScreenshotsForRecording(e.storageName),this.requestUpdate();else{if(!this.currentRecording)return;await this.#e.deleteRecording(this.currentRecording.storageName),this.#t.deleteScreenshotsForRecording(this.currentRecording.storageName)}(await this.#e.getRecordings()).length?this.#h("AllRecordingsPage"):this.#h("StartPage"),this.#w(void 0),this.#v()}#A(e){e?.stopPropagation(),this.#h("CreateRecordingPage"),this.#v()}async#j(e){await this.#C(),this.isToggling=!0,this.#v(),t.userMetrics.recordingToggled(1),this.currentRecordingSession=new y.RecordingSession.RecordingSession(this.#f(),{title:e.name,selectorAttribute:e.selectorAttribute,selectorTypesToRecord:e.selectorTypesToRecord.length?e.selectorTypesToRecord:Object.values(y.Schema.SelectorType)}),this.#w(await this.#e.saveRecording(this.currentRecordingSession.cloneUserFlow()));let r,o=-1;const i=async e=>{if(!this.sections)throw new Error("Could not find sections.");const t=this.sections.length-1,i=this.sections[t];if(r||o===t)return;r=y.ScreenshotUtils.takeScreenshot();const n=await r;r=void 0,i.screenshot=n,y.ScreenshotStorage.ScreenshotStorage.instance().storeScreenshotForSection(e.storageName,t,n),o=t,this.#y()};this.currentRecordingSession.addEventListener("recordingupdated",(async({data:e})=>{if(!this.currentRecording)throw new Error("No current recording found");this.#w(await this.#e.updateRecording(this.currentRecording.storageName,e));const t=this.shadowRoot?.querySelector("devtools-recording-view");t?.scrollToBottom(),await i(this.currentRecording)})),this.currentRecordingSession.addEventListener("recordingstopped",(async({data:e})=>{if(!this.currentRecording)throw new Error("No current recording found");t.userMetrics.keyboardShortcutFired("chrome-recorder.start-recording"),this.#w(await this.#e.updateRecording(this.currentRecording.storageName,e)),await this.#B()})),await this.currentRecordingSession.start(),this.isToggling=!1,this.isRecording=!0,this.#h("RecordingPage"),this.dispatchEvent(new x(this.currentRecording.flow))}async#B(){if(!this.currentRecording||!this.currentRecordingSession)throw new Error("Recording was never started");this.isToggling=!0,this.#v(),t.userMetrics.recordingToggled(2),await this.currentRecordingSession.stop(),this.currentRecordingSession=void 0,this.isToggling=!1,this.isRecording=!1,this.dispatchEvent(new x(this.currentRecording.flow))}async#D(){this.previousPage&&this.#h(this.previousPage)}async#O(e){const t=e instanceof m.RecordingListView.OpenRecordingEvent||e instanceof m.RecordingListView.PlayRecordingEvent?e.storageName:e.target?.value;this.#w(await this.#e.getRecording(t)),this.currentRecording?this.#h("RecordingPage"):"StartPage"===t?this.#h("StartPage"):"AllRecordingsPage"===t&&this.#h("AllRecordingsPage")}async#U(e){if("string"!=typeof e.itemValue)throw new Error("Invalid export option value");if(e.itemValue===A)return void t.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab("https://goo.gle/recorder-extension-list");if(!this.currentRecording)throw new Error("No recording selected");const r=e.itemValue,o=e=>e.getId()===r,i=this.#a.find(o)||this.extensionConverters.find(o);if(!i)throw new Error("No recording selected");const[n]=await i.stringify(this.currentRecording.flow);await this.#V(i.getFilename(this.currentRecording.flow),n);const s=j[i.getId()];if(s)t.userMetrics.recordingExported(s);else{if(!i.getId().startsWith(w.ExtensionConverter.EXTENSION_PREFIX))throw new Error("Could not find a metric for the export option with id = "+r);t.userMetrics.recordingExported(4)}}async#V(e,t){try{const r=await window.showSaveFilePicker({suggestedName:e}),o=await r.createWritable();await o.write(t),await o.close()}catch(e){if("AbortError"===e.name)return;throw e}}async#L(){if(!this.currentRecordingSession||!this.currentRecording)return;const e=this.currentRecordingSession.cloneUserFlow();e.steps.push({type:"waitForElement",selectors:[[".cls"]]}),this.#w(await this.#e.updateRecording(this.currentRecording.storageName,e),{keepBreakpoints:!0,updateSession:!0}),t.userMetrics.recordingAssertion(1),await this.updateComplete,this.renderRoot.querySelector("devtools-recording-view")?.shadowRoot?.querySelector(".section:last-child devtools-step-view:last-of-type")?.shadowRoot?.querySelector(".action")?.click()}async#z(){if(this.#l.get())return!0;if(i.Runtime.Runtime.queryParam("isChromeForTesting")||i.Runtime.Runtime.queryParam("disableSelfXssWarnings")||this.#g.get())return!0;const e=await c.TypeToAllowDialog.show({jslogContext:{input:"confirm-import-recording-input",dialog:"confirm-import-recording-dialog"},message:F(I.doNotImport,{PH1:F(I.allowImporting)}),header:F(I.doYouTrustThisCode),typePhrase:F(I.allowImporting),inputPlaceholder:F(I.typeAllowImporting,{PH1:F(I.allowImporting)})});return e&&this.#l.set(!0),e}async#q(e){e.stopPropagation(),this.#v(),await this.#z()&&(this.#i=p.UIUtils.createFileSelectorElement(this.#m.bind(this)),this.#i.click())}async#_(e){await this.#O(e),await this.#P(new m.RecordingView.PlayRecordingEvent({targetPanel:"chrome-recorder",speed:this.#c.speed}))}#W=e=>{this.#s.add(e.index),this.recordingPlayer?.updateBreakpointIndexes(this.#s),this.requestUpdate()};#H=e=>{this.#s.delete(e.index),this.recordingPlayer?.updateBreakpointIndexes(this.#s),this.requestUpdate()};#X(){this.viewDescriptor=void 0}handleActions(e){if(this.isActionPossible(e))switch(e){case"chrome-recorder.create-recording":return void this.#A();case"chrome-recorder.start-recording":if("CreateRecordingPage"===this.currentPage||this.isRecording)if("CreateRecordingPage"===this.currentPage){const e=this.renderRoot.querySelector("devtools-create-recording-view");e&&this.#d.handleShortcut(e.startRecording.bind(e))}else this.isRecording&&this.#B();else this.#d.handleShortcut(this.#j.bind(this,new m.CreateRecordingView.RecordingStartedEvent(this.#c.defaultTitle,this.#c.defaultSelectors,this.#c.selectorAttribute)));return;case"chrome-recorder.replay-recording":return void this.#P(new m.RecordingView.PlayRecordingEvent({targetPanel:"chrome-recorder",speed:this.#c.speed}));case"chrome-recorder.toggle-code-view":{const e=this.renderRoot.querySelector("devtools-recording-view");return void(e&&e.showCodeToggle())}}}isActionPossible(e){switch(e){case"chrome-recorder.create-recording":return!this.isRecording&&!this.#o.isPlaying;case"chrome-recorder.start-recording":return!this.#o.isPlaying;case"chrome-recorder.replay-recording":return"RecordingPage"===this.currentPage&&!this.#o.isPlaying;case"chrome-recorder.toggle-code-view":return"RecordingPage"===this.currentPage;case"chrome-recorder.copy-recording-or-step":return!1}}#K(){const e=e=>p.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction(e).map((e=>e.title().split(/[\s+]+/).map((e=>e.trim()))));return[{title:F(I.startStopRecording),bindings:e("chrome-recorder.start-recording")},{title:F(I.replayRecording),bindings:e("chrome-recorder.replay-recording")},{title:F(I.copyShortcut),bindings:t.Platform.isMac()?[["⌘","C"]]:[["Ctrl","C"]]},{title:F(I.toggleCode),bindings:e("chrome-recorder.toggle-code-view")}]}#G(){switch(this.currentPage){case"StartPage":return this.#J();case"AllRecordingsPage":return this.#Y();case"RecordingPage":return this.#Q();case"CreateRecordingPage":return this.#Z()}}#Y(){const e=this.#e.getRecordings();return E`
|
|
2
|
+
<devtools-recording-list-view
|
|
3
|
+
.recordings=${e.map((e=>({storageName:e.storageName,name:e.flow.title})))}
|
|
4
|
+
.replayAllowed=${this.#r}
|
|
5
|
+
@createrecording=${this.#A}
|
|
6
|
+
@deleterecording=${this.#F}
|
|
7
|
+
@openrecording=${this.#O}
|
|
8
|
+
@playrecording=${this.#_}
|
|
9
|
+
>
|
|
10
|
+
</devtools-recording-list-view>
|
|
11
|
+
`}#J(){return E`
|
|
12
|
+
<div class="empty-state" jslog=${v.section().context("start-view")}>
|
|
13
|
+
<div class="empty-state-header">${F(I.header)}</div>
|
|
14
|
+
<div class="empty-state-description">
|
|
15
|
+
<span>${F(I.recordingDescription)}</span>
|
|
16
|
+
${p.XLink.XLink.create("https://developer.chrome.com/docs/devtools/recorder",F(I.learnMore),"x-link",void 0,"learn-more")}
|
|
17
|
+
</div>
|
|
18
|
+
<devtools-button .variant=${"tonal"} jslogContext=${"chrome-recorder.create-recording"} @click=${this.#A}>${F(I.createRecording)}</devtools-button>
|
|
19
|
+
</div>
|
|
20
|
+
`}#Q(){return E`
|
|
21
|
+
<devtools-recording-view
|
|
22
|
+
.data=${{recording:this.currentRecording?.flow,replayState:this.#o,isRecording:this.isRecording,recordingTogglingInProgress:this.isToggling,currentStep:this.currentStep,currentError:this.recordingError,sections:this.sections,settings:this.settings,recorderSettings:this.#c,lastReplayResult:this.lastReplayResult,replayAllowed:this.#r,breakpointIndexes:this.#s,builtInConverters:this.#a,extensionConverters:this.extensionConverters,replayExtensions:this.replayExtensions,extensionDescriptor:this.viewDescriptor}}
|
|
23
|
+
@networkconditionschanged=${this.#I}
|
|
24
|
+
@timeoutchanged=${this.#M}
|
|
25
|
+
@requestselectorattribute=${e=>{e.send(this.currentRecording?.flow.selectorAttribute)}}
|
|
26
|
+
@recordingfinished=${this.#B}
|
|
27
|
+
@stepchanged=${this.#k.bind(this)}
|
|
28
|
+
@recordingtitlechanged=${this.#N.bind(this)}
|
|
29
|
+
@addstep=${this.#$.bind(this)}
|
|
30
|
+
@removestep=${this.#T.bind(this)}
|
|
31
|
+
@addbreakpoint=${this.#W}
|
|
32
|
+
@removebreakpoint=${this.#H}
|
|
33
|
+
@playrecording=${this.#P}
|
|
34
|
+
@abortreplay=${this.#x}
|
|
35
|
+
@recorderextensionviewclosed=${this.#X}
|
|
36
|
+
@addassertion=${this.#L}
|
|
37
|
+
></devtools-recording-view>
|
|
38
|
+
`}#Z(){return E`
|
|
39
|
+
<devtools-create-recording-view
|
|
40
|
+
.data=${{recorderSettings:this.#c}}
|
|
41
|
+
@recordingstarted=${this.#j}
|
|
42
|
+
@recordingcancelled=${this.#D}
|
|
43
|
+
></devtools-create-recording-view>
|
|
44
|
+
`}#ee=()=>{if(!this.#n)throw new Error("#exportMenuButton not found");return this.#n};#te(e){e.stopPropagation(),this.#v(),this.exportMenuExpanded=!this.exportMenuExpanded}#re(){this.exportMenuExpanded=!1}render(){const e=this.#e.getRecordings(),t=this.currentRecording?this.currentRecording.storageName:this.currentPage,r=[0===e.length?{value:"StartPage",name:F(I.noRecordings),selected:"StartPage"===t}:{value:"AllRecordingsPage",name:`${e.length} ${F(I.numberOfRecordings)}`,selected:"AllRecordingsPage"===t},...e.map((e=>({value:e.storageName,name:e.flow.title,selected:t===e.storageName})))];return E`
|
|
45
|
+
<div class="wrapper">
|
|
46
|
+
<div class="header" jslog=${v.toolbar()}>
|
|
47
|
+
<devtools-button
|
|
48
|
+
@click=${this.#A}
|
|
49
|
+
.data=${{variant:"toolbar",iconName:"plus",disabled:this.#o.isPlaying||this.isRecording||this.isToggling,title:y.Tooltip.getTooltipForActions(F(I.createRecording),"chrome-recorder.create-recording"),jslogContext:"chrome-recorder.create-recording"}}
|
|
50
|
+
></devtools-button>
|
|
51
|
+
<div class="separator"></div>
|
|
52
|
+
<select
|
|
53
|
+
.disabled=${0===e.length||this.#o.isPlaying||this.isRecording||this.isToggling}
|
|
54
|
+
@click=${e=>e.stopPropagation()}
|
|
55
|
+
@change=${this.#O}
|
|
56
|
+
jslog=${v.dropDown("recordings").track({change:!0})}
|
|
57
|
+
>
|
|
58
|
+
${u.Directives.repeat(r,(e=>e.value),(e=>E`<option .selected=${e.selected} value=${e.value}>${e.name}</option>`))}
|
|
59
|
+
</select>
|
|
60
|
+
<div class="separator"></div>
|
|
61
|
+
<devtools-button
|
|
62
|
+
@click=${this.#q}
|
|
63
|
+
.data=${{variant:"toolbar",iconName:"import",title:F(I.importRecording),jslogContext:"import-recording"}}
|
|
64
|
+
></devtools-button>
|
|
65
|
+
<devtools-button
|
|
66
|
+
id='origin'
|
|
67
|
+
@click=${this.#te}
|
|
68
|
+
on-render=${h.Directives.nodeRenderedCallback((e=>{this.#n=e}))}
|
|
69
|
+
.data=${{variant:"toolbar",iconName:"download",title:F(I.exportRecording),disabled:!this.currentRecording}}
|
|
70
|
+
jslog=${v.dropDown("export-recording").track({click:!0})}
|
|
71
|
+
></devtools-button>
|
|
72
|
+
<devtools-menu
|
|
73
|
+
@menucloserequest=${this.#re}
|
|
74
|
+
@menuitemselected=${this.#U}
|
|
75
|
+
.origin=${this.#ee}
|
|
76
|
+
.showDivider=${!1}
|
|
77
|
+
.showSelectedItem=${!1}
|
|
78
|
+
.open=${this.exportMenuExpanded}
|
|
79
|
+
>
|
|
80
|
+
<devtools-menu-group .name=${F(I.export)}>
|
|
81
|
+
${u.Directives.repeat(this.#a,(e=>E`
|
|
82
|
+
<devtools-menu-item
|
|
83
|
+
.value=${e.getId()}
|
|
84
|
+
jslog=${v.item(`converter-${o.StringUtilities.toKebabCase(e.getId())}`).track({click:!0})}>
|
|
85
|
+
${e.getFormatName()}
|
|
86
|
+
</devtools-menu-item>
|
|
87
|
+
`))}
|
|
88
|
+
</devtools-menu-group>
|
|
89
|
+
<devtools-menu-group .name=${F(I.exportViaExtensions)}>
|
|
90
|
+
${u.Directives.repeat(this.extensionConverters,(e=>E`
|
|
91
|
+
<devtools-menu-item
|
|
92
|
+
.value=${e.getId()}
|
|
93
|
+
jslog=${v.item("converter-extension").track({click:!0})}>
|
|
94
|
+
${e.getFormatName()}
|
|
95
|
+
</devtools-menu-item>
|
|
96
|
+
`))}
|
|
97
|
+
<devtools-menu-item .value=${A}>
|
|
98
|
+
${F(I.getExtensions)}
|
|
99
|
+
</devtools-menu-item>
|
|
100
|
+
</devtools-menu-group>
|
|
101
|
+
</devtools-menu>
|
|
102
|
+
<devtools-button
|
|
103
|
+
@click=${this.#F}
|
|
104
|
+
.data=${{variant:"toolbar",iconName:"bin",disabled:!this.currentRecording||this.#o.isPlaying||this.isRecording||this.isToggling,title:F(I.deleteRecording),jslogContext:"delete-recording"}}
|
|
105
|
+
></devtools-button>
|
|
106
|
+
<div class="separator"></div>
|
|
107
|
+
<devtools-button
|
|
108
|
+
@click=${()=>this.recordingPlayer?.continue()}
|
|
109
|
+
.data=${{variant:"primary_toolbar",iconName:"resume",disabled:!this.recordingPlayer||!this.#o.isPausedOnBreakpoint,title:F(I.continueReplay),jslogContext:"continue-replay"}}
|
|
110
|
+
></devtools-button>
|
|
111
|
+
<devtools-button
|
|
112
|
+
@click=${()=>this.recordingPlayer?.stepOver()}
|
|
113
|
+
.data=${{variant:"toolbar",iconName:"step-over",disabled:!this.recordingPlayer||!this.#o.isPausedOnBreakpoint,title:F(I.stepOverReplay),jslogContext:"step-over"}}
|
|
114
|
+
></devtools-button>
|
|
115
|
+
<div class="feedback">
|
|
116
|
+
<x-link class="x-link" href=${"https://goo.gle/recorder-feedback"} jslog=${v.link("feedback").track({click:!0})}>${F(I.sendFeedback)}</x-link>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="separator"></div>
|
|
119
|
+
<devtools-shortcut-dialog
|
|
120
|
+
.data=${{shortcuts:this.#K()}} jslog=${v.action("show-shortcuts").track({click:!0})}
|
|
121
|
+
></devtools-shortcut-dialog>
|
|
122
|
+
</div>
|
|
123
|
+
${this.importError?E`<div class='error'>Import error: ${this.importError.message}</div>`:""}
|
|
124
|
+
${this.#G()}
|
|
125
|
+
</div>
|
|
126
|
+
`}};P([T()],B.prototype,"currentRecordingSession",void 0),P([T()],B.prototype,"currentRecording",void 0),P([T()],B.prototype,"currentStep",void 0),P([T()],B.prototype,"recordingError",void 0),P([T()],B.prototype,"isRecording",void 0),P([T()],B.prototype,"isToggling",void 0),P([T()],B.prototype,"recordingPlayer",void 0),P([T()],B.prototype,"lastReplayResult",void 0),P([T()],B.prototype,"currentPage",void 0),P([T()],B.prototype,"previousPage",void 0),P([T()],B.prototype,"sections",void 0),P([T()],B.prototype,"settings",void 0),P([T()],B.prototype,"importError",void 0),P([T()],B.prototype,"exportMenuExpanded",void 0),P([T()],B.prototype,"extensionConverters",void 0),P([T()],B.prototype,"replayExtensions",void 0),P([T()],B.prototype,"viewDescriptor",void 0),B=P([N("devtools-recorder-controller")],B);var D=Object.freeze({__proto__:null,get RecorderController(){return B}});let O;class U extends p.Panel.Panel{static panelName="chrome-recorder";#oe;constructor(){super(U.panelName),this.element.setAttribute("jslog",`${v.panel("chrome-recorder").track({resize:!0})}`),this.#oe=new B,this.contentElement.append(this.#oe)}static instance(e={forceNew:null}){const{forceNew:t}=e;return O&&!t||(O=new U),O}wasShown(){p.Context.Context.instance().setFlavor(U,this),this.#oe.focus()}willHide(){p.Context.Context.instance().setFlavor(U,null)}handleActions(e){this.#oe.handleActions(e)}isActionPossible(e){return this.#oe.isActionPossible(e)}}var V=Object.freeze({__proto__:null,ActionDelegate:class{handleAction(e,t){return(async()=>{await p.ViewManager.ViewManager.instance().showView(U.panelName);const e=p.ViewManager.ViewManager.instance().view(U.panelName);if(e){(await e.widget()).handleActions(t)}})(),!0}},RecorderPanel:U});export{D as RecorderController,b as RecorderEvents,V as RecorderPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"../../../core/common/common.js";var e=Object.freeze({__proto__:null,SharedObject:class{#t=new t.Mutex.Mutex;#e=0;#r;#a;#i;constructor(t,e){this.#a=t,this.#i=e}async acquire(){return await this.#t.run((async()=>{0===this.#e&&(this.#r=await this.#a()),++this.#e})),[this.#r,this.#s.bind(this,{released:!1})]}async run(t){const[e,r]=await this.acquire();try{return await t(e)}finally{await r()}}async#s(t){if(t.released)throw new Error("Attempted to release object multiple times.");try{t.released=!0,await this.#t.run((async()=>{1===this.#e&&(await this.#i(this.#r),this.#r=void 0),--this.#e}))}catch(e){throw t.released=!1,e}}}});const r=!1,a="devtools_recorder";class i{static#c;static async get(){return this.#c||(this.#c=(await fetch(new URL("../injected/injected.generated.js",import.meta.url))).text()),await this.#c}}export{a as DEVTOOLS_RECORDER_WORLD_NAME,i as InjectedScript,e as SharedObject,r as isDebugBuild};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"../../core/i18n/i18n.js";import"../../core/root/root.js";import*as o from"../../ui/legacy/legacy.js";const n={rnWelcome:"Welcome",showRnWelcome:"Show React Native Welcome panel",debuggerBrandName:"React Native DevTools"},r=e.i18n.registerUIStrings("panels/rn_welcome/rn_welcome-meta.ts",n),i=e.i18n.getLazilyComputedLocalizedString.bind(void 0,r);let a;o.ViewManager.registerViewExtension({location:"panel",id:"rn-welcome",title:i(n.rnWelcome),commandPrompt:i(n.showRnWelcome),order:-10,persistence:"permanent",loadView:async()=>(await async function(){return a||(a=await import("./rn_welcome.js")),a}()).RNWelcome.RNWelcomeImpl.instance({debuggerBrandName:i(n.debuggerBrandName),showDocs:!0}),experiment:"react-native-specific-ui"});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import*as e from"../../core/host/host.js";import*as i from"../../core/i18n/i18n.js";import*as o from"../../core/root/root.js";import*as t from"../../core/sdk/sdk.js";import*as s from"../../ui/legacy/legacy.js";import{render as n,html as r}from"../../ui/lit/lit.js";var a={cssText:`.rn-welcome-panel{display:flex;flex-direction:column;flex-shrink:0;align-items:stretch;justify-content:center;padding:36px;background-color:var(--color-background);min-height:100%}@media (width >= 1000px){.rn-welcome-panel{flex-direction:row;align-items:center;justify-content:stretch;height:100%;padding:0}}.rn-welcome-hero{display:flex;flex-direction:column;flex-grow:1;flex-shrink:0;align-items:center;justify-content:center;padding:16px;text-align:center}@media (width >= 1000px){.rn-welcome-hero{margin-left:24px}}.rn-welcome-heading{display:flex;align-items:center;margin-bottom:16px}.rn-welcome-icon{width:30px;height:30px;border-radius:7px;margin-right:12px}.rn-welcome-title{font-size:20px;font-weight:normal;color:var(--color-text-primary)}.rn-welcome-tagline{margin-bottom:24px;font-size:1rem;line-height:1.3;color:var(--color-text-secondary)}.rn-welcome-links{display:flex;align-items:center}.rn-welcome-links > .devtools-link{position:relative;margin:0 16px;font-size:14px}.rn-welcome-links > .devtools-link:not(:last-child)::after{content:"";position:absolute;right:-16px;height:16px;border-right:1px solid var(--sys-color-on-base-divider)}.rn-welcome-version{position:fixed;top:8px;right:8px;margin-top:24px;padding:4px 12px;border-radius:8px;background:var(--sys-color-surface2);color:var(--color-text-secondary);font-size:11px;z-index:10}.rn-welcome-docsfeed{display:flex;flex-direction:column;flex-shrink:0;align-items:stretch;max-width:700px;margin:0 auto;padding:24px}@media (width >= 1000px){.rn-welcome-docsfeed{flex-shrink:1;width:45%;max-height:100%;margin:0;padding:20px 24px;padding-right:80px;overflow:auto}}.rn-welcome-docsfeed-highlight{display:flex;justify-content:stretch;flex-direction:column;position:relative;overflow:hidden;margin:8px -16px;margin-top:16px;padding:4px 16px;border-radius:16px;flex-shrink:0;background:linear-gradient(135deg,color-mix(in srgb,var(--sys-color-blue-bright),transparent 92%) 0%,color-mix(in srgb,var(--sys-color-purple-bright),transparent 88%) 100%)}.rn-welcome-h2{flex-shrink:0;font-size:16px;font-weight:normal;color:var(--color-text-primary)}.rn-welcome-docsfeed-item{display:flex;flex-shrink:0;align-items:center;margin-bottom:8px;padding:8px;padding-right:16px;border:1px solid var(--sys-color-divider);border-radius:10px;background-color:var(--sys-color-base);text-align:left;font-size:14px;cursor:pointer}.rn-welcome-docsfeed-item:hover{background-color:var(--color-background-elevation-1)}.rn-welcome-docsfeed-item:focus{outline:solid var(--color-grid-focus-selected)}.rn-welcome-docsfeed-item p{margin:0;margin-bottom:4px;text-decoration:none}.rn-welcome-docsfeed-item :not(.devtools-link){color:var(--color-text-secondary)}.rn-welcome-image{flex-shrink:0;aspect-ratio:calc(16 / 9);height:70px;margin-right:16px;border-radius:6px;background-color:var(--sys-color-on-surface-subtle);background-position:center;background-size:cover}.rn-session-id-message{display:block;margin-top:64px;margin-bottom:8px}.rn-session-id{user-select:all;cursor:text}.code-block{background:var(--sys-color-surface2);padding:8px;border-radius:8px;color:var(--sys-color-on-surface);font-family:var(--monospace-font-family)}\n/*# sourceURL=${import.meta.resolve("./rnWelcome.css")} */\n`};const l={welcomeMessage:"Welcome to debugging in React Native",docsLabel:"Debugging docs",whatsNewLabel:"What's new",sessionIdMessage:"[FB-only] React Native DevTools session ID:",docsDebuggingBasics:"Debugging Basics",docsDebuggingBasicsDetail:"Overview of debugging tools in React Native",docsReactNativeDevTools:"React Native DevTools",docsReactDevToolsDetail:"Explore features available in React Native DevTools",docsNativeDebugging:"Native Debugging",docsNativeDebuggingDetail:"Find out more about native debugging tools"},c=i.i18n.registerUIStrings("panels/rn_welcome/RNWelcome.ts",l),d=i.i18n.getLocalizedString.bind(void 0,c);let g;class p extends s.Widget.VBox{options;#e;#i=!1;static instance(e){return g||(g=new p(e)),g}constructor(e){super(!0,!0),this.registerRequiredCSS(a),this.options=e,t.TargetManager.TargetManager.instance().observeModels(t.ReactNativeApplicationModel.ReactNativeApplicationModel,this)}wasShown(){super.wasShown(),this.render(),this.#i||s.InspectorView.InspectorView.instance().showDrawer({focus:!0,hasTargetDrawer:!1})}modelAdded(e){e.ensureEnabled(),e.addEventListener("MetadataUpdated",this.#o,this),this.#e=e.metadataCached?.reactNativeVersion,this.#i=e.metadataCached?.unstable_isProfilingBuild||!1}modelRemoved(e){e.removeEventListener("MetadataUpdated",this.#o,this)}#o(e){this.#e=e.data.reactNativeVersion,this.#i=e.data.unstable_isProfilingBuild||!1,this.isShowing()&&this.render()}#t(i){e.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(i)}render(){const{debuggerBrandName:e,showDocs:i=!1}=this.options,t=new URL("../../Images/react_native/welcomeIcon.png",import.meta.url).toString(),s=new URL("../../Images/react_native/learn-debugging-basics.jpg",import.meta.url).toString(),a=new URL("../../Images/react_native/learn-react-native-devtools.jpg",import.meta.url).toString(),c=new URL("../../Images/react_native/learn-native-debugging.jpg",import.meta.url).toString(),g=o.Runtime.Runtime.queryParam("launchId");n(r`
|
|
2
|
+
<div class="rn-welcome-panel">
|
|
3
|
+
<header class="rn-welcome-hero">
|
|
4
|
+
<div class="rn-welcome-heading">
|
|
5
|
+
<img class="rn-welcome-icon" src=${t} role="presentation" />
|
|
6
|
+
<h1 class="rn-welcome-title">
|
|
7
|
+
${e()}
|
|
8
|
+
</h1>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="rn-welcome-tagline">
|
|
11
|
+
${d(l.welcomeMessage)}
|
|
12
|
+
</div>
|
|
13
|
+
<div class="rn-welcome-links">
|
|
14
|
+
<x-link class="devtools-link" href="https://reactnative.dev/docs/debugging">
|
|
15
|
+
${d(l.docsLabel)}
|
|
16
|
+
</x-link>
|
|
17
|
+
<x-link class="devtools-link" href="https://reactnative.dev/blog">
|
|
18
|
+
${d(l.whatsNewLabel)}
|
|
19
|
+
</x-link>
|
|
20
|
+
</div>
|
|
21
|
+
${g?r`
|
|
22
|
+
<aside>
|
|
23
|
+
<div class="rn-session-id-message">
|
|
24
|
+
${d(l.sessionIdMessage)}
|
|
25
|
+
</div>
|
|
26
|
+
<div class="code-block rn-session-id">
|
|
27
|
+
${g}
|
|
28
|
+
</div>
|
|
29
|
+
</aside>
|
|
30
|
+
`:""}
|
|
31
|
+
${null!==this.#e&&void 0!==this.#e?r`
|
|
32
|
+
<p class="rn-welcome-version">React Native: <code>${this.#e}</code></p>
|
|
33
|
+
`:null}
|
|
34
|
+
</header>
|
|
35
|
+
${i?r`
|
|
36
|
+
<section class="rn-welcome-docsfeed">
|
|
37
|
+
<h2 class="rn-welcome-h2">Learn</h2>
|
|
38
|
+
<button class="rn-welcome-docsfeed-item" type="button" role="link" @click=${this.#t.bind(this,"https://reactnative.dev/docs/debugging")} title=${d(l.docsDebuggingBasics)}>
|
|
39
|
+
<div class="rn-welcome-image" style="background-image: url('${s}')"></div>
|
|
40
|
+
<div>
|
|
41
|
+
<p class="devtools-link">${d(l.docsDebuggingBasics)}</p>
|
|
42
|
+
<p>${d(l.docsDebuggingBasicsDetail)}</p>
|
|
43
|
+
</div>
|
|
44
|
+
</button>
|
|
45
|
+
<button class="rn-welcome-docsfeed-item" type="button" role="link" @click=${this.#t.bind(this,"https://reactnative.dev/docs/react-native-devtools")} title=${d(l.docsReactNativeDevTools)}>
|
|
46
|
+
<div class="rn-welcome-image" style="background-image: url('${a}')"></div>
|
|
47
|
+
<div>
|
|
48
|
+
<p class="devtools-link">${d(l.docsReactNativeDevTools)}</p>
|
|
49
|
+
<p>${d(l.docsReactDevToolsDetail)}</p>
|
|
50
|
+
</div>
|
|
51
|
+
</button>
|
|
52
|
+
<button class="rn-welcome-docsfeed-item" type="button" role="link" @click=${this.#t.bind(this,"https://reactnative.dev/docs/debugging-native-code")} title=${d(l.docsNativeDebugging)}>
|
|
53
|
+
<div class="rn-welcome-image" style="background-image: url('${c}')"></div>
|
|
54
|
+
<div>
|
|
55
|
+
<p class="devtools-link">${d(l.docsNativeDebugging)}</p>
|
|
56
|
+
<p>${d(l.docsNativeDebuggingDetail)}</p>
|
|
57
|
+
</div>
|
|
58
|
+
</button>
|
|
59
|
+
</section>
|
|
60
|
+
`:null}
|
|
61
|
+
</div>
|
|
62
|
+
`,this.contentElement,{host:this})}}var m=Object.freeze({__proto__:null,RNWelcomeImpl:p});export{m as RNWelcome};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"../../core/common/common.js";import*as r from"../../ui/legacy/legacy.js";let o;async function a(){return o||(o=await import("./screencast.js")),o}r.Toolbar.registerToolbarItem({loadItem:async()=>(await a()).ScreencastApp.ToolbarButtonProvider.instance(),order:1,location:"main-toolbar-left"}),e.AppProvider.registerAppProvider({loadAppProvider:async()=>(await a()).ScreencastApp.ScreencastAppProvider.instance(),order:1}),r.ContextMenu.registerItem({location:"mainMenu",order:10,actionId:"components.request-app-banner"});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"../../core/sdk/sdk.js";import*as t from"../../core/common/common.js";import*as i from"../../core/i18n/i18n.js";import*as s from"../../ui/legacy/legacy.js";import*as n from"../../core/host/host.js";import*as o from"../../ui/components/icon_button/icon_button.js";const a=["left","middle","right","back","forward"],r={mousedown:"mousePressed",mouseup:"mouseReleased",mousemove:"mouseMoved"};class l extends e.SDKModel.SDKModel{inputAgent;activeMouseOffsetTop;constructor(e){super(e),this.inputAgent=e.inputAgent(),this.activeMouseOffsetTop=null}emitKeyEvent(e){let t;switch(e.type){case"keydown":t="keyDown";break;case"keyup":t="keyUp";break;case"keypress":t="char";break;default:return}const i="keypress"===e.type?String.fromCharCode(e.charCode):void 0;this.inputAgent.invoke_dispatchKeyEvent({type:t,modifiers:this.modifiersForEvent(e),text:i,unmodifiedText:i?i.toLowerCase():void 0,keyIdentifier:e.keyIdentifier,code:e.code,key:e.key,windowsVirtualKeyCode:e.keyCode,nativeVirtualKeyCode:e.keyCode,autoRepeat:e.repeat,isKeypad:3===e.location,isSystemKey:!1,location:3!==e.location?e.location:void 0})}emitMouseEvent(e,t,i){e.type in r&&("mousedown"!==e.type&&null!==this.activeMouseOffsetTop||(this.activeMouseOffsetTop=t),this.inputAgent.invoke_dispatchMouseEvent({type:r[e.type],x:Math.round(e.offsetX/i),y:Math.round(e.offsetY/i-this.activeMouseOffsetTop),modifiers:this.modifiersForEvent(e),button:a[e.button],clickCount:e.detail}),"mouseup"===e.type&&(this.activeMouseOffsetTop=null))}emitWheelEvent(e,t,i){null===this.activeMouseOffsetTop&&(this.activeMouseOffsetTop=t),this.inputAgent.invoke_dispatchMouseEvent({type:"mouseWheel",x:Math.round(e.offsetX/i),y:Math.round(e.offsetY/i-this.activeMouseOffsetTop),modifiers:this.modifiersForEvent(e),button:a[e.button],clickCount:e.detail,deltaX:e.deltaX/i,deltaY:e.deltaY/i})}modifiersForEvent(e){return Number(e.getModifierState("Alt"))|Number(e.getModifierState("Control"))<<1|Number(e.getModifierState("Meta"))<<2|Number(e.getModifierState("Shift"))<<3}}e.SDKModel.SDKModel.register(l,{capabilities:1024,autostart:!1});var h=Object.freeze({__proto__:null,InputModel:l}),d={cssText:`.screencast{overflow:hidden}.screencast-navigation{flex-direction:row;display:flex;align-items:center;position:relative;padding-left:1px;border-bottom:1px solid var(--sys-color-divider);background-origin:padding-box;background-clip:padding-box}.screencast-navigation button{border-width:0;padding:5px;width:28px;height:26px;background:none}.screencast-navigation button devtools-icon{width:100%;height:100%}.screencast-navigation button[disabled].navigation{opacity:50%}.screencast-navigation input{flex:1;margin:2px;max-height:19px}.screencast-navigation .progress{background-color:var(--sys-color-primary-bright);height:3px;left:0;position:absolute;top:100%;width:0;z-index:2}.screencast-viewport{display:flex;border:1px solid var(--sys-color-divider);border-radius:20px;flex:none;padding:20px;margin:auto;background-color:var(--sys-color-surface-variant)}.screencast-canvas-container{flex:auto;display:flex;border:1px solid var(--sys-color-divider);position:relative}.screencast-canvas-container.touchable{cursor:image-set(var(--image-file-touchCursor) 1x,var(--image-file-touchCursor_2x) 2x),default}.screencast canvas{flex:auto;position:relative}.screencast-element-title{position:absolute;z-index:10}.screencast-tag-name{color:var(--sys-color-token-tag)}.screencast-attribute{color:var(--sys-color-token-attribute)}.screencast-dimension{color:var(--sys-color-outline)}.screencast-glasspane{background-color:var(--color-background-opacity-80);font-size:30px;z-index:100;display:flex;justify-content:center;align-items:center}\n/*# sourceURL=${import.meta.resolve("./screencastView.css")} */\n`};const c={screencastViewOfDebugTarget:"Screencast view of debug target",theTabIsInactive:"The tab is inactive",profilingInProgress:"Profiling in progress",back:"back",forward:"forward",reload:"reload",addressBar:"Address bar",touchInput:"Use touch",mouseInput:"Use mouse"},g=i.i18n.registerUIStrings("panels/screencast/ScreencastView.ts",c),u=i.i18n.getLocalizedString.bind(void 0,g);class m extends s.Widget.VBox{screenCaptureModel;domModel;overlayModel;resourceTreeModel;networkManager;inputModel;shortcuts;scrollOffsetX;scrollOffsetY;screenZoom;screenOffsetTop;pageScaleFactor;imageElement;viewportElement;glassPaneElement;canvasElement;titleElement;context;imageZoom;tagNameElement;attributeElement;nodeWidthElement;nodeHeightElement;model;highlightConfig;navigationUrl;navigationBack;navigationForward;canvasContainerElement;checkerboardPattern;targetInactive;deferredCasting;highlightNode;config;node;inspectModeConfig;navigationBar;navigationReload;navigationProgressBar;touchInputToggle;mouseInputToggle;touchInputToggleIcon;mouseInputToggleIcon;historyIndex;historyEntries;isCasting=!1;screencastOperationId;constructor(t){super(),this.registerRequiredCSS(d),this.screenCaptureModel=t,this.domModel=t.target().model(e.DOMModel.DOMModel),this.overlayModel=t.target().model(e.OverlayModel.OverlayModel),this.resourceTreeModel=t.target().model(e.ResourceTreeModel.ResourceTreeModel),this.networkManager=t.target().model(e.NetworkManager.NetworkManager),this.inputModel=t.target().model(l),this.setMinimumSize(150,150),this.shortcuts={},this.scrollOffsetX=0,this.scrollOffsetY=0,this.screenZoom=1,this.screenOffsetTop=0,this.pageScaleFactor=1,this.imageZoom=1}initialize(){this.element.classList.add("screencast"),this.createNavigationBar(),this.viewportElement=this.element.createChild("div","screencast-viewport hidden"),this.canvasContainerElement=this.viewportElement.createChild("div","screencast-canvas-container"),this.glassPaneElement=this.canvasContainerElement.createChild("div","screencast-glasspane fill hidden"),this.canvasElement=this.canvasContainerElement.createChild("canvas"),s.ARIAUtils.setLabel(this.canvasElement,u(c.screencastViewOfDebugTarget)),this.canvasElement.tabIndex=0,this.canvasElement.addEventListener("mousedown",this.handleMouseEvent.bind(this),!1),this.canvasElement.addEventListener("mouseup",this.handleMouseEvent.bind(this),!1),this.canvasElement.addEventListener("mousemove",this.handleMouseEvent.bind(this),!1),this.canvasElement.addEventListener("wheel",this.handleWheelEvent.bind(this),!1),this.canvasElement.addEventListener("click",this.handleMouseEvent.bind(this),!1),this.canvasElement.addEventListener("contextmenu",this.handleContextMenuEvent.bind(this),!1),this.canvasElement.addEventListener("keydown",this.handleKeyEvent.bind(this),!1),this.canvasElement.addEventListener("keyup",this.handleKeyEvent.bind(this),!1),this.canvasElement.addEventListener("keypress",this.handleKeyEvent.bind(this),!1),this.canvasElement.addEventListener("blur",this.handleBlurEvent.bind(this),!1),this.titleElement=this.canvasContainerElement.createChild("div","screencast-element-title monospace hidden"),this.tagNameElement=this.titleElement.createChild("span","screencast-tag-name"),this.attributeElement=this.titleElement.createChild("span","screencast-attribute"),s.UIUtils.createTextChild(this.titleElement," ");const t=this.titleElement.createChild("span","screencast-dimension");this.nodeWidthElement=t.createChild("span"),s.UIUtils.createTextChild(t," × "),this.nodeHeightElement=t.createChild("span"),this.titleElement.style.top="0",this.titleElement.style.left="0",this.imageElement=new Image,this.context=this.canvasElement.getContext("2d"),this.checkerboardPattern=this.createCheckerboardPattern(this.context),this.shortcuts[s.KeyboardShortcut.KeyboardShortcut.makeKey("l",s.KeyboardShortcut.Modifiers.Ctrl.value)]=this.focusNavigationBar.bind(this),e.TargetManager.TargetManager.instance().addEventListener("SuspendStateChanged",this.onSuspendStateChange,this),this.updateGlasspane()}willHide(){this.stopCasting()}async startCasting(){if(e.TargetManager.TargetManager.instance().allTargetsSuspended())return;if(this.isCasting)return;this.isCasting=!0;const t=this.viewportDimensions();t.width<0||t.height<0?this.isCasting=!1:(t.width*=window.devicePixelRatio,t.height*=window.devicePixelRatio,this.screencastOperationId=await this.screenCaptureModel.startScreencast("jpeg",80,Math.floor(Math.min(2048,t.width)),Math.floor(Math.min(2048,t.height)),void 0,this.screencastFrame.bind(this),this.screencastVisibilityChanged.bind(this)),this.overlayModel&&this.overlayModel.setHighlighter(this))}stopCasting(){if(this.screencastOperationId){this.screenCaptureModel.stopScreencast(this.screencastOperationId),this.screencastOperationId=void 0,this.isCasting=!1;for(const t of e.TargetManager.TargetManager.instance().models(e.EmulationModel.EmulationModel))t.overrideEmulateTouch(!1);this.overlayModel&&this.overlayModel.setHighlighter(null)}}screencastFrame(e,t){this.imageElement.onload=()=>{this.pageScaleFactor=t.pageScaleFactor,this.screenOffsetTop=t.offsetTop,this.scrollOffsetX=t.scrollOffsetX,this.scrollOffsetY=t.scrollOffsetY;const e=t.deviceHeight/t.deviceWidth,i=this.viewportDimensions();this.imageZoom=Math.min(i.width/this.imageElement.naturalWidth,i.height/(this.imageElement.naturalWidth*e)),this.viewportElement.classList.remove("hidden");const s=p;this.imageZoom<1.01/window.devicePixelRatio&&(this.imageZoom=1/window.devicePixelRatio),this.screenZoom=this.imageElement.naturalWidth*this.imageZoom/t.deviceWidth,this.viewportElement.style.width=t.deviceWidth*this.screenZoom+s+"px",this.viewportElement.style.height=t.deviceHeight*this.screenZoom+s+"px";const n=this.highlightNode?{node:this.highlightNode,selectorList:void 0}:{clear:!0};this.updateHighlightInOverlayAndRepaint(n,this.highlightConfig)},this.imageElement.src="data:image/jpg;base64,"+e}isGlassPaneActive(){return!this.glassPaneElement.classList.contains("hidden")}screencastVisibilityChanged(e){this.targetInactive=!e,this.updateGlasspane()}onSuspendStateChange(){e.TargetManager.TargetManager.instance().allTargetsSuspended()?this.stopCasting():this.startCasting(),this.updateGlasspane()}updateGlasspane(){this.targetInactive?(this.glassPaneElement.textContent=u(c.theTabIsInactive),this.glassPaneElement.classList.remove("hidden")):e.TargetManager.TargetManager.instance().allTargetsSuspended()?(this.glassPaneElement.textContent=u(c.profilingInProgress),this.glassPaneElement.classList.remove("hidden")):this.glassPaneElement.classList.add("hidden")}async handleMouseEvent(e){if(this.isGlassPaneActive())return void e.consume();if(!this.pageScaleFactor||!this.domModel)return;if(!this.inspectModeConfig)return this.inputModel&&this.inputModel.emitMouseEvent(e,this.screenOffsetTop,this.screenZoom),e.preventDefault(),void("mousedown"===e.type&&this.canvasElement.focus());const i=this.convertIntoScreenSpace(e),s=await this.domModel.nodeForLocation(Math.floor(i.x/this.pageScaleFactor+this.scrollOffsetX),Math.floor(i.y/this.pageScaleFactor+this.scrollOffsetY),t.Settings.Settings.instance().moduleSetting("show-ua-shadow-dom").get());s&&("mousemove"===e.type?(this.updateHighlightInOverlayAndRepaint({node:s,selectorList:void 0},this.inspectModeConfig),this.domModel.overlayModel().nodeHighlightRequested({nodeId:s.id})):"click"===e.type&&this.domModel.overlayModel().inspectNodeRequested({backendNodeId:s.backendNodeId()}))}async handleWheelEvent(e){this.isGlassPaneActive()?e.consume():this.pageScaleFactor&&this.domModel&&(this.inputModel&&this.inputModel.emitWheelEvent(e,this.screenOffsetTop,this.screenZoom),e.preventDefault())}handleKeyEvent(e){if(this.isGlassPaneActive())return void e.consume();const t=s.KeyboardShortcut.KeyboardShortcut.makeKeyFromEvent(e),i=this.shortcuts[t];i?.(e)?e.consume():(this.inputModel&&this.inputModel.emitKeyEvent(e),e.consume(),this.canvasElement.focus())}handleBlurEvent(){if(this.inputModel&&this.mouseInputToggle?.disabled){const e=new MouseEvent("mouseup");this.inputModel.emitMouseEvent(e,this.screenOffsetTop,this.screenZoom)}}handleContextMenuEvent(e){e.consume(!0)}convertIntoScreenSpace(e){return{x:Math.round(e.offsetX/this.screenZoom),y:Math.round(e.offsetY/this.screenZoom-this.screenOffsetTop)}}onResize(){this.deferredCasting&&(clearTimeout(this.deferredCasting),delete this.deferredCasting),this.stopCasting(),this.deferredCasting=window.setTimeout(this.startCasting.bind(this),100)}highlightInOverlay(e,t){this.updateHighlightInOverlayAndRepaint(e,t)}async updateHighlightInOverlayAndRepaint(t,i){let s=null;if("node"in t&&(s=t.node),!s&&"deferredNode"in t&&(s=await t.deferredNode.resolvePromise()),!s&&"object"in t){const i=t.object.runtimeModel().target().model(e.DOMModel.DOMModel);i&&(s=await i.pushObjectAsNodeToFrontend(t.object))}if(this.highlightNode=s,this.highlightConfig=i,!s)return this.model=null,this.config=null,this.node=null,this.titleElement.classList.add("hidden"),void this.repaint();this.node=s,s.boxModel().then((e=>{e&&this.pageScaleFactor?(this.model=this.scaleModel(e),this.config=i,this.repaint()):this.repaint()}))}scaleModel(e){function t(e){for(let t=0;t<e.length;t+=2)e[t]=e[t]*this.pageScaleFactor*this.screenZoom,e[t+1]=(e[t+1]*this.pageScaleFactor+this.screenOffsetTop)*this.screenZoom}return t.call(this,e.content),t.call(this,e.padding),t.call(this,e.border),t.call(this,e.margin),e}repaint(){const e=this.model,t=this.config,i=this.canvasElement.getBoundingClientRect().width,s=this.canvasElement.getBoundingClientRect().height;if(this.canvasElement.width=window.devicePixelRatio*i,this.canvasElement.height=window.devicePixelRatio*s,this.context.save(),this.context.scale(window.devicePixelRatio,window.devicePixelRatio),this.context.save(),this.checkerboardPattern&&(this.context.fillStyle=this.checkerboardPattern),this.context.fillRect(0,0,i,this.screenOffsetTop*this.screenZoom),this.context.fillRect(0,this.screenOffsetTop*this.screenZoom+this.imageElement.naturalHeight*this.imageZoom,i,s),this.context.restore(),e&&t){this.context.save();const i=[],s=e=>Boolean(e.a&&0===e.a);e.content&&t.contentColor&&!s(t.contentColor)&&i.push({quad:e.content,color:t.contentColor}),e.padding&&t.paddingColor&&!s(t.paddingColor)&&i.push({quad:e.padding,color:t.paddingColor}),e.border&&t.borderColor&&!s(t.borderColor)&&i.push({quad:e.border,color:t.borderColor}),e.margin&&t.marginColor&&!s(t.marginColor)&&i.push({quad:e.margin,color:t.marginColor});for(let e=i.length-1;e>0;--e)this.drawOutlinedQuadWithClip(i[e].quad,i[e-1].quad,i[e].color);i.length>0&&this.drawOutlinedQuad(i[0].quad,i[0].color),this.context.restore(),this.drawElementTitle(),this.context.globalCompositeOperation="destination-over"}this.context.drawImage(this.imageElement,0,this.screenOffsetTop*this.screenZoom,this.imageElement.naturalWidth*this.imageZoom,this.imageElement.naturalHeight*this.imageZoom),this.context.restore()}cssColor(e){return e?t.Color.Legacy.fromRGBA([e.r,e.g,e.b,void 0!==e.a?e.a:1]).asString("rgba")||"":"transparent"}quadToPath(e){return this.context.beginPath(),this.context.moveTo(e[0],e[1]),this.context.lineTo(e[2],e[3]),this.context.lineTo(e[4],e[5]),this.context.lineTo(e[6],e[7]),this.context.closePath(),this.context}drawOutlinedQuad(e,t){this.context.save(),this.context.lineWidth=2,this.quadToPath(e).clip(),this.context.fillStyle=this.cssColor(t),this.context.fill(),this.context.restore()}drawOutlinedQuadWithClip(e,t,i){this.context.fillStyle=this.cssColor(i),this.context.save(),this.context.lineWidth=0,this.quadToPath(e).fill(),this.context.globalCompositeOperation="destination-out",this.context.fillStyle="red",this.quadToPath(t).fill(),this.context.restore()}drawElementTitle(){if(!this.node)return;const e=this.canvasElement.getBoundingClientRect().width,t=this.canvasElement.getBoundingClientRect().height,i=this.node.localName()||this.node.nodeName().toLowerCase();this.tagNameElement.textContent=i,this.attributeElement.textContent=function(e){const t=e.getAttribute("id"),i=e.getAttribute("class");let s=t?"#"+t:"";i&&(s+="."+i.trim().replace(/\s+/g,"."));s.length>50&&(s=s.substring(0,50)+"…");return s}(this.node),this.nodeWidthElement.textContent=String(this.model?this.model.width:0),this.nodeHeightElement.textContent=String(this.model?this.model.height:0),this.titleElement.classList.remove("hidden");const s=this.titleElement.offsetWidth+6,n=this.titleElement.offsetHeight+4,o=this.model?this.model.margin[1]:0,a=this.model?this.model.margin[7]:0;let r,l=!1,h=!1,d=Math.max(2,this.model?this.model.margin[0]:0);d+s>e&&(d=e-s-2),o>t?(r=t-n-7,h=!0):a<0?(r=7,l=!0):a+n+7<t?(r=a+7-4,l=!0):o-n-7>0?(r=o-n-7+3,h=!0):r=7,this.context.save(),this.context.translate(.5,.5),this.context.beginPath(),this.context.moveTo(d,r),l&&(this.context.lineTo(d+14,r),this.context.lineTo(d+21,r-7),this.context.lineTo(d+28,r)),this.context.lineTo(d+s,r),this.context.lineTo(d+s,r+n),h&&(this.context.lineTo(d+28,r+n),this.context.lineTo(d+21,r+n+7),this.context.lineTo(d+14,r+n)),this.context.lineTo(d,r+n),this.context.closePath(),this.context.fillStyle="var(--sys-color-yellow-container)",this.context.fill(),this.context.strokeStyle="var(--sys-color-outline)",this.context.stroke(),this.context.restore(),this.titleElement.style.top=r+3+"px",this.titleElement.style.left=d+3+"px"}viewportDimensions(){const e=p;return{width:this.element.offsetWidth-e-30,height:this.element.offsetHeight-e-30-v}}setInspectMode(e,t){return this.inspectModeConfig="none"!==e?t:null,Promise.resolve()}highlightFrame(e){}createCheckerboardPattern(e){const t=document.createElement("canvas"),i=32;t.width=64,t.height=64;const s=t.getContext("2d");return s.fillStyle="var(--sys-color-neutral-outline)",s.fillRect(0,0,64,64),s.fillStyle="var(--sys-color-surface-variant)",s.fillRect(0,0,i,i),s.fillRect(i,i,i,i),e.createPattern(t,"repeat")}createNavigationBar(){this.navigationBar=this.element.createChild("div","screencast-navigation"),this.navigationBack=this.navigationBar.createChild("button","navigation"),this.navigationBack.appendChild(o.Icon.create("arrow-back")),this.navigationBack.disabled=!0,s.ARIAUtils.setLabel(this.navigationBack,u(c.back)),this.navigationForward=this.navigationBar.createChild("button","navigation"),this.navigationForward.appendChild(o.Icon.create("arrow-forward")),this.navigationForward.disabled=!0,s.ARIAUtils.setLabel(this.navigationForward,u(c.forward)),this.navigationReload=this.navigationBar.createChild("button","navigation"),this.navigationReload.appendChild(o.Icon.create("refresh")),s.ARIAUtils.setLabel(this.navigationReload,u(c.reload)),this.navigationUrl=this.navigationBar.appendChild(s.UIUtils.createInput()),this.navigationUrl.type="text",s.ARIAUtils.setLabel(this.navigationUrl,u(c.addressBar)),this.mouseInputToggle=this.navigationBar.createChild("button"),this.mouseInputToggle.disabled=!0,this.mouseInputToggleIcon=this.mouseInputToggle.appendChild(new o.Icon.Icon),this.mouseInputToggleIcon.data={color:"var(--icon-toggled)",iconName:"mouse"},s.ARIAUtils.setLabel(this.mouseInputToggle,u(c.mouseInput)),this.touchInputToggle=this.navigationBar.createChild("button"),this.touchInputToggleIcon=this.touchInputToggle.appendChild(o.Icon.create("touch-app")),s.ARIAUtils.setLabel(this.touchInputToggle,u(c.touchInput)),this.navigationProgressBar=new b(this.resourceTreeModel,this.networkManager,this.navigationBar.createChild("div","progress")),this.resourceTreeModel&&(this.navigationBack.addEventListener("click",this.navigateToHistoryEntry.bind(this,-1),!1),this.navigationForward.addEventListener("click",this.navigateToHistoryEntry.bind(this,1),!1),this.navigationReload.addEventListener("click",this.navigateReload.bind(this),!1),this.navigationUrl.addEventListener("keyup",this.navigationUrlKeyUp.bind(this),!0),this.touchInputToggle.addEventListener("click",this.#e.bind(this,!0),!1),this.mouseInputToggle.addEventListener("click",this.#e.bind(this,!1),!1),this.requestNavigationHistory(),this.resourceTreeModel.addEventListener(e.ResourceTreeModel.Events.PrimaryPageChanged,this.requestNavigationHistoryEvent,this),this.resourceTreeModel.addEventListener(e.ResourceTreeModel.Events.CachedResourcesLoaded,this.requestNavigationHistoryEvent,this))}navigateToHistoryEntry(e){if(!this.resourceTreeModel)return;const t=(this.historyIndex||0)+e;!this.historyEntries||t<0||t>=this.historyEntries.length||(this.resourceTreeModel.navigateToHistoryEntry(this.historyEntries[t]),this.requestNavigationHistory())}navigateReload(){this.resourceTreeModel&&this.resourceTreeModel.reloadPage()}navigationUrlKeyUp(e){if("Enter"!==e.key)return;let t=this.navigationUrl.value;t&&(t.match(E)||(t="http://"+t),this.resourceTreeModel&&this.resourceTreeModel.navigate(t),this.canvasElement.focus())}#e(t){if(!(this.canvasContainerElement&&this.isCasting&&this.mouseInputToggle&&this.touchInputToggle&&this.mouseInputToggleIcon&&this.touchInputToggleIcon))return;const i=e.TargetManager.TargetManager.instance().models(e.EmulationModel.EmulationModel);for(const e of i)e.overrideEmulateTouch(t);this.mouseInputToggle.disabled=!t,this.touchInputToggle.disabled=t,this.mouseInputToggleIcon.data={...this.mouseInputToggleIcon.data,color:this.mouseInputToggle.disabled?"var(--icon-toggled)":"var(--icon-default)"},this.touchInputToggleIcon.data={...this.touchInputToggleIcon.data,color:this.touchInputToggle.disabled?"var(--icon-toggled)":"var(--icon-default)"},this.canvasContainerElement.classList.toggle("touchable",t)}requestNavigationHistoryEvent(){this.requestNavigationHistory()}async requestNavigationHistory(){const e=this.resourceTreeModel?await this.resourceTreeModel.navigationHistory():null;if(!e)return;this.historyIndex=e.currentIndex,this.historyEntries=e.entries,this.navigationBack.disabled=0===this.historyIndex,this.navigationForward.disabled=this.historyIndex===this.historyEntries.length-1;let t=this.historyEntries[this.historyIndex].url;const i=t.match(f);i&&(t=i[1]),n.InspectorFrontendHost.InspectorFrontendHostInstance.inspectedURLChanged(t),this.navigationUrl.value=decodeURI(t)}focusNavigationBar(){return this.navigationUrl.focus(),this.navigationUrl.select(),!0}}const p=44,v=29,f=/^http:\/\/(.+)/,E=/^(https?|about|chrome):/;class b{element;requestIds;startedRequests;finishedRequests;maxDisplayedProgress;constructor(t,i,s){this.element=s,t&&(t.addEventListener(e.ResourceTreeModel.Events.PrimaryPageChanged,this.onPrimaryPageChanged,this),t.addEventListener(e.ResourceTreeModel.Events.Load,this.onLoad,this)),i&&(i.addEventListener(e.NetworkManager.Events.RequestStarted,this.onRequestStarted,this),i.addEventListener(e.NetworkManager.Events.RequestFinished,this.onRequestFinished,this)),this.requestIds=null,this.startedRequests=0,this.finishedRequests=0,this.maxDisplayedProgress=0}onPrimaryPageChanged(){this.requestIds=new Map,this.startedRequests=0,this.finishedRequests=0,this.maxDisplayedProgress=0,this.updateProgress(.1)}onLoad(){this.requestIds=null,this.updateProgress(1),window.setTimeout((()=>{this.navigationProgressVisible()||this.displayProgress(0)}),500)}navigationProgressVisible(){return null!==this.requestIds}onRequestStarted(e){if(!this.navigationProgressVisible())return;const i=e.data.request;i.resourceType()!==t.ResourceType.resourceTypes.WebSocket&&(this.requestIds&&this.requestIds.set(i.requestId(),i),++this.startedRequests)}onRequestFinished(e){if(!this.navigationProgressVisible())return;const t=e.data;this.requestIds&&!this.requestIds.has(t.requestId())||(++this.finishedRequests,window.setTimeout((()=>{this.updateProgress(this.finishedRequests/this.startedRequests*.9)}),500))}updateProgress(e){this.navigationProgressVisible()&&(this.maxDisplayedProgress>=e||(this.maxDisplayedProgress=e,this.displayProgress(e)))}displayProgress(e){this.element.style.width=100*e+"%"}}var y=Object.freeze({__proto__:null,BORDERS_SIZE:p,HTTP_REGEX:f,NAVBAR_HEIGHT:v,ProgressTracker:b,SCHEME_REGEX:E,ScreencastView:m});const M={toggleScreencast:"Toggle screencast"},T=i.i18n.registerUIStrings("panels/screencast/ScreencastApp.ts",M),w=i.i18n.getLocalizedString.bind(void 0,T);let C,x,I;class S{enabledSetting;toggleButton;rootSplitWidget;screenCaptureModel;screencastView;rootView;constructor(){this.enabledSetting=t.Settings.Settings.instance().createSetting("screencast-enabled",!0),this.toggleButton=new s.Toolbar.ToolbarToggle(w(M.toggleScreencast),"devices"),this.toggleButton.setToggled(this.enabledSetting.get()),this.toggleButton.setEnabled(!1),this.toggleButton.addEventListener("Click",this.toggleButtonClicked,this),e.TargetManager.TargetManager.instance().observeModels(e.ScreenCaptureModel.ScreenCaptureModel,this)}static instance(){return C||(C=new S),C}presentUI(e){this.rootView=new s.RootView.RootView,this.rootSplitWidget=new s.SplitWidget.SplitWidget(!1,!0,"inspector-view.screencast-split-view-state",300,300),this.rootSplitWidget.setVertical(!0),this.rootSplitWidget.setSecondIsSidebar(!0),this.rootSplitWidget.show(this.rootView.element),this.rootSplitWidget.hideMain(),this.rootSplitWidget.setSidebarWidget(s.InspectorView.InspectorView.instance()),s.InspectorView.InspectorView.instance().setOwnerSplit(this.rootSplitWidget),this.rootView.attachToDocument(e),this.rootView.focus()}modelAdded(t){t.target()===e.TargetManager.TargetManager.instance().primaryPageTarget()&&(this.screenCaptureModel=t,this.toggleButton.setEnabled(!0),this.screencastView=new m(t),this.rootSplitWidget&&this.rootSplitWidget.setMainWidget(this.screencastView),this.screencastView.initialize(),this.onScreencastEnabledChanged())}modelRemoved(e){this.screenCaptureModel===e&&(delete this.screenCaptureModel,this.toggleButton.setEnabled(!1),this.screencastView&&(this.screencastView.detach(),delete this.screencastView),this.onScreencastEnabledChanged())}toggleButtonClicked(){const e=this.toggleButton.isToggled();this.enabledSetting.set(e),this.onScreencastEnabledChanged()}onScreencastEnabledChanged(){if(!this.rootSplitWidget)return;const e=Boolean(this.enabledSetting.get()&&this.screencastView);this.toggleButton.setToggled(e),e?this.rootSplitWidget.showBoth():this.rootSplitWidget.hideMain()}}class k{static instance(e={forceNew:!1}){const{forceNew:t}=e;return x&&!t||(x=new k),x}item(){return S.instance().toggleButton}}class R{static instance(e={forceNew:!1}){const{forceNew:t}=e;return I&&!t||(I=new R),I}createApp(){return S.instance()}}var P=Object.freeze({__proto__:null,ScreencastApp:S,ScreencastAppProvider:R,ToolbarButtonProvider:k});export{h as InputModel,P as ScreencastApp,y as ScreencastView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as s from"../../core/platform/platform.js";import*as n from"../../models/text_utils/text_utils.js";import*as a from"../../ui/legacy/components/utils/utils.js";import*as r from"../../ui/legacy/legacy.js";import*as i from"../../core/host/host.js";import*as h from"../../models/workspace/workspace.js";import*as o from"../../ui/components/buttons/buttons.js";import*as c from"../../ui/components/icon_button/icon_button.js";import*as l from"../../ui/visual_logging/visual_logging.js";var d={cssText:`:host{padding:0;margin:0;overflow-y:auto}.tree-outline{padding:0}.tree-outline ol{padding:0}.tree-outline li{height:16px}li.search-result{cursor:pointer;font-size:12px;margin-top:8px;padding:2px 0 2px 4px;word-wrap:normal;white-space:pre}li.search-result:hover{background-color:var(--sys-color-state-hover-on-subtle)}li.search-result .search-result-file-name{color:var(--sys-color-on-surface);flex:1 1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}li.search-result .search-result-matches-count{color:var(--sys-color-token-subtle);margin:0 8px}li.search-result.expanded .search-result-matches-count{display:none}li.show-more-matches{color:var(--sys-color-on-surface);cursor:pointer;margin:8px 0 0 -4px}li.show-more-matches:hover{text-decoration:underline}li.search-match{margin:2px 0;word-wrap:normal;white-space:pre}li.search-match.selected:focus-visible{background:var(--sys-color-tonal-container)}li.search-match::before{display:none}li.search-match .search-match-line-number{color:var(--sys-color-token-subtle);text-align:right;vertical-align:top;word-break:normal;padding:2px 4px 2px 6px;margin-right:5px}.tree-outline .devtools-link{text-decoration:none;display:block;flex:auto}li.search-match .search-match-content{color:var(--sys-color-on-surface)}ol.children.expanded{padding-bottom:4px}li.search-match .link-style.search-match-link{overflow:hidden;text-overflow:ellipsis;margin-left:9px;text-align:left}.search-result-qualifier{color:var(--sys-color-token-subtle)}.search-result-dash{color:var(--sys-color-surface-variant);margin:0 4px}\n/*# sourceURL=${import.meta.resolve("./searchResultsPane.css")} */\n`};const u={matchesCountS:"Matches Count {PH1}",lineS:"Line {PH1}",showDMore:"Show {PH1} more"},g=t.i18n.registerUIStrings("panels/search/SearchResultsPane.ts",u),p=t.i18n.getLocalizedString.bind(void 0,g);class m extends r.Widget.VBox{searchConfig;searchResults;treeElements;treeOutline;matchesExpandedCount;constructor(e){super(!0),this.searchConfig=e,this.searchResults=[],this.treeElements=[],this.treeOutline=new r.TreeOutline.TreeOutlineInShadow,this.treeOutline.registerRequiredCSS(d),this.treeOutline.hideOverflow(),this.contentElement.appendChild(this.treeOutline.element),this.matchesExpandedCount=0}addSearchResult(e){this.searchResults.push(e),this.addTreeElement(e)}showAllMatches(){this.treeElements.forEach((e=>{e.expand(),e.showAllMatches()}))}collapseAllResults(){this.treeElements.forEach((e=>{e.collapse()}))}addTreeElement(e){const t=new S(this.searchConfig,e);this.treeOutline.appendChild(t),this.treeOutline.selectedTreeElement||t.select(!0,!0),this.matchesExpandedCount<f&&t.expand(),this.matchesExpandedCount+=e.matchesCount(),this.treeElements.push(t)}}const f=200;class S extends r.TreeOutline.TreeElement{searchConfig;searchResult;initialized;toggleOnClick;constructor(e,t){super("",!0),this.searchConfig=e,this.searchResult=t,this.initialized=!1,this.toggleOnClick=!0}onexpand(){this.initialized||(this.updateMatchesUI(),this.initialized=!0)}showAllMatches(){this.removeChildren(),this.appendSearchMatches(0,this.searchResult.matchesCount())}updateMatchesUI(){this.removeChildren();const e=Math.min(this.searchResult.matchesCount(),20);e<this.searchResult.matchesCount()?(this.appendSearchMatches(0,e-1),this.appendShowMoreMatchesElement(e-1)):this.appendSearchMatches(0,e)}onattach(){this.updateSearchMatches()}updateSearchMatches(){this.listItemElement.classList.add("search-result");const e=s(this.searchResult.label(),"search-result-file-name");e.appendChild(s("—","search-result-dash")),e.appendChild(s(this.searchResult.description(),"search-result-qualifier")),this.tooltip=this.searchResult.description(),this.listItemElement.appendChild(e);const t=document.createElement("span");function s(e,t){const s=document.createElement("span");return s.className=t,s.textContent=e,s}t.className="search-result-matches-count",t.textContent=`${this.searchResult.matchesCount()}`,r.ARIAUtils.setLabel(t,p(u.matchesCountS,{PH1:this.searchResult.matchesCount()})),this.listItemElement.appendChild(t),this.expanded&&this.updateMatchesUI()}appendSearchMatches(t,i){const h=this.searchResult,o=this.searchConfig.queries(),c=[];for(let e=0;e<o.length;++e)c.push(s.StringUtilities.createSearchRegex(o[e],!this.searchConfig.ignoreCase(),this.searchConfig.isRegex()));for(let s=t;s<i;++s){let t=h.matchLineContent(s),i=[];const o=h.matchColumn(s),l=h.matchLength(s);if(void 0!==o&&void 0!==l){const{matchRange:e,lineSegment:s}=C(t,new n.TextRange.SourceRange(o,l));t=s,i=[e]}else{t=t.trim();for(let e=0;e<c.length;++e)i=i.concat(this.regexMatchRanges(t,c[e]));({lineSegment:t,matchRanges:i}=w(t,i))}const d=a.Linkifier.Linkifier.linkifyRevealable(h.matchRevealable(s),"",void 0,void 0,void 0,"search-match");d.classList.add("search-match-link"),d.tabIndex=0;const g=document.createElement("span");g.classList.add("search-match-line-number");const m=h.matchLabel(s);g.textContent=m,"number"!=typeof m||isNaN(m)?r.ARIAUtils.setLabel(g,m):r.ARIAUtils.setLabel(g,p(u.lineS,{PH1:m})),d.appendChild(g);const f=this.createContentSpan(t,i);d.appendChild(f);const S=new r.TreeOutline.TreeElement;this.appendChild(S),S.listItemElement.className="search-match",S.listItemElement.appendChild(d),S.listItemElement.addEventListener("keydown",(t=>{"Enter"===t.key&&(t.consume(!0),e.Revealer.reveal(h.matchRevealable(s)))})),S.tooltip=t}}appendShowMoreMatchesElement(e){const t=this.searchResult.matchesCount()-e,s=p(u.showDMore,{PH1:t}),n=new r.TreeOutline.TreeElement(s);this.appendChild(n),n.listItemElement.classList.add("show-more-matches"),n.onselect=this.showMoreMatchesElementSelected.bind(this,n,e)}createContentSpan(e,t){const s=document.createElement("span");return s.className="search-match-content",s.textContent=e,r.ARIAUtils.setLabel(s,`${e} line`),r.UIUtils.highlightRangesWithStyleClass(s,t,"highlighted-search-result"),s}regexMatchRanges(e,t){let s;t.lastIndex=0;const a=[];for(;t.lastIndex<e.length&&(s=t.exec(e));)a.push(new n.TextRange.SourceRange(s.index,s[0].length));return a}showMoreMatchesElementSelected(e,t){return this.removeChild(e),this.appendSearchMatches(t,this.searchResult.matchesCount()),!1}}const x={prefixLength:25,maxLength:1e3};function C(e,t,s=x){const a={...x,...s},r=e.trimStart(),i=e.length-r.length,h=Math.min(t.offset,i),o=Math.max(h,t.offset-a.prefixLength),c=Math.min(e.length,o+a.maxLength),l=o>h?"…":"",d=l+e.substring(o,c),u=t.offset-o+l.length,g=Math.min(t.length,d.length-u);return{lineSegment:d,matchRange:new n.TextRange.SourceRange(u,g)}}function w(e,t){let s=0,a=t;a.length>0&&a[0].offset>20&&(s=15);let r=e.substring(s,1e3+s);return s&&(a=a.map((e=>new n.TextRange.SourceRange(e.offset-s+1,e.length))),r="…"+r),{lineSegment:r,matchRanges:a}}var b=Object.freeze({__proto__:null,SearchResultsPane:m,SearchResultsTreeElement:S,lineSegmentForMatch:C,matchesExpandedByDefault:f,matchesShownAtOnce:20}),v=Object.freeze({__proto__:null}),y={cssText:`.search-drawer-header{align-items:center;flex-shrink:0;overflow:hidden;display:inline-flex;min-width:150px;.search-container{border-bottom:1px solid var(--sys-color-divider);display:flex;height:100%;align-items:center;flex-grow:1}.toolbar-item-search{flex-grow:1;box-shadow:inset 0 0 0 2px transparent;box-sizing:border-box;height:var(--sys-size-9);margin-left:var(--sys-size-3);padding:0 var(--sys-size-2) 0 var(--sys-size-5);border-radius:100px;position:relative;display:flex;align-items:center;background-color:var(--sys-color-cdt-base);&:has(input:focus){box-shadow:inset 0 0 0 2px var(--sys-color-state-focus-ring)}&:has(input:hover)::before{content:"";box-sizing:inherit;height:100%;width:100%;position:absolute;border-radius:100px;left:0;background-color:var(--sys-color-state-hover-on-subtle)}& > devtools-icon{color:var(--sys-color-on-surface-subtle);width:var(--sys-size-8);height:var(--sys-size-8);margin-right:var(--sys-size-3)}& > devtools-button:last-child{margin-right:var(--sys-size-4)}}.search-toolbar-input{appearance:none;color:var(--sys-color-on-surface);background-color:transparent;border:0;z-index:1;flex:1;&::placeholder{color:var(--sys-color-on-surface-subtle)}&:placeholder-shown + .clear-button{display:none}&::-webkit-search-cancel-button{display:none}}}.search-toolbar{background-color:var(--sys-color-cdt-base-container);border-bottom:1px solid var(--sys-color-divider)}.search-toolbar-summary{background-color:var(--sys-color-cdt-base-container);border-top:1px solid var(--sys-color-divider);padding-left:5px;flex:0 0 19px;display:flex;padding-right:5px}.search-results:has(.empty-state) + .search-toolbar-summary{display:none}.search-toolbar-summary .search-message{padding-top:2px;padding-left:1ex;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.search-view .search-results{overflow-y:auto;display:flex;flex:auto}.search-view .search-results > div{flex:auto}\n/*# sourceURL=${import.meta.resolve("./searchView.css")} */\n`};const R={find:"Find",enableCaseSensitive:"Enable case sensitive search",disableCaseSensitive:"Disable case sensitive search",enableRegularExpression:"Enable regular expressions",disableRegularExpression:"Disable regular expressions",refresh:"Refresh",clearInput:"Clear",clear:"Clear search",indexing:"Indexing…",searching:"Searching…",indexingInterrupted:"Indexing interrupted.",foundMatchingLineInFile:"Found 1 matching line in 1 file.",foundDMatchingLinesInFile:"Found {PH1} matching lines in 1 file.",foundDMatchingLinesInDFiles:"Found {PH1} matching lines in {PH2} files.",noMatchesFound:"No matches found",nothingMatchedTheQuery:"Nothing matched your search query",searchFinished:"Search finished.",searchInterrupted:"Search interrupted.",typeAndPressSToSearch:"Type and press {PH1} to search",noSearchResult:"No search results"},E=t.i18n.registerUIStrings("panels/search/SearchView.ts",R),I=t.i18n.getLocalizedString.bind(void 0,E);function M(e,t){const s=new o.Button.Button;return s.data={variant:"icon_toggle",iconName:e,toggledIconName:e,toggleType:"primary-toggle",size:"SMALL",toggled:!1,jslogContext:t},s}class P extends r.Widget.VBox{focusOnShow;isIndexing;searchId;searchMatchesCount;searchResultsCount;nonEmptySearchResultsCount;searchingView;notFoundView;searchConfig;pendingSearchConfig;searchResultsPane;progressIndicator;visiblePane;searchPanelElement;searchResultsElement;search;matchCaseButton;regexButton;searchMessageElement;searchProgressPlaceholderElement;searchResultsMessageElement;advancedSearchConfig;searchScope;#e;#t=[];#s;constructor(t,s){super(!0),this.setMinimumSize(0,40),this.registerRequiredCSS(y),this.focusOnShow=!1,this.isIndexing=!1,this.searchId=1,this.searchMatchesCount=0,this.searchResultsCount=0,this.nonEmptySearchResultsCount=0,this.searchingView=null,this.notFoundView=null,this.searchConfig=null,this.pendingSearchConfig=null,this.searchResultsPane=null,this.progressIndicator=null,this.visiblePane=null,this.#e=s,this.contentElement.setAttribute("jslog",`${l.panel("search").track({resize:!0})}`),this.contentElement.classList.add("search-view"),this.contentElement.addEventListener("keydown",(e=>{this.onKeyDownOnPanel(e)})),this.searchPanelElement=this.contentElement.createChild("div","search-drawer-header"),this.searchResultsElement=this.contentElement.createChild("div"),this.searchResultsElement.className="search-results";const n=document.createElement("div");n.classList.add("search-container");const a=n.createChild("div","toolbar-item-search"),i=c.Icon.create("search");a.appendChild(i),this.search=r.UIUtils.createHistoryInput("search","search-toolbar-input"),this.search.addEventListener("keydown",(e=>{this.onKeyDown(e)})),this.search.setAttribute("jslog",`${l.textField().track({change:!0,keydown:"ArrowUp|ArrowDown|Enter"})}`),a.appendChild(this.search),this.search.placeholder=I(R.find),this.search.setAttribute("results","0"),this.search.setAttribute("size","100"),r.ARIAUtils.setLabel(this.search,this.search.placeholder);const d=new o.Button.Button;d.data={variant:"icon",iconName:"cross-circle-filled",jslogContext:"clear-input",size:"SMALL",title:I(R.clearInput)},d.classList.add("clear-button"),d.addEventListener("click",(()=>{this.onSearchInputClear()})),d.tabIndex=-1,a.appendChild(d);const u="regular-expression";this.regexButton=M(u,u),this.regexButton.addEventListener("click",(()=>this.regexButtonToggled())),a.appendChild(this.regexButton);const g="match-case";this.matchCaseButton=M(g,g),this.matchCaseButton.addEventListener("click",(()=>this.matchCaseButtonToggled())),a.appendChild(this.matchCaseButton),this.searchPanelElement.appendChild(n);const p=this.searchPanelElement.createChild("devtools-toolbar","search-toolbar");p.setAttribute("jslog",`${l.toolbar()}`);const m=new r.Toolbar.ToolbarButton(I(R.refresh),"refresh",void 0,"search.refresh"),f=new r.Toolbar.ToolbarButton(I(R.clear),"clear",void 0,"search.clear");p.appendToolbarItem(m),p.appendToolbarItem(f),m.addEventListener("Click",(()=>this.onAction())),f.addEventListener("Click",(()=>{this.resetSearch(),this.onSearchInputClear()}));const S=this.contentElement.createChild("div","search-toolbar-summary");this.searchMessageElement=S.createChild("div","search-message"),this.searchProgressPlaceholderElement=S.createChild("div","flex-centered"),this.searchResultsMessageElement=S.createChild("div","search-message"),this.advancedSearchConfig=e.Settings.Settings.instance().createLocalSetting(t+"-search-config",new h.SearchConfig.SearchConfig("",!0,!1).toPlainObject()),this.load(),this.searchScope=null,this.#s=new r.EmptyWidget.EmptyWidget(I(R.noSearchResult),I(R.typeAndPressSToSearch,{PH1:r.KeyboardShortcut.KeyboardShortcut.shortcutToString(r.KeyboardShortcut.Keys.Enter)})),this.showPane(this.#s)}regexButtonToggled(){this.regexButton.title=this.regexButton.toggled?I(R.disableRegularExpression):I(R.enableRegularExpression)}matchCaseButtonToggled(){this.matchCaseButton.title=this.matchCaseButton.toggled?I(R.disableCaseSensitive):I(R.enableCaseSensitive)}buildSearchConfig(){return new h.SearchConfig.SearchConfig(this.search.value,!this.matchCaseButton.toggled,this.regexButton.toggled)}toggle(e,t){this.search.value=e,this.isShowing()?this.focus():this.focusOnShow=!0,this.initScope(),t?this.onAction():this.startIndexing()}createScope(){throw new Error("Not implemented")}initScope(){this.searchScope=this.createScope()}wasShown(){super.wasShown(),this.focusOnShow&&(this.focus(),this.focusOnShow=!1)}onIndexingFinished(){if(!this.progressIndicator)return;const e=!this.progressIndicator.isCanceled();if(this.progressIndicator.done(),this.progressIndicator=null,this.isIndexing=!1,this.searchMessageElement.textContent=e?"":I(R.indexingInterrupted),e||(this.pendingSearchConfig=null),!this.pendingSearchConfig)return;const t=this.pendingSearchConfig;this.pendingSearchConfig=null,this.innerStartSearch(t)}startIndexing(){this.isIndexing=!0,this.progressIndicator&&this.progressIndicator.done(),this.progressIndicator=new r.ProgressIndicator.ProgressIndicator,this.searchMessageElement.textContent=I(R.indexing),this.progressIndicator.show(this.searchProgressPlaceholderElement),this.searchScope&&this.searchScope.performIndexing(new e.Progress.ProgressProxy(this.progressIndicator,this.onIndexingFinished.bind(this)))}onSearchInputClear(){this.search.value="",this.save(),this.focus(),this.showPane(this.#s)}onSearchResult(e,t){e===this.searchId&&this.progressIndicator&&(this.progressIndicator?.isCanceled()?this.onIndexingFinished():(this.searchResultsPane||(this.searchResultsPane=new m(this.searchConfig),this.showPane(this.searchResultsPane)),this.#t.push(t),this.#e.schedule((async()=>this.#n()))))}#n(){for(const e of this.#t)this.addSearchResult(e),e.matchesCount()&&this.searchResultsPane?.addSearchResult(e);this.#t=[]}onSearchFinished(e,t){e===this.searchId&&this.progressIndicator&&(this.searchResultsPane||this.nothingFound(),this.searchFinished(t),this.searchConfig=null,r.ARIAUtils.alert(this.searchMessageElement.textContent+" "+this.searchResultsMessageElement.textContent))}innerStartSearch(e){this.searchConfig=e,this.progressIndicator&&this.progressIndicator.done(),this.progressIndicator=new r.ProgressIndicator.ProgressIndicator,this.searchStarted(this.progressIndicator),this.searchScope&&this.searchScope.performSearch(e,this.progressIndicator,this.onSearchResult.bind(this,this.searchId),this.onSearchFinished.bind(this,this.searchId))}resetSearch(){this.stopSearch(),this.showPane(null),this.searchResultsPane=null,this.searchMessageElement.textContent="",this.searchResultsMessageElement.textContent=""}stopSearch(){this.progressIndicator&&!this.isIndexing&&this.progressIndicator.cancel(),this.searchScope&&this.searchScope.stopSearch(),this.searchConfig=null}searchStarted(e){this.searchMatchesCount=0,this.searchResultsCount=0,this.nonEmptySearchResultsCount=0,this.searchingView||(this.searchingView=new r.EmptyWidget.EmptyWidget(I(R.searching),"")),this.showPane(this.searchingView),this.searchMessageElement.textContent=I(R.searching),e.show(this.searchProgressPlaceholderElement),this.updateSearchResultsMessage()}updateSearchResultsMessage(){this.searchMatchesCount&&this.searchResultsCount?1===this.searchMatchesCount&&1===this.nonEmptySearchResultsCount?this.searchResultsMessageElement.textContent=I(R.foundMatchingLineInFile):this.searchMatchesCount>1&&1===this.nonEmptySearchResultsCount?this.searchResultsMessageElement.textContent=I(R.foundDMatchingLinesInFile,{PH1:this.searchMatchesCount}):this.searchResultsMessageElement.textContent=I(R.foundDMatchingLinesInDFiles,{PH1:this.searchMatchesCount,PH2:this.nonEmptySearchResultsCount}):this.searchResultsMessageElement.textContent=""}showPane(e){this.visiblePane&&this.visiblePane.detach(),e&&e.show(this.searchResultsElement),this.visiblePane=e}nothingFound(){this.notFoundView||(this.notFoundView=new r.EmptyWidget.EmptyWidget(I(R.noMatchesFound),I(R.nothingMatchedTheQuery))),this.showPane(this.notFoundView)}addSearchResult(e){const t=e.matchesCount();this.searchMatchesCount+=t,this.searchResultsCount++,t&&this.nonEmptySearchResultsCount++,this.updateSearchResultsMessage()}searchFinished(e){this.searchMessageElement.textContent=I(e?R.searchFinished:R.searchInterrupted)}focus(){this.search.focus(),this.search.select()}willHide(){this.stopSearch()}onKeyDown(e){if(this.save(),e.keyCode===r.KeyboardShortcut.Keys.Enter.code)this.onAction()}onKeyDownOnPanel(e){const t=i.Platform.isMac(),s=t&&e.metaKey&&!e.ctrlKey&&e.altKey&&"BracketRight"===e.code,n=!t&&e.ctrlKey&&!e.metaKey&&e.shiftKey&&"BracketRight"===e.code,a=t&&e.metaKey&&!e.ctrlKey&&e.altKey&&"BracketLeft"===e.code,r=!t&&e.ctrlKey&&!e.metaKey&&e.shiftKey&&"BracketLeft"===e.code;s||n?(this.searchResultsPane?.showAllMatches(),l.logKeyDown(e.currentTarget,e,"show-all-matches")):(a||r)&&(this.searchResultsPane?.collapseAllResults(),l.logKeyDown(e.currentTarget,e,"collapse-all-results"))}save(){this.advancedSearchConfig.set(this.buildSearchConfig().toPlainObject())}load(){const e=h.SearchConfig.SearchConfig.fromPlainObject(this.advancedSearchConfig.get());this.search.value=e.query(),this.matchCaseButton.toggled=!e.ignoreCase(),this.matchCaseButtonToggled(),this.regexButton.toggled=e.isRegex(),this.regexButtonToggled()}onAction(){const e=this.buildSearchConfig();e.query()?.length&&(this.resetSearch(),++this.searchId,this.initScope(),this.isIndexing||this.startIndexing(),this.pendingSearchConfig=e)}get throttlerForTest(){return this.#e}}var L=Object.freeze({__proto__:null,SearchView:P});export{b as SearchResultsPane,v as SearchScope,L as SearchView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"../../core/common/common.js";import*as i from"../../core/i18n/i18n.js";import*as r from"../../core/root/root.js";import*as t from"../../ui/legacy/legacy.js";import*as o from"./security.js";const a={security:"Security",PrivacyAndSecurity:"Privacy and security",showSecurity:"Show Security",showPrivacyAndSecurity:"Show Privacy and security"},c=i.i18n.registerUIStrings("panels/security/security-meta.ts",a),n=i.i18n.getLazilyComputedLocalizedString.bind(void 0,c);let s;async function y(){return s||(s=await import("./security.js")),s}t.ViewManager.registerViewExtension({location:"panel",id:"security",title:()=>r.Runtime.hostConfig.devToolsPrivacyUI?.enabled?n(a.PrivacyAndSecurity)():n(a.security)(),commandPrompt:()=>r.Runtime.hostConfig.devToolsPrivacyUI?.enabled?n(a.showPrivacyAndSecurity)():n(a.showSecurity)(),order:80,persistence:"closeable",loadView:async()=>(await y()).SecurityPanel.SecurityPanel.instance()}),e.Revealer.registerRevealer({contextTypes:()=>[o.CookieReportView.CookieReportView],destination:e.Revealer.RevealerDestination.SECURITY_PANEL,loadRevealer:async()=>new((await y()).SecurityPanel.SecurityRevealer)});
|