@opentui/core 0.8.3 → 0.9.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/NativeScene.d.ts +13 -2
- package/Renderable.d.ts +16 -6
- package/ansi.d.ts +1 -1
- package/{chunk-bun-psdzwx7h.js → chunk-bun-rgb7yx3r.js} +8959 -9989
- package/chunk-bun-rgb7yx3r.js.map +68 -0
- package/{chunk-bun-12ttbayv.js → chunk-bun-ywheza3e.js} +664 -102
- package/chunk-bun-ywheza3e.js.map +35 -0
- package/{chunk-node-drh8dgw6.js → chunk-node-fcberveq.js} +8959 -9989
- package/chunk-node-fcberveq.js.map +68 -0
- package/{chunk-node-88t8pbzy.js → chunk-node-k5s8s41v.js} +664 -102
- package/chunk-node-k5s8s41v.js.map +34 -0
- package/edit-buffer.d.ts +40 -5
- package/editor-view.d.ts +28 -0
- package/index.bun.js +1252 -4790
- package/index.bun.js.map +18 -24
- package/index.node.js +1252 -4790
- package/index.node.js.map +19 -31
- package/lib/KeyHandler.d.ts +1 -1
- package/lib/extmarks.d.ts +15 -51
- package/lib/index.d.ts +1 -2
- package/lib/kitty-keys.d.ts +2 -0
- package/lib/parse.keypress.d.ts +8 -3
- package/lib/parse.mouse.d.ts +0 -13
- package/lib/stdin-parser-native.d.ts +36 -24
- package/lib/terminal-capability-detection.d.ts +3 -3
- package/lib/terminal-palette.d.ts +3 -0
- package/lib/tree-sitter/client.d.ts +14 -3
- package/lib/tree-sitter/types.d.ts +10 -0
- package/lib/tree-sitter-styled-text.d.ts +2 -0
- package/lib/yoga.options.d.ts +3 -0
- package/native-abi.generated.d.ts +1395 -0
- package/package.json +9 -10
- package/parser.worker.js +112 -29
- package/parser.worker.js.map +3 -3
- package/plugins/core-slot.d.ts +1 -1
- package/renderables/ASCIIFont.d.ts +5 -0
- package/renderables/Code.d.ts +25 -2
- package/renderables/Diff.d.ts +3 -1
- package/renderables/EditBufferRenderable.d.ts +30 -1
- package/renderables/EmbeddedTerminal.d.ts +1 -1
- package/renderables/Input.d.ts +6 -3
- package/renderables/LineNumberRenderable.d.ts +4 -0
- package/renderables/Markdown.d.ts +208 -124
- package/renderables/ScrollBox.d.ts +7 -2
- package/renderables/ScrollBoxParts.d.ts +4 -5
- package/renderables/Select.d.ts +2 -2
- package/renderables/TabSelect.d.ts +2 -2
- package/renderables/Text.d.ts +3 -1
- package/renderables/TextBufferRenderable.d.ts +2 -0
- package/renderables/TextTable.d.ts +6 -0
- package/renderables/Textarea.d.ts +2 -1
- package/renderables/__tests__/code-model-harness.d.ts +40 -0
- package/renderables/index.d.ts +1 -3
- package/renderables/markdown-document.d.ts +37 -0
- package/renderables/props.d.ts +10 -0
- package/renderer-theme-mode.d.ts +5 -1
- package/renderer.d.ts +23 -9
- package/runtime-plugin.js +32 -57
- package/runtime-plugin.js.map +1 -1
- package/syntax-style.d.ts +5 -0
- package/testing/mock-tree-sitter-client.d.ts +5 -0
- package/testing/model.d.ts +15 -0
- package/testing.bun.js +8 -31
- package/testing.bun.js.map +4 -4
- package/testing.js +8 -31
- package/testing.js.map +4 -4
- package/tests/shrink-same-check.d.ts +4 -0
- package/tests/yoga-upstream/tools/utils.d.ts +9 -2
- package/text-buffer.d.ts +4 -0
- package/types.d.ts +2 -2
- package/yoga.bun.js +1 -1
- package/yoga.internal.d.ts +1 -0
- package/yoga.js +1 -1
- package/zig.d.ts +104 -5
- package/chunk-bun-12ttbayv.js.map +0 -35
- package/chunk-bun-psdzwx7h.js.map +0 -70
- package/chunk-node-88t8pbzy.js.map +0 -34
- package/chunk-node-drh8dgw6.js.map +0 -70
- package/lib/debounce.d.ts +0 -42
- package/lib/extmarks-history.d.ts +0 -17
- package/lib/parse.keypress-kitty.d.ts +0 -5
- package/lib/queue.d.ts +0 -15
- package/lib/stdin-parser.d.ts +0 -97
- package/renderables/composition/VRenderable.d.ts +0 -16
- package/renderables/composition/constructs.d.ts +0 -35
- package/renderables/composition/vnode.d.ts +0 -46
- package/renderables/markdown-parser.d.ts +0 -12
package/lib/KeyHandler.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "events";
|
|
2
|
-
import {
|
|
2
|
+
import type { KeyEventType, ParsedKey } from "./parse.keypress.js";
|
|
3
3
|
import type { PasteMetadata } from "./paste.js";
|
|
4
4
|
export declare class KeyEvent implements ParsedKey {
|
|
5
5
|
name: string;
|
package/lib/extmarks.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import type { EditBuffer } from "../edit-buffer.js";
|
|
|
2
2
|
import type { EditorView } from "../editor-view.js";
|
|
3
3
|
export interface Extmark {
|
|
4
4
|
id: number;
|
|
5
|
+
/** Inclusive document cell offset, counting one cell per newline. */
|
|
5
6
|
start: number;
|
|
7
|
+
/** Exclusive document cell offset, counting one cell per newline. */
|
|
6
8
|
end: number;
|
|
7
9
|
virtual: boolean;
|
|
8
10
|
styleId?: number;
|
|
@@ -11,7 +13,9 @@ export interface Extmark {
|
|
|
11
13
|
typeId: number;
|
|
12
14
|
}
|
|
13
15
|
export interface ExtmarkOptions {
|
|
16
|
+
/** Inclusive document cell offset, counting one cell per newline. */
|
|
14
17
|
start: number;
|
|
18
|
+
/** Exclusive document cell offset, counting one cell per newline. */
|
|
15
19
|
end: number;
|
|
16
20
|
virtual?: boolean;
|
|
17
21
|
styleId?: number;
|
|
@@ -21,75 +25,35 @@ export interface ExtmarkOptions {
|
|
|
21
25
|
metadata?: any;
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
28
|
+
* Extmarks live in the native edit buffer, which moves them with edits and restores them with undo and redo. Ids are
|
|
29
|
+
* never reused. Text inserted strictly inside a virtual extmark, or an edit that removes part of it, drops it. While a
|
|
30
|
+
* controller lives and its view has no selection, the buffer's Left, Right, Backspace, Delete and offset setter and the
|
|
31
|
+
* view's Up and Down apply the native cursor rules around virtual extmarks.
|
|
27
32
|
*/
|
|
28
33
|
export declare class ExtmarksController {
|
|
29
34
|
private editBuffer;
|
|
30
35
|
private editorView;
|
|
31
|
-
private
|
|
32
|
-
private extmarksByTypeId;
|
|
33
|
-
private metadata;
|
|
34
|
-
private nextId;
|
|
36
|
+
private state;
|
|
35
37
|
private destroyed;
|
|
36
|
-
private
|
|
37
|
-
private typeNameToId;
|
|
38
|
-
private typeIdToName;
|
|
39
|
-
private nextTypeId;
|
|
40
|
-
private originalMoveCursorLeft;
|
|
41
|
-
private originalMoveCursorRight;
|
|
42
|
-
private originalSetCursorByOffset;
|
|
43
|
-
private originalMoveUpVisual;
|
|
44
|
-
private originalMoveDownVisual;
|
|
45
|
-
private originalDeleteCharBackward;
|
|
46
|
-
private originalDeleteChar;
|
|
47
|
-
private originalInsertText;
|
|
48
|
-
private originalInsertChar;
|
|
49
|
-
private originalDeleteRange;
|
|
50
|
-
private originalSetText;
|
|
51
|
-
private originalReplaceText;
|
|
52
|
-
private originalClear;
|
|
53
|
-
private originalNewLine;
|
|
54
|
-
private originalDeleteLine;
|
|
55
|
-
private originalEditorViewDeleteSelectedText;
|
|
56
|
-
private originalEditorViewReplaceSelectedText;
|
|
57
|
-
private originalUndo;
|
|
58
|
-
private originalRedo;
|
|
59
|
-
private readonly contentChangeListener;
|
|
38
|
+
private readonly atomic;
|
|
60
39
|
constructor(editBuffer: EditBuffer, editorView: EditorView);
|
|
61
|
-
private
|
|
62
|
-
|
|
63
|
-
private wrapInsertion;
|
|
64
|
-
private wrapEditorViewDeleteSelectedText;
|
|
65
|
-
private setupContentChangeListener;
|
|
66
|
-
private deleteExtmarkById;
|
|
67
|
-
private findVirtualExtmarkContaining;
|
|
68
|
-
private adjustExtmarksAfterInsertion;
|
|
69
|
-
adjustExtmarksAfterDeletion(deleteOffset: number, length: number, updateHighlights?: boolean): void;
|
|
70
|
-
private offsetToPosition;
|
|
71
|
-
private positionToOffset;
|
|
72
|
-
/** Cells an edit adds to the document, negative when it removes them. A grapheme rejoined across the edit changes widths, so measure the end. */
|
|
73
|
-
private measureChange;
|
|
74
|
-
private shiftExtmarks;
|
|
75
|
-
private updateHighlights;
|
|
76
|
-
private offsetExcludingNewlines;
|
|
40
|
+
private toExtmark;
|
|
41
|
+
/** Marks a half-open document cell range, counting one cell per newline. Returns a mark ID. */
|
|
77
42
|
create(options: ExtmarkOptions): number;
|
|
78
43
|
delete(id: number): boolean;
|
|
79
44
|
get(id: number): Extmark | null;
|
|
80
45
|
getAll(): Extmark[];
|
|
81
46
|
getVirtual(): Extmark[];
|
|
47
|
+
/** Looks up marks covering a document cell offset, counting one cell per newline. */
|
|
82
48
|
getAtOffset(offset: number): Extmark[];
|
|
83
49
|
getAllForTypeId(typeId: number): Extmark[];
|
|
84
50
|
clear(): void;
|
|
85
|
-
private saveSnapshot;
|
|
86
|
-
private snapshotExtmarks;
|
|
87
|
-
private restoreSnapshot;
|
|
88
|
-
private wrapUndoRedo;
|
|
89
51
|
registerType(typeName: string): number;
|
|
90
52
|
getTypeId(typeName: string): number | null;
|
|
91
53
|
getTypeName(typeId: number): string | null;
|
|
92
54
|
getMetadataFor(extmarkId: number): any;
|
|
55
|
+
private get gone();
|
|
56
|
+
/** Stops the cursor rules for its view. The marks, their payloads and the type names stay with the buffer. */
|
|
93
57
|
destroy(): void;
|
|
94
58
|
}
|
|
95
59
|
export declare function createExtmarksController(editBuffer: EditBuffer, editorView: EditorView): ExtmarksController;
|
package/lib/index.d.ts
CHANGED
|
@@ -11,12 +11,11 @@ export * from "./yoga.options.js";
|
|
|
11
11
|
export * from "./parse.mouse.js";
|
|
12
12
|
export * from "./selection.js";
|
|
13
13
|
export * from "./env.js";
|
|
14
|
-
export * from "./stdin-parser.js";
|
|
15
14
|
export * from "./tree-sitter-styled-text.js";
|
|
16
15
|
export * from "./tree-sitter/index.js";
|
|
17
16
|
export * from "./data-paths.js";
|
|
18
17
|
export * from "./extmarks.js";
|
|
19
|
-
export
|
|
18
|
+
export { buildTerminalPaletteSignature, createTerminalPalette, normalizeTerminalPalette, TerminalPalette, type GetPaletteOptions, type NormalizedTerminalPalette, type OscSubscriptionSource, type TerminalColors, type TerminalPaletteDetector, type TerminalPaletteOptions, type WriteFunction, } from "./terminal-palette.js";
|
|
20
19
|
export * from "./paste.js";
|
|
21
20
|
export * from "./clipboard.js";
|
|
22
21
|
export { detectLinks } from "./detect-links.js";
|
package/lib/parse.keypress.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Buffer } from "node:buffer";
|
|
2
|
-
export declare const nonAlphanumericKeys: string[];
|
|
3
|
-
export declare const terminalNamedSingleStrokeKeys: string[];
|
|
4
2
|
export type KeyEventType = "press" | "repeat" | "release";
|
|
5
3
|
export interface ParsedKey {
|
|
6
4
|
name: string;
|
|
@@ -24,4 +22,11 @@ export interface ParsedKey {
|
|
|
24
22
|
export type ParseKeypressOptions = {
|
|
25
23
|
useKittyKeyboard?: boolean;
|
|
26
24
|
};
|
|
27
|
-
|
|
25
|
+
/** The input parser's key names: Kitty's functional keys, linefeed, space, and the SS3 keypad keys' names. */
|
|
26
|
+
export declare const terminalNamedSingleStrokeKeys: string[];
|
|
27
|
+
/**
|
|
28
|
+
* Decodes `s` as one complete input with the native input parser and returns its first event if that is a key, else
|
|
29
|
+
* null. A live renderer can read the same bytes differently: it delivers keys after a leading mouse, focus or paste
|
|
30
|
+
* event, and while it awaits a terminal reply it takes `CSI 1;2 R` as that reply instead of Shift+F3.
|
|
31
|
+
*/
|
|
32
|
+
export declare function parseKeypress(s?: Buffer | string, options?: ParseKeypressOptions): ParsedKey | null;
|
package/lib/parse.mouse.d.ts
CHANGED
|
@@ -15,16 +15,3 @@ export type RawMouseEvent = {
|
|
|
15
15
|
};
|
|
16
16
|
scroll?: ScrollInfo;
|
|
17
17
|
};
|
|
18
|
-
export declare class MouseParser {
|
|
19
|
-
private mouseButtonsPressed;
|
|
20
|
-
private static readonly SCROLL_DIRECTIONS;
|
|
21
|
-
reset(): void;
|
|
22
|
-
private decodeInput;
|
|
23
|
-
parseMouseEvent(data: Buffer | Uint8Array): RawMouseEvent | null;
|
|
24
|
-
parseAllMouseEvents(data: Buffer | Uint8Array): RawMouseEvent[];
|
|
25
|
-
private parseMouseSequenceAt;
|
|
26
|
-
private parseSgrSequence;
|
|
27
|
-
private parseBasicSequence;
|
|
28
|
-
private decodeSgrEvent;
|
|
29
|
-
private decodeBasicEvent;
|
|
30
|
-
}
|
|
@@ -1,17 +1,49 @@
|
|
|
1
1
|
import { type NativeContextHandle, type RenderLib, type SessionHandle } from "../zig.js";
|
|
2
|
-
import
|
|
2
|
+
import { type Clock } from "./clock.js";
|
|
3
|
+
import type { ParsedKey } from "./parse.keypress.js";
|
|
4
|
+
import type { RawMouseEvent } from "./parse.mouse.js";
|
|
5
|
+
export type StdinResponseProtocol = "csi" | "cpr" | "osc" | "dcs" | "apc" | "unknown";
|
|
6
|
+
export type StdinEvent = {
|
|
7
|
+
type: "key";
|
|
8
|
+
raw: string;
|
|
9
|
+
key: ParsedKey;
|
|
10
|
+
} | {
|
|
11
|
+
type: "mouse";
|
|
12
|
+
raw: string;
|
|
13
|
+
encoding: "sgr" | "x10";
|
|
14
|
+
event: RawMouseEvent;
|
|
15
|
+
} | {
|
|
16
|
+
type: "paste";
|
|
17
|
+
bytes: Uint8Array;
|
|
18
|
+
} | {
|
|
19
|
+
type: "response";
|
|
20
|
+
protocol: StdinResponseProtocol;
|
|
21
|
+
sequence: string;
|
|
22
|
+
};
|
|
23
|
+
export interface StdinParserProtocolContext {
|
|
24
|
+
kittyKeyboardEnabled: boolean;
|
|
25
|
+
privateCapabilityRepliesActive: boolean;
|
|
26
|
+
pixelResolutionQueryActive: boolean;
|
|
27
|
+
explicitWidthCprActive: boolean;
|
|
28
|
+
startupCursorCprActive: boolean;
|
|
29
|
+
/** A query batch's DA1 reply is outstanding, so split replies wait for it without a deadline. */
|
|
30
|
+
replySentinelActive: boolean;
|
|
31
|
+
}
|
|
3
32
|
export interface NativeInputSession {
|
|
4
33
|
lib: RenderLib;
|
|
5
34
|
context: NativeContextHandle;
|
|
6
35
|
session: SessionHandle;
|
|
7
36
|
}
|
|
8
|
-
export interface NativeStdinParserOptions
|
|
37
|
+
export interface NativeStdinParserOptions {
|
|
38
|
+
armTimeouts?: boolean;
|
|
39
|
+
onTimeoutFlush?: () => void;
|
|
40
|
+
protocolContext?: Partial<StdinParserProtocolContext>;
|
|
41
|
+
clock?: Clock;
|
|
9
42
|
/** Parse through this Session's input parser. Without one, the parser owns a private Context and Session. */
|
|
10
43
|
session?: NativeInputSession;
|
|
11
44
|
}
|
|
12
45
|
/**
|
|
13
|
-
*
|
|
14
|
-
* parser and renderer state: a deferred reply has no deadline, so CPR aborts and
|
|
46
|
+
* The renderer's stdin parser. A deferred reply has no deadline, so CPR aborts and
|
|
15
47
|
* pixel queries need no special handling; suspension needs only suspend and resume.
|
|
16
48
|
*/
|
|
17
49
|
export declare class NativeStdinParser {
|
|
@@ -68,23 +100,3 @@ export declare class NativeStdinParser {
|
|
|
68
100
|
private span;
|
|
69
101
|
private translate;
|
|
70
102
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Pairs the events of the delivering parser with the events of a parser that only
|
|
73
|
-
* sees the same input (OTUI_NATIVE_INPUT_SHADOW) and logs one line per difference.
|
|
74
|
-
* Events pair in order, so the parsers' separate timers cannot misalign them. After
|
|
75
|
-
* a difference, pairing resumes once each side has reported its next event.
|
|
76
|
-
*/
|
|
77
|
-
export declare class StdinShadowComparator {
|
|
78
|
-
private readonly primaryName;
|
|
79
|
-
private readonly log;
|
|
80
|
-
private readonly delivered;
|
|
81
|
-
private readonly shadowed;
|
|
82
|
-
constructor(primaryName: "legacy" | "native", log: (line: string) => void);
|
|
83
|
-
primary(event: StdinEvent): void;
|
|
84
|
-
shadow(event: StdinEvent): void;
|
|
85
|
-
/** Reports every event still unpaired. Call when both parsers have stopped. */
|
|
86
|
-
flush(): void;
|
|
87
|
-
private queue;
|
|
88
|
-
private pair;
|
|
89
|
-
private report;
|
|
90
|
-
}
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
*/
|
|
19
19
|
export declare function isCapabilityResponse(sequence: string): boolean;
|
|
20
20
|
/**
|
|
21
|
-
* Check if a cursor position report answers the explicit width or scaled text probe: ESC[
|
|
22
|
-
* ESC[
|
|
23
|
-
*
|
|
21
|
+
* Check if a cursor position report answers the explicit width or scaled text probe, which runs on row 2: ESC[2;2R or
|
|
22
|
+
* ESC[2;3R. ESC[2;1R means the cursor did not move, so the terminal has no width support. Modified F3 keys report
|
|
23
|
+
* row 1, so no key has these bytes; still, only a report the parser classified as one may be checked.
|
|
24
24
|
*/
|
|
25
25
|
export declare function isExplicitWidthReport(sequence: string): boolean;
|
|
26
26
|
/**
|
|
@@ -40,6 +40,9 @@ export interface TerminalPaletteOptions {
|
|
|
40
40
|
oscSource?: OscSubscriptionSource;
|
|
41
41
|
clock?: Clock;
|
|
42
42
|
}
|
|
43
|
+
export declare function emptyTerminalColors(size: number): TerminalColors;
|
|
44
|
+
/** Copies the OSC 4 and OSC 10-19 color replies in `sequence` into `colors`; returns whether a color changed. */
|
|
45
|
+
export declare function applyPaletteReplies(colors: TerminalColors, sequence: string): boolean;
|
|
43
46
|
export declare class TerminalPalette implements TerminalPaletteDetector {
|
|
44
47
|
private stdin;
|
|
45
48
|
private stdout;
|
|
@@ -15,8 +15,7 @@ export declare class TreeSitterClient extends EventEmitter<TreeSitterClientEvent
|
|
|
15
15
|
private initializeResolvers;
|
|
16
16
|
private messageCallbacks;
|
|
17
17
|
private messageIdCounter;
|
|
18
|
-
private
|
|
19
|
-
private debouncer;
|
|
18
|
+
private resetVersions;
|
|
20
19
|
private options;
|
|
21
20
|
private destroyCallbacks;
|
|
22
21
|
private lifecycleGeneration;
|
|
@@ -48,11 +47,23 @@ export declare class TreeSitterClient extends EventEmitter<TreeSitterClientEvent
|
|
|
48
47
|
warning?: string;
|
|
49
48
|
error?: string;
|
|
50
49
|
}>;
|
|
50
|
+
/**
|
|
51
|
+
* @internal Appends `text` at `offset` to the worker's copy `copyId` (created by the first append, at offset 0; free
|
|
52
|
+
* it with `removeCopy`), parses it with the tree it kept, and answers the highlights of the whole copy. An offset
|
|
53
|
+
* that differs from the copy's length is an error. Copies have their own ids, apart from buffers.
|
|
54
|
+
*/
|
|
55
|
+
highlightAppend(copyId: number, offset: number, text: string, filetype: string): Promise<{
|
|
56
|
+
highlights?: SimpleHighlight[];
|
|
57
|
+
warning?: string;
|
|
58
|
+
error?: string;
|
|
59
|
+
}>;
|
|
60
|
+
/** @internal Frees copy `copyId`. An append still waiting for the worker to start posts first, so this waits too. */
|
|
61
|
+
removeCopy(copyId: number): Promise<void>;
|
|
62
|
+
private request;
|
|
51
63
|
private handleWorkerMessage;
|
|
52
64
|
preloadParser(filetype: string): Promise<boolean>;
|
|
53
65
|
createBuffer(id: number, content: string, filetype: string, version?: number, autoInitialize?: boolean): Promise<boolean>;
|
|
54
66
|
updateBuffer(id: number, edits: Edit[], newContent: string, version: number): Promise<void>;
|
|
55
|
-
private processEdit;
|
|
56
67
|
removeBuffer(bufferId: number): Promise<void>;
|
|
57
68
|
destroy(): Promise<void>;
|
|
58
69
|
resetBuffer(bufferId: number, version: number, content: string): Promise<void>;
|
|
@@ -86,6 +86,16 @@ export type TreeSitterWorkerRequest = {
|
|
|
86
86
|
content: string;
|
|
87
87
|
filetype: string;
|
|
88
88
|
messageId: string;
|
|
89
|
+
} | {
|
|
90
|
+
type: "APPEND_HIGHLIGHT";
|
|
91
|
+
copyId: number;
|
|
92
|
+
offset: number;
|
|
93
|
+
text: string;
|
|
94
|
+
filetype: string;
|
|
95
|
+
messageId: string;
|
|
96
|
+
} | {
|
|
97
|
+
type: "DISPOSE_COPY";
|
|
98
|
+
copyId: number;
|
|
89
99
|
} | {
|
|
90
100
|
type: "UPDATE_DATA_PATH";
|
|
91
101
|
dataPath: string;
|
|
@@ -10,6 +10,8 @@ interface TextChunkOptions {
|
|
|
10
10
|
start: number;
|
|
11
11
|
end: number;
|
|
12
12
|
}>;
|
|
13
|
+
/** Receives, per chunk, the style names it merges in order (a native group set). */
|
|
14
|
+
names?: string[][];
|
|
13
15
|
}
|
|
14
16
|
export declare function treeSitterToTextChunks(content: string, highlights: SimpleHighlight[], syntaxStyle: SyntaxStyle, options?: TextChunkOptions): TextChunk[];
|
|
15
17
|
export interface TreeSitterToStyledTextOptions {
|
package/lib/yoga.options.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type EdgeString = "left" | "top" | "right" | "bottom" | "start" | "end" |
|
|
|
8
8
|
export type FlexDirectionString = "column" | "column-reverse" | "row" | "row-reverse";
|
|
9
9
|
export type GutterString = "column" | "row" | "all";
|
|
10
10
|
export type JustifyString = "flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly";
|
|
11
|
+
export type LayoutModeString = "flex" | "list";
|
|
11
12
|
export type LogLevelString = "error" | "warn" | "info" | "debug" | "verbose" | "fatal";
|
|
12
13
|
export type MeasureModeString = "undefined" | "exactly" | "at-most";
|
|
13
14
|
export type OverflowString = "visible" | "hidden" | "scroll";
|
|
@@ -16,6 +17,7 @@ export type UnitString = "undefined" | "point" | "percent" | "auto";
|
|
|
16
17
|
export type WrapString = "no-wrap" | "wrap" | "wrap-reverse";
|
|
17
18
|
export declare function parseAlign(value: string | null | undefined): Align;
|
|
18
19
|
export declare function parseAlignItems(value: string | null | undefined): Align;
|
|
20
|
+
export declare function parseAlignContent(value: string | null | undefined): Align;
|
|
19
21
|
export declare function parseBoxSizing(value: string): BoxSizing;
|
|
20
22
|
export declare function parseDimension(value: string): Dimension;
|
|
21
23
|
export declare function parseDirection(value: string): Direction;
|
|
@@ -24,6 +26,7 @@ export declare function parseEdge(value: string): Edge;
|
|
|
24
26
|
export declare function parseFlexDirection(value: string | null | undefined): FlexDirection;
|
|
25
27
|
export declare function parseGutter(value: string): Gutter;
|
|
26
28
|
export declare function parseJustify(value: string | null | undefined): Justify;
|
|
29
|
+
export declare function parseLayoutMode(value: string | null | undefined): number;
|
|
27
30
|
export declare function parseLogLevel(value: string): LogLevel;
|
|
28
31
|
export declare function parseMeasureMode(value: string): MeasureMode;
|
|
29
32
|
export declare function parseOverflow(value: string | null | undefined): Overflow;
|