@agimon-ai/doompi-web-components 0.0.1-alpha.38 → 0.0.1-alpha.39
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 +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +1 -1
- package/dist/src/components/Drawer.cjs +2 -0
- package/dist/src/components/Drawer.cjs.map +1 -0
- package/dist/src/components/Drawer.d.mts +17 -0
- package/dist/src/components/Drawer.d.mts.map +1 -0
- package/dist/src/components/Drawer.mjs +2 -0
- package/dist/src/components/Drawer.mjs.map +1 -0
- package/package.json +3 -3
- package/dist/components/Accordion.d.cts +0 -11
- package/dist/components/Accordion.d.cts.map +0 -1
- package/dist/components/AnsiText.d.cts +0 -16
- package/dist/components/AnsiText.d.cts.map +0 -1
- package/dist/components/Avatar.d.cts +0 -10
- package/dist/components/Avatar.d.cts.map +0 -1
- package/dist/components/Badge.d.cts +0 -17
- package/dist/components/Badge.d.cts.map +0 -1
- package/dist/components/Breadcrumb.d.cts +0 -36
- package/dist/components/Breadcrumb.d.cts.map +0 -1
- package/dist/components/Button.d.cts +0 -24
- package/dist/components/Button.d.cts.map +0 -1
- package/dist/components/Checkbox.d.cts +0 -8
- package/dist/components/Checkbox.d.cts.map +0 -1
- package/dist/components/CodeEditor.d.cts +0 -5
- package/dist/components/CodeEditor.d.cts.map +0 -1
- package/dist/components/Collapsible.d.cts +0 -10
- package/dist/components/Collapsible.d.cts.map +0 -1
- package/dist/components/Command.d.cts +0 -41
- package/dist/components/Command.d.cts.map +0 -1
- package/dist/components/Dialog.d.cts +0 -39
- package/dist/components/Dialog.d.cts.map +0 -1
- package/dist/components/Dot.d.cts +0 -15
- package/dist/components/Dot.d.cts.map +0 -1
- package/dist/components/DropdownMenu.d.cts +0 -34
- package/dist/components/DropdownMenu.d.cts.map +0 -1
- package/dist/components/EmptyState.d.cts +0 -17
- package/dist/components/EmptyState.d.cts.map +0 -1
- package/dist/components/HashlineLines.d.cts +0 -23
- package/dist/components/HashlineLines.d.cts.map +0 -1
- package/dist/components/Input.d.cts +0 -19
- package/dist/components/Input.d.cts.map +0 -1
- package/dist/components/Kbd.d.cts +0 -6
- package/dist/components/Kbd.d.cts.map +0 -1
- package/dist/components/Label.d.cts +0 -8
- package/dist/components/Label.d.cts.map +0 -1
- package/dist/components/Markdown.d.cts +0 -17
- package/dist/components/Markdown.d.cts.map +0 -1
- package/dist/components/MediaPreview.d.cts +0 -61
- package/dist/components/MediaPreview.d.cts.map +0 -1
- package/dist/components/MessageItem.d.cts +0 -102
- package/dist/components/MessageItem.d.cts.map +0 -1
- package/dist/components/MessageLines.d.cts +0 -23
- package/dist/components/MessageLines.d.cts.map +0 -1
- package/dist/components/OptionList.d.cts +0 -49
- package/dist/components/OptionList.d.cts.map +0 -1
- package/dist/components/Panel.d.cts +0 -14
- package/dist/components/Panel.d.cts.map +0 -1
- package/dist/components/PdfPreview.d.cts +0 -52
- package/dist/components/PdfPreview.d.cts.map +0 -1
- package/dist/components/Popover.d.cts +0 -19
- package/dist/components/Popover.d.cts.map +0 -1
- package/dist/components/Progress.d.cts +0 -8
- package/dist/components/Progress.d.cts.map +0 -1
- package/dist/components/RadioGroup.d.cts +0 -15
- package/dist/components/RadioGroup.d.cts.map +0 -1
- package/dist/components/ScrollArea.d.cts +0 -13
- package/dist/components/ScrollArea.d.cts.map +0 -1
- package/dist/components/SectionLabel.d.cts +0 -6
- package/dist/components/SectionLabel.d.cts.map +0 -1
- package/dist/components/Select.d.cts +0 -19
- package/dist/components/Select.d.cts.map +0 -1
- package/dist/components/Separator.d.cts +0 -13
- package/dist/components/Separator.d.cts.map +0 -1
- package/dist/components/Sheet.d.cts +0 -35
- package/dist/components/Sheet.d.cts.map +0 -1
- package/dist/components/Skeleton.d.cts +0 -10
- package/dist/components/Skeleton.d.cts.map +0 -1
- package/dist/components/Spinner.d.cts +0 -14
- package/dist/components/Spinner.d.cts.map +0 -1
- package/dist/components/StatusBadge.d.cts +0 -23
- package/dist/components/StatusBadge.d.cts.map +0 -1
- package/dist/components/StreamCursor.d.cts +0 -6
- package/dist/components/StreamCursor.d.cts.map +0 -1
- package/dist/components/Switch.d.cts +0 -8
- package/dist/components/Switch.d.cts.map +0 -1
- package/dist/components/SyntaxText.d.cts +0 -50
- package/dist/components/SyntaxText.d.cts.map +0 -1
- package/dist/components/Tabs.d.cts +0 -36
- package/dist/components/Tabs.d.cts.map +0 -1
- package/dist/components/TerminalView.d.cts +0 -31
- package/dist/components/TerminalView.d.cts.map +0 -1
- package/dist/components/Textarea.d.cts +0 -9
- package/dist/components/Textarea.d.cts.map +0 -1
- package/dist/components/Toast.d.cts +0 -24
- package/dist/components/Toast.d.cts.map +0 -1
- package/dist/components/ToolPathLink.d.cts +0 -22
- package/dist/components/ToolPathLink.d.cts.map +0 -1
- package/dist/components/Tooltip.d.cts +0 -11
- package/dist/components/Tooltip.d.cts.map +0 -1
- package/dist/icons/icons.d.cts +0 -2
- package/dist/index.d.cts +0 -59
- package/dist/lib/ansiSpans.d.cts +0 -42
- package/dist/lib/ansiSpans.d.cts.map +0 -1
- package/dist/lib/cn.d.cts +0 -6
- package/dist/lib/cn.d.cts.map +0 -1
- package/dist/lib/collapse.d.cts +0 -14
- package/dist/lib/collapse.d.cts.map +0 -1
- package/dist/lib/editorLanguage.d.cts +0 -21
- package/dist/lib/editorLanguage.d.cts.map +0 -1
- package/dist/lib/editorTheme.d.cts +0 -76
- package/dist/lib/editorTheme.d.cts.map +0 -1
- package/dist/lib/hashlineHighlight.d.cts +0 -30
- package/dist/lib/hashlineHighlight.d.cts.map +0 -1
- package/dist/lib/hashlineView.d.cts +0 -60
- package/dist/lib/hashlineView.d.cts.map +0 -1
- package/dist/lib/media.d.cts +0 -11
- package/dist/lib/media.d.cts.map +0 -1
- package/dist/lib/optionList.d.cts +0 -21
- package/dist/lib/optionList.d.cts.map +0 -1
- package/dist/lib/syntaxHighlight.d.cts +0 -54
- package/dist/lib/syntaxHighlight.d.cts.map +0 -1
- package/dist/lib/tone.d.cts +0 -25
- package/dist/lib/tone.d.cts.map +0 -1
- package/dist/theme/apply.d.cts +0 -25
- package/dist/theme/apply.d.cts.map +0 -1
- package/dist/theme/builtinThemes.d.cts +0 -11
- package/dist/theme/builtinThemes.d.cts.map +0 -1
- package/dist/theme/derive.d.cts +0 -14
- package/dist/theme/derive.d.cts.map +0 -1
- package/dist/theme/parse.d.cts +0 -10
- package/dist/theme/parse.d.cts.map +0 -1
- package/dist/theme/piTheme.d.cts +0 -19
- package/dist/theme/piTheme.d.cts.map +0 -1
- package/dist/theme/preference.d.cts +0 -15
- package/dist/theme/preference.d.cts.map +0 -1
- package/dist/theme.d.cts +0 -8
- package/dist/types/editor.d.cts +0 -78
- package/dist/types/editor.d.cts.map +0 -1
- package/dist/types/theme.d.cts +0 -38
- package/dist/types/theme.d.cts.map +0 -1
- package/dist/types/tone.d.cts +0 -28
- package/dist/types/tone.d.cts.map +0 -1
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
//#region src/lib/hashlineView.d.ts
|
|
2
|
-
export declare const READ_COLLAPSED_LINES = 10;
|
|
3
|
-
export declare const GREP_COLLAPSED_LINES = 15;
|
|
4
|
-
export type HashlineResultKind = 'read' | 'grep';
|
|
5
|
-
export type TaggedLineMarker = 'match' | 'context';
|
|
6
|
-
/**
|
|
7
|
-
* The part of a tool result this parser reads.
|
|
8
|
-
*
|
|
9
|
-
* Named structurally rather than imported: the component library sits below
|
|
10
|
-
* the web contract and must not depend on it, so it states the shape it needs
|
|
11
|
-
* and any `ToolResultView` satisfies it.
|
|
12
|
-
*/
|
|
13
|
-
export interface HashlineResult {
|
|
14
|
-
readonly content: readonly unknown[];
|
|
15
|
-
}
|
|
16
|
-
export interface TaggedLine {
|
|
17
|
-
readonly line: number;
|
|
18
|
-
readonly content: string;
|
|
19
|
-
readonly marker: TaggedLineMarker | undefined;
|
|
20
|
-
}
|
|
21
|
-
export type PresentedLine = {
|
|
22
|
-
readonly type: 'file';
|
|
23
|
-
readonly path: string;
|
|
24
|
-
} | {
|
|
25
|
-
readonly type: 'tagged';
|
|
26
|
-
readonly value: TaggedLine;
|
|
27
|
-
} | {
|
|
28
|
-
readonly type: 'plain';
|
|
29
|
-
readonly text: string;
|
|
30
|
-
};
|
|
31
|
-
export interface HashlineBody {
|
|
32
|
-
readonly shown: readonly PresentedLine[];
|
|
33
|
-
/** Lines the collapsed view holds back; zero once expanded. */
|
|
34
|
-
readonly hidden: number;
|
|
35
|
-
/** The bracketed pagination or compaction note the tool appends after its lines. */
|
|
36
|
-
readonly notice: string | undefined;
|
|
37
|
-
/** Widest line number among the shown anchored lines, in characters. */
|
|
38
|
-
readonly gutter: number;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The result's text as lines: tabs widened, CRLF folded, trailing blanks
|
|
42
|
-
* dropped. A result with no text but an image block reads as the TUI's
|
|
43
|
-
* placeholder. The joined `output` stands in when no result view exists.
|
|
44
|
-
*/
|
|
45
|
-
export declare function resultTextLines(result: HashlineResult | null, output: string): string[];
|
|
46
|
-
/** Detaches the tool's trailing `[...]` note so the body numbers file content only. */
|
|
47
|
-
export declare function takeTrailingNotice(lines: string[]): string | undefined;
|
|
48
|
-
export declare function parseTaggedLine(value: string): TaggedLine | undefined;
|
|
49
|
-
export declare function parseFileHeader(value: string): string | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* Lines as the card presents them. A read shows one file, so its header is
|
|
52
|
-
* dropped; a grep groups anchored matches under each file's path.
|
|
53
|
-
*/
|
|
54
|
-
export declare function presentHashlineLines(lines: readonly string[], kind: HashlineResultKind): PresentedLine[];
|
|
55
|
-
/** The body a card shows for one result, collapsed to the kind's line budget unless expanded. */
|
|
56
|
-
export declare function hashlineBody(result: HashlineResult | null, output: string, kind: HashlineResultKind, expanded: boolean): HashlineBody;
|
|
57
|
-
/** The `key · key` detail list beside a call's primary argument, with absent values dropped. */
|
|
58
|
-
export declare function compactDetails(values: ReadonlyArray<string | undefined>): string[];
|
|
59
|
-
//#endregion
|
|
60
|
-
//# sourceMappingURL=hashlineView.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hashlineView.d.cts","names":[],"sources":["../../src/lib/hashlineView.ts"],"mappings":";qBAoBa;qBACA;YAED;YACA;;;;;;;;iBASK;WACN;;iBAGM;WACN;WACA;WACA,QAAQ;;YAGP;WACG;WAAuB;;WACvB;WAAyB,OAAO;;WAChC;WAAwB;;iBAEtB;WACN,gBAAgB;;WAEhB;;WAEA;;WAEA;;;;;;;wBAiBK,gBAAgB,QAAQ,uBAAuB;;wBAa/C,mBAAmB;wBAQnB,gBAAgB,gBAAgB;wBAYhC,gBAAgB;;;;;wBAQhB,qBAAqB,0BAA0B,MAAM,qBAAqB;;wBAmB1E,aACd,QAAQ,uBACR,gBACA,MAAM,oBACN,oBACC;;wBAca,eAAe,QAAQ"}
|
package/dist/lib/media.d.cts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { MediaKind } from "../types/editor.cjs";
|
|
2
|
-
//#region src/lib/media.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* How to show the file at this path. Anything unrecognised is a download,
|
|
5
|
-
* which is the honest answer for a `.docx` or a `.zip`: a browser cannot
|
|
6
|
-
* render it, and pretending otherwise costs a converter that loses the
|
|
7
|
-
* formatting it converted.
|
|
8
|
-
*/
|
|
9
|
-
export declare function mediaKindOf(filePath: string): MediaKind;
|
|
10
|
-
//#endregion
|
|
11
|
-
//# sourceMappingURL=media.d.cts.map
|
package/dist/lib/media.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.cts","names":[],"sources":["../../src/lib/media.ts"],"mappings":";;;;;;;;wBAyCgB,YAAY,mBAAmB"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { KeyboardEvent } from "react";
|
|
2
|
-
//#region src/lib/optionList.d.ts
|
|
3
|
-
/** Digits are a shortcut, not the only way in: only the first nine can have one. */
|
|
4
|
-
export declare const MAX_DIGIT_SHORTCUT = 9;
|
|
5
|
-
/**
|
|
6
|
-
* The keyboard an option list answers to, handled on whichever element the
|
|
7
|
-
* surrounding overlay focuses. Every key it claims is consumed, so a digit
|
|
8
|
-
* that answers the agent never also reaches the rail's session shortcuts.
|
|
9
|
-
*/
|
|
10
|
-
export declare function handleOptionListKey(event: KeyboardEvent, input: {
|
|
11
|
-
options: readonly string[];
|
|
12
|
-
cursor: number;
|
|
13
|
-
onCursorChange: (cursor: number) => void;
|
|
14
|
-
onSelect: (option: string) => void;
|
|
15
|
-
}): void;
|
|
16
|
-
/** What the footer should promise, given how many options there are. */
|
|
17
|
-
export declare function optionListHint(count: number): string;
|
|
18
|
-
/** The digit a row answers to, or the bullet that says it has none. */
|
|
19
|
-
export declare function optionMarker(index: number): string;
|
|
20
|
-
//#endregion
|
|
21
|
-
//# sourceMappingURL=optionList.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"optionList.d.cts","names":[],"sources":["../../src/lib/optionList.ts"],"mappings":";;;qBAGa;;;;;;wBAOG,oBACd,OAAO,eACP;EACE;EACA;EACA,iBAAiB;EACjB,WAAW;;;wBA8BC,eAAe;;wBAKf,aAAa"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { GrammarKey } from "./editorLanguage.cjs";
|
|
2
|
-
import { DOOM_SYNTAX_STYLES } from "./editorTheme.cjs";
|
|
3
|
-
import { CSSProperties } from "react";
|
|
4
|
-
//#region src/lib/syntaxHighlight.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Static syntax highlighting for read-only code, the timeline's half of the
|
|
7
|
-
* editor's `syntaxHighlighting`.
|
|
8
|
-
*
|
|
9
|
-
* A tool card shows code it cannot edit, so it needs the colours without the
|
|
10
|
-
* editor: the same grammars `editorLanguage.ts` loads and the same token
|
|
11
|
-
* palette `editorTheme.ts` names, run once over a string and handed back as
|
|
12
|
-
* spans. Everything CodeMirror-shaped is behind a dynamic import, so a session
|
|
13
|
-
* that never opens a code result never downloads a parser, and the caller
|
|
14
|
-
* always has plain text to show first.
|
|
15
|
-
*/
|
|
16
|
-
/** The palette keys a token can land on; the styles themselves are the editor's. */
|
|
17
|
-
export type SyntaxToken = keyof typeof DOOM_SYNTAX_STYLES;
|
|
18
|
-
/** One run of same-styled text inside a line. `token` absent means unstyled. */
|
|
19
|
-
export interface SyntaxSpan {
|
|
20
|
-
text: string;
|
|
21
|
-
token?: SyntaxToken;
|
|
22
|
-
}
|
|
23
|
-
/** Lines of spans, one array per source line, so a gutter can pair with them. */
|
|
24
|
-
export type SyntaxLines = readonly (readonly SyntaxSpan[])[];
|
|
25
|
-
export interface GrammarQuery {
|
|
26
|
-
/** The file the text came from, when the tool knows one. */
|
|
27
|
-
path?: string | undefined;
|
|
28
|
-
/** The text itself, used only when the path settles nothing. */
|
|
29
|
-
text?: string | undefined;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Which grammar to colour a result with.
|
|
33
|
-
*
|
|
34
|
-
* The path decides whenever it can, because a name is evidence and a body is a
|
|
35
|
-
* guess. Sniffing only answers for text that arrived without a usable name: a
|
|
36
|
-
* shebang says what runs the script, and a document that opens and closes with
|
|
37
|
-
* brackets is treated as JSON. Anything else stays plain rather than being
|
|
38
|
-
* coloured as the wrong language.
|
|
39
|
-
*/
|
|
40
|
-
export declare function detectGrammar(query: GrammarQuery): GrammarKey | undefined;
|
|
41
|
-
/** The inline style a token wears. Colours come from the editor palette, which names theme tokens. */
|
|
42
|
-
export declare function syntaxStyleOf(token: SyntaxToken | undefined): CSSProperties | undefined;
|
|
43
|
-
/**
|
|
44
|
-
* Colours `text` as `grammar`, as lines of spans.
|
|
45
|
-
*
|
|
46
|
-
* The whole text is parsed at once even though the caller may render it line
|
|
47
|
-
* by line, because a template literal or a block comment only makes sense with
|
|
48
|
-
* its neighbours. Text past the size cap, and a grammar whose extension turns
|
|
49
|
-
* out to carry no parser, come back unhighlighted rather than throwing: colour
|
|
50
|
-
* is decoration, and the caller already has the plain text on screen.
|
|
51
|
-
*/
|
|
52
|
-
export declare function highlightToLines(text: string, grammar: GrammarKey): Promise<SyntaxLines | undefined>;
|
|
53
|
-
//#endregion
|
|
54
|
-
//# sourceMappingURL=syntaxHighlight.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syntaxHighlight.d.cts","names":[],"sources":["../../src/lib/syntaxHighlight.ts"],"mappings":";;;;;;;;;;;;;;;;YAkBY,2BAA2B;;iBAGtB;EACf;EACA,QAAQ;;;YAIE,iCAAiC;iBAqB5B;;EAEf;;EAEA;;;;;;;;;;;wBAYc,cAAc,OAAO,eAAe;;wBAkBpC,cAAc,OAAO,0BAA0B;;;;;;;;;;wBA4DzC,iBAAiB,cAAc,SAAS,aAAa,QAAQ"}
|
package/dist/lib/tone.d.cts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ChipTone, DotTone, MessageLineTone, StatusTone } from "../types/tone.cjs";
|
|
2
|
-
//#region src/lib/tone.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Translations between the tone vocabularies.
|
|
5
|
-
*
|
|
6
|
-
* Every surface that shows an outcome used to carry its own
|
|
7
|
-
* `Record<Tone, string>` table mapping a state onto a colour class. Those
|
|
8
|
-
* tables disagreed as often as they agreed. These maps are the one place the
|
|
9
|
-
* translation lives, so a card picks a status tone from its own domain and
|
|
10
|
-
* asks here what colour that reads as.
|
|
11
|
-
*/
|
|
12
|
-
/** The colour a status reads as, for the chip and border families. */
|
|
13
|
-
export declare const STATUS_TO_CHIP: Readonly<Record<StatusTone, ChipTone>>;
|
|
14
|
-
/** The dot a status reads as; a neutral status is present but not live. */
|
|
15
|
-
export declare const STATUS_TO_DOT: Readonly<Record<StatusTone, DotTone>>;
|
|
16
|
-
/**
|
|
17
|
-
* The status a colour stands for, for a caller that has only a chip tone.
|
|
18
|
-
* Lossy on purpose: the palette has more colours than there are outcomes, and
|
|
19
|
-
* a colour with no outcome of its own reads as neutral.
|
|
20
|
-
*/
|
|
21
|
-
export declare const CHIP_TO_STATUS: Readonly<Record<ChipTone, StatusTone>>;
|
|
22
|
-
/** The status a body line's role corresponds to, for a card that badges its worst line. */
|
|
23
|
-
export declare const LINE_TONE_TO_STATUS: Readonly<Record<MessageLineTone, StatusTone>>;
|
|
24
|
-
//#endregion
|
|
25
|
-
//# sourceMappingURL=tone.d.cts.map
|
package/dist/lib/tone.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tone.d.cts","names":[],"sources":["../../src/lib/tone.ts"],"mappings":";;;;;;;;;;;;qBAaa,gBAAgB,SAAS,OAAO,YAAY;;qBAU5C,eAAe,SAAS,OAAO,YAAY;;;;;;qBAc3C,gBAAgB,SAAS,OAAO,UAAU;;qBAc1C,qBAAqB,SAAS,OAAO,iBAAiB"}
|
package/dist/theme/apply.d.cts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ThemeConfig } from "../types/theme.cjs";
|
|
2
|
-
//#region src/theme/apply.d.ts
|
|
3
|
-
/** The attribute the active theme's name is stamped on, for CSS that keys off a theme. */
|
|
4
|
-
export declare const THEME_ATTRIBUTE = "data-theme";
|
|
5
|
-
/** Every custom property a theme publishes, keyed by property name. */
|
|
6
|
-
export declare function themeCssVariables(theme: ThemeConfig): Record<string, string>;
|
|
7
|
-
/** The theme as a stylesheet rule, for a server that wants to inline it. */
|
|
8
|
-
export declare function themeCssText(theme: ThemeConfig, selector?: string): string;
|
|
9
|
-
/** The subset of an element the theme touches, so tests can pass a plain object. */
|
|
10
|
-
export interface ThemeRoot {
|
|
11
|
-
style: {
|
|
12
|
-
setProperty(name: string, value: string): void;
|
|
13
|
-
colorScheme: string;
|
|
14
|
-
};
|
|
15
|
-
setAttribute(name: string, value: string): void;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Applies a theme to the page: every token becomes a custom property on the
|
|
19
|
-
* root, the colour scheme follows, and the theme name is stamped so a style
|
|
20
|
-
* may key off it. Idempotent and synchronous, so calling it before the first
|
|
21
|
-
* render avoids a flash of the default theme.
|
|
22
|
-
*/
|
|
23
|
-
export declare function applyTheme(theme: ThemeConfig, root: ThemeRoot): void;
|
|
24
|
-
//#endregion
|
|
25
|
-
//# sourceMappingURL=apply.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.cts","names":[],"sources":["../../src/theme/apply.ts"],"mappings":";;;qBAIa;;wBAGG,kBAAkB,OAAO,cAAc;;wBAQvC,aAAa,OAAO,aAAa;;iBAMhC;EACf;IAAS,YAAY,cAAc;IAAsB;;EACzD,aAAa,cAAc;;;;;;;;wBASb,WAAW,OAAO,aAAa,MAAM"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ThemeConfig } from "../types/theme.cjs";
|
|
2
|
-
//#region src/theme/builtinThemes.d.ts
|
|
3
|
-
/** The theme the cockpit renders with until a preference says otherwise. */
|
|
4
|
-
export declare const DEFAULT_THEME_NAME = "doom-one-dark";
|
|
5
|
-
/** The themes this package ships, default first. */
|
|
6
|
-
export declare const BUILTIN_THEMES: readonly ThemeConfig[];
|
|
7
|
-
export declare const DEFAULT_THEME: ThemeConfig;
|
|
8
|
-
/** A shipped theme by name, or undefined for a name nothing shipped under. */
|
|
9
|
-
export declare function builtinTheme(name: string): ThemeConfig | undefined;
|
|
10
|
-
//#endregion
|
|
11
|
-
//# sourceMappingURL=builtinThemes.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builtinThemes.d.cts","names":[],"sources":["../../src/theme/builtinThemes.ts"],"mappings":";;;qBAaa;;qBAGA,yBAAyB;qBAMzB,eAAe;;wBAGZ,aAAa,eAAe"}
|
package/dist/theme/derive.d.cts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DerivedToken, ThemeConfig, ThemeToken } from "../types/theme.cjs";
|
|
2
|
-
//#region src/theme/derive.d.ts
|
|
3
|
-
export declare const DEFAULT_FONT_MONO = "'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace";
|
|
4
|
-
/**
|
|
5
|
-
* A derived token's fallback: a CSS colour expression over the palette, so a
|
|
6
|
-
* theme that supplies only its palette still gets coherent tints and edges.
|
|
7
|
-
*/
|
|
8
|
-
export declare function derivedFallback(token: DerivedToken): string;
|
|
9
|
-
/** Every derived token, in a stable order. */
|
|
10
|
-
export declare function derivedTokens(): DerivedToken[];
|
|
11
|
-
/** The value a theme publishes for a token: its own, or the derived fallback. */
|
|
12
|
-
export declare function tokenValue(theme: ThemeConfig, token: ThemeToken): string;
|
|
13
|
-
//#endregion
|
|
14
|
-
//# sourceMappingURL=derive.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"derive.d.cts","names":[],"sources":["../../src/theme/derive.ts"],"mappings":";;qBASa;;;;;wBAOG,gBAAgB,OAAO;;wBAWvB,iBAAiB;;wBASjB,WAAW,OAAO,aAAa,OAAO"}
|
package/dist/theme/parse.d.cts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ThemeConfig } from "../types/theme.cjs";
|
|
2
|
-
//#region src/theme/parse.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Validates a theme config read from JSON. Returns null rather than throwing
|
|
5
|
-
* because a bad theme file must never take the cockpit down; the caller falls
|
|
6
|
-
* back to the shipped default and says so.
|
|
7
|
-
*/
|
|
8
|
-
export declare function parseThemeConfig(input: unknown): ThemeConfig | null;
|
|
9
|
-
//#endregion
|
|
10
|
-
//# sourceMappingURL=parse.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.cts","names":[],"sources":["../../src/theme/parse.ts"],"mappings":";;;;;;;wBAgBgB,iBAAiB,iBAAiB"}
|
package/dist/theme/piTheme.d.cts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ThemeConfig, ThemeScheme } from "../types/theme.cjs";
|
|
2
|
-
//#region src/theme/piTheme.d.ts
|
|
3
|
-
export interface PiThemeBridgeOptions {
|
|
4
|
-
/** The web theme's id; defaults to the Pi theme's name. */
|
|
5
|
-
name?: string;
|
|
6
|
-
label?: string;
|
|
7
|
-
/** Forced scheme; otherwise inferred from the background luminance. */
|
|
8
|
-
scheme?: ThemeScheme;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Builds a web theme from a Pi TUI theme, so the palette DoomPi ships for
|
|
12
|
-
* the terminal (doompi-ui/themes/doom-pi-dark.json) drives the browser too.
|
|
13
|
-
* The mapping is by role, not by name: Pi has no cockpit "deep" surface or
|
|
14
|
-
* "border-soft" line, so those are mixed from the nearest vars. Returns null
|
|
15
|
-
* when the input is not a Pi theme with a complete palette.
|
|
16
|
-
*/
|
|
17
|
-
export declare function themeFromPiTheme(input: unknown, options?: PiThemeBridgeOptions): ThemeConfig | null;
|
|
18
|
-
//#endregion
|
|
19
|
-
//# sourceMappingURL=piTheme.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"piTheme.d.cts","names":[],"sources":["../../src/theme/piTheme.ts"],"mappings":";;iBAiCiB;;EAEf;EACA;;EAEA,SAAS;;;;;;;;;wBAUK,iBAAiB,gBAAgB,UAAS,uBAA4B"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region src/theme/preference.d.ts
|
|
2
|
-
/** Where the page remembers the chosen theme; one key, machine-local. */
|
|
3
|
-
export declare const THEME_STORAGE_KEY = "doompi.web.theme";
|
|
4
|
-
/** The two Storage calls the preference needs, so tests pass a plain map. */
|
|
5
|
-
export interface PreferenceStorage {
|
|
6
|
-
getItem(key: string): string | null;
|
|
7
|
-
setItem(key: string, value: string): void;
|
|
8
|
-
removeItem(key: string): void;
|
|
9
|
-
}
|
|
10
|
-
/** The stored theme name, or null when nothing was chosen or storage is unavailable. */
|
|
11
|
-
export declare function readThemePreference(storage: PreferenceStorage | undefined): string | null;
|
|
12
|
-
/** Remembers a theme name; null forgets it. Storage failures are swallowed: a theme is a convenience. */
|
|
13
|
-
export declare function writeThemePreference(storage: PreferenceStorage | undefined, name: string | null): void;
|
|
14
|
-
//#endregion
|
|
15
|
-
//# sourceMappingURL=preference.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preference.d.cts","names":[],"sources":["../../src/theme/preference.ts"],"mappings":";;qBACa;;iBAGI;EACf,QAAQ;EACR,QAAQ,aAAa;EACrB,WAAW;;;wBAIG,oBAAoB,SAAS;;wBAU7B,qBAAqB,SAAS,+BAA+B"}
|
package/dist/theme.d.cts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ACCENT_TOKENS, AccentToken, DERIVED_TOKENS, DerivedToken, PALETTE_TOKENS, PaletteToken, THEME_TOKENS, ThemeConfig, ThemeScheme, ThemeToken, themeVariable } from "./types/theme.cjs";
|
|
2
|
-
import { THEME_ATTRIBUTE, ThemeRoot, applyTheme, themeCssText, themeCssVariables } from "./theme/apply.cjs";
|
|
3
|
-
import { BUILTIN_THEMES, DEFAULT_THEME, DEFAULT_THEME_NAME, builtinTheme } from "./theme/builtinThemes.cjs";
|
|
4
|
-
import { DEFAULT_FONT_MONO, derivedFallback, derivedTokens, tokenValue } from "./theme/derive.cjs";
|
|
5
|
-
import { parseThemeConfig } from "./theme/parse.cjs";
|
|
6
|
-
import { PiThemeBridgeOptions, themeFromPiTheme } from "./theme/piTheme.cjs";
|
|
7
|
-
import { PreferenceStorage, THEME_STORAGE_KEY, readThemePreference, writeThemePreference } from "./theme/preference.cjs";
|
|
8
|
-
export { ACCENT_TOKENS, type AccentToken, BUILTIN_THEMES, DEFAULT_FONT_MONO, DEFAULT_THEME, DEFAULT_THEME_NAME, DERIVED_TOKENS, type DerivedToken, PALETTE_TOKENS, type PaletteToken, type PiThemeBridgeOptions, type PreferenceStorage, THEME_ATTRIBUTE, THEME_STORAGE_KEY, THEME_TOKENS, type ThemeConfig, type ThemeRoot, type ThemeScheme, type ThemeToken, applyTheme, builtinTheme, derivedFallback, derivedTokens, parseThemeConfig, readThemePreference, themeCssText, themeCssVariables, themeFromPiTheme, themeVariable, tokenValue, writeThemePreference };
|
package/dist/types/editor.d.cts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
//#region src/types/editor.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* The vocabulary a file surface shares: how a file is shown, and what an
|
|
4
|
-
* editor hands back when a reader selects part of one.
|
|
5
|
-
*
|
|
6
|
-
* It lives here rather than beside the components so a caller can classify a
|
|
7
|
-
* path, or hold a selection in its own state, without pulling the editor
|
|
8
|
-
* chunk in behind it.
|
|
9
|
-
*/
|
|
10
|
-
/** How a file is shown when its bytes are not text: inline by kind, or offered as a download. */
|
|
11
|
-
export declare const MEDIA_KINDS: readonly ['image', 'video', 'pdf', 'download'];
|
|
12
|
-
export type MediaKind = (typeof MEDIA_KINDS)[number];
|
|
13
|
-
/**
|
|
14
|
-
* What a reader picked out, in the terms a review comment needs: the text
|
|
15
|
-
* itself, and where it sits. Lines are one-based, matching what an editor
|
|
16
|
-
* gutter shows, and a caret with nothing selected reports the same line twice
|
|
17
|
-
* with empty text.
|
|
18
|
-
*/
|
|
19
|
-
export interface EditorSelectionRange {
|
|
20
|
-
text: string;
|
|
21
|
-
/** Zero-based, half-open offsets in the mounted document. */
|
|
22
|
-
from: number;
|
|
23
|
-
to: number;
|
|
24
|
-
startLine: number;
|
|
25
|
-
endLine: number;
|
|
26
|
-
}
|
|
27
|
-
/** A zero-based half-open range in the mounted editor document. */
|
|
28
|
-
export interface EditorTextRange {
|
|
29
|
-
from: number;
|
|
30
|
-
to: number;
|
|
31
|
-
}
|
|
32
|
-
/** A persistent numbered annotation drawn over a mounted editor range. */
|
|
33
|
-
export interface EditorMarkedRange extends EditorTextRange {
|
|
34
|
-
label: string;
|
|
35
|
-
}
|
|
36
|
-
/** One replacement applied with the other edits in a single editor transaction. */
|
|
37
|
-
export interface EditorEdit extends EditorTextRange {
|
|
38
|
-
insert: string;
|
|
39
|
-
}
|
|
40
|
-
/** A client-coordinate rectangle over the visible editor viewport. */
|
|
41
|
-
export interface EditorViewportRectangle {
|
|
42
|
-
left: number;
|
|
43
|
-
top: number;
|
|
44
|
-
right: number;
|
|
45
|
-
bottom: number;
|
|
46
|
-
}
|
|
47
|
-
/** The deliberately small imperative surface exposed by a mounted editor. */
|
|
48
|
-
export interface CodeEditorController {
|
|
49
|
-
focus: () => void;
|
|
50
|
-
revealAndSelect: (range: EditorTextRange) => void;
|
|
51
|
-
applyEdits: (edits: readonly EditorEdit[]) => void;
|
|
52
|
-
setClosedRanges: (ranges: readonly EditorTextRange[]) => void;
|
|
53
|
-
setMarkedRanges: (ranges: readonly EditorMarkedRange[]) => void;
|
|
54
|
-
/** Resolves visible geometry to a document-native range, or null when it misses the document. */
|
|
55
|
-
resolveViewportRegion: (rectangle: EditorViewportRectangle) => EditorSelectionRange | null;
|
|
56
|
-
}
|
|
57
|
-
export interface CodeEditorProps {
|
|
58
|
-
value: string;
|
|
59
|
-
/**
|
|
60
|
-
* The file this content came from. It picks the syntax grammar and nothing
|
|
61
|
-
* else; leave it off and the editor stays plain text.
|
|
62
|
-
*/
|
|
63
|
-
path?: string;
|
|
64
|
-
readOnly?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Wraps long lines rather than scrolling sideways. On by default, because
|
|
67
|
-
* the cockpit is read on phones and unwrapped code there is unreadable.
|
|
68
|
-
*/
|
|
69
|
-
lineWrapping?: boolean;
|
|
70
|
-
className?: string;
|
|
71
|
-
'data-testid'?: string;
|
|
72
|
-
onChange?: (value: string) => void;
|
|
73
|
-
onSelect?: (range: EditorSelectionRange) => void;
|
|
74
|
-
/** Receives the controller while the CodeMirror view is mounted, and `null` after it is destroyed. */
|
|
75
|
-
controllerRef?: import('react').Ref<CodeEditorController>;
|
|
76
|
-
}
|
|
77
|
-
//#endregion
|
|
78
|
-
//# sourceMappingURL=editor.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.cts","names":[],"sources":["../../src/types/editor.ts"],"mappings":";;;;;;;;;;qBAUa;YACD,oBAAoB;;;;;;;iBAQf;EACf;;EAEA;EACA;EACA;EACA;;;iBAIe;EACf;EACA;;;iBAIe,0BAA0B;EACzC;;;iBAGe,mBAAmB;EAClC;;;iBAIe;EACf;EACA;EACA;EACA;;;iBAIe;EACf;EACA,kBAAkB,OAAO;EACzB,aAAa,gBAAgB;EAC7B,kBAAkB,iBAAiB;EACnC,kBAAkB,iBAAiB;;EAEnC,wBAAwB,WAAW,4BAA4B;;iBAGhD;EACf;;;;;EAKA;EACA;;;;;EAKA;EACA;EACA;EACA,YAAY;EACZ,YAAY,OAAO;;EAEnB,gCAAgC,IAAI"}
|
package/dist/types/theme.d.cts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
//#region src/types/theme.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* The web theme contract: the named colours every cockpit surface is built
|
|
4
|
-
* from. Palette tokens are the hand-picked values a theme must supply; the
|
|
5
|
-
* derived tokens (tinted backgrounds, accented borders) are computed from the
|
|
6
|
-
* palette unless a theme pins them, which is how the shipped dark theme keeps
|
|
7
|
-
* its exact mockup values while a third-party theme needs only the palette.
|
|
8
|
-
*/
|
|
9
|
-
export declare const PALETTE_TOKENS: readonly ['bg', 'rail', 'panel', 'deep', 'border', 'border-soft', 'hi', 'text', 'dim', 'faint', 'blue', 'green', 'yellow', 'red', 'magenta', 'violet', 'cyan', 'orange', 'teal', 'selected'];
|
|
10
|
-
export declare const ACCENT_TOKENS: readonly ['blue', 'green', 'yellow', 'red', 'magenta', 'violet', 'cyan', 'orange', 'teal'];
|
|
11
|
-
export declare const DERIVED_TOKENS: readonly ['tint-blue', 'tint-green', 'tint-yellow', 'tint-red', 'tint-magenta', 'tint-violet', 'tint-cyan', 'tint-orange', 'tint-teal', 'edge-blue', 'edge-green', 'edge-yellow', 'edge-red', 'edge-magenta', 'edge-violet', 'edge-cyan', 'edge-orange', 'edge-teal',
|
|
12
|
-
/**
|
|
13
|
-
* The readable foreground on the `selected` surface. Derived so an existing
|
|
14
|
-
* theme stays valid, but a theme whose `selected` is pale must pin it: CSS
|
|
15
|
-
* cannot pick a contrasting colour on its own, and the fallback assumes a
|
|
16
|
-
* saturated selection, which is what both shipped themes use.
|
|
17
|
-
*/
|
|
18
|
-
'on-selected', 'font-mono'];
|
|
19
|
-
export declare const THEME_TOKENS: readonly ["bg", "rail", "panel", "deep", "border", "border-soft", "hi", "text", "dim", "faint", "blue", "green", "yellow", "red", "magenta", "violet", "cyan", "orange", "teal", "selected", "tint-blue", "tint-green", "tint-yellow", "tint-red", "tint-magenta", "tint-violet", "tint-cyan", "tint-orange", "tint-teal", "edge-blue", "edge-green", "edge-yellow", "edge-red", "edge-magenta", "edge-violet", "edge-cyan", "edge-orange", "edge-teal", "on-selected", "font-mono"];
|
|
20
|
-
export type PaletteToken = (typeof PALETTE_TOKENS)[number];
|
|
21
|
-
export type AccentToken = (typeof ACCENT_TOKENS)[number];
|
|
22
|
-
export type DerivedToken = (typeof DERIVED_TOKENS)[number];
|
|
23
|
-
export type ThemeToken = (typeof THEME_TOKENS)[number];
|
|
24
|
-
export type ThemeScheme = 'dark' | 'light';
|
|
25
|
-
/** A theme config as written in JSON: identity, colour scheme, and the token values. */
|
|
26
|
-
export interface ThemeConfig {
|
|
27
|
-
/** Stable id, kebab-case; the `data-theme` attribute and the stored preference. */
|
|
28
|
-
name: string;
|
|
29
|
-
/** What a picker shows. */
|
|
30
|
-
label: string;
|
|
31
|
-
/** Drives `color-scheme` so native controls and scrollbars match. */
|
|
32
|
-
scheme: ThemeScheme;
|
|
33
|
-
tokens: Record<PaletteToken, string> & Partial<Record<DerivedToken, string>>;
|
|
34
|
-
}
|
|
35
|
-
/** The CSS custom property a token is published as. */
|
|
36
|
-
export declare function themeVariable(token: ThemeToken): `--doom-${ThemeToken}`;
|
|
37
|
-
//#endregion
|
|
38
|
-
//# sourceMappingURL=theme.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.cts","names":[],"sources":["../../src/types/theme.ts"],"mappings":";;;;;;;;qBAOa;qBAuBA;qBAEA;;;;;;;;qBA6BA;YAED,uBAAuB;YACvB,sBAAsB;YACtB,uBAAuB;YACvB,qBAAqB;YAErB;;iBAGK;;EAEf;;EAEA;;EAEA,QAAQ;EACR,QAAQ,OAAO,wBAAwB,QAAQ,OAAO;;;wBAIxC,cAAc,OAAO,uBAAuB"}
|
package/dist/types/tone.d.cts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
//#region src/types/tone.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* The tone vocabularies every surface shares.
|
|
4
|
-
*
|
|
5
|
-
* Three of them exist because they answer different questions. A chromatic
|
|
6
|
-
* tone names a colour ("this chip is violet"), a status tone names an outcome
|
|
7
|
-
* ("this run failed"), and a line tone names a role inside a body of text.
|
|
8
|
-
* They live here, not beside the components that draw them, so a consumer can
|
|
9
|
-
* translate between them without importing a component, and so adding a tone
|
|
10
|
-
* to one table without the others fails to compile.
|
|
11
|
-
*/
|
|
12
|
-
/** The accents a theme supplies; mirrors ACCENT_TOKENS in ./theme.ts. */
|
|
13
|
-
export declare const ACCENT_TONES: readonly ['blue', 'green', 'yellow', 'red', 'magenta', 'violet', 'cyan', 'orange', 'teal'];
|
|
14
|
-
export type AccentTone = (typeof ACCENT_TONES)[number];
|
|
15
|
-
/** What a chip may be: an accent, or the quiet default. */
|
|
16
|
-
export declare const CHIP_TONES: readonly ["neutral", "blue", "green", "yellow", "red", "magenta", "violet", "cyan", "orange", "teal"];
|
|
17
|
-
export type ChipTone = (typeof CHIP_TONES)[number];
|
|
18
|
-
/** A dot adds `muted` for a thing that exists but is not live. */
|
|
19
|
-
export declare const DOT_TONES: readonly ["neutral", "muted", "blue", "green", "yellow", "red", "magenta", "violet", "cyan", "orange", "teal"];
|
|
20
|
-
export type DotTone = (typeof DOT_TONES)[number];
|
|
21
|
-
/** What happened, rather than what colour it is. */
|
|
22
|
-
export declare const STATUS_TONES: readonly ['neutral', 'running', 'ok', 'error', 'info', 'accent'];
|
|
23
|
-
export type StatusTone = (typeof STATUS_TONES)[number];
|
|
24
|
-
/** The role a single line of a message body plays. */
|
|
25
|
-
export declare const MESSAGE_LINE_TONES: readonly ['hi', 'text', 'dim', 'muted', 'success', 'error', 'warning', 'accent'];
|
|
26
|
-
export type MessageLineTone = (typeof MESSAGE_LINE_TONES)[number];
|
|
27
|
-
//#endregion
|
|
28
|
-
//# sourceMappingURL=tone.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tone.d.cts","names":[],"sources":["../../src/types/tone.ts"],"mappings":";;;;;;;;;;;;qBAYa;YACD,qBAAqB;;qBAGpB;YACD,mBAAmB;;qBAGlB;YACD,kBAAkB;;qBAGjB;YACD,qBAAqB;;qBAGpB;YACD,0BAA0B"}
|