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

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
  }
@@ -40819,8 +40832,15 @@ ${codeText}
40819
40832
  super();
40820
40833
  __publicField(this, "remoteUsers", new RemoteUsers());
40821
40834
  __publicField(this, "client");
40835
+ __publicField(this, "copyLink");
40822
40836
  this.options = options;
40823
40837
  this.client = new ShareDBSimpleClient(options.auth, options.serverUrl);
40838
+ if (options.onCopyVersionLink) {
40839
+ this.copyLink = (v) => {
40840
+ var _a;
40841
+ (_a = options.onCopyVersionLink) == null ? void 0 : _a.call(options, v);
40842
+ };
40843
+ }
40824
40844
  }
40825
40845
  destroy() {
40826
40846
  }
@@ -41320,6 +41340,8 @@ ${codeText}
41320
41340
  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
41341
  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
41342
  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';
41343
+ 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';
41344
+ 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
41345
  const index$f = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41324
41346
  __proto__: null,
41325
41347
  TableEditIcon,
@@ -41453,7 +41475,9 @@ ${codeText}
41453
41475
  TocIcon,
41454
41476
  AttachmentIcon,
41455
41477
  Mention2Icon,
41456
- CircleCloseIcon
41478
+ CircleCloseIcon,
41479
+ Edit2Icon,
41480
+ RevertIcon
41457
41481
  }, Symbol.toStringTag, { value: "Module" }));
