@johnoscott/isometric-engine 0.9.0 → 0.12.3

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 (43) hide show
  1. package/EDITOR-GUIDE.md +54 -6
  2. package/README.md +1 -1
  3. package/assets/app.css +38 -3
  4. package/assets/icons.svg +1 -1
  5. package/assets/marks.css +5 -1
  6. package/iso-editor.js +173 -173
  7. package/iso-render.js +97 -97
  8. package/iso-systems.js +104 -104
  9. package/js/iso-editor/doc.js +4 -0
  10. package/js/iso-editor/splice.js +3 -1
  11. package/js/iso-editor/ui/canvas.js +393 -18
  12. package/js/iso-editor/ui/plain-icons.js +2 -0
  13. package/js/iso-editor/ui/setup.js +7 -2
  14. package/js/iso-objects/board.js +6 -1
  15. package/js/iso-objects/scene.js +3 -2
  16. package/js/iso-viewer/index.js +4 -1
  17. package/package.json +101 -92
  18. package/src/iso-core/compile-schema.ts +3 -1
  19. package/src/iso-editor/adapter.ts +19 -0
  20. package/src/iso-editor/doc.ts +6 -0
  21. package/src/iso-editor/index.ts +2 -2
  22. package/src/iso-editor/splice.ts +8 -3
  23. package/src/iso-editor/ui/app.css +33 -2
  24. package/src/iso-editor/ui/canvas.ts +299 -23
  25. package/src/iso-editor/ui/marks.css +5 -1
  26. package/src/iso-editor/ui/plain-icons.ts +2 -0
  27. package/src/iso-editor/ui/setup.ts +16 -3
  28. package/src/iso-objects/board.ts +6 -2
  29. package/src/iso-objects/route.ts +1 -1
  30. package/src/iso-objects/scene.ts +4 -2
  31. package/src/iso-viewer/index.ts +2 -2
  32. package/src/iso-viewer/morph.ts +5 -2
  33. package/types/iso-core/compile-schema.d.ts +2 -2
  34. package/types/iso-editor/adapter.d.ts +33 -0
  35. package/types/iso-editor/index.d.ts +2 -2
  36. package/types/iso-editor/ui/canvas.d.ts +44 -8
  37. package/types/iso-editor/ui/monaco-entry.d.ts +2 -0
  38. package/types/iso-editor/ui/setup.d.ts +13 -0
  39. package/types/iso-objects/route.d.ts +1 -1
  40. package/types/iso-systems/validate.d.ts +4 -0
  41. package/types/iso-viewer/bundle.d.ts +1 -0
  42. package/types/iso-viewer/index.d.ts +2 -2
  43. package/types/iso-viewer/morph.d.ts +6 -3
package/EDITOR-GUIDE.md CHANGED
@@ -33,6 +33,9 @@ All of this comes from `@johnoscott/isometric-engine/editor`, namespace `editor`
33
33
  - **The canvas**: your drawing in 3D, with selection, a marquee, pan and zoom, and pins (a dragged object is pinned in
34
34
  the file). It also has a **2D view** that you opt into: the same drawing laid out flat, with a 3D | 2D switch.
35
35
  - **The outline (tree)**, **properties** (from your JSON Schema), **problems**, **palette**, **menus** and **keys**.
36
+ - **Optional, when you say how** (0.10.0): palette **presets** (a box, a tray, a database… each starting as itself),
37
+ **connecting** two objects by dragging from one to the other, and **grouping** the selection into a new container.
38
+ Each writes the file as your adapter says, as one undo step.
36
39
  - **`editor.mountEditor(element, options, setup)`**, which puts it all on a page, where `setup = editor.setupFor(adapter,
37
40
  view)`.
38
41
 
@@ -196,14 +199,53 @@ export const boxesView = (theme: string): editor.DomainView<Boxes, editor.Canvas
196
199
  });
