@ones-editor/editor 2.2.25 → 2.2.27

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
@@ -5100,12 +5100,16 @@ div.editor-root div.editor-content div[data-type=editor-container] div.embed-blo
5100
5100
  border-radius: 6px;
5101
5101
  border: 1px solid #DFE1E5;
5102
5102
  padding: 10px;
5103
+ position: relative;
5103
5104
  }
5104
5105
  div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root::before {
5105
5106
  border-radius: 3px;
5106
5107
  }
5107
5108
  div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root:hover {
5108
- background-color: rgba(0, 36, 90, 0.04);
5109
+ background-color: rgb(247, 248, 250);
5110
+ }
5111
+ div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root:hover .file-actions {
5112
+ background-color: rgb(247, 248, 250);
5109
5113
  }
5110
5114
  div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root:hover .file-actions button {
5111
5115
  display: flex;
@@ -5124,13 +5128,18 @@ div.editor-root div.editor-content div[data-type=editor-container] div.embed-blo
5124
5128
  display: flex;
5125
5129
  flex-direction: row;
5126
5130
  align-items: center;
5127
- white-space: nowrap;
5128
5131
  font-size: 14px;
5129
5132
  margin-top: 2px;
5130
5133
  }
5131
5134
  div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-details .file-name-pre {
5132
- text-overflow: ellipsis;
5135
+ display: -webkit-box;
5133
5136
  overflow: hidden;
5137
+ word-break: break-all;
5138
+ -webkit-line-clamp: 1;
5139
+ -webkit-box-orient: vertical;
5140
+ }
5141
+ div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-details .file-name-suf {
5142
+ white-space: nowrap;
5134
5143
  }
5135
5144
  div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-info {
5136
5145
  display: flex;
@@ -5157,8 +5166,13 @@ div.editor-root div.editor-content div[data-type=editor-container] div.embed-blo
5157
5166
  flex-shrink: 0;
5158
5167
  }
5159
5168
  div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-actions {
5160
- align-self: center;
5169
+ position: absolute;
5170
+ top: 0;
5171
+ right: 0;
5172
+ bottom: 0;
5161
5173
  display: flex;
5174
+ align-items: center;
5175
+ justify-content: center;
5162
5176
  column-gap: 15px;
5163
5177
  margin-right: 10px;
5164
5178
  margin-left: 5px;
@@ -11585,15 +11599,16 @@ var __publicField = (obj, key, value) => {
11585
11599
  if (!isTextKindBlock(this.editor, block)) {
11586
11600
  return;
11587
11601
  }
11602
+ const eTarget = event.target;
11588
11603
  const box = getParentBox(elem);
11589
- if (box) {
11604
+ if (box && isChildNode(box, eTarget)) {
11590
11605
  const block2 = getParentBlock(box);
11591
11606
  assert(logger$4p, block2, "no parent block");
11592
11607
  (_b = (_a = this.editor.editorBoxes.getBoxClass(getBoxTypeFromElement(box))) == null ? void 0 : _a.handleClickBox) == null ? void 0 : _b.call(_a, this.editor, box, event);
11593
11608
  return;
11594
11609
  }
11595
11610
  const link2 = elem.closest("span.text.link");
11596
- if (link2) {
11611
+ if (link2 && isChildNode(link2, eTarget)) {
11597
11612
  const children = getTextBlockContentChildren(block);
11598
11613
  const index2 = children.indexOf(link2);
11599
11614
  if (index2 !== -1) {
@@ -66443,7 +66458,7 @@ ${codeText}
66443
66458
  if ((dragObject == null ? void 0 : dragObject.type) === "block") {
66444
66459
  return void 0;
66445
66460
  }
66446
- if (images.length >= 6 || images.length === 1) {
66461
+ if (images.length >= 6) {
66447
66462
  if ((dragObject == null ? void 0 : dragObject.blockId) !== getBlockId(block)) {
66448
66463
  return void 0;
66449
66464
  }
@@ -76843,10 +76858,11 @@ ${content}
76843
76858
  const nameElement = createElement("div", ["file-name"], detail);
76844
76859
  if (afterIndex > 0) {
76845
76860
  createElement("span", ["file-name-pre"], nameElement, fileName.slice(0, afterIndex));
76846
- createElement("span", [], nameElement, fileName.slice(afterIndex));
76861
+ createElement("span", ["file-name-suf"], nameElement, fileName.slice(afterIndex));
76847
76862
  } else {
76848
76863
  nameElement.textContent = fileName;
76849
76864
  }
76865
+ nameElement.title = fileName;
76850
76866
  const infos = createElement("div", ["file-info"], detail);
76851
76867
  if (creator) {
76852
76868
  createElement("div", ["file-creator"], infos, creator);
@@ -83532,6 +83548,15 @@ ${content}
83532
83548
  if (getContainerId(editor.getParentContainer(target)) !== "root") {
83533
83549
  return void 0;
83534
83550
  }
83551
+ const sourceType = getBlockType(source);
83552
+ const targetType = getBlockType(target);
83553
+ if (sourceType === targetType && sourceType === "embed") {
83554
+ const sourceEmbed = getEmbedType(source);
83555
+ const targetEmbed = getEmbedType(target);
83556
+ if (sourceEmbed === targetEmbed && sourceEmbed === "image") {
83557
+ return void 0;
83558
+ }
83559
+ }
83535
83560
  if (getBlockType(source) === LAYOUT_BLOCK_TYPE || getBlockType(target) === LAYOUT_BLOCK_TYPE) {
83536
83561
  return void 0;
83537
83562
  }
@@ -88643,7 +88668,7 @@ ${data2.flowchartText}
88643
88668
  }
88644
88669
  }
88645
88670
  });
88646
- editor.version = "2.2.25";
88671
+ editor.version = "2.2.27";
88647
88672
  return editor;
88648
88673
  }
88649
88674
  function isDoc(doc2) {
@@ -88738,7 +88763,7 @@ ${data2.flowchartText}
88738
88763
  });
88739
88764
  editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
88740
88765
  OnesEditorToolbar.register(editor);
88741
- editor.version = "2.2.25";
88766
+ editor.version = "2.2.27";
88742
88767
  return editor;
88743
88768
  }
88744
88769
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.2.25",
3
+ "version": "2.2.27",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",