microboard-temp 0.14.19 → 0.14.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/cjs/browser.js +388 -154
  2. package/dist/cjs/index.js +388 -154
  3. package/dist/cjs/node.js +388 -154
  4. package/dist/cjs/overlayIconManifest.js +115 -0
  5. package/dist/esm/browser.js +388 -154
  6. package/dist/esm/index.js +388 -154
  7. package/dist/esm/node.js +388 -154
  8. package/dist/esm/overlayIconManifest.js +113 -0
  9. package/dist/overlay-icons/Items/Card/icons/Flip.icon.svg +1 -0
  10. package/dist/overlay-icons/Items/Card/icons/RotateCcw.icon.svg +1 -0
  11. package/dist/overlay-icons/Items/Card/icons/RotateCw.icon.svg +1 -0
  12. package/dist/overlay-icons/Items/Card/icons/Tool.icon.svg +7 -0
  13. package/dist/overlay-icons/Items/Connector/icons/LineCurved.icon.svg +1 -0
  14. package/dist/overlay-icons/Items/Connector/icons/LineOrthogonal.icon.svg +1 -0
  15. package/dist/overlay-icons/Items/Connector/icons/LineStraight.icon.svg +1 -0
  16. package/dist/overlay-icons/Items/Connector/icons/PointerArrowHeavy.icon.svg +1 -0
  17. package/dist/overlay-icons/Items/Connector/icons/PointerArrowThin.icon.svg +1 -0
  18. package/dist/overlay-icons/Items/Connector/icons/PointerCircleFilled.icon.svg +1 -0
  19. package/dist/overlay-icons/Items/Connector/icons/PointerCircleOutline.icon.svg +1 -0
  20. package/dist/overlay-icons/Items/Connector/icons/PointerDiamondFilled.icon.svg +1 -0
  21. package/dist/overlay-icons/Items/Connector/icons/PointerDiamondOutline.icon.svg +1 -0
  22. package/dist/overlay-icons/Items/Connector/icons/PointerNone.icon.svg +1 -0
  23. package/dist/overlay-icons/Items/Connector/icons/PointerTriangleFilled.icon.svg +1 -0
  24. package/dist/overlay-icons/Items/Connector/icons/PointerTriangleOutline.icon.svg +1 -0
  25. package/dist/overlay-icons/Items/Connector/icons/SmartJump.icon.svg +3 -0
  26. package/dist/overlay-icons/Items/Connector/icons/Style.icon.svg +5 -0
  27. package/dist/overlay-icons/Items/Connector/icons/SwitchPointers.icon.svg +4 -0
  28. package/dist/overlay-icons/Items/Connector/icons/Tool.icon.svg +3 -0
  29. package/dist/overlay-icons/Items/Deck/icons/CreateFromSelection.icon.svg +1 -0
  30. package/dist/overlay-icons/Items/Deck/icons/DrawBottom.icon.svg +1 -0
  31. package/dist/overlay-icons/Items/Deck/icons/DrawMany.icon.svg +1 -0
  32. package/dist/overlay-icons/Items/Deck/icons/DrawRandom.icon.svg +1 -0
  33. package/dist/overlay-icons/Items/Deck/icons/DrawTop.icon.svg +1 -0
  34. package/dist/overlay-icons/Items/Deck/icons/Flip.icon.svg +1 -0
  35. package/dist/overlay-icons/Items/Deck/icons/Shuffle.icon.svg +1 -0
  36. package/dist/overlay-icons/Items/Dice/icons/Range.icon.svg +1 -0
  37. package/dist/overlay-icons/Items/Dice/icons/Throw.icon.svg +1 -0
  38. package/dist/overlay-icons/Items/Dice/icons/Tool.icon.svg +1 -0
  39. package/dist/overlay-icons/Items/Drawing/icons/Eraser.icon.svg +3 -0
  40. package/dist/overlay-icons/Items/Drawing/icons/Highlighter.icon.svg +3 -0
  41. package/dist/overlay-icons/Items/Drawing/icons/Pen.icon.svg +3 -0
  42. package/dist/overlay-icons/Items/Frame/Basic/1-1/1-1.icon.svg +1 -0
  43. package/dist/overlay-icons/Items/Frame/Basic/16-9/16-9.icon.svg +1 -0
  44. package/dist/overlay-icons/Items/Frame/Basic/3-2/3-2.icon.svg +1 -0
  45. package/dist/overlay-icons/Items/Frame/Basic/4-3/4-3.icon.svg +1 -0
  46. package/dist/overlay-icons/Items/Frame/Basic/9-18/9-18.icon.svg +1 -0
  47. package/dist/overlay-icons/Items/Frame/Basic/A4/A4.icon.svg +1 -0
  48. package/dist/overlay-icons/Items/Frame/Basic/Custom/Custom.icon.svg +14 -0
  49. package/dist/overlay-icons/Items/Frame/Basic/Letter/Letter.icon.svg +1 -0
  50. package/dist/overlay-icons/Items/Frame/Frame.icon.svg +1 -0
  51. package/dist/overlay-icons/Items/Placeholder/Placeholder.icon.svg +4 -0
  52. package/dist/overlay-icons/Items/RichText/icons/FontSize.icon.svg +3 -0
  53. package/dist/overlay-icons/Items/RichText/icons/Text.icon.svg +3 -0
  54. package/dist/overlay-icons/Items/Screen/icons/Background.icon.svg +1 -0
  55. package/dist/overlay-icons/Items/Screen/icons/BackgroundImage.icon.svg +1 -0
  56. package/dist/overlay-icons/Items/Screen/icons/BackgroundImageRemove.icon.svg +1 -0
  57. package/dist/overlay-icons/Items/Screen/icons/Pouch.icon.svg +1 -0
  58. package/dist/overlay-icons/Items/Screen/icons/Tool.icon.svg +1 -0
  59. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Annotation/BPMN_Annotation.icon.svg +1 -0
  60. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_DataObject/BPMN_DataObject.icon.svg +1 -0
  61. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_DataStore/BPMN_DataStore.icon.svg +1 -0
  62. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_EndEvent/BPMN_EndEvent.icon.svg +1 -0
  63. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_EventSubprocess/BPMN_EventSubprocess.icon.svg +1 -0
  64. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Gateway/BPMN_Gateway.icon.svg +1 -0
  65. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_GatewayParallel/BPMN_GatewayParallel.icon.svg +1 -0
  66. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_GatewayXOR/BPMN_GatewayXOR.icon.svg +1 -0
  67. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Group/BPMN_Group.icon.svg +1 -0
  68. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_IntermediateEvent/BPMN_IntermediateEvent.icon.svg +1 -0
  69. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_IntermediateEventNoneInterrupting/BPMN_IntermediateEventNoneInterrupting.icon.svg +1 -0
  70. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Participant/BPMN_Participant.icon.svg +1 -0
  71. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_StartEvent/BPMN_StartEvent.icon.svg +1 -0
  72. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_StartEventNoneInterrupting/BPMN_StartEventNoneInterrupting.icon.svg +1 -0
  73. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Task/BPMN_Task.icon.svg +1 -0
  74. package/dist/overlay-icons/Items/Shape/BPMN/BPMN_Transaction/BPMN_Transaction.icon.svg +1 -0
  75. package/dist/overlay-icons/Items/Shape/Basic/ArrowLeft/ArrowLeft.icon.svg +14 -0
  76. package/dist/overlay-icons/Items/Shape/Basic/ArrowLeftRight/ArrowLeftRight.icon.svg +14 -0
  77. package/dist/overlay-icons/Items/Shape/Basic/ArrowRight/ArrowRight.icon.svg +14 -0
  78. package/dist/overlay-icons/Items/Shape/Basic/BracesLeft/BracesLeft.icon.svg +14 -0
  79. package/dist/overlay-icons/Items/Shape/Basic/BracesRight/BracesRight.icon.svg +14 -0
  80. package/dist/overlay-icons/Items/Shape/Basic/Circle/Circle.icon.svg +14 -0
  81. package/dist/overlay-icons/Items/Shape/Basic/Cloud/Cloud.icon.svg +14 -0
  82. package/dist/overlay-icons/Items/Shape/Basic/Cross/Cross.icon.svg +14 -0
  83. package/dist/overlay-icons/Items/Shape/Basic/Cylinder/Cylinder.icon.svg +19 -0
  84. package/dist/overlay-icons/Items/Shape/Basic/Hexagon/Hexagon.icon.svg +14 -0
  85. package/dist/overlay-icons/Items/Shape/Basic/Octagon/Octagon.icon.svg +14 -0
  86. package/dist/overlay-icons/Items/Shape/Basic/Parallelogram/Parallelogram.icon.svg +14 -0
  87. package/dist/overlay-icons/Items/Shape/Basic/Pentagon/Pentagon.icon.svg +14 -0
  88. package/dist/overlay-icons/Items/Shape/Basic/Rectangle/Rectangle.icon.svg +14 -0
  89. package/dist/overlay-icons/Items/Shape/Basic/Rhombus/Rhombus.icon.svg +14 -0
  90. package/dist/overlay-icons/Items/Shape/Basic/RoundedRectangle/RoundedRectangle.icon.svg +14 -0
  91. package/dist/overlay-icons/Items/Shape/Basic/SpeachBubble/SpeachBubble.icon.svg +14 -0
  92. package/dist/overlay-icons/Items/Shape/Basic/Star/Star.icon.svg +14 -0
  93. package/dist/overlay-icons/Items/Shape/Basic/Trapezoid/Trapezoid.icon.svg +14 -0
  94. package/dist/overlay-icons/Items/Shape/Basic/Triangle/Triangle.icon.svg +14 -0
  95. package/dist/overlay-icons/Items/Shape/icons/ArrowBlockLeft.icon.svg +3 -0
  96. package/dist/overlay-icons/Items/Shape/icons/ArrowBlockRight.icon.svg +3 -0
  97. package/dist/overlay-icons/Items/Shape/icons/Color.icon.svg +4 -0
  98. package/dist/overlay-icons/Items/Shape/icons/Fill.icon.svg +4 -0
  99. package/dist/overlay-icons/Items/Shape/icons/PredefinedProcess.icon.svg +4 -0
  100. package/dist/overlay-icons/Items/Shape/icons/ReversedParallelogram.icon.svg +3 -0
  101. package/dist/overlay-icons/Items/Shape/icons/ReversedTriangle.icon.svg +3 -0
  102. package/dist/overlay-icons/Items/Shape/icons/Stroke.icon.svg +3 -0
  103. package/dist/overlay-icons/Items/Shape/icons/StrokeDash.icon.svg +3 -0
  104. package/dist/overlay-icons/Items/Shape/icons/StrokeDot.icon.svg +5 -0
  105. package/dist/overlay-icons/Items/Shape/icons/StrokeLongDash.icon.svg +3 -0
  106. package/dist/overlay-icons/Items/Shape/icons/StrokeSolid.icon.svg +3 -0
  107. package/dist/overlay-icons/Items/Shape/icons/Tool.icon.svg +3 -0
  108. package/dist/overlay-icons/Items/Shape/icons/Type.icon.svg +5 -0
  109. package/dist/overlay-icons/Items/Sticker/Path/Sticker.icon.svg +14 -0
  110. package/dist/overlay-icons/Overlay/icons/BringToFront.icon.svg +5 -0
  111. package/dist/overlay-icons/Overlay/icons/Delete.icon.svg +7 -0
  112. package/dist/overlay-icons/Overlay/icons/Duplicate.icon.svg +4 -0
  113. package/dist/overlay-icons/Overlay/icons/Lock.icon.svg +4 -0
  114. package/dist/overlay-icons/Overlay/icons/SendToBack.icon.svg +5 -0
  115. package/dist/overlay-icons/Overlay/icons/Unlock.icon.svg +4 -0
  116. package/dist/overlay-icons/Overlay/overlay-icons.svg +323 -0
  117. package/dist/types/Items/Card/CardOverlay.d.ts +2 -1
  118. package/dist/types/Overlay/IconPack.d.ts +5 -3
  119. package/dist/types/Overlay/OverlayMetadata.d.ts +24 -0
  120. package/dist/types/Overlay/overlayRegistry.d.ts +1 -0
  121. package/dist/types/Selection/SelectionOverlay.d.ts +1 -0
  122. package/dist/types/Selection/index.d.ts +1 -0
  123. package/dist/types/Tools/WorkflowTool.d.ts +8 -0
  124. package/dist/types/Tools/index.d.ts +1 -0
  125. package/dist/types/overlayIconManifest.d.ts +2 -0
  126. package/package.json +8 -2
