microboard-temp 0.14.43 → 0.14.45

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
@@ -11547,6 +11547,7 @@ var itemOverlays = {};
11547
11547
  var toolOverlays = {};
11548
11548
  var dynamicOptionsResolvers = {};
11549
11549
  var selectionActions = {};
11550
+ var selectionActionSections = {};
11550
11551
  function registerItemOverlay(overlay) {
11551
11552
  itemOverlays[overlay.itemType] = overlay;
11552
11553
  }
@@ -11556,6 +11557,9 @@ function registerToolOverlay(overlay) {
11556
11557
  function registerSelectionAction(action) {
11557
11558
  selectionActions[action.id] = action;
11558
11559
  }
11560
+ function registerSelectionActionSection(section) {
11561
+ selectionActionSections[section.id] = section;
11562
+ }
11559
11563
  function registerDynamicOptionsResolver(id, resolver) {
11560
11564
  dynamicOptionsResolvers[id] = resolver;
11561
11565
  }
@@ -11611,6 +11615,9 @@ function listCreateSurfaceEntries() {
11611
11615
  function listSelectionActions() {
11612
11616
  return Object.values(selectionActions);
11613
11617
  }
11618
+ function listSelectionActionSections() {
11619
+ return Object.values(selectionActionSections);
11620
+ }
11614
11621
  function getSelectionOverlayActions(items) {
11615
11622
  return Object.values(selectionActions).filter((action) => action.isAvailable?.(items) ?? true);
11616
11623
  }
@@ -43396,7 +43403,7 @@ var addTextToolOverlay = {
43396
43403
  kind: "create",
43397
43404
  createsItemType: "RichText",
43398
43405
  family: "text",
43399
- icon: overlayAssetIcon("src/Items/RichText/icons/Text.icon.svg"),
43406
+ icon: symbolIcon("AddText"),
43400
43407
  description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool.",
43401
43408
  launch: { kind: "activate-tool" },
43402
43409
  surface: {
@@ -50078,7 +50085,7 @@ var connectorOverlay = {
50078
50085
  {
50079
50086
  id: "connector.switchPointers",
50080
50087
  label: "Switch arrows",
50081
- icon: connectorAssetIcon("SwitchPointers"),
50088
+ icon: symbolIcon("Switch"),
50082
50089
  target: "selection",
50083
50090
  invoke: { kind: "operation", class: "Connector", method: "switchPointers" }
50084
50091
  },
@@ -73682,52 +73689,89 @@ class Presence {
73682
73689
  function everyItemHasRichText(items) {
73683
73690
  return items.length > 0 && items.every((item) => !!item.getRichText?.());
73684
73691
  }
73692
+ registerSelectionActionSection({
73693
+ id: "selectionTextSize",
73694
+ label: "Text size",
73695
+ actionIds: ["selection.text.fontSize"]
73696
+ });
73697
+ registerSelectionActionSection({
73698
+ id: "selectionTextColors",
73699
+ label: "Text colors",
73700
+ actionIds: ["selection.text.color", "selection.text.highlight"]
73701
+ });
73702
+ registerSelectionActionSection({
73703
+ id: "selectionArrange",
73704
+ label: "Arrange",
73705
+ actionIds: ["selection.bringToFront", "selection.sendToBack"]
73706
+ });
73707
+ registerSelectionActionSection({
73708
+ id: "selectionActions",
73709
+ label: "Actions",
73710
+ actionIds: [
73711
+ "selection.duplicate",
73712
+ "selection.lock",
73713
+ "selection.unlock",
73714
+ "selection.delete"
73715
+ ]
73716
+ });
73685
73717
  registerSelectionAction({
73686
73718
  id: "selection.delete",
73687
73719
  label: "Delete",
73688
- icon: overlayAssetIcon("src/Overlay/icons/Delete.icon.svg"),
73720
+ icon: symbolIcon("Delete"),
73689
73721
  description: "Removes the selected items from the board.",
73690
73722
  invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
73723
+ sectionId: "selectionActions",
73724
+ order: 4,
73691
73725
  isAvailable: (items) => items.length > 0
73692
73726
  });
73693
73727
  registerSelectionAction({
73694
73728
  id: "selection.duplicate",
73695
73729
  label: "Duplicate",
73696
- icon: overlayAssetIcon("src/Overlay/icons/Duplicate.icon.svg"),
73730
+ icon: symbolIcon("Duplicate"),
73697
73731
  description: "Duplicates the selected items.",
73698
73732
  invoke: { kind: "selectionMethod", methodName: "duplicate" },
73733
+ sectionId: "selectionActions",
73734
+ order: 1,
73699
73735
  isAvailable: (items) => items.length > 0
73700
73736
  });
73701
73737
  registerSelectionAction({
73702
73738
  id: "selection.lock",
73703
73739
  label: "Lock",
73704
- icon: overlayAssetIcon("src/Overlay/icons/Lock.icon.svg"),
73740
+ icon: symbolIcon("unlock"),
73705
73741
  description: "Locks the selected items.",
73706
73742
  invoke: { kind: "selectionMethod", methodName: "lock" },
73743
+ sectionId: "selectionActions",
73744
+ order: 2,
73707
73745
  isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
73708
73746
  });
73709
73747
  registerSelectionAction({
73710
73748
  id: "selection.unlock",
73711
73749
  label: "Unlock",
73712
- icon: overlayAssetIcon("src/Overlay/icons/Unlock.icon.svg"),
73750
+ icon: symbolIcon("lock"),
73713
73751
  description: "Unlocks the selected items.",
73714
73752
  invoke: { kind: "selectionMethod", methodName: "unlock" },
73753
+ sectionId: "selectionActions",
73754
+ order: 2,
73715
73755
  isAvailable: (items) => items.some((item) => item.transformation.isLocked)
73716
73756
  });
73717
73757
  registerSelectionAction({
73718
73758
  id: "selection.bringToFront",
73719
73759
  label: "Bring to front",
73720
- icon: overlayAssetIcon("src/Overlay/icons/BringToFront.icon.svg"),
73760
+ icon: symbolIcon("BringToFront"),
73721
73761
  description: "Moves the selection above overlapping items.",
73722
73762
  invoke: { kind: "selectionMethod", methodName: "bringToFront" },
73763
+ sectionId: "selectionArrange",
73764
+ order: 1,
73723
73765
  isAvailable: (items) => items.length > 0
73724
73766
  });
73725
73767
  registerSelectionAction({
73726
73768
  id: "selection.sendToBack",
73727
73769
  label: "Send to back",
73728
- icon: overlayAssetIcon("src/Overlay/icons/SendToBack.icon.svg"),
73770
+ icon: symbolIcon("SendToBack"),
73729
73771
  description: "Moves the selection behind overlapping items.",
73730
73772
  invoke: { kind: "selectionMethod", methodName: "sendToBack" },
73773
+ sectionId: "selectionArrange",
73774
+ order: 2,
73731
73775
  isAvailable: (items) => items.length > 0
73732
73776
  });
73733
73777
  registerSelectionAction({
@@ -73735,6 +73779,8 @@ registerSelectionAction({
73735
73779
  label: "Font size",
73736
73780
  icon: styleFontSizeIcon(),
73737
73781
  invoke: { kind: "selectionMethod", methodName: "setFontSize" },
73782
+ sectionId: "selectionTextSize",
73783
+ order: 1,
73738
73784
  controls: [
73739
73785
  {
73740
73786
  id: "fontSize",
@@ -73756,10 +73802,12 @@ registerSelectionAction({
73756
73802
  registerSelectionAction({
73757
73803
  id: "selection.text.color",
73758
73804
  label: "Text color",
73759
- icon: styleColorIcon({
73805
+ icon: symbolIcon("TextColor", {
73760
73806
  swatch: { kind: "selectionProperty", property: "getFontColor" }
73761
73807
  }),
73762
73808
  invoke: { kind: "selectionMethod", methodName: "setFontColor" },
73809
+ sectionId: "selectionTextColors",
73810
+ order: 1,
73763
73811
  controls: [
73764
73812
  {
73765
73813
  id: "fontColor",
@@ -73777,11 +73825,12 @@ registerSelectionAction({
73777
73825
  registerSelectionAction({
73778
73826
  id: "selection.text.highlight",
73779
73827
  label: "Highlight",
73780
- icon: {
73781
- ...overlayAssetIcon("src/Items/Screen/icons/Background.icon.svg"),
73782
- state: { swatch: { kind: "selectionProperty", property: "getFontHighlight" } }
73783
- },
73828
+ icon: symbolIcon("TextHighlight", {
73829
+ swatch: { kind: "selectionProperty", property: "getFontHighlight" }
73830
+ }),
73784
73831
  invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
73832
+ sectionId: "selectionTextColors",
73833
+ order: 2,
73785
73834
  controls: [
73786
73835
  {
73787
73836
  id: "fontHighlight",
@@ -81701,6 +81750,7 @@ export {
81701
81750
  sha256,
81702
81751
  semanticColor,
81703
81752
  selectionActions,
81753
+ selectionActionSections,
81704
81754
  scalePatterns,
81705
81755
  scaleElementBy,
81706
81756
  rgbToRgba,
@@ -81713,6 +81763,7 @@ export {
81713
81763
  renderLinkToHTML,
81714
81764
  relativeLuminance,
81715
81765
  registerToolOverlay,
81766
+ registerSelectionActionSection,
81716
81767
  registerSelectionAction,
81717
81768
  registerItemOverlay,
81718
81769
  registerItem,
@@ -81735,6 +81786,7 @@ export {
81735
81786
  matchesOverlayCondition,
81736
81787
  listToolOverlays,
81737
81788
  listSelectionActions,
81789
+ listSelectionActionSections,
81738
81790
  listRegisteredItemTypes,
81739
81791
  listCreateSurfaceEntries,
81740
81792
  itemSchemas2 as itemSchemas,
package/dist/esm/node.js CHANGED
@@ -12330,6 +12330,7 @@ var itemOverlays = {};
12330
12330
  var toolOverlays = {};
12331
12331
  var dynamicOptionsResolvers = {};
12332
12332
  var selectionActions = {};
12333
+ var selectionActionSections = {};
12333
12334
  function registerItemOverlay(overlay) {
12334
12335
  itemOverlays[overlay.itemType] = overlay;
12335
12336
  }
@@ -12339,6 +12340,9 @@ function registerToolOverlay(overlay) {
12339
12340
  function registerSelectionAction(action) {
12340
12341
  selectionActions[action.id] = action;
12341
12342
  }
12343
+ function registerSelectionActionSection(section) {
12344
+ selectionActionSections[section.id] = section;
12345
+ }
12342
12346
  function registerDynamicOptionsResolver(id, resolver) {
12343
12347
  dynamicOptionsResolvers[id] = resolver;
12344
12348
  }
@@ -12394,6 +12398,9 @@ function listCreateSurfaceEntries() {
12394
12398
  function listSelectionActions() {
12395
12399
  return Object.values(selectionActions);
12396
12400
  }
12401
+ function listSelectionActionSections() {
12402
+ return Object.values(selectionActionSections);
12403
+ }
12397
12404
  function getSelectionOverlayActions(items) {
12398
12405
  return Object.values(selectionActions).filter((action) => action.isAvailable?.(items) ?? true);
12399
12406
  }
@@ -45930,7 +45937,7 @@ var addTextToolOverlay = {
45930
45937
  kind: "create",
45931
45938
  createsItemType: "RichText",
45932
45939
  family: "text",
45933
- icon: overlayAssetIcon("src/Items/RichText/icons/Text.icon.svg"),
45940
+ icon: symbolIcon("AddText"),
45934
45941
  description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool.",
45935
45942
  launch: { kind: "activate-tool" },
45936
45943
  surface: {
@@ -52545,7 +52552,7 @@ var connectorOverlay = {
52545
52552
  {
52546
52553
  id: "connector.switchPointers",
52547
52554
  label: "Switch arrows",
52548
- icon: connectorAssetIcon("SwitchPointers"),
52555
+ icon: symbolIcon("Switch"),
52549
52556
  target: "selection",
52550
52557
  invoke: { kind: "operation", class: "Connector", method: "switchPointers" }
52551
52558
  },
@@ -76150,52 +76157,89 @@ class Presence {
76150
76157
  function everyItemHasRichText(items) {
76151
76158
  return items.length > 0 && items.every((item) => !!item.getRichText?.());
76152
76159
  }
76160
+ registerSelectionActionSection({
76161
+ id: "selectionTextSize",
76162
+ label: "Text size",
76163
+ actionIds: ["selection.text.fontSize"]
76164
+ });
76165
+ registerSelectionActionSection({
76166
+ id: "selectionTextColors",
76167
+ label: "Text colors",
76168
+ actionIds: ["selection.text.color", "selection.text.highlight"]
76169
+ });
76170
+ registerSelectionActionSection({
76171
+ id: "selectionArrange",
76172
+ label: "Arrange",
76173
+ actionIds: ["selection.bringToFront", "selection.sendToBack"]
76174
+ });
76175
+ registerSelectionActionSection({
76176
+ id: "selectionActions",
76177
+ label: "Actions",
76178
+ actionIds: [
76179
+ "selection.duplicate",
76180
+ "selection.lock",
76181
+ "selection.unlock",
76182
+ "selection.delete"
76183
+ ]
76184
+ });
76153
76185
  registerSelectionAction({
76154
76186
  id: "selection.delete",
76155
76187
  label: "Delete",
76156
- icon: overlayAssetIcon("src/Overlay/icons/Delete.icon.svg"),
76188
+ icon: symbolIcon("Delete"),
76157
76189
  description: "Removes the selected items from the board.",
76158
76190
  invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
76191
+ sectionId: "selectionActions",
76192
+ order: 4,
76159
76193
  isAvailable: (items) => items.length > 0
76160
76194
  });
76161
76195
  registerSelectionAction({
76162
76196
  id: "selection.duplicate",
76163
76197
  label: "Duplicate",
76164
- icon: overlayAssetIcon("src/Overlay/icons/Duplicate.icon.svg"),
76198
+ icon: symbolIcon("Duplicate"),
76165
76199
  description: "Duplicates the selected items.",
76166
76200
  invoke: { kind: "selectionMethod", methodName: "duplicate" },
76201
+ sectionId: "selectionActions",
76202
+ order: 1,
76167
76203
  isAvailable: (items) => items.length > 0
76168
76204
  });
76169
76205
  registerSelectionAction({
76170
76206
  id: "selection.lock",
76171
76207
  label: "Lock",
76172
- icon: overlayAssetIcon("src/Overlay/icons/Lock.icon.svg"),
76208
+ icon: symbolIcon("unlock"),
76173
76209
  description: "Locks the selected items.",
76174
76210
  invoke: { kind: "selectionMethod", methodName: "lock" },
76211
+ sectionId: "selectionActions",
76212
+ order: 2,
76175
76213
  isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
76176
76214
  });
76177
76215
  registerSelectionAction({
76178
76216
  id: "selection.unlock",
76179
76217
  label: "Unlock",
76180
- icon: overlayAssetIcon("src/Overlay/icons/Unlock.icon.svg"),
76218
+ icon: symbolIcon("lock"),
76181
76219
  description: "Unlocks the selected items.",
76182
76220
  invoke: { kind: "selectionMethod", methodName: "unlock" },
76221
+ sectionId: "selectionActions",
76222
+ order: 2,
76183
76223
  isAvailable: (items) => items.some((item) => item.transformation.isLocked)
76184
76224
  });
76185
76225
  registerSelectionAction({
76186
76226
  id: "selection.bringToFront",
76187
76227
  label: "Bring to front",
76188
- icon: overlayAssetIcon("src/Overlay/icons/BringToFront.icon.svg"),
76228
+ icon: symbolIcon("BringToFront"),
76189
76229
  description: "Moves the selection above overlapping items.",
76190
76230
  invoke: { kind: "selectionMethod", methodName: "bringToFront" },
76231
+ sectionId: "selectionArrange",
76232
+ order: 1,
76191
76233
  isAvailable: (items) => items.length > 0
76192
76234
  });
76193
76235
  registerSelectionAction({
76194
76236
  id: "selection.sendToBack",
76195
76237
  label: "Send to back",
76196
- icon: overlayAssetIcon("src/Overlay/icons/SendToBack.icon.svg"),
76238
+ icon: symbolIcon("SendToBack"),
76197
76239
  description: "Moves the selection behind overlapping items.",
76198
76240
  invoke: { kind: "selectionMethod", methodName: "sendToBack" },
76241
+ sectionId: "selectionArrange",
76242
+ order: 2,
76199
76243
  isAvailable: (items) => items.length > 0
76200
76244
  });
76201
76245
  registerSelectionAction({
@@ -76203,6 +76247,8 @@ registerSelectionAction({
76203
76247
  label: "Font size",
76204
76248
  icon: styleFontSizeIcon(),
76205
76249
  invoke: { kind: "selectionMethod", methodName: "setFontSize" },
76250
+ sectionId: "selectionTextSize",
76251
+ order: 1,
76206
76252
  controls: [
76207
76253
  {
76208
76254
  id: "fontSize",
@@ -76224,10 +76270,12 @@ registerSelectionAction({
76224
76270
  registerSelectionAction({
76225
76271
  id: "selection.text.color",
76226
76272
  label: "Text color",
76227
- icon: styleColorIcon({
76273
+ icon: symbolIcon("TextColor", {
76228
76274
  swatch: { kind: "selectionProperty", property: "getFontColor" }
76229
76275
  }),
76230
76276
  invoke: { kind: "selectionMethod", methodName: "setFontColor" },
76277
+ sectionId: "selectionTextColors",
76278
+ order: 1,
76231
76279
  controls: [
76232
76280
  {
76233
76281
  id: "fontColor",
@@ -76245,11 +76293,12 @@ registerSelectionAction({
76245
76293
  registerSelectionAction({
76246
76294
  id: "selection.text.highlight",
76247
76295
  label: "Highlight",
76248
- icon: {
76249
- ...overlayAssetIcon("src/Items/Screen/icons/Background.icon.svg"),
76250
- state: { swatch: { kind: "selectionProperty", property: "getFontHighlight" } }
76251
- },
76296
+ icon: symbolIcon("TextHighlight", {
76297
+ swatch: { kind: "selectionProperty", property: "getFontHighlight" }
76298
+ }),
76252
76299
  invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
76300
+ sectionId: "selectionTextColors",
76301
+ order: 2,
76253
76302
  controls: [
76254
76303
  {
76255
76304
  id: "fontHighlight",
@@ -84336,6 +84385,7 @@ export {
84336
84385
  sha256,
84337
84386
  semanticColor,
84338
84387
  selectionActions,
84388
+ selectionActionSections,
84339
84389
  scalePatterns,
84340
84390
  scaleElementBy,
84341
84391
  rgbToRgba,
@@ -84348,6 +84398,7 @@ export {
84348
84398
  renderLinkToHTML,
84349
84399
  relativeLuminance,
84350
84400
  registerToolOverlay,
84401
+ registerSelectionActionSection,
84351
84402
  registerSelectionAction,
84352
84403
  registerItemOverlay,
84353
84404
  registerItem,
@@ -84370,6 +84421,7 @@ export {
84370
84421
  matchesOverlayCondition,
84371
84422
  listToolOverlays,
84372
84423
  listSelectionActions,
84424
+ listSelectionActionSections,
84373
84425
  listRegisteredItemTypes,
84374
84426
  listCreateSurfaceEntries,
84375
84427
  itemSchemas2 as itemSchemas,