41458
41482
  function createLoading() {
41459
41483
  const loading2 = createElement("span", ["editor-loading-icon"], null);
@@ -81405,6 +81429,7 @@ ${docStr}
81405
81429
  noFilterVersion: "\u6682\u65E0\u5339\u914D\u7ED3\u679C",
81406
81430
  memo: "\u5907\u6CE8",
81407
81431
  revert: "\u56DE\u6EDA",
81432
+ copyLink: "\u590D\u5236\u5386\u53F2\u7248\u672C\u94FE\u63A5",
81408
81433
  filter: {
81409
81434
  all: "\u5168\u90E8",
81410
81435
  memoed: "\u5DF2\u5907\u6CE8",
@@ -81449,6 +81474,7 @@ ${docStr}
81449
81474
  noFilterVersion: "\u66AB\u7121\u5339\u914D\u7D50\u679C",
81450
81475
  memo: "\u5099\u8A3B",
81451
81476
  revert: "\u56DE\u6EFE",
81477
+ copyLink: "\u590D\u5236\u6B77\u53F2\u7248\u672C\u94FE\u63A5",
81452
81478
  filter: {
81453
81479
  all: "\u5168\u90E8",
81454
81480
  memoed: "\u5DF2\u5099\u8A3B",
@@ -81493,6 +81519,7 @@ ${docStr}
81493
81519
  noFilterVersion: "No result",
81494
81520
  memo: "Comment",
81495
81521
  revert: "Roll back",
81522
+ copyLink: "Copy historical version link",
81496
81523
  filter: {
81497
81524
  all: "All",
81498
81525
  memoed: "Commented",
@@ -81537,6 +81564,7 @@ ${docStr}
81537
81564
  noFilterVersion: "\u4E00\u81F4\u3057\u305F\u7D50\u679C\u306F\u3042\u308A\u307E\u305B\u3093",
81538
81565
  memo: "\u5099\u8003",
81539
81566
  revert: "\u5FA9\u5143",
81567
+ copyLink: "\u5C65\u6B74\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u30EA\u30F3\u30AF\u3092\u30B3\u30D4\u30FC",
81540
81568
  filter: {
81541
81569
  all: "\u3059\u3079\u3066",
81542
81570
  memoed: "\u5099\u8003\u3042\u308A",
@@ -81721,6 +81749,10 @@ ${docStr}
81721
81749
  this.handleRevert(version, versionItem);
81722
81750
  return;
81723
81751
  }
81752
+ if (target.closest(".copy-link-button") && this.options.enableEdit) {
81753
+ this.handleCopyLink(version, versionItem);
81754
+ return;
81755
+ }
81724
81756
  if (active) {
81725
81757
  return;
81726
81758
  }
@@ -81759,6 +81791,10 @@ ${docStr}
81759
81791
  const { onRevert } = this.options;
81760
81792
  onRevert(version);
81761
81793
  });
81794
+ __publicField(this, "handleCopyLink", (version, versionItem) => {
81795
+ const { onCopyLink } = this.options;
81796
+ onCopyLink == null ? void 0 : onCopyLink(version);
81797
+ });
81762
81798
  __publicField(this, "handleFilterClick", (bar2, item) => {
81763
81799
  let versions = this.options.versions;
81764
81800
  if (item.id === "memoed") {
@@ -81851,16 +81887,20 @@ ${docStr}
81851
81887
  }
81852
81888
  createElement("div", ["spacer"], title);
81853
81889
  const actions2 = createElement("div", ["version-actions"], title);
81854
- const addMemo = createElement("button", ["add-memo-button"], actions2);
81855
- addMemo.textContent = t$1("version.memo");
81890
+ const addMemo = createIconButton(Edit2Icon, ["add-memo-button"], actions2);
81891
+ addMemo.setAttribute("data-editor-tooltip-common", t$1("version.memo"));
81856
81892
  if (!this.options.enableEdit) {
81857
81893
  addClass(addMemo, "disabled");
81858
81894
  const disabledTip = (_d = (_c = (_b = this.options).getDisabledTip) == null ? void 0 : _c.call(_b)) != null ? _d : i18n$1.t("version.tooltip.auth");
81859
81895
  addMemo.setAttribute("data-editor-tooltip-common", disabledTip);
81860
81896
  }
81897
+ if (this.options.onCopyLink) {
81898
+ const copyLink = createIconButton(LinkIcon, ["copy-link-button"], actions2);
81899
+ copyLink.setAttribute("data-editor-tooltip-common", t$1("version.copyLink"));
81900
+ }
81861
81901
  if (!isFirst) {
81862
- const revert = createElement("button", ["revert-button"], actions2);
81863
- revert.textContent = t$1("version.revert");
81902
+ const revert = createIconButton(RevertIcon, ["revert-button"], actions2);
81903
+ revert.setAttribute("data-editor-tooltip-common", t$1("version.revert"));
81864
81904
  if (!this.options.enableEdit) {
81865
81905
  addClass(revert, "disabled");
81866
81906
  const disabledTip = (_g = (_f = (_e = this.options).getDisabledTip) == null ? void 0 : _f.call(_e)) != null ? _g : i18n$1.t("version.tooltip.auth");
@@ -81876,7 +81916,9 @@ ${docStr}
81876
81916
  }
81877
81917
  createElement("div", ["version-item-restore-from"], item, restoreFrom);
81878
81918
  createElement("div", ["version-item-memo"], item, ((_i = ver.extra) == null ? void 0 : _i.memo) || "");
81879
- const authors = createElement("ul", ["version-item-authors"], item);
81919
+ const info = createElement("div", ["version-item-info"], item);
81920
+ createElement("li", ["version-item-time"], info, formatDate(new Date(ver.version), "YYYY-MM-DD hh:mm"));
81921
+ const authors = createElement("ul", ["version-item-authors"], info);
81880
81922
  const addUser = (user) => {
81881
81923
  const author = createElement("li", ["version-item-author"], authors);
81882
81924
  const markAuthor = createElement("span", ["version-item-author-mark"], author);
@@ -83276,6 +83318,14 @@ ${docStr}
83276
83318
  await this.versionHelper.revertVersion(version.version);
83277
83319
  (_c = this.dialog) == null ? void 0 : _c.hide();
83278
83320
  });
83321
+ __publicField(this, "handleCopyLink", (ver) => {
83322
+ var _a, _b, _c;
83323
+ const version = ver != null ? ver : (_a = this.versionList) == null ? void 0 : _a.activeVersion;
83324
+ if (!version) {
83325
+ return;
83326
+ }
83327
+ (_c = (_b = this.versionHelper).copyLink) == null ? void 0 : _c.call(_b, version);
83328
+ });
83279
83329
  __publicField(this, "handleSelectVersion", (version) => {
83280
83330
  assert(logger$y, version, `The version: ${version} is invalid`);
83281
83331
  this.viewVersion(version);
@@ -83391,6 +83441,7 @@ ${docStr}
83391
83441
  useCreatedBy: (_c = this.versionOptions) == null ? void 0 : _c.useCreatedBy,
83392
83442
  onSelectVersion: this.handleSelectVersion,
83393
83443
  onRevert: this.handleRevert,
83444
+ onCopyLink: this.versionHelper.copyLink ? this.handleCopyLink : void 0,
83394
83445
  onMemoChanged: this.onMemoChanged,
83395
83446
  decorateItem: (_d = this.versionOptions) == null ? void 0 : _d.decorateItem,
83396
83447
  onBeforeEditMemo: ((_e = this.versionOptions) == null ? void 0 : _e.onBeforeEditMemo) || (async () => true),
@@ -95988,7 +96039,7 @@ ${JSON.stringify(error2, null, 2)}`);
95988
96039
  }
95989
96040
  }
95990
96041
  });
95991
- editor.version = "3.0.2-beta.1";
96042
+ editor.version = "3.0.2-beta.2";
95992
96043
  return editor;
95993
96044
  }
95994
96045
  function isDoc(doc2) {
@@ -96122,13 +96173,13 @@ ${JSON.stringify(error2, null, 2)}`);
96122
96173
  OnesEditorDropTarget.register(editor);
96123
96174
  OnesEditorTocProvider.register(editor);
96124
96175
  OnesEditorExclusiveBlock.register(editor);
96125
- editor.version = "3.0.2-beta.1";
96176
+ editor.version = "3.0.2-beta.2";
96126
96177
  return editor;
96127
96178
  }
96128
96179
  async function showDocVersions(editor, options, serverUrl) {
96129
96180
  var _a;
96130
96181
  const auth = editor.doc.externalDoc.client.authMessage();
96131
- const doc2 = await ShareDBServer.load({ auth, serverUrl });
96182
+ const doc2 = await ShareDBServer.load({ auth, serverUrl, onCopyVersionLink: options.onCopyVersionLink });
96132
96183
  const versionHelper = (_a = doc2.getVersionHelper) == null ? void 0 : _a.call(doc2);
96133
96184
  if (!versionHelper) {
96134
96185
  throw new Error("the editor does not support to show versions");
@@ -96147,7 +96198,7 @@ ${JSON.stringify(error2, null, 2)}`);
96147
96198
  return dialog;
96148
96199
  }
96149
96200
  async function showDocVersions2(parent, options) {
96150
- var _a;
96201
+ var _a, _b;
96151
96202
  const { serverUrl, appId, docId, token, userId, displayName } = options;
96152
96203
  const auth = {
96153
96204
  appId,
@@ -96160,9 +96211,10 @@ ${JSON.stringify(error2, null, 2)}`);
96160
96211
  };
96161
96212
  const server = await ShareDBServer.load({
96162
96213
  auth,
96163
- serverUrl: options.serverUrl
96214
+ serverUrl: options.serverUrl,
96215
+ onCopyVersionLink: (_a = options.options) == null ? void 0 : _a.onCopyVersionLink
96164
96216
  });
96165
- const versionHelper = (_a = server.getVersionHelper) == null ? void 0 : _a.call(server);
96217
+ const versionHelper = (_b = server.getVersionHelper) == null ? void 0 : _b.call(server);
96166
96218
  if (!versionHelper) {
96167
96219
  throw new Error("the editor does not support to show versions");
96168
96220
  }
@@ -141982,6 +142034,7 @@ ${JSON.stringify(error2, null, 2)}`);
141982
142034
  exports2.DrawioPasteHandler = DrawioPasteHandler;
141983
142035
  exports2.Dropdown = Dropdown;
141984
142036
  exports2.DropdownFilterableList = DropdownFilterableList;
142037
+ exports2.Edit2Icon = Edit2Icon;
141985
142038
  exports2.EditIcon = EditIcon;
141986
142039
  exports2.EditorBlocks = EditorBlocks;
141987
142040
  exports2.EditorBoxes = EditorBoxes;
@@ -142138,6 +142191,7 @@ ${JSON.stringify(error2, null, 2)}`);
142138
142191
  exports2.RemoteCaretsInsertion = RemoteCaretsInsertion;
142139
142192
  exports2.RemoteUsers = RemoteUsers;
142140
142193
  exports2.RequestReloadError = RequestReloadError;
142194
+ exports2.RevertIcon = RevertIcon;
142141
142195
  exports2.RichText = RichText;
142142
142196
  exports2.RightArrowIcon = rightArrow;
142143
142197
  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.2",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {