chrome-devtools-frontend 1.0.1690116 → 1.0.1695017
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/.agents/skills/devtools-model-management/SKILL.md +3 -3
- package/.agents/skills/foundation-test-migration/SKILL.md +2 -2
- package/.agents/skills/merging-devtools-module/SKILL.md +5 -5
- package/AUTHORS +3 -0
- package/config/typescript/tsconfig.base.json +1 -0
- package/docs/get_the_code.md +4 -9
- package/front_end/Images/src/comment-mode-cursor.svg +23 -0
- package/front_end/Tests.js +1 -1
- package/front_end/application_tokens.css +5 -0
- package/front_end/core/common/ColorConverter.ts +3 -3
- package/front_end/core/host/UserMetrics.ts +27 -0
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +0 -46
- package/front_end/core/protocol_client/InspectorBackend.ts +6 -6
- package/front_end/core/root/Runtime.ts +1 -0
- package/front_end/core/sdk/CSSLocation.ts +32 -0
- package/front_end/core/sdk/CSSModel.ts +2 -22
- package/front_end/core/sdk/CSSQuery.ts +2 -1
- package/front_end/core/sdk/CSSRule.ts +29 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -1
- package/front_end/core/sdk/NetworkManager.ts +2 -0
- package/front_end/core/sdk/NetworkRequest.ts +63 -4
- package/front_end/core/sdk/NetworkRequestAccess.ts +191 -0
- package/front_end/core/sdk/ResourceTreeModel.ts +72 -23
- package/front_end/core/sdk/SecurityOrigin.ts +97 -12
- package/front_end/core/sdk/Target.ts +18 -0
- package/front_end/core/sdk/sdk.ts +4 -0
- package/front_end/entrypoints/main/MainImpl.ts +8 -1
- package/front_end/foundation/Universe.ts +14 -11
- package/front_end/generated/Deprecation.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +9 -8
- package/front_end/generated/SupportedCSSProperties.ts +14 -4
- package/front_end/generated/protocol.ts +24 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +46 -10
- package/front_end/models/ai_assistance/AiConversation.ts +35 -24
- package/front_end/models/ai_assistance/README.md +5 -3
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +1 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +28 -34
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +13 -17
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +5 -3
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +16 -10
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -4
- package/front_end/models/ai_assistance/ai_assistance.ts +0 -2
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +11 -2
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +17 -5
- package/front_end/models/ai_assistance/contexts/FileContext.ts +13 -6
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +52 -25
- package/front_end/models/ai_assistance/contexts/RequestContext.ts +18 -34
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +14 -3
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +2 -5
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +135 -58
- package/front_end/models/ai_assistance/tools/CookieUtils.ts +25 -35
- package/front_end/models/ai_assistance/tools/DOMStorageUtils.ts +6 -3
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +9 -2
- package/front_end/models/ai_assistance/tools/GetCookieValues.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +3 -2
- package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +3 -5
- package/front_end/models/ai_assistance/tools/GetInsightDetails.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +8 -11
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +2 -4
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +6 -13
- package/front_end/models/ai_assistance/tools/GetStorageBreakdown.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +9 -9
- package/front_end/models/ai_assistance/tools/GetStyles.ts +3 -2
- package/front_end/models/ai_assistance/tools/ListCookies.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +6 -14
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +10 -15
- package/front_end/models/ai_assistance/tools/ListSources.ts +5 -7
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +9 -9
- package/front_end/models/ai_assistance/tools/README.md +4 -2
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +3 -2
- package/front_end/models/ai_assistance/tools/Tool.ts +27 -3
- package/front_end/models/comment_manager/CD4ABridge.ts +128 -0
- package/front_end/models/comment_manager/CommentManager.ts +50 -8
- package/front_end/models/comment_manager/comment_manager.ts +2 -0
- package/front_end/models/emulation/DeviceModeModel.ts +37 -47
- package/front_end/models/javascript_metadata/NativeFunctions.ts +9 -1
- package/front_end/models/live-metrics/web-vitals-injected/README.md +1 -1
- package/front_end/models/source_map_scopes/NamesResolver.ts +9 -7
- package/front_end/models/trace/ModelImpl.ts +2 -0
- package/front_end/models/trace/Processor.ts +6 -4
- package/front_end/models/trace/handlers/LayerTreeHandler.ts +3 -3
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +1 -1
- package/front_end/models/trace/helpers/SyntheticEvents.ts +23 -1
- package/front_end/models/trace/types/Configuration.ts +7 -0
- package/front_end/models/trace/types/TraceEvents.ts +20 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -0
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingListView.ts +177 -0
- package/front_end/panels/accessibility/accessibility.ts +2 -0
- package/front_end/panels/accessibility/accessibilityAnnouncementRecordingListView.css +33 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -15
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +6 -35
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +4 -3
- package/front_end/panels/ai_assistance/components/chatMessage.css +3 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -0
- package/front_end/panels/application/CrashReportContextView.ts +0 -1
- package/front_end/panels/application/FrameDetailsView.ts +5 -4
- package/front_end/panels/application/IndexedDBViews.ts +4 -4
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +2 -1
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +1 -1
- package/front_end/panels/application/indexedDBViews.css +0 -14
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/common/CPUThrottlingOption.ts +12 -6
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/ExtensionView.ts +2 -1
- package/front_end/panels/console/ConsoleContextSelector.ts +12 -5
- package/front_end/panels/console/ConsolePinPane.ts +4 -2
- package/front_end/panels/console/ConsoleSidebar.ts +6 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +12 -8
- package/front_end/panels/console/PromptBuilder.ts +1 -1
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/coverage/CoverageModel.ts +6 -4
- package/front_end/panels/coverage/coverageView.css +8 -8
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +13 -14
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +3 -3
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
- package/front_end/panels/developer_resources/developerResourcesView.css +3 -3
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +43 -15
- package/front_end/panels/elements/ElementsTreeOutline.ts +185 -109
- package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
- package/front_end/panels/elements/PropertyNameCategories.ts +1 -1
- package/front_end/panels/elements/ShortcutTreeElement.ts +6 -1
- package/front_end/panels/elements/StandaloneStylesContainer.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +2 -35
- package/front_end/panels/elements/StylesSidebarPane.ts +3 -2
- package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +5 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +161 -148
- package/front_end/panels/elements/components/computedStyleProperty.css +5 -5
- package/front_end/panels/elements/components/computedStyleTrace.css +5 -5
- package/front_end/panels/elements/components/cssHintDetailsView.css +1 -1
- package/front_end/panels/elements/components/cssPropertyDocsView.css +3 -3
- package/front_end/panels/elements/components/cssVariableValueView.css +4 -4
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +3 -3
- package/front_end/panels/elements/components/elementsTreeExpandButton.css +5 -5
- package/front_end/panels/elements/components/queryContainer.css +2 -2
- package/front_end/panels/elements/elementsTreeOutline.css +20 -4
- package/front_end/panels/emulation/MediaQueryInspector.ts +2 -1
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/issues/AffectedElementsView.ts +3 -0
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +1 -1
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +12 -10
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +1 -0
- package/front_end/panels/layer_viewer/Layers3DView.ts +13 -11
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspectorUtils.ts +2 -2
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +11 -11
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryNavigator.css +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +5 -5
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +2 -2
- package/front_end/panels/media/PlayerPropertiesView.ts +1 -1
- package/front_end/panels/media/TickingFlameChart.ts +3 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +2 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +2 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +11 -9
- package/front_end/panels/network/NetworkLogView.ts +4 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +5 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +47 -11
- package/front_end/panels/network/RequestPayloadView.ts +1 -1
- package/front_end/panels/network/RequestResponseView.ts +1 -1
- package/front_end/panels/network/RequestTimingView.ts +1 -1
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +1 -1
- package/front_end/panels/network/components/RequestHeadersView.css +12 -0
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +3 -3
- package/front_end/panels/recorder/RecordingListView.ts +0 -6
- package/front_end/panels/recorder/RecordingView.ts +0 -6
- package/front_end/panels/recorder/controlButton.css +10 -10
- package/front_end/panels/recorder/startView.css +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +4 -2
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/SecurityPanel.ts +46 -35
- package/front_end/panels/sources/BreakpointEditDialog.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -6
- package/front_end/panels/sources/ProfilePlugin.ts +2 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/timeline/IsolateSelector.ts +1 -1
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/NetworkTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +0 -32
- package/front_end/panels/timeline/TimelineHistoryManager.ts +1 -1
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +7 -3
- package/front_end/panels/timeline/TimelinePanel.ts +3 -20
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +4 -4
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +25 -24
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +4 -3
- package/front_end/panels/timeline/components/Sidebar.ts +1 -1
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -3
- package/front_end/panels/timeline/components/cwvMetrics.css +2 -2
- package/front_end/panels/timeline/components/insights/checklist.css +1 -1
- package/front_end/panels/timeline/components/insights/table.css +3 -3
- package/front_end/panels/timeline/overlays/components/entriesLinkOverlay.css +4 -4
- package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +4 -4
- package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +2 -2
- package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +4 -4
- package/front_end/panels/timeline/timelinePanel.css +0 -74
- package/front_end/panels/timeline/utils/Helpers.ts +1 -1
- package/front_end/panels/timeline/utils/ImageCache.ts +5 -3
- package/front_end/panels/web_audio/WebAudioView.ts +3 -3
- package/front_end/panels/web_audio/webAudio.css +5 -5
- package/front_end/panels/webauthn/WebauthnPane.ts +5 -11
- package/front_end/third_party/acorn/acorn.ts +3 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/chromium/ahem/ahem.d.ts +1 -0
- package/front_end/third_party/csp_evaluator/package/csp.ts +4 -4
- package/front_end/third_party/csp_evaluator/package/parser.ts +3 -1
- package/front_end/third_party/csp_evaluator/package/tsconfig.json +1 -0
- package/front_end/third_party/csp_evaluator/package/utils.ts +1 -1
- package/front_end/third_party/diff/DiffWrapper.ts +1 -8
- package/front_end/third_party/diff/diff_match_patch.d.ts +10 -0
- package/front_end/third_party/json5/json5.ts +2 -2
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +183 -4
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +708 -122
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +85 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +84 -11
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts +75 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js +102 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts +31 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js +138 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/bidi.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js +23 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts +31 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js +131 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +7 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +42 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js +265 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Device.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +24 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts +23 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +49 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +183 -4
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +143 -11
- package/front_end/third_party/puppeteer/package/src/api/ScreenRecording.ts +145 -0
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/bidi/ScreenRecording.ts +106 -0
- package/front_end/third_party/puppeteer/package/src/bidi/bidi.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +41 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +11 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ScreenRecording.ts +101 -0
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +17 -9
- package/front_end/third_party/puppeteer/package/src/common/BrowserWebSocketTransport.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +46 -0
- package/front_end/third_party/puppeteer/package/src/common/Device.ts +287 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +30 -1
- package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +73 -2
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +3 -0
- package/front_end/tsconfig.json +1 -2
- package/front_end/ui/comments/CommentAnchorResolver.ts +8 -3
- package/front_end/ui/comments/CommentOverlayManager.ts +53 -12
- package/front_end/ui/comments/CommentsOverlayWidget.ts +3 -3
- package/front_end/ui/comments/CommentsStatusBarPill.ts +96 -0
- package/front_end/ui/comments/comments-meta.ts +21 -0
- package/front_end/ui/comments/comments.ts +2 -0
- package/front_end/ui/comments/commentsOverlay.css +22 -3
- package/front_end/ui/components/buttons/floatingButton.css +25 -0
- package/front_end/ui/components/markdown_view/MarkdownView.ts +31 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +45 -25
- package/front_end/ui/kit/icons/Icon.ts +0 -1
- package/front_end/ui/kit/link/Link.ts +8 -1
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/DropTarget.ts +6 -1
- package/front_end/ui/legacy/EmptyWidget.ts +1 -1
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +17 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +2 -2
- package/front_end/ui/legacy/SplitWidget.ts +18 -3
- package/front_end/ui/legacy/StackedPane.ts +1 -1
- package/front_end/ui/legacy/StatusBar.ts +78 -0
- package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -1
- package/front_end/ui/legacy/TextPrompt.ts +2 -1
- package/front_end/ui/legacy/Toolbar.ts +5 -1
- package/front_end/ui/legacy/Treeoutline.ts +91 -48
- package/front_end/ui/legacy/UIUtils.ts +8 -4
- package/front_end/ui/legacy/ViewManager.ts +1 -1
- package/front_end/ui/legacy/ViewRegistration.ts +1 -0
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +7 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -2
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +23 -23
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +48 -44
- package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.docs.ts +83 -0
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +600 -0
- package/front_end/ui/legacy/components/inline_editor/animationNameSwatch.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/colorMixSwatch.css +4 -4
- package/front_end/ui/legacy/components/inline_editor/cssAngleSwatch.css +3 -3
- package/front_end/ui/legacy/components/inline_editor/inline_editor.ts +2 -0
- package/front_end/ui/legacy/components/inline_editor/linkSwatch.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/positionAreaEditor.css +154 -0
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +224 -127
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +10 -7
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +25 -106
- package/front_end/ui/legacy/components/object_ui/customPreviewComponent.css +7 -3
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -66
- package/front_end/ui/legacy/components/perf_ui/perf_ui.ts +0 -2
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +7 -5
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +8 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +1 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -5
- package/front_end/ui/legacy/inspectorCommon.css +41 -6
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/legacy/statusBar.css +18 -0
- package/front_end/ui/visual_logging/Debugging.ts +2 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -1
- package/front_end/ui/visual_logging/LoggingDriver.ts +3 -3
- package/front_end/ui/visual_logging/LoggingEvents.ts +5 -5
- package/front_end/ui/visual_logging/LoggingState.ts +1 -1
- package/front_end/ui/visual_logging/visual_logging.ts +67 -56
- package/inspector_overlay/main.ts +8 -8
- package/mcp/mcp.ts +5 -0
- package/package.json +2 -8
- package/front_end/Images/generate-css-vars.js +0 -52
- package/front_end/Images/rollup.config.mjs +0 -36
- package/front_end/models/ai_assistance/AiOrigins.ts +0 -107
- package/front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs +0 -20
- package/front_end/panels/recorder/injected/rollup.config.mjs +0 -20
- package/front_end/panels/timeline/EasterEgg.d.ts +0 -6
- package/front_end/panels/timeline/easter-egg-tsconfig.json +0 -8
- package/front_end/panels/timeline/enable-easter-egg.js +0 -20
- package/front_end/third_party/acorn/acorn-tsconfig.json +0 -12
- package/front_end/third_party/acorn/estree-tsconfig.json +0 -8
- package/front_end/third_party/chromium/client-variations/client-variations-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-legacy-types-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +0 -15
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
- package/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
- package/front_end/third_party/json5/json5-tsconfig.json +0 -8
- package/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
- package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +0 -11
- package/front_end/third_party/lighthouse/report/bundle-tsconfig.json +0 -8
- package/front_end/third_party/lit/lit-tsconfig.json +0 -15
- package/front_end/third_party/marked/marked-tsconfig.json +0 -8
- package/front_end/third_party/puppeteer-replay/puppeteer-replay-tsconfig.json +0 -8
- package/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
- package/front_end/third_party/wasmparser/wasmparser-tsconfig.json +0 -9
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -47
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +0 -606
- package/inspector_overlay/loadCSS.rollup.js +0 -29
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
import * as Common from '../../../../core/common/common.js';
|
|
5
|
+
import * as Lit from '../../../../ui/lit/lit.js';
|
|
6
|
+
import * as UI from '../../legacy.js';
|
|
7
|
+
|
|
8
|
+
import positionAreaEditorStyles from './positionAreaEditor.css.js';
|
|
9
|
+
|
|
10
|
+
const {Directives, html, nothing, render} = Lit;
|
|
11
|
+
const {repeat} = Directives;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Valid combinations of (Mode, Self) across axes according to the CSS Anchor Positioning specification
|
|
15
|
+
* (https://drafts.csswg.org/css-anchor-position-1/#typedef-position-area):
|
|
16
|
+
*
|
|
17
|
+
* 1. `center` and `span-all` are universal wildcards present in all categories and can pair with ANY
|
|
18
|
+
* mode and self setting on the opposite axis (e.g., `top center`, `self-block-start center`).
|
|
19
|
+
*
|
|
20
|
+
* 2. When both axes specify a direction (neither is `center` or `span-all`):
|
|
21
|
+
* - X/Y branch: Any X-axis keyword (`PHYSICAL`, `COORDINATE`, or `COORDINATE` with `self`) can pair
|
|
22
|
+
* with any Y-axis keyword (`PHYSICAL`, `COORDINATE`, or `COORDINATE` with `self`), e.g. `top left`,
|
|
23
|
+
* `top self-x-start`, `y-start self-x-start`, `self-y-start self-x-start`.
|
|
24
|
+
* - Logical: (LOGICAL, false) + (LOGICAL, false) e.g. `block-start inline-start`
|
|
25
|
+
* - Logical Self: (LOGICAL, true) + (LOGICAL, true) e.g. `self-block-start self-inline-start`
|
|
26
|
+
* - Auto: (AUTO, false) + (AUTO, false) e.g. `start start`, `start end`
|
|
27
|
+
* - Auto Self: (AUTO, true) + (AUTO, true) e.g. `self-start self-end`
|
|
28
|
+
*
|
|
29
|
+
* Key constraints:
|
|
30
|
+
* - For `LOGICAL` and `AUTO`, `self` must match across both axes (`self + self` or `non-self + non-self`).
|
|
31
|
+
* - For `PHYSICAL` and `COORDINATE`, `self` is independent per axis (`PHYSICAL` has no `self` variants).
|
|
32
|
+
* - Cross-system mixing is forbidden (e.g. Physical/Coordinate cannot pair with Logical or non-center Auto).
|
|
33
|
+
*/
|
|
34
|
+
export const enum Mode {
|
|
35
|
+
PHYSICAL = 'physical',
|
|
36
|
+
COORDINATE = 'coordinate',
|
|
37
|
+
LOGICAL = 'logical',
|
|
38
|
+
AUTO = 'auto',
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const enum Axis {
|
|
42
|
+
BLOCK = 'block',
|
|
43
|
+
INLINE = 'inline',
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const enum Keyword {
|
|
47
|
+
TOP = 'top',
|
|
48
|
+
BOTTOM = 'bottom',
|
|
49
|
+
LEFT = 'left',
|
|
50
|
+
RIGHT = 'right',
|
|
51
|
+
SPAN_TOP = 'span-top',
|
|
52
|
+
SPAN_BOTTOM = 'span-bottom',
|
|
53
|
+
SPAN_LEFT = 'span-left',
|
|
54
|
+
SPAN_RIGHT = 'span-right',
|
|
55
|
+
Y_START = 'y-start',
|
|
56
|
+
Y_END = 'y-end',
|
|
57
|
+
X_START = 'x-start',
|
|
58
|
+
X_END = 'x-end',
|
|
59
|
+
SPAN_Y_START = 'span-y-start',
|
|
60
|
+
SPAN_Y_END = 'span-y-end',
|
|
61
|
+
SPAN_X_START = 'span-x-start',
|
|
62
|
+
SPAN_X_END = 'span-x-end',
|
|
63
|
+
BLOCK_START = 'block-start',
|
|
64
|
+
BLOCK_END = 'block-end',
|
|
65
|
+
INLINE_START = 'inline-start',
|
|
66
|
+
INLINE_END = 'inline-end',
|
|
67
|
+
SPAN_BLOCK_START = 'span-block-start',
|
|
68
|
+
SPAN_BLOCK_END = 'span-block-end',
|
|
69
|
+
SPAN_INLINE_START = 'span-inline-start',
|
|
70
|
+
SPAN_INLINE_END = 'span-inline-end',
|
|
71
|
+
SELF_BLOCK_START = 'self-block-start',
|
|
72
|
+
SELF_BLOCK_END = 'self-block-end',
|
|
73
|
+
SELF_INLINE_START = 'self-inline-start',
|
|
74
|
+
SELF_INLINE_END = 'self-inline-end',
|
|
75
|
+
SPAN_SELF_BLOCK_START = 'span-self-block-start',
|
|
76
|
+
SPAN_SELF_BLOCK_END = 'span-self-block-end',
|
|
77
|
+
SPAN_SELF_INLINE_START = 'span-self-inline-start',
|
|
78
|
+
SPAN_SELF_INLINE_END = 'span-self-inline-end',
|
|
79
|
+
Y_SELF_START = 'self-y-start',
|
|
80
|
+
Y_SELF_END = 'self-y-end',
|
|
81
|
+
X_SELF_START = 'self-x-start',
|
|
82
|
+
X_SELF_END = 'self-x-end',
|
|
83
|
+
SPAN_Y_SELF_START = 'span-self-y-start',
|
|
84
|
+
SPAN_Y_SELF_END = 'span-self-y-end',
|
|
85
|
+
SPAN_X_SELF_START = 'span-self-x-start',
|
|
86
|
+
SPAN_X_SELF_END = 'span-self-x-end',
|
|
87
|
+
CENTER = 'center',
|
|
88
|
+
SPAN_ALL = 'span-all',
|
|
89
|
+
START = 'start',
|
|
90
|
+
END = 'end',
|
|
91
|
+
SPAN_START = 'span-start',
|
|
92
|
+
SPAN_END = 'span-end',
|
|
93
|
+
SELF_START = 'self-start',
|
|
94
|
+
SELF_END = 'self-end',
|
|
95
|
+
SPAN_SELF_START = 'span-self-start',
|
|
96
|
+
SPAN_SELF_END = 'span-self-end',
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface GridAxis {
|
|
100
|
+
// Start and end are values from 0 to 2, inclusive, marking an interval on the position-area grid axis
|
|
101
|
+
start: number;
|
|
102
|
+
end: number;
|
|
103
|
+
mode: Mode;
|
|
104
|
+
self: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface Area {
|
|
108
|
+
first: GridAxis;
|
|
109
|
+
second: GridAxis;
|
|
110
|
+
primaryAxis: Axis;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const KEYWORD_DEFS: Record<Keyword, GridAxis&{axis?: Axis}> = {
|
|
114
|
+
// Physical block
|
|
115
|
+
[Keyword.TOP]: {axis: Axis.BLOCK, start: 0, end: 0, mode: Mode.PHYSICAL, self: false},
|
|
116
|
+
[Keyword.BOTTOM]: {axis: Axis.BLOCK, start: 2, end: 2, mode: Mode.PHYSICAL, self: false},
|
|
117
|
+
[Keyword.SPAN_TOP]: {axis: Axis.BLOCK, start: 0, end: 1, mode: Mode.PHYSICAL, self: false},
|
|
118
|
+
[Keyword.SPAN_BOTTOM]: {axis: Axis.BLOCK, start: 1, end: 2, mode: Mode.PHYSICAL, self: false},
|
|
119
|
+
|
|
120
|
+
// Physical inline
|
|
121
|
+
[Keyword.LEFT]: {axis: Axis.INLINE, start: 0, end: 0, mode: Mode.PHYSICAL, self: false},
|
|
122
|
+
[Keyword.RIGHT]: {axis: Axis.INLINE, start: 2, end: 2, mode: Mode.PHYSICAL, self: false},
|
|
123
|
+
[Keyword.SPAN_LEFT]: {axis: Axis.INLINE, start: 0, end: 1, mode: Mode.PHYSICAL, self: false},
|
|
124
|
+
[Keyword.SPAN_RIGHT]: {axis: Axis.INLINE, start: 1, end: 2, mode: Mode.PHYSICAL, self: false},
|
|
125
|
+
|
|
126
|
+
// Coordinate block
|
|
127
|
+
[Keyword.Y_START]: {axis: Axis.BLOCK, start: 0, end: 0, mode: Mode.COORDINATE, self: false},
|
|
128
|
+
[Keyword.Y_END]: {axis: Axis.BLOCK, start: 2, end: 2, mode: Mode.COORDINATE, self: false},
|
|
129
|
+
[Keyword.SPAN_Y_START]: {axis: Axis.BLOCK, start: 0, end: 1, mode: Mode.COORDINATE, self: false},
|
|
130
|
+
[Keyword.SPAN_Y_END]: {axis: Axis.BLOCK, start: 1, end: 2, mode: Mode.COORDINATE, self: false},
|
|
131
|
+
[Keyword.Y_SELF_START]: {axis: Axis.BLOCK, start: 0, end: 0, mode: Mode.COORDINATE, self: true},
|
|
132
|
+
[Keyword.Y_SELF_END]: {axis: Axis.BLOCK, start: 2, end: 2, mode: Mode.COORDINATE, self: true},
|
|
133
|
+
[Keyword.SPAN_Y_SELF_START]: {axis: Axis.BLOCK, start: 0, end: 1, mode: Mode.COORDINATE, self: true},
|
|
134
|
+
[Keyword.SPAN_Y_SELF_END]: {axis: Axis.BLOCK, start: 1, end: 2, mode: Mode.COORDINATE, self: true},
|
|
135
|
+
|
|
136
|
+
// Coordinate inline
|
|
137
|
+
[Keyword.X_START]: {axis: Axis.INLINE, start: 0, end: 0, mode: Mode.COORDINATE, self: false},
|
|
138
|
+
[Keyword.X_END]: {axis: Axis.INLINE, start: 2, end: 2, mode: Mode.COORDINATE, self: false},
|
|
139
|
+
[Keyword.SPAN_X_START]: {axis: Axis.INLINE, start: 0, end: 1, mode: Mode.COORDINATE, self: false},
|
|
140
|
+
[Keyword.SPAN_X_END]: {axis: Axis.INLINE, start: 1, end: 2, mode: Mode.COORDINATE, self: false},
|
|
141
|
+
[Keyword.X_SELF_START]: {axis: Axis.INLINE, start: 0, end: 0, mode: Mode.COORDINATE, self: true},
|
|
142
|
+
[Keyword.X_SELF_END]: {axis: Axis.INLINE, start: 2, end: 2, mode: Mode.COORDINATE, self: true},
|
|
143
|
+
[Keyword.SPAN_X_SELF_START]: {axis: Axis.INLINE, start: 0, end: 1, mode: Mode.COORDINATE, self: true},
|
|
144
|
+
[Keyword.SPAN_X_SELF_END]: {axis: Axis.INLINE, start: 1, end: 2, mode: Mode.COORDINATE, self: true},
|
|
145
|
+
|
|
146
|
+
// Logical block
|
|
147
|
+
[Keyword.BLOCK_START]: {axis: Axis.BLOCK, start: 0, end: 0, mode: Mode.LOGICAL, self: false},
|
|
148
|
+
[Keyword.BLOCK_END]: {axis: Axis.BLOCK, start: 2, end: 2, mode: Mode.LOGICAL, self: false},
|
|
149
|
+
[Keyword.SPAN_BLOCK_START]: {axis: Axis.BLOCK, start: 0, end: 1, mode: Mode.LOGICAL, self: false},
|
|
150
|
+
[Keyword.SPAN_BLOCK_END]: {axis: Axis.BLOCK, start: 1, end: 2, mode: Mode.LOGICAL, self: false},
|
|
151
|
+
[Keyword.SELF_BLOCK_START]: {axis: Axis.BLOCK, start: 0, end: 0, mode: Mode.LOGICAL, self: true},
|
|
152
|
+
[Keyword.SELF_BLOCK_END]: {axis: Axis.BLOCK, start: 2, end: 2, mode: Mode.LOGICAL, self: true},
|
|
153
|
+
[Keyword.SPAN_SELF_BLOCK_START]: {axis: Axis.BLOCK, start: 0, end: 1, mode: Mode.LOGICAL, self: true},
|
|
154
|
+
[Keyword.SPAN_SELF_BLOCK_END]: {axis: Axis.BLOCK, start: 1, end: 2, mode: Mode.LOGICAL, self: true},
|
|
155
|
+
|
|
156
|
+
// Logical inline
|
|
157
|
+
[Keyword.INLINE_START]: {axis: Axis.INLINE, start: 0, end: 0, mode: Mode.LOGICAL, self: false},
|
|
158
|
+
[Keyword.INLINE_END]: {axis: Axis.INLINE, start: 2, end: 2, mode: Mode.LOGICAL, self: false},
|
|
159
|
+
[Keyword.SPAN_INLINE_START]: {axis: Axis.INLINE, start: 0, end: 1, mode: Mode.LOGICAL, self: false},
|
|
160
|
+
[Keyword.SPAN_INLINE_END]: {axis: Axis.INLINE, start: 1, end: 2, mode: Mode.LOGICAL, self: false},
|
|
161
|
+
[Keyword.SELF_INLINE_START]: {axis: Axis.INLINE, start: 0, end: 0, mode: Mode.LOGICAL, self: true},
|
|
162
|
+
[Keyword.SELF_INLINE_END]: {axis: Axis.INLINE, start: 2, end: 2, mode: Mode.LOGICAL, self: true},
|
|
163
|
+
[Keyword.SPAN_SELF_INLINE_START]: {axis: Axis.INLINE, start: 0, end: 1, mode: Mode.LOGICAL, self: true},
|
|
164
|
+
[Keyword.SPAN_SELF_INLINE_END]: {axis: Axis.INLINE, start: 1, end: 2, mode: Mode.LOGICAL, self: true},
|
|
165
|
+
|
|
166
|
+
// Auto / Ambiguous
|
|
167
|
+
[Keyword.CENTER]: {start: 1, end: 1, mode: Mode.AUTO, self: false},
|
|
168
|
+
[Keyword.SPAN_ALL]: {start: 0, end: 2, mode: Mode.AUTO, self: false},
|
|
169
|
+
[Keyword.START]: {start: 0, end: 0, mode: Mode.AUTO, self: false},
|
|
170
|
+
[Keyword.END]: {start: 2, end: 2, mode: Mode.AUTO, self: false},
|
|
171
|
+
[Keyword.SPAN_START]: {start: 0, end: 1, mode: Mode.AUTO, self: false},
|
|
172
|
+
[Keyword.SPAN_END]: {start: 1, end: 2, mode: Mode.AUTO, self: false},
|
|
173
|
+
[Keyword.SELF_START]: {start: 0, end: 0, mode: Mode.AUTO, self: true},
|
|
174
|
+
[Keyword.SELF_END]: {start: 2, end: 2, mode: Mode.AUTO, self: true},
|
|
175
|
+
[Keyword.SPAN_SELF_START]: {start: 0, end: 1, mode: Mode.AUTO, self: true},
|
|
176
|
+
[Keyword.SPAN_SELF_END]: {start: 1, end: 2, mode: Mode.AUTO, self: true},
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
const KEYWORD_MAP = new Map<string, GridAxis&{axis?: Axis}>(Object.entries(KEYWORD_DEFS));
|
|
180
|
+
|
|
181
|
+
function isGeneric(axis: GridAxis): boolean {
|
|
182
|
+
return (axis.start === 0 && axis.end === 2) || (axis.start === 1 && axis.end === 1);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function parsePositionArea(text: string): Area|null {
|
|
186
|
+
const tokens = text.trim().split(/\s+/).filter(t => t.length > 0);
|
|
187
|
+
if (tokens.length === 0 || tokens.length > 2) {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const first = KEYWORD_MAP.get(tokens[0]);
|
|
192
|
+
if (!first) {
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
const second = KEYWORD_MAP.get(tokens[1] ?? (first.axis ? Keyword.SPAN_ALL : tokens[0]));
|
|
196
|
+
if (!second) {
|
|
197
|
+
return null;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
if (first.axis && second.axis && first.axis === second.axis) {
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const primaryAxis = first.axis ?? (second.axis === Axis.BLOCK ? Axis.INLINE : Axis.BLOCK);
|
|
205
|
+
const firstMode = isGeneric(first) && !isGeneric(second) ? second.mode : first.mode;
|
|
206
|
+
const secondMode = isGeneric(second) && !isGeneric(first) ? first.mode : second.mode;
|
|
207
|
+
|
|
208
|
+
return {
|
|
209
|
+
first: {start: first.start, end: first.end, mode: firstMode, self: first.self},
|
|
210
|
+
second: {start: second.start, end: second.end, mode: secondMode, self: second.self},
|
|
211
|
+
primaryAxis,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function axisToKeyword(axis: GridAxis, axisType: Axis): string|null {
|
|
216
|
+
if (axis.start === 0 && axis.end === 2) {
|
|
217
|
+
return Keyword.SPAN_ALL;
|
|
218
|
+
}
|
|
219
|
+
if (axis.start === 1 && axis.end === 1) {
|
|
220
|
+
return Keyword.CENTER;
|
|
221
|
+
}
|
|
222
|
+
for (const [kw, def] of KEYWORD_MAP) {
|
|
223
|
+
if (def.start === axis.start && def.end === axis.end && def.mode === axis.mode && def.self === axis.self &&
|
|
224
|
+
(def.axis === undefined || def.axis === axisType)) {
|
|
225
|
+
return kw;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export function stringifyPositionArea(area: Area): string {
|
|
232
|
+
const firstAxis = area.primaryAxis;
|
|
233
|
+
const secondAxis = area.primaryAxis === Axis.INLINE ? Axis.BLOCK : Axis.INLINE;
|
|
234
|
+
const firstKw = axisToKeyword(area.first, firstAxis);
|
|
235
|
+
const secondKw = axisToKeyword(area.second, secondAxis);
|
|
236
|
+
if (!firstKw || !secondKw) {
|
|
237
|
+
return '';
|
|
238
|
+
}
|
|
239
|
+
const firstDef = KEYWORD_MAP.get(firstKw);
|
|
240
|
+
if (!firstDef?.axis && firstKw === secondKw) {
|
|
241
|
+
return firstKw;
|
|
242
|
+
}
|
|
243
|
+
if (firstDef?.axis && secondKw === Keyword.SPAN_ALL) {
|
|
244
|
+
return firstKw;
|
|
245
|
+
}
|
|
246
|
+
return `${firstKw} ${secondKw}`;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export interface ViewInput {
|
|
250
|
+
area: Area|undefined;
|
|
251
|
+
onSelectStart: (x: number, y: number) => void;
|
|
252
|
+
onSelect: (x: number, y: number) => void;
|
|
253
|
+
onSelectEnd: (x?: number, y?: number) => void;
|
|
254
|
+
onModeChange: (axis: Axis, mode: Mode) => void;
|
|
255
|
+
onSelfChange: (axis: Axis, self: boolean) => void;
|
|
256
|
+
}
|
|
257
|
+
export type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
258
|
+
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
259
|
+
if (!input.area) {
|
|
260
|
+
render(nothing, target);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
const x = input.area.primaryAxis === Axis.INLINE ? input.area.first : input.area.second;
|
|
264
|
+
const y = input.area.primaryAxis === Axis.BLOCK ? input.area.first : input.area.second;
|
|
265
|
+
const grid = [[0, 0], [1, 0], [2, 0], [0, 1], [1, 1], [2, 1], [0, 2], [1, 2], [2, 2]];
|
|
266
|
+
|
|
267
|
+
function getCellCoords(e: PointerEvent, container: HTMLElement): [number, number]|null {
|
|
268
|
+
const root = container.getRootNode() as Document | ShadowRoot;
|
|
269
|
+
const el = root.elementFromPoint(e.clientX, e.clientY);
|
|
270
|
+
const cell = el?.closest<HTMLElement>('.position-area-builder > div');
|
|
271
|
+
if (!cell || !container.contains(cell)) {
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
const cellX = Number(cell.dataset.x);
|
|
275
|
+
const cellY = Number(cell.dataset.y);
|
|
276
|
+
return [cellX, cellY];
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function onPointerDown(e: PointerEvent): void {
|
|
280
|
+
const container = e.currentTarget as HTMLElement;
|
|
281
|
+
const targetCell = (e.target as HTMLElement).closest('[data-x]') as HTMLElement | null;
|
|
282
|
+
if (!targetCell) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
const startX = Number(targetCell.dataset.x);
|
|
286
|
+
const startY = Number(targetCell.dataset.y);
|
|
287
|
+
container.setPointerCapture(e.pointerId);
|
|
288
|
+
input.onSelectStart(startX, startY);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function onPointerMove(e: PointerEvent): void {
|
|
292
|
+
const container = e.currentTarget as HTMLElement;
|
|
293
|
+
if (!container.hasPointerCapture(e.pointerId)) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
const cell = getCellCoords(e, container);
|
|
297
|
+
if (cell) {
|
|
298
|
+
input.onSelect(...cell);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function onPointerUp(e: PointerEvent): void {
|
|
303
|
+
const container = e.currentTarget as HTMLElement;
|
|
304
|
+
if (!container.hasPointerCapture(e.pointerId)) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
container.releasePointerCapture(e.pointerId);
|
|
308
|
+
const coords = getCellCoords(e, container);
|
|
309
|
+
if (coords) {
|
|
310
|
+
input.onSelectEnd(...coords);
|
|
311
|
+
} else {
|
|
312
|
+
input.onSelectEnd(x.end, y.end);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
function onPointerCancel(e: PointerEvent): void {
|
|
317
|
+
const container = e.currentTarget as HTMLElement;
|
|
318
|
+
if (!container.hasPointerCapture(e.pointerId)) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
container.releasePointerCapture(e.pointerId);
|
|
322
|
+
input.onSelectEnd();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const propertyValue = stringifyPositionArea(input.area);
|
|
326
|
+
|
|
327
|
+
const blockAxis = input.area.primaryAxis === Axis.BLOCK ? input.area.first : input.area.second;
|
|
328
|
+
const inlineAxis = input.area.primaryAxis === Axis.INLINE ? input.area.first : input.area.second;
|
|
329
|
+
|
|
330
|
+
function renderModeRadioGroup(axis: Axis, currentMode: Mode): Lit.TemplateResult {
|
|
331
|
+
const modes = [
|
|
332
|
+
{mode: Mode.PHYSICAL, label: 'Physical'},
|
|
333
|
+
{mode: Mode.COORDINATE, label: 'Coordinate'},
|
|
334
|
+
{mode: Mode.LOGICAL, label: 'Logical'},
|
|
335
|
+
{mode: Mode.AUTO, label: 'Auto'},
|
|
336
|
+
];
|
|
337
|
+
|
|
338
|
+
return html`
|
|
339
|
+
<fieldset class="chip-radio-group" aria-label="${axis} axis mode">
|
|
340
|
+
${modes.map(({mode, label}) => {
|
|
341
|
+
const id = `${axis}-mode-${mode}`;
|
|
342
|
+
return html`
|
|
343
|
+
<input
|
|
344
|
+
type="radio"
|
|
345
|
+
id=${id}
|
|
346
|
+
name="${axis}-mode"
|
|
347
|
+
value=${mode}
|
|
348
|
+
.checked=${currentMode === mode}
|
|
349
|
+
@change=${() => input.onModeChange(axis, mode)}
|
|
350
|
+
>
|
|
351
|
+
<label for=${id}>${label}</label>
|
|
352
|
+
`;
|
|
353
|
+
})}
|
|
354
|
+
</fieldset>
|
|
355
|
+
`;
|
|
356
|
+
}
|
|
357
|
+
render(html`
|
|
358
|
+
<style>${positionAreaEditorStyles}</style>
|
|
359
|
+
<div class=property>
|
|
360
|
+
<span class=property-name>position-area:</span>
|
|
361
|
+
<span class=property-value>${
|
|
362
|
+
propertyValue.split(' ').map(
|
|
363
|
+
(keyword, i) => html`${i > 0 ? ' ' : ''}<span class=property-keyword>${keyword}</span>`)}</span>
|
|
364
|
+
</div>
|
|
365
|
+
<div class=position-area-builder
|
|
366
|
+
data-x-start=${x.start} data-x-end=${x.end} data-y-start=${y.start} data-y-end=${y.end}
|
|
367
|
+
@pointerdown=${onPointerDown}
|
|
368
|
+
@pointermove=${onPointerMove}
|
|
369
|
+
@pointerup=${onPointerUp}
|
|
370
|
+
@pointercancel=${onPointerCancel}>
|
|
371
|
+
${repeat(grid, ([x, y]) => x * 10 + y, ([x, y]) => html`
|
|
372
|
+
<div data-x=${x} data-y=${y}>
|
|
373
|
+
</div>
|
|
374
|
+
`)}
|
|
375
|
+
</div>
|
|
376
|
+
<div class=position-area-controls>
|
|
377
|
+
<div class=axis-section>
|
|
378
|
+
<div class=axis-header>
|
|
379
|
+
<span class=axis-title>Block</span>
|
|
380
|
+
<devtools-checkbox
|
|
381
|
+
.checked=${blockAxis.self}
|
|
382
|
+
?disabled=${isGeneric(blockAxis)}
|
|
383
|
+
@change=${(e: Event) => input.onSelfChange(Axis.BLOCK, (e.target as UI.UIUtils.CheckboxLabel).checked)}>
|
|
384
|
+
<span class=self-checkbox-label>self</span>
|
|
385
|
+
</devtools-checkbox>
|
|
386
|
+
</div>
|
|
387
|
+
${renderModeRadioGroup(Axis.BLOCK, blockAxis.mode)}
|
|
388
|
+
</div>
|
|
389
|
+
<div class=axis-section>
|
|
390
|
+
<div class=axis-header>
|
|
391
|
+
<span class=axis-title>Inline</span>
|
|
392
|
+
<devtools-checkbox
|
|
393
|
+
.checked=${inlineAxis.self}
|
|
394
|
+
?disabled=${isGeneric(inlineAxis)}
|
|
395
|
+
@change=${(e: Event) => input.onSelfChange(Axis.INLINE, (e.target as UI.UIUtils.CheckboxLabel).checked)}>
|
|
396
|
+
<span class=self-checkbox-label>self</span>
|
|
397
|
+
</devtools-checkbox>
|
|
398
|
+
</div>
|
|
399
|
+
${renderModeRadioGroup(Axis.INLINE, inlineAxis.mode)}
|
|
400
|
+
</div>
|
|
401
|
+
</div>
|
|
402
|
+
`,
|
|
403
|
+
target);
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
export const enum Events {
|
|
407
|
+
POSITION_AREA_CHANGED = 'positionAreaChanged',
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export interface EventTypes {
|
|
411
|
+
[Events.POSITION_AREA_CHANGED]: Area;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
const PositionAreaEditorBase: Common.ObjectWrapper.EventMixin<EventTypes, typeof UI.Widget.VBox> =
|
|
415
|
+
Common.ObjectWrapper.eventMixin(
|
|
416
|
+
UI.Widget.VBox,
|
|
417
|
+
);
|
|
418
|
+
|
|
419
|
+
export class PositionAreaEditor extends PositionAreaEditorBase {
|
|
420
|
+
#view: View;
|
|
421
|
+
#area?: Area;
|
|
422
|
+
#inProgressSelection?: {
|
|
423
|
+
start: {x: number, y: number},
|
|
424
|
+
end: {x: number, y: number},
|
|
425
|
+
origin?: Area,
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
429
|
+
super(element);
|
|
430
|
+
this.setDefaultFocusedElement(this.contentElement);
|
|
431
|
+
this.#view = view;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
override wasShown(): void {
|
|
435
|
+
super.wasShown();
|
|
436
|
+
this.requestUpdate();
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
get area(): Area|undefined {
|
|
440
|
+
return this.#area;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
set area(val: Area|undefined) {
|
|
444
|
+
if ((this.#inProgressSelection?.origin ?? this.#area) === val) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
this.#area = val;
|
|
448
|
+
this.#inProgressSelection = undefined;
|
|
449
|
+
this.requestUpdate();
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
#startSelection(x: number, y: number): void {
|
|
453
|
+
this.#finishSelection();
|
|
454
|
+
this.#select(x, y);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
#inlineAxis(): GridAxis {
|
|
458
|
+
if (!this.#area) {
|
|
459
|
+
return {start: 0, end: 0, mode: Mode.PHYSICAL, self: false};
|
|
460
|
+
}
|
|
461
|
+
return this.#area.primaryAxis === Axis.INLINE ? this.#area.first : this.#area.second;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
#blockAxis(): GridAxis {
|
|
465
|
+
if (!this.#area) {
|
|
466
|
+
return {start: 0, end: 0, mode: Mode.PHYSICAL, self: false};
|
|
467
|
+
}
|
|
468
|
+
return this.#area.primaryAxis === Axis.BLOCK ? this.#area.first : this.#area.second;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
#axis(axis: Axis): GridAxis {
|
|
472
|
+
return axis === Axis.INLINE ? this.#inlineAxis() : this.#blockAxis();
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
#notifyChange(): void {
|
|
476
|
+
if (!this.#area) {
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
this.dispatchEventToListeners(Events.POSITION_AREA_CHANGED, this.#area);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
#select(x: number, y: number): void {
|
|
483
|
+
if (!this.#inProgressSelection) {
|
|
484
|
+
this.#inProgressSelection = {origin: this.#area, start: {x, y}, end: {x, y}};
|
|
485
|
+
}
|
|
486
|
+
this.#inProgressSelection.end = {x, y};
|
|
487
|
+
|
|
488
|
+
const {start, end} = this.#inProgressSelection;
|
|
489
|
+
|
|
490
|
+
const primaryAxis = this.#area?.primaryAxis ?? Axis.INLINE;
|
|
491
|
+
|
|
492
|
+
// The visual 3x3 grid maps horizontal (x) to the inline axis and vertical (y) to the block axis.
|
|
493
|
+
const inlineAxis = {...this.#inlineAxis(), start: Math.min(start.x, end.x), end: Math.max(start.x, end.x)};
|
|
494
|
+
const blockAxis = {...this.#blockAxis(), start: Math.min(start.y, end.y), end: Math.max(start.y, end.y)};
|
|
495
|
+
this.#area = {
|
|
496
|
+
first: primaryAxis === Axis.INLINE ? inlineAxis : blockAxis,
|
|
497
|
+
second: primaryAxis === Axis.BLOCK ? inlineAxis : blockAxis,
|
|
498
|
+
primaryAxis,
|
|
499
|
+
};
|
|
500
|
+
this.requestUpdate();
|
|
501
|
+
this.#notifyChange();
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
#finishSelection(x?: number, y?: number): void {
|
|
505
|
+
if (!this.#inProgressSelection) {
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
if (x === undefined || y === undefined) {
|
|
509
|
+
this.#area = this.#inProgressSelection.origin ?? this.#area;
|
|
510
|
+
this.#inProgressSelection = undefined;
|
|
511
|
+
this.#notifyChange();
|
|
512
|
+
this.requestUpdate();
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
this.#select(x, y);
|
|
516
|
+
this.#inProgressSelection = undefined;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
#setAxisMode(axis: Axis, mode: Mode): void {
|
|
520
|
+
if (!this.#area) {
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
const otherAxis = axis === Axis.INLINE ? Axis.BLOCK : Axis.INLINE;
|
|
524
|
+
const current = this.#axis(axis);
|
|
525
|
+
|
|
526
|
+
if (mode === current.mode) {
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
const other = this.#axis(otherAxis);
|
|
531
|
+
|
|
532
|
+
current.mode = mode;
|
|
533
|
+
if (isGeneric(current) || mode === Mode.PHYSICAL) {
|
|
534
|
+
// center and span-all and physical axes don't support self
|
|
535
|
+
current.self = false;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
if (!isGeneric(other)) {
|
|
539
|
+
if (mode === Mode.PHYSICAL || mode === Mode.COORDINATE) {
|
|
540
|
+
// physical axes may be combined with coordinate
|
|
541
|
+
if (other.mode !== Mode.PHYSICAL && other.mode !== Mode.COORDINATE) {
|
|
542
|
+
other.mode = mode === Mode.COORDINATE ? Mode.COORDINATE : (other.self ? Mode.COORDINATE : Mode.PHYSICAL);
|
|
543
|
+
}
|
|
544
|
+
} else {
|
|
545
|
+
other.mode = mode;
|
|
546
|
+
if (!isGeneric(current)) {
|
|
547
|
+
other.self = current.self;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
} else {
|
|
551
|
+
other.mode = mode;
|
|
552
|
+
other.self = false;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
this.requestUpdate();
|
|
556
|
+
this.#notifyChange();
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
#setAxisSelf(axis: Axis, self: boolean): void {
|
|
560
|
+
if (!this.#area) {
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
const current = this.#axis(axis);
|
|
564
|
+
const other = this.#axis(axis === Axis.INLINE ? Axis.BLOCK : Axis.INLINE);
|
|
565
|
+
|
|
566
|
+
if (isGeneric(current)) {
|
|
567
|
+
if (!isGeneric(other)) {
|
|
568
|
+
this.#setAxisSelf(axis === Axis.INLINE ? Axis.BLOCK : Axis.INLINE, self);
|
|
569
|
+
}
|
|
570
|
+
this.requestUpdate();
|
|
571
|
+
this.#notifyChange();
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
current.self = self;
|
|
576
|
+
|
|
577
|
+
if (current.mode === Mode.PHYSICAL && self) {
|
|
578
|
+
current.mode = Mode.COORDINATE;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
if (!isGeneric(other) && other.mode !== Mode.PHYSICAL && other.mode !== Mode.COORDINATE) {
|
|
582
|
+
other.self = self;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
this.requestUpdate();
|
|
586
|
+
this.#notifyChange();
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
override performUpdate(): void {
|
|
590
|
+
this.#view({
|
|
591
|
+
area: this.#area,
|
|
592
|
+
onSelectStart: this.#startSelection.bind(this),
|
|
593
|
+
onSelect: this.#select.bind(this),
|
|
594
|
+
onSelectEnd: this.#finishSelection.bind(this),
|
|
595
|
+
onModeChange: this.#setAxisMode.bind(this),
|
|
596
|
+
onSelfChange: this.#setAxisSelf.bind(this),
|
|
597
|
+
},
|
|
598
|
+
undefined, this.contentElement);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
display: inline-grid;
|
|
9
9
|
inline-size: 15px;
|
|
10
10
|
grid: [stack] 1fr / [stack] 1fr;
|
|
11
|
-
margin-left:
|
|
12
|
-
margin-right:
|
|
13
|
-
vertical-align: -
|
|
11
|
+
margin-left: var(--sys-size-1);
|
|
12
|
+
margin-right: var(--sys-size-1);
|
|
13
|
+
vertical-align: calc(-1 * var(--sys-size-1));
|
|
14
14
|
color: var(--color); /* stylelint-disable-line plugin/use_theme_colors */
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
aspect-ratio: 1 / 1;
|
|
19
19
|
display: inline-block;
|
|
20
20
|
width: 10px;
|
|
21
|
-
border-radius:
|
|
21
|
+
border-radius: var(--sys-shape-corner-full);
|
|
22
22
|
/* stylelint-disable-next-line plugin/use_theme_colors */
|
|
23
23
|
background: linear-gradient(var(--color), var(--color)),
|
|
24
24
|
var(--image-file-checker);
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
.swatch {
|
|
8
8
|
position: relative;
|
|
9
9
|
display: inline-block;
|
|
10
|
-
margin-bottom: -
|
|
10
|
+
margin-bottom: calc(-1 * var(--sys-size-2));
|
|
11
11
|
width: 1em;
|
|
12
12
|
height: 1em;
|
|
13
|
-
border:
|
|
13
|
+
border: var(--sys-size-1) solid var(--sys-color-neutral-outline);
|
|
14
14
|
border-radius: 50%;
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
cursor: pointer;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
margin: auto;
|
|
23
23
|
inset: 0;
|
|
24
24
|
height: 55%;
|
|
25
|
-
width:
|
|
25
|
+
width: var(--sys-size-2);
|
|
26
26
|
background-color: var(--sys-color-tonal-container);
|
|
27
27
|
border-radius: 5px;
|
|
28
28
|
}
|
|
@@ -14,6 +14,7 @@ import * as CSSLinearEasingModel from './CSSLinearEasingModel.js';
|
|
|
14
14
|
import * as CSSShadowEditor from './CSSShadowEditor.js';
|
|
15
15
|
import * as InlineEditorUtils from './InlineEditorUtils.js';
|
|
16
16
|
import * as LinkSwatch from './LinkSwatch.js';
|
|
17
|
+
import * as PositionAreaEditor from './PositionAreaEditor.js';
|
|
17
18
|
import * as Swatches from './Swatches.js';
|
|
18
19
|
import * as SwatchPopoverHelper from './SwatchPopoverHelper.js';
|
|
19
20
|
|
|
@@ -30,6 +31,7 @@ export {
|
|
|
30
31
|
CSSShadowEditor,
|
|
31
32
|
InlineEditorUtils,
|
|
32
33
|
LinkSwatch,
|
|
34
|
+
PositionAreaEditor,
|
|
33
35
|
Swatches,
|
|
34
36
|
SwatchPopoverHelper,
|
|
35
37
|
};
|