@eigenpal/docx-editor-core/utils/listState
Pure list-state helpers used by both adapter toolbars to track whether the selection is in a bullet/numbered list and at what indent level. Lifted from packages/react/src/components/ui/ ListButtons.tsx so the React + Vue toolbars share identical state-mutation logic.
Functions (9)
createBulletListStatefunctionSource ↗
declare function createBulletListState(level?: number, numId?: number): ListState;createDefaultListStatefunctionSource ↗
declare function createDefaultListState(): ListState;createNumberedListStatefunctionSource ↗
declare function createNumberedListState(level?: number, numId?: number): ListState;getNextIndentLevelfunctionSource ↗
declare function getNextIndentLevel(currentLevel: number): number;getPreviousIndentLevelfunctionSource ↗
declare function getPreviousIndentLevel(currentLevel: number): number;isAnyListStatefunctionSource ↗
declare function isAnyListState(state: ListState | undefined): boolean;isBulletListStatefunctionSource ↗
declare function isBulletListState(state: ListState | undefined): boolean;isNumberedListStatefunctionSource ↗
declare function isNumberedListState(state: ListState | undefined): boolean;toggleListTypefunctionSource ↗
declare function toggleListType(state: ListState | undefined, targetType: ListType): ListState;Interfaces (1)
ListStateinterfaceSource ↗
interface ListState| Member | Type | Summary |
|---|---|---|
| isInList | boolean | |
| level | number | |
| numId? | number | |
| type | ListType |
Type aliases (1)
ListTypetypeSource ↗
Pure list-state helpers used by both adapter toolbars to track whether the selection is in a bullet/numbered list and at what indent level. Lifted from packages/react/src/components/ui/ ListButtons.tsx so the React + Vue toolbars share identical state-mutation logic.
type ListType = 'bullet' | 'numbered' | 'none';