@ones-editor/editor 1.1.10-beta.12 → 1.1.10-beta.14

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
@@ -8012,17 +8012,12 @@ var __publicField = (obj, key, value) => {
8012
8012
  return false;
8013
8013
  }
8014
8014
  async function setClipboardData(items) {
8015
- const clipboardData = window.clipboardData;
8016
- if (clipboardData) {
8017
- clipboardData.setData("Text", "text text text");
8018
- return true;
8019
- }
8020
8015
  try {
8021
- const clipboardData2 = {};
8016
+ const clipboardData = {};
8022
8017
  items.forEach((item) => {
8023
- clipboardData2[item.type] = item.data;
8018
+ clipboardData[item.type] = item.data;
8024
8019
  });
8025
- const clipboardItems = new ClipboardItem(clipboardData2);
8020
+ const clipboardItems = new ClipboardItem(clipboardData);
8026
8021
  await navigator.clipboard.write([clipboardItems]);
8027
8022
  return true;
8028
8023
  } catch (err) {
@@ -34305,6 +34300,9 @@ ${codeText}
34305
34300
  __publicField(this, "reAuth", async () => {
34306
34301
  if (this.connection && this.reauthFunc) {
34307
34302
  const newAuth = await this.reauthFunc();
34303
+ if (window.isReauthError) {
34304
+ throw new Error("reauth error");
34305
+ }
34308
34306
  await this.auth(newAuth);
34309
34307
  const pingOptions = this.pingOptions;
34310
34308
  this.connection._initializeHandshake = function handshake() {
@@ -34374,6 +34372,9 @@ ${codeText}
34374
34372
  const thatWs = this.ws;
34375
34373
  const pingOptions = this.pingOptions;
34376
34374
  this.connection._initializeHandshake = function handshake() {
34375
+ if (window.isTokenExpired) {
34376
+ auth.token = "aaabbbccc";
34377
+ }
34377
34378
  this.send({ a: "hs", id: this.id, auth, options: { ping: pingOptions } });
34378
34379
  if (this._ping == null) {
34379
34380
  this._ping = window.setInterval(() => {
@@ -41413,7 +41414,9 @@ ${codeText}
41413
41414
  }
41414
41415
  const logger$1S = getLogger("column-width");
41415
41416
  function setColumnWidth(table, colIndex, width) {
41416
- getTableCol(table, colIndex).style.width = `${width}px`;
41417
+ const col = getTableCol(table, colIndex);
41418
+ col.style.width = `${width}px`;
41419
+ col.style.minWidth = `${width}px`;
41417
41420
  }
41418
41421
  function getTableColumnWidthsFromDom(table) {
41419
41422
  const tableCols = Array.from(table.querySelector("colgroup").children);
@@ -48248,6 +48251,7 @@ $$${mathData.mathjaxText}$$
48248
48251
  const col = createElement("col", [], colGroup);
48249
48252
  if (colsWidth[i]) {
48250
48253
  col.style.width = `${colsWidth[i]}px`;
48254
+ col.style.minWidth = `${colsWidth[i]}px`;
48251
48255
  }
48252
48256
  }
48253
48257
  const tableBody = createElement("tbody", [], table);
@@ -75713,7 +75717,7 @@ ${data.flowchartText}
75713
75717
  }
75714
75718
  }
75715
75719
  });
75716
- editor.version = "1.1.10-beta.12";
75720
+ editor.version = "1.1.10-beta.14";
75717
75721
  return editor;
75718
75722
  }
75719
75723
  function isDoc(doc2) {
@@ -75786,7 +75790,7 @@ ${data.flowchartText}
75786
75790
  });
75787
75791
  editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
75788
75792
  OnesEditorToolbar.register(editor);
75789
- editor.version = "1.1.10-beta.12";
75793
+ editor.version = "1.1.10-beta.14";
75790
75794
  return editor;
75791
75795
  }
75792
75796
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "1.1.10-beta.12",
3
+ "version": "1.1.10-beta.14",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",