@hanzo/ui 8.27.57 → 8.27.59

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 (54) hide show
  1. package/dist/backends/gui/code-editor.cjs +374 -71
  2. package/dist/backends/gui/code-editor.d.ts +46 -25
  3. package/dist/backends/gui/code-editor.d.ts.map +1 -1
  4. package/dist/backends/gui/code-editor.js +376 -73
  5. package/dist/backends/gui/code-editor.js.map +1 -1
  6. package/dist/backends/gui/index.cjs +9 -4
  7. package/dist/backends/gui/index.d.ts +3 -1
  8. package/dist/backends/gui/index.d.ts.map +1 -1
  9. package/dist/backends/gui/index.js +2 -0
  10. package/dist/backends/gui/index.js.map +1 -1
  11. package/dist/backends/gui/json-tree.cjs +135 -0
  12. package/dist/backends/gui/json-tree.d.ts +26 -0
  13. package/dist/backends/gui/json-tree.d.ts.map +1 -0
  14. package/dist/backends/gui/json-tree.js +100 -0
  15. package/dist/backends/gui/json-tree.js.map +1 -0
  16. package/dist/backends/gui/json.cjs +183 -0
  17. package/dist/backends/gui/json.d.ts +41 -0
  18. package/dist/backends/gui/json.d.ts.map +1 -0
  19. package/dist/backends/gui/json.js +180 -0
  20. package/dist/backends/gui/json.js.map +1 -0
  21. package/dist/gallery.html +7 -5
  22. package/dist/index.cjs +8 -4
  23. package/dist/index.d.ts +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +1 -1
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.node.cjs +8 -4
  28. package/dist/index.node.js +1 -1
  29. package/dist/primitives/JsonTree.cjs +8 -0
  30. package/dist/primitives/JsonTree.d.ts +2 -0
  31. package/dist/primitives/JsonTree.d.ts.map +1 -0
  32. package/dist/primitives/JsonTree.js +5 -0
  33. package/dist/primitives/JsonTree.js.map +1 -0
  34. package/dist/primitives/Picker.cjs +8 -0
  35. package/dist/primitives/Picker.d.ts +2 -0
  36. package/dist/primitives/Picker.d.ts.map +1 -0
  37. package/dist/primitives/Picker.js +5 -0
  38. package/dist/primitives/Picker.js.map +1 -0
  39. package/dist/primitives/checkJson.cjs +8 -0
  40. package/dist/primitives/checkJson.d.ts +2 -0
  41. package/dist/primitives/checkJson.d.ts.map +1 -0
  42. package/dist/primitives/checkJson.js +5 -0
  43. package/dist/primitives/checkJson.js.map +1 -0
  44. package/dist/primitives/formatJson.cjs +8 -0
  45. package/dist/primitives/formatJson.d.ts +2 -0
  46. package/dist/primitives/formatJson.d.ts.map +1 -0
  47. package/dist/primitives/formatJson.js +5 -0
  48. package/dist/primitives/formatJson.js.map +1 -0
  49. package/dist/product/limits.cjs +10 -1
  50. package/dist/product/limits.d.ts.map +1 -1
  51. package/dist/product/limits.js +10 -1
  52. package/dist/product/limits.js.map +1 -1
  53. package/dist/styles.css +4 -2
  54. package/package.json +7 -1
@@ -1,26 +1,41 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  /**
4
- * CodeEditor — a bordered, monospace editing surface: a toolbar carrying a
5
- * language menu and a copy-to-clipboard button, above a plain-text field with
6
- * a gutter of line numbers that scrolls with it.
4
+ * CodeEditor — a CodeMirror 6 editor in a gui frame: a toolbar with the
5
+ * language (a menu, or a label), Format for JSON and Copy; the editor with a
6
+ * line-number gutter; and a footer that reports whether JSON parses and is the
7
+ * handle that resizes the editor.
7
8
  *
8
- * The field is gui's `TextArea`, so what is edited is the text itself. Tab
9
- * inserts two spaces and Escape releases focus; `wordWrap` is the field's own
10
- * white-space; the gutter numbers lines of text, so a line that wraps keeps
11
- * one number; there is no syntax colouring, and `minimap` is accepted and
12
- * ignored because a plain field has no surface to draw one on.
9
+ * Height. With no `height` the editor is as tall as its text, from `minHeight`
10
+ * up to `maxHeight`, and scrolls past that. Dragging the footer (or ArrowUp /
11
+ * ArrowDown on it) sets a height of the reader's own, past the cap if they
12
+ * want; a double-click hands the height back to the text. A `height` fixes it,
13
+ * and `'100%'` fills a frame that is itself sized (a flex child).
13
14
  *
14
- * `theme` is the editor's own palette, independent of the surrounding gui
15
- * theme the way a syntax theme is: `'light'` and `'dark'` paint a fixed set of
16
- * literal colours, and `'auto'` (the default) takes the ambient `$background`,
17
- * `$color` and `$borderColor` tokens, so it follows the host page.
15
+ * JSON. `language="json"` colours the syntax and checks the text on every
16
+ * change with `checkJson`: a broken document tints the failing line, marks the
17
+ * failing character and names line, column and reason in the footer. With
18
+ * `allowText`, text that does not open an object or an array is plain text and
19
+ * passes. Format (or Shift-Alt-F) re-indents valid JSON by two spaces. Other
20
+ * languages are edited as plain text: the package carries one grammar.
21
+ *
22
+ * Colour. Every colour is a theme rung over a design token — the ink, the
23
+ * hairline, the selection and the error state — so the editor follows the page
24
+ * into light or dark with nothing to configure. Hanzo is monochrome, so the syntax is ranked
25
+ * by ink and weight, not by hue: property names in full ink, strings one rank
26
+ * down, punctuation at the rank of a hint. Hue is spent only on an error.
18
27
  */
