dsh-open-artifact 0.14.4 → 0.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,23 @@ agent plugins. Since 0.9.0 they all share one version; before that `dsh-open-art
6
6
  Each entry is written from the commits since the previous tag (`node scripts/changelog.mjs` lists them); see
7
7
  [Releasing](README.md#releasing).
8
8
 
9
+ ## [0.14.5] - 2026-11-23
10
+
11
+ Slides preserves polygon clips on panels and photos in the editor and exports, including editable PowerPoint shapes and picture crops.
12
+
13
+ ### Added
14
+
15
+ - Slides accepts `clip-path: polygon(...)` in inline styles and shared `deck.css`, with px, percentage and mixed `calc()` coordinates. Shared stylesheet tokens can set fixed corner cuts that stay the same size as a frame is resized.
16
+ - Plain clipped panels export to PowerPoint as editable custom shapes, and clipped photos as pictures with editable crops and polygon outlines. HTML, PDF and PNG retain the CSS clip; clipped containers with children, crossing outlines, or clips combined with borders, shadows, filters or rounded corners become pictures in PowerPoint and are listed in the export notes. Thanks to @rodriguezst for PR #18.
17
+
18
+ ### Fixed
19
+
20
+ - Unsupported clip paths now explain what to use instead: `border-radius` for rounded or round frames, `polygon(...)` or an SVG for other outlines, and the border box as the polygon reference.
21
+
22
+ ### Integrators
23
+
24
+ - The Harness API, Shell and wake messages, harness kit, stdio bridge and shipped profiles are unchanged.
25
+
9
26
  ## [0.14.4] - 2026-11-23
10
27
 
11
28
  Artifacts load inside Electron apps whose windows use `file://`, agents can write long formulas to Sheets, and Motion films can play captioned cuts of a video's own sound.
@@ -545,6 +562,7 @@ One version for every package, with Docs and Sheets in every plugin.
545
562
  - Plugins for Claude Code, Codex, Cursor, Copilot, ChatGPT and DeepSeek Harness.
546
563
  - English and Chinese READMEs, under Apache-2.0.
547
564
 
565
+ [0.14.5]: https://github.com/JimLiu/open-artifact/compare/v0.14.4...v0.14.5
548
566
  [0.14.4]: https://github.com/JimLiu/open-artifact/compare/v0.14.3...v0.14.4
549
567
  [0.14.3]: https://github.com/JimLiu/open-artifact/compare/v0.14.2...v0.14.3
550
568
  [0.14.2]: https://github.com/JimLiu/open-artifact/compare/v0.14.1...v0.14.2
