@alchemy.run/sigil 0.0.0-alpha.1 → 0.0.0-alpha.2
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/README.md +299 -299
- package/dist/ansi.d.ts +223 -0
- package/dist/ansi.js +2 -0
- package/dist/{devtools-QpCMm9JH.mjs → devtools-BhYGjb7h.js} +1 -1
- package/dist/index-DDVME65c.d.ts +919 -0
- package/dist/index.d.ts +1657 -0
- package/dist/index.js +4643 -0
- package/dist/sgr-CMfEpjSk.d.ts +91 -0
- package/dist/truncate-CBiyyZzw.js +2156 -0
- package/dist/yoga-5jKhYCJC.js +3465 -0
- package/dist/yoga.d.ts +2 -0
- package/dist/yoga.js +2 -0
- package/package.json +37 -17
- package/src/ansi/chalk.ts +179 -0
- package/src/ansi/cursor.ts +48 -0
- package/src/ansi/east-asian-width.ts +215 -0
- package/src/ansi/escapes.ts +128 -0
- package/src/ansi/index.ts +27 -0
- package/src/ansi/sgr.ts +237 -0
- package/src/ansi/slice.ts +43 -0
- package/src/ansi/string-width.ts +236 -0
- package/src/ansi/strip.ts +33 -0
- package/src/ansi/supports-color.ts +213 -0
- package/src/ansi/tokenize.ts +453 -0
- package/src/ansi/truncate.ts +194 -0
- package/src/ansi/widest-line.ts +12 -0
- package/src/ansi/wrap.ts +766 -0
- package/src/ansi-tokenizer.ts +510 -0
- package/src/auto-bind.ts +41 -0
- package/src/boxes.ts +100 -0
- package/src/code-excerpt.ts +39 -0
- package/src/colorize.ts +60 -0
- package/src/components/AccessibilityContext.ts +5 -0
- package/src/components/AnimationContext.ts +24 -0
- package/src/components/App.tsx +781 -0
- package/src/components/AppContext.ts +111 -0
- package/src/components/BackgroundContext.ts +8 -0
- package/src/components/Box.tsx +116 -0
- package/src/components/CursorContext.ts +19 -0
- package/src/components/ErrorBoundary.tsx +38 -0
- package/src/components/ErrorOverview.tsx +133 -0
- package/src/components/FocusContext.ts +30 -0
- package/src/components/Newline.tsx +15 -0
- package/src/components/Spacer.tsx +10 -0
- package/src/components/Static.tsx +59 -0
- package/src/components/StderrContext.ts +26 -0
- package/src/components/StdinContext.ts +49 -0
- package/src/components/StdoutContext.ts +28 -0
- package/src/components/Text.tsx +144 -0
- package/src/components/Transform.tsx +37 -0
- package/src/cursor-position.ts +103 -0
- package/src/devtools-window-polyfill.ts +73 -0
- package/src/devtools.ts +43 -0
- package/src/dom.ts +292 -0
- package/src/get-max-width.ts +11 -0
- package/src/global.d.ts +36 -0
- package/src/hooks/use-animation.ts +142 -0
- package/src/hooks/use-app.ts +8 -0
- package/src/hooks/use-box-metrics.ts +134 -0
- package/src/hooks/use-cursor.ts +33 -0
- package/src/hooks/use-focus-manager.ts +62 -0
- package/src/hooks/use-focus.ts +83 -0
- package/src/hooks/use-input.ts +267 -0
- package/src/hooks/use-is-screen-reader-enabled.ts +12 -0
- package/src/hooks/use-paste.ts +78 -0
- package/src/hooks/use-stderr.ts +8 -0
- package/src/hooks/use-stdin.ts +10 -0
- package/src/hooks/use-stdout.ts +8 -0
- package/src/hooks/use-window-size.ts +41 -0
- package/src/indent-string.ts +16 -0
- package/src/index.ts +44 -0
- package/src/ink.tsx +1506 -0
- package/src/input-parser.ts +283 -0
- package/src/instances.ts +9 -0
- package/src/is-in-ci.ts +7 -0
- package/src/kitty-keyboard.ts +57 -0
- package/src/log-update.ts +370 -0
- package/src/measure-element.ts +62 -0
- package/src/measure-text.ts +31 -0
- package/src/output.ts +308 -0
- package/src/parse-keypress.ts +516 -0
- package/src/parse-stack-line.ts +139 -0
- package/src/patch-console.ts +62 -0
- package/src/quick-lru.ts +85 -0
- package/src/reconciler.ts +451 -0
- package/src/render-background.ts +38 -0
- package/src/render-border.ts +134 -0
- package/src/render-node-to-output.ts +191 -0
- package/src/render-to-string.ts +131 -0
- package/src/render.ts +276 -0
- package/src/renderer.ts +73 -0
- package/src/sanitize-ansi.ts +33 -0
- package/src/signal-exit.ts +107 -0
- package/src/squash-text-nodes.ts +40 -0
- package/src/stream.ts +30 -0
- package/src/styles.ts +748 -0
- package/src/terminal-size.ts +57 -0
- package/src/throttle.ts +73 -0
- package/src/types.ts +15 -0
- package/src/utils.ts +40 -0
- package/src/wrap-text.ts +50 -0
- package/src/write-synchronized.ts +9 -0
- package/src/yoga/config.ts +57 -0
- package/src/yoga/core/absoluteLayout.ts +626 -0
- package/src/yoga/core/baseline.ts +66 -0
- package/src/yoga/core/cache.ts +136 -0
- package/src/yoga/core/calculateLayout.ts +2920 -0
- package/src/yoga/core/config.ts +104 -0
- package/src/yoga/core/flexLine.ts +177 -0
- package/src/yoga/core/helpers.ts +293 -0
- package/src/yoga/core/layoutResults.ts +167 -0
- package/src/yoga/core/node.ts +611 -0
- package/src/yoga/core/numeric.ts +44 -0
- package/src/yoga/core/pixelGrid.ts +151 -0
- package/src/yoga/core/style.ts +887 -0
- package/src/yoga/core/types.ts +224 -0
- package/src/yoga/generated/YGEnums.ts +263 -0
- package/src/yoga/index.ts +19 -0
- package/src/yoga/node.ts +1140 -0
- package/dist/index.d.mts +0 -2379
- package/dist/index.mjs +0 -10072
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
//#region src/ansi/sgr.d.ts
|
|
2
|
+
type StylePair = {
|
|
3
|
+
readonly open: string;
|
|
4
|
+
readonly close: string;
|
|
5
|
+
};
|
|
6
|
+
declare const modifierCodes: {
|
|
7
|
+
readonly reset: readonly [0, 0];
|
|
8
|
+
readonly bold: readonly [1, 22];
|
|
9
|
+
readonly dim: readonly [2, 22];
|
|
10
|
+
readonly italic: readonly [3, 23];
|
|
11
|
+
readonly underline: readonly [4, 24];
|
|
12
|
+
readonly overline: readonly [53, 55];
|
|
13
|
+
readonly inverse: readonly [7, 27];
|
|
14
|
+
readonly hidden: readonly [8, 28];
|
|
15
|
+
readonly strikethrough: readonly [9, 29];
|
|
16
|
+
};
|
|
17
|
+
declare const colorCodes: {
|
|
18
|
+
readonly black: readonly [30, 39];
|
|
19
|
+
readonly red: readonly [31, 39];
|
|
20
|
+
readonly green: readonly [32, 39];
|
|
21
|
+
readonly yellow: readonly [33, 39];
|
|
22
|
+
readonly blue: readonly [34, 39];
|
|
23
|
+
readonly magenta: readonly [35, 39];
|
|
24
|
+
readonly cyan: readonly [36, 39];
|
|
25
|
+
readonly white: readonly [37, 39];
|
|
26
|
+
readonly blackBright: readonly [90, 39];
|
|
27
|
+
readonly gray: readonly [90, 39];
|
|
28
|
+
readonly grey: readonly [90, 39];
|
|
29
|
+
readonly redBright: readonly [91, 39];
|
|
30
|
+
readonly greenBright: readonly [92, 39];
|
|
31
|
+
readonly yellowBright: readonly [93, 39];
|
|
32
|
+
readonly blueBright: readonly [94, 39];
|
|
33
|
+
readonly magentaBright: readonly [95, 39];
|
|
34
|
+
readonly cyanBright: readonly [96, 39];
|
|
35
|
+
readonly whiteBright: readonly [97, 39];
|
|
36
|
+
};
|
|
37
|
+
declare const bgColorCodes: {
|
|
38
|
+
readonly bgBlack: readonly [40, 49];
|
|
39
|
+
readonly bgRed: readonly [41, 49];
|
|
40
|
+
readonly bgGreen: readonly [42, 49];
|
|
41
|
+
readonly bgYellow: readonly [43, 49];
|
|
42
|
+
readonly bgBlue: readonly [44, 49];
|
|
43
|
+
readonly bgMagenta: readonly [45, 49];
|
|
44
|
+
readonly bgCyan: readonly [46, 49];
|
|
45
|
+
readonly bgWhite: readonly [47, 49];
|
|
46
|
+
readonly bgBlackBright: readonly [100, 49];
|
|
47
|
+
readonly bgGray: readonly [100, 49];
|
|
48
|
+
readonly bgGrey: readonly [100, 49];
|
|
49
|
+
readonly bgRedBright: readonly [101, 49];
|
|
50
|
+
readonly bgGreenBright: readonly [102, 49];
|
|
51
|
+
readonly bgYellowBright: readonly [103, 49];
|
|
52
|
+
readonly bgBlueBright: readonly [104, 49];
|
|
53
|
+
readonly bgMagentaBright: readonly [105, 49];
|
|
54
|
+
readonly bgCyanBright: readonly [106, 49];
|
|
55
|
+
readonly bgWhiteBright: readonly [107, 49];
|
|
56
|
+
};
|
|
57
|
+
type ModifierName = keyof typeof modifierCodes;
|
|
58
|
+
type ForegroundColorName = keyof typeof colorCodes;
|
|
59
|
+
type BackgroundColorName = keyof typeof bgColorCodes;
|
|
60
|
+
type StyleName = ModifierName | ForegroundColorName | BackgroundColorName;
|
|
61
|
+
declare const modifierNames: ModifierName[];
|
|
62
|
+
declare const foregroundColorNames: ForegroundColorName[];
|
|
63
|
+
declare const backgroundColorNames: BackgroundColorName[];
|
|
64
|
+
/**
|
|
65
|
+
Named SGR styles as `{open, close}` escape sequence pairs.
|
|
66
|
+
*/
|
|
67
|
+
declare const styles: Record<StyleName, StylePair>;
|
|
68
|
+
/**
|
|
69
|
+
Raw SGR code numbers: open code → close code.
|
|
70
|
+
*/
|
|
71
|
+
declare const codes: ReadonlyMap<number, number>;
|
|
72
|
+
declare const foreground: {
|
|
73
|
+
close: string;
|
|
74
|
+
ansi: (code: number) => string;
|
|
75
|
+
ansi256: (code: number) => string;
|
|
76
|
+
ansi16m: (red: number, green: number, blue: number) => string;
|
|
77
|
+
};
|
|
78
|
+
declare const background: {
|
|
79
|
+
close: string;
|
|
80
|
+
ansi: (code: number) => string;
|
|
81
|
+
ansi256: (code: number) => string;
|
|
82
|
+
ansi16m: (red: number, green: number, blue: number) => string;
|
|
83
|
+
};
|
|
84
|
+
declare const rgbToAnsi256: (red: number, green: number, blue: number) => number;
|
|
85
|
+
declare const hexToRgb: (hex: string) => [number, number, number];
|
|
86
|
+
declare const hexToAnsi256: (hex: string) => number;
|
|
87
|
+
declare const ansi256ToAnsi: (code: number) => number;
|
|
88
|
+
declare const rgbToAnsi: (red: number, green: number, blue: number) => number;
|
|
89
|
+
declare const hexToAnsi: (hex: string) => number;
|
|
90
|
+
//#endregion
|
|
91
|
+
export { rgbToAnsi256 as _, StylePair as a, backgroundColorNames as c, foregroundColorNames as d, hexToAnsi as f, rgbToAnsi as g, modifierNames as h, StyleName as i, codes as l, hexToRgb as m, ForegroundColorName as n, ansi256ToAnsi as o, hexToAnsi256 as p, ModifierName as r, background as s, BackgroundColorName as t, foreground as u, styles as v };
|