@alchemy.run/sigil 0.0.0-alpha.1 → 0.0.0-alpha.10

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.
Files changed (212) hide show
  1. package/README.md +499 -313
  2. package/THIRD_PARTY_NOTICES.md +70 -23
  3. package/dist/Text-DV9CuzAT.d.ts +452 -0
  4. package/dist/ansi.d.ts +217 -0
  5. package/dist/ansi.js +87 -0
  6. package/dist/capabilities.d.ts +5 -0
  7. package/dist/capabilities.js +3 -0
  8. package/dist/cell-_ZVhbfl0.js +44 -0
  9. package/dist/color-CkbalRqK.js +2 -0
  10. package/dist/color-policy-BAC9-TZX.js +592 -0
  11. package/dist/color-policy-CCxuHIdD.d.ts +22 -0
  12. package/dist/color-profile-CyeHnG1T.d.ts +97 -0
  13. package/dist/color-profile-DHhQHY55.js +36 -0
  14. package/dist/color.d.ts +21 -0
  15. package/dist/color.js +3 -0
  16. package/dist/cursor-position-D2LAkRG0.d.ts +7 -0
  17. package/dist/detect-B3dL4Q11.js +374 -0
  18. package/dist/detect-Db6GbKOm.d.ts +195 -0
  19. package/dist/{devtools-QpCMm9JH.mjs → devtools-DbthxoD1.js} +23 -24
  20. package/dist/env-YVw64yZS.js +9 -0
  21. package/dist/escapes-CB_6CWOE.d.ts +72 -0
  22. package/dist/geometry-BxXOzJgo.d.ts +11 -0
  23. package/dist/index-D48vQhhe.d.ts +21 -0
  24. package/dist/index-DDVME65c.d.ts +919 -0
  25. package/dist/index.d.ts +1310 -0
  26. package/dist/index.js +3209 -0
  27. package/dist/osc-BFKKSqpg.js +71 -0
  28. package/dist/osc-Cn0fw77g.d.ts +23 -0
  29. package/dist/paint-Cx-zC_sX.d.ts +81 -0
  30. package/dist/query-BNc2B8GD.d.ts +152 -0
  31. package/dist/router.d.ts +392 -0
  32. package/dist/router.js +709 -0
  33. package/dist/sample-Cqw1bjUL.js +445 -0
  34. package/dist/screen-CgC2WlVM.d.ts +49 -0
  35. package/dist/screen-CiPytswf.js +342 -0
  36. package/dist/screen.d.ts +5 -0
  37. package/dist/screen.js +5 -0
  38. package/dist/semantic-text-style-DIMzC7xt.js +91 -0
  39. package/dist/serialize-BTkAZgw1.js +79 -0
  40. package/dist/session-DDQ5V300.js +723 -0
  41. package/dist/sgr-BhwaWAJB.js +246 -0
  42. package/dist/store-C1P5fOUi.d.ts +72 -0
  43. package/dist/string-width-CijQwpIk.js +69 -0
  44. package/dist/strip-BvU4toXG.js +6 -0
  45. package/dist/terminal.d.ts +121 -0
  46. package/dist/terminal.js +2 -0
  47. package/dist/tokenize-AjqbvtiT.js +1242 -0
  48. package/dist/tokenize-Dx1y_l5H.d.ts +57 -0
  49. package/dist/truncate-D31fhU6i.js +562 -0
  50. package/dist/use-focus-CcCIdCWA.js +1337 -0
  51. package/dist/yoga-5jKhYCJC.js +3465 -0
  52. package/dist/yoga.d.ts +2 -0
  53. package/dist/yoga.js +2 -0
  54. package/package.json +70 -24
  55. package/src/ansi/chalk.ts +138 -0
  56. package/src/ansi/cursor.ts +46 -0
  57. package/src/ansi/east-asian-width.ts +259 -0
  58. package/src/ansi/escapes.ts +120 -0
  59. package/src/ansi/graphemes.ts +8 -0
  60. package/src/ansi/hyperlink.ts +44 -0
  61. package/src/ansi/index.ts +27 -0
  62. package/src/ansi/osc.ts +77 -0
  63. package/src/ansi/sgr.ts +234 -0
  64. package/src/ansi/slice.ts +43 -0
  65. package/src/ansi/string-width.ts +121 -0
  66. package/src/ansi/strip.ts +13 -0
  67. package/src/ansi/tokenize.ts +380 -0
  68. package/src/ansi/truncate.ts +196 -0
  69. package/src/ansi/wrap.ts +765 -0
  70. package/src/ansi-tokenizer.ts +510 -0
  71. package/src/capabilities/color-policy.ts +34 -0
  72. package/src/capabilities/detect.ts +608 -0
  73. package/src/capabilities/index.ts +37 -0
  74. package/src/capabilities/query.ts +679 -0
  75. package/src/capabilities/store.ts +394 -0
  76. package/src/code-excerpt.ts +39 -0
  77. package/src/color/index.ts +3 -0
  78. package/src/color/paint.ts +169 -0
  79. package/src/color/palette.ts +48 -0
  80. package/src/color/sample.ts +323 -0
  81. package/src/color.ts +1 -0
  82. package/src/components/AccessibilityContext.ts +5 -0
  83. package/src/components/AnimationContext.ts +24 -0
  84. package/src/components/AnsiText.tsx +42 -0
  85. package/src/components/App.tsx +878 -0
  86. package/src/components/AppContext.ts +111 -0
  87. package/src/components/BackgroundContext.ts +7 -0
  88. package/src/components/Box.tsx +100 -0
  89. package/src/components/CursorContext.ts +19 -0
  90. package/src/components/ErrorBoundary.tsx +39 -0
  91. package/src/components/ErrorOverview.tsx +135 -0
  92. package/src/components/FocusContext.ts +30 -0
  93. package/src/components/Hyperlink.tsx +56 -0
  94. package/src/components/Newline.tsx +16 -0
  95. package/src/components/Spacer.tsx +11 -0
  96. package/src/components/Static.tsx +60 -0
  97. package/src/components/StderrContext.ts +24 -0
  98. package/src/components/StdinContext.ts +48 -0
  99. package/src/components/StdoutContext.ts +26 -0
  100. package/src/components/TerminalOscContext.ts +25 -0
  101. package/src/components/Text.tsx +122 -0
  102. package/src/components/Transform.tsx +38 -0
  103. package/src/components/VirtualList.tsx +128 -0
  104. package/src/cursor-position.ts +103 -0
  105. package/src/devtools.ts +103 -0
  106. package/src/dom.ts +301 -0
  107. package/src/env.ts +12 -0
  108. package/src/get-max-width.ts +11 -0
  109. package/src/global.d.ts +38 -0
  110. package/src/glyphs.ts +99 -0
  111. package/src/hooks/use-animation.ts +142 -0
  112. package/src/hooks/use-app.ts +8 -0
  113. package/src/hooks/use-box-metrics.ts +134 -0
  114. package/src/hooks/use-capabilities.ts +73 -0
  115. package/src/hooks/use-cursor.ts +33 -0
  116. package/src/hooks/use-focus-manager.ts +62 -0
  117. package/src/hooks/use-focus.ts +82 -0
  118. package/src/hooks/use-input.ts +267 -0
  119. package/src/hooks/use-is-screen-reader-enabled.ts +12 -0
  120. package/src/hooks/use-paste.ts +78 -0
  121. package/src/hooks/use-stderr.ts +8 -0
  122. package/src/hooks/use-stdin.ts +10 -0
  123. package/src/hooks/use-stdout.ts +8 -0
  124. package/src/hooks/use-terminal-osc.ts +59 -0
  125. package/src/hooks/use-virtual-scroll.ts +84 -0
  126. package/src/hooks/use-window-size.ts +37 -0
  127. package/src/index.ts +96 -0
  128. package/src/ink.tsx +1452 -0
  129. package/src/input-parser.ts +303 -0
  130. package/src/instances.ts +9 -0
  131. package/src/kitty-keyboard.ts +185 -0
  132. package/src/measure-element.ts +62 -0
  133. package/src/measure-text.ts +31 -0
  134. package/src/paint-tree.ts +220 -0
  135. package/src/parse-keypress.ts +515 -0
  136. package/src/parse-stack-line.ts +138 -0
  137. package/src/patch-console.ts +106 -0
  138. package/src/quick-lru.ts +85 -0
  139. package/src/reconciler.ts +425 -0
  140. package/src/render-background.ts +59 -0
  141. package/src/render-border.ts +167 -0
  142. package/src/render-frame.ts +83 -0
  143. package/src/render-to-string.ts +146 -0
  144. package/src/render.ts +284 -0
  145. package/src/router/components.tsx +343 -0
  146. package/src/router/context.ts +41 -0
  147. package/src/router/history.ts +194 -0
  148. package/src/router/hooks.tsx +391 -0
  149. package/src/router/index.ts +34 -0
  150. package/src/router/matcher.ts +571 -0
  151. package/src/sanitize-ansi.ts +33 -0
  152. package/src/screen/ansi.ts +184 -0
  153. package/src/screen/canvas.ts +160 -0
  154. package/src/screen/cell.ts +138 -0
  155. package/src/screen/color-profile.ts +47 -0
  156. package/src/screen/geometry.ts +9 -0
  157. package/src/screen/index.ts +6 -0
  158. package/src/screen/screen.ts +305 -0
  159. package/src/screen/serialize.ts +129 -0
  160. package/src/screen.ts +1 -0
  161. package/src/semantic-text-style.ts +118 -0
  162. package/src/signal-exit.ts +106 -0
  163. package/src/squash-text-nodes.ts +37 -0
  164. package/src/stream.ts +28 -0
  165. package/src/structured-text.ts +325 -0
  166. package/src/styles.ts +753 -0
  167. package/src/terminal/index.ts +2 -0
  168. package/src/terminal/inline-presenter.ts +120 -0
  169. package/src/terminal/input.ts +92 -0
  170. package/src/terminal/render-scheduler.ts +37 -0
  171. package/src/terminal/screen-presenter.ts +242 -0
  172. package/src/terminal/session.ts +408 -0
  173. package/src/terminal-size.ts +58 -0
  174. package/src/terminal.ts +1 -0
  175. package/src/testing/browser.ts +588 -0
  176. package/src/testing/emulators.ts +205 -0
  177. package/src/testing/explorer-app/index.html +12 -0
  178. package/src/testing/explorer-app/main.ts +381 -0
  179. package/src/testing/explorer-app/style.css +194 -0
  180. package/src/testing/explorer-app/tsconfig.json +15 -0
  181. package/src/testing/explorer-app/vite-env.d.ts +1 -0
  182. package/src/testing/index.ts +26 -0
  183. package/src/testing/keys.ts +56 -0
  184. package/src/testing/live.ts +85 -0
  185. package/src/testing/matchers.ts +70 -0
  186. package/src/testing/public.ts +94 -0
  187. package/src/testing/terminal.ts +361 -0
  188. package/src/testing/vitest.ts +157 -0
  189. package/src/throttle.ts +73 -0
  190. package/src/transform-adapter.ts +14 -0
  191. package/src/types.ts +10 -0
  192. package/src/virtual-scroll.ts +133 -0
  193. package/src/wrap-text.ts +54 -0
  194. package/src/yoga/config.ts +57 -0
  195. package/src/yoga/core/absoluteLayout.ts +626 -0
  196. package/src/yoga/core/baseline.ts +66 -0
  197. package/src/yoga/core/cache.ts +136 -0
  198. package/src/yoga/core/calculateLayout.ts +2926 -0
  199. package/src/yoga/core/config.ts +104 -0
  200. package/src/yoga/core/flexLine.ts +177 -0
  201. package/src/yoga/core/helpers.ts +293 -0
  202. package/src/yoga/core/layoutResults.ts +167 -0
  203. package/src/yoga/core/node.ts +611 -0
  204. package/src/yoga/core/numeric.ts +44 -0
  205. package/src/yoga/core/pixelGrid.ts +151 -0
  206. package/src/yoga/core/style.ts +887 -0
  207. package/src/yoga/core/types.ts +224 -0
  208. package/src/yoga/generated/YGEnums.ts +263 -0
  209. package/src/yoga/index.ts +19 -0
  210. package/src/yoga/node.ts +1140 -0
  211. package/dist/index.d.mts +0 -2379
  212. package/dist/index.mjs +0 -10072