197
200
  ```
198
201
 
199
- ## 3. A page
200
-
201
- The package is private, on GitHub Packages. In your project's `.npmrc`, with a token that may read packages in your
202
- user `~/.npmrc` (never in a repo):
202
+ ### Presets, connecting and grouping (0.10.0)
203
+
204
+ Three optional pieces. Give one and the editor offers it; leave it out and nothing changes.
205
+
206
+ - **Palette presets**, on the view: `palette: [{ kind, label, icon?, value?, name? }]`. Each entry adds an object of
207
+ `kind` starting as a copy of `value` (default: the kind's `template()`), named from `name` (default: the kind's
208
+ singular). Without it, the palette has one entry per kind. **Sections** (0.11.0): give entries a `section` and the
209
+ palette lists them under a header per section, in the order the sections first appear; each header opens and closes
210
+ its entries (a button, `aria-expanded`). At the start every section is closed but the one last added from (kept in
211
+ the host's `storage` as `canvas-palette`; the first section before any). Entries without one are listed as before. **Docked**
212
+ (0.12.0): `paletteLayout: 'docked'` on the view puts the palette in a pane of its own at the canvas's left, instead of
213
+ floating over it: a search box at its top filters the entries by label and section (Enter adds the first match, ↓
214
+ goes into the list, Esc clears it), the sections are its collapsible groups, a grip resizes it and a control
215
+ collapses it to a strip (both kept in the host's `storage` as `canvas-palette-dock`). Drag and Enter add as before.
216
+ `'floating'` is the default.
217
+ - **Connect**, on the adapter: `connect(from, to, data)` returns where a connection goes and what it is, `{ at, value }`
218
+ to add to a list (or with `name`, to a map under a fresh name), or `undefined` when those two don't connect. The
219
+ canvas then shows a handle on the one selected object: drag it to another (Esc cancels), or use **Connect to…** in
220
+ its menu and click the other.
221
+ - **Drop into** (0.10.1), on the adapter: `dropInto(target, value, kind, data)` returns the new thing's value inside
222
+ `target` (and words for it), or `undefined` when `target` doesn't hold it. A palette drop asks what is under it,
223
+ innermost first, and the first that holds it takes it; with none, the drop is pinned where it lands.
224
+ - **Group**, on the adapter: `group(members, data)` returns the new container (`at`, the base of its `name`, its
225
+ `value`) and `members(name)`, what changes in each member once it has a name. **Group** in the menu, or ⌘G, writes
226
+ it all as one step; members' pins are dropped, so the layout places them in their new container.
203
227
 
228
+ ```ts
229
+ // boxes/1's: a link between two boxes (not twice), and the selection into a new zone in what they were all in
230
+ type Data = { boxes: Record<string, { in?: string }>; links?: { from: string; to: string }[] };
231
+ connect: (from, to, data) =>
232
+ (data as Data).links?.some(l => l.from === from.name && l.to === to.name) ? undefined
233
+ : { at: ['links'], value: { from: from.name, to: to.name } },
234
+ group: (members, data) => {
235
+ const ins = new Set(members.map(m => (data as Data).boxes[m.name]?.in));
236
+ return {
237
+ at: ['boxes'], name: 'group', value: { kind: 'zone', label: 'Group', ...(ins.size === 1 && [...ins][0] ? { in: [...ins][0] } : {}) },
238
+ members: name => members.map(m => ({ path: ['boxes', m.name, 'in'], value: name })),
239
+ };
240
+ },
241
+ // and on the view
242
+ palette: [
243
+ { kind: 'boxes', label: 'Box', name: 'box', value: { size: [2, 2, 1] } },
244
+ { kind: 'boxes', label: 'Tray', icon: 'layers', name: 'tray', value: { kind: 'tray', label: 'Tray' } },
245
+ ],
204
246
  ```
205
- @johnoscott:registry=https://npm.pkg.github.com
206
- ```
247
+
248
+ ## 3. A page
207
249
 
208
250
  ```
209
251
  npm i @johnoscott/isometric-engine
@@ -271,6 +313,12 @@ Its `index.html` gives the editor a sized element: `<div id="app" style="height:
271
313
  | a text pane beside the tree and canvas | your own pane on the `TextPane` interface (`editor.PaneOpts`), given as `setupFor`'s third argument, and Monaco in your bundle. The package ships none (Monaco is large); without one, the tree, canvas and properties make a complete editor |
