@superdoc-dev/cli 0.2.0-next.87 → 0.2.0-next.88

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 +38 -25
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -886,13 +886,13 @@ var schemaBooleanOrNull = () => ({
886
886
  tracked: true,
887
887
  carrier: markCarrier(markName),
888
888
  schema: schemaBooleanOrNull()
889
- }), markTextStyleValue = (key, type, ooxmlElement, schema) => ({
889
+ }), markTextStyleValue = (key, type, ooxmlElement, schema, textStyleAttr) => ({
890
890
  key,
891
891
  type,
892
892
  ooxmlElement,
893
893
  storage: "mark",
894
894
  tracked: true,
895
- carrier: markCarrier("textStyle", key),
895
+ carrier: markCarrier("textStyle", textStyleAttr ?? key),
896
896
  schema
897
897
  }), runAttribute = (key, type, ooxmlElement, schema, runPropertyKey) => ({
898
898
  key,
@@ -957,7 +957,7 @@ var init_inline_run_patch = __esm(() => {
957
957
  markTextStyleValue("position", "number", "w:position", schemaNumberOrNull()),
958
958
  runAttribute("dstrike", "boolean", "w:dstrike", schemaBooleanOrNull()),
959
959
  runAttribute("smallCaps", "boolean", "w:smallCaps", schemaBooleanOrNull()),
960
- runAttribute("caps", "boolean", "w:caps", schemaBooleanOrNull()),
960
+ markTextStyleValue("caps", "boolean", "w:caps", schemaBooleanOrNull(), "textTransform"),
961
961
  runAttribute("shading", "object", "w:shd", schemaObjectOrNull({
962
962
  fill: { oneOf: [{ type: "string", minLength: 1 }, { type: "null" }] },
963
963
  color: { oneOf: [{ type: "string", minLength: 1 }, { type: "null" }] },
@@ -33220,7 +33220,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
33220
33220
  emptyOptions2 = {};
33221
33221
  });
33222
33222
 
33223
- // ../../packages/superdoc/dist/chunks/SuperConverter-BcmJ8-gc.es.js
33223
+ // ../../packages/superdoc/dist/chunks/SuperConverter-CHHvo5ta.es.js
33224
33224
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
33225
33225
  const fieldValue = extension$1.config[field];
33226
33226
  if (typeof fieldValue === "function")
@@ -53630,13 +53630,13 @@ var isRegExp = (value) => {
53630
53630
  tracked: true,
53631
53631
  carrier: markCarrier2(markName),
53632
53632
  schema: schemaBooleanOrNull2()
53633
- }), markTextStyleValue2 = (key, type, ooxmlElement, schema) => ({
53633
+ }), markTextStyleValue2 = (key, type, ooxmlElement, schema, textStyleAttr) => ({
53634
53634
  key,
53635
53635
  type,
53636
53636
  ooxmlElement,
53637
53637
  storage: "mark",
53638
53638
  tracked: true,
53639
- carrier: markCarrier2("textStyle", key),
53639
+ carrier: markCarrier2("textStyle", textStyleAttr ?? key),
53640
53640
  schema
53641
53641
  }), runAttribute2 = (key, type, ooxmlElement, schema, runPropertyKey) => ({
53642
53642
  key,
@@ -65012,7 +65012,7 @@ var isRegExp = (value) => {
65012
65012
  state.kern = kernNode.attributes["w:val"];
65013
65013
  }
65014
65014
  }, SuperConverter;
65015
- var init_SuperConverter_BcmJ8_gc_es = __esm(() => {
65015
+ var init_SuperConverter_CHHvo5ta_es = __esm(() => {
65016
65016
  init_rolldown_runtime_B2q5OVn9_es();
65017
65017
  init_jszip_ChlR43oI_es();
65018
65018
  init_xml_js_DLE8mr0n_es();
@@ -67552,7 +67552,7 @@ var init_SuperConverter_BcmJ8_gc_es = __esm(() => {
67552
67552
  markTextStyleValue2("position", "number", "w:position", schemaNumberOrNull2()),
67553
67553
  runAttribute2("dstrike", "boolean", "w:dstrike", schemaBooleanOrNull2()),
67554
67554
  runAttribute2("smallCaps", "boolean", "w:smallCaps", schemaBooleanOrNull2()),
67555
- runAttribute2("caps", "boolean", "w:caps", schemaBooleanOrNull2()),
67555
+ markTextStyleValue2("caps", "boolean", "w:caps", schemaBooleanOrNull2(), "textTransform"),
67556
67556
  runAttribute2("shading", "object", "w:shd", schemaObjectOrNull2({
67557
67557
  fill: { oneOf: [{
67558
67558
  type: "string",
@@ -121745,9 +121745,9 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
121745
121745
  init_remark_gfm_z_sDF4ss_es();
121746
121746
  });
121747
121747
 
121748
- // ../../packages/superdoc/dist/chunks/src-LqliKMID.es.js
121749
- var exports_src_LqliKMID_es = {};
121750
- __export(exports_src_LqliKMID_es, {
121748
+ // ../../packages/superdoc/dist/chunks/src-BneEE4-O.es.js
121749
+ var exports_src_BneEE4_O_es = {};
121750
+ __export(exports_src_BneEE4_O_es, {
121751
121751
  zt: () => defineMark,
121752
121752
  z: () => cM,
121753
121753
  yt: () => removeAwarenessStates,
@@ -132162,6 +132162,11 @@ function toPointString(value) {
132162
132162
  function toHalfPoints(value) {
132163
132163
  return Math.round(value * 2);
132164
132164
  }
132165
+ function capsToTextTransform(caps) {
132166
+ if (caps === null)
132167
+ return null;
132168
+ return caps ? "uppercase" : "none";
132169
+ }
132165
132170
  function collectInlineTextSegments(doc$2, absFrom, absTo) {
132166
132171
  const segments = [];
132167
132172
  doc$2.nodesBetween(absFrom, absTo, (node3, pos) => {
@@ -132211,8 +132216,7 @@ function applyHighlightPatch(tr, markType, absFrom, absTo, value) {
132211
132216
  }
132212
132217
  function mergeTextStyleAttrs(currentAttrs, patch3) {
132213
132218
  const next2 = { ...currentAttrs };
132214
- for (const key$1 of TEXT_STYLE_KEYS) {
132215
- const value = patch3[key$1];
132219
+ for (const [key$1, value] of Object.entries(patch3)) {
132216
132220
  if (value === undefined)
132217
132221
  continue;
132218
132222
  if (value === null) {
@@ -132515,6 +132519,8 @@ function applyInlinePatchToRange(editor, tr, absFrom, absTo, inline) {
132515
132519
  for (const key$1 of TEXT_STYLE_KEYS)
132516
132520
  if (inline[key$1] !== undefined)
132517
132521
  textStylePatch[key$1] = inline[key$1];
132522
+ if (inline.caps !== undefined)
132523
+ textStylePatch.textTransform = capsToTextTransform(inline.caps ?? null);
132518
132524
  if (applyTextStylePatch(tr, schema.marks.textStyle, absFrom, absTo, textStylePatch))
132519
132525
  changed = true;
132520
132526
  const runAttributeUpdates = buildRunAttributeUpdates(inline);
@@ -198723,9 +198729,9 @@ var Node$13 = class Node$14 {
198723
198729
  trackedChanges: context.trackedChanges ?? []
198724
198730
  });
198725
198731
  }, _hoisted_1$6, _hoisted_2$2, _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, _hoisted_2$1, RESIZE_HANDLE_WIDTH_PX = 9, RESIZE_HANDLE_HEIGHT_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, POPOVER_VERTICAL_OFFSET_PX = 15, 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;
198726
- var init_src_LqliKMID_es = __esm(() => {
198732
+ var init_src_BneEE4_O_es = __esm(() => {
198727
198733
  init_rolldown_runtime_B2q5OVn9_es();
198728
- init_SuperConverter_BcmJ8_gc_es();
198734
+ init_SuperConverter_CHHvo5ta_es();
198729
198735
  init_jszip_ChlR43oI_es();
198730
198736
  init_uuid_qzgm05fK_es();
198731
198737
  init_constants_CMPtQbp7_es();
@@ -230433,8 +230439,8 @@ function print() { __p += __j.call(arguments, '') }
230433
230439
  return isObjectLike_default(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
230434
230440
  };
230435
230441
  stubFalse_default = stubFalse;
230436
- freeExports$2 = typeof exports_src_LqliKMID_es == "object" && exports_src_LqliKMID_es && !exports_src_LqliKMID_es.nodeType && exports_src_LqliKMID_es;
230437
- freeModule$2 = freeExports$2 && typeof module_src_LqliKMID_es == "object" && module_src_LqliKMID_es && !module_src_LqliKMID_es.nodeType && module_src_LqliKMID_es;
230442
+ freeExports$2 = typeof exports_src_BneEE4_O_es == "object" && exports_src_BneEE4_O_es && !exports_src_BneEE4_O_es.nodeType && exports_src_BneEE4_O_es;
230443
+ freeModule$2 = freeExports$2 && typeof module_src_BneEE4_O_es == "object" && module_src_BneEE4_O_es && !module_src_BneEE4_O_es.nodeType && module_src_BneEE4_O_es;
230438
230444
  Buffer$1 = freeModule$2 && freeModule$2.exports === freeExports$2 ? _root_default.Buffer : undefined;
230439
230445
  isBuffer_default = (Buffer$1 ? Buffer$1.isBuffer : undefined) || stubFalse_default;
230440
230446
  typedArrayTags = {};
@@ -230442,8 +230448,8 @@ function print() { __p += __j.call(arguments, '') }
230442
230448
  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;
230443
230449
  _baseIsTypedArray_default = baseIsTypedArray;
230444
230450
  _baseUnary_default = baseUnary;
230445
- freeExports$1 = typeof exports_src_LqliKMID_es == "object" && exports_src_LqliKMID_es && !exports_src_LqliKMID_es.nodeType && exports_src_LqliKMID_es;
230446
- freeModule$1 = freeExports$1 && typeof module_src_LqliKMID_es == "object" && module_src_LqliKMID_es && !module_src_LqliKMID_es.nodeType && module_src_LqliKMID_es;
230451
+ freeExports$1 = typeof exports_src_BneEE4_O_es == "object" && exports_src_BneEE4_O_es && !exports_src_BneEE4_O_es.nodeType && exports_src_BneEE4_O_es;
230452
+ freeModule$1 = freeExports$1 && typeof module_src_BneEE4_O_es == "object" && module_src_BneEE4_O_es && !module_src_BneEE4_O_es.nodeType && module_src_BneEE4_O_es;
230447
230453
  freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && _freeGlobal_default.process;
230448
230454
  _nodeUtil_default = function() {
230449
230455
  try {
@@ -230548,8 +230554,8 @@ function print() { __p += __j.call(arguments, '') }
230548
230554
  Stack.prototype.has = _stackHas_default;
230549
230555
  Stack.prototype.set = _stackSet_default;
230550
230556
  _Stack_default = Stack;
230551
- freeExports = typeof exports_src_LqliKMID_es == "object" && exports_src_LqliKMID_es && !exports_src_LqliKMID_es.nodeType && exports_src_LqliKMID_es;
230552
- freeModule = freeExports && typeof module_src_LqliKMID_es == "object" && module_src_LqliKMID_es && !module_src_LqliKMID_es.nodeType && module_src_LqliKMID_es;
230557
+ freeExports = typeof exports_src_BneEE4_O_es == "object" && exports_src_BneEE4_O_es && !exports_src_BneEE4_O_es.nodeType && exports_src_BneEE4_O_es;
230558
+ freeModule = freeExports && typeof module_src_BneEE4_O_es == "object" && module_src_BneEE4_O_es && !module_src_BneEE4_O_es.nodeType && module_src_BneEE4_O_es;
230553
230559
  Buffer4 = freeModule && freeModule.exports === freeExports ? _root_default.Buffer : undefined;
230554
230560
  allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : undefined;
230555
230561
  _cloneBuffer_default = cloneBuffer;
@@ -238629,8 +238635,8 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
238629
238635
 
238630
238636
  // ../../packages/superdoc/dist/super-editor.es.js
238631
238637
  var init_super_editor_es = __esm(() => {
238632
- init_src_LqliKMID_es();
238633
- init_SuperConverter_BcmJ8_gc_es();
238638
+ init_src_BneEE4_O_es();
238639
+ init_SuperConverter_CHHvo5ta_es();
238634
238640
  init_jszip_ChlR43oI_es();
238635
238641
  init_xml_js_DLE8mr0n_es();
238636
238642
  init_constants_CMPtQbp7_es();
@@ -302702,6 +302708,11 @@ function toPointString2(value) {
302702
302708
  function toHalfPoints2(value) {
302703
302709
  return Math.round(value * 2);
302704
302710
  }
302711
+ function capsToTextTransform2(caps) {
302712
+ if (caps === null)
302713
+ return null;
302714
+ return caps ? "uppercase" : "none";
302715
+ }
302705
302716
  function collectInlineTextSegments2(doc4, absFrom, absTo) {
302706
302717
  const segments = [];
302707
302718
  doc4.nodesBetween(absFrom, absTo, (node4, pos) => {
@@ -302751,8 +302762,7 @@ function applyHighlightPatch2(tr, markType, absFrom, absTo, value) {
302751
302762
  }
302752
302763
  function mergeTextStyleAttrs2(currentAttrs, patch3) {
302753
302764
  const next2 = { ...currentAttrs };
302754
- for (const key2 of TEXT_STYLE_KEYS2) {
302755
- const value = patch3[key2];
302765
+ for (const [key2, value] of Object.entries(patch3)) {
302756
302766
  if (value === undefined)
302757
302767
  continue;
302758
302768
  if (value === null) {
@@ -303050,6 +303060,9 @@ function applyInlinePatchToRange2(editor, tr, absFrom, absTo, inline) {
303050
303060
  textStylePatch[key2] = inline[key2];
303051
303061
  }
303052
303062
  }
303063
+ if (inline.caps !== undefined) {
303064
+ textStylePatch.textTransform = capsToTextTransform2(inline.caps ?? null);
303065
+ }
303053
303066
  if (applyTextStylePatch2(tr, schema.marks.textStyle, absFrom, absTo, textStylePatch)) {
303054
303067
  changed = true;
303055
303068
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.2.0-next.87",
3
+ "version": "0.2.0-next.88",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -22,19 +22,19 @@
22
22
  "typescript": "^5.9.2",
23
23
  "@superdoc/document-api": "0.0.1",
24
24
  "@superdoc/pm-adapter": "0.0.0",
25
- "superdoc": "1.17.0",
26
- "@superdoc/super-editor": "0.0.1"
25
+ "@superdoc/super-editor": "0.0.1",
26
+ "superdoc": "1.17.0"
27
27
  },
28
28
  "module": "src/index.ts",
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
32
  "optionalDependencies": {
33
- "@superdoc-dev/cli-darwin-arm64": "0.2.0-next.87",
34
- "@superdoc-dev/cli-darwin-x64": "0.2.0-next.87",
35
- "@superdoc-dev/cli-linux-arm64": "0.2.0-next.87",
36
- "@superdoc-dev/cli-linux-x64": "0.2.0-next.87",
37
- "@superdoc-dev/cli-windows-x64": "0.2.0-next.87"
33
+ "@superdoc-dev/cli-darwin-arm64": "0.2.0-next.88",
34
+ "@superdoc-dev/cli-darwin-x64": "0.2.0-next.88",
35
+ "@superdoc-dev/cli-linux-arm64": "0.2.0-next.88",
36
+ "@superdoc-dev/cli-linux-x64": "0.2.0-next.88",
37
+ "@superdoc-dev/cli-windows-x64": "0.2.0-next.88"
38
38
  },
39
39
  "scripts": {
40
40
  "dev": "bun run src/index.ts",