@eclipse-docks/extension-canvas 0.8.13 → 0.8.15

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.
@@ -1,5 +1,5 @@
1
1
  import { activeEditorSignal } from "@eclipse-docks/core";
2
- //#region src/active-canvas.ts
2
+ // src/active-canvas.ts
3
3
  function readActiveCanvas() {
4
4
  return fromElement(activeEditorSignal.get());
5
5
  }
@@ -43,7 +43,6 @@ function fromElement(active) {
43
43
  setState: active.setState?.bind(active)
44
44
  };
45
45
  }
46
- //#endregion
47
46
  export { connectedWorkspaceEditors, findOpenCanvas, isCanvasViewer, readActiveCanvas };
48
47
 
49
48
  //# sourceMappingURL=active-canvas.js.map
@@ -1,13 +1,12 @@
1
- import { registerCanvasBridge } from "./register.js";
2
1
  import { CanvasView } from "../canvas-module.js";
2
+ import { registerCanvasBridge } from "./register.js";
3
3
  import * as lit from "@eclipse-docks/core/externals/lit";
4
4
  import * as webawesome from "@eclipse-docks/core/externals/webawesome";
5
- //#region src/bridges/canvas.ts
5
+ // src/bridges/canvas.ts
6
6
  registerCanvasBridge({
7
7
  ...lit,
8
8
  ...webawesome,
9
9
  CanvasView
10
10
  }, import.meta.url, "canvas");
11
- //#endregion
12
11
 
13
12
  //# sourceMappingURL=canvas.js.map
@@ -1,7 +1,6 @@
1
1
  import { registerCanvasBridge } from "./register.js";
2
2
  import * as core from "@eclipse-docks/core";
3
- //#region src/bridges/core.ts
3
+ // src/bridges/core.ts
4
4
  registerCanvasBridge(core, import.meta.url, "core");
5
- //#endregion
6
5
 
7
6
  //# sourceMappingURL=core.js.map
@@ -1,4 +1,4 @@
1
- //#region src/bridges/register.ts
1
+ // src/bridges/register.ts
2
2
  var runtime = globalThis.__docksCanvas ??= {};
3
3
  var hrefs = {};
