@salilvnair/dui 1.0.2 → 1.0.6
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/assets/DuiShowcase-CRLG9S4N.css +1 -0
- package/dist/assets/{DuiShowcase-C2jk2ySV.js → DuiShowcase-DdIO2HHe.js} +1324 -1324
- package/dist/assets/{index-B12PznEF.js → index-BcOB3b2I.js} +2 -2
- package/dist/assets/index-kr_HUJjf.css +10 -0
- package/dist/index.html +2 -2
- package/dist/index.js +4832 -4630
- package/dist/index.js.map +1 -1
- package/dist/lib/components/display/CommandOrbView.d.ts +4 -1
- package/dist/lib/components/display/LoaderView.d.ts +5 -1
- package/dist/lib/components/input/HighlightedInputView.d.ts +1 -1
- package/dist/lib/components/input/SelectTextInputView.d.ts +1 -1
- package/dist/lib/components/layout/FanStackView.d.ts +35 -0
- package/dist/lib/core/VariableToken.d.ts +34 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/monaco-setup.js +510 -439
- package/dist/monaco-setup.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/vis-setup.js +323 -240
- package/dist/vis-setup.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/DuiShowcase-CZLjKDpL.css +0 -1
- package/dist/assets/index-B_5G6LrJ.css +0 -10
|
@@ -4,6 +4,9 @@ export type CommandOrbState = 'idle' | 'thinking' | 'speaking' | 'open';
|
|
|
4
4
|
export interface CommandOrbViewProps {
|
|
5
5
|
state: CommandOrbState;
|
|
6
6
|
onClick?: () => void;
|
|
7
|
+
/** Glyph rendered inside the orb itself. Shown while `idle`/`open` — the
|
|
8
|
+
* `thinking` ripple and `speaking` waveform own the orb interior instead. */
|
|
9
|
+
icon?: ReactNode;
|
|
7
10
|
/** Rendered inside an expanded panel below the orb when `state === 'open'`. */
|
|
8
11
|
panel?: ReactNode;
|
|
9
12
|
size?: DuiSize;
|
|
@@ -12,4 +15,4 @@ export interface CommandOrbViewProps {
|
|
|
12
15
|
style?: CSSProperties;
|
|
13
16
|
}
|
|
14
17
|
/** Floating, breathing circular AI-assistant orb — idle pulse → thinking ripple → speaking waveform, expands into a chat panel. */
|
|
15
|
-
export declare function CommandOrbView({ state, onClick, panel, size, color, className, style, }: CommandOrbViewProps): import("react").JSX.Element;
|
|
18
|
+
export declare function CommandOrbView({ state, onClick, icon, panel, size, color, className, style, }: CommandOrbViewProps): import("react").JSX.Element;
|
|
@@ -6,6 +6,10 @@ export interface LoaderViewProps {
|
|
|
6
6
|
accentColor?: string;
|
|
7
7
|
label?: string;
|
|
8
8
|
fullscreen?: boolean;
|
|
9
|
+
/** Centre the loader horizontally in whatever space the parent gives it.
|
|
10
|
+
* Off by default because a bare loader is `width: auto` and often sits
|
|
11
|
+
* inline beside a control; panel/page-level loading states want this. */
|
|
12
|
+
center?: boolean;
|
|
9
13
|
progress?: number;
|
|
10
14
|
/** skeleton only: renders a single placeholder bar of this exact size
|
|
11
15
|
* instead of the default 3-line paragraph shape — for mimicking a
|
|
@@ -20,4 +24,4 @@ export interface LoaderViewProps {
|
|
|
20
24
|
shape?: 'rect' | 'circle';
|
|
21
25
|
className?: string;
|
|
22
26
|
}
|
|
23
|
-
export declare function LoaderView({ variant, size, accentColor, label, fullscreen, progress, width, height, shape, className, }: LoaderViewProps): import("react").JSX.Element;
|
|
27
|
+
export declare function LoaderView({ variant, size, accentColor, label, fullscreen, center, progress, width, height, shape, className, }: LoaderViewProps): import("react").JSX.Element;
|
|
@@ -18,7 +18,7 @@ export interface HighlightedInputViewProps {
|
|
|
18
18
|
size?: DuiSize;
|
|
19
19
|
/** Raw height override in px — prefer `size` for token-aligned sizing. */
|
|
20
20
|
height?: number;
|
|
21
|
-
/** Border radius of the input in px
|
|
21
|
+
/** Border radius of the input in px — falls back to the size-token radius (matching SelectTextInputView / every other DUI input) when omitted */
|
|
22
22
|
borderRadius?: number;
|
|
23
23
|
style?: React.CSSProperties;
|
|
24
24
|
className?: string;
|
|
@@ -30,7 +30,7 @@ export interface SelectTextInputViewProps {
|
|
|
30
30
|
mockServers?: MockServerSuggestion[];
|
|
31
31
|
/** Called when user picks a mock server entry (in addition to onInputChange) */
|
|
32
32
|
onMockServerSelect?: (url: string) => void;
|
|
33
|
-
onKeyDown?: (e: React.KeyboardEvent
|
|
33
|
+
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
34
34
|
/** Minimum width (px) for the suggestions dropdown — useful when the input is narrow */
|
|
35
35
|
suggestionMinWidth?: number;
|
|
36
36
|
/** z-index for the suggestions dropdown portal (default: 9998) */
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export interface FanStackItem {
|
|
3
|
+
id: string;
|
|
4
|
+
icon: ReactNode;
|
|
5
|
+
label: string;
|
|
6
|
+
/** Per-item accent — the tile ring/glow and label dot. Falls back to `color`. */
|
|
7
|
+
color?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface FanStackViewProps {
|
|
10
|
+
items: FanStackItem[];
|
|
11
|
+
onSelect: (id: string) => void;
|
|
12
|
+
open: boolean;
|
|
13
|
+
/** Which way the arc sweeps out of its anchor. */
|
|
14
|
+
direction?: 'up-left' | 'up-right';
|
|
15
|
+
color?: string;
|
|
16
|
+
/** Distance from the anchor to the first tile. */
|
|
17
|
+
radius?: number;
|
|
18
|
+
/** Extra distance added per tile — the gap between consecutive tiles. */
|
|
19
|
+
spread?: number;
|
|
20
|
+
/** Degrees of sweep added per tile. `0` (default) stacks them straight up;
|
|
21
|
+
* a non-zero value bows the column into an arc. */
|
|
22
|
+
angleStep?: number;
|
|
23
|
+
tileSize?: number;
|
|
24
|
+
className?: string;
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* macOS Finder "fan"/stack — items rise out of their anchor point, evenly
|
|
29
|
+
* spaced and staggered from nearest to furthest, each labelled on hover.
|
|
30
|
+
* Straight-up by default (`angleStep = 0`); give it a non-zero `angleStep`
|
|
31
|
+
* to bow the column into an arc. Anchor it inside a `position: relative`
|
|
32
|
+
* parent; the stack is absolutely positioned at that parent's centre and
|
|
33
|
+
* never takes part in layout.
|
|
34
|
+
*/
|
|
35
|
+
export declare function FanStackView({ items, onSelect, open, direction, color, radius, spread, angleStep, tileSize, className, style, }: FanStackViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Shared `{{var}}` / `${var}` token highlighting — used by any contentEditable-based
|
|
2
|
+
* text field that needs to color variable references inline (HighlightedInputView,
|
|
3
|
+
* SelectTextInputView). Single source of truth so the token pattern and DOM caret
|
|
4
|
+
* math never drift between call sites. */
|
|
5
|
+
export declare const TOKEN_RE: RegExp;
|
|
6
|
+
export declare const ESCAPE_RE: RegExp;
|
|
7
|
+
export declare function buildHighlightedHTML(text: string): string;
|
|
8
|
+
export declare function getCaretOffset(el: HTMLElement): number;
|
|
9
|
+
export interface EditableHistoryEntry {
|
|
10
|
+
text: string;
|
|
11
|
+
caret: number;
|
|
12
|
+
}
|
|
13
|
+
export interface EditableHistory {
|
|
14
|
+
reset(text: string, caret: number): void;
|
|
15
|
+
push(text: string, caret: number): void;
|
|
16
|
+
undo(): EditableHistoryEntry | null;
|
|
17
|
+
redo(): EditableHistoryEntry | null;
|
|
18
|
+
}
|
|
19
|
+
export declare function createEditableHistory(): EditableHistory;
|
|
20
|
+
/** True for Cmd/Ctrl+Z. */
|
|
21
|
+
export declare function isUndoKey(e: {
|
|
22
|
+
key: string;
|
|
23
|
+
metaKey: boolean;
|
|
24
|
+
ctrlKey: boolean;
|
|
25
|
+
shiftKey: boolean;
|
|
26
|
+
}): boolean;
|
|
27
|
+
/** True for Cmd/Ctrl+Shift+Z and Ctrl+Y. */
|
|
28
|
+
export declare function isRedoKey(e: {
|
|
29
|
+
key: string;
|
|
30
|
+
metaKey: boolean;
|
|
31
|
+
ctrlKey: boolean;
|
|
32
|
+
shiftKey: boolean;
|
|
33
|
+
}): boolean;
|
|
34
|
+
export declare function setCaretOffset(el: HTMLElement, offset: number): void;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -128,6 +128,8 @@ export { FabView } from './components/button/FabView';
|
|
|
128
128
|
export type { FabViewProps, FabAction } from './components/button/FabView';
|
|
129
129
|
export { DockView } from './components/layout/DockView';
|
|
130
130
|
export type { DockViewProps, DockItem } from './components/layout/DockView';
|
|
131
|
+
export { FanStackView } from './components/layout/FanStackView';
|
|
132
|
+
export type { FanStackViewProps, FanStackItem } from './components/layout/FanStackView';
|
|
131
133
|
export { BreadcrumbView } from './components/layout/BreadcrumbView';
|
|
132
134
|
export type { BreadcrumbViewProps, BreadcrumbItem } from './components/layout/BreadcrumbView';
|
|
133
135
|
export { PaginationView } from './components/layout/PaginationView';
|