@@ -9,6 +9,15 @@ specific origin of each file.
9
9
  The core of this project is a fork of [Ink](https://github.com/vadimdemedes/ink).
10
10
  Copyright (c) Vadym Demedes. See the root `LICENSE` file.
11
11
 
12
+ ## Lip Gloss examples
13
+
14
+ The examples under `examples/charm-*` are ports or adaptations of visual demos
15
+ from [Charmbracelet Lip Gloss](https://github.com/charmbracelet/lipgloss).
16
+
17
+ Copyright (c) 2020-2026 Charmbracelet, Inc.
18
+
19
+ Licensed under the MIT License (text below).
20
+
12
21
  ## Yoga
13
22
 
14
23
  The layout engine (`src/yoga/`) is a TypeScript port of
@@ -40,37 +49,20 @@ SOFTWARE.
40
49
  ## Packages by Sindre Sorhus (MIT)
41
50
 
42
51
  Portions of `src/ansi/` and `src/` are derived from the following packages:
43
- `ansi-escapes`, `ansi-regex`, `ansi-styles`, `auto-bind`, `chalk`, `cli-boxes`,
44
- `cli-cursor`, `cli-truncate`, `get-east-asian-width`, `indent-string`,
45
- `is-fullwidth-code-point`, `is-in-ci`, `quick-lru`, `restore-cursor`,
46
- `slice-ansi`, `string-width`, `strip-ansi`, `terminal-size`, `type-fest`,
47
- `widest-line`, `wrap-ansi`.
52
+ `ansi-escapes`, `ansi-styles`, `chalk`, `cli-boxes`,
53
+ `cli-cursor`, `cli-truncate`, `get-east-asian-width`,
54
+ `is-fullwidth-code-point`, `quick-lru`, `restore-cursor`,
55
+ `slice-ansi`, `terminal-size`, `type-fest`, `wrap-ansi`.
48
56
 
49
57
  MIT License
50
58
 
51
59
  Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
52
60
 
53
- Permission is hereby granted, free of charge, to any person obtaining a copy
54
- of this software and associated documentation files (the "Software"), to deal
55
- in the Software without restriction, including without limitation the rights
56
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
57
- copies of the Software, and to permit persons to whom the Software is
58
- furnished to do so, subject to the following conditions:
59
-
60
- The above copyright notice and this permission notice shall be included in all
61
- copies or substantial portions of the Software.
62
-
63
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
64
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
65
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
66
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
67
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
68
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
69
- SOFTWARE.
61
+ Licensed under the MIT License (text above).
70
62
 
71
63
  ## supports-color (MIT)
72
64
 
73
- `src/ansi/supports-color.ts` is derived from `supports-color`.
65
+ The color-level detection in `src/capabilities/detect.ts` is derived from `supports-color`.
74
66
 
75
67
  Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
76
68
  and Josh Junon.
@@ -112,6 +104,32 @@ Copyright (c) 2016-2022 Isaac Z. Schlueter <i@izs.me>, James Talmage
112
104
 
113
105
  Licensed under the MIT License (text above).
114
106
 
107
+ ## fast-string-truncated-width (MIT)
108
+
109
+ `src/ansi/string-width.ts` is derived from `fast-string-truncated-width`.
110
+
111
+ The MIT License (MIT)
112
+
113
+ Copyright (c) 2024-present Fabio Spampinato
114
+
115
+ Licensed under the MIT License (text above).
116
+
117
+ ## es-toolkit (MIT)
118
+
119
+ `src/throttle.ts` is derived from `throttle` in `es-toolkit/compat`.
120
+
121
+ Copyright (c) 2024 Viva Republica, Inc.
122
+
123
+ Licensed under the MIT License (text above).
124
+
125
+ ## enquirer (MIT)
126
+
127
+ `src/parse-keypress.ts` is derived from `enquirer`'s `lib/keypress.js`.
128
+
129
+ Copyright (c) 2016-present, Jon Schlinkert and Contributors.
130
+
131
+ Licensed under the MIT License (text above).
132
+
115
133
  ## signal-exit (ISC)
116
134
 
117
135
  `src/signal-exit.ts` is a minimal reimplementation of `signal-exit`'s
@@ -132,3 +150,32 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
132
150
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
133
151
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
134
152
  PERFORMANCE OF THIS SOFTWARE.
153
+
154
+ ## react-router (MIT)
155
+
156
+ The route matching engine and component model of `src/router/` are ported from
157
+ [react-router](https://github.com/remix-run/react-router)'s declarative mode.
158
+
159
+ Copyright (c) React Training LLC 2015-2019, Remix Software Inc. 2020-2021,
160
+ and Shopify Inc. 2022-2023.
161
+
162
+ Licensed under the MIT License (text above).
163
+
164
+ ## supports-hyperlinks (MIT)
165
+
166
+ The hyperlink detection in `src/capabilities/detect.ts` is derived from
167
+ `supports-hyperlinks`.
168
+
169
+ Copyright (c) James Talmage <james@talmage.io> (https://github.com/jamestalmage)
170
+ and Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
171
+
172
+ Licensed under the MIT License (text above).
173
+
174
+ ## is-unicode-supported (MIT)
175
+
176
+ `detectUnicodeSupport` in `src/capabilities/detect.ts` is derived from
177
+ `is-unicode-supported`.
178
+
179
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
180
+
181
+ Licensed under the MIT License (text above).
@@ -0,0 +1,452 @@
1
+ import { s as Paint } from "./paint-Cx-zC_sX.js";
2
+ import { ReactNode } from "react";
3
+ //#region src/glyphs.d.ts
4
+ declare const BOXES: {
5
+ readonly single: {
6
+ readonly topLeft: "┌";
7
+ readonly top: "─";
8
+ readonly topRight: "┐";
9
+ readonly right: "│";
10
+ readonly bottomRight: "┘";
11
+ readonly bottom: "─";
12
+ readonly bottomLeft: "└";
13
+ readonly left: "│";
14
+ };
15
+ readonly double: {
16
+ readonly topLeft: "╔";
17
+ readonly top: "═";
18
+ readonly topRight: "╗";
19
+ readonly right: "║";
20
+ readonly bottomRight: "╝";
21
+ readonly bottom: "═";
22
+ readonly bottomLeft: "╚";
23
+ readonly left: "║";
24
+ };
25
+ readonly round: {
26
+ readonly topLeft: "╭";
27
+ readonly top: "─";
28
+ readonly topRight: "╮";
29
+ readonly right: "│";
30
+ readonly bottomRight: "╯";
31
+ readonly bottom: "─";
32
+ readonly bottomLeft: "╰";
33
+ readonly left: "│";
34
+ };
35
+ readonly bold: {
36
+ readonly topLeft: "┏";
37
+ readonly top: "━";
38
+ readonly topRight: "┓";
39
+ readonly right: "┃";
40
+ readonly bottomRight: "┛";
41
+ readonly bottom: "━";
42
+ readonly bottomLeft: "┗";
43
+ readonly left: "┃";
44
+ };
45
+ readonly singleDouble: {
46
+ readonly topLeft: "╓";
47
+ readonly top: "─";
48
+ readonly topRight: "╖";
49
+ readonly right: "║";
50
+ readonly bottomRight: "╜";
51
+ readonly bottom: "─";
52
+ readonly bottomLeft: "╙";
53
+ readonly left: "║";
54
+ };
55
+ readonly doubleSingle: {
56
+ readonly topLeft: "╒";
57
+ readonly top: "═";
58
+ readonly topRight: "╕";
59
+ readonly right: "│";
60
+ readonly bottomRight: "╛";
61
+ readonly bottom: "═";
62
+ readonly bottomLeft: "╘";
63
+ readonly left: "│";
64
+ };
65
+ readonly classic: {
66
+ readonly topLeft: "+";
67
+ readonly top: "-";
68
+ readonly topRight: "+";
69
+ readonly right: "|";
70
+ readonly bottomRight: "+";
71
+ readonly bottom: "-";
72
+ readonly bottomLeft: "+";
73
+ readonly left: "|";
74
+ };
75
+ readonly arrow: {
76
+ readonly topLeft: "↘";
77
+ readonly top: "↓";
78
+ readonly topRight: "↙";
79
+ readonly right: "←";
80
+ readonly bottomRight: "↖";
81
+ readonly bottom: "↑";
82
+ readonly bottomLeft: "↗";
83
+ readonly left: "→";
84
+ };
85
+ };
86
+ type BoxStyle = keyof typeof BOXES;
87
+ /**
88
+ The set of glyphs making up a box border, for custom `borderStyle` objects.
89
+ */
90
+ type BoxGlyphs = {
91
+ readonly topLeft: string;
92
+ readonly top: string;
93
+ readonly topRight: string;
94
+ readonly right: string;
95
+ readonly bottomRight: string;
96
+ readonly bottom: string;
97
+ readonly bottomLeft: string;
98
+ readonly left: string;
99
+ };
100
+ //#endregion
101
+ //#region src/styles.d.ts
102
+ type Styles = {
103
+ readonly textWrap?: "wrap" | "hard" | "truncate-end" | "truncate" | "truncate-middle" | "truncate-start" | "none";
104
+ /**
105
+ Controls how the element is positioned.
106
+
107
+ When `position` is `static`, `top`, `right`, `bottom`, and `left` are ignored.
108
+ */
109
+ readonly position?: "absolute" | "relative" | "static";
110
+ /**
111
+ Top offset for positioned elements.
112
+ */
113
+ readonly top?: number | string;
114
+ /**
115
+ Right offset for positioned elements.
116
+ */
117
+ readonly right?: number | string;
118
+ /**
119
+ Bottom offset for positioned elements.
120
+ */
121
+ readonly bottom?: number | string;
122
+ /**
123
+ Left offset for positioned elements.
124
+ */
125
+ readonly left?: number | string;
126
+ /**
127
+ Size of the gap between an element's columns.
128
+ */
129
+ readonly columnGap?: number;
130
+ /**
131
+ Size of the gap between an element's rows.
132
+ */
133
+ readonly rowGap?: number;
134
+ /**
135
+ Size of the gap between an element's columns and rows. A shorthand for `columnGap` and `rowGap`.
136
+ */
137
+ readonly gap?: number;
138
+ /**
139
+ Margin on all sides. Equivalent to setting `marginTop`, `marginBottom`, `marginLeft`, and `marginRight`.
140
+ */
141
+ readonly margin?: number;
142
+ /**
143
+ Horizontal margin. Equivalent to setting `marginLeft` and `marginRight`.
144
+ */
145
+ readonly marginX?: number;
146
+ /**
147
+ Vertical margin. Equivalent to setting `marginTop` and `marginBottom`.
148
+ */
149
+ readonly marginY?: number;
150
+ /**
151
+ Top margin.
152
+ */
153
+ readonly marginTop?: number;
154
+ /**
155
+ Bottom margin.
156
+ */
157
+ readonly marginBottom?: number;
158
+ /**
159
+ Left margin.
160
+ */
161
+ readonly marginLeft?: number;
162
+ /**
163
+ Right margin.
164
+ */
165
+ readonly marginRight?: number;
166
+ /**
167
+ Padding on all sides. Equivalent to setting `paddingTop`, `paddingBottom`, `paddingLeft`, and `paddingRight`.
168
+ */
169
+ readonly padding?: number;
170
+ /**
171
+ Horizontal padding. Equivalent to setting `paddingLeft` and `paddingRight`.
172
+ */
173
+ readonly paddingX?: number;
174
+ /**
175
+ Vertical padding. Equivalent to setting `paddingTop` and `paddingBottom`.
176
+ */
177
+ readonly paddingY?: number;
178
+ /**
179
+ Top padding.
180
+ */
181
+ readonly paddingTop?: number;
182
+ /**
183
+ Bottom padding.
184
+ */
185
+ readonly paddingBottom?: number;
186
+ /**
187
+ Left padding.
188
+ */
189
+ readonly paddingLeft?: number;
190
+ /**
191
+ Right padding.
192
+ */
193
+ readonly paddingRight?: number;
194
+ /**
195
+ This property defines the ability for a flex item to grow if necessary.
196
+ See [flex-grow](https://css-tricks.com/almanac/properties/f/flex-grow/).
197
+ */
198
+ readonly flexGrow?: number;
199
+ /**
200
+ It specifies the “flex shrink factor”, which determines how much the flex item will shrink relative to the rest of the flex items in the flex container when there isn't enough space on the row.
201
+ See [flex-shrink](https://css-tricks.com/almanac/properties/f/flex-shrink/).
202
+ */
203
+ readonly flexShrink?: number;
204
+ /**
205
+ It establishes the main-axis, thus defining the direction flex items are placed in the flex container.
206
+ See [flex-direction](https://css-tricks.com/almanac/properties/f/flex-direction/).
207
+ */
208
+ readonly flexDirection?: "row" | "column" | "row-reverse" | "column-reverse";
209
+ /**
210
+ It specifies the initial size of the flex item, before any available space is distributed according to the flex factors.
211
+ See [flex-basis](https://css-tricks.com/almanac/properties/f/flex-basis/).
212
+ */
213
+ readonly flexBasis?: number | string;
214
+ /**
215
+ It defines whether the flex items are forced in a single line or can be flowed into multiple lines. If set to multiple lines, it also defines the cross-axis which determines the direction new lines are stacked in.
216
+ See [flex-wrap](https://css-tricks.com/almanac/properties/f/flex-wrap/).
217
+ */
218
+ readonly flexWrap?: "nowrap" | "wrap" | "wrap-reverse";
219
+ /**
220
+ The align-items property defines the default behavior for how items are laid out along the cross axis (perpendicular to the main axis).
221
+ See [align-items](https://css-tricks.com/almanac/properties/a/align-items/).
222
+ */
223
+ readonly alignItems?: "flex-start" | "center" | "flex-end" | "stretch" | "baseline";
224
+ /**
225
+ It makes possible to override the align-items value for specific flex items.
226
+ See [align-self](https://css-tricks.com/almanac/properties/a/align-self/).
227
+ */
228
+ readonly alignSelf?: "flex-start" | "center" | "flex-end" | "auto" | "stretch" | "baseline";
229
+ /**
230
+ It defines the alignment along the cross axis when there are multiple lines of flex items (when using flex-wrap).
231
+ See [align-content](https://css-tricks.com/almanac/properties/a/align-content/).
232
+ */
233
+ readonly alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around" | "space-evenly";
234
+ /**
235
+ It defines the alignment along the main axis.
236
+ See [justify-content](https://css-tricks.com/almanac/properties/j/justify-content/).
237
+ */
238
+ readonly justifyContent?: "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "center";
239
+ /**
240
+ Width of the element in spaces. You can also set it as a percentage, which will calculate the width based on the width of the parent element.
241
+ */
242
+ readonly width?: number | string;
243
+ /**
244
+ Height of the element in lines (rows). You can also set it as a percentage, which will calculate the height based on the height of the parent element.
245
+ */
246
+ readonly height?: number | string;
247
+ /**
248
+ Sets a minimum width of the element.
249
+ Percentages aren't supported yet; see https://github.com/facebook/yoga/issues/872.
250
+ */
251
+ readonly minWidth?: number | string;
252
+ /**
253
+ Sets a minimum height of the element in lines (rows). You can also set it as a percentage, which will calculate the minimum height based on the height of the parent element.
254
+ */
255
+ readonly minHeight?: number | string;
256
+ /**
257
+ Sets a maximum width of the element.
258
+ Percentages aren't supported yet; see https://github.com/facebook/yoga/issues/872.
259
+ */
260
+ readonly maxWidth?: number | string;
261
+ /**
262
+ Sets a maximum height of the element in lines (rows). You can also set it as a percentage, which will calculate the maximum height based on the height of the parent element.
263
+ */
264
+ readonly maxHeight?: number | string;
265
+ /**
266
+ Defines the aspect ratio (width/height) for the element.
267
+
268
+ Use it with at least one size constraint (`width`, `height`, `minHeight`, or `maxHeight`) so Ink can derive the missing dimension.
269
+ */
270
+ readonly aspectRatio?: number;
271
+ /**
272
+ Set this property to `none` to hide the element.
273
+ */
274
+ readonly display?: "flex" | "none";
275
+ /**
276
+ Add a border with a specified style. If `borderStyle` is `undefined` (the default), no border will be added.
277
+ */
278
+ readonly borderStyle?: BoxStyle | BoxGlyphs;
279
+ /**
280
+ Determines whether the top border is visible.
281
+
282
+ @default true
283
+ */
284
+ readonly borderTop?: boolean;
285
+ /**
286
+ Determines whether the bottom border is visible.
287
+
288
+ @default true
289
+ */
290
+ readonly borderBottom?: boolean;
291
+ /**
292
+ Determines whether the left border is visible.
293
+
294
+ @default true
295
+ */
296
+ readonly borderLeft?: boolean;
297
+ /**
298
+ Determines whether the right border is visible.
299
+
300
+ @default true
301
+ */
302
+ readonly borderRight?: boolean;
303
+ /**
304
+ Change border color. A shorthand for setting `borderTopColor`, `borderRightColor`, `borderBottomColor`, and `borderLeftColor`.
305
+ */
306
+ readonly borderColor?: Paint;
307
+ /**
308
+ Change the top border color. Accepts the same values as `color` in `Text` component.
309
+ */
310
+ readonly borderTopColor?: Paint;
311
+ /**
312
+ Change the bottom border color. Accepts the same values as `color` in `Text` component.
313
+ */
314
+ readonly borderBottomColor?: Paint;
315
+ /**
316
+ Change the left border color. Accepts the same values as `color` in `Text` component.
317
+ */
318
+ readonly borderLeftColor?: Paint;
319
+ /**
320
+ Change the right border color. Accepts the same values as `color` in `Text` component.
321
+ */
322
+ readonly borderRightColor?: Paint;
323
+ /**
324
+ Dim the border color. A shorthand for setting `borderTopDimColor`, `borderBottomDimColor`, `borderLeftDimColor`, and `borderRightDimColor`.
325
+
326
+ @default false
327
+ */
328
+ readonly borderDimColor?: boolean;
329
+ /**
330
+ Dim the top border color.
331
+
332
+ @default false
333
+ */
334
+ readonly borderTopDimColor?: boolean;
335
+ /**
336
+ Dim the bottom border color.
337
+
338
+ @default false
339
+ */
340
+ readonly borderBottomDimColor?: boolean;
341
+ /**
342
+ Dim the left border color.
343
+
344
+ @default false
345
+ */
346
+ readonly borderLeftDimColor?: boolean;
347
+ /**
348
+ Dim the right border color.
349
+
350
+ @default false
351
+ */
352
+ readonly borderRightDimColor?: boolean;
353
+ /**
354
+ Change border background color. A shorthand for setting `borderTopBackgroundColor`, `borderRightBackgroundColor`, `borderBottomBackgroundColor`, and `borderLeftBackgroundColor`.
355
+ */
356
+ readonly borderBackgroundColor?: Paint;
357
+ /**
358
+ Change top border background color. Accepts the same values as `backgroundColor` in `Text` component.
359
+ */
360
+ readonly borderTopBackgroundColor?: Paint;
361
+ /**
362
+ Change bottom border background color. Accepts the same values as `backgroundColor` in `Text` component.
363
+ */
364
+ readonly borderBottomBackgroundColor?: Paint;
365
+ /**
366
+ Change left border background color. Accepts the same values as `backgroundColor` in `Text` component.
367
+ */
368
+ readonly borderLeftBackgroundColor?: Paint;
369
+ /**
370
+ Change right border background color. Accepts the same values as `backgroundColor` in `Text` component.
371
+ */
372
+ readonly borderRightBackgroundColor?: Paint;
373
+ /**
374
+ Behavior for an element's overflow in both directions.
375
+
376
+ @default 'visible'
377
+ */
378
+ readonly overflow?: "visible" | "hidden";
379
+ /**
380
+ Behavior for an element's overflow in the horizontal direction.
381
+
382
+ @default 'visible'
383
+ */
384
+ readonly overflowX?: "visible" | "hidden";
385
+ /**
386
+ Behavior for an element's overflow in the vertical direction.
387
+
388
+ @default 'visible'
389
+ */
390
+ readonly overflowY?: "visible" | "hidden";
391
+ /**
392
+ Background color for the element.
393
+
394
+ Accepts the same values as `color` in the `<Text>` component.
395
+ */
396
+ readonly backgroundColor?: Paint;
397
+ };
398
+ //#endregion
399
+ //#region src/components/Text.d.ts
400
+ type Props = {
401
+ /**
402
+ A label for the element for screen readers.
403
+ */
404
+ readonly "aria-label"?: string;
405
+ /**
406
+ Hide the element from screen readers.
407
+ */
408
+ readonly "aria-hidden"?: boolean;
409
+ /**
410
+ Change text color. Ink uses Chalk under the hood, so all its functionality is supported.
411
+ */
412
+ readonly color?: Paint;
413
+ /**
414
+ Same as `color`, but for the background.
415
+ */
416
+ readonly backgroundColor?: Paint;
417
+ /**
418
+ Dim the color (make it less bright).
419
+ */
420
+ readonly dimColor?: boolean;
421
+ /**
422
+ Make the text bold.
423
+ */
424
+ readonly bold?: boolean;
425
+ /**
426
+ Make the text italic.
427
+ */
428
+ readonly italic?: boolean;
429
+ /**
430
+ Make the text underlined.
431
+ */
432
+ readonly underline?: boolean;
433
+ /**
434
+ Make the text crossed out with a line.
435
+ */
436
+ readonly strikethrough?: boolean;
437
+ /**
438
+ Inverse background and foreground colors.
439
+ */
440
+ readonly inverse?: boolean;
441
+ /**
442
+ This property tells Ink to wrap or truncate text if its width is larger than the container. If `wrap` is passed (the default), Ink will wrap text and split it into multiple lines. If `hard` is passed, Ink will fill each line to the full column width, breaking words as necessary. If `truncate-*` is passed, Ink will truncate text instead, resulting in one line of text with the rest cut off. If `none` is passed, the text is neither wrapped nor truncated — it overflows the container (and the screen's nominal width), which is intended for log lines committed to scrollback (e.g. inside `<Static>`), not for live regions.
443
+ */
444
+ readonly wrap?: Styles["textWrap"];
445
+ readonly children?: ReactNode;
446
+ };
447
+ /**
448
+ This component can display text and change its style to make it bold, underlined, italic, or strikethrough.
449
+ */
450
+ declare function Text({ color, backgroundColor, dimColor, bold, italic, underline, strikethrough, inverse, wrap, children, "aria-label": ariaLabel, "aria-hidden": ariaHidden }: Props): import("react").JSX.Element | null;
451
+ //#endregion
452
+ export { Text as n, Styles as r, Props as t };