@draftably/editor 0.0.0-stage → 0.2.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.
Files changed (101) hide show
  1. package/README.md +25 -2
  2. package/dist/LICENSE +21 -0
  3. package/dist/assets/engine.worker-DwN9io_m.js +6856 -0
  4. package/dist/element.js +36 -0
  5. package/dist/index.js +19555 -0
  6. package/dist/types/src/cli/links.d.ts +4 -0
  7. package/dist/types/src/cli/pdf.d.ts +29 -0
  8. package/dist/types/src/cli/png.d.ts +23 -0
  9. package/dist/types/src/cli/svg.d.ts +4 -0
  10. package/dist/types/src/components/Icon.d.ts +14 -0
  11. package/dist/types/src/components/LayoutPreviewBar.d.ts +2 -0
  12. package/dist/types/src/components/canvas/Canvas.d.ts +15 -0
  13. package/dist/types/src/components/canvas/Frame.d.ts +22 -0
  14. package/dist/types/src/components/canvas/InlineEditor.d.ts +2 -0
  15. package/dist/types/src/components/canvas/Notes.d.ts +5 -0
  16. package/dist/types/src/components/canvas/Overlay.d.ts +2 -0
  17. package/dist/types/src/components/canvas/StateBar.d.ts +5 -0
  18. package/dist/types/src/components/canvas/TextHits.d.ts +6 -0
  19. package/dist/types/src/components/canvas/ZoomControls.d.ts +1 -0
  20. package/dist/types/src/components/canvas/text-boxes.d.ts +24 -0
  21. package/dist/types/src/components/controls.d.ts +91 -0
  22. package/dist/types/src/components/scene/EdgeView.d.ts +22 -0
  23. package/dist/types/src/components/scene/GroupView.d.ts +22 -0
  24. package/dist/types/src/components/scene/Lifelines.d.ts +15 -0
  25. package/dist/types/src/components/scene/LinkMark.d.ts +11 -0
  26. package/dist/types/src/components/scene/NodeView.d.ts +18 -0
  27. package/dist/types/src/components/scene/parts.d.ts +50 -0
  28. package/dist/types/src/components/sculpt/BrushDock.d.ts +2 -0
  29. package/dist/types/src/components/sculpt/TimelineDeck.d.ts +2 -0
  30. package/dist/types/src/components/session-context.d.ts +486 -0
  31. package/dist/types/src/dsl/cells.d.ts +91 -0
  32. package/dist/types/src/dsl/channels.d.ts +53 -0
  33. package/dist/types/src/dsl/compile.d.ts +162 -0
  34. package/dist/types/src/dsl/frame.d.ts +38 -0
  35. package/dist/types/src/dsl/lanes.d.ts +23 -0
  36. package/dist/types/src/dsl/layout-edits.d.ts +58 -0
  37. package/dist/types/src/dsl/legend-notes.d.ts +3 -0
  38. package/dist/types/src/dsl/project.d.ts +39 -0
  39. package/dist/types/src/dsl/source-edits.d.ts +37 -0
  40. package/dist/types/src/dsl/syntax.d.ts +317 -0
  41. package/dist/types/src/dsl/translate.d.ts +69 -0
  42. package/dist/types/src/editor/Editor.d.ts +6 -0
  43. package/dist/types/src/editor/element.d.ts +15 -0
  44. package/dist/types/src/editor/mount.d.ts +23 -0
  45. package/dist/types/src/lib/engine-tasks.d.ts +88 -0
  46. package/dist/types/src/lib/font-data.d.ts +9 -0
  47. package/dist/types/src/lib/saved-diagram.d.ts +4 -0
  48. package/dist/types/src/lib/scene-cache.d.ts +4 -0
  49. package/dist/types/src/lib/svg-export.d.ts +15 -0
  50. package/dist/types/src/model/appearance.d.ts +209 -0
  51. package/dist/types/src/model/bounds.d.ts +19 -0
  52. package/dist/types/src/model/camera.d.ts +21 -0
  53. package/dist/types/src/model/colors.d.ts +22 -0
  54. package/dist/types/src/model/document.d.ts +24 -0
  55. package/dist/types/src/model/edits.d.ts +133 -0
  56. package/dist/types/src/model/embed.d.ts +17 -0
  57. package/dist/types/src/model/font-faces.d.ts +24 -0
  58. package/dist/types/src/model/fonts.d.ts +47 -0
  59. package/dist/types/src/model/footnote.d.ts +34 -0
  60. package/dist/types/src/model/frame.d.ts +71 -0
  61. package/dist/types/src/model/geometry.d.ts +29 -0
  62. package/dist/types/src/model/graph.d.ts +53 -0
  63. package/dist/types/src/model/heading.d.ts +38 -0
  64. package/dist/types/src/model/icons.d.ts +2 -0
  65. package/dist/types/src/model/labels.d.ts +88 -0
  66. package/dist/types/src/model/legend.d.ts +25 -0
  67. package/dist/types/src/model/link.d.ts +63 -0
  68. package/dist/types/src/model/markers.d.ts +47 -0
  69. package/dist/types/src/model/note.d.ts +75 -0
  70. package/dist/types/src/model/panels.d.ts +11 -0
  71. package/dist/types/src/model/rich-text.d.ts +24 -0
  72. package/dist/types/src/model/routes.d.ts +170 -0
  73. package/dist/types/src/model/samples.d.ts +11 -0
  74. package/dist/types/src/model/stack.d.ts +8 -0
  75. package/dist/types/src/model/status.d.ts +84 -0
  76. package/dist/types/src/model/styles.d.ts +13 -0
  77. package/dist/types/src/model/surface.d.ts +31 -0
  78. package/dist/types/src/model/types.d.ts +277 -0
  79. package/dist/types/src/runtime/svg-renderer.d.ts +38 -0
  80. package/dist/types/src/server/file-session.d.ts +19 -0
  81. package/dist/types/src/server/workspace.d.ts +21 -0
  82. package/dist/types/src/state/active-session.d.ts +479 -0
  83. package/dist/types/src/state/canvas-commands.d.ts +169 -0
  84. package/dist/types/src/state/canvas-keyboard.d.ts +15 -0
  85. package/dist/types/src/state/keys.d.ts +5 -0
  86. package/dist/types/src/state/links.d.ts +14 -0
  87. package/dist/types/src/state/session/actions.d.ts +77 -0
  88. package/dist/types/src/state/session/canvas-text.d.ts +24 -0
  89. package/dist/types/src/state/session/document.d.ts +84 -0
  90. package/dist/types/src/state/session/editor.d.ts +81 -0
  91. package/dist/types/src/state/session/emphasis.d.ts +11 -0
  92. package/dist/types/src/state/session/file-session.d.ts +98 -0
  93. package/dist/types/src/state/session/index.d.ts +496 -0
  94. package/dist/types/src/state/session/layout.d.ts +79 -0
  95. package/dist/types/src/state/session/pointer.d.ts +19 -0
  96. package/dist/types/src/state/session/routing.d.ts +20 -0
  97. package/dist/types/src/state/session/scene.d.ts +144 -0
  98. package/dist/types/src/state/session/sculpt.d.ts +70 -0
  99. package/dist/types/src/state/toast.d.ts +14 -0
  100. package/dist/types/src/state/workspace.d.ts +3 -0
  101. package/package.json +41 -3
