blob: 374cb8394267add9146017b5a7432784fd017248 [file]
// Copyright 2026 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import type * as SDK from '../../core/sdk/sdk.js';
import type * as TextUtils from '../../core/text_utils/text_utils.js';
import type * as ChangeTracker from '../../models/change_tracker/change_tracker.js';
import type * as ComputedStyle from '../../models/computed_style/computed_style.js';
import type * as InlineEditor from '../../ui/legacy/components/inline_editor/inline_editor.js';
import type * as Components from '../../ui/legacy/components/utils/utils.js';
import type * as ElementsComponents from './components/components.js';
import type {StylePropertiesSection} from './StylePropertiesSection.js';
import type {StylePropertyData} from './StylePropertyTreeElement.js';
import type {WebCustomData} from './WebCustomData.js';
export interface StylesContainer {
activeCSSAngle: InlineEditor.CSSAngle.CSSAngle|null;
readonly webCustomData: WebCustomData|undefined;
isEditingStyle: boolean;
readonly sectionByElement: WeakMap<Node, StylePropertiesSection>;
readonly element: HTMLElement;
readonly linkifier: Components.Linkifier.Linkifier;
readonly changeTracker?: ChangeTracker.ChangeTracker.ChangeTracker;
swatchPopoverHelper(): InlineEditor.SwatchPopoverHelper.SwatchPopoverHelper;
node(): SDK.DOMModel.DOMNode|null;
cssModel(): SDK.CSSModel.CSSModel|null;
computedStyleModel(): ComputedStyle.ComputedStyleModel.ComputedStyleModel;
refreshUpdate(editedSection: StylePropertiesSection, editedProperty?: StylePropertyData, force?: boolean): void;
filterRegex(): RegExp|null;
setEditingStyle(editing: boolean): void;
setUserOperation(userOperation: boolean): void;
suppressResets(): void;
forceUpdate(): void;
hideAllPopovers(): void;
getRegisteredPropertyDetails(matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles, variableName: string):
ElementsComponents.CSSVariableValueView.RegisteredPropertyDetails|undefined;
getVariableParserError(matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
variableName: string): ElementsComponents.CSSVariableValueView.RegisteredPropertyDetails|null;
jumpToFunctionDefinition(functionName: string, treeScopeDistance: number): void;
continueEditingElement(sectionIndex: number, propertyIndex: number): void;
revealProperty(cssProperty: SDK.CSSProperty.CSSProperty): void;
resetFocus(): void;
removeSection(section: StylePropertiesSection): void;
focusedSectionIndex(): number;
allSections(): StylePropertiesSection[];
addBlankSection(
insertAfterSection: StylePropertiesSection, styleSheetHeader: SDK.CSSStyleSheetHeader.CSSStyleSheetHeader,
ruleLocation: TextUtils.TextRange.TextRange): void;
jumpToProperty(propertyName: string, sectionName?: string, blockName?: string): boolean;
jumpToSectionBlock(section: string): void;
jumpToFontPaletteDefinition(paletteName: string): void;
jumpToCounterStyleDefinition(counterStyleName: string): void;
jumpToDeclaration(valueSource: SDK.CSSMatchedStyles.CSSValueSource): void;
setActiveProperty(propertyData: StylePropertyData|null): void;
addStyleUpdateListener(listener: () => void): void;
removeStyleUpdateListener(listener: () => void): void;
trackForLazyRendering(element: Element, callback: () => void): void;
untrackForLazyRendering(element: Element): void;
shouldRenderLazily(): boolean;
}