19
- import { SizableText, TextArea, XStack, YStack } from '@hanzo/gui';
20
- import { Check, Copy } from '@hanzogui/lucide-icons-2';
28
+ import { SizableText, XStack, YStack } from '@hanzo/gui';
29
+ import { AlignLeft, Check, CircleAlert, CircleCheck, Copy, GripHorizontal, Type } from '@hanzogui/lucide-icons-2';
30
+ import { defaultKeymap, history, historyKeymap, indentWithTab } from '@codemirror/commands';
31
+ import { json } from '@codemirror/lang-json';
32
+ import { HighlightStyle, bracketMatching, indentOnInput, syntaxHighlighting } from '@codemirror/language';
33
+ import { Annotation, Compartment, EditorState, RangeSet, RangeSetBuilder, StateField } from '@codemirror/state';
34
+ import { Decoration, EditorView, GutterMarker, drawSelection, gutterLineClass, highlightActiveLine, highlightActiveLineGutter, keymap, lineNumbers as numbering, placeholder as hint, ViewPlugin, } from '@codemirror/view';
35
+ import { tags } from '@lezer/highlight';
21
36
  import * as React from 'react';
22
37
  import { Button } from './button.js';
23
- import { RISER } from './control.js';
38
+ import { checkJson, formatJson } from './json.js';
24
39
  import { Select, SelectContent, SelectItem, SelectTrigger } from './select.js';
25
40
  import { slot } from './slot.js';
26
41
  import { toast } from './toaster.js';
@@ -77,53 +92,332 @@ const LABEL = {
77
92
  shell: 'Shell',
78
93
  plaintext: 'Plain Text',
79
94
  };
80
- /** The two named palettes; `'auto'` paints none of this. */
81
- const PALETTE = {
82
- light: { bg: '#ffffff', fg: '#1f2328', border: '#d0d7de', head: '#f6f8fa', gutter: '#8c959f' },
83
- dark: { bg: '#1e1e1e', fg: '#d4d4d4', border: '#3c3c3c', head: '#252526', gutter: '#858585' },
84
- };
85
- /** What Tab inserts. */
86
- const INDENT = ' ';
87
95
  /** Line height as a multiple of the font size. */
