@johnoscott/isometric-engine 0.0.0-stage → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EDITOR-GUIDE.md +355 -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 +269 -0
- package/assets/default-theme.yaml +99 -0
- package/assets/icons.svg +1 -0
- package/assets/marks.css +39 -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 +443 -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 +1403 -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 +149 -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 +511 -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 +147 -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 +477 -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 +1227 -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 +39 -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 +153 -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 +178 -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 +307 -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 +49 -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,56 @@
|
|
|
1
|
+
export type Appear = 'scale' | 'spin' | 'dissolve' | 'inflate';
|
|
2
|
+
export type Idle = 'none' | 'jiggle' | 'pirouette' | 'glow' | 'breathe';
|
|
3
|
+
export interface MotionSettings {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
appear: Appear;
|
|
6
|
+
idle: Idle;
|
|
7
|
+
}
|
|
8
|
+
export declare const APPEARS: [Appear, string][];
|
|
9
|
+
export declare const IDLES: [Idle, string][];
|
|
10
|
+
/** the domain's cards: their class prefix, as the overlay draws them (PREFIX-float, a card that has gone PREFIX-leaving,
|
|
11
|
+
* in the PREFIX-leaving-layer), and the attributes a card's key is read from: key, else alt (removed when it goes) */
|
|
12
|
+
export interface CardNames {
|
|
13
|
+
prefix: string;
|
|
14
|
+
key: string;
|
|
15
|
+
alt: string;
|
|
16
|
+
}
|
|
17
|
+
export interface MotionHost {
|
|
18
|
+
/** turn a card about its vertical axis (radians), lifted (cells): its faces drawn again */
|
|
19
|
+
spin(card: SVGGElement, theta: number, lift: number): void;
|
|
20
|
+
/** the card as drawn still again */
|
|
21
|
+
restore(card: SVGGElement): void;
|
|
22
|
+
/** where a card that has gone may finish going (outside the state layer, which is reconciled) */
|
|
23
|
+
leavingLayer(): SVGGElement | undefined;
|
|
24
|
+
/** the amber of the cards' edge */
|
|
25
|
+
amber(): string;
|
|
26
|
+
}
|
|
27
|
+
export declare function cardMotion(host: MotionHost, initial: MotionSettings, { prefix, key, alt }: CardNames): {
|
|
28
|
+
readonly settings: {
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
appear: Appear;
|
|
31
|
+
idle: Idle;
|
|
32
|
+
};
|
|
33
|
+
set(next: Partial<MotionSettings>, cards: Iterable<SVGGElement>): void;
|
|
34
|
+
update: (prev: Map<string, SVGGElement>, cur: Map<string, SVGGElement>, gone: Map<string, boolean>, animateOut: boolean, still?: boolean) => void;
|
|
35
|
+
appear: (card: SVGGElement) => Promise<void>;
|
|
36
|
+
disappear: (card: SVGGElement) => Promise<void>;
|
|
37
|
+
startIdle: (card: SVGGElement, period?: number) => void;
|
|
38
|
+
stopIdle: (card: SVGGElement) => void;
|
|
39
|
+
stopAll: (root: ParentNode | undefined) => void;
|
|
40
|
+
/** Preview: on each card, appear, then a few idle cycles, then disappear, then back as it was (still) and idling */
|
|
41
|
+
preview(cards: SVGGElement[]): Promise<void>;
|
|
42
|
+
/** for the tests */
|
|
43
|
+
readonly stats: {
|
|
44
|
+
jobs: number;
|
|
45
|
+
raf: boolean;
|
|
46
|
+
frames: number;
|
|
47
|
+
effects: number;
|
|
48
|
+
};
|
|
49
|
+
setSpeed(n: number): void;
|
|
50
|
+
lastFrame: (card: SVGGElement) => {
|
|
51
|
+
theta: number;
|
|
52
|
+
lift: number;
|
|
53
|
+
scale: number;
|
|
54
|
+
} | undefined;
|
|
55
|
+
};
|
|
56
|
+
export type CardMotion = ReturnType<typeof cardMotion>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function h<K extends keyof HTMLElementTagNameMap>(tag: K, attrs?: Record<string, unknown> | null, ...kids: (Node | string | null | undefined | false)[]): HTMLElementTagNameMap[K];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { CompiledScene } from '../iso-objects/compile.js';
|
|
2
|
+
import { type Board, type FlatLayout, type FlatOptions } from '../iso-objects/flat.js';
|
|
3
|
+
import { type FlatStyle } from './flat-view.js';
|
|
4
|
+
import { type ViewMode } from './morph.js';
|
|
5
|
+
export type { ViewMode } from './morph.js';
|
|
6
|
+
export interface DualViewOptions {
|
|
7
|
+
mode?: ViewMode;
|
|
8
|
+
/** the board the 2D view draws; default: boardOf(scene) */
|
|
9
|
+
board?: Board;
|
|
10
|
+
/** link kinds' styles in 2D */
|
|
11
|
+
styles?: Record<string, FlatStyle>;
|
|
12
|
+
flat?: Partial<FlatOptions>;
|
|
13
|
+
/** the svg's label */
|
|
14
|
+
title?: string;
|
|
15
|
+
onSelect?(id: string | undefined): void;
|
|
16
|
+
/** the morph's length, ms */
|
|
17
|
+
duration?: number;
|
|
18
|
+
/** whether a switch animates (0.7.3): 'auto' honours prefers-reduced-motion (the default), 'always' morphs
|
|
19
|
+
* regardless (a host's deliberate choice for a switch the user asked for), 'never' always swaps at once */
|
|
20
|
+
motion?: 'auto' | 'always' | 'never';
|
|
21
|
+
}
|
|
22
|
+
export interface DualView {
|
|
23
|
+
readonly mode: ViewMode;
|
|
24
|
+
readonly layout: FlatLayout;
|
|
25
|
+
readonly root: HTMLElement;
|
|
26
|
+
/** switch view, animated (instant with reduced motion); resolves when the view is shown */
|
|
27
|
+
morph(to: ViewMode): Promise<void>;
|
|
28
|
+
select(id: string | undefined): void;
|
|
29
|
+
readonly selected: string | undefined;
|
|
30
|
+
/** the svg of a view */
|
|
31
|
+
svgOf(mode: ViewMode): SVGSVGElement;
|
|
32
|
+
destroy(): void;
|
|
33
|
+
}
|
|
34
|
+
/** the scene in both views, in `host`: the 3D drawing as the engine rendered it, the 2D one laid out from its board */
|
|
35
|
+
export declare function dualView(host: HTMLElement, scene: CompiledScene, opts?: DualViewOptions): DualView;
|
|
36
|
+
/** the view a page last showed (localStorage), if any */
|
|
37
|
+
export declare function storedMode(key?: string): ViewMode | undefined;
|
|
38
|
+
/** the 3D | 2D switch: two buttons (aria-pressed), the choice remembered in localStorage; it switches every view given */
|
|
39
|
+
export declare function viewToggle(host: HTMLElement, views: DualView | DualView[], opts?: {
|
|
40
|
+
storageKey?: string;
|
|
41
|
+
labels?: [string, string];
|
|
42
|
+
}): HTMLElement;
|
|
43
|
+
/** the switch's and the views' own CSS (unscoped) */
|
|
44
|
+
export declare const DUAL_VIEW_CSS = "\n.view-switch{display:inline-flex;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--surface);font:600 12px/1 system-ui,sans-serif;box-shadow:0 1px 4px rgba(0,0,0,.12)}\n.view-switch button{font:inherit;border:0;background:none;color:var(--ink);padding:6px 10px;cursor:pointer}\n.view-switch button+button{border-left:1px solid var(--line)}\n.view-switch button[aria-pressed=true]{background:var(--accent,#2f6fd6);color:#fff}\n.view-switch button:focus-visible{outline:2px solid var(--accent,#2f6fd6);outline-offset:-2px}\n.dual-view [data-id][tabindex]:focus-visible{outline:none}\n.dual-view .blk.sel polygon{stroke:var(--accent,#2f6fd6);stroke-width:2.4}\n.dual-view [data-a].dim{opacity:.3}\n.dual-view [data-a].hot path{stroke-width:3.4}\n";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FlatLayout, FlatRect, Measure } from '../iso-objects/flat.js';
|
|
2
|
+
/** how a link kind is drawn: its ends, its dash, its colour (a theme token, e.g. "send", or any CSS colour) */
|
|
3
|
+
export interface FlatStyle {
|
|
4
|
+
start?: 'arrow' | 'open' | 'diamond' | 'none';
|
|
5
|
+
end?: 'arrow' | 'open' | 'diamond' | 'none';
|
|
6
|
+
dash?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
width?: number;
|
|
9
|
+
}
|
|
10
|
+
/** the 2D drawing: panels, connectors, cards, then the connectors' labels. `id` prefixes its marker ids. */
|
|
11
|
+
export declare function flatSvg(L: FlatLayout, opts: {
|
|
12
|
+
id: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
styles?: Record<string, FlatStyle>;
|
|
15
|
+
}): string;
|
|
16
|
+
/** the 2D view's stylesheet: its fonts (the ones flat.ts's FLAT_FONTS measures), its faces in the theme's role colours,
|
|
17
|
+
* and each link kind's colour and dash. Unscoped: a page scopes it as it scopes the drawing's (view-css.ts). */
|
|
18
|
+
export declare function flatCss(styles?: Record<string, FlatStyle>): string;
|
|
19
|
+
/** a measure from a page's own rendered text: a hidden 2D svg in `host` (so the view's stylesheet applies), each text
|
|
20
|
+
* measured by getComputedTextLength, remembered */
|
|
21
|
+
export declare function measureIn(host: Element): Measure & {
|
|
22
|
+
dispose(): void;
|
|
23
|
+
};
|
|
24
|
+
/** the rect of a card or panel in a layout */
|
|
25
|
+
export declare const rectOf: (L: FlatLayout, id: string) => FlatRect | undefined;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { Bin, MetricPoint, MetricRollup, Query, Result, Row, Scope, TimelineEvent, TimelineSource, View, TimelineCatalog, TimelineTypes, AnyTimeline } from './timeline-contract.js';
|
|
2
|
+
import { type Gap, type TimeScale } from './timeline-scale.js';
|
|
3
|
+
export interface TimelineMountOptions<T extends TimelineTypes = AnyTimeline> {
|
|
4
|
+
source: TimelineSource<T>;
|
|
5
|
+
/** the domain's scopes, flags and search links */
|
|
6
|
+
catalog: TimelineCatalog;
|
|
7
|
+
/** classes on the component's root beside its own (the stylesheet it is styled by is scoped to one) */
|
|
8
|
+
rootClass?: string[];
|
|
9
|
+
/** where to start (else the URL's view, else the first host, 1 level down, the last day) */
|
|
10
|
+
view?: Partial<View>;
|
|
11
|
+
/** the owner's time zone (default: the viewer's) */
|
|
12
|
+
tz?: string;
|
|
13
|
+
/** light, dark, or the viewer's (default) */
|
|
14
|
+
theme?: 'light' | 'dark' | 'system';
|
|
15
|
+
/** keep the view in location.hash (#timeline=…) */
|
|
16
|
+
urlState?: boolean;
|
|
17
|
+
/** collapse long empty stretches into time breaks (default true; remembered per view) */
|
|
18
|
+
collapseGaps?: boolean;
|
|
19
|
+
/** animate a time break opening (default: unless the viewer prefers reduced motion) */
|
|
20
|
+
motion?: boolean;
|
|
21
|
+
/** an event's actions, in its detail: a label, and what it does (none: not shown) */
|
|
22
|
+
actions?(e: TimelineEvent<T>): [string, (() => void) | undefined][];
|
|
23
|
+
/** saved views: the host stores them */
|
|
24
|
+
saveView?(v: View): void | Promise<void>;
|
|
25
|
+
views?(): View[] | Promise<View[]>;
|
|
26
|
+
/** the playhead moved: the state recorded there, if any (draw it on a canvas) */
|
|
27
|
+
onPlayhead?(t: number, state: T['state'] | undefined): void;
|
|
28
|
+
/** a recorded state, in words for the canvas's note: when it was observed, and what it belongs to */
|
|
29
|
+
stamp?(state: T['state']): {
|
|
30
|
+
at?: string;
|
|
31
|
+
tag?: string;
|
|
32
|
+
};
|
|
33
|
+
onViewChange?(v: View): void;
|
|
34
|
+
/** an export: the host saves it (else the browser downloads it) */
|
|
35
|
+
onExport?(name: string, text: string, type: string): void;
|
|
36
|
+
}
|
|
37
|
+
type Mode = {
|
|
38
|
+
kind: 'single';
|
|
39
|
+
} | {
|
|
40
|
+
kind: 'binned';
|
|
41
|
+
bin: Bin;
|
|
42
|
+
};
|
|
43
|
+
type Line<T extends TimelineTypes = AnyTimeline> = {
|
|
44
|
+
kind: 'row';
|
|
45
|
+
row: Row<T>;
|
|
46
|
+
} | {
|
|
47
|
+
kind: 'metric';
|
|
48
|
+
series: string;
|
|
49
|
+
unit: string;
|
|
50
|
+
type: 'counter' | 'gauge';
|
|
51
|
+
title: string;
|
|
52
|
+
};
|
|
53
|
+
/** which zoom level a visible span reads at: single events up to a few hours, then minute, hour and day bins */
|
|
54
|
+
export declare function modeFor(span: number, px: number): Mode;
|
|
55
|
+
/** the activity a result shows (for time breaks): marks, span ends, bins with events, metrics that moved */
|
|
56
|
+
export declare function activityOf<T extends TimelineTypes = AnyTimeline>(r: Result<T>, mode: Mode, series?: Map<string, 'counter' | 'gauge'>): [number, number][];
|
|
57
|
+
export declare function mountTimeline<T extends TimelineTypes = AnyTimeline>(el: HTMLElement, o: TimelineMountOptions<T>): {
|
|
58
|
+
el: HTMLElement;
|
|
59
|
+
ready: Promise<void>;
|
|
60
|
+
readonly view: View;
|
|
61
|
+
setView(v: Partial<View>): Promise<void>;
|
|
62
|
+
setRange(t0: number, t1: number): Promise<void>;
|
|
63
|
+
setPlayhead: (t: number | undefined) => Promise<void>;
|
|
64
|
+
setLive: (on: boolean, go?: boolean) => void;
|
|
65
|
+
setTheme: (t?: 'light' | 'dark' | 'system') => void;
|
|
66
|
+
refresh: () => Promise<void>;
|
|
67
|
+
/** for tests and hosts: what is drawn, and the mapping */
|
|
68
|
+
internal: {
|
|
69
|
+
readonly result: Result<T> | undefined;
|
|
70
|
+
readonly mode: Mode;
|
|
71
|
+
readonly scale: TimeScale;
|
|
72
|
+
readonly gaps: Gap[];
|
|
73
|
+
readonly playState: T["state"] | undefined;
|
|
74
|
+
readonly hits: TimelineEvent<T>[];
|
|
75
|
+
readonly selected: TimelineEvent<T> | undefined;
|
|
76
|
+
readonly follow: boolean;
|
|
77
|
+
openCut: (from: number, to: number) => void;
|
|
78
|
+
showTable: (from: number, to: number) => Promise<void>;
|
|
79
|
+
rangeEvents: () => Promise<TimelineEvent<T>[]>;
|
|
80
|
+
exportRange: (kind: 'json' | 'csv') => Promise<void>;
|
|
81
|
+
select: (e: TimelineEvent<T> | undefined) => void;
|
|
82
|
+
stepHit: (dir: 1 | -1) => void;
|
|
83
|
+
drill: (s: Scope) => void;
|
|
84
|
+
findHits: () => Promise<void>;
|
|
85
|
+
paint: () => void;
|
|
86
|
+
lines: () => Line<T>[];
|
|
87
|
+
};
|
|
88
|
+
dispose(): void;
|
|
89
|
+
};
|
|
90
|
+
export type TimelineHandle = ReturnType<typeof mountTimeline>;
|
|
91
|
+
export type { MetricPoint, MetricRollup, Row, Query, Result };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { MIN_ZOOM, viewport, MAX_ZOOM } from './viewport.js';
|
|
2
|
+
export type { View, ViewportOpts, Viewport } from './viewport.js';
|
|
3
|
+
export { CARD, P3, pts, overlayPaint } from './overlay.js';
|
|
4
|
+
export type { Box, Outline, Box3, CardGeo, Glyph, Mark, Ghost, Card, OverlayCtx, OverlayPaint } from './overlay.js';
|
|
5
|
+
export { APPEARS, IDLES, cardMotion } from './card-motion.js';
|
|
6
|
+
export type { Appear, Idle, MotionSettings, CardNames, MotionHost, CardMotion } from './card-motion.js';
|
|
7
|
+
export { n, node, rewrite, prune, cls, attr, extent, unite, fitWithOverlay } from './still.js';
|
|
8
|
+
export { isoVars, scopeSelector, scope } from './view-css.js';
|
|
9
|
+
export { md, stepData, legend, renderPage } from './page.js';
|
|
10
|
+
export type { PageOpts } from './page.js';
|
|
11
|
+
export { h } from './dom.js';
|
|
12
|
+
export { TIMELINE_VERSION, SEGMENT_NAME, SEVERITIES, BINS, BIN_MS, scopePattern } from './timeline-contract.js';
|
|
13
|
+
export type { TimelineTypes, AnyTimeline, Scope, Severity, AttrValue, TimelineEvent, Bin, MetricPoint, MetricRollup, EventBin, Match, AstTerm, SearchAst, Days, Retention, SeriesInfo, KindInfo, SourceInfo, EffectiveRetention, ScopeName, Catalog, Filters, Query, Row, Result, Batch, View as TimelineView, Recording, TimelineSource, TimelineCatalog } from './timeline-contract.js';
|
|
14
|
+
export { scopeRules, escapeName, formatScope, join, levelOf, prefixAt, parentOf, within, hasSegment, kindOf, nameOf, crumbs } from './timeline-scope.js';
|
|
15
|
+
export type { Segment } from './timeline-scope.js';
|
|
16
|
+
export { BASE_FIELDS, readTime, searchFor, rangeOf, highlights, severities } from './timeline-search.js';
|
|
17
|
+
export type { Field, SearchDialect, Term, ParsedSearch, Search } from './timeline-search.js';
|
|
18
|
+
export { offsetAt, isZone, binStart, binNext } from './timeline-time.js';
|
|
19
|
+
export { findGaps, gapLabel, gapKey, timeScale, ticks } from './timeline-scale.js';
|
|
20
|
+
export type { Gap, Cut, TimeScale, Tick } from './timeline-scale.js';
|
|
21
|
+
export { toJSON, toCSV } from './timeline-export.js';
|
|
22
|
+
export { memorySource } from './timeline-engine.js';
|
|
23
|
+
export type { MemorySourceOptions, MemorySource } from './timeline-engine.js';
|
|
24
|
+
export { modeFor, activityOf, mountTimeline } from './history.js';
|
|
25
|
+
export type { TimelineMountOptions, TimelineHandle } from './history.js';
|
|
26
|
+
export { flatSvg, flatCss, measureIn, rectOf } from './flat-view.js';
|
|
27
|
+
export type { FlatStyle } from './flat-view.js';
|
|
28
|
+
export { dualView, storedMode, viewToggle, DUAL_VIEW_CSS } from './dual-view.js';
|
|
29
|
+
export type { ViewMode, DualViewOptions, DualView } from './dual-view.js';
|
|
30
|
+
export { morphSvgs, markConnectors } from './morph.js';
|
|
31
|
+
export type { SvgMorph } from './morph.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { CompiledScene } from '../iso-objects/compile.js';
|
|
2
|
+
import type { Board } from '../iso-objects/flat.js';
|
|
3
|
+
export type ViewMode = '3d' | '2d';
|
|
4
|
+
/** a 3D drawing's connectors marked with the ends they join (data-a, data-b), as the 2D ones are: a board's link may be
|
|
5
|
+
* drawn to a panel, so its ends are the board's when given */
|
|
6
|
+
export declare function markConnectors(svg3: SVGSVGElement, scene: CompiledScene, board?: Board): void;
|
|
7
|
+
/** whether a switch should animate, by the motion option (0.7.3) */
|
|
8
|
+
export declare const morphs: (motion?: 'auto' | 'always' | 'never') => boolean;
|
|
9
|
+
/** A running morph between two drawings already laid out in `root` (positioned): `done` resolves when it ends,
|
|
10
|
+
* `finish()` ends it at once (the layer gone). The caller shows and hides the drawings themselves. */
|
|
11
|
+
export interface SvgMorph {
|
|
12
|
+
readonly done: Promise<void>;
|
|
13
|
+
finish(): void;
|
|
14
|
+
}
|
|
15
|
+
/** The morph dualView runs (0.7.5: for the editor's canvas too), from one view's svg to the other's, over `root`:
|
|
16
|
+
* things move from where they are to where they will be (a 3D top face becoming its 2D card, or back), connectors fade
|
|
17
|
+
* out and draw in. Undefined when the motion option says not to animate (or the duration is 0). */
|
|
18
|
+
export declare function morphSvgs(root: HTMLElement, fromSvg: SVGSVGElement, toSvg: SVGSVGElement, from: ViewMode, o?: {
|
|
19
|
+
duration?: number;
|
|
20
|
+
motion?: 'auto' | 'always' | 'never';
|
|
21
|
+
}): SvgMorph | undefined;
|
|
22
|
+
export declare const clamp: (v: number) => number;
|
|
23
|
+
export declare const ease: (t: number) => number;
|
|
24
|
+
/** the layer a morph draws on: `at(t)` paints it t of the way from one view to the other */
|
|
25
|
+
export declare function buildLayer(root: HTMLElement, fromSvg: SVGSVGElement, toSvg: SVGSVGElement, from: ViewMode): {
|
|
26
|
+
svg: SVGSVGElement;
|
|
27
|
+
at(t: number): void;
|
|
28
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export type Box = {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
w: number;
|
|
5
|
+
h: number;
|
|
6
|
+
};
|
|
7
|
+
export type Outline = {
|
|
8
|
+
kind: 'poly';
|
|
9
|
+
id: string;
|
|
10
|
+
points: [number, number][];
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'route';
|
|
13
|
+
d: string;
|
|
14
|
+
};
|
|
15
|
+
/** a box in grid cells */
|
|
16
|
+
export type Box3 = {
|
|
17
|
+
x0: number;
|
|
18
|
+
x1: number;
|
|
19
|
+
y0: number;
|
|
20
|
+
y1: number;
|
|
21
|
+
z0: number;
|
|
22
|
+
z1: number;
|
|
23
|
+
};
|
|
24
|
+
/** a card's model: its middle, the tail's tip (z), the card's box and its stack's boxes */
|
|
25
|
+
export interface CardGeo {
|
|
26
|
+
cx: number;
|
|
27
|
+
cy: number;
|
|
28
|
+
tipZ: number;
|
|
29
|
+
card: Box3;
|
|
30
|
+
panes: Box3[];
|
|
31
|
+
}
|
|
32
|
+
/** a badge: a character, or an icon (by name), in a small circle; cls: its tone */
|
|
33
|
+
export type Glyph = {
|
|
34
|
+
g: string;
|
|
35
|
+
cls: string;
|
|
36
|
+
} | {
|
|
37
|
+
icon: string;
|
|
38
|
+
cls: string;
|
|
39
|
+
};
|
|
40
|
+
/** what is drawn over one object, in this order: its outline, its badge (or, with none, a hit area for its title),
|
|
41
|
+
* badges beside it, a dot at its bottom left and a tag at its bottom right */
|
|
42
|
+
export interface Mark {
|
|
43
|
+
/** what it is drawn over (the host's boxOf and outlinesFor know it) */
|
|
44
|
+
at: string;
|
|
45
|
+
title: string;
|
|
46
|
+
/** the class of its outline: an outline is drawn when it has one */
|
|
47
|
+
outline?: string;
|
|
48
|
+
badge?: Glyph;
|
|
49
|
+
/** no badge: a transparent rect over it, holding its title */
|
|
50
|
+
hit?: boolean;
|
|
51
|
+
/** badges beside the first, each a badge's width further right */
|
|
52
|
+
beside?: {
|
|
53
|
+
glyph: Glyph;
|
|
54
|
+
title: string;
|
|
55
|
+
}[];
|
|
56
|
+
dot?: {
|
|
57
|
+
glyph: Glyph;
|
|
58
|
+
title: string;
|
|
59
|
+
};
|
|
60
|
+
tag?: {
|
|
61
|
+
cls: string;
|
|
62
|
+
text: string;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/** a thing that isn't in the drawing, drawn as a ghost where the domain puts it */
|
|
66
|
+
export interface Ghost {
|
|
67
|
+
rect: {
|
|
68
|
+
x: number;
|
|
69
|
+
y: number;
|
|
70
|
+
w: number;
|
|
71
|
+
hgt: number;
|
|
72
|
+
k: number;
|
|
73
|
+
};
|
|
74
|
+
/** classes beside the ghost's own */
|
|
75
|
+
cls: string;
|
|
76
|
+
/** attributes on its group (data-*) */
|
|
77
|
+
data: [string, string][];
|
|
78
|
+
line1: string;
|
|
79
|
+
line2: string;
|
|
80
|
+
title: string;
|
|
81
|
+
}
|
|
82
|
+
/** a card standing over what it is about */
|
|
83
|
+
export interface Card {
|
|
84
|
+
/** the box (grid cells) it stands over */
|
|
85
|
+
over: {
|
|
86
|
+
x0: number;
|
|
87
|
+
y0: number;
|
|
88
|
+
x1: number;
|
|
89
|
+
y1: number;
|
|
90
|
+
z1: number;
|
|
91
|
+
};
|
|
92
|
+
/** classes beside the card's own */
|
|
93
|
+
cls: string;
|
|
94
|
+
/** attributes on its group (data-*) */
|
|
95
|
+
data: [string, string][];
|
|
96
|
+
/** the big mark on its face, who it is from, how old it is, and (shown near) one line of its text */
|
|
97
|
+
mark: string;
|
|
98
|
+
who: string;
|
|
99
|
+
age: string;
|
|
100
|
+
line?: string;
|
|
101
|
+
/** how many it stands for: more than one, a stack behind it (up to three) and the count on it */
|
|
102
|
+
count: number;
|
|
103
|
+
title: string;
|
|
104
|
+
}
|
|
105
|
+
export interface OverlayCtx {
|
|
106
|
+
/** pixels per unit of the drawing (badges keep their size on screen) */
|
|
107
|
+
k(): number;
|
|
108
|
+
/** an object's box on screen (the view measures its elements; a still render, its layout) */
|
|
109
|
+
boxOf(at: string): Box | undefined;
|
|
110
|
+
outlinesFor(at: string): Outline[];
|
|
111
|
+
/** an icon's reference (the view's sprite, or the still render's own symbols) */
|
|
112
|
+
iconHref(name: string): string;
|
|
113
|
+
/** a card drawn, with its geometry in grid cells (a view turns it in 3D) */
|
|
114
|
+
onCard?(card: Element, geo: CardGeo): void;
|
|
115
|
+
}
|
|
116
|
+
/** the card's size in grid cells (large: the first thing the eye finds), its height above what it stands over, the
|
|
117
|
+
* stack's fan (up and right per card) and the gap between its cards (back to front) */
|
|
118
|
+
export declare const CARD: {
|
|
119
|
+
half: number;
|
|
120
|
+
h: number;
|
|
121
|
+
t: number;
|
|
122
|
+
above: number;
|
|
123
|
+
lift: number;
|
|
124
|
+
fan: number;
|
|
125
|
+
gap: number;
|
|
126
|
+
};
|
|
127
|
+
export declare const P3: (x: number, y: number, z: number) => [number, number];
|
|
128
|
+
export declare const pts: (ps: [number, number][]) => string;
|
|
129
|
+
/** The painters. cards: the class prefix the domain's cards are drawn and styled with (PREFIX-card, PREFIX-face…). */
|
|
130
|
+
export declare function overlayPaint(ctx: OverlayCtx, cards: string): {
|
|
131
|
+
paintMarks: (d: Document, put: (n: Element) => void, marks: Mark[]) => void;
|
|
132
|
+
paintGhosts: (d: Document, put: (n: Element) => void, ghosts: Ghost[]) => void;
|
|
133
|
+
paintCards: (d: Document, put: (n: Element) => void, list: Card[]) => void;
|
|
134
|
+
};
|
|
135
|
+
export type OverlayPaint = ReturnType<typeof overlayPaint>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Compiled } from '../iso-objects/compile.js';
|
|
2
|
+
import type { CompiledScene } from '../iso-objects/compile.js';
|
|
3
|
+
/** A small Markdown subset for captions: `code`, **bold**, *em*, [text](url), paragraphs. */
|
|
4
|
+
export declare function md(s: string | undefined): string;
|
|
5
|
+
export interface PageOpts {
|
|
6
|
+
runtime?: string;
|
|
7
|
+
extraHead?: string;
|
|
8
|
+
extraBody?: string;
|
|
9
|
+
}
|
|
10
|
+
/** The data the player runs on, for every scene with steps. */
|
|
11
|
+
export declare function stepData(c: Compiled): string;
|
|
12
|
+
export declare function legend(c: Compiled, s: CompiledScene): string;
|
|
13
|
+
export declare function renderPage(c: Compiled, opts?: PageOpts): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SvgNode } from '../iso-core/svg-dom.js';
|
|
2
|
+
import type { VNode } from '../iso-core/vdom.js';
|
|
3
|
+
import type { Box } from './overlay.js';
|
|
4
|
+
export type { Box };
|
|
5
|
+
export declare const n: (v: number) => string;
|
|
6
|
+
export declare const node: (name: string, attrs?: Record<string, string | number>, ...children: (VNode | string)[]) => VNode;
|
|
7
|
+
/** "var(--x)" → "var(--iso-x)" (the drawing's tokens, as the stylesheet names them); "#id" → the prefixed id */
|
|
8
|
+
export declare function rewrite(t: SvgNode | VNode | string, pfx: string): VNode | string;
|
|
9
|
+
/** keep a node? (for thumbs: no text, no titles, no small things, no badges) */
|
|
10
|
+
export declare function prune(t: VNode | string, drop: (n: VNode) => boolean): VNode | string | undefined;
|
|
11
|
+
export declare const cls: (t: VNode) => string[];
|
|
12
|
+
export declare const attr: (t: VNode, k: string) => string | undefined;
|
|
13
|
+
/** every point a tree draws (polygon points, rects, circles), for the overlay's extent */
|
|
14
|
+
export declare function extent(ts: (VNode | string)[]): Box | undefined;
|
|
15
|
+
export declare const unite: (a: Box, b?: Box) => Box;
|
|
16
|
+
/** The scale that fits the drawing and its overlay. The overlay's badges keep their size in px, so it is drawn at a
|
|
17
|
+
* scale, measured, and drawn again at the scale that holds both (twice: the scale it ends at is the one it is drawn at). */
|
|
18
|
+
export declare function fitWithOverlay(drawn: Box, size: {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
pad: number;
|
|
22
|
+
}, paint: (k: number) => (VNode | string)[]): {
|
|
23
|
+
k: number;
|
|
24
|
+
box: Box;
|
|
25
|
+
live: (string | VNode)[];
|
|
26
|
+
};
|