@superdoc-dev/cli 0.5.0-next.71 → 0.5.0-next.73

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -16
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -204645,7 +204645,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
204645
204645
  init_remark_gfm_BhnWr3yf_es();
204646
204646
  });
204647
204647
 
204648
- // ../../packages/superdoc/dist/chunks/src-BwkoX8vg.es.js
204648
+ // ../../packages/superdoc/dist/chunks/src-Bbl2qm0W.es.js
204649
204649
  function deleteProps(obj, propOrProps) {
204650
204650
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
204651
204651
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -257489,6 +257489,9 @@ function getCommentHighlightThreadIds(target) {
257489
257489
  return [];
257490
257490
  return threadIds.split(",").map((threadId) => threadId.trim()).filter(Boolean);
257491
257491
  }
257492
+ function isDirectSingleCommentHighlightHit(target) {
257493
+ return getCommentHighlightThreadIds(target).length === 1;
257494
+ }
257492
257495
  function resolveTrackChangeThreadId(target) {
257493
257496
  if (!(target instanceof Element))
257494
257497
  return null;
@@ -257561,6 +257564,8 @@ function getActiveCommentThreadId(editor) {
257561
257564
  function shouldIgnoreRepeatClickOnActiveComment(target, clientX, clientY, activeThreadId) {
257562
257565
  if (!activeThreadId)
257563
257566
  return false;
257567
+ if (isDirectSingleCommentHighlightHit(target))
257568
+ return false;
257564
257569
  return resolveCommentThreadIdNearPointer(target, clientX, clientY) === activeThreadId;
257565
257570
  }
257566
257571
  function isInRegisteredSurface(event) {
@@ -268943,9 +268948,9 @@ var Node$13 = class Node$14 {
268943
268948
  id2 = v4_default();
268944
268949
  const insertionMark = tr.doc.type.schema.marks[TrackInsertMarkName].create({
268945
268950
  id: id2,
268946
- author: user.name,
268947
- authorEmail: user.email,
268948
- authorImage: user.image,
268951
+ author: user.name || "",
268952
+ authorEmail: user.email || "",
268953
+ authorImage: user.image || "",
268949
268954
  date
268950
268955
  });
268951
268956
  tr.addMark(from$1, to, insertionMark);
@@ -268984,9 +268989,9 @@ var Node$13 = class Node$14 {
268984
268989
  id2 = v4_default();
268985
268990
  const deletionMark = tr.doc.type.schema.marks[TrackDeleteMarkName].create({
268986
268991
  id: id2,
268987
- author: user.name,
268988
- authorEmail: user.email,
268989
- authorImage: user.image,
268992
+ author: user.name || "",
268993
+ authorEmail: user.email || "",
268994
+ authorImage: user.image || "",
268990
268995
  date
268991
268996
  });
268992
268997
  const deletionMap = new Mapping;
@@ -269403,9 +269408,9 @@ var Node$13 = class Node$14 {
269403
269408
  const newFormatMark = state.schema.marks[TrackFormatMarkName].create({
269404
269409
  id: wid,
269405
269410
  sourceId: formatChangeMark?.attrs?.sourceId || "",
269406
- author: user.name,
269407
- authorEmail: user.email,
269408
- authorImage: user.image,
269411
+ author: user.name || "",
269412
+ authorEmail: user.email || "",
269413
+ authorImage: user.image || "",
269409
269414
  date,
269410
269415
  before: before2,
269411
269416
  after: after2
@@ -269472,9 +269477,9 @@ var Node$13 = class Node$14 {
269472
269477
  const newFormatMark = state.schema.marks[TrackFormatMarkName].create({
269473
269478
  id: formatChangeMark ? formatChangeMark.attrs.id : sharedWid ?? (sharedWid = v4_default()),
269474
269479
  sourceId: formatChangeMark?.attrs?.sourceId || "",
269475
- author: user.name,
269476
- authorEmail: user.email,
269477
- authorImage: user.image,
269480
+ author: user.name || "",
269481
+ authorEmail: user.email || "",
269482
+ authorImage: user.image || "",
269478
269483
  date,
269479
269484
  before: before2,
269480
269485
  after: after2
@@ -285011,6 +285016,8 @@ var Node$13 = class Node$14 {
285011
285016
  return true;
285012
285017
  }
285013
285018
  #handleSingleCommentHighlightClick(event, target, editor) {
285019
+ if (isDirectSingleCommentHighlightHit(target))
285020
+ return false;
285014
285021
  const clickedThreadId = resolveCommentThreadIdNearPointer(target, event.clientX, event.clientY);
285015
285022
  if (!clickedThreadId)
285016
285023
  return false;
@@ -287353,7 +287360,7 @@ var Node$13 = class Node$14 {
287353
287360
  return;
287354
287361
  console.log(...args$1);
287355
287362
  }, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
287356
- var init_src_BwkoX8vg_es = __esm(() => {
287363
+ var init_src_Bbl2qm0W_es = __esm(() => {
287357
287364
  init_rolldown_runtime_Bg48TavK_es();
287358
287365
  init_SuperConverter_DKPcCGTm_es();
287359
287366
  init_jszip_C49i9kUs_es();
@@ -312605,7 +312612,7 @@ function print() { __p += __j.call(arguments, '') }
312605
312612
  this.setOptions({ annotations: true });
312606
312613
  const [docx, media2, mediaFiles, fonts, decryptedData] = await Editor2.loadXmlData(newFile, false, options);
312607
312614
  this.setOptions({
312608
- fileSource: decryptedData ?? newFile,
312615
+ fileSource: decryptedData ?? (newFile instanceof ArrayBuffer ? new Blob([newFile]) : newFile),
312609
312616
  content: docx,
312610
312617
  media: media2,
312611
312618
  mediaFiles,
@@ -321927,7 +321934,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
321927
321934
 
321928
321935
  // ../../packages/superdoc/dist/super-editor.es.js
321929
321936
  var init_super_editor_es = __esm(() => {
321930
- init_src_BwkoX8vg_es();
321937
+ init_src_Bbl2qm0W_es();
321931
321938
  init_SuperConverter_DKPcCGTm_es();
321932
321939
  init_jszip_C49i9kUs_es();
321933
321940
  init_xml_js_CqGKpaft_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.5.0-next.71",
3
+ "version": "0.5.0-next.73",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -26,19 +26,19 @@
26
26
  "typescript": "^5.9.2",
27
27
  "@superdoc/document-api": "0.0.1",
28
28
  "@superdoc/super-editor": "0.0.1",
29
- "superdoc": "1.25.0",
30
- "@superdoc/pm-adapter": "0.0.0"
29
+ "@superdoc/pm-adapter": "0.0.0",
30
+ "superdoc": "1.25.0"
31
31
  },
32
32
  "module": "src/index.ts",
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@superdoc-dev/cli-darwin-arm64": "0.5.0-next.71",
38
- "@superdoc-dev/cli-darwin-x64": "0.5.0-next.71",
39
- "@superdoc-dev/cli-linux-x64": "0.5.0-next.71",
40
- "@superdoc-dev/cli-windows-x64": "0.5.0-next.71",
41
- "@superdoc-dev/cli-linux-arm64": "0.5.0-next.71"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.5.0-next.73",
38
+ "@superdoc-dev/cli-linux-x64": "0.5.0-next.73",
39
+ "@superdoc-dev/cli-darwin-x64": "0.5.0-next.73",
40
+ "@superdoc-dev/cli-linux-arm64": "0.5.0-next.73",
41
+ "@superdoc-dev/cli-windows-x64": "0.5.0-next.73"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",