Skip to content

refactor: locked polygon points shape#3705

Open
mojadem wants to merge 10 commits into
mainfrom
mojadem/locked-polygon-point/1
Open

refactor: locked polygon points shape#3705
mojadem wants to merge 10 commits into
mainfrom
mojadem/locked-polygon-point/1

[mojadem/locked-polygon-point/1] derive logic from points prop in loc…

815a548
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
GitHub Actions / PR Comparison: Item Splitting succeeded Jun 5, 2026 in 0s

PR Comparison: Item Splitting: Changes Acknowledged ✅

Acknowledged via the item-splitting-change-ack label. Remove the label to require re-acknowledgement.

View diff
diff --unified /home/github/work/_temp/branch-compare/base/item-splitting.bundle.js /home/github/work/_temp/branch-compare/pr/item-splitting.bundle.js
--- /home/github/work/_temp/branch-compare/base/item-splitting.bundle.js	2026-06-05 17:33:28.211035032 +0000
+++ /home/github/work/_temp/branch-compare/pr/item-splitting.bundle.js	2026-06-05 17:33:24.227034847 +0000
@@ -6643,9 +6643,21 @@
   labels: defaulted(array(parseLockedLabelType), () => []),
   ariaLabel: optional(string)
 });
+var parseLockedPolygonPointType = object({
+  coord: pairOfNumbers4
+});
+var parseLockedPolygonPointsType = union(
+  array(parseLockedPolygonPointType)
+).or(
+  // Normalize legacy representation of points as Coord[] to
+  // LockedPolygonPointType[].
+  pipeParsers(array(pairOfNumbers4)).then(
+    convert((coords) => coords.map((coord2) => ({ coord: coord2 })))
+  ).parser
+).parser;
 var parseLockedPolygonType = object({
   type: constant("polygon"),
-  points: array(pairOfNumbers4),
+  points: parseLockedPolygonPointsType,
   color: parseLockedFigureColor,
   showVertices: boolean,
   fillStyle: parseLockedFigureFillType,