@superdoc-dev/cli 0.2.0-next.15 → 0.2.0-next.16

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 +47 -45
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -89645,9 +89645,9 @@ var init_remark_gfm_RDxetNVS_es = __esm(() => {
89645
89645
  emptyOptions4 = {};
89646
89646
  });
89647
89647
 
89648
- // ../../packages/superdoc/dist/chunks/src-CKC0gVcq.es.js
89649
- var exports_src_CKC0gVcq_es = {};
89650
- __export(exports_src_CKC0gVcq_es, {
89648
+ // ../../packages/superdoc/dist/chunks/src-CwzSv_0N.es.js
89649
+ var exports_src_CwzSv_0N_es = {};
89650
+ __export(exports_src_CwzSv_0N_es, {
89651
89651
  zt: () => defineMark,
89652
89652
  z: () => cM,
89653
89653
  yt: () => removeAwarenessStates,
@@ -138737,43 +138737,36 @@ var Node$13 = class Node$14 {
138737
138737
  const { before = [], after = [] } = attrs;
138738
138738
  const beforeTypes = new Set(before.map((mark2) => mark2.type));
138739
138739
  const afterTypes = new Set(after.map((mark2) => mark2.type));
138740
- const added = [...afterTypes].filter((type) => !beforeTypes.has(type));
138741
- const removed = [...beforeTypes].filter((type) => !afterTypes.has(type));
138742
- const messages = [];
138743
- const nonTextStyleAdded = added.filter((type) => !["textStyle", "commentMark"].includes(type));
138744
- if (nonTextStyleAdded.length)
138745
- messages.push(`Added formatting: ${nonTextStyleAdded.join(", ")}`);
138746
- const nonTextStyleRemoved = removed.filter((type) => !["textStyle", "commentMark"].includes(type));
138747
- if (nonTextStyleRemoved.length)
138748
- messages.push(`Removed formatting: ${nonTextStyleRemoved.join(", ")}`);
138740
+ const ignore2 = new Set(["textStyle", "commentMark"]);
138741
+ const parts = [];
138742
+ const added = [...afterTypes].filter((t) => !beforeTypes.has(t) && !ignore2.has(t));
138743
+ for (const type of added)
138744
+ parts.push(type);
138745
+ const removed = [...beforeTypes].filter((t) => !afterTypes.has(t) && !ignore2.has(t));
138746
+ for (const type of removed)
138747
+ parts.push(`removed ${type}`);
138749
138748
  const beforeTextStyle = before.find((mark2) => mark2.type === "textStyle")?.attrs || {};
138750
138749
  const afterTextStyle = after.find((mark2) => mark2.type === "textStyle")?.attrs || {};
138751
- const textStyleChanges = [];
138752
138750
  const formatAttrName = (attr) => attr.replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase();
138753
- Object.keys({
138751
+ for (const attr of Object.keys({
138754
138752
  ...beforeTextStyle,
138755
138753
  ...afterTextStyle
138756
- }).forEach((attr) => {
138757
- const beforeValue = beforeTextStyle[attr];
138758
- const afterValue = afterTextStyle[attr];
138759
- if (beforeValue !== afterValue)
138760
- if (afterValue === null)
138761
- return;
138762
- else if (attr === "color")
138763
- textStyleChanges.push(`Changed color`);
138764
- else {
138765
- const label = formatAttrName(attr);
138766
- if (beforeValue === undefined || beforeValue === null)
138767
- textStyleChanges.push(`Set ${label} to ${afterValue}`);
138768
- else if (afterValue === undefined || afterValue === null)
138769
- textStyleChanges.push(`Removed ${label} (was ${beforeValue})`);
138770
- else
138771
- textStyleChanges.push(`Changed ${label} from ${beforeValue} to ${afterValue}`);
138772
- }
138773
- });
138774
- if (textStyleChanges.length)
138775
- messages.push(`Modified text style: ${textStyleChanges.join(", ")}`);
138776
- return messages.length ? messages.join(". ") : "No formatting changes.";
138754
+ })) {
138755
+ const beforeVal = beforeTextStyle[attr];
138756
+ const afterVal = afterTextStyle[attr];
138757
+ if (beforeVal === afterVal || afterVal === null)
138758
+ continue;
138759
+ const label = formatAttrName(attr);
138760
+ if (attr === "color")
138761
+ parts.push("color");
138762
+ else if (beforeVal === undefined || beforeVal === null)
138763
+ parts.push(`${label} ${afterVal}`);
138764
+ else if (afterVal === undefined)
138765
+ parts.push(`removed ${label}`);
138766
+ else
138767
+ parts.push(`${label} ${afterVal}`);
138768
+ }
138769
+ return parts.length ? parts.join(", ") : "formatting";
138777
138770
  }, DEFAULT_ACTIVE_ALPHA, DEFAULT_INACTIVE_ALPHA, clampOpacity = (value) => {
138778
138771
  if (!Number.isFinite(value))
138779
138772
  return null;
@@ -142331,11 +142324,20 @@ var Node$13 = class Node$14 {
142331
142324
  }
142332
142325
 
142333
142326
  .superdoc-layout .track-insert-dec.highlighted.track-change-focused {
142327
+ border-style: solid;
142334
142328
  border-width: 2px;
142329
+ background-color: #399c7244;
142335
142330
  }
142336
142331
 
142337
142332
  .superdoc-layout .track-delete-dec.highlighted.track-change-focused {
142333
+ border-style: solid;
142338
142334
  border-width: 2px;
142335
+ background-color: #cb0e4744;
142336
+ }
142337
+
142338
+ .superdoc-layout .track-format-dec.highlighted.track-change-focused {
142339
+ border-bottom-width: 3px;
142340
+ background-color: #ffd70033;
142339
142341
  }
142340
142342
  `, SDT_CONTAINER_STYLES = `
142341
142343
  /* Document Section - Block-level container with gray border and hover tooltip */
@@ -144340,7 +144342,7 @@ var Node$13 = class Node$14 {
144340
144342
  if ("underline" in run2 && run2.underline && typeof run2.underline === "object")
144341
144343
  return run2.underline.color ?? "";
144342
144344
  return "";
144343
- }, LIST_MARKER_GAP = 8, DEFAULT_PAGE_HEIGHT_PX = 1056, DEFAULT_VIRTUALIZED_PAGE_GAP = 72, COMMENT_EXTERNAL_COLOR = "#B1124B", COMMENT_INTERNAL_COLOR = "#078383", COMMENT_INACTIVE_ALPHA = "40", COMMENT_ACTIVE_ALPHA = "66", LINK_DATASET_KEYS, MAX_HREF_LENGTH = 2048, SAFE_ANCHOR_PATTERN, MAX_DATA_URL_LENGTH, VALID_IMAGE_DATA_URL, MAX_RESIZE_MULTIPLIER = 3, FALLBACK_MAX_DIMENSION = 1000, MIN_IMAGE_DIMENSION = 20, AMBIGUOUS_LINK_PATTERNS, linkMetrics, TRACK_CHANGE_BASE_CLASS, TRACK_CHANGE_FOCUSED_CLASS = "track-change-focused", TRACK_CHANGE_MODIFIER_CLASS, LINK_TARGET_SET, normalizeAnchor = (value) => {
144345
+ }, LIST_MARKER_GAP = 8, DEFAULT_PAGE_HEIGHT_PX = 1056, DEFAULT_VIRTUALIZED_PAGE_GAP = 72, COMMENT_EXTERNAL_COLOR = "#B1124B", COMMENT_INTERNAL_COLOR = "#078383", COMMENT_INACTIVE_ALPHA = "40", COMMENT_ACTIVE_ALPHA = "66", COMMENT_FADED_ALPHA = "20", LINK_DATASET_KEYS, MAX_HREF_LENGTH = 2048, SAFE_ANCHOR_PATTERN, MAX_DATA_URL_LENGTH, VALID_IMAGE_DATA_URL, MAX_RESIZE_MULTIPLIER = 3, FALLBACK_MAX_DIMENSION = 1000, MIN_IMAGE_DIMENSION = 20, AMBIGUOUS_LINK_PATTERNS, linkMetrics, TRACK_CHANGE_BASE_CLASS, TRACK_CHANGE_FOCUSED_CLASS = "track-change-focused", TRACK_CHANGE_MODIFIER_CLASS, LINK_TARGET_SET, normalizeAnchor = (value) => {
144344
144346
  if (typeof value !== "string")
144345
144347
  return null;
144346
144348
  const trimmed = value.trim();
@@ -144949,7 +144951,7 @@ var Node$13 = class Node$14 {
144949
144951
  hasNestedComments: nestedComments.length > 0
144950
144952
  };
144951
144953
  }
144952
- return {};
144954
+ return { color: `${comments[0].internal ? COMMENT_INTERNAL_COLOR : COMMENT_EXTERNAL_COLOR}${COMMENT_FADED_ALPHA}` };
144953
144955
  }
144954
144956
  return { color: `${comments[0].internal ? COMMENT_INTERNAL_COLOR : COMMENT_EXTERNAL_COLOR}${COMMENT_INACTIVE_ALPHA}` };
144955
144957
  }, applyRunDataAttributes = (element3, dataAttrs) => {
@@ -158800,7 +158802,7 @@ var Node$13 = class Node$14 {
158800
158802
  trackedChanges: context.trackedChanges ?? []
158801
158803
  });
158802
158804
  }, _hoisted_1$6, _hoisted_2$1, _hoisted_3, _hoisted_4, ContextMenu_default, _hoisted_1$5, BasicUpload_default, _hoisted_1$4, MIN_WIDTH = 200, PPI = 96, alignment = "flex-end", Ruler_default, GenericPopover_default, _hoisted_1$3, RESIZE_HANDLE_WIDTH_PX = 9, RESIZE_HANDLE_OFFSET_PX = 4, DRAG_OVERLAY_EXTENSION_PX = 1000, MIN_DRAG_OVERLAY_WIDTH_PX = 2000, THROTTLE_INTERVAL_MS = 16, MIN_RESIZE_DELTA_PX = 1, TableResizeOverlay_default, _hoisted_1$2, OVERLAY_EXPANSION_PX = 2000, RESIZE_HANDLE_SIZE_PX = 12, MOUSE_MOVE_THROTTLE_MS = 16, DIMENSION_CHANGE_THRESHOLD_PX = 1, Z_INDEX_OVERLAY = 10, Z_INDEX_HANDLE = 15, Z_INDEX_GUIDELINE = 20, ImageResizeOverlay_default, LINK_CLICK_DEBOUNCE_MS = 300, CURSOR_UPDATE_TIMEOUT_MS = 10, LinkClickHandler_default, _hoisted_1$1, _hoisted_2, DOCX2 = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", TABLE_RESIZE_HOVER_THRESHOLD = 8, TABLE_RESIZE_THROTTLE_MS = 16, SuperEditor_default, _hoisted_1, SuperInput_default, SlashMenu, Extensions;
158803
- var init_src_CKC0gVcq_es = __esm(() => {
158805
+ var init_src_CwzSv_0N_es = __esm(() => {
158804
158806
  init_rolldown_runtime_B2q5OVn9_es();
158805
158807
  init_SuperConverter_DR7gPmcP_es();
158806
158808
  init_jszip_ChlR43oI_es();
@@ -192198,8 +192200,8 @@ function print() { __p += __j.call(arguments, '') }
192198
192200
  return isObjectLike_default(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
192199
192201
  };
192200
192202
  stubFalse_default = stubFalse;
192201
- freeExports$2 = typeof exports_src_CKC0gVcq_es == "object" && exports_src_CKC0gVcq_es && !exports_src_CKC0gVcq_es.nodeType && exports_src_CKC0gVcq_es;
192202
- freeModule$2 = freeExports$2 && typeof module_src_CKC0gVcq_es == "object" && module_src_CKC0gVcq_es && !module_src_CKC0gVcq_es.nodeType && module_src_CKC0gVcq_es;
192203
+ freeExports$2 = typeof exports_src_CwzSv_0N_es == "object" && exports_src_CwzSv_0N_es && !exports_src_CwzSv_0N_es.nodeType && exports_src_CwzSv_0N_es;
192204
+ freeModule$2 = freeExports$2 && typeof module_src_CwzSv_0N_es == "object" && module_src_CwzSv_0N_es && !module_src_CwzSv_0N_es.nodeType && module_src_CwzSv_0N_es;
192203
192205
  Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? _root_default.Buffer : undefined;
192204
192206
  isBuffer_default = (Buffer$1 ? Buffer$1.isBuffer : undefined) || stubFalse_default;
192205
192207
  typedArrayTags = {};
@@ -192207,8 +192209,8 @@ function print() { __p += __j.call(arguments, '') }
192207
192209
  typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
192208
192210
  _baseIsTypedArray_default = baseIsTypedArray;
192209
192211
  _baseUnary_default = baseUnary;
192210
- freeExports$1 = typeof exports_src_CKC0gVcq_es == "object" && exports_src_CKC0gVcq_es && !exports_src_CKC0gVcq_es.nodeType && exports_src_CKC0gVcq_es;
192211
- freeModule$1 = freeExports$1 && typeof module_src_CKC0gVcq_es == "object" && module_src_CKC0gVcq_es && !module_src_CKC0gVcq_es.nodeType && module_src_CKC0gVcq_es;
192212
+ freeExports$1 = typeof exports_src_CwzSv_0N_es == "object" && exports_src_CwzSv_0N_es && !exports_src_CwzSv_0N_es.nodeType && exports_src_CwzSv_0N_es;
192213
+ freeModule$1 = freeExports$1 && typeof module_src_CwzSv_0N_es == "object" && module_src_CwzSv_0N_es && !module_src_CwzSv_0N_es.nodeType && module_src_CwzSv_0N_es;
192212
192214
  freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && _freeGlobal_default.process;
192213
192215
  _nodeUtil_default = function() {
192214
192216
  try {
@@ -192313,8 +192315,8 @@ function print() { __p += __j.call(arguments, '') }
192313
192315
  Stack.prototype.has = _stackHas_default;
192314
192316
  Stack.prototype.set = _stackSet_default;
192315
192317
  _Stack_default = Stack;
192316
- freeExports = typeof exports_src_CKC0gVcq_es == "object" && exports_src_CKC0gVcq_es && !exports_src_CKC0gVcq_es.nodeType && exports_src_CKC0gVcq_es;
192317
- freeModule = freeExports && typeof module_src_CKC0gVcq_es == "object" && module_src_CKC0gVcq_es && !module_src_CKC0gVcq_es.nodeType && module_src_CKC0gVcq_es;
192318
+ freeExports = typeof exports_src_CwzSv_0N_es == "object" && exports_src_CwzSv_0N_es && !exports_src_CwzSv_0N_es.nodeType && exports_src_CwzSv_0N_es;
192319
+ freeModule = freeExports && typeof module_src_CwzSv_0N_es == "object" && module_src_CwzSv_0N_es && !module_src_CwzSv_0N_es.nodeType && module_src_CwzSv_0N_es;
192318
192320
  Buffer4 = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : undefined;
192319
192321
  allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : undefined;
192320
192322
  _cloneBuffer_default = cloneBuffer;
@@ -199966,7 +199968,7 @@ var init_zipper_BJHqrQMq_es = __esm(() => {
199966
199968
 
199967
199969
  // ../../packages/superdoc/dist/super-editor.es.js
199968
199970
  var init_super_editor_es = __esm(() => {
199969
- init_src_CKC0gVcq_es();
199971
+ init_src_CwzSv_0N_es();
199970
199972
  init_SuperConverter_DR7gPmcP_es();
199971
199973
  init_jszip_ChlR43oI_es();
199972
199974
  init_xml_js_DLE8mr0n_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.2.0-next.15",
3
+ "version": "0.2.0-next.16",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -28,11 +28,11 @@
28
28
  "access": "public"
29
29
  },
30
30
  "optionalDependencies": {
31
- "@superdoc-dev/cli-darwin-arm64": "0.2.0-next.15",
32
- "@superdoc-dev/cli-darwin-x64": "0.2.0-next.15",
33
- "@superdoc-dev/cli-linux-x64": "0.2.0-next.15",
34
- "@superdoc-dev/cli-windows-x64": "0.2.0-next.15",
35
- "@superdoc-dev/cli-linux-arm64": "0.2.0-next.15"
31
+ "@superdoc-dev/cli-darwin-arm64": "0.2.0-next.16",
32
+ "@superdoc-dev/cli-darwin-x64": "0.2.0-next.16",
33
+ "@superdoc-dev/cli-linux-x64": "0.2.0-next.16",
34
+ "@superdoc-dev/cli-linux-arm64": "0.2.0-next.16",
35
+ "@superdoc-dev/cli-windows-x64": "0.2.0-next.16"
36
36
  },
37
37
  "scripts": {
38
38
  "dev": "bun run src/index.ts",