@trafica/editor 1.0.29 → 1.0.31

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