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/cjs/node.js CHANGED
@@ -1710,12 +1710,16 @@ __export(exports_node, {
1710
1710
  positionAbsolutely: () => positionAbsolutely,
1711
1711
  parsersHTML: () => parsersHTML,
1712
1712
  parseCssRgb: () => parseCssRgb,
1713
+ overlaySymbolIcon: () => overlaySymbolIcon,
1714
+ overlayAssetIcon: () => overlayAssetIcon,
1713
1715
  omitDefaultProperties: () => omitDefaultProperties,
1714
1716
  messageRouter: () => messageRouter,
1715
1717
  meetsWCAG_AAA: () => meetsWCAG_AAA,
1716
1718
  meetsWCAG_AA: () => meetsWCAG_AA,
1719
+ matchesOverlayCondition: () => matchesOverlayCondition,
1717
1720
  listToolOverlays: () => listToolOverlays,
1718
1721
  listSelectionActions: () => listSelectionActions,
1722
+ listCreateSurfaceEntries: () => listCreateSurfaceEntries,
1719
1723
  itemOverlays: () => itemOverlays,
1720
1724
  itemFactories: () => itemFactories2,
1721
1725
  itemActions: () => itemOverlays,
@@ -1808,6 +1812,7 @@ __export(exports_node, {
1808
1812
  PRESENCE_CLEANUP_USER_TIMER: () => PRESENCE_CLEANUP_USER_TIMER,
1809
1813
  PRESENCE_CLEANUP_IDLE_TIMER: () => PRESENCE_CLEANUP_IDLE_TIMER,
1810
1814
  OVERLAY_SYMBOL_KEYS: () => OVERLAY_SYMBOL_KEYS,
1815
+ OVERLAY_ICON_SPRITE_PATH: () => OVERLAY_ICON_SPRITE_PATH,
1811
1816
  MiroItemConverter: () => MiroItemConverter,
1812
1817
  Mbr: () => Mbr,
1813
1818
  Matrix: () => Matrix,
@@ -12753,6 +12758,23 @@ function toLocalTransformOp(op, containerMatrix, itemId) {
12753
12758
  return op;
12754
12759
  }
12755
12760
  }
12761
+ // src/Overlay/IconPack.ts
12762
+ var OVERLAY_ICON_SPRITE_PATH = "src/Overlay/overlay-icons.svg";
12763
+ function overlaySymbolIcon(key) {
12764
+ return {
12765
+ kind: "symbol",
12766
+ key,
12767
+ sourcePath: OVERLAY_ICON_SPRITE_PATH
12768
+ };
12769
+ }
12770
+ function overlayAssetIcon(path2) {
12771
+ return {
12772
+ kind: "asset",
12773
+ path: path2,
12774
+ mimeType: "image/svg+xml"
12775
+ };
12776
+ }
12777
+
12756
12778
  // src/Overlay/OverlayIcons.ts
12757
12779
  var OVERLAY_SYMBOL_KEYS = {
12758
12780
  styleFill: "style.fill",
@@ -12761,7 +12783,7 @@ var OVERLAY_SYMBOL_KEYS = {
12761
12783
  styleFontSize: "style.fontSize"
12762
12784
  };
12763
12785
  function symbolIcon(key, state) {
12764
- return state ? { kind: "symbol", key, state } : { kind: "symbol", key };
12786
+ return state ? { kind: "symbol", key, sourcePath: OVERLAY_ICON_SPRITE_PATH, state } : { kind: "symbol", key, sourcePath: OVERLAY_ICON_SPRITE_PATH };
12765
12787
  }
12766
12788
  function styleFillIcon(state) {
12767
12789
  return symbolIcon(OVERLAY_SYMBOL_KEYS.styleFill, state);
@@ -12802,6 +12824,45 @@ function getToolOverlay(toolName) {
12802
12824
  function listToolOverlays() {
12803
12825
  return Object.values(toolOverlays);
12804
12826
  }
12827
+ function listCreateSurfaceEntries() {
12828
+ const groupedEntries = new Map;
12829
+ const ungroupedEntries = [];
12830
+ for (const tool of Object.values(toolOverlays)) {
12831
+ const group = tool.surface?.group;
12832
+ if (!group) {
12833
+ ungroupedEntries.push({
12834
+ kind: "tool",
12835
+ tool,
12836
+ order: tool.surface?.order
12837
+ });
12838
+ continue;
12839
+ }
12840
+ const existing = groupedEntries.get(group.id);
12841
+ if (existing) {
12842
+ existing.tools.push(tool);
12843
+ if (existing.order === undefined && group.order !== undefined) {
12844
+ existing.order = group.order;
12845
+ }
12846
+ continue;
12847
+ }
12848
+ groupedEntries.set(group.id, {
12849
+ kind: "group",
12850
+ id: group.id,
12851
+ label: group.label,
12852
+ description: group.description,
12853
+ icon: group.icon,
12854
+ order: group.order,
12855
+ behavior: group.behavior,
12856
+ tools: [tool]
12857
+ });
12858
+ }
12859
+ const sortedGroups = [...groupedEntries.values()].map((group) => ({
12860
+ ...group,
12861
+ tools: [...group.tools].sort(compareToolsBySurfaceOrder)
12862
+ })).sort(compareEntriesByOrder);
12863
+ const sortedUngroupedEntries = [...ungroupedEntries].sort(compareEntriesByOrder);
12864
+ return [...sortedGroups, ...sortedUngroupedEntries];
12865
+ }
12805
12866
  function listSelectionActions() {
12806
12867
  return Object.values(selectionActions);
12807
12868
  }
@@ -12811,6 +12872,33 @@ function getSelectionOverlayActions(items) {
12811
12872
  function resolveDynamicOptions(providerId, context) {
12812
12873
  return dynamicOptionsResolvers[providerId]?.(context) ?? [];
12813
12874
  }
12875
+ function matchesOverlayCondition(condition, context) {
12876
+ if (!condition) {
12877
+ return true;
12878
+ }
12879
+ switch (condition.kind) {
12880
+ case "equals":
12881
+ return readOverlayValueSource(context, condition.source) === condition.value;
12882
+ case "truthy":
12883
+ return !!readOverlayValueSource(context, condition.source);
12884
+ case "falsy":
12885
+ return !readOverlayValueSource(context, condition.source);
12886
+ case "itemTypeIn":
12887
+ return context.items?.every((item) => condition.itemTypes.includes(item.itemType)) ?? (context.item ? condition.itemTypes.includes(context.item.itemType) : false);
12888
+ case "selectionSize": {
12889
+ const size = context.items?.length ?? (context.item ? 1 : 0);
12890
+ const meetsMin = condition.min === undefined || size >= condition.min;
12891
+ const meetsMax = condition.max === undefined || size <= condition.max;
12892
+ return meetsMin && meetsMax;
12893
+ }
12894
+ case "allOf":
12895
+ return condition.conditions.every((child) => matchesOverlayCondition(child, context));
12896
+ case "anyOf":
12897
+ return condition.conditions.some((child) => matchesOverlayCondition(child, context));
12898
+ case "not":
12899
+ return !matchesOverlayCondition(condition.condition, context);
12900
+ }
12901
+ }
12814
12902
  function intersectOverlayActions(items) {
12815
12903
  if (items.length === 0) {
12816
12904
  return [];
@@ -12829,6 +12917,24 @@ function intersectOverlayActions(items) {
12829
12917
  }
12830
12918
  return [...counts.values()].filter((action) => overlays.every((overlay) => overlay.actions.some((candidate) => candidate.id === action.id)) && (action.target !== "single" || items.length === 1));
12831
12919
  }
12920
+ function compareToolsBySurfaceOrder(a, b) {
12921
+ const aOrder = a.surface?.order ?? Number.MAX_SAFE_INTEGER;
12922
+ const bOrder = b.surface?.order ?? Number.MAX_SAFE_INTEGER;
12923
+ return aOrder - bOrder || a.label.localeCompare(b.label);
12924
+ }
12925
+ function compareEntriesByOrder(a, b) {
12926
+ const aOrder = a.order ?? Number.MAX_SAFE_INTEGER;
12927
+ const bOrder = b.order ?? Number.MAX_SAFE_INTEGER;
12928
+ const aLabel = a.label ?? a.tool?.label ?? "";
12929
+ const bLabel = b.label ?? b.tool?.label ?? "";
12930
+ return aOrder - bOrder || aLabel.localeCompare(bLabel);
12931
+ }
12932
+ function readOverlayValueSource(context, source) {
12933
+ if (source.kind === "itemProperty") {
12934
+ return context.item ? context.item[source.property] : undefined;
12935
+ }
12936
+ return context.tool ? context.tool[source.property] : undefined;
12937
+ }
12832
12938
  // src/Items/BaseItem/BaseItem.ts
12833
12939
  class BaseItem {
12834
12940
  static createCommand;
@@ -40308,6 +40414,7 @@ var richTextOverlay = {
40308
40414
  id: "text.fontSize",
40309
40415
  label: "Font size",
40310
40416
  icon: styleFontSizeIcon(),
40417
+ icon: styleFontSizeIcon(),
40311
40418
  target: "each",
40312
40419
  controls: [
40313
40420
  {
@@ -40325,6 +40432,14 @@ var richTextOverlay = {
40325
40432
  }
40326
40433
  ]
40327
40434
  }
40435
+ ],
40436
+ sections: [
40437
+ {
40438
+ id: "textTypography",
40439
+ label: "Typography",
40440
+ icon: overlaySymbolIcon("text.fontSize"),
40441
+ actionIds: ["text.fontSize"]
40442
+ }
40328
40443
  ]
40329
40444
  };
40330
40445
  var addTextToolOverlay = {
@@ -40333,8 +40448,12 @@ var addTextToolOverlay = {
40333
40448
  kind: "create",
40334
40449
  createsItemType: "RichText",
40335
40450
  family: "text",
40336
- icon: { kind: "symbol", key: "tool.text" },
40337
- description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool."
40451
+ icon: overlaySymbolIcon("tool.text"),
40452
+ description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool.",
40453
+ launch: { kind: "activate-tool" },
40454
+ surface: {
40455
+ order: 6
40456
+ }
40338
40457
  };
40339
40458
 
40340
40459
  // src/Items/RichText/RichText.ts
@@ -46737,7 +46856,7 @@ var COLOR_PALETTE = [
46737
46856
  "#118AB2",
46738
46857
  "#7B61FF"
46739
46858
  ];
46740
- var symbolIcon2 = (key) => ({ kind: "symbol", key });
46859
+ var symbolIcon2 = (key) => overlaySymbolIcon(key);
46741
46860
  var lineStyleOptions = ConnectorLineStyles.map((style) => ({
46742
46861
  id: style,
46743
46862
  label: style[0].toUpperCase() + style.slice(1),
@@ -46904,6 +47023,14 @@ var connectorOverlay = {
46904
47023
  }
46905
47024
  ]
46906
47025
  }
47026
+ ],
47027
+ sections: [
47028
+ {
47029
+ id: "connectorArrows",
47030
+ label: "Arrows",
47031
+ icon: symbolIcon2("connector.style"),
47032
+ actionIds: ["connector.switchPointers", "connector.style"]
47033
+ }
46907
47034
  ]
46908
47035
  };
46909
47036
  var addConnectorToolOverlay = {
@@ -46924,12 +47051,24 @@ var addConnectorToolOverlay = {
46924
47051
  controls: connectorToolControls,
46925
47052
  groups: [
46926
47053
  {
46927
- id: "connectorToolStyle",
47054
+ id: "connectorToolQuickDefaults",
47055
+ label: "Connector quick defaults",
47056
+ icon: symbolIcon2("connector.lineStyle.straight"),
47057
+ controlIds: ["toolLineStyle"],
47058
+ description: "Primary defaults that match the compact create-surface picker."
47059
+ },
47060
+ {
47061
+ id: "connectorToolAdvancedDefaults",
46928
47062
  label: "Connector defaults",
46929
47063
  icon: symbolIcon2("connector.style"),
46930
- controlIds: connectorToolControls.map((control) => control.id)
47064
+ controlIds: connectorToolControls.map((control) => control.id),
47065
+ description: "Extended defaults available in richer create flows."
46931
47066
  }
46932
47067
  ]
47068
+ },
47069
+ launch: { kind: "activate-tool" },
47070
+ surface: {
47071
+ order: 8
46933
47072
  }
46934
47073
  };
46935
47074
 
@@ -61068,57 +61207,53 @@ var COLOR_PALETTE2 = [
61068
61207
  "#7B61FF",
61069
61208
  "transparent"
61070
61209
  ];
61071
- var inlineShapeAsset = (folder, file2 = folder) => ({
61072
- kind: "asset",
61073
- path: `src/Items/Shape/Basic/${folder}/${file2}.icon.svg`,
61074
- mimeType: "image/svg+xml"
61075
- });
61076
- var symbolIcon3 = (key) => ({ kind: "symbol", key });
61210
+ var inlineShapeAsset = (folder, file2 = folder) => overlayAssetIcon(`src/Items/Shape/Basic/${folder}/${file2}.icon.svg`);
61211
+ var symbolIcon3 = (key) => overlaySymbolIcon(key);
61077
61212
  var BASIC_INLINE_OPTIONS = [
61078
- { id: "rectangle", label: "Rectangle", value: "Rectangle", icon: inlineShapeAsset("Rectangle") },
61079
- { id: "rounded-rectangle", label: "Rounded rectangle", value: "RoundedRectangle", icon: inlineShapeAsset("RoundedRectangle") },
61080
- { id: "circle", label: "Circle", value: "Circle", icon: inlineShapeAsset("Circle") },
61081
- { id: "triangle", label: "Triangle", value: "Triangle", icon: inlineShapeAsset("Triangle") },
61082
- { id: "rhombus", label: "Rhombus", value: "Rhombus", icon: inlineShapeAsset("Rhombus") }
61213
+ { id: "rectangle", label: "Rectangle", value: "Rectangle", icon: inlineShapeAsset("Rectangle"), family: "basicShapes" },
61214
+ { id: "rounded-rectangle", label: "Rounded rectangle", value: "RoundedRectangle", icon: inlineShapeAsset("RoundedRectangle"), family: "basicShapes" },
61215
+ { id: "circle", label: "Circle", value: "Circle", icon: inlineShapeAsset("Circle"), family: "basicShapes" },
61216
+ { id: "triangle", label: "Triangle", value: "Triangle", icon: inlineShapeAsset("Triangle"), family: "basicShapes" },
61217
+ { id: "rhombus", label: "Rhombus", value: "Rhombus", icon: inlineShapeAsset("Rhombus"), family: "basicShapes" }
61083
61218
  ];
61084
61219
  var SHAPE_CATALOG_OPTIONS = [
61085
61220
  ...BASIC_INLINE_OPTIONS,
61086
- { id: "reversed-triangle", label: "Reversed triangle", value: "ReversedTriangle", icon: symbolIcon3("shape.reversedTriangle") },
61087
- { id: "arrow-left", label: "Arrow left", value: "ArrowLeft", icon: inlineShapeAsset("ArrowLeft") },
61088
- { id: "arrow-right", label: "Arrow right", value: "ArrowRight", icon: inlineShapeAsset("ArrowRight") },
61089
- { id: "arrow-left-right", label: "Arrow left right", value: "ArrowLeftRight", icon: inlineShapeAsset("ArrowLeftRight") },
61090
- { id: "arrow-block-left", label: "Arrow block left", value: "ArrowBlockLeft", icon: symbolIcon3("shape.arrowBlockLeft") },
61091
- { id: "arrow-block-right", label: "Arrow block right", value: "ArrowBlockRight", icon: symbolIcon3("shape.arrowBlockRight") },
61092
- { id: "cloud", label: "Cloud", value: "Cloud", icon: inlineShapeAsset("Cloud") },
61093
- { id: "cross", label: "Cross", value: "Cross", icon: inlineShapeAsset("Cross") },
61094
- { id: "cylinder", label: "Cylinder", value: "Cylinder", icon: inlineShapeAsset("Cylinder") },
61095
- { id: "hexagon", label: "Hexagon", value: "Hexagon", icon: inlineShapeAsset("Hexagon") },
61096
- { id: "octagon", label: "Octagon", value: "Octagon", icon: inlineShapeAsset("Octagon") },
61097
- { id: "parallelogram", label: "Parallelogram", value: "Parallelogram", icon: inlineShapeAsset("Parallelogram") },
61098
- { id: "reversed-parallelogram", label: "Reversed parallelogram", value: "ReversedParallelogram", icon: symbolIcon3("shape.reversedParallelogram") },
61099
- { id: "pentagon", label: "Pentagon", value: "Pentagon", icon: inlineShapeAsset("Pentagon") },
61100
- { id: "predefined-process", label: "Predefined process", value: "PredefinedProcess", icon: symbolIcon3("shape.predefinedProcess") },
61101
- { id: "speech-bubble", label: "Speech bubble", value: "SpeachBubble", icon: inlineShapeAsset("SpeachBubble") },
61102
- { id: "star", label: "Star", value: "Star", icon: inlineShapeAsset("Star") },
61103
- { id: "trapezoid", label: "Trapezoid", value: "Trapezoid", icon: inlineShapeAsset("Trapezoid") },
61104
- { id: "braces-left", label: "Braces left", value: "BracesLeft", icon: inlineShapeAsset("BracesLeft", "BracesLeft") },
61105
- { id: "braces-right", label: "Braces right", value: "BracesRight", icon: inlineShapeAsset("BracesRight", "BracesRight") },
61106
- { id: "bpmn-task", label: "BPMN task", value: "BPMN_Task", icon: symbolIcon3("shape.bpmn.task") },
61107
- { id: "bpmn-gateway", label: "BPMN gateway", value: "BPMN_Gateway", icon: symbolIcon3("shape.bpmn.gateway") },
61108
- { id: "bpmn-gateway-parallel", label: "BPMN gateway parallel", value: "BPMN_GatewayParallel", icon: symbolIcon3("shape.bpmn.gatewayParallel") },
61109
- { id: "bpmn-gateway-xor", label: "BPMN gateway XOR", value: "BPMN_GatewayXOR", icon: symbolIcon3("shape.bpmn.gatewayXor") },
61110
- { id: "bpmn-start-event", label: "BPMN start event", value: "BPMN_StartEvent", icon: symbolIcon3("shape.bpmn.startEvent") },
61111
- { id: "bpmn-start-event-non-interrupting", label: "BPMN start event non interrupting", value: "BPMN_StartEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.startEventNoneInterrupting") },
61112
- { id: "bpmn-end-event", label: "BPMN end event", value: "BPMN_EndEvent", icon: symbolIcon3("shape.bpmn.endEvent") },
61113
- { id: "bpmn-intermediate-event", label: "BPMN intermediate event", value: "BPMN_IntermediateEvent", icon: symbolIcon3("shape.bpmn.intermediateEvent") },
61114
- { id: "bpmn-intermediate-event-none-interrupting", label: "BPMN intermediate event none interrupting", value: "BPMN_IntermediateEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.intermediateEventNoneInterrupting") },
61115
- { id: "bpmn-data-object", label: "BPMN data object", value: "BPMN_DataObject", icon: symbolIcon3("shape.bpmn.dataObject") },
61116
- { id: "bpmn-data-store", label: "BPMN data store", value: "BPMN_DataStore", icon: symbolIcon3("shape.bpmn.dataStore") },
61117
- { id: "bpmn-participant", label: "BPMN participant", value: "BPMN_Participant", icon: symbolIcon3("shape.bpmn.participant") },
61118
- { id: "bpmn-transaction", label: "BPMN transaction", value: "BPMN_Transaction", icon: symbolIcon3("shape.bpmn.transaction") },
61119
- { id: "bpmn-event-subprocess", label: "BPMN event subprocess", value: "BPMN_EventSubprocess", icon: symbolIcon3("shape.bpmn.eventSubprocess") },
61120
- { id: "bpmn-group", label: "BPMN group", value: "BPMN_Group", icon: symbolIcon3("shape.bpmn.group") },
61121
- { id: "bpmn-annotation", label: "BPMN annotation", value: "BPMN_Annotation", icon: symbolIcon3("shape.bpmn.annotation") }
61221
+ { id: "reversed-triangle", label: "Reversed triangle", value: "ReversedTriangle", icon: symbolIcon3("shape.reversedTriangle"), family: "basicShapes" },
61222
+ { id: "arrow-left", label: "Arrow left", value: "ArrowLeft", icon: inlineShapeAsset("ArrowLeft"), family: "basicShapes" },
61223
+ { id: "arrow-right", label: "Arrow right", value: "ArrowRight", icon: inlineShapeAsset("ArrowRight"), family: "basicShapes" },
61224
+ { id: "arrow-left-right", label: "Arrow left right", value: "ArrowLeftRight", icon: inlineShapeAsset("ArrowLeftRight"), family: "basicShapes" },
61225
+ { id: "arrow-block-left", label: "Arrow block left", value: "ArrowBlockLeft", icon: symbolIcon3("shape.arrowBlockLeft"), family: "basicShapes" },
61226
+ { id: "arrow-block-right", label: "Arrow block right", value: "ArrowBlockRight", icon: symbolIcon3("shape.arrowBlockRight"), family: "basicShapes" },
61227
+ { id: "cloud", label: "Cloud", value: "Cloud", icon: inlineShapeAsset("Cloud"), family: "basicShapes" },
61228
+ { id: "cross", label: "Cross", value: "Cross", icon: inlineShapeAsset("Cross"), family: "basicShapes" },
61229
+ { id: "cylinder", label: "Cylinder", value: "Cylinder", icon: inlineShapeAsset("Cylinder"), family: "basicShapes" },
61230
+ { id: "hexagon", label: "Hexagon", value: "Hexagon", icon: inlineShapeAsset("Hexagon"), family: "basicShapes" },
61231
+ { id: "octagon", label: "Octagon", value: "Octagon", icon: inlineShapeAsset("Octagon"), family: "basicShapes" },
61232
+ { id: "parallelogram", label: "Parallelogram", value: "Parallelogram", icon: inlineShapeAsset("Parallelogram"), family: "basicShapes" },
61233
+ { id: "reversed-parallelogram", label: "Reversed parallelogram", value: "ReversedParallelogram", icon: symbolIcon3("shape.reversedParallelogram"), family: "basicShapes" },
61234
+ { id: "pentagon", label: "Pentagon", value: "Pentagon", icon: inlineShapeAsset("Pentagon"), family: "basicShapes" },
61235
+ { id: "predefined-process", label: "Predefined process", value: "PredefinedProcess", icon: symbolIcon3("shape.predefinedProcess"), family: "basicShapes" },
61236
+ { id: "speech-bubble", label: "Speech bubble", value: "SpeachBubble", icon: inlineShapeAsset("SpeachBubble"), family: "basicShapes" },
61237
+ { id: "star", label: "Star", value: "Star", icon: inlineShapeAsset("Star"), family: "basicShapes" },
61238
+ { id: "trapezoid", label: "Trapezoid", value: "Trapezoid", icon: inlineShapeAsset("Trapezoid"), family: "basicShapes" },
61239
+ { id: "braces-left", label: "Braces left", value: "BracesLeft", icon: inlineShapeAsset("BracesLeft", "BracesLeft"), family: "basicShapes" },
61240
+ { id: "braces-right", label: "Braces right", value: "BracesRight", icon: inlineShapeAsset("BracesRight", "BracesRight"), family: "basicShapes" },
61241
+ { id: "bpmn-task", label: "BPMN task", value: "BPMN_Task", icon: symbolIcon3("shape.bpmn.task"), family: "bpmn" },
61242
+ { id: "bpmn-gateway", label: "BPMN gateway", value: "BPMN_Gateway", icon: symbolIcon3("shape.bpmn.gateway"), family: "bpmn" },
61243
+ { id: "bpmn-gateway-parallel", label: "BPMN gateway parallel", value: "BPMN_GatewayParallel", icon: symbolIcon3("shape.bpmn.gatewayParallel"), family: "bpmn" },
61244
+ { id: "bpmn-gateway-xor", label: "BPMN gateway XOR", value: "BPMN_GatewayXOR", icon: symbolIcon3("shape.bpmn.gatewayXor"), family: "bpmn" },
61245
+ { id: "bpmn-start-event", label: "BPMN start event", value: "BPMN_StartEvent", icon: symbolIcon3("shape.bpmn.startEvent"), family: "bpmn" },
61246
+ { id: "bpmn-start-event-non-interrupting", label: "BPMN start event non interrupting", value: "BPMN_StartEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.startEventNoneInterrupting"), family: "bpmn" },
61247
+ { id: "bpmn-end-event", label: "BPMN end event", value: "BPMN_EndEvent", icon: symbolIcon3("shape.bpmn.endEvent"), family: "bpmn" },
61248
+ { id: "bpmn-intermediate-event", label: "BPMN intermediate event", value: "BPMN_IntermediateEvent", icon: symbolIcon3("shape.bpmn.intermediateEvent"), family: "bpmn" },
61249
+ { id: "bpmn-intermediate-event-none-interrupting", label: "BPMN intermediate event none interrupting", value: "BPMN_IntermediateEventNoneInterrupting", icon: symbolIcon3("shape.bpmn.intermediateEventNoneInterrupting"), family: "bpmn" },
61250
+ { id: "bpmn-data-object", label: "BPMN data object", value: "BPMN_DataObject", icon: symbolIcon3("shape.bpmn.dataObject"), family: "bpmn" },
61251
+ { id: "bpmn-data-store", label: "BPMN data store", value: "BPMN_DataStore", icon: symbolIcon3("shape.bpmn.dataStore"), family: "bpmn" },
61252
+ { id: "bpmn-participant", label: "BPMN participant", value: "BPMN_Participant", icon: symbolIcon3("shape.bpmn.participant"), family: "bpmn" },
61253
+ { id: "bpmn-transaction", label: "BPMN transaction", value: "BPMN_Transaction", icon: symbolIcon3("shape.bpmn.transaction"), family: "bpmn" },
61254
+ { id: "bpmn-event-subprocess", label: "BPMN event subprocess", value: "BPMN_EventSubprocess", icon: symbolIcon3("shape.bpmn.eventSubprocess"), family: "bpmn" },
61255
+ { id: "bpmn-group", label: "BPMN group", value: "BPMN_Group", icon: symbolIcon3("shape.bpmn.group"), family: "bpmn" },
61256
+ { id: "bpmn-annotation", label: "BPMN annotation", value: "BPMN_Annotation", icon: symbolIcon3("shape.bpmn.annotation"), family: "bpmn" }
61122
61257
  ];
61123
61258
  var BORDER_STYLE_OPTIONS = [
61124
61259
  { id: "solid", label: "Solid", value: "solid", icon: symbolIcon3("stroke.solid") },
@@ -61133,6 +61268,12 @@ var shapeTypeControl = {
61133
61268
  editor: {
61134
61269
  kind: "enum-icon",
61135
61270
  options: BASIC_INLINE_OPTIONS,
61271
+ layout: "grid",
61272
+ quickOptions: {
61273
+ family: "basicShapes",
61274
+ maxVisible: 18,
61275
+ overflow: "show-more"
61276
+ },
61136
61277
  catalog: {
61137
61278
  kind: "catalog",
61138
61279
  label: "Shape catalog",
@@ -61151,6 +61292,10 @@ var fillControl = {
61151
61292
  swatch: { kind: "itemProperty", property: "backgroundColor" },
61152
61293
  note: "UI can render the current fill color as a swatch inside the icon."
61153
61294
  }),
61295
+ icon: styleFillIcon({
61296
+ swatch: { kind: "itemProperty", property: "backgroundColor" },
61297
+ note: "UI can render the current fill color as a swatch inside the icon."
61298
+ }),
61154
61299
  editor: {
61155
61300
  kind: "color",
61156
61301
  palette: COLOR_PALETTE2,
@@ -61227,6 +61372,20 @@ var shapeOverlay = {
61227
61372
  }
61228
61373
  ]
61229
61374
  }
61375
+ ],
61376
+ sections: [
61377
+ {
61378
+ id: "shapeTypeSection",
61379
+ label: "Type",
61380
+ icon: symbolIcon3("shape.type"),
61381
+ actionIds: ["shape.shapeType"]
61382
+ },
61383
+ {
61384
+ id: "shapeAppearanceSection",
61385
+ label: "Appearance",
61386
+ icon: symbolIcon3("shape.stroke"),
61387
+ actionIds: ["shape.fill", "shape.strokeStyle"]
61388
+ }
61230
61389
  ]
61231
61390
  };
61232
61391
  var addShapeToolOverlay = {
@@ -61236,8 +61395,7 @@ var addShapeToolOverlay = {
61236
61395
  createsItemType: "Shape",
61237
61396
  family: "shape",
61238
61397
  icon: {
61239
- kind: "symbol",
61240
- key: "tool.shape",
61398
+ ...overlaySymbolIcon("tool.shape"),
61241
61399
  state: {
61242
61400
  note: "UI may swap the top-level icon to the selected shape option when desired."
61243
61401
  }
@@ -61251,6 +61409,12 @@ var addShapeToolOverlay = {
61251
61409
  editor: {
61252
61410
  kind: "enum-icon",
61253
61411
  options: BASIC_INLINE_OPTIONS,
61412
+ layout: "grid",
61413
+ quickOptions: {
61414
+ family: "basicShapes",
61415
+ maxVisible: 18,
61416
+ overflow: "show-more"
61417
+ },
61254
61418
  catalog: {
61255
61419
  kind: "catalog",
61256
61420
  label: "Shape catalog",
@@ -61261,6 +61425,10 @@ var addShapeToolOverlay = {
61261
61425
  invoke: { kind: "toolProperty", property: "type" }
61262
61426
  }
61263
61427
  ]
61428
+ },
61429
+ launch: { kind: "activate-tool" },
61430
+ surface: {
61431
+ order: 7
61264
61432
  }
61265
61433
  };
61266
61434
 
@@ -65667,14 +65835,14 @@ var cardOverlay = {
65667
65835
  {
65668
65836
  id: "card.flip",
65669
65837
  label: "Flip card",
65670
- icon: { kind: "symbol", key: "card.flip" },
65838
+ icon: overlaySymbolIcon("card.flip"),
65671
65839
  target: "each",
65672
65840
  invoke: { kind: "customMethod", methodName: "toggleIsOpen" }
65673
65841
  },
65674
65842
  {
65675
65843
  id: "card.rotateCcw",
65676
65844
  label: "Rotate 90 counter clockwise",
65677
- icon: { kind: "symbol", key: "card.rotateCcw" },
65845
+ icon: overlaySymbolIcon("card.rotateCcw"),
65678
65846
  target: "each",
65679
65847
  invoke: {
65680
65848
  kind: "customMethod",
@@ -65685,7 +65853,7 @@ var cardOverlay = {
65685
65853
  {
65686
65854
  id: "card.rotateCw",
65687
65855
  label: "Rotate 90 clockwise",
65688
- icon: { kind: "symbol", key: "card.rotateCw" },
65856
+ icon: overlaySymbolIcon("card.rotateCw"),
65689
65857
  target: "each",
65690
65858
  invoke: {
65691
65859
  kind: "customMethod",
@@ -65939,28 +66107,28 @@ var deckOverlay = {
65939
66107
  {
65940
66108
  id: "deck.getTopCard",
65941
66109
  label: "Draw top card",
65942
- icon: { kind: "symbol", key: "deck.drawTop" },
66110
+ icon: overlaySymbolIcon("deck.drawTop"),
65943
66111
  target: "single",
65944
66112
  invoke: { kind: "customMethod", methodName: "getTopCard" }
65945
66113
  },
65946
66114
  {
65947
66115
  id: "deck.getBottomCard",
65948
66116
  label: "Draw bottom card",
65949
- icon: { kind: "symbol", key: "deck.drawBottom" },
66117
+ icon: overlaySymbolIcon("deck.drawBottom"),
65950
66118
  target: "single",
65951
66119
  invoke: { kind: "customMethod", methodName: "getBottomCard" }
65952
66120
  },
65953
66121
  {
65954
66122
  id: "deck.getRandomCard",
65955
66123
  label: "Draw random card",
65956
- icon: { kind: "symbol", key: "deck.drawRandom" },
66124
+ icon: overlaySymbolIcon("deck.drawRandom"),
65957
66125
  target: "single",
65958
66126
  invoke: { kind: "customMethod", methodName: "getRandomCard" }
65959
66127
  },
65960
66128
  {
65961
66129
  id: "deck.getCards",
65962
66130
  label: "Draw cards",
65963
- icon: { kind: "symbol", key: "deck.drawMany" },
66131
+ icon: overlaySymbolIcon("deck.drawMany"),
65964
66132
  target: "single",
65965
66133
  controls: [
65966
66134
  {
@@ -65982,14 +66150,14 @@ var deckOverlay = {
65982
66150
  {
65983
66151
  id: "deck.shuffle",
65984
66152
  label: "Shuffle",
65985
- icon: { kind: "symbol", key: "deck.shuffle" },
66153
+ icon: overlaySymbolIcon("deck.shuffle"),
65986
66154
  target: "single",
65987
66155
  invoke: { kind: "customMethod", methodName: "shuffleDeck" }
65988
66156
  },
65989
66157
  {
65990
66158
  id: "deck.flip",
65991
66159
  label: "Flip deck",
65992
- icon: { kind: "symbol", key: "deck.flip" },
66160
+ icon: overlaySymbolIcon("deck.flip"),
65993
66161
  target: "single",
65994
66162
  invoke: { kind: "customMethod", methodName: "flipDeck" }
65995
66163
  }
@@ -65998,7 +66166,7 @@ var deckOverlay = {
65998
66166
  var createDeckSelectionAction = {
65999
66167
  id: "deck.createFromSelection",
66000
66168
  label: "Create deck",
66001
- icon: { kind: "symbol", key: "deck.createFromSelection" },
66169
+ icon: overlaySymbolIcon("deck.createFromSelection"),
66002
66170
  description: "Stacks selected cards into a new deck, or merges selected cards and decks into one deck.",
66003
66171
  invoke: { kind: "selectionMethod", methodName: "createDeck" },
66004
66172
  isAvailable: (items) => {
@@ -66567,14 +66735,14 @@ var diceOverlay = {
66567
66735
  {
66568
66736
  id: "dice.throw",
66569
66737
  label: "Throw dice",
66570
- icon: { kind: "symbol", key: "dice.throw" },
66738
+ icon: overlaySymbolIcon("dice.throw"),
66571
66739
  target: "each",
66572
66740
  invoke: { kind: "customMethod", methodName: "throwDice" }
66573
66741
  },
66574
66742
  {
66575
66743
  id: "dice.range",
66576
66744
  label: "Range",
66577
- icon: { kind: "symbol", key: "dice.range" },
66745
+ icon: overlaySymbolIcon("dice.range"),
66578
66746
  target: "each",
66579
66747
  controls: [
66580
66748
  {
@@ -66610,6 +66778,14 @@ var diceOverlay = {
66610
66778
  }
66611
66779
  ]
66612
66780
  }
66781
+ ],
66782
+ sections: [
66783
+ {
66784
+ id: "diceActions",
66785
+ label: "Dice",
66786
+ icon: overlaySymbolIcon("dice.throw"),
66787
+ actionIds: ["dice.throw", "dice.range", "dice.fill"]
66788
+ }
66613
66789
  ]
66614
66790
  };
66615
66791
  var addDiceToolOverlay = {
@@ -66618,7 +66794,19 @@ var addDiceToolOverlay = {
66618
66794
  kind: "create",
66619
66795
  createsItemType: "Dice",
66620
66796
  family: "game",
66621
- icon: { kind: "symbol", key: "tool.dice" }
66797
+ icon: overlaySymbolIcon("tool.dice"),
66798
+ launch: { kind: "activate-tool" },
66799
+ surface: {
66800
+ order: 1,
66801
+ group: {
66802
+ id: "gameItems",
66803
+ label: "Game items",
66804
+ icon: overlaySymbolIcon("tool.dice"),
66805
+ order: 1,
66806
+ behavior: "open-panel"
66807
+ },
66808
+ relatedToolNames: ["AddScreen", "AddPouch"]
66809
+ }
66622
66810
  };
66623
66811
 
66624
66812
  // src/Items/Dice/Dice.ts
@@ -66966,8 +67154,7 @@ var screenOverlay = {
66966
67154
  id: "screen.background",
66967
67155
  label: "Background",
66968
67156
  icon: {
66969
- kind: "symbol",
66970
- key: "screen.background",
67157
+ ...overlaySymbolIcon("screen.background"),
66971
67158
  state: { swatch: { kind: "itemProperty", property: "backgroundColor" } }
66972
67159
  },
66973
67160
  target: "each",
@@ -66984,6 +67171,97 @@ var screenOverlay = {
66984
67171
  invoke: { kind: "setProperty", property: "backgroundColor" }
66985
67172
  }
66986
67173
  ]
67174
+ },
67175
+ {
67176
+ id: "screen.stroke",
67177
+ label: "Stroke",
67178
+ icon: {
67179
+ ...overlaySymbolIcon("shape.stroke"),
67180
+ state: { swatch: { kind: "itemProperty", property: "borderColor" } }
67181
+ },
67182
+ target: "each",
67183
+ controls: [
67184
+ {
67185
+ id: "borderColor",
67186
+ label: "Border color",
67187
+ valueSource: { kind: "itemProperty", property: "borderColor" },
67188
+ editor: {
67189
+ kind: "color",
67190
+ palette: ["#000000", "#FFFFFF", "#888888", "transparent"],
67191
+ allowTransparent: true,
67192
+ presentation: "square"
67193
+ },
67194
+ invoke: { kind: "setProperty", property: "borderColor" }
67195
+ },
67196
+ {
67197
+ id: "borderWidth",
67198
+ label: "Border width",
67199
+ valueSource: { kind: "itemProperty", property: "borderWidth" },
67200
+ editor: {
67201
+ kind: "number-stepper",
67202
+ min: 0,
67203
+ max: 8,
67204
+ step: 1,
67205
+ presets: [0, 1, 2, 4],
67206
+ unit: "px"
67207
+ },
67208
+ invoke: { kind: "setProperty", property: "borderWidth" }
67209
+ }
67210
+ ],
67211
+ groups: [
67212
+ {
67213
+ id: "screenStrokeStyle",
67214
+ label: "Stroke",
67215
+ icon: overlaySymbolIcon("shape.stroke"),
67216
+ controlIds: ["borderColor", "borderWidth"]
67217
+ }
67218
+ ]
67219
+ },
67220
+ {
67221
+ id: "screen.backgroundImage",
67222
+ label: "Background image",
67223
+ icon: overlaySymbolIcon("screen.backgroundImage"),
67224
+ target: "each",
67225
+ when: {
67226
+ kind: "falsy",
67227
+ source: { kind: "itemProperty", property: "backgroundUrl" }
67228
+ },
67229
+ controls: [
67230
+ {
67231
+ id: "backgroundUrl",
67232
+ label: "Background image",
67233
+ valueSource: { kind: "itemProperty", property: "backgroundUrl" },
67234
+ editor: {
67235
+ kind: "asset-upload",
67236
+ mode: "single",
67237
+ accept: ["image/*"]
67238
+ },
67239
+ invoke: { kind: "setProperty", property: "backgroundUrl" }
67240
+ }
67241
+ ]
67242
+ },
67243
+ {
67244
+ id: "screen.removeBackgroundImage",
67245
+ label: "Remove background image",
67246
+ icon: overlaySymbolIcon("screen.backgroundImage.remove"),
67247
+ target: "each",
67248
+ when: {
67249
+ kind: "truthy",
67250
+ source: { kind: "itemProperty", property: "backgroundUrl" }
67251
+ },
67252
+ invoke: {
67253
+ kind: "customMethod",
67254
+ methodName: "setBackgroundUrl",
67255
+ args: [{ kind: "static", value: "" }]
67256
+ }
67257
+ }
67258
+ ],
67259
+ sections: [
67260
+ {
67261
+ id: "screenAppearance",
67262
+ label: "Appearance",
67263
+ icon: overlaySymbolIcon("screen.background"),
67264
+ actionIds: ["screen.background", "screen.stroke", "screen.backgroundImage", "screen.removeBackgroundImage"]
66987
67265
  }
66988
67266
  ]
66989
67267
  };
@@ -66993,7 +67271,19 @@ var addScreenToolOverlay = {
66993
67271
  kind: "create",
66994
67272
  createsItemType: "Screen",
66995
67273
  family: "container",
66996
- icon: { kind: "symbol", key: "tool.screen" }
67274
+ icon: overlaySymbolIcon("tool.screen"),
67275
+ launch: { kind: "activate-tool" },
67276
+ surface: {
67277
+ order: 2,
67278
+ group: {
67279
+ id: "gameItems",
67280
+ label: "Game items",
67281
+ icon: overlaySymbolIcon("tool.dice"),
67282
+ order: 1,
67283
+ behavior: "open-panel"
67284
+ },
67285
+ relatedToolNames: ["AddDice", "AddPouch"]
67286
+ }
66997
67287
  };
66998
67288
  var addPouchToolOverlay = {
66999
67289
  toolName: "AddPouch",
@@ -67001,7 +67291,19 @@ var addPouchToolOverlay = {
67001
67291
  kind: "create",
67002
67292
  createsItemType: "Screen",
67003
67293
  family: "container",
67004
- icon: { kind: "symbol", key: "tool.pouch" }
67294
+ icon: overlaySymbolIcon("tool.pouch"),
67295
+ launch: { kind: "activate-tool" },
67296
+ surface: {
67297
+ order: 3,
67298
+ group: {
67299
+ id: "gameItems",
67300
+ label: "Game items",
67301
+ icon: overlaySymbolIcon("tool.dice"),
67302
+ order: 1,
67303
+ behavior: "open-panel"
67304
+ },
67305
+ relatedToolNames: ["AddDice", "AddScreen"]
67306
+ }
67005
67307
  };
67006
67308
 
67007
67309
  // src/Items/Screen/Screen.ts
@@ -74961,8 +75263,7 @@ var addDrawingToolOverlay = {
74961
75263
  family: "drawing",
74962
75264
  createsItemType: "Drawing",
74963
75265
  icon: {
74964
- kind: "symbol",
74965
- key: "tool.pen",
75266
+ ...overlaySymbolIcon("tool.pen"),
74966
75267
  state: {
74967
75268
  swatch: { kind: "toolProperty", property: "strokeColor" },
74968
75269
  note: "UI can show the pending pen color in the icon."
@@ -74974,10 +75275,22 @@ var addDrawingToolOverlay = {
74974
75275
  {
74975
75276
  id: "drawingDefaults",
74976
75277
  label: "Pen defaults",
74977
- icon: { kind: "symbol", key: "tool.pen" },
75278
+ icon: overlaySymbolIcon("tool.pen"),
74978
75279
  controlIds: strokeControls2.map((control) => control.id)
74979
75280
  }
74980
75281
  ]
75282
+ },
75283
+ launch: { kind: "activate-tool" },
75284
+ surface: {
75285
+ order: 1,
75286
+ group: {
75287
+ id: "drawingTools",
75288
+ label: "Drawing",
75289
+ icon: overlaySymbolIcon("tool.pen"),
75290
+ order: 5,
75291
+ behavior: "activate-last-used"
75292
+ },
75293
+ relatedToolNames: ["AddHighlighter", "Eraser"]
74981
75294
  }
74982
75295
  };
74983
75296
  var addHighlighterToolOverlay = {
@@ -74987,8 +75300,7 @@ var addHighlighterToolOverlay = {
74987
75300
  family: "drawing",
74988
75301
  createsItemType: "Drawing",
74989
75302
  icon: {
74990
- kind: "symbol",
74991
- key: "tool.highlighter",
75303
+ ...overlaySymbolIcon("tool.highlighter"),
74992
75304
  state: {
74993
75305
  swatch: { kind: "toolProperty", property: "strokeColor" },
74994
75306
  note: "UI can show the pending highlighter color in the icon."
@@ -75000,10 +75312,22 @@ var addHighlighterToolOverlay = {
75000
75312
  {
75001
75313
  id: "highlighterDefaults",
75002
75314
  label: "Highlighter defaults",
75003
- icon: { kind: "symbol", key: "tool.highlighter" },
75315
+ icon: overlaySymbolIcon("tool.highlighter"),
75004
75316
  controlIds: strokeControls2.map((control) => control.id)
75005
75317
  }
75006
75318
  ]
75319
+ },
75320
+ launch: { kind: "activate-tool" },
75321
+ surface: {
75322
+ order: 2,
75323
+ group: {
75324
+ id: "drawingTools",
75325
+ label: "Drawing",
75326
+ icon: overlaySymbolIcon("tool.pen"),
75327
+ order: 5,
75328
+ behavior: "activate-last-used"
75329
+ },
75330
+ relatedToolNames: ["AddDrawing", "Eraser"]
75007
75331
  }
75008
75332
  };
75009
75333
  var eraserToolOverlay = {
@@ -75011,7 +75335,7 @@ var eraserToolOverlay = {
75011
75335
  label: "Eraser",
75012
75336
  kind: "mode",
75013
75337
  family: "drawing",
75014
- icon: { kind: "symbol", key: "tool.eraser" },
75338
+ icon: overlaySymbolIcon("tool.eraser"),
75015
75339
  defaults: {
75016
75340
  controls: [
75017
75341
  {
@@ -75028,6 +75352,18 @@ var eraserToolOverlay = {
75028
75352
  invoke: { kind: "toolProperty", property: "strokeWidth" }
75029
75353
  }
75030
75354
  ]
75355
+ },
75356
+ launch: { kind: "activate-tool" },
75357
+ surface: {
75358
+ order: 3,
75359
+ group: {
75360
+ id: "drawingTools",
75361
+ label: "Drawing",
75362
+ icon: overlaySymbolIcon("tool.pen"),
75363
+ order: 5,
75364
+ behavior: "activate-last-used"
75365
+ },
75366
+ relatedToolNames: ["AddDrawing", "AddHighlighter"]
75031
75367
  }
75032
75368
  };
75033
75369
 
@@ -75228,7 +75564,7 @@ var frameTypeOptions = Object.keys(Frames).map((frameType) => ({
75228
75564
  id: frameType,
75229
75565
  label: frameType === "Custom" ? "Custom" : Frames[frameType].name,
75230
75566
  value: frameType,
75231
- icon: { kind: "symbol", key: `frame.${frameType}` }
75567
+ icon: overlaySymbolIcon(`frame.${frameType}`)
75232
75568
  }));
75233
75569
  var addFrameToolOverlay = {
75234
75570
  toolName: "AddFrame",
@@ -75236,7 +75572,7 @@ var addFrameToolOverlay = {
75236
75572
  kind: "create",
75237
75573
  createsItemType: "Frame",
75238
75574
  family: "frame",
75239
- icon: { kind: "symbol", key: "tool.frame" },
75575
+ icon: overlaySymbolIcon("tool.frame"),
75240
75576
  defaults: {
75241
75577
  controls: [
75242
75578
  {
@@ -75250,6 +75586,10 @@ var addFrameToolOverlay = {
75250
75586
  invoke: { kind: "toolProperty", property: "shape" }
75251
75587
  }
75252
75588
  ]
75589
+ },
75590
+ launch: { kind: "activate-tool" },
75591
+ surface: {
75592
+ order: 10
75253
75593
  }
75254
75594
  };
75255
75595
 
@@ -75614,8 +75954,7 @@ var addStickerToolOverlay = {
75614
75954
  createsItemType: "Sticker",
75615
75955
  family: "sticker",
75616
75956
  icon: {
75617
- kind: "symbol",
75618
- key: "tool.sticker",
75957
+ ...overlaySymbolIcon("tool.sticker"),
75619
75958
  state: {
75620
75959
  swatch: { kind: "toolProperty", property: "backgroundColor" }
75621
75960
  }
@@ -75626,10 +75965,14 @@ var addStickerToolOverlay = {
75626
75965
  id: "stickerBackgroundColor",
75627
75966
  label: "Color",
75628
75967
  valueSource: { kind: "toolProperty", property: "backgroundColor" },
75629
- editor: { kind: "color", palette: STICKER_COLORS },
75968
+ editor: { kind: "color", palette: STICKER_COLORS, presentation: "sticker" },
75630
75969
  invoke: { kind: "toolProperty", property: "backgroundColor" }
75631
75970
  }
75632
75971
  ]
75972
+ },
75973
+ launch: { kind: "activate-tool" },
75974
+ surface: {
75975
+ order: 9
75633
75976
  }
75634
75977
  };
75635
75978