272
314
  | the 2D view | `view.flat` with `load: async () => editor.flatCanvas`, and `viewer.flatCss(styles)` in your canvas CSS |
273
315
  | isodiag/1 YAML drawings | `/systems`: `systems.compile(yaml, theme)` (see the README) |
316
+ | palette presets (0.10.0) | `view.palette` |
317
+ | connecting by drag, Connect to… (0.10.0) | `adapter.connect` |
318
+ | Group, ⌘G (0.10.0) | `adapter.group` |
319
+ | a palette drop that lands inside a container (0.10.1) | `adapter.dropInto` |
320
+ | palette sections under collapsible headers (0.11.0) | `view.palette[].section` |
321
+ | the palette docked at the canvas's left, searchable (0.12.0) | `view.paletteLayout: 'docked'` |
274
322
 
275
323
  ## 5. Testing your adapter
276
324
 
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @johnoscott/isometric-engine 0.9.0
1
+ # @johnoscott/isometric-engine 0.12.3
2
2
 
3
3
  A generic isometric diagram engine: `@johnoscott/isometric-engine/render` (L0 core, L1 objects, L2 viewer)
4
4
  and `@johnoscott/isometric-engine/editor` (the same, and L3 editor). Each exports one namespace per layer:
package/assets/app.css CHANGED
@@ -54,6 +54,8 @@ body[data-view="text"] #se-canvas, body[data-view="text"] #se-work-grip { displa
54
54
  /* the stage (canvas.css styles the drawing in it); focused by a click, a quieter ring than the keyboard's */
55
55
  .canvas.has-focus .canvas-stage:not(:focus-visible) { outline: 2px solid color-mix(in srgb, var(--focus) 50%, transparent); outline-offset: -2px; }
56
56
  .canvas-tools { position: absolute; right: var(--sp-3); bottom: var(--sp-3); display: flex; gap: var(--sp-0); padding: var(--sp-0); background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1, none); }
57
+ /* a canvas too narrow for it: the toolbar wraps onto rows inside it, right-aligned (one row, as ever, when it fits) */
58
+ .canvas-tools { max-width: calc(100% - 2 * var(--sp-3)); flex-wrap: wrap; justify-content: flex-end; }
57
59
  .canvas-tools .segmented { margin-right: var(--sp-1); }
58
60
  .status .hint-mode { color: var(--ink-3); }
59
61
  body[data-view="text"] .status .hint-mode { display: none; }
@@ -217,12 +219,41 @@ body { position: relative; height: 100%; min-height: 0; font: var(--fw-regular)
217
219
  }
218
220
  /* E11: the palette, on the canvas: click to add, or drag onto the canvas */
219
221
  @layer views {
220
- .palette { position: absolute; left: var(--sp-3); top: var(--sp-3); display: flex; flex-direction: column; gap: 2px; padding: var(--sp-0); background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1, none); z-index: 2; }
221
- .pal-item { display: flex; align-items: center; gap: var(--sp-2); height: var(--ctl-sm); padding: 0 var(--sp-2); border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-2); font: inherit; font-size: var(--fs-sm); cursor: grab; text-align: left; touch-action: none; user-select: none; }
222
+ .palette { position: absolute; left: var(--sp-3); top: var(--sp-3); display: flex; flex-direction: column; gap: 2px; padding: var(--sp-0); max-height: calc(100% - 2 * var(--sp-3) - 56px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1, none); z-index: 2; }
223
+ .pal-item { display: flex; flex-shrink: 0; align-items: center; gap: var(--sp-2); height: var(--ctl-sm); padding: 0 var(--sp-2); border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-2); font: inherit; font-size: var(--fs-sm); cursor: grab; text-align: left; touch-action: none; user-select: none; }
222
224
  .pal-item:hover { background: var(--state-hover); color: var(--ink); }
223
225
  .pal-item:active { cursor: grabbing; }
