glass-easel-devtools-agent 0.9.0 → 0.10.2

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/dist/backend.d.ts CHANGED
@@ -13,9 +13,58 @@ export declare const getBoxModel: (ctx: glassEasel.GeneralBackendContext, elem:
13
13
  padding: BoundingClientRect;
14
14
  content: BoundingClientRect;
15
15
  }>;
16
- export declare const getMatchedRules: (ctx: glassEasel.GeneralBackendContext, elem: glassEasel.GeneralBackendElement) => Promise<{
16
+ export declare const getMatchedRules: (element: glassEasel.Element) => Promise<{
17
17
  inline: glassEasel.CSSProperty[];
18
18
  inlineText?: string;
19
19
  rules: glassEasel.CSSRule[];
20
20
  crossOriginFailing?: boolean;
21
21
  }>;
22
+ export declare class StyleRuleEdit {
23
+ private props;
24
+ constructor(props: glassEasel.CSSProperty[]);
25
+ static fromMaybeInlineStyle(props: glassEasel.CSSProperty[], inlineStyle?: string): StyleRuleEdit;
26
+ updateWithProps(props: glassEasel.CSSProperty[], inlineStyle?: string): void;
27
+ getProps(): {
28
+ name: string;
29
+ value: string;
30
+ disabled: boolean;
31
+ important?: boolean;
32
+ }[];
33
+ clear(): void;
34
+ countProps(): number;
35
+ append(inlineStyle: string): void;
36
+ setDisabled(index: number, disabled: boolean): boolean;
37
+ remove(index: number): boolean;
38
+ replace(index: number, inlineStyle: string): boolean;
39
+ stringify(): string;
40
+ }
41
+ declare class StyleEditContext {
42
+ inlineStyleMap: WeakMap<glassEasel.GeneralBackendElement, StyleRuleEdit>;
43
+ ruleMap: WeakMap<glassEasel.GeneralBackendContext, Record<string, StyleRuleEdit>>;
44
+ createOrGetInline(elem: glassEasel.GeneralBackendElement, properties: glassEasel.CSSProperty[], inlineStyle?: string): StyleRuleEdit;
45
+ createOrGetRule(ctx: glassEasel.GeneralBackendContext, rule: glassEasel.CSSRule, inlineStyle?: string): StyleRuleEdit;
46
+ updateInline(ctx: glassEasel.GeneralBackendContext, elem: glassEasel.GeneralBackendElement, f: (edit: StyleRuleEdit) => void): void;
47
+ updateRule(ctx: glassEasel.GeneralBackendContext, sheetIndex: number, ruleIndex: number, f: (edit: StyleRuleEdit) => void): Promise<void>;
48
+ }
49
+ export declare const styleEditContext: StyleEditContext;
50
+ export declare class ClassListEdit {
51
+ private list;
52
+ update(names: string[]): this;
53
+ setDisabled(className: string, disabled: boolean): void;
54
+ getClasses(): {
55
+ className: string;
56
+ disabled: boolean;
57
+ }[];
58
+ setClasses(list: {
59
+ className: string;
60
+ disabled?: boolean;
61
+ }[]): void;
62
+ stringify(): string;
63
+ matches(v: string): boolean;
64
+ }
65
+ export declare class ClassEditContext {
66
+ map: WeakMap<glassEasel.Element, Record<string, ClassListEdit>>;
67
+ createOrGet(external: string, elem: glassEasel.Element): ClassListEdit;
68
+ }
69
+ export declare const classEditContext: ClassEditContext;
70
+ export {};