@textui/widgets 0.7.0 → 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/dist/control/text-area.d.ts +2 -0
- package/dist/control/text-area.d.ts.map +1 -1
- package/dist/control/text-area.js +16 -8
- package/dist/control/text-input.d.ts.map +1 -1
- package/dist/control/text-input.js +6 -0
- package/dist/data/code-viewer.d.ts +2 -0
- package/dist/data/code-viewer.d.ts.map +1 -1
- package/dist/data/code-viewer.js +9 -1
- package/dist/data/index.d.ts +9 -0
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/index.js +8 -2
- package/dist/data/list.d.ts +9 -0
- package/dist/data/list.d.ts.map +1 -1
- package/dist/data/list.js +20 -3
- package/dist/data/markdown-view.d.ts.map +1 -1
- package/dist/data/markdown-view.js +4 -1
- package/dist/data/pagination.d.ts.map +1 -1
- package/dist/data/pagination.js +4 -1
- package/dist/data/tree.d.ts +2 -0
- package/dist/data/tree.d.ts.map +1 -1
- package/dist/data/tree.js +8 -2
- package/dist/display/card.d.ts.map +1 -1
- package/dist/display/card.js +12 -0
- package/dist/display/color-text.d.ts +13 -1
- package/dist/display/color-text.d.ts.map +1 -1
- package/dist/display/color-text.js +28 -6
- package/dist/display/font-text.d.ts +72 -0
- package/dist/display/font-text.d.ts.map +1 -0
- package/dist/display/font-text.js +35 -0
- package/dist/display/fonts.d.ts +138 -0
- package/dist/display/fonts.d.ts.map +1 -0
- package/dist/display/fonts.js +893 -0
- package/dist/display/gard.d.ts +26 -0
- package/dist/display/gard.d.ts.map +1 -0
- package/dist/display/gard.js +479 -0
- package/dist/display/index.d.ts +3 -0
- package/dist/display/index.d.ts.map +1 -1
- package/dist/display/index.js +7 -0
- package/dist/display/key-value.d.ts +25 -5
- package/dist/display/key-value.d.ts.map +1 -1
- package/dist/display/key-value.js +13 -3
- package/dist/display/marquee.d.ts.map +1 -1
- package/dist/display/marquee.js +16 -3
- package/dist/display/pagga.d.ts +29 -0
- package/dist/display/pagga.d.ts.map +1 -0
- package/dist/display/pagga.js +101 -0
- package/dist/display/pattern.d.ts +117 -0
- package/dist/display/pattern.d.ts.map +1 -0
- package/dist/display/pattern.js +257 -0
- package/dist/display/spinner.d.ts +2 -0
- package/dist/display/spinner.d.ts.map +1 -1
- package/dist/display/spinner.js +3 -2
- package/dist/navigation/menu.d.ts +11 -0
- package/dist/navigation/menu.d.ts.map +1 -1
- package/dist/navigation/menu.js +22 -9
- package/dist/navigation/tabs.d.ts +2 -0
- package/dist/navigation/tabs.d.ts.map +1 -1
- package/dist/navigation/tabs.js +12 -2
- package/dist/overlay/command-palette.d.ts.map +1 -1
- package/dist/overlay/command-palette.js +18 -6
- package/dist/shells/workbench-shell.d.ts.map +1 -1
- package/dist/shells/workbench-shell.js +5 -1
- package/package.json +2 -2
- package/src/control/text-area.ts +18 -7
- package/src/control/text-input.ts +6 -0
- package/src/data/code-viewer.ts +10 -1
- package/src/data/index.ts +9 -2
- package/src/data/list.ts +21 -3
- package/src/data/markdown-view.ts +7 -4
- package/src/data/pagination.ts +4 -1
- package/src/data/tree.ts +9 -2
- package/src/display/card.ts +12 -0
- package/src/display/color-text.ts +33 -10
- package/src/display/font-text.tsx +94 -0
- package/src/display/fonts.ts +990 -0
- package/src/display/gard.ts +475 -0
- package/src/display/index.ts +7 -0
- package/src/display/key-value.ts +44 -6
- package/src/display/marquee.ts +15 -3
- package/src/display/pagga.ts +102 -0
- package/src/display/pattern.tsx +427 -0
- package/src/display/spinner.ts +5 -2
- package/src/navigation/menu.ts +32 -9
- package/src/navigation/tabs.ts +13 -2
- package/src/overlay/command-palette.ts +13 -2
- package/src/shells/workbench-shell.ts +5 -1
|
@@ -439,7 +439,12 @@ export const CommandPalette = defineComponent<CommandPaletteProps>('CommandPalet
|
|
|
439
439
|
// It is the one line in the panel that wraps rather than truncates,
|
|
440
440
|
// because it is the one place a sentence can be read whole.
|
|
441
441
|
const chosen = pending ? offered[index] : undefined;
|
|
442
|
-
|
|
442
|
+
// Nothing selectable is nothing to describe: the line under the list would
|
|
443
|
+
// otherwise keep the last answer's sentence, or repeat the question the row
|
|
444
|
+
// above has already asked.
|
|
445
|
+
const detail = rows.length === 0
|
|
446
|
+
? ''
|
|
447
|
+
: pending
|
|
443
448
|
? chosen?.description
|
|
444
449
|
?? pending.arg.description
|
|
445
450
|
?? i18n.t(
|
|
@@ -549,6 +554,11 @@ export const CommandPalette = defineComponent<CommandPaletteProps>('CommandPalet
|
|
|
549
554
|
descriptions: pending?.arg.descriptions ?? descriptions,
|
|
550
555
|
interactive: false,
|
|
551
556
|
activeId: rows[index],
|
|
557
|
+
// When the answer is a fixed set, the row above already says which kind
|
|
558
|
+
// of nothing this is and this would be the second line. Searching the
|
|
559
|
+
// command list has no such row, and there the menu's own line is the one
|
|
560
|
+
// that says it.
|
|
561
|
+
noMatch: pending ? false : undefined,
|
|
552
562
|
onSelect: (id: string) => {
|
|
553
563
|
const at = rows.indexOf(id);
|
|
554
564
|
if (at >= 0) setHighlight(at);
|
|
@@ -560,7 +570,8 @@ export const CommandPalette = defineComponent<CommandPaletteProps>('CommandPalet
|
|
|
560
570
|
// that shows only titles makes you run something to find out what it does.
|
|
561
571
|
h('box', { direction: 'row', gap: 1, align: 'start' },
|
|
562
572
|
h('text', { content: detail, fg: 'muted', flex: 1, wrap: 'word' }),
|
|
563
|
-
|
|
573
|
+
// A zero beside an empty line is a number with nothing to count.
|
|
574
|
+
rows.length > 0 ? h('text', { content: `${rows.length}`, fg: 'subtle' }) : null),
|
|
564
575
|
h('box', { direction: 'row', gap: 1 },
|
|
565
576
|
h('text', {
|
|
566
577
|
content: pending
|
|
@@ -28,7 +28,11 @@ export const WorkbenchShell = defineComponent<ShellProps>('WorkbenchShell', (pro
|
|
|
28
28
|
height: '100%',
|
|
29
29
|
bg: 'canvas',
|
|
30
30
|
fg: 'text',
|
|
31
|
-
|
|
31
|
+
// The frame is chrome, not text. A box that states an `fg` draws its
|
|
32
|
+
// border in it - which is right for `<box fg="danger" border="single">`
|
|
33
|
+
// and wrong here, where the `fg` is the application's text colour: it made
|
|
34
|
+
// every screen's outermost edge as bright as the words inside it.
|
|
35
|
+
border: { style: theme.border, color: 'border' },
|
|
32
36
|
...props,
|
|
33
37
|
},
|
|
34
38
|
h(SurfaceArea, { surface: 'header' }),
|