UNPKG

@silexlabs/grapesjs-advanced-selector

Version:

A GrapesJS plugin for managing advanced CSS selectors with a visual interface

60 lines 2.03 kB
export declare enum PseudoClassType { HOVER = "hover", ACTIVE = "active", FOCUS = "focus", FOCUS_WITHIN = "focus-within", FOCUS_VISIBLE = "focus-visible", VISITED = "visited", LINK = "link", ANY_LINK = "any-link",// Deprecated, but some usage FIRST_CHILD = "first-child", LAST_CHILD = "last-child", NTH_CHILD = "nth-child", NTH_LAST_CHILD = "nth-last-child", ONLY_CHILD = "only-child", FIRST_OF_TYPE = "first-of-type", LAST_OF_TYPE = "last-of-type", NTH_OF_TYPE = "nth-of-type", NTH_LAST_OF_TYPE = "nth-last-of-type", ONLY_OF_TYPE = "only-of-type", EMPTY = "empty", ROOT = "root", SCOPE = "scope", TARGET = "target", BEFORE = "before", AFTER = "after", FIRST_LINE = "first-line", FIRST_LETTER = "first-letter", ENABLED = "enabled", DISABLED = "disabled", CHECKED = "checked", INDETERMINATE = "indeterminate", DEFAULT = "default", VALID = "valid", INVALID = "invalid", IN_RANGE = "in-range", OUT_OF_RANGE = "out-of-range", REQUIRED = "required", OPTIONAL = "optional", READ_ONLY = "read-only", READ_WRITE = "read-write", LANG = "lang", DIR = "dir" } export interface PseudoClass { type: PseudoClassType; hasParam: boolean; param?: string | null; sentencePre: string; sentencePost?: string; helpLink?: string; displayName?: string; } export declare const PSEUDO_CLASSES: PseudoClass[]; export declare function toString(pseudoClass: PseudoClass): string; /** * @example fromString(':hover') // { type: 'hover', hasParam: false, sentencePre: 'On mouse', helpLink: 'https://developer.mozilla.org/en-US/docs/Web/CSS/:hover' } * @example fromString(':nth-child(2n+1) // { type: 'nth-child', hasParam: true, param: '2n+1', sentencePre: 'When it is the', helpLink: 'https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child' } */ export declare function fromString(pseudoClassStr: string): PseudoClass; //# sourceMappingURL=PseudoClass.d.ts.map