224
226
  .pal-item .icon { width: 14px; height: 14px; }
227
+ .pal-section { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
228
+ .pal-head { display: flex; flex-shrink: 0; align-items: center; gap: var(--sp-1); height: var(--ctl-sm); padding: 0 var(--sp-2) 0 var(--sp-1); border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-3); font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-strong); letter-spacing: .02em; cursor: pointer; text-align: left; }
229
+ .pal-head:hover { background: var(--state-hover); color: var(--ink); }
230
+ .pal-head .pal-chev { width: 12px; height: 12px; transition: transform var(--dur-1, 0ms); }
231
+ .pal-head[aria-expanded="true"] .pal-chev { transform: rotate(90deg); }
232
+ .pal-body { display: flex; flex-direction: column; gap: 2px; }
233
+ .pal-body[hidden] { display: none; }
225
234
  body.read-only .palette { display: none; }
235
+ /* 0.12.0: the palette docked, a pane of its own at the canvas's left (search, sections, a grip, collapsible) */
236
+ .canvas.pal-docked { display: flex; --pal-cur: var(--pal-w, 220px); }
237
+ .canvas.pal-docked.pal-collapsed { --pal-cur: 36px; }
238
+ .canvas.pal-docked > .canvas-stage { flex: 1 1 auto; min-width: 0; position: relative; }
239
+ .canvas.pal-docked > .canvas-empty { left: var(--pal-cur, 220px); }
240
+ /* the toolbar stays on the stage, beside the pane */
241
+ .canvas.pal-docked > .canvas-tools { max-width: calc(100% - var(--pal-cur, 220px) - 2 * var(--sp-3)); }
242
+ .pal-dock { flex: 0 0 var(--pal-cur, 220px); width: var(--pal-cur, 220px); min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-right: var(--bw) solid var(--line); overflow: hidden; z-index: 2; }
243
+ .pal-dock-head { display: flex; align-items: center; gap: var(--sp-1); padding: var(--sp-1); border-bottom: var(--bw) solid var(--line); }
244
+ .pal-search-wrap { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-1); height: var(--ctl-sm); padding: 0 var(--sp-2); border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink-3); }
245
+ .pal-search-wrap:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
246
+ .pal-search-wrap .icon { width: 14px; height: 14px; flex: none; }
247
+ .pal-search { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: var(--fs-sm); }
248
+ .pal-dock .palette.pal-list { position: static; flex: 1 1 auto; max-height: none; min-height: 0; border: 0; border-radius: 0; box-shadow: none; background: none; padding: var(--sp-1); }
249
+ .pal-dock .pal-item[hidden], .pal-dock .pal-section[hidden] { display: none; }
250
+ .pal-none { margin: 0; padding: var(--sp-2) var(--sp-3); color: var(--ink-3); font-size: var(--fs-sm); }
251
+ .pal-none[hidden] { display: none; }
252
+ .canvas.pal-collapsed .pal-search-wrap, .canvas.pal-collapsed .palette.pal-list, .canvas.pal-collapsed .pal-none, .canvas.pal-collapsed .pal-grip { display: none; }
253
+ .canvas.pal-collapsed .pal-dock-head { border-bottom: 0; justify-content: center; }
254
+ .pal-grip { flex: none; width: 6px; margin: 0 -3px; cursor: col-resize; z-index: 3; position: relative; }
255
+ .pal-grip:hover, .pal-grip:focus-visible { background: color-mix(in srgb, var(--accent) 30%, transparent); outline: 0; }
256
+ body.read-only .pal-dock, body.read-only .pal-grip { display: none; }
226
257
  .pal-ghost { position: absolute; z-index: 5; pointer-events: none; display: flex; align-items: center; gap: var(--sp-1); padding: 2px var(--sp-2); border: var(--bw) solid var(--accent); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: var(--fs-sm); box-shadow: var(--shadow-2, none); }
227
258
  .pal-ghost .icon { width: 14px; height: 14px; }
228
259
  .pal-ghost.bad { border-color: var(--bad); color: var(--bad); }
