@flyingrobots/bijou 4.4.0 → 4.4.1
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 +39 -184
- package/dist/context-theme.d.ts +15 -0
- package/dist/context-theme.d.ts.map +1 -0
- package/dist/context-theme.js +23 -0
- package/dist/context-theme.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,20 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
The pure, zero-dependency core of Bijou.
|
|
4
4
|
|
|
5
|
-
`@flyingrobots/bijou`
|
|
5
|
+
`@flyingrobots/bijou` provides the foundational primitives for CLIs, prompts, and portable terminal output. It manages components, themes, environment detection, and the core `Surface` and `LayoutNode` types.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Role
|
|
8
8
|
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
-
|
|
12
|
-
- **
|
|
13
|
-
|
|
14
|
-
- **
|
|
15
|
-
|
|
16
|
-
## Documentation
|
|
17
|
-
|
|
18
|
-
See the [Bijou repo](https://github.com/flyingrobots/bijou) for the full documentation map, architecture guide, design system, and DOGFOOD proving surface.
|
|
9
|
+
- **Degradation-First**: Automatic mode detection for `interactive`, `static`, `pipe`, and `accessible` output.
|
|
10
|
+
- **Mixed-Mode**: High-performance `Surface` primitives for rich TUI apps, with
|
|
11
|
+
string-first helpers for standalone CLI scripts.
|
|
12
|
+
- **Surface primitives without abandoning strings**: Runtime apps can stay on
|
|
13
|
+
the surface path while CLI-first flows still use the string-first helpers.
|
|
14
|
+
- **Hexagonal Core**: Pure TypeScript logic isolated from platform IO via `Runtime`, `IO`, and `Style` ports.
|
|
19
15
|
|
|
20
16
|
## Install
|
|
21
17
|
|
|
@@ -29,7 +25,6 @@ npm install @flyingrobots/bijou @flyingrobots/bijou-node
|
|
|
29
25
|
import { initDefaultContext } from '@flyingrobots/bijou-node';
|
|
30
26
|
import { badge, boxSurface, tableSurface } from '@flyingrobots/bijou';
|
|
31
27
|
|
|
32
|
-
// Initialize Node.js adapters (auto-detects TTY, CI, NO_COLOR)
|
|
33
28
|
const ctx = initDefaultContext();
|
|
34
29
|
|
|
35
30
|
const panel = boxSurface(
|
|
@@ -38,186 +33,46 @@ const panel = boxSurface(
|
|
|
38
33
|
rows: [['api', badge('LIVE', { variant: 'success', ctx })]],
|
|
39
34
|
ctx,
|
|
40
35
|
}),
|
|
41
|
-
{
|
|
36
|
+
{
|
|
37
|
+
title: 'Runtime',
|
|
38
|
+
padding: { top: 1, bottom: 1, left: 1, right: 1 },
|
|
39
|
+
ctx,
|
|
40
|
+
},
|
|
42
41
|
);
|
|
43
|
-
|
|
44
|
-
// Return `panel` from a runtime `view()` function or framed pane renderer.
|
|
45
42
|
```
|
|
46
43
|
|
|
47
|
-
##
|
|
48
|
-
|
|
49
|
-
- **Resilient rendering**: automatic mode switching for interactive, static, pipe, and accessible output.
|
|
50
|
-
- **Core UI primitives**: `box`, `headerBox`, `table`, `tree`, `accordion`, `tabs`, `breadcrumb`, `stepper`, `timeline`, `paginator`.
|
|
51
|
-
- **Graph tooling**: `dag`, `dagSlice`, and `dagStats` for visualizing and analyzing DAGs.
|
|
52
|
-
- **Interactive forms**: `input`, `select`, `multiselect`, `confirm`, `group`, `wizard`, `textarea`, and `filter`.
|
|
53
|
-
- **Theme system**: preset themes + DTCG-compatible custom token loading via `BIJOU_THEME`.
|
|
54
|
-
- **Test adapters**: deterministic test context and assertion helpers for mock-free component testing.
|
|
55
|
-
|
|
56
|
-
## Design guidance
|
|
57
|
-
|
|
58
|
-
For the system-level guidance behind the component catalog, see:
|
|
59
|
-
|
|
60
|
-
- [`../../docs/design-system/README.md`](../../docs/design-system/README.md)
|
|
61
|
-
- [`../../docs/design-system/foundations.md`](../../docs/design-system/foundations.md)
|
|
62
|
-
- [`../../docs/design-system/patterns.md`](../../docs/design-system/patterns.md)
|
|
63
|
-
- [`../../docs/design-system/component-families.md`](../../docs/design-system/component-families.md)
|
|
64
|
-
|
|
65
|
-
Those docs answer the questions the API reference cannot:
|
|
66
|
-
|
|
67
|
-
- when to use a family
|
|
68
|
-
- when not to use it
|
|
69
|
-
- which variation is semantic versus render-path versus interaction-layer
|
|
70
|
-
- what belongs in core Bijou versus `@flyingrobots/bijou-tui`
|
|
71
|
-
|
|
72
|
-
## Choosing Component Families
|
|
73
|
-
|
|
74
|
-
### Status and feedback
|
|
75
|
-
|
|
76
|
-
- Use `badge()` when status is compact and belongs inline with another object.
|
|
77
|
-
- Use `note()` when the user needs explanation without urgency.
|
|
78
|
-
- Use `alert()` when the message should persist inside the page or document flow.
|
|
79
|
-
- Move to `@flyingrobots/bijou-tui` notifications when stacking, placement, actions, or history matter.
|
|
80
|
-
|
|
81
|
-
### Selection and prompts
|
|
82
|
-
|
|
83
|
-
- Use `select()` when the user is choosing one stored value from a short, stable set.
|
|
84
|
-
- Use `filter()` when the user is still choosing one stored value, but search and narrowing are the real job.
|
|
85
|
-
- Use `multiselect()` when the user is building a lasting set, not firing one-off commands.
|
|
86
|
-
- Use `confirm()` only when the decision is genuinely binary.
|
|
87
|
-
- Move to `commandPaletteSurface()` in `@flyingrobots/bijou-tui` when the outcome is an action or navigation command instead of stored form state.
|
|
88
|
-
|
|
89
|
-
### Tables and inspection
|
|
90
|
-
|
|
91
|
-
- Use `table()` when row/column comparison is the main job and string output is still the right endpoint.
|
|
92
|
-
- Use `tableSurface()` when the job is still passive comparison, but your runtime app is already composing `Surface` output.
|
|
93
|
-
- Use `navigableTable()` from `@flyingrobots/bijou-tui` when the user needs keyboard-owned row or cell inspection instead of passive reading.
|
|
94
|
-
|
|
95
|
-
### Hierarchy and chronology
|
|
96
|
-
|
|
97
|
-
- Use `tree()` when parent/child nesting is the main thing the reader needs to understand.
|
|
98
|
-
- Use `timeline()` when chronology is the actual reading path.
|
|
99
|
-
- Move to `dag()` when dependency or causal flow matters more than simple order or nesting.
|
|
100
|
-
- Use `dagSlice()` when a local neighborhood or ancestor/descendant chain is the honest scope.
|
|
101
|
-
- Use `dagStats()` when graph health or structural summary matters more than visual shape.
|
|
102
|
-
|
|
103
|
-
### Wayfinding and progress
|
|
104
|
-
|
|
105
|
-
- Use `breadcrumb()` when path context helps explain the current location.
|
|
106
|
-
- Use `paginator()` when compact position-in-sequence feedback is enough.
|
|
107
|
-
- Use `stepper()` when the user is progressing through ordered stages rather than switching among peers.
|
|
108
|
-
|
|
109
|
-
### Containment and formatted content
|
|
110
|
-
|
|
111
|
-
- Use `box()` when a region needs visible containment or comparison against sibling panels.
|
|
112
|
-
- Use `headerBox()` when that same region also needs a compact title and detail line.
|
|
113
|
-
- Use `markdown()` for bounded help, reference, and release-note prose that should lower honestly across rich, pipe, and accessible output.
|
|
114
|
-
- Avoid turning every subsection into a box or using markdown as a substitute layout engine for full application chrome.
|
|
115
|
-
|
|
116
|
-
### Loading, links, and expressive moments
|
|
117
|
-
|
|
118
|
-
- Use `skeleton()` for short-lived placeholders when the final content shape is known.
|
|
119
|
-
- Use `hyperlink()` when the destination itself should remain explicit and trustworthy in terminal output.
|
|
120
|
-
- Use `kbd()` for local inline shortcut cues; use shell help in `@flyingrobots/bijou-tui` when the user needs a broader keybinding reference.
|
|
121
|
-
- Use `gradientText()` and `loadRandomLogo()` sparingly for splash, docs, and celebratory moments rather than routine workspace chrome.
|
|
44
|
+
## Strategy: Choosing Component Families
|
|
122
45
|
|
|
123
|
-
|
|
46
|
+
Select the family based on the interaction semantic, not just the visual shape.
|
|
124
47
|
|
|
125
|
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
48
|
+
### Status and Feedback
|
|
49
|
+
- **`badge()`**: Compact, inline status.
|
|
50
|
+
- **`note()`**: Non-urgent explanation.
|
|
51
|
+
- **`alert()`**: Persistent, in-flow message.
|
|
52
|
+
- *Use `@flyingrobots/bijou-tui` notifications for stacking, history, or active routing.*
|
|
128
53
|
|
|
129
|
-
|
|
54
|
+
### Selection and Prompts
|
|
55
|
+
- **`select()`**: Single choice from a stable set.
|
|
56
|
+
- **`filter()`**: Search-led choice from a large or dynamic set.
|
|
57
|
+
- **`multiselect()`**: Choosing multiple values to build a set.
|
|
58
|
+
- **`confirm()`**: Strictly binary decisions.
|
|
130
59
|
|
|
131
|
-
###
|
|
132
|
-
|
|
60
|
+
### Hierarchy and Chronology
|
|
61
|
+
- **`tree()`**: Parent/child nesting.
|
|
62
|
+
- **`timeline()`**: Sequential, time-ordered events.
|
|
63
|
+
- **`dag()`**: Causal or dependency-based graphs.
|
|
133
64
|
|
|
134
|
-
###
|
|
135
|
-
|
|
65
|
+
### Progress and Wayfinding
|
|
66
|
+
- **`progressBar()`**: Determinate completion.
|
|
67
|
+
- **`spinner()`**: Indeterminate activity.
|
|
68
|
+
- **`breadcrumb()`**: Path context.
|
|
69
|
+
- **`stepper()`**: Ordered stages in a linear process.
|
|
136
70
|
|
|
137
|
-
|
|
138
|
-
`table()`, `tableSurface()`, `tree()`, `accordion()`, `timeline()`, `dag()`, `dagSlice()`, `dagLayout()`, `dagStats()` — passive comparison and structured data display, DAG rendering with `DagSource` adapter, and graph statistics.
|
|
139
|
-
|
|
140
|
-
### Documents
|
|
141
|
-
`markdown()` — structured terminal prose for help, readmes, and reference content with mode-aware lowering.
|
|
142
|
-
|
|
143
|
-
### Navigation
|
|
144
|
-
`tabs()`, `breadcrumb()`, `stepper()`, `paginator()` — wayfinding components.
|
|
145
|
-
|
|
146
|
-
### Animation & Progress
|
|
147
|
-
`spinnerFrame()`, `createSpinner()`, `progressBar()`, `createProgressBar()`, `createAnimatedProgressBar()`, `gradientText()`, `loadRandomLogo()` — determinate and indeterminate progress, live-updating output, expressive gradients, and branded ASCII moments.
|
|
148
|
-
|
|
149
|
-
### Authoring helpers
|
|
150
|
-
`renderByMode()` — mode-aware helper for app-authored primitives that need honest rich/pipe/accessible lowering.
|
|
151
|
-
|
|
152
|
-
### Forms
|
|
153
|
-
`input()`, `select()`, `multiselect()`, `confirm()`, `group()`, `wizard()`, `textarea()`, `filter()` — interactive prompts with validation that degrade to numbered-list selection in pipe/CI modes.
|
|
154
|
-
|
|
155
|
-
### Theme Engine
|
|
156
|
-
DTCG (Design Tokens Community Group) interop. Built-in presets: `nord`, `catppuccin`, `cyan-magenta`, `teal-orange-pink`. Load custom themes via `BIJOU_THEME` env var or `extendTheme()`.
|
|
157
|
-
|
|
158
|
-
## Architecture
|
|
159
|
-
|
|
160
|
-
bijou uses a Ports and Adapters (hexagonal) architecture. See [ARCHITECTURE.md](./ARCHITECTURE.md) for the package-level design and [`../../docs/ARCHITECTURE.md`](../../docs/ARCHITECTURE.md) for the monorepo-wide architecture.
|
|
161
|
-
|
|
162
|
-
The core is pure TypeScript with zero runtime dependencies — all platform concerns flow through three ports:
|
|
163
|
-
|
|
164
|
-
- **`RuntimePort`** — environment variables, TTY detection, terminal dimensions
|
|
165
|
-
- **`IOPort`** — stdout writes, stdin reads, resize events, file I/O
|
|
166
|
-
- **`StylePort`** — RGB/hex color application, bold/italic/etc.
|
|
167
|
-
|
|
168
|
-
### Output Modes
|
|
169
|
-
|
|
170
|
-
bijou auto-detects the environment and adapts rendering:
|
|
171
|
-
|
|
172
|
-
| Mode | Trigger | Behavior |
|
|
173
|
-
| :--- | :--- | :--- |
|
|
174
|
-
| **Interactive** | TTY | Full RGB, unicode, animations |
|
|
175
|
-
| **Static** | `CI=true` | Single-frame, no animations |
|
|
176
|
-
| **Pipe** | Piped stdout | Plain text, ASCII fallbacks |
|
|
177
|
-
| **Accessible** | `BIJOU_ACCESSIBLE=1` | Screen-reader friendly |
|
|
178
|
-
|
|
179
|
-
## Testing
|
|
180
|
-
|
|
181
|
-
Import test adapters for deterministic, mock-free component testing:
|
|
182
|
-
|
|
183
|
-
```typescript
|
|
184
|
-
import { createTestContext } from '@flyingrobots/bijou/adapters/test';
|
|
185
|
-
import { box } from '@flyingrobots/bijou';
|
|
186
|
-
|
|
187
|
-
const ctx = createTestContext({ mode: 'interactive' });
|
|
188
|
-
const result = box('hello', { ctx });
|
|
189
|
-
// Assert on the string directly — no process mocking needed
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
See [GUIDE.md](./GUIDE.md) for more on testing, theming, and component usage.
|
|
193
|
-
For upgrading existing apps, see the monorepo migration guide at [`../../docs/MIGRATING_TO_V4.md`](../../docs/MIGRATING_TO_V4.md).
|
|
194
|
-
|
|
195
|
-
## Related Packages
|
|
196
|
-
|
|
197
|
-
- [`@flyingrobots/bijou-node`](https://www.npmjs.com/package/@flyingrobots/bijou-node) — Node.js runtime adapter (chalk, readline, process)
|
|
198
|
-
- [`@flyingrobots/bijou-tui`](https://www.npmjs.com/package/@flyingrobots/bijou-tui) — TEA runtime for interactive terminal apps
|
|
199
|
-
|
|
200
|
-
## License
|
|
71
|
+
## Documentation
|
|
201
72
|
|
|
202
|
-
|
|
73
|
+
- **[GUIDE.md](./GUIDE.md)**: Productive-fast path.
|
|
74
|
+
- **[ADVANCED_GUIDE.md](./ADVANCED_GUIDE.md)**: Rendering doctrine, themes, and testing.
|
|
75
|
+
- **[Design System](../../docs/design-system/README.md)**: Semantic guidance and component families.
|
|
203
76
|
|
|
204
77
|
---
|
|
205
|
-
|
|
206
|
-
<p align="center">
|
|
207
|
-
Built with 💎 by <a href="https://github.com/flyingrobots">FLYING ROBOTS</a>
|
|
208
|
-
</p>
|
|
209
|
-
|
|
210
|
-
```rust
|
|
211
|
-
.-:::::'::: .-:. ::-.::::::. :::. .,-:::::/
|
|
212
|
-
;;;'''' ;;; ';;. ;;;;';;;`;;;;, `;;;,;;-'````'
|
|
213
|
-
[[[,,== [[[ '[[,[[[' [[[ [[[[[. '[[[[[ [[[[[[/
|
|
214
|
-
`$$$"`` $$' c$$" $$$ $$$ "Y$c$$"$$c. "$$
|
|
215
|
-
888 o88oo,.__ ,8P"` 888 888 Y88 `Y8bo,,,o88o
|
|
216
|
-
"MM, """"YUMMMmM" MMM MMM YM `'YMUP"YMM
|
|
217
|
-
:::::::.. ... :::::::. ... :::::::::::: .::::::.
|
|
218
|
-
;;;;``;;;; .;;;;;;;. ;;;'';;' .;;;;;;;.;;;;;;;;'''';;;` `
|
|
219
|
-
[[[,/[[[' ,[[ \[[, [[[__[[\.,[[ \[[, [[ '[==/[[[[,
|
|
220
|
-
$$$$$$c $$$, $$$ $$""""Y$$$$$, $$$ $$ ''' $
|
|
221
|
-
888b "88bo,"888,_ _,88P_88o,,od8P"888,_ _,88P 88, 88b dP
|
|
222
|
-
MMMM "W" "YMMMMMP" ""YUMMMP" "YMMMMMP" MMM "YMmMY"
|
|
223
|
-
```
|
|
78
|
+
Built with 💎 by [FLYING ROBOTS](https://github.com/flyingrobots)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BijouContext } from './ports/context.js';
|
|
2
|
+
import { type ResolvedTheme } from './core/theme/resolve.js';
|
|
3
|
+
import type { Theme } from './core/theme/tokens.js';
|
|
4
|
+
/**
|
|
5
|
+
* Clone a Bijou context with a different already-resolved theme.
|
|
6
|
+
*
|
|
7
|
+
* The original context is left untouched; callers get a fresh object with
|
|
8
|
+
* the same runtime/style/IO ports and updated theme accessors.
|
|
9
|
+
*/
|
|
10
|
+
export declare function cloneContextWithResolvedTheme(ctx: BijouContext, theme: ResolvedTheme): BijouContext;
|
|
11
|
+
/**
|
|
12
|
+
* Clone a Bijou context with a different theme definition.
|
|
13
|
+
*/
|
|
14
|
+
export declare function cloneContextWithTheme(ctx: BijouContext, theme: Theme): BijouContext;
|
|
15
|
+
//# sourceMappingURL=context-theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-theme.d.ts","sourceRoot":"","sources":["../src/context-theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,aAAa,GACnB,YAAY,CAOd;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,KAAK,GACX,YAAY,CAKd"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createThemeAccessors } from './core/theme/accessors.js';
|
|
2
|
+
import { createResolved } from './core/theme/resolve.js';
|
|
3
|
+
/**
|
|
4
|
+
* Clone a Bijou context with a different already-resolved theme.
|
|
5
|
+
*
|
|
6
|
+
* The original context is left untouched; callers get a fresh object with
|
|
7
|
+
* the same runtime/style/IO ports and updated theme accessors.
|
|
8
|
+
*/
|
|
9
|
+
export function cloneContextWithResolvedTheme(ctx, theme) {
|
|
10
|
+
return {
|
|
11
|
+
...ctx,
|
|
12
|
+
theme,
|
|
13
|
+
tokenGraph: theme.tokenGraph,
|
|
14
|
+
...createThemeAccessors(theme),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Clone a Bijou context with a different theme definition.
|
|
19
|
+
*/
|
|
20
|
+
export function cloneContextWithTheme(ctx, theme) {
|
|
21
|
+
return cloneContextWithResolvedTheme(ctx, createResolved(theme, ctx.theme.noColor, ctx.theme.colorScheme));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=context-theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-theme.js","sourceRoot":"","sources":["../src/context-theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAsB,MAAM,yBAAyB,CAAC;AAG7E;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAC3C,GAAiB,EACjB,KAAoB;IAEpB,OAAO;QACL,GAAG,GAAG;QACN,KAAK;QACL,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,GAAG,oBAAoB,CAAC,KAAK,CAAC;KAC/B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACnC,GAAiB,EACjB,KAAY;IAEZ,OAAO,6BAA6B,CAClC,GAAG,EACH,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAChE,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type { RuntimePort, WritePort, QueryPort, InteractivePort, FilePort, IOPo
|
|
|
8
8
|
export { type Cell, type Surface, type PackedSurface, type CellMask, type Matrix3x3, type TransformOptions, createSurface, FULL_MASK, ROTATION_CHAR_MAP, } from './ports/surface.js';
|
|
9
9
|
export { FLAG_BOLD, FLAG_DIM, FLAG_STRIKETHROUGH, FLAG_INVERSE, FLAG_EMPTY, UNDERLINE_SOLID, UNDERLINE_CURLY, UNDERLINE_DOTDASH, FLAG_DASHED, } from './core/render/packed-cell.js';
|
|
10
10
|
export { getDefaultContext, setDefaultContext, } from './context.js';
|
|
11
|
+
export { cloneContextWithResolvedTheme, cloneContextWithTheme, } from './context-theme.js';
|
|
11
12
|
export { resolveCtx, resolveSafeCtx } from './core/resolve-ctx.js';
|
|
12
13
|
export { systemClock, resolveClock, sleep, defer } from './core/clock.js';
|
|
13
14
|
export { decodeRawKeyInput, decodeRawKeySequence } from './core/key-input.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,WAAW,EACX,SAAS,EACT,SAAS,EACT,eAAe,EACf,QAAQ,EACR,MAAM,EACN,SAAS,EACT,cAAc,EACd,WAAW,EACX,WAAW,EACX,SAAS,EACT,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,KAAK,IAAI,EACT,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,aAAa,EACb,SAAS,EACT,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,WAAW,GACZ,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,WAAW,EACX,SAAS,EACT,SAAS,EACT,eAAe,EACf,QAAQ,EACR,MAAM,EACN,SAAS,EACT,cAAc,EACd,WAAW,EACX,WAAW,EACX,SAAS,EACT,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,KAAK,IAAI,EACT,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,aAAa,EACb,SAAS,EACT,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,WAAW,GACZ,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,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B,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAG7E,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAGxI,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG7F,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,EACL,MAAM,EACN,WAAW,EACX,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,eAAe,EACpB,MAAM,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,MAAM,EACN,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,IAAI,EACJ,KAAK,WAAW,GACjB,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export { createSurface, FULL_MASK, ROTATION_CHAR_MAP, } from './ports/surface.js
|
|
|
8
8
|
export { FLAG_BOLD, FLAG_DIM, FLAG_STRIKETHROUGH, FLAG_INVERSE, FLAG_EMPTY, UNDERLINE_SOLID, UNDERLINE_CURLY, UNDERLINE_DOTDASH, FLAG_DASHED, } from './core/render/packed-cell.js';
|
|
9
9
|
// Context
|
|
10
10
|
export { getDefaultContext, setDefaultContext, } from './context.js';
|
|
11
|
+
export { cloneContextWithResolvedTheme, cloneContextWithTheme, } from './context-theme.js';
|
|
11
12
|
// Context resolution helpers
|
|
12
13
|
export { resolveCtx, resolveSafeCtx } from './core/resolve-ctx.js';
|
|
13
14
|
export { systemClock, resolveClock, sleep, defer } from './core/clock.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkBH,OAAO,EAOL,aAAa,EACb,SAAS,EACT,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,WAAW,GACZ,MAAM,8BAA8B,CAAC;AAEtC,UAAU;AACV,OAAO,EACL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkBH,OAAO,EAOL,aAAa,EACb,SAAS,EACT,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,YAAY,EACZ,UAAU,EACV,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,WAAW,GACZ,MAAM,8BAA8B,CAAC;AAEtC,UAAU;AACV,OAAO,EACL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAE5B,6BAA6B;AAC7B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,iBAA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