@trafica/editor 1.0.29 → 1.0.30
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/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6176,8 +6176,13 @@ function Toolbar({
|
|
|
6176
6176
|
const documentHighlightColors = getDocumentMarkAttrValues(doc, "highlight", "color");
|
|
6177
6177
|
const run = (command) => command(engine);
|
|
6178
6178
|
const flatConfig = toolbarConfig ? Array.isArray(toolbarConfig[0]) ? toolbarConfig.flat() : toolbarConfig : DEFAULT_TOOLBAR;
|
|
6179
|
-
const mainItems = flatConfig.filter((id) => id !== "source");
|
|
6180
6179
|
const hasSource = flatConfig.includes("source");
|
|
6180
|
+
let mainItems = flatConfig.filter((id) => id !== "source");
|
|
6181
|
+
if (hasSource) {
|
|
6182
|
+
while (mainItems.length > 0 && mainItems[mainItems.length - 1] === "|") {
|
|
6183
|
+
mainItems = mainItems.slice(0, -1);
|
|
6184
|
+
}
|
|
6185
|
+
}
|
|
6181
6186
|
const renderItem = (id, idx) => {
|
|
6182
6187
|
if (id === "|") return /* @__PURE__ */ jsx(Divider, {}, `sep-${idx}`);
|
|
6183
6188
|
switch (id) {
|