@@ -0,0 +1,4 @@
1
+ import type { Diagnostic, Scene } from '../dsl/compile';
2
+ /** File links in an SVG of `file`, as paths from its folder: right when the SVG is saved beside it. */
3
+ export declare const svgHref: (scene: Scene, file: string) => (href: string) => string;
4
+ export declare function linkNotes(scene: Scene, file: string): Diagnostic[];
@@ -0,0 +1,29 @@
1
+ export type PdfOrder = 'name' | 'title' | 'given';
2
+ export type PdfPage = 'fit' | 'letter' | 'a4' | 'slide';
3
+ export declare const PDF_ORDERS: PdfOrder[];
4
+ export declare const PDF_PAGES: PdfPage[];
5
+ export interface PdfOptions {
6
+ order?: PdfOrder;
7
+ page?: PdfPage;
8
+ /** A cover page with this title and a contents list. */
9
+ title?: string;
10
+ /** One page per emphasis state. */
11
+ states?: boolean;
12
+ /** Attach each file's source; on unless set false. */
13
+ source?: boolean;
14
+ }
15
+ /** A diagram to print: the name it is listed and attached under, and its source. */
16
+ export interface PdfInput {
17
+ name: string;
18
+ source: string;
19
+ }
20
+ export declare const isPdfName: (name: string) => boolean;
21
+ /** `.draft` files from files and folders, as given; a folder's files by name. */
22
+ export declare function pdfInputs(args: string[]): PdfInput[];
23
+ /** The PDF of `inputs`: cover, pages, bookmarks and attached sources. */
24
+ export declare function buildPdf(inputs: PdfInput[], opts?: PdfOptions): Promise<{
25
+ bytes: Uint8Array<ArrayBufferLike>;
26
+ pages: number;
27
+ }>;
28
+ /** The `.draft` sources attached to a PDF, in order; empty when it has none. */
29
+ export declare function readPdfSources(bytes: Uint8Array): Promise<PdfInput[]>;
@@ -0,0 +1,23 @@
1
+ export declare function findChrome(): string;
2
+ /** The width and height an SVG declares on its root, rounded up. */
3
+ export declare function svgSize(svg: string): {
4
+ w: number;
5
+ h: number;
6
+ };
7
+ /**
8
+ * Write `svg` as a PNG at `scale` times its own size, with `source` embedded when given. Returns
9
+ * the image's size in pixels.
10
+ */
11
+ export declare function writePng(svg: string, out: string, scale?: number, source?: string): Promise<{
12
+ w: number;
13
+ h: number;
14
+ }>;
15
+ /**
16
+ * Put the drawing on the macOS clipboard as a PNG at `scale` (with `source` in it when given) and
17
+ * `svgText` as text, so it pastes as an image in a doc or chat and as markup in an editor. Returns
18
+ * the PNG's size in pixels.
19
+ */
20
+ export declare function copyToClipboard(svg: string, svgText: string, scale?: number, source?: string): Promise<{
21
+ w: number;
22
+ h: number;
23
+ }>;
@@ -0,0 +1,4 @@
1
+ import type { Diagram } from '../model/types';
2
+ import { type SvgOptions } from '../runtime/svg-renderer';
3
+ export { accentPath, PHASE_TAB, sequenceBackdrop, type SvgOptions } from '../runtime/svg-renderer';
4
+ export declare function renderSvg(doc: Diagram, options?: SvgOptions): string;
@@ -0,0 +1,14 @@
1
+ /** A 24×24 stroke icon for the interface. */
2
+ export declare function Icon(props: {
3
+ name: string;
4
+ class?: string;
5
+ size?: number;
6
+ }): import("solid-js").JSX.Element;
7
+ /** The same icon drawn inside an SVG scene at a given position. */
8
+ export declare function SceneGlyph(props: {
9
+ name: string;
10
+ x: number;
11
+ y: number;
12
+ size: number;
13
+ color: string;
14
+ }): import("solid-js").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /** Shown while a layout preview waits to be kept or discarded. */
2
+ export declare function LayoutPreviewBar(): import("solid-js").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { type JSX } from 'solid-js';
2
+ import './canvas.css';
3
+ export interface CanvasProps {
4
+ /** Open the host's context menu; the canvas has already selected what was clicked. */
5
+ onContextMenu?: (e: MouseEvent) => void;
6
+ /** Files dropped on the canvas. Without it the canvas takes no drops. */
7
+ onDropFiles?: (files: File[]) => Promise<void> | void;
8
+ /** Shown under the hint on an empty canvas, such as a button that builds from a list. */
9
+ emptyAction?: JSX.Element;
10
+ }
11
+ /**
12
+ * The canvas for the session in context: drawing, selection, dragging, inline editing, layout
13
+ * previews, the timeline and the brush. Pointing at it or focusing it makes its session active.
14
+ */
15
+ export declare function Canvas(props: CanvasProps): JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { type DiagramFrame } from '../../model/frame';
2
+ import type { Diagram } from '../../model/types';
3
+ type Key = 'title' | 'subtitle';
4
+ /**
5
+ * Where the title or subtitle line sits, or would sit once added: a missing title goes in the
6
+ * frame's top margin, or above the subtitle; a missing subtitle goes under the title. A subtitle
7
+ * is offered only once there is a title.
8
+ */
9
+ export declare function headingSlot(doc: Diagram, frame: DiagramFrame, key: Key): {
10
+ x: number;
11
+ y: number;
12
+ w: number;
13
+ h: number;
14
+ type: import("../../model/fonts").TypeProfile;
15
+ } | undefined;
16
+ /**
17
+ * The frame an export draws round the diagram, drawn on the canvas: the heading above the drawing
18
+ * and the key under it, from the same geometry as `inspect --svg` and the editor's exports.
19
+ * Double-click the title or subtitle to edit it; drag the right edge to widen the frame.
20
+ */
21
+ export declare function Frame(): import("solid-js").JSX.Element;
22
+ export {};
@@ -0,0 +1,2 @@
1
+ /** A text box over the canvas for editing a shape, container or connection label in place. */
2
+ export declare function InlineEditor(): import("solid-js").JSX.Element;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The file's notes, placed by the frame as `inspect --svg` places them. Not part of the frame
3
+ * group, so the editor's exports copy them with the drawing.
4
+ */
5
+ export declare function Notes(): import("solid-js").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /** Temporary drawing on top of the diagram: gestures, connection previews and brush feedback. */
2
+ export declare function Overlay(): import("solid-js").JSX.Element;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The file's emphasis states as chips over the canvas: none, each state, and a grid of all of
3
+ * them. Hidden when the file has no `state` lines.
4
+ */
5
+ export declare function StateBar(): import("solid-js").JSX.Element;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Click targets over the frame's text: notes, legend rows and phase labels select on a click and
3
+ * edit on a double-click; a note drags to sit beside another object. Change counts in the key
4
+ * are counted from the drawing, so a click there shows a hint instead. Not part of exports.
5
+ */
6
+ export declare function TextHits(): import("solid-js").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ZoomControls(): import("solid-js").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { type ResolvedAppearance } from '../../model/appearance';
2
+ import type { DiagramFrame } from '../../model/frame';
3
+ import type { Diagram, Rect } from '../../model/types';
4
+ type Type = ResolvedAppearance['annotation'];
5
+ /** A piece of canvas text: its id, where it is drawn, and the type and paint to edit it in. */
6
+ export interface TextBox {
7
+ id: string;
8
+ rect: Rect;
9
+ type: Type;
10
+ fill: string;
11
+ ink: string;
12
+ /** Links in the text, each with the box a click opens it from. */
13
+ links?: Array<Rect & {
14
+ href: string;
15
+ }>;
16
+ }
17
+ /**
18
+ * Every note, legend row and phase label the frame draws, with the box a click or an edit covers.
19
+ * Status rows in the key are counted from the drawing, so they are not here.
20
+ */
21
+ export declare function textBoxes(doc: Diagram, frame: DiagramFrame): TextBox[];
22
+ /** The box of one text id, including the title and subtitle; undefined when it is not drawn. */
23
+ export declare function textBox(doc: Diagram, frame: DiagramFrame, id: string): TextBox | undefined;
24
+ export {};
@@ -0,0 +1,91 @@
1
+ /** Small form and button primitives shared by panels, menus and dialogs. */
2
+ import { type JSX } from 'solid-js';
3
+ import type { Command } from '../state/canvas-commands';
4
+ /** Attributes that give an element the shared tooltip. See `Tips`. */
5
+ export declare const tip: (label: string, keys?: string, hint?: string) => {
6
+ 'data-tip': string;
7
+ 'data-tip-keys': string | undefined;
8
+ 'data-tip-hint': string | undefined;
9
+ };
10
+ /** Attributes for text that may be cut off: the tooltip shows all of it, only when it is cut. */
11
+ export declare const cutTip: {
12
+ 'data-tip': string;
13
+ 'data-tip-cut': string;
14
+ };
15
+ export declare function IconButton(props: {
16
+ icon: string;
17
+ label: string;
18
+ keys?: string;
19
+ hint?: string;
20
+ pressed?: boolean;
21
+ variant?: 'ghost' | 'primary';
22
+ } & Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, 'children'>): JSX.Element;
23
+ /**
24
+ * An icon button for one table of commands: it runs a command and explains itself from the
25
+ * command's own words.
26
+ */
27
+ export declare const commandButton: <Id extends string>(table: Record<Id, Command>, run: (id: Id) => void, enabled: (id: Id) => boolean) => (props: {
28
+ command: Id;
29
+ label?: string;
30
+ pressed?: boolean;
31
+ }) => JSX.Element;
32
+ /** Text with each word of a query marked where it matches. */
33
+ export declare function Highlight(props: {
34
+ text: string;
35
+ query: string;
36
+ }): JSX.Element;
37
+ export declare function Field(props: {
38
+ label: string;
39
+ hint?: JSX.Element;
40
+ children: JSX.Element;
41
+ class?: string;
42
+ }): JSX.Element;
43
+ export type Option<T extends string | number> = readonly [T, string] | T;
44
+ export declare function Select<T extends string | number>(props: {
45
+ value: T;
46
+ options: readonly Option<T>[];
47
+ onChange: (value: T) => void;
48
+ disabled?: boolean;
49
+ 'aria-label'?: string;
50
+ id?: string;
51
+ }): JSX.Element;
52
+ export declare function SelectField<T extends string | number>(props: {
53
+ label: string;
54
+ value: T;
55
+ options: readonly Option<T>[];
56
+ onChange: (value: T) => void;
57
+ disabled?: boolean;
58
+ hint?: JSX.Element;
59
+ }): JSX.Element;
60
+ export declare function Checkbox(props: {
61
+ label: JSX.Element;
62
+ checked: boolean;
63
+ onChange: (checked: boolean) => void;
64
+ disabled?: boolean;
65
+ }): JSX.Element;
66
+ /** A range slider that shows its value and reports the final value on release. */
67
+ export declare function RangeField(props: {
68
+ label: string;
69
+ value: number;
70
+ min: number;
71
+ max: number;
72
+ step?: number;
73
+ unit?: string;
74
+ hint?: string;
75
+ disabled?: boolean;
76
+ /** Called while dragging; defaults to nothing so only `onChange` commits. */
77
+ onInput?: (value: number) => void;
78
+ onChange: (value: number) => void;
79
+ }): JSX.Element;
80
+ /** A number input that commits on change and rejects non-finite values. */
81
+ export declare function NumberField(props: {
82
+ label: string;
83
+ value: number;
84
+ min?: number;
85
+ max?: number;
86
+ disabled?: boolean;
87
+ onChange: (value: number) => void;
88
+ }): JSX.Element;
89
+ export declare function Kbd(props: {
90
+ children: JSX.Element;
91
+ }): JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { type DrawnRoute } from '../../model/routes';
2
+ import type { Diagram } from '../../model/types';
3
+ export interface EdgeViewProps {
4
+ doc: Diagram;
5
+ route: DrawnRoute;
6
+ selected?: boolean;
7
+ interactive?: boolean;
8
+ /** Its label is being edited in place, so the drawn label hides. */
9
+ editing?: boolean;
10
+ /** Keeps marker ids unique when several scenes share a page. */
11
+ idPrefix?: string;
12
+ }
13
+ export declare function EdgeView(props: EdgeViewProps): import("solid-js").JSX.Element;
14
+ /**
15
+ * The stretch of a line that crosses cells to reach a cell with no free side, drawn over the
16
+ * cells, with a dot where it meets that cell.
17
+ */
18
+ export declare function CrossingView(props: {
19
+ doc: Diagram;
20
+ route: DrawnRoute;
21
+ selected?: boolean;
22
+ }): import("solid-js").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { type ResolvedAppearance } from '../../model/appearance';
2
+ import type { Diagram, NodeLayout } from '../../model/types';
3
+ /** The rest of a field that runs on into another row: its title after an ellipsis. */
4
+ export declare const pieceLabel: (title: string, w: number, look: ResolvedAppearance) => string;
5
+ /** A container's border is quieter than a connection: thinner and partly transparent. */
6
+ export declare const GROUP_BORDER: {
7
+ width: number;
8
+ opacity: number;
9
+ };
10
+ export interface GroupViewProps {
11
+ doc: Diagram;
12
+ id: string;
13
+ rect: NodeLayout;
14
+ selected?: boolean;
15
+ dropTarget?: boolean;
16
+ interactive?: boolean;
17
+ zoom?: number;
18
+ focused?: boolean;
19
+ /** Its title is being edited in place, so the drawn title hides. */
20
+ editing?: boolean;
21
+ }
22
+ export declare function GroupView(props: GroupViewProps): import("solid-js").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { Diagram, NodeLayout } from '../../model/types';
2
+ /** Sequence participants' dashed lifelines, drawn under the message lines. */
3
+ export declare function Lifelines(props: {
4
+ doc: Diagram;
5
+ ids: string[];
6
+ rect: (id: string) => NodeLayout | undefined;
7
+ }): import("solid-js").JSX.Element;
8
+ /**
9
+ * A sequence diagram's panel (`part="panel"`, under the groups) or its phase bands
10
+ * (`part="phases"`, over the groups' column bands), as the SVG export draws them.
11
+ */
12
+ export declare function SequenceBackdrop(props: {
13
+ doc: Diagram;
14
+ part: 'panel' | 'phases';
15
+ }): import("solid-js").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { type LinkMark } from '../../model/link';
2
+ /**
3
+ * The arrow that says an object is a link. On the editor canvas it is also the button that opens
4
+ * the link, so a click elsewhere on the object still only selects it.
5
+ */
6
+ export declare function LinkMarkView(props: {
7
+ mark: LinkMark;
8
+ href: string;
9
+ color: string;
10
+ interactive?: boolean;
11
+ }): import("solid-js").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { Diagram, NodeLayout } from '../../model/types';
2
+ export interface NodeViewProps {
3
+ doc: Diagram;
4
+ id: string;
5
+ rect: NodeLayout;
6
+ selected?: boolean;
7
+ /** Editor canvas: ports, resize handles and position badges. */
8
+ interactive?: boolean;
9
+ zoom?: number;
10
+ /** Highlight used by comparisons for the visual anchor. */
11
+ focused?: boolean;
12
+ /** Its title is being edited in place, so the drawn title hides. */
13
+ editing?: boolean;
14
+ /** Comparison candidates: focusable so a keyboard user can choose the anchor. */
15
+ focusable?: boolean;
16
+ idPrefix?: string;
17
+ }
18
+ export declare function NodeView(props: NodeViewProps): import("solid-js").JSX.Element;
@@ -0,0 +1,50 @@
1
+ import type { TypeProfile } from '../../model/fonts';
2
+ import type { Rect } from '../../model/types';
3
+ /** Multi-line, vertically centered text in one of the diagram's type profiles. */
4
+ export declare function SceneText(props: {
5
+ lines: string[];
6
+ x: number;
7
+ y: number;
8
+ lineHeight: number;
9
+ type: TypeProfile;
10
+ fill: string;
11
+ class?: string;
12
+ /** Strike the text through, as for a removed object. */
13
+ strike?: boolean;
14
+ /** Fade of the text alone, as for a removed object. */
15
+ fade?: number;
16
+ }): import("solid-js").JSX.Element;
17
+ /** The removed marker, a minus in a disc, centred at (x, y). */
18
+ export declare const RemovedMarker: (props: {
19
+ x: number;
20
+ y: number;
21
+ ink: string;
22
+ canvas: string;
23
+ }) => import("solid-js").JSX.Element;
24
+ /** Size of the pin glyph on a placed object, in diagram px. */
25
+ export declare const PIN_SIZE = 12;
26
+ /** Top left of the pin inside a `w`×`h` shape: its top-left corner, inset to clear a curve or point. */
27
+ export declare function pinSpot(shape: string, w: number, h: number): {
28
+ x: number;
29
+ y: number;
30
+ };
31
+ /**
32
+ * A small pin with its top left at `x`, `y`, inside the object: filled when pinned, outlined when
33
+ * a softer line placed it. Hovering names the line. Editor chrome, not diagram content, so it
34
+ * never reads as a label the way a text tag did.
35
+ */
36
+ export declare function PositionBadge(props: {
37
+ id: string;
38
+ pinned: boolean;
39
+ manual: boolean;
40
+ x: number;
41
+ y: number;
42
+ /** The object's ink, so the pin reads on its fill. */
43
+ color: string;
44
+ }): import("solid-js").JSX.Element;
45
+ /** Square handles that keep a constant screen size. Shapes use corners only. */
46
+ export declare function ResizeHandles(props: {
47
+ rect: Rect;
48
+ zoom: number;
49
+ corners?: boolean;
50
+ }): import("solid-js").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /** Settings for the local layout brush. */
2
+ export declare function BrushDock(): import("solid-js").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /** Scrub recorded layout steps, bookmark one as a restore source, and keep a step. */
2
+ export declare function TimelineDeck(): import("solid-js").JSX.Element;