@@ -230,7 +261,7 @@ body.read-only .palette { display: none; }
230
261
 
231
262
  /* The canvas's own marks over the drawing (0.7.4), for the plain words (setup.ts: the root .iso-canvas, the pan key's
232
263
  class .pan-key): selection, hover, marquee, the drag's grid, drop target and edges,
233
- problem badges, and the canvas's cursors. On the skin's tokens: --iso-sel* default to --accent, --iso-bad and
264
+ problem badges, the connect handle and line (0.10.0), and the canvas's cursors. On the skin's tokens: --iso-sel* default to --accent, --iso-bad and
234
265
  --iso-warn to --bad and --warn; a host may set any of them on .iso-canvas. The package's assets/app.css carries
235
266
  this file after the layout, and it ships alone as assets/marks.css. (A domain with its own words styles its own.)
236
267
  Without any of it the marks are still harmless: the overlay's own attributes give no fill and take no pointer. */
@@ -257,6 +288,10 @@ body.read-only .palette { display: none; }
257
288
  .iso-canvas .overlay .drop { fill: var(--iso-sel-fill); stroke: var(--iso-sel); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
258
289
  .iso-canvas .overlay .drop.bad { fill: color-mix(in srgb, var(--iso-bad) 18%, transparent); stroke: var(--iso-bad); }
259
290
  .iso-canvas .overlay .edge { fill: none; stroke: var(--iso-sel); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
291
+ .iso-canvas .overlay .connect-handle { fill: var(--surface, #fff); stroke: var(--iso-sel); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: all; cursor: crosshair; }
292
+ .iso-canvas .overlay .connect-handle:hover { fill: var(--iso-sel); }
293
+ .iso-canvas .overlay .connect-line { stroke: var(--iso-sel); stroke-width: 2; stroke-dasharray: 5 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
294
+ .iso-canvas .overlay .connect-line.ok { stroke-dasharray: none; }
260
295
  .iso-canvas .overlay .badge circle { fill: var(--iso-bad); stroke: none; }
261
296
  .iso-canvas .overlay .badge.warn circle { fill: var(--iso-warn); }
262
297
  .iso-canvas .overlay .badge text { fill: #fff; stroke: none; font-family: system-ui, sans-serif; font-weight: 600; text-anchor: middle; dominant-baseline: central; }
package/assets/icons.svg CHANGED
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" class="sprite" aria-hidden="true" focusable="false"><symbol id="se-i-arrow-up-right" viewBox="0 0 24 24"><path d="M7 7h10v10" /> <path d="M7 17 17 7" /></symbol><symbol id="se-i-box" viewBox="0 0 24 24"><path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" /> <path d="m3.3 7 8.7 5 8.7-5" /> <path d="M12 22V12" /></symbol><symbol id="se-i-chevron-down" viewBox="0 0 24 24"><path d="m6 9 6 6 6-6" /></symbol><symbol id="se-i-chevron-right" viewBox="0 0 24 24"><path d="m9 18 6-6-6-6" /></symbol><symbol id="se-i-circle-dot" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1" /> <circle cx="12" cy="12" r="10" /></symbol><symbol id="se-i-circle-x" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" /> <path d="m15 9-6 6" /> <path d="m9 9 6 6" /></symbol><symbol id="se-i-clipboard" viewBox="0 0 24 24"><rect width="8" height="4" x="8" y="2" rx="1" ry="1" /> <path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /></symbol><symbol id="se-i-clipboard-paste" viewBox="0 0 24 24"><path d="M11 14h10" /> <path d="M16 4h2a2 2 0 0 1 2 2v1.344" /> <path d="m17 18 4-4-4-4" /> <path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113" /> <rect x="8" y="2" width="8" height="4" rx="1" /></symbol><symbol id="se-i-code-xml" viewBox="0 0 24 24"><path d="m18 16 4-4-4-4" /> <path d="m6 8-4 4 4 4" /> <path d="m14.5 4-5 16" /></symbol><symbol id="se-i-copy" viewBox="0 0 24 24"><rect width="14" height="14" x="8" y="8" rx="2" ry="2" /> <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" /></symbol><symbol id="se-i-layers" viewBox="0 0 24 24"><path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z" /> <path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12" /> <path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17" /></symbol><symbol id="se-i-link" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /> <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /></symbol><symbol id="se-i-list" viewBox="0 0 24 24"><path d="M3 5h.01" /> <path d="M3 12h.01" /> <path d="M3 19h.01" /> <path d="M8 5h13" /> <path d="M8 12h13" /> <path d="M8 19h13" /></symbol><symbol id="se-i-list-tree" viewBox="0 0 24 24"><path d="M8 5h13" /> <path d="M13 12h8" /> <path d="M13 19h8" /> <path d="M3 10a2 2 0 0 0 2 2h3" /> <path d="M3 5v12a2 2 0 0 0 2 2h3" /></symbol><symbol id="se-i-panel-right" viewBox="0 0 24 24"><rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M15 3v18" /></symbol><symbol id="se-i-pencil" viewBox="0 0 24 24"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /> <path d="m15 5 4 4" /></symbol><symbol id="se-i-plus" viewBox="0 0 24 24"><path d="M5 12h14" /> <path d="M12 5v14" /></symbol><symbol id="se-i-rotate-ccw" viewBox="0 0 24 24"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" /></symbol><symbol id="se-i-trash-2" viewBox="0 0 24 24"><path d="M10 11v6" /> <path d="M14 11v6" /> <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /> <path d="M3 6h18" /> <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /></symbol><symbol id="se-i-triangle-alert" viewBox="0 0 24 24"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /> <path d="M12 9v4" /> <path d="M12 17h.01" /></symbol><symbol id="se-i-x" viewBox="0 0 24 24"><path d="M18 6 6 18" /> <path d="m6 6 12 12" /></symbol></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" class="sprite" aria-hidden="true" focusable="false"><symbol id="se-i-arrow-up-right" viewBox="0 0 24 24"><path d="M7 7h10v10" /> <path d="M7 17 17 7" /></symbol><symbol id="se-i-box" viewBox="0 0 24 24"><path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" /> <path d="m3.3 7 8.7 5 8.7-5" /> <path d="M12 22V12" /></symbol><symbol id="se-i-chevron-down" viewBox="0 0 24 24"><path d="m6 9 6 6 6-6" /></symbol><symbol id="se-i-chevron-left" viewBox="0 0 24 24"><path d="m15 18-6-6 6-6" /></symbol><symbol id="se-i-chevron-right" viewBox="0 0 24 24"><path d="m9 18 6-6-6-6" /></symbol><symbol id="se-i-circle-dot" viewBox="0 0 24 24"><circle cx="12" cy="12" r="1" /> <circle cx="12" cy="12" r="10" /></symbol><symbol id="se-i-circle-x" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" /> <path d="m15 9-6 6" /> <path d="m9 9 6 6" /></symbol><symbol id="se-i-clipboard" viewBox="0 0 24 24"><rect width="8" height="4" x="8" y="2" rx="1" ry="1" /> <path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" /></symbol><symbol id="se-i-clipboard-paste" viewBox="0 0 24 24"><path d="M11 14h10" /> <path d="M16 4h2a2 2 0 0 1 2 2v1.344" /> <path d="m17 18 4-4-4-4" /> <path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113" /> <rect x="8" y="2" width="8" height="4" rx="1" /></symbol><symbol id="se-i-code-xml" viewBox="0 0 24 24"><path d="m18 16 4-4-4-4" /> <path d="m6 8-4 4 4 4" /> <path d="m14.5 4-5 16" /></symbol><symbol id="se-i-copy" viewBox="0 0 24 24"><rect width="14" height="14" x="8" y="8" rx="2" ry="2" /> <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" /></symbol><symbol id="se-i-layers" viewBox="0 0 24 24"><path d="M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z" /> <path d="M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12" /> <path d="M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17" /></symbol><symbol id="se-i-link" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" /> <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" /></symbol><symbol id="se-i-list" viewBox="0 0 24 24"><path d="M3 5h.01" /> <path d="M3 12h.01" /> <path d="M3 19h.01" /> <path d="M8 5h13" /> <path d="M8 12h13" /> <path d="M8 19h13" /></symbol><symbol id="se-i-list-tree" viewBox="0 0 24 24"><path d="M8 5h13" /> <path d="M13 12h8" /> <path d="M13 19h8" /> <path d="M3 10a2 2 0 0 0 2 2h3" /> <path d="M3 5v12a2 2 0 0 0 2 2h3" /></symbol><symbol id="se-i-panel-right" viewBox="0 0 24 24"><rect width="18" height="18" x="3" y="3" rx="2" /> <path d="M15 3v18" /></symbol><symbol id="se-i-pencil" viewBox="0 0 24 24"><path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" /> <path d="m15 5 4 4" /></symbol><symbol id="se-i-plus" viewBox="0 0 24 24"><path d="M5 12h14" /> <path d="M12 5v14" /></symbol><symbol id="se-i-rotate-ccw" viewBox="0 0 24 24"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" /> <path d="M3 3v5h5" /></symbol><symbol id="se-i-search" viewBox="0 0 24 24"><path d="m21 21-4.34-4.34" /> <circle cx="11" cy="11" r="8" /></symbol><symbol id="se-i-trash-2" viewBox="0 0 24 24"><path d="M10 11v6" /> <path d="M14 11v6" /> <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /> <path d="M3 6h18" /> <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /></symbol><symbol id="se-i-triangle-alert" viewBox="0 0 24 24"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /> <path d="M12 9v4" /> <path d="M12 17h.01" /></symbol><symbol id="se-i-x" viewBox="0 0 24 24"><path d="M18 6 6 18" /> <path d="m6 6 12 12" /></symbol></svg>
package/assets/marks.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /* The canvas's own marks over the drawing (0.7.4), for the plain words (setup.ts: the root .iso-canvas, the pan key's
2
2
  class .pan-key): selection, hover, marquee, the drag's grid, drop target and edges,
3
- problem badges, and the canvas's cursors. On the skin's tokens: --iso-sel* default to --accent, --iso-bad and
3
+ problem badges, the connect handle and line (0.10.0), and the canvas's cursors. On the skin's tokens: --iso-sel* default to --accent, --iso-bad and
4
4
  --iso-warn to --bad and --warn; a host may set any of them on .iso-canvas. The package's assets/app.css carries
5
5
  this file after the layout, and it ships alone as assets/marks.css. (A domain with its own words styles its own.)
6
6
  Without any of it the marks are still harmless: the overlay's own attributes give no fill and take no pointer. */
@@ -27,6 +27,10 @@
27
27
  .iso-canvas .overlay .drop { fill: var(--iso-sel-fill); stroke: var(--iso-sel); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
28
28
  .iso-canvas .overlay .drop.bad { fill: color-mix(in srgb, var(--iso-bad) 18%, transparent); stroke: var(--iso-bad); }
29
29
  .iso-canvas .overlay .edge { fill: none; stroke: var(--iso-sel); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
30
+ .iso-canvas .overlay .connect-handle { fill: var(--surface, #fff); stroke: var(--iso-sel); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: all; cursor: crosshair; }
31
+ .iso-canvas .overlay .connect-handle:hover { fill: var(--iso-sel); }
32
+ .iso-canvas .overlay .connect-line { stroke: var(--iso-sel); stroke-width: 2; stroke-dasharray: 5 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
33
+ .iso-canvas .overlay .connect-line.ok { stroke-dasharray: none; }
30
34
  .iso-canvas .overlay .badge circle { fill: var(--iso-bad); stroke: none; }
31
35
  .iso-canvas .overlay .badge.warn circle { fill: var(--iso-warn); }
32
36
  .iso-canvas .overlay .badge text { fill: #fff; stroke: none; font-family: system-ui, sans-serif; font-weight: 600; text-anchor: middle; dominant-baseline: central; }