@ones-editor/editor 3.0.2-beta.1 → 3.0.2-beta.3

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.
@@ -130,4 +130,6 @@ import TocIcon from './toc.svg?raw';
130
130
  import AttachmentIcon from './attachment.svg?raw';
131
131
  import Mention2Icon from './mention.svg?raw';
132
132
  import CircleCloseIcon from './circle-close.svg?raw';
133
- export { TableEditIcon, TabIcon, ShiftTabIcon, DownloadIcon, AddEmojiIcon, BallIcon, CardIcon, FoodIcon, LightIcon, SmileIcon, SymbolIcon, TreeIcon, TimeIcon, ClearIcon, CloseIcon, PrevIcon, NextIcon, MoreIcon, TextColorIcon, AddIcon, ArrowDownIcon, ArrowUpIcon, ArrowLeftIcon, ArrowRightIcon, DeleteRowIcon, DeleteColIcon, MergeCellIcon, SplitCellIcon, DeleteTableIcon, Heading1Icon, Heading2Icon, Heading3Icon, Heading4Icon, Heading5Icon, Heading6Icon, Heading7Icon, Heading8Icon, HeadingNIcon, OrderedListIcon, UnorderedListIcon, CheckListIcon, BlockquoteIcon, AlignCenterIcon, AlignLeftIcon, AlignRightIcon, ImageIcon, ImageMenuIcon, ImageErrorIcon, ImageEmptyIcon, LinkIcon, LinkOffIcon, WarningIcon, PasteSpecialIcon, LaunchIcon, CodeIcon, LayoutIcon, AudioIcon, GraphIcon, VideoIcon, FileIcon, MathIcon, MathMenuIcon, TableIcon, TableMenuIcon, BilibiliIcon, YoukuIcon, ModaoIcon, FigmaIcon, EditIcon, CommentIcon, RefreshIcon, HelpIcon, CheckMarkIcon, CircleCheckMarkIcon, TextIcon, RightArrowIcon, TencentVideoIcon, WebPageIcon, UmlIcon, DividingLineIcon, HeadingH1Icon, HeadingH2Icon, HeadingH3Icon, HeadingH4Icon, HeadingH5Icon, HeadingH6Icon, HeadingH7Icon, HeadingH8Icon, CheckboxIcon, QuoteIcon, LinkHrefIcon, OrderedIcon, UnorderedIcon, CopyIcon, CutIcon, DeleteIcon, LockBlockIcon, UnLockBlockIcon, InsertBeforeIcon, InsertAfterIcon, MentionIcon, CircleAddIcon, LoadingIcon, DragIcon, UmlBrandIcon, OnesLoadingIcon, BoldIcon, ItalicIcon, UnderlineIcon, LineThroughIcon, SubscriptIcon, SuperscriptIcon, InlineCodeIcon, ToMindMapIcon, FitIcon, FullScreenIcon, ExitFullScreenIcon, CaretDownIcon, StatusIcon, AlertEmojiIcon, ForbiddenIcon, WarningFilledIcon, InformationFilledIcon, SearchIcon, CalloutIcon, LoadingCircleIcon, TextGroupIcon, AdjustWidthIcon, TocIcon, AttachmentIcon, Mention2Icon, CircleCloseIcon, };
133
+ import Edit2Icon from './edit2.svg?raw';
134
+ import RevertIcon from './revert.svg?raw';
135
+ export { TableEditIcon, TabIcon, ShiftTabIcon, DownloadIcon, AddEmojiIcon, BallIcon, CardIcon, FoodIcon, LightIcon, SmileIcon, SymbolIcon, TreeIcon, TimeIcon, ClearIcon, CloseIcon, PrevIcon, NextIcon, MoreIcon, TextColorIcon, AddIcon, ArrowDownIcon, ArrowUpIcon, ArrowLeftIcon, ArrowRightIcon, DeleteRowIcon, DeleteColIcon, MergeCellIcon, SplitCellIcon, DeleteTableIcon, Heading1Icon, Heading2Icon, Heading3Icon, Heading4Icon, Heading5Icon, Heading6Icon, Heading7Icon, Heading8Icon, HeadingNIcon, OrderedListIcon, UnorderedListIcon, CheckListIcon, BlockquoteIcon, AlignCenterIcon, AlignLeftIcon, AlignRightIcon, ImageIcon, ImageMenuIcon, ImageErrorIcon, ImageEmptyIcon, LinkIcon, LinkOffIcon, WarningIcon, PasteSpecialIcon, LaunchIcon, CodeIcon, LayoutIcon, AudioIcon, GraphIcon, VideoIcon, FileIcon, MathIcon, MathMenuIcon, TableIcon, TableMenuIcon, BilibiliIcon, YoukuIcon, ModaoIcon, FigmaIcon, EditIcon, CommentIcon, RefreshIcon, HelpIcon, CheckMarkIcon, CircleCheckMarkIcon, TextIcon, RightArrowIcon, TencentVideoIcon, WebPageIcon, UmlIcon, DividingLineIcon, HeadingH1Icon, HeadingH2Icon, HeadingH3Icon, HeadingH4Icon, HeadingH5Icon, HeadingH6Icon, HeadingH7Icon, HeadingH8Icon, CheckboxIcon, QuoteIcon, LinkHrefIcon, OrderedIcon, UnorderedIcon, CopyIcon, CutIcon, DeleteIcon, LockBlockIcon, UnLockBlockIcon, InsertBeforeIcon, InsertAfterIcon, MentionIcon, CircleAddIcon, LoadingIcon, DragIcon, UmlBrandIcon, OnesLoadingIcon, BoldIcon, ItalicIcon, UnderlineIcon, LineThroughIcon, SubscriptIcon, SuperscriptIcon, InlineCodeIcon, ToMindMapIcon, FitIcon, FullScreenIcon, ExitFullScreenIcon, CaretDownIcon, StatusIcon, AlertEmojiIcon, ForbiddenIcon, WarningFilledIcon, InformationFilledIcon, SearchIcon, CalloutIcon, LoadingCircleIcon, TextGroupIcon, AdjustWidthIcon, TocIcon, AttachmentIcon, Mention2Icon, CircleCloseIcon, Edit2Icon, RevertIcon, };
@@ -19,6 +19,7 @@ declare const _default: {
19
19
  noFilterVersion: string;
20
20
  memo: string;
21
21
  revert: string;
22
+ copyLink: string;
22
23
  filter: {
23
24
  all: string;
24
25
  memoed: string;
@@ -19,6 +19,7 @@ declare const _default: {
19
19
  noFilterVersion: string;
20
20
  memo: string;
21
21
  revert: string;
22
+ copyLink: string;
22
23
  filter: {
23
24
  all: string;
24
25
  memoed: string;
@@ -19,6 +19,7 @@ declare const _default: {
19
19
  noFilterVersion: string;
20
20
  memo: string;
21
21
  revert: string;
22
+ copyLink: string;
22
23
  filter: {
23
24
  all: string;
24
25
  memoed: string;
@@ -19,6 +19,7 @@ declare const _default: {
19
19
  noFilterVersion: string;
20
20
  memo: string;
21
21
  revert: string;
22
+ copyLink: string;
22
23
  filter: {
23
24
  all: string;
24
25
  memoed: string;
@@ -16,6 +16,7 @@ export interface VersionDialogOptions {
16
16
  onVersionChanged?: (sender: unknown, versionEditor: OnesEditor, version: DocVersion) => void;
17
17
  onVersionsLoaded?: (sender: unknown, versions: DocVersion[]) => void;
18
18
  decorateItem?: (item: HTMLElement, ver: DocVersion) => void;
19
+ onCopyVersionLink?: (ver: DocVersion) => void;
19
20
  }
20
21
  export type VersionNum = number | string;
21
22
  export interface PlayOptions {
@@ -14,6 +14,7 @@ export declare class OnesEditorVersionsDialog implements OnesEditorCustom {
14
14
  get editor(): OnesEditor | null;
15
15
  constructor(server: OnesEditorDocServer, provider: OnesEditorVersionsProvider, editorOptions?: unknown);
16
16
  private handleRevert;
17
+ private handleCopyLink;
17
18
  private handleSelectVersion;
18
19
  private handleCompareWithVersion;
19
20
  private handleHelp;
@@ -13,6 +13,7 @@ interface VersionListOptions {
13
13
  getMarkColor: (user: HistoryUser) => string;
14
14
  onSelectVersion: (version: DocVersion) => void;
15
15
  onRevert: (version: DocVersion) => void;
16
+ onCopyLink?: (version: DocVersion) => void;
16
17
  onMemoChanged?: (version: DocVersion) => void;
17
18
  onBeforeEditMemo: () => PromiseLike<boolean>;
18
19
  useCreatedBy?: boolean;
@@ -40,6 +41,7 @@ export declare class VersionList {
40
41
  private editItemMemo;
41
42
  private handleEndEditItemMemo;
42
43
  private handleRevert;
44
+ private handleCopyLink;
43
45
  private updateHeaderCount;
44
46
  private handleFilterClick;
45
47
  getVersionItemByVersionNum(version: VersionNum): VersionElement | null;
package/dist/index.js CHANGED
@@ -6771,9 +6771,23 @@ div.editor-root div.editor-content div[data-type=editor-container] div.embed-blo
6771
6771
  .version-list-root .version-list-content .version-item .version-item-title .version-actions button.disabled:hover {
6772
6772
  color: #c7c7c7;
6773
6773
  }
6774
+ .version-list-root .version-list-content .version-item .version-item-title .version-actions .copy-link-button,
6774
6775
  .version-list-root .version-list-content .version-item .version-item-title .version-actions .revert-button {
6775
- border-left: 1px solid #e8e8e8;
6776
- margin-left: 10px;
6776
+ margin-left: 5px;
6777
+ }
6778
+ .version-list-root .version-list-content .version-item .version-item-info {
6779
+ display: flex;
6780
+ margin-top: 10px;
6781
+ padding-left: 10px;
6782
+ }
6783
+ .version-list-root .version-list-content .version-item .version-item-info .version-item-time {
6784
+ line-height: 22px;
6785
+ display: block;
6786
+ white-space: nowrap;
6787
+ overflow: hidden;
6788
+ text-overflow: ellipsis;
6789
+ font-size: 12px;
6790
+ margin-right: 10px;
6777
6791
  }
6778
6792
  .version-list-root .version-list-content .version-item .version-item-authors {
6779
6793
  list-style: none;
@@ -6783,7 +6797,6 @@ div.editor-root div.editor-content div[data-type=editor-container] div.embed-blo
6783
6797
  }
6784
6798
  .version-list-root .version-list-content .version-item .version-item-author {
6785
6799
  display: flex;
6786
- margin-top: 10px;
6787
6800
  color: #606060;
6788
6801
  line-height: 22px;
6789
6802
  }
@@ -41320,6 +41333,8 @@ ${codeText}
41320
41333
  const AttachmentIcon = '<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>\n';
41321
41334
  const Mention2Icon = '<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.237 13.6469C10.2882 14.1888 9.18962 14.4985 8.01868 14.4985C4.42977 14.4985 1.52039 11.5892 1.52039 8.00024C1.52039 4.41134 4.42977 1.50195 8.01868 1.50195C11.6076 1.50195 14.517 4.41134 14.517 8.00024C14.517 8.70345 14.4221 9.21723 14.2284 9.56578C13.9961 10.0692 13.4926 10.7276 12.66 10.8438C12.3454 10.9008 12.0336 10.7797 11.7805 10.6233C11.3724 10.3711 11.2127 9.88274 11.2127 9.40298V4.48055" stroke="currentColor"/>\n<path d="M7.67957 4.73828C9.37526 4.73835 10.6913 6.20213 10.6913 7.93262C10.6913 9.6631 9.37526 11.1269 7.67957 11.127C5.98381 11.127 4.66785 9.66315 4.66785 7.93262C4.66785 6.20209 5.98381 4.73828 7.67957 4.73828Z" stroke="currentColor"/>\n</svg>\n';
41322
41335
  const CircleCloseIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M8 1C11.8659 1 15 4.13408 15 8C15 11.8659 11.8659 15 8 15C4.13408 15 1 11.8659 1 8C1 4.13408 4.13408 1 8 1ZM8 7.29297L5.52539 4.81836L4.81836 5.52539L7.29297 8L4.81836 10.4746L5.52539 11.1816L8 8.70703L10.4746 11.1816L11.1816 10.4746L8.70703 8L11.1816 5.52539L10.4746 4.81836L8 7.29297Z" fill="currentColor"/>\n</svg>\n';
41336
+ const Edit2Icon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9 2.5H3C2.72386 2.5 2.5 2.72386 2.5 3V13C2.5 13.2761 2.72386 13.5 3 13.5H13C13.2761 13.5 13.5 13.2761 13.5 13V7H14.5V13C14.5 13.8284 13.8284 14.5 13 14.5H3C2.17157 14.5 1.5 13.8284 1.5 13V3C1.5 2.17157 2.17157 1.5 3 1.5H9V2.5ZM14.2383 2.46875L6.46875 10.2383L5.76172 9.53125L13.5312 1.76172L14.2383 2.46875Z" fill="currentColor"/>\n</svg>\n';
41337
+ const RevertIcon = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8H1.5C1.5 11.5899 4.41015 14.5 8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C5.92002 1.5 4.07025 2.47853 2.87988 4H5V5H1.5C1.22386 5 1 4.77614 1 4.5V1H2V3.50293C3.36756 1.68115 5.545 0.5 8 0.5ZM8.5 7.5H12V8.5H8C7.72386 8.5 7.5 8.27614 7.5 8V4H8.5V7.5Z" fill="currentColor"/>\n</svg>\n';
41323
41338
  const index$f = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41324
41339
  __proto__: null,
41325
41340
  TableEditIcon,
@@ -41453,7 +41468,9 @@ ${codeText}
41453
41468
  TocIcon,
41454
41469
  AttachmentIcon,
41455
41470
  Mention2Icon,
41456
- CircleCloseIcon
41471
+ CircleCloseIcon,
41472
+ Edit2Icon,
41473
+ RevertIcon
41457
41474
  }, Symbol.toStringTag, { value: "Module" }));
41458
41475
  function createLoading() {
41459
41476
  const loading2 = createElement("span", ["editor-loading-icon"], null);
@@ -81405,6 +81422,7 @@ ${docStr}
81405
81422
  noFilterVersion: "\u6682\u65E0\u5339\u914D\u7ED3\u679C",
81406
81423
  memo: "\u5907\u6CE8",
81407
81424
  revert: "\u56DE\u6EDA",
81425
+ copyLink: "\u590D\u5236\u5386\u53F2\u7248\u672C\u94FE\u63A5",
81408
81426
  filter: {
81409
81427
  all: "\u5168\u90E8",
81410
81428
  memoed: "\u5DF2\u5907\u6CE8",
@@ -81449,6 +81467,7 @@ ${docStr}
81449
81467
  noFilterVersion: "\u66AB\u7121\u5339\u914D\u7D50\u679C",
81450
81468
  memo: "\u5099\u8A3B",
81451
81469
  revert: "\u56DE\u6EFE",
81470
+ copyLink: "\u590D\u5236\u6B77\u53F2\u7248\u672C\u94FE\u63A5",
81452
81471
  filter: {
81453
81472
  all: "\u5168\u90E8",
81454
81473
  memoed: "\u5DF2\u5099\u8A3B",
@@ -81493,6 +81512,7 @@ ${docStr}
81493
81512
  noFilterVersion: "No result",
81494
81513
  memo: "Comment",
81495
81514
  revert: "Roll back",
81515
+ copyLink: "Copy historical version link",
81496
81516
  filter: {
81497
81517
  all: "All",
81498
81518
  memoed: "Commented",
@@ -81537,6 +81557,7 @@ ${docStr}
81537
81557
  noFilterVersion: "\u4E00\u81F4\u3057\u305F\u7D50\u679C\u306F\u3042\u308A\u307E\u305B\u3093",
81538
81558
  memo: "\u5099\u8003",
81539
81559
  revert: "\u5FA9\u5143",
81560
+ copyLink: "\u5C65\u6B74\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u30EA\u30F3\u30AF\u3092\u30B3\u30D4\u30FC",
81540
81561
  filter: {
81541
81562
  all: "\u3059\u3079\u3066",
81542
81563
  memoed: "\u5099\u8003\u3042\u308A",
@@ -81721,6 +81742,10 @@ ${docStr}
81721
81742
  this.handleRevert(version, versionItem);
81722
81743
  return;
81723
81744
  }
81745
+ if (target.closest(".copy-link-button") && this.options.enableEdit) {
81746
+ this.handleCopyLink(version, versionItem);
81747
+ return;
81748
+ }
81724
81749
  if (active) {
81725
81750
  return;
81726
81751
  }
@@ -81759,6 +81784,10 @@ ${docStr}
81759
81784
  const { onRevert } = this.options;
81760
81785
  onRevert(version);
81761
81786
  });
81787
+ __publicField(this, "handleCopyLink", (version, versionItem) => {
81788
+ const { onCopyLink } = this.options;
81789
+ onCopyLink == null ? void 0 : onCopyLink(version);
81790
+ });
81762
81791
  __publicField(this, "handleFilterClick", (bar2, item) => {
81763
81792
  let versions = this.options.versions;
81764
81793
  if (item.id === "memoed") {
@@ -81851,16 +81880,20 @@ ${docStr}
81851
81880
  }
81852
81881
  createElement("div", ["spacer"], title);
81853
81882
  const actions2 = createElement("div", ["version-actions"], title);
81854
- const addMemo = createElement("button", ["add-memo-button"], actions2);
81855
- addMemo.textContent = t$1("version.memo");
81883
+ const addMemo = createIconButton(Edit2Icon, ["add-memo-button"], actions2);
81884
+ addMemo.setAttribute("data-editor-tooltip-common", t$1("version.memo"));
81856
81885
  if (!this.options.enableEdit) {
81857
81886
  addClass(addMemo, "disabled");
81858
81887
  const disabledTip = (_d = (_c = (_b = this.options).getDisabledTip) == null ? void 0 : _c.call(_b)) != null ? _d : i18n$1.t("version.tooltip.auth");
81859
81888
  addMemo.setAttribute("data-editor-tooltip-common", disabledTip);
81860
81889
  }
81890
+ if (this.options.onCopyLink) {
81891
+ const copyLink = createIconButton(LinkIcon, ["copy-link-button"], actions2);
81892
+ copyLink.setAttribute("data-editor-tooltip-common", t$1("version.copyLink"));
81893
+ }
81861
81894
  if (!isFirst) {
81862
- const revert = createElement("button", ["revert-button"], actions2);
81863
- revert.textContent = t$1("version.revert");
81895
+ const revert = createIconButton(RevertIcon, ["revert-button"], actions2);
81896
+ revert.setAttribute("data-editor-tooltip-common", t$1("version.revert"));
81864
81897
  if (!this.options.enableEdit) {
81865
81898
  addClass(revert, "disabled");
81866
81899
  const disabledTip = (_g = (_f = (_e = this.options).getDisabledTip) == null ? void 0 : _f.call(_e)) != null ? _g : i18n$1.t("version.tooltip.auth");
@@ -81876,7 +81909,9 @@ ${docStr}
81876
81909
  }
81877
81910
  createElement("div", ["version-item-restore-from"], item, restoreFrom);
81878
81911
  createElement("div", ["version-item-memo"], item, ((_i = ver.extra) == null ? void 0 : _i.memo) || "");
81879
- const authors = createElement("ul", ["version-item-authors"], item);
81912
+ const info = createElement("div", ["version-item-info"], item);
81913
+ createElement("li", ["version-item-time"], info, formatDate(new Date(ver.version), "YYYY-MM-DD hh:mm"));
81914
+ const authors = createElement("ul", ["version-item-authors"], info);
81880
81915
  const addUser = (user) => {
81881
81916
  const author = createElement("li", ["version-item-author"], authors);
81882
81917
  const markAuthor = createElement("span", ["version-item-author-mark"], author);
@@ -83276,6 +83311,14 @@ ${docStr}
83276
83311
  await this.versionHelper.revertVersion(version.version);
83277
83312
  (_c = this.dialog) == null ? void 0 : _c.hide();
83278
83313
  });
83314
+ __publicField(this, "handleCopyLink", (ver) => {
83315
+ var _a, _b, _c;
83316
+ const version = ver != null ? ver : (_a = this.versionList) == null ? void 0 : _a.activeVersion;
83317
+ if (!version) {
83318
+ return;
83319
+ }
83320
+ (_c = (_b = this.versionOptions) == null ? void 0 : _b.onCopyVersionLink) == null ? void 0 : _c.call(_b, version);
83321
+ });
83279
83322
  __publicField(this, "handleSelectVersion", (version) => {
83280
83323
  assert(logger$y, version, `The version: ${version} is invalid`);
83281
83324
  this.viewVersion(version);
@@ -83377,7 +83420,7 @@ ${docStr}
83377
83420
  return this.oldViewer;
83378
83421
  }
83379
83422
  renderContent(versions) {
83380
- var _a, _b, _c, _d, _e;
83423
+ var _a, _b, _c, _d, _e, _f;
83381
83424
  const { listContainer: versionsListContainer } = this.components;
83382
83425
  versionsListContainer.innerHTML = "";
83383
83426
  const versionList2 = new VersionList({
@@ -83391,9 +83434,10 @@ ${docStr}
83391
83434
  useCreatedBy: (_c = this.versionOptions) == null ? void 0 : _c.useCreatedBy,
83392
83435
  onSelectVersion: this.handleSelectVersion,
83393
83436
  onRevert: this.handleRevert,
83437
+ onCopyLink: ((_d = this.versionOptions) == null ? void 0 : _d.onCopyVersionLink) ? this.handleCopyLink : void 0,
83394
83438
  onMemoChanged: this.onMemoChanged,
83395
- decorateItem: (_d = this.versionOptions) == null ? void 0 : _d.decorateItem,
83396
- onBeforeEditMemo: ((_e = this.versionOptions) == null ? void 0 : _e.onBeforeEditMemo) || (async () => true),
83439
+ decorateItem: (_e = this.versionOptions) == null ? void 0 : _e.decorateItem,
83440
+ onBeforeEditMemo: ((_f = this.versionOptions) == null ? void 0 : _f.onBeforeEditMemo) || (async () => true),
83397
83441
  getMarkColor: (user) => {
83398
83442
  const { flag } = getUserColors(this.server.getRemoteUsers(), user);
83399
83443
  return flag;
@@ -95988,7 +96032,7 @@ ${JSON.stringify(error2, null, 2)}`);
95988
96032
  }
95989
96033
  }
95990
96034
  });
95991
- editor.version = "3.0.2-beta.1";
96035
+ editor.version = "3.0.2-beta.3";
95992
96036
  return editor;
95993
96037
  }
95994
96038
  function isDoc(doc2) {
@@ -96122,13 +96166,13 @@ ${JSON.stringify(error2, null, 2)}`);
96122
96166
  OnesEditorDropTarget.register(editor);
96123
96167
  OnesEditorTocProvider.register(editor);
96124
96168
  OnesEditorExclusiveBlock.register(editor);
96125
- editor.version = "3.0.2-beta.1";
96169
+ editor.version = "3.0.2-beta.3";
96126
96170
  return editor;
96127
96171
  }
96128
96172
  async function showDocVersions(editor, options, serverUrl) {
96129
96173
  var _a;
96130
96174
  const auth = editor.doc.externalDoc.client.authMessage();
96131
- const doc2 = await ShareDBServer.load({ auth, serverUrl });
96175
+ const doc2 = await ShareDBServer.load({ auth, serverUrl, onCopyVersionLink: options.onCopyVersionLink });
96132
96176
  const versionHelper = (_a = doc2.getVersionHelper) == null ? void 0 : _a.call(doc2);
96133
96177
  if (!versionHelper) {
96134
96178
  throw new Error("the editor does not support to show versions");
@@ -96147,7 +96191,7 @@ ${JSON.stringify(error2, null, 2)}`);
96147
96191
  return dialog;
96148
96192
  }
96149
96193
  async function showDocVersions2(parent, options) {
96150
- var _a;
96194
+ var _a, _b;
96151
96195
  const { serverUrl, appId, docId, token, userId, displayName } = options;
96152
96196
  const auth = {
96153
96197
  appId,
@@ -96160,9 +96204,10 @@ ${JSON.stringify(error2, null, 2)}`);
96160
96204
  };
96161
96205
  const server = await ShareDBServer.load({
96162
96206
  auth,
96163
- serverUrl: options.serverUrl
96207
+ serverUrl: options.serverUrl,
96208
+ onCopyVersionLink: (_a = options.options) == null ? void 0 : _a.onCopyVersionLink
96164
96209
  });
96165
- const versionHelper = (_a = server.getVersionHelper) == null ? void 0 : _a.call(server);
96210
+ const versionHelper = (_b = server.getVersionHelper) == null ? void 0 : _b.call(server);
96166
96211
  if (!versionHelper) {
96167
96212
  throw new Error("the editor does not support to show versions");
96168
96213
  }
@@ -141982,6 +142027,7 @@ ${JSON.stringify(error2, null, 2)}`);
141982
142027
  exports2.DrawioPasteHandler = DrawioPasteHandler;
141983
142028
  exports2.Dropdown = Dropdown;
141984
142029
  exports2.DropdownFilterableList = DropdownFilterableList;
142030
+ exports2.Edit2Icon = Edit2Icon;
141985
142031
  exports2.EditIcon = EditIcon;
141986
142032
  exports2.EditorBlocks = EditorBlocks;
141987
142033
  exports2.EditorBoxes = EditorBoxes;
@@ -142138,6 +142184,7 @@ ${JSON.stringify(error2, null, 2)}`);
142138
142184
  exports2.RemoteCaretsInsertion = RemoteCaretsInsertion;
142139
142185
  exports2.RemoteUsers = RemoteUsers;
142140
142186
  exports2.RequestReloadError = RequestReloadError;
142187
+ exports2.RevertIcon = RevertIcon;
142141
142188
  exports2.RichText = RichText;
142142
142189
  exports2.RightArrowIcon = rightArrow;
142143
142190
  exports2.ScriptDropdownProvider = ScriptDropdownProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "3.0.2-beta.1",
3
+ "version": "3.0.2-beta.3",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {