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/cjs/browser.js +65 -13
- package/dist/cjs/index.js +65 -13
- package/dist/cjs/node.js +65 -13
- package/dist/cjs/overlayIconManifest.js +1 -1
- package/dist/esm/browser.js +65 -13
- package/dist/esm/index.js +65 -13
- package/dist/esm/node.js +65 -13
- package/dist/esm/overlayIconManifest.js +1 -1
- package/dist/overlay-icons/Overlay/overlay-icons.svg +97 -10
- package/dist/types/Overlay/OverlayMetadata.d.ts +2 -0
- package/dist/types/Overlay/overlayRegistry.d.ts +4 -1
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -649,6 +649,7 @@ __export(exports_browser, {
|
|
|
649
649
|
sha256: () => sha256,
|
|
650
650
|
semanticColor: () => semanticColor,
|
|
651
651
|
selectionActions: () => selectionActions,
|
|
652
|
+
selectionActionSections: () => selectionActionSections,
|
|
652
653
|
scalePatterns: () => scalePatterns,
|
|
653
654
|
scaleElementBy: () => scaleElementBy,
|
|
654
655
|
rgbToRgba: () => rgbToRgba,
|
|
@@ -661,6 +662,7 @@ __export(exports_browser, {
|
|
|
661
662
|
renderLinkToHTML: () => renderLinkToHTML,
|
|
662
663
|
relativeLuminance: () => relativeLuminance,
|
|
663
664
|
registerToolOverlay: () => registerToolOverlay,
|
|
665
|
+
registerSelectionActionSection: () => registerSelectionActionSection,
|
|
664
666
|
registerSelectionAction: () => registerSelectionAction,
|
|
665
667
|
registerItemOverlay: () => registerItemOverlay,
|
|
666
668
|
registerItem: () => registerItem,
|
|
@@ -683,6 +685,7 @@ __export(exports_browser, {
|
|
|
683
685
|
matchesOverlayCondition: () => matchesOverlayCondition,
|
|
684
686
|
listToolOverlays: () => listToolOverlays,
|
|
685
687
|
listSelectionActions: () => listSelectionActions,
|
|
688
|
+
listSelectionActionSections: () => listSelectionActionSections,
|
|
686
689
|
listRegisteredItemTypes: () => listRegisteredItemTypes,
|
|
687
690
|
listCreateSurfaceEntries: () => listCreateSurfaceEntries,
|
|
688
691
|
itemSchemas: () => itemSchemas2,
|
|
@@ -11786,6 +11789,7 @@ var itemOverlays = {};
|
|
|
11786
11789
|
var toolOverlays = {};
|
|
11787
11790
|
var dynamicOptionsResolvers = {};
|
|
11788
11791
|
var selectionActions = {};
|
|
11792
|
+
var selectionActionSections = {};
|
|
11789
11793
|
function registerItemOverlay(overlay) {
|
|
11790
11794
|
itemOverlays[overlay.itemType] = overlay;
|
|
11791
11795
|
}
|
|
@@ -11795,6 +11799,9 @@ function registerToolOverlay(overlay) {
|
|
|
11795
11799
|
function registerSelectionAction(action) {
|
|
11796
11800
|
selectionActions[action.id] = action;
|
|
11797
11801
|
}
|
|
11802
|
+
function registerSelectionActionSection(section) {
|
|
11803
|
+
selectionActionSections[section.id] = section;
|
|
11804
|
+
}
|
|
11798
11805
|
function registerDynamicOptionsResolver(id, resolver) {
|
|
11799
11806
|
dynamicOptionsResolvers[id] = resolver;
|
|
11800
11807
|
}
|
|
@@ -11850,6 +11857,9 @@ function listCreateSurfaceEntries() {
|
|
|
11850
11857
|
function listSelectionActions() {
|
|
11851
11858
|
return Object.values(selectionActions);
|
|
11852
11859
|
}
|
|
11860
|
+
function listSelectionActionSections() {
|
|
11861
|
+
return Object.values(selectionActionSections);
|
|
11862
|
+
}
|
|
11853
11863
|
function getSelectionOverlayActions(items) {
|
|
11854
11864
|
return Object.values(selectionActions).filter((action) => action.isAvailable?.(items) ?? true);
|
|
11855
11865
|
}
|
|
@@ -43627,7 +43637,7 @@ var addTextToolOverlay = {
|
|
|
43627
43637
|
kind: "create",
|
|
43628
43638
|
createsItemType: "RichText",
|
|
43629
43639
|
family: "text",
|
|
43630
|
-
icon:
|
|
43640
|
+
icon: symbolIcon("AddText"),
|
|
43631
43641
|
description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool.",
|
|
43632
43642
|
launch: { kind: "activate-tool" },
|
|
43633
43643
|
surface: {
|
|
@@ -50309,7 +50319,7 @@ var connectorOverlay = {
|
|
|
50309
50319
|
{
|
|
50310
50320
|
id: "connector.switchPointers",
|
|
50311
50321
|
label: "Switch arrows",
|
|
50312
|
-
icon:
|
|
50322
|
+
icon: symbolIcon("Switch"),
|
|
50313
50323
|
target: "selection",
|
|
50314
50324
|
invoke: { kind: "operation", class: "Connector", method: "switchPointers" }
|
|
50315
50325
|
},
|
|
@@ -73913,52 +73923,89 @@ class Presence {
|
|
|
73913
73923
|
function everyItemHasRichText(items) {
|
|
73914
73924
|
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
73915
73925
|
}
|
|
73926
|
+
registerSelectionActionSection({
|
|
73927
|
+
id: "selectionTextSize",
|
|
73928
|
+
label: "Text size",
|
|
73929
|
+
actionIds: ["selection.text.fontSize"]
|
|
73930
|
+
});
|
|
73931
|
+
registerSelectionActionSection({
|
|
73932
|
+
id: "selectionTextColors",
|
|
73933
|
+
label: "Text colors",
|
|
73934
|
+
actionIds: ["selection.text.color", "selection.text.highlight"]
|
|
73935
|
+
});
|
|
73936
|
+
registerSelectionActionSection({
|
|
73937
|
+
id: "selectionArrange",
|
|
73938
|
+
label: "Arrange",
|
|
73939
|
+
actionIds: ["selection.bringToFront", "selection.sendToBack"]
|
|
73940
|
+
});
|
|
73941
|
+
registerSelectionActionSection({
|
|
73942
|
+
id: "selectionActions",
|
|
73943
|
+
label: "Actions",
|
|
73944
|
+
actionIds: [
|
|
73945
|
+
"selection.duplicate",
|
|
73946
|
+
"selection.lock",
|
|
73947
|
+
"selection.unlock",
|
|
73948
|
+
"selection.delete"
|
|
73949
|
+
]
|
|
73950
|
+
});
|
|
73916
73951
|
registerSelectionAction({
|
|
73917
73952
|
id: "selection.delete",
|
|
73918
73953
|
label: "Delete",
|
|
73919
|
-
icon:
|
|
73954
|
+
icon: symbolIcon("Delete"),
|
|
73920
73955
|
description: "Removes the selected items from the board.",
|
|
73921
73956
|
invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
|
|
73957
|
+
sectionId: "selectionActions",
|
|
73958
|
+
order: 4,
|
|
73922
73959
|
isAvailable: (items) => items.length > 0
|
|
73923
73960
|
});
|
|
73924
73961
|
registerSelectionAction({
|
|
73925
73962
|
id: "selection.duplicate",
|
|
73926
73963
|
label: "Duplicate",
|
|
73927
|
-
icon:
|
|
73964
|
+
icon: symbolIcon("Duplicate"),
|
|
73928
73965
|
description: "Duplicates the selected items.",
|
|
73929
73966
|
invoke: { kind: "selectionMethod", methodName: "duplicate" },
|
|
73967
|
+
sectionId: "selectionActions",
|
|
73968
|
+
order: 1,
|
|
73930
73969
|
isAvailable: (items) => items.length > 0
|
|
73931
73970
|
});
|
|
73932
73971
|
registerSelectionAction({
|
|
73933
73972
|
id: "selection.lock",
|
|
73934
73973
|
label: "Lock",
|
|
73935
|
-
icon:
|
|
73974
|
+
icon: symbolIcon("unlock"),
|
|
73936
73975
|
description: "Locks the selected items.",
|
|
73937
73976
|
invoke: { kind: "selectionMethod", methodName: "lock" },
|
|
73977
|
+
sectionId: "selectionActions",
|
|
73978
|
+
order: 2,
|
|
73938
73979
|
isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
|
|
73939
73980
|
});
|
|
73940
73981
|
registerSelectionAction({
|
|
73941
73982
|
id: "selection.unlock",
|
|
73942
73983
|
label: "Unlock",
|
|
73943
|
-
icon:
|
|
73984
|
+
icon: symbolIcon("lock"),
|
|
73944
73985
|
description: "Unlocks the selected items.",
|
|
73945
73986
|
invoke: { kind: "selectionMethod", methodName: "unlock" },
|
|
73987
|
+
sectionId: "selectionActions",
|
|
73988
|
+
order: 2,
|
|
73946
73989
|
isAvailable: (items) => items.some((item) => item.transformation.isLocked)
|
|
73947
73990
|
});
|
|
73948
73991
|
registerSelectionAction({
|
|
73949
73992
|
id: "selection.bringToFront",
|
|
73950
73993
|
label: "Bring to front",
|
|
73951
|
-
icon:
|
|
73994
|
+
icon: symbolIcon("BringToFront"),
|
|
73952
73995
|
description: "Moves the selection above overlapping items.",
|
|
73953
73996
|
invoke: { kind: "selectionMethod", methodName: "bringToFront" },
|
|
73997
|
+
sectionId: "selectionArrange",
|
|
73998
|
+
order: 1,
|
|
73954
73999
|
isAvailable: (items) => items.length > 0
|
|
73955
74000
|
});
|
|
73956
74001
|
registerSelectionAction({
|
|
73957
74002
|
id: "selection.sendToBack",
|
|
73958
74003
|
label: "Send to back",
|
|
73959
|
-
icon:
|
|
74004
|
+
icon: symbolIcon("SendToBack"),
|
|
73960
74005
|
description: "Moves the selection behind overlapping items.",
|
|
73961
74006
|
invoke: { kind: "selectionMethod", methodName: "sendToBack" },
|
|
74007
|
+
sectionId: "selectionArrange",
|
|
74008
|
+
order: 2,
|
|
73962
74009
|
isAvailable: (items) => items.length > 0
|
|
73963
74010
|
});
|
|
73964
74011
|
registerSelectionAction({
|
|
@@ -73966,6 +74013,8 @@ registerSelectionAction({
|
|
|
73966
74013
|
label: "Font size",
|
|
73967
74014
|
icon: styleFontSizeIcon(),
|
|
73968
74015
|
invoke: { kind: "selectionMethod", methodName: "setFontSize" },
|
|
74016
|
+
sectionId: "selectionTextSize",
|
|
74017
|
+
order: 1,
|
|
73969
74018
|
controls: [
|
|
73970
74019
|
{
|
|
73971
74020
|
id: "fontSize",
|
|
@@ -73987,10 +74036,12 @@ registerSelectionAction({
|
|
|
73987
74036
|
registerSelectionAction({
|
|
73988
74037
|
id: "selection.text.color",
|
|
73989
74038
|
label: "Text color",
|
|
73990
|
-
icon:
|
|
74039
|
+
icon: symbolIcon("TextColor", {
|
|
73991
74040
|
swatch: { kind: "selectionProperty", property: "getFontColor" }
|
|
73992
74041
|
}),
|
|
73993
74042
|
invoke: { kind: "selectionMethod", methodName: "setFontColor" },
|
|
74043
|
+
sectionId: "selectionTextColors",
|
|
74044
|
+
order: 1,
|
|
73994
74045
|
controls: [
|
|
73995
74046
|
{
|
|
73996
74047
|
id: "fontColor",
|
|
@@ -74008,11 +74059,12 @@ registerSelectionAction({
|
|
|
74008
74059
|
registerSelectionAction({
|
|
74009
74060
|
id: "selection.text.highlight",
|
|
74010
74061
|
label: "Highlight",
|
|
74011
|
-
icon: {
|
|
74012
|
-
|
|
74013
|
-
|
|
74014
|
-
},
|
|
74062
|
+
icon: symbolIcon("TextHighlight", {
|
|
74063
|
+
swatch: { kind: "selectionProperty", property: "getFontHighlight" }
|
|
74064
|
+
}),
|
|
74015
74065
|
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
|
|
74066
|
+
sectionId: "selectionTextColors",
|
|
74067
|
+
order: 2,
|
|
74016
74068
|
controls: [
|
|
74017
74069
|
{
|
|
74018
74070
|
id: "fontHighlight",
|
package/dist/cjs/index.js
CHANGED
|
@@ -649,6 +649,7 @@ __export(exports_src, {
|
|
|
649
649
|
sha256: () => sha256,
|
|
650
650
|
semanticColor: () => semanticColor,
|
|
651
651
|
selectionActions: () => selectionActions,
|
|
652
|
+
selectionActionSections: () => selectionActionSections,
|
|
652
653
|
scalePatterns: () => scalePatterns,
|
|
653
654
|
scaleElementBy: () => scaleElementBy,
|
|
654
655
|
rgbToRgba: () => rgbToRgba,
|
|
@@ -661,6 +662,7 @@ __export(exports_src, {
|
|
|
661
662
|
renderLinkToHTML: () => renderLinkToHTML,
|
|
662
663
|
relativeLuminance: () => relativeLuminance,
|
|
663
664
|
registerToolOverlay: () => registerToolOverlay,
|
|
665
|
+
registerSelectionActionSection: () => registerSelectionActionSection,
|
|
664
666
|
registerSelectionAction: () => registerSelectionAction,
|
|
665
667
|
registerItemOverlay: () => registerItemOverlay,
|
|
666
668
|
registerItem: () => registerItem,
|
|
@@ -683,6 +685,7 @@ __export(exports_src, {
|
|
|
683
685
|
matchesOverlayCondition: () => matchesOverlayCondition,
|
|
684
686
|
listToolOverlays: () => listToolOverlays,
|
|
685
687
|
listSelectionActions: () => listSelectionActions,
|
|
688
|
+
listSelectionActionSections: () => listSelectionActionSections,
|
|
686
689
|
listRegisteredItemTypes: () => listRegisteredItemTypes,
|
|
687
690
|
listCreateSurfaceEntries: () => listCreateSurfaceEntries,
|
|
688
691
|
itemSchemas: () => itemSchemas2,
|
|
@@ -11786,6 +11789,7 @@ var itemOverlays = {};
|
|
|
11786
11789
|
var toolOverlays = {};
|
|
11787
11790
|
var dynamicOptionsResolvers = {};
|
|
11788
11791
|
var selectionActions = {};
|
|
11792
|
+
var selectionActionSections = {};
|
|
11789
11793
|
function registerItemOverlay(overlay) {
|
|
11790
11794
|
itemOverlays[overlay.itemType] = overlay;
|
|
11791
11795
|
}
|
|
@@ -11795,6 +11799,9 @@ function registerToolOverlay(overlay) {
|
|
|
11795
11799
|
function registerSelectionAction(action) {
|
|
11796
11800
|
selectionActions[action.id] = action;
|
|
11797
11801
|
}
|
|
11802
|
+
function registerSelectionActionSection(section) {
|
|
11803
|
+
selectionActionSections[section.id] = section;
|
|
11804
|
+
}
|
|
11798
11805
|
function registerDynamicOptionsResolver(id, resolver) {
|
|
11799
11806
|
dynamicOptionsResolvers[id] = resolver;
|
|
11800
11807
|
}
|
|
@@ -11850,6 +11857,9 @@ function listCreateSurfaceEntries() {
|
|
|
11850
11857
|
function listSelectionActions() {
|
|
11851
11858
|
return Object.values(selectionActions);
|
|
11852
11859
|
}
|
|
11860
|
+
function listSelectionActionSections() {
|
|
11861
|
+
return Object.values(selectionActionSections);
|
|
11862
|
+
}
|
|
11853
11863
|
function getSelectionOverlayActions(items) {
|
|
11854
11864
|
return Object.values(selectionActions).filter((action) => action.isAvailable?.(items) ?? true);
|
|
11855
11865
|
}
|
|
@@ -43627,7 +43637,7 @@ var addTextToolOverlay = {
|
|
|
43627
43637
|
kind: "create",
|
|
43628
43638
|
createsItemType: "RichText",
|
|
43629
43639
|
family: "text",
|
|
43630
|
-
icon:
|
|
43640
|
+
icon: symbolIcon("AddText"),
|
|
43631
43641
|
description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool.",
|
|
43632
43642
|
launch: { kind: "activate-tool" },
|
|
43633
43643
|
surface: {
|
|
@@ -50309,7 +50319,7 @@ var connectorOverlay = {
|
|
|
50309
50319
|
{
|
|
50310
50320
|
id: "connector.switchPointers",
|
|
50311
50321
|
label: "Switch arrows",
|
|
50312
|
-
icon:
|
|
50322
|
+
icon: symbolIcon("Switch"),
|
|
50313
50323
|
target: "selection",
|
|
50314
50324
|
invoke: { kind: "operation", class: "Connector", method: "switchPointers" }
|
|
50315
50325
|
},
|
|
@@ -73913,52 +73923,89 @@ class Presence {
|
|
|
73913
73923
|
function everyItemHasRichText(items) {
|
|
73914
73924
|
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
73915
73925
|
}
|
|
73926
|
+
registerSelectionActionSection({
|
|
73927
|
+
id: "selectionTextSize",
|
|
73928
|
+
label: "Text size",
|
|
73929
|
+
actionIds: ["selection.text.fontSize"]
|
|
73930
|
+
});
|
|
73931
|
+
registerSelectionActionSection({
|
|
73932
|
+
id: "selectionTextColors",
|
|
73933
|
+
label: "Text colors",
|
|
73934
|
+
actionIds: ["selection.text.color", "selection.text.highlight"]
|
|
73935
|
+
});
|
|
73936
|
+
registerSelectionActionSection({
|
|
73937
|
+
id: "selectionArrange",
|
|
73938
|
+
label: "Arrange",
|
|
73939
|
+
actionIds: ["selection.bringToFront", "selection.sendToBack"]
|
|
73940
|
+
});
|
|
73941
|
+
registerSelectionActionSection({
|
|
73942
|
+
id: "selectionActions",
|
|
73943
|
+
label: "Actions",
|
|
73944
|
+
actionIds: [
|
|
73945
|
+
"selection.duplicate",
|
|
73946
|
+
"selection.lock",
|
|
73947
|
+
"selection.unlock",
|
|
73948
|
+
"selection.delete"
|
|
73949
|
+
]
|
|
73950
|
+
});
|
|
73916
73951
|
registerSelectionAction({
|
|
73917
73952
|
id: "selection.delete",
|
|
73918
73953
|
label: "Delete",
|
|
73919
|
-
icon:
|
|
73954
|
+
icon: symbolIcon("Delete"),
|
|
73920
73955
|
description: "Removes the selected items from the board.",
|
|
73921
73956
|
invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
|
|
73957
|
+
sectionId: "selectionActions",
|
|
73958
|
+
order: 4,
|
|
73922
73959
|
isAvailable: (items) => items.length > 0
|
|
73923
73960
|
});
|
|
73924
73961
|
registerSelectionAction({
|
|
73925
73962
|
id: "selection.duplicate",
|
|
73926
73963
|
label: "Duplicate",
|
|
73927
|
-
icon:
|
|
73964
|
+
icon: symbolIcon("Duplicate"),
|
|
73928
73965
|
description: "Duplicates the selected items.",
|
|
73929
73966
|
invoke: { kind: "selectionMethod", methodName: "duplicate" },
|
|
73967
|
+
sectionId: "selectionActions",
|
|
73968
|
+
order: 1,
|
|
73930
73969
|
isAvailable: (items) => items.length > 0
|
|
73931
73970
|
});
|
|
73932
73971
|
registerSelectionAction({
|
|
73933
73972
|
id: "selection.lock",
|
|
73934
73973
|
label: "Lock",
|
|
73935
|
-
icon:
|
|
73974
|
+
icon: symbolIcon("unlock"),
|
|
73936
73975
|
description: "Locks the selected items.",
|
|
73937
73976
|
invoke: { kind: "selectionMethod", methodName: "lock" },
|
|
73977
|
+
sectionId: "selectionActions",
|
|
73978
|
+
order: 2,
|
|
73938
73979
|
isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
|
|
73939
73980
|
});
|
|
73940
73981
|
registerSelectionAction({
|
|
73941
73982
|
id: "selection.unlock",
|
|
73942
73983
|
label: "Unlock",
|
|
73943
|
-
icon:
|
|
73984
|
+
icon: symbolIcon("lock"),
|
|
73944
73985
|
description: "Unlocks the selected items.",
|
|
73945
73986
|
invoke: { kind: "selectionMethod", methodName: "unlock" },
|
|
73987
|
+
sectionId: "selectionActions",
|
|
73988
|
+
order: 2,
|
|
73946
73989
|
isAvailable: (items) => items.some((item) => item.transformation.isLocked)
|
|
73947
73990
|
});
|
|
73948
73991
|
registerSelectionAction({
|
|
73949
73992
|
id: "selection.bringToFront",
|
|
73950
73993
|
label: "Bring to front",
|
|
73951
|
-
icon:
|
|
73994
|
+
icon: symbolIcon("BringToFront"),
|
|
73952
73995
|
description: "Moves the selection above overlapping items.",
|
|
73953
73996
|
invoke: { kind: "selectionMethod", methodName: "bringToFront" },
|
|
73997
|
+
sectionId: "selectionArrange",
|
|
73998
|
+
order: 1,
|
|
73954
73999
|
isAvailable: (items) => items.length > 0
|
|
73955
74000
|
});
|
|
73956
74001
|
registerSelectionAction({
|
|
73957
74002
|
id: "selection.sendToBack",
|
|
73958
74003
|
label: "Send to back",
|
|
73959
|
-
icon:
|
|
74004
|
+
icon: symbolIcon("SendToBack"),
|
|
73960
74005
|
description: "Moves the selection behind overlapping items.",
|
|
73961
74006
|
invoke: { kind: "selectionMethod", methodName: "sendToBack" },
|
|
74007
|
+
sectionId: "selectionArrange",
|
|
74008
|
+
order: 2,
|
|
73962
74009
|
isAvailable: (items) => items.length > 0
|
|
73963
74010
|
});
|
|
73964
74011
|
registerSelectionAction({
|
|
@@ -73966,6 +74013,8 @@ registerSelectionAction({
|
|
|
73966
74013
|
label: "Font size",
|
|
73967
74014
|
icon: styleFontSizeIcon(),
|
|
73968
74015
|
invoke: { kind: "selectionMethod", methodName: "setFontSize" },
|
|
74016
|
+
sectionId: "selectionTextSize",
|
|
74017
|
+
order: 1,
|
|
73969
74018
|
controls: [
|
|
73970
74019
|
{
|
|
73971
74020
|
id: "fontSize",
|
|
@@ -73987,10 +74036,12 @@ registerSelectionAction({
|
|
|
73987
74036
|
registerSelectionAction({
|
|
73988
74037
|
id: "selection.text.color",
|
|
73989
74038
|
label: "Text color",
|
|
73990
|
-
icon:
|
|
74039
|
+
icon: symbolIcon("TextColor", {
|
|
73991
74040
|
swatch: { kind: "selectionProperty", property: "getFontColor" }
|
|
73992
74041
|
}),
|
|
73993
74042
|
invoke: { kind: "selectionMethod", methodName: "setFontColor" },
|
|
74043
|
+
sectionId: "selectionTextColors",
|
|
74044
|
+
order: 1,
|
|
73994
74045
|
controls: [
|
|
73995
74046
|
{
|
|
73996
74047
|
id: "fontColor",
|
|
@@ -74008,11 +74059,12 @@ registerSelectionAction({
|
|
|
74008
74059
|
registerSelectionAction({
|
|
74009
74060
|
id: "selection.text.highlight",
|
|
74010
74061
|
label: "Highlight",
|
|
74011
|
-
icon: {
|
|
74012
|
-
|
|
74013
|
-
|
|
74014
|
-
},
|
|
74062
|
+
icon: symbolIcon("TextHighlight", {
|
|
74063
|
+
swatch: { kind: "selectionProperty", property: "getFontHighlight" }
|
|
74064
|
+
}),
|
|
74015
74065
|
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
|
|
74066
|
+
sectionId: "selectionTextColors",
|
|
74067
|
+
order: 2,
|
|
74016
74068
|
controls: [
|
|
74017
74069
|
{
|
|
74018
74070
|
id: "fontHighlight",
|
package/dist/cjs/node.js
CHANGED
|
@@ -1686,6 +1686,7 @@ __export(exports_node, {
|
|
|
1686
1686
|
sha256: () => sha256,
|
|
1687
1687
|
semanticColor: () => semanticColor,
|
|
1688
1688
|
selectionActions: () => selectionActions,
|
|
1689
|
+
selectionActionSections: () => selectionActionSections,
|
|
1689
1690
|
scalePatterns: () => scalePatterns,
|
|
1690
1691
|
scaleElementBy: () => scaleElementBy,
|
|
1691
1692
|
rgbToRgba: () => rgbToRgba,
|
|
@@ -1698,6 +1699,7 @@ __export(exports_node, {
|
|
|
1698
1699
|
renderLinkToHTML: () => renderLinkToHTML,
|
|
1699
1700
|
relativeLuminance: () => relativeLuminance,
|
|
1700
1701
|
registerToolOverlay: () => registerToolOverlay,
|
|
1702
|
+
registerSelectionActionSection: () => registerSelectionActionSection,
|
|
1701
1703
|
registerSelectionAction: () => registerSelectionAction,
|
|
1702
1704
|
registerItemOverlay: () => registerItemOverlay,
|
|
1703
1705
|
registerItem: () => registerItem,
|
|
@@ -1720,6 +1722,7 @@ __export(exports_node, {
|
|
|
1720
1722
|
matchesOverlayCondition: () => matchesOverlayCondition,
|
|
1721
1723
|
listToolOverlays: () => listToolOverlays,
|
|
1722
1724
|
listSelectionActions: () => listSelectionActions,
|
|
1725
|
+
listSelectionActionSections: () => listSelectionActionSections,
|
|
1723
1726
|
listRegisteredItemTypes: () => listRegisteredItemTypes,
|
|
1724
1727
|
listCreateSurfaceEntries: () => listCreateSurfaceEntries,
|
|
1725
1728
|
itemSchemas: () => itemSchemas2,
|
|
@@ -12822,6 +12825,7 @@ var itemOverlays = {};
|
|
|
12822
12825
|
var toolOverlays = {};
|
|
12823
12826
|
var dynamicOptionsResolvers = {};
|
|
12824
12827
|
var selectionActions = {};
|
|
12828
|
+
var selectionActionSections = {};
|
|
12825
12829
|
function registerItemOverlay(overlay) {
|
|
12826
12830
|
itemOverlays[overlay.itemType] = overlay;
|
|
12827
12831
|
}
|
|
@@ -12831,6 +12835,9 @@ function registerToolOverlay(overlay) {
|
|
|
12831
12835
|
function registerSelectionAction(action) {
|
|
12832
12836
|
selectionActions[action.id] = action;
|
|
12833
12837
|
}
|
|
12838
|
+
function registerSelectionActionSection(section) {
|
|
12839
|
+
selectionActionSections[section.id] = section;
|
|
12840
|
+
}
|
|
12834
12841
|
function registerDynamicOptionsResolver(id, resolver) {
|
|
12835
12842
|
dynamicOptionsResolvers[id] = resolver;
|
|
12836
12843
|
}
|
|
@@ -12886,6 +12893,9 @@ function listCreateSurfaceEntries() {
|
|
|
12886
12893
|
function listSelectionActions() {
|
|
12887
12894
|
return Object.values(selectionActions);
|
|
12888
12895
|
}
|
|
12896
|
+
function listSelectionActionSections() {
|
|
12897
|
+
return Object.values(selectionActionSections);
|
|
12898
|
+
}
|
|
12889
12899
|
function getSelectionOverlayActions(items) {
|
|
12890
12900
|
return Object.values(selectionActions).filter((action) => action.isAvailable?.(items) ?? true);
|
|
12891
12901
|
}
|
|
@@ -46166,7 +46176,7 @@ var addTextToolOverlay = {
|
|
|
46166
46176
|
kind: "create",
|
|
46167
46177
|
createsItemType: "RichText",
|
|
46168
46178
|
family: "text",
|
|
46169
|
-
icon:
|
|
46179
|
+
icon: symbolIcon("AddText"),
|
|
46170
46180
|
description: "Creates editable rich text. The current first pass has no pre-placement defaults on this tool.",
|
|
46171
46181
|
launch: { kind: "activate-tool" },
|
|
46172
46182
|
surface: {
|
|
@@ -52781,7 +52791,7 @@ var connectorOverlay = {
|
|
|
52781
52791
|
{
|
|
52782
52792
|
id: "connector.switchPointers",
|
|
52783
52793
|
label: "Switch arrows",
|
|
52784
|
-
icon:
|
|
52794
|
+
icon: symbolIcon("Switch"),
|
|
52785
52795
|
target: "selection",
|
|
52786
52796
|
invoke: { kind: "operation", class: "Connector", method: "switchPointers" }
|
|
52787
52797
|
},
|
|
@@ -76386,52 +76396,89 @@ class Presence {
|
|
|
76386
76396
|
function everyItemHasRichText(items) {
|
|
76387
76397
|
return items.length > 0 && items.every((item) => !!item.getRichText?.());
|
|
76388
76398
|
}
|
|
76399
|
+
registerSelectionActionSection({
|
|
76400
|
+
id: "selectionTextSize",
|
|
76401
|
+
label: "Text size",
|
|
76402
|
+
actionIds: ["selection.text.fontSize"]
|
|
76403
|
+
});
|
|
76404
|
+
registerSelectionActionSection({
|
|
76405
|
+
id: "selectionTextColors",
|
|
76406
|
+
label: "Text colors",
|
|
76407
|
+
actionIds: ["selection.text.color", "selection.text.highlight"]
|
|
76408
|
+
});
|
|
76409
|
+
registerSelectionActionSection({
|
|
76410
|
+
id: "selectionArrange",
|
|
76411
|
+
label: "Arrange",
|
|
76412
|
+
actionIds: ["selection.bringToFront", "selection.sendToBack"]
|
|
76413
|
+
});
|
|
76414
|
+
registerSelectionActionSection({
|
|
76415
|
+
id: "selectionActions",
|
|
76416
|
+
label: "Actions",
|
|
76417
|
+
actionIds: [
|
|
76418
|
+
"selection.duplicate",
|
|
76419
|
+
"selection.lock",
|
|
76420
|
+
"selection.unlock",
|
|
76421
|
+
"selection.delete"
|
|
76422
|
+
]
|
|
76423
|
+
});
|
|
76389
76424
|
registerSelectionAction({
|
|
76390
76425
|
id: "selection.delete",
|
|
76391
76426
|
label: "Delete",
|
|
76392
|
-
icon:
|
|
76427
|
+
icon: symbolIcon("Delete"),
|
|
76393
76428
|
description: "Removes the selected items from the board.",
|
|
76394
76429
|
invoke: { kind: "selectionMethod", methodName: "removeFromBoard" },
|
|
76430
|
+
sectionId: "selectionActions",
|
|
76431
|
+
order: 4,
|
|
76395
76432
|
isAvailable: (items) => items.length > 0
|
|
76396
76433
|
});
|
|
76397
76434
|
registerSelectionAction({
|
|
76398
76435
|
id: "selection.duplicate",
|
|
76399
76436
|
label: "Duplicate",
|
|
76400
|
-
icon:
|
|
76437
|
+
icon: symbolIcon("Duplicate"),
|
|
76401
76438
|
description: "Duplicates the selected items.",
|
|
76402
76439
|
invoke: { kind: "selectionMethod", methodName: "duplicate" },
|
|
76440
|
+
sectionId: "selectionActions",
|
|
76441
|
+
order: 1,
|
|
76403
76442
|
isAvailable: (items) => items.length > 0
|
|
76404
76443
|
});
|
|
76405
76444
|
registerSelectionAction({
|
|
76406
76445
|
id: "selection.lock",
|
|
76407
76446
|
label: "Lock",
|
|
76408
|
-
icon:
|
|
76447
|
+
icon: symbolIcon("unlock"),
|
|
76409
76448
|
description: "Locks the selected items.",
|
|
76410
76449
|
invoke: { kind: "selectionMethod", methodName: "lock" },
|
|
76450
|
+
sectionId: "selectionActions",
|
|
76451
|
+
order: 2,
|
|
76411
76452
|
isAvailable: (items) => items.length > 0 && !items.some((item) => item.transformation.isLocked)
|
|
76412
76453
|
});
|
|
76413
76454
|
registerSelectionAction({
|
|
76414
76455
|
id: "selection.unlock",
|
|
76415
76456
|
label: "Unlock",
|
|
76416
|
-
icon:
|
|
76457
|
+
icon: symbolIcon("lock"),
|
|
76417
76458
|
description: "Unlocks the selected items.",
|
|
76418
76459
|
invoke: { kind: "selectionMethod", methodName: "unlock" },
|
|
76460
|
+
sectionId: "selectionActions",
|
|
76461
|
+
order: 2,
|
|
76419
76462
|
isAvailable: (items) => items.some((item) => item.transformation.isLocked)
|
|
76420
76463
|
});
|
|
76421
76464
|
registerSelectionAction({
|
|
76422
76465
|
id: "selection.bringToFront",
|
|
76423
76466
|
label: "Bring to front",
|
|
76424
|
-
icon:
|
|
76467
|
+
icon: symbolIcon("BringToFront"),
|
|
76425
76468
|
description: "Moves the selection above overlapping items.",
|
|
76426
76469
|
invoke: { kind: "selectionMethod", methodName: "bringToFront" },
|
|
76470
|
+
sectionId: "selectionArrange",
|
|
76471
|
+
order: 1,
|
|
76427
76472
|
isAvailable: (items) => items.length > 0
|
|
76428
76473
|
});
|
|
76429
76474
|
registerSelectionAction({
|
|
76430
76475
|
id: "selection.sendToBack",
|
|
76431
76476
|
label: "Send to back",
|
|
76432
|
-
icon:
|
|
76477
|
+
icon: symbolIcon("SendToBack"),
|
|
76433
76478
|
description: "Moves the selection behind overlapping items.",
|
|
76434
76479
|
invoke: { kind: "selectionMethod", methodName: "sendToBack" },
|
|
76480
|
+
sectionId: "selectionArrange",
|
|
76481
|
+
order: 2,
|
|
76435
76482
|
isAvailable: (items) => items.length > 0
|
|
76436
76483
|
});
|
|
76437
76484
|
registerSelectionAction({
|
|
@@ -76439,6 +76486,8 @@ registerSelectionAction({
|
|
|
76439
76486
|
label: "Font size",
|
|
76440
76487
|
icon: styleFontSizeIcon(),
|
|
76441
76488
|
invoke: { kind: "selectionMethod", methodName: "setFontSize" },
|
|
76489
|
+
sectionId: "selectionTextSize",
|
|
76490
|
+
order: 1,
|
|
76442
76491
|
controls: [
|
|
76443
76492
|
{
|
|
76444
76493
|
id: "fontSize",
|
|
@@ -76460,10 +76509,12 @@ registerSelectionAction({
|
|
|
76460
76509
|
registerSelectionAction({
|
|
76461
76510
|
id: "selection.text.color",
|
|
76462
76511
|
label: "Text color",
|
|
76463
|
-
icon:
|
|
76512
|
+
icon: symbolIcon("TextColor", {
|
|
76464
76513
|
swatch: { kind: "selectionProperty", property: "getFontColor" }
|
|
76465
76514
|
}),
|
|
76466
76515
|
invoke: { kind: "selectionMethod", methodName: "setFontColor" },
|
|
76516
|
+
sectionId: "selectionTextColors",
|
|
76517
|
+
order: 1,
|
|
76467
76518
|
controls: [
|
|
76468
76519
|
{
|
|
76469
76520
|
id: "fontColor",
|
|
@@ -76481,11 +76532,12 @@ registerSelectionAction({
|
|
|
76481
76532
|
registerSelectionAction({
|
|
76482
76533
|
id: "selection.text.highlight",
|
|
76483
76534
|
label: "Highlight",
|
|
76484
|
-
icon: {
|
|
76485
|
-
|
|
76486
|
-
|
|
76487
|
-
},
|
|
76535
|
+
icon: symbolIcon("TextHighlight", {
|
|
76536
|
+
swatch: { kind: "selectionProperty", property: "getFontHighlight" }
|
|
76537
|
+
}),
|
|
76488
76538
|
invoke: { kind: "selectionMethod", methodName: "setFontHighlight" },
|
|
76539
|
+
sectionId: "selectionTextColors",
|
|
76540
|
+
order: 2,
|
|
76489
76541
|
controls: [
|
|
76490
76542
|
{
|
|
76491
76543
|
id: "fontHighlight",
|