@tangle-network/ui 11.16.8 → 11.16.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tangle-network/ui
2
2
 
3
+ ## 11.16.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 272704e: On a phone, terminal output keeps its own lines and scrolls sideways inside the block, so listing columns stay aligned and hashes and URLs are not split mid-token. A closed command shows at most two lines at every width.
8
+
3
9
  ## 11.16.8
4
10
 
5
11
  ### Patch Changes
@@ -19,6 +19,10 @@ export interface CommandPreviewProps {
19
19
  * dark terminal. It scopes the dark token set onto itself with
20
20
  * `data-theme="dark"`, so stderr, the badges and the muted prompt keep the
21
21
  * contrast they were designed with on a dark ground, in a light console too.
22
+ *
23
+ * On a phone the output keeps its own lines and scrolls sideways inside the
24
+ * block: wrapped output breaks the columns of a listing and splits hashes
25
+ * and URLs mid-token. The command still wraps between its tokens.
22
26
  */
23
27
  export declare const CommandPreview: import("react").MemoExoticComponent<({ part, defaultExpanded, className }: CommandPreviewProps) => import("react").JSX.Element>;
24
28
  //#endregion
@@ -162,6 +162,10 @@ function CommandText({ command, all }) {
162
162
  * dark terminal. It scopes the dark token set onto itself with
163
163
  * `data-theme="dark"`, so stderr, the badges and the muted prompt keep the
164
164
  * contrast they were designed with on a dark ground, in a light console too.
165
+ *
166
+ * On a phone the output keeps its own lines and scrolls sideways inside the
167
+ * block: wrapped output breaks the columns of a listing and splits hashes
168
+ * and URLs mid-token. The command still wraps between its tokens.
165
169
  */
166
170
  const CommandPreview = memo(({ part, defaultExpanded = false, className }) => {
167
171
  const [expanded, setExpanded] = useState(defaultExpanded);
@@ -179,7 +183,7 @@ const CommandPreview = memo(({ part, defaultExpanded = false, className }) => {
179
183
  children: "$"
180
184
  }),
181
185
  /* @__PURE__ */ jsx("code", {
182
- className: cn("min-w-0 flex-1 whitespace-pre-wrap [overflow-wrap:anywhere]", expanded ? "" : "line-clamp-2"),
186
+ className: cn("min-w-0 flex-1 whitespace-pre-wrap [overflow-wrap:anywhere]", expanded ? "" : "max-h-8 overflow-hidden"),
183
187
  children: /* @__PURE__ */ jsx(CommandText, {
184
188
  command,
185
189
  all: expanded
@@ -222,21 +226,21 @@ const CommandPreview = memo(({ part, defaultExpanded = false, className }) => {
222
226
  tabIndex: 0,
223
227
  role: "region",
224
228
  "aria-label": "stdout",
225
- className: cn("max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] px-3 py-2 leading-relaxed", focusRing),
229
+ className: cn("max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] max-sm:whitespace-pre max-sm:[overflow-wrap:normal] px-3 py-2 leading-relaxed", focusRing),
226
230
  children: output.stdout
227
231
  }) : null,
228
232
  output.stderr ? /* @__PURE__ */ jsx("pre", {
229
233
  tabIndex: 0,
230
234
  role: "region",
231
235
  "aria-label": "stderr",
232
- className: cn("max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]", focusRing),
236
+ className: cn("max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] max-sm:whitespace-pre max-sm:[overflow-wrap:normal] border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]", focusRing),
233
237
  children: output.stderr
234
238
  }) : null,
235
239
  errorText ? /* @__PURE__ */ jsx("pre", {
236
240
  tabIndex: 0,
237
241
  role: "region",
238
242
  "aria-label": "error",
239
- className: cn("max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]", focusRing),
243
+ className: cn("max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] max-sm:whitespace-pre max-sm:[overflow-wrap:normal] border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]", focusRing),
240
244
  children: errorText
241
245
  }) : null
242
246
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/ui",
3
- "version": "11.16.8",
3
+ "version": "11.16.9",
4
4
  "description": "Generic React UI components for Tangle products — primitives, chat, run, files, editor, markdown.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -227,6 +227,10 @@ function CommandText({ command, all }: { command: string; all: boolean }) {
227
227
  * dark terminal. It scopes the dark token set onto itself with
228
228
  * `data-theme="dark"`, so stderr, the badges and the muted prompt keep the
229
229
  * contrast they were designed with on a dark ground, in a light console too.
230
+ *
231
+ * On a phone the output keeps its own lines and scrolls sideways inside the
232
+ * block: wrapped output breaks the columns of a listing and splits hashes
233
+ * and URLs mid-token. The command still wraps between its tokens.
230
234
  */
231
235
  export const CommandPreview = memo(
232
236
  ({ part, defaultExpanded = false, className }: CommandPreviewProps) => {
@@ -258,7 +262,10 @@ export const CommandPreview = memo(
258
262
  <code
259
263
  className={cn(
260
264
  "min-w-0 flex-1 whitespace-pre-wrap [overflow-wrap:anywhere]",
261
- expanded ? "" : "line-clamp-2",
265
+ // Closed, two lines of the command. A height cap, not
266
+ // line-clamp: each token is an inline box, which line-clamp
267
+ // does not count, so a phone showed three lines and more.
268
+ expanded ? "" : "max-h-8 overflow-hidden",
262
269
  )}
263
270
  >
264
271
  <CommandText command={command} all={expanded} />
@@ -319,7 +326,7 @@ export const CommandPreview = memo(
319
326
  role="region"
320
327
  aria-label="stdout"
321
328
  className={cn(
322
- "max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] px-3 py-2 leading-relaxed",
329
+ "max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] max-sm:whitespace-pre max-sm:[overflow-wrap:normal] px-3 py-2 leading-relaxed",
323
330
  focusRing,
324
331
  )}
325
332
  >
@@ -332,7 +339,7 @@ export const CommandPreview = memo(
332
339
  role="region"
333
340
  aria-label="stderr"
334
341
  className={cn(
335
- "max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]",
342
+ "max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] max-sm:whitespace-pre max-sm:[overflow-wrap:normal] border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]",
336
343
  focusRing,
337
344
  )}
338
345
  >
@@ -345,7 +352,7 @@ export const CommandPreview = memo(
345
352
  role="region"
346
353
  aria-label="error"
347
354
  className={cn(
348
- "max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]",
355
+ "max-h-80 overflow-auto whitespace-pre-wrap [overflow-wrap:anywhere] max-sm:whitespace-pre max-sm:[overflow-wrap:normal] border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]",
349
356
  focusRing,
350
357
  )}
351
358
  >