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/node.js CHANGED
@@ -12274,6 +12274,23 @@ function toLocalTransformOp(op, containerMatrix, itemId) {
12274
12274
  return op;
12275
12275
  }
12276
12276
  }
12277
+ // src/Overlay/IconPack.ts
12278
+ var OVERLAY_ICON_SPRITE_PATH = "src/Overlay/overlay-icons.svg";
12279
+ function overlaySymbolIcon(key) {
12280
+ return {
12281
+ kind: "symbol",
12282
+ key,
12283
+ sourcePath: OVERLAY_ICON_SPRITE_PATH
12284
+ };
12285
+ }
12286
+ function overlayAssetIcon(path2) {
12287
+ return {
12288
+ kind: "asset",
12289
+ path: path2,
12290
+ mimeType: "image/svg+xml"
12291
+ };
12292
+ }
12293
+
12277
12294
  // src/Overlay/OverlayIcons.ts
12278
12295
  var OVERLAY_SYMBOL_KEYS = {
12279
12296
  styleFill: "style.fill",
@@ -12282,7 +12299,7 @@ var OVERLAY_SYMBOL_KEYS = {
12282
12299
  styleFontSize: "style.fontSize"
12283
12300
  };
12284
12301
  function symbolIcon(key, state) {
12285
- return state ? { kind: "symbol", key, state } : { kind: "symbol", key };
12302
+ return state ? { kind: "symbol", key, sourcePath: OVERLAY_ICON_SPRITE_PATH, state } : { kind: "symbol", key, sourcePath: OVERLAY_ICON_SPRITE_PATH };
12286
12303
  }
12287
12304
  function styleFillIcon(state) {
12288
12305
  return symbolIcon(OVERLAY_SYMBOL_KEYS.styleFill, state);
@@ -12323,6 +12340,45 @@ function getToolOverlay(toolName) {
12323
12340
  function listToolOverlays() {
12324
12341
  return Object.values(toolOverlays);
12325
12342
  }
12343
+ function listCreateSurfaceEntries() {
12344
+ const groupedEntries = new Map;
12345
+ const ungroupedEntries = [];
12346
+ for (const tool of Object.values(toolOverlays)) {
12347
+ const group = tool.surface?.group;
12348
+ if (!group) {
12349
+ ungroupedEntries.push({
12350
+ kind: "tool",
12351
+ tool,
12352
+ order: tool.surface?.order
12353
+ });
12354
+ continue;
12355
+ }
12356
+ const existing = groupedEntries.get(group.id);
12357
+ if (existing) {
12358
+ existing.tools.push(tool);
12359
+ if (existing.order === undefined && group.order !== undefined) {
12360
+ existing.order = group.order;
12361
+ }
12362
+ continue;
12363
+ }
12364
+ groupedEntries.set(group.id, {
12365
+ kind: "group",
12366
+ id: group.id,
12367
+ label: group.label,
12368
+ description: group.description,
12369
+ icon: group.icon,
12370
+ order: group.order,
12371
+ behavior: group.behavior,
12372
+ tools: [tool]
12373
+ });
12374
+ }
12375
+ const sortedGroups = [...groupedEntries.values()].map((group) => ({
12376
+ ...group,
12377
+ tools: [...group.tools].sort(compareToolsBySurfaceOrder)
12378
+ })).sort(compareEntriesByOrder);
12379
+ const sortedUngroupedEntries = [...ungroupedEntries].sort(compareEntriesByOrder);
12380
+ return [...sortedGroups, ...sortedUngroupedEntries];
12381
+ }
12326
12382
  function listSelectionActions() {
12327
12383
  return Object.values(selectionActions);
12328
12384
  }
@@ -12332,6 +12388,33 @@ function getSelectionOverlayActions(items) {
12332
12388
  function resolveDynamicOptions(providerId, context) {
12333
12389
  return dynamicOptionsResolvers[providerId]?.(context) ?? [];
12334
12390
  }
12391
+ function matchesOverlayCondition(condition, context) {
12392
+ if (!condition) {
12393
+ return true;
12394
+ }
12395
+ switch (condition.kind) {
12396
+ case "equals":
12397
+ return readOverlayValueSource(context, condition.source) === condition.value;
12398
+ case "truthy":
12399
+ return !!readOverlayValueSource(context, condition.source);
12400
+ case "falsy":
12401
+ return !readOverlayValueSource(context, condition.source);
12402
+ case "itemTypeIn":
12403
+ return context.items?.every((item) => condition.itemTypes.includes(item.itemType)) ?? (context.item ? condition.itemTypes.includes(context.item.itemType) : false);
12404
+ case "selectionSize": {
12405
+ const size = context.items?.length ?? (context.item ? 1 : 0);
12406
+ const meetsMin = condition.min === undefined || size >= condition.min;
12407
+ const meetsMax = condition.max === undefined || size <= condition.max;
12408
+ return meetsMin && meetsMax;
12409
+ }
12410
+ case "allOf":
12411
+ return condition.conditions.every((child) => matchesOverlayCondition(child, context));
12412
+ case "anyOf":
12413
+ return condition.conditions.some((child) => matchesOverlayCondition(child, context));
12414
+ case "not":
12415
+ return !matchesOverlayCondition(condition.condition, context);
12416
+ }
12417
+ }
12335
12418
  function intersectOverlayActions(items) {
12336
12419
  if (items.length === 0) {
12337
12420
  return [];
@@ -12350,6 +12433,24 @@ function intersectOverlayActions(items) {
12350
12433
  }
12351
12434
  return [...counts.values()].filter((action) => overlays.every((overlay) => overlay.actions.some((candidate) => candidate.id === action.id)) && (action.target !== "single" || items.length === 1));
12352
12435
  }
12436
+ function compareToolsBySurfaceOrder(a, b) {
12437
+ const aOrder = a.surface?.order ?? Number.MAX_SAFE_INTEGER;
12438
+ const bOrder = b.surface?.order ?? Number.MAX_SAFE_INTEGER;
12439
+ return aOrder - bOrder || a.label.localeCompare(b.label);
12440
+ }
12441
+ function compareEntriesByOrder(a, b) {
12442
+ const aOrder = a.order ?? Number.MAX_SAFE_INTEGER;
12443
+ const bOrder = b.order ?? Number.MAX_SAFE_INTEGER;
12444
+ const aLabel = a.label ?? a.tool?.label ?? "";
12445
+ const bLabel = b.label ?? b.tool?.label ?? "";
12446
+ return aOrder - bOrder || aLabel.localeCompare(bLabel);
12447
+ }
12448
+ function readOverlayValueSource(context, source) {
12449
+ if (source.kind === "itemProperty") {
12450
+ return context.item ? context.item[source.property] : undefined;
12451
+ }
12452
+ return context.tool ? context.tool[source.property] : undefined;
12453
+ }
12353
12454
  // src/Items/BaseItem/BaseItem.ts
12354
12455
  class BaseItem {
12355
12456
  static createCommand;
@@ -40085,6 +40186,7 @@ var richTextOverlay = {
40085
40186
  id: "text.fontSize",
40086
40187
  label: "Font size",
40087
40188
  icon: styleFontSizeIcon(),
40189
+ icon: styleFontSizeIcon(),
40088
40190
  target: "each",
40089
40191
  controls: [
40090
40192
  {
@@ -40102,6 +40204,14 @@ var richTextOverlay = {
40102
40204
  }
40103
40205
  ]
40104
40206
  }
40207
+ ],
40208
+ sections: [
40209
+ {
40210
+ id: "textTypography",
40211
+ label: "Typography",
40212
+ icon: overlaySymbolIcon("text.fontSize"),
40213
+ actionIds: ["text.fontSize"]
40214
+ }
40105
40215
  ]
40106
40216
  };
40107
40217
  var addTextToolOverlay = {
@@ -40110,8 +40220,12 @@ var addTextToolOverlay = {
40110
40220
  kind: "create",
40111
40221
  createsItemType: "RichText",
40112
40222
  family: "text",
40113
- icon: { kind: "symbol", key: "tool.text" },
40114
- description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool."
40223
+ icon: overlaySymbolIcon("tool.text"),
40224
+ description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool.",
40225
+ launch: { kind: "activate-tool" },
40226
+ surface: {
40227
+ order: 6
40228
+ }
40115
40229
  };
40116
40230
 
40117
40231
  // src/Items/RichText/RichText.ts
@@ -46514,7 +46628,7 @@ var COLOR_PALETTE = [
46514
46628
  "#118AB2",
46515
46629
  "#7B61FF"
46516
46630
  ];
46517
- var symbolIcon2 = (key) => ({ kind: "symbol", key });
46631
+ var symbolIcon2 = (key) => overlaySymbolIcon(key);
46518
46632
  var lineStyleOptions = ConnectorLineStyles.map((style) => ({
46519
46633
  id: style,
46520
46634
  label: style[0].toUpperCase() + style.slice(1),
@@ -46681,6 +46795,14 @@ var connectorOverlay = {
46681
46795
  }
46682
46796
  ]
46683
46797
  }
46798
+ ],
46799
+ sections: [
46800
+ {
46801
+ id: "connectorArrows",
46802
+ label: "Arrows",
46803
+ icon: symbolIcon2("connector.style"),
46804
+ actionIds: ["connector.switchPointers", "connector.style"]
46805
+ }
46684
46806
  ]
46685
46807
  };
46686
46808
  var addConnectorToolOverlay = {
@@ -46701,12 +46823,24 @@ var addConnectorToolOverlay = {
46701
46823
  controls: connectorToolControls,
46702
46824
  groups: [
46703
46825
  {
46704
- id: "connectorToolStyle",
46826
+ id: "connectorToolQuickDefaults",
46827
+ label: "Connector quick defaults",
46828
+ icon: symbolIcon2("connector.lineStyle.straight"),
46829
+ controlIds: ["toolLineStyle"],
46830
+ description: "Primary defaults that match the compact create-surface picker."
46831
+ },
46832
+ {
46833
+ id: "connectorToolAdvancedDefaults",
46705
46834
  label: "Connector defaults",
46706
46835
  icon: symbolIcon2("connector.style"),
46707
- controlIds: connectorToolControls.map((control) => control.id)
46836
+ controlIds: connectorToolControls.map((control) => control.id),
46837
+ description: "Extended defaults available in richer create flows."
46708
46838
  }
46709
46839
  ]
46840
+ },
46841
+ launch: { kind: "activate-tool" },
46842
+ surface: {
46843
+ order: 8
46710
46844
  }
46711
46845
  };
46712
46846
 
@@ -60845,57 +60979,53 @@ var COLOR_PALETTE2 = [
60845
60979
  "#7B61FF",
60846
60980
  "transparent"
60847
60981
  ];
60848
- var inlineShapeAsset = (folder, file2 = folder) => ({
60849
- kind: "asset",
60850
- path: `src/Items/Shape/Basic/${folder}/${file2}.icon.svg`,
60851
- mimeType: "image/svg+xml"
60852
- });
60853
- var symbolIcon3 = (key) => ({ kind: "symbol", key });
60982
+ var inlineShapeAsset = (folder, file2 = folder) => overlayAssetIcon(`src/Items/Shape/Basic/${folder}/${file2}.icon.svg`);
60983
+ var symbolIcon3 = (key) => overlaySymbolIcon(key);
60854
60984
  var BASIC_INLINE_OPTIONS = [
60855
- { id: "rectangle", label: "Rectangle", value: "Rectangle", icon: inlineShapeAsset("Rectangle") },
60856
- { id: "rounded-rectangle", label: "Rounded rectangle", value: "RoundedRectangle", icon: inlineShapeAsset("RoundedRectangle") },
60857
- { id: "circle", label: "Circle", value: "Circle", icon: inlineShapeAsset("Circle") },
60858
- { id: "triangle", label: "Triangle", value: "Triangle", icon: inlineShapeAsset("Triangle") },
60859
- { id: "rhombus", label: "Rhombus", value: "Rhombus", icon: inlineShapeAsset("Rhombus") }
60985
+ { id: "rectangle", label: "Rectangle", value: "Rectangle", icon: inlineShapeAsset("Rectangle"), family: "basicShapes" },
60986
+ { id: "rounded-rectangle", label: "Rounded rectangle", value: "RoundedRectangle", icon: inlineShapeAsset("RoundedRectangle"), family: "basicShapes" },
60987
+ { id: "circle", label: "Circle", value: "Circle", icon: inlineShapeAsset("Circle"), family: "basicShapes" },
60988
+ { id: "triangle", label: "Triangle", value: "Triangle", icon: inlineShapeAsset("Triangle"), family: "basicShapes" },
60989
+ { id: "rhombus", label: "Rhombus", value: "Rhombus", icon: inlineShapeAsset("Rhombus"), family: "basicShapes" }
60860
60990
  ];
60861
60991
  var SHAPE_CATALOG_OPTIONS = [
60862
60992
  ...BASIC_INLINE_OPTIONS,
60863
- { id: "reversed-triangle", label: "Reversed triangle", value: "ReversedTriangle", icon: symbolIcon3("shape.reversedTriangle") },
60864
- { id: "arrow-left", label: "Arrow left", value: "ArrowLeft", icon: inlineShapeAsset("ArrowLeft") },
60865
- { id: "arrow-right", label: "Arrow right", value: "ArrowRight", icon: inlineShapeAsset("ArrowRight") },
60866
- { id: "arrow-left-right", label: "Arrow left right", value: "ArrowLeftRight", icon: inlineShapeAsset("ArrowLeftRight") },
60867
- { id: "arrow-block-left", label: "Arrow block left", value: "ArrowBlockLeft", icon: symbolIcon3("shape.arrowBlockLeft") },
60868
- { id: "arrow-block-right", label: "Arrow block right", value: "ArrowBlockRight", icon: symbolIcon3("shape.arrowBlockRight") },
60869
- { id: "cloud", label: "Cloud", value: "Cloud", icon: inlineShapeAsset("Cloud") },
60870
- { id: "cross", label: "Cross", value: "Cross", icon: inlineShapeAsset("Cross") },
60871
- { id: "cylinder", label: "Cylinder", value: "Cylinder", icon: inlineShapeAsset("Cylinder") },
60872
- { id: "hexagon", label: "Hexagon", value: "Hexagon", icon: inlineShapeAsset("Hexagon") },
60873
- { id: "octagon", label: "Octagon", value: "Octagon", icon: inlineShapeAsset("Octagon") },
60874
- { id: "parallelogram", label: "Parallelogram", value: "Parallelogram", icon: inlineShapeAsset("Parallelogram") },
60875
- { id: "reversed-parallelogram", label: "Reversed parallelogram", value: "ReversedParallelogram", icon: symbolIcon3("shape.reversedParallelogram") },
60876
- { id: "pentagon", label: "Pentagon", value: "Pentagon", icon: inlineShapeAsset("Pentagon") },
60877
- { id: "predefined-process", label: "Predefined process", value: "PredefinedProcess", icon: symbolIcon3("shape.predefinedProcess") },
60878
- { id: "speech-bubble", label: "Speech bubble", value: "SpeachBubble", icon: inlineShapeAsset("SpeachBubble") },
60879
- { id: "star", label: "Star", value: "Star", icon: inlineShapeAsset("Star") },
60880
- { id: "trapezoid", label: "Trapezoid", value: "Trapezoid", icon: inlineShapeAsset("Trapezoid") },
60881
- { id: "braces-left", label: "Braces left", value: "BracesLeft", icon: inlineShapeAsset("BracesLeft", "BracesLeft") },
60882
- { id: "braces-right", label: "Braces right", value: "BracesRight", icon: inlineShapeAsset("BracesRight", "BracesRight") },
60883
- { id: "bpmn-task", label: "BPMN task", value: "BPMN_Task", icon: symbolIcon3("shape.bpmn.task") },
60884
- { id: "bpmn-gateway", label: "BPMN gateway", value: "BPMN_Gateway", icon: symbolIcon3("shape.bpmn.gateway") },
60885
- { id: "bpmn-gateway-parallel", label: "BPMN gateway parallel", value: "BPMN_GatewayParallel", icon: symbolIcon3("shape.bpmn.gatewayParallel") },
60886
- { id: "bpmn-gateway-xor", label: "BPMN gateway XOR", value: "BPMN_GatewayXOR", icon: symbolIcon3("shape.bpmn.gatewayXor") },
60887
- { id: "bpmn-start-event", label: "BPMN start event", value: "BPMN_StartEvent", icon: symbolIcon3("shape.bpmn.startEvent") },
60888
- { id: "bpmn-start-event-non-interrupting", label: "BPMN start event non interrupting", value: "BPMN_StartEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.startEventNoneInterrupting") },
60889
- { id: "bpmn-end-event", label: "BPMN end event", value: "BPMN_EndEvent", icon: symbolIcon3("shape.bpmn.endEvent") },
60890
- { id: "bpmn-intermediate-event", label: "BPMN intermediate event", value: "BPMN_IntermediateEvent", icon: symbolIcon3("shape.bpmn.intermediateEvent") },
60891
- { id: "bpmn-intermediate-event-none-interrupting", label: "BPMN intermediate event none interrupting", value: "BPMN_IntermediateEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.intermediateEventNoneInterrupting") },
60892
- { id: "bpmn-data-object", label: "BPMN data object", value: "BPMN_DataObject", icon: symbolIcon3("shape.bpmn.dataObject") },
60893
- { id: "bpmn-data-store", label: "BPMN data store", value: "BPMN_DataStore", icon: symbolIcon3("shape.bpmn.dataStore") },
60894
- { id: "bpmn-participant", label: "BPMN participant", value: "BPMN_Participant", icon: symbolIcon3("shape.bpmn.participant") },
60895
- { id: "bpmn-transaction", label: "BPMN transaction", value: "BPMN_Transaction", icon: symbolIcon3("shape.bpmn.transaction") },
60896
- { id: "bpmn-event-subprocess", label: "BPMN event subprocess", value: "BPMN_EventSubprocess", icon: symbolIcon3("shape.bpmn.eventSubprocess") },
60897
- { id: "bpmn-group", label: "BPMN group", value: "BPMN_Group", icon: symbolIcon3("shape.bpmn.group") },
60898
- { id: "bpmn-annotation", label: "BPMN annotation", value: "BPMN_Annotation", icon: symbolIcon3("shape.bpmn.annotation") }
60993
+ { id: "reversed-triangle", label: "Reversed triangle", value: "ReversedTriangle", icon: symbolIcon3("shape.reversedTriangle"), family: "basicShapes" },
60994
+ { id: "arrow-left", label: "Arrow left", value: "ArrowLeft", icon: inlineShapeAsset("ArrowLeft"), family: "basicShapes" },
60995
+ { id: "arrow-right", label: "Arrow right", value: "ArrowRight", icon: inlineShapeAsset("ArrowRight"), family: "basicShapes" },
60996
+ { id: "arrow-left-right", label: "Arrow left right", value: "ArrowLeftRight", icon: inlineShapeAsset("ArrowLeftRight"), family: "basicShapes" },
60997
+ { id: "arrow-block-left", label: "Arrow block left", value: "ArrowBlockLeft", icon: symbolIcon3("shape.arrowBlockLeft"), family: "basicShapes" },
60998
+ { id: "arrow-block-right", label: "Arrow block right", value: "ArrowBlockRight", icon: symbolIcon3("shape.arrowBlockRight"), family: "basicShapes" },
60999
+ { id: "cloud", label: "Cloud", value: "Cloud", icon: inlineShapeAsset("Cloud"), family: "basicShapes" },
61000
+ { id: "cross", label: "Cross", value: "Cross", icon: inlineShapeAsset("Cross"), family: "basicShapes" },
61001
+ { id: "cylinder", label: "Cylinder", value: "Cylinder", icon: inlineShapeAsset("Cylinder"), family: "basicShapes" },
61002
+ { id: "hexagon", label: "Hexagon", value: "Hexagon", icon: inlineShapeAsset("Hexagon"), family: "basicShapes" },
61003
+ { id: "octagon", label: "Octagon", value: "Octagon", icon: inlineShapeAsset("Octagon"), family: "basicShapes" },
61004
+ { id: "parallelogram", label: "Parallelogram", value: "Parallelogram", icon: inlineShapeAsset("Parallelogram"), family: "basicShapes" },
61005
+ { id: "reversed-parallelogram", label: "Reversed parallelogram", value: "ReversedParallelogram", icon: symbolIcon3("shape.reversedParallelogram"), family: "basicShapes" },
61006
+ { id: "pentagon", label: "Pentagon", value: "Pentagon", icon: inlineShapeAsset("Pentagon"), family: "basicShapes" },
61007
+ { id: "predefined-process", label: "Predefined process", value: "PredefinedProcess", icon: symbolIcon3("shape.predefinedProcess"), family: "basicShapes" },
61008
+ { id: "speech-bubble", label: "Speech bubble", value: "SpeachBubble", icon: inlineShapeAsset("SpeachBubble"), family: "basicShapes" },
61009
+ { id: "star", label: "Star", value: "Star", icon: inlineShapeAsset("Star"), family: "basicShapes" },
61010
+ { id: "trapezoid", label: "Trapezoid", value: "Trapezoid", icon: inlineShapeAsset("Trapezoid"), family: "basicShapes" },
61011
+ { id: "braces-left", label: "Braces left", value: "BracesLeft", icon: inlineShapeAsset("BracesLeft", "BracesLeft"), family: "basicShapes" },
61012
+ { id: "braces-right", label: "Braces right", value: "BracesRight", icon: inlineShapeAsset("BracesRight", "BracesRight"), family: "basicShapes" },
61013
+ { id: "bpmn-task", label: "BPMN task", value: "BPMN_Task", icon: symbolIcon3("shape.bpmn.task"), family: "bpmn" },
61014
+ { id: "bpmn-gateway", label: "BPMN gateway", value: "BPMN_Gateway", icon: symbolIcon3("shape.bpmn.gateway"), family: "bpmn" },
61015
+ { id: "bpmn-gateway-parallel", label: "BPMN gateway parallel", value: "BPMN_GatewayParallel", icon: symbolIcon3("shape.bpmn.gatewayParallel"), family: "bpmn" },
61016
+ { id: "bpmn-gateway-xor", label: "BPMN gateway XOR", value: "BPMN_GatewayXOR", icon: symbolIcon3("shape.bpmn.gatewayXor"), family: "bpmn" },
61017
+ { id: "bpmn-start-event", label: "BPMN start event", value: "BPMN_StartEvent", icon: symbolIcon3("shape.bpmn.startEvent"), family: "bpmn" },
61018
+ { id: "bpmn-start-event-non-interrupting", label: "BPMN start event non interrupting", value: "BPMN_StartEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.startEventNoneInterrupting"), family: "bpmn" },
61019
+ { id: "bpmn-end-event", label: "BPMN end event", value: "BPMN_EndEvent", icon: symbolIcon3("shape.bpmn.endEvent"), family: "bpmn" },
61020
+ { id: "bpmn-intermediate-event", label: "BPMN intermediate event", value: "BPMN_IntermediateEvent", icon: symbolIcon3("shape.bpmn.intermediateEvent"), family: "bpmn" },
61021
+ { id: "bpmn-intermediate-event-none-interrupting", label: "BPMN intermediate event none interrupting", value: "BPMN_IntermediateEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.intermediateEventNoneInterrupting"), family: "bpmn" },
61022
+ { id: "bpmn-data-object", label: "BPMN data object", value: "BPMN_DataObject", icon: symbolIcon3("shape.bpmn.dataObject"), family: "bpmn" },
61023
+ { id: "bpmn-data-store", label: "BPMN data store", value: "BPMN_DataStore", icon: symbolIcon3("shape.bpmn.dataStore"), family: "bpmn" },
61024
+ { id: "bpmn-participant", label: "BPMN participant", value: "BPMN_Participant", icon: symbolIcon3("shape.bpmn.participant"), family: "bpmn" },
61025
+ { id: "bpmn-transaction", label: "BPMN transaction", value: "BPMN_Transaction", icon: symbolIcon3("shape.bpmn.transaction"), family: "bpmn" },
61026
+ { id: "bpmn-event-subprocess", label: "BPMN event subprocess", value: "BPMN_EventSubprocess", icon: symbolIcon3("shape.bpmn.eventSubprocess"), family: "bpmn" },
61027
+ { id: "bpmn-group", label: "BPMN group", value: "BPMN_Group", icon: symbolIcon3("shape.bpmn.group"), family: "bpmn" },
61028
+ { id: "bpmn-annotation", label: "BPMN annotation", value: "BPMN_Annotation", icon: symbolIcon3("shape.bpmn.annotation"), family: "bpmn" }
60899
61029
  ];
60900
61030
  var BORDER_STYLE_OPTIONS = [
60901
61031
  { id: "solid", label: "Solid", value: "solid", icon: symbolIcon3("stroke.solid") },
@@ -60910,6 +61040,12 @@ var shapeTypeControl = {
60910
61040
  editor: {
60911
61041
  kind: "enum-icon",
60912
61042
  options: BASIC_INLINE_OPTIONS,
61043
+ layout: "grid",
61044
+ quickOptions: {
61045
+ family: "basicShapes",
61046
+ maxVisible: 18,
61047
+ overflow: "show-more"
61048
+ },
60913
61049
  catalog: {
60914
61050
  kind: "catalog",
60915
61051
  label: "Shape catalog",
@@ -60928,6 +61064,10 @@ var fillControl = {
60928
61064
  swatch: { kind: "itemProperty", property: "backgroundColor" },
60929
61065
  note: "UI can render the current fill color as a swatch inside the icon."
60930
61066
  }),
61067
+ icon: styleFillIcon({
61068
+ swatch: { kind: "itemProperty", property: "backgroundColor" },
61069
+ note: "UI can render the current fill color as a swatch inside the icon."
61070
+ }),
60931
61071
  editor: {
60932
61072
  kind: "color",
60933
61073
  palette: COLOR_PALETTE2,
@@ -61004,6 +61144,20 @@ var shapeOverlay = {
61004
61144
  }
61005
61145
  ]
61006
61146
  }
61147
+ ],
61148
+ sections: [
61149
+ {
61150
+ id: "shapeTypeSection",
61151
+ label: "Type",
61152
+ icon: symbolIcon3("shape.type"),
61153
+ actionIds: ["shape.shapeType"]
61154
+ },
61155
+ {
61156
+ id: "shapeAppearanceSection",
61157
+ label: "Appearance",
61158
+ icon: symbolIcon3("shape.stroke"),
61159
+ actionIds: ["shape.fill", "shape.strokeStyle"]
61160
+ }
61007
61161
  ]
61008
61162
  };
61009
61163
  var addShapeToolOverlay = {
@@ -61013,8 +61167,7 @@ var addShapeToolOverlay = {
61013
61167
  createsItemType: "Shape",
61014
61168
  family: "shape",
61015
61169
  icon: {
61016
- kind: "symbol",
61017
- key: "tool.shape",
61170
+ ...overlaySymbolIcon("tool.shape"),
61018
61171
  state: {
61019
61172
  note: "UI may swap the top-level icon to the selected shape option when desired."
61020
61173
  }
@@ -61028,6 +61181,12 @@ var addShapeToolOverlay = {
61028
61181
  editor: {
61029
61182
  kind: "enum-icon",
61030
61183
  options: BASIC_INLINE_OPTIONS,
61184
+ layout: "grid",
61185
+ quickOptions: {
61186
+ family: "basicShapes",
61187
+ maxVisible: 18,
61188
+ overflow: "show-more"
61189
+ },
61031
61190
  catalog: {
61032
61191
  kind: "catalog",
61033
61192
  label: "Shape catalog",
@@ -61038,6 +61197,10 @@ var addShapeToolOverlay = {
61038
61197
  invoke: { kind: "toolProperty", property: "type" }
61039
61198
  }
61040
61199
  ]
61200
+ },
61201
+ launch: { kind: "activate-tool" },
61202
+ surface: {
61203
+ order: 7
61041
61204
  }
61042
61205
  };
61043
61206
 
@@ -65444,14 +65607,14 @@ var cardOverlay = {
65444
65607
  {
65445
65608
  id: "card.flip",
65446
65609
  label: "Flip card",
65447
- icon: { kind: "symbol", key: "card.flip" },
65610
+ icon: overlaySymbolIcon("card.flip"),
65448
65611
  target: "each",
65449
65612
  invoke: { kind: "customMethod", methodName: "toggleIsOpen" }
65450
65613
  },
65451
65614
  {
65452
65615
  id: "card.rotateCcw",
65453
65616
  label: "Rotate 90 counter clockwise",
65454
- icon: { kind: "symbol", key: "card.rotateCcw" },
65617
+ icon: overlaySymbolIcon("card.rotateCcw"),
65455
65618
  target: "each",
65456
65619
  invoke: {
65457
65620
  kind: "customMethod",
@@ -65462,7 +65625,7 @@ var cardOverlay = {
65462
65625
  {
65463
65626
  id: "card.rotateCw",
65464
65627
  label: "Rotate 90 clockwise",
65465
- icon: { kind: "symbol", key: "card.rotateCw" },
65628
+ icon: overlaySymbolIcon("card.rotateCw"),
65466
65629
  target: "each",
65467
65630
  invoke: {
65468
65631
  kind: "customMethod",
@@ -65716,28 +65879,28 @@ var deckOverlay = {
65716
65879
  {
65717
65880
  id: "deck.getTopCard",
65718
65881
  label: "Draw top card",
65719
- icon: { kind: "symbol", key: "deck.drawTop" },
65882
+ icon: overlaySymbolIcon("deck.drawTop"),
65720
65883
  target: "single",
65721
65884
  invoke: { kind: "customMethod", methodName: "getTopCard" }
65722
65885
  },
65723
65886
  {
65724
65887
  id: "deck.getBottomCard",
65725
65888
  label: "Draw bottom card",
65726
- icon: { kind: "symbol", key: "deck.drawBottom" },
65889
+ icon: overlaySymbolIcon("deck.drawBottom"),
65727
65890
  target: "single",
65728
65891
  invoke: { kind: "customMethod", methodName: "getBottomCard" }
65729
65892
  },
65730
65893
  {
65731
65894
  id: "deck.getRandomCard",
65732
65895
  label: "Draw random card",
65733
- icon: { kind: "symbol", key: "deck.drawRandom" },
65896
+ icon: overlaySymbolIcon("deck.drawRandom"),
65734
65897
  target: "single",
65735
65898
  invoke: { kind: "customMethod", methodName: "getRandomCard" }
65736
65899
  },
65737
65900
  {
65738
65901
  id: "deck.getCards",
65739
65902
  label: "Draw cards",
65740
- icon: { kind: "symbol", key: "deck.drawMany" },
65903
+ icon: overlaySymbolIcon("deck.drawMany"),
65741
65904
  target: "single",
65742
65905
  controls: [
65743
65906
  {
@@ -65759,14 +65922,14 @@ var deckOverlay = {
65759
65922
  {
65760
65923
  id: "deck.shuffle",
65761
65924
  label: "Shuffle",
65762
- icon: { kind: "symbol", key: "deck.shuffle" },
65925
+ icon: overlaySymbolIcon("deck.shuffle"),
65763
65926
  target: "single",
65764
65927
  invoke: { kind: "customMethod", methodName: "shuffleDeck" }
65765
65928
  },
65766
65929
  {
65767
65930
  id: "deck.flip",
65768
65931
  label: "Flip deck",
65769
- icon: { kind: "symbol", key: "deck.flip" },
65932
+ icon: overlaySymbolIcon("deck.flip"),
65770
65933
  target: "single",
65771
65934
  invoke: { kind: "customMethod", methodName: "flipDeck" }
65772
65935
  }
@@ -65775,7 +65938,7 @@ var deckOverlay = {
65775
65938
  var createDeckSelectionAction = {
65776
65939
  id: "deck.createFromSelection",
65777
65940
  label: "Create deck",
65778
- icon: { kind: "symbol", key: "deck.createFromSelection" },
65941
+ icon: overlaySymbolIcon("deck.createFromSelection"),
65779
65942
  description: "Stacks selected cards into a new deck, or merges selected cards and decks into one deck.",
65780
65943
  invoke: { kind: "selectionMethod", methodName: "createDeck" },
65781
65944
  isAvailable: (items) => {
@@ -66344,14 +66507,14 @@ var diceOverlay = {
66344
66507
  {
66345
66508
  id: "dice.throw",
66346
66509
  label: "Throw dice",
66347
- icon: { kind: "symbol", key: "dice.throw" },
66510
+ icon: overlaySymbolIcon("dice.throw"),
66348
66511
  target: "each",
66349
66512
  invoke: { kind: "customMethod", methodName: "throwDice" }
66350
66513
  },
66351
66514
  {
66352
66515
  id: "dice.range",
66353
66516
  label: "Range",
66354
- icon: { kind: "symbol", key: "dice.range" },
66517
+ icon: overlaySymbolIcon("dice.range"),
66355
66518
  target: "each",
66356
66519
  controls: [
66357
66520
  {
@@ -66387,6 +66550,14 @@ var diceOverlay = {
66387
66550
  }
66388
66551
  ]
66389
66552
  }
66553
+ ],
66554
+ sections: [
66555
+ {
66556
+ id: "diceActions",
66557
+ label: "Dice",
66558
+ icon: overlaySymbolIcon("dice.throw"),
66559
+ actionIds: ["dice.throw", "dice.range", "dice.fill"]
66560
+ }
66390
66561
  ]
66391
66562
  };
66392
66563
  var addDiceToolOverlay = {
@@ -66395,7 +66566,19 @@ var addDiceToolOverlay = {
66395
66566
  kind: "create",
66396
66567
  createsItemType: "Dice",
66397
66568
  family: "game",
66398
- icon: { kind: "symbol", key: "tool.dice" }
66569
+ icon: overlaySymbolIcon("tool.dice"),
66570
+ launch: { kind: "activate-tool" },
66571
+ surface: {
66572
+ order: 1,
66573
+ group: {
66574
+ id: "gameItems",
66575
+ label: "Game items",
66576
+ icon: overlaySymbolIcon("tool.dice"),
66577
+ order: 1,
66578
+ behavior: "open-panel"
66579
+ },
66580
+ relatedToolNames: ["AddScreen", "AddPouch"]
66581
+ }
66399
66582
  };
66400
66583
 
66401
66584
  // src/Items/Dice/Dice.ts
@@ -66743,8 +66926,7 @@ var screenOverlay = {
66743
66926
  id: "screen.background",
66744
66927
  label: "Background",
66745
66928
  icon: {
66746
- kind: "symbol",
66747
- key: "screen.background",
66929
+ ...overlaySymbolIcon("screen.background"),
66748
66930
  state: { swatch: { kind: "itemProperty", property: "backgroundColor" } }
66749
66931
  },
66750
66932
  target: "each",
@@ -66761,6 +66943,97 @@ var screenOverlay = {
66761
66943
  invoke: { kind: "setProperty", property: "backgroundColor" }
66762
66944
  }
66763
66945
  ]
66946
+ },
66947
+ {
66948
+ id: "screen.stroke",
66949
+ label: "Stroke",
66950
+ icon: {
66951
+ ...overlaySymbolIcon("shape.stroke"),
66952
+ state: { swatch: { kind: "itemProperty", property: "borderColor" } }
66953
+ },
66954
+ target: "each",
66955
+ controls: [
66956
+ {
66957
+ id: "borderColor",
66958
+ label: "Border color",
66959
+ valueSource: { kind: "itemProperty", property: "borderColor" },
66960
+ editor: {
66961
+ kind: "color",
66962
+ palette: ["#000000", "#FFFFFF", "#888888", "transparent"],
66963
+ allowTransparent: true,
66964
+ presentation: "square"
66965
+ },
66966
+ invoke: { kind: "setProperty", property: "borderColor" }
66967
+ },
66968
+ {
66969
+ id: "borderWidth",
66970
+ label: "Border width",
66971
+ valueSource: { kind: "itemProperty", property: "borderWidth" },
66972
+ editor: {
66973
+ kind: "number-stepper",
66974
+ min: 0,
66975
+ max: 8,
66976
+ step: 1,
66977
+ presets: [0, 1, 2, 4],
66978
+ unit: "px"
66979
+ },
66980
+ invoke: { kind: "setProperty", property: "borderWidth" }
66981
+ }
66982
+ ],
66983
+ groups: [
66984
+ {
66985
+ id: "screenStrokeStyle",
66986
+ label: "Stroke",
66987
+ icon: overlaySymbolIcon("shape.stroke"),
66988
+ controlIds: ["borderColor", "borderWidth"]
66989
+ }
66990
+ ]
66991
+ },
66992
+ {
66993
+ id: "screen.backgroundImage",
66994
+ label: "Background image",
66995
+ icon: overlaySymbolIcon("screen.backgroundImage"),
66996
+ target: "each",
66997
+ when: {
66998
+ kind: "falsy",
66999
+ source: { kind: "itemProperty", property: "backgroundUrl" }
67000
+ },
67001
+ controls: [
67002
+ {
67003
+ id: "backgroundUrl",
67004
+ label: "Background image",
67005
+ valueSource: { kind: "itemProperty", property: "backgroundUrl" },
67006
+ editor: {
67007
+ kind: "asset-upload",
67008
+ mode: "single",
67009
+ accept: ["image/*"]
67010
+ },
67011
+ invoke: { kind: "setProperty", property: "backgroundUrl" }
67012
+ }
67013
+ ]
67014
+ },
67015
+ {
67016
+ id: "screen.removeBackgroundImage",
67017
+ label: "Remove background image",
67018
+ icon: overlaySymbolIcon("screen.backgroundImage.remove"),
67019
+ target: "each",
67020
+ when: {
67021
+ kind: "truthy",
67022
+ source: { kind: "itemProperty", property: "backgroundUrl" }
67023
+ },
67024
+ invoke: {
67025
+ kind: "customMethod",
67026
+ methodName: "setBackgroundUrl",
67027
+ args: [{ kind: "static", value: "" }]
67028
+ }
67029
+ }
67030
+ ],
67031
+ sections: [
67032
+ {
67033
+ id: "screenAppearance",
67034
+ label: "Appearance",
67035
+ icon: overlaySymbolIcon("screen.background"),
67036
+ actionIds: ["screen.background", "screen.stroke", "screen.backgroundImage", "screen.removeBackgroundImage"]
66764
67037
  }
66765
67038
  ]
66766
67039
  };
@@ -66770,7 +67043,19 @@ var addScreenToolOverlay = {
66770
67043
  kind: "create",
66771
67044
  createsItemType: "Screen",
66772
67045
  family: "container",
66773
- icon: { kind: "symbol", key: "tool.screen" }
67046
+ icon: overlaySymbolIcon("tool.screen"),
67047
+ launch: { kind: "activate-tool" },
67048
+ surface: {
67049
+ order: 2,
67050
+ group: {
67051
+ id: "gameItems",
67052
+ label: "Game items",
67053
+ icon: overlaySymbolIcon("tool.dice"),
67054
+ order: 1,
67055
+ behavior: "open-panel"
67056
+ },
67057
+ relatedToolNames: ["AddDice", "AddPouch"]
67058
+ }
66774
67059
  };
66775
67060
  var addPouchToolOverlay = {
66776
67061
  toolName: "AddPouch",
@@ -66778,7 +67063,19 @@ var addPouchToolOverlay = {
66778
67063
  kind: "create",
66779
67064
  createsItemType: "Screen",
66780
67065
  family: "container",
66781
- icon: { kind: "symbol", key: "tool.pouch" }
67066
+ icon: overlaySymbolIcon("tool.pouch"),
67067
+ launch: { kind: "activate-tool" },
67068
+ surface: {
67069
+ order: 3,
67070
+ group: {
67071
+ id: "gameItems",
67072
+ label: "Game items",
67073
+ icon: overlaySymbolIcon("tool.dice"),
67074
+ order: 1,
67075
+ behavior: "open-panel"
67076
+ },
67077
+ relatedToolNames: ["AddDice", "AddScreen"]
67078
+ }
66782
67079
  };
66783
67080
 
66784
67081
  // src/Items/Screen/Screen.ts
@@ -74738,8 +75035,7 @@ var addDrawingToolOverlay = {
74738
75035
  family: "drawing",
74739
75036
  createsItemType: "Drawing",
74740
75037
  icon: {
74741
- kind: "symbol",
74742
- key: "tool.pen",
75038
+ ...overlaySymbolIcon("tool.pen"),
74743
75039
  state: {
74744
75040
  swatch: { kind: "toolProperty", property: "strokeColor" },
74745
75041
  note: "UI can show the pending pen color in the icon."
@@ -74751,10 +75047,22 @@ var addDrawingToolOverlay = {
74751
75047
  {
74752
75048
  id: "drawingDefaults",
74753
75049
  label: "Pen defaults",
74754
- icon: { kind: "symbol", key: "tool.pen" },
75050
+ icon: overlaySymbolIcon("tool.pen"),
74755
75051
  controlIds: strokeControls2.map((control) => control.id)
74756
75052
  }
74757
75053
  ]
75054
+ },
75055
+ launch: { kind: "activate-tool" },
75056
+ surface: {
75057
+ order: 1,
75058
+ group: {
75059
+ id: "drawingTools",
75060
+ label: "Drawing",
75061
+ icon: overlaySymbolIcon("tool.pen"),
75062
+ order: 5,
75063
+ behavior: "activate-last-used"
75064
+ },
75065
+ relatedToolNames: ["AddHighlighter", "Eraser"]
74758
75066
  }
74759
75067
  };
74760
75068
  var addHighlighterToolOverlay = {
@@ -74764,8 +75072,7 @@ var addHighlighterToolOverlay = {
74764
75072
  family: "drawing",
74765
75073
  createsItemType: "Drawing",
74766
75074
  icon: {
74767
- kind: "symbol",
74768
- key: "tool.highlighter",
75075
+ ...overlaySymbolIcon("tool.highlighter"),
74769
75076
  state: {
74770
75077
  swatch: { kind: "toolProperty", property: "strokeColor" },
74771
75078
  note: "UI can show the pending highlighter color in the icon."
@@ -74777,10 +75084,22 @@ var addHighlighterToolOverlay = {
74777
75084
  {
74778
75085
  id: "highlighterDefaults",
74779
75086
  label: "Highlighter defaults",
74780
- icon: { kind: "symbol", key: "tool.highlighter" },
75087
+ icon: overlaySymbolIcon("tool.highlighter"),
74781
75088
  controlIds: strokeControls2.map((control) => control.id)
74782
75089
  }
74783
75090
  ]
75091
+ },
75092
+ launch: { kind: "activate-tool" },
75093
+ surface: {
75094
+ order: 2,
75095
+ group: {
75096
+ id: "drawingTools",
75097
+ label: "Drawing",
75098
+ icon: overlaySymbolIcon("tool.pen"),
75099
+ order: 5,
75100
+ behavior: "activate-last-used"
75101
+ },
75102
+ relatedToolNames: ["AddDrawing", "Eraser"]
74784
75103
  }
74785
75104
  };
74786
75105
  var eraserToolOverlay = {
@@ -74788,7 +75107,7 @@ var eraserToolOverlay = {
74788
75107
  label: "Eraser",
74789
75108
  kind: "mode",
74790
75109
  family: "drawing",
74791
- icon: { kind: "symbol", key: "tool.eraser" },
75110
+ icon: overlaySymbolIcon("tool.eraser"),
74792
75111
  defaults: {
74793
75112
  controls: [
74794
75113
  {
@@ -74805,6 +75124,18 @@ var eraserToolOverlay = {
74805
75124
  invoke: { kind: "toolProperty", property: "strokeWidth" }
74806
75125
  }
74807
75126
  ]
75127
+ },
75128
+ launch: { kind: "activate-tool" },
75129
+ surface: {
75130
+ order: 3,
75131
+ group: {
75132
+ id: "drawingTools",
75133
+ label: "Drawing",
75134
+ icon: overlaySymbolIcon("tool.pen"),
75135
+ order: 5,
75136
+ behavior: "activate-last-used"
75137
+ },
75138
+ relatedToolNames: ["AddDrawing", "AddHighlighter"]
74808
75139
  }
74809
75140
  };
74810
75141
 
@@ -75005,7 +75336,7 @@ var frameTypeOptions = Object.keys(Frames).map((frameType) => ({
75005
75336
  id: frameType,
75006
75337
  label: frameType === "Custom" ? "Custom" : Frames[frameType].name,
75007
75338
  value: frameType,
75008
- icon: { kind: "symbol", key: `frame.${frameType}` }
75339
+ icon: overlaySymbolIcon(`frame.${frameType}`)
75009
75340
  }));
75010
75341
  var addFrameToolOverlay = {
75011
75342
  toolName: "AddFrame",
@@ -75013,7 +75344,7 @@ var addFrameToolOverlay = {
75013
75344
  kind: "create",
75014
75345
  createsItemType: "Frame",
75015
75346
  family: "frame",
75016
- icon: { kind: "symbol", key: "tool.frame" },
75347
+ icon: overlaySymbolIcon("tool.frame"),
75017
75348
  defaults: {
75018
75349
  controls: [
75019
75350
  {
@@ -75027,6 +75358,10 @@ var addFrameToolOverlay = {
75027
75358
  invoke: { kind: "toolProperty", property: "shape" }
75028
75359
  }
75029
75360
  ]
75361
+ },
75362
+ launch: { kind: "activate-tool" },
75363
+ surface: {
75364
+ order: 10
75030
75365
  }
75031
75366
  };
75032
75367
 
@@ -75391,8 +75726,7 @@ var addStickerToolOverlay = {
75391
75726
  createsItemType: "Sticker",
75392
75727
  family: "sticker",
75393
75728
  icon: {
75394
- kind: "symbol",
75395
- key: "tool.sticker",
75729
+ ...overlaySymbolIcon("tool.sticker"),
75396
75730
  state: {
75397
75731
  swatch: { kind: "toolProperty", property: "backgroundColor" }
75398
75732
  }
@@ -75403,10 +75737,14 @@ var addStickerToolOverlay = {
75403
75737
  id: "stickerBackgroundColor",
75404
75738
  label: "Color",
75405
75739
  valueSource: { kind: "toolProperty", property: "backgroundColor" },
75406
- editor: { kind: "color", palette: STICKER_COLORS },
75740
+ editor: { kind: "color", palette: STICKER_COLORS, presentation: "sticker" },
75407
75741
  invoke: { kind: "toolProperty", property: "backgroundColor" }
75408
75742
  }
75409
75743
  ]
75744
+ },
75745
+ launch: { kind: "activate-tool" },
75746
+ surface: {
75747
+ order: 9
75410
75748
  }
75411
75749
  };
75412
75750
 
@@ -77913,12 +78251,16 @@ export {
77913
78251
  positionAbsolutely,
77914
78252
  parsersHTML,
77915
78253
  parseCssRgb,
78254
+ overlaySymbolIcon,
78255
+ overlayAssetIcon,
77916
78256
  omitDefaultProperties,
77917
78257
  messageRouter,
77918
78258
  meetsWCAG_AAA,
77919
78259
  meetsWCAG_AA,
78260
+ matchesOverlayCondition,
77920
78261
  listToolOverlays,
77921
78262
  listSelectionActions,
78263
+ listCreateSurfaceEntries,
77922
78264
  itemOverlays,
77923
78265
  itemFactories2 as itemFactories,
77924
78266
  itemOverlays as itemActions,
@@ -78011,6 +78353,7 @@ export {
78011
78353
  PRESENCE_CLEANUP_USER_TIMER,
78012
78354
  PRESENCE_CLEANUP_IDLE_TIMER,
78013
78355
  OVERLAY_SYMBOL_KEYS,
78356
+ OVERLAY_ICON_SPRITE_PATH,
78014
78357
  MiroItemConverter,
78015
78358
  Mbr,
78016
78359
  Matrix,