@ones-editor/editor 2.4.0 → 2.4.1
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/@ones-editor/comments/src/index.d.ts +1 -0
- package/@ones-editor/file/src/file-embed/card/index.d.ts +1 -0
- package/@ones-editor/file/src/locale/en-us.d.ts +2 -0
- package/@ones-editor/file/src/locale/ja-jp.d.ts +2 -0
- package/@ones-editor/file/src/locale/zh-cn.d.ts +2 -0
- package/@ones-editor/file/src/types.d.ts +4 -1
- package/@ones-editor/media-embed/src/core/media.d.ts +1 -0
- package/@ones-editor/media-embed/src/types.d.ts +2 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +223 -109
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4504,7 +4504,7 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] div[
|
|
|
4504
4504
|
position: absolute;
|
|
4505
4505
|
top: 0;
|
|
4506
4506
|
left: 50%;
|
|
4507
|
-
margin-left: -
|
|
4507
|
+
margin-left: -30px;
|
|
4508
4508
|
transition: top 0.2s cubic-bezier(0.65, 0.05, 0.36, 1);
|
|
4509
4509
|
}
|
|
4510
4510
|
:is(.editor-web-comment-root, .editor-mobile-comments-root, .editor-mini-comment-root).hidden {
|
|
@@ -5392,74 +5392,119 @@ div.editor-root div.editor-content div[data-type=editor-container] div[data-type
|
|
|
5392
5392
|
justify-content: start;
|
|
5393
5393
|
}
|
|
5394
5394
|
div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office].hover [data-type=block-content] {
|
|
5395
|
-
border-radius:
|
|
5395
|
+
border-radius: 6px;
|
|
5396
5396
|
}
|
|
5397
5397
|
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] {
|
|
5398
|
-
max-width:
|
|
5399
|
-
height: 48px;
|
|
5398
|
+
max-width: 100%;
|
|
5400
5399
|
cursor: pointer;
|
|
5401
5400
|
}
|
|
5402
5401
|
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 {
|
|
5403
5402
|
display: flex;
|
|
5404
|
-
align-items:
|
|
5405
|
-
|
|
5406
|
-
background-color: #
|
|
5407
|
-
border-radius:
|
|
5403
|
+
align-items: flex-start;
|
|
5404
|
+
width: 100%;
|
|
5405
|
+
background-color: #ffffff;
|
|
5406
|
+
border-radius: 6px;
|
|
5407
|
+
border: 1px solid #DFE1E5;
|
|
5408
|
+
padding: 10px;
|
|
5408
5409
|
}
|
|
5409
5410
|
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 {
|
|
5410
5411
|
border-radius: 3px;
|
|
5411
5412
|
}
|
|
5413
|
+
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 {
|
|
5414
|
+
background-color: rgba(0, 36, 90, 0.04);
|
|
5415
|
+
}
|
|
5416
|
+
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 {
|
|
5417
|
+
display: flex;
|
|
5418
|
+
}
|
|
5412
5419
|
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 {
|
|
5413
5420
|
display: flex;
|
|
5414
5421
|
flex-direction: column;
|
|
5415
5422
|
justify-content: center;
|
|
5416
5423
|
font-size: 14px;
|
|
5417
|
-
flex
|
|
5424
|
+
flex: 1;
|
|
5425
|
+
min-width: 0;
|
|
5418
5426
|
}
|
|
5419
5427
|
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 {
|
|
5420
|
-
color: #
|
|
5421
|
-
max-width:
|
|
5428
|
+
color: #2D2D2E;
|
|
5429
|
+
max-width: 100%;
|
|
5422
5430
|
display: flex;
|
|
5423
5431
|
flex-direction: row;
|
|
5424
5432
|
align-items: center;
|
|
5425
5433
|
white-space: nowrap;
|
|
5426
|
-
|
|
5427
|
-
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-size {
|
|
5428
|
-
color: #646a73;
|
|
5429
|
-
font-size: 12px;
|
|
5434
|
+
font-size: 14px;
|
|
5430
5435
|
margin-top: 2px;
|
|
5431
5436
|
}
|
|
5432
5437
|
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 {
|
|
5433
5438
|
text-overflow: ellipsis;
|
|
5434
5439
|
overflow: hidden;
|
|
5435
5440
|
}
|
|
5441
|
+
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 {
|
|
5442
|
+
display: flex;
|
|
5443
|
+
flex-direction: row;
|
|
5444
|
+
align-items: center;
|
|
5445
|
+
margin-top: 5px;
|
|
5446
|
+
color: #87888A;
|
|
5447
|
+
font-size: 12px;
|
|
5448
|
+
}
|
|
5449
|
+
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 .file-creator {
|
|
5450
|
+
max-width: 80px;
|
|
5451
|
+
white-space: nowrap;
|
|
5452
|
+
overflow: hidden;
|
|
5453
|
+
text-overflow: ellipsis;
|
|
5454
|
+
}
|
|
5455
|
+
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 .uploaded-time {
|
|
5456
|
+
margin-left: 5px;
|
|
5457
|
+
white-space: nowrap;
|
|
5458
|
+
overflow: hidden;
|
|
5459
|
+
text-overflow: ellipsis;
|
|
5460
|
+
}
|
|
5461
|
+
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 .file-size {
|
|
5462
|
+
margin-left: 15px;
|
|
5463
|
+
flex-shrink: 0;
|
|
5464
|
+
}
|
|
5465
|
+
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 {
|
|
5466
|
+
align-self: center;
|
|
5467
|
+
display: flex;
|
|
5468
|
+
column-gap: 15px;
|
|
5469
|
+
margin-right: 10px;
|
|
5470
|
+
margin-left: 5px;
|
|
5471
|
+
}
|
|
5436
5472
|
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 button {
|
|
5437
|
-
width: 34px;
|
|
5438
|
-
height: 34px;
|
|
5439
|
-
background-color: #ffffff;
|
|
5440
|
-
border: 1px solid #dee0e3;
|
|
5441
|
-
border-radius: 50%;
|
|
5442
|
-
margin: 0 8px;
|
|
5443
5473
|
padding: 0;
|
|
5444
|
-
|
|
5445
|
-
background-
|
|
5474
|
+
border: 0;
|
|
5475
|
+
background-color: transparent;
|
|
5446
5476
|
cursor: pointer;
|
|
5447
5477
|
display: flex;
|
|
5448
5478
|
align-items: center;
|
|
5449
5479
|
justify-content: center;
|
|
5450
5480
|
flex-shrink: 0;
|
|
5481
|
+
color: #2D2D2E;
|
|
5482
|
+
display: none;
|
|
5483
|
+
font-size: 14px;
|
|
5451
5484
|
}
|
|
5452
5485
|
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 button svg {
|
|
5453
5486
|
width: 16px;
|
|
5454
5487
|
height: 16px;
|
|
5488
|
+
margin-right: 5px;
|
|
5489
|
+
color: inherit;
|
|
5490
|
+
}
|
|
5491
|
+
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 button:hover {
|
|
5492
|
+
color: #0064FF;
|
|
5493
|
+
}
|
|
5494
|
+
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 button:hover svg {
|
|
5495
|
+
color: #0064FF;
|
|
5496
|
+
}
|
|
5497
|
+
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 button.disabled {
|
|
5498
|
+
cursor: not-allowed;
|
|
5499
|
+
opacity: 0.5;
|
|
5500
|
+
color: #2D2D2E;
|
|
5455
5501
|
}
|
|
5456
5502
|
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-icon {
|
|
5457
5503
|
display: flex;
|
|
5458
5504
|
flex-direction: row;
|
|
5459
5505
|
align-items: center;
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
margin: 6px 6px 6px 12px;
|
|
5506
|
+
margin-right: 10px;
|
|
5507
|
+
transform: translateY(3px);
|
|
5463
5508
|
}
|
|
5464
5509
|
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-icon > svg {
|
|
5465
5510
|
width: 24px;
|
|
@@ -8548,6 +8593,13 @@ div.editor-root div.editor-content div[data-type=editor-container].root.select-a
|
|
|
8548
8593
|
}
|
|
8549
8594
|
.video-tooltip-align-style-section .style-icon.active {
|
|
8550
8595
|
color: blue;
|
|
8596
|
+
}.editor-command-bar-root .editor-command-bar .command-item .ask-ai {
|
|
8597
|
+
display: flex;
|
|
8598
|
+
align-items: center;
|
|
8599
|
+
}
|
|
8600
|
+
.editor-command-bar-root .editor-command-bar .command-item .ask-ai .button-text {
|
|
8601
|
+
margin-left: 5px;
|
|
8602
|
+
margin-right: 5px;
|
|
8551
8603
|
}div.editor-root.compact div.editor-content div[data-type=editor-container].root > .container-blocks > * + * {
|
|
8552
8604
|
margin: 0.2em 0;
|
|
8553
8605
|
}
|
|
@@ -49297,8 +49349,23 @@ ${codeText}
|
|
|
49297
49349
|
}
|
|
49298
49350
|
}
|
|
49299
49351
|
}
|
|
49352
|
+
function getBlockAllItemIds(commands) {
|
|
49353
|
+
const result2 = [];
|
|
49354
|
+
function recurse(items) {
|
|
49355
|
+
items.forEach((command) => {
|
|
49356
|
+
var _a;
|
|
49357
|
+
result2.push(command.id);
|
|
49358
|
+
if ((_a = command.children) == null ? void 0 : _a.length) {
|
|
49359
|
+
recurse(command.children);
|
|
49360
|
+
}
|
|
49361
|
+
});
|
|
49362
|
+
}
|
|
49363
|
+
recurse(commands);
|
|
49364
|
+
return result2;
|
|
49365
|
+
}
|
|
49300
49366
|
for (let i = 0; i < blockCommands.length; i++) {
|
|
49301
|
-
|
|
49367
|
+
const commandIds = getBlockAllItemIds(blockCommands[i].commands);
|
|
49368
|
+
if (commandIds.find((id) => id === item.id)) {
|
|
49302
49369
|
blockCommands[i].executeCommand(editor, block, item, child);
|
|
49303
49370
|
return;
|
|
49304
49371
|
}
|
|
@@ -50322,13 +50389,13 @@ ${codeText}
|
|
|
50322
50389
|
mm.setData(root2);
|
|
50323
50390
|
mm.fit();
|
|
50324
50391
|
const tools = getBlockTools(rootBlock);
|
|
50325
|
-
let
|
|
50326
|
-
if (!
|
|
50327
|
-
|
|
50392
|
+
let toolbar2 = tools.querySelector(".mindmap-toolbar");
|
|
50393
|
+
if (!toolbar2) {
|
|
50394
|
+
toolbar2 = createElement("div", ["mindmap-toolbar"], tools);
|
|
50328
50395
|
}
|
|
50329
|
-
createFitButton(editor,
|
|
50330
|
-
createFullscreenButton(editor,
|
|
50331
|
-
createCloseButton(editor,
|
|
50396
|
+
createFitButton(editor, toolbar2, firstBlock, options.mindmapTools);
|
|
50397
|
+
createFullscreenButton(editor, toolbar2, firstBlock, options.mindmapTools);
|
|
50398
|
+
createCloseButton(editor, toolbar2, firstBlock, options.mindmapTools);
|
|
50332
50399
|
editor.domEvents.addEventListener(svg, "click", () => {
|
|
50333
50400
|
editor.selection.selectBlock(rootBlock, 0);
|
|
50334
50401
|
editor.input.focus();
|
|
@@ -52585,11 +52652,11 @@ ${codeText}
|
|
|
52585
52652
|
linkEditor.editLink(mergedOptions);
|
|
52586
52653
|
}
|
|
52587
52654
|
const hideToolbar$1 = (editor) => {
|
|
52588
|
-
const
|
|
52589
|
-
|
|
52590
|
-
|
|
52655
|
+
const toolbar2 = editor.findCustom("toolbar-handler");
|
|
52656
|
+
toolbar2 == null ? void 0 : toolbar2.disableTextToolbar();
|
|
52657
|
+
toolbar2 == null ? void 0 : toolbar2.hide();
|
|
52591
52658
|
setTimeout(() => {
|
|
52592
|
-
|
|
52659
|
+
toolbar2 == null ? void 0 : toolbar2.enableTextToolbar();
|
|
52593
52660
|
}, 300);
|
|
52594
52661
|
};
|
|
52595
52662
|
const logger$1_ = getLogger("inline-box-items");
|
|
@@ -52990,14 +53057,14 @@ ${codeText}
|
|
|
52990
53057
|
__publicField(this, "provider", new EditLinkProvider());
|
|
52991
53058
|
__publicField(this, "clipboardProvider");
|
|
52992
53059
|
__publicField(this, "executeCommand", (editor, block, item, child) => {
|
|
52993
|
-
const
|
|
52994
|
-
|
|
52995
|
-
|
|
53060
|
+
const toolbar2 = getToolbar(this.editor);
|
|
53061
|
+
toolbar2 == null ? void 0 : toolbar2.disableTextToolbar();
|
|
53062
|
+
toolbar2 == null ? void 0 : toolbar2.hide();
|
|
52996
53063
|
if (!child) {
|
|
52997
53064
|
return;
|
|
52998
53065
|
}
|
|
52999
53066
|
setTimeout(() => {
|
|
53000
|
-
|
|
53067
|
+
toolbar2 == null ? void 0 : toolbar2.enableTextToolbar();
|
|
53001
53068
|
}, 400);
|
|
53002
53069
|
this.provider.executeCommand(editor, block, editor.selection.range, item, { child });
|
|
53003
53070
|
const { start, end } = getChildOffset(block, child);
|
|
@@ -53181,7 +53248,7 @@ ${codeText}
|
|
|
53181
53248
|
__publicField(this, "hoveringTextChild", null);
|
|
53182
53249
|
__publicField(this, "oldRange", null);
|
|
53183
53250
|
__publicField(this, "providers", []);
|
|
53184
|
-
__publicField(this, "handleButtonClick", (
|
|
53251
|
+
__publicField(this, "handleButtonClick", (toolbar2, item) => {
|
|
53185
53252
|
const tooltip = this.editor.getCustom("editor-tooltip");
|
|
53186
53253
|
tooltip.lastClickButtonId = item.id;
|
|
53187
53254
|
const commandProvider = item.commandProvider;
|
|
@@ -53339,8 +53406,8 @@ ${codeText}
|
|
|
53339
53406
|
document.removeEventListener("mousedown", this.handleDocumentMouseDown);
|
|
53340
53407
|
}
|
|
53341
53408
|
hideToolbar(editor) {
|
|
53342
|
-
const
|
|
53343
|
-
|
|
53409
|
+
const toolbar2 = editor.findCustom("toolbar-handler");
|
|
53410
|
+
toolbar2 == null ? void 0 : toolbar2.hide();
|
|
53344
53411
|
}
|
|
53345
53412
|
showTextToolbar(reason) {
|
|
53346
53413
|
var _a, _b;
|
|
@@ -53417,7 +53484,7 @@ ${codeText}
|
|
|
53417
53484
|
__publicField(this, "_lastClickTime", 0);
|
|
53418
53485
|
__publicField(this, "_disabled", false);
|
|
53419
53486
|
__publicField(this, "isInToolbar", (event) => this.toolbar.isInCommandBar(event.target));
|
|
53420
|
-
__publicField(this, "handleButtonClick", (
|
|
53487
|
+
__publicField(this, "handleButtonClick", (toolbar2, item) => {
|
|
53421
53488
|
const tooltip = this.editor.findCustom("editor-tooltip");
|
|
53422
53489
|
if (tooltip) {
|
|
53423
53490
|
tooltip.lastClickButtonId = item.id;
|
|
@@ -69998,11 +70065,11 @@ ${codeText}
|
|
|
69998
70065
|
}];
|
|
69999
70066
|
}
|
|
70000
70067
|
hideToolbar(editor) {
|
|
70001
|
-
const
|
|
70002
|
-
|
|
70003
|
-
|
|
70068
|
+
const toolbar2 = editor.findCustom("toolbar-handler");
|
|
70069
|
+
toolbar2 == null ? void 0 : toolbar2.disableTextToolbar();
|
|
70070
|
+
toolbar2 == null ? void 0 : toolbar2.hide();
|
|
70004
70071
|
setTimeout(() => {
|
|
70005
|
-
|
|
70072
|
+
toolbar2 == null ? void 0 : toolbar2.enableTextToolbar();
|
|
70006
70073
|
}, 300);
|
|
70007
70074
|
}
|
|
70008
70075
|
executeRangeCommand(editor, range, command, params, result) {
|
|
@@ -70554,11 +70621,11 @@ ${codeText}
|
|
|
70554
70621
|
}
|
|
70555
70622
|
}
|
|
70556
70623
|
hideToolbar(editor) {
|
|
70557
|
-
const
|
|
70558
|
-
|
|
70559
|
-
|
|
70624
|
+
const toolbar2 = editor.findCustom("toolbar-handler");
|
|
70625
|
+
toolbar2 == null ? void 0 : toolbar2.disableTextToolbar();
|
|
70626
|
+
toolbar2 == null ? void 0 : toolbar2.hide();
|
|
70560
70627
|
setTimeout(() => {
|
|
70561
|
-
|
|
70628
|
+
toolbar2 == null ? void 0 : toolbar2.enableTextToolbar();
|
|
70562
70629
|
}, 300);
|
|
70563
70630
|
}
|
|
70564
70631
|
commands(editor, blockElement, child) {
|
|
@@ -70669,8 +70736,8 @@ ${codeText}
|
|
|
70669
70736
|
}
|
|
70670
70737
|
}
|
|
70671
70738
|
function closeToolbar(editor) {
|
|
70672
|
-
const
|
|
70673
|
-
|
|
70739
|
+
const toolbar2 = getToolbar(editor);
|
|
70740
|
+
toolbar2 == null ? void 0 : toolbar2.hide();
|
|
70674
70741
|
const rowColumnToolbar = editor.findCustom("table-border-bar");
|
|
70675
70742
|
rowColumnToolbar == null ? void 0 : rowColumnToolbar.closeToolbar();
|
|
70676
70743
|
}
|
|
@@ -78071,11 +78138,11 @@ ${docStr}
|
|
|
78071
78138
|
"ja-JP": jaJP$g
|
|
78072
78139
|
});
|
|
78073
78140
|
function hideToolbar(editor) {
|
|
78074
|
-
const
|
|
78075
|
-
|
|
78076
|
-
|
|
78141
|
+
const toolbar2 = editor.findCustom("toolbar-handler");
|
|
78142
|
+
toolbar2 == null ? void 0 : toolbar2.disableTextToolbar();
|
|
78143
|
+
toolbar2 == null ? void 0 : toolbar2.hide();
|
|
78077
78144
|
setTimeout(() => {
|
|
78078
|
-
|
|
78145
|
+
toolbar2 == null ? void 0 : toolbar2.enableTextToolbar();
|
|
78079
78146
|
}, 300);
|
|
78080
78147
|
}
|
|
78081
78148
|
function undoHandler(editor) {
|
|
@@ -78100,7 +78167,7 @@ ${docStr}
|
|
|
78100
78167
|
return FilePreviewType2;
|
|
78101
78168
|
})(FilePreviewType || {});
|
|
78102
78169
|
const AttachIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.49669 1C4.80282 1 3.0118 2.3515 3.0118 3.76237L3 10.6206M6.49669 1C8.41943 1 10.0154 2.60058 10.0154 4.17342M6.49669 1C7.43289 1 8.28684 1.42118 8.90405 1.96796C9.50746 2.50252 10.0154 3.29036 10.0154 4.17342M10.0154 4.17342L10.0154 9.61446C10.0154 10.4166 9.23033 11.2316 8 11.2316C6.91283 11.2316 6.01026 10.5735 6.01026 9.87981L5.98457 5.04102M3 10.6206C3 13.1126 5.38055 15 8 15M3 10.6206C3 12.9301 5.13252 15 8 15M8 15C10.6194 15 13 13.1988 13 10.7068M8 15C10.8675 15 13 13.0162 13 10.7068M13 10.7068V5.04102" stroke="currentColor" stroke-linecap="square" stroke-linejoin="round"/>\n<path d="M13 4V10C13 12.7614 10.7614 15 8 15C5.23858 15 3 12.7614 3 10V4.5" stroke="currentColor"/>\n<path d="M10 9V4.5C10 2.567 8.433 1 6.5 1C4.567 1 3 2.567 3 4.5" stroke="currentColor"/>\n<path d="M10 9C10 10.1046 9.10457 11 8 11C6.89543 11 6 10.1046 6 9V4" stroke="currentColor"/>\n</svg>';
|
|
78103
|
-
const DownloadIcon = '<svg width="16" height="16" viewBox="0 0 16 16"
|
|
78170
|
+
const DownloadIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" >\n <path stroke="currentColor" d="M2 9.943v4a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-4" />\n <path stroke="currentColor" d="M4.015 6.46 8 10.445l3.983-3.985M8 10.445V1" />\n <path stroke="currentColor" d="M2 9.943v4a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-4" />\n <path stroke="currentColor" d="M4.015 6.46 8 10.445l3.983-3.985M8 10.445V1" />\n</svg>';
|
|
78104
78171
|
const ToLinkIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect x="0.5" y="5.5" width="5" height="5" rx="1" stroke="currentColor"/>\n<path d="M0 2.5L16 2.5" stroke="currentColor"/>\n<path d="M0 13.5L16 13.5" stroke="currentColor"/>\n<path d="M8 8L16 8" stroke="currentColor"/>\n</svg>\n';
|
|
78105
78172
|
const ToCardIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect x="0.5" y="5.5" width="15" height="5" rx="1" stroke="currentColor"/>\n<path d="M0 2.5L16 2.5" stroke="currentColor"/>\n<path d="M0 13.5L16 13.5" stroke="currentColor"/>\n</svg>\n';
|
|
78106
78173
|
const fileBoxStyle = "";
|
|
@@ -78200,7 +78267,9 @@ ${docStr}
|
|
|
78200
78267
|
previewType: FilePreviewType.Card,
|
|
78201
78268
|
fileName: boxData.fileName,
|
|
78202
78269
|
fileSize: boxData.fileSize,
|
|
78203
|
-
fileType: boxData.fileType
|
|
78270
|
+
fileType: boxData.fileType,
|
|
78271
|
+
created: boxData.created,
|
|
78272
|
+
creator: boxData.creator
|
|
78204
78273
|
};
|
|
78205
78274
|
if (offset.start === 0) {
|
|
78206
78275
|
if (getBlockTextLength$6(editor, block) === 1) {
|
|
@@ -78298,17 +78367,18 @@ ${docStr}
|
|
|
78298
78367
|
toStandardText,
|
|
78299
78368
|
getResources: getResources$1
|
|
78300
78369
|
};
|
|
78370
|
+
const CopilotIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <defs>\n <linearGradient id="uniqueGradient" x1="14.9227" y1="7.96133" x2="0.999999" y2="7.96133" gradientUnits="userSpaceOnUse">\n <stop stop-color="#01CC77"/>\n <stop offset="0.997672" stop-color="#20D1F4"/>\n </linearGradient>\n </defs>\n <path d="M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM4.5 8C4.5 9.933 6.067 11.5 8 11.5C9.933 11.5 11.5 9.933 11.5 8C11.5 6.067 9.933 4.5 8 4.5C6.067 4.5 4.5 6.067 4.5 8Z" fill="url(#uniqueGradient)"/>\n</svg>\n';
|
|
78301
78371
|
const DwgFileIcon = '<svg width="48" height="48" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 1C13.5 2.5 14 3 16 5V15.6087C16 15.7914 15.9638 15.9723 15.8934 16.1411C15.8231 16.3099 15.7199 16.4633 15.5899 16.5925C15.4599 16.7217 15.3056 16.8242 15.1358 16.8941C14.9659 16.964 14.7838 17 14.6 17H3.4C3.21615 17 3.0341 16.964 2.86424 16.8941C2.69439 16.8242 2.54005 16.7217 2.41005 16.5925C2.28005 16.4633 2.17693 16.3099 2.10657 16.1411C2.03621 15.9723 2 15.7914 2 15.6087V2.3913C2 2.2086 2.03621 2.02768 2.10657 1.85888C2.17693 1.69007 2.28005 1.5367 2.41005 1.4075C2.54005 1.27831 2.69439 1.17583 2.86424 1.10591C3.0341 1.03599 3.21615 1 3.4 1H12Z" fill="#FFBE5A"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 7.5V11.1H8.7C9.69411 11.1 10.5 10.2941 10.5 9.3C10.5 8.30589 9.69411 7.5 8.7 7.5H7.5ZM7 6C6.44772 6 6 6.44771 6 7V11.6C6 12.1523 6.44772 12.6 7 12.6H8.7C10.5225 12.6 12 11.1225 12 9.3C12 7.47746 10.5225 6 8.7 6H7Z" fill="white"/>\n<path d="M12 1L14 3L16 5H13.3333C12.9797 5 12.6406 4.84675 12.3905 4.57397C12.1405 4.30119 12 3.93122 12 3.54546V1Z" fill="#FFD89C"/>\n</svg>';
|
|
78302
78372
|
const RvtFileIcon = '<svg width="48" height="48" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 1C13.5 2.5 14 3 16 5V15.6087C16 15.7914 15.9638 15.9723 15.8934 16.1411C15.8231 16.3099 15.7199 16.4633 15.5899 16.5925C15.4599 16.7217 15.3056 16.8242 15.1358 16.8941C14.9659 16.964 14.7838 17 14.6 17H3.4C3.21615 17 3.0341 16.964 2.86424 16.8941C2.69439 16.8242 2.54005 16.7217 2.41005 16.5925C2.28005 16.4633 2.17693 16.3099 2.10657 16.1411C2.03621 15.9723 2 15.7914 2 15.6087V2.3913C2 2.2086 2.03621 2.02768 2.10657 1.85888C2.17693 1.69007 2.28005 1.5367 2.41005 1.4075C2.54005 1.27831 2.69439 1.17583 2.86424 1.10591C3.0341 1.03599 3.21615 1 3.4 1H12Z" fill="#6B77F3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 6.90039V8.70039H9.6C10.0971 8.70039 10.5 8.29745 10.5 7.80039C10.5 7.30333 10.0971 6.90039 9.6 6.90039H7.5ZM7 5.40039C6.44772 5.40039 6 5.84811 6 6.40039V7.0504V9.20039V12.1504C6 12.3989 6.20147 12.6004 6.45 12.6004C6.69853 12.6004 6.9 12.3989 6.9 12.1504V10.1955C6.93289 10.1987 6.96625 10.2004 7 10.2004H9.6C9.6944 10.2004 9.78753 10.1949 9.87909 10.1843L11.1521 12.3892C11.2764 12.6045 11.5516 12.6782 11.7668 12.554C11.982 12.4297 12.0558 12.1545 11.9315 11.9392L10.7564 9.90392C11.4977 9.4955 12 8.7066 12 7.80039C12 6.47491 10.9255 5.40039 9.6 5.40039H7Z" fill="white"/>\n<path d="M12 1L14 3L16 5H13.3333C12.9797 5 12.6406 4.84675 12.3905 4.57397C12.1405 4.30119 12 3.93122 12 3.54546V1Z" fill="#B5BBF9"/>\n</svg>';
|
|
78303
78373
|
const SkpFileIcon = '<svg width="48" height="48" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 1C13.5 2.5 14 3 16 5V15.6087C16 15.7914 15.9638 15.9723 15.8934 16.1411C15.8231 16.3099 15.72 16.4633 15.5899 16.5925C15.4599 16.7217 15.3056 16.8242 15.1358 16.8941C14.9659 16.964 14.7838 17 14.6 17H3.4C3.21615 17 3.0341 16.964 2.86424 16.8941C2.69439 16.8242 2.54005 16.7217 2.41005 16.5925C2.28005 16.4633 2.17693 16.3099 2.10657 16.1411C2.03621 15.9723 2 15.7914 2 15.6087V2.3913C2 2.2086 2.03621 2.02768 2.10657 1.85888C2.17693 1.69007 2.28005 1.5367 2.41005 1.4075C2.54005 1.27831 2.69439 1.17583 2.86424 1.10591C3.0341 1.03599 3.21615 1 3.4 1H12Z" fill="#9773E3"/>\n<path d="M12 1L14 3L16 5H13.3333C12.9797 5 12.6406 4.84675 12.3905 4.57397C12.1405 4.30119 12 3.93122 12 3.54546V1Z" fill="#D8CAF4"/>\n<path d="M10.6499 6.375H8.21241C7.48753 6.375 6.8999 6.96263 6.8999 7.68751V7.68751C6.8999 8.41239 7.48753 9.00001 8.21241 9.00001H9.79277" stroke="white" stroke-width="1.2" stroke-linecap="round"/>\n<path d="M7.27488 11.025C6.94351 11.025 6.67488 11.2936 6.67488 11.625C6.67488 11.9564 6.94351 12.225 7.27488 12.225V11.025ZM9.71239 11.025H7.27488V12.225H9.71239V11.025ZM8.39989 9.59999H9.7124V8.39999H8.39989V9.59999ZM9.7124 9.59999C10.1059 9.59999 10.4249 9.91899 10.4249 10.3125H11.6249C11.6249 9.25624 10.7686 8.39999 9.7124 8.39999V9.59999ZM9.71239 12.225C10.7686 12.225 11.6249 11.3687 11.6249 10.3125H10.4249C10.4249 10.706 10.1059 11.025 9.71239 11.025V12.225Z" fill="white"/>\n</svg>';
|
|
78304
|
-
const ImgFileIcon = '<svg width="
|
|
78305
|
-
const TxtFileIcon = '<svg width="
|
|
78306
|
-
const ZipFileIcon = '<svg width="
|
|
78307
|
-
const PptFileIcon = '<svg width="
|
|
78308
|
-
const ExcelFileIcon = '<svg
|
|
78309
|
-
const PdfFileIcon = '<svg width="
|
|
78310
|
-
const WordFileIcon = '<svg width="
|
|
78311
|
-
const UnknownFileIcon = '<svg width="
|
|
78374
|
+
const ImgFileIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#E4D7FC" d="M2 2v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5.414a1 1 0 0 0-.293-.707l-3.414-3.414A1 1 0 0 0 9.586 1H3a1 1 0 0 0-1 1Z"></path><path fill="#8851ED" fill-rule="evenodd" d="M5 6.5a.5.5 0 0 0-.5.5v2.711a.1.1 0 0 0 .164.077l.825-.688a.75.75 0 0 1 1.01.046l1.388 1.387a.25.25 0 0 0 .315.032l.902-.602a.75.75 0 0 1 .788-.027l1.458.833a.1.1 0 0 0 .15-.086V7a.5.5 0 0 0-.5-.5H5Zm5 1.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z" clip-rule="evenodd"></path><path fill="#8851ED" d="M11.5 11.489a.1.1 0 0 0-.05-.087L9.644 10.37a.25.25 0 0 0-.262.01l-.902.6a.75.75 0 0 1-.947-.093L6.146 9.5a.25.25 0 0 0-.337-.016l-1.273 1.061a.1.1 0 0 0-.036.077V12a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 .5-.5v-.511Z"></path></svg>\n';
|
|
78375
|
+
const TxtFileIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#FEE4BC" d="M2 2v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5.414a1 1 0 0 0-.293-.707l-3.414-3.414A1 1 0 0 0 9.586 1H3a1 1 0 0 0-1 1Z"></path><path fill="#F59300" fill-rule="evenodd" d="M4.5 7.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1v-4Zm1.125 1c0-.207.168-.375.375-.375h4a.375.375 0 0 1 0 .75H6a.375.375 0 0 1-.375-.375ZM6 10.125a.375.375 0 0 0 0 .75h2.5a.375.375 0 0 0 0-.75H6Z" clip-rule="evenodd"></path></svg>\n';
|
|
78376
|
+
const ZipFileIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#FEE4BC" d="M2 2v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5.414a1 1 0 0 0-.293-.707l-3.414-3.414A1 1 0 0 0 9.586 1H3a1 1 0 0 0-1 1Z"></path><path fill="#F59300" d="M5.5 6.5h2.025a.1.1 0 0 1 .1.1v1.425a.1.1 0 0 1-.1.1H7a.375.375 0 0 0-.375.375v2c0 .207.168.375.375.375h2a.375.375 0 0 0 .375-.375v-2A.375.375 0 0 0 9 8.125h-.525a.1.1 0 0 1-.1-.1V6.6a.1.1 0 0 1 .1-.1H10.5a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1Z"></path><path fill="#F59300" d="M7.475 10.125a.1.1 0 0 1-.1-.1v-1.05a.1.1 0 0 1 .1-.1h1.05a.1.1 0 0 1 .1.1v1.05a.1.1 0 0 1-.1.1h-1.05Z"></path></svg>';
|
|
78377
|
+
const PptFileIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#FDDCD8" d="M2 2v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5.414a1 1 0 0 0-.293-.707l-3.414-3.414A1 1 0 0 0 9.586 1H3a1 1 0 0 0-1 1Z"></path><path fill="#E83723" d="M11.434 9.138c.102 0 .187-.08.187-.181A2.957 2.957 0 0 0 8.664 6c-.243 0-.423.21-.423.454v2.184a.5.5 0 0 0 .5.5h2.693Z"></path><path fill="#E83723" d="M6.838 7.128c.273-.046.498.182.498.458v1.957a.5.5 0 0 0 .5.5h1.957c.276 0 .505.226.458.498a2.958 2.958 0 1 1-3.413-3.413Z"></path></svg>';
|
|
78378
|
+
const ExcelFileIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" >\n<path fill="#B9F0D9" d="M2 2v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5.414a1 1 0 0 0-.293-.707l-3.414-3.414A1 1 0 0 0 9.586 1H3a1 1 0 0 0-1 1Z"></path><path fill="#00A865" fill-rule="evenodd" d="M4.125 7c0-.483.392-.875.875-.875h6c.483 0 .875.392.875.875v5a.875.875 0 0 1-.875.875H5A.875.875 0 0 1 4.125 12V7Zm3.75 5.125H11a.125.125 0 0 0 .125-.125V9.375h-3.25v2.75Zm-.75-2.75v2.75H5A.125.125 0 0 1 4.875 12V9.375h2.25Zm.75-.75h3.25V7A.125.125 0 0 0 11 6.875H7.875v1.75Zm-.75-1.75v1.75h-2.25V7c0-.069.056-.125.125-.125h2.125Z" clip-rule="evenodd"></path></svg>';
|
|
78379
|
+
const PdfFileIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" ><path fill="#FDDCD8" d="M2 2v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5.414a1 1 0 0 0-.293-.707l-3.414-3.414A1 1 0 0 0 9.586 1H3a1 1 0 0 0-1 1Z"></path><path fill="#E83723" d="M3.5 11.316V8h1.356c.243 0 .458.04.644.12.19.08.338.199.446.356.107.157.161.352.161.583a.973.973 0 0 1-.611.935c-.187.08-.4.12-.64.12h-.621v1.202H3.5Zm.735-1.803h.625a.59.59 0 0 0 .27-.058.423.423 0 0 0 .176-.16.424.424 0 0 0 .066-.236.432.432 0 0 0-.066-.24.423.423 0 0 0-.175-.16.59.59 0 0 0-.27-.058h-.626v.912ZM6.578 11.316V8H7.73c.383 0 .714.071.996.214.28.142.499.338.654.587.155.25.232.534.232.855 0 .32-.077.606-.232.859-.155.249-.373.445-.654.587a2.178 2.178 0 0 1-.996.214H6.578Zm.735-.601h.436c.23 0 .43-.043.597-.13a.961.961 0 0 0 .39-.369 1.08 1.08 0 0 0 .141-.56c0-.217-.047-.404-.142-.561a.932.932 0 0 0-.389-.365 1.292 1.292 0 0 0-.597-.13h-.436v2.115ZM10.082 11.316V8H12.5v.6h-1.683v.842h1.446v.6h-1.446v1.274h-.735Z"></path></svg>';
|
|
78380
|
+
const WordFileIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#CFE2FF" d="M2 2v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5.414a1 1 0 0 0-.293-.707l-3.414-3.414A1 1 0 0 0 9.586 1H3a1 1 0 0 0-1 1Z"></path><path fill="#0064FF" fill-rule="evenodd" d="M4.825 7.032a.5.5 0 0 1 .643.293l1.063 2.834 1.01-2.356a.5.5 0 0 1 .919 0l1.01 2.356 1.062-2.834a.5.5 0 1 1 .936.35l-1.5 4a.5.5 0 0 1-.927.022L8 9.27 6.96 11.697a.5.5 0 0 1-.928-.021l-1.5-4a.5.5 0 0 1 .293-.644Z" clip-rule="evenodd"></path></svg>';
|
|
78381
|
+
const UnknownFileIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#DFE1E5" d="M2 2v12a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V5.414a1 1 0 0 0-.293-.707l-3.414-3.414A1 1 0 0 0 9.586 1H3a1 1 0 0 0-1 1Z"></path><path fill="currentColor" d="M7 8.287c0-.434.353-.787.787-.787h.278c.516 0 .935.419.935.935a.36.36 0 0 1-.18.312l-.465.27c-.53.306-.855.871-.855 1.483a.5.5 0 0 0 1 0c0-.255.136-.49.356-.618l.465-.27A1.36 1.36 0 0 0 10 8.435 1.935 1.935 0 0 0 8.065 6.5h-.278C6.8 6.5 6 7.3 6 8.287a.5.5 0 0 0 1 0ZM8 12.6a.6.6 0 1 0 0-1.2.6.6 0 0 0 0 1.2Z"></path></svg>';
|
|
78312
78382
|
const FILE_TYPE_MAP = {
|
|
78313
78383
|
dwg: [],
|
|
78314
78384
|
rvt: [],
|
|
@@ -78349,8 +78419,8 @@ ${docStr}
|
|
|
78349
78419
|
return UnknownFileIcon;
|
|
78350
78420
|
}
|
|
78351
78421
|
async function renderFileCard(editor, content, data2) {
|
|
78352
|
-
var _a;
|
|
78353
|
-
const { fileName, fileType, fileSize } = data2;
|
|
78422
|
+
var _a, _b;
|
|
78423
|
+
const { fileName, fileType, fileSize, created, creator, src } = data2;
|
|
78354
78424
|
const card = createElement("div", ["card-root"], content);
|
|
78355
78425
|
const icon = createElement("div", ["file-icon"], card);
|
|
78356
78426
|
const { renderFileCardIcon } = ((_a = editor.options.componentsOptions) == null ? void 0 : _a.file) || {};
|
|
@@ -78374,15 +78444,35 @@ ${docStr}
|
|
|
78374
78444
|
} else {
|
|
78375
78445
|
nameElement.textContent = fileName;
|
|
78376
78446
|
}
|
|
78377
|
-
createElement("div", ["file-
|
|
78447
|
+
const infos = createElement("div", ["file-info"], detail);
|
|
78448
|
+
if (creator) {
|
|
78449
|
+
createElement("div", ["file-creator"], infos, creator);
|
|
78450
|
+
}
|
|
78451
|
+
if (created) {
|
|
78452
|
+
const timeText = i18n$1.t("file.uploadedTime", { time: formatDate(new Date(created), "YYYY-MM-DD hh:mm") });
|
|
78453
|
+
createElement("div", ["uploaded-time"], infos, timeText);
|
|
78454
|
+
}
|
|
78455
|
+
createElement("div", ["file-size"], infos, formatBytes(fileSize));
|
|
78378
78456
|
const actions2 = createElement("div", ["file-actions"], card);
|
|
78379
78457
|
const options = editor.getComponentOptions("file");
|
|
78458
|
+
let copilotButton;
|
|
78459
|
+
const checkCopilotMethod = (_b = editor.getComponentOptions("custom")) == null ? void 0 : _b.checkCopilotReadyItem;
|
|
78460
|
+
if (checkCopilotMethod) {
|
|
78461
|
+
const copilotEnabled = checkCopilotMethod(src);
|
|
78462
|
+
if (copilotEnabled) {
|
|
78463
|
+
copilotButton = createElement("button", ["copilot"], actions2);
|
|
78464
|
+
const uniqueIcon = CopilotIcon.replace(/uniqueGradient/g, Math.random().toString());
|
|
78465
|
+
copilotButton.innerHTML = uniqueIcon;
|
|
78466
|
+
createElement("span", [], copilotButton, i18n$1.t("file.askAi"));
|
|
78467
|
+
}
|
|
78468
|
+
}
|
|
78380
78469
|
let downloadButton;
|
|
78381
78470
|
if (options.canDownload) {
|
|
78382
78471
|
downloadButton = createElement("button", ["download"], actions2);
|
|
78383
78472
|
downloadButton.innerHTML = DownloadIcon;
|
|
78473
|
+
createElement("span", [], downloadButton, i18n$1.t("file.commands.download"));
|
|
78384
78474
|
}
|
|
78385
|
-
return { card, downloadButton };
|
|
78475
|
+
return { card, downloadButton, copilotButton };
|
|
78386
78476
|
}
|
|
78387
78477
|
const fileCardStyle = "";
|
|
78388
78478
|
function downloadFile(editor, block) {
|
|
@@ -78401,7 +78491,7 @@ ${docStr}
|
|
|
78401
78491
|
async function createEmbedContent$7(editor, content, blockData) {
|
|
78402
78492
|
const { embedData } = blockData;
|
|
78403
78493
|
const fileData = embedData;
|
|
78404
|
-
const { card, downloadButton } = await renderFileCard(editor, content, fileData);
|
|
78494
|
+
const { card, downloadButton, copilotButton } = await renderFileCard(editor, content, fileData);
|
|
78405
78495
|
if (downloadButton) {
|
|
78406
78496
|
editor.domEvents.addEventListener(downloadButton, "click", (editor2, event) => {
|
|
78407
78497
|
if (!event.target) {
|
|
@@ -78414,6 +78504,21 @@ ${docStr}
|
|
|
78414
78504
|
downloadFile(editor2, block);
|
|
78415
78505
|
});
|
|
78416
78506
|
}
|
|
78507
|
+
if (copilotButton) {
|
|
78508
|
+
editor.domEvents.addEventListener(copilotButton, "click", (editor2, event) => {
|
|
78509
|
+
if (!event.target) {
|
|
78510
|
+
return;
|
|
78511
|
+
}
|
|
78512
|
+
const block = getParentBlock(event.target);
|
|
78513
|
+
if (!block) {
|
|
78514
|
+
return;
|
|
78515
|
+
}
|
|
78516
|
+
const options = editor2.options.componentsOptions.file;
|
|
78517
|
+
if (options == null ? void 0 : options.onClick) {
|
|
78518
|
+
options.onClick(editor2, block, event, "ask-copilot");
|
|
78519
|
+
}
|
|
78520
|
+
});
|
|
78521
|
+
}
|
|
78417
78522
|
editor.domEvents.addEventListener(card, "click", (editor2, event) => {
|
|
78418
78523
|
if (!event.target) {
|
|
78419
78524
|
return;
|
|
@@ -78490,6 +78595,7 @@ ${docStr}
|
|
|
78490
78595
|
id: genId(),
|
|
78491
78596
|
box: true,
|
|
78492
78597
|
type: "file",
|
|
78598
|
+
creator: fileData.creator,
|
|
78493
78599
|
created: Date.now(),
|
|
78494
78600
|
src: fileData.src,
|
|
78495
78601
|
fileName: fileData.fileName,
|
|
@@ -78585,7 +78691,9 @@ ${docStr}
|
|
|
78585
78691
|
toCard: "\u8F6C\u4E3A\u5361\u7247",
|
|
78586
78692
|
comment: "\u6DFB\u52A0\u6279\u6CE8",
|
|
78587
78693
|
preview: "\u9884\u89C8"
|
|
78588
|
-
}
|
|
78694
|
+
},
|
|
78695
|
+
uploadedTime: "\u4E0A\u4F20\u4E8E { time }",
|
|
78696
|
+
askAi: "\u8BE2\u95EE Copilot"
|
|
78589
78697
|
}
|
|
78590
78698
|
};
|
|
78591
78699
|
const enUS$f = {
|
|
@@ -78597,7 +78705,9 @@ ${docStr}
|
|
|
78597
78705
|
toCard: "To Card",
|
|
78598
78706
|
comment: "Add annotation",
|
|
78599
78707
|
preview: "Preview"
|
|
78600
|
-
}
|
|
78708
|
+
},
|
|
78709
|
+
uploadedTime: "uploaded at { time }",
|
|
78710
|
+
askAi: "Ask Copilot"
|
|
78601
78711
|
}
|
|
78602
78712
|
};
|
|
78603
78713
|
const jaJP$f = {
|
|
@@ -78609,7 +78719,9 @@ ${docStr}
|
|
|
78609
78719
|
toCard: "\u30AB\u30FC\u30C9\u306B\u5909\u63DB",
|
|
78610
78720
|
comment: "\u6CE8\u91C8\u3092\u8FFD\u52A0",
|
|
78611
78721
|
preview: "\u30D7\u30EC\u30D3\u30E5\u30FC"
|
|
78612
|
-
}
|
|
78722
|
+
},
|
|
78723
|
+
uploadedTime: "\u304C {time} \u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u307E\u3057\u305F",
|
|
78724
|
+
askAi: "Copilot \u306B\u805E\u304F"
|
|
78613
78725
|
}
|
|
78614
78726
|
};
|
|
78615
78727
|
i18n$1.mergeLang({
|
|
@@ -85416,7 +85528,7 @@ ${data2.plantumlText}
|
|
|
85416
85528
|
constructor(editor) {
|
|
85417
85529
|
__publicField(this, "toolbar");
|
|
85418
85530
|
__publicField(this, "clipboardProvider");
|
|
85419
|
-
__publicField(this, "handleButtonClick", (
|
|
85531
|
+
__publicField(this, "handleButtonClick", (toolbar2, item) => {
|
|
85420
85532
|
const range = this.editor.selection.range;
|
|
85421
85533
|
if (item.id === "select") {
|
|
85422
85534
|
editorSelectWord(this.editor);
|
|
@@ -85472,8 +85584,8 @@ ${data2.plantumlText}
|
|
|
85472
85584
|
}
|
|
85473
85585
|
const createCursorToolbar = (editor) => editor.addCustom("cursor-toolbar", () => new CursorToolbarHandler(editor));
|
|
85474
85586
|
const hideCursorToolbar = (editor) => {
|
|
85475
|
-
const
|
|
85476
|
-
|
|
85587
|
+
const toolbar2 = editor.findCustom("cursor-toolbar");
|
|
85588
|
+
toolbar2 == null ? void 0 : toolbar2.close();
|
|
85477
85589
|
};
|
|
85478
85590
|
class InsertProvider extends ProxyProvider {
|
|
85479
85591
|
constructor(editor) {
|
|
@@ -86718,9 +86830,9 @@ ${data2.plantumlText}
|
|
|
86718
86830
|
addBlockToolDataType(container);
|
|
86719
86831
|
return container;
|
|
86720
86832
|
}
|
|
86721
|
-
function getToolbarContainer(
|
|
86833
|
+
function getToolbarContainer(toolbar2) {
|
|
86722
86834
|
const containerKey = `.${LAYOUT_COLUMN_CONTAINER_CLASS_NAME}[data-type="editor-container"]`;
|
|
86723
|
-
const columnContainer =
|
|
86835
|
+
const columnContainer = toolbar2.closest(containerKey);
|
|
86724
86836
|
return columnContainer;
|
|
86725
86837
|
}
|
|
86726
86838
|
function setHoverClass(columnContainer, hovering) {
|
|
@@ -86733,10 +86845,10 @@ ${data2.plantumlText}
|
|
|
86733
86845
|
removeClass(columnContainer, toolbarHoverClass);
|
|
86734
86846
|
}
|
|
86735
86847
|
}
|
|
86736
|
-
function initToolbarHover(
|
|
86737
|
-
if (!
|
|
86848
|
+
function initToolbarHover(toolbar2) {
|
|
86849
|
+
if (!toolbar2)
|
|
86738
86850
|
return;
|
|
86739
|
-
|
|
86851
|
+
toolbar2.addEventListener("mouseenter", (event) => {
|
|
86740
86852
|
if (!event.currentTarget)
|
|
86741
86853
|
return;
|
|
86742
86854
|
const target = event.currentTarget;
|
|
@@ -86747,7 +86859,7 @@ ${data2.plantumlText}
|
|
|
86747
86859
|
}
|
|
86748
86860
|
}, 0);
|
|
86749
86861
|
});
|
|
86750
|
-
|
|
86862
|
+
toolbar2.addEventListener("mouseleave", (event) => {
|
|
86751
86863
|
if (!event.currentTarget) {
|
|
86752
86864
|
return;
|
|
86753
86865
|
}
|
|
@@ -86770,7 +86882,7 @@ ${data2.plantumlText}
|
|
|
86770
86882
|
if (!columnRemovable) {
|
|
86771
86883
|
return { actionBarContainer };
|
|
86772
86884
|
}
|
|
86773
|
-
const
|
|
86885
|
+
const toolbar2 = new ManualToolbar(
|
|
86774
86886
|
[
|
|
86775
86887
|
{
|
|
86776
86888
|
id: "delete-column",
|
|
@@ -86785,7 +86897,7 @@ ${data2.plantumlText}
|
|
|
86785
86897
|
tooltipId: editor.clientId
|
|
86786
86898
|
}
|
|
86787
86899
|
);
|
|
86788
|
-
|
|
86900
|
+
toolbar2.addListener("selectionChange", (bar2, item) => {
|
|
86789
86901
|
const container = getContainerById(editor, containerID);
|
|
86790
86902
|
if (item === "delete-column") {
|
|
86791
86903
|
addClass(container, "danger");
|
|
@@ -86793,20 +86905,20 @@ ${data2.plantumlText}
|
|
|
86793
86905
|
removeClass(container, "danger");
|
|
86794
86906
|
}
|
|
86795
86907
|
});
|
|
86796
|
-
|
|
86908
|
+
toolbar2.addListener("click", (bar2, item) => {
|
|
86797
86909
|
const container = editor.getContainerById(containerID);
|
|
86798
86910
|
const blockElement = container.closest(`div[data-block-type=${LAYOUT_BLOCK_TYPE}]`);
|
|
86799
86911
|
deleteColumn(editor, containerID, blockElement);
|
|
86800
|
-
|
|
86912
|
+
toolbar2.close("clickItem");
|
|
86801
86913
|
});
|
|
86802
86914
|
dragHandler.addEventListener("click", (event) => {
|
|
86803
86915
|
var _a;
|
|
86804
86916
|
const container = editor.getContainerById(containerID);
|
|
86805
|
-
|
|
86917
|
+
toolbar2.manualShow(event.currentTarget, {
|
|
86806
86918
|
placement: "top",
|
|
86807
86919
|
offset: [0, 5]
|
|
86808
86920
|
});
|
|
86809
|
-
(_a =
|
|
86921
|
+
(_a = toolbar2.popper) == null ? void 0 : _a.setAttribute("skip-menu-button", "true");
|
|
86810
86922
|
addClass(actionBarContainer, "clicked");
|
|
86811
86923
|
addClass(container, "active");
|
|
86812
86924
|
tippyInstance == null ? void 0 : tippyInstance.disable();
|
|
@@ -88267,6 +88379,7 @@ ${data2.plantumlText}
|
|
|
88267
88379
|
function isReservedMediaSrc(src) {
|
|
88268
88380
|
return src === ReservedMediaSrcType.Empty || src === ReservedMediaSrcType.Error;
|
|
88269
88381
|
}
|
|
88382
|
+
const toolbar = "";
|
|
88270
88383
|
const logger$9 = getLogger("media");
|
|
88271
88384
|
class Media extends tinyTypedEmitter.TypedEmitter {
|
|
88272
88385
|
constructor(options) {
|
|
@@ -91525,11 +91638,11 @@ ${data2.plantumlText}
|
|
|
91525
91638
|
this.fixedToolbar = (_a = editor.findCustom("main-toolbar-fixed-toolbar")) == null ? void 0 : _a.toolbar;
|
|
91526
91639
|
if (this.fixedToolbar) {
|
|
91527
91640
|
const content = this.fixedToolbar.content;
|
|
91528
|
-
const
|
|
91641
|
+
const toolbar2 = content.closest(".editor-command-bar-root");
|
|
91529
91642
|
this.observer = new ResizeObserver(() => {
|
|
91530
91643
|
this.updateItems();
|
|
91531
91644
|
});
|
|
91532
|
-
this.observer.observe(
|
|
91645
|
+
this.observer.observe(toolbar2);
|
|
91533
91646
|
editor.addCustom("main-toolbar-more-item", () => this);
|
|
91534
91647
|
}
|
|
91535
91648
|
});
|
|
@@ -91546,21 +91659,21 @@ ${data2.plantumlText}
|
|
|
91546
91659
|
}
|
|
91547
91660
|
}
|
|
91548
91661
|
updateItems() {
|
|
91549
|
-
const
|
|
91550
|
-
if (!
|
|
91662
|
+
const toolbar2 = this.fixedToolbar;
|
|
91663
|
+
if (!toolbar2) {
|
|
91551
91664
|
return;
|
|
91552
91665
|
}
|
|
91553
|
-
const items =
|
|
91666
|
+
const items = toolbar2.items;
|
|
91554
91667
|
const moreIndex = items.findIndex((item) => item === this);
|
|
91555
91668
|
if (moreIndex === -1) {
|
|
91556
91669
|
return;
|
|
91557
91670
|
}
|
|
91558
|
-
const content =
|
|
91671
|
+
const content = toolbar2.content;
|
|
91559
91672
|
const toolbarRoot = content.closest(".editor-command-bar-root");
|
|
91560
91673
|
const toolbarRect = toolbarRoot.getBoundingClientRect();
|
|
91561
91674
|
const toolbarRight = toolbarRect.right;
|
|
91562
91675
|
items.forEach((item) => {
|
|
91563
|
-
const elem =
|
|
91676
|
+
const elem = toolbar2.getItemElementById(item.id);
|
|
91564
91677
|
if (item === this) {
|
|
91565
91678
|
addClass(elem, "hidden");
|
|
91566
91679
|
} else {
|
|
@@ -91569,11 +91682,11 @@ ${data2.plantumlText}
|
|
|
91569
91682
|
});
|
|
91570
91683
|
const positions = /* @__PURE__ */ new Map();
|
|
91571
91684
|
items.forEach((item) => {
|
|
91572
|
-
const elem =
|
|
91685
|
+
const elem = toolbar2.getItemElementById(item.id);
|
|
91573
91686
|
positions.set(item.id, elem.getBoundingClientRect().right);
|
|
91574
91687
|
});
|
|
91575
91688
|
const lastItem = moreIndex === items.length - 1 ? items[items.length - 2] : items[items.length - 1];
|
|
91576
|
-
const lastElem =
|
|
91689
|
+
const lastElem = toolbar2.getItemElementById(lastItem.id);
|
|
91577
91690
|
if (lastElem.getBoundingClientRect().right <= toolbarRight) {
|
|
91578
91691
|
this.hidden = true;
|
|
91579
91692
|
items.forEach((item) => {
|
|
@@ -91582,16 +91695,16 @@ ${data2.plantumlText}
|
|
|
91582
91695
|
}
|
|
91583
91696
|
item.hidden = false;
|
|
91584
91697
|
});
|
|
91585
|
-
|
|
91698
|
+
toolbar2.updateItems(items);
|
|
91586
91699
|
return;
|
|
91587
91700
|
}
|
|
91588
91701
|
let fixedWidth = 0;
|
|
91589
91702
|
const last = items[items.length - 1];
|
|
91590
91703
|
if (last !== this) {
|
|
91591
|
-
const elem =
|
|
91704
|
+
const elem = toolbar2.getItemElementById(last.id);
|
|
91592
91705
|
const lastRight = elem.getBoundingClientRect().right;
|
|
91593
91706
|
const prevItem = items[moreIndex - 1];
|
|
91594
|
-
const prevElem =
|
|
91707
|
+
const prevElem = toolbar2.getItemElementById(prevItem.id);
|
|
91595
91708
|
const prevRight = prevElem.getBoundingClientRect().right;
|
|
91596
91709
|
fixedWidth = lastRight - prevRight;
|
|
91597
91710
|
}
|
|
@@ -91618,7 +91731,7 @@ ${data2.plantumlText}
|
|
|
91618
91731
|
});
|
|
91619
91732
|
this.hidden = moreItems.length === 0;
|
|
91620
91733
|
this.children = moreItems;
|
|
91621
|
-
|
|
91734
|
+
toolbar2.updateItems(items);
|
|
91622
91735
|
}
|
|
91623
91736
|
}
|
|
91624
91737
|
function getToolbarDefaultItems(editor) {
|
|
@@ -91945,9 +92058,9 @@ ${data2.plantumlText}
|
|
|
91945
92058
|
}
|
|
91946
92059
|
editor.addCustom("error-handler", () => errorHandler);
|
|
91947
92060
|
if (!clientType.isMobile) {
|
|
91948
|
-
const
|
|
92061
|
+
const toolbar2 = OnesEditorToolbar.register(editor);
|
|
91949
92062
|
if (options.floatingToolbar === false) {
|
|
91950
|
-
|
|
92063
|
+
toolbar2.disable(true);
|
|
91951
92064
|
}
|
|
91952
92065
|
}
|
|
91953
92066
|
OnesEditorToolbar.register(editor);
|
|
@@ -92002,7 +92115,7 @@ ${data2.plantumlText}
|
|
|
92002
92115
|
}
|
|
92003
92116
|
}
|
|
92004
92117
|
});
|
|
92005
|
-
editor.version = "2.4.
|
|
92118
|
+
editor.version = "2.4.1";
|
|
92006
92119
|
return editor;
|
|
92007
92120
|
}
|
|
92008
92121
|
function isDoc(doc2) {
|
|
@@ -92115,7 +92228,7 @@ ${data2.plantumlText}
|
|
|
92115
92228
|
}
|
|
92116
92229
|
});
|
|
92117
92230
|
OnesEditorToolbar.register(editor);
|
|
92118
|
-
editor.version = "2.4.
|
|
92231
|
+
editor.version = "2.4.1";
|
|
92119
92232
|
return editor;
|
|
92120
92233
|
}
|
|
92121
92234
|
async function showDocVersions(editor, options, serverUrl) {
|
|
@@ -138181,6 +138294,7 @@ ${data2.plantumlText}
|
|
|
138181
138294
|
exports2.YoukuIcon = YoukuIcon;
|
|
138182
138295
|
exports2.ZERO_WIDTH_SPACE_CHAR = ZERO_WIDTH_SPACE_CHAR;
|
|
138183
138296
|
exports2.abbreviation = abbreviation;
|
|
138297
|
+
exports2.activeComment = activeComment;
|
|
138184
138298
|
exports2.addAttribute = addAttribute;
|
|
138185
138299
|
exports2.addClass = addClass;
|
|
138186
138300
|
exports2.addColor = addColor;
|