package/lib/client.js CHANGED
@@ -1,4 +1,4 @@
1
- // dsh-open-artifact 0.14.4: the DSH plugin (browser half). Built by scripts/build.mjs; do not edit.
1
+ // dsh-open-artifact 0.14.5: the DSH plugin (browser half). Built by scripts/build.mjs; do not edit.
2
2
  window.__ModuleLoader__.load({
3
3
  id: "dsh-open-artifact",
4
4
  factory: (require) => {
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // dsh-open-artifact 0.14.4: the DSH plugin (server half). Built by scripts/build.mjs; do not edit.
1
+ // dsh-open-artifact 0.14.5: the DSH plugin (server half). Built by scripts/build.mjs; do not edit.
2
2
 
3
3
  // packages/harness-kit/src/daemon.ts
4
4
  import { spawn } from "node:child_process";
@@ -1411,7 +1411,7 @@ import { join as join3, resolve as resolve3 } from "node:path";
1411
1411
  // packages/harness-kit/package.json
1412
1412
  var package_default = {
1413
1413
  name: "@open-artifact/harness-kit",
1414
- version: "0.14.4",
1414
+ version: "0.14.5",
1415
1415
  private: true,
1416
1416
  type: "module",
1417
1417
  description: "The SDK an agent app uses to integrate Open Artifact: find or start the local daemon, hold a Harness API connection that reconnects, register the tools, take comment wakes and page opens, and follow the artifacts its sessions make.",
@@ -1421,7 +1421,7 @@ var package_default = {
1421
1421
  "./embed": "./src/embed/index.ts"
1422
1422
  },
1423
1423
  dependencies: {
1424
- "@open-artifact/protocol": "0.14.4"
1424
+ "@open-artifact/protocol": "0.14.5"
1425
1425
  },
1426
1426
  sideEffects: false,
1427
1427
  engines: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-open-artifact",
3
- "version": "0.14.4",
3
+ "version": "0.14.5",
4
4
  "description": "Open Artifact in DeepSeek Harness: the Artifact, ArtifactData and ArtifactComments tools, comments on artifact pages waking the session that owns them, the Open Artifact page in the sidebar listing the open-artifact library, artifacts the agent opens shown in the session's Browser, and /open-artifact <type> to make a new one.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -2,7 +2,7 @@
2
2
  name: open-artifact
3
3
  description: Make an Open Artifact (a slide deck, a design canvas, a whiteboard, a data dashboard, a doc, a short animated motion piece, …) as a folder of files that opens as a live local page where the person views, edits, comments and exports, with their comments coming back to you. Use when the person types `/open-artifact <type> <what to make>`, or asks for something they will look at closely, keep, change, comment on or present - a presentation, pitch or talk deck; app screens, a mockup, a landing page, a poster, flyer or graphic, or "a few options" to look at; a brainstorm or retro board, a flowchart or an architecture sketch; a dashboard, metrics page, KPI tracker or recurring report from their data; a document, report, proposal, plan, spec, memo, notes or other writing to keep, share or comment on; a short animated video, an explainer, a promo, motion graphics or a GIF - or asks to keep or share a diagram you drew. Not for answers read once, code, or a file in a format they named.
4
4
  argument-hint: <type> <what to make>
5
- generated-by: open-artifact 0.14.4
5
+ generated-by: open-artifact 0.14.5
6
6
  etag: 04b07477a4f91b38
7
7
  ---
8
8
 
@@ -202,6 +202,11 @@ any one `<div>`. `hidden` on the section skips the slide when presenting. `refer
202
202
  drops on read and its caps; `reference/source-decks.md` how a slide with classes is read (the cascade, values,
203
203
  generated content, tags, the stylesheet): read both before your first slide.
204
204
 
205
+ For angular panels and images, write `clip-path:polygon(...)` on a `<div>`, `<x-shape>` or `<img>`.
206
+ Use px, percentages and `calc(N% ± Npx)` for triangles, hexagons, concave outlines and fixed corner
207
+ cuts. Put a picture's polygon on the `<img>` to keep its crop editable in PowerPoint. Only `polygon()` is
208
+ read: for rounded or round frames use `border-radius`. See `reference/images.md` for examples and export behavior.
209
+
205
210
  One content slide's file, `project/slides/plan.html`, with `.cards`, `.card`, `.cards img` and `.source` in
206
211
  `project/deck.css`:
207
212
 
@@ -2,7 +2,7 @@
2
2
  "slug": "slides",
3
3
  "name": "Slides",
4
4
  "title": "Slides (presentation deck)",
5
- "description": "Presentation decks as local files: project/deck.json holds the title, slide order, outline and typefaces, and each slide is an HTML file on a 16:9 or 4:3 canvas. Slides can share a deck stylesheet or use inline styles. Edited in a local page with a slide rail, an overview of every slide by section, speaker notes, builds, transitions and a full-screen presenter. Can install a design system and use its colors, type and fonts.",
5
+ "description": "Presentation decks as local files: project/deck.json holds the title, slide order, outline and typefaces, and each slide is an HTML file on a 16:9 or 4:3 canvas. Slides can share a deck stylesheet or use inline styles, with polygon clips on panels and photos that carry into exports. Edited in a local page with a slide rail, an overview of every slide by section, speaker notes, builds, transitions and a full-screen presenter. Can install a design system and use its colors, type and fonts.",
6
6
  "summary": "A presentation deck: 16:9 or 4:3 slides with speaker notes, builds and a presenter.",
7
7
  "artifactTitle": "Untitled deck",
8
8
  "category": "Presentations",
@@ -84,6 +84,7 @@ border: [LEN 0–16, else 1] solid | dashed | dotted | double | none [COLOR] —
84
84
  border-top -right -bottom -left: as border · div, text, img, table, x-icon; hr: border-top = its stroke
85
85
  border-width, border-style: alone on x-connector only (elsewhere write border)
86
86
  border-radius: LEN | PCT (≤50%) ×1–4 (TL TR BR BL; no / form) · div, text, img, table; x-shape rect/rounded
87
+ clip-path: none | polygon([nonzero|evenodd,] X Y, …) · div, img, x-shape; 3–128 points in px, %, or calc(N% ± Npx), relative to the border box
87
88
  box-shadow: [inset] LEN LEN [LEN [LEN]] COLOR, … ≤8 (x y ±64, blur ≤160, spread ±32) · div, text, img, table, x-icon, x-shape
88
89
  opacity: N 0–1 | PCT · any but span, cells, tr
89
90
  transform: translate(LEN[, LEN]) | translateX|Y(LEN | -50%), rotate(ANGLE), scale(N 0.5–2), skew[X|Y](ANGLE ±60) — any subset, in that order, each once · any but section, span, cells, tr, x-connector; x-shape: rotate only
@@ -130,6 +130,41 @@ by PowerPoint's own approximations: `dashed` and `dotted` map to its dash styles
130
130
  the notes shown with the download: a `double` border (drawn single), a shadow's spread, an `inset` or layered
131
131
  shadow, a blend mode, a `filter`.
132
132
 
133
+ ## Polygon clipping
134
+
135
+ Give a panel or picture frame a `clip-path:polygon(...)`. The points use the border box as their
136
+ reference. Percentage coordinates can describe triangles, hexagons, arrows and concave outlines.
137
+ Mix percentages and px with `calc()` to keep a fixed distance from an edge.
138
+
139
+ ```css
140
+ :root { --cut: 12px; }
141
+ .hexagon {
142
+ clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
143
+ }
144
+ .chamfer {
145
+ clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
146
+ }
147
+ ```
148
+
149
+ ```html
150
+ <img class="chamfer" src="/_blob/<id>" alt="The office" style="width:640px;height:400px;object-fit:cover">
151
+ ```
152
+
153
+ The chamfer cuts the upper-right corner by 12px along each edge at any frame size. The same rule
154
+ can clip a panel or its contents on a `<div>`. Percentages move with the box; px distances stay
155
+ fixed when the box is resized in Slides. A `style` attribute takes no `var()`: in an inline deck,
156
+ write the polygon there with `12px` in place of the variable.
157
+
158
+ Only `polygon()` is read, with the border box as its reference (`border-box` may be written, no other
159
+ box). For a rounded or round frame use `border-radius`; `inset()`, `circle()` and `ellipse()` are
160
+ dropped. Draw any other outline in an `<svg>`.
161
+
162
+ Standalone HTML, PDF and PNG keep the CSS clip. Editable PowerPoint draws a plain filled panel as a
163
+ custom shape and a clipped `<img>` as a picture with an editable crop, cut to the polygon. A clipped
164
+ `<div>` that holds children (its text included), a polygon that crosses itself, and a clip together
165
+ with a border, a shadow, a filter or rounded corners become one picture, listed in the export notes.
166
+ Resizing an exported custom shape in PowerPoint scales its outline with it.
167
+
133
168
  ## On the page
134
169
 
135
170
  The Insert menu's **Image or video…** and dropping a file onto a slide both upload the file and place
@@ -85,8 +85,10 @@ it):
85
85
  - Grid: `grid-template-areas`, `grid-area`, `grid-auto-*`, named lines, line numbers, `minmax()`,
86
86
  `auto-fill` → tracks of px, `fr`, `auto` or `repeat(N, …)`, cells in source order, `span N` to widen
87
87
  one.
88
- - Clipping: `clip-path`, `mask` → `border-radius` with `overflow:hidden`, or an `<svg>`. `overflow:auto`
89
- or `scroll` → `hidden`, on a `<div>`.
88
+ - Clipping uses `clip-path:polygon(...)` on a `<div>`, `<img>` or `<x-shape>`. Coordinates accept px,
89
+ percentages and `calc(N% ± Npx)`. Shared `var()` values can supply px cuts (`images.md`).
90
+ `mask`, and `inset()`, `circle()`, `ellipse()` or any other `clip-path` shape → `border-radius`, or an
91
+ `<svg>`. Use `overflow:hidden` on a `<div>` for box overflow.
90
92
  - Fills: `url()` backgrounds, `background-size`, `background-position` → an `<img>` (a `url()` fills
91
93
  only text, with `background-clip:text`). `conic-gradient` or a second gradient layer → one
92
94
  gradient, or an `<svg>`. `object-position`.
@@ -2118,7 +2118,7 @@ var init_package = __esm({
2118
2118
  "packages/daemon/package.json"() {
2119
2119
  package_default = {
2120
2120
  name: "@open-artifact/daemon",
2121
- version: "0.14.4",
2121
+ version: "0.14.5",
2122
2122
  private: true,
2123
2123
  type: "module",
2124
2124
  description: "The Open Artifact daemon (`open-artifact`): type registry, artifact library, type servers, agent tools, wake routing, the Harness API, MCP and the Shell.",
@@ -2130,8 +2130,8 @@ var init_package = __esm({
2130
2130
  "./client": "./src/client.ts"
2131
2131
  },
2132
2132
  dependencies: {
2133
- "@open-artifact/harness-kit": "0.14.4",
2134
- "@open-artifact/protocol": "0.14.4"
2133
+ "@open-artifact/harness-kit": "0.14.5",
2134
+ "@open-artifact/protocol": "0.14.5"
2135
2135
  },
2136
2136
  license: "Apache-2.0"
2137
2137
  };
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.14.4",
2
+ "version": "0.14.5",
3
3
  "protocols": {
4
4
  "min": 1,
5
5
  "max": 1
@@ -4024,10 +4024,10 @@ function checkLook(look, report) {
4024
4024
  if (!isPlainObject(look.tweaks)) warn("tweaks is the Style panel\u2019s {palette, page, corners, font, size}; it is ignored.");
4025
4025
  else
4026
4026
  for (const [key, value2] of Object.entries(look.tweaks)) {
4027
- const valid = LOOK_TWEAKS[key];
4028
- if (valid === void 0) warn(`tweaks.${key} isn\u2019t read (tweaks are ${Object.keys(LOOK_TWEAKS).join(", ")}).`);
4027
+ const valid2 = LOOK_TWEAKS[key];
4028
+ if (valid2 === void 0) warn(`tweaks.${key} isn\u2019t read (tweaks are ${Object.keys(LOOK_TWEAKS).join(", ")}).`);
4029
4029
  else if (value2 === null) continue;
4030
- else if (!valid(value2)) warn(`tweaks.${key} ${JSON.stringify(value2)} isn\u2019t one the Style panel offers; it is ignored.`);
4030
+ else if (!valid2(value2)) warn(`tweaks.${key} ${JSON.stringify(value2)} isn\u2019t one the Style panel offers; it is ignored.`);
4031
4031
  else tweaks++;
4032
4032
  }
4033
4033
  }
@@ -22839,8 +22839,8 @@ function replaceConditionalFormats(view2, inPlaceOf, rules2, context) {
22839
22839
  const answer = context.answer({ kind: "readConditionalFormatsInIds", sheetId: view2.sheetId, written: rules2 });
22840
22840
  const read = isObject2(answer.read) ? answer.read : answer;
22841
22841
  if (read.kind !== "rules" || !Array.isArray(read.rules)) {
22842
- const refusal = read.kind === "notAList" && typeof read.refusal === "string" ? read.refusal : "conditionalFormatsHaveProblems";
22843
- throw new AgentError(refusal === "tooManyConditionalFormats" ? refusal : "conditionalFormatsHaveProblems", "The list cannot be read as rules of the sheet: data.read says what is wrong with each part. Write the whole list again.", { read });
22842
+ const refusal2 = read.kind === "notAList" && typeof read.refusal === "string" ? read.refusal : "conditionalFormatsHaveProblems";
22843
+ throw new AgentError(refusal2 === "tooManyConditionalFormats" ? refusal2 : "conditionalFormatsHaveProblems", "The list cannot be read as rules of the sheet: data.read says what is wrong with each part. Write the whole list again.", { read });
22844
22844
  }
22845
22845
  ids = read.rules;
22846
22846
  }
@@ -24152,7 +24152,7 @@ var init_store2 = __esm({
24152
24152
  RESCAN_MS = 1e3;
24153
24153
  CALCULATION_MS = 2e4;
24154
24154
  COLORS = ["#3987e5", "#d95926", "#0ca30c", "#8173e3", "#d55181", "#199e70", "#b77700", "#e34948"];
24155
- refused = (refusal) => ({ kind: "refused", refusal });
24155
+ refused = (refusal2) => ({ kind: "refused", refusal: refusal2 });
24156
24156
  SheetStore = class {
24157
24157
  root;
24158
24158
  dir;
@@ -24527,7 +24527,7 @@ var init_store2 = __esm({
24527
24527
  /** `POST send`: one of a page's edits, saved as the next revision or refused. */
24528
24528
  send(request, viewer) {
24529
24529
  this.rescan();
24530
- const refuse = (refusal) => ({ kind: "refused", refusal });
24530
+ const refuse = (refusal2) => ({ kind: "refused", refusal: refusal2 });
24531
24531
  if (!viewer.canEdit) return refuse("notWriter");
24532
24532
  if (!isObject2(request)) return refuse("unreadableEdit");
24533
24533
  if ("edits" in request) return this.sendEdits(request, viewer);
@@ -24581,7 +24581,7 @@ var init_store2 = __esm({
24581
24581
  }
24582
24582
  /** `POST widget`: a chart widget's create, read, projection, draft or delete. */
24583
24583
  widget(request, viewer) {
24584
- const refuse = (refusal, extra = {}) => ({ kind: "refused", refusal, ...extra });
24584
+ const refuse = (refusal2, extra = {}) => ({ kind: "refused", refusal: refusal2, ...extra });
24585
24585
  if (!isObject2(request)) return refuse("unreadableRequest");
24586
24586
  this.rescan();
24587
24587
  switch (request.verb) {
@@ -24978,8 +24978,8 @@ var init_store2 = __esm({
24978
24978
  const answer = session.answer(xlsxRequest(this.describedCharts(workbook, session)));
24979
24979
  const parts = xlsxPartsOf(answer);
24980
24980
  if (!parts) {
24981
- const refusal = String(answer.refusal ?? "xlsxNotWritten");
24982
- throw SheetRefusalError.of(new AgentError(refusal, refusal === "noSheetToWrite" ? "The Sheet has no sheets yet: write some cells first." : `The engine did not write the workbook as a file (${refusal}).`));
24981
+ const refusal2 = String(answer.refusal ?? "xlsxNotWritten");
24982
+ throw SheetRefusalError.of(new AgentError(refusal2, refusal2 === "noSheetToWrite" ? "The Sheet has no sheets yet: write some cells first." : `The engine did not write the workbook as a file (${refusal2}).`));
24983
24983
  }
24984
24984
  return { filename: xlsxFileName(this.meta.title, firstSheet), bytes: zipXlsxParts(parts), notCarriedOver: excelDifferences(answer.notCarriedOver) };
24985
24985
  }
@@ -26648,9 +26648,9 @@ function applyOps(source, ops, session, options = {}) {
26648
26648
  try {
26649
26649
  results.push(new Writer(doc, normalizeOp(raw), session, used, options, notices, pruned, decisions, proposed2).run());
26650
26650
  } catch (error) {
26651
- const refusal = error instanceof MarkdownError ? new Refusal(error.code, error.message) : error;
26652
- if (refusal instanceof Refusal && refusal.opIndex === void 0) refusal.opIndex = index;
26653
- throw refusal;
26651
+ const refusal2 = error instanceof MarkdownError ? new Refusal(error.code, error.message) : error;
26652
+ if (refusal2 instanceof Refusal && refusal2.opIndex === void 0) refusal2.opIndex = index;
26653
+ throw refusal2;
26654
26654
  }
26655
26655
  });
26656
26656
  if (doc.blocks.length === 0) throw new Refusal("last_block", "a tab keeps at least one block; replace the last block instead of deleting it");
@@ -30293,6 +30293,8 @@ var init_limits = __esm({
30293
30293
  group: 24,
30294
30294
  /** Stops in one gradient. */
30295
30295
  gradientStops: 8,
30296
+ /** Vertices in one clip-path polygon. */
30297
+ polygonVertices: 128,
30296
30298
  /** Layers of one box-shadow / text-shadow. */
30297
30299
  shadows: 8,
30298
30300
  /** Tracks of one grid template. */
@@ -31481,6 +31483,74 @@ var init_values = __esm({
31481
31483
  }
31482
31484
  });
31483
31485
 
31486
+ // packages/slides-core/src/css/clip-path.ts
31487
+ function coordinate(text) {
31488
+ const length2 = LENGTH3.exec(text);
31489
+ if (length2) {
31490
+ const value2 = Number(length2[1]);
31491
+ if (!valid(value2) || !length2[2] && value2 !== 0) return void 0;
31492
+ return length2[2] === "%" ? { percent: value2, px: 0 } : { percent: 0, px: value2 };
31493
+ }
31494
+ const calc = CALC.exec(text);
31495
+ if (!calc || calc[2] === calc[5]) return void 0;
31496
+ const first = Number(calc[1]);
31497
+ const second = Number(calc[4]) * (calc[3] === "-" ? -1 : 1);
31498
+ if (!valid(first) || !valid(second)) return void 0;
31499
+ return calc[2] === "%" ? { percent: first, px: second } : { percent: second, px: first };
31500
+ }
31501
+ function refusal(value2) {
31502
+ const box = /(?:^|\s)((?:padding|content|margin|fill|stroke|view)-box)(?:\s|$)/.exec(value2)?.[1];
31503
+ if (box) return `clip-path polygons are relative to the border box; drop ${box}`;
31504
+ const shape = /^(?:border-box\s+)?([a-z-]+)\(/.exec(value2)?.[1];
31505
+ if (shape === "inset" || shape === "circle" || shape === "ellipse") {
31506
+ return `clip-path ${shape}() is not supported; use border-radius, or write the outline as polygon(...)`;
31507
+ }
31508
+ return "clip-path takes none or polygon(...); draw other outlines in an <svg>";
31509
+ }
31510
+ function parseClipPath(raw) {
31511
+ const value2 = raw.trim().toLowerCase();
31512
+ if (value2 === "none") return ok(null);
31513
+ const match = /^polygon\(([\s\S]*)\)(?:\s+border-box)?$/.exec(value2) ?? /^border-box\s+polygon\(([\s\S]*)\)$/.exec(value2);
31514
+ if (!match) return reject(refusal(value2));
31515
+ const parts = splitTopLevel(match[1], ",");
31516
+ const rule = parts[0] === "evenodd" ? "evenodd" : "nonzero";
31517
+ if (parts[0] === "evenodd" || parts[0] === "nonzero") parts.shift();
31518
+ if (parts.length < 3 || parts.length > LIMITS.polygonVertices) {
31519
+ return reject(`clip-path polygon needs 3\u2013${LIMITS.polygonVertices} vertices`);
31520
+ }
31521
+ const points = [];
31522
+ for (const part of parts) {
31523
+ const pair = splitTopLevel(part, "space");
31524
+ const x = pair.length === 2 ? coordinate(pair[0]) : void 0;
31525
+ const y = pair.length === 2 ? coordinate(pair[1]) : void 0;
31526
+ if (!x || !y) return reject("clip-path polygon vertices need x and y in px, %, or calc(N% \xB1 Npx)");
31527
+ points.push([x, y]);
31528
+ }
31529
+ return ok({ rule, points });
31530
+ }
31531
+ function formatCoordinate({ percent, px: px2 }) {
31532
+ if (!percent) return px2 ? `${px2}px` : "0";
31533
+ const relative4 = `${percent}%`;
31534
+ return px2 ? `calc(${relative4} ${px2 < 0 ? "-" : "+"} ${Math.abs(px2)}px)` : relative4;
31535
+ }
31536
+ function formatClipPath(polygon) {
31537
+ if (!polygon) return "none";
31538
+ const points = polygon.points.map(([x, y]) => `${formatCoordinate(x)} ${formatCoordinate(y)}`).join(", ");
31539
+ return `polygon(${polygon.rule === "evenodd" ? "evenodd, " : ""}${points})`;
31540
+ }
31541
+ var NUMBER3, LENGTH3, CALC, valid;
31542
+ var init_clip_path = __esm({
31543
+ "packages/slides-core/src/css/clip-path.ts"() {
31544
+ "use strict";
31545
+ init_limits();
31546
+ init_values();
31547
+ NUMBER3 = String.raw`[+-]?(?:\d*\.\d+|\d+)(?:e[+-]?\d+)?`;
31548
+ LENGTH3 = new RegExp(`^(${NUMBER3})(px|%)?$`);
31549
+ CALC = new RegExp(`^calc\\(\\s*(${NUMBER3})(px|%)\\s+([+-])\\s+(${NUMBER3})(px|%)\\s*\\)$`);
31550
+ valid = (value2) => Math.abs(value2) <= Number.MAX_SAFE_INTEGER;
31551
+ }
31552
+ });
31553
+
31484
31554
  // packages/slides-core/src/css/properties.ts
31485
31555
  function isCssProperty(name) {
31486
31556
  return PROPERTY_SET.has(name);
@@ -31946,6 +32016,11 @@ function parseDeclaration(name, raw, ctx) {
31946
32016
  if (ctx.element === "shape" && ctx.shape !== "rect" && ctx.shape !== "rounded") return fail("border-radius applies to rect shapes only");
31947
32017
  if (!(isDiv(ctx) || text || ["img", "table", "shape"].includes(ctx.element))) return notHere();
31948
32018
  return from(property, parseRadius(value2));
32019
+ case "clip-path": {
32020
+ if (!(isDiv(ctx) || ctx.element === "img" || ctx.element === "shape")) return notHere();
32021
+ const clip2 = parseClipPath(value2);
32022
+ return clip2.ok ? done(property, formatClipPath(clip2.value)) : fail(clip2.reason);
32023
+ }
31949
32024
  case "box-shadow": {
31950
32025
  if (!(isDiv(ctx) || text || ["img", "table", "icon", "shape"].includes(ctx.element))) return notHere();
31951
32026
  const s = parseShadows(value2);
@@ -32331,6 +32406,7 @@ var CSS_PROPERTIES, PROPERTY_SET, TEXTUAL, CONTAINERS, ALIGN, ALIGN_ALIASES, LIS
32331
32406
  var init_properties = __esm({
32332
32407
  "packages/slides-core/src/css/properties.ts"() {
32333
32408
  "use strict";
32409
+ init_clip_path();
32334
32410
  init_color();
32335
32411
  init_values();
32336
32412
  CSS_PROPERTIES = [
@@ -32393,6 +32469,7 @@ var init_properties = __esm({
32393
32469
  "border-width",
32394
32470
  "border-style",
32395
32471
  "border-radius",
32472
+ "clip-path",
32396
32473
  "box-shadow",
32397
32474
  "opacity",
32398
32475
  "transform",
@@ -35588,6 +35665,7 @@ var init_src12 = __esm({
35588
35665
  init_video();
35589
35666
  init_color();
35590
35667
  init_values();
35668
+ init_clip_path();
35591
35669
  init_properties();
35592
35670
  init_compile();
35593
35671
  init_serialize();
@@ -37622,18 +37700,18 @@ var init_named_colors = __esm({
37622
37700
  });
37623
37701
 
37624
37702
  // packages/motion-core/src/recolor/color.ts
37625
- var NUMBER3, RGB_FUNCTION_PATTERN, HSL_FUNCTION_PATTERN;
37703
+ var NUMBER4, RGB_FUNCTION_PATTERN, HSL_FUNCTION_PATTERN;
37626
37704
  var init_color2 = __esm({
37627
37705
  "packages/motion-core/src/recolor/color.ts"() {
37628
37706
  "use strict";
37629
37707
  init_named_colors();
37630
- NUMBER3 = String.raw`[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?`;
37708
+ NUMBER4 = String.raw`[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?`;
37631
37709
  RGB_FUNCTION_PATTERN = new RegExp(
37632
- String.raw`^rgba?\(\s*(${NUMBER3}%?)(?:\s*,\s*|\s+)(${NUMBER3}%?)(?:\s*,\s*|\s+)(${NUMBER3}%?)(?:\s*[,/]\s*(${NUMBER3}%?))?\s*\)$`,
37710
+ String.raw`^rgba?\(\s*(${NUMBER4}%?)(?:\s*,\s*|\s+)(${NUMBER4}%?)(?:\s*,\s*|\s+)(${NUMBER4}%?)(?:\s*[,/]\s*(${NUMBER4}%?))?\s*\)$`,
37633
37711
  "i"
37634
37712
  );
37635
37713
  HSL_FUNCTION_PATTERN = new RegExp(
37636
- String.raw`^hsla?\(\s*(${NUMBER3})(deg|turn|rad|grad)?(?:\s*,\s*|\s+)(${NUMBER3})%(?:\s*,\s*|\s+)(${NUMBER3})%(?:\s*[,/]\s*(${NUMBER3}%?))?\s*\)$`,
37714
+ String.raw`^hsla?\(\s*(${NUMBER4})(deg|turn|rad|grad)?(?:\s*,\s*|\s+)(${NUMBER4})%(?:\s*,\s*|\s+)(${NUMBER4})%(?:\s*[,/]\s*(${NUMBER4}%?))?\s*\)$`,
37637
37715
  "i"
37638
37716
  );
37639
37717
  }
@@ -39118,7 +39196,7 @@ function derivedElementId(element, attempt) {
39118
39196
  function normalizeStickerOn(on) {
39119
39197
  const parts = Array.isArray(on) && (on.length === 5 || on.length === 7) ? on : [];
39120
39198
  const [hostId, hostX, hostY, stickerX, stickerY, offX, offY] = parts;
39121
- const exact2 = (value2) => coordinate(value2) === value2;
39199
+ const exact2 = (value2) => coordinate2(value2) === value2;
39122
39200
  if (!(typeof hostId === "string" && ELEMENT_ID_PATTERN.test(hostId) && exact2(hostX) && exact2(hostY) && exact2(stickerX) && exact2(stickerY))) return {};
39123
39201
  if (offX === void 0) return { on: [hostId, hostX, hostY, stickerX, stickerY] };
39124
39202
  return exact2(offX) && exact2(offY) ? { on: [hostId, hostX, hostY, stickerX, stickerY, offX, offY] } : {};
@@ -39156,8 +39234,8 @@ function normalizeElementFields(raw, takenIds) {
39156
39234
  ...pickAuthorshipFields(input)
39157
39235
  };
39158
39236
  }
39159
- const x = coordinate(input.x);
39160
- const y = coordinate(input.y);
39237
+ const x = coordinate2(input.x);
39238
+ const y = coordinate2(input.y);
39161
39239
  if (x === void 0 || y === void 0) return void 0;
39162
39240
  switch (input.type) {
39163
39241
  case "note": {
@@ -39184,7 +39262,7 @@ function normalizeElementFields(raw, takenIds) {
39184
39262
  const points = [];
39185
39263
  const count = Math.min(input.points.length, MAX_STROKE_POINTS * 2) & -2;
39186
39264
  for (let index = 0; index < count; index++) {
39187
- const value2 = coordinate(input.points[index]);
39265
+ const value2 = coordinate2(input.points[index]);
39188
39266
  if (value2 === void 0) return void 0;
39189
39267
  points.push(value2);
39190
39268
  }
@@ -39330,7 +39408,7 @@ function normalizeElement(raw, takenIds = /* @__PURE__ */ new Set()) {
39330
39408
  };
39331
39409
  return Object.keys(extras).length === 0 ? element : { ...element, ...extras };
39332
39410
  }
39333
- var size, coordinate, elementText, fill, ink;
39411
+ var size, coordinate2, elementText, fill, ink;
39334
39412
  var init_normalize = __esm({
39335
39413
  "packages/whiteboard-core/src/normalize.ts"() {
39336
39414
  "use strict";
@@ -39342,7 +39420,7 @@ var init_normalize = __esm({
39342
39420
  init_table();
39343
39421
  init_text_limits();
39344
39422
  size = (value2, fallback) => clampFiniteNumber(value2, MIN_ELEMENT_SIZE, MAX_ELEMENT_SIZE) ?? fallback;
39345
- coordinate = (value2) => clampFiniteNumber(value2, -COORDINATE_LIMIT, COORDINATE_LIMIT);
39423
+ coordinate2 = (value2) => clampFiniteNumber(value2, -COORDINATE_LIMIT, COORDINATE_LIMIT);
39346
39424
  elementText = (value2) => clampElementText(sliceChars(value2, Number.POSITIVE_INFINITY));
39347
39425
  fill = (value2, fallback) => normalizePaletteColor(value2, NOTE_COLORS, fallback);
39348
39426
  ink = (value2) => normalizePaletteColor(value2, INK_COLOR_NAMES, "ink");
@@ -42512,8 +42590,8 @@ function checkBoardDocuments(documents, options = {}) {
42512
42590
  let boardBytes = 0;
42513
42591
  for (const [path20, value2] of documents) {
42514
42592
  boardBytes += escapedJsonByteLength(value2);
42515
- const refusal = refuseDocument(path20, value2, 0);
42516
- if (refusal !== void 0) add(path20, "error", refusal);
42593
+ const refusal2 = refuseDocument(path20, value2, 0);
42594
+ if (refusal2 !== void 0) add(path20, "error", refusal2);
42517
42595
  if (!isKnownPath(path20)) add(path20, "info", "The board does not read this document.");
42518
42596
  else if (path20.startsWith(`${ELEMENTS_COLLECTION}/`) && elementIdOfPath(path20) === void 0) {
42519
42597
  add(path20, "error", "Not a valid element id (1\u201340 of A\u2013Z a\u2013z 0\u20139 _ . ~ : @ + -): the board ignores this document.");
@@ -44974,9 +45052,9 @@ function runMembers(store, runner, members, indices) {
44974
45052
  store.commit();
44975
45053
  } catch (error) {
44976
45054
  store.rollback();
44977
- const refusal = asRefusal(error);
44978
- refusal.data = { ...refusal.data, member: indices?.[index] ?? index };
44979
- throw refusal;
45055
+ const refusal2 = asRefusal(error);
45056
+ refusal2.data = { ...refusal2.data, member: indices?.[index] ?? index };
45057
+ throw refusal2;
44980
45058
  }
44981
45059
  return { acks };
44982
45060
  }
@@ -45022,10 +45100,10 @@ function runCall(store, call, user) {
45022
45100
  store.saveSessions();
45023
45101
  return { status: 200, body, changes: runner.changes };
45024
45102
  } catch (error) {
45025
- const refusal = asRefusal(error);
45026
- const { member, ...data2 } = refusal.data;
45027
- refusal.data = data2;
45028
- return { status: refusal.status, body: refusalBody2(refusal, typeof member === "number" && toolOf2(call) === "batch" ? member : void 0) };
45103
+ const refusal2 = asRefusal(error);
45104
+ const { member, ...data2 } = refusal2.data;
45105
+ refusal2.data = data2;
45106
+ return { status: refusal2.status, body: refusalBody2(refusal2, typeof member === "number" && toolOf2(call) === "batch" ? member : void 0) };
45029
45107
  }
45030
45108
  }
45031
45109
  function isLockPatch(payload) {
@@ -45055,8 +45133,8 @@ function runPageMember(store, member, user, session, options = {}) {
45055
45133
  store.saveSessions();
45056
45134
  return { status: 200, body: { verdict: "allow", diff: [], ...acks[0] }, changes: runner.changes };
45057
45135
  } catch (error) {
45058
- const refusal = asRefusal(error);
45059
- return { status: refusal.status, body: { verdict: "deny", reason: refusal.code, detail: refusal.message, ...Object.keys(refusal.data).length ? { data: refusal.data } : {} } };
45136
+ const refusal2 = asRefusal(error);
45137
+ return { status: refusal2.status, body: { verdict: "deny", reason: refusal2.code, detail: refusal2.message, ...Object.keys(refusal2.data).length ? { data: refusal2.data } : {} } };
45060
45138
  }
45061
45139
  }
45062
45140
  function runPageBatch(store, members, user, session, options = {}) {
@@ -45067,11 +45145,11 @@ function runPageBatch(store, members, user, session, options = {}) {
45067
45145
  store.saveSessions();
45068
45146
  return { status: 200, body: { verdict: "allow", diff: [], acks: acks.map((ack) => ({ verdict: "allow", diff: [], ...ack })) }, changes: runner.changes };
45069
45147
  } catch (error) {
45070
- const refusal = asRefusal(error);
45071
- const { member, ...data2 } = refusal.data;
45148
+ const refusal2 = asRefusal(error);
45149
+ const { member, ...data2 } = refusal2.data;
45072
45150
  return {
45073
- status: refusal.status,
45074
- body: { verdict: "deny", reason: refusal.code, detail: refusal.message, ...typeof member === "number" ? { index: member } : {}, ...Object.keys(data2).length ? { data: data2 } : {} }
45151
+ status: refusal2.status,
45152
+ body: { verdict: "deny", reason: refusal2.code, detail: refusal2.message, ...typeof member === "number" ? { index: member } : {}, ...Object.keys(data2).length ? { data: data2 } : {} }
45075
45153
  };
45076
45154
  }
45077
45155
  }
@@ -45169,9 +45247,9 @@ function fillBirth(store, { name, markdown, chips, members }, user) {
45169
45247
  changes: runner.changes
45170
45248
  };
45171
45249
  } catch (error) {
45172
- const refusal = asRefusal(error);
45173
- const { member, ...data2 } = refusal.data;
45174
- return { status: refusal.status, body: { ok: false, code: refusal.code, message: refusal.message, ...typeof member === "number" ? { member } : {}, ...Object.keys(data2).length ? { data: data2 } : {} } };
45250
+ const refusal2 = asRefusal(error);
45251
+ const { member, ...data2 } = refusal2.data;
45252
+ return { status: refusal2.status, body: { ok: false, code: refusal2.code, message: refusal2.message, ...typeof member === "number" ? { member } : {}, ...Object.keys(data2).length ? { data: data2 } : {} } };
45175
45253
  }
45176
45254
  }
45177
45255
  function removeDoc(root) {
@@ -52920,8 +52998,8 @@ async function sheetCallThrough(record, root, call) {
52920
52998
  const body = await response.json();
52921
52999
  if (response.ok) return { answer: body };
52922
53000
  if (body.code === "refused" && typeof body.detail === "string") {
52923
- const { code: _code, message: _message, ...refusal } = body;
52924
- throw new SheetCallRefused(refusal);
53001
+ const { code: _code, message: _message, ...refusal2 } = body;
53002
+ throw new SheetCallRefused(refusal2);
52925
53003
  }
52926
53004
  if (body.code === "invalid_argument" && typeof body.message === "string") throw new SheetsCommandError(String(body.code), body.message);
52927
53005
  throw new UsageError(typeof body.message === "string" ? body.message : `HTTP ${response.status}`);