Skip to content

pantoken / renderers/tinymce/src / CssDocEntry

接口: CssDocEntry

一个有文档的 CSS 记录:它的基础类以及从该 CSS + 文档注释派生的所有内容。

属性

name

name: string

来自 @component/@utility/@rule/@declaration/@name 的记录名称,例如 button


kind

kind: CssRecordKind

该文档记录的是哪种类型的 CSS 表面(默认值为 component)。


className

className: string

基础 CSS 选择器 — 一个类(.button)、属性([data-layout="x"])、ID(#foo) 或影子 DOM 伪元素(:host)——从第一个裸类规则推断,或通过 @selector 明确设置。始终非空(当推断失败时回退到 .${name})。


summary?

optional summary?: string

来自 @summary 的单行摘要。


remarks?

optional remarks?: string

来自 @remarks 的扩展正文说明。


privateRemarks?

optional privateRemarks?: string

仅供内部使用的正文,来自 @privateRemarks(发射器可能选择在公开输出中省略)。


releaseStage?

optional releaseStage?: CssReleaseStage

来自修饰符标记(@alpha/@beta/@experimental/@internal/@public)的发布阶段。


since?

optional since?: string

引入的版本,来自 @since


group?

optional group?: string

文档分组/类别,来自 @group/@category


accessibility?

optional accessibility?: string

无障碍(Accessibility)指南,来自 @a11y/@accessibility


global?

optional global?: boolean

当此记录带有 @global 标记时设置 — 其修饰符(以及每个修饰符的 @global 标志) 适用于任何组件/布局/规则/声明,而不仅限于此记录的基础类。在验证和使用检查期间用于全局解析修饰符匹配。


modifiers

modifiers: CssModifier[]

从 AST 提取的修饰符,并在编写时以 @modifier 正文注释。


parts

parts: CssPart[]

从 AST 提取的子元素部分(基于类),并在编写时以 @part 正文注释。


shadowParts

shadowParts: CssPart[]

影子 DOM 暴露的 parts(::part(name)),来自 @csspart::part() 选择器。


pseudoElements

pseudoElements: CssPseudoElement[]

组件样式的原生伪元素(::before, ::marker, …),来自 @pseudo 或选择器。


states

states: CssState[]

组件响应的状态,来自 @cssstate, :state()、伪类或状态类。


slots

slots: CssSlot[]

组件外壳暴露的命名插槽,来自 @slot


elements?

optional elements?: CssElementConstraints

来自 @element 的允许 HTML 元素(默认 + 可选命名配置)。


todos

todos: string[]

内部待办备注,来自 @todo 标记和 /* @todo … */ 内联注释。开发笔记,非公共 API — 发射器可将其省略(如 CssDocEntry.privateRemarks)。


cssPropertiesConsumed

cssPropertiesConsumed: CssTokenConsumed[]

此组件使用的设计 token:规则中通过 var(...) 引用的每个 --* 自定义属性,均在编写时以 @tokens 正文注释(并包括任何由 @tokens 声明但未通过 var() 字面找到的 token)。


cssPropertiesDeclared

cssPropertiesDeclared: CssPropertyDeclared[]

此组件声明(@property)或记录(@cssproperty)的自定义属性。


functions

functions: CssFunction[]

此组件定义的 CSS 自定义函数(@function)。


animations

animations: CssAnimation[]

此组件公开的动画(@keyframes)。


layers

layers: CssLayer[]

此组件参与的级联层(@layer)。


conditions

conditions: CssCondition[]

规则所处的条件支持块(@container/@supports/@media)。


examples

examples: string[]

@example 块,逐字原样。


structure?

optional structure?: StructureNode[]

已编写的 @structure 元素树(顶级节点),若存在。当 @structure 主体 使用 @variant 块(见 structureVariants)时,此处仅包含第一个变体的节点, 以兼容尚未更新以读取 structureVariants 的代码。


structureVariants?

optional structureVariants?: StructureVariant[]

此组件的替代 DOM 结构,当已编写的 @structure 主体包含一个或多个顶级 @variant 块时 — 对于单一非变体结构的常见情况则不存在。


structureDescription?

optional structureDescription?: string

可选的引导性正文描述,置于 @structure 主体之前(若已编写)。


demo?

optional demo?: string

@demo <spec> (e.g. self:button), when authored.


deprecated?

optional deprecated?: string

组件级弃用替代文本(若已编写)(作为 @deprecated 标记的参数)。


see

see: string[]

@see <ref> cross-references.


usage?

optional usage?: string

来自 @usage 的使用说明正文 — 如何包含样式表 / 使用组件。


annotations

annotations: CssAnnotation[]

来自 @annotations 的本地注释图例行,按作者顺序。


refs

refs: number[]

来自 @ref 的本地注释引用,按作者顺序。


decorators

decorators: CssDecorator[]

记录级对象模型装饰器。


compat

compat: string[]

来自 @compat 的浏览器支持 / 功能兼容性说明。


related: CssRelated[]

来自 @related 的相关组件。


memberOf?

optional memberOf?: CssMemberOf

来自 @memberOf 的声明性族成员关系 — 此记录是另一个命名记录的成员, 可选地为 private(只能出现在该父项内部)。未编写时为空。


members?

optional members?: string[]

来自 @members 的成员记录名称 — 反向方向,在父项上声明。


memberDeclarations?

optional memberDeclarations?: CssMemberDeclaration[]

由重复的 @member 标记产生的结构化父侧成员声明。


source?

optional source?: CssSource

记录的创作位置(如有位置信息可用于源码链接)。


customBlocks?

optional customBlocks?: Record<string, string[]>

已注册自定义(块)标签的内容,按标签名称(不含其 @)为键。仅为通过配置添加的 tags 填充;未注册的未知标签将被忽略。未找到时不存在。