chrome-devtools-frontend 1.0.944427 → 1.0.945677
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/config/gni/devtools_grd_files.gni +4 -0
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/Images/src/circled_exclamation_icon.svg +3 -0
- package/front_end/core/common/ParsedURL.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +3 -1
- package/front_end/core/i18n/i18nImpl.ts +7 -4
- package/front_end/core/i18n/locales/en-US.json +3 -60
- package/front_end/core/i18n/locales/en-XL.json +15 -72
- package/front_end/core/protocol_client/NodeURL.ts +1 -0
- package/front_end/core/sdk/CSSMetadata.ts +0 -1
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +2 -3
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -3
- package/front_end/core/sdk/Cookie.ts +17 -0
- package/front_end/core/sdk/CookieModel.ts +1 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -4
- package/front_end/core/sdk/NetworkManager.ts +4 -1
- package/front_end/core/sdk/NetworkRequest.ts +2 -2
- package/front_end/core/sdk/Resource.ts +2 -2
- package/front_end/core/sdk/Script.ts +2 -3
- package/front_end/entrypoints/main/MainImpl.ts +6 -0
- package/front_end/generated/protocol.d.ts +0 -4
- package/front_end/models/bindings/BreakpointManager.ts +3 -4
- package/front_end/models/bindings/ResourceMapping.ts +1 -2
- package/front_end/models/bindings/StylesSourceMapping.ts +1 -2
- package/front_end/models/emulation/EmulatedDevices.ts +2 -4
- package/front_end/models/persistence/IsolatedFileSystem.ts +7 -6
- package/front_end/models/persistence/PersistenceActions.ts +4 -1
- package/front_end/models/persistence/PlatformFileSystem.ts +3 -4
- package/front_end/models/text_utils/ContentProvider.ts +1 -2
- package/front_end/models/text_utils/StaticContentProvider.ts +2 -3
- package/front_end/models/timeline_model/TimelineJSProfile.ts +16 -3
- package/front_end/models/timeline_model/TimelineModel.ts +1 -0
- package/front_end/models/workspace/UISourceCode.ts +2 -2
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +20 -6
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/animation/animationTimeline.css +2 -0
- package/front_end/panels/application/BackForwardCacheStrings.ts +15 -75
- package/front_end/panels/application/BackForwardCacheView.ts +8 -1
- package/front_end/panels/application/ReportingApiView.ts +15 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +63 -4
- package/front_end/panels/application/components/FrameDetailsView.ts +21 -34
- package/front_end/panels/changes/ChangesView.ts +8 -7
- package/front_end/panels/elements/StyleEditorWidget.ts +7 -7
- package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -15
- package/front_end/panels/elements/StylesSidebarPane.ts +35 -9
- package/front_end/panels/emulation/DeviceModeView.ts +3 -0
- package/front_end/panels/help/ReleaseNoteText.ts +3 -1
- package/front_end/panels/network/NetworkItemView.ts +7 -1
- package/front_end/panels/profiler/heapProfiler.css +2 -5
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +0 -1
- package/front_end/panels/timeline/TimelineController.ts +3 -0
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -34
- package/front_end/panels/timeline/TimelineUIUtils.ts +51 -3
- package/front_end/panels/webauthn/WebauthnPane.ts +31 -32
- package/front_end/services/window_bounds/WindowBoundsService.ts +27 -0
- package/front_end/services/window_bounds/window_bounds.ts +9 -0
- package/front_end/third_party/acorn/README.chromium +2 -2
- package/front_end/third_party/acorn/acorn.ts +1 -1
- package/front_end/third_party/acorn/package/CHANGELOG.md +31 -1
- package/front_end/third_party/acorn/package/README.md +1 -1
- package/front_end/third_party/acorn/package/dist/acorn.d.ts +3 -0
- package/front_end/third_party/acorn/package/dist/acorn.js +772 -708
- package/front_end/third_party/acorn/package/dist/acorn.mjs +767 -703
- package/front_end/third_party/acorn/package/dist/bin.js +47 -21
- package/front_end/third_party/acorn/package/package.json +1 -1
- package/front_end/third_party/acorn-loose/README.chromium +2 -2
- package/front_end/third_party/acorn-loose/package/CHANGELOG.md +12 -0
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js +27 -7
- package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs +28 -8
- package/front_end/third_party/acorn-loose/package/package.json +2 -2
- package/front_end/third_party/codemirror.next/bundle.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +8 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +1 -1
- package/front_end/third_party/i18n/i18n-impl.ts +1 -1
- package/front_end/third_party/lit-html/README.chromium +2 -2
- package/front_end/third_party/lit-html/package/CHANGELOG.md +216 -28
- package/front_end/third_party/lit-html/package/LICENSE +9 -9
- package/front_end/third_party/lit-html/package/README.md +12 -162
- package/front_end/third_party/lit-html/package/async-directive.d.ts +23 -54
- package/front_end/third_party/lit-html/package/async-directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/async-directive.js +2 -7
- package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/async-directive.d.ts +23 -54
- package/front_end/third_party/lit-html/package/development/async-directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/async-directive.js +44 -194
- package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts +6 -5
- package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive-helpers.js +25 -9
- package/front_end/third_party/lit-html/package/development/directive-helpers.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive.d.ts +3 -16
- package/front_end/third_party/lit-html/package/development/directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive.js +6 -1
- package/front_end/third_party/lit-html/package/development/directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts +7 -14
- package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-append.js +17 -58
- package/front_end/third_party/lit-html/package/development/directives/async-append.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts +9 -14
- package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-replace.js +57 -37
- package/front_end/third_party/lit-html/package/development/directives/async-replace.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/cache.d.ts +2 -3
- package/front_end/third_party/lit-html/package/development/directives/cache.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/cache.js +4 -6
- package/front_end/third_party/lit-html/package/development/directives/cache.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts +2 -2
- package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/class-map.js +17 -7
- package/front_end/third_party/lit-html/package/development/directives/class-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/guard.d.ts +3 -2
- package/front_end/third_party/lit-html/package/development/directives/guard.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/guard.js +3 -2
- package/front_end/third_party/lit-html/package/development/directives/guard.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/live.d.ts +4 -3
- package/front_end/third_party/lit-html/package/development/directives/live.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/live.js +5 -7
- package/front_end/third_party/lit-html/package/development/directives/live.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts +58 -0
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js +85 -0
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/ref.d.ts +14 -11
- package/front_end/third_party/lit-html/package/development/directives/ref.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/ref.js +13 -11
- package/front_end/third_party/lit-html/package/development/directives/ref.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts +8 -4
- package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/repeat.js +23 -9
- package/front_end/third_party/lit-html/package/development/directives/repeat.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts +1 -2
- package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/style-map.js +1 -2
- package/front_end/third_party/lit-html/package/development/directives/style-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -2
- package/front_end/third_party/lit-html/package/development/directives/template-content.js +1 -2
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts +6 -4
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js +7 -5
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts +4 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js +3 -0
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/until.d.ts +12 -8
- package/front_end/third_party/lit-html/package/development/directives/until.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/until.js +63 -23
- package/front_end/third_party/lit-html/package/development/directives/until.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/experimental-hydrate.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/experimental-hydrate.js +9 -8
- package/front_end/third_party/lit-html/package/development/experimental-hydrate.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/lit-html.d.ts +81 -136
- package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/lit-html.js +249 -76
- package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts +1 -41
- package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/polyfill-support.js +40 -21
- package/front_end/third_party/lit-html/package/development/polyfill-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts +12 -10
- package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/private-ssr-support.js +11 -3
- package/front_end/third_party/lit-html/package/development/private-ssr-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/static.js +6 -5
- package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
- package/front_end/third_party/lit-html/package/directive-helpers.d.ts +6 -5
- package/front_end/third_party/lit-html/package/directive-helpers.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directive-helpers.js +2 -2
- package/front_end/third_party/lit-html/package/directive-helpers.js.map +1 -1
- package/front_end/third_party/lit-html/package/directive.d.ts +3 -16
- package/front_end/third_party/lit-html/package/directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directive.js +1 -1
- package/front_end/third_party/lit-html/package/directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-append.d.ts +7 -14
- package/front_end/third_party/lit-html/package/directives/async-append.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-append.js +2 -6
- package/front_end/third_party/lit-html/package/directives/async-append.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-replace.d.ts +9 -14
- package/front_end/third_party/lit-html/package/directives/async-replace.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-replace.js +2 -5
- package/front_end/third_party/lit-html/package/directives/async-replace.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/cache.d.ts +2 -3
- package/front_end/third_party/lit-html/package/directives/cache.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/cache.js +2 -5
- package/front_end/third_party/lit-html/package/directives/cache.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/class-map.d.ts +2 -2
- package/front_end/third_party/lit-html/package/directives/class-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/class-map.js +2 -4
- package/front_end/third_party/lit-html/package/directives/class-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/guard.d.ts +3 -2
- package/front_end/third_party/lit-html/package/directives/guard.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/guard.js +2 -4
- package/front_end/third_party/lit-html/package/directives/guard.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/live.d.ts +4 -3
- package/front_end/third_party/lit-html/package/directives/live.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/live.js +1 -4
- package/front_end/third_party/lit-html/package/directives/live.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts +58 -0
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.js +7 -0
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/ref.d.ts +14 -11
- package/front_end/third_party/lit-html/package/directives/ref.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/ref.js +2 -5
- package/front_end/third_party/lit-html/package/directives/ref.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/repeat.d.ts +8 -4
- package/front_end/third_party/lit-html/package/directives/repeat.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/repeat.js +2 -5
- package/front_end/third_party/lit-html/package/directives/repeat.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/style-map.d.ts +1 -2
- package/front_end/third_party/lit-html/package/directives/style-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/style-map.js +2 -4
- package/front_end/third_party/lit-html/package/directives/style-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -2
- package/front_end/third_party/lit-html/package/directives/template-content.js +2 -4
- package/front_end/third_party/lit-html/package/directives/template-content.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts +6 -4
- package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-html.js +2 -4
- package/front_end/third_party/lit-html/package/directives/unsafe-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts +4 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-svg.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/until.d.ts +12 -8
- package/front_end/third_party/lit-html/package/directives/until.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/until.js +2 -6
- package/front_end/third_party/lit-html/package/directives/until.js.map +1 -1
- package/front_end/third_party/lit-html/package/experimental-hydrate.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/experimental-hydrate.js +2 -5
- package/front_end/third_party/lit-html/package/experimental-hydrate.js.map +1 -1
- package/front_end/third_party/lit-html/package/lit-html.d.ts +81 -136
- package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/lit-html.js +1 -1
- package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/package.json +75 -24
- package/front_end/third_party/lit-html/package/polyfill-support.d.ts +1 -41
- package/front_end/third_party/lit-html/package/polyfill-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/polyfill-support.js +1 -1
- package/front_end/third_party/lit-html/package/polyfill-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/private-ssr-support.d.ts +12 -10
- package/front_end/third_party/lit-html/package/private-ssr-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/private-ssr-support.js +2 -2
- package/front_end/third_party/lit-html/package/private-ssr-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/static.js +1 -1
- package/front_end/third_party/lit-html/package/static.js.map +1 -1
- package/front_end/third_party/marked/README.chromium +2 -2
- package/front_end/third_party/marked/marked.ts +2 -2
- package/front_end/third_party/marked/package/README.md +7 -1
- package/front_end/third_party/marked/package/bin/marked.js +214 -0
- package/front_end/third_party/marked/package/lib/marked.cjs +2907 -0
- package/front_end/third_party/marked/package/lib/marked.esm.d.ts +1 -3
- package/front_end/third_party/marked/package/lib/marked.esm.js +627 -586
- package/front_end/third_party/marked/package/lib/marked.umd.js +2913 -0
- package/front_end/third_party/marked/package/man/marked.1 +5 -24
- package/front_end/third_party/marked/package/man/marked.1.txt +21 -31
- package/front_end/third_party/marked/package/marked.min.js +1 -1
- package/front_end/third_party/marked/package/package.json +41 -32
- package/front_end/third_party/marked/package/src/Lexer.js +109 -108
- package/front_end/third_party/marked/package/src/Parser.js +38 -15
- package/front_end/third_party/marked/package/src/Renderer.js +5 -5
- package/front_end/third_party/marked/package/src/Slugger.js +2 -2
- package/front_end/third_party/marked/package/src/TextRenderer.js +2 -2
- package/front_end/third_party/marked/package/src/Tokenizer.js +215 -190
- package/front_end/third_party/marked/package/src/defaults.js +6 -9
- package/front_end/third_party/marked/package/src/helpers.js +16 -27
- package/front_end/third_party/marked/package/src/marked.js +146 -63
- package/front_end/third_party/marked/package/src/rules.js +20 -45
- package/front_end/third_party/wasmparser/README.chromium +2 -2
- package/front_end/third_party/wasmparser/package/.github/workflows/main.yml +47 -0
- package/front_end/third_party/wasmparser/package/CHANGELOG.md +12 -0
- package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js +53 -53
- package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js.map +1 -1
- package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js +53 -53
- package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js.map +1 -1
- package/front_end/third_party/wasmparser/package/package.json +1 -1
- package/front_end/third_party/wasmparser/package/src/WasmParser.ts +53 -53
- package/front_end/ui/components/adorners/Adorner.ts +14 -14
- package/front_end/ui/components/buttons/Button.ts +133 -42
- package/front_end/ui/components/buttons/button.css +31 -0
- package/front_end/ui/components/data_grid/DataGrid.ts +131 -122
- package/front_end/ui/components/data_grid/DataGridController.ts +42 -42
- package/front_end/ui/components/diff_view/DiffView.ts +4 -4
- package/front_end/ui/components/docs/button/basic.html +3 -0
- package/front_end/ui/components/docs/button/basic.ts +58 -0
- package/front_end/ui/components/expandable_list/ExpandableList.ts +11 -11
- package/front_end/ui/components/icon_button/Icon.ts +24 -21
- package/front_end/ui/components/icon_button/IconButton.ts +31 -31
- package/front_end/ui/components/issue_counter/IssueCounter.ts +52 -52
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +42 -42
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +67 -67
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +22 -22
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +36 -36
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +19 -19
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +25 -25
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +52 -52
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +21 -21
- package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +14 -14
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +8 -8
- package/front_end/ui/components/markdown_view/MarkdownView.ts +6 -6
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +33 -33
- package/front_end/ui/components/report_view/ReportView.ts +18 -18
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +53 -53
- package/front_end/ui/components/settings/SettingCheckbox.ts +15 -15
- package/front_end/ui/components/survey_link/SurveyLink.ts +28 -28
- package/front_end/ui/components/text_editor/TextEditor.ts +68 -36
- package/front_end/ui/components/text_editor/config.ts +4 -2
- package/front_end/ui/components/text_editor/javascript.ts +6 -6
- package/front_end/ui/components/text_prompt/TextPrompt.ts +19 -19
- package/front_end/ui/components/tree_outline/TreeOutline.ts +56 -56
- package/front_end/ui/legacy/Infobar.ts +9 -0
- package/front_end/ui/legacy/InspectorView.ts +1 -1
- package/front_end/ui/legacy/ListWidget.ts +2 -2
- package/front_end/ui/legacy/ViewManager.ts +6 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +20 -0
- package/front_end/ui/legacy/tabbedPane.css +1 -1
- package/inspector_overlay/main.ts +3 -0
- package/package.json +1 -1
- package/scripts/eslint_rules/lib/l10n_filename_matches.js +17 -4
- package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +21 -0
|
@@ -25,12 +25,17 @@ export const enum Size {
|
|
|
25
25
|
MEDIUM = 'MEDIUM',
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
type ButtonType = 'button'|'submit'|'reset';
|
|
29
|
+
|
|
28
30
|
interface ButtonState {
|
|
29
31
|
iconUrl?: string;
|
|
30
32
|
variant?: Variant;
|
|
31
33
|
size?: Size;
|
|
32
34
|
disabled: boolean;
|
|
33
35
|
active: boolean;
|
|
36
|
+
spinner?: boolean;
|
|
37
|
+
type: ButtonType;
|
|
38
|
+
value?: string;
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
export type ButtonData = {
|
|
@@ -39,30 +44,49 @@ export type ButtonData = {
|
|
|
39
44
|
size?: Size,
|
|
40
45
|
disabled?: boolean,
|
|
41
46
|
active?: boolean,
|
|
47
|
+
spinner?: boolean,
|
|
48
|
+
type?: ButtonType,
|
|
49
|
+
value?: string,
|
|
42
50
|
}|{
|
|
43
51
|
variant: Variant.PRIMARY | Variant.SECONDARY,
|
|
44
52
|
iconUrl?: string,
|
|
45
53
|
size?: Size,
|
|
46
54
|
disabled?: boolean,
|
|
47
55
|
active?: boolean,
|
|
56
|
+
spinner?: boolean,
|
|
57
|
+
type?: ButtonType,
|
|
58
|
+
value?: string,
|
|
48
59
|
};
|
|
49
60
|
|
|
61
|
+
interface ButtonElementInternals extends ElementInternals {
|
|
62
|
+
readonly form?: HTMLFormElement;
|
|
63
|
+
readonly validity: ValidityState;
|
|
64
|
+
readonly willValidate: boolean;
|
|
65
|
+
readonly validationMessage: string;
|
|
66
|
+
checkValidity(): void;
|
|
67
|
+
reportValidity(): void;
|
|
68
|
+
}
|
|
69
|
+
|
|
50
70
|
export class Button extends HTMLElement {
|
|
71
|
+
static formAssociated = true;
|
|
51
72
|
static readonly litTagName = LitHtml.literal`devtools-button`;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
73
|
+
readonly #shadow = this.attachShadow({mode: 'open', delegatesFocus: true});
|
|
74
|
+
readonly #boundRender = this.render.bind(this);
|
|
75
|
+
readonly #boundOnClick = this.onClick.bind(this);
|
|
76
|
+
readonly #props: ButtonState = {
|
|
56
77
|
size: Size.MEDIUM,
|
|
57
78
|
disabled: false,
|
|
58
79
|
active: false,
|
|
80
|
+
spinner: false,
|
|
81
|
+
type: 'button',
|
|
59
82
|
};
|
|
60
|
-
|
|
83
|
+
#isEmpty = true;
|
|
84
|
+
#internals = this.attachInternals() as ButtonElementInternals;
|
|
61
85
|
|
|
62
86
|
constructor() {
|
|
63
87
|
super();
|
|
64
88
|
this.setAttribute('role', 'presentation');
|
|
65
|
-
this.addEventListener('click', this
|
|
89
|
+
this.addEventListener('click', this.#boundOnClick, true);
|
|
66
90
|
}
|
|
67
91
|
|
|
68
92
|
/**
|
|
@@ -70,104 +94,171 @@ export class Button extends HTMLElement {
|
|
|
70
94
|
* for increased type-safety.
|
|
71
95
|
*/
|
|
72
96
|
set data(data: ButtonData) {
|
|
73
|
-
this
|
|
74
|
-
this
|
|
75
|
-
this
|
|
76
|
-
this
|
|
97
|
+
this.#props.variant = data.variant;
|
|
98
|
+
this.#props.iconUrl = data.iconUrl;
|
|
99
|
+
this.#props.size = data.size || Size.MEDIUM;
|
|
100
|
+
this.#props.active = Boolean(data.active);
|
|
101
|
+
this.#props.spinner = Boolean(data.spinner);
|
|
102
|
+
this.#props.type = data.type || 'button';
|
|
77
103
|
this.setDisabledProperty(data.disabled || false);
|
|
78
|
-
ComponentHelpers.ScheduledRender.scheduleRender(this, this
|
|
104
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
79
105
|
}
|
|
80
106
|
|
|
81
107
|
set iconUrl(iconUrl: string|undefined) {
|
|
82
|
-
this
|
|
83
|
-
ComponentHelpers.ScheduledRender.scheduleRender(this, this
|
|
108
|
+
this.#props.iconUrl = iconUrl;
|
|
109
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
84
110
|
}
|
|
85
111
|
|
|
86
112
|
set variant(variant: Variant) {
|
|
87
|
-
this
|
|
88
|
-
ComponentHelpers.ScheduledRender.scheduleRender(this, this
|
|
113
|
+
this.#props.variant = variant;
|
|
114
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
89
115
|
}
|
|
90
116
|
|
|
91
117
|
set size(size: Size) {
|
|
92
|
-
this
|
|
93
|
-
ComponentHelpers.ScheduledRender.scheduleRender(this, this
|
|
118
|
+
this.#props.size = size;
|
|
119
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
set type(type: ButtonType) {
|
|
123
|
+
this.#props.type = type;
|
|
124
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
94
125
|
}
|
|
95
126
|
|
|
96
127
|
set disabled(disabled: boolean) {
|
|
97
128
|
this.setDisabledProperty(disabled);
|
|
98
|
-
ComponentHelpers.ScheduledRender.scheduleRender(this, this
|
|
129
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
99
130
|
}
|
|
100
131
|
|
|
101
132
|
set active(active: boolean) {
|
|
102
|
-
this
|
|
103
|
-
ComponentHelpers.ScheduledRender.scheduleRender(this, this
|
|
133
|
+
this.#props.active = active;
|
|
134
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
set spinner(spinner: boolean) {
|
|
138
|
+
this.#props.spinner = spinner;
|
|
139
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
104
140
|
}
|
|
105
141
|
|
|
106
142
|
private setDisabledProperty(disabled: boolean): void {
|
|
107
|
-
this
|
|
143
|
+
this.#props.disabled = disabled;
|
|
108
144
|
this.toggleAttribute('disabled', disabled);
|
|
109
145
|
}
|
|
110
146
|
|
|
111
147
|
focus(): void {
|
|
112
|
-
this
|
|
148
|
+
this.#shadow.querySelector('button')?.focus();
|
|
113
149
|
}
|
|
114
150
|
|
|
115
151
|
connectedCallback(): void {
|
|
116
|
-
this
|
|
117
|
-
ComponentHelpers.ScheduledRender.scheduleRender(this, this
|
|
152
|
+
this.#shadow.adoptedStyleSheets = [buttonStyles];
|
|
153
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
118
154
|
}
|
|
119
155
|
|
|
120
156
|
private onClick(event: Event): void {
|
|
121
|
-
if (this
|
|
157
|
+
if (this.#props.disabled) {
|
|
122
158
|
event.stopPropagation();
|
|
123
159
|
event.preventDefault();
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (this.form && this.#props.type === 'submit') {
|
|
163
|
+
event.preventDefault();
|
|
164
|
+
this.form.dispatchEvent(new SubmitEvent('submit', {
|
|
165
|
+
submitter: this,
|
|
166
|
+
}));
|
|
167
|
+
}
|
|
168
|
+
if (this.form && this.#props.type === 'reset') {
|
|
169
|
+
event.preventDefault();
|
|
170
|
+
this.form.reset();
|
|
124
171
|
}
|
|
125
172
|
}
|
|
126
173
|
|
|
127
174
|
private onSlotChange(event: Event): void {
|
|
128
175
|
const slot = event.target as HTMLSlotElement | undefined;
|
|
129
176
|
const nodes = slot?.assignedNodes();
|
|
130
|
-
this
|
|
131
|
-
ComponentHelpers.ScheduledRender.scheduleRender(this, this
|
|
177
|
+
this.#isEmpty = !nodes || !Boolean(nodes.length);
|
|
178
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
|
132
179
|
}
|
|
133
180
|
|
|
134
181
|
private render(): void {
|
|
135
|
-
if (!this
|
|
182
|
+
if (!this.#props.variant) {
|
|
136
183
|
throw new Error('Button requires a variant to be defined');
|
|
137
184
|
}
|
|
138
|
-
if (this
|
|
139
|
-
if (!this
|
|
185
|
+
if (this.#props.variant === Variant.TOOLBAR) {
|
|
186
|
+
if (!this.#props.iconUrl) {
|
|
140
187
|
throw new Error('Toolbar button requires an icon');
|
|
141
188
|
}
|
|
142
|
-
if (!this
|
|
189
|
+
if (!this.#isEmpty) {
|
|
143
190
|
throw new Error('Tooblar button does not accept children');
|
|
144
191
|
}
|
|
145
192
|
}
|
|
146
193
|
const classes = {
|
|
147
|
-
primary: this
|
|
148
|
-
secondary: this
|
|
149
|
-
toolbar: this
|
|
150
|
-
'text-with-icon': Boolean(this
|
|
151
|
-
'only-icon': Boolean(this
|
|
152
|
-
small: Boolean(this
|
|
153
|
-
active: this
|
|
194
|
+
primary: this.#props.variant === Variant.PRIMARY,
|
|
195
|
+
secondary: this.#props.variant === Variant.SECONDARY,
|
|
196
|
+
toolbar: this.#props.variant === Variant.TOOLBAR,
|
|
197
|
+
'text-with-icon': Boolean(this.#props.iconUrl) && !this.#isEmpty,
|
|
198
|
+
'only-icon': Boolean(this.#props.iconUrl) && this.#isEmpty,
|
|
199
|
+
small: Boolean(this.#props.size === Size.SMALL),
|
|
200
|
+
active: this.#props.active,
|
|
201
|
+
};
|
|
202
|
+
const spinnerClasses = {
|
|
203
|
+
primary: this.#props.variant === Variant.PRIMARY,
|
|
204
|
+
secondary: this.#props.variant === Variant.SECONDARY,
|
|
205
|
+
disabled: Boolean(this.#props.disabled),
|
|
206
|
+
'spinner-component': true,
|
|
154
207
|
};
|
|
155
208
|
// clang-format off
|
|
156
209
|
LitHtml.render(
|
|
157
210
|
LitHtml.html`
|
|
158
|
-
<button .disabled=${this
|
|
159
|
-
${this
|
|
211
|
+
<button .disabled=${this.#props.disabled} class=${LitHtml.Directives.classMap(classes)}>
|
|
212
|
+
${this.#props.iconUrl ? LitHtml.html`<${IconButton.Icon.Icon.litTagName}
|
|
160
213
|
.data=${{
|
|
161
|
-
iconPath: this
|
|
214
|
+
iconPath: this.#props.iconUrl,
|
|
162
215
|
color: 'var(--color-background)',
|
|
163
216
|
} as IconButton.Icon.IconData}
|
|
164
217
|
>
|
|
165
218
|
</${IconButton.Icon.Icon.litTagName}>` : ''}
|
|
219
|
+
${this.#props.spinner ? LitHtml.html`<span class=${LitHtml.Directives.classMap(spinnerClasses)}></span>` : ''}
|
|
166
220
|
<slot @slotchange=${this.onSlotChange}></slot>
|
|
167
221
|
</button>
|
|
168
|
-
`, this
|
|
222
|
+
`, this.#shadow, {host: this});
|
|
169
223
|
// clang-format on
|
|
170
224
|
}
|
|
225
|
+
|
|
226
|
+
// Based on https://web.dev/more-capable-form-controls/ to make custom elements form-friendly.
|
|
227
|
+
// Form controls usually expose a "value" property.
|
|
228
|
+
get value(): string {
|
|
229
|
+
return this.#props.value || '';
|
|
230
|
+
}
|
|
231
|
+
set value(value: string) {
|
|
232
|
+
this.#props.value = value;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// The following properties and methods aren't strictly required,
|
|
236
|
+
// but browser-level form controls provide them. Providing them helps
|
|
237
|
+
// ensure consistency with browser-provided controls.
|
|
238
|
+
get form(): HTMLFormElement|undefined {
|
|
239
|
+
return this.#internals.form;
|
|
240
|
+
}
|
|
241
|
+
get name(): string|null {
|
|
242
|
+
return this.getAttribute('name');
|
|
243
|
+
}
|
|
244
|
+
get type(): ButtonType {
|
|
245
|
+
return this.#props.type;
|
|
246
|
+
}
|
|
247
|
+
get validity(): ValidityState {
|
|
248
|
+
return this.#internals.validity;
|
|
249
|
+
}
|
|
250
|
+
get validationMessage(): string {
|
|
251
|
+
return this.#internals.validationMessage;
|
|
252
|
+
}
|
|
253
|
+
get willValidate(): boolean {
|
|
254
|
+
return this.#internals.willValidate;
|
|
255
|
+
}
|
|
256
|
+
checkValidity(): void {
|
|
257
|
+
return this.#internals.checkValidity();
|
|
258
|
+
}
|
|
259
|
+
reportValidity(): void {
|
|
260
|
+
return this.#internals.reportValidity();
|
|
261
|
+
}
|
|
171
262
|
}
|
|
172
263
|
|
|
173
264
|
ComponentHelpers.CustomElements.defineComponent('devtools-button', Button);
|
|
@@ -201,3 +201,34 @@ button.primary:disabled devtools-icon {
|
|
|
201
201
|
button.secondary:disabled devtools-icon {
|
|
202
202
|
--icon-color: var(--color-text-disabled);
|
|
203
203
|
}
|
|
204
|
+
|
|
205
|
+
.spinner-component.secondary {
|
|
206
|
+
border: 2px solid var(--color-primary);
|
|
207
|
+
border-right-color: transparent;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.spinner-component.disabled {
|
|
211
|
+
border: 2px solid var(--color-text-disabled);
|
|
212
|
+
border-right-color: transparent;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.spinner-component {
|
|
216
|
+
display: block;
|
|
217
|
+
width: 12px;
|
|
218
|
+
height: 12px;
|
|
219
|
+
border-radius: 6px;
|
|
220
|
+
border: 2px solid var(--color-background);
|
|
221
|
+
animation: spinner-animation 1s linear infinite;
|
|
222
|
+
border-right-color: transparent;
|
|
223
|
+
margin-right: 6px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@keyframes spinner-animation {
|
|
227
|
+
from {
|
|
228
|
+
transform: rotate(0);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
to {
|
|
232
|
+
transform: rotate(360deg);
|
|
233
|
+
}
|
|
234
|
+
}
|