@johnoscott/isometric-engine 0.0.0-stage → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EDITOR-GUIDE.md +317 -0
- package/LICENSE +21 -0
- package/LICENSES/ajv.txt +22 -0
- package/LICENSES/lucide-static.txt +43 -0
- package/LICENSES/yaml.txt +13 -0
- package/README.md +62 -2
- package/assets/app.css +265 -0
- package/assets/default-theme.yaml +99 -0
- package/assets/icons.svg +1 -0
- package/assets/marks.css +35 -0
- package/assets/skin.css +181 -0
- package/iso-editor.d.ts +4 -0
- package/iso-editor.js +550 -0
- package/iso-render.d.ts +3 -0
- package/iso-render.js +388 -0
- package/iso-systems.d.ts +4 -0
- package/iso-systems.js +389 -0
- package/js/iso-core/compile-schema.js +22 -0
- package/js/iso-core/depth.js +55 -0
- package/js/iso-core/errors.js +65 -0
- package/js/iso-core/glyphs.js +100 -0
- package/js/iso-core/index.js +55 -0
- package/js/iso-core/kernel.js +158 -0
- package/js/iso-core/metrics.json +1 -0
- package/js/iso-core/package.json +6 -0
- package/js/iso-core/parse.js +79 -0
- package/js/iso-core/schema-errors.js +170 -0
- package/js/iso-core/shims/crypto.js +125 -0
- package/js/iso-core/shims/path.js +49 -0
- package/js/iso-core/svg-dom.js +144 -0
- package/js/iso-core/theme.js +48 -0
- package/js/iso-core/vdom.js +48 -0
- package/js/iso-editor/adapter.js +0 -0
- package/js/iso-editor/clipboard.js +152 -0
- package/js/iso-editor/commands.js +173 -0
- package/js/iso-editor/complete.js +55 -0
- package/js/iso-editor/doc.js +182 -0
- package/js/iso-editor/index.js +105 -0
- package/js/iso-editor/model.js +210 -0
- package/js/iso-editor/outline.js +111 -0
- package/js/iso-editor/package.json +6 -0
- package/js/iso-editor/path.js +19 -0
- package/js/iso-editor/providers.js +96 -0
- package/js/iso-editor/schema-nav.js +117 -0
- package/js/iso-editor/splice.js +441 -0
- package/js/iso-editor/storage-keys.js +6 -0
- package/js/iso-editor/ui/actions.js +116 -0
- package/js/iso-editor/ui/canvas-layer.js +0 -0
- package/js/iso-editor/ui/canvas.js +1205 -0
- package/js/iso-editor/ui/clip.js +133 -0
- package/js/iso-editor/ui/dialog.js +26 -0
- package/js/iso-editor/ui/flat-canvas.js +54 -0
- package/js/iso-editor/ui/icons.js +15 -0
- package/js/iso-editor/ui/keys.js +26 -0
- package/js/iso-editor/ui/later.js +28 -0
- package/js/iso-editor/ui/layer.js +11 -0
- package/js/iso-editor/ui/menu.js +105 -0
- package/js/iso-editor/ui/monaco-entry.js +2 -0
- package/js/iso-editor/ui/mount-kit.js +0 -0
- package/js/iso-editor/ui/mount.js +767 -0
- package/js/iso-editor/ui/pane.js +0 -0
- package/js/iso-editor/ui/part.js +0 -0
- package/js/iso-editor/ui/plain-icons.js +34 -0
- package/js/iso-editor/ui/props.js +314 -0
- package/js/iso-editor/ui/scope-css.js +81 -0
- package/js/iso-editor/ui/setup.js +145 -0
- package/js/iso-editor/ui/text.js +323 -0
- package/js/iso-editor/ui/tree.js +728 -0
- package/js/iso-editor/validate.js +33 -0
- package/js/iso-editor/window/protocol.js +8 -0
- package/js/iso-objects/assemble.js +43 -0
- package/js/iso-objects/assets.js +88 -0
- package/js/iso-objects/board.js +162 -0
- package/js/iso-objects/compile.js +60 -0
- package/js/iso-objects/css.js +154 -0
- package/js/iso-objects/flat.js +696 -0
- package/js/iso-objects/focus.js +16 -0
- package/js/iso-objects/geometry.js +76 -0
- package/js/iso-objects/index.js +93 -0
- package/js/iso-objects/kinds.js +12 -0
- package/js/iso-objects/labels.js +325 -0
- package/js/iso-objects/package.json +6 -0
- package/js/iso-objects/place.js +347 -0
- package/js/iso-objects/route.js +461 -0
- package/js/iso-objects/scene.js +350 -0
- package/js/iso-objects/steps.js +246 -0
- package/js/iso-objects/types.js +0 -0
- package/js/iso-systems/catalog.js +42 -0
- package/js/iso-systems/compile.js +34 -0
- package/js/iso-systems/css.js +8 -0
- package/js/iso-systems/index.js +16 -0
- package/js/iso-systems/nodes.js +124 -0
- package/js/iso-systems/package.json +6 -0
- package/js/iso-systems/schema.json +311 -0
- package/js/iso-systems/validate.js +35 -0
- package/js/iso-viewer/bundle.js +20 -0
- package/js/iso-viewer/card-motion.js +228 -0
- package/js/iso-viewer/dom.js +14 -0
- package/js/iso-viewer/dual-view.js +212 -0
- package/js/iso-viewer/flat-view.js +124 -0
- package/js/iso-viewer/history.js +990 -0
- package/js/iso-viewer/index.js +98 -0
- package/js/iso-viewer/morph.js +192 -0
- package/js/iso-viewer/overlay.js +199 -0
- package/js/iso-viewer/package.json +6 -0
- package/js/iso-viewer/page.js +138 -0
- package/js/iso-viewer/player.js +409 -0
- package/js/iso-viewer/still.js +81 -0
- package/js/iso-viewer/timeline-contract.js +14 -0
- package/js/iso-viewer/timeline-engine.js +475 -0
- package/js/iso-viewer/timeline-export.js +36 -0
- package/js/iso-viewer/timeline-scale.js +116 -0
- package/js/iso-viewer/timeline-scope.js +58 -0
- package/js/iso-viewer/timeline-search.js +216 -0
- package/js/iso-viewer/timeline-time.js +55 -0
- package/js/iso-viewer/view-css.js +68 -0
- package/js/iso-viewer/viewport.js +177 -0
- package/package.json +502 -4
- package/src/iso-core/compile-schema.ts +23 -0
- package/src/iso-core/depth.ts +56 -0
- package/src/iso-core/errors.ts +73 -0
- package/src/iso-core/glyphs.ts +108 -0
- package/src/iso-core/index.ts +27 -0
- package/src/iso-core/kernel.ts +163 -0
- package/src/iso-core/metrics.json +1 -0
- package/src/iso-core/package.json +6 -0
- package/src/iso-core/parse.ts +91 -0
- package/src/iso-core/schema-errors.ts +163 -0
- package/src/iso-core/shims/crypto.ts +37 -0
- package/src/iso-core/shims/path.ts +24 -0
- package/src/iso-core/svg-dom.ts +103 -0
- package/src/iso-core/theme.ts +64 -0
- package/src/iso-core/vdom.ts +41 -0
- package/src/iso-editor/adapter.ts +128 -0
- package/src/iso-editor/clipboard.ts +163 -0
- package/src/iso-editor/commands.ts +191 -0
- package/src/iso-editor/complete.ts +73 -0
- package/src/iso-editor/doc.ts +207 -0
- package/src/iso-editor/index.ts +67 -0
- package/src/iso-editor/model.ts +234 -0
- package/src/iso-editor/outline.ts +126 -0
- package/src/iso-editor/package.json +6 -0
- package/src/iso-editor/path.ts +18 -0
- package/src/iso-editor/providers.ts +113 -0
- package/src/iso-editor/schema-nav.ts +129 -0
- package/src/iso-editor/splice.ts +472 -0
- package/src/iso-editor/storage-keys.ts +6 -0
- package/src/iso-editor/ui/actions.ts +119 -0
- package/src/iso-editor/ui/app.css +230 -0
- package/src/iso-editor/ui/canvas-layer.ts +56 -0
- package/src/iso-editor/ui/canvas.ts +1071 -0
- package/src/iso-editor/ui/clip.ts +97 -0
- package/src/iso-editor/ui/dialog.ts +25 -0
- package/src/iso-editor/ui/flat-canvas.ts +51 -0
- package/src/iso-editor/ui/icons.ts +21 -0
- package/src/iso-editor/ui/keys.ts +30 -0
- package/src/iso-editor/ui/later.ts +22 -0
- package/src/iso-editor/ui/layer.ts +7 -0
- package/src/iso-editor/ui/marks.css +35 -0
- package/src/iso-editor/ui/menu.ts +67 -0
- package/src/iso-editor/ui/monaco-entry.ts +6 -0
- package/src/iso-editor/ui/mount-kit.ts +35 -0
- package/src/iso-editor/ui/mount.ts +684 -0
- package/src/iso-editor/ui/pane.ts +45 -0
- package/src/iso-editor/ui/part.ts +45 -0
- package/src/iso-editor/ui/plain-icons.ts +83 -0
- package/src/iso-editor/ui/props.ts +347 -0
- package/src/iso-editor/ui/scope-css.ts +65 -0
- package/src/iso-editor/ui/setup.ts +144 -0
- package/src/iso-editor/ui/skin.css +181 -0
- package/src/iso-editor/ui/text.ts +262 -0
- package/src/iso-editor/ui/tree.ts +657 -0
- package/src/iso-editor/validate.ts +62 -0
- package/src/iso-editor/window/protocol.ts +33 -0
- package/src/iso-objects/assemble.ts +57 -0
- package/src/iso-objects/assets.ts +122 -0
- package/src/iso-objects/board.ts +169 -0
- package/src/iso-objects/compile.ts +76 -0
- package/src/iso-objects/css.ts +163 -0
- package/src/iso-objects/flat.ts +653 -0
- package/src/iso-objects/focus.ts +14 -0
- package/src/iso-objects/geometry.ts +86 -0
- package/src/iso-objects/index.ts +33 -0
- package/src/iso-objects/kinds.ts +56 -0
- package/src/iso-objects/labels.ts +310 -0
- package/src/iso-objects/package.json +6 -0
- package/src/iso-objects/place.ts +318 -0
- package/src/iso-objects/route.ts +444 -0
- package/src/iso-objects/scene.ts +376 -0
- package/src/iso-objects/steps.ts +234 -0
- package/src/iso-objects/types.ts +68 -0
- package/src/iso-systems/catalog.ts +31 -0
- package/src/iso-systems/compile.ts +39 -0
- package/src/iso-systems/css.ts +9 -0
- package/src/iso-systems/index.ts +12 -0
- package/src/iso-systems/nodes.ts +126 -0
- package/src/iso-systems/package.json +6 -0
- package/src/iso-systems/schema.json +311 -0
- package/src/iso-systems/validate.ts +34 -0
- package/src/iso-viewer/bundle.ts +15 -0
- package/src/iso-viewer/card-motion.ts +237 -0
- package/src/iso-viewer/dom.ts +13 -0
- package/src/iso-viewer/dual-view.ts +212 -0
- package/src/iso-viewer/flat-view.ts +127 -0
- package/src/iso-viewer/history.ts +781 -0
- package/src/iso-viewer/index.ts +40 -0
- package/src/iso-viewer/morph.ts +191 -0
- package/src/iso-viewer/overlay.ts +212 -0
- package/src/iso-viewer/package.json +6 -0
- package/src/iso-viewer/page.ts +150 -0
- package/src/iso-viewer/player.ts +321 -0
- package/src/iso-viewer/still.ts +74 -0
- package/src/iso-viewer/timeline-contract.ts +342 -0
- package/src/iso-viewer/timeline-engine.ts +420 -0
- package/src/iso-viewer/timeline-export.ts +31 -0
- package/src/iso-viewer/timeline-scale.ts +129 -0
- package/src/iso-viewer/timeline-scope.ts +56 -0
- package/src/iso-viewer/timeline-search.ts +198 -0
- package/src/iso-viewer/timeline-time.ts +54 -0
- package/src/iso-viewer/view-css.ts +59 -0
- package/src/iso-viewer/viewport.ts +142 -0
- package/types/iso-core/compile-schema.d.ts +11 -0
- package/types/iso-core/depth.d.ts +6 -0
- package/types/iso-core/errors.d.ts +24 -0
- package/types/iso-core/glyphs.d.ts +19 -0
- package/types/iso-core/index.d.ts +17 -0
- package/types/iso-core/kernel.d.ts +130 -0
- package/types/iso-core/metrics.json +1 -0
- package/types/iso-core/parse.d.ts +18 -0
- package/types/iso-core/schema-errors.d.ts +14 -0
- package/types/iso-core/shims/crypto.d.ts +9 -0
- package/types/iso-core/svg-dom.d.ts +15 -0
- package/types/iso-core/theme.d.ts +38 -0
- package/types/iso-core/vdom.d.ts +26 -0
- package/types/iso-editor/adapter.d.ts +145 -0
- package/types/iso-editor/clipboard.d.ts +23 -0
- package/types/iso-editor/commands.d.ts +32 -0
- package/types/iso-editor/complete.d.ts +25 -0
- package/types/iso-editor/doc.d.ts +50 -0
- package/types/iso-editor/index.d.ts +57 -0
- package/types/iso-editor/model.d.ts +96 -0
- package/types/iso-editor/outline.d.ts +28 -0
- package/types/iso-editor/path.d.ts +7 -0
- package/types/iso-editor/providers.d.ts +43 -0
- package/types/iso-editor/schema-nav.d.ts +34 -0
- package/types/iso-editor/splice.d.ts +53 -0
- package/types/iso-editor/storage-keys.d.ts +5 -0
- package/types/iso-editor/ui/actions.d.ts +23 -0
- package/types/iso-editor/ui/canvas-layer.d.ts +65 -0
- package/types/iso-editor/ui/canvas.d.ts +279 -0
- package/types/iso-editor/ui/clip.d.ts +14 -0
- package/types/iso-editor/ui/dialog.d.ts +7 -0
- package/types/iso-editor/ui/flat-canvas.d.ts +2 -0
- package/types/iso-editor/ui/icons.d.ts +5 -0
- package/types/iso-editor/ui/keys.d.ts +7 -0
- package/types/iso-editor/ui/later.d.ts +12 -0
- package/types/iso-editor/ui/layer.d.ts +2 -0
- package/types/iso-editor/ui/menu.d.ts +21 -0
- package/types/iso-editor/ui/mount-kit.d.ts +31 -0
- package/types/iso-editor/ui/mount.d.ts +146 -0
- package/types/iso-editor/ui/pane.d.ts +60 -0
- package/types/iso-editor/ui/part.d.ts +40 -0
- package/types/iso-editor/ui/plain-icons.d.ts +10 -0
- package/types/iso-editor/ui/props.d.ts +57 -0
- package/types/iso-editor/ui/scope-css.d.ts +5 -0
- package/types/iso-editor/ui/setup.d.ts +40 -0
- package/types/iso-editor/ui/text.d.ts +19 -0
- package/types/iso-editor/ui/tree.d.ts +100 -0
- package/types/iso-editor/validate.d.ts +36 -0
- package/types/iso-editor/window/protocol.d.ts +60 -0
- package/types/iso-objects/assemble.d.ts +35 -0
- package/types/iso-objects/assets.d.ts +49 -0
- package/types/iso-objects/board.d.ts +36 -0
- package/types/iso-objects/compile.d.ts +35 -0
- package/types/iso-objects/css.d.ts +16 -0
- package/types/iso-objects/flat.d.ts +130 -0
- package/types/iso-objects/focus.d.ts +1 -0
- package/types/iso-objects/geometry.d.ts +59 -0
- package/types/iso-objects/index.d.ts +26 -0
- package/types/iso-objects/kinds.d.ts +53 -0
- package/types/iso-objects/labels.d.ts +92 -0
- package/types/iso-objects/place.d.ts +25 -0
- package/types/iso-objects/route.d.ts +67 -0
- package/types/iso-objects/scene.d.ts +63 -0
- package/types/iso-objects/steps.d.ts +90 -0
- package/types/iso-objects/types.d.ts +140 -0
- package/types/iso-systems/catalog.d.ts +4 -0
- package/types/iso-systems/compile.d.ts +6 -0
- package/types/iso-systems/css.d.ts +3 -0
- package/types/iso-systems/index.d.ts +5 -0
- package/types/iso-systems/nodes.d.ts +3 -0
- package/types/iso-viewer/card-motion.d.ts +56 -0
- package/types/iso-viewer/dom.d.ts +1 -0
- package/types/iso-viewer/dual-view.d.ts +44 -0
- package/types/iso-viewer/flat-view.d.ts +25 -0
- package/types/iso-viewer/history.d.ts +91 -0
- package/types/iso-viewer/index.d.ts +31 -0
- package/types/iso-viewer/morph.d.ts +28 -0
- package/types/iso-viewer/overlay.d.ts +135 -0
- package/types/iso-viewer/page.d.ts +13 -0
- package/types/iso-viewer/still.d.ts +26 -0
- package/types/iso-viewer/timeline-contract.d.ts +345 -0
- package/types/iso-viewer/timeline-engine.d.ts +20 -0
- package/types/iso-viewer/timeline-export.d.ts +5 -0
- package/types/iso-viewer/timeline-scale.d.ts +44 -0
- package/types/iso-viewer/timeline-scope.d.ts +33 -0
- package/types/iso-viewer/timeline-search.d.ts +52 -0
- package/types/iso-viewer/timeline-time.d.ts +8 -0
- package/types/iso-viewer/view-css.d.ts +7 -0
- package/types/iso-viewer/viewport.d.ts +50 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import metrics from './metrics.json';
|
|
2
|
+
/** pixels per grid unit, as in the references */
|
|
3
|
+
export declare const S = 34;
|
|
4
|
+
export declare const C: number;
|
|
5
|
+
export type P2 = [number, number];
|
|
6
|
+
export type P3 = [number, number, number];
|
|
7
|
+
export interface Box {
|
|
8
|
+
x0: number;
|
|
9
|
+
y0: number;
|
|
10
|
+
z0: number;
|
|
11
|
+
x1: number;
|
|
12
|
+
y1: number;
|
|
13
|
+
z1: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const iso: (x: number, y: number, z?: number) => P2;
|
|
16
|
+
export declare const n1: (v: number) => string;
|
|
17
|
+
export declare const pt: (p: P2) => string;
|
|
18
|
+
export declare const esc: (s: string) => string;
|
|
19
|
+
export type Attrs = Record<string, string | number | undefined | null | false>;
|
|
20
|
+
export declare function tag(name: string, attrs?: Attrs, inner?: string): string;
|
|
21
|
+
export type FontKey = keyof typeof metrics;
|
|
22
|
+
export interface Font {
|
|
23
|
+
key: FontKey;
|
|
24
|
+
size: number;
|
|
25
|
+
spacing?: number;
|
|
26
|
+
}
|
|
27
|
+
/** the fonts of the reference CSS classes; metrics are measured at these exact sizes (scripts/measure-fonts.mjs) */
|
|
28
|
+
export declare const FONTS: {
|
|
29
|
+
lbl: {
|
|
30
|
+
key: "sans700_13";
|
|
31
|
+
size: number;
|
|
32
|
+
};
|
|
33
|
+
sub: {
|
|
34
|
+
key: "mono400_11";
|
|
35
|
+
size: number;
|
|
36
|
+
};
|
|
37
|
+
slabname: {
|
|
38
|
+
key: "sans800_15";
|
|
39
|
+
size: number;
|
|
40
|
+
spacing: number;
|
|
41
|
+
};
|
|
42
|
+
sm: {
|
|
43
|
+
key: "sans800_10_5";
|
|
44
|
+
size: number;
|
|
45
|
+
spacing: number;
|
|
46
|
+
};
|
|
47
|
+
floor: {
|
|
48
|
+
key: "mono600_11";
|
|
49
|
+
size: number;
|
|
50
|
+
spacing: number;
|
|
51
|
+
};
|
|
52
|
+
say: {
|
|
53
|
+
key: "sans600_12";
|
|
54
|
+
size: number;
|
|
55
|
+
};
|
|
56
|
+
tunname: {
|
|
57
|
+
key: "sans800_12";
|
|
58
|
+
size: number;
|
|
59
|
+
spacing: number;
|
|
60
|
+
};
|
|
61
|
+
badge: {
|
|
62
|
+
key: "sans800_11_5";
|
|
63
|
+
size: number;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export declare function textWidth(str: string, f: Font): number;
|
|
67
|
+
/** [a b c d e f] as in SVG matrix(): x' = a x + c y + e, y' = b x + d y + f */
|
|
68
|
+
export type Mat = [number, number, number, number, number, number];
|
|
69
|
+
export declare const apply: (m: Mat, x: number, y: number) => P2;
|
|
70
|
+
export declare const matStr: (m: Mat) => string;
|
|
71
|
+
export type Face = 'top' | 'left' | 'right';
|
|
72
|
+
/**
|
|
73
|
+
* A face's own 2D plane, in pixels: u to the right, v down, origin at the face's top-left corner as seen.
|
|
74
|
+
* left = the +y face (front-left), right = the +x face (front-right), top = the z1 face (u along +x, v along +y).
|
|
75
|
+
*/
|
|
76
|
+
export declare function faceFrame(b: Box, face: Face): {
|
|
77
|
+
m: Mat;
|
|
78
|
+
w: number;
|
|
79
|
+
h: number;
|
|
80
|
+
};
|
|
81
|
+
export declare class Bounds {
|
|
82
|
+
x0: number;
|
|
83
|
+
y0: number;
|
|
84
|
+
x1: number;
|
|
85
|
+
y1: number;
|
|
86
|
+
add(p: P2): void;
|
|
87
|
+
addRect(x: number, y: number, w: number, h: number): void;
|
|
88
|
+
get empty(): boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface TextRect {
|
|
91
|
+
x: number;
|
|
92
|
+
y: number;
|
|
93
|
+
w: number;
|
|
94
|
+
h: number;
|
|
95
|
+
text: string;
|
|
96
|
+
owner?: string;
|
|
97
|
+
}
|
|
98
|
+
/** One per scene: collects bounds (and text rectangles for layout checks) while assets draw. */
|
|
99
|
+
export declare class Kernel {
|
|
100
|
+
bounds: Bounds;
|
|
101
|
+
texts: TextRect[];
|
|
102
|
+
/** screen bounds of text drawn in a skewed plane (floor, faces), for label placement */
|
|
103
|
+
planes: {
|
|
104
|
+
x: number;
|
|
105
|
+
y: number;
|
|
106
|
+
w: number;
|
|
107
|
+
h: number;
|
|
108
|
+
}[];
|
|
109
|
+
/** the same, as the actual parallelograms */
|
|
110
|
+
planePolys: P2[][];
|
|
111
|
+
defs: Map<string, string>;
|
|
112
|
+
poly(pts: P3[], cls?: string, extra?: Attrs): string;
|
|
113
|
+
line3(a: P3, b: P3, cls?: string, extra?: Attrs): string;
|
|
114
|
+
/** The three visible faces of a box, as in the references: lft (+y), rgt (+x), top. */
|
|
115
|
+
blockFaces(b: Box): string;
|
|
116
|
+
/** A group in a face's own 2D pixel plane. `draw` gets the face width and height. */
|
|
117
|
+
onFace(b: Box, face: Face, draw: (w: number, h: number) => string, cls?: string): string;
|
|
118
|
+
/** Same, with an explicit matrix (screens at an angle). */
|
|
119
|
+
onMatrix(m: Mat, w: number, h: number, draw: (w: number, h: number) => string, cls?: string): string;
|
|
120
|
+
/** Upright text, e.g. labels. (x, y) in screen pixels; y is the baseline. */
|
|
121
|
+
text(x: number, y: number, str: string, cls: string, font: Font, anchor?: 'start' | 'middle' | 'end', extra?: Attrs, owner?: string): string;
|
|
122
|
+
/** Text in a skewed plane (floor or face), with bounds through the matrix. */
|
|
123
|
+
planeText(m: Mat, str: string, cls: string, font: Font, anchor?: 'start' | 'middle' | 'end', extra?: Attrs): string;
|
|
124
|
+
/** Text lying on the floor at height z: dir 'x' runs along +x, 'y' runs along −y (as in floorText()). */
|
|
125
|
+
floorText(x: number, y: number, z: number, str: string, cls: string, dir?: 'x' | 'y', anchor?: 'start' | 'middle' | 'end', extra?: Attrs): string;
|
|
126
|
+
/** Text standing on a +y face (left) or a +x face (right) at a point. */
|
|
127
|
+
faceText(x: number, y: number, z: number, str: string, cls: string, font: Font, face?: 'left' | 'right', anchor?: 'start' | 'middle' | 'end', extra?: Attrs): string;
|
|
128
|
+
def(id: string, svg: string): void;
|
|
129
|
+
}
|
|
130
|
+
export declare const center: (b: Box) => P3;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"sans700_13":{"0":0.6787,"1":0.5059,"2":0.6372,"3":0.6631,"4":0.6812,"5":0.6577,"6":0.6777,"7":0.6172,"8":0.688,"9":0.6777," ":0.252,"!":0.3506,"\"":0.563,"#":0.6655,"$":0.6655,"%":1.0298,"&":0.7388,"'":0.3418,"(":0.4229,")":0.4229,"*":0.4785,"+":0.6655,",":0.3418,"-":0.4785,".":0.3418,"/":0.3286,":":0.3418,";":0.3418,"<":0.6655,"=":0.6655,">":0.6655,"?":0.5513,"@":0.9214,"A":0.7266,"B":0.6875,"C":0.7354,"D":0.7417,"E":0.6162,"F":0.5918,"G":0.7544,"H":0.7773,"I":0.3125,"J":0.5952,"K":0.7036,"L":0.5889,"M":0.9009,"N":0.7622,"O":0.7808,"P":0.668,"Q":0.7808,"R":0.6885,"S":0.6694,"T":0.6543,"U":0.7544,"V":0.7153,"W":1.0034,"X":0.7236,"Y":0.7021,"Z":0.6699,"[":0.4229,"\\":0.3286,"]":0.4229,"^":0.6655,"_":0.5845,"`":0.4941,"a":0.584,"b":0.6455,"c":0.5815,"d":0.6455,"e":0.5952,"f":0.407,"g":0.6396,"h":0.6265,"i":0.2813,"j":0.2813,"k":0.5957,"l":0.2891,"m":0.9263,"n":0.6216,"o":0.6138,"p":0.6411,"q":0.6416,"r":0.4338,"s":0.5513,"t":0.4114,"u":0.6216,"v":0.5771,"w":0.8413,"x":0.5747,"y":0.5913,"z":0.5605,"{":0.4229,"|":0.2935,"}":0.4229,"~":0.6655,"·":0.3418,"→":0.9375,"←":0.9375,"↑":0.8096,"↓":0.8096,"’":0.3418,"‘":0.3418,"“":0.5474,"”":0.5474,"…":0.9482,"–":0.6216,"—":0.9045,"✕":0.7622,"×":0.6655,"≈":0.6655,"≤":0.6655,"≥":0.6655,"é":0.5952},"sans800_15":{"0":0.687,"1":0.5122,"2":0.6406,"3":0.6675,"4":0.686,"5":0.6626,"6":0.6836,"7":0.6191,"8":0.6968,"9":0.6836," ":0.2344,"!":0.3555,"\"":0.5835,"#":0.6694,"$":0.6694,"%":1.0566,"&":0.7397,"'":0.3491,"(":0.4287,")":0.4287,"*":0.4731,"+":0.6694,",":0.3491,"-":0.4731,".":0.3491,"/":0.3286,":":0.3491,";":0.3491,"<":0.6694,"=":0.6694,">":0.6694,"?":0.5562,"@":0.9146,"A":0.7363,"B":0.6899,"C":0.7339,"D":0.7388,"E":0.6147,"F":0.5903,"G":0.749,"H":0.7813,"I":0.3198,"J":0.6064,"K":0.7104,"L":0.5879,"M":0.9019,"N":0.7612,"O":0.7759,"P":0.6709,"Q":0.7759,"R":0.6924,"S":0.6719,"T":0.6533,"U":0.7524,"V":0.7212,"W":1.0073,"X":0.731,"Y":0.71,"Z":0.6646,"[":0.4287,"\\":0.3286,"]":0.4287,"^":0.6694,"_":0.5889,"`":0.4844,"a":0.5864,"b":0.6479,"c":0.5811,"d":0.6479,"e":0.5952,"f":0.4139,"g":0.6416,"h":0.6309,"i":0.2847,"j":0.2847,"k":0.605,"l":0.2935,"m":0.937,"n":0.626,"o":0.6138,"p":0.6436,"q":0.6445,"r":0.4406,"s":0.5557,"t":0.4198,"u":0.626,"v":0.5806,"w":0.856,"x":0.5835,"y":0.5996,"z":0.5601,"{":0.4287,"|":0.2974,"}":0.4287,"~":0.6694,"·":0.3491,"→":0.9404,"←":0.9404,"↑":0.811,"↓":0.811,"’":0.3491,"‘":0.3491,"“":0.5688,"”":0.5688,"…":0.9883,"–":0.626,"—":0.9118,"✕":0.7622,"×":0.6694,"≈":0.6694,"≤":0.6694,"≥":0.6694,"é":0.5952},"sans800_10_5":{"0":0.7114,"1":0.5366,"2":0.665,"3":0.6919,"4":0.7104,"5":0.687,"6":0.708,"7":0.6436,"8":0.7212,"9":0.708," ":0.2588,"!":0.3799,"\"":0.6079,"#":0.6938,"$":0.6938,"%":1.0811,"&":0.7642,"'":0.3735,"(":0.4531,")":0.4531,"*":0.4976,"+":0.6938,",":0.3735,"-":0.4976,".":0.3735,"/":0.353,":":0.3735,";":0.3735,"<":0.6938,"=":0.6938,">":0.6938,"?":0.5806,"@":0.939,"A":0.7607,"B":0.7144,"C":0.7583,"D":0.7632,"E":0.6392,"F":0.6147,"G":0.7734,"H":0.8057,"I":0.3442,"J":0.6309,"K":0.7349,"L":0.6123,"M":0.9263,"N":0.7856,"O":0.8003,"P":0.6953,"Q":0.8003,"R":0.7168,"S":0.6963,"T":0.6777,"U":0.7769,"V":0.7456,"W":1.0317,"X":0.7554,"Y":0.7344,"Z":0.689,"[":0.4531,"\\":0.353,"]":0.4531,"^":0.6938,"_":0.6133,"`":0.5088,"a":0.6108,"b":0.6724,"c":0.6055,"d":0.6724,"e":0.6196,"f":0.4383,"g":0.666,"h":0.6553,"i":0.3091,"j":0.3091,"k":0.6294,"l":0.3179,"m":0.9614,"n":0.6504,"o":0.6382,"p":0.668,"q":0.6689,"r":0.465,"s":0.5801,"t":0.4442,"u":0.6504,"v":0.605,"w":0.8804,"x":0.6079,"y":0.624,"z":0.5845,"{":0.4531,"|":0.3218,"}":0.4531,"~":0.6938,"·":0.3735,"→":0.9648,"←":0.9648,"↑":0.8354,"↓":0.8354,"’":0.3735,"‘":0.3735,"“":0.5933,"”":0.5933,"…":1.0127,"–":0.6504,"—":0.9204,"✕":0.7622,"×":0.6938,"≈":0.6938,"≤":0.6938,"≥":0.6938,"é":0.6196},"sans600_12":{"0":0.6665,"1":0.4956,"2":0.6299,"3":0.6548,"4":0.6724,"5":0.6484,"6":0.668,"7":0.6113,"8":0.6753,"9":0.668," ":0.2656,"!":0.3413,"\"":0.5386,"#":0.6577,"$":0.6577,"%":0.999,"&":0.7334,"'":0.3306,"(":0.4131,")":0.4131,"*":0.48,"+":0.6577,",":0.3306,"-":0.48,".":0.3306,"/":0.3247,":":0.3306,";":0.3306,"<":0.6577,"=":0.6577,">":0.6577,"?":0.5425,"@":0.9238,"A":0.7129,"B":0.6812,"C":0.7329,"D":0.7402,"E":0.6133,"F":0.5889,"G":0.7559,"H":0.7695,"I":0.3013,"J":0.5801,"K":0.6924,"L":0.5859,"M":0.8955,"N":0.7593,"O":0.7813,"P":0.6606,"Q":0.7813,"R":0.6807,"S":0.6626,"T":0.6514,"U":0.7524,"V":0.7056,"W":0.9956,"X":0.7124,"Y":0.6904,"Z":0.6709,"[":0.4131,"\\":0.3247,"]":0.4131,"^":0.6577,"_":0.5757,"`":0.5,"a":0.5771,"b":0.6392,"c":0.5781,"d":0.6392,"e":0.5908,"f":0.3957,"g":0.6333,"h":0.6177,"i":0.2739,"j":0.2734,"k":0.582,"l":0.2808,"m":0.9116,"n":0.6128,"o":0.6099,"p":0.6348,"q":0.6348,"r":0.4232,"s":0.543,"t":0.3991,"u":0.6128,"v":0.5693,"w":0.8228,"x":0.562,"y":0.5791,"z":0.5571,"{":0.4131,"|":0.2856,"}":0.4131,"~":0.6577,"·":0.3306,"→":0.9307,"←":0.9307,"↑":0.8037,"↓":0.8037,"’":0.3306,"‘":0.3306,"“":0.522,"”":0.522,"…":0.9043,"–":0.6128,"—":0.8957,"✕":0.7622,"×":0.6577,"≈":0.6577,"≤":0.6577,"≥":0.6577,"é":0.5908},"sans800_12":{"0":0.7026,"1":0.5278,"2":0.6563,"3":0.6831,"4":0.7017,"5":0.6782,"6":0.6992,"7":0.6348,"8":0.7124,"9":0.6992," ":0.25,"!":0.3711,"\"":0.5991,"#":0.6851,"$":0.6851,"%":1.0723,"&":0.7554,"'":0.3647,"(":0.4443,")":0.4443,"*":0.4888,"+":0.6851,",":0.3647,"-":0.4888,".":0.3647,"/":0.3442,":":0.3647,";":0.3647,"<":0.6851,"=":0.6851,">":0.6851,"?":0.5718,"@":0.9302,"A":0.752,"B":0.7056,"C":0.7495,"D":0.7544,"E":0.6304,"F":0.606,"G":0.7646,"H":0.7969,"I":0.3354,"J":0.6221,"K":0.7261,"L":0.6035,"M":0.9175,"N":0.7769,"O":0.7915,"P":0.6865,"Q":0.7915,"R":0.708,"S":0.6875,"T":0.6689,"U":0.7681,"V":0.7368,"W":1.0229,"X":0.7466,"Y":0.7256,"Z":0.6802,"[":0.4443,"\\":0.3442,"]":0.4443,"^":0.6851,"_":0.6045,"`":0.5,"a":0.6021,"b":0.6636,"c":0.5967,"d":0.6636,"e":0.6108,"f":0.4295,"g":0.6572,"h":0.6465,"i":0.3003,"j":0.3003,"k":0.6206,"l":0.3091,"m":0.9526,"n":0.6416,"o":0.6294,"p":0.6592,"q":0.6602,"r":0.4562,"s":0.5713,"t":0.4354,"u":0.6416,"v":0.5962,"w":0.8716,"x":0.5991,"y":0.6152,"z":0.5757,"{":0.4443,"|":0.313,"}":0.4443,"~":0.6851,"·":0.3647,"→":0.9561,"←":0.9561,"↑":0.8267,"↓":0.8267,"’":0.3647,"‘":0.3647,"“":0.5845,"”":0.5845,"…":1.0039,"–":0.6416,"—":0.9173,"✕":0.7622,"×":0.6851,"≈":0.6851,"≤":0.6851,"≥":0.6851,"é":0.6108},"sans800_11_5":{"0":0.7056,"1":0.5308,"2":0.6592,"3":0.686,"4":0.7046,"5":0.6812,"6":0.7021,"7":0.6377,"8":0.7153,"9":0.7021," ":0.2529,"!":0.374,"\"":0.6021,"#":0.688,"$":0.688,"%":1.0752,"&":0.7583,"'":0.3677,"(":0.4473,")":0.4473,"*":0.4917,"+":0.688,",":0.3677,"-":0.4917,".":0.3677,"/":0.3472,":":0.3677,";":0.3677,"<":0.688,"=":0.688,">":0.688,"?":0.5747,"@":0.9331,"A":0.7549,"B":0.7085,"C":0.7524,"D":0.7573,"E":0.6333,"F":0.6089,"G":0.7676,"H":0.7998,"I":0.3384,"J":0.625,"K":0.729,"L":0.6064,"M":0.9204,"N":0.7798,"O":0.7944,"P":0.6895,"Q":0.7944,"R":0.7109,"S":0.6904,"T":0.6719,"U":0.771,"V":0.7397,"W":1.0259,"X":0.7495,"Y":0.7285,"Z":0.6831,"[":0.4473,"\\":0.3472,"]":0.4473,"^":0.688,"_":0.6074,"`":0.5029,"a":0.605,"b":0.6665,"c":0.5996,"d":0.6665,"e":0.6138,"f":0.4325,"g":0.6602,"h":0.6494,"i":0.3032,"j":0.3032,"k":0.6235,"l":0.312,"m":0.9556,"n":0.6445,"o":0.6323,"p":0.6621,"q":0.6631,"r":0.4591,"s":0.5742,"t":0.4383,"u":0.6445,"v":0.5991,"w":0.8745,"x":0.6021,"y":0.6182,"z":0.5786,"{":0.4473,"|":0.3159,"}":0.4473,"~":0.688,"·":0.3677,"→":0.959,"←":0.959,"↑":0.8296,"↓":0.8296,"’":0.3677,"‘":0.3677,"“":0.5874,"”":0.5874,"…":1.0068,"–":0.6445,"—":0.9183,"✕":0.7622,"×":0.688,"≈":0.688,"≤":0.688,"≥":0.688,"é":0.6138},"sans400_13":{"0":0.624,"1":0.458,"2":0.5977,"3":0.6211,"4":0.6377,"5":0.6123,"6":0.6309,"7":0.582,"8":0.6328,"9":0.6309," ":0.2754,"!":0.3052,"\"":0.4717,"#":0.624,"$":0.624,"%":0.9194,"&":0.7056,"'":0.291,"(":0.376,")":0.376,"*":0.4658,"+":0.624,",":0.291,"-":0.4658,".":0.291,"/":0.2988,":":0.291,";":0.291,"<":0.624,"=":0.624,">":0.624,"?":0.5068,"@":0.9121,"A":0.668,"B":0.6514,"C":0.71,"D":0.7207,"E":0.5898,"F":0.5664,"G":0.7407,"H":0.7363,"I":0.2617,"J":0.5322,"K":0.6528,"L":0.562,"M":0.8682,"N":0.7363,"O":0.7656,"P":0.6294,"Q":0.7656,"R":0.6475,"S":0.6313,"T":0.6279,"U":0.7314,"V":0.668,"W":0.9619,"X":0.6729,"Y":0.6494,"Z":0.6558,"[":0.376,"\\":0.2988,"]":0.376,"^":0.624,"_":0.5405,"`":0.4941,"a":0.5459,"b":0.6084,"c":0.5537,"d":0.6084,"e":0.5654,"f":0.356,"g":0.6035,"h":0.5825,"i":0.2412,"j":0.2407,"k":0.5371,"l":0.2471,"m":0.8643,"n":0.5776,"o":0.585,"p":0.6045,"q":0.6035,"r":0.3843,"s":0.5083,"t":0.3574,"u":0.5776,"v":0.5361,"w":0.7686,"x":0.5186,"y":0.5371,"z":0.5332,"{":0.376,"|":0.2529,"}":0.376,"~":0.624,"·":0.291,"→":0.8999,"←":0.8999,"↑":0.7754,"↓":0.7754,"’":0.291,"‘":0.291,"“":0.4531,"”":0.4531,"…":0.7988,"–":0.5776,"—":0.872,"✕":0.7622,"×":0.624,"≈":0.624,"≤":0.624,"≥":0.624,"é":0.5654},"mono400_11":{"0":0.6021,"1":0.6021,"2":0.6021,"3":0.6021,"4":0.6021,"5":0.6021,"6":0.6021,"7":0.6021,"8":0.6021,"9":0.6021," ":0.6021,"!":0.6021,"\"":0.6021,"#":0.6021,"$":0.6021,"%":0.6021,"&":0.6021,"'":0.6021,"(":0.6021,")":0.6021,"*":0.6021,"+":0.6021,",":0.6021,"-":0.6021,".":0.6021,"/":0.6021,":":0.6021,";":0.6021,"<":0.6021,"=":0.6021,">":0.6021,"?":0.6021,"@":0.6021,"A":0.6021,"B":0.6021,"C":0.6021,"D":0.6021,"E":0.6021,"F":0.6021,"G":0.6021,"H":0.6021,"I":0.6021,"J":0.6021,"K":0.6021,"L":0.6021,"M":0.6021,"N":0.6021,"O":0.6021,"P":0.6021,"Q":0.6021,"R":0.6021,"S":0.6021,"T":0.6021,"U":0.6021,"V":0.6021,"W":0.6021,"X":0.6021,"Y":0.6021,"Z":0.6021,"[":0.6021,"\\":0.6021,"]":0.6021,"^":0.6021,"_":0.6021,"`":0.6021,"a":0.6021,"b":0.6021,"c":0.6021,"d":0.6021,"e":0.6021,"f":0.6021,"g":0.6021,"h":0.6021,"i":0.6021,"j":0.6021,"k":0.6021,"l":0.6021,"m":0.6021,"n":0.6021,"o":0.6021,"p":0.6021,"q":0.6021,"r":0.6021,"s":0.6021,"t":0.6021,"u":0.6021,"v":0.6021,"w":0.6021,"x":0.6021,"y":0.6021,"z":0.6021,"{":0.6021,"|":0.6021,"}":0.6021,"~":0.6021,"·":0.6021,"→":0.6021,"←":0.6021,"↑":0.6021,"↓":0.6021,"’":0.6021,"‘":0.6021,"“":0.6021,"”":0.6021,"…":0.6021,"–":0.6021,"—":0.6021,"✕":0.6021,"×":0.6021,"≈":0.6021,"≤":0.6021,"≥":0.6021,"é":0.6021},"mono600_11":{"0":0.6021,"1":0.6021,"2":0.6021,"3":0.6021,"4":0.6021,"5":0.6021,"6":0.6021,"7":0.6021,"8":0.6021,"9":0.6021," ":0.6021,"!":0.6021,"\"":0.6021,"#":0.6021,"$":0.6021,"%":0.6021,"&":0.6021,"'":0.6021,"(":0.6021,")":0.6021,"*":0.6021,"+":0.6021,",":0.6021,"-":0.6021,".":0.6021,"/":0.6021,":":0.6021,";":0.6021,"<":0.6021,"=":0.6021,">":0.6021,"?":0.6021,"@":0.6021,"A":0.6021,"B":0.6021,"C":0.6021,"D":0.6021,"E":0.6021,"F":0.6021,"G":0.6021,"H":0.6021,"I":0.6021,"J":0.6021,"K":0.6021,"L":0.6021,"M":0.6021,"N":0.6021,"O":0.6021,"P":0.6021,"Q":0.6021,"R":0.6021,"S":0.6021,"T":0.6021,"U":0.6021,"V":0.6021,"W":0.6021,"X":0.6021,"Y":0.6021,"Z":0.6021,"[":0.6021,"\\":0.6021,"]":0.6021,"^":0.6021,"_":0.6021,"`":0.6021,"a":0.6021,"b":0.6021,"c":0.6021,"d":0.6021,"e":0.6021,"f":0.6021,"g":0.6021,"h":0.6021,"i":0.6021,"j":0.6021,"k":0.6021,"l":0.6021,"m":0.6021,"n":0.6021,"o":0.6021,"p":0.6021,"q":0.6021,"r":0.6021,"s":0.6021,"t":0.6021,"u":0.6021,"v":0.6021,"w":0.6021,"x":0.6021,"y":0.6021,"z":0.6021,"{":0.6021,"|":0.6021,"}":0.6021,"~":0.6021,"·":0.6021,"→":0.6021,"←":0.6021,"↑":0.6021,"↓":0.6021,"’":0.6021,"‘":0.6021,"“":0.6021,"”":0.6021,"…":0.6021,"–":0.6021,"—":0.6021,"✕":0.6021,"×":0.6021,"≈":0.6021,"≤":0.6021,"≥":0.6021,"é":0.6021}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Diag } from './errors.js';
|
|
2
|
+
export interface Parsed {
|
|
3
|
+
data: unknown;
|
|
4
|
+
/** line/col (1-based) of the value at a JSON path; `key: true` gives the key's place in its map instead */
|
|
5
|
+
locate(path: string, opts?: {
|
|
6
|
+
key?: boolean;
|
|
7
|
+
}): {
|
|
8
|
+
line: number;
|
|
9
|
+
col: number;
|
|
10
|
+
};
|
|
11
|
+
/** the lines (1-based, inclusive) the value at a JSON path spans in the source; undefined if not found */
|
|
12
|
+
span(path: string): {
|
|
13
|
+
start: number;
|
|
14
|
+
end: number;
|
|
15
|
+
} | undefined;
|
|
16
|
+
diags: Diag[];
|
|
17
|
+
}
|
|
18
|
+
export declare function parse(source: string): Parsed;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ErrorObject } from 'ajv';
|
|
2
|
+
import { type Diag } from './errors.js';
|
|
3
|
+
import type { Parsed } from './parse.js';
|
|
4
|
+
export declare function registerNoun(noun: (path: string) => string | undefined): void;
|
|
5
|
+
export declare function registerRefKeys(ref: string, keys: string[]): void;
|
|
6
|
+
export declare function registerConst(path: string, words: (got: string, allowed: unknown) => string): void;
|
|
7
|
+
export declare function registerPattern(prefix: string, words: (data: unknown) => {
|
|
8
|
+
message: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
}): void;
|
|
11
|
+
/** Collapse the noise ajv makes for anyOf: keep the one explanation most likely to help. */
|
|
12
|
+
export declare function prune(errors: ErrorObject[], parsed: Parsed): Diag[];
|
|
13
|
+
/** The same plain-words validation against another JSON Schema (a format's own). */
|
|
14
|
+
export declare function schemaValidator(other: object, what: string, keysOf?: Record<string, string[]>): (parsed: Parsed) => Diag[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function sha256Hex(text: string): string;
|
|
2
|
+
export declare function createHash(alg: string): {
|
|
3
|
+
update(s: string): /*elided*/ any;
|
|
4
|
+
digest(_enc: 'hex'): string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: {
|
|
7
|
+
createHash: typeof createHash;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface SvgNode {
|
|
2
|
+
name: string;
|
|
3
|
+
attrs: [string, string][];
|
|
4
|
+
children: (SvgNode | string)[];
|
|
5
|
+
}
|
|
6
|
+
/** may this attribute be set, with this value? */
|
|
7
|
+
export declare function allowed(name: string, value: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Read the renderer's SVG text into a tree of allowed elements (their attributes filtered, their texts unescaped).
|
|
10
|
+
* A disallowed element is dropped with everything inside it; comments are dropped; anything that isn't the renderer's
|
|
11
|
+
* well-formed output (an unclosed tag, a stray close) throws, so a broken drawing is never half-built.
|
|
12
|
+
*/
|
|
13
|
+
export declare function parseSvg(markup: string): SvgNode;
|
|
14
|
+
/** Make the drawing: the tree's first element (an <svg>), as DOM. */
|
|
15
|
+
export declare function buildSvg(markup: string, d?: Document): SVGSVGElement;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** a colour role: a hue and saturation the theme's shades are made from */
|
|
2
|
+
export interface RawRole {
|
|
3
|
+
h: number;
|
|
4
|
+
s: number;
|
|
5
|
+
top?: string;
|
|
6
|
+
tint?: number;
|
|
7
|
+
}
|
|
8
|
+
/** a route kind's look: its colour (or a role's, by like:), its dash and its legend */
|
|
9
|
+
export interface RawKind {
|
|
10
|
+
legend?: string;
|
|
11
|
+
like?: string;
|
|
12
|
+
color?: string;
|
|
13
|
+
dash?: 'solid' | 'dashed' | 'dotted';
|
|
14
|
+
}
|
|
15
|
+
/** a theme: CSS tokens for light and dark, and the route kinds and colour roles drawings name */
|
|
16
|
+
export interface Theme {
|
|
17
|
+
name: string;
|
|
18
|
+
light: Record<string, string>;
|
|
19
|
+
dark: Record<string, string>;
|
|
20
|
+
kinds: Record<string, {
|
|
21
|
+
color: string;
|
|
22
|
+
dash: 'solid' | 'dashed' | 'dotted';
|
|
23
|
+
legend: string;
|
|
24
|
+
}>;
|
|
25
|
+
roles: Record<string, RawRole>;
|
|
26
|
+
}
|
|
27
|
+
export declare function loadTheme(text: string): Theme;
|
|
28
|
+
/** The theme with a file's own roles and kinds added. */
|
|
29
|
+
export declare function extendTheme(t: Theme, roles?: Record<string, RawRole>, kinds?: Record<string, RawKind>): Theme;
|
|
30
|
+
/** A colour value usable in CSS: a theme token name or a literal colour. */
|
|
31
|
+
export declare function colorRef(t: Theme, c: string): string;
|
|
32
|
+
export declare function themeCss(t: Theme): string;
|
|
33
|
+
/** The theme's CSS in pieces: the light and dark tokens (declarations), and the rules for its roles and kinds. */
|
|
34
|
+
export declare function themeParts(t: Theme): {
|
|
35
|
+
light: string;
|
|
36
|
+
dark: string;
|
|
37
|
+
rest: string;
|
|
38
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface VNode {
|
|
2
|
+
name: string;
|
|
3
|
+
attrs: [string, string][];
|
|
4
|
+
children: (VNode | string)[];
|
|
5
|
+
}
|
|
6
|
+
export declare class VEl implements VNode {
|
|
7
|
+
name: string;
|
|
8
|
+
attrs: [string, string][];
|
|
9
|
+
children: (VNode | string)[];
|
|
10
|
+
/** style properties as set (fontSize, transformOrigin…), written out as one style attribute */
|
|
11
|
+
style: Record<string, string>;
|
|
12
|
+
constructor(name: string);
|
|
13
|
+
setAttribute(k: string, v: string): void;
|
|
14
|
+
getAttribute(k: string): string | null;
|
|
15
|
+
append(...ns: (VEl | string)[]): void;
|
|
16
|
+
set textContent(t: string);
|
|
17
|
+
get textContent(): string;
|
|
18
|
+
/** as a plain node, its style folded into a style attribute */
|
|
19
|
+
toNode(): VNode;
|
|
20
|
+
}
|
|
21
|
+
/** a stand-in for document, as far as the painters go */
|
|
22
|
+
export declare const vdoc: {
|
|
23
|
+
createElementNS: (_ns: string, name: string) => VEl;
|
|
24
|
+
};
|
|
25
|
+
/** a tree as SVG text (every value escaped; raw text only where the caller says, for its own <style>) */
|
|
26
|
+
export declare function serialize(n: VNode | string, raw?: Set<string>): string;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { Path } from './path.js';
|
|
2
|
+
import type { Diag } from '../iso-core/errors.js';
|
|
3
|
+
/** what a file is to the domain: its main kind, a base that files extend, or something else */
|
|
4
|
+
export type FileRole = 'main' | 'base' | 'other';
|
|
5
|
+
/** one kind of thing a file holds, by name, in a map of its own (its section) */
|
|
6
|
+
export interface ObjectKindInfo {
|
|
7
|
+
/** the kind's name (what references target) */
|
|
8
|
+
kind: string;
|
|
9
|
+
/** where its entries live: their map's path */
|
|
10
|
+
section: Path;
|
|
11
|
+
/** what one is called ("node"), and its group in the outline ("Nodes") */
|
|
12
|
+
singular: string;
|
|
13
|
+
group: string;
|
|
14
|
+
/** what a new one starts as */
|
|
15
|
+
template(): unknown;
|
|
16
|
+
}
|
|
17
|
+
/** a place in a file whose value names another thing */
|
|
18
|
+
export interface RefSlot {
|
|
19
|
+
/** path segments; '*' is any name, '#' any list index */
|
|
20
|
+
at: string[];
|
|
21
|
+
/** the kinds a value here may name */
|
|
22
|
+
targets: string[];
|
|
23
|
+
/** words that are allowed here and aren't names */
|
|
24
|
+
extra?: string[];
|
|
25
|
+
/** the name inside a value, or undefined when the value names nothing */
|
|
26
|
+
name?(value: string): string | undefined;
|
|
27
|
+
/** the value with its name replaced */
|
|
28
|
+
rename?(value: string, to: string): string;
|
|
29
|
+
/** what the completion list shows for a name */
|
|
30
|
+
write?(name: string): string;
|
|
31
|
+
/** a value that is a path, not a name */
|
|
32
|
+
pathOk?: boolean;
|
|
33
|
+
/** the key itself is the reference */
|
|
34
|
+
key?: boolean;
|
|
35
|
+
what: string;
|
|
36
|
+
}
|
|
37
|
+
export interface Ref {
|
|
38
|
+
/** the JSON pointer of the value (or of the key, for key slots) */
|
|
39
|
+
path: string;
|
|
40
|
+
slot: RefSlot;
|
|
41
|
+
value: string;
|
|
42
|
+
/** the name it refers to, if it refers to one */
|
|
43
|
+
name?: string;
|
|
44
|
+
}
|
|
45
|
+
/** a thing at a pointer: its kind, its name and its own pointer */
|
|
46
|
+
export interface ObjectRef {
|
|
47
|
+
kind: string;
|
|
48
|
+
name: string;
|
|
49
|
+
path: string;
|
|
50
|
+
}
|
|
51
|
+
/** what the domain's reader says of a text */
|
|
52
|
+
export interface ReadOutcome {
|
|
53
|
+
diags: Diag[];
|
|
54
|
+
/** each object's tag (the outline shows it), by name */
|
|
55
|
+
tags?: Map<string, string>;
|
|
56
|
+
/** the domain's own reading, for its views */
|
|
57
|
+
read?: unknown;
|
|
58
|
+
}
|
|
59
|
+
/** what each part of the editor asks of an adapter (a domain may give a part only what it asks: smaller bundles) */
|
|
60
|
+
export type CommandsAdapter = Pick<DomainAdapter, 'kinds' | 'objectOf' | 'describe' | 'refs' | 'renameRef' | 'refDeletePath' | 'copyValue' | 'topOrder' | 'pins'>;
|
|
61
|
+
export type ClipboardAdapter = CommandsAdapter & Pick<DomainAdapter, 'entryGroups' | 'pasteDrops' | 'noun'>;
|
|
62
|
+
export type CompleteAdapter = Pick<DomainAdapter, 'snippets' | 'slotAt' | 'kinds' | 'extraDetail'>;
|
|
63
|
+
export type OutlineAdapter = Pick<DomainAdapter, 'outline' | 'kinds'>;
|
|
64
|
+
export type PlaceAdapter = Pick<DomainAdapter, 'objectOf' | 'keyMessage'>;
|
|
65
|
+
export type ReadAdapter = PlaceAdapter & Pick<DomainAdapter, 'read' | 'role'>;
|
|
66
|
+
export type ProvidersAdapter = CompleteAdapter & Pick<DomainAdapter, 'schema' | 'role' | 'refs'>;
|
|
67
|
+
export interface DomainAdapter {
|
|
68
|
+
/** the format it reads ("boxes/1") */
|
|
69
|
+
id: string;
|
|
70
|
+
role(text: string): FileRole;
|
|
71
|
+
/** the JSON Schema for a role (completion, hover, the properties panel); `text` (0.8.0) is the file's, for a format whose
|
|
72
|
+
* version line picks its schema (the same object for the same schema: the editor keeps one navigator per object) */
|
|
73
|
+
schema(role: FileRole, text?: string): object;
|
|
74
|
+
/** the problems in a text, from the domain's reader (with the files it extends, as the host resolved them) */
|
|
75
|
+
read(text: string, o: {
|
|
76
|
+
fileName: string;
|
|
77
|
+
defaults?: {
|
|
78
|
+
name: string;
|
|
79
|
+
text: string;
|
|
80
|
+
}[];
|
|
81
|
+
profiles?: string[];
|
|
82
|
+
role: FileRole;
|
|
83
|
+
}): ReadOutcome;
|
|
84
|
+
/** a reader's message that is about a key (placed on the key, not its value) */
|
|
85
|
+
keyMessage: RegExp;
|
|
86
|
+
/** the kinds, in the order the clipboard keeps them; names are unique across every kind */
|
|
87
|
+
kinds: ObjectKindInfo[];
|
|
88
|
+
/** what the domain calls an object, in words ("resource") */
|
|
89
|
+
noun: string;
|
|
90
|
+
/** the object a pointer is inside, if any */
|
|
91
|
+
objectOf(ptr: string): ObjectRef | undefined;
|
|
92
|
+
/** a path in words: "node web"; anything else its dotted path */
|
|
93
|
+
describe(p: Path): string;
|
|
94
|
+
/** named maps that aren't kinds (their names a pool of their own): copied, pasted and renamed like objects */
|
|
95
|
+
entryGroups: Path[];
|
|
96
|
+
/** every reference in the data, and the slot at a pointer */
|
|
97
|
+
refs(data: unknown): Ref[];
|
|
98
|
+
slotAt(ptr: string): RefSlot | undefined;
|
|
99
|
+
/** a reference's new text when what it names is renamed to `to`; undefined: it stays as written */
|
|
100
|
+
renameRef(ref: Ref, to: string): string | undefined;
|
|
101
|
+
/** what deleting a reference (with the thing it names) removes: the reference, or the entry holding it */
|
|
102
|
+
refDeletePath(p: Path): Path;
|
|
103
|
+
/** a copy of an object's value (duplicate): what it can't keep (a flag only one may have) dropped */
|
|
104
|
+
copyValue(kind: string, value: unknown): unknown;
|
|
105
|
+
/** a paste into this data: keys a pasted object drops (the path), and why, in words */
|
|
106
|
+
pasteDrops?(target: unknown, pasted: {
|
|
107
|
+
kind: string;
|
|
108
|
+
path: Path;
|
|
109
|
+
value: unknown;
|
|
110
|
+
}): {
|
|
111
|
+
path: Path;
|
|
112
|
+
why: string;
|
|
113
|
+
} | undefined;
|
|
114
|
+
/** what a completion list says of an extra word in a slot */
|
|
115
|
+
extraDetail?(word: string, data: unknown): string | undefined;
|
|
116
|
+
/** the top-level key order: where a new section goes */
|
|
117
|
+
topOrder: readonly string[];
|
|
118
|
+
/** the layout pins: the key they live under, a legacy key read too, and whether a file has only the legacy one */
|
|
119
|
+
pins: {
|
|
120
|
+
key: string;
|
|
121
|
+
legacyKey?: string;
|
|
122
|
+
legacyOnly(data: unknown): boolean;
|
|
123
|
+
};
|
|
124
|
+
/** new-entry snippets (Monaco syntax), by the pointer of the map they go in ('#…' tells several apart) */
|
|
125
|
+
snippets: Record<string, {
|
|
126
|
+
label: string;
|
|
127
|
+
body: string;
|
|
128
|
+
doc: string;
|
|
129
|
+
}>;
|
|
130
|
+
/** the outline: the settings shown first, the setting groups after the kinds, and the root's label */
|
|
131
|
+
outline: {
|
|
132
|
+
/** the kinds' groups, in this order */
|
|
133
|
+
kinds: readonly string[];
|
|
134
|
+
first: readonly string[];
|
|
135
|
+
/** the setting groups; `when` (0.8.0): whether a missing one is offered, by the file's data (a version's own keys) */
|
|
136
|
+
groups: readonly {
|
|
137
|
+
key: string;
|
|
138
|
+
label: string;
|
|
139
|
+
when?(data: Record<string, unknown>): boolean;
|
|
140
|
+
}[];
|
|
141
|
+
rootLabel(data: Record<string, unknown>, role: FileRole): string;
|
|
142
|
+
/** an object's tag from this file alone (when the reader's isn't known) */
|
|
143
|
+
tag?(kind: string, name: string, value: unknown, data: Record<string, unknown>): string | undefined;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Path } from './path.js';
|
|
2
|
+
import type { Command } from './model.js';
|
|
3
|
+
import type { ClipboardAdapter } from './adapter.js';
|
|
4
|
+
/** What a paste would do, described (for the menu), or why it can't. */
|
|
5
|
+
export interface PastePlan {
|
|
6
|
+
cmd?: Command;
|
|
7
|
+
what: string;
|
|
8
|
+
names?: Map<string, string>;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
/** The clipboard, for one domain. */
|
|
12
|
+
export declare function clipboardFor(a: ClipboardAdapter): {
|
|
13
|
+
copyText: (text: string, paths: Path[]) => {
|
|
14
|
+
text: string;
|
|
15
|
+
what: string;
|
|
16
|
+
} | undefined;
|
|
17
|
+
pasteCmd: (text: string, clip: string, selection?: Path[]) => PastePlan;
|
|
18
|
+
cutCmd: (text: string, paths: Path[]) => {
|
|
19
|
+
text: string;
|
|
20
|
+
cmd: Command;
|
|
21
|
+
} | undefined;
|
|
22
|
+
};
|
|
23
|
+
export type Clipboard = ReturnType<typeof clipboardFor>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Splice } from './splice.js';
|
|
2
|
+
import { type Path } from './path.js';
|
|
3
|
+
import type { Command } from './model.js';
|
|
4
|
+
import type { CommandsAdapter, Ref } from './adapter.js';
|
|
5
|
+
/** Run several splices one after the other, each against the text the previous one left. */
|
|
6
|
+
export declare function chain(text: string, parts: ((t: string) => Splice)[]): Splice;
|
|
7
|
+
/** Several commands as one: each built against the text the one before left; one undo step. */
|
|
8
|
+
export declare function seqCmd(label: string, cmds: Command[]): Command;
|
|
9
|
+
/** The commands, for one domain. */
|
|
10
|
+
export declare function commandsFor(a: CommandsAdapter): {
|
|
11
|
+
describe: (p: Path) => string;
|
|
12
|
+
setCmd: (path: Path, value: unknown, label?: string) => Command;
|
|
13
|
+
pinsCmd: (pins: [string, [number, number]][], label: string) => Command;
|
|
14
|
+
withPinsMoved: (cmd: Command) => Command;
|
|
15
|
+
insertCmd: (mapPath: Path, key: string, value: unknown, opts?: {
|
|
16
|
+
after?: string;
|
|
17
|
+
before?: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
}) => Command;
|
|
20
|
+
insertItemCmd: (listPath: Path, value: unknown, index?: number, label?: string) => Command;
|
|
21
|
+
moveCmd: (path: Path, before?: string) => Command;
|
|
22
|
+
referencesTo: (text: string, kind: string, name: string) => Ref[];
|
|
23
|
+
deleteCmd: (path: Path, opts?: {
|
|
24
|
+
withRefs?: boolean;
|
|
25
|
+
}) => Command;
|
|
26
|
+
renameCmd: (path: Path, to: string) => Command;
|
|
27
|
+
duplicateCmd: (path: Path) => Command;
|
|
28
|
+
renameKeyCmd: (path: Path, to: string) => Command;
|
|
29
|
+
moveItemCmd: (listPath: Path, from: number, to: number) => Command;
|
|
30
|
+
freshName: (text: string, stem: string) => string;
|
|
31
|
+
};
|
|
32
|
+
export type Commands = ReturnType<typeof commandsFor>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EditorDoc } from './doc.js';
|
|
2
|
+
import { SchemaNav } from './schema-nav.js';
|
|
3
|
+
import { type Path } from './path.js';
|
|
4
|
+
import type { CompleteAdapter, ObjectKindInfo } from './adapter.js';
|
|
5
|
+
export interface Item {
|
|
6
|
+
label: string;
|
|
7
|
+
/** text to insert (a Monaco snippet when `snippet`) */
|
|
8
|
+
insert: string;
|
|
9
|
+
kind: 'key' | 'value' | 'ref' | 'snippet';
|
|
10
|
+
detail?: string;
|
|
11
|
+
/** Markdown */
|
|
12
|
+
doc?: string;
|
|
13
|
+
snippet?: boolean;
|
|
14
|
+
/** sorts before the rest */
|
|
15
|
+
preferred?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface Completion {
|
|
18
|
+
items: Item[];
|
|
19
|
+
start: number;
|
|
20
|
+
path: Path;
|
|
21
|
+
context: 'key' | 'value' | 'item';
|
|
22
|
+
}
|
|
23
|
+
/** the names declared in a kind's section */
|
|
24
|
+
export declare function namesIn(d: EditorDoc, k: ObjectKindInfo): string[];
|
|
25
|
+
export declare function complete(d: EditorDoc, offset: number, nav: SchemaNav, a: CompleteAdapter): Completion;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { LineCounter, type Document, type Node as YNode } from 'yaml';
|
|
2
|
+
import type { Path } from './path.js';
|
|
3
|
+
export type Where = 'key' | 'value' | 'inside';
|
|
4
|
+
export interface At {
|
|
5
|
+
path: Path;
|
|
6
|
+
where: Where;
|
|
7
|
+
node?: YNode;
|
|
8
|
+
}
|
|
9
|
+
export declare class EditorDoc {
|
|
10
|
+
readonly text: string;
|
|
11
|
+
readonly doc: Document.Parsed;
|
|
12
|
+
readonly lines: LineCounter;
|
|
13
|
+
constructor(text: string);
|
|
14
|
+
get ok(): boolean;
|
|
15
|
+
get data(): unknown;
|
|
16
|
+
/** 1-based line and column of an offset */
|
|
17
|
+
pos(offset: number): {
|
|
18
|
+
line: number;
|
|
19
|
+
col: number;
|
|
20
|
+
};
|
|
21
|
+
/** offset of a 1-based line and column */
|
|
22
|
+
offset(line: number, col: number): number;
|
|
23
|
+
/** The source range of the node (or its key, or the whole pair) at a path. */
|
|
24
|
+
rangeOf(path: Path, part?: 'value' | 'key' | 'pair'): [number, number] | undefined;
|
|
25
|
+
/** What is at a caret: the innermost key, value or collection whose source contains the offset. */
|
|
26
|
+
at(offset: number): At;
|
|
27
|
+
/** The node at a path. */
|
|
28
|
+
nodeAt(path: Path): YNode | undefined;
|
|
29
|
+
/** Every path in the document, with its range: for tests (rangeOf ∘ at is the identity) and the tree (E3). */
|
|
30
|
+
paths(): {
|
|
31
|
+
path: Path;
|
|
32
|
+
range: [number, number];
|
|
33
|
+
}[];
|
|
34
|
+
}
|
|
35
|
+
export interface CompletionContext {
|
|
36
|
+
/** the path of the map a key is being typed in, or of the value being typed */
|
|
37
|
+
path: Path;
|
|
38
|
+
kind: 'key' | 'value' | 'item';
|
|
39
|
+
/** the word typed so far, and where it starts */
|
|
40
|
+
prefix: string;
|
|
41
|
+
start: number;
|
|
42
|
+
/** a flow collection ({ … } or [ … ]): keys are written inline */
|
|
43
|
+
flow: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* What the caret is completing. In a block map the parent is found by indentation (an empty line has no node);
|
|
47
|
+
* after "key: " it is that key's value; in a "- " item or a [ … ] list, an item of that list; inside { … } a key of
|
|
48
|
+
* that map.
|
|
49
|
+
*/
|
|
50
|
+
export declare function completionContext(d: EditorDoc, offset: number): CompletionContext;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type { FileRole, ObjectKindInfo, RefSlot, Ref, ObjectRef, ReadOutcome, DomainAdapter } from './adapter.js';
|
|
2
|
+
export { toPointer, fromPointer, parentOf, isPrefix, samePath } from './path.js';
|
|
3
|
+
export type { Seg, Path } from './path.js';
|
|
4
|
+
export { EditorDoc, completionContext } from './doc.js';
|
|
5
|
+
export type { Where, At, CompletionContext } from './doc.js';
|
|
6
|
+
export { HISTORY_DEPTH, EditorModel } from './model.js';
|
|
7
|
+
export type { Origin, Command, Change, SelectionChange } from './model.js';
|
|
8
|
+
export { SpliceError, applyStep, invertStep, scalarText, flowText, setValue, insertKey, deleteAt, insertItem, renameKey, moveKey, insertRawPair, pairText } from './splice.js';
|
|
9
|
+
export type { TextEdit, Step, Splice } from './splice.js';
|
|
10
|
+
export { SchemaNav } from './schema-nav.js';
|
|
11
|
+
export type { KeyInfo } from './schema-nav.js';
|
|
12
|
+
export { PREF, VIEWS } from './storage-keys.js';
|
|
13
|
+
export { chain, seqCmd, commandsFor } from './commands.js';
|
|
14
|
+
export type { Commands } from './commands.js';
|
|
15
|
+
export { clipboardFor } from './clipboard.js';
|
|
16
|
+
export type { PastePlan, Clipboard } from './clipboard.js';
|
|
17
|
+
export { namesIn, complete } from './complete.js';
|
|
18
|
+
export type { Item, Completion } from './complete.js';
|
|
19
|
+
export { outline, flatten } from './outline.js';
|
|
20
|
+
export type { NodeKind, OutlineNode } from './outline.js';
|
|
21
|
+
export { analyse, place } from './validate.js';
|
|
22
|
+
export type { Problem, ValidateOpts } from './validate.js';
|
|
23
|
+
export { docFor, providersFor, rangeOfPath, problemRange, cmSnippet, mdRuns } from './providers.js';
|
|
24
|
+
export type { Providers } from './providers.js';
|
|
25
|
+
export { setLayer, layer } from './ui/layer.js';
|
|
26
|
+
export { icon } from './ui/icons.js';
|
|
27
|
+
export type { IconName } from './ui/icons.js';
|
|
28
|
+
export { ask } from './ui/dialog.js';
|
|
29
|
+
export type { DialogButton } from './ui/dialog.js';
|
|
30
|
+
export { menuOpen, openMenu, closeMenu } from './ui/menu.js';
|
|
31
|
+
export type { MenuItem } from './ui/menu.js';
|
|
32
|
+
export { TYPING_PAUSE_MS, isTyping, later } from './ui/later.js';
|
|
33
|
+
export { keymapWith, keySheet } from './ui/keys.js';
|
|
34
|
+
export type { KeyGroup } from './ui/keys.js';
|
|
35
|
+
export type { TextSel, TextPane, TextServices, PaneOpts } from './ui/pane.js';
|
|
36
|
+
export { clipboard } from './ui/clip.js';
|
|
37
|
+
export type { Clip } from './ui/clip.js';
|
|
38
|
+
export { treeView } from './ui/tree.js';
|
|
39
|
+
export type { NewItem, EntryItem, TreeUi, TreeKit, TreeOpts } from './ui/tree.js';
|
|
40
|
+
export { run, composite, actionsFor } from './ui/actions.js';
|
|
41
|
+
export type { ActionsKit, Actions } from './ui/actions.js';
|
|
42
|
+
export { propsPanel } from './ui/props.js';
|
|
43
|
+
export type { PropsUi, PropsKit, PropsOpts } from './ui/props.js';
|
|
44
|
+
export type { Box as CanvasBox, Outline, CanvasCtx, CanvasLayer } from './ui/canvas-layer.js';
|
|
45
|
+
export { canvasView } from './ui/canvas.js';
|
|
46
|
+
export type { CanvasDrawing, DropInto, CanvasUi, CanvasKit, CanvasOpts, FlatCanvas, FlatDrawn } from './ui/canvas.js';
|
|
47
|
+
export { flatCanvas } from './ui/flat-canvas.js';
|
|
48
|
+
export type { PartCtx, Attention, EditorPart } from './ui/part.js';
|
|
49
|
+
export type { Checked, MountKit } from './ui/mount-kit.js';
|
|
50
|
+
export { mountEditor } from './ui/mount.js';
|
|
51
|
+
export type { Theme, SaveResult, HostHooks, EditorOptions, ShellWords, ShellFeatures, ShellCanvas, EditorSetup, EditorState, Editor } from './ui/mount.js';
|
|
52
|
+
export { PROTOCOL, isMessage } from './window/protocol.js';
|
|
53
|
+
export type { Refused, Capabilities, BaseToHost, BaseToWindow } from './window/protocol.js';
|
|
54
|
+
export { setupFor, PLAIN_WORDS, PLAIN_KEYMAP } from './ui/setup.js';
|
|
55
|
+
export type { DomainView } from './ui/setup.js';
|
|
56
|
+
export { scopeCss, scopeOne } from './ui/scope-css.js';
|
|
57
|
+
export { PLAIN_ICON_SVG, PLAIN_ICONS, PLAIN_SPRITE, iconSymbols, spriteOf } from './ui/plain-icons.js';
|