@@ -676,6 +676,7 @@ __export(exports_browser, {
676
676
  overlaySymbolIcon: () => overlaySymbolIcon,
677
677
  overlayAssetIcon: () => overlayAssetIcon,
678
678
  omitDefaultProperties: () => omitDefaultProperties,
679
+ normalizeOverlayIconAssetPath: () => normalizeOverlayIconAssetPath,
679
680
  messageRouter: () => messageRouter,
680
681
  meetsWCAG_AAA: () => meetsWCAG_AAA,
681
682
  meetsWCAG_AA: () => meetsWCAG_AA,
@@ -744,6 +745,7 @@ __export(exports_browser, {
744
745
  calculatePosition: () => calculatePosition,
745
746
  calculateAudioPosition: () => calculateAudioPosition,
746
747
  borderWidths: () => borderWidths,
748
+ WorkflowTool: () => WorkflowTool,
747
749
  VideoItem: () => VideoItem,
748
750
  Transformation: () => Transformation,
749
751
  Tools: () => Tools,
@@ -776,6 +778,7 @@ __export(exports_browser, {
776
778
  PRESENCE_CLEANUP_IDLE_TIMER: () => PRESENCE_CLEANUP_IDLE_TIMER,
777
779
  OVERLAY_SYMBOL_KEYS: () => OVERLAY_SYMBOL_KEYS,
778
780
  OVERLAY_ICON_SPRITE_PATH: () => OVERLAY_ICON_SPRITE_PATH,
781
+ OVERLAY_ICON_ASSET_PREFIX: () => OVERLAY_ICON_ASSET_PREFIX,
779
782
  MiroItemConverter: () => MiroItemConverter,
780
783
  Mbr: () => Mbr,
781
784
  Matrix: () => Matrix,
@@ -11723,7 +11726,11 @@ function toLocalTransformOp(op, containerMatrix, itemId) {
11723
11726
  }
11724
11727
  }
11725
11728
  // src/Overlay/IconPack.ts
11726
- var OVERLAY_ICON_SPRITE_PATH = "src/Overlay/overlay-icons.svg";
11729
+ var OVERLAY_ICON_ASSET_PREFIX = "overlay-icons/";
11730
+ var OVERLAY_ICON_SPRITE_PATH = normalizeOverlayIconAssetPath("src/Overlay/overlay-icons.svg");
11731
+ function normalizeOverlayIconAssetPath(sourcePath) {
11732
+ return sourcePath.startsWith("src/") ? `${OVERLAY_ICON_ASSET_PREFIX}${sourcePath.slice(4)}` : sourcePath;
11733
+ }
11727
11734
  function overlaySymbolIcon(key) {
11728
11735
  return {
11729
11736
  kind: "symbol",
@@ -11731,10 +11738,18 @@ function overlaySymbolIcon(key) {
11731
11738
  sourcePath: OVERLAY_ICON_SPRITE_PATH
11732
11739
  };
11733
11740
  }
11734
- function overlayAssetIcon(path2) {
11735
- return {
11741
+ function overlayAssetIcon(sourcePath, state) {
11742
+ const path2 = normalizeOverlayIconAssetPath(sourcePath);
11743
+ return state ? {
11744
+ kind: "asset",
11745
+ path: path2,
11746
+ sourcePath,
11747
+ mimeType: "image/svg+xml",
11748
+ state
11749
+ } : {
11736
11750
  kind: "asset",
11737
11751
  path: path2,
11752
+ sourcePath,
11738
11753
  mimeType: "image/svg+xml"
11739
11754
  };
11740
11755
  }
@@ -11750,16 +11765,16 @@ function symbolIcon(key, state) {
11750
11765
  return state ? { kind: "symbol", key, sourcePath: OVERLAY_ICON_SPRITE_PATH, state } : { kind: "symbol", key, sourcePath: OVERLAY_ICON_SPRITE_PATH };
11751
11766
  }
11752
11767
  function styleFillIcon(state) {
11753
- return symbolIcon(OVERLAY_SYMBOL_KEYS.styleFill, state);
11768
+ return overlayAssetIcon("src/Items/Shape/icons/Fill.icon.svg", state);
11754
11769
  }
11755
11770
  function styleStrokeIcon(state) {
11756
- return symbolIcon(OVERLAY_SYMBOL_KEYS.styleStroke, state);
11771
+ return overlayAssetIcon("src/Items/Shape/icons/Stroke.icon.svg", state);
11757
11772
  }
11758
11773
  function styleColorIcon(state) {
11759
- return symbolIcon(OVERLAY_SYMBOL_KEYS.styleColor, state);
11774
+ return overlayAssetIcon("src/Items/Shape/icons/Color.icon.svg", state);
11760
11775
  }
11761
11776
  function styleFontSizeIcon(state) {
11762
- return symbolIcon(OVERLAY_SYMBOL_KEYS.styleFontSize, state);
11777
+ return overlayAssetIcon("src/Items/RichText/icons/FontSize.icon.svg", state);
11763
11778
  }
11764
11779
  // src/Overlay/overlayRegistry.ts
11765
11780
  var itemOverlays = {};
@@ -11894,10 +11909,23 @@ function compareEntriesByOrder(a, b) {
11894
11909
  return aOrder - bOrder || aLabel.localeCompare(bLabel);
11895
11910
  }
11896
11911
  function readOverlayValueSource(context, source) {
11912
+ if (source.kind === "selectionProperty") {
11913
+ return readOverlayContextProperty(context.selection, source.property);
11914
+ }
11897
11915
  if (source.kind === "itemProperty") {
11898
- return context.item ? context.item[source.property] : undefined;
11916
+ return readOverlayContextProperty(context.item, source.property);
11899
11917
  }
11900
- return context.tool ? context.tool[source.property] : undefined;
11918
+ return readOverlayContextProperty(context.tool, source.property);
11919
+ }
11920
+ function readOverlayContextProperty(target, property) {
11921
+ if (!target) {
11922
+ return;
11923
+ }
11924
+ const value = target[property];
11925
+ if (typeof value === "function") {
11926
+ return value.call(target);
11927
+ }
11928
+ return value;
11901
11929
  }
11902
11930
  // src/Items/BaseItem/BaseItem.ts
11903
11931
  class BaseItem {
@@ -37875,7 +37903,6 @@ var richTextOverlay = {
37875
37903
  id: "text.fontSize",
37876
37904
  label: "Font size",
37877
37905
  icon: styleFontSizeIcon(),
37878
- icon: styleFontSizeIcon(),
37879
37906
  target: "each",
37880
37907
  controls: [
37881
37908
  {
@@ -37898,7 +37925,7 @@ var richTextOverlay = {
37898
37925
  {
37899
37926
  id: "textTypography",
37900
37927
  label: "Typography",
37901
- icon: overlaySymbolIcon("text.fontSize"),
37928
+ icon: overlayAssetIcon("src/Items/RichText/icons/FontSize.icon.svg"),
37902
37929
  actionIds: ["text.fontSize"]
37903
37930
  }
37904
37931
  ]
@@ -37909,7 +37936,7 @@ var addTextToolOverlay = {
37909
37936
  kind: "create",
37910
37937
  createsItemType: "RichText",
37911
37938
  family: "text",
37912
- icon: overlaySymbolIcon("tool.text"),
37939
+ icon: overlayAssetIcon("src/Items/RichText/icons/Text.icon.svg"),
37913
37940
  description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool.",
37914
37941
  launch: { kind: "activate-tool" },
37915
37942
  surface: {
@@ -44384,12 +44411,28 @@ var COLOR_PALETTE = [
44384
44411
  "#118AB2",
44385
44412
  "#7B61FF"
44386
44413
  ];
44387
- var symbolIcon2 = (key) => overlaySymbolIcon(key);
44414
+ var connectorAssetIcon = (file2) => overlayAssetIcon(`src/Items/Connector/icons/${file2}.icon.svg`);
44415
+ var lineStyleAssetIcons = {
44416
+ straight: connectorAssetIcon("LineStraight"),
44417
+ curved: connectorAssetIcon("LineCurved"),
44418
+ orthogonal: connectorAssetIcon("LineOrthogonal")
44419
+ };
44420
+ var pointerAssetIcons = {
44421
+ None: connectorAssetIcon("PointerNone"),
44422
+ ArrowThin: connectorAssetIcon("PointerArrowThin"),
44423
+ ArrowHeavy: connectorAssetIcon("PointerArrowHeavy"),
44424
+ TriangleFilled: connectorAssetIcon("PointerTriangleFilled"),
44425
+ TriangleOutline: connectorAssetIcon("PointerTriangleOutline"),
44426
+ CircleFilled: connectorAssetIcon("PointerCircleFilled"),
44427
+ CircleOutline: connectorAssetIcon("PointerCircleOutline"),
44428
+ DiamondFilled: connectorAssetIcon("PointerDiamondFilled"),
44429
+ DiamondOutline: connectorAssetIcon("PointerDiamondOutline")
44430
+ };
44388
44431
  var lineStyleOptions = ConnectorLineStyles.map((style) => ({
44389
44432
  id: style,
44390
44433
  label: style[0].toUpperCase() + style.slice(1),
44391
44434
  value: style,
44392
- icon: symbolIcon2(`connector.lineStyle.${style}`)
44435
+ icon: lineStyleAssetIcons[style]
44393
44436
  }));
44394
44437
  var lineWidthOptions = ConnectionLineWidths.map((width) => ({
44395
44438
  id: `${width}`,
@@ -44400,13 +44443,13 @@ var pointerOptions = CONNECTOR_POINTER_TYPES.map((pointer) => ({
44400
44443
  id: pointer,
44401
44444
  label: pointer,
44402
44445
  value: pointer,
44403
- icon: symbolIcon2(`connector.pointer.${pointer}`)
44446
+ icon: pointerAssetIcons[pointer]
44404
44447
  }));
44405
44448
  var borderStyleOptions = ["solid", "dot", "dash", "longDash"].map((style) => ({
44406
44449
  id: style,
44407
44450
  label: style,
44408
44451
  value: style,
44409
- icon: symbolIcon2(`stroke.${style}`)
44452
+ icon: overlayAssetIcon(style === "solid" ? "src/Items/Shape/icons/StrokeSolid.icon.svg" : style === "dot" ? "src/Items/Shape/icons/StrokeDot.icon.svg" : style === "dash" ? "src/Items/Shape/icons/StrokeDash.icon.svg" : "src/Items/Shape/icons/StrokeLongDash.icon.svg")
44410
44453
  }));
44411
44454
  var connectorStyleControls = [
44412
44455
  {
@@ -44461,7 +44504,7 @@ var connectorStyleControls = [
44461
44504
  {
44462
44505
  id: "smartJump",
44463
44506
  label: "Smart jump",
44464
- icon: symbolIcon2("connector.smartJump"),
44507
+ icon: connectorAssetIcon("SmartJump"),
44465
44508
  valueSource: { kind: "itemProperty", property: "smartJump" },
44466
44509
  editor: { kind: "toggle", trueLabel: "On", falseLabel: "Off" },
44467
44510
  invoke: { kind: "setProperty", property: "smartJump" }
@@ -44520,7 +44563,7 @@ var connectorToolControls = [
44520
44563
  {
44521
44564
  id: "toolSmartJump",
44522
44565
  label: "Smart jump",
44523
- icon: symbolIcon2("connector.smartJump"),
44566
+ icon: connectorAssetIcon("SmartJump"),
44524
44567
  valueSource: { kind: "toolProperty", property: "smartJump" },
44525
44568
  editor: { kind: "toggle", trueLabel: "On", falseLabel: "Off" },
44526
44569
  invoke: { kind: "toolProperty", property: "smartJump" }
@@ -44532,21 +44575,21 @@ var connectorOverlay = {
44532
44575
  {
44533
44576
  id: "connector.switchPointers",
44534
44577
  label: "Switch arrows",
44535
- icon: symbolIcon2("connector.switchPointers"),
44578
+ icon: connectorAssetIcon("SwitchPointers"),
44536
44579
  target: "selection",
44537
44580
  invoke: { kind: "operation", class: "Connector", method: "switchPointers" }
44538
44581
  },
44539
44582
  {
44540
44583
  id: "connector.style",
44541
44584
  label: "Connector style",
44542
- icon: symbolIcon2("connector.style"),
44585
+ icon: connectorAssetIcon("Style"),
44543
44586
  target: "each",
44544
44587
  controls: connectorStyleControls,
44545
44588
  groups: [
44546
44589
  {
44547
44590
  id: "connectorStyle",
44548
44591
  label: "Connector style",
44549
- icon: symbolIcon2("connector.style"),
44592
+ icon: connectorAssetIcon("Style"),
44550
44593
  controlIds: connectorStyleControls.map((control) => control.id)
44551
44594
  }
44552
44595
  ]
@@ -44556,7 +44599,7 @@ var connectorOverlay = {
44556
44599
  {
44557
44600
  id: "connectorArrows",
44558
44601
  label: "Arrows",
44559
- icon: symbolIcon2("connector.style"),
44602
+ icon: connectorAssetIcon("Style"),
44560
44603
  actionIds: ["connector.switchPointers", "connector.style"]
44561
44604
  }
44562
44605
  ]
@@ -44568,8 +44611,7 @@ var addConnectorToolOverlay = {
44568
44611
  createsItemType: "Connector",
44569
44612
  family: "connector",
44570
44613
  icon: {
44571
- kind: "symbol",
44572
- key: "tool.connector",
44614
+ ...connectorAssetIcon("Tool"),
44573
44615
  state: {
44574
44616
  swatch: { kind: "toolProperty", property: "lineColor" },
44575
44617
  note: "UI can tint or swatch the connector icon from the pending line color."
@@ -44581,14 +44623,14 @@ var addConnectorToolOverlay = {
44581
44623
  {
44582
44624
  id: "connectorToolQuickDefaults",
44583
44625
  label: "Connector quick defaults",
44584
- icon: symbolIcon2("connector.lineStyle.straight"),
44626
+ icon: connectorAssetIcon("LineStraight"),
44585
44627
  controlIds: ["toolLineStyle"],
44586
44628
  description: "Primary defaults that match the compact create-surface picker."
44587
44629
  },
44588
44630
  {
44589
44631
  id: "connectorToolAdvancedDefaults",
44590
44632
  label: "Connector defaults",
44591
- icon: symbolIcon2("connector.style"),
44633
+ icon: connectorAssetIcon("Style"),
44592
44634
  controlIds: connectorToolControls.map((control) => control.id),
44593
44635
  description: "Extended defaults available in richer create flows."
44594
44636
  }
@@ -58735,7 +58777,8 @@ var COLOR_PALETTE2 = [
58735
58777
  "transparent"
58736
58778
  ];
58737
58779
  var inlineShapeAsset = (folder, file2 = folder) => overlayAssetIcon(`src/Items/Shape/Basic/${folder}/${file2}.icon.svg`);
58738
- var symbolIcon3 = (key) => overlaySymbolIcon(key);
58780
+ var localShapeIcon = (file2) => overlayAssetIcon(`src/Items/Shape/icons/${file2}.icon.svg`);
58781
+ var bpmnIcon = (folder) => overlayAssetIcon(`src/Items/Shape/BPMN/${folder}/${folder}.icon.svg`);
58739
58782
  var BASIC_INLINE_OPTIONS = [
58740
58783
  { id: "rectangle", label: "Rectangle", value: "Rectangle", icon: inlineShapeAsset("Rectangle"), family: "basicShapes" },
58741
58784
  { id: "rounded-rectangle", label: "Rounded rectangle", value: "RoundedRectangle", icon: inlineShapeAsset("RoundedRectangle"), family: "basicShapes" },
@@ -58745,48 +58788,48 @@ var BASIC_INLINE_OPTIONS = [
58745
58788
  ];
58746
58789
  var SHAPE_CATALOG_OPTIONS = [
58747
58790
  ...BASIC_INLINE_OPTIONS,
58748
- { id: "reversed-triangle", label: "Reversed triangle", value: "ReversedTriangle", icon: symbolIcon3("shape.reversedTriangle"), family: "basicShapes" },
58791
+ { id: "reversed-triangle", label: "Reversed triangle", value: "ReversedTriangle", icon: localShapeIcon("ReversedTriangle"), family: "basicShapes" },
58749
58792
  { id: "arrow-left", label: "Arrow left", value: "ArrowLeft", icon: inlineShapeAsset("ArrowLeft"), family: "basicShapes" },
58750
58793
  { id: "arrow-right", label: "Arrow right", value: "ArrowRight", icon: inlineShapeAsset("ArrowRight"), family: "basicShapes" },
58751
58794
  { id: "arrow-left-right", label: "Arrow left right", value: "ArrowLeftRight", icon: inlineShapeAsset("ArrowLeftRight"), family: "basicShapes" },
58752
- { id: "arrow-block-left", label: "Arrow block left", value: "ArrowBlockLeft", icon: symbolIcon3("shape.arrowBlockLeft"), family: "basicShapes" },
58753
- { id: "arrow-block-right", label: "Arrow block right", value: "ArrowBlockRight", icon: symbolIcon3("shape.arrowBlockRight"), family: "basicShapes" },
58795
+ { id: "arrow-block-left", label: "Arrow block left", value: "ArrowBlockLeft", icon: localShapeIcon("ArrowBlockLeft"), family: "basicShapes" },
58796
+ { id: "arrow-block-right", label: "Arrow block right", value: "ArrowBlockRight", icon: localShapeIcon("ArrowBlockRight"), family: "basicShapes" },
58754
58797
  { id: "cloud", label: "Cloud", value: "Cloud", icon: inlineShapeAsset("Cloud"), family: "basicShapes" },
58755
58798
  { id: "cross", label: "Cross", value: "Cross", icon: inlineShapeAsset("Cross"), family: "basicShapes" },
58756
58799
  { id: "cylinder", label: "Cylinder", value: "Cylinder", icon: inlineShapeAsset("Cylinder"), family: "basicShapes" },
58757
58800
  { id: "hexagon", label: "Hexagon", value: "Hexagon", icon: inlineShapeAsset("Hexagon"), family: "basicShapes" },
58758
58801
  { id: "octagon", label: "Octagon", value: "Octagon", icon: inlineShapeAsset("Octagon"), family: "basicShapes" },
58759
58802
  { id: "parallelogram", label: "Parallelogram", value: "Parallelogram", icon: inlineShapeAsset("Parallelogram"), family: "basicShapes" },
58760
- { id: "reversed-parallelogram", label: "Reversed parallelogram", value: "ReversedParallelogram", icon: symbolIcon3("shape.reversedParallelogram"), family: "basicShapes" },
58803
+ { id: "reversed-parallelogram", label: "Reversed parallelogram", value: "ReversedParallelogram", icon: localShapeIcon("ReversedParallelogram"), family: "basicShapes" },
58761
58804
  { id: "pentagon", label: "Pentagon", value: "Pentagon", icon: inlineShapeAsset("Pentagon"), family: "basicShapes" },
58762
- { id: "predefined-process", label: "Predefined process", value: "PredefinedProcess", icon: symbolIcon3("shape.predefinedProcess"), family: "basicShapes" },
58805
+ { id: "predefined-process", label: "Predefined process", value: "PredefinedProcess", icon: localShapeIcon("PredefinedProcess"), family: "basicShapes" },
58763
58806
  { id: "speech-bubble", label: "Speech bubble", value: "SpeachBubble", icon: inlineShapeAsset("SpeachBubble"), family: "basicShapes" },
58764
58807
  { id: "star", label: "Star", value: "Star", icon: inlineShapeAsset("Star"), family: "basicShapes" },
58765
58808
  { id: "trapezoid", label: "Trapezoid", value: "Trapezoid", icon: inlineShapeAsset("Trapezoid"), family: "basicShapes" },
58766
58809
  { id: "braces-left", label: "Braces left", value: "BracesLeft", icon: inlineShapeAsset("BracesLeft", "BracesLeft"), family: "basicShapes" },
58767
58810
  { id: "braces-right", label: "Braces right", value: "BracesRight", icon: inlineShapeAsset("BracesRight", "BracesRight"), family: "basicShapes" },
58768
- { id: "bpmn-task", label: "BPMN task", value: "BPMN_Task", icon: symbolIcon3("shape.bpmn.task"), family: "bpmn" },
58769
- { id: "bpmn-gateway", label: "BPMN gateway", value: "BPMN_Gateway", icon: symbolIcon3("shape.bpmn.gateway"), family: "bpmn" },
58770
- { id: "bpmn-gateway-parallel", label: "BPMN gateway parallel", value: "BPMN_GatewayParallel", icon: symbolIcon3("shape.bpmn.gatewayParallel"), family: "bpmn" },
58771
- { id: "bpmn-gateway-xor", label: "BPMN gateway XOR", value: "BPMN_GatewayXOR", icon: symbolIcon3("shape.bpmn.gatewayXor"), family: "bpmn" },
58772
- { id: "bpmn-start-event", label: "BPMN start event", value: "BPMN_StartEvent", icon: symbolIcon3("shape.bpmn.startEvent"), family: "bpmn" },
58773
- { id: "bpmn-start-event-non-interrupting", label: "BPMN start event non interrupting", value: "BPMN_StartEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.startEventNoneInterrupting"), family: "bpmn" },
58774
- { id: "bpmn-end-event", label: "BPMN end event", value: "BPMN_EndEvent", icon: symbolIcon3("shape.bpmn.endEvent"), family: "bpmn" },
58775
- { id: "bpmn-intermediate-event", label: "BPMN intermediate event", value: "BPMN_IntermediateEvent", icon: symbolIcon3("shape.bpmn.intermediateEvent"), family: "bpmn" },
58776
- { id: "bpmn-intermediate-event-none-interrupting", label: "BPMN intermediate event none interrupting", value: "BPMN_IntermediateEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.intermediateEventNoneInterrupting"), family: "bpmn" },
58777
- { id: "bpmn-data-object", label: "BPMN data object", value: "BPMN_DataObject", icon: symbolIcon3("shape.bpmn.dataObject"), family: "bpmn" },
58778
- { id: "bpmn-data-store", label: "BPMN data store", value: "BPMN_DataStore", icon: symbolIcon3("shape.bpmn.dataStore"), family: "bpmn" },
58779
- { id: "bpmn-participant", label: "BPMN participant", value: "BPMN_Participant", icon: symbolIcon3("shape.bpmn.participant"), family: "bpmn" },
58780
- { id: "bpmn-transaction", label: "BPMN transaction", value: "BPMN_Transaction", icon: symbolIcon3("shape.bpmn.transaction"), family: "bpmn" },
58781
- { id: "bpmn-event-subprocess", label: "BPMN event subprocess", value: "BPMN_EventSubprocess", icon: symbolIcon3("shape.bpmn.eventSubprocess"), family: "bpmn" },
58782
- { id: "bpmn-group", label: "BPMN group", value: "BPMN_Group", icon: symbolIcon3("shape.bpmn.group"), family: "bpmn" },
58783
- { id: "bpmn-annotation", label: "BPMN annotation", value: "BPMN_Annotation", icon: symbolIcon3("shape.bpmn.annotation"), family: "bpmn" }
58811
+ { id: "bpmn-task", label: "BPMN task", value: "BPMN_Task", icon: bpmnIcon("BPMN_Task"), family: "bpmn" },
58812
+ { id: "bpmn-gateway", label: "BPMN gateway", value: "BPMN_Gateway", icon: bpmnIcon("BPMN_Gateway"), family: "bpmn" },
58813
+ { id: "bpmn-gateway-parallel", label: "BPMN gateway parallel", value: "BPMN_GatewayParallel", icon: bpmnIcon("BPMN_GatewayParallel"), family: "bpmn" },
58814
+ { id: "bpmn-gateway-xor", label: "BPMN gateway XOR", value: "BPMN_GatewayXOR", icon: bpmnIcon("BPMN_GatewayXOR"), family: "bpmn" },
58815
+ { id: "bpmn-start-event", label: "BPMN start event", value: "BPMN_StartEvent", icon: bpmnIcon("BPMN_StartEvent"), family: "bpmn" },
58816
+ { id: "bpmn-start-event-non-interrupting", label: "BPMN start event non interrupting", value: "BPMN_StartEventNoneInterrupting", icon: bpmnIcon("BPMN_StartEventNoneInterrupting"), family: "bpmn" },
58817
+ { id: "bpmn-end-event", label: "BPMN end event", value: "BPMN_EndEvent", icon: bpmnIcon("BPMN_EndEvent"), family: "bpmn" },
58818
+ { id: "bpmn-intermediate-event", label: "BPMN intermediate event", value: "BPMN_IntermediateEvent", icon: bpmnIcon("BPMN_IntermediateEvent"), family: "bpmn" },
58819
+ { id: "bpmn-intermediate-event-none-interrupting", label: "BPMN intermediate event none interrupting", value: "BPMN_IntermediateEventNoneInterrupting", icon: bpmnIcon("BPMN_IntermediateEventNoneInterrupting"), family: "bpmn" },
58820
+ { id: "bpmn-data-object", label: "BPMN data object", value: "BPMN_DataObject", icon: bpmnIcon("BPMN_DataObject"), family: "bpmn" },
58821
+ { id: "bpmn-data-store", label: "BPMN data store", value: "BPMN_DataStore", icon: bpmnIcon("BPMN_DataStore"), family: "bpmn" },
58822
+ { id: "bpmn-participant", label: "BPMN participant", value: "BPMN_Participant", icon: bpmnIcon("BPMN_Participant"), family: "bpmn" },
58823
+ { id: "bpmn-transaction", label: "BPMN transaction", value: "BPMN_Transaction", icon: bpmnIcon("BPMN_Transaction"), family: "bpmn" },
58824
+ { id: "bpmn-event-subprocess", label: "BPMN event subprocess", value: "BPMN_EventSubprocess", icon: bpmnIcon("BPMN_EventSubprocess"), family: "bpmn" },
58825
+ { id: "bpmn-group", label: "BPMN group", value: "BPMN_Group", icon: bpmnIcon("BPMN_Group"), family: "bpmn" },
58826
+ { id: "bpmn-annotation", label: "BPMN annotation", value: "BPMN_Annotation", icon: bpmnIcon("BPMN_Annotation"), family: "bpmn" }
58784
58827
  ];
58785
58828
  var BORDER_STYLE_OPTIONS = [
58786
- { id: "solid", label: "Solid", value: "solid", icon: symbolIcon3("stroke.solid") },
58787
- { id: "dot", label: "Dot", value: "dot", icon: symbolIcon3("stroke.dot") },
58788
- { id: "dash", label: "Dash", value: "dash", icon: symbolIcon3("stroke.dash") },
58789
- { id: "long-dash", label: "Long dash", value: "longDash", icon: symbolIcon3("stroke.longDash") }
58829
+ { id: "solid", label: "Solid", value: "solid", icon: localShapeIcon("StrokeSolid") },
58830
+ { id: "dot", label: "Dot", value: "dot", icon: localShapeIcon("StrokeDot") },
58831
+ { id: "dash", label: "Dash", value: "dash", icon: localShapeIcon("StrokeDash") },
58832
+ { id: "long-dash", label: "Long dash", value: "longDash", icon: localShapeIcon("StrokeLongDash") }
58790
58833
  ];
58791
58834
  var shapeTypeControl = {
58792
58835
  id: "shapeType",
@@ -58819,10 +58862,6 @@ var fillControl = {
58819
58862
  swatch: { kind: "itemProperty", property: "backgroundColor" },
58820
58863
  note: "UI can render the current fill color as a swatch inside the icon."
58821
58864
  }),
58822
- icon: styleFillIcon({
58823
- swatch: { kind: "itemProperty", property: "backgroundColor" },
58824
- note: "UI can render the current fill color as a swatch inside the icon."
58825
- }),
58826
58865
  editor: {
58827
58866
  kind: "color",
58828
58867
  palette: COLOR_PALETTE2,
@@ -58873,7 +58912,7 @@ var shapeOverlay = {
58873
58912
  {
58874
58913
  id: "shape.shapeType",
58875
58914
  label: "Shape type",
58876
- icon: symbolIcon3("shape.type"),
58915
+ icon: localShapeIcon("Type"),
58877
58916
  target: "each",
58878
58917
  controls: [shapeTypeControl]
58879
58918
  },
@@ -58904,13 +58943,13 @@ var shapeOverlay = {
58904
58943
  {
58905
58944
  id: "shapeTypeSection",
58906
58945
  label: "Type",
58907
- icon: symbolIcon3("shape.type"),
58946
+ icon: localShapeIcon("Type"),
58908
58947
  actionIds: ["shape.shapeType"]
58909
58948
  },
58910
58949
  {
58911
58950
  id: "shapeAppearanceSection",
58912
58951
  label: "Appearance",
58913
- icon: symbolIcon3("shape.stroke"),
58952
+ icon: localShapeIcon("Stroke"),
58914
58953
  actionIds: ["shape.fill", "shape.strokeStyle"]
58915
58954
  }
58916
58955
  ]
@@ -58922,7 +58961,7 @@ var addShapeToolOverlay = {
58922
58961
  createsItemType: "Shape",
58923
58962
  family: "shape",
58924
58963
  icon: {
58925
- ...overlaySymbolIcon("tool.shape"),
58964
+ ...overlayAssetIcon("src/Items/Shape/icons/Tool.icon.svg"),
58926
58965
  state: {
58927
58966
  note: "UI may swap the top-level icon to the selected shape option when desired."
58928
58967
  }
@@ -63355,6 +63394,68 @@ var propertyOps = {
63355
63394
  }
63356
63395
  };
63357
63396
 
63397
+ // src/Tools/Tool.ts
63398
+ class Tool {
63399
+ leftButtonDown() {
63400
+ return false;
63401
+ }
63402
+ leftButtonUp() {
63403
+ return false;
63404
+ }
63405
+ leftButtonDouble() {
63406
+ return false;
63407
+ }
63408
+ rightButtonDown() {
63409
+ return false;
63410
+ }
63411
+ rightButtonUp() {
63412
+ return false;
63413
+ }
63414
+ rightButtonDouble() {
63415
+ return false;
63416
+ }
63417
+ middleButtonDown() {
63418
+ return false;
63419
+ }
63420
+ middleButtonUp() {
63421
+ return false;
63422
+ }
63423
+ middleButtonDouble() {
63424
+ return false;
63425
+ }
63426
+ keyDown(_key) {
63427
+ return false;
63428
+ }
63429
+ keyUp(_key) {
63430
+ return false;
63431
+ }
63432
+ pointerMoveBy(_x, _y) {
63433
+ return false;
63434
+ }
63435
+ pointerDown() {
63436
+ return false;
63437
+ }
63438
+ pointerUp() {
63439
+ return false;
63440
+ }
63441
+ onCancel() {}
63442
+ onConfirm() {}
63443
+ render(_context) {}
63444
+ }
63445
+
63446
+ // src/Tools/BoardTool.ts
63447
+ class BoardTool extends Tool {
63448
+ board;
63449
+ constructor(board) {
63450
+ super();
63451
+ this.board = board;
63452
+ }
63453
+ }
63454
+
63455
+ // src/Tools/WorkflowTool.ts
63456
+ class WorkflowTool extends BoardTool {
63457
+ }
63458
+
63358
63459
  // src/Items/Card/CardOverlay.ts
63359
63460
  var cardOverlay = {
63360
63461
  itemType: "Card",
@@ -63362,14 +63463,14 @@ var cardOverlay = {
63362
63463
  {
63363
63464
  id: "card.flip",
63364
63465
  label: "Flip card",
63365
- icon: overlaySymbolIcon("card.flip"),
63466
+ icon: overlayAssetIcon("src/Items/Card/icons/Flip.icon.svg"),
63366
63467
  target: "each",
63367
63468
  invoke: { kind: "customMethod", methodName: "toggleIsOpen" }
63368
63469
  },
63369
63470
  {
63370
63471
  id: "card.rotateCcw",
63371
63472
  label: "Rotate 90 counter clockwise",
63372
- icon: overlaySymbolIcon("card.rotateCcw"),
63473
+ icon: overlayAssetIcon("src/Items/Card/icons/RotateCcw.icon.svg"),
63373
63474
  target: "each",
63374
63475
  invoke: {
63375
63476
  kind: "customMethod",
@@ -63380,7 +63481,7 @@ var cardOverlay = {
63380
63481
  {
63381
63482
  id: "card.rotateCw",
63382
63483
  label: "Rotate 90 clockwise",
63383
- icon: overlaySymbolIcon("card.rotateCw"),
63484
+ icon: overlayAssetIcon("src/Items/Card/icons/RotateCw.icon.svg"),
63384
63485
  target: "each",
63385
63486
  invoke: {
63386
63487
  kind: "customMethod",
@@ -63390,6 +63491,73 @@ var cardOverlay = {
63390
63491
  }
63391
63492
  ]
63392
63493
  };
63494
+ var addCardToolOverlay = {
63495
+ toolName: "AddCard",
63496
+ label: "Card",
63497
+ kind: "create",
63498
+ createsItemType: "Card",
63499
+ family: "game",
63500
+ icon: overlayAssetIcon("src/Items/Card/icons/Tool.icon.svg"),
63501
+ launch: {
63502
+ kind: "workflow",
63503
+ workflow: {
63504
+ kind: "property-sheet",
63505
+ description: "Upload front and back images for one or more cards.",
63506
+ submitLabel: "Create cards",
63507
+ controls: [
63508
+ {
63509
+ id: "cardArtwork",
63510
+ label: "Card artwork",
63511
+ editor: {
63512
+ kind: "asset-upload",
63513
+ mode: "paired",
63514
+ fields: [
63515
+ {
63516
+ id: "face",
63517
+ label: "Front",
63518
+ accept: ["image/*"],
63519
+ required: true
63520
+ },
63521
+ {
63522
+ id: "back",
63523
+ label: "Back",
63524
+ accept: ["image/*"],
63525
+ required: true
63526
+ }
63527
+ ]
63528
+ }
63529
+ }
63530
+ ],
63531
+ submit: {
63532
+ kind: "create-items",
63533
+ itemType: "Card",
63534
+ strategy: "per-upload-entry",
63535
+ placement: "stagger-from-pointer",
63536
+ properties: [
63537
+ {
63538
+ property: "faceUrl",
63539
+ source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "face" }
63540
+ },
63541
+ {
63542
+ property: "backsideUrl",
63543
+ source: { kind: "uploadField", controlId: "cardArtwork", fieldId: "back" }
63544
+ }
63545
+ ]
63546
+ }
63547
+ }
63548
+ },
63549
+ surface: {
63550
+ order: 4,
63551
+ group: {
63552
+ id: "gameItems",
63553
+ label: "Game items",
63554
+ icon: overlayAssetIcon("src/Items/Dice/icons/Tool.icon.svg"),
63555
+ order: 1,
63556
+ behavior: "open-panel"
63557
+ },
63558
+ relatedToolNames: ["AddDice", "AddScreen", "AddPouch"]
63559
+ }
63560
+ };
63393
63561
 
63394
63562
  // src/Items/Card/Card.ts
63395
63563
  var defaultCardData = {
@@ -63584,6 +63752,11 @@ registerItem({
63584
63752
  defaultData: defaultCardData,
63585
63753
  overlay: cardOverlay
63586
63754
  });
63755
+ registerTool({
63756
+ name: "AddCard",
63757
+ tool: WorkflowTool,
63758
+ overlay: addCardToolOverlay
63759
+ });
63587
63760
  registerHotkey({
63588
63761
  name: "Rotate90deg",
63589
63762
  hotkey: { key: { button: "KeyQ", shift: true }, label: { windows: "Shift+Q", mac: "⇧Q" } },
@@ -63634,28 +63807,28 @@ var deckOverlay = {
63634
63807
  {
63635
63808
  id: "deck.getTopCard",
63636
63809
  label: "Draw top card",
63637
- icon: overlaySymbolIcon("deck.drawTop"),
63810
+ icon: overlayAssetIcon("src/Items/Deck/icons/DrawTop.icon.svg"),
63638
63811
  target: "single",
63639
63812
  invoke: { kind: "customMethod", methodName: "getTopCard" }
63640
63813
  },
63641
63814
  {
63642
63815
  id: "deck.getBottomCard",
63643
63816
  label: "Draw bottom card",
63644
- icon: overlaySymbolIcon("deck.drawBottom"),
63817
+ icon: overlayAssetIcon("src/Items/Deck/icons/DrawBottom.icon.svg"),
63645
63818
  target: "single",
63646
63819
  invoke: { kind: "customMethod", methodName: "getBottomCard" }
63647
63820
  },
63648
63821
  {
63649
63822
  id: "deck.getRandomCard",
63650
63823
  label: "Draw random card",
63651
- icon: overlaySymbolIcon("deck.drawRandom"),
63824
+ icon: overlayAssetIcon("src/Items/Deck/icons/DrawRandom.icon.svg"),
63652
63825
  target: "single",
63653
63826
  invoke: { kind: "customMethod", methodName: "getRandomCard" }
63654
63827
  },
63655
63828
  {
63656
63829
  id: "deck.getCards",
63657
63830
  label: "Draw cards",
63658
- icon: overlaySymbolIcon("deck.drawMany"),
63831
+ icon: overlayAssetIcon("src/Items/Deck/icons/DrawMany.icon.svg"),
63659
63832
  target: "single",
63660
63833
  controls: [
63661
63834
  {
@@ -63677,14 +63850,14 @@ var deckOverlay = {
63677
63850
  {
63678
63851
  id: "deck.shuffle",
63679
63852
  label: "Shuffle",
63680
- icon: overlaySymbolIcon("deck.shuffle"),
63853
+ icon: overlayAssetIcon("src/Items/Deck/icons/Shuffle.icon.svg"),
63681
63854
  target: "single",
63682
63855
  invoke: { kind: "customMethod", methodName: "shuffleDeck" }
63683
63856
  },
63684
63857
  {
63685
63858
  id: "deck.flip",
63686
63859
  label: "Flip deck",
63687
- icon: overlaySymbolIcon("deck.flip"),
63860
+ icon: overlayAssetIcon("src/Items/Deck/icons/Flip.icon.svg"),
63688
63861
  target: "single",
63689
63862
  invoke: { kind: "customMethod", methodName: "flipDeck" }
63690
63863
  }
@@ -63693,7 +63866,7 @@ var deckOverlay = {
63693
63866
  var createDeckSelectionAction = {
63694
63867
  id: "deck.createFromSelection",
63695
63868
  label: "Create deck",
63696
- icon: overlaySymbolIcon("deck.createFromSelection"),
63869
+ icon: overlayAssetIcon("src/Items/Deck/icons/CreateFromSelection.icon.svg"),
63697
63870
  description: "Stacks selected cards into a new deck, or merges selected cards and decks into one deck.",
63698
63871
  invoke: { kind: "selectionMethod", methodName: "createDeck" },
63699
63872
  isAvailable: (items) => {
@@ -64090,64 +64263,6 @@ registerHotkey({
64090
64263
  }
64091
64264
  });
64092
64265
  registerSelectionAction(createDeckSelectionAction);
64093
- // src/Tools/Tool.ts
64094
- class Tool {
64095
- leftButtonDown() {
64096
- return false;
64097
- }
64098
- leftButtonUp() {
64099
- return false;
64100
- }
64101
- leftButtonDouble() {
64102
- return false;
64103
- }
64104
- rightButtonDown() {
64105
- return false;
64106
- }
64107
- rightButtonUp() {
64108
- return false;
64109
- }
64110
- rightButtonDouble() {
64111
- return false;
64112
- }
64113
- middleButtonDown() {
64114
- return false;
64115
- }
64116
- middleButtonUp() {
64117
- return false;
64118
- }
64119
- middleButtonDouble() {
64120
- return false;
64121
- }
64122
- keyDown(_key) {
64123
- return false;
64124
- }
64125
- keyUp(_key) {
64126
- return false;
64127
- }
64128
- pointerMoveBy(_x, _y) {
64129
- return false;
64130
- }
64131
- pointerDown() {
64132
- return false;
64133
- }
64134
- pointerUp() {
64135
- return false;
64136
- }
64137
- onCancel() {}
64138
- onConfirm() {}
64139
- render(_context) {}
64140
- }
64141
-
64142
- // src/Tools/BoardTool.ts
64143
- class BoardTool extends Tool {
64144
- board;
64145
- constructor(board) {
64146
- super();
64147
- this.board = board;
64148
- }
64149
- }
64150
-
64151
64266
  // src/Tools/CustomTool.ts
64152
64267
  class CustomTool extends BoardTool {
64153
64268
  name;
@@ -64262,14 +64377,14 @@ var diceOverlay = {
64262
64377
  {
64263
64378
  id: "dice.throw",
64264
64379
  label: "Throw dice",
64265
- icon: overlaySymbolIcon("dice.throw"),
64380
+ icon: overlayAssetIcon("src/Items/Dice/icons/Throw.icon.svg"),
64266
64381
  target: "each",
64267
64382
  invoke: { kind: "customMethod", methodName: "throwDice" }
64268
64383
  },
64269
64384
  {
64270
64385
  id: "dice.range",
64271
64386
  label: "Range",
64272
- icon: overlaySymbolIcon("dice.range"),
64387
+ icon: overlayAssetIcon("src/Items/Dice/icons/Range.icon.svg"),
64273
64388
  target: "each",
64274
64389
  controls: [
64275
64390
  {
@@ -64310,7 +64425,7 @@ var diceOverlay = {
64310
64425
  {
64311
64426
  id: "diceActions",
64312
64427
  label: "Dice",
64313
- icon: overlaySymbolIcon("dice.throw"),
64428
+ icon: overlayAssetIcon("src/Items/Dice/icons/Throw.icon.svg"),
64314
64429
  actionIds: ["dice.throw", "dice.range", "dice.fill"]
64315
64430
  }
64316
64431
  ]
@@ -64321,14 +64436,14 @@ var addDiceToolOverlay = {
64321
64436
  kind: "create",
64322
64437
  createsItemType: "Dice",
64323
64438
  family: "game",
64324
- icon: overlaySymbolIcon("tool.dice"),
64439
+ icon: overlayAssetIcon("src/Items/Dice/icons/Tool.icon.svg"),
64325
64440
  launch: { kind: "activate-tool" },
64326
64441
  surface: {
64327
64442
  order: 1,
64328
64443
  group: {
64329
64444
  id: "gameItems",
64330
64445
  label: "Game items",
64331
- icon: overlaySymbolIcon("tool.dice"),
64446
+ icon: overlayAssetIcon("src/Items/Dice/icons/Tool.icon.svg"),
64332
64447
  order: 1,
64333
64448
  behavior: "open-panel"
64334
64449
  },
@@ -64681,7 +64796,7 @@ var screenOverlay = {
64681
64796
  id: "screen.background",
64682
64797
  label: "Background",
64683
64798
  icon: {
64684
- ...overlaySymbolIcon("screen.background"),
64799
+ ...overlayAssetIcon("src/Items/Screen/icons/Background.icon.svg"),
64685
64800
  state: { swatch: { kind: "itemProperty", property: "backgroundColor" } }
64686
64801
  },
64687
64802
  target: "each",
@@ -64703,7 +64818,7 @@ var screenOverlay = {
64703
64818
  id: "screen.stroke",
64704
64819
  label: "Stroke",
64705
64820
  icon: {
64706
- ...overlaySymbolIcon("shape.stroke"),
64821
+ ...overlayAssetIcon("src/Items/Shape/icons/Stroke.icon.svg"),
64707
64822
  state: { swatch: { kind: "itemProperty", property: "borderColor" } }
64708
64823
  },
64709
64824
  target: "each",
@@ -64739,7 +64854,7 @@ var screenOverlay = {
64739
64854
  {
64740
64855
  id: "screenStrokeStyle",
64741
64856
  label: "Stroke",
64742
- icon: overlaySymbolIcon("shape.stroke"),
64857
+ icon: overlayAssetIcon("src/Items/Shape/icons/Stroke.icon.svg"),
64743
64858
  controlIds: ["borderColor", "borderWidth"]
64744
64859
  }
64745
64860
  ]
@@ -64747,7 +64862,7 @@ var screenOverlay = {
64747
64862
  {
64748
64863
  id: "screen.backgroundImage",
64749
64864
  label: "Background image",
64750
- icon: overlaySymbolIcon("screen.backgroundImage"),
64865
+ icon: overlayAssetIcon("src/Items/Screen/icons/BackgroundImage.icon.svg"),
64751
64866
  target: "each",
64752
64867
  when: {
64753
64868
  kind: "falsy",
@@ -64770,7 +64885,7 @@ var screenOverlay = {
64770
64885
  {
64771
64886
  id: "screen.removeBackgroundImage",
64772
64887
  label: "Remove background image",
64773
- icon: overlaySymbolIcon("screen.backgroundImage.remove"),
64888
+ icon: overlayAssetIcon("src/Items/Screen/icons/BackgroundImageRemove.icon.svg"),
64774
64889
  target: "each",
64775
64890
  when: {
64776
64891
  kind: "truthy",
@@ -64787,7 +64902,7 @@ var screenOverlay = {
64787
64902
  {
64788
64903
  id: "screenAppearance",
64789
64904
  label: "Appearance",
64790
- icon: overlaySymbolIcon("screen.background"),
64905
+ icon: overlayAssetIcon("src/Items/Screen/icons/Background.icon.svg"),
64791
64906
  actionIds: ["screen.background", "screen.stroke", "screen.backgroundImage", "screen.removeBackgroundImage"]
64792
64907
  }
64793
64908
  ]
@@ -64798,14 +64913,14 @@ var addScreenToolOverlay = {
64798
64913
  kind: "create",
64799
64914
  createsItemType: "Screen",
64800
64915
  family: "container",
64801
- icon: overlaySymbolIcon("tool.screen"),
64916
+ icon: overlayAssetIcon("src/Items/Screen/icons/Tool.icon.svg"),
64802
64917
  launch: { kind: "activate-tool" },
64803
64918
  surface: {
64804
64919
  order: 2,
64805
64920
  group: {
64806
64921
  id: "gameItems",
64807
64922
  label: "Game items",
64808
- icon: overlaySymbolIcon("tool.dice"),
64923
+ icon: overlayAssetIcon("src/Items/Dice/icons/Tool.icon.svg"),
64809
64924
  order: 1,
64810
64925
  behavior: "open-panel"
64811
64926
  },
@@ -64818,14 +64933,14 @@ var addPouchToolOverlay = {
64818
64933
  kind: "create",
64819
64934
  createsItemType: "Screen",
64820
64935
  family: "container",
64821
- icon: overlaySymbolIcon("tool.pouch"),
64936
+ icon: overlayAssetIcon("src/Items/Screen/icons/Pouch.icon.svg"),
64822
64937
  launch: { kind: "activate-tool" },
64823
64938
  surface: {
64824
64939
  order: 3,
64825
64940
  group: {
64826
64941
  id: "gameItems",
64827
64942
  label: "Game items",
64828
- icon: overlaySymbolIcon("tool.dice"),
64943
+ icon: overlayAssetIcon("src/Items/Dice/icons/Tool.icon.svg"),
64829
64944
  order: 1,
64830
64945
  behavior: "open-panel"
64831
64946
  },
@@ -67951,6 +68066,125 @@ class Presence {
67951
68066
  }
67952
68067
  }
67953
68068
 
68069
+ // src/Selection/SelectionOverlay.ts
68070
+ function everyItemHasRichText(items) {
68071
+ return items.length > 0 && items.every((item) => !!item.getRichText?.());
68072
+ }
68073
+ registerSelectionAction({
68074
+ id: "selection.delete",
68075
+ label: "Delete",
68076
+ icon: overlayAssetIcon("src/Overlay/icons/Delete.icon.svg"),
68077
+ description: "Removes the selected items from the board.",
68078
+ invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
68079
+ isAvailable: (items) => items.length > 0
68080
+ });
68081
+ registerSelectionAction({
68082
+ id: "selection.duplicate",
68083
+ label: "Duplicate",
68084
+ icon: overlayAssetIcon("src/Overlay/icons/Duplicate.icon.svg"),
68085
+ description: "Duplicates the selected items.",
68086
+ invoke: { kind: "selectionMethod", methodName: "duplicate" },
68087
+ isAvailable: (items) => items.length > 0
68088
+ });
68089
+ registerSelectionAction({
68090
+ id: "selection.lock",
68091
+ label: "Lock",
68092
+ icon: overlayAssetIcon("src/Overlay/icons/Lock.icon.svg"),
68093
+ description: "Locks the selected items.",
68094
+ invoke: { kind: "selectionMethod", methodName: "lock" },
68095
+ isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
68096
+ });
68097
+ registerSelectionAction({
68098
+ id: "selection.unlock",
68099
+ label: "Unlock",
68100
+ icon: overlayAssetIcon("src/Overlay/icons/Unlock.icon.svg"),
68101
+ description: "Unlocks the selected items.",
68102
+ invoke: { kind: "selectionMethod", methodName: "unlock" },
68103
+ isAvailable: (items) => items.some((item) => item.transformation.isLocked)
68104
+ });
68105
+ registerSelectionAction({
68106
+ id: "selection.bringToFront",
68107
+ label: "Bring to front",
68108
+ icon: overlayAssetIcon("src/Overlay/icons/BringToFront.icon.svg"),
68109
+ description: "Moves the selection above overlapping items.",
68110
+ invoke: { kind: "selectionMethod", methodName: "bringToFront" },
68111
+ isAvailable: (items) => items.length > 0
68112
+ });
68113
+ registerSelectionAction({
68114
+ id: "selection.sendToBack",
68115
+ label: "Send to back",
68116
+ icon: overlayAssetIcon("src/Overlay/icons/SendToBack.icon.svg"),
68117
+ description: "Moves the selection behind overlapping items.",
68118
+ invoke: { kind: "selectionMethod", methodName: "sendToBack" },
68119
+ isAvailable: (items) => items.length > 0
68120
+ });
68121
+ registerSelectionAction({
68122
+ id: "selection.text.fontSize",
68123
+ label: "Font size",
68124
+ icon: styleFontSizeIcon(),
68125
+ invoke: { kind: "selectionMethod", methodName: "setFontSize" },
68126
+ controls: [
68127
+ {
68128
+ id: "fontSize",
68129
+ label: "Font size",
68130
+ valueSource: { kind: "selectionProperty", property: "getFontSize" },
68131
+ editor: {
68132
+ kind: "number-stepper",
68133
+ min: 8,
68134
+ max: 144,
68135
+ step: 1,
68136
+ presets: [12, 14, 16, 18, 24, 32, 48],
68137
+ unit: "px"
68138
+ },
68139
+ invoke: { kind: "selectionMethod", methodName: "setFontSize" }
68140
+ }
68141
+ ],
68142
+ isAvailable: everyItemHasRichText
68143
+ });
68144
+ registerSelectionAction({
68145
+ id: "selection.text.color",
68146
+ label: "Text color",
68147
+ icon: styleColorIcon({
68148
+ swatch: { kind: "selectionProperty", property: "getFontColor" }
68149
+ }),
68150
+ invoke: { kind: "selectionMethod", methodName: "setFontColor" },
68151
+ controls: [
68152
+ {
68153
+ id: "fontColor",
68154
+ label: "Text color",
68155
+ valueSource: { kind: "selectionProperty", property: "getFontColor" },
68156
+ editor: {
68157
+ kind: "color",
68158
+ palette: ["#111111", "#FFFFFF", "#E11D48", "#2563EB", "#16A34A", "#F59E0B"]
68159
+ },
68160
+ invoke: { kind: "selectionMethod", methodName: "setFontColor" }
68161
+ }
68162
+ ],
68163
+ isAvailable: everyItemHasRichText
68164
+ });
68165
+ registerSelectionAction({
68166
+ id: "selection.text.highlight",
68167
+ label: "Highlight",
68168
+ icon: {
68169
+ ...overlayAssetIcon("src/Items/Screen/icons/Background.icon.svg"),
68170
+ state: { swatch: { kind: "selectionProperty", property: "getFontHighlight" } }
68171
+ },
68172
+ invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
68173
+ controls: [
68174
+ {
68175
+ id: "fontHighlight",
68176
+ label: "Highlight",
68177
+ valueSource: { kind: "selectionProperty", property: "getFontHighlight" },
68178
+ editor: {
68179
+ kind: "color",
68180
+ palette: ["transparent", "#FEF08A", "#FDBA74", "#BFDBFE", "#FBCFE8", "#D9F99D"]
68181
+ },
68182
+ invoke: { kind: "selectionMethod", methodName: "setFontHighlight" }
68183
+ }
68184
+ ],
68185
+ isAvailable: everyItemHasRichText
68186
+ });
68187
+
67954
68188
  // src/Selection/SelectionItems.ts
67955
68189
  class SelectionItems {
67956
68190
  items = new Map;
@@ -72790,7 +73024,7 @@ var addDrawingToolOverlay = {
72790
73024
  family: "drawing",
72791
73025
  createsItemType: "Drawing",
72792
73026
  icon: {
72793
- ...overlaySymbolIcon("tool.pen"),
73027
+ ...overlayAssetIcon("src/Items/Drawing/icons/Pen.icon.svg"),
72794
73028
  state: {
72795
73029
  swatch: { kind: "toolProperty", property: "strokeColor" },
72796
73030
  note: "UI can show the pending pen color in the icon."
@@ -72802,7 +73036,7 @@ var addDrawingToolOverlay = {
72802
73036
  {
72803
73037
  id: "drawingDefaults",
72804
73038
  label: "Pen defaults",
72805
- icon: overlaySymbolIcon("tool.pen"),
73039
+ icon: overlayAssetIcon("src/Items/Drawing/icons/Pen.icon.svg"),
72806
73040
  controlIds: strokeControls2.map((control) => control.id)
72807
73041
  }
72808
73042
  ]
@@ -72813,7 +73047,7 @@ var addDrawingToolOverlay = {
72813
73047
  group: {
72814
73048
  id: "drawingTools",
72815
73049
  label: "Drawing",
72816
- icon: overlaySymbolIcon("tool.pen"),
73050
+ icon: overlayAssetIcon("src/Items/Drawing/icons/Pen.icon.svg"),
72817
73051
  order: 5,
72818
73052
  behavior: "activate-last-used"
72819
73053
  },
@@ -72827,7 +73061,7 @@ var addHighlighterToolOverlay = {
72827
73061
  family: "drawing",
72828
73062
  createsItemType: "Drawing",
72829
73063
  icon: {
72830
- ...overlaySymbolIcon("tool.highlighter"),
73064
+ ...overlayAssetIcon("src/Items/Drawing/icons/Highlighter.icon.svg"),
72831
73065
  state: {
72832
73066
  swatch: { kind: "toolProperty", property: "strokeColor" },
72833
73067
  note: "UI can show the pending highlighter color in the icon."
@@ -72839,7 +73073,7 @@ var addHighlighterToolOverlay = {
72839
73073
  {
72840
73074
  id: "highlighterDefaults",
72841
73075
  label: "Highlighter defaults",
72842
- icon: overlaySymbolIcon("tool.highlighter"),
73076
+ icon: overlayAssetIcon("src/Items/Drawing/icons/Highlighter.icon.svg"),
72843
73077
  controlIds: strokeControls2.map((control) => control.id)
72844
73078
  }
72845
73079
  ]
@@ -72850,7 +73084,7 @@ var addHighlighterToolOverlay = {
72850
73084
  group: {
72851
73085
  id: "drawingTools",
72852
73086
  label: "Drawing",
72853
- icon: overlaySymbolIcon("tool.pen"),
73087
+ icon: overlayAssetIcon("src/Items/Drawing/icons/Pen.icon.svg"),
72854
73088
  order: 5,
72855
73089
  behavior: "activate-last-used"
72856
73090
  },
@@ -72862,7 +73096,7 @@ var eraserToolOverlay = {
72862
73096
  label: "Eraser",
72863
73097
  kind: "mode",
72864
73098
  family: "drawing",
72865
- icon: overlaySymbolIcon("tool.eraser"),
73099
+ icon: overlayAssetIcon("src/Items/Drawing/icons/Eraser.icon.svg"),
72866
73100
  defaults: {
72867
73101
  controls: [
72868
73102
  {
@@ -72886,7 +73120,7 @@ var eraserToolOverlay = {
72886
73120
  group: {
72887
73121
  id: "drawingTools",
72888
73122
  label: "Drawing",
72889
- icon: overlaySymbolIcon("tool.pen"),
73123
+ icon: overlayAssetIcon("src/Items/Drawing/icons/Pen.icon.svg"),
72890
73124
  order: 5,
72891
73125
  behavior: "activate-last-used"
72892
73126
  },
@@ -73091,7 +73325,7 @@ var frameTypeOptions = Object.keys(Frames).map((frameType) => ({
73091
73325
  id: frameType,
73092
73326
  label: frameType === "Custom" ? "Custom" : Frames[frameType].name,
73093
73327
  value: frameType,
73094
- icon: overlaySymbolIcon(`frame.${frameType}`)
73328
+ icon: overlayAssetIcon(frameType === "Custom" ? "src/Items/Frame/Basic/Custom/Custom.icon.svg" : frameType === "A4" ? "src/Items/Frame/Basic/A4/A4.icon.svg" : frameType === "Letter" ? "src/Items/Frame/Basic/Letter/Letter.icon.svg" : frameType === "Frame16x9" ? "src/Items/Frame/Basic/16-9/16-9.icon.svg" : frameType === "Frame4x3" ? "src/Items/Frame/Basic/4-3/4-3.icon.svg" : frameType === "Frame1x1" ? "src/Items/Frame/Basic/1-1/1-1.icon.svg" : frameType === "Frame3x2" ? "src/Items/Frame/Basic/3-2/3-2.icon.svg" : "src/Items/Frame/Basic/9-18/9-18.icon.svg")
73095
73329
  }));
73096
73330
  var addFrameToolOverlay = {
73097
73331
  toolName: "AddFrame",
@@ -73099,7 +73333,7 @@ var addFrameToolOverlay = {
73099
73333
  kind: "create",
73100
73334
  createsItemType: "Frame",
73101
73335
  family: "frame",
73102
- icon: overlaySymbolIcon("tool.frame"),
73336
+ icon: overlayAssetIcon("src/Items/Frame/Frame.icon.svg"),
73103
73337
  defaults: {
73104
73338
  controls: [
73105
73339
  {
@@ -73481,7 +73715,7 @@ var addStickerToolOverlay = {
73481
73715
  createsItemType: "Sticker",
73482
73716
  family: "sticker",
73483
73717
  icon: {
73484
- ...overlaySymbolIcon("tool.sticker"),
73718
+ ...overlayAssetIcon("src/Items/Sticker/Path/Sticker.icon.svg"),
73485
73719
  state: {
73486
73720
  swatch: { kind: "toolProperty", property: "backgroundColor" }
73487
73721
  }