@niscorp/nova 0.1.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/ACTION_DOCS.md +552 -0
- package/ADAPTER.md +170 -0
- package/DESIGN.md +719 -0
- package/I18N_DOCS.md +224 -0
- package/LAYOUT_DOCS.md +505 -0
- package/LICENSE +202 -0
- package/REACT_DOCS.md +562 -0
- package/README.md +379 -0
- package/SHELL_DOCS.md +615 -0
- package/TERMINAL_DOCS.md +124 -0
- package/dist/adapters/dom/components/index.cjs +473 -0
- package/dist/adapters/dom/components/index.cjs.map +1 -0
- package/dist/adapters/dom/components/index.d.cts +48 -0
- package/dist/adapters/dom/components/index.d.ts +48 -0
- package/dist/adapters/dom/components/index.js +420 -0
- package/dist/adapters/dom/components/index.js.map +1 -0
- package/dist/adapters/dom/index.cjs +171 -0
- package/dist/adapters/dom/index.cjs.map +1 -0
- package/dist/adapters/dom/index.d.cts +29 -0
- package/dist/adapters/dom/index.d.ts +29 -0
- package/dist/adapters/dom/index.js +15 -0
- package/dist/adapters/dom/index.js.map +1 -0
- package/dist/adapters/dom/server.cjs +129 -0
- package/dist/adapters/dom/server.cjs.map +1 -0
- package/dist/adapters/dom/server.d.cts +15 -0
- package/dist/adapters/dom/server.d.ts +15 -0
- package/dist/adapters/dom/server.js +37 -0
- package/dist/adapters/dom/server.js.map +1 -0
- package/dist/adapters/ink/index.d.ts +75 -0
- package/dist/adapters/ink/index.js +472 -0
- package/dist/adapters/ink/index.js.map +1 -0
- package/dist/adapters/react/components/index.cjs +552 -0
- package/dist/adapters/react/components/index.cjs.map +1 -0
- package/dist/adapters/react/components/index.d.cts +30 -0
- package/dist/adapters/react/components/index.d.ts +30 -0
- package/dist/adapters/react/components/index.js +12 -0
- package/dist/adapters/react/components/index.js.map +1 -0
- package/dist/adapters/react/index.cjs +1526 -0
- package/dist/adapters/react/index.cjs.map +1 -0
- package/dist/adapters/react/index.d.cts +149 -0
- package/dist/adapters/react/index.d.ts +149 -0
- package/dist/adapters/react/index.js +12 -0
- package/dist/adapters/react/index.js.map +1 -0
- package/dist/adapters/tty/components/index.cjs +255 -0
- package/dist/adapters/tty/components/index.cjs.map +1 -0
- package/dist/adapters/tty/components/index.d.cts +40 -0
- package/dist/adapters/tty/components/index.d.ts +40 -0
- package/dist/adapters/tty/components/index.js +187 -0
- package/dist/adapters/tty/components/index.js.map +1 -0
- package/dist/adapters/tty/index.cjs +76 -0
- package/dist/adapters/tty/index.cjs.map +1 -0
- package/dist/adapters/tty/index.d.cts +47 -0
- package/dist/adapters/tty/index.d.ts +47 -0
- package/dist/adapters/tty/index.js +76 -0
- package/dist/adapters/tty/index.js.map +1 -0
- package/dist/adapters/vue/components/index.cjs +619 -0
- package/dist/adapters/vue/components/index.cjs.map +1 -0
- package/dist/adapters/vue/components/index.d.cts +224 -0
- package/dist/adapters/vue/components/index.d.ts +224 -0
- package/dist/adapters/vue/components/index.js +12 -0
- package/dist/adapters/vue/components/index.js.map +1 -0
- package/dist/adapters/vue/index.cjs +747 -0
- package/dist/adapters/vue/index.cjs.map +1 -0
- package/dist/adapters/vue/index.d.cts +98 -0
- package/dist/adapters/vue/index.d.ts +98 -0
- package/dist/adapters/vue/index.js +127 -0
- package/dist/adapters/vue/index.js.map +1 -0
- package/dist/agent/index.cjs +178 -0
- package/dist/agent/index.cjs.map +1 -0
- package/dist/agent/index.d.cts +28 -0
- package/dist/agent/index.d.ts +28 -0
- package/dist/agent/index.js +30 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/chunk-2MNLEL45.js +47 -0
- package/dist/chunk-2MNLEL45.js.map +1 -0
- package/dist/chunk-3HGE3VWK.js +753 -0
- package/dist/chunk-3HGE3VWK.js.map +1 -0
- package/dist/chunk-4ZID7UX5.js +549 -0
- package/dist/chunk-4ZID7UX5.js.map +1 -0
- package/dist/chunk-7B3RDENH.js +1982 -0
- package/dist/chunk-7B3RDENH.js.map +1 -0
- package/dist/chunk-7S5BNPUS.js +54 -0
- package/dist/chunk-7S5BNPUS.js.map +1 -0
- package/dist/chunk-7TS3YVQR.js +114 -0
- package/dist/chunk-7TS3YVQR.js.map +1 -0
- package/dist/chunk-EG2RUXJN.js +266 -0
- package/dist/chunk-EG2RUXJN.js.map +1 -0
- package/dist/chunk-GVBBL36G.js +429 -0
- package/dist/chunk-GVBBL36G.js.map +1 -0
- package/dist/chunk-I5D2R5UA.js +753 -0
- package/dist/chunk-I5D2R5UA.js.map +1 -0
- package/dist/chunk-IGLCWXQ3.js +304 -0
- package/dist/chunk-IGLCWXQ3.js.map +1 -0
- package/dist/chunk-JI7ZRESP.js +64 -0
- package/dist/chunk-JI7ZRESP.js.map +1 -0
- package/dist/chunk-L5223LLX.js +31 -0
- package/dist/chunk-L5223LLX.js.map +1 -0
- package/dist/chunk-LA3BSEMX.js +1905 -0
- package/dist/chunk-LA3BSEMX.js.map +1 -0
- package/dist/chunk-OAMC6R6E.js +121 -0
- package/dist/chunk-OAMC6R6E.js.map +1 -0
- package/dist/chunk-OGD5CCMZ.js +62 -0
- package/dist/chunk-OGD5CCMZ.js.map +1 -0
- package/dist/chunk-PF4OJTYU.js +199 -0
- package/dist/chunk-PF4OJTYU.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +9 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-RBU5PHN4.js +8 -0
- package/dist/chunk-RBU5PHN4.js.map +1 -0
- package/dist/chunk-RQB4PRPV.js +285 -0
- package/dist/chunk-RQB4PRPV.js.map +1 -0
- package/dist/chunk-V32EVEVM.js +464 -0
- package/dist/chunk-V32EVEVM.js.map +1 -0
- package/dist/chunk-ZITHBBF3.js +85 -0
- package/dist/chunk-ZITHBBF3.js.map +1 -0
- package/dist/devtools/index.cjs +1088 -0
- package/dist/devtools/index.cjs.map +1 -0
- package/dist/devtools/index.d.cts +33 -0
- package/dist/devtools/index.d.ts +33 -0
- package/dist/devtools/index.js +399 -0
- package/dist/devtools/index.js.map +1 -0
- package/dist/effects-CndX9K7D.d.cts +123 -0
- package/dist/effects-CndX9K7D.d.ts +123 -0
- package/dist/endpoints-CD-6Jl-H.d.ts +36 -0
- package/dist/endpoints-Dem-EdRx.d.cts +36 -0
- package/dist/i18n/index.cjs +299 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +28 -0
- package/dist/i18n/index.d.ts +28 -0
- package/dist/i18n/index.js +180 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index-CNfzSBe2.d.ts +93 -0
- package/dist/index-caZoXSwr.d.cts +93 -0
- package/dist/index.cjs +3723 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +144 -0
- package/dist/index.d.ts +144 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/index.cjs +635 -0
- package/dist/migrations/index.cjs.map +1 -0
- package/dist/migrations/index.d.cts +97 -0
- package/dist/migrations/index.d.ts +97 -0
- package/dist/migrations/index.js +50 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/palette-CP0wd3bE.d.ts +15 -0
- package/dist/palette-lm0bU9i5.d.cts +15 -0
- package/dist/primitive-props-BH_EJWIe.d.cts +100 -0
- package/dist/primitive-props-BH_EJWIe.d.ts +100 -0
- package/dist/primitive-props-CGoJvmcH.d.cts +100 -0
- package/dist/primitive-props-CGoJvmcH.d.ts +100 -0
- package/dist/reflect/index.cjs +998 -0
- package/dist/reflect/index.cjs.map +1 -0
- package/dist/reflect/index.d.cts +125 -0
- package/dist/reflect/index.d.ts +125 -0
- package/dist/reflect/index.js +13 -0
- package/dist/reflect/index.js.map +1 -0
- package/dist/schemas-DPdeFlCT.d.cts +38 -0
- package/dist/schemas-DPdeFlCT.d.ts +38 -0
- package/dist/schemas-pMyyuXV7.d.cts +47 -0
- package/dist/schemas-pMyyuXV7.d.ts +47 -0
- package/dist/types-Boh9ckdG.d.ts +194 -0
- package/dist/types-Brc7v_pS.d.ts +198 -0
- package/dist/types-ByNSwtUV.d.cts +20 -0
- package/dist/types-DdltMfw7.d.ts +20 -0
- package/dist/types-De0KpxfI.d.cts +198 -0
- package/dist/types-DhHL0twe.d.ts +20 -0
- package/dist/types-Dv6JLmgo.d.cts +194 -0
- package/dist/types-Q80YtOQt.d.cts +20 -0
- package/package.json +237 -0
package/TERMINAL_DOCS.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Terminal adapters — `adapters/tty` and `adapters/ink`
|
|
2
|
+
|
|
3
|
+
Two adapters render a served tree in a terminal. The TTY adapter is a pure
|
|
4
|
+
text renderer for line hosts (a REPL, a pipe, an agent); the Ink adapter is
|
|
5
|
+
a full-screen TUI kit riding the React adapter's walker. They share one
|
|
6
|
+
idea: every interactive carries a numbered `[n]` marker, and the numbering
|
|
7
|
+
is computed once (by the TTY walker) so `[7]` is the same interactive in
|
|
8
|
+
both. The shared adapter contract is [ADAPTER.md](ADAPTER.md); the host
|
|
9
|
+
that binds these to a live server is `@niscorp/moss` (`terminal/tty`,
|
|
10
|
+
`terminal/ink`).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## `@niscorp/nova/adapters/tty`
|
|
15
|
+
|
|
16
|
+
Pure functions — no framework, no I/O, no node builtins. Importable
|
|
17
|
+
anywhere.
|
|
18
|
+
|
|
19
|
+
### `createTtyView(registry, api, options?): TtyView`
|
|
20
|
+
|
|
21
|
+
- `registry: ComponentRegistry<TtyComponent>` — the kit.
|
|
22
|
+
- `api: TtyRenderApi` — core's `RenderApi` (`frame()`, `canvasTree(id)`,
|
|
23
|
+
`dispatch(id, event)`, `publish(channel, payload?)`).
|
|
24
|
+
- `options.fallback?: TtyComponent` — renderer for unregistered names;
|
|
25
|
+
omit for strict `COMPONENT_NOT_FOUND` markers.
|
|
26
|
+
- `view.render(): TtyFrame` — walk the current snapshot. Call on every
|
|
27
|
+
host update; the view holds no state.
|
|
28
|
+
|
|
29
|
+
### `TtyFrame`
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
{ text: string; interactives: TtyInteractive[] }
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`text` is the whole screen: one rule line per non-empty canvas
|
|
36
|
+
(`── main ───`), component lines below, blank runs collapsed. Empty
|
|
37
|
+
canvases collapse entirely.
|
|
38
|
+
|
|
39
|
+
### `TtyInteractive`
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
{ index, kind, ref, canvas, origin?, label, value?, path? }
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- `index` — the printed `[n]`, 1-based, registration order.
|
|
46
|
+
- `kind` — `'click' | 'row' | 'model' | 'toggle'`. The host maps these to
|
|
47
|
+
events: click/row → `ui:click` (payload `value`), toggle → `ui:model`
|
|
48
|
+
with the negated boolean, model → the host's own input flow.
|
|
49
|
+
- `canvas` — whose dispatch this belongs to; `''` is frame chrome
|
|
50
|
+
(dispatches nothing).
|
|
51
|
+
- `origin` — the action instance it sits in (the enclosing `ActionSlot`'s
|
|
52
|
+
`instanceId`; a `CanvasSlot` starts outside any). A list canvas renders
|
|
53
|
+
several live instances that share refs — a tab bar's every button is
|
|
54
|
+
`open` — so the host stamps this as the event's `origin`, as the DOM
|
|
55
|
+
adapter does, or the server's card-deck fallback picks one of them.
|
|
56
|
+
- `value` — click/row: the dispatch payload; model/toggle: the current
|
|
57
|
+
value. `path` — the model path, display only.
|
|
58
|
+
|
|
59
|
+
The walker applies the conventions itself: any `ref`'d node gets a click
|
|
60
|
+
marker (payload = its `value` prop), any `model`'d node gets a model
|
|
61
|
+
marker (`toggle` when its current value is boolean). Components never
|
|
62
|
+
handle events; data-driven internals (a table's rows, a panel's `✕`)
|
|
63
|
+
register through `ctx.register`.
|
|
64
|
+
|
|
65
|
+
### `TtyComponent`
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
(ctx: { props; children: TtyBlock[]; register }) => TtyBlock // TtyBlock = { lines: string[] }
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Kit (`/adapters/tty/components`): `defaultRegistry()` with `Box, Row,
|
|
72
|
+
Stack, Grid, Text, Button, Input, Select, Textarea, Checkbox, Switch,
|
|
73
|
+
Table, Badge, Panel, JsonTree, ActionSlot`, plus `fallback` (unknown names
|
|
74
|
+
render their children; childless ones surface `label`/`title` + `count`)
|
|
75
|
+
and the line helpers (`stack`, `inline`, `pad`, `truncate`, …).
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## `@niscorp/nova/adapters/ink`
|
|
80
|
+
|
|
81
|
+
An Ink component kit for the React adapter's walker — ESM-only, `ink` and
|
|
82
|
+
`ink-text-input` are optional peers. There is no separate walker: mount
|
|
83
|
+
`NovaRenderProvider` + `RenderTree` and register this kit.
|
|
84
|
+
|
|
85
|
+
### Host obligations
|
|
86
|
+
|
|
87
|
+
- Pass the three host leaf renderers to `NovaRenderProvider`: `fallback`
|
|
88
|
+
(this kit's), `textWrapper` (`TextWrap` — ink forbids bare strings
|
|
89
|
+
outside `<Text>`), `errorMarker` (`ErrorMarker` — the DOM default
|
|
90
|
+
`<span>` crashes ink).
|
|
91
|
+
- For `[n]` markers, provide `CanvasMarkersContext` per canvas with a
|
|
92
|
+
resolver `(ref, { value?, occurrence? }) => number | undefined` and
|
|
93
|
+
provide `FrameControlsContext` at the root (`setTyping` — a focused
|
|
94
|
+
input claims typed digits as text, so the host's number handling must
|
|
95
|
+
stand down). Without providers the kit renders markerless and Tab-only.
|
|
96
|
+
- Marker identity: click-kinds resolve by `value` (a list's rows share one
|
|
97
|
+
ref and differ by payload), model-kinds by `occurrence` (their value
|
|
98
|
+
changes as you type). `markerFocusId(n)` is the ink focus id a marked
|
|
99
|
+
component adopts — `useFocusManager().focus(markerFocusId(n))` jumps to
|
|
100
|
+
it.
|
|
101
|
+
|
|
102
|
+
### Interaction conventions
|
|
103
|
+
|
|
104
|
+
Tab/Shift+Tab cycle ink's focus ring; Enter (or Space) activates; a
|
|
105
|
+
focused Input holds a local draft, honours `debounce`, submits `ui:key
|
|
106
|
+
Enter`, and forwards ↑/↓ to the server as `ui:key ArrowDown/ArrowUp` (a
|
|
107
|
+
served palette moves its own highlight). Typed-digit handling is the
|
|
108
|
+
host's job — the kit only displays markers and adopts their focus ids.
|
|
109
|
+
|
|
110
|
+
### Exports
|
|
111
|
+
|
|
112
|
+
`defaultRegistry()` — `Box, Row, Stack, Grid, Text, Button, Input, Select,
|
|
113
|
+
Textarea, Checkbox, Switch, Table, Badge, Panel, JsonTree, ActionSlot`;
|
|
114
|
+
`fallback` (ref'd unknowns are focusable and click on Enter); `TextWrap`,
|
|
115
|
+
`ErrorMarker`; `useActionable(novaRef, value)` — the full interactive
|
|
116
|
+
convention (marker + focus + Enter-click) for an app's own components;
|
|
117
|
+
`useMarker`, `Mark`, `markerFocusId`, `CanvasMarkersContext`,
|
|
118
|
+
`FrameControlsContext`.
|
|
119
|
+
|
|
120
|
+
Layout mapping: Grid honours `weights` (flex ratios) and `columns`
|
|
121
|
+
(wrapping tracks); Row honours `justify`/`align`; containers honour
|
|
122
|
+
`border` (incl. sided `'r'`/`'l'`/`'t'`/`'b'`), `padding`, `w`/`width`
|
|
123
|
+
(px→cells at ~8px/cell, percent passthrough), `grow`. What has no
|
|
124
|
+
terminal analog (bg, radius, drag) is absent, never faked.
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __export = (target, all) => {
|
|
5
|
+
for (var name in all)
|
|
6
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
// src/layout/registry.ts
|
|
10
|
+
var hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
|
|
11
|
+
var isComponentMeta = (value) => {
|
|
12
|
+
if (typeof value !== "object" || value === null) return false;
|
|
13
|
+
return true;
|
|
14
|
+
};
|
|
15
|
+
var extractStaticMeta = (component) => {
|
|
16
|
+
if (typeof component !== "function" && (typeof component !== "object" || component === null)) {
|
|
17
|
+
return void 0;
|
|
18
|
+
}
|
|
19
|
+
const host = component;
|
|
20
|
+
if (!hasOwn(host, "meta")) return void 0;
|
|
21
|
+
const candidate = host.meta;
|
|
22
|
+
if (!isComponentMeta(candidate)) return void 0;
|
|
23
|
+
return candidate;
|
|
24
|
+
};
|
|
25
|
+
var isEntryShape = (value) => {
|
|
26
|
+
if (typeof value !== "object" || value === null) return false;
|
|
27
|
+
return hasOwn(value, "component");
|
|
28
|
+
};
|
|
29
|
+
var createComponentRegistry = () => {
|
|
30
|
+
const entries = /* @__PURE__ */ new Map();
|
|
31
|
+
const register = (name, component, meta) => {
|
|
32
|
+
const staticMeta = extractStaticMeta(component);
|
|
33
|
+
const merged = { ...staticMeta ?? {}, ...meta ?? {} };
|
|
34
|
+
entries.set(name, { component, meta: merged });
|
|
35
|
+
};
|
|
36
|
+
const registerAll = (batch) => {
|
|
37
|
+
for (const name of Object.keys(batch)) {
|
|
38
|
+
const input = batch[name];
|
|
39
|
+
if (input === void 0) continue;
|
|
40
|
+
if (isEntryShape(input)) {
|
|
41
|
+
register(name, input.component, input.meta);
|
|
42
|
+
} else {
|
|
43
|
+
register(name, input);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const get = (name) => entries.get(name);
|
|
48
|
+
const has = (name) => entries.has(name);
|
|
49
|
+
const list = () => Array.from(entries.keys());
|
|
50
|
+
return { register, registerAll, get, has, list };
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// src/adapters/dom/components/components.ts
|
|
54
|
+
var components_exports = {};
|
|
55
|
+
__export(components_exports, {
|
|
56
|
+
ActionSlot: () => ActionSlot,
|
|
57
|
+
Box: () => Box,
|
|
58
|
+
Button: () => Button,
|
|
59
|
+
Checkbox: () => Checkbox,
|
|
60
|
+
Grid: () => Grid,
|
|
61
|
+
Input: () => Input,
|
|
62
|
+
JsonTree: () => JsonTree,
|
|
63
|
+
Panel: () => Panel,
|
|
64
|
+
Row: () => Row,
|
|
65
|
+
Stack: () => Stack,
|
|
66
|
+
Table: () => Table,
|
|
67
|
+
Text: () => Text,
|
|
68
|
+
Textarea: () => Textarea,
|
|
69
|
+
fallback: () => fallback
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// src/adapters/dom/components/props.ts
|
|
73
|
+
var num = (props, key) => {
|
|
74
|
+
const value = props[key];
|
|
75
|
+
return typeof value === "number" ? value : void 0;
|
|
76
|
+
};
|
|
77
|
+
var str = (props, key) => {
|
|
78
|
+
const value = props[key];
|
|
79
|
+
return typeof value === "string" ? value : void 0;
|
|
80
|
+
};
|
|
81
|
+
var bool = (props, key) => props[key] === true;
|
|
82
|
+
var dim = (value) => typeof value === "number" ? `${value}px` : typeof value === "string" ? value : void 0;
|
|
83
|
+
var px = (value) => value === void 0 ? void 0 : `${value}px`;
|
|
84
|
+
var JUSTIFY = {
|
|
85
|
+
start: "flex-start",
|
|
86
|
+
center: "center",
|
|
87
|
+
end: "flex-end",
|
|
88
|
+
between: "space-between",
|
|
89
|
+
around: "space-around",
|
|
90
|
+
stretch: "stretch"
|
|
91
|
+
};
|
|
92
|
+
var ALIGN = {
|
|
93
|
+
start: "flex-start",
|
|
94
|
+
center: "center",
|
|
95
|
+
end: "flex-end",
|
|
96
|
+
stretch: "stretch",
|
|
97
|
+
baseline: "baseline"
|
|
98
|
+
};
|
|
99
|
+
var SIZE = { xs: "12px", sm: "13px", md: "14px", lg: "16px", xl: "20px", "2xl": "24px" };
|
|
100
|
+
var WEIGHT = { normal: "400", medium: "500", semibold: "600", bold: "700" };
|
|
101
|
+
var COLOR = {
|
|
102
|
+
mute: "var(--dom-mute)",
|
|
103
|
+
muted: "var(--dom-mute)",
|
|
104
|
+
dim: "var(--dom-mute)",
|
|
105
|
+
secondary: "#4b5563",
|
|
106
|
+
accent: "var(--dom-accent)"
|
|
107
|
+
};
|
|
108
|
+
var BG = { surface: "#fbfcfd", canvas: "#ffffff", dim: "#f4f5f7", mute: "#f4f5f7" };
|
|
109
|
+
var css = (el, style) => {
|
|
110
|
+
for (const [key, value] of Object.entries(style)) if (value !== void 0) el.style.setProperty(key, value);
|
|
111
|
+
};
|
|
112
|
+
var boxStyle = (props) => {
|
|
113
|
+
const p = num(props, "p") ?? num(props, "padding");
|
|
114
|
+
const border = props["border"];
|
|
115
|
+
const bg = str(props, "bg") ?? str(props, "background");
|
|
116
|
+
return {
|
|
117
|
+
width: dim(props["w"]) ?? dim(props["width"]),
|
|
118
|
+
height: dim(props["h"]) ?? dim(props["height"]),
|
|
119
|
+
padding: px(p),
|
|
120
|
+
"padding-left": px(num(props, "px")),
|
|
121
|
+
"padding-right": px(num(props, "px")),
|
|
122
|
+
"padding-top": px(num(props, "py")),
|
|
123
|
+
"padding-bottom": px(num(props, "py")),
|
|
124
|
+
"flex-grow": bool(props, "grow") ? "1" : void 0,
|
|
125
|
+
background: bg === void 0 ? void 0 : BG[bg] ?? bg,
|
|
126
|
+
"border-radius": px(num(props, "radius")),
|
|
127
|
+
border: border === true ? "1px solid var(--dom-line)" : void 0,
|
|
128
|
+
[`border-${typeof border === "string" ? border : "x"}`]: typeof border === "string" ? "1px solid var(--dom-line)" : void 0
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
var flexStyle = (props, direction) => ({
|
|
132
|
+
display: "flex",
|
|
133
|
+
"flex-direction": direction,
|
|
134
|
+
gap: px(num(props, "gap")),
|
|
135
|
+
"align-items": ALIGN[str(props, "align") ?? ""],
|
|
136
|
+
"justify-content": JUSTIFY[str(props, "justify") ?? ""],
|
|
137
|
+
"flex-wrap": bool(props, "wrap") ? "wrap" : void 0
|
|
138
|
+
});
|
|
139
|
+
var gridStyle = (props) => {
|
|
140
|
+
const columns = num(props, "columns");
|
|
141
|
+
const weights = props["weights"];
|
|
142
|
+
const template = Array.isArray(weights) ? weights.map((w) => typeof w === "number" ? `${w}fr` : "1fr").join(" ") : columns !== void 0 ? `repeat(${columns}, 1fr)` : void 0;
|
|
143
|
+
return {
|
|
144
|
+
display: "grid",
|
|
145
|
+
"grid-template-columns": template,
|
|
146
|
+
gap: px(num(props, "gap")),
|
|
147
|
+
"align-items": ALIGN[str(props, "align") ?? ""]
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
var textStyle = (props) => {
|
|
151
|
+
const size = str(props, "size");
|
|
152
|
+
const weightNum = num(props, "weight");
|
|
153
|
+
const color = str(props, "color");
|
|
154
|
+
return {
|
|
155
|
+
"font-size": size === void 0 ? void 0 : SIZE[size] ?? size,
|
|
156
|
+
"font-weight": weightNum !== void 0 ? String(weightNum) : WEIGHT[str(props, "weight") ?? ""],
|
|
157
|
+
color: color === void 0 ? void 0 : COLOR[color] ?? color,
|
|
158
|
+
"text-transform": bool(props, "upper") ? "uppercase" : void 0,
|
|
159
|
+
"letter-spacing": bool(props, "upper") ? "0.04em" : void 0
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
var ICON = {
|
|
163
|
+
plus: "+",
|
|
164
|
+
bell: "\u{1F514}",
|
|
165
|
+
sparkles: "\u2728",
|
|
166
|
+
more: "\u22EF",
|
|
167
|
+
search: "\u{1F50D}",
|
|
168
|
+
check: "\u2713",
|
|
169
|
+
close: "\u2715",
|
|
170
|
+
settings: "\u2699"
|
|
171
|
+
};
|
|
172
|
+
var iconGlyph = (name) => ICON[name] ?? name;
|
|
173
|
+
|
|
174
|
+
// src/adapters/dom/components/components.ts
|
|
175
|
+
var elem = (tag, children) => {
|
|
176
|
+
const node = document.createElement(tag);
|
|
177
|
+
for (const child of children) node.appendChild(child);
|
|
178
|
+
return node;
|
|
179
|
+
};
|
|
180
|
+
var Box = ({ props, children }) => {
|
|
181
|
+
const el = elem("div", children);
|
|
182
|
+
css(el, boxStyle(props));
|
|
183
|
+
return el;
|
|
184
|
+
};
|
|
185
|
+
var Row = ({ props, children }) => {
|
|
186
|
+
const el = elem("div", children);
|
|
187
|
+
css(el, { ...flexStyle(props, "row"), ...boxStyle(props) });
|
|
188
|
+
return el;
|
|
189
|
+
};
|
|
190
|
+
var Stack = ({ props, children }) => {
|
|
191
|
+
const el = elem("div", children);
|
|
192
|
+
css(el, { ...flexStyle(props, "column"), ...boxStyle(props) });
|
|
193
|
+
return el;
|
|
194
|
+
};
|
|
195
|
+
var Grid = ({ props, children }) => {
|
|
196
|
+
const el = elem("div", children);
|
|
197
|
+
css(el, { ...gridStyle(props), ...boxStyle(props) });
|
|
198
|
+
return el;
|
|
199
|
+
};
|
|
200
|
+
var Text = ({ props, children }) => {
|
|
201
|
+
const el = elem(str(props, "as") ?? "span", children);
|
|
202
|
+
css(el, textStyle(props));
|
|
203
|
+
return el;
|
|
204
|
+
};
|
|
205
|
+
var Button = ({ props, children }) => {
|
|
206
|
+
const el = elem("button", children);
|
|
207
|
+
const icon = str(props, "icon");
|
|
208
|
+
if (children.length === 0 && icon !== void 0) el.textContent = iconGlyph(icon);
|
|
209
|
+
const variant = str(props, "variant");
|
|
210
|
+
if (variant !== void 0) el.setAttribute("data-variant", variant);
|
|
211
|
+
const size = str(props, "size");
|
|
212
|
+
if (size !== void 0) el.setAttribute("data-size", size);
|
|
213
|
+
return el;
|
|
214
|
+
};
|
|
215
|
+
var inputEl = (props) => {
|
|
216
|
+
const el = document.createElement("input");
|
|
217
|
+
el.type = str(props, "type") ?? "text";
|
|
218
|
+
const placeholder = str(props, "placeholder");
|
|
219
|
+
if (placeholder !== void 0) el.placeholder = placeholder;
|
|
220
|
+
const value = props["value"];
|
|
221
|
+
if (typeof value === "string" || typeof value === "number") el.value = String(value);
|
|
222
|
+
const width = num(props, "w") ?? num(props, "width");
|
|
223
|
+
if (width !== void 0) el.style.setProperty("width", `${width}px`);
|
|
224
|
+
return el;
|
|
225
|
+
};
|
|
226
|
+
var Input = ({ props }) => inputEl(props);
|
|
227
|
+
var Checkbox = ({ props }) => {
|
|
228
|
+
const el = document.createElement("input");
|
|
229
|
+
el.type = "checkbox";
|
|
230
|
+
el.checked = bool(props, "value") || bool(props, "checked");
|
|
231
|
+
return el;
|
|
232
|
+
};
|
|
233
|
+
var Textarea = ({ props }) => {
|
|
234
|
+
const el = document.createElement("textarea");
|
|
235
|
+
const value = props["value"];
|
|
236
|
+
if (typeof value === "string" || typeof value === "number") el.value = String(value);
|
|
237
|
+
return el;
|
|
238
|
+
};
|
|
239
|
+
var at = (row, key) => {
|
|
240
|
+
let cursor = row;
|
|
241
|
+
for (const segment of key.split(".")) {
|
|
242
|
+
if (cursor === null || typeof cursor !== "object") return void 0;
|
|
243
|
+
cursor = Reflect.get(cursor, segment);
|
|
244
|
+
}
|
|
245
|
+
return cursor;
|
|
246
|
+
};
|
|
247
|
+
var cellText = (value) => value === null || value === void 0 ? "" : String(value);
|
|
248
|
+
var columnsOf = (props) => {
|
|
249
|
+
const value = props["columns"];
|
|
250
|
+
if (!Array.isArray(value)) return [];
|
|
251
|
+
const out = [];
|
|
252
|
+
for (const item of value) if (item !== null && typeof item === "object") out.push(item);
|
|
253
|
+
return out;
|
|
254
|
+
};
|
|
255
|
+
var cellKey = (column) => typeof column.cell?.key === "string" ? column.cell.key : "";
|
|
256
|
+
var Table = ({ props, dispatch }) => {
|
|
257
|
+
const columns = columnsOf(props);
|
|
258
|
+
const rows = Array.isArray(props["rows"]) ? props["rows"] : [];
|
|
259
|
+
const rowKey = str(props, "rowKey") ?? "id";
|
|
260
|
+
const clickKey = str(props, "clickKey") ?? rowKey;
|
|
261
|
+
const rowRef = str(props, "rowRef");
|
|
262
|
+
const table = document.createElement("table");
|
|
263
|
+
const head = document.createElement("thead");
|
|
264
|
+
const headRow = document.createElement("tr");
|
|
265
|
+
for (const column of columns) {
|
|
266
|
+
const th = document.createElement("th");
|
|
267
|
+
th.textContent = typeof column.label === "string" ? column.label : "";
|
|
268
|
+
headRow.appendChild(th);
|
|
269
|
+
}
|
|
270
|
+
head.appendChild(headRow);
|
|
271
|
+
table.appendChild(head);
|
|
272
|
+
const body = document.createElement("tbody");
|
|
273
|
+
if (rows.length === 0) {
|
|
274
|
+
const tr = document.createElement("tr");
|
|
275
|
+
const td = document.createElement("td");
|
|
276
|
+
td.setAttribute("colspan", String(Math.max(1, columns.length)));
|
|
277
|
+
td.textContent = str(props, "empty") ?? "Nothing here.";
|
|
278
|
+
tr.appendChild(td);
|
|
279
|
+
body.appendChild(tr);
|
|
280
|
+
} else {
|
|
281
|
+
for (const row of rows) {
|
|
282
|
+
const tr = document.createElement("tr");
|
|
283
|
+
for (const column of columns) {
|
|
284
|
+
const td = document.createElement("td");
|
|
285
|
+
td.textContent = cellText(at(row, cellKey(column)));
|
|
286
|
+
tr.appendChild(td);
|
|
287
|
+
}
|
|
288
|
+
if (rowRef !== void 0) {
|
|
289
|
+
tr.setAttribute("data-row", "");
|
|
290
|
+
tr.addEventListener("click", () => dispatch({ type: "ui:click", ref: rowRef, payload: at(row, clickKey) }));
|
|
291
|
+
}
|
|
292
|
+
body.appendChild(tr);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
table.appendChild(body);
|
|
296
|
+
return table;
|
|
297
|
+
};
|
|
298
|
+
var Panel = ({ props, children, dispatch }) => {
|
|
299
|
+
const el = document.createElement("div");
|
|
300
|
+
el.setAttribute("data-panel", "");
|
|
301
|
+
const title = str(props, "title");
|
|
302
|
+
if (title !== void 0) {
|
|
303
|
+
const head = document.createElement("div");
|
|
304
|
+
head.setAttribute("data-panel-title", "");
|
|
305
|
+
const backRef = str(props, "backRef");
|
|
306
|
+
if (backRef !== void 0) {
|
|
307
|
+
const back = document.createElement("button");
|
|
308
|
+
back.type = "button";
|
|
309
|
+
back.textContent = "\u2190";
|
|
310
|
+
back.addEventListener("click", (e) => {
|
|
311
|
+
e.stopPropagation();
|
|
312
|
+
dispatch({ type: "ui:click", ref: backRef });
|
|
313
|
+
});
|
|
314
|
+
head.appendChild(back);
|
|
315
|
+
}
|
|
316
|
+
head.appendChild(document.createTextNode(title));
|
|
317
|
+
const closeRef = str(props, "closeRef");
|
|
318
|
+
if (closeRef !== void 0) {
|
|
319
|
+
const close = document.createElement("button");
|
|
320
|
+
close.type = "button";
|
|
321
|
+
close.textContent = "\u2715";
|
|
322
|
+
close.addEventListener("click", (e) => {
|
|
323
|
+
e.stopPropagation();
|
|
324
|
+
dispatch({ type: "ui:click", ref: closeRef });
|
|
325
|
+
});
|
|
326
|
+
head.appendChild(close);
|
|
327
|
+
}
|
|
328
|
+
el.appendChild(head);
|
|
329
|
+
}
|
|
330
|
+
for (const child of children) el.appendChild(child);
|
|
331
|
+
return el;
|
|
332
|
+
};
|
|
333
|
+
var jsonNode = (value, key) => {
|
|
334
|
+
if (value !== null && typeof value === "object") {
|
|
335
|
+
const entries = Array.isArray(value) ? value.map((item, i) => [String(i), item]) : Object.entries(value);
|
|
336
|
+
const details = document.createElement("details");
|
|
337
|
+
const summary = document.createElement("summary");
|
|
338
|
+
const shape = Array.isArray(value) ? `[${entries.length}]` : `{${entries.length}}`;
|
|
339
|
+
summary.textContent = key === void 0 ? shape : `${key} ${shape}`;
|
|
340
|
+
details.appendChild(summary);
|
|
341
|
+
const body = document.createElement("div");
|
|
342
|
+
body.setAttribute("data-json-body", "");
|
|
343
|
+
for (const [childKey, childValue] of entries) body.appendChild(jsonNode(childValue, childKey));
|
|
344
|
+
details.appendChild(body);
|
|
345
|
+
return details;
|
|
346
|
+
}
|
|
347
|
+
const leaf = document.createElement("div");
|
|
348
|
+
leaf.setAttribute("data-json-leaf", "");
|
|
349
|
+
leaf.textContent = key === void 0 ? JSON.stringify(value) : `${key}: ${JSON.stringify(value)}`;
|
|
350
|
+
return leaf;
|
|
351
|
+
};
|
|
352
|
+
var JsonTree = ({ props }) => {
|
|
353
|
+
const el = document.createElement("div");
|
|
354
|
+
el.setAttribute("data-json", "");
|
|
355
|
+
el.appendChild(jsonNode(props["value"], str(props, "label")));
|
|
356
|
+
return el;
|
|
357
|
+
};
|
|
358
|
+
var ActionSlot = ({ children }) => elem("div", children);
|
|
359
|
+
var fallback = ({ props, children }) => {
|
|
360
|
+
const el = elem("div", children);
|
|
361
|
+
if (children.length > 0) return el;
|
|
362
|
+
const label = str(props, "label") ?? str(props, "title");
|
|
363
|
+
if (label !== void 0) el.appendChild(document.createTextNode(label));
|
|
364
|
+
const count = props["count"];
|
|
365
|
+
if (typeof count === "number" || typeof count === "string" && count !== "") {
|
|
366
|
+
const badge = document.createElement("span");
|
|
367
|
+
badge.setAttribute("data-count", "");
|
|
368
|
+
badge.textContent = String(count);
|
|
369
|
+
el.appendChild(badge);
|
|
370
|
+
}
|
|
371
|
+
return el;
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
// src/adapters/dom/components/registry.ts
|
|
375
|
+
var defaultRegistry = () => {
|
|
376
|
+
const registry = createComponentRegistry();
|
|
377
|
+
registry.registerAll({
|
|
378
|
+
Box,
|
|
379
|
+
Row,
|
|
380
|
+
Stack,
|
|
381
|
+
Grid,
|
|
382
|
+
Text,
|
|
383
|
+
Button,
|
|
384
|
+
Input,
|
|
385
|
+
Select: Input,
|
|
386
|
+
Textarea,
|
|
387
|
+
Checkbox,
|
|
388
|
+
Switch: Checkbox,
|
|
389
|
+
Table,
|
|
390
|
+
// introspection primitives (used by nova/devtools; useful anywhere)
|
|
391
|
+
Panel,
|
|
392
|
+
JsonTree,
|
|
393
|
+
// the per-instance boundary from a flattened shell tree — pass-through
|
|
394
|
+
ActionSlot
|
|
395
|
+
});
|
|
396
|
+
return registry;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
// src/adapters/dom/components/styles.ts
|
|
400
|
+
var ROOT_CLASS = "nova-dom-root";
|
|
401
|
+
var DEFAULT_CSS = `
|
|
402
|
+
.${ROOT_CLASS} {
|
|
403
|
+
--dom-line: #d8dae0; --dom-mute: #6b7280; --dom-accent: #2563eb;
|
|
404
|
+
--dom-ink: #14161a; --dom-field: #fff;
|
|
405
|
+
/* Own the scheme: a host that declares color-scheme: dark would otherwise
|
|
406
|
+
make the browser paint every native control (inputs, checkboxes, the
|
|
407
|
+
select arrow, scrollbars) dark, right through this white surface. */
|
|
408
|
+
color-scheme: light;
|
|
409
|
+
background: #fff; color: var(--dom-ink); min-height: 100vh;
|
|
410
|
+
font: 14px/1.5 system-ui, sans-serif;
|
|
411
|
+
}
|
|
412
|
+
.${ROOT_CLASS} * { box-sizing: border-box; }
|
|
413
|
+
.${ROOT_CLASS} [data-canvas="sidebar"] { min-width: 210px; border-right: 1px solid var(--dom-line); padding: 12px; }
|
|
414
|
+
.${ROOT_CLASS} [data-canvas="topbar"] { border-bottom: 1px solid var(--dom-line); padding: 10px 14px; }
|
|
415
|
+
/* Common shell canvases \u2014 the same batteries as sidebar/topbar, so a typical
|
|
416
|
+
app frame lays out sanely with zero host CSS. Aside/modal/devtools honour the
|
|
417
|
+
empty-tree contract (a collapsed canvas sends [] \u2192 :empty \u2192 no chrome). An
|
|
418
|
+
app with other ids hands its own stylesheet to domTarget. */
|
|
419
|
+
.${ROOT_CLASS} [data-canvas="main"] { flex: 1 1 auto; min-width: 0; padding: 16px; overflow: auto; }
|
|
420
|
+
.${ROOT_CLASS} [data-canvas="aside"]:not(:empty) { min-width: 240px; border-left: 1px solid var(--dom-line); padding: 12px; overflow: auto; }
|
|
421
|
+
.${ROOT_CLASS} [data-canvas="modal"]:not(:empty) { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 17, 20, .35); }
|
|
422
|
+
/* devtools is a DOCK: float it bottom-right, bounded and scrollable, rather
|
|
423
|
+
than let it sprawl through the document. Sized to content, so the collapsed
|
|
424
|
+
\u2699 pill stays small; the Panel inside supplies the card chrome. */
|
|
425
|
+
.${ROOT_CLASS} [data-canvas="devtools"]:not(:empty) { position: fixed; right: 12px; bottom: 12px; z-index: 60; width: max-content; max-width: min(680px, calc(100vw - 24px)); max-height: 62vh; overflow: auto; }
|
|
426
|
+
.${ROOT_CLASS} [data-component="Badge"] { display: inline-block; padding: 1px 7px; border: 1px solid var(--dom-line); border-radius: 10px; font-size: 12px; }
|
|
427
|
+
.${ROOT_CLASS} [data-component="NavItem"] { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
|
|
428
|
+
.${ROOT_CLASS} [data-component="NavItem"]:hover { background: #f4f5f7; }
|
|
429
|
+
.${ROOT_CLASS} [data-count] { margin-left: auto; color: var(--dom-mute); font-size: 12px; }
|
|
430
|
+
.${ROOT_CLASS} button { font: inherit; padding: 5px 11px; border: 1px solid var(--dom-line); border-radius: 6px; background: #fff; color: var(--dom-ink); cursor: pointer; }
|
|
431
|
+
.${ROOT_CLASS} button:hover { background: #f4f5f7; }
|
|
432
|
+
.${ROOT_CLASS} button[data-variant="primary"] { background: var(--dom-accent); border-color: var(--dom-accent); color: #fff; }
|
|
433
|
+
.${ROOT_CLASS} button[data-variant="primary"]:hover { background: #1d4ed8; }
|
|
434
|
+
.${ROOT_CLASS} button[data-variant="ghost"] { background: transparent; border-color: transparent; }
|
|
435
|
+
.${ROOT_CLASS} button[data-variant="ghost"]:hover { background: #f4f5f7; }
|
|
436
|
+
.${ROOT_CLASS} button[data-variant="danger"] { color: #b91c1c; border-color: #f0c8c8; }
|
|
437
|
+
.${ROOT_CLASS} button[data-variant="danger"]:hover { background: #fdf2f2; }
|
|
438
|
+
.${ROOT_CLASS} button[data-size="sm"] { padding: 3px 8px; font-size: 12px; border-radius: 5px; }
|
|
439
|
+
.${ROOT_CLASS} button[data-size="lg"] { padding: 8px 14px; font-size: 15px; }
|
|
440
|
+
.${ROOT_CLASS} select { appearance: none; padding-right: 26px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
|
|
441
|
+
.${ROOT_CLASS} input, .${ROOT_CLASS} textarea, .${ROOT_CLASS} select {
|
|
442
|
+
font: inherit; padding: 5px 8px; border: 1px solid var(--dom-line); border-radius: 6px;
|
|
443
|
+
background: var(--dom-field); color: var(--dom-ink); /* self-contained \u2014 never inherit the host's field colors */
|
|
444
|
+
}
|
|
445
|
+
.${ROOT_CLASS} input::placeholder, .${ROOT_CLASS} textarea::placeholder { color: var(--dom-mute); }
|
|
446
|
+
.${ROOT_CLASS} input:focus, .${ROOT_CLASS} textarea:focus, .${ROOT_CLASS} select:focus {
|
|
447
|
+
outline: none; border-color: var(--dom-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
|
|
448
|
+
}
|
|
449
|
+
.${ROOT_CLASS} input[type="checkbox"], .${ROOT_CLASS} input[type="radio"] { accent-color: var(--dom-accent); width: 15px; height: 15px; }
|
|
450
|
+
.${ROOT_CLASS} input[type="text"], .${ROOT_CLASS} input:not([type]) { min-width: 180px; }
|
|
451
|
+
.${ROOT_CLASS} table { border-collapse: collapse; width: 100%; }
|
|
452
|
+
.${ROOT_CLASS} th, .${ROOT_CLASS} td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--dom-line); font-size: 14px; }
|
|
453
|
+
.${ROOT_CLASS} th { color: var(--dom-mute); font-weight: 600; font-size: 12px; }
|
|
454
|
+
.${ROOT_CLASS} tr[data-row] { cursor: pointer; }
|
|
455
|
+
.${ROOT_CLASS} tr[data-row]:hover td { background: #f4f5f7; }
|
|
456
|
+
.${ROOT_CLASS} [data-nova-error] { color: #b91c1c; font-size: 12px; }
|
|
457
|
+
.${ROOT_CLASS} [data-panel] { border: 1px solid var(--dom-line); border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 12px; }
|
|
458
|
+
.${ROOT_CLASS} [data-panel-title] { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
|
|
459
|
+
.${ROOT_CLASS} [data-panel-title] button { padding: 0 4px; border: 0; background: transparent; color: var(--dom-mute); }
|
|
460
|
+
.${ROOT_CLASS} [data-panel-title] button:last-child { margin-left: auto; }
|
|
461
|
+
.${ROOT_CLASS} [data-json] { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
|
|
462
|
+
.${ROOT_CLASS} [data-json-body] { padding-left: 13px; border-left: 1px solid var(--dom-line); margin-left: 3px; }
|
|
463
|
+
.${ROOT_CLASS} [data-json] summary { cursor: pointer; color: var(--dom-mute); }
|
|
464
|
+
.${ROOT_CLASS} [data-json-leaf] { white-space: pre-wrap; word-break: break-word; }
|
|
465
|
+
`;
|
|
466
|
+
|
|
467
|
+
exports.DEFAULT_CSS = DEFAULT_CSS;
|
|
468
|
+
exports.ROOT_CLASS = ROOT_CLASS;
|
|
469
|
+
exports.components = components_exports;
|
|
470
|
+
exports.defaultRegistry = defaultRegistry;
|
|
471
|
+
exports.fallback = fallback;
|
|
472
|
+
//# sourceMappingURL=index.cjs.map
|
|
473
|
+
//# sourceMappingURL=index.cjs.map
|