@cloudvoyant/helical-ui 0.20.1 → 0.21.0
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/index.cjs +4652 -47
- package/dist/index.d.cts +376 -3
- package/dist/index.d.ts +376 -3
- package/dist/index.js +4578 -26
- package/package.json +6 -1
- package/src/components.css +40 -0
- package/src/theme.css +3 -0
package/dist/index.d.cts
CHANGED
|
@@ -11,6 +11,8 @@ import * as _tiptap_extension_heading from '@tiptap/extension-heading';
|
|
|
11
11
|
import * as _tiptap_extension_code_block_lowlight from '@tiptap/extension-code-block-lowlight';
|
|
12
12
|
import { createLowlight } from 'lowlight';
|
|
13
13
|
import * as _tiptap_extension_mention from '@tiptap/extension-mention';
|
|
14
|
+
import { Slice } from '@tiptap/pm/model';
|
|
15
|
+
import { PluginKey } from '@tiptap/pm/state';
|
|
14
16
|
|
|
15
17
|
declare const buttonVariants: (props?: ({
|
|
16
18
|
variant?: "solid" | "outline" | "text" | null | undefined;
|
|
@@ -60,6 +62,274 @@ declare const dialogFooterStickyBase = "sticky bottom-0 z-10 bg-background";
|
|
|
60
62
|
declare const dialogFullscreenContentBase = "h-dvh w-full max-w-none rounded-none border-0 p-0 sm:rounded-none";
|
|
61
63
|
declare const dialogCloseTriggerBase = "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-[3px] focus:ring-ring/30 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0";
|
|
62
64
|
|
|
65
|
+
type KeybindingPreset = 'helix' | 'vim' | 'kakoune';
|
|
66
|
+
type KeymapMode = 'normal' | 'select' | 'insert' | 'jump';
|
|
67
|
+
type WhichKeyVariant = 'helix' | 'modern' | 'classic';
|
|
68
|
+
type JumpAction = 'focus' | 'activate';
|
|
69
|
+
type PaneDirection = 'left' | 'down' | 'up' | 'right';
|
|
70
|
+
interface KeymapCommandContext {
|
|
71
|
+
count: number;
|
|
72
|
+
mode: KeymapMode;
|
|
73
|
+
preset: KeybindingPreset;
|
|
74
|
+
activePaneId: string | null;
|
|
75
|
+
event?: KeyboardEvent;
|
|
76
|
+
}
|
|
77
|
+
type KeymapHandler = (ctx: KeymapCommandContext) => void | boolean;
|
|
78
|
+
interface WhichKeyNode {
|
|
79
|
+
key: string;
|
|
80
|
+
label: string;
|
|
81
|
+
description?: string;
|
|
82
|
+
category?: string;
|
|
83
|
+
group?: string;
|
|
84
|
+
icon?: string;
|
|
85
|
+
mode?: KeymapMode | KeymapMode[];
|
|
86
|
+
sticky?: boolean;
|
|
87
|
+
loop?: boolean;
|
|
88
|
+
proxy?: string[];
|
|
89
|
+
commandId?: string;
|
|
90
|
+
action?: KeymapHandler;
|
|
91
|
+
children?: Record<string, WhichKeyNode>;
|
|
92
|
+
expand?: () => Record<string, WhichKeyNode>;
|
|
93
|
+
hidden?: boolean;
|
|
94
|
+
}
|
|
95
|
+
interface KeymapExplorerEntry {
|
|
96
|
+
id: string;
|
|
97
|
+
chords: string[];
|
|
98
|
+
sequenceText: string;
|
|
99
|
+
label: string;
|
|
100
|
+
description?: string;
|
|
101
|
+
group: string;
|
|
102
|
+
category: string;
|
|
103
|
+
mode: KeymapMode[];
|
|
104
|
+
commandId?: string;
|
|
105
|
+
action?: KeymapHandler;
|
|
106
|
+
}
|
|
107
|
+
interface PaneRect {
|
|
108
|
+
id: string;
|
|
109
|
+
x: number;
|
|
110
|
+
y: number;
|
|
111
|
+
width: number;
|
|
112
|
+
height: number;
|
|
113
|
+
disabled?: boolean;
|
|
114
|
+
order?: number;
|
|
115
|
+
}
|
|
116
|
+
interface JumplistEntry {
|
|
117
|
+
paneId: string;
|
|
118
|
+
elementSelector?: string;
|
|
119
|
+
element?: HTMLElement | null;
|
|
120
|
+
scrollTop?: number;
|
|
121
|
+
timestamp: number;
|
|
122
|
+
}
|
|
123
|
+
interface WhichKeyTreeResult {
|
|
124
|
+
node: WhichKeyNode | null;
|
|
125
|
+
items: WhichKeyNode[];
|
|
126
|
+
title: string;
|
|
127
|
+
breadcrumb: string[];
|
|
128
|
+
sticky: boolean;
|
|
129
|
+
}
|
|
130
|
+
declare const DEFAULT_JUMP_ALPHABET = "asdfghjklqwertyuiopzxcvbnm";
|
|
131
|
+
declare function nodeMatchesMode(node: WhichKeyNode, mode?: KeymapMode): boolean;
|
|
132
|
+
declare function normalizeNodeModes(node: WhichKeyNode): KeymapMode[];
|
|
133
|
+
declare function getNodeChildren(node: WhichKeyNode, rootTrie: Record<string, WhichKeyNode>, visitedProxies?: Set<string>): Record<string, WhichKeyNode>;
|
|
134
|
+
declare function resolveNode(rootTrie: Record<string, WhichKeyNode>, path: string[], mode?: KeymapMode): WhichKeyNode | null;
|
|
135
|
+
declare function isGroupNode(node: WhichKeyNode, rootTrie: Record<string, WhichKeyNode>): boolean;
|
|
136
|
+
declare function buildWhichKeyTree(rootTrie: Record<string, WhichKeyNode>, activePath: string[], mode?: KeymapMode): WhichKeyTreeResult;
|
|
137
|
+
declare function flattenKeymapEntries(rootTrie: Record<string, WhichKeyNode>, mode?: KeymapMode): KeymapExplorerEntry[];
|
|
138
|
+
declare function findDirectionalPane(origin: PaneRect, candidates: PaneRect[], direction: PaneDirection): PaneRect | null;
|
|
139
|
+
declare function generateJumpLabels(count: number, alphabet?: string): string[];
|
|
140
|
+
declare class Jumplist {
|
|
141
|
+
private stack;
|
|
142
|
+
private index;
|
|
143
|
+
private readonly maxSize;
|
|
144
|
+
constructor(maxSize?: number);
|
|
145
|
+
push(entry: Omit<JumplistEntry, 'timestamp'> & {
|
|
146
|
+
timestamp?: number;
|
|
147
|
+
}): void;
|
|
148
|
+
back(current?: Omit<JumplistEntry, 'timestamp'>): JumplistEntry | null;
|
|
149
|
+
forward(): JumplistEntry | null;
|
|
150
|
+
entries(): readonly JumplistEntry[];
|
|
151
|
+
currentIndex(): number;
|
|
152
|
+
clear(): void;
|
|
153
|
+
}
|
|
154
|
+
declare function createJumplist(maxSize?: number): Jumplist;
|
|
155
|
+
|
|
156
|
+
type ModalMotion = 'left' | 'down' | 'up' | 'right' | 'wordForward' | 'wordBackward' | 'wordEnd' | 'paragraphForward' | 'paragraphBackward' | 'lineSelect' | 'lineStart' | 'lineEnd' | 'docStart' | 'docEnd';
|
|
157
|
+
type ModalTextObjectSpec = 'iw' | 'aw' | 'ip' | 'ap' | 'ic' | 'ac' | 'in' | 'an' | 'il' | 'al';
|
|
158
|
+
type ModalSelectionTransform = 'collapse' | 'flip' | 'addCursorBelow' | 'addCursorAbove' | 'keepPrimary';
|
|
159
|
+
type ModalOperator = 'delete' | 'change' | 'yank' | 'pasteAfter' | 'pasteBefore' | 'undo' | 'redo' | 'insertStart' | 'appendEnd' | 'openBelow' | 'openAbove';
|
|
160
|
+
/**
|
|
161
|
+
* Inverted seam implemented by `ModalKeymap` in `libs/helical-ui/src/editor/extensions/modal-keymap.ts`
|
|
162
|
+
* (and by any future standalone editor package) without coupling `which-key` to `@tiptap/*`.
|
|
163
|
+
*/
|
|
164
|
+
interface ModalEditorTarget {
|
|
165
|
+
move(motion: ModalMotion, options: {
|
|
166
|
+
preset: KeybindingPreset;
|
|
167
|
+
mode: KeymapMode;
|
|
168
|
+
count: number;
|
|
169
|
+
}): boolean;
|
|
170
|
+
selectTextObject(spec: ModalTextObjectSpec, options: {
|
|
171
|
+
preset: KeybindingPreset;
|
|
172
|
+
mode: KeymapMode;
|
|
173
|
+
}): boolean;
|
|
174
|
+
transformSelection(action: ModalSelectionTransform): boolean;
|
|
175
|
+
execOperator(op: ModalOperator, options: {
|
|
176
|
+
preset: KeybindingPreset;
|
|
177
|
+
mode: KeymapMode;
|
|
178
|
+
count: number;
|
|
179
|
+
}): {
|
|
180
|
+
enterInsert?: boolean;
|
|
181
|
+
yankedText?: string;
|
|
182
|
+
} | boolean;
|
|
183
|
+
setModalState(state: {
|
|
184
|
+
mode: KeymapMode;
|
|
185
|
+
preset: KeybindingPreset;
|
|
186
|
+
}): void;
|
|
187
|
+
hasActiveSuggestion?(): boolean;
|
|
188
|
+
}
|
|
189
|
+
declare function registerModalEditor(element: HTMLElement, target: ModalEditorTarget): () => void;
|
|
190
|
+
declare function getModalEditor(element: Element | null | undefined): ModalEditorTarget | undefined;
|
|
191
|
+
declare function notifyAllModalEditors(state: {
|
|
192
|
+
mode: KeymapMode;
|
|
193
|
+
preset: KeybindingPreset;
|
|
194
|
+
}): void;
|
|
195
|
+
interface PaneRegistration {
|
|
196
|
+
id: string;
|
|
197
|
+
title: string;
|
|
198
|
+
element: HTMLElement | null;
|
|
199
|
+
disabled?: boolean;
|
|
200
|
+
order?: number;
|
|
201
|
+
lastFocusedElement?: HTMLElement | null;
|
|
202
|
+
}
|
|
203
|
+
interface JumpTarget {
|
|
204
|
+
id: string;
|
|
205
|
+
label: string;
|
|
206
|
+
element: HTMLElement;
|
|
207
|
+
rect: {
|
|
208
|
+
top: number;
|
|
209
|
+
left: number;
|
|
210
|
+
width: number;
|
|
211
|
+
height: number;
|
|
212
|
+
};
|
|
213
|
+
matchedPrefix: string;
|
|
214
|
+
remainingLabel: string;
|
|
215
|
+
}
|
|
216
|
+
interface WhichKeyState {
|
|
217
|
+
preset: KeybindingPreset;
|
|
218
|
+
mode: KeymapMode;
|
|
219
|
+
leaderKey: string;
|
|
220
|
+
activePath: string[];
|
|
221
|
+
breadcrumb: string[];
|
|
222
|
+
title: string;
|
|
223
|
+
items: WhichKeyNode[];
|
|
224
|
+
isOpen: boolean;
|
|
225
|
+
sticky: boolean;
|
|
226
|
+
countBuffer: string;
|
|
227
|
+
explorerOpen: boolean;
|
|
228
|
+
explorerQuery: string;
|
|
229
|
+
explorerEntries: KeymapExplorerEntry[];
|
|
230
|
+
activePaneId: string | null;
|
|
231
|
+
panes: PaneRegistration[];
|
|
232
|
+
jumpQuery: string;
|
|
233
|
+
jumpAction: JumpAction;
|
|
234
|
+
jumpTargets: JumpTarget[];
|
|
235
|
+
statusMessage: string;
|
|
236
|
+
}
|
|
237
|
+
interface WhichKeyControllerOptions {
|
|
238
|
+
preset?: KeybindingPreset;
|
|
239
|
+
defaultMode?: KeymapMode;
|
|
240
|
+
leaderKey?: string;
|
|
241
|
+
jumpAction?: JumpAction;
|
|
242
|
+
jumpAlphabet?: string;
|
|
243
|
+
storageKey?: string;
|
|
244
|
+
keymap?: Record<string, WhichKeyNode>;
|
|
245
|
+
commands?: Record<string, KeymapHandler>;
|
|
246
|
+
enabled?: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Automatically disable WhichKey on mobile / touch-only viewports (`(pointer: coarse)` or `< 768px`).
|
|
249
|
+
* @default true
|
|
250
|
+
*/
|
|
251
|
+
disableOnMobile?: boolean;
|
|
252
|
+
getDocument?: () => Document;
|
|
253
|
+
getScopeElement?: () => HTMLElement | null;
|
|
254
|
+
onPresetChange?: (preset: KeybindingPreset) => void;
|
|
255
|
+
onModeChange?: (mode: KeymapMode) => void;
|
|
256
|
+
onJumpActionChange?: (action: JumpAction) => void;
|
|
257
|
+
onCommand?: (commandId: string, ctx: KeymapCommandContext) => void;
|
|
258
|
+
onYank?: (text: string, ctx: KeymapCommandContext) => void;
|
|
259
|
+
}
|
|
260
|
+
interface WhichKeyController {
|
|
261
|
+
getState(): WhichKeyState;
|
|
262
|
+
subscribe(listener: (state: WhichKeyState) => void): () => void;
|
|
263
|
+
attach(target?: Document | HTMLElement): () => void;
|
|
264
|
+
destroy(): void;
|
|
265
|
+
handleKeyDown(event: KeyboardEvent): boolean;
|
|
266
|
+
setPreset(preset: KeybindingPreset): void;
|
|
267
|
+
setMode(mode: KeymapMode): void;
|
|
268
|
+
setJumpAction(action: JumpAction): void;
|
|
269
|
+
openPrefix(path: string[], options?: {
|
|
270
|
+
sticky?: boolean;
|
|
271
|
+
}): void;
|
|
272
|
+
closePrefix(): void;
|
|
273
|
+
stepBackPrefix(): boolean;
|
|
274
|
+
triggerKey(key: string): boolean;
|
|
275
|
+
openExplorer(): void;
|
|
276
|
+
closeExplorer(): void;
|
|
277
|
+
setExplorerQuery(query: string): void;
|
|
278
|
+
executeExplorerEntry(entry: KeymapExplorerEntry | string): boolean;
|
|
279
|
+
registerKeymap(id: string, nodes: Record<string, WhichKeyNode>, options?: {
|
|
280
|
+
scope?: string;
|
|
281
|
+
enabled?: boolean;
|
|
282
|
+
}): () => void;
|
|
283
|
+
registerCommand(commandId: string, handler: KeymapHandler): () => void;
|
|
284
|
+
executeCommand(commandId: string, partialCtx?: Partial<KeymapCommandContext>): boolean;
|
|
285
|
+
registerPane(pane: {
|
|
286
|
+
id: string;
|
|
287
|
+
title: string;
|
|
288
|
+
element: HTMLElement | null;
|
|
289
|
+
disabled?: boolean;
|
|
290
|
+
order?: number;
|
|
291
|
+
}): () => void;
|
|
292
|
+
focusPane(paneIdOrIndex: string | number): boolean;
|
|
293
|
+
focusPaneDirection(direction: PaneDirection): boolean;
|
|
294
|
+
cyclePane(reverse?: boolean): boolean;
|
|
295
|
+
stepFocusInPane(delta: number): boolean;
|
|
296
|
+
jumpToBoundary(boundary: 'start' | 'end' | 'first-in-group' | 'last-in-group'): boolean;
|
|
297
|
+
scrollActivePane(action: 'center' | 'top' | 'bottom' | 'down' | 'up', count?: number): boolean;
|
|
298
|
+
startJumpMode(action?: JumpAction): void;
|
|
299
|
+
cancelJumpMode(): void;
|
|
300
|
+
jumpBack(): boolean;
|
|
301
|
+
jumpForward(): boolean;
|
|
302
|
+
trackBranchElement(nodeOrFn: HTMLElement | null | (() => HTMLElement | null)): () => void;
|
|
303
|
+
}
|
|
304
|
+
interface WhichKeyProps {
|
|
305
|
+
variant?: WhichKeyVariant;
|
|
306
|
+
showModeBadge?: boolean;
|
|
307
|
+
showExplorer?: boolean;
|
|
308
|
+
className?: string;
|
|
309
|
+
}
|
|
310
|
+
interface WhichKeyModeProps {
|
|
311
|
+
mode?: KeymapMode;
|
|
312
|
+
sticky?: boolean;
|
|
313
|
+
showPreset?: boolean;
|
|
314
|
+
size?: 'sm' | 'md' | 'lg';
|
|
315
|
+
className?: string;
|
|
316
|
+
}
|
|
317
|
+
interface WhichKeyExplorerProps {
|
|
318
|
+
open?: boolean;
|
|
319
|
+
onOpenChange?: (open: boolean) => void;
|
|
320
|
+
placeholder?: string;
|
|
321
|
+
className?: string;
|
|
322
|
+
}
|
|
323
|
+
interface PaneRegistrationProps {
|
|
324
|
+
paneId?: string;
|
|
325
|
+
paneTitle?: string;
|
|
326
|
+
paneDisabled?: boolean;
|
|
327
|
+
paneOrder?: number;
|
|
328
|
+
}
|
|
329
|
+
interface PaneProps extends PaneRegistrationProps {
|
|
330
|
+
className?: string;
|
|
331
|
+
}
|
|
332
|
+
|
|
63
333
|
declare const windowPositionerBase = "z-50 [--z-index:50]!";
|
|
64
334
|
declare const windowContentBase = "relative z-50 flex w-80 flex-col overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg";
|
|
65
335
|
declare const windowDragTriggerBase = "flex flex-col";
|
|
@@ -70,6 +340,7 @@ declare const windowStageTriggerBase = "inline-flex size-6 items-center justify-
|
|
|
70
340
|
declare const windowCloseTriggerBase = "inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus:outline-none focus:ring-[3px] focus:ring-ring/30 [&_svg]:size-3.5 [&_svg]:shrink-0";
|
|
71
341
|
declare const windowBodyBase = "flex flex-1 flex-col gap-4 overflow-auto p-4 text-sm";
|
|
72
342
|
declare const windowResizeTriggerBase = "absolute bottom-0 right-0 size-4 cursor-se-resize";
|
|
343
|
+
type WindowPaneRegistrationProps = PaneRegistrationProps;
|
|
73
344
|
|
|
74
345
|
declare const badgeVariants: (props?: ({
|
|
75
346
|
variant?: "solid" | "outline" | "subtle" | "surface" | "plain" | null | undefined;
|
|
@@ -144,7 +415,7 @@ declare const pageGutterVariants: (props?: ({
|
|
|
144
415
|
side?: "left" | "right" | null | undefined;
|
|
145
416
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
146
417
|
declare const pageGutterContentVariants: (props?: ({
|
|
147
|
-
align?: "start" | "
|
|
418
|
+
align?: "start" | "end" | "center" | null | undefined;
|
|
148
419
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
149
420
|
declare const pageContentBase = "min-w-0 [grid-area:content]";
|
|
150
421
|
declare const pageFooterBase = "w-full shrink-0 [grid-area:footer]";
|
|
@@ -152,6 +423,7 @@ declare const pageSectionBase: string;
|
|
|
152
423
|
type PageVariants = VariantProps<typeof pageVariants>;
|
|
153
424
|
type PageGutterVariants = VariantProps<typeof pageGutterVariants>;
|
|
154
425
|
type PageGutterContentVariants = VariantProps<typeof pageGutterContentVariants>;
|
|
426
|
+
type PagePaneRegistrationProps = PaneRegistrationProps;
|
|
155
427
|
|
|
156
428
|
/**
|
|
157
429
|
* Intentionally empty: Ark UI sets `display`/`flex-direction` on the root and
|
|
@@ -168,6 +440,7 @@ declare const splitterPanelBase = "";
|
|
|
168
440
|
declare const splitterResizeTriggerBase = "group relative grid place-items-center outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 data-[orientation=horizontal]:-mx-1 data-[orientation=horizontal]:min-w-2 data-[orientation=vertical]:-my-1 data-[orientation=vertical]:min-h-2";
|
|
169
441
|
declare const splitterResizeTriggerSeparatorBase = "absolute bg-border group-data-[orientation=horizontal]:inset-y-0 group-data-[orientation=horizontal]:right-1 group-data-[orientation=horizontal]:w-px group-data-[orientation=vertical]:inset-x-0 group-data-[orientation=vertical]:bottom-1 group-data-[orientation=vertical]:h-px";
|
|
170
442
|
declare const splitterResizeTriggerIndicatorBase = "relative z-10 rounded-full border border-border bg-muted shadow-xs data-[dragging]:bg-muted-foreground data-[focus]:bg-accent data-[disabled]:hidden data-[orientation=horizontal]:h-6 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-6";
|
|
443
|
+
type SplitterPanelPaneRegistrationProps = PaneRegistrationProps;
|
|
171
444
|
|
|
172
445
|
declare const SIDEBAR_WIDTH = "16rem";
|
|
173
446
|
declare const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
@@ -190,6 +463,7 @@ interface SidebarContextProps {
|
|
|
190
463
|
toggleSidebar: () => void;
|
|
191
464
|
isControlled: boolean;
|
|
192
465
|
}
|
|
466
|
+
type SidebarPaneRegistrationProps = PaneRegistrationProps;
|
|
193
467
|
declare const sidebarStyles: {
|
|
194
468
|
readonly wrapperClass: "group/sidebar-wrapper min-h-svh w-full has-data-[variant=inset]:bg-sidebar";
|
|
195
469
|
readonly containerClass: "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex";
|
|
@@ -262,7 +536,7 @@ declare const paginationEllipsisBase = "flex h-8 w-12 items-end justify-center t
|
|
|
262
536
|
type NavbarVariant = 'scroll' | 'sticky' | 'shrink' | 'hide';
|
|
263
537
|
type NavbarDensity = 'relaxed' | 'compact';
|
|
264
538
|
declare const navbarVariants: (props?: ({
|
|
265
|
-
variant?: "
|
|
539
|
+
variant?: "sticky" | "scroll" | "shrink" | "hide" | null | undefined;
|
|
266
540
|
floating?: boolean | null | undefined;
|
|
267
541
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
268
542
|
declare const navbarContainerBase = "flex items-center justify-between transition-[height,gap,padding] duration-300";
|
|
@@ -771,6 +1045,79 @@ declare const listboxItemIndicatorBase = "absolute inset-y-0 end-2 flex items-ce
|
|
|
771
1045
|
declare const listboxInputBase = "w-full border-b border-input bg-transparent px-2.5 py-1.5 text-sm outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30";
|
|
772
1046
|
declare const listboxEmptyBase = "px-2 py-6 text-center text-sm text-muted-foreground";
|
|
773
1047
|
declare const listboxLabelBase = "px-2 py-1.5 text-xs font-semibold text-muted-foreground";
|
|
1048
|
+
declare const listboxItemGroupBase = "flex flex-col py-1 first:pt-0 last:pb-0";
|
|
1049
|
+
declare const listboxItemGroupLabelBase = "px-2 py-1 text-[11px] font-semibold tracking-wider text-muted-foreground uppercase select-none";
|
|
1050
|
+
|
|
1051
|
+
declare const kbdVariants: (props?: ({
|
|
1052
|
+
variant?: "solid" | "outline" | "subtle" | null | undefined;
|
|
1053
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1054
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1055
|
+
declare const kbdGroupBase = "inline-flex items-center gap-1";
|
|
1056
|
+
type KbdVariants = VariantProps<typeof kbdVariants>;
|
|
1057
|
+
interface KbdProps {
|
|
1058
|
+
variant?: KbdVariants['variant'];
|
|
1059
|
+
size?: KbdVariants['size'];
|
|
1060
|
+
/**
|
|
1061
|
+
* Optional hotkey chord or sequence string (e.g. `'Mod+K'`, `'Control+w'`, `'Space'`).
|
|
1062
|
+
* When provided without children, `<Kbd>` formats the chord for the target platform.
|
|
1063
|
+
*/
|
|
1064
|
+
hotkey?: string | string[];
|
|
1065
|
+
platform?: 'mac' | 'windows' | 'linux';
|
|
1066
|
+
useSymbols?: boolean;
|
|
1067
|
+
className?: string;
|
|
1068
|
+
}
|
|
1069
|
+
declare function formatKeyChord(chord: string, options?: {
|
|
1070
|
+
platform?: 'mac' | 'windows' | 'linux';
|
|
1071
|
+
useSymbols?: boolean;
|
|
1072
|
+
}): string;
|
|
1073
|
+
declare function formatKeySequence(hotkey: string | string[], options?: {
|
|
1074
|
+
platform?: 'mac' | 'windows' | 'linux';
|
|
1075
|
+
useSymbols?: boolean;
|
|
1076
|
+
}): string[];
|
|
1077
|
+
|
|
1078
|
+
declare function createHelixPreset(leaderKey?: string): Record<string, WhichKeyNode>;
|
|
1079
|
+
declare function createVimPreset(leaderKey?: string): Record<string, WhichKeyNode>;
|
|
1080
|
+
declare function createKakounePreset(leaderKey?: string): Record<string, WhichKeyNode>;
|
|
1081
|
+
declare function getPresetKeymap(preset: KeybindingPreset, leaderKey?: string): Record<string, WhichKeyNode>;
|
|
1082
|
+
|
|
1083
|
+
declare function eventToChordKeys(event: KeyboardEvent): string[];
|
|
1084
|
+
declare function getDocumentWhichKeyController(doc?: Document): WhichKeyController | null;
|
|
1085
|
+
declare function subscribeDocumentWhichKeyController(doc: Document | undefined, listener: () => void): () => void;
|
|
1086
|
+
declare function createWhichKeyController(options?: WhichKeyControllerOptions): WhichKeyController;
|
|
1087
|
+
|
|
1088
|
+
declare const whichKeyVariants: (props?: ({
|
|
1089
|
+
variant?: "helix" | "modern" | "classic" | null | undefined;
|
|
1090
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1091
|
+
type WhichKeyVariants = VariantProps<typeof whichKeyVariants>;
|
|
1092
|
+
declare const whichKeyHeaderBase = "flex items-center justify-between gap-2 px-3 pt-2.5 pb-1 text-xs font-medium";
|
|
1093
|
+
declare const whichKeyTitleBase = "flex items-center gap-1.5 font-semibold text-foreground";
|
|
1094
|
+
declare const whichKeyBreadcrumbBase = "flex items-center gap-1 text-[11px] text-muted-foreground";
|
|
1095
|
+
declare const whichKeyBodyVariants: (props?: ({
|
|
1096
|
+
variant?: "helix" | "modern" | "classic" | null | undefined;
|
|
1097
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1098
|
+
declare const whichKeyItemBase = "group flex w-full cursor-pointer items-center justify-between gap-3 rounded-md px-2 py-1 text-left text-xs transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground focus-visible:outline-none";
|
|
1099
|
+
declare const whichKeyItemLabelBase = "truncate text-foreground group-hover:text-accent-foreground data-[group=true]:font-medium data-[group=true]:text-primary";
|
|
1100
|
+
declare const whichKeyFooterBase = "flex items-center justify-between gap-2 px-3 pt-1 pb-2 text-[10px] text-muted-foreground";
|
|
1101
|
+
declare const whichKeyModeBadgeVariants: (props?: ({
|
|
1102
|
+
mode?: "normal" | "select" | "insert" | "jump" | null | undefined;
|
|
1103
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
1104
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1105
|
+
type WhichKeyModeBadgeVariants = VariantProps<typeof whichKeyModeBadgeVariants>;
|
|
1106
|
+
declare const whichKeyExplorerContentBase = "flex max-h-[min(34rem,85vh)] w-full max-w-xl flex-col gap-0 overflow-hidden bg-popover p-0 text-popover-foreground";
|
|
1107
|
+
declare const whichKeyExplorerHeaderBase = "flex flex-row items-center justify-between gap-2 px-4 pt-3.5 pb-2.5";
|
|
1108
|
+
declare const whichKeyExplorerListboxBase = "flex min-h-0 flex-1 flex-col rounded-none border-0 bg-transparent shadow-none";
|
|
1109
|
+
declare const whichKeyExplorerInputBase = "mx-4 mb-2 w-[calc(100%-2rem)] rounded-md border-0 border-b-2 border-transparent bg-muted/60 px-3 py-2 text-sm text-foreground outline-none transition-colors placeholder:text-muted-foreground focus:border-primary focus-visible:border-primary focus-visible:ring-0";
|
|
1110
|
+
declare const whichKeyExplorerListContentBase = "max-h-none flex-1 overflow-visible px-2.5 pt-1 pb-3 outline-none";
|
|
1111
|
+
declare const whichKeyExplorerItemBase = "flex w-full cursor-pointer items-center justify-between gap-3 rounded-md px-2.5 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground";
|
|
1112
|
+
declare const whichKeyExplorerHighlightMarkBase = "rounded-xs bg-primary/20 px-0.5 font-semibold text-foreground";
|
|
1113
|
+
declare const paneVariants: (props?: ({
|
|
1114
|
+
active?: boolean | null | undefined;
|
|
1115
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1116
|
+
declare const jumpOverlayRootBase = "pointer-events-none fixed inset-0 z-[60] overflow-hidden";
|
|
1117
|
+
declare const jumpBadgeVariants: (props?: ({
|
|
1118
|
+
action?: "focus" | "activate" | null | undefined;
|
|
1119
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1120
|
+
declare const jumpBadgeMatchedPrefixBase = "opacity-50 line-through";
|
|
774
1121
|
|
|
775
1122
|
interface EditorCounts {
|
|
776
1123
|
wordCount: number;
|
|
@@ -970,4 +1317,30 @@ declare module '@tiptap/core' {
|
|
|
970
1317
|
}
|
|
971
1318
|
declare const createNoticeNode: (nodeView?: NodeViewFactory) => Node<any, any>;
|
|
972
1319
|
|
|
973
|
-
|
|
1320
|
+
interface ModalKeymapOptions {
|
|
1321
|
+
enforceTitle?: boolean;
|
|
1322
|
+
}
|
|
1323
|
+
interface SecondaryCursorRange {
|
|
1324
|
+
from: number;
|
|
1325
|
+
to: number;
|
|
1326
|
+
head: number;
|
|
1327
|
+
}
|
|
1328
|
+
interface ModalKeymapPluginState {
|
|
1329
|
+
mode: KeymapMode;
|
|
1330
|
+
preset: KeybindingPreset;
|
|
1331
|
+
secondaryRanges: SecondaryCursorRange[];
|
|
1332
|
+
goalColumn: number | null;
|
|
1333
|
+
}
|
|
1334
|
+
interface ModalKeymapStorage {
|
|
1335
|
+
target: ModalEditorTarget | null;
|
|
1336
|
+
mode: KeymapMode;
|
|
1337
|
+
preset: KeybindingPreset;
|
|
1338
|
+
registerSlice: Slice | null;
|
|
1339
|
+
cleanupDomRegistration?: () => void;
|
|
1340
|
+
}
|
|
1341
|
+
declare const modalKeymapPluginKey: PluginKey<ModalKeymapPluginState>;
|
|
1342
|
+
declare function isEditorInInsertMode(editor: Editor): boolean;
|
|
1343
|
+
declare function getEditorModalTarget(editor: Editor): ModalEditorTarget | undefined;
|
|
1344
|
+
declare const ModalKeymap: Extension<ModalKeymapOptions, ModalKeymapStorage>;
|
|
1345
|
+
|
|
1346
|
+
export { type BadgeProps, type BadgeVariants, type BuildExtensionsOptions, type ButtonProps, type ButtonVariants, type CardCoverProps, type CardProps, type CardVariants, type ChartProps, type ChartSeries, type CheckboxProps, type CheckboxVariants, type CodeBlockProps, type ComboboxItemVariants, type ComboboxProps, DEFAULT_JUMP_ALPHABET, type EditorCounts, EditorHeading, type EditorNodeViews, type EditorSeams, ExitHeading, type FigureProps, type FileEntry, HeadingWithId, type ImageUploadResult, type InputProps, type InputVariants, type ItemProps, type ItemVariants, type JumpAction, type JumpTarget, Jumplist, type JumplistEntry, type KbdProps, type KbdVariants, type KeybindingPreset, type KeymapCommandContext, type KeymapExplorerEntry, type KeymapHandler, type KeymapMode, type LaTeXProps, type LanguageTab, type LinkPreviewAttributes, type LinkPreviewFetcher, type ListboxItemData, type ManimModule, type ManimProps, type ManimRecordingScene, type MentionItem, type MentionListElement, type MermaidProps, type ModalEditorTarget, ModalKeymap, type ModalKeymapOptions, type ModalKeymapPluginState, type ModalMotion, type ModalOperator, type ModalSelectionTransform, type ModalTextObjectSpec, type MultipleChoiceQuestionData, type NativeSelectVariants, type NavbarDensity, type NavbarMenuDensity, type NavbarMenuVariant, type NavbarVariant, type NodeViewFactory, type NoticeAttributes, type NoticeProps, type NoticeVariant, type NoticeVariants, type NumberInputProps, type NumericQuestionData, type OverlayPlacementOptions, type OverlayPosition, type PageGutterContentVariants, type PageGutterVariants, type PagePaneRegistrationProps, type PageVariants, type PaneDirection, type PaneProps, type PaneRect, type PaneRegistration, type PaneRegistrationProps, type PrevNextProps, type ProseProps, type ProseVariants, type Question, type RevealProps, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_WIDGET_DEFAULT_SNAP_POINT, SIDEBAR_WIDGET_SNAP_POINTS, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, type SecondaryCursorRange, type SelectItemData, type SelectProps, type SidebarContextProps, type SidebarMenuButtonVariants, type SidebarPaneRegistrationProps, type SingleChoiceQuestionData, type SlashCommandItem, type SplitterPanelPaneRegistrationProps, type SwitchProps, type SwitchVariants, THEMES, THEME_NAMES, type TabsIndicatorVariants, type TabsListVariants, type TagsInputProps, type TextareaProps, type ThemeMeta, TitleHeading, type ToggleButtonProps, type ToggleButtonVariants, type ToggleGroupProps, type ToggleGroupRootVariants, type UrlMentionAttributes, type WhichKeyController, type WhichKeyControllerOptions, type WhichKeyExplorerProps, type WhichKeyModeBadgeVariants, type WhichKeyModeProps, type WhichKeyNode, type WhichKeyProps, type WhichKeyState, type WhichKeyTreeResult, type WhichKeyVariant, type WhichKeyVariants, type WindowPaneRegistrationProps, type YouTubeChapter, type YouTubeProps, badgeVariants, buildChartDefinition, buildExtensions, buildWhichKeyTree, buttonVariants, cardBodyBase, cardCoverVariants, cardDescriptionBase, cardFooterBase, cardHeaderBase, cardTitleBase, cardVariants, centerBase, chartPlaceholderBase, chartPlaceholderLabelBase, chartRootBase, checkboxGroupBase, checkboxIndicatorBase, checkboxLabelBase, checkboxVariants, clipboardTriggerBase, cn, codeBlockBodyBase, codeBlockBodyScrollableBase, codeBlockContentBase, codeBlockCopyFloatBase, codeBlockHeaderBase, codeBlockHeaderInfoBase, codeBlockHighlightBase, codeBlockLineNumbersBase, codeBlockLoadingBase, codeBlockRootBase, codeBlockSpinnerBase, codeBlockTitleBase, colBase, comboboxClearTriggerBase, comboboxContentBase, comboboxControlBase, comboboxEmptyBase, comboboxInputBase, comboboxItemGroupLabelBase, comboboxItemIndicatorBase, comboboxItemVariants, comboboxListBase, comboboxPositionerBase, comboboxTriggerBase, containerBase, createCodeBlockCustom, createHelixPreset, createImageNode, createInternalMention, createJumplist, createKakounePreset, createLinkPreview, createNoticeNode, createUrlMention, createVimPreset, createWhichKeyController, defaultChartColor, defaultListboxFilter, dialogBackdropBase, dialogCloseTriggerBase, dialogContentBase, dialogDescriptionBase, dialogFooterBase, dialogFooterStickyBase, dialogFullscreenContentBase, dialogHeaderBase, dialogHeaderStickyBase, dialogPositionerBase, dialogTitleBase, eventToChordKeys, extractYouTubeId, feedbackCorrectBase, feedbackExplanationBase, feedbackIncorrectBase, fetchYouTubeMetadata, fieldErrorBase, fieldHelperBase, fieldLabelBase, fieldRequiredIndicatorBase, fieldRootBase, fieldsetErrorBase, fieldsetHelperBase, fieldsetLegendBase, fieldsetRootBase, figureCaptionBase, figureImageBase, figureRootBase, findDirectionalPane, findEditorScrollContainer, flattenKeymapEntries, formatKeyChord, formatKeySequence, formatTime, generateJumpLabels, getDocumentWhichKeyController, getEditorModalTarget, getModalEditor, getNodeChildren, getPresetKeymap, hstackBase, injectCodeBlockStyles, inputVariants, insertPastedUrlAsLink, isEditorInInsertMode, isGroupNode, itemVariants, jumpBadgeMatchedPrefixBase, jumpBadgeVariants, jumpOverlayRootBase, kbdGroupBase, kbdVariants, latexDisplayBase, latexErrorBase, latexInlineBase, latexRootBase, listboxContentBase, listboxEmptyBase, listboxInputBase, listboxItemBase, listboxItemGroupBase, listboxItemGroupLabelBase, listboxItemIndicatorBase, listboxItemTextBase, listboxLabelBase, listboxRootBase, lockEditorOverlayScroll, manimCaptionBase, manimContainerBase, manimErrorBase, manimPlaceholderBase, manimPlaceholderLabelBase, manimRootBase, mermaidLoadingBase, mermaidRootBase, mermaidSourceBase, mermaidSvgAspectRatio, mermaidSvgBase, modalKeymapPluginKey, nativeSelectIconBase, nativeSelectVariants, nativeSelectWrapperBase, navbarActionsBase, navbarActivationAreaBase, navbarBrandBase, navbarContainerBase, navbarDensityVariants, navbarMenuBase, navbarMenuContentBase, navbarMenuIndicatorBase, navbarMenuItemBase, navbarMenuLinkBase, navbarMenuListBase, navbarMenuPlacementVariants, navbarMenuRootBase, navbarMenuTriggerStyle, navbarMenuViewportBase, navbarMenuViewportPositionerBase, navbarMobileActionsBase, navbarMobileBase, navbarMobileContentBase, navbarMobileHeaderBase, navbarMobileMenuBase, navbarMobileMenuContentBase, navbarMobileMenuTriggerBase, navbarShrunkBase, navbarTriggerVariants, navbarVariants, nodeMatchesMode, normalizeNodeModes, noticeDescriptionBase, noticeTitleBase, noticeVariants, notifyAllModalEditors, numberInputControlBase, numberInputInputBase, numberInputRootBase, numberInputTriggerBase, pageContentBase, pageFooterBase, pageGutterAreaBase, pageGutterContentVariants, pageGutterVariants, pageSectionBase, pageVariants, paginationEllipsisBase, paginationItemBase, paginationRootBase, paginationTriggerBase, paneVariants, parseYouTubeChapters, placeEditorOverlay, placeEditorOverlayAt, popoverArrowBase, popoverCloseTriggerBase, popoverContentBase, popoverDescriptionBase, popoverIndicatorBase, popoverPositionerBase, popoverTitleBase, prevNextDirectionBase, prevNextLinkBase, prevNextLinkNextBase, prevNextRootBase, prevNextSpacerBase, prevNextTitleBase, proseVariants, questionCardBase, questionCheckButtonBase, questionGroupBase, questionInputBase, questionOptionBase, questionOptionCorrectBase, questionOptionIncorrectBase, questionPromptBase, questionUnitBase, quizHeaderBase, quizResetButtonBase, quizResultBase, quizResultTextBase, quizResultTitleBase, quizRootBase, quizScoreBase, quizSubmitButtonBase, quizTitleBase, radioGroupItemControlBase, radioGroupItemTextBase, radioGroupRootBase, registerImageInsertCallback, registerModalEditor, registerYouTubeInsertCallback, renderChartSvgString, renderCodeToHtml, renderMermaidSource, resolveMermaidThemeVariables, resolveNode, revealChevronBase, revealContentBase, revealRootBase, revealTriggerBase, rowBase, scrollContentBase, scrollCornerBase, scrollRootBase, scrollScrollbarBase, scrollThumbBase, scrollViewportBase, selectClearTriggerBase, selectContentBase, selectIndicatorBase, selectItemBase, selectItemGroupLabelBase, selectItemIndicatorBase, selectItemTextBase, selectPositionerBase, selectTriggerBase, selectValueBase, sidebarMenuButtonVariants, sidebarStyles, slashCommands, splitterPanelBase, splitterResizeTriggerBase, splitterResizeTriggerIndicatorBase, splitterResizeTriggerSeparatorBase, splitterRootBase, stackBase, subscribeDocumentWhichKeyController, switchControlBase, switchLabelBase, switchThumbBase, switchVariants, tabsContentBase, tabsIndicatorBase, tabsIndicatorVariants, tabsListBase, tabsListVariants, tabsRootBase, tabsTriggerBase, tagsInputClearTriggerBase, tagsInputControlBase, tagsInputInputBase, tagsInputItemBase, tagsInputItemDeleteTriggerBase, tagsInputItemInputBase, tagsInputItemTextBase, tagsInputRootBase, textareaBase, toLaTeX, toggleButtonVariants, toggleGroupRootVariants, tooltipArrowBase, tooltipContentBase, tooltipPositionerBase, unregisterImageInsertCallback, unregisterYouTubeInsertCallback, vstackBase, whichKeyBodyVariants, whichKeyBreadcrumbBase, whichKeyExplorerContentBase, whichKeyExplorerHeaderBase, whichKeyExplorerHighlightMarkBase, whichKeyExplorerInputBase, whichKeyExplorerItemBase, whichKeyExplorerListContentBase, whichKeyExplorerListboxBase, whichKeyFooterBase, whichKeyHeaderBase, whichKeyItemBase, whichKeyItemLabelBase, whichKeyModeBadgeVariants, whichKeyTitleBase, whichKeyVariants, windowBodyBase, windowCloseTriggerBase, windowContentBase, windowControlBase, windowDragTriggerBase, windowHeaderBase, windowPositionerBase, windowResizeTriggerBase, windowStageTriggerBase, windowTitleBase, youtubeChapterButtonBase, youtubeChapterLabelBase, youtubeChapterTimeBase, youtubeChaptersBase, youtubeChaptersChevronBase, youtubeChaptersListBase, youtubeChaptersSummaryBase, youtubeDescriptionBase, youtubeFacadeBase, youtubePlayButtonBase, youtubePlayButtonInnerBase, youtubeRootBase, youtubeTitleBase };
|