chrome-devtools-frontend 1.0.928589 → 1.0.929998
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 +7 -2
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/Images/src/preview_feature_video_thumbnail.svg +92 -0
- package/front_end/Images/whatsnew.avif +0 -0
- package/front_end/core/common/CharacterIdMap.ts +12 -12
- package/front_end/core/common/Color.ts +71 -71
- package/front_end/core/common/Console.ts +4 -4
- package/front_end/core/common/ParsedURL.ts +14 -14
- package/front_end/core/common/Progress.ts +45 -45
- package/front_end/core/common/ResolverBase.ts +8 -8
- package/front_end/core/common/ResourceType.ts +20 -20
- package/front_end/core/common/SegmentedRange.ts +17 -16
- package/front_end/core/common/Settings.ts +84 -66
- package/front_end/core/common/SimpleHistoryManager.ts +33 -33
- package/front_end/core/common/StringOutputStream.ts +4 -4
- package/front_end/core/common/Throttler.ts +44 -40
- package/front_end/core/common/Trie.ts +42 -42
- package/front_end/core/common/WasmDisassembly.ts +11 -11
- package/front_end/core/common/Worker.ts +9 -9
- package/front_end/core/host/InspectorFrontendHost.ts +13 -13
- package/front_end/core/host/UserMetrics.ts +12 -13
- package/front_end/core/i18n/locales/en-US.json +53 -20
- package/front_end/core/i18n/locales/en-XL.json +53 -20
- package/front_end/core/platform/keyboard-utilities.ts +6 -0
- package/front_end/core/sdk/sdk-meta.ts +5 -0
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -0
- package/front_end/entrypoints/main/MainImpl.ts +14 -5
- package/front_end/entrypoints/main/main-meta.ts +4 -0
- package/front_end/models/issues_manager/IssuesManager.ts +2 -2
- package/front_end/panels/application/BackForwardCacheView.ts +19 -31
- package/front_end/panels/application/components/OriginTrialTreeView.ts +16 -0
- package/front_end/panels/console/console-meta.ts +6 -0
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +9 -6
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +171 -0
- package/front_end/panels/css_overview/components/components.ts +9 -0
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +134 -0
- package/front_end/panels/css_overview/css_overview-meta.ts +2 -1
- package/front_end/panels/css_overview/css_overview.ts +0 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +9 -0
- package/front_end/panels/elements/components/LayoutPane.ts +1 -1
- package/front_end/panels/elements/elements-meta.ts +1 -0
- package/front_end/panels/elements/layoutPane.css +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +9 -0
- package/front_end/panels/help/ReleaseNoteText.ts +29 -0
- package/front_end/panels/help/help-meta.ts +1 -0
- package/front_end/panels/issues/IssueKindView.ts +36 -0
- package/front_end/panels/issues/IssueView.ts +19 -4
- package/front_end/panels/issues/IssuesPane.ts +2 -3
- package/front_end/panels/issues/components/HideIssuesMenu.ts +11 -40
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +11 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +23 -4
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +1 -1
- package/front_end/ui/components/helpers/get-stylesheet.ts +4 -0
- package/front_end/ui/components/text_prompt/TextPrompt.ts +21 -19
- package/front_end/ui/components/text_prompt/textPrompt.css +20 -9
- package/front_end/ui/legacy/Infobar.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +4 -2
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +17 -7
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +6 -6
- package/front_end/ui/legacy/tabbedPane.css +9 -0
- package/package.json +1 -1
- package/scripts/javascript_natives/index.js +31 -25
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +0 -55
- package/front_end/panels/css_overview/cssOverviewStartView.css +0 -29
|
@@ -116,6 +116,7 @@ grd_files_release_sources = [
|
|
|
116
116
|
"front_end/Images/nodeIcon.avif",
|
|
117
117
|
"front_end/Images/node_search_icon.svg",
|
|
118
118
|
"front_end/Images/popoverArrows.png",
|
|
119
|
+
"front_end/Images/preview_feature_video_thumbnail.svg",
|
|
119
120
|
"front_end/Images/profileGroupIcon.png",
|
|
120
121
|
"front_end/Images/profileIcon.png",
|
|
121
122
|
"front_end/Images/profileSmallIcon.png",
|
|
@@ -354,6 +355,7 @@ grd_files_release_sources = [
|
|
|
354
355
|
"front_end/panels/coverage/coverage-meta.js",
|
|
355
356
|
"front_end/panels/coverage/coverage.js",
|
|
356
357
|
"front_end/panels/coverage/coverage_module.js",
|
|
358
|
+
"front_end/panels/css_overview/components/components.js",
|
|
357
359
|
"front_end/panels/css_overview/css_overview-meta.js",
|
|
358
360
|
"front_end/panels/css_overview/css_overview.js",
|
|
359
361
|
"front_end/panels/css_overview/css_overview_module.js",
|
|
@@ -485,6 +487,7 @@ grd_files_release_sources = [
|
|
|
485
487
|
"front_end/third_party/marked/marked.js",
|
|
486
488
|
"front_end/third_party/wasmparser/wasmparser.js",
|
|
487
489
|
"front_end/ui/components/adorners/adorners.js",
|
|
490
|
+
"front_end/ui/components/buttons/buttons.js",
|
|
488
491
|
"front_end/ui/components/code_highlighter/code_highlighter.js",
|
|
489
492
|
"front_end/ui/components/data_grid/data_grid.js",
|
|
490
493
|
"front_end/ui/components/expandable_list/expandable_list.js",
|
|
@@ -903,13 +906,13 @@ grd_files_debug_sources = [
|
|
|
903
906
|
"front_end/panels/css_overview/CSSOverviewPanel.js",
|
|
904
907
|
"front_end/panels/css_overview/CSSOverviewProcessingView.js",
|
|
905
908
|
"front_end/panels/css_overview/CSSOverviewSidebarPanel.js",
|
|
906
|
-
"front_end/panels/css_overview/CSSOverviewStartView.js",
|
|
907
909
|
"front_end/panels/css_overview/CSSOverviewUnusedDeclarations.js",
|
|
910
|
+
"front_end/panels/css_overview/components/CSSOverviewStartView.js",
|
|
911
|
+
"front_end/panels/css_overview/components/cssOverviewStartView.css.js",
|
|
908
912
|
"front_end/panels/css_overview/cssOverview.css.js",
|
|
909
913
|
"front_end/panels/css_overview/cssOverviewCompletedView.css.js",
|
|
910
914
|
"front_end/panels/css_overview/cssOverviewProcessingView.css.js",
|
|
911
915
|
"front_end/panels/css_overview/cssOverviewSidebarPanel.css.js",
|
|
912
|
-
"front_end/panels/css_overview/cssOverviewStartView.css.js",
|
|
913
916
|
"front_end/panels/developer_resources/DeveloperResourcesListView.js",
|
|
914
917
|
"front_end/panels/developer_resources/DeveloperResourcesView.js",
|
|
915
918
|
"front_end/panels/developer_resources/developerResourcesListView.css.js",
|
|
@@ -1350,6 +1353,8 @@ grd_files_debug_sources = [
|
|
|
1350
1353
|
"front_end/third_party/wasmparser/package/dist/esm/WasmParser.js",
|
|
1351
1354
|
"front_end/ui/components/adorners/Adorner.js",
|
|
1352
1355
|
"front_end/ui/components/adorners/adorner.css.js",
|
|
1356
|
+
"front_end/ui/components/buttons/Button.js",
|
|
1357
|
+
"front_end/ui/components/buttons/button.css.js",
|
|
1353
1358
|
"front_end/ui/components/code_highlighter/CodeHighlighter.js",
|
|
1354
1359
|
"front_end/ui/components/code_highlighter/codeHighlighter.css.js",
|
|
1355
1360
|
"front_end/ui/components/data_grid/DataGrid.js",
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<svg width="144" height="92" viewBox="0 0 144 92" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0)">
|
|
3
|
+
<rect width="144" height="92" rx="8" fill="#F1F3F4"/>
|
|
4
|
+
<rect width="165" height="92" rx="1.93492" fill="#D2E3FC"/>
|
|
5
|
+
<g clip-path="url(#clip1)">
|
|
6
|
+
<rect x="0.0914612" y="6.11472" width="50.7008" height="50.7008" rx="2.9824" fill="#D2E3FC"/>
|
|
7
|
+
<rect x="-8.85574" y="13.5707" width="68.5952" height="68.5952" rx="2.9824" fill="#8AB4F8"/>
|
|
8
|
+
<rect x="-16.3118" y="21.0267" width="83.5072" height="83.5072" rx="2.9824" fill="#1967D2"/>
|
|
9
|
+
<g clip-path="url(#clip2)">
|
|
10
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.56504 41.5306V21.0266H4.19224V41.5306H-16.3118V41.9034H4.19224V83.4707H-16.3118V83.8435H4.19224L4.19224 104.534H4.56504L4.56504 83.8435H46.3187V104.534H46.6915V83.8435H67.1955V83.4707H46.6915V41.9034H67.1955V41.5306H46.6915V21.4984H46.3187V41.5306H4.56504ZM4.56504 41.9034V83.4707H46.3187V41.9034H4.56504Z" fill="#8AB4F8"/>
|
|
11
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.496 62.991L66.785 104.028L67.0495 103.766L25.7601 62.7278L66.9457 21.6905L66.6817 21.4274L25.4957 62.465L-16.1966 21.0269L-16.461 21.2897L25.2316 62.7282L-16.4609 104.27L-16.1968 104.534L25.496 62.991Z" fill="#8AB4F8"/>
|
|
12
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.7029 62.5939V20.8402H25.3302V62.5939H-16.4981V62.9667H25.3302V104.347H25.7029V62.9667L67.0091 62.9667V62.5939L25.7029 62.5939Z" fill="#8AB4F8"/>
|
|
13
|
+
</g>
|
|
14
|
+
<path d="M25.4419 45.3831C15.8386 45.3831 8.04456 53.1772 8.04456 62.7805C8.04456 72.3838 15.8386 80.1778 25.4419 80.1778C35.0452 80.1778 42.8392 72.3838 42.8392 62.7805C42.8392 53.1772 35.0452 45.3831 25.4419 45.3831ZM25.4419 48.8626C30.5915 48.8626 35.08 51.6636 37.4809 55.8216H25.4419C22.0668 55.8216 19.2658 58.2224 18.6221 61.4061L14.4816 54.221C17.0216 50.9677 20.9882 48.8626 25.4419 48.8626ZM30.6611 62.7805C30.6611 65.6685 28.3299 67.9997 25.4419 67.9997C22.5539 67.9997 20.2227 65.6685 20.2227 62.7805C20.2227 59.8925 22.5539 57.5613 25.4419 57.5613C28.3299 57.5613 30.6611 59.8925 30.6611 62.7805ZM11.524 62.7805C11.524 60.2405 12.2199 57.8744 13.4029 55.839L19.4224 66.2774L19.4398 66.26C20.6402 68.3302 22.8671 69.7394 25.4419 69.7394C26.2248 69.7394 26.9729 69.5829 27.6862 69.3393L23.5282 76.5592C16.7432 75.6197 11.524 69.809 11.524 62.7805ZM25.4419 76.6984L31.4614 66.26L31.4266 66.2426C32.0355 65.2161 32.4008 64.0505 32.4008 62.7805C32.4008 60.6928 31.4614 58.8313 30 57.5613H38.3333C38.9944 59.1792 39.3598 60.9364 39.3598 62.7805C39.3598 70.4701 33.1315 76.6984 25.4419 76.6984Z" fill="#DDEAFD"/>
|
|
15
|
+
</g>
|
|
16
|
+
<g clip-path="url(#clip3)">
|
|
17
|
+
<rect x="80" y="7" width="82" height="73" fill="#8AB4F8"/>
|
|
18
|
+
<g style="mix-blend-mode:luminosity" opacity="0.4" clip-path="url(#clip4)">
|
|
19
|
+
<path d="M118.962 78.1577C120.393 87.1235 120.393 96.2594 118.962 105.225" stroke="#C39766" stroke-width="7.21803" stroke-miterlimit="10"/>
|
|
20
|
+
<path d="M111.714 61.6314C114.722 64.8344 117.443 70.5487 118.962 78.1727" stroke="#E94235" stroke-width="10.406" stroke-linejoin="round"/>
|
|
21
|
+
<path d="M77.7142 78.6239C80.3909 66.3683 84.7067 60.9999 84.8571 60.8344" stroke="#E94235" stroke-width="10.406" stroke-linejoin="round"/>
|
|
22
|
+
<path d="M75.9699 105.436C75.4614 96.4408 76.0471 87.4174 77.7142 78.5637" stroke="#C39766" stroke-width="7.21803" stroke-miterlimit="10"/>
|
|
23
|
+
<path d="M113.143 97.4959C106.12 104.308 95.3834 105.782 82.0902 104.158L85.0977 57.9773H113.143V97.4959Z" fill="#E94235"/>
|
|
24
|
+
<path d="M84.8571 60.8345C94.2556 50.8044 105.91 55.481 111.714 61.6314" stroke="#E94235" stroke-width="10.406" stroke-linejoin="round"/>
|
|
25
|
+
<path d="M92.015 65.8871H104.511V70.3231H92.015V65.8871Z" fill="#F28B82"/>
|
|
26
|
+
<path d="M92.015 72.2179H104.511V76.654H92.015V72.2179Z" fill="#F28B82"/>
|
|
27
|
+
<path d="M98.1202 61.6314C94.3165 61.6314 91.233 58.5479 91.233 54.7442C91.233 50.9405 94.3165 47.857 98.1202 47.857C101.924 47.857 105.007 50.9405 105.007 54.7442C105.007 58.5479 101.924 61.6314 98.1202 61.6314Z" fill="#D93025"/>
|
|
28
|
+
<path d="M98.2255 38.6541C96.5222 39.5151 94.8703 40.474 93.2781 41.5262V54.6389C93.3479 55.9059 93.9004 57.0979 94.822 57.9701C95.7435 58.8422 96.9642 59.3284 98.233 59.3284C99.5018 59.3284 100.722 58.8422 101.644 57.9701C102.566 57.0979 103.118 55.9059 103.188 54.6389V41.5262C103.188 41.5262 98.3608 38.5338 98.2255 38.6541Z" fill="#A8805B"/>
|
|
29
|
+
<path d="M67.7143 51.5412C72.0301 52.0073 72.812 48.9397 73.5489 45.2255C74.4812 40.5488 76.2556 27.421 78.3007 21.1654C78.421 20.6842 78.5413 20.2781 78.6165 20.0074C79.6842 15.9774 86.0601 15.4962 87.7744 18.5037C88.8871 20.4135 82.6917 21.9172 83.2631 24.0676C85.218 31.5112 87.3082 43.451 86.842 46.0826C86.2105 49.7067 84.7067 53.7668 81.4586 55.4811C70.0752 61.5111 67.5489 51.5261 67.7143 51.5412Z" fill="#202124"/>
|
|
30
|
+
<path d="M84.6315 35.1503C84.6531 37.0513 85.0492 38.9294 85.7972 40.6773C86.5451 42.4251 87.6303 44.0084 88.9906 45.3366C90.3508 46.6647 91.9596 47.7117 93.7248 48.4177C95.49 49.1237 97.3771 49.4748 99.2781 49.451C103.113 49.4035 106.773 47.8448 109.465 45.1136C112.157 42.3823 113.662 38.6993 113.654 34.8645V27.3458C113.616 23.5011 112.052 19.829 109.307 17.1372C106.562 14.4454 102.86 12.9545 99.0149 12.9924C95.1703 13.0303 91.4982 14.5939 88.8064 17.3392C86.1146 20.0846 84.6237 23.7868 84.6616 27.6315L84.6315 35.1503Z" fill="#C39766"/>
|
|
31
|
+
<path d="M90.9022 46.9096C88.9854 45.6013 87.4139 43.8482 86.3219 41.8004C85.2299 39.7526 84.6499 37.4709 84.6315 35.1503L84.4661 31.5713L84.7669 25.5563C86.0451 16.5338 95.9097 14.4886 95.6541 17.2405C95.6541 17.6315 87.9548 18.248 88.03 26.263V33.7818C88.0697 37.6133 89.6279 41.2725 92.3625 43.9564C95.0972 46.6403 98.7849 48.1296 102.616 48.0976C103.283 48.0215 103.957 48.1416 104.556 48.4434C102.332 49.336 99.9226 49.6659 97.5407 49.4035C95.1588 49.1412 92.8785 48.2948 90.9022 46.9397V46.9096Z" fill="#A8805B"/>
|
|
32
|
+
<path d="M98.9924 13H99.5638C99.4909 16.8208 98.2997 20.5364 96.1376 23.6874C93.9754 26.8384 90.9371 29.2866 87.3984 30.7293C86.4533 31.1236 85.4776 31.4404 84.4811 31.6766L84.2857 27.4511C84.345 23.5926 85.9215 19.9127 88.674 17.208C91.4265 14.5034 95.1335 12.9916 98.9924 13V13Z" fill="#202124"/>
|
|
33
|
+
<path d="M90.7969 15.5112C93.2306 13.9039 96.076 13.032 98.9924 13C102.758 12.9498 106.395 14.3701 109.13 16.9591C111.865 19.5481 113.483 23.1017 113.639 26.8646C109.104 27.9637 104.327 27.4277 100.149 25.3509C95.9704 23.2741 92.6588 19.7897 90.7969 15.5112V15.5112Z" fill="#202124"/>
|
|
34
|
+
<path d="M81.7293 32.4435C81.7293 33.0384 81.9057 33.6199 82.2361 34.1144C82.5666 34.609 83.0363 34.9944 83.5859 35.2221C84.1354 35.4497 84.7401 35.5093 85.3235 35.3932C85.9069 35.2772 86.4428 34.9907 86.8634 34.5701C87.284 34.1495 87.5705 33.6136 87.6865 33.0302C87.8026 32.4468 87.743 31.8422 87.5154 31.2926C87.2877 30.743 86.9023 30.2733 86.4077 29.9429C85.9131 29.6124 85.3316 29.436 84.7368 29.436C83.9391 29.436 83.1742 29.7528 82.6102 30.3169C82.0462 30.8809 81.7293 31.6459 81.7293 32.4435Z" fill="#A8805B"/>
|
|
35
|
+
<path d="M106.827 39.6314C106.282 40.0577 105.654 40.3661 104.984 40.537C104.313 40.7078 103.615 40.7375 102.932 40.624C102.05 40.4641 101.226 40.0752 100.541 39.4962L106.827 39.6314Z" stroke="#E94235" stroke-width="0.646615" stroke-linecap="round" stroke-linejoin="round"/>
|
|
36
|
+
<path d="M97.3082 22.0826C95.9097 30.3683 87.7894 33.872 87.7894 33.872C87.7894 33.872 92.9924 28.5488 93.4886 22.1728C93.8345 17.9473 97.8946 18.5638 97.3082 22.0826Z" fill="#202124"/>
|
|
37
|
+
<path d="M95.8195 32.248C95.985 31.7508 96.3029 31.3182 96.7279 31.0117C97.153 30.7052 97.6638 30.5403 98.1879 30.5403C98.7119 30.5403 99.2227 30.7052 99.6478 31.0117C100.073 31.3182 100.391 31.7508 100.556 32.248" stroke="#3C4043" stroke-width="0.766915" stroke-linecap="round" stroke-linejoin="round"/>
|
|
38
|
+
<path d="M107.338 32.1127C107.502 31.6138 107.817 31.1787 108.241 30.8686C108.664 30.5584 109.174 30.3887 109.699 30.3834C110.224 30.377 110.738 30.5363 111.167 30.8386C111.596 31.141 111.919 31.5711 112.09 32.0676" stroke="#3C4043" stroke-width="0.766915" stroke-linecap="round" stroke-linejoin="round"/>
|
|
39
|
+
</g>
|
|
40
|
+
<g style="mix-blend-mode:luminosity" opacity="0.4" clip-path="url(#clip5)">
|
|
41
|
+
<path d="M118.962 78.1577C120.393 87.1235 120.393 96.2594 118.962 105.225" stroke="#C39766" stroke-width="7.21803" stroke-miterlimit="10"/>
|
|
42
|
+
<path d="M111.714 61.6314C114.722 64.8344 117.443 70.5487 118.962 78.1727" stroke="#E94235" stroke-width="10.406" stroke-linejoin="round"/>
|
|
43
|
+
<path d="M77.7142 78.6239C80.3909 66.3683 84.7067 60.9999 84.8571 60.8344" stroke="#E94235" stroke-width="10.406" stroke-linejoin="round"/>
|
|
44
|
+
<path d="M75.9699 105.436C75.4614 96.4408 76.0471 87.4174 77.7142 78.5637" stroke="#C39766" stroke-width="7.21803" stroke-miterlimit="10"/>
|
|
45
|
+
<path d="M113.143 97.4959C106.12 104.308 95.3834 105.782 82.0902 104.158L85.0977 57.9773H113.143V97.4959Z" fill="#E94235"/>
|
|
46
|
+
<path d="M84.8571 60.8345C94.2556 50.8044 105.91 55.481 111.714 61.6314" stroke="#E94235" stroke-width="10.406" stroke-linejoin="round"/>
|
|
47
|
+
<path d="M92.015 65.8871H104.511V70.3231H92.015V65.8871Z" fill="#F28B82"/>
|
|
48
|
+
<path d="M92.015 72.2179H104.511V76.654H92.015V72.2179Z" fill="#F28B82"/>
|
|
49
|
+
<path d="M98.1202 61.6314C94.3165 61.6314 91.233 58.5479 91.233 54.7442C91.233 50.9405 94.3165 47.857 98.1202 47.857C101.924 47.857 105.007 50.9405 105.007 54.7442C105.007 58.5479 101.924 61.6314 98.1202 61.6314Z" fill="#D93025"/>
|
|
50
|
+
<path d="M98.2255 38.6541C96.5222 39.5151 94.8703 40.474 93.2781 41.5262V54.6389C93.3479 55.9059 93.9004 57.0979 94.822 57.9701C95.7435 58.8422 96.9642 59.3284 98.233 59.3284C99.5018 59.3284 100.722 58.8422 101.644 57.9701C102.566 57.0979 103.118 55.9059 103.188 54.6389V41.5262C103.188 41.5262 98.3608 38.5338 98.2255 38.6541Z" fill="#A8805B"/>
|
|
51
|
+
<path d="M67.7143 51.5412C72.0301 52.0073 72.812 48.9397 73.5489 45.2255C74.4812 40.5488 76.2556 27.421 78.3007 21.1654C78.421 20.6842 78.5413 20.2781 78.6165 20.0074C79.6842 15.9774 86.0601 15.4962 87.7744 18.5037C88.8871 20.4135 82.6917 21.9172 83.2631 24.0676C85.218 31.5112 87.3082 43.451 86.842 46.0826C86.2105 49.7067 84.7067 53.7668 81.4586 55.4811C70.0752 61.5111 67.5489 51.5261 67.7143 51.5412Z" fill="#202124"/>
|
|
52
|
+
<path d="M84.6315 35.1503C84.6531 37.0513 85.0492 38.9294 85.7972 40.6773C86.5451 42.4251 87.6303 44.0084 88.9906 45.3366C90.3508 46.6647 91.9596 47.7117 93.7248 48.4177C95.49 49.1237 97.3771 49.4748 99.2781 49.451C103.113 49.4035 106.773 47.8448 109.465 45.1136C112.157 42.3823 113.662 38.6993 113.654 34.8645V27.3458C113.616 23.5011 112.052 19.829 109.307 17.1372C106.562 14.4454 102.86 12.9545 99.0149 12.9924C95.1703 13.0303 91.4982 14.5939 88.8064 17.3392C86.1146 20.0846 84.6237 23.7868 84.6616 27.6315L84.6315 35.1503Z" fill="#C39766"/>
|
|
53
|
+
<path d="M90.9022 46.9096C88.9854 45.6013 87.4139 43.8482 86.3219 41.8004C85.2299 39.7526 84.6499 37.4709 84.6315 35.1503L84.4661 31.5713L84.7669 25.5563C86.0451 16.5338 95.9097 14.4886 95.6541 17.2405C95.6541 17.6315 87.9548 18.248 88.03 26.263V33.7818C88.0697 37.6133 89.6279 41.2725 92.3625 43.9564C95.0972 46.6403 98.7849 48.1296 102.616 48.0976C103.283 48.0215 103.957 48.1416 104.556 48.4434C102.332 49.336 99.9226 49.6659 97.5407 49.4035C95.1588 49.1412 92.8785 48.2948 90.9022 46.9397V46.9096Z" fill="#A8805B"/>
|
|
54
|
+
<path d="M98.9924 13H99.5638C99.4909 16.8208 98.2997 20.5364 96.1376 23.6874C93.9754 26.8384 90.9371 29.2866 87.3984 30.7293C86.4533 31.1236 85.4776 31.4404 84.4811 31.6766L84.2857 27.4511C84.345 23.5926 85.9215 19.9127 88.674 17.208C91.4265 14.5034 95.1335 12.9916 98.9924 13V13Z" fill="#202124"/>
|
|
55
|
+
<path d="M90.7969 15.5112C93.2306 13.9039 96.076 13.032 98.9924 13C102.758 12.9498 106.395 14.3701 109.13 16.9591C111.865 19.5481 113.483 23.1017 113.639 26.8646C109.104 27.9637 104.327 27.4277 100.149 25.3509C95.9704 23.2741 92.6588 19.7897 90.7969 15.5112V15.5112Z" fill="#202124"/>
|
|
56
|
+
<path d="M81.7293 32.4435C81.7293 33.0384 81.9057 33.6199 82.2361 34.1144C82.5666 34.609 83.0363 34.9944 83.5859 35.2221C84.1354 35.4497 84.7401 35.5093 85.3235 35.3932C85.9069 35.2772 86.4428 34.9907 86.8634 34.5701C87.284 34.1495 87.5705 33.6136 87.6865 33.0302C87.8026 32.4468 87.743 31.8422 87.5154 31.2926C87.2877 30.743 86.9023 30.2733 86.4077 29.9429C85.9131 29.6124 85.3316 29.436 84.7368 29.436C83.9391 29.436 83.1742 29.7528 82.6102 30.3169C82.0462 30.8809 81.7293 31.6459 81.7293 32.4435Z" fill="#A8805B"/>
|
|
57
|
+
<path d="M106.827 39.6314C106.282 40.0577 105.654 40.3661 104.984 40.537C104.313 40.7078 103.615 40.7375 102.932 40.624C102.05 40.4641 101.226 40.0752 100.541 39.4962L106.827 39.6314Z" stroke="#E94235" stroke-width="0.646615" stroke-linecap="round" stroke-linejoin="round"/>
|
|
58
|
+
<path d="M97.3082 22.0826C95.9097 30.3683 87.7894 33.872 87.7894 33.872C87.7894 33.872 92.9924 28.5488 93.4886 22.1728C93.8345 17.9473 97.8946 18.5638 97.3082 22.0826Z" fill="#202124"/>
|
|
59
|
+
<path d="M95.8195 32.248C95.985 31.7508 96.3029 31.3182 96.7279 31.0117C97.153 30.7052 97.6638 30.5403 98.1879 30.5403C98.7119 30.5403 99.2227 30.7052 99.6478 31.0117C100.073 31.3182 100.391 31.7508 100.556 32.248" stroke="#3C4043" stroke-width="0.766915" stroke-linecap="round" stroke-linejoin="round"/>
|
|
60
|
+
<path d="M107.338 32.1127C107.502 31.6138 107.817 31.1787 108.241 30.8686C108.664 30.5584 109.174 30.3887 109.699 30.3834C110.224 30.377 110.738 30.5363 111.167 30.8386C111.596 31.141 111.919 31.5711 112.09 32.0676" stroke="#3C4043" stroke-width="0.766915" stroke-linecap="round" stroke-linejoin="round"/>
|
|
61
|
+
</g>
|
|
62
|
+
<circle cx="131" cy="44" r="15" fill="#3E669C"/>
|
|
63
|
+
<path d="M127 48.2338V39.7662C127 38.9889 127.848 38.5088 128.514 38.9087L135.571 43.1425C136.218 43.5309 136.218 44.4691 135.571 44.8575L128.514 49.0913C127.848 49.4912 127 49.0111 127 48.2338Z" fill="#DDEAFD"/>
|
|
64
|
+
<rect x="95" y="72" width="49" height="3" fill="#AECBFA"/>
|
|
65
|
+
<rect x="85" y="66" width="68" height="9" rx="2" fill="#3E669C"/>
|
|
66
|
+
<path d="M88 73V68L92 70.5L88 73Z" fill="#DDEAFD"/>
|
|
67
|
+
<rect x="102" y="70" width="48" height="1" fill="#DDEAFD"/>
|
|
68
|
+
<rect x="94" y="68" width="5" height="5" fill="#DDEAFD"/>
|
|
69
|
+
<circle cx="116.5" cy="70.5" r="2.5" fill="#DDEAFD"/>
|
|
70
|
+
</g>
|
|
71
|
+
</g>
|
|
72
|
+
<defs>
|
|
73
|
+
<clipPath id="clip0">
|
|
74
|
+
<rect width="144" height="92" rx="8" fill="white"/>
|
|
75
|
+
</clipPath>
|
|
76
|
+
<clipPath id="clip1">
|
|
77
|
+
<rect width="84.8837" height="98.6487" fill="white" transform="translate(-17 6)"/>
|
|
78
|
+
</clipPath>
|
|
79
|
+
<clipPath id="clip2">
|
|
80
|
+
<rect x="-16.3118" y="21.0267" width="83.5072" height="83.5072" rx="2.2368" fill="white"/>
|
|
81
|
+
</clipPath>
|
|
82
|
+
<clipPath id="clip3">
|
|
83
|
+
<rect x="80" y="7" width="82" height="73" rx="8" fill="white"/>
|
|
84
|
+
</clipPath>
|
|
85
|
+
<clipPath id="clip4">
|
|
86
|
+
<rect width="60.06" height="159.789" fill="white" transform="matrix(-1 0 0 1 124.06 13)"/>
|
|
87
|
+
</clipPath>
|
|
88
|
+
<clipPath id="clip5">
|
|
89
|
+
<rect width="60.06" height="159.789" fill="white" transform="matrix(-1 0 0 1 124.06 13)"/>
|
|
90
|
+
</clipPath>
|
|
91
|
+
</defs>
|
|
92
|
+
</svg>
|
|
Binary file
|
|
@@ -3,31 +3,31 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
export class CharacterIdMap<T> {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
readonly #elementToCharacter: Map<T, string>;
|
|
7
|
+
readonly #characterToElement: Map<string, T>;
|
|
8
|
+
#charCode: number;
|
|
9
9
|
|
|
10
10
|
constructor() {
|
|
11
|
-
this
|
|
12
|
-
this
|
|
13
|
-
this
|
|
11
|
+
this.#elementToCharacter = new Map();
|
|
12
|
+
this.#characterToElement = new Map();
|
|
13
|
+
this.#charCode = 33;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
toChar(object: T): string {
|
|
17
|
-
let character = this
|
|
17
|
+
let character = this.#elementToCharacter.get(object);
|
|
18
18
|
if (!character) {
|
|
19
|
-
if (this
|
|
19
|
+
if (this.#charCode >= 0xFFFF) {
|
|
20
20
|
throw new Error('CharacterIdMap ran out of capacity!');
|
|
21
21
|
}
|
|
22
|
-
character = String.fromCharCode(this
|
|
23
|
-
this
|
|
24
|
-
this
|
|
22
|
+
character = String.fromCharCode(this.#charCode++);
|
|
23
|
+
this.#elementToCharacter.set(object, character);
|
|
24
|
+
this.#characterToElement.set(character, object);
|
|
25
25
|
}
|
|
26
26
|
return character;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
fromChar(character: string): T|null {
|
|
30
|
-
const object = this
|
|
30
|
+
const object = this.#characterToElement.get(character);
|
|
31
31
|
if (object === undefined) {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
@@ -36,30 +36,30 @@ import * as Platform from '../platform/platform.js';
|
|
|
36
36
|
import {blendColors, contrastRatioAPCA, desiredLuminanceAPCA, luminance, luminanceAPCA, rgbaToHsla} from './ColorUtils.js';
|
|
37
37
|
|
|
38
38
|
export class Color {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
#hslaInternal: number[]|undefined;
|
|
40
|
+
#rgbaInternal: number[];
|
|
41
|
+
#originalText: string|null;
|
|
42
|
+
readonly #originalTextIsValid: boolean;
|
|
43
|
+
#formatInternal: Format;
|
|
44
44
|
|
|
45
45
|
constructor(rgba: number[], format: Format, originalText?: string) {
|
|
46
|
-
this
|
|
47
|
-
this
|
|
48
|
-
this
|
|
49
|
-
this
|
|
50
|
-
this
|
|
51
|
-
if (typeof this
|
|
52
|
-
this
|
|
46
|
+
this.#hslaInternal = undefined;
|
|
47
|
+
this.#rgbaInternal = rgba;
|
|
48
|
+
this.#originalText = originalText || null;
|
|
49
|
+
this.#originalTextIsValid = Boolean(this.#originalText);
|
|
50
|
+
this.#formatInternal = format;
|
|
51
|
+
if (typeof this.#rgbaInternal[3] === 'undefined') {
|
|
52
|
+
this.#rgbaInternal[3] = 1;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
for (let i = 0; i < 4; ++i) {
|
|
56
|
-
if (this
|
|
57
|
-
this
|
|
58
|
-
this
|
|
56
|
+
if (this.#rgbaInternal[i] < 0) {
|
|
57
|
+
this.#rgbaInternal[i] = 0;
|
|
58
|
+
this.#originalTextIsValid = false;
|
|
59
59
|
}
|
|
60
|
-
if (this
|
|
61
|
-
this
|
|
62
|
-
this
|
|
60
|
+
if (this.#rgbaInternal[i] > 1) {
|
|
61
|
+
this.#rgbaInternal[i] = 1;
|
|
62
|
+
this.#originalTextIsValid = false;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -100,8 +100,8 @@ export class Color {
|
|
|
100
100
|
const rgba = Nicknames.get(nickname);
|
|
101
101
|
if (rgba !== undefined) {
|
|
102
102
|
const color = Color.fromRGBA(rgba);
|
|
103
|
-
color
|
|
104
|
-
color
|
|
103
|
+
color.#formatInternal = Format.Nickname;
|
|
104
|
+
color.#originalText = text;
|
|
105
105
|
return color;
|
|
106
106
|
}
|
|
107
107
|
return null;
|
|
@@ -448,17 +448,17 @@ export class Color {
|
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
format(): Format {
|
|
451
|
-
return this
|
|
451
|
+
return this.#formatInternal;
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
/** HSLA with components within [0..1]
|
|
455
455
|
*/
|
|
456
456
|
hsla(): number[] {
|
|
457
|
-
if (this
|
|
458
|
-
return this
|
|
457
|
+
if (this.#hslaInternal) {
|
|
458
|
+
return this.#hslaInternal;
|
|
459
459
|
}
|
|
460
|
-
this
|
|
461
|
-
return this
|
|
460
|
+
this.#hslaInternal = rgbaToHsla(this.#rgbaInternal);
|
|
461
|
+
return this.#hslaInternal;
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
canonicalHSLA(): number[] {
|
|
@@ -479,13 +479,13 @@ export class Color {
|
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
hasAlpha(): boolean {
|
|
482
|
-
return this
|
|
482
|
+
return this.#rgbaInternal[3] !== 1;
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
detectHEXFormat(): Format {
|
|
486
486
|
let canBeShort = true;
|
|
487
487
|
for (let i = 0; i < 4; ++i) {
|
|
488
|
-
const c = Math.round(this
|
|
488
|
+
const c = Math.round(this.#rgbaInternal[i] * 255);
|
|
489
489
|
if (c % 17) {
|
|
490
490
|
canBeShort = false;
|
|
491
491
|
break;
|
|
@@ -501,12 +501,12 @@ export class Color {
|
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
asString(format?: string|null): string|null {
|
|
504
|
-
if (format === this
|
|
505
|
-
return this
|
|
504
|
+
if (format === this.#formatInternal && this.#originalTextIsValid) {
|
|
505
|
+
return this.#originalText;
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
if (!format) {
|
|
509
|
-
format = this
|
|
509
|
+
format = this.#formatInternal;
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
function toRgbValue(value: number): number {
|
|
@@ -524,15 +524,15 @@ export class Color {
|
|
|
524
524
|
|
|
525
525
|
switch (format) {
|
|
526
526
|
case Format.Original: {
|
|
527
|
-
return this
|
|
527
|
+
return this.#originalText;
|
|
528
528
|
}
|
|
529
529
|
case Format.RGB:
|
|
530
530
|
case Format.RGBA: {
|
|
531
531
|
const start = Platform.StringUtilities.sprintf(
|
|
532
|
-
'rgb(%d %d %d', toRgbValue(this
|
|
533
|
-
toRgbValue(this
|
|
532
|
+
'rgb(%d %d %d', toRgbValue(this.#rgbaInternal[0]), toRgbValue(this.#rgbaInternal[1]),
|
|
533
|
+
toRgbValue(this.#rgbaInternal[2]));
|
|
534
534
|
if (this.hasAlpha()) {
|
|
535
|
-
return start + Platform.StringUtilities.sprintf(' / %d%)', Math.round(this
|
|
535
|
+
return start + Platform.StringUtilities.sprintf(' / %d%)', Math.round(this.#rgbaInternal[3] * 100));
|
|
536
536
|
}
|
|
537
537
|
return start + ')';
|
|
538
538
|
}
|
|
@@ -549,8 +549,8 @@ export class Color {
|
|
|
549
549
|
case Format.HEXA: {
|
|
550
550
|
return Platform.StringUtilities
|
|
551
551
|
.sprintf(
|
|
552
|
-
'#%s%s%s%s', toHexValue(this
|
|
553
|
-
toHexValue(this
|
|
552
|
+
'#%s%s%s%s', toHexValue(this.#rgbaInternal[0]), toHexValue(this.#rgbaInternal[1]),
|
|
553
|
+
toHexValue(this.#rgbaInternal[2]), toHexValue(this.#rgbaInternal[3]))
|
|
554
554
|
.toLowerCase();
|
|
555
555
|
}
|
|
556
556
|
case Format.HEX: {
|
|
@@ -559,8 +559,8 @@ export class Color {
|
|
|
559
559
|
}
|
|
560
560
|
return Platform.StringUtilities
|
|
561
561
|
.sprintf(
|
|
562
|
-
'#%s%s%s', toHexValue(this
|
|
563
|
-
toHexValue(this
|
|
562
|
+
'#%s%s%s', toHexValue(this.#rgbaInternal[0]), toHexValue(this.#rgbaInternal[1]),
|
|
563
|
+
toHexValue(this.#rgbaInternal[2]))
|
|
564
564
|
.toLowerCase();
|
|
565
565
|
}
|
|
566
566
|
case Format.ShortHEXA: {
|
|
@@ -570,8 +570,8 @@ export class Color {
|
|
|
570
570
|
}
|
|
571
571
|
return Platform.StringUtilities
|
|
572
572
|
.sprintf(
|
|
573
|
-
'#%s%s%s%s', toShortHexValue(this
|
|
574
|
-
toShortHexValue(this
|
|
573
|
+
'#%s%s%s%s', toShortHexValue(this.#rgbaInternal[0]), toShortHexValue(this.#rgbaInternal[1]),
|
|
574
|
+
toShortHexValue(this.#rgbaInternal[2]), toShortHexValue(this.#rgbaInternal[3]))
|
|
575
575
|
.toLowerCase();
|
|
576
576
|
}
|
|
577
577
|
case Format.ShortHEX: {
|
|
@@ -583,8 +583,8 @@ export class Color {
|
|
|
583
583
|
}
|
|
584
584
|
return Platform.StringUtilities
|
|
585
585
|
.sprintf(
|
|
586
|
-
'#%s%s%s', toShortHexValue(this
|
|
587
|
-
toShortHexValue(this
|
|
586
|
+
'#%s%s%s', toShortHexValue(this.#rgbaInternal[0]), toShortHexValue(this.#rgbaInternal[1]),
|
|
587
|
+
toShortHexValue(this.#rgbaInternal[2]))
|
|
588
588
|
.toLowerCase();
|
|
589
589
|
}
|
|
590
590
|
case Format.Nickname: {
|
|
@@ -592,19 +592,19 @@ export class Color {
|
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
-
return this
|
|
595
|
+
return this.#originalText;
|
|
596
596
|
}
|
|
597
597
|
|
|
598
598
|
rgba(): number[] {
|
|
599
|
-
return this
|
|
599
|
+
return this.#rgbaInternal.slice();
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
canonicalRGBA(): number[] {
|
|
603
603
|
const rgba = new Array(4);
|
|
604
604
|
for (let i = 0; i < 3; ++i) {
|
|
605
|
-
rgba[i] = Math.round(this
|
|
605
|
+
rgba[i] = Math.round(this.#rgbaInternal[i] * 255);
|
|
606
606
|
}
|
|
607
|
-
rgba[3] = this
|
|
607
|
+
rgba[3] = this.#rgbaInternal[3];
|
|
608
608
|
return rgba;
|
|
609
609
|
}
|
|
610
610
|
|
|
@@ -635,32 +635,32 @@ export class Color {
|
|
|
635
635
|
|
|
636
636
|
invert(): Color {
|
|
637
637
|
const rgba = [];
|
|
638
|
-
rgba[0] = 1 - this
|
|
639
|
-
rgba[1] = 1 - this
|
|
640
|
-
rgba[2] = 1 - this
|
|
641
|
-
rgba[3] = this
|
|
638
|
+
rgba[0] = 1 - this.#rgbaInternal[0];
|
|
639
|
+
rgba[1] = 1 - this.#rgbaInternal[1];
|
|
640
|
+
rgba[2] = 1 - this.#rgbaInternal[2];
|
|
641
|
+
rgba[3] = this.#rgbaInternal[3];
|
|
642
642
|
return new Color(rgba, Format.RGBA);
|
|
643
643
|
}
|
|
644
644
|
|
|
645
645
|
setAlpha(alpha: number): Color {
|
|
646
|
-
const rgba = this
|
|
646
|
+
const rgba = this.#rgbaInternal.slice();
|
|
647
647
|
rgba[3] = alpha;
|
|
648
648
|
return new Color(rgba, Format.RGBA);
|
|
649
649
|
}
|
|
650
650
|
|
|
651
651
|
blendWith(fgColor: Color): Color {
|
|
652
|
-
const rgba: number[] = blendColors(fgColor
|
|
652
|
+
const rgba: number[] = blendColors(fgColor.#rgbaInternal, this.#rgbaInternal);
|
|
653
653
|
return new Color(rgba, Format.RGBA);
|
|
654
654
|
}
|
|
655
655
|
|
|
656
656
|
blendWithAlpha(alpha: number): Color {
|
|
657
|
-
const rgba = this
|
|
657
|
+
const rgba = this.#rgbaInternal.slice();
|
|
658
658
|
rgba[3] *= alpha;
|
|
659
659
|
return new Color(rgba, Format.RGBA);
|
|
660
660
|
}
|
|
661
661
|
|
|
662
662
|
setFormat(format: Format): void {
|
|
663
|
-
this
|
|
663
|
+
this.#formatInternal = format;
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
666
|
|
|
@@ -882,27 +882,27 @@ export const IsolationModeHighlight = {
|
|
|
882
882
|
};
|
|
883
883
|
|
|
884
884
|
export class Generator {
|
|
885
|
-
|
|
885
|
+
readonly #hueSpace: number|{
|
|
886
886
|
min: number,
|
|
887
887
|
max: number,
|
|
888
888
|
count: (number|undefined),
|
|
889
889
|
};
|
|
890
|
-
|
|
890
|
+
readonly #satSpace: number|{
|
|
891
891
|
min: number,
|
|
892
892
|
max: number,
|
|
893
893
|
count: (number|undefined),
|
|
894
894
|
};
|
|
895
|
-
|
|
895
|
+
readonly #lightnessSpace: number|{
|
|
896
896
|
min: number,
|
|
897
897
|
max: number,
|
|
898
898
|
count: (number|undefined),
|
|
899
899
|
};
|
|
900
|
-
|
|
900
|
+
readonly #alphaSpace: number|{
|
|
901
901
|
min: number,
|
|
902
902
|
max: number,
|
|
903
903
|
count: (number|undefined),
|
|
904
904
|
};
|
|
905
|
-
|
|
905
|
+
readonly #colors: Map<string, string>;
|
|
906
906
|
constructor(
|
|
907
907
|
hueSpace?: number|{
|
|
908
908
|
min: number,
|
|
@@ -924,32 +924,32 @@ export class Generator {
|
|
|
924
924
|
max: number,
|
|
925
925
|
count: (number|undefined),
|
|
926
926
|
}) {
|
|
927
|
-
this
|
|
928
|
-
this
|
|
929
|
-
this
|
|
930
|
-
this
|
|
931
|
-
this
|
|
927
|
+
this.#hueSpace = hueSpace || {min: 0, max: 360, count: undefined};
|
|
928
|
+
this.#satSpace = satSpace || 67;
|
|
929
|
+
this.#lightnessSpace = lightnessSpace || 80;
|
|
930
|
+
this.#alphaSpace = alphaSpace || 1;
|
|
931
|
+
this.#colors = new Map();
|
|
932
932
|
}
|
|
933
933
|
|
|
934
934
|
setColorForID(id: string, color: string): void {
|
|
935
|
-
this
|
|
935
|
+
this.#colors.set(id, color);
|
|
936
936
|
}
|
|
937
937
|
|
|
938
938
|
colorForID(id: string): string {
|
|
939
|
-
let color = this
|
|
939
|
+
let color = this.#colors.get(id);
|
|
940
940
|
if (!color) {
|
|
941
941
|
color = this.generateColorForID(id);
|
|
942
|
-
this
|
|
942
|
+
this.#colors.set(id, color);
|
|
943
943
|
}
|
|
944
944
|
return color;
|
|
945
945
|
}
|
|
946
946
|
|
|
947
947
|
private generateColorForID(id: string): string {
|
|
948
948
|
const hash = Platform.StringUtilities.hashCode(id);
|
|
949
|
-
const h = this.indexToValueInSpace(hash, this
|
|
950
|
-
const s = this.indexToValueInSpace(hash >> 8, this
|
|
951
|
-
const l = this.indexToValueInSpace(hash >> 16, this
|
|
952
|
-
const a = this.indexToValueInSpace(hash >> 24, this
|
|
949
|
+
const h = this.indexToValueInSpace(hash, this.#hueSpace);
|
|
950
|
+
const s = this.indexToValueInSpace(hash >> 8, this.#satSpace);
|
|
951
|
+
const l = this.indexToValueInSpace(hash >> 16, this.#lightnessSpace);
|
|
952
|
+
const a = this.indexToValueInSpace(hash >> 24, this.#alphaSpace);
|
|
953
953
|
const start = `hsl(${h}deg ${s}% ${l}%`;
|
|
954
954
|
if (a !== 1) {
|
|
955
955
|
return `${start} / ${Math.floor(a * 100)}%)`;
|
|
@@ -8,13 +8,13 @@ import {reveal} from './Revealer.js';
|
|
|
8
8
|
let consoleInstance: Console;
|
|
9
9
|
|
|
10
10
|
export class Console extends ObjectWrapper<EventTypes> {
|
|
11
|
-
|
|
11
|
+
readonly #messagesInternal: Message[];
|
|
12
12
|
/**
|
|
13
13
|
* Instantiable via the instance() factory below.
|
|
14
14
|
*/
|
|
15
15
|
private constructor() {
|
|
16
16
|
super();
|
|
17
|
-
this
|
|
17
|
+
this.#messagesInternal = [];
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
static instance({forceNew}: {
|
|
@@ -29,7 +29,7 @@ export class Console extends ObjectWrapper<EventTypes> {
|
|
|
29
29
|
|
|
30
30
|
addMessage(text: string, level: MessageLevel, show?: boolean): void {
|
|
31
31
|
const message = new Message(text, level || MessageLevel.Info, Date.now(), show || false);
|
|
32
|
-
this
|
|
32
|
+
this.#messagesInternal.push(message);
|
|
33
33
|
this.dispatchEventToListeners(Events.MessageAdded, message);
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -46,7 +46,7 @@ export class Console extends ObjectWrapper<EventTypes> {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
messages(): Message[] {
|
|
49
|
-
return this
|
|
49
|
+
return this.#messagesInternal;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
show(): void {
|
|
@@ -44,8 +44,8 @@ export class ParsedURL {
|
|
|
44
44
|
folderPathComponents: string;
|
|
45
45
|
lastPathComponent: string;
|
|
46
46
|
readonly blobInnerScheme: string|undefined;
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
#displayNameInternal?: string;
|
|
48
|
+
#dataURLDisplayNameInternal?: string;
|
|
49
49
|
|
|
50
50
|
constructor(url: string) {
|
|
51
51
|
this.isValid = false;
|
|
@@ -322,8 +322,8 @@ export class ParsedURL {
|
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
get displayName(): string {
|
|
325
|
-
if (this
|
|
326
|
-
return this
|
|
325
|
+
if (this.#displayNameInternal) {
|
|
326
|
+
return this.#displayNameInternal;
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
if (this.isDataURL()) {
|
|
@@ -336,25 +336,25 @@ export class ParsedURL {
|
|
|
336
336
|
return this.url;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
this
|
|
340
|
-
if (!this
|
|
341
|
-
this
|
|
339
|
+
this.#displayNameInternal = this.lastPathComponent;
|
|
340
|
+
if (!this.#displayNameInternal) {
|
|
341
|
+
this.#displayNameInternal = (this.host || '') + '/';
|
|
342
342
|
}
|
|
343
|
-
if (this
|
|
344
|
-
this
|
|
343
|
+
if (this.#displayNameInternal === '/') {
|
|
344
|
+
this.#displayNameInternal = this.url;
|
|
345
345
|
}
|
|
346
|
-
return this
|
|
346
|
+
return this.#displayNameInternal;
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
dataURLDisplayName(): string {
|
|
350
|
-
if (this
|
|
351
|
-
return this
|
|
350
|
+
if (this.#dataURLDisplayNameInternal) {
|
|
351
|
+
return this.#dataURLDisplayNameInternal;
|
|
352
352
|
}
|
|
353
353
|
if (!this.isDataURL()) {
|
|
354
354
|
return '';
|
|
355
355
|
}
|
|
356
|
-
this
|
|
357
|
-
return this
|
|
356
|
+
this.#dataURLDisplayNameInternal = Platform.StringUtilities.trimEndWithMaxLength(this.url, 20);
|
|
357
|
+
return this.#dataURLDisplayNameInternal;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
isAboutBlank(): boolean {
|