microboard-temp 0.14.18 → 0.14.19

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/dist/esm/index.js CHANGED
@@ -11491,6 +11491,23 @@ function toLocalTransformOp(op, containerMatrix, itemId) {
11491
11491
  return op;
11492
11492
  }
11493
11493
  }
11494
+ // src/Overlay/IconPack.ts
11495
+ var OVERLAY_ICON_SPRITE_PATH = "src/Overlay/overlay-icons.svg";
11496
+ function overlaySymbolIcon(key) {
11497
+ return {
11498
+ kind: "symbol",
11499
+ key,
11500
+ sourcePath: OVERLAY_ICON_SPRITE_PATH
11501
+ };
11502
+ }
11503
+ function overlayAssetIcon(path2) {
11504
+ return {
11505
+ kind: "asset",
11506
+ path: path2,
11507
+ mimeType: "image/svg+xml"
11508
+ };
11509
+ }
11510
+
11494
11511
  // src/Overlay/OverlayIcons.ts
11495
11512
  var OVERLAY_SYMBOL_KEYS = {
11496
11513
  styleFill: "style.fill",
@@ -11499,7 +11516,7 @@ var OVERLAY_SYMBOL_KEYS = {
11499
11516
  styleFontSize: "style.fontSize"
11500
11517
  };
11501
11518
  function symbolIcon(key, state) {
11502
- return state ? { kind: "symbol", key, state } : { kind: "symbol", key };
11519
+ return state ? { kind: "symbol", key, sourcePath: OVERLAY_ICON_SPRITE_PATH, state } : { kind: "symbol", key, sourcePath: OVERLAY_ICON_SPRITE_PATH };
11503
11520
  }
11504
11521
  function styleFillIcon(state) {
11505
11522
  return symbolIcon(OVERLAY_SYMBOL_KEYS.styleFill, state);
@@ -11540,6 +11557,45 @@ function getToolOverlay(toolName) {
11540
11557
  function listToolOverlays() {
11541
11558
  return Object.values(toolOverlays);
11542
11559
  }
11560
+ function listCreateSurfaceEntries() {
11561
+ const groupedEntries = new Map;
11562
+ const ungroupedEntries = [];
11563
+ for (const tool of Object.values(toolOverlays)) {
11564
+ const group = tool.surface?.group;
11565
+ if (!group) {
11566
+ ungroupedEntries.push({
11567
+ kind: "tool",
11568
+ tool,
11569
+ order: tool.surface?.order
11570
+ });
11571
+ continue;
11572
+ }
11573
+ const existing = groupedEntries.get(group.id);
11574
+ if (existing) {
11575
+ existing.tools.push(tool);
11576
+ if (existing.order === undefined && group.order !== undefined) {
11577
+ existing.order = group.order;
11578
+ }
11579
+ continue;
11580
+ }
11581
+ groupedEntries.set(group.id, {
11582
+ kind: "group",
11583
+ id: group.id,
11584
+ label: group.label,
11585
+ description: group.description,
11586
+ icon: group.icon,
11587
+ order: group.order,
11588
+ behavior: group.behavior,
11589
+ tools: [tool]
11590
+ });
11591
+ }
11592
+ const sortedGroups = [...groupedEntries.values()].map((group) => ({
11593
+ ...group,
11594
+ tools: [...group.tools].sort(compareToolsBySurfaceOrder)
11595
+ })).sort(compareEntriesByOrder);
11596
+ const sortedUngroupedEntries = [...ungroupedEntries].sort(compareEntriesByOrder);
11597
+ return [...sortedGroups, ...sortedUngroupedEntries];
11598
+ }
11543
11599
  function listSelectionActions() {
11544
11600
  return Object.values(selectionActions);
11545
11601
  }
@@ -11549,6 +11605,33 @@ function getSelectionOverlayActions(items) {
11549
11605
  function resolveDynamicOptions(providerId, context) {
11550
11606
  return dynamicOptionsResolvers[providerId]?.(context) ?? [];
11551
11607
  }
11608
+ function matchesOverlayCondition(condition, context) {
11609
+ if (!condition) {
11610
+ return true;
11611
+ }
11612
+ switch (condition.kind) {
11613
+ case "equals":
11614
+ return readOverlayValueSource(context, condition.source) === condition.value;
11615
+ case "truthy":
11616
+ return !!readOverlayValueSource(context, condition.source);
11617
+ case "falsy":
11618
+ return !readOverlayValueSource(context, condition.source);
11619
+ case "itemTypeIn":
11620
+ return context.items?.every((item) => condition.itemTypes.includes(item.itemType)) ?? (context.item ? condition.itemTypes.includes(context.item.itemType) : false);
11621
+ case "selectionSize": {
11622
+ const size = context.items?.length ?? (context.item ? 1 : 0);
11623
+ const meetsMin = condition.min === undefined || size >= condition.min;
11624
+ const meetsMax = condition.max === undefined || size <= condition.max;
11625
+ return meetsMin && meetsMax;
11626
+ }
11627
+ case "allOf":
11628
+ return condition.conditions.every((child) => matchesOverlayCondition(child, context));
11629
+ case "anyOf":
11630
+ return condition.conditions.some((child) => matchesOverlayCondition(child, context));
11631
+ case "not":
11632
+ return !matchesOverlayCondition(condition.condition, context);
11633
+ }
11634
+ }
11552
11635
  function intersectOverlayActions(items) {
11553
11636
  if (items.length === 0) {
11554
11637
  return [];
@@ -11567,6 +11650,24 @@ function intersectOverlayActions(items) {
11567
11650
  }
11568
11651
  return [...counts.values()].filter((action) => overlays.every((overlay) => overlay.actions.some((candidate) => candidate.id === action.id)) && (action.target !== "single" || items.length === 1));
11569
11652
  }
11653
+ function compareToolsBySurfaceOrder(a, b) {
11654
+ const aOrder = a.surface?.order ?? Number.MAX_SAFE_INTEGER;
11655
+ const bOrder = b.surface?.order ?? Number.MAX_SAFE_INTEGER;
11656
+ return aOrder - bOrder || a.label.localeCompare(b.label);
11657
+ }
11658
+ function compareEntriesByOrder(a, b) {
11659
+ const aOrder = a.order ?? Number.MAX_SAFE_INTEGER;
11660
+ const bOrder = b.order ?? Number.MAX_SAFE_INTEGER;
11661
+ const aLabel = a.label ?? a.tool?.label ?? "";
11662
+ const bLabel = b.label ?? b.tool?.label ?? "";
11663
+ return aOrder - bOrder || aLabel.localeCompare(bLabel);
11664
+ }
11665
+ function readOverlayValueSource(context, source) {
11666
+ if (source.kind === "itemProperty") {
11667
+ return context.item ? context.item[source.property] : undefined;
11668
+ }
11669
+ return context.tool ? context.tool[source.property] : undefined;
11670
+ }
11570
11671
  // src/Items/BaseItem/BaseItem.ts
11571
11672
  class BaseItem {
11572
11673
  static createCommand;
@@ -37551,6 +37652,7 @@ var richTextOverlay = {
37551
37652
  id: "text.fontSize",
37552
37653
  label: "Font size",
37553
37654
  icon: styleFontSizeIcon(),
37655
+ icon: styleFontSizeIcon(),
37554
37656
  target: "each",
37555
37657
  controls: [
37556
37658
  {
@@ -37568,6 +37670,14 @@ var richTextOverlay = {
37568
37670
  }
37569
37671
  ]
37570
37672
  }
37673
+ ],
37674
+ sections: [
37675
+ {
37676
+ id: "textTypography",
37677
+ label: "Typography",
37678
+ icon: overlaySymbolIcon("text.fontSize"),
37679
+ actionIds: ["text.fontSize"]
37680
+ }
37571
37681
  ]
37572
37682
  };
37573
37683
  var addTextToolOverlay = {
@@ -37576,8 +37686,12 @@ var addTextToolOverlay = {
37576
37686
  kind: "create",
37577
37687
  createsItemType: "RichText",
37578
37688
  family: "text",
37579
- icon: { kind: "symbol", key: "tool.text" },
37580
- description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool."
37689
+ icon: overlaySymbolIcon("tool.text"),
37690
+ description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool.",
37691
+ launch: { kind: "activate-tool" },
37692
+ surface: {
37693
+ order: 6
37694
+ }
37581
37695
  };
37582
37696
 
37583
37697
  // src/Items/RichText/RichText.ts
@@ -44047,7 +44161,7 @@ var COLOR_PALETTE = [
44047
44161
  "#118AB2",
44048
44162
  "#7B61FF"
44049
44163
  ];
44050
- var symbolIcon2 = (key) => ({ kind: "symbol", key });
44164
+ var symbolIcon2 = (key) => overlaySymbolIcon(key);
44051
44165
  var lineStyleOptions = ConnectorLineStyles.map((style) => ({
44052
44166
  id: style,
44053
44167
  label: style[0].toUpperCase() + style.slice(1),
@@ -44214,6 +44328,14 @@ var connectorOverlay = {
44214
44328
  }
44215
44329
  ]
44216
44330
  }
44331
+ ],
44332
+ sections: [
44333
+ {
44334
+ id: "connectorArrows",
44335
+ label: "Arrows",
44336
+ icon: symbolIcon2("connector.style"),
44337
+ actionIds: ["connector.switchPointers", "connector.style"]
44338
+ }
44217
44339
  ]
44218
44340
  };
44219
44341
  var addConnectorToolOverlay = {
@@ -44234,12 +44356,24 @@ var addConnectorToolOverlay = {
44234
44356
  controls: connectorToolControls,
44235
44357
  groups: [
44236
44358
  {
44237
- id: "connectorToolStyle",
44359
+ id: "connectorToolQuickDefaults",
44360
+ label: "Connector quick defaults",
44361
+ icon: symbolIcon2("connector.lineStyle.straight"),
44362
+ controlIds: ["toolLineStyle"],
44363
+ description: "Primary defaults that match the compact create-surface picker."
44364
+ },
44365
+ {
44366
+ id: "connectorToolAdvancedDefaults",
44238
44367
  label: "Connector defaults",
44239
44368
  icon: symbolIcon2("connector.style"),
44240
- controlIds: connectorToolControls.map((control) => control.id)
44369
+ controlIds: connectorToolControls.map((control) => control.id),
44370
+ description: "Extended defaults available in richer create flows."
44241
44371
  }
44242
44372
  ]
44373
+ },
44374
+ launch: { kind: "activate-tool" },
44375
+ surface: {
44376
+ order: 8
44243
44377
  }
44244
44378
  };
44245
44379
 
@@ -58377,57 +58511,53 @@ var COLOR_PALETTE2 = [
58377
58511
  "#7B61FF",
58378
58512
  "transparent"
58379
58513
  ];
58380
- var inlineShapeAsset = (folder, file2 = folder) => ({
58381
- kind: "asset",
58382
- path: `src/Items/Shape/Basic/${folder}/${file2}.icon.svg`,
58383
- mimeType: "image/svg+xml"
58384
- });
58385
- var symbolIcon3 = (key) => ({ kind: "symbol", key });
58514
+ var inlineShapeAsset = (folder, file2 = folder) => overlayAssetIcon(`src/Items/Shape/Basic/${folder}/${file2}.icon.svg`);
58515
+ var symbolIcon3 = (key) => overlaySymbolIcon(key);
58386
58516
  var BASIC_INLINE_OPTIONS = [
58387
- { id: "rectangle", label: "Rectangle", value: "Rectangle", icon: inlineShapeAsset("Rectangle") },
58388
- { id: "rounded-rectangle", label: "Rounded rectangle", value: "RoundedRectangle", icon: inlineShapeAsset("RoundedRectangle") },
58389
- { id: "circle", label: "Circle", value: "Circle", icon: inlineShapeAsset("Circle") },
58390
- { id: "triangle", label: "Triangle", value: "Triangle", icon: inlineShapeAsset("Triangle") },
58391
- { id: "rhombus", label: "Rhombus", value: "Rhombus", icon: inlineShapeAsset("Rhombus") }
58517
+ { id: "rectangle", label: "Rectangle", value: "Rectangle", icon: inlineShapeAsset("Rectangle"), family: "basicShapes" },
58518
+ { id: "rounded-rectangle", label: "Rounded rectangle", value: "RoundedRectangle", icon: inlineShapeAsset("RoundedRectangle"), family: "basicShapes" },
58519
+ { id: "circle", label: "Circle", value: "Circle", icon: inlineShapeAsset("Circle"), family: "basicShapes" },
58520
+ { id: "triangle", label: "Triangle", value: "Triangle", icon: inlineShapeAsset("Triangle"), family: "basicShapes" },
58521
+ { id: "rhombus", label: "Rhombus", value: "Rhombus", icon: inlineShapeAsset("Rhombus"), family: "basicShapes" }
58392
58522
  ];
58393
58523
  var SHAPE_CATALOG_OPTIONS = [
58394
58524
  ...BASIC_INLINE_OPTIONS,
58395
- { id: "reversed-triangle", label: "Reversed triangle", value: "ReversedTriangle", icon: symbolIcon3("shape.reversedTriangle") },
58396
- { id: "arrow-left", label: "Arrow left", value: "ArrowLeft", icon: inlineShapeAsset("ArrowLeft") },
58397
- { id: "arrow-right", label: "Arrow right", value: "ArrowRight", icon: inlineShapeAsset("ArrowRight") },
58398
- { id: "arrow-left-right", label: "Arrow left right", value: "ArrowLeftRight", icon: inlineShapeAsset("ArrowLeftRight") },
58399
- { id: "arrow-block-left", label: "Arrow block left", value: "ArrowBlockLeft", icon: symbolIcon3("shape.arrowBlockLeft") },
58400
- { id: "arrow-block-right", label: "Arrow block right", value: "ArrowBlockRight", icon: symbolIcon3("shape.arrowBlockRight") },
58401
- { id: "cloud", label: "Cloud", value: "Cloud", icon: inlineShapeAsset("Cloud") },
58402
- { id: "cross", label: "Cross", value: "Cross", icon: inlineShapeAsset("Cross") },
58403
- { id: "cylinder", label: "Cylinder", value: "Cylinder", icon: inlineShapeAsset("Cylinder") },
58404
- { id: "hexagon", label: "Hexagon", value: "Hexagon", icon: inlineShapeAsset("Hexagon") },
58405
- { id: "octagon", label: "Octagon", value: "Octagon", icon: inlineShapeAsset("Octagon") },
58406
- { id: "parallelogram", label: "Parallelogram", value: "Parallelogram", icon: inlineShapeAsset("Parallelogram") },
58407
- { id: "reversed-parallelogram", label: "Reversed parallelogram", value: "ReversedParallelogram", icon: symbolIcon3("shape.reversedParallelogram") },
58408
- { id: "pentagon", label: "Pentagon", value: "Pentagon", icon: inlineShapeAsset("Pentagon") },
58409
- { id: "predefined-process", label: "Predefined process", value: "PredefinedProcess", icon: symbolIcon3("shape.predefinedProcess") },
58410
- { id: "speech-bubble", label: "Speech bubble", value: "SpeachBubble", icon: inlineShapeAsset("SpeachBubble") },
58411
- { id: "star", label: "Star", value: "Star", icon: inlineShapeAsset("Star") },
58412
- { id: "trapezoid", label: "Trapezoid", value: "Trapezoid", icon: inlineShapeAsset("Trapezoid") },
58413
- { id: "braces-left", label: "Braces left", value: "BracesLeft", icon: inlineShapeAsset("BracesLeft", "BracesLeft") },
58414
- { id: "braces-right", label: "Braces right", value: "BracesRight", icon: inlineShapeAsset("BracesRight", "BracesRight") },
58415
- { id: "bpmn-task", label: "BPMN task", value: "BPMN_Task", icon: symbolIcon3("shape.bpmn.task") },
58416
- { id: "bpmn-gateway", label: "BPMN gateway", value: "BPMN_Gateway", icon: symbolIcon3("shape.bpmn.gateway") },
58417
- { id: "bpmn-gateway-parallel", label: "BPMN gateway parallel", value: "BPMN_GatewayParallel", icon: symbolIcon3("shape.bpmn.gatewayParallel") },
58418
- { id: "bpmn-gateway-xor", label: "BPMN gateway XOR", value: "BPMN_GatewayXOR", icon: symbolIcon3("shape.bpmn.gatewayXor") },
58419
- { id: "bpmn-start-event", label: "BPMN start event", value: "BPMN_StartEvent", icon: symbolIcon3("shape.bpmn.startEvent") },
58420
- { id: "bpmn-start-event-non-interrupting", label: "BPMN start event non interrupting", value: "BPMN_StartEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.startEventNoneInterrupting") },
58421
- { id: "bpmn-end-event", label: "BPMN end event", value: "BPMN_EndEvent", icon: symbolIcon3("shape.bpmn.endEvent") },
58422
- { id: "bpmn-intermediate-event", label: "BPMN intermediate event", value: "BPMN_IntermediateEvent", icon: symbolIcon3("shape.bpmn.intermediateEvent") },
58423
- { id: "bpmn-intermediate-event-none-interrupting", label: "BPMN intermediate event none interrupting", value: "BPMN_IntermediateEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.intermediateEventNoneInterrupting") },
58424
- { id: "bpmn-data-object", label: "BPMN data object", value: "BPMN_DataObject", icon: symbolIcon3("shape.bpmn.dataObject") },
58425
- { id: "bpmn-data-store", label: "BPMN data store", value: "BPMN_DataStore", icon: symbolIcon3("shape.bpmn.dataStore") },
58426
- { id: "bpmn-participant", label: "BPMN participant", value: "BPMN_Participant", icon: symbolIcon3("shape.bpmn.participant") },
58427
- { id: "bpmn-transaction", label: "BPMN transaction", value: "BPMN_Transaction", icon: symbolIcon3("shape.bpmn.transaction") },
58428
- { id: "bpmn-event-subprocess", label: "BPMN event subprocess", value: "BPMN_EventSubprocess", icon: symbolIcon3("shape.bpmn.eventSubprocess") },
58429
- { id: "bpmn-group", label: "BPMN group", value: "BPMN_Group", icon: symbolIcon3("shape.bpmn.group") },
58430
- { id: "bpmn-annotation", label: "BPMN annotation", value: "BPMN_Annotation", icon: symbolIcon3("shape.bpmn.annotation") }
58525
+ { id: "reversed-triangle", label: "Reversed triangle", value: "ReversedTriangle", icon: symbolIcon3("shape.reversedTriangle"), family: "basicShapes" },
58526
+ { id: "arrow-left", label: "Arrow left", value: "ArrowLeft", icon: inlineShapeAsset("ArrowLeft"), family: "basicShapes" },
58527
+ { id: "arrow-right", label: "Arrow right", value: "ArrowRight", icon: inlineShapeAsset("ArrowRight"), family: "basicShapes" },
58528
+ { id: "arrow-left-right", label: "Arrow left right", value: "ArrowLeftRight", icon: inlineShapeAsset("ArrowLeftRight"), family: "basicShapes" },
58529
+ { id: "arrow-block-left", label: "Arrow block left", value: "ArrowBlockLeft", icon: symbolIcon3("shape.arrowBlockLeft"), family: "basicShapes" },
58530
+ { id: "arrow-block-right", label: "Arrow block right", value: "ArrowBlockRight", icon: symbolIcon3("shape.arrowBlockRight"), family: "basicShapes" },
58531
+ { id: "cloud", label: "Cloud", value: "Cloud", icon: inlineShapeAsset("Cloud"), family: "basicShapes" },
58532
+ { id: "cross", label: "Cross", value: "Cross", icon: inlineShapeAsset("Cross"), family: "basicShapes" },
58533
+ { id: "cylinder", label: "Cylinder", value: "Cylinder", icon: inlineShapeAsset("Cylinder"), family: "basicShapes" },
58534
+ { id: "hexagon", label: "Hexagon", value: "Hexagon", icon: inlineShapeAsset("Hexagon"), family: "basicShapes" },
58535
+ { id: "octagon", label: "Octagon", value: "Octagon", icon: inlineShapeAsset("Octagon"), family: "basicShapes" },
58536
+ { id: "parallelogram", label: "Parallelogram", value: "Parallelogram", icon: inlineShapeAsset("Parallelogram"), family: "basicShapes" },
58537
+ { id: "reversed-parallelogram", label: "Reversed parallelogram", value: "ReversedParallelogram", icon: symbolIcon3("shape.reversedParallelogram"), family: "basicShapes" },
58538
+ { id: "pentagon", label: "Pentagon", value: "Pentagon", icon: inlineShapeAsset("Pentagon"), family: "basicShapes" },
58539
+ { id: "predefined-process", label: "Predefined process", value: "PredefinedProcess", icon: symbolIcon3("shape.predefinedProcess"), family: "basicShapes" },
58540
+ { id: "speech-bubble", label: "Speech bubble", value: "SpeachBubble", icon: inlineShapeAsset("SpeachBubble"), family: "basicShapes" },
58541
+ { id: "star", label: "Star", value: "Star", icon: inlineShapeAsset("Star"), family: "basicShapes" },
58542
+ { id: "trapezoid", label: "Trapezoid", value: "Trapezoid", icon: inlineShapeAsset("Trapezoid"), family: "basicShapes" },
58543
+ { id: "braces-left", label: "Braces left", value: "BracesLeft", icon: inlineShapeAsset("BracesLeft", "BracesLeft"), family: "basicShapes" },
58544
+ { id: "braces-right", label: "Braces right", value: "BracesRight", icon: inlineShapeAsset("BracesRight", "BracesRight"), family: "basicShapes" },
58545
+ { id: "bpmn-task", label: "BPMN task", value: "BPMN_Task", icon: symbolIcon3("shape.bpmn.task"), family: "bpmn" },
58546
+ { id: "bpmn-gateway", label: "BPMN gateway", value: "BPMN_Gateway", icon: symbolIcon3("shape.bpmn.gateway"), family: "bpmn" },
58547
+ { id: "bpmn-gateway-parallel", label: "BPMN gateway parallel", value: "BPMN_GatewayParallel", icon: symbolIcon3("shape.bpmn.gatewayParallel"), family: "bpmn" },
58548
+ { id: "bpmn-gateway-xor", label: "BPMN gateway XOR", value: "BPMN_GatewayXOR", icon: symbolIcon3("shape.bpmn.gatewayXor"), family: "bpmn" },
58549
+ { id: "bpmn-start-event", label: "BPMN start event", value: "BPMN_StartEvent", icon: symbolIcon3("shape.bpmn.startEvent"), family: "bpmn" },
58550
+ { id: "bpmn-start-event-non-interrupting", label: "BPMN start event non interrupting", value: "BPMN_StartEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.startEventNoneInterrupting"), family: "bpmn" },
58551
+ { id: "bpmn-end-event", label: "BPMN end event", value: "BPMN_EndEvent", icon: symbolIcon3("shape.bpmn.endEvent"), family: "bpmn" },
58552
+ { id: "bpmn-intermediate-event", label: "BPMN intermediate event", value: "BPMN_IntermediateEvent", icon: symbolIcon3("shape.bpmn.intermediateEvent"), family: "bpmn" },
58553
+ { id: "bpmn-intermediate-event-none-interrupting", label: "BPMN intermediate event none interrupting", value: "BPMN_IntermediateEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.intermediateEventNoneInterrupting"), family: "bpmn" },
58554
+ { id: "bpmn-data-object", label: "BPMN data object", value: "BPMN_DataObject", icon: symbolIcon3("shape.bpmn.dataObject"), family: "bpmn" },
58555
+ { id: "bpmn-data-store", label: "BPMN data store", value: "BPMN_DataStore", icon: symbolIcon3("shape.bpmn.dataStore"), family: "bpmn" },
58556
+ { id: "bpmn-participant", label: "BPMN participant", value: "BPMN_Participant", icon: symbolIcon3("shape.bpmn.participant"), family: "bpmn" },
58557
+ { id: "bpmn-transaction", label: "BPMN transaction", value: "BPMN_Transaction", icon: symbolIcon3("shape.bpmn.transaction"), family: "bpmn" },
58558
+ { id: "bpmn-event-subprocess", label: "BPMN event subprocess", value: "BPMN_EventSubprocess", icon: symbolIcon3("shape.bpmn.eventSubprocess"), family: "bpmn" },
58559
+ { id: "bpmn-group", label: "BPMN group", value: "BPMN_Group", icon: symbolIcon3("shape.bpmn.group"), family: "bpmn" },
58560
+ { id: "bpmn-annotation", label: "BPMN annotation", value: "BPMN_Annotation", icon: symbolIcon3("shape.bpmn.annotation"), family: "bpmn" }
58431
58561
  ];
58432
58562
  var BORDER_STYLE_OPTIONS = [
58433
58563
  { id: "solid", label: "Solid", value: "solid", icon: symbolIcon3("stroke.solid") },
@@ -58442,6 +58572,12 @@ var shapeTypeControl = {
58442
58572
  editor: {
58443
58573
  kind: "enum-icon",
58444
58574
  options: BASIC_INLINE_OPTIONS,
58575
+ layout: "grid",
58576
+ quickOptions: {
58577
+ family: "basicShapes",
58578
+ maxVisible: 18,
58579
+ overflow: "show-more"
58580
+ },
58445
58581
  catalog: {
58446
58582
  kind: "catalog",
58447
58583
  label: "Shape catalog",
@@ -58460,6 +58596,10 @@ var fillControl = {
58460
58596
  swatch: { kind: "itemProperty", property: "backgroundColor" },
58461
58597
  note: "UI can render the current fill color as a swatch inside the icon."
58462
58598
  }),
58599
+ icon: styleFillIcon({
58600
+ swatch: { kind: "itemProperty", property: "backgroundColor" },
58601
+ note: "UI can render the current fill color as a swatch inside the icon."
58602
+ }),
58463
58603
  editor: {
58464
58604
  kind: "color",
58465
58605
  palette: COLOR_PALETTE2,
@@ -58536,6 +58676,20 @@ var shapeOverlay = {
58536
58676
  }
58537
58677
  ]
58538
58678
  }
58679
+ ],
58680
+ sections: [
58681
+ {
58682
+ id: "shapeTypeSection",
58683
+ label: "Type",
58684
+ icon: symbolIcon3("shape.type"),
58685
+ actionIds: ["shape.shapeType"]
58686
+ },
58687
+ {
58688
+ id: "shapeAppearanceSection",
58689
+ label: "Appearance",
58690
+ icon: symbolIcon3("shape.stroke"),
58691
+ actionIds: ["shape.fill", "shape.strokeStyle"]
58692
+ }
58539
58693
  ]
58540
58694
  };
58541
58695
  var addShapeToolOverlay = {
@@ -58545,8 +58699,7 @@ var addShapeToolOverlay = {
58545
58699
  createsItemType: "Shape",
58546
58700
  family: "shape",
58547
58701
  icon: {
58548
- kind: "symbol",
58549
- key: "tool.shape",
58702
+ ...overlaySymbolIcon("tool.shape"),
58550
58703
  state: {
58551
58704
  note: "UI may swap the top-level icon to the selected shape option when desired."
58552
58705
  }
@@ -58560,6 +58713,12 @@ var addShapeToolOverlay = {
58560
58713
  editor: {
58561
58714
  kind: "enum-icon",
58562
58715
  options: BASIC_INLINE_OPTIONS,
58716
+ layout: "grid",
58717
+ quickOptions: {
58718
+ family: "basicShapes",
58719
+ maxVisible: 18,
58720
+ overflow: "show-more"
58721
+ },
58563
58722
  catalog: {
58564
58723
  kind: "catalog",
58565
58724
  label: "Shape catalog",
@@ -58570,6 +58729,10 @@ var addShapeToolOverlay = {
58570
58729
  invoke: { kind: "toolProperty", property: "type" }
58571
58730
  }
58572
58731
  ]
58732
+ },
58733
+ launch: { kind: "activate-tool" },
58734
+ surface: {
58735
+ order: 7
58573
58736
  }
58574
58737
  };
58575
58738
 
@@ -62976,14 +63139,14 @@ var cardOverlay = {
62976
63139
  {
62977
63140
  id: "card.flip",
62978
63141
  label: "Flip card",
62979
- icon: { kind: "symbol", key: "card.flip" },
63142
+ icon: overlaySymbolIcon("card.flip"),
62980
63143
  target: "each",
62981
63144
  invoke: { kind: "customMethod", methodName: "toggleIsOpen" }
62982
63145
  },
62983
63146
  {
62984
63147
  id: "card.rotateCcw",
62985
63148
  label: "Rotate 90 counter clockwise",
62986
- icon: { kind: "symbol", key: "card.rotateCcw" },
63149
+ icon: overlaySymbolIcon("card.rotateCcw"),
62987
63150
  target: "each",
62988
63151
  invoke: {
62989
63152
  kind: "customMethod",
@@ -62994,7 +63157,7 @@ var cardOverlay = {
62994
63157
  {
62995
63158
  id: "card.rotateCw",
62996
63159
  label: "Rotate 90 clockwise",
62997
- icon: { kind: "symbol", key: "card.rotateCw" },
63160
+ icon: overlaySymbolIcon("card.rotateCw"),
62998
63161
  target: "each",
62999
63162
  invoke: {
63000
63163
  kind: "customMethod",
@@ -63248,28 +63411,28 @@ var deckOverlay = {
63248
63411
  {
63249
63412
  id: "deck.getTopCard",
63250
63413
  label: "Draw top card",
63251
- icon: { kind: "symbol", key: "deck.drawTop" },
63414
+ icon: overlaySymbolIcon("deck.drawTop"),
63252
63415
  target: "single",
63253
63416
  invoke: { kind: "customMethod", methodName: "getTopCard" }
63254
63417
  },
63255
63418
  {
63256
63419
  id: "deck.getBottomCard",
63257
63420
  label: "Draw bottom card",
63258
- icon: { kind: "symbol", key: "deck.drawBottom" },
63421
+ icon: overlaySymbolIcon("deck.drawBottom"),
63259
63422
  target: "single",
63260
63423
  invoke: { kind: "customMethod", methodName: "getBottomCard" }
63261
63424
  },
63262
63425
  {
63263
63426
  id: "deck.getRandomCard",
63264
63427
  label: "Draw random card",
63265
- icon: { kind: "symbol", key: "deck.drawRandom" },
63428
+ icon: overlaySymbolIcon("deck.drawRandom"),
63266
63429
  target: "single",
63267
63430
  invoke: { kind: "customMethod", methodName: "getRandomCard" }
63268
63431
  },
63269
63432
  {
63270
63433
  id: "deck.getCards",
63271
63434
  label: "Draw cards",
63272
- icon: { kind: "symbol", key: "deck.drawMany" },
63435
+ icon: overlaySymbolIcon("deck.drawMany"),
63273
63436
  target: "single",
63274
63437
  controls: [
63275
63438
  {
@@ -63291,14 +63454,14 @@ var deckOverlay = {
63291
63454
  {
63292
63455
  id: "deck.shuffle",
63293
63456
  label: "Shuffle",
63294
- icon: { kind: "symbol", key: "deck.shuffle" },
63457
+ icon: overlaySymbolIcon("deck.shuffle"),
63295
63458
  target: "single",
63296
63459
  invoke: { kind: "customMethod", methodName: "shuffleDeck" }
63297
63460
  },
63298
63461
  {
63299
63462
  id: "deck.flip",
63300
63463
  label: "Flip deck",
63301
- icon: { kind: "symbol", key: "deck.flip" },
63464
+ icon: overlaySymbolIcon("deck.flip"),
63302
63465
  target: "single",
63303
63466
  invoke: { kind: "customMethod", methodName: "flipDeck" }
63304
63467
  }
@@ -63307,7 +63470,7 @@ var deckOverlay = {
63307
63470
  var createDeckSelectionAction = {
63308
63471
  id: "deck.createFromSelection",
63309
63472
  label: "Create deck",
63310
- icon: { kind: "symbol", key: "deck.createFromSelection" },
63473
+ icon: overlaySymbolIcon("deck.createFromSelection"),
63311
63474
  description: "Stacks selected cards into a new deck, or merges selected cards and decks into one deck.",
63312
63475
  invoke: { kind: "selectionMethod", methodName: "createDeck" },
63313
63476
  isAvailable: (items) => {
@@ -63876,14 +64039,14 @@ var diceOverlay = {
63876
64039
  {
63877
64040
  id: "dice.throw",
63878
64041
  label: "Throw dice",
63879
- icon: { kind: "symbol", key: "dice.throw" },
64042
+ icon: overlaySymbolIcon("dice.throw"),
63880
64043
  target: "each",
63881
64044
  invoke: { kind: "customMethod", methodName: "throwDice" }
63882
64045
  },
63883
64046
  {
63884
64047
  id: "dice.range",
63885
64048
  label: "Range",
63886
- icon: { kind: "symbol", key: "dice.range" },
64049
+ icon: overlaySymbolIcon("dice.range"),
63887
64050
  target: "each",
63888
64051
  controls: [
63889
64052
  {
@@ -63919,6 +64082,14 @@ var diceOverlay = {
63919
64082
  }
63920
64083
  ]
63921
64084
  }
64085
+ ],
64086
+ sections: [
64087
+ {
64088
+ id: "diceActions",
64089
+ label: "Dice",
64090
+ icon: overlaySymbolIcon("dice.throw"),
64091
+ actionIds: ["dice.throw", "dice.range", "dice.fill"]
64092
+ }
63922
64093
  ]
63923
64094
  };
63924
64095
  var addDiceToolOverlay = {
@@ -63927,7 +64098,19 @@ var addDiceToolOverlay = {
63927
64098
  kind: "create",
63928
64099
  createsItemType: "Dice",
63929
64100
  family: "game",
63930
- icon: { kind: "symbol", key: "tool.dice" }
64101
+ icon: overlaySymbolIcon("tool.dice"),
64102
+ launch: { kind: "activate-tool" },
64103
+ surface: {
64104
+ order: 1,
64105
+ group: {
64106
+ id: "gameItems",
64107
+ label: "Game items",
64108
+ icon: overlaySymbolIcon("tool.dice"),
64109
+ order: 1,
64110
+ behavior: "open-panel"
64111
+ },
64112
+ relatedToolNames: ["AddScreen", "AddPouch"]
64113
+ }
63931
64114
  };
63932
64115
 
63933
64116
  // src/Items/Dice/Dice.ts
@@ -64275,8 +64458,7 @@ var screenOverlay = {
64275
64458
  id: "screen.background",
64276
64459
  label: "Background",
64277
64460
  icon: {
64278
- kind: "symbol",
64279
- key: "screen.background",
64461
+ ...overlaySymbolIcon("screen.background"),
64280
64462
  state: { swatch: { kind: "itemProperty", property: "backgroundColor" } }
64281
64463
  },
64282
64464
  target: "each",
@@ -64293,6 +64475,97 @@ var screenOverlay = {
64293
64475
  invoke: { kind: "setProperty", property: "backgroundColor" }
64294
64476
  }
64295
64477
  ]
64478
+ },
64479
+ {
64480
+ id: "screen.stroke",
64481
+ label: "Stroke",
64482
+ icon: {
64483
+ ...overlaySymbolIcon("shape.stroke"),
64484
+ state: { swatch: { kind: "itemProperty", property: "borderColor" } }
64485
+ },
64486
+ target: "each",
64487
+ controls: [
64488
+ {
64489
+ id: "borderColor",
64490
+ label: "Border color",
64491
+ valueSource: { kind: "itemProperty", property: "borderColor" },
64492
+ editor: {
64493
+ kind: "color",
64494
+ palette: ["#000000", "#FFFFFF", "#888888", "transparent"],
64495
+ allowTransparent: true,
64496
+ presentation: "square"
64497
+ },
64498
+ invoke: { kind: "setProperty", property: "borderColor" }
64499
+ },
64500
+ {
64501
+ id: "borderWidth",
64502
+ label: "Border width",
64503
+ valueSource: { kind: "itemProperty", property: "borderWidth" },
64504
+ editor: {
64505
+ kind: "number-stepper",
64506
+ min: 0,
64507
+ max: 8,
64508
+ step: 1,
64509
+ presets: [0, 1, 2, 4],
64510
+ unit: "px"
64511
+ },
64512
+ invoke: { kind: "setProperty", property: "borderWidth" }
64513
+ }
64514
+ ],
64515
+ groups: [
64516
+ {
64517
+ id: "screenStrokeStyle",
64518
+ label: "Stroke",
64519
+ icon: overlaySymbolIcon("shape.stroke"),
64520
+ controlIds: ["borderColor", "borderWidth"]
64521
+ }
64522
+ ]
64523
+ },
64524
+ {
64525
+ id: "screen.backgroundImage",
64526
+ label: "Background image",
64527
+ icon: overlaySymbolIcon("screen.backgroundImage"),
64528
+ target: "each",
64529
+ when: {
64530
+ kind: "falsy",
64531
+ source: { kind: "itemProperty", property: "backgroundUrl" }
64532
+ },
64533
+ controls: [
64534
+ {
64535
+ id: "backgroundUrl",
64536
+ label: "Background image",
64537
+ valueSource: { kind: "itemProperty", property: "backgroundUrl" },
64538
+ editor: {
64539
+ kind: "asset-upload",
64540
+ mode: "single",
64541
+ accept: ["image/*"]
64542
+ },
64543
+ invoke: { kind: "setProperty", property: "backgroundUrl" }
64544
+ }
64545
+ ]
64546
+ },
64547
+ {
64548
+ id: "screen.removeBackgroundImage",
64549
+ label: "Remove background image",
64550
+ icon: overlaySymbolIcon("screen.backgroundImage.remove"),
64551
+ target: "each",
64552
+ when: {
64553
+ kind: "truthy",
64554
+ source: { kind: "itemProperty", property: "backgroundUrl" }
64555
+ },
64556
+ invoke: {
64557
+ kind: "customMethod",
64558
+ methodName: "setBackgroundUrl",
64559
+ args: [{ kind: "static", value: "" }]
64560
+ }
64561
+ }
64562
+ ],
64563
+ sections: [
64564
+ {
64565
+ id: "screenAppearance",
64566
+ label: "Appearance",
64567
+ icon: overlaySymbolIcon("screen.background"),
64568
+ actionIds: ["screen.background", "screen.stroke", "screen.backgroundImage", "screen.removeBackgroundImage"]
64296
64569
  }
64297
64570
  ]
64298
64571
  };
@@ -64302,7 +64575,19 @@ var addScreenToolOverlay = {
64302
64575
  kind: "create",
64303
64576
  createsItemType: "Screen",
64304
64577
  family: "container",
64305
- icon: { kind: "symbol", key: "tool.screen" }
64578
+ icon: overlaySymbolIcon("tool.screen"),
64579
+ launch: { kind: "activate-tool" },
64580
+ surface: {
64581
+ order: 2,
64582
+ group: {
64583
+ id: "gameItems",
64584
+ label: "Game items",
64585
+ icon: overlaySymbolIcon("tool.dice"),
64586
+ order: 1,
64587
+ behavior: "open-panel"
64588
+ },
64589
+ relatedToolNames: ["AddDice", "AddPouch"]
64590
+ }
64306
64591
  };
64307
64592
  var addPouchToolOverlay = {
64308
64593
  toolName: "AddPouch",
@@ -64310,7 +64595,19 @@ var addPouchToolOverlay = {
64310
64595
  kind: "create",
64311
64596
  createsItemType: "Screen",
64312
64597
  family: "container",
64313
- icon: { kind: "symbol", key: "tool.pouch" }
64598
+ icon: overlaySymbolIcon("tool.pouch"),
64599
+ launch: { kind: "activate-tool" },
64600
+ surface: {
64601
+ order: 3,
64602
+ group: {
64603
+ id: "gameItems",
64604
+ label: "Game items",
64605
+ icon: overlaySymbolIcon("tool.dice"),
64606
+ order: 1,
64607
+ behavior: "open-panel"
64608
+ },
64609
+ relatedToolNames: ["AddDice", "AddScreen"]
64610
+ }
64314
64611
  };
64315
64612
 
64316
64613
  // src/Items/Screen/Screen.ts
@@ -72270,8 +72567,7 @@ var addDrawingToolOverlay = {
72270
72567
  family: "drawing",
72271
72568
  createsItemType: "Drawing",
72272
72569
  icon: {
72273
- kind: "symbol",
72274
- key: "tool.pen",
72570
+ ...overlaySymbolIcon("tool.pen"),
72275
72571
  state: {
72276
72572
  swatch: { kind: "toolProperty", property: "strokeColor" },
72277
72573
  note: "UI can show the pending pen color in the icon."
@@ -72283,10 +72579,22 @@ var addDrawingToolOverlay = {
72283
72579
  {
72284
72580
  id: "drawingDefaults",
72285
72581
  label: "Pen defaults",
72286
- icon: { kind: "symbol", key: "tool.pen" },
72582
+ icon: overlaySymbolIcon("tool.pen"),
72287
72583
  controlIds: strokeControls2.map((control) => control.id)
72288
72584
  }
72289
72585
  ]
72586
+ },
72587
+ launch: { kind: "activate-tool" },
72588
+ surface: {
72589
+ order: 1,
72590
+ group: {
72591
+ id: "drawingTools",
72592
+ label: "Drawing",
72593
+ icon: overlaySymbolIcon("tool.pen"),
72594
+ order: 5,
72595
+ behavior: "activate-last-used"
72596
+ },
72597
+ relatedToolNames: ["AddHighlighter", "Eraser"]
72290
72598
  }
72291
72599
  };
72292
72600
  var addHighlighterToolOverlay = {
@@ -72296,8 +72604,7 @@ var addHighlighterToolOverlay = {
72296
72604
  family: "drawing",
72297
72605
  createsItemType: "Drawing",
72298
72606
  icon: {
72299
- kind: "symbol",
72300
- key: "tool.highlighter",
72607
+ ...overlaySymbolIcon("tool.highlighter"),
72301
72608
  state: {
72302
72609
  swatch: { kind: "toolProperty", property: "strokeColor" },
72303
72610
  note: "UI can show the pending highlighter color in the icon."
@@ -72309,10 +72616,22 @@ var addHighlighterToolOverlay = {
72309
72616
  {
72310
72617
  id: "highlighterDefaults",
72311
72618
  label: "Highlighter defaults",
72312
- icon: { kind: "symbol", key: "tool.highlighter" },
72619
+ icon: overlaySymbolIcon("tool.highlighter"),
72313
72620
  controlIds: strokeControls2.map((control) => control.id)
72314
72621
  }
72315
72622
  ]
72623
+ },
72624
+ launch: { kind: "activate-tool" },
72625
+ surface: {
72626
+ order: 2,
72627
+ group: {
72628
+ id: "drawingTools",
72629
+ label: "Drawing",
72630
+ icon: overlaySymbolIcon("tool.pen"),
72631
+ order: 5,
72632
+ behavior: "activate-last-used"
72633
+ },
72634
+ relatedToolNames: ["AddDrawing", "Eraser"]
72316
72635
  }
72317
72636
  };
72318
72637
  var eraserToolOverlay = {
@@ -72320,7 +72639,7 @@ var eraserToolOverlay = {
72320
72639
  label: "Eraser",
72321
72640
  kind: "mode",
72322
72641
  family: "drawing",
72323
- icon: { kind: "symbol", key: "tool.eraser" },
72642
+ icon: overlaySymbolIcon("tool.eraser"),
72324
72643
  defaults: {
72325
72644
  controls: [
72326
72645
  {
@@ -72337,6 +72656,18 @@ var eraserToolOverlay = {
72337
72656
  invoke: { kind: "toolProperty", property: "strokeWidth" }
72338
72657
  }
72339
72658
  ]
72659
+ },
72660
+ launch: { kind: "activate-tool" },
72661
+ surface: {
72662
+ order: 3,
72663
+ group: {
72664
+ id: "drawingTools",
72665
+ label: "Drawing",
72666
+ icon: overlaySymbolIcon("tool.pen"),
72667
+ order: 5,
72668
+ behavior: "activate-last-used"
72669
+ },
72670
+ relatedToolNames: ["AddDrawing", "AddHighlighter"]
72340
72671
  }
72341
72672
  };
72342
72673
 
@@ -72537,7 +72868,7 @@ var frameTypeOptions = Object.keys(Frames).map((frameType) => ({
72537
72868
  id: frameType,
72538
72869
  label: frameType === "Custom" ? "Custom" : Frames[frameType].name,
72539
72870
  value: frameType,
72540
- icon: { kind: "symbol", key: `frame.${frameType}` }
72871
+ icon: overlaySymbolIcon(`frame.${frameType}`)
72541
72872
  }));
72542
72873
  var addFrameToolOverlay = {
72543
72874
  toolName: "AddFrame",
@@ -72545,7 +72876,7 @@ var addFrameToolOverlay = {
72545
72876
  kind: "create",
72546
72877
  createsItemType: "Frame",
72547
72878
  family: "frame",
72548
- icon: { kind: "symbol", key: "tool.frame" },
72879
+ icon: overlaySymbolIcon("tool.frame"),
72549
72880
  defaults: {
72550
72881
  controls: [
72551
72882
  {
@@ -72559,6 +72890,10 @@ var addFrameToolOverlay = {
72559
72890
  invoke: { kind: "toolProperty", property: "shape" }
72560
72891
  }
72561
72892
  ]
72893
+ },
72894
+ launch: { kind: "activate-tool" },
72895
+ surface: {
72896
+ order: 10
72562
72897
  }
72563
72898
  };
72564
72899
 
@@ -72923,8 +73258,7 @@ var addStickerToolOverlay = {
72923
73258
  createsItemType: "Sticker",
72924
73259
  family: "sticker",
72925
73260
  icon: {
72926
- kind: "symbol",
72927
- key: "tool.sticker",
73261
+ ...overlaySymbolIcon("tool.sticker"),
72928
73262
  state: {
72929
73263
  swatch: { kind: "toolProperty", property: "backgroundColor" }
72930
73264
  }
@@ -72935,10 +73269,14 @@ var addStickerToolOverlay = {
72935
73269
  id: "stickerBackgroundColor",
72936
73270
  label: "Color",
72937
73271
  valueSource: { kind: "toolProperty", property: "backgroundColor" },
72938
- editor: { kind: "color", palette: STICKER_COLORS },
73272
+ editor: { kind: "color", palette: STICKER_COLORS, presentation: "sticker" },
72939
73273
  invoke: { kind: "toolProperty", property: "backgroundColor" }
72940
73274
  }
72941
73275
  ]
73276
+ },
73277
+ launch: { kind: "activate-tool" },
73278
+ surface: {
73279
+ order: 9
72942
73280
  }
72943
73281
  };
72944
73282
 
@@ -75278,12 +75616,16 @@ export {
75278
75616
  positionAbsolutely,
75279
75617
  parsersHTML,
75280
75618
  parseCssRgb,
75619
+ overlaySymbolIcon,
75620
+ overlayAssetIcon,
75281
75621
  omitDefaultProperties,
75282
75622
  messageRouter,
75283
75623
  meetsWCAG_AAA,
75284
75624
  meetsWCAG_AA,
75625
+ matchesOverlayCondition,
75285
75626
  listToolOverlays,
75286
75627
  listSelectionActions,
75628
+ listCreateSurfaceEntries,
75287
75629
  itemOverlays,
75288
75630
  itemFactories2 as itemFactories,
75289
75631
  itemOverlays as itemActions,
@@ -75376,6 +75718,7 @@ export {
75376
75718
  PRESENCE_CLEANUP_USER_TIMER,
75377
75719
  PRESENCE_CLEANUP_IDLE_TIMER,
75378
75720
  OVERLAY_SYMBOL_KEYS,
75721
+ OVERLAY_ICON_SPRITE_PATH,
75379
75722
  MiroItemConverter,
75380
75723
  Mbr,
75381
75724
  Matrix,