4
4
  function registerCanvasBridge(namespace, href, location) {
@@ -8,7 +8,6 @@ function registerCanvasBridge(namespace, href, location) {
8
8
  function bridgeHref(location) {
9
9
  return hrefs[location];
10
10
  }
11
- //#endregion
12
11
  export { bridgeHref, registerCanvasBridge };
13
12
 
14
13
  //# sourceMappingURL=register.js.map
@@ -1,7 +1,7 @@
1
1
  import lounging_cat_canvas_default from "./canvases/lounging-cat.canvas.js";
2
2
  import tasks_canvas_default from "./canvases/tasks.canvas.js";
3
3
  import { registerCatalog } from "@eclipse-docks/extension-catalog/api";
4
- //#region src/canvas-catalog.ts
4
+ // src/canvas-catalog.ts
5
5
  function canvasFileUrl(source) {
6
6
  return `data:text/javascript;charset=utf-8,${encodeURIComponent(source)}`;
7
7
  }
@@ -33,7 +33,6 @@ var CANVAS_CATALOG = {
33
33
  function registerCanvasCatalog() {
34
34
  registerCatalog(CANVAS_CATALOG);
35
35
  }
36
- //#endregion
37
36
  export { registerCanvasCatalog };
38
37
 
39
38
  //# sourceMappingURL=canvas-catalog.js.map
@@ -1,12 +1,12 @@
1
- import { attachPreviewShot } from "./preview-image.js";
2
- import { readWorkspaceFile } from "./workspace-file.js";
3
1
  import { DocksCanvasPart } from "./canvas-part.js";
4
2
  import { createContributionHost, createFileHost } from "./host.js";
3
+ import { attachPreviewShot } from "./preview-image.js";
4
+ import { readWorkspaceFile } from "./workspace-file.js";
5
5
  import { File, TOPIC_WORKSPACE_CHANGED, icon } from "@eclipse-docks/core";
6
6
  import { css, customElement, html, nothing, property, query, state } from "@eclipse-docks/core/externals/lit";
7
7
  import "@eclipse-docks/extension-monaco-editor/widget";
8
8
  import _decorate from "@oxc-project/runtime/helpers/decorate";
9
- //#region src/canvas-editor.ts
9
+ // src/canvas-editor.ts
10
10
  var DocksCanvasEditor = class DocksCanvasEditor extends DocksCanvasPart {
11
11
  constructor(..._args) {
12
12
  super(..._args);
@@ -292,7 +292,6 @@ DocksCanvasEditor = _decorate([customElement("docks-canvas-editor")], DocksCanva
292
292
  function nextFrame() {
293
293
  return new Promise((resolve) => requestAnimationFrame(() => resolve()));
294
294
  }
295
- //#endregion
296
295
  export { DocksCanvasEditor };
297
296
 
298
297
  //# sourceMappingURL=canvas-editor.js.map
@@ -9,7 +9,7 @@ import "./canvas-switcher.js";
9
9
  import { File, TOOLBAR_MAIN_RIGHT, TOPIC_CONTRIBUTEIONS_CHANGED, contributionRegistry, editorRegistry, subscribe } from "@eclipse-docks/core";
10
10
  import { html } from "@eclipse-docks/core/externals/lit";
11
11
  import { SYSTEM_SKILLS } from "@eclipse-docks/extension-ai-system/api";
12
- //#region src/canvas-extension.ts
12
+ // src/canvas-extension.ts
13
13
  editorRegistry.registerEditorInputHandler({
14
14
  editorId: "system.canvas-editor",
15
15
  label: "Canvas",
@@ -85,6 +85,5 @@ subscribe(TOPIC_CONTRIBUTEIONS_CHANGED, (event) => {
85
85
  if (event?.target !== "system.canvases") return;
86
86
  for (const contribution of contributionRegistry.getContributions(SYSTEM_CANVASES)) if (isCanvasContribution(contribution)) registerCanvasTools(contribution);
87
87
  });
88
- //#endregion
89
88
 
90
89
  //# sourceMappingURL=canvas-extension.js.map
@@ -1,7 +1,7 @@
1
1
  import { LitElement } from "@eclipse-docks/core/externals/lit";
2
2
  import "@eclipse-docks/core/externals/webawesome";
3
3
  import { publish, subscribe, unsubscribe } from "@eclipse-docks/core/core/events";
4
- //#region src/canvas-module.ts
4
+ // src/canvas-module.ts
5
5
  /** Superclass for a `.canvas.js` default export. The host registers the tag. */
6
6
  var CanvasView = class extends LitElement {
7
7
  constructor(..._args) {
@@ -46,7 +46,6 @@ var CanvasView = class extends LitElement {
46
46
  /** Release resources. Called while this element is leaving the document. */
47
47
  onDisconnect() {}
48
48
  };
49
- //#endregion
50
49
  export { CanvasView };
51
50
 
52
51
  //# sourceMappingURL=canvas-module.js.map
@@ -1,13 +1,13 @@
1
- import { rasterizeElement } from "./preview-image.js";
2
- import { readWorkspaceFile } from "./workspace-file.js";
3
1
  import { compileCanvas } from "./compile.js";
4
2
  import "./bridges/canvas.js";
5
3
  import "./bridges/core.js";
6
4
  import { elementFromConstructor, mountCompiled } from "./mount.js";
5
+ import { rasterizeElement } from "./preview-image.js";
6
+ import { readWorkspaceFile } from "./workspace-file.js";
7
7
  import { DocksPart } from "@eclipse-docks/core";
8
8
  import { css, html, nothing, property, state } from "@eclipse-docks/core/externals/lit";
9
9
  import _decorate from "@oxc-project/runtime/helpers/decorate";
10
- //#region src/canvas-part.ts
10
+ // src/canvas-part.ts
11
11
  /** Shared preview host for the canvas editor and the read-only contribution canvas. */
12
12
  var DocksCanvasPart = class extends DocksPart {
13
13
  constructor(..._args) {
@@ -147,7 +147,6 @@ _decorate([property()], DocksCanvasPart.prototype, "canvasName", void 0);
147
147
  _decorate([property()], DocksCanvasPart.prototype, "source", void 0);
148
148
  _decorate([state()], DocksCanvasPart.prototype, "previewError", void 0);
149
149
  _decorate([state()], DocksCanvasPart.prototype, "previewElement", void 0);
150
- //#endregion
151
150
  export { DocksCanvasPart };
152
151
 
153
152
  //# sourceMappingURL=canvas-part.js.map
@@ -1,10 +1,10 @@
1
- import "./contribution.js";
2
1
  import { listRegisteredCanvases } from "./canvases.js";
2
+ import "./contribution.js";
3
3
  import { openCanvasByName } from "./commands.js";
4
4
  import { DocksElement, TOPIC_CONTRIBUTEIONS_CHANGED, icon, subscribe, unsubscribe } from "@eclipse-docks/core";
5
5
  import { css, customElement, html, state } from "@eclipse-docks/core/externals/lit";
6
6
  import _decorate from "@oxc-project/runtime/helpers/decorate";
7
- //#region src/canvas-switcher.ts
7
+ // src/canvas-switcher.ts
8
8
  var DocksCanvasSwitcher = class DocksCanvasSwitcher extends DocksElement {
9
9
  constructor(..._args) {
10
10
  super(..._args);
@@ -53,7 +53,6 @@ var DocksCanvasSwitcher = class DocksCanvasSwitcher extends DocksElement {
53
53
  };
54
54
  _decorate([state()], DocksCanvasSwitcher.prototype, "canvases", void 0);
55
55
  DocksCanvasSwitcher = _decorate([customElement("docks-canvas-switcher")], DocksCanvasSwitcher);
56
- //#endregion
57
56
  export { DocksCanvasSwitcher };
58
57
 
59
58
  //# sourceMappingURL=canvas-switcher.js.map
@@ -1,6 +1,6 @@
1
1
  import { readActiveCanvas } from "./active-canvas.js";
2
2
  import { registerAll } from "@eclipse-docks/core";
3
- //#region src/canvas-tools.ts
3
+ // src/canvas-tools.ts
4
4
  var registeredToolIds = /* @__PURE__ */ new Set();
5
5
  function canvasToolIsActive(canvasName) {
6
6
  const active = readActiveCanvas();
@@ -24,7 +24,6 @@ function registerCanvasTools(contribution) {
24
24
  });
25
25
  }
26
26
  }
27
- //#endregion
28
27
  export { canvasToolIsActive, registerCanvasTools };
29
28
 
30
29
  //# sourceMappingURL=canvas-tools.js.map
@@ -2,7 +2,7 @@ import { DocksCanvasPart } from "./canvas-part.js";
2
2
  import { createContributionHost } from "./host.js";
3
3
  import { customElement } from "@eclipse-docks/core/externals/lit";
4
4
  import _decorate from "@oxc-project/runtime/helpers/decorate";
5
- //#region src/canvas-viewer.ts
5
+ // src/canvas-viewer.ts
6
6
  var CanvasViewer = class CanvasViewer extends DocksCanvasPart {
7
7
  constructor(..._args) {
8
8
  super(..._args);
@@ -43,7 +43,6 @@ var CanvasViewer = class CanvasViewer extends DocksCanvasPart {
43
43
  }
44
44
  };
45
45
  CanvasViewer = _decorate([customElement("docks-canvas-viewer")], CanvasViewer);
46
- //#endregion
47
46
  export { CanvasViewer };
48
47
 
49
48
  //# sourceMappingURL=canvas-viewer.js.map
@@ -1,6 +1,5 @@
1
- //#region src/canvases/lounging-cat.canvas.js?raw
1
+ // src/canvases/lounging-cat.canvas.js?raw
2
2
  var lounging_cat_canvas_default = "import { CanvasView, html, css } from \"docks/canvas\";\n\nexport default class LoungingCat extends CanvasView {\n static properties = {\n gazeX: { state: true },\n gazeY: { state: true },\n blinking: { state: true },\n };\n\n static styles = css`\n :host { display: block; min-height: 100%; color: #493b38; font-family: ui-rounded, \"Trebuchet MS\", system-ui, sans-serif; }\n * { box-sizing: border-box; }\n .scene { position: relative; display: grid; place-items: center; min-height: min(760px, 100vh); overflow: hidden; padding: clamp(1rem, 4vw, 3rem); background: radial-gradient(ellipse at 50% 42%, #fff8e9 0%, #f7e8d2 58%, #ead4bd 100%); user-select: none; }\n .sun { position: absolute; width: clamp(110px, 18vw, 190px); aspect-ratio: 1; top: 8%; right: 12%; border-radius: 50%; background: #f4d99b; opacity: .55; filter: blur(1px); }\n .plant { position: absolute; left: 7%; bottom: 18%; color: #8b9b70; font-size: clamp(3rem, 8vw, 6rem); opacity: .8; transform: rotate(-12deg); }\n .art { position: relative; z-index: 1; width: min(900px, 100%); filter: drop-shadow(0 22px 22px #765b4930); }\n svg { display: block; width: 100%; height: auto; overflow: visible; }\n .pupil { transition: transform 120ms ease-out; }\n .tail { transform-box: view-box; transform-origin: 270px 365px; animation: tail-sway 3.8s ease-in-out infinite; }\n @keyframes tail-sway { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-7deg); } }\n .eyelid { transform: scaleY(0); transform-origin: center 50%; transition: transform 90ms ease-in; }\n .blinking .eyelid { transform: scaleY(1); }\n .blinking .eye-white { transform: scaleY(.08); transform-origin: center; }\n .eye-white { transition: transform 90ms ease-in; }\n @media (max-width: 560px) { .scene { min-height: 100svh; padding: .5rem; } .plant { left: 1%; bottom: 20%; } }\n @media (prefers-reduced-motion: reduce) { .pupil, .eyelid, .eye-white { transition-duration: 0ms; } .tail { animation: none; } }\n `;\n\n constructor() {\n super();\n this.gazeX = 0;\n this.gazeY = 0;\n this.blinking = false;\n this._idleTimer = null;\n this._blinkTimer = null;\n this._blinkEndTimer = null;\n this._onDocumentPointerMove = (event) => this.handleDocumentPointerMove(event);\n }\n\n onConnect() {\n document.addEventListener(\"pointermove\", this._onDocumentPointerMove);\n this.scheduleBlink();\n }\n\n onDisconnect() {\n document.removeEventListener(\"pointermove\", this._onDocumentPointerMove);\n clearTimeout(this._idleTimer);\n clearTimeout(this._blinkTimer);\n clearTimeout(this._blinkEndTimer);\n }\n\n handleDocumentPointerMove(event) {\n this.gazeX = Math.max(-1, Math.min(1, (event.clientX / Math.max(window.innerWidth, 1) - 0.5) * 2));\n this.gazeY = Math.max(-1, Math.min(1, (event.clientY / Math.max(window.innerHeight, 1) - 0.5) * 2));\n clearTimeout(this._idleTimer);\n clearTimeout(this._blinkTimer);\n this._idleTimer = setTimeout(() => this.scheduleBlink(), 900);\n }\n\n scheduleBlink() {\n clearTimeout(this._blinkTimer);\n this._blinkTimer = setTimeout(() => this.blink(), 1800 + Math.random() * 3600);\n }\n\n blink() {\n this.blinking = true;\n clearTimeout(this._blinkEndTimer);\n this._blinkEndTimer = setTimeout(() => {\n this.blinking = false;\n this.scheduleBlink();\n }, 180);\n }\n\n pupilStyle(side) {\n const inward = side === \"left\" ? 1 : -1;\n return `transform: translate(${this.gazeX * 5 + inward * 3}px, ${this.gazeY * 4}px)`;\n }\n\n render() {\n return html`\n <main class=\"scene ${this.blinking ? \"blinking\" : \"\"}\" aria-label=\"A cat lounging on a couch. Its eyes follow your pointer across the page.\">\n <div class=\"sun\" aria-hidden=\"true\"></div><div class=\"plant\" aria-hidden=\"true\">❧</div>\n <div class=\"art\">\n <svg viewBox=\"0 0 900 590\" role=\"img\" aria-label=\"A sleepy ginger-and-cream cat sprawled on a soft green couch\">\n <defs>\n <linearGradient id=\"sofa\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"#91a58a\"/><stop offset=\"1\" stop-color=\"#718873\"/></linearGradient>\n <linearGradient id=\"fur\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\"><stop offset=\"0\" stop-color=\"#f4bd78\"/><stop offset=\"1\" stop-color=\"#df9255\"/></linearGradient>\n </defs>\n <path d=\"M112 330 Q112 292 151 292 H749 Q788 292 788 330 V470 H112Z\" fill=\"url(#sofa)\"/>\n <path d=\"M82 365 Q82 337 111 337 H789 Q818 337 818 365 V455 Q818 478 795 478 H105 Q82 478 82 455Z\" fill=\"#829982\"/>\n <path d=\"M105 455 H795 L770 520 H130Z\" fill=\"#657b6b\"/>\n <path d=\"M170 510 L160 550 M730 510 L740 550\" stroke=\"#806b58\" stroke-width=\"17\" stroke-linecap=\"round\"/>\n <path d=\"M130 365 Q130 350 150 350 M770 365 Q770 350 750 350\" fill=\"none\" stroke=\"#a8b49a\" stroke-width=\"5\" opacity=\".65\"/>\n <path d=\"M190 365 Q450 340 710 365 L690 445 Q450 465 210 445Z\" fill=\"#9bad91\" opacity=\".8\"/>\n <g class=\"tail\"><path d=\"M270 365 C190 330 170 390 220 410 C260 426 300 395 330 390\" fill=\"none\" stroke=\"#df985c\" stroke-width=\"34\" stroke-linecap=\"round\"/><path d=\"M205 374 Q218 382 230 389 M235 393 Q248 400 260 402\" fill=\"none\" stroke=\"#bd7547\" stroke-width=\"8\" stroke-linecap=\"round\"/></g>\n <ellipse cx=\"475\" cy=\"365\" rx=\"220\" ry=\"91\" fill=\"url(#fur)\" transform=\"rotate(-4 475 365)\"/>\n <path d=\"M330 310 Q350 340 330 370 M390 286 Q410 320 390 345 M570 286 Q550 320 570 345\" fill=\"none\" stroke=\"#c77d4b\" stroke-width=\"13\" stroke-linecap=\"round\" opacity=\".8\"/>\n <ellipse cx=\"500\" cy=\"405\" rx=\"145\" ry=\"43\" fill=\"#f5dfbd\" transform=\"rotate(-4 500 405)\"/>\n <ellipse cx=\"350\" cy=\"420\" rx=\"54\" ry=\"25\" fill=\"#f5dfbd\" transform=\"rotate(-8 350 420)\"/><path d=\"M330 420v12 M350 418v14 M370 416v12\" stroke=\"#d6b99a\" stroke-width=\"3\" stroke-linecap=\"round\"/>\n <ellipse cx=\"620\" cy=\"414\" rx=\"52\" ry=\"24\" fill=\"#f5dfbd\" transform=\"rotate(8 620 414)\"/><path d=\"M600 412v13 M620 414v13 M640 414v11\" stroke=\"#d6b99a\" stroke-width=\"3\" stroke-linecap=\"round\"/>\n <path d=\"M590 300 L600 220 Q604 205 620 218 L660 250 Q690 240 720 252 L758 218 Q773 207 778 226 L790 305 Q790 365 690 370 Q590 365 590 300Z\" fill=\"url(#fur)\"/>\n <path d=\"M610 245 L615 222 L642 250Z M735 250 L770 222 L773 250Z\" fill=\"#d98768\"/>\n <path d=\"M675 250 Q685 270 680 282 M700 248 Q710 268 705 281\" fill=\"none\" stroke=\"#c77d4b\" stroke-width=\"8\" stroke-linecap=\"round\"/>\n <g class=\"eye-white\"><ellipse cx=\"650\" cy=\"300\" rx=\"17\" ry=\"20\" fill=\"#fff8e9\"/><ellipse cx=\"730\" cy=\"300\" rx=\"17\" ry=\"20\" fill=\"#fff8e9\"/></g>\n <g class=\"pupil\" style=${this.pupilStyle(\"left\")}><ellipse cx=\"650\" cy=\"301\" rx=\"8\" ry=\"12\" fill=\"#4b4038\"/><circle cx=\"653\" cy=\"296\" r=\"3\" fill=\"white\"/></g>\n <g class=\"pupil\" style=${this.pupilStyle(\"right\")}><ellipse cx=\"730\" cy=\"301\" rx=\"8\" ry=\"12\" fill=\"#4b4038\"/><circle cx=\"733\" cy=\"296\" r=\"3\" fill=\"white\"/></g>\n <path class=\"eyelid\" d=\"M630 300 Q650 278 670 300 M710 300 Q730 278 750 300\" fill=\"none\" stroke=\"#b96f48\" stroke-width=\"7\" stroke-linecap=\"round\"/>\n <ellipse cx=\"690\" cy=\"326\" rx=\"28\" ry=\"19\" fill=\"#f5dfbd\"/><path d=\"M684 320 Q690 315 696 320 Q695 327 690 329 Q685 327 684 320Z\" fill=\"#bd7770\"/>\n <path d=\"M690 329 Q690 340 680 341 M690 329 Q690 340 700 341\" fill=\"none\" stroke=\"#76534a\" stroke-width=\"3\" stroke-linecap=\"round\"/>\n <path d=\"M665 328 L630 322 M665 335 L630 340 M715 328 L750 322 M715 335 L750 340\" stroke=\"#8d6b58\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n <path d=\"M570 365 Q600 390 650 380 Q670 376 670 395 Q665 414 625 414 Q580 414 550 390Z\" fill=\"#e9aa6d\"/><path d=\"M620 400v10 M640 397v10\" stroke=\"#c77d4b\" stroke-width=\"3\" stroke-linecap=\"round\"/>\n </svg>\n </div>\n </main>\n `;\n }\n}\n";
3
- //#endregion
4
3
  export { lounging_cat_canvas_default as default };
5
4
 
6
5
  //# sourceMappingURL=lounging-cat.canvas.js.map
@@ -1,6 +1,5 @@
1
- //#region src/canvases/tasks.canvas.js?raw
1
+ // src/canvases/tasks.canvas.js?raw
2
2
  var tasks_canvas_default = "import { CanvasView, html, css } from \"docks/canvas\";\n\nexport default class extends CanvasView {\n static properties = {\n tasks: { state: true },\n query: { state: true },\n grouping: { state: true },\n editingId: { state: true },\n };\n\n static styles = css`\n :host { display:block; min-height:100%; box-sizing:border-box; padding:clamp(18px,4vw,48px); color:var(--wa-color-text-normal); background:var(--wa-color-surface-default); font-family:var(--wa-font-family-body,system-ui,sans-serif); }\n * { box-sizing:border-box; }\n .app { max-width:920px; margin:0 auto; }\n header { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:30px; }\n .eyebrow { color:var(--wa-color-brand-600); text-transform:uppercase; letter-spacing:.12em; font-size:11px; font-weight:750; margin:0 0 8px; }\n h1 { font-size:clamp(30px,5vw,44px); line-height:1.05; letter-spacing:-.04em; margin:0; }\n .sub { color:var(--wa-color-text-quiet); margin:9px 0 0; }\n .date { color:var(--wa-color-text-quiet); font-size:13px; white-space:nowrap; padding-top:8px; }\n .summary { display:grid; grid-template-columns:1.3fr 1fr; gap:16px; margin-bottom:22px; }\n .panel { border:1px solid var(--wa-color-neutral-200); border-radius:16px; background:var(--wa-color-surface-raised); padding:20px; }\n .progress-top { display:flex; justify-content:space-between; gap:12px; align-items:center; }\n .label { font-size:13px; font-weight:700; }\n .muted { color:var(--wa-color-text-quiet); font-size:13px; }\n .percent { font-weight:750; font-size:22px; letter-spacing:-.03em; }\n .track { height:8px; border-radius:99px; background:var(--wa-color-neutral-100); overflow:hidden; margin-top:15px; }\n .fill { height:100%; border-radius:inherit; background:var(--wa-color-success-600); transition:width .25s ease; }\n .stats { display:grid; grid-template-columns:1fr 1fr; gap:12px; }\n .stat { border-left:2px solid var(--wa-color-neutral-200); padding-left:13px; }\n .stat strong { display:block; font-size:22px; letter-spacing:-.03em; }\n .stat span { color:var(--wa-color-text-quiet); font-size:12px; }\n .composer { display:flex; gap:10px; margin-bottom:14px; }\n wa-input { flex:1; }\n wa-input::part(base) { border-radius:11px; }\n wa-button::part(button) { border-radius:10px; font-weight:650; }\n .toolbar { display:flex; gap:12px; align-items:center; margin:18px 0 12px; }\n .search { flex:1; }\n .filters { display:flex; gap:6px; padding:4px; background:var(--wa-color-neutral-100); border-radius:11px; }\n .filters wa-button::part(button) { border:0; }\n .filters wa-button.active::part(button) { background:var(--wa-color-surface-raised); box-shadow:0 1px 4px #0001; }\n .group-title { display:flex; align-items:center; gap:9px; margin:22px 0 9px; font-size:13px; text-transform:uppercase; letter-spacing:.08em; font-weight:750; color:var(--wa-color-text-quiet); }\n .count { font-size:11px; background:var(--wa-color-neutral-100); padding:3px 7px; border-radius:20px; }\n .list { display:grid; gap:8px; }\n .task { display:flex; align-items:center; gap:12px; padding:13px 14px; border:1px solid var(--wa-color-neutral-200); background:var(--wa-color-surface-raised); border-radius:13px; min-width:0; }\n .check { width:21px; height:21px; flex:none; border-radius:7px; border:1.5px solid var(--wa-color-neutral-400); display:grid; place-items:center; cursor:pointer; color:white; background:transparent; font-size:14px; }\n .check.done { background:var(--wa-color-success-600); border-color:var(--wa-color-success-600); }\n .task-copy { flex:1; min-width:0; }\n .task-name { font-size:14px; font-weight:650; overflow-wrap:anywhere; }\n .task.done .task-name { color:var(--wa-color-text-quiet); text-decoration:line-through; }\n .task-date { color:var(--wa-color-text-quiet); font-size:11px; margin-top:4px; }\n .actions { display:flex; gap:3px; }\n .actions wa-button::part(button) { padding-inline:9px; }\n .empty { padding:30px 15px; text-align:center; color:var(--wa-color-text-quiet); border:1px dashed var(--wa-color-neutral-300); border-radius:13px; }\n .empty b { color:var(--wa-color-text-normal); display:block; margin-bottom:5px; }\n @media(max-width:620px) { .summary { grid-template-columns:1fr; } header { display:block; } .date { padding-top:12px; } .toolbar { flex-wrap:wrap; } .search { flex-basis:100%; } .filters { width:100%; justify-content:space-around; } .composer { align-items:stretch; } .task { padding:11px; } }\n `;\n\n constructor() {\n super();\n this.tasks = [];\n this.query = \"\";\n this.grouping = \"all\";\n this.editingId = null;\n }\n\n onConnect() {\n const saved = this.getState(\"tasks\", null);\n if (Array.isArray(saved)) this.tasks = saved;\n }\n\n persist() { this.setState(\"tasks\", this.tasks); }\n\n addTask() {\n const input = this.renderRoot.querySelector(\"#new-task\");\n const title = String(input?.value ?? \"\").trim();\n if (!title) return;\n this.tasks = [{ id: crypto.randomUUID(), title, done: false, created: Date.now() }, ...this.tasks];\n this.persist();\n input.value = \"\";\n input.focus();\n }\n\n toggle(id) {\n this.tasks = this.tasks.map(t => t.id === id ? { ...t, done: !t.done } : t);\n this.persist();\n }\n\n remove(id) { this.tasks = this.tasks.filter(t => t.id !== id); this.persist(); }\n\n edit(id) {\n const task = this.tasks.find(t => t.id === id);\n if (!task) return;\n const title = window.prompt(\"Edit task\", task.title);\n if (title === null) return;\n if (!title.trim()) return;\n this.tasks = this.tasks.map(t => t.id === id ? { ...t, title: title.trim() } : t);\n this.persist();\n }\n\n filtered() {\n const q = this.query.trim().toLowerCase();\n return this.tasks.filter(t => (!q || t.title.toLowerCase().includes(q)) &&\n (this.grouping === \"all\" || (this.grouping === \"done\" ? t.done : !t.done)));\n }\n\n renderTask(task) {\n return html`<article class=\"task ${task.done ? \"done\" : \"\"}\">\n <button class=\"check ${task.done ? \"done\" : \"\"}\" aria-label=${task.done ? \"Mark incomplete\" : \"Mark complete\"} @click=${() => this.toggle(task.id)}>${task.done ? \"✓\" : \"\"}</button>\n <div class=\"task-copy\"><div class=\"task-name\">${task.title}</div><div class=\"task-date\">Added ${new Date(task.created).toLocaleDateString(undefined,{month:\"short\",day:\"numeric\"})}</div></div>\n <div class=\"actions\"><wa-button appearance=\"plain\" size=\"small\" aria-label=\"Edit task\" @click=${() => this.edit(task.id)}>Edit</wa-button><wa-button appearance=\"plain\" variant=\"danger\" size=\"small\" aria-label=\"Delete task\" @click=${() => this.remove(task.id)}>Delete</wa-button></div>\n </article>`;\n }\n\n render() {\n const done = this.tasks.filter(t => t.done).length;\n const total = this.tasks.length;\n const percent = total ? Math.round(done / total * 100) : 0;\n const visible = this.filtered();\n const activeTasks = visible.filter(t => !t.done);\n const doneTasks = visible.filter(t => t.done);\n const date = new Intl.DateTimeFormat(undefined, { weekday:\"long\", month:\"long\", day:\"numeric\" }).format(new Date());\n return html`<main class=\"app\">\n <header><div><p class=\"eyebrow\">Daily planner</p><h1>Today, with intention.</h1><p class=\"sub\">A little progress adds up. Keep your focus on what matters.</p></div><div class=\"date\">${date}</div></header>\n <section class=\"summary\"><div class=\"panel\"><div class=\"progress-top\"><div><div class=\"label\">Today's progress</div><div class=\"muted\">${done} of ${total} tasks completed</div></div><div class=\"percent\">${percent}%</div></div><div class=\"track\"><div class=\"fill\" style=\"width:${percent}%\"></div></div></div><div class=\"panel stats\"><div class=\"stat\"><strong>${total - done}</strong><span>Still to do</span></div><div class=\"stat\"><strong>${done}</strong><span>Completed</span></div></div></section>\n <section class=\"composer\"><wa-input id=\"new-task\" placeholder=\"What needs your attention today?\" aria-label=\"New task\" @keydown=${e => { if (e.key === \"Enter\") this.addTask(); }}></wa-input><wa-button variant=\"brand\" @click=${() => this.addTask()}>Add task</wa-button></section>\n <div class=\"toolbar\"><wa-input class=\"search\" placeholder=\"Search your tasks…\" aria-label=\"Search tasks\" @keyup=${e => { this.query = e.target.value; }}></wa-input><div class=\"filters\" aria-label=\"Filter tasks\"><wa-button class=${this.grouping === \"all\" ? \"active\" : \"\"} size=\"small\" appearance=\"plain\" @click=${() => this.grouping = \"all\"}>All</wa-button><wa-button class=${this.grouping === \"active\" ? \"active\" : \"\"} size=\"small\" appearance=\"plain\" @click=${() => this.grouping = \"active\"}>To do</wa-button><wa-button class=${this.grouping === \"done\" ? \"active\" : \"\"} size=\"small\" appearance=\"plain\" @click=${() => this.grouping = \"done\"}>Done</wa-button></div></div>\n ${visible.length ? html`${this.grouping === \"all\" || this.grouping === \"active\" ? html`<section><h2 class=\"group-title\">To do <span class=\"count\">${activeTasks.length}</span></h2><div class=\"list\">${activeTasks.length ? activeTasks.map(t => this.renderTask(t)) : html`<div class=\"empty\"><b>Nothing left on your list.</b>Enjoy the breathing room.</div>`}</div></section>` : \"\"}${this.grouping === \"all\" || this.grouping === \"done\" ? html`<section><h2 class=\"group-title\">Completed <span class=\"count\">${doneTasks.length}</span></h2><div class=\"list\">${doneTasks.length ? doneTasks.map(t => this.renderTask(t)) : html`<div class=\"empty\">Completed tasks will show up here.</div>`}</div></section>` : \"\"}` : html`<div class=\"empty\"><b>${this.query ? \"No tasks match your search.\" : \"Your list is clear.\"}</b>${this.query ? \"Try another search or change the filter.\" : \"Add a task above to get started.\"}</div>`}\n </main>`;\n }\n}\n";
3
- //#endregion
4
3
  export { tasks_canvas_default as default };
5
4
 
6
5
  //# sourceMappingURL=tasks.canvas.js.map
package/dist/canvases.js CHANGED
@@ -1,10 +1,9 @@
1
1
  import { SYSTEM_CANVASES, isCanvasContribution } from "./contribution.js";
2
2
  import { contributionRegistry } from "@eclipse-docks/core";
3
- //#region src/canvases.ts
3
+ // src/canvases.ts
4
4
  function listRegisteredCanvases() {
5
5
  return contributionRegistry.getContributions(SYSTEM_CANVASES).filter(isCanvasContribution);
6
6
  }
7
- //#endregion
8
7
  export { listRegisteredCanvases };
9
8
 
10
9
  //# sourceMappingURL=canvases.js.map
package/dist/commands.js CHANGED
@@ -1,12 +1,12 @@
1
- import { listRegisteredCanvases } from "./canvases.js";
2
1
  import { connectedWorkspaceEditors, findOpenCanvas, isCanvasViewer, readActiveCanvas } from "./active-canvas.js";
2
+ import { listRegisteredCanvases } from "./canvases.js";
3
3
  import { attachPreviewShot } from "./preview-image.js";
4
4
  import { writeWorkspaceFile } from "./workspace-file.js";
5
5
  import "./canvas-editor.js";
6
6
  import "./canvas-viewer.js";
7
7
  import { File, PANEL_BOTTOM, SIDEBAR_AUXILIARY, SIDEBAR_MAIN, contributionRegistry, editorRegistry, registerAll, workspaceService } from "@eclipse-docks/core";
8
8
  import { html } from "@eclipse-docks/core/externals/lit";
9
- //#region src/commands.ts
9
+ // src/commands.ts
10
10
  var VIEW_SLOTS = /* @__PURE__ */ new Set([
11
11
  SIDEBAR_MAIN,
12
12
  SIDEBAR_AUXILIARY,
@@ -262,7 +262,6 @@ function registerCanvasCommands() {
262
262
  }
263
263
  });
264
264
  }
265
- //#endregion
266
265
  export { canvasEditorInput, hideCanvasView, openCanvasByName, openCanvasByPath, registerCanvasCommands, showCanvasView };
267
266
 
268
267
  //# sourceMappingURL=commands.js.map
package/dist/compile.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { bridgeHref } from "./bridges/register.js";
2
- //#region src/compile.ts
2
+ // src/compile.ts
3
3
  var TEXT_EXT = /* @__PURE__ */ new Set([
4
4
  "js",
5
5
  "mjs",
@@ -388,7 +388,6 @@ function externalExportFromPrelude(raw, localFor) {
388
388
  return `__exports.${alias || imported} = ${localFor(imported)};`;
389
389
  }).join("\n");
390
390
  }
391
- //#endregion
392
391
  export { bridgeRuntime, compileCanvas, isRelativeSpecifier, resolveWorkspacePath, rewriteBridgeSpecifier };
393
392
 
394
393
  //# sourceMappingURL=compile.js.map
@@ -1,11 +1,10 @@
1
- //#region src/contribution.ts
1
+ // src/contribution.ts
2
2
  /** Slot for canvases an extension contributes. The toolbar dropdown lists it; it is not a tab group. */
3
3
  var SYSTEM_CANVASES = "system.canvases";
4
4
  function isCanvasContribution(contribution) {
5
5
  const canvas = contribution;
6
6
  return typeof canvas.settingsKey === "string" && canvas.settingsKey.length > 0 && (typeof canvas.load === "function" || canvas.source !== void 0);
7
7
  }
8
- //#endregion
9
8
  export { SYSTEM_CANVASES, isCanvasContribution };
10
9
 
11
10
  //# sourceMappingURL=contribution.js.map
package/dist/host.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { File, appSettings, editorRegistry, workspaceService } from "@eclipse-docks/core";
2
- //#region src/host.ts
2
+ // src/host.ts
3
3
  function createMemoryHost(initial, persist) {
4
4
  const state = { ...initial };
5
5
  return {
@@ -57,7 +57,6 @@ async function openWorkspaceFile(path) {
57
57
  const resource = await workspace.getResource(path.replace(/^\/+/, ""));
58
58
  if (resource instanceof File) await editorRegistry.loadEditor(resource);
59
59
  }
60
- //#endregion
61
60
  export { createContributionHost, createFileHost, createMemoryHost };
62
61
 
63
62
  //# sourceMappingURL=host.js.map
package/dist/i18n.de.js CHANGED
@@ -1,11 +1,10 @@
1
- //#region src/i18n.de.json
1
+ // src/i18n.de.json
2
2
  var EXT_CANVAS_NAME = "Canvas";
3
3
  var EXT_CANVAS_DESC = ".canvas.js-Dateien und von Erweiterungen registrierte Canvases öffnen";
4
4
  var i18n_de_default = {
5
5
  EXT_CANVAS_NAME,
6
6
  EXT_CANVAS_DESC
7
7
  };
8
- //#endregion
9
8
  export { EXT_CANVAS_DESC, EXT_CANVAS_NAME, i18n_de_default as default };
10
9
 
11
10
  //# sourceMappingURL=i18n.de.js.map
package/dist/i18n.en.js CHANGED
@@ -1,11 +1,10 @@
1
- //#region src/i18n.en.json
1
+ // src/i18n.en.json
2
2
  var EXT_CANVAS_NAME = "Canvas";
3
3
  var EXT_CANVAS_DESC = "Open .canvas.js files and canvases registered by extensions";
4
4
  var i18n_en_default = {
5
5
  EXT_CANVAS_NAME,
6
6
  EXT_CANVAS_DESC
7
7
  };
8
- //#endregion
9
8
  export { EXT_CANVAS_DESC, EXT_CANVAS_NAME, i18n_en_default as default };
10
9
 
11
10
  //# sourceMappingURL=i18n.en.js.map
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { SYSTEM_CANVASES, isCanvasContribution } from "./contribution.js";
1
+ export { SYSTEM_CANVASES, isCanvasContribution } from "./contribution.js";
2
2
  import { extensionRegistry, i18n } from "@eclipse-docks/core";
3
3
  import pkg from "../package.json";
4
- //#region src/index.ts
4
+ // src/index.ts
5
5
  var t = await i18n(/* #__PURE__ */ Object.assign({
6
6
  "./i18n.de.json": () => import("./i18n.de.js"),
7
7
  "./i18n.en.json": () => import("./i18n.en.js")
@@ -14,7 +14,5 @@ extensionRegistry.registerExtension({
14
14
  icon: "table-columns",
15
15
  dependencies: ["@eclipse-docks/extension-monaco-editor"]
16
16
  });
17
- //#endregion
18
- export { SYSTEM_CANVASES, isCanvasContribution };
19
17
 
20
18
  //# sourceMappingURL=index.js.map
package/dist/mount.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/mount.ts
1
+ // src/mount.ts
2
2
  var tagSequence = 0;
3
3
  var constructorTags = /* @__PURE__ */ new WeakMap();
4
4
  function constructElement(Ctor) {
@@ -75,7 +75,6 @@ async function mountCompiled(code) {
75
75
  };
76
76
  }
77
77
  }
78
- //#endregion
79
78
  export { elementFromConstructor, mountCompiled };
80
79
 
81
80
  //# sourceMappingURL=mount.js.map
@@ -1,5 +1,5 @@
1
1
  import { domToBlob } from "modern-screenshot";
2
- //#region src/preview-image.ts
2
+ // src/preview-image.ts
3
3
  /** Same field the specialist loop reads to schedule a follow-up vision message. */
4
4
  var PREVIEW_IMAGE_KEY = "_presentImage";
5
5
  var MAX_BYTES = 35e5;
@@ -81,7 +81,6 @@ function bytesToBase64(bytes) {
81
81
  for (let i = 0; i < bytes.length; i += chunk) binary += String.fromCharCode(...bytes.subarray(i, i + chunk));
82
82
  return btoa(binary);
83
83
  }
84
- //#endregion
85
84
  export { PREVIEW_IMAGE_KEY, attachPreviewShot, previewFileName, previewToolOutput, rasterizeElement };
86
85
 
87
86
  //# sourceMappingURL=preview-image.js.map
@@ -1,6 +1,5 @@
1
- //#region src/skills/eclipse-docks-canvas/SKILL.md?raw
2
- var SKILL_default = "---\nname: eclipse-docks-canvas\ndescription: >-\n Create or edit interactive Eclipse Docks canvases (.canvas.js and the matching\n .canvas.md spec): CanvasView UIs, dashboards, todo apps, widgets, maps, and\n previewable tools. Use when the user wants an interactive view, canvas, widget,\n or .canvas.js file, or when a .canvas.md spec is open — even if they do not say\n \"canvas\".\n---\n\n# Eclipse Docks canvas\n\nWrite a workspace file ending in `.canvas.js`. Default-export a `CanvasView` subclass from `docks/canvas`. The host registers the tag.\n\n```js\nimport { CanvasView, html, css, nothing } from \"docks/canvas\";\n```\n\n`docks/canvas` exports `CanvasView`, the Lit module (`html`, `css`, `nothing`, `repeat`, and the rest), and the Web Awesome module (`registerIconLibrary`). `CanvasView` registers the Web Awesome elements. A canvas does not import `docks/lit` or `docks/webawesome`, and it does not extend `LitElement` or `HTMLElement`.\n\n## CanvasView\n\n| Call | Role |\n| --- | --- |\n| `this.getState(key, fallback)` | Read persisted state. Returns `fallback` when the key is missing. |\n| `this.setState(key, value)` | Write persisted state. Creates a sidecar `canvas.json` for this canvas. |\n| `this.openFile(path)` | Open a workspace path in the editor. |\n| `this.subscribe(topic, callback)` | Listen on the app event bus. The subscription ends when this canvas disconnects. |\n| `this.unsubscribe(token)` | End one subscription early. |\n| `this.publish(topic, data)` | Publish on the app event bus. |\n| `onConnect()` | The element is connected and the host is attached. Hydrate state here. |\n| `onDisconnect()` | The element is leaving the document. Release timers, streams, and object URLs. |\n\nThe host attaches after construction and before `onConnect`. From `constructor`, `getState` returns the fallback, and `setState` and `openFile` do nothing. Leave `connectedCallback` and `disconnectedCallback` on `CanvasView`. The subclass still owns `render`, `static properties`, and `static styles`.\n\nA canvas app consists of three files with the same stem: `….canvas.js`, `….canvas.json`, and `….canvas.md`. The `….canvas.md` file is the input that drives generation of the `….canvas.js` app. `setState` creates the `….canvas.json`. The canvas does not import either sidecar.\n\n```md\n# Requirements\n\nWhat the user asked for, in their words.\n\n# Spec\n\nBehavior, the data stored in canvas.json, and the UI.\n```\n\n## Hard rules\n\n1. Pure JavaScript only — no TypeScript, no decorators. Declare reactive fields with `static properties = { … }`. Initialize plain defaults in `constructor`; hydrate with `getState` in `onConnect`.\n2. Build controls and chrome with Web Awesome (`wa-button`, `wa-input`, `wa-checkbox`, `wa-card`, `wa-callout`, `wa-spinner`). A raw `<button>` or `<input>` is not a substitute. Load `eclipse-docks-webawesome` before a non-trivial UI, and use `--wa-color-*` tokens instead of hardcoded colors.\n3. Emit complete, valid JavaScript — no truncated objects or unfinished strings.\n4. The page uses `Cross-Origin-Embedder-Policy: require-corp`. A cross-origin response loads only when the request is CORS and the server sends `Access-Control-Allow-Origin`, or when the server sends `Cross-Origin-Resource-Policy: cross-origin`. An `<iframe srcdoc>` inherits this policy; `sandbox=\"allow-same-origin\"` does not exempt it.\n5. The `….canvas.md` file is the input that drives the `….canvas.js` app. When the request changes, update the markdown, then regenerate the module.\n\n## Code\n\nFollow clean code, DRY, SOLID, KISS, YAGNI, AHA, separation of concerns, fail fast, least astonishment, and the usual design patterns. Make the UI accessible and responsive. Format the file for a person to read: 2-space indentation, semicolons, double quotes, and templates and CSS broken across lines.\n\n## Minimal pattern\n\n```js\nimport { CanvasView, html, css } from \"docks/canvas\";\n\nexport default class extends CanvasView {\n static properties = {\n items: { state: true },\n draft: { state: true },\n };\n\n static styles = css`\n :host { display: block; padding: 1rem; box-sizing: border-box; }\n `;\n\n constructor() {\n super();\n this.items = [];\n this.draft = \"\";\n }\n\n onConnect() {\n const saved = this.getState(\"items\", null);\n if (Array.isArray(saved)) this.items = saved;\n }\n\n persist() {\n this.setState(\"items\", this.items);\n }\n\n addItem() {\n const input = this.renderRoot.querySelector(\"wa-input\");\n const text = String(input?.value ?? \"\").trim();\n if (!text) return;\n this.items = [...this.items, { id: crypto.randomUUID(), text, done: false }];\n this.draft = \"\";\n this.persist();\n }\n\n render() {\n return html`\n <wa-input\n placeholder=\"New item\"\n .value=${this.draft}\n @keydown=${(e) => { if (e.key === \"Enter\") this.addItem(); }}\n ></wa-input>\n <wa-button @click=${() => this.addItem()}>Add</wa-button>\n <ul>\n ${this.items.map((item) => html`<li>${item.text}</li>`)}\n </ul>\n `;\n }\n}\n```\n\n## Cross-origin resources\n\n`<img>`, `<link>`, and `<script>` tags without `crossorigin` are no-cors. A no-cors response that omits `Cross-Origin-Resource-Policy` fails with `not-set cross-origin-resource-policy`, even when it sends `Access-Control-Allow-Origin: *`. Moving that URL into an `<iframe srcdoc>` does not change the check. Subresources inside the frame follow the same rule.\n\nWhen the server only sends `Access-Control-Allow-Origin`, request the resource as CORS. `fetch()` already does. For an element, set `crossorigin=\"anonymous\"`. When a library creates the element, set its equivalent option (often `crossOrigin: \"anonymous\"`). A missing `Access-Control-Allow-Origin` header on that request is a CORS error, not the CORP error.\n\n```html\n<img crossorigin=\"anonymous\" src=\"https://cdn.example/asset.png\" />\n<script crossorigin=\"anonymous\" src=\"https://cdn.example/lib.js\"><\/script>\n```\n\nA host that sends neither header cannot be embedded in this page. Pass the string `\"anonymous\"` to a library option (`crossOrigin: \"anonymous\"`). A boolean `true` is not that option.\n\n## Styles inside the shadow root\n\nThe canvas renders in a shadow root. A `<link>` or `<style>` added to `document.head` does not apply to nodes inside that root. A widget that positions its own DOM with classes will load its images and still draw them in the wrong place until its stylesheet is on the shadow root.\n\nFetch the stylesheet as CORS and adopt it before constructing the widget:\n\n```js\nconst cssText = await (await fetch(stylesheetUrl, { mode: \"cors\" })).text();\nconst sheet = new CSSStyleSheet();\nsheet.replaceSync(cssText);\nthis.shadowRoot.adoptedStyleSheets = [...this.shadowRoot.adoptedStyleSheets, sheet];\n```\n\n`static styles` is for the host. Do not rely on a document-level stylesheet for DOM the library creates inside the shadow root.\n\n## Imports\n\n- `docks/canvas` — `CanvasView`, the Lit exports (`html`, `css`, `nothing`, `repeat`, `when`, `classMap`, and the rest), and the Web Awesome exports (`registerIconLibrary`). The elements are already registered.\n- `docks/core` — workspace files, dialogs, toasts, and commands. `openFile` does not need this import.\n- Relative imports → workspace files (compiler inlines them: JSON → value, text/CSS → string, binaries → data URL)\n\nBefore non-trivial UI or shell integration, load companion skills as needed:\n\n- `skills.load` `eclipse-docks-lit` — reactive properties, templates, directives (pure JS)\n- `skills.load` `eclipse-docks-webawesome` — `wa-*` components and layout utilities\n- `skills.load` `eclipse-docks-core` — workspace, editors, commands, dialogs, events\n\n## Workflow\n\n1. `workspace_write` the `<root>/….canvas.md` input (qualify with a root from `workspace_list`).\n2. `workspace_write` the `<root>/….canvas.js` app that this markdown drives, with the same stem in the same folder.\n3. `canvas.open` with that path — returns `ready` or the compile/runtime error.\n4. Before changing a canvas, `workspace_read` its `….canvas.md`. If the request changed, `workspace_write` that file, then `canvas.apply_source`. If that canvas is open in an editor, the editor marks itself dirty and recompiles the preview and does not save. If it is not open in an editor, the tool writes the file. Do not `workspace_write` a canvas that is already open.\n5. Optional: `canvas.capture_preview` to attach a screenshot (iframe contents may be blank).\n\nExtension-registered canvases live on `system.canvases` and open by name via `canvas.open`. That opens a read-only viewer. Do not edit it: `canvas.apply_source`, `canvas.get_source`, `canvas.set_state`, and any tools declared by that canvas are not available while it is active.\n";
3
- //#endregion
1
+ // src/skills/eclipse-docks-canvas/SKILL.md?raw
2
+ var SKILL_default = "---\nname: eclipse-docks-canvas\ndescription: >-\n Implement Eclipse Docks canvases (.canvas.js) from a plan-*.plan.md file:\n CanvasView UIs, dashboards, todo apps, widgets, maps, and previewable tools.\n Use when the user wants an interactive view, canvas, widget, or .canvas.js\n file, or when a plan file is open — even if they do not say \"canvas\".\n Plan mode writes the plan. This skill implements the module.\n---\n\n# Eclipse Docks canvas\n\nWrite a workspace file ending in `.canvas.js`. The file default-exports one `CanvasView` subclass from `docks/canvas`:\n\n```js\nexport default class App extends CanvasView {}\n```\n\nDo not use `export class` without `default`, and do not call `customElements.define`. The host registers the tag. A module without a default export does not load.\n\n```js\nimport { CanvasView, html, css, nothing } from \"docks/canvas\";\n```\n\n`docks/canvas` exports `CanvasView`, the Lit module (`html`, `css`, `nothing`, `repeat`, and the rest), and the Web Awesome module (`registerIconLibrary`). `CanvasView` registers the Web Awesome elements. A canvas does not import `docks/lit` or `docks/webawesome`, and it does not extend `LitElement` or `HTMLElement`.\n\n## CanvasView\n\n| Call | Role |\n| --- | --- |\n| `this.getState(key, fallback)` | Read persisted state. Returns `fallback` when the key is missing. |\n| `this.setState(key, value)` | Write persisted state. Creates a sidecar `canvas.json` for this canvas. |\n| `this.openFile(path)` | Open a workspace path in the editor. |\n| `this.subscribe(topic, callback)` | Listen on the app event bus. The subscription ends when this canvas disconnects. |\n| `this.unsubscribe(token)` | End one subscription early. |\n| `this.publish(topic, data)` | Publish on the app event bus. |\n| `onConnect()` | The element is connected and the host is attached. Hydrate state here. |\n| `onDisconnect()` | The element is leaving the document. Release timers, streams, and object URLs. |\n\nThe host attaches after construction and before `onConnect`. From `constructor`, `getState` returns the fallback, and `setState` and `openFile` do nothing. Leave `connectedCallback` and `disconnectedCallback` on `CanvasView`. The subclass still owns `render`, `static properties`, and `static styles`.\n\nA canvas app consists of `….canvas.js` and `….canvas.json`. The plan is a separate `plan-<short-description>.plan.md`, the same document used for every other task. Plan mode writes it with `create_plan`. It is the ground truth that drives the `….canvas.js` app. `setState` creates the `….canvas.json`. The canvas does not import the plan or the json file.\n\nThe plan uses this order. `# Requirements` is the user's request, paraphrased in correct language. Fix typos and unclear wording, and do not copy the user's text into the plan. `# Spec` is the behavior contract the module must satisfy. `# State` and `# Interface` are what generation needs and the behavior contract leaves out. `# Files` names the module and any other file Build will change.\n\n```md\n# Requirements\n\nA clean paraphrase of what the user asked for. Typos are corrected here.\n\n# Spec\n\n## Purpose\n\nOne or two sentences on what this canvas is for.\n\n## Requirements\n\n### Requirement: Add an item\n\nThe canvas SHALL append a non-empty draft to the list and clear the draft.\n\n#### Scenario: Submit a non-empty draft\n\n- WHEN the user submits a non-empty draft\n- THEN the list gains one item with that text and the draft is empty\n\n#### Scenario: Empty draft\n\n- WHEN the user submits an empty draft\n- THEN the list is unchanged\n\n# State\n\nKeys stored through `setState`, and the shape of each value.\n\n# Interface\n\nControls and layout the behavior depends on.\n\n# Files\n\n- `<stem>.canvas.js` — the module Build writes\n```\n\nSpec rules:\n\n- One behavior per `### Requirement:`. State it with SHALL or MUST.\n- Every requirement has at least one `#### Scenario:`. Every scenario has a WHEN line and a THEN line. Add AND lines for further outcomes.\n- A scenario states observable behavior: what the user does, what the canvas shows, and what it stores. Class names, Lit details, and component choices stay out of `# Spec`.\n- `# State` names each `setState` key and the shape of its value. `# Interface` names the controls and layout a scenario depends on. It is not a widget catalog. `# Files` names the module Build will write.\n\n## Hard rules\n\n1. Pure JavaScript only — no TypeScript, no decorators. The module default-exports the view (`export default class … extends CanvasView`). Do not call `customElements.define`, and do not leave the class as a named `export class` without `default`. Declare reactive fields with `static properties = { … }`. Initialize plain defaults in `constructor`; hydrate with `getState` in `onConnect`.\n2. Build controls and chrome with Web Awesome (`wa-button`, `wa-input`, `wa-checkbox`, `wa-card`, `wa-callout`, `wa-spinner`). A raw `<button>` or `<input>` is not a substitute. Load `eclipse-docks-webawesome` before a non-trivial UI, and use `--wa-color-*` tokens instead of hardcoded colors.\n3. Emit complete, valid JavaScript — no truncated objects or unfinished strings.\n4. The page uses `Cross-Origin-Embedder-Policy: require-corp`. A cross-origin response loads only when the request is CORS and the server sends `Access-Control-Allow-Origin`, or when the server sends `Cross-Origin-Resource-Policy: cross-origin`. An `<iframe srcdoc>` inherits this policy; `sandbox=\"allow-same-origin\"` does not exempt it.\n5. The `plan-….plan.md` file drives the `….canvas.js` app. When the request changes, `workspace_read` that plan and `workspace_write` the same file so `# Spec`, and `# State` or `# Interface` when those change, match the request. Then update the module so each scenario still holds. Do not create a different plan file, and do not leave the plan describing the old behavior. Do not generate the module during plan mode.\n\n## Code\n\nFollow clean code, DRY, SOLID, KISS, YAGNI, AHA, separation of concerns, fail fast, least astonishment, and the usual design patterns. Make the UI accessible and responsive. Format the file for a person to read: 2-space indentation, semicolons, double quotes, and templates and CSS broken across lines.\n\n## Minimal pattern\n\n```js\nimport { CanvasView, html, css } from \"docks/canvas\";\n\nexport default class extends CanvasView {\n static properties = {\n items: { state: true },\n draft: { state: true },\n };\n\n static styles = css`\n :host { display: block; padding: 1rem; box-sizing: border-box; }\n `;\n\n constructor() {\n super();\n this.items = [];\n this.draft = \"\";\n }\n\n onConnect() {\n const saved = this.getState(\"items\", null);\n if (Array.isArray(saved)) this.items = saved;\n }\n\n persist() {\n this.setState(\"items\", this.items);\n }\n\n addItem() {\n const input = this.renderRoot.querySelector(\"wa-input\");\n const text = String(input?.value ?? \"\").trim();\n if (!text) return;\n this.items = [...this.items, { id: crypto.randomUUID(), text, done: false }];\n this.draft = \"\";\n this.persist();\n }\n\n render() {\n return html`\n <wa-input\n placeholder=\"New item\"\n .value=${this.draft}\n @keydown=${(e) => { if (e.key === \"Enter\") this.addItem(); }}\n ></wa-input>\n <wa-button @click=${() => this.addItem()}>Add</wa-button>\n <ul>\n ${this.items.map((item) => html`<li>${item.text}</li>`)}\n </ul>\n `;\n }\n}\n```\n\n## Cross-origin resources\n\n`<img>`, `<link>`, and `<script>` tags without `crossorigin` are no-cors. A no-cors response that omits `Cross-Origin-Resource-Policy` fails with `not-set cross-origin-resource-policy`, even when it sends `Access-Control-Allow-Origin: *`. Moving that URL into an `<iframe srcdoc>` does not change the check. Subresources inside the frame follow the same rule.\n\nWhen the server only sends `Access-Control-Allow-Origin`, request the resource as CORS. `fetch()` already does. For an element, set `crossorigin=\"anonymous\"`. When a library creates the element, set its equivalent option (often `crossOrigin: \"anonymous\"`). A missing `Access-Control-Allow-Origin` header on that request is a CORS error, not the CORP error.\n\n```html\n<img crossorigin=\"anonymous\" src=\"https://cdn.example/asset.png\" />\n<script crossorigin=\"anonymous\" src=\"https://cdn.example/lib.js\"><\/script>\n```\n\nA host that sends neither header cannot be embedded in this page. Pass the string `\"anonymous\"` to a library option (`crossOrigin: \"anonymous\"`). A boolean `true` is not that option.\n\n## Styles inside the shadow root\n\nThe canvas renders in a shadow root. A `<link>` or `<style>` added to `document.head` does not apply to nodes inside that root. A widget that positions its own DOM with classes will load its images and still draw them in the wrong place until its stylesheet is on the shadow root.\n\nFetch the stylesheet as CORS and adopt it before constructing the widget:\n\n```js\nconst cssText = await (await fetch(stylesheetUrl, { mode: \"cors\" })).text();\nconst sheet = new CSSStyleSheet();\nsheet.replaceSync(cssText);\nthis.shadowRoot.adoptedStyleSheets = [...this.shadowRoot.adoptedStyleSheets, sheet];\n```\n\n`static styles` is for the host. Do not rely on a document-level stylesheet for DOM the library creates inside the shadow root.\n\n## Imports\n\n- `docks/canvas` — `CanvasView`, the Lit exports (`html`, `css`, `nothing`, `repeat`, `when`, `classMap`, and the rest), and the Web Awesome exports (`registerIconLibrary`). The elements are already registered.\n- `docks/core` — workspace files, dialogs, toasts, and commands. `openFile` does not need this import.\n- Relative imports → workspace files (compiler inlines them: JSON → value, text/CSS → string, binaries → data URL)\n\nLoad a companion skill only when the plan depends on a component or API this skill does not already specify. Do not load every companion before writing the module:\n\n- `skills.load` `eclipse-docks-lit` — reactive properties, templates, directives (pure JS)\n- `skills.load` `eclipse-docks-webawesome` — `wa-*` components and layout utilities\n- `skills.load` `eclipse-docks-core` — workspace, editors, commands, dialogs, events\n\n## Workflow\n\nPlan mode owns the spec. This skill owns the module.\n\n1. In plan mode, call `create_plan` once this turn. The first call writes `plan-<short-description>.plan.md` and lists the `<stem>.canvas.js` under `# Files`. A later change passes that file as `path` and rewrites it. Do not create a second plan for the same app, and do not write the module in plan mode.\n2. Build reads that plan once and writes the `<stem>.canvas.js` so every scenario in `# Spec` holds, then `canvas.open` with that path. The module default-exports the `CanvasView` subclass and does not call `customElements.define`. Do not list the workspace again or read the plan again. `canvas.open` returns `ready` or the compile/runtime error.\n3. Before changing a canvas, `workspace_read` its `plan-….plan.md`. If the request changed, `workspace_write` that same plan so the requirement and its scenarios match, then update the module. Then `canvas.apply_source`. If that canvas is open in an editor, the editor marks itself dirty and recompiles the preview and does not save. If it is not open in an editor, the tool writes the file. Do not `workspace_write` a canvas that is already open.\n4. Optional: `canvas.capture_preview` to attach a screenshot (iframe contents may be blank).\n\nExtension-registered canvases live on `system.canvases` and open by name via `canvas.open`. That opens a read-only viewer. Do not edit it: `canvas.apply_source`, `canvas.get_source`, `canvas.set_state`, and any tools declared by that canvas are not available while it is active.\n";
4
3
  export { SKILL_default as default };
5
4
 
6
5
  //# sourceMappingURL=SKILL.js.map
@@ -1,6 +1,5 @@
1
- //#region src/skills/eclipse-docks-core/SKILL.md?raw
2
- var SKILL_default = "---\nname: eclipse-docks-core\ndescription: >-\n Eclipse Docks core runtime from docks/core: workspace files, editors, commands,\n contributions, dialogs, toasts, settings, and events. Use when a canvas or\n extension needs to open files, register UI, run commands, or talk to the shell.\n---\n\n# Eclipse Docks core (`docks/core`)\n\n```js\nimport {\n workspaceService,\n File,\n editorRegistry,\n commandRegistry,\n registerAll,\n contributionRegistry,\n publish,\n subscribe,\n unsubscribe,\n appSettings,\n toastInfo,\n toastError,\n confirmDialog,\n promptDialog,\n filebrowserDialog,\n} from \"docks/core\";\n```\n\nAlias: `@eclipse-docks/core`. `publish`, `subscribe`, and `unsubscribe` come from this module.\n\n## Workspace\n\n```js\nconst workspace = workspaceService.getWorkspaceSync() ?? await workspaceService.getWorkspace();\nconst resource = await workspace.getResource(\"folder/note.md\");\nif (resource instanceof File) {\n const text = await resource.getContents();\n await resource.saveContents(text);\n}\n```\n\n- Paths are workspace-relative (root-prefixed in the composite workspace).\n- Create with `getResource(path, { create: true })` when the API allows.\n- A canvas opens a path in the editor with `this.openFile(path)` and does not import core for that call. Reading or writing file bytes still uses `workspaceService` and `File`.\n\n## Editors\n\n```js\nawait editorRegistry.loadEditor(file); // default handler\nawait editorRegistry.loadEditor(file, \"system.canvas-editor\");\n```\n\n`EditorInput` objects carry `title`, `key`, `data`, `component`, optional `state`. Prefer opening a `File` when one exists.\n\n## Commands\n\n```js\nregisterAll({\n command: {\n id: \"demo.ping\",\n name: \"Ping\",\n description: \"Demo command\",\n parameters: [],\n },\n handler: {\n execute: async () => \"pong\",\n },\n});\n\nawait commandRegistry.execute(\"demo.ping\", {});\n```\n\nCommands registered this way can surface as AI tools when the cognitive runtime refreshes command tools.\n\n## Contributions\n\n```js\nimport { SIDEBAR_MAIN, TOOLBAR_MAIN_RIGHT } from \"docks/core\";\n\ncontributionRegistry.registerContribution(SIDEBAR_MAIN, {\n name: \"demo.view\",\n label: \"Demo\",\n icon: \"star\",\n component: (id) => /* Lit html template for the view */ null,\n});\n```\n\nCommon slots: sidebars, panel bottom, toolbars, settings. Canvas modules contributed by extensions use `system.canvases` (`SYSTEM_CANVASES` from `@eclipse-docks/extension-canvas/contribution`). Each contribution sets a unique `settingsKey` for the state behind `getState` / `setState`. `load()` returns `{ default: CustomElementConstructor }`, or `source` is the canvas module text and the preview compiles it. A contributed canvas is not editable and opens without a toolbar.\n\n## Dialogs & toasts\n\n```js\nconst ok = await confirmDialog(\"Replace file?\");\nconst name = await promptDialog(\"Name?\");\ntoastInfo(\"Saved\");\ntoastError(\"Failed\");\n```\n\n`filebrowserDialog` for folder/file picks; `formDialog` for multi-field forms. Prefer these over ad-hoc `window.prompt` in shell-integrated code.\n\n## Settings & events\n\n```js\nawait appSettings.set(\"demo.flag\", true);\nconst flag = await appSettings.get(\"demo.flag\");\n\nconst id = subscribe(\"topic.name\", (event) => { /* … */ });\npublish(\"topic.name\", { detail: 1 });\nunsubscribe(id);\n```\n\n## Logging\n\n```js\nimport { createLogger } from \"docks/core\";\nconst log = createLogger(\"demo\");\nlog.info(\"ready\");\n```\n\n## Canvas notes\n\n- A canvas app consists of three files with the same stem: `….canvas.js`, `….canvas.json`, and `….canvas.md`. The `….canvas.md` file is the input that drives generation of the `….canvas.js` app. Persist with `this.getState` / `this.setState` inside `onConnect` and later. `setState` creates the `….canvas.json`. Use `appSettings` only to share app-wide settings. A contributed canvas stores that state under its `settingsKey` and has no `….canvas.md`.\n- `this.openFile(path)` opens a workspace path. Dialogs, toasts, and file contents stay on `docks/core`.\n- A canvas listens and publishes with `this.subscribe`, `this.unsubscribe`, and `this.publish`. It does not import those functions.\n- Cross-origin loads follow the canvas skill: CORS plus `Access-Control-Allow-Origin`, or `Cross-Origin-Resource-Policy: cross-origin`. An iframe `srcdoc` does not opt out.\n\n## Anti-patterns\n\n- Bare filenames at the composite workspace root when a durable root prefix is required\n- Calling `getState`, `setState`, or `openFile` before `onConnect`\n- Re-implementing toast/dialog with `alert` when core helpers are available\n";
3
- //#endregion
1
+ // src/skills/eclipse-docks-core/SKILL.md?raw
2
+ var SKILL_default = "---\nname: eclipse-docks-core\ndescription: >-\n Eclipse Docks core runtime from docks/core: workspace files, editors, commands,\n contributions, dialogs, toasts, settings, and events. Use when a canvas or\n extension needs to open files, register UI, run commands, or talk to the shell.\n---\n\n# Eclipse Docks core (`docks/core`)\n\n```js\nimport {\n workspaceService,\n File,\n editorRegistry,\n commandRegistry,\n registerAll,\n contributionRegistry,\n publish,\n subscribe,\n unsubscribe,\n appSettings,\n toastInfo,\n toastError,\n confirmDialog,\n promptDialog,\n filebrowserDialog,\n} from \"docks/core\";\n```\n\nAlias: `@eclipse-docks/core`. `publish`, `subscribe`, and `unsubscribe` come from this module.\n\n## Workspace\n\n```js\nconst workspace = workspaceService.getWorkspaceSync() ?? await workspaceService.getWorkspace();\nconst resource = await workspace.getResource(\"folder/note.md\");\nif (resource instanceof File) {\n const text = await resource.getContents();\n await resource.saveContents(text);\n}\n```\n\n- Paths are workspace-relative (root-prefixed in the composite workspace).\n- Create with `getResource(path, { create: true })` when the API allows.\n- A canvas opens a path in the editor with `this.openFile(path)` and does not import core for that call. Reading or writing file bytes still uses `workspaceService` and `File`.\n\n## Editors\n\n```js\nawait editorRegistry.loadEditor(file); // default handler\nawait editorRegistry.loadEditor(file, \"system.canvas-editor\");\n```\n\n`EditorInput` objects carry `title`, `key`, `data`, `component`, optional `state`. Prefer opening a `File` when one exists.\n\n## Commands\n\n```js\nregisterAll({\n command: {\n id: \"demo.ping\",\n name: \"Ping\",\n description: \"Demo command\",\n parameters: [],\n },\n handler: {\n execute: async () => \"pong\",\n },\n});\n\nawait commandRegistry.execute(\"demo.ping\", {});\n```\n\nCommands registered this way can surface as AI tools when the cognitive runtime refreshes command tools.\n\n## Contributions\n\n```js\nimport { SIDEBAR_MAIN, TOOLBAR_MAIN_RIGHT } from \"docks/core\";\n\ncontributionRegistry.registerContribution(SIDEBAR_MAIN, {\n name: \"demo.view\",\n label: \"Demo\",\n icon: \"star\",\n component: (id) => /* Lit html template for the view */ null,\n});\n```\n\nCommon slots: sidebars, panel bottom, toolbars, settings. Canvas modules contributed by extensions use `system.canvases` (`SYSTEM_CANVASES` from `@eclipse-docks/extension-canvas/contribution`). Each contribution sets a unique `settingsKey` for the state behind `getState` / `setState`. `load()` returns `{ default: CustomElementConstructor }`, or `source` is the canvas module text and the preview compiles it. A contributed canvas is not editable and opens without a toolbar.\n\n## Dialogs & toasts\n\n```js\nconst ok = await confirmDialog(\"Replace file?\");\nconst name = await promptDialog(\"Name?\");\ntoastInfo(\"Saved\");\ntoastError(\"Failed\");\n```\n\n`filebrowserDialog` for folder/file picks; `formDialog` for multi-field forms. Prefer these over ad-hoc `window.prompt` in shell-integrated code.\n\n## Settings & events\n\n```js\nawait appSettings.set(\"demo.flag\", true);\nconst flag = await appSettings.get(\"demo.flag\");\n\nconst id = subscribe(\"topic.name\", (event) => { /* … */ });\npublish(\"topic.name\", { detail: 1 });\nunsubscribe(id);\n```\n\n## Logging\n\n```js\nimport { createLogger } from \"docks/core\";\nconst log = createLogger(\"demo\");\nlog.info(\"ready\");\n```\n\n## Canvas notes\n\n- A canvas app consists of `….canvas.js` and `….canvas.json`. Its behavior contract is a `plan-….plan.md` file, the same plan document used for every other task. Plan mode writes the plan; Build generates the `….canvas.js` from it. A later change revises that same plan, then the module. Persist with `this.getState` / `this.setState` inside `onConnect` and later. `setState` creates the `….canvas.json`. Use `appSettings` only to share app-wide settings. A contributed canvas stores that state under its `settingsKey` and has no plan file.\n- `this.openFile(path)` opens a workspace path. Dialogs, toasts, and file contents stay on `docks/core`.\n- A canvas listens and publishes with `this.subscribe`, `this.unsubscribe`, and `this.publish`. It does not import those functions.\n- Cross-origin loads follow the canvas skill: CORS plus `Access-Control-Allow-Origin`, or `Cross-Origin-Resource-Policy: cross-origin`. An iframe `srcdoc` does not opt out.\n\n## Anti-patterns\n\n- Bare filenames at the composite workspace root when a durable root prefix is required\n- Calling `getState`, `setState`, or `openFile` before `onConnect`\n- Re-implementing toast/dialog with `alert` when core helpers are available\n";
4
3
  export { SKILL_default as default };
5
4
 
6
5
  //# sourceMappingURL=SKILL.js.map
@@ -1,6 +1,5 @@
1
- //#region src/skills/eclipse-docks-lit/SKILL.md?raw
1
+ // src/skills/eclipse-docks-lit/SKILL.md?raw
2
2
  var SKILL_default = "---\nname: eclipse-docks-lit\ndescription: >-\n Lit templates, reactive properties, and directives for Eclipse Docks canvases.\n Use when writing or fixing .canvas.js render methods, static properties,\n directives, or styles — pure JavaScript only (no TypeScript decorators).\n---\n\n# Eclipse Docks Lit\n\nA `.canvas.js` file imports `CanvasView` and every Lit export from `docks/canvas`. Use **pure JavaScript only** — no TypeScript, no decorators (`@property`, `@state`, `@customElement` are unavailable).\n\n## Essentials\n\n```js\nimport { CanvasView, html, css, nothing } from \"docks/canvas\";\n\nexport default class extends CanvasView {\n static properties = { count: { state: true }, label: { type: String } };\n static styles = css`:host { display: block; }`;\n\n render() {\n return this.count ? html`<span>${this.label}</span>` : nothing;\n }\n}\n```\n\n- The host registers the tag. Use `onConnect` and `onDisconnect` for setup and teardown.\n- Reactive fields: `static properties = { count: { state: true }, label: { type: String } }`.\n- Initialize defaults in `constructor` after `super()`.\n- Styles: `static styles = css\\`:host { display: block; }\\`;` (or an array of `css` results).\n- Templates: `render() { return html\\`...\\`; }` — use `nothing` for empty branches.\n- Shell UI that is not a canvas imports Lit from `docks/lit`. A canvas does not.\n\n## Property options (common)\n\n| Option | Meaning |\n| --- | --- |\n| `state: true` | Internal reactive state (not an attribute) |\n| `type: String` / `Number` / `Boolean` / `Object` / `Array` | Attribute reflection helpers |\n| `attribute: false` | Do not mirror to an attribute |\n| `reflect: true` | Reflect property → attribute |\n\nAssign **new** values for objects/arrays (`this.items = [...this.items, next]`), do not mutate in place if you need an update.\n\n## Directives\n\nNamed exports from `docks/canvas` (the same module as `@eclipse-docks/core/externals/lit`):\n\n```js\nimport { repeat, when, classMap, styleMap, ifDefined, live, ref, keyed } from \"docks/canvas\";\n```\n\n- `repeat(items, (i) => i.id, (i) => html\\`...\\`)` for keyed lists\n- `when(cond, () => html\\`...\\`)` / `nothing` for conditionals\n- `classMap({ active: isOn })`, `styleMap({ width: \"1rem\" })`\n- `live(value)` when binding to form controls that can diverge from the property\n- Prefer `.value=${x}` (property) over `value=${x}` (attribute) for form controls\n\n## Events in templates\n\n```js\nhtml`<wa-button @click=${this.onSave}>Save</wa-button>`\n```\n\nUse arrow functions or bound methods so `this` stays the element. For `wa-*` props and events, follow `eclipse-docks-webawesome`.\n\n## Signals (optional)\n\n`docks/canvas` also exports the signal helpers `signal`, `computed`, `watch`, `SignalWatcher`, and `withWatch`. Prefer `static properties` for simple canvas state unless you already use signals.\n\n## Anti-patterns\n\n- Extending `LitElement` or calling `customElements.define` in a `.canvas.js` file\n- Decorators or `.ts` syntax in `.canvas.js`\n- Implementing `connectedCallback` or `disconnectedCallback` on a canvas\n- Mutating arrays/objects in place without reassignment\n- Relying on `this` inside a non-arrow inline handler incorrectly\n";
3
- //#endregion
4
3
  export { SKILL_default as default };
5
4
 
6
5
  //# sourceMappingURL=SKILL.js.map
@@ -1,6 +1,5 @@
1
- //#region src/skills/eclipse-docks-webawesome/SKILL.md?raw
1
+ // src/skills/eclipse-docks-webawesome/SKILL.md?raw
2
2
  var SKILL_default = "---\nname: eclipse-docks-webawesome\ndescription: >-\n Web Awesome UI in Eclipse Docks via docks/webawesome. Use when building\n buttons, inputs, selects, checkboxes, dialogs, forms, icons, or layout\n utilities in canvases or Docks UI. Fetch the official component page before\n writing wa-* markup.\n---\n\n# Eclipse Docks Web Awesome\n\nA canvas extends `CanvasView`. That registers the components, the theme, and the `docks` icon library, and it exports the Web Awesome module. Import `registerIconLibrary` from `docks/canvas`. Do not import `docks/webawesome` from a `.canvas.js` file. Custom elements take a closing tag: `<wa-input></wa-input>`.\n\nShell UI outside a canvas uses `docks/webawesome`:\n\n```js\nimport \"docks/webawesome\";\nimport { registerIconLibrary } from \"docks/webawesome\";\n```\n\n## Look up the component, then write it\n\nFetch the official page for each tag before using its props, slots, or events. Use that page's events table. Ignore the overview line that says to listen for `wa-input` or `wa-change`.\n\n- Index: https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3/dist/skills/webawesome/SKILL.md\n- One component: `https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3/dist/skills/webawesome/references/components/<name>.md` (`button`, `input`, `checkbox`, `select`, …)\n- Which component: https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3/dist/skills/webawesome/references/choosing-components.md\n- Layout, tokens, theming: https://cdn.jsdelivr.net/npm/@awesome.me/webawesome@3/dist/skills/webawesome-design/SKILL.md\n\nBind properties (`.value`, `.checked`). Listen for the events that page lists.\n\n## `wa-input` and `wa-number-input`\n\nTheir pages list an `input` event. This build copies keystrokes onto `.value` and does not re-dispatch `input`, so a host `@input` listener never runs. `change` fires on blur, after a click handler.\n\nRead `.value` in the click or Enter handler. For live text, use `@keyup` and assign `e.target.value`. `wa-textarea` does re-dispatch `input`.\n\n## Docks\n\n- Shell icons: `<wa-icon library=\"docks\" name=\"…\"></wa-icon>`. Other icons use the names on the icon page.\n- Color comes from `--wa-color-*` tokens so the loaded theme covers light and dark.\n- Shell toasts: `toastInfo` / `toastError` from `docks/core` when that module is already loaded.\n";
3
- //#endregion
4
3
  export { SKILL_default as default };
5
4
 
6
5
  //# sourceMappingURL=SKILL.js.map
@@ -1,5 +1,5 @@
1
1
  import { File, workspaceService } from "@eclipse-docks/core";
2
- //#region src/workspace-file.ts
2
+ // src/workspace-file.ts
3
3
  var TEXT_EXT = /* @__PURE__ */ new Set([
4
4
  "js",
5
5
  "mjs",
@@ -38,7 +38,6 @@ async function writeWorkspaceFile(path, contents) {
38
38
  await resource.saveContents(contents);
39
39
  return "ready";
40
40
  }
41
- //#endregion
42
41
  export { readWorkspaceFile, writeWorkspaceFile };
43
42
 
44
43
  //# sourceMappingURL=workspace-file.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-docks/extension-canvas",
3
- "version": "0.8.13",
3
+ "version": "0.8.15",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",