@superdoc-dev/cli 0.5.0-next.10 → 0.5.0-next.11

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 +292 -21
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -62964,7 +62964,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
62964
62964
  emptyOptions2 = {};
62965
62965
  });
62966
62966
 
62967
- // ../../packages/superdoc/dist/chunks/SuperConverter-DrIZwiji.es.js
62967
+ // ../../packages/superdoc/dist/chunks/SuperConverter-OPfy6vj2.es.js
62968
62968
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
62969
62969
  const fieldValue = extension$1.config[field];
62970
62970
  if (typeof fieldValue === "function")
@@ -106871,7 +106871,7 @@ var isRegExp = (value) => {
106871
106871
  };
106872
106872
  }
106873
106873
  }
106874
- }, cssChecked, cssCheckWarned = false, isInline, EditorView = class {
106874
+ }, cssChecked, cssCheckWarned = false, isInline, __endComposition, EditorView = class {
106875
106875
  constructor(place, props) {
106876
106876
  this._root = null;
106877
106877
  this.focused = false;
@@ -113347,7 +113347,7 @@ var isRegExp = (value) => {
113347
113347
  state.kern = kernNode.attributes["w:val"];
113348
113348
  }
113349
113349
  }, SuperConverter;
113350
- var init_SuperConverter_DrIZwiji_es = __esm(() => {
113350
+ var init_SuperConverter_OPfy6vj2_es = __esm(() => {
113351
113351
  init_rolldown_runtime_B2q5OVn9_es();
113352
113352
  init_jszip_ChlR43oI_es();
113353
113353
  init_xml_js_40FWvL78_es();
@@ -141328,6 +141328,7 @@ var init_SuperConverter_DrIZwiji_es = __esm(() => {
141328
141328
  useCharData = ie$1 && ie_version <= 11;
141329
141329
  cssChecked = /* @__PURE__ */ new WeakMap;
141330
141330
  isInline = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
141331
+ __endComposition = endComposition;
141331
141332
  EditorView.prototype.dispatch = function(tr) {
141332
141333
  let dispatchTransaction = this._props.dispatchTransaction;
141333
141334
  if (dispatchTransaction)
@@ -171648,7 +171649,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
171648
171649
  init_remark_gfm_z_sDF4ss_es();
171649
171650
  });
171650
171651
 
171651
- // ../../packages/superdoc/dist/chunks/src-BySNwqMI.es.js
171652
+ // ../../packages/superdoc/dist/chunks/src-_vWFtSGt.es.js
171652
171653
  function deleteProps(obj, propOrProps) {
171653
171654
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
171654
171655
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -230900,15 +230901,18 @@ var Node$13 = class Node$14 {
230900
230901
  isTrackChangesActive: false,
230901
230902
  onlyOriginalShown: false,
230902
230903
  onlyModifiedShown: false,
230904
+ pendingDeadKeyPlaceholder: null,
230903
230905
  decorations: getTrackChangesDecorations(state, false, false)
230904
230906
  };
230905
230907
  },
230906
230908
  apply(tr, oldState, prevEditorState, newEditorState) {
230907
230909
  const meta2 = tr.getMeta(TrackChangesBasePluginKey);
230910
+ const pendingDeadKeyPlaceholder = meta2 && Object.prototype.hasOwnProperty.call(meta2, "pendingDeadKeyPlaceholder") ? meta2.pendingDeadKeyPlaceholder : oldState.pendingDeadKeyPlaceholder;
230908
230911
  if (meta2 && meta2.type === "TRACK_CHANGES_ENABLE")
230909
230912
  return {
230910
230913
  ...oldState,
230911
230914
  isTrackChangesActive: meta2.value === true,
230915
+ pendingDeadKeyPlaceholder,
230912
230916
  decorations: getTrackChangesDecorations(newEditorState, oldState.onlyOriginalShown, oldState.onlyModifiedShown)
230913
230917
  };
230914
230918
  if (meta2 && meta2.type === "SHOW_ONLY_ORIGINAL")
@@ -230916,6 +230920,7 @@ var Node$13 = class Node$14 {
230916
230920
  ...oldState,
230917
230921
  onlyOriginalShown: meta2.value === true,
230918
230922
  onlyModifiedShown: false,
230923
+ pendingDeadKeyPlaceholder,
230919
230924
  decorations: getTrackChangesDecorations(newEditorState, meta2.value === true, false)
230920
230925
  };
230921
230926
  if (meta2 && meta2.type === "SHOW_ONLY_MODIFIED")
@@ -230923,10 +230928,14 @@ var Node$13 = class Node$14 {
230923
230928
  ...oldState,
230924
230929
  onlyOriginalShown: false,
230925
230930
  onlyModifiedShown: meta2.value === true,
230931
+ pendingDeadKeyPlaceholder,
230926
230932
  decorations: getTrackChangesDecorations(newEditorState, false, meta2.value === true)
230927
230933
  };
230928
230934
  if (!tr.docChanged)
230929
- return oldState;
230935
+ return {
230936
+ ...oldState,
230937
+ pendingDeadKeyPlaceholder
230938
+ };
230930
230939
  if (!meta2) {
230931
230940
  let mightAffectTrackChanges = false;
230932
230941
  tr.steps.forEach((step3) => {
@@ -230936,15 +230945,18 @@ var Node$13 = class Node$14 {
230936
230945
  if (mightAffectTrackChanges)
230937
230946
  return {
230938
230947
  ...oldState,
230948
+ pendingDeadKeyPlaceholder,
230939
230949
  decorations: getTrackChangesDecorations(newEditorState, oldState.onlyOriginalShown, oldState.onlyModifiedShown)
230940
230950
  };
230941
230951
  return {
230942
230952
  ...oldState,
230953
+ pendingDeadKeyPlaceholder,
230943
230954
  decorations: oldState.decorations.map(tr.mapping, tr.doc)
230944
230955
  };
230945
230956
  }
230946
230957
  return {
230947
230958
  ...oldState,
230959
+ pendingDeadKeyPlaceholder,
230948
230960
  decorations: getTrackChangesDecorations(newEditorState, oldState.onlyOriginalShown, oldState.onlyModifiedShown)
230949
230961
  };
230950
230962
  }
@@ -235383,12 +235395,227 @@ var Node$13 = class Node$14 {
235383
235395
  }
235384
235396
  });
235385
235397
  }
235398
+ }, COMPOSITION_INPUT_TYPES, COMBINING_MARK_REGEX, graphemeSegmenter, DEAD_KEY_PLACEHOLDER_MARKS, getTextNodeAtPos = ({ doc: doc$12, pos }) => {
235399
+ let found2 = null;
235400
+ doc$12.nodesBetween(Math.max(0, pos - 1), Math.min(doc$12.content.size, pos + 1), (node3, nodePos) => {
235401
+ if (found2 || !node3.isText || !node3.text)
235402
+ return;
235403
+ const from$1 = nodePos;
235404
+ const to = nodePos + node3.text.length;
235405
+ if (pos >= from$1 && pos < to) {
235406
+ found2 = {
235407
+ node: node3,
235408
+ from: from$1
235409
+ };
235410
+ return false;
235411
+ }
235412
+ });
235413
+ return found2;
235414
+ }, getFirstGrapheme = (text5) => {
235415
+ if (!text5)
235416
+ return "";
235417
+ if (graphemeSegmenter)
235418
+ return graphemeSegmenter.segment(text5)[Symbol.iterator]().next().value?.segment ?? "";
235419
+ const chars = Array.from(text5);
235420
+ if (!chars.length)
235421
+ return "";
235422
+ const grapheme = [chars[0]];
235423
+ for (let index2 = 1;index2 < chars.length; index2 += 1) {
235424
+ if (!COMBINING_MARK_REGEX.test(chars[index2]))
235425
+ break;
235426
+ grapheme.push(chars[index2]);
235427
+ }
235428
+ return grapheme.join("");
235429
+ }, startsWithCompatibleGrapheme = ({ text: text5, combiningMark }) => {
235430
+ const firstGrapheme = getFirstGrapheme(text5);
235431
+ return Boolean(firstGrapheme) && firstGrapheme.normalize("NFD").includes(combiningMark);
235432
+ }, getOwnedDeadKeyPlaceholderInfoAt = ({ doc: doc$12, pos, user }) => {
235433
+ const placeholderChar = doc$12.textBetween(pos, pos + 1);
235434
+ const combiningMark = DEAD_KEY_PLACEHOLDER_MARKS.get(placeholderChar);
235435
+ if (!combiningMark)
235436
+ return null;
235437
+ const textNodeAtPos = getTextNodeAtPos({
235438
+ doc: doc$12,
235439
+ pos
235440
+ });
235441
+ return textNodeAtPos?.node?.marks?.some((mark2) => mark2.type.name === "trackInsert" && mark2.attrs?.authorEmail === user.email) ? {
235442
+ placeholderChar,
235443
+ combiningMark,
235444
+ textNodeAtPos
235445
+ } : null;
235446
+ }, getOwnedDeadKeyPlaceholderAt = ({ doc: doc$12, pos, user, insertedText }) => {
235447
+ const placeholder = getOwnedDeadKeyPlaceholderInfoAt({
235448
+ doc: doc$12,
235449
+ pos,
235450
+ user
235451
+ });
235452
+ if (!placeholder || !startsWithCompatibleGrapheme({
235453
+ text: insertedText,
235454
+ combiningMark: placeholder.combiningMark
235455
+ }))
235456
+ return null;
235457
+ return placeholder;
235458
+ }, getLeadingDeadKeyPlaceholderNormalization = (text5) => {
235459
+ const [placeholderChar] = Array.from(text5);
235460
+ if (!placeholderChar)
235461
+ return null;
235462
+ const combiningMark = DEAD_KEY_PLACEHOLDER_MARKS.get(placeholderChar);
235463
+ if (!combiningMark)
235464
+ return null;
235465
+ const normalizedText = text5.slice(placeholderChar.length);
235466
+ if (!normalizedText || !startsWithCompatibleGrapheme({
235467
+ text: normalizedText,
235468
+ combiningMark
235469
+ }))
235470
+ return null;
235471
+ return {
235472
+ placeholderChar,
235473
+ combiningMark,
235474
+ normalizedText
235475
+ };
235476
+ }, createNormalizedSlice = ({ step: step3, normalizedText, doc: doc$12 }) => {
235477
+ const { schema } = doc$12.type;
235478
+ const firstChild = step3.slice.content.firstChild;
235479
+ if (!firstChild)
235480
+ return null;
235481
+ if (firstChild.isText)
235482
+ return new Slice(Fragment.from(schema.text(normalizedText, firstChild.marks)), step3.slice.openStart, step3.slice.openEnd);
235483
+ if (firstChild.childCount === 1 && firstChild.firstChild?.isText) {
235484
+ const textChild = firstChild.firstChild;
235485
+ const normalizedFirstChild = firstChild.copy(Fragment.from(schema.text(normalizedText, textChild.marks)));
235486
+ return new Slice(Fragment.from(normalizedFirstChild), step3.slice.openStart, step3.slice.openEnd);
235487
+ }
235488
+ return null;
235489
+ }, isCompositionTransaction = (tr) => tr.getMeta("composition") !== undefined || COMPOSITION_INPUT_TYPES.has(tr.getMeta("inputType")), getCandidatePlaceholderPositions = ({ step: step3, pendingDeadKeyPlaceholder, isReplacement }) => {
235490
+ if (pendingDeadKeyPlaceholder?.pos !== undefined)
235491
+ return [
235492
+ pendingDeadKeyPlaceholder.pos,
235493
+ pendingDeadKeyPlaceholder.pos - 1,
235494
+ pendingDeadKeyPlaceholder.pos + 1
235495
+ ];
235496
+ return isReplacement ? [step3.from] : [step3.from, step3.from - 1];
235497
+ }, findCompatibleOwnedDeadKeyPlaceholder = ({ doc: doc$12, positions, user, insertedText }) => {
235498
+ for (const pos of positions) {
235499
+ if (pos < 1 || pos >= doc$12.content.size)
235500
+ continue;
235501
+ const placeholder = getOwnedDeadKeyPlaceholderAt({
235502
+ doc: doc$12,
235503
+ pos,
235504
+ user,
235505
+ insertedText
235506
+ });
235507
+ if (placeholder)
235508
+ return {
235509
+ ...placeholder,
235510
+ pos
235511
+ };
235512
+ }
235513
+ return null;
235514
+ }, foldCollapsedPlaceholderInsertion = ({ step: step3, doc: doc$12, user, insertedText, pendingDeadKeyPlaceholder }) => {
235515
+ const placeholder = findCompatibleOwnedDeadKeyPlaceholder({
235516
+ doc: doc$12,
235517
+ positions: getCandidatePlaceholderPositions({
235518
+ step: step3,
235519
+ pendingDeadKeyPlaceholder,
235520
+ isReplacement: false
235521
+ }),
235522
+ user,
235523
+ insertedText
235524
+ });
235525
+ if (!placeholder)
235526
+ return null;
235527
+ try {
235528
+ const candidate = new ReplaceStep(placeholder.pos, placeholder.pos + 1, step3.slice, step3.structure);
235529
+ if (!candidate.apply(doc$12).failed)
235530
+ return candidate;
235531
+ } catch {}
235532
+ return null;
235533
+ }, getInsertedText = (step3) => step3.slice.content.textBetween(0, step3.slice.content.size), normalizeCompositionInsertStep = ({ step: step3, doc: doc$12, tr, user, pendingDeadKeyPlaceholder }) => {
235534
+ if (!(step3 instanceof ReplaceStep))
235535
+ return step3;
235536
+ const insertedText = getInsertedText(step3);
235537
+ if (!insertedText)
235538
+ return step3;
235539
+ const hasCompositionContext = isCompositionTransaction(tr) || Boolean(pendingDeadKeyPlaceholder);
235540
+ const leadingPlaceholderNormalization = hasCompositionContext ? getLeadingDeadKeyPlaceholderNormalization(insertedText) : null;
235541
+ if (leadingPlaceholderNormalization) {
235542
+ const { normalizedText } = leadingPlaceholderNormalization;
235543
+ const normalizedSlice = createNormalizedSlice({
235544
+ step: step3,
235545
+ normalizedText,
235546
+ doc: doc$12
235547
+ });
235548
+ if (normalizedSlice) {
235549
+ const placeholder = findCompatibleOwnedDeadKeyPlaceholder({
235550
+ doc: doc$12,
235551
+ positions: getCandidatePlaceholderPositions({
235552
+ step: step3,
235553
+ pendingDeadKeyPlaceholder,
235554
+ isReplacement: step3.from !== step3.to
235555
+ }),
235556
+ user,
235557
+ insertedText: normalizedText
235558
+ });
235559
+ if (placeholder)
235560
+ try {
235561
+ const candidate = step3.from !== step3.to ? new ReplaceStep(step3.from, step3.to, normalizedSlice, step3.structure) : new ReplaceStep(placeholder.pos, placeholder.pos + 1, normalizedSlice, step3.structure);
235562
+ if (!candidate.apply(doc$12).failed)
235563
+ return candidate;
235564
+ } catch {}
235565
+ }
235566
+ }
235567
+ if (step3.from === step3.to && hasCompositionContext) {
235568
+ const folded = foldCollapsedPlaceholderInsertion({
235569
+ step: step3,
235570
+ doc: doc$12,
235571
+ user,
235572
+ insertedText,
235573
+ pendingDeadKeyPlaceholder
235574
+ });
235575
+ if (folded)
235576
+ return folded;
235577
+ }
235578
+ return step3;
235579
+ }, mergeTrackChangesMeta = (tr, extraMeta) => {
235580
+ const existingMeta = tr.getMeta(TrackChangesBasePluginKey) || {};
235581
+ tr.setMeta(TrackChangesBasePluginKey, {
235582
+ ...existingMeta,
235583
+ ...extraMeta
235584
+ });
235585
+ }, getPendingDeadKeyPlaceholder = ({ tr, newTr, user }) => {
235586
+ if (!isCompositionTransaction(tr) || tr.steps.length !== 1)
235587
+ return null;
235588
+ const [originalStep] = tr.steps;
235589
+ if (!(originalStep instanceof ReplaceStep) || originalStep.from !== originalStep.to)
235590
+ return null;
235591
+ const insertedText = getInsertedText(originalStep);
235592
+ if (!DEAD_KEY_PLACEHOLDER_MARKS.has(insertedText))
235593
+ return null;
235594
+ const trackMeta = newTr.getMeta(TrackChangesBasePluginKey);
235595
+ const anchorPos = typeof trackMeta?.insertedTo === "number" ? trackMeta.insertedTo : newTr.selection.from;
235596
+ const matches2 = [];
235597
+ newTr.doc.descendants((node3, pos$1) => {
235598
+ if (!node3.isText || !node3.text?.includes(insertedText))
235599
+ return;
235600
+ for (let index2 = 0;index2 < node3.text.length; index2 += 1)
235601
+ if (node3.text[index2] === insertedText)
235602
+ matches2.push(pos$1 + index2);
235603
+ });
235604
+ const pos = matches2.sort((left$1, right$1) => Math.abs(left$1 - anchorPos) - Math.abs(right$1 - anchorPos))[0];
235605
+ if (pos === undefined)
235606
+ return null;
235607
+ return {
235608
+ pos,
235609
+ placeholderChar: insertedText,
235610
+ authorEmail: user.email
235611
+ };
235386
235612
  }, trackedTransaction = ({ tr, state, user }) => {
235387
235613
  const onlyInputTypeMeta = [
235388
235614
  "inputType",
235389
235615
  "uiEvent",
235390
235616
  "paste",
235391
- "pointer"
235617
+ "pointer",
235618
+ "composition"
235392
235619
  ];
235393
235620
  const notAllowedMeta = [
235394
235621
  "historyUndo",
@@ -235397,23 +235624,34 @@ var Node$13 = class Node$14 {
235397
235624
  ];
235398
235625
  const isProgrammaticInput = tr.getMeta("inputType") === "programmatic";
235399
235626
  const ySyncMeta = tr.getMeta(ySyncPluginKey);
235627
+ const pendingDeadKeyPlaceholder = TrackChangesBasePluginKey.getState(state)?.pendingDeadKeyPlaceholder ?? null;
235400
235628
  const allowedMeta = new Set([
235401
235629
  ...onlyInputTypeMeta,
235402
235630
  ySyncPluginKey.key,
235403
235631
  "forceTrackChanges"
235404
235632
  ]);
235405
235633
  const hasDisallowedMeta = tr.meta && Object.keys(tr.meta).some((meta2) => !allowedMeta.has(meta2));
235406
- if (ySyncMeta?.isChangeOrigin || !tr.steps.length || hasDisallowedMeta && !isProgrammaticInput || notAllowedMeta.includes(tr.getMeta("inputType")) || tr.getMeta(CommentsPluginKey))
235634
+ if (ySyncMeta?.isChangeOrigin || !tr.steps.length || hasDisallowedMeta && !isProgrammaticInput || notAllowedMeta.includes(tr.getMeta("inputType")) || tr.getMeta(CommentsPluginKey)) {
235635
+ if (pendingDeadKeyPlaceholder && !isCompositionTransaction(tr))
235636
+ mergeTrackChangesMeta(tr, { pendingDeadKeyPlaceholder: null });
235407
235637
  return tr;
235638
+ }
235408
235639
  const newTr = state.tr;
235409
235640
  const map$12 = new Mapping;
235410
235641
  const fixedTimeTo10Mins = Math.floor(Date.now() / 600000) * 600000;
235411
235642
  const date = new Date(fixedTimeTo10Mins).toISOString();
235412
235643
  tr.steps.forEach((originalStep, originalStepIndex) => {
235413
- const step3 = originalStep.map(map$12);
235414
235644
  const { doc: doc$12 } = newTr;
235645
+ let step3 = originalStep.map(map$12);
235415
235646
  if (!step3)
235416
235647
  return;
235648
+ step3 = normalizeCompositionInsertStep({
235649
+ step: step3,
235650
+ doc: doc$12,
235651
+ tr,
235652
+ user,
235653
+ pendingDeadKeyPlaceholder
235654
+ });
235417
235655
  if (step3 instanceof ReplaceStep)
235418
235656
  replaceStep2({
235419
235657
  state,
@@ -235469,8 +235707,15 @@ var Node$13 = class Node$14 {
235469
235707
  newTr.setMeta("inputType", tr.getMeta("inputType"));
235470
235708
  if (tr.getMeta("uiEvent"))
235471
235709
  newTr.setMeta("uiEvent", tr.getMeta("uiEvent"));
235710
+ if (tr.getMeta("composition") !== undefined)
235711
+ newTr.setMeta("composition", tr.getMeta("composition"));
235472
235712
  if (tr.getMeta("addToHistory") !== undefined)
235473
235713
  newTr.setMeta("addToHistory", tr.getMeta("addToHistory"));
235714
+ mergeTrackChangesMeta(newTr, { pendingDeadKeyPlaceholder: getPendingDeadKeyPlaceholder({
235715
+ tr,
235716
+ newTr,
235717
+ user
235718
+ }) });
235474
235719
  const trackMeta = newTr.getMeta(TrackChangesBasePluginKey);
235475
235720
  if (trackMeta?.selectionPos !== undefined && trackMeta?.selectionPos !== null) {
235476
235721
  const boundedPos = Math.max(0, Math.min(trackMeta.selectionPos, newTr.doc.content.size));
@@ -242053,6 +242298,13 @@ var Node$13 = class Node$14 {
242053
242298
  view.dispatch(tr);
242054
242299
  event.preventDefault();
242055
242300
  return true;
242301
+ }, shouldForceEndStaleComposition = (view, event) => {
242302
+ if (!view.composing || event?.isComposing)
242303
+ return false;
242304
+ const inputType = event?.inputType ?? null;
242305
+ if (!inputType)
242306
+ return false;
242307
+ return !["insertCompositionText", "deleteCompositionText"].includes(inputType);
242056
242308
  }, NAVIGATION_KEYS, Editable, EditorFocus, PositionTrackerExtension, SelectionHandleExtension, global3, browser2, process3, cachedSetTimeout2, cachedClearTimeout2, queue3, draining2 = false, currentQueue2, queueIndex2 = -1, browserExports2, process$12, EventEmitter2 = class {
242057
242309
  #events = /* @__PURE__ */ new Map;
242058
242310
  on(name, fn2) {
@@ -250520,7 +250772,7 @@ var Node$13 = class Node$14 {
250520
250772
  return;
250521
250773
  if (event.defaultPrevented)
250522
250774
  return;
250523
- if (event.isComposing || event.keyCode === 229)
250775
+ if (this.#isCompositionKeyboardEvent(event))
250524
250776
  return;
250525
250777
  if (this.#isPlainCharacterKey(event))
250526
250778
  return;
@@ -250545,9 +250797,7 @@ var Node$13 = class Node$14 {
250545
250797
  return;
250546
250798
  if (event.defaultPrevented)
250547
250799
  return;
250548
- if (event.isComposing)
250549
- return;
250550
- queueMicrotask(() => {
250800
+ const dispatchSyntheticEvent = () => {
250551
250801
  if (event.defaultPrevented)
250552
250802
  return;
250553
250803
  let synthetic;
@@ -250566,7 +250816,12 @@ var Node$13 = class Node$14 {
250566
250816
  cancelable: true
250567
250817
  });
250568
250818
  this.#dispatchToTarget(event, synthetic);
250569
- });
250819
+ };
250820
+ if (event.isComposing) {
250821
+ dispatchSyntheticEvent();
250822
+ return;
250823
+ }
250824
+ queueMicrotask(dispatchSyntheticEvent);
250570
250825
  }
250571
250826
  #forwardCompositionEvent(event) {
250572
250827
  if (!this.#isEditable())
@@ -250654,6 +250909,9 @@ var Node$13 = class Node$14 {
250654
250909
  #isPlainCharacterKey(event) {
250655
250910
  return event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;
250656
250911
  }
250912
+ #isCompositionKeyboardEvent(event) {
250913
+ return event.isComposing || event.keyCode === 229 || event.key === "Dead" || event.key === "Compose";
250914
+ }
250657
250915
  }, isObject3 = (value) => typeof value === "object" && value !== null, INTERNAL_MIME_TYPE = "application/x-field-annotation", FIELD_ANNOTATION_DATA_TYPE = "fieldAnnotation", IMAGE_EXTENSIONS, DragDropManager = class {
250658
250916
  #deps = null;
250659
250917
  #dragOverRaf = null;
@@ -252482,9 +252740,9 @@ var Node$13 = class Node$14 {
252482
252740
  return;
252483
252741
  console.log(...args$1);
252484
252742
  }, 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;
252485
- var init_src_BySNwqMI_es = __esm(() => {
252743
+ var init_src__vWFtSGt_es = __esm(() => {
252486
252744
  init_rolldown_runtime_B2q5OVn9_es();
252487
- init_SuperConverter_DrIZwiji_es();
252745
+ init_SuperConverter_OPfy6vj2_es();
252488
252746
  init_jszip_ChlR43oI_es();
252489
252747
  init_uuid_qzgm05fK_es();
252490
252748
  init_constants_Qqwopz80_es();
@@ -268924,6 +269182,17 @@ function print() { __p += __j.call(arguments, '') }
268924
269182
  position: "0pt"
268925
269183
  };
268926
269184
  ATTRIBUTE_ONLY_MARKS = ["textStyle"];
269185
+ COMPOSITION_INPUT_TYPES = new Set(["insertCompositionText", "deleteCompositionText"]);
269186
+ COMBINING_MARK_REGEX = /^\p{Mark}$/u;
269187
+ graphemeSegmenter = typeof Intl !== "undefined" && typeof Intl.Segmenter === "function" ? new Intl.Segmenter(undefined, { granularity: "grapheme" }) : null;
269188
+ DEAD_KEY_PLACEHOLDER_MARKS = new Map([
269189
+ ["`", "̀"],
269190
+ ["'", "́"],
269191
+ ["´", "́"],
269192
+ ["^", "̂"],
269193
+ ["~", "̃"],
269194
+ ["¨", "̈"]
269195
+ ]);
268927
269196
  TrackFormat = Mark3.create({
268928
269197
  name: TrackFormatMarkName,
268929
269198
  group: "track",
@@ -277669,10 +277938,15 @@ function print() { __p += __j.call(arguments, '') }
277669
277938
  event.preventDefault();
277670
277939
  return true;
277671
277940
  }
277941
+ if (shouldForceEndStaleComposition(view, event))
277942
+ __endComposition(view);
277672
277943
  if (handleBackwardReplaceInsertText(view, event))
277673
277944
  return true;
277674
277945
  return false;
277675
277946
  },
277947
+ compositionstart: (view, event) => blockWhenNotEditable(view, event),
277948
+ compositionupdate: (view, event) => blockWhenNotEditable(view, event),
277949
+ compositionend: (view, event) => blockWhenNotEditable(view, event),
277676
277950
  mousedown: (_view, event) => {
277677
277951
  if (isFullyBlocked()) {
277678
277952
  event.preventDefault();
@@ -277687,10 +277961,7 @@ function print() { __p += __j.call(arguments, '') }
277687
277961
  return true;
277688
277962
  }
277689
277963
  return false;
277690
- },
277691
- compositionstart: blockWhenNotEditable,
277692
- compositionupdate: blockWhenNotEditable,
277693
- compositionend: blockWhenNotEditable
277964
+ }
277694
277965
  },
277695
277966
  handleClick: () => isFullyBlocked(),
277696
277967
  handleDoubleClick: () => isFullyBlocked(),
@@ -286026,8 +286297,8 @@ var init_zipper_YmNpPIyc_es = __esm(() => {
286026
286297
 
286027
286298
  // ../../packages/superdoc/dist/super-editor.es.js
286028
286299
  var init_super_editor_es = __esm(() => {
286029
- init_src_BySNwqMI_es();
286030
- init_SuperConverter_DrIZwiji_es();
286300
+ init_src__vWFtSGt_es();
286301
+ init_SuperConverter_OPfy6vj2_es();
286031
286302
  init_jszip_ChlR43oI_es();
286032
286303
  init_xml_js_40FWvL78_es();
286033
286304
  init_constants_Qqwopz80_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.5.0-next.10",
3
+ "version": "0.5.0-next.11",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -25,20 +25,20 @@
25
25
  "@types/ws": "^8.5.13",
26
26
  "typescript": "^5.9.2",
27
27
  "@superdoc/document-api": "0.0.1",
28
+ "@superdoc/super-editor": "0.0.1",
28
29
  "@superdoc/pm-adapter": "0.0.0",
29
- "superdoc": "1.23.0",
30
- "@superdoc/super-editor": "0.0.1"
30
+ "superdoc": "1.23.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.10",
38
- "@superdoc-dev/cli-darwin-x64": "0.5.0-next.10",
39
- "@superdoc-dev/cli-linux-x64": "0.5.0-next.10",
40
- "@superdoc-dev/cli-windows-x64": "0.5.0-next.10",
41
- "@superdoc-dev/cli-linux-arm64": "0.5.0-next.10"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.5.0-next.11",
38
+ "@superdoc-dev/cli-darwin-x64": "0.5.0-next.11",
39
+ "@superdoc-dev/cli-linux-x64": "0.5.0-next.11",
40
+ "@superdoc-dev/cli-windows-x64": "0.5.0-next.11",
41
+ "@superdoc-dev/cli-linux-arm64": "0.5.0-next.11"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",