88
- const LEADING = 1.5;
89
- export function CodeEditor({ value, defaultValue = '', language = 'javascript', height = '400px', theme = 'auto', onChange, onMount, readOnly = false, lineNumbers = true, minimap: _minimap, wordWrap = 'on', fontSize = 14, showCopyButton = true, showLanguageSelector = true, availableLanguages = LANGUAGES, label = 'Code', ...props }) {
90
- const [typed, setTyped] = React.useState(defaultValue);
91
- const text = value ?? typed;
96
+ const LEADING = 1.6;
97
+ /** How far one ArrowUp / ArrowDown on the footer moves the height. */
98
+ const STEP = 24;
99
+ const MONO = "var(--font-mono, 'Zen Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)";
100
+ /**
101
+ * The editor's surface. Every colour is one of the theme's named rungs — gui emits
102
+ * each as a custom property on the theme class, so it inverts with the page — and
103
+ * those rungs read @hanzo/design's tokens (`--ink` is `--foreground`, `--edge` is
104
+ * `--border`, `--bad` is `--state-error`). The design ladder is NOT read directly:
105
+ * on a host that mounts design's sheet without its light selector, `--text-primary`
106
+ * stays the dark theme's white on a light page.
107
+ */
108
+ const FRAME = /* @__PURE__ */ EditorView.theme({
109
+ '&': { color: 'var(--ink)', backgroundColor: 'transparent' },
110
+ '&.cm-focused': { outline: 'none' },
111
+ // The scroller fills what the editor is given and no more: grown with its text up to the
112
+ // editor's max-height, then scrolling; stretched to a fixed or dragged height. CodeMirror's
113
+ // own `height: 100%` resolves against an auto-height editor as its min-height, which pinned
114
+ // a growing editor at its floor.
115
+ '.cm-scroller': {
116
+ fontFamily: MONO,
117
+ lineHeight: String(LEADING),
118
+ overflow: 'auto',
119
+ flex: '1 1 auto',
120
+ height: 'auto',
121
+ minHeight: '0',
122
+ },
123
+ '.cm-content': { padding: '8px 0', caretColor: 'var(--ink)' },
124
+ '.cm-line': { padding: '0 12px' },
125
+ '.cm-gutters': {
126
+ backgroundColor: 'transparent',
127
+ color: 'var(--dim)',
128
+ border: 'none',
129
+ borderRight: '1px solid var(--edge)',
130
+ },
131
+ '.cm-lineNumbers .cm-gutterElement': { padding: '0 10px 0 12px', minWidth: '28px' },
132
+ '.cm-activeLine': { backgroundColor: 'var(--panel)' },
133
+ '.cm-activeLineGutter': { backgroundColor: 'transparent', color: 'var(--quiet)' },
134
+ '.cm-cursor, .cm-dropCursor': { borderLeftColor: 'var(--ink)' },
135
+ '.cm-selectionBackground, &.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, ::selection': {
136
+ backgroundColor: 'var(--raised)',
137
+ },
138
+ '.cm-matchingBracket, &.cm-focused .cm-matchingBracket': {
139
+ backgroundColor: 'var(--raised)',
140
+ color: 'inherit',
141
+ outline: 'none',
142
+ },
143
+ '.cm-nonmatchingBracket, &.cm-focused .cm-nonmatchingBracket': { backgroundColor: 'transparent' },
144
+ '.cm-placeholder': { color: 'var(--dim)' },
145
+ '.cm-fault': { backgroundColor: 'var(--state-error-bg, rgb(239 68 68 / .1))' },
146
+ '.cm-gutterElement.cm-fault': { color: 'var(--bad)' },
147
+ '.cm-fault-at': {
148
+ textDecoration: 'underline wavy var(--bad)',
149
+ textDecorationSkipInk: 'none',
150
+ textUnderlineOffset: '3px',
151
+ },
152
+ });
153
+ /** The syntax, ranked by ink: names in full ink, strings a rank down, punctuation at a hint. */
154
+ const INK = /* @__PURE__ */ HighlightStyle.define([
155
+ { tag: tags.propertyName, color: 'var(--ink)', fontWeight: '500' },
156
+ { tag: tags.string, color: 'var(--soft)' },
157
+ { tag: [tags.number, tags.bool, tags.null], color: 'var(--ink)' },
158
+ { tag: [tags.punctuation, tags.separator, tags.brace, tags.squareBracket], color: 'var(--dim)' },
159
+ ]);
160
+ /** How much deeper than its line a wrapped continuation starts, in characters. */
161
+ const HANG = 2;
162
+ /** A line's own indentation in characters, a tab counted as two. */
163
+ const indentOf = (text) => {
164
+ let n = 0;
165
+ for (const c of text) {
166
+ if (c === ' ')
167
+ n += 1;
168
+ else if (c === '\t')
169
+ n += 2;
170
+ else
171
+ break;
172
+ }
173
+ return n;
174
+ };
175
+ const hangs = new Map();
176
+ const hangFor = (n) => {
177
+ let d = hangs.get(n);
178
+ if (!d) {
179
+ d = Decoration.line({ attributes: { style: `padding-left: calc(${n}ch + 12px); text-indent: -${n}ch` } });
180
+ hangs.set(n, d);
181
+ }
182
+ return d;
183
+ };
184
+ /**
185
+ * Wrapped lines hang under their own text rather than restarting at the margin, so a
186
+ * long string inside nested JSON still reads as belonging to its key. A line's padding
187
+ * is its indentation plus the hang, and a negative text-indent of the same width puts
188
+ * its first row back where it was.
189
+ */
190
+ const hang = /* @__PURE__ */ ViewPlugin.fromClass(class {
191
+ decorations;
192
+ constructor(view) {
193
+ this.decorations = this.build(view);
194
+ }
195
+ update(u) {
196
+ if (u.docChanged || u.viewportChanged)
197
+ this.decorations = this.build(u.view);
198
+ }
199
+ build(view) {
200
+ const out = new RangeSetBuilder();
201
+ for (const { from, to } of view.visibleRanges) {
202
+ for (let pos = from; pos <= to;) {
203
+ const line = view.state.doc.lineAt(pos);
204
+ out.add(line.from, line.from, hangFor(indentOf(line.text) + HANG));
205
+ pos = line.to + 1;
206
+ }
207
+ }
208
+ return out.finish();
209
+ }
210
+ }, { decorations: (v) => v.decorations });
211
+ /** Marks a programmatic edit, so a caller's own `value` is never echoed back to `onChange`. */
212
+ const External = /* @__PURE__ */ Annotation.define();
213
+ class Fault extends GutterMarker {
214
+ elementClass = 'cm-fault';
215
+ }
216
+ const FAULT_GUTTER = /* @__PURE__ */ new Fault();
217
+ const FAULT_LINE = /* @__PURE__ */ Decoration.line({ class: 'cm-fault' });
218
+ const FAULT_AT = /* @__PURE__ */ Decoration.mark({ class: 'cm-fault-at' });
219
+ function judge(state, text) {
220
+ const check = checkJson(state.doc.toString(), { text });
221
+ if (check.kind !== 'error')
222
+ return { check, marks: Decoration.none, gutter: RangeSet.empty };
223
+ const at = Math.min(check.at, state.doc.length);
224
+ const line = state.doc.lineAt(at);
225
+ const end = Math.min(at + 1, line.to);
226
+ const ranges = [FAULT_LINE.range(line.from), ...(end > at ? [FAULT_AT.range(at, end)] : [])];
227
+ return { check, marks: Decoration.set(ranges, true), gutter: RangeSet.of([FAULT_GUTTER.range(line.from)]) };
228
+ }
229
+ /** The JSON verdict as editor state: recomputed on every edit, drawn as decorations. */
230
+ const verdict = (text) => StateField.define({
231
+ create: (state) => judge(state, text),
232
+ update: (value, tr) => (tr.docChanged ? judge(tr.state, text) : value),
233
+ provide: (field) => [
234
+ EditorView.decorations.from(field, (v) => v.marks),
235
+ gutterLineClass.from(field, (v) => v.gutter),
236
+ ],
237
+ });
238
+ const px = (v) => (typeof v === 'number' ? `${v}px` : v);
239
+ export function CodeEditor({ value, defaultValue = '', language = 'javascript', height, minHeight = 96, maxHeight = 480, resizable = height === undefined, allowText = false, onChange, onCheck, onMount, readOnly = false, lineNumbers = true, wordWrap = 'on', fontSize = 14, placeholder, showCopyButton = true, showFormatButton, showLanguageSelector = true, availableLanguages = LANGUAGES, label = 'Code', ...props }) {
92
240
  const [selected, setSelected] = React.useState(language);
241
+ const [text, setText] = React.useState(value ?? defaultValue);
242
+ const [check, setCheck] = React.useState(null);
93
243
  const [copied, setCopied] = React.useState(false);
94
- const [scrollTop, setScrollTop] = React.useState(0);
95
- const field = React.useRef(null);
244
+ const [dragged, setDragged] = React.useState(null);
245
+ const host = React.useRef(null);
246
+ const grip = React.useRef(null);
247
+ const view = React.useRef(null);
96
248
  const timer = React.useRef(undefined);
97
- React.useEffect(() => {
98
- if (field.current)
99
- onMount?.(field.current);
100
- return () => clearTimeout(timer.current);
249
+ const listeners = React.useRef({ onChange, onCheck });
250
+ listeners.current = { onChange, onCheck };
251
+ const compartments = React.useMemo(() => ({ language: new Compartment(), gutter: new Compartment(), wrap: new Compartment(), edit: new Compartment() }), []);
252
+ const isJson = selected === 'json';
253
+ const field = React.useMemo(() => verdict(allowText), [allowText]);
254
+ const judged = React.useRef({ field });
255
+ judged.current.field = field;
256
+ const grammar = () => (isJson ? [json(), field] : []);
257
+ const gutter = () => (lineNumbers ? [numbering(), highlightActiveLineGutter()] : []);
258
+ const wrap = () => (wordWrap === 'off' ? [] : [EditorView.lineWrapping, hang]);
259
+ const edit = () => [EditorState.readOnly.of(readOnly), EditorView.editable.of(!readOnly)];
260
+ /** Report the JSON verdict when it changed (an edit, or a new grammar). */
261
+ const report = (state) => {
262
+ const v = state.field(judged.current.field, false);
263
+ if (v === judged.current.seen)
264
+ return;
265
+ judged.current.seen = v;
266
+ setCheck(v ? v.check : null);
267
+ if (v)
268
+ listeners.current.onCheck?.(v.check);
269
+ };
270
+ const format = React.useCallback(() => {
271
+ const v = view.current;
272
+ if (!v || v.state.readOnly)
273
+ return false;
274
+ const current = v.state.doc.toString();
275
+ const next = formatJson(current);
276
+ if (next === null || next === current)
277
+ return false;
278
+ v.dispatch({ changes: { from: 0, to: current.length, insert: next } });
279
+ return true;
101
280
  }, []);
102
- // Bound directly rather than through the gui field's `onScroll` prop: native
103
- // `scroll` does not bubble, and a listener attached this way fires however
104
- // the offset changed — a real drag or a test stating it outright.
105
281
  React.useEffect(() => {
106
- const el = field.current;
107
- if (!el)
282
+ const parent = host.current;
283
+ if (!parent)
108
284
  return;
109
- const onScroll = () => setScrollTop(el.scrollTop);
110
- el.addEventListener('scroll', onScroll);
111
- return () => el.removeEventListener('scroll', onScroll);
285
+ const listen = EditorView.updateListener.of((update) => {
286
+ if (update.docChanged && !update.transactions.some((tr) => tr.annotation(External))) {
287
+ const next = update.state.doc.toString();
288
+ setText(next);
289
+ listeners.current.onChange?.(next);
290
+ }
291
+ report(update.state);
292
+ });
293
+ const editor = new EditorView({
294
+ parent,
295
+ state: EditorState.create({
296
+ doc: value ?? defaultValue,
297
+ extensions: [
298
+ compartments.gutter.of(gutter()),
299
+ history(),
300
+ drawSelection(),
301
+ indentOnInput(),
302
+ bracketMatching(),
303
+ highlightActiveLine(),
304
+ syntaxHighlighting(INK),
305
+ keymap.of([
306
+ { key: 'Shift-Alt-f', run: format },
307
+ indentWithTab,
308
+ ...defaultKeymap,
309
+ ...historyKeymap,
310
+ {
311
+ key: 'Escape',
312
+ run: (v) => {
313
+ v.contentDOM.blur();
314
+ return true;
315
+ },
316
+ },
317
+ ]),
318
+ compartments.language.of(grammar()),
319
+ compartments.wrap.of(wrap()),
320
+ compartments.edit.of(edit()),
321
+ placeholder ? hint(placeholder) : [],
322
+ EditorView.contentAttributes.of({ 'aria-label': label, 'data-slot': 'code-editor-content' }),
323
+ FRAME,
324
+ listen,
325
+ ],
326
+ }),
327
+ });
328
+ view.current = editor;
329
+ report(editor.state);
330
+ onMount?.(editor);
331
+ return () => {
332
+ editor.destroy();
333
+ view.current = null;
334
+ clearTimeout(timer.current);
335
+ };
112
336
  }, []);
113
- const change = React.useCallback((next) => {
114
- setTyped(next);
115
- onChange?.(next);
116
- }, [onChange]);
117
- const key = (e) => {
118
- const el = e.currentTarget;
119
- if (e.key === 'Escape')
120
- el.blur();
121
- if (e.key !== 'Tab' || e.shiftKey || readOnly)
337
+ // Props that reshape the editor reach it as a reconfiguration, not a remount,
338
+ // so the caret, the selection and the undo history survive.
339
+ React.useEffect(() => {
340
+ view.current?.dispatch({
341
+ effects: [
342
+ compartments.language.reconfigure(grammar()),
343
+ compartments.gutter.reconfigure(gutter()),
344
+ compartments.wrap.reconfigure(wrap()),
345
+ compartments.edit.reconfigure(edit()),
346
+ ],
347
+ });
348
+ }, [isJson, field, lineNumbers, wordWrap, readOnly]);
349
+ // A controlled value that moved out from under the editor replaces the text.
350
+ React.useEffect(() => {
351
+ const v = view.current;
352
+ if (!v || value === undefined)
122
353
  return;
123
- e.preventDefault();
124
- el.setRangeText(INDENT, el.selectionStart ?? 0, el.selectionEnd ?? 0, 'end');
125
- change(el.value);
126
- };
354
+ const current = v.state.doc.toString();
355
+ if (value === current)
356
+ return;
357
+ v.dispatch({ changes: { from: 0, to: current.length, insert: value }, annotations: External.of(true) });
358
+ setText(value);
359
+ }, [value]);
360
+ React.useEffect(() => {
361
+ const dom = view.current?.dom;
362
+ if (!dom)
363
+ return;
364
+ dom.style.fontSize = `${fontSize}px`;
365
+ const fixed = dragged !== null ? `${dragged}px` : height !== undefined ? px(height) : '';
366
+ dom.style.height = fixed;
367
+ dom.style.minHeight = fixed ? '' : `${minHeight}px`;
368
+ dom.style.maxHeight = fixed ? '' : `${maxHeight}px`;
369
+ view.current?.requestMeasure();
370
+ }, [dragged, height, minHeight, maxHeight, fontSize]);
371
+ React.useEffect(() => {
372
+ const el = grip.current;
373
+ if (!el || !resizable)
374
+ return;
375
+ let pointer = -1;
376
+ let startY = 0;
377
+ let startH = 0;
378
+ const current = () => view.current?.dom.getBoundingClientRect().height ?? minHeight;
379
+ const down = (e) => {
380
+ if (e.button !== 0)
381
+ return;
382
+ e.preventDefault();
383
+ pointer = e.pointerId;
384
+ startY = e.clientY;
385
+ startH = current();
386
+ el.setPointerCapture?.(pointer);
387
+ };
388
+ const move = (e) => {
389
+ if (e.pointerId !== pointer)
390
+ return;
391
+ setDragged(Math.max(minHeight, Math.round(startH + e.clientY - startY)));
392
+ };
393
+ const up = (e) => {
394
+ if (e.pointerId !== pointer)
395
+ return;
396
+ el.releasePointerCapture?.(pointer);
397
+ pointer = -1;
398
+ };
399
+ const key = (e) => {
400
+ if (e.key !== 'ArrowUp' && e.key !== 'ArrowDown')
401
+ return;
402
+ e.preventDefault();
403
+ setDragged(Math.max(minHeight, Math.round(current() + (e.key === 'ArrowDown' ? STEP : -STEP))));
404
+ };
405
+ const reset = () => setDragged(null);
406
+ el.addEventListener('pointerdown', down);
407
+ el.addEventListener('pointermove', move);
408
+ el.addEventListener('pointerup', up);
409
+ el.addEventListener('pointercancel', up);
410
+ el.addEventListener('keydown', key);
411
+ el.addEventListener('dblclick', reset);
412
+ return () => {
413
+ el.removeEventListener('pointerdown', down);
414
+ el.removeEventListener('pointermove', move);
415
+ el.removeEventListener('pointerup', up);
416
+ el.removeEventListener('pointercancel', up);
417
+ el.removeEventListener('keydown', key);
418
+ el.removeEventListener('dblclick', reset);
419
+ };
420
+ }, [resizable, minHeight]);
127
421
  const copy = React.useCallback(async () => {
128
422
  try {
129
423
  await navigator.clipboard.writeText(text);
@@ -136,25 +430,34 @@ export function CodeEditor({ value, defaultValue = '', language = 'javascript',
136
430
  toast.error('Failed to copy code');
137
431
  }
138
432
  }, [text]);
139
- const named = theme === 'auto' ? undefined : PALETTE[theme];
140
- const lineHeight = `${fontSize * LEADING}px`;
141
- const wrap = wordWrap !== 'off';
142
- const gutter = Array.from({ length: text.split('\n').length }, (_, i) => i + 1).join('\n');
143
- return (_jsxs(YStack, { ...slot('code-editor'), borderWidth: 1, borderColor: "$borderColor", rounded: "$3", overflow: "hidden", bg: "$background", style: named && { backgroundColor: named.bg, borderColor: named.border }, ...props, children: [(showLanguageSelector || showCopyButton) && (_jsxs(XStack, { ...slot('code-editor-toolbar'), items: "center", justify: showLanguageSelector ? 'space-between' : 'flex-end', borderBottomWidth: 1, borderColor: "$borderColor", bg: "$panel", px: "$3", py: "$2", style: named && { backgroundColor: named.head, borderColor: named.border }, children: [showLanguageSelector && (_jsxs(Select, { value: selected, onValueChange: setSelected, children: [_jsx(SelectTrigger, { ...slot('code-editor-language-trigger'), width: "auto", minHeight: 32, borderWidth: 0, bg: "transparent", gap: "$1.5", px: "$2", children: _jsx(SizableText, { size: "$1", fontFamily: "$mono", style: named && { color: named.fg }, children: LABEL[selected] ?? selected }) }), _jsx(SelectContent, { ...slot('code-editor-language-content'), children: availableLanguages.map((lang) => (_jsx(SelectItem, { value: lang, children: LABEL[lang] ?? lang }, lang))) })] })), showCopyButton && (_jsxs(Button, { ...slot('code-editor-copy-button'), variant: "ghost", size: "sm", disabled: !text, onClick: copy, children: [copied ? _jsx(Check, { size: 14 }) : _jsx(Copy, { size: 14 }), copied ? 'Copied!' : 'Copy'] }))] })), _jsxs(XStack, { ...slot('code-editor-body'), overflow: "hidden", style: { height }, children: [lineNumbers && (_jsx(YStack, { ...slot('code-editor-gutter'), width: 48, overflow: "hidden", borderRightWidth: 1, borderColor: "$borderColor", bg: "$panel", py: RISER, style: named && { backgroundColor: named.head, borderColor: named.border }, children: _jsx(SizableText, { size: "$1", fontFamily: "$mono", color: "$soft", px: "$2", whiteSpace: "pre", style: {
144
- fontSize,
145
- lineHeight,
146
- textAlign: 'right',
147
- transform: `translateY(${-scrollTop}px)`,
148
- ...(named && { color: named.gutter }),
149
- }, children: gutter }) })), _jsx(TextArea, { ref: field, ...slot('code-editor-textarea'), "aria-label": label, value: text, onChangeText: change, onKeyDown: key, readOnly: readOnly, unstyled: true, flex: 1, minH: 0, borderWidth: 0, rounded: 0, px: "$2", py: RISER, fontFamily: "$mono", color: "$color", bg: "transparent", style: {
150
- fontSize,
151
- lineHeight,
152
- whiteSpace: wrap ? 'pre-wrap' : 'pre',
153
- overflowWrap: wrap ? 'break-word' : 'normal',
154
- overflow: 'auto',
155
- resize: 'none',
156
- height: '100%',
157
- ...(named && { color: named.fg }),
158
- } })] })] }));
433
+ // A percentage height fills a frame that is itself sized; the body has to flex for it to
434
+ // resolve. Any other height is the editor's own, so the body is just as tall as the editor.
435
+ const fills = typeof height === 'string' && height.endsWith('%');
436
+ const formattable = showFormatButton ?? (isJson && !readOnly);
437
+ const toolbar = showLanguageSelector || showCopyButton || formattable;
438
+ const footer = resizable || (isJson && check !== null);
439
+ return (_jsxs(YStack, { ...slot('code-editor'), borderWidth: 1, borderColor: "$borderColor", rounded: "$3", overflow: "hidden", bg: "$background", focusWithinStyle: { borderColor: '$outlineColor' }, ...props, children: [toolbar && (_jsxs(XStack, { ...slot('code-editor-toolbar'), items: "center", justify: "space-between", flexWrap: "wrap", gap: "$2", borderBottomWidth: 1, borderColor: "$borderColor", bg: "$panel", px: "$2", py: "$1", children: [showLanguageSelector ? (_jsxs(Select, { value: selected, onValueChange: setSelected, children: [_jsx(SelectTrigger, { ...slot('code-editor-language-trigger'), width: "auto", minHeight: 32, borderWidth: 0, bg: "transparent", gap: "$1.5", px: "$2", children: _jsx(SizableText, { size: "$1", fontFamily: "$mono", children: LABEL[selected] ?? selected }) }), _jsx(SelectContent, { ...slot('code-editor-language-content'), children: availableLanguages.map((lang) => (_jsx(SelectItem, { value: lang, children: LABEL[lang] ?? lang }, lang))) })] })) : (_jsx(SizableText, { ...slot('code-editor-language'), size: "$1", fontFamily: "$mono", color: "$soft", px: "$2", children: LABEL[selected] ?? selected })), _jsxs(XStack, { items: "center", justify: "flex-end", flexWrap: "wrap", gap: "$1", shrink: 1, minW: 0, children: [formattable && (_jsxs(Button, { ...slot('code-editor-format-button'), variant: "ghost", size: "sm", disabled: check?.kind !== 'json', onClick: format, children: [_jsx(AlignLeft, { size: 14 }), "Format"] })), showCopyButton && (_jsxs(Button, { ...slot('code-editor-copy-button'), variant: "ghost", size: "sm", disabled: !text, onClick: copy, children: [copied ? _jsx(Check, { size: 14 }) : _jsx(Copy, { size: 14 }), copied ? 'Copied!' : 'Copy'] }))] })] })), _jsx(YStack, { ref: host, ...slot('code-editor-body'), ...(fills && { flex: 1, minH: 0 }) }), footer && (_jsxs(XStack, { ref: grip, ...slot('code-editor-footer'), ...(resizable &&
440
+ {
441
+ role: 'separator',
442
+ 'aria-orientation': 'horizontal',
443
+ 'aria-label': `Resize ${label}`,
444
+ 'aria-valuemin': minHeight,
445
+ 'aria-valuenow': dragged ?? undefined,
446
+ tabIndex: 0,
447
+ }), cursor: resizable ? 'row-resize' : undefined, focusVisibleStyle: { bg: '$hover' }, items: "center", justify: "space-between", gap: "$2", minH: 28, px: "$3", py: "$1", borderTopWidth: 1, borderColor: "$borderColor", bg: "$panel", select: "none", children: [_jsx(Status, { check: isJson ? check : null }), resizable && _jsx(GripHorizontal, { size: 14, color: "$soft" })] }))] }));
448
+ }
449
+ /** The footer's JSON verdict, announced politely when it changes. */
450
+ function Status({ check }) {
451
+ const bad = check?.kind === 'error';
452
+ const words = check === null
453
+ ? ''
454
+ : check.kind === 'error'
455
+ ? `Line ${check.line}, column ${check.column}: ${check.message}`
456
+ : check.kind === 'text'
457
+ ? 'Plain text'
458
+ : check.kind === 'empty'
459
+ ? 'Empty'
460
+ : 'Valid JSON';
461
+ return (_jsxs(XStack, { ...slot('code-editor-status'), "aria-live": "polite", items: "center", gap: "$1.5", flex: 1, minW: 0, children: [bad ? (_jsx(CircleAlert, { size: 14, color: "$bad" })) : check?.kind === 'text' ? (_jsx(Type, { size: 14, color: "$soft" })) : check?.kind === 'json' ? (_jsx(CircleCheck, { size: 14, color: "$soft" })) : null, _jsx(SizableText, { ...slot('code-editor-status-text'), "data-kind": check?.kind, size: "$1", fontFamily: "$mono", color: bad ? '$bad' : '$soft', numberOfLines: 2, children: words })] }));
159
462
  }
160
463
  //# sourceMappingURL=code-editor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-editor.js","sourceRoot":"","sources":["../../../src/backends/gui/code-editor.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAoB,MAAM,YAAY,CAAA;AACpF,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,M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C,CAAC,KAAK,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CAC3B,KAAC,WAAW,IAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,OAAO,GAAG,CACxC,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,WAAW,OACN,IAAI,CAAC,yBAAyB,CAAC,eACxB,KAAK,EAAE,IAAI,EACtB,IAAI,EAAC,IAAI,EACT,UAAU,EAAC,OAAO,EAClB,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAC7B,aAAa,EAAE,CAAC,YAEf,KAAK,GACM,IACP,CACV,CAAA;AACH,CAAC"}
@@ -20,10 +20,10 @@ exports.ContextMenuCheckboxItem = exports.ContextMenuItem = exports.ContextMenuC
20
20
  exports.RadioGroup = exports.Progress = exports.PopoverClose = exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = exports.Popover = exports.Label = exports.Input = exports.ChoiceGroup = exports.ChoiceCard = exports.HoverCardContent = exports.HoverCardTrigger = exports.HoverCard = exports.Glass = exports.DropdownMenuRadioGroup = exports.DropdownMenuSubTrigger = exports.DropdownMenuSubContent = exports.DropdownMenuSub = exports.DropdownMenuPortal = exports.DropdownMenuGroup = exports.DropdownMenuShortcut = exports.DropdownMenuSeparator = exports.DropdownMenuLabel = exports.DropdownMenuRadioItem = exports.DropdownMenuCheckboxItem = exports.DropdownMenuItem = exports.DropdownMenuContent = exports.DropdownMenuTrigger = exports.DropdownMenu = exports.DialogTrigger = exports.DialogTitle = exports.DialogPortal = exports.DialogOverlay = exports.DialogHeader = exports.DialogFooter = exports.DialogDescription = exports.DialogContent = exports.DialogClose = exports.Dialog = exports.ContextMenuRadioGroup = exports.ContextMenuSubTrigger = exports.ContextMenuSubContent = exports.ContextMenuSub = exports.ContextMenuPortal = exports.ContextMenuGroup = exports.ContextMenuShortcut = exports.ContextMenuSeparator = exports.ContextMenuLabel = exports.ContextMenuRadioItem = void 0;
21
21
  exports.TabsContent = exports.TabsTrigger = exports.TabsList = exports.Tabs = exports.Switch = exports.Spinner = exports.Stepper = exports.Slider = exports.Fill = exports.Screen = exports.Band = exports.SelectScrollDownButton = exports.SelectScrollUpButton = exports.SelectSeparator = exports.SelectItem = exports.SelectLabel = exports.SelectContent = exports.SelectTrigger = exports.SelectValue = exports.SelectGroup = exports.Select = exports.Picker = exports.ScrollBar = exports.ScrollArea = exports.Text = exports.View = exports.ScrollView = exports.Spacer = exports.Separator = exports.Image = exports.Anchor = exports.Em = exports.Strong = exports.Span = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Heading = exports.Paragraph = exports.SizableText = exports.ZStack = exports.YStack = exports.XStack = exports.ResizableHandle = exports.ResizablePanel = exports.ResizablePanelGroup = exports.RadioGroupItem = void 0;
22
22
  exports.BreadcrumbSeparator = exports.BreadcrumbPage = exports.BreadcrumbList = exports.BreadcrumbLink = exports.BreadcrumbItem = exports.BreadcrumbEllipsis = exports.Breadcrumb = exports.NavItems = exports.fit = exports.MediaStack = exports.Skeleton = exports.SheetTrigger = exports.SheetTitle = exports.SheetPortal = exports.SheetOverlay = exports.SheetHeader = exports.SheetFooter = exports.SheetDescription = exports.SheetContent = exports.SheetClose = exports.Sheet = exports.CarouselNext = exports.CarouselPrevious = exports.CarouselItem = exports.CarouselContent = exports.Carousel = exports.YouTubeEmbed = exports.VideoPlayer = exports.LinkElement = exports.MDXLink = exports.useLink = exports.Link = exports.ApplyTypography = exports.useFormField = exports.FormMessage = exports.FormDescription = exports.FormControl = exports.FormLabel = exports.FormItem = exports.FormField = exports.Form = exports.TooltipProvider = exports.TooltipContent = exports.TooltipTrigger = exports.Tooltip = exports.ToggleGroupItem = exports.ToggleGroup = exports.toast = exports.Toaster = exports.Textarea = void 0;
23
- exports.ColorPicker = exports.ComboboxWithIcons = exports.Combobox = exports.CodeTabs = exports.Comparison = exports.CreditCard = exports.CompanyProfile = exports.CodeBlock = exports.CodeEditor = exports.Calendar = exports.Choicebox = exports.Banner = exports.AppleHelloEffect = exports.gradientPresets = exports.AppleCardsCarousel = exports.AnimatedCursor = exports.AnimatedTestimonials = exports.AnimatedBeam = exports.AnimatedTooltip = exports.Announcement = exports.Marquee3DPreset = exports.Marquee3DFloating = exports.Marquee3D = exports.AlertTitle = exports.AlertDescription = exports.Alert = exports.Pin3D = exports.Android = exports.AdvancedChart = exports.Card3DTitle = exports.Card3DHeader = exports.Card3DFooter = exports.Card3DDescription = exports.Card3DContent = exports.Card3D = exports.DrawerTrigger = exports.DrawerHandle = exports.DrawerContent = exports.Drawer = exports.NavigationMenuTrigger = exports.NavigationMenuList = exports.NavigationMenuLink = exports.NavigationMenuItem = exports.NavigationMenuContent = exports.NavigationMenu = exports.InputOTPSlot = exports.InputOTPSeparator = exports.InputOTPGroup = exports.InputOTP = exports.StepIndicator = void 0;
24
- exports.GlimpseImage = exports.GlimpseDescription = exports.GlimpseContent = exports.Glimpse = exports.ImageZoom = exports.IPhone15Pro = exports.GridPatternPresets = exports.GridPattern = exports.InteractiveGridPattern = exports.ImageCrop = exports.FieldTitle = exports.FieldSet = exports.FieldSeparator = exports.FieldLegend = exports.FieldLabel = exports.FieldGroup = exports.FieldError = exports.FieldDescription = exports.FieldContent = exports.Field = exports.Financials = exports.Gantt = exports.ForexMarket = exports.ForexScreener = exports.EmptyTitle = exports.EmptyMedia = exports.EmptyHeader = exports.EmptyDescription = exports.EmptyContent = exports.Empty = exports.Spotlight = exports.DockSeparator = exports.DockItem = exports.Dock = exports.Editor = exports.Dropzone = exports.DesktopWindowControls = exports.DesktopWindow = exports.DialogStack = exports.DatePicker = exports.DataTableColumnHeader = exports.DataTable = exports.useWindowManager = exports.useOverlayManager = exports.useKeyboardShortcuts = exports.useDesktopSettings = exports.Desktop = exports.MarketOverview = exports.Cursor = exports.CryptoScreener = void 0;
25
- exports.PaginationLink = exports.PaginationItem = exports.PaginationEllipsis = exports.PaginationContent = exports.Pagination = exports.OrdersHistory = exports.MotionHighlight = exports.MinimalTiptap = exports.NewsTimeline = exports.MenubarTrigger = exports.MenubarSubTrigger = exports.MenubarSubContent = exports.MenubarSub = exports.MenubarShortcut = exports.MenubarSeparator = exports.MenubarRadioItem = exports.MenubarRadioGroup = exports.MenubarPortal = exports.MenubarMenu = exports.MenubarLabel = exports.MenubarItem = exports.MenubarGroup = exports.MenubarContent = exports.MenubarCheckboxItem = exports.Menubar = exports.MessageDock = exports.MiniCalendar = exports.Marquee = exports.MenuDock = exports.Magnetic = exports.KanbanBoard = exports.LimelightNav = exports.ItemTitle = exports.ItemSeparator = exports.ItemMedia = exports.ItemHeader = exports.ItemGroup = exports.ItemFooter = exports.ItemDescription = exports.ItemContent = exports.ItemActions = exports.Item = exports.KbdGroup = exports.Kbd = exports.MacosDockItem = exports.MacosDock = exports.ListItem = exports.List = exports.GlimpseTrigger = exports.GlimpseTitle = void 0;
26
- exports.NavigationBar = exports.MediaPlayer = exports.Timeline = exports.Terminal = exports.Toggle = exports.Ticker = exports.TechnicalAnalysis = exports.Tags = exports.TableRow = exports.TableHeader = exports.TableHead = exports.TableFooter = exports.TableCell = exports.TableCaption = exports.TableBody = exports.Table = exports.StockMarket = exports.Status = exports.SymbolInfo = exports.StockScreener = exports.Snippet = exports.InlineCode = exports.encodeQr = exports.QRCode = exports.StarsScrollingWheel = exports.Safari = exports.RelativeTime = exports.PinList = exports.ParticlesBackground = exports.pillVariants = exports.Pill = exports.Particles = exports.PixelImage = exports.PositionsList = exports.OrderEntry = exports.PaginationPrevious = exports.PaginationNext = void 0;
23
+ exports.CodeTabs = exports.Comparison = exports.CreditCard = exports.CompanyProfile = exports.CodeBlock = exports.JsonTree = exports.formatJson = exports.checkJson = exports.CodeEditor = exports.Calendar = exports.Choicebox = exports.Banner = exports.AppleHelloEffect = exports.gradientPresets = exports.AppleCardsCarousel = exports.AnimatedCursor = exports.AnimatedTestimonials = exports.AnimatedBeam = exports.AnimatedTooltip = exports.Announcement = exports.Marquee3DPreset = exports.Marquee3DFloating = exports.Marquee3D = exports.AlertTitle = exports.AlertDescription = exports.Alert = exports.Pin3D = exports.Android = exports.AdvancedChart = exports.Card3DTitle = exports.Card3DHeader = exports.Card3DFooter = exports.Card3DDescription = exports.Card3DContent = exports.Card3D = exports.DrawerTrigger = exports.DrawerHandle = exports.DrawerContent = exports.Drawer = exports.NavigationMenuTrigger = exports.NavigationMenuList = exports.NavigationMenuLink = exports.NavigationMenuItem = exports.NavigationMenuContent = exports.NavigationMenu = exports.InputOTPSlot = exports.InputOTPSeparator = exports.InputOTPGroup = exports.InputOTP = exports.StepIndicator = void 0;
24
+ exports.Glimpse = exports.ImageZoom = exports.IPhone15Pro = exports.GridPatternPresets = exports.GridPattern = exports.InteractiveGridPattern = exports.ImageCrop = exports.FieldTitle = exports.FieldSet = exports.FieldSeparator = exports.FieldLegend = exports.FieldLabel = exports.FieldGroup = exports.FieldError = exports.FieldDescription = exports.FieldContent = exports.Field = exports.Financials = exports.Gantt = exports.ForexMarket = exports.ForexScreener = exports.EmptyTitle = exports.EmptyMedia = exports.EmptyHeader = exports.EmptyDescription = exports.EmptyContent = exports.Empty = exports.Spotlight = exports.DockSeparator = exports.DockItem = exports.Dock = exports.Editor = exports.Dropzone = exports.DesktopWindowControls = exports.DesktopWindow = exports.DialogStack = exports.DatePicker = exports.DataTableColumnHeader = exports.DataTable = exports.useWindowManager = exports.useOverlayManager = exports.useKeyboardShortcuts = exports.useDesktopSettings = exports.Desktop = exports.MarketOverview = exports.Cursor = exports.CryptoScreener = exports.ColorPicker = exports.ComboboxWithIcons = exports.Combobox = void 0;
25
+ exports.PaginationContent = exports.Pagination = exports.OrdersHistory = exports.MotionHighlight = exports.MinimalTiptap = exports.NewsTimeline = exports.MenubarTrigger = exports.MenubarSubTrigger = exports.MenubarSubContent = exports.MenubarSub = exports.MenubarShortcut = exports.MenubarSeparator = exports.MenubarRadioItem = exports.MenubarRadioGroup = exports.MenubarPortal = exports.MenubarMenu = exports.MenubarLabel = exports.MenubarItem = exports.MenubarGroup = exports.MenubarContent = exports.MenubarCheckboxItem = exports.Menubar = exports.MessageDock = exports.MiniCalendar = exports.Marquee = exports.MenuDock = exports.Magnetic = exports.KanbanBoard = exports.LimelightNav = exports.ItemTitle = exports.ItemSeparator = exports.ItemMedia = exports.ItemHeader = exports.ItemGroup = exports.ItemFooter = exports.ItemDescription = exports.ItemContent = exports.ItemActions = exports.Item = exports.KbdGroup = exports.Kbd = exports.MacosDockItem = exports.MacosDock = exports.ListItem = exports.List = exports.GlimpseTrigger = exports.GlimpseTitle = exports.GlimpseImage = exports.GlimpseDescription = exports.GlimpseContent = void 0;
26
+ exports.NavigationBar = exports.MediaPlayer = exports.Timeline = exports.Terminal = exports.Toggle = exports.Ticker = exports.TechnicalAnalysis = exports.Tags = exports.TableRow = exports.TableHeader = exports.TableHead = exports.TableFooter = exports.TableCell = exports.TableCaption = exports.TableBody = exports.Table = exports.StockMarket = exports.Status = exports.SymbolInfo = exports.StockScreener = exports.Snippet = exports.InlineCode = exports.encodeQr = exports.QRCode = exports.StarsScrollingWheel = exports.Safari = exports.RelativeTime = exports.PinList = exports.ParticlesBackground = exports.pillVariants = exports.Pill = exports.Particles = exports.PixelImage = exports.PositionsList = exports.OrderEntry = exports.PaginationPrevious = exports.PaginationNext = exports.PaginationLink = exports.PaginationItem = exports.PaginationEllipsis = void 0;
27
27
  var accordion_1 = require("./accordion.cjs");
28
28
  Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return accordion_1.Accordion; } });
29
29
  Object.defineProperty(exports, "AccordionItem", { enumerable: true, get: function () { return accordion_1.AccordionItem; } });
@@ -344,6 +344,11 @@ var calendar_1 = require("./calendar.cjs");
344
344
  Object.defineProperty(exports, "Calendar", { enumerable: true, get: function () { return calendar_1.Calendar; } });
345
345
  var code_editor_1 = require("./code-editor.cjs");
346
346
  Object.defineProperty(exports, "CodeEditor", { enumerable: true, get: function () { return code_editor_1.CodeEditor; } });
347
+ var json_1 = require("./json.cjs");
348
+ Object.defineProperty(exports, "checkJson", { enumerable: true, get: function () { return json_1.checkJson; } });
349
+ Object.defineProperty(exports, "formatJson", { enumerable: true, get: function () { return json_1.formatJson; } });
350
+ var json_tree_1 = require("./json-tree.cjs");
351
+ Object.defineProperty(exports, "JsonTree", { enumerable: true, get: function () { return json_tree_1.JsonTree; } });
347
352
  var code_block_1 = require("./code-block.cjs");
348
353
  Object.defineProperty(exports, "CodeBlock", { enumerable: true, get: function () { return code_block_1.CodeBlock; } });
349
354
  var company_profile_1 = require("./company-profile.cjs");
@@ -66,7 +66,9 @@ export { AppleHelloEffect, type AppleHelloEffectProps } from './apple-hello-effe
66
66
  export { Banner, type BannerProps, type BannerVariant } from './banner.js';
67
67
  export { Choicebox, type ChoiceboxOption, type ChoiceboxProps } from './choicebox.js';
68
68
  export { Calendar, type CalendarMultipleProps, type CalendarProps, type CalendarRange, type CalendarRangeProps, type CalendarSingleProps } from './calendar.js';
69
- export { CodeEditor, type CodeEditorProps, type CodeEditorTheme, type CodeEditorWordWrap } from './code-editor.js';
69
+ export { CodeEditor, type CodeEditorProps, type CodeEditorWordWrap } from './code-editor.js';
70
+ export { checkJson, formatJson, type JsonCheck, type JsonCheckOptions } from './json.js';
71
+ export { JsonTree, type JsonTreeProps } from './json-tree.js';
70
72
  export { CodeBlock, type CodeBlockDiff, type CodeBlockProps, type CodeBlockSize, type CodeBlockTheme } from './code-block.js';
71
73
  export { CompanyProfile, type CompanyProfileProps, type CompanyProfileTheme } from './company-profile.js';
72
74
  export { CreditCard, type CreditCardProps, type CreditCardVariant } from './credit-card.js';