@fileverse-dev/fortune-react 1.2.86-maitra-xl-1 → 1.2.86-pinyin-2

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.
@@ -8,7 +8,7 @@ var __assign = this && this.__assign || function () {
8
8
  };
9
9
  return __assign.apply(this, arguments);
10
10
  };
11
- import { cancelNormalSelected, getCellValue, getInlineStringHTML, getStyleByCell, isInlineStringCell, moveToEnd, getFlowdata, handleFormulaInput, moveHighlightCell, escapeScriptTag, valueShowEs, createRangeHightlight, isShowHidenCR, israngeseleciton, escapeHTMLTag, isAllowEdit, getrangeseleciton, indexToColumnChar, handleBold, handleItalic, handleUnderline, handleStrikeThrough } from "@fileverse-dev/fortune-core";
11
+ import { cancelNormalSelected, getCellValue, getInlineStringHTML, getStyleByCell, isInlineStringCell, moveToEnd, getFlowdata, handleFormulaInput, moveHighlightCell, escapeScriptTag, valueShowEs, createRangeHightlight, isShowHidenCR, israngeseleciton, escapeHTMLTag, isAllowEdit, getrangeseleciton, indexToColumnChar, handleBold, handleItalic, handleUnderline, handleStrikeThrough, setCellValue } from "@fileverse-dev/fortune-core";
12
12
  import React, { useContext, useEffect, useMemo, useRef, useCallback, useLayoutEffect, useState } from "react";
13
13
  import _ from "lodash";
14
14
  import { Tooltip } from "@fileverse/ui";
@@ -65,6 +65,7 @@ var InputBox = function InputBox() {
65
65
  var col_index = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.column_focus;
66
66
  var preText = useRef("");
67
67
  var placeRef = useRef("");
68
+ var isComposingRef = useRef(false);
68
69
  var handleShowFormulaHint = function handleShowFormulaHint() {
69
70
  localStorage.setItem("formulaMore", String(showFormulaHint));
70
71
  setShowFormulaHint(!showFormulaHint);
@@ -130,7 +131,7 @@ var InputBox = function InputBox() {
130
131
  }
131
132
  }
132
133
  refs.globalCache.overwriteCell = false;
133
- if (!refs.globalCache.ignoreWriteCell) inputRef.current.innerHTML = escapeHTMLTag(escapeScriptTag(value_1));
134
+ if (!refs.globalCache.ignoreWriteCell && inputRef.current) inputRef.current.innerHTML = escapeHTMLTag(escapeScriptTag(value_1));
134
135
  refs.globalCache.ignoreWriteCell = false;
135
136
  if (!refs.globalCache.doNotFocus) {
136
137
  setTimeout(function () {
@@ -152,6 +153,7 @@ var InputBox = function InputBox() {
152
153
  }, [context.luckysheet_select_save]);
153
154
  useEffect(function () {
154
155
  var _a;
156
+ if (isComposingRef.current) return;
155
157
  if (!firstSelection || ((_a = context.rangeDialog) === null || _a === void 0 ? void 0 : _a.show) || _.isEmpty(context.luckysheetCellUpdate)) {
156
158
  setIsInputBoxActive(false);
157
159
  }
@@ -161,6 +163,7 @@ var InputBox = function InputBox() {
161
163
  }, []);
162
164
  var insertSelectedFormula = useCallback(function (formulaName) {
163
165
  var _a;
166
+ if (isComposingRef.current) return;
164
167
  if (/^=[a-zA-Z]+$/.test(inputRef.current.innerText)) {
165
168
  var ht = "<span dir=\"auto\" class=\"luckysheet-formula-text-color\">=</span><span dir=\"auto\" class=\"luckysheet-formula-text-func\">".concat(formulaName, "</span><span dir=\"auto\" class=\"luckysheet-formula-text-lpar\">(</span>");
166
169
  inputRef.current.innerHTML = ht;
@@ -225,6 +228,7 @@ var InputBox = function InputBox() {
225
228
  }, [getActiveFormula]);
226
229
  var selectActiveFormula = useCallback(function (e) {
227
230
  var _a, _b;
231
+ if (isComposingRef.current) return;
228
232
  var formulaName = (_b = (_a = getActiveFormula()) === null || _a === void 0 ? void 0 : _a.querySelector(".luckysheet-formula-search-func")) === null || _b === void 0 ? void 0 : _b.textContent;
229
233
  var lastSpanText = getLastInputSpanText();
230
234
  if (formulaName && !isLetterNumberPattern(lastSpanText)) {
@@ -235,6 +239,7 @@ var InputBox = function InputBox() {
235
239
  }, [getActiveFormula, insertSelectedFormula]);
236
240
  var selectActiveFormulaOnClick = useCallback(function (e) {
237
241
  var _a, _b;
242
+ if (isComposingRef.current || !inputRef.current) return;
238
243
  if (e.target.className.includes("sign-fortune")) return;
239
244
  preText.current = inputRef.current.innerText;
240
245
  var formulaName = (_b = (_a = getActiveFormula()) === null || _a === void 0 ? void 0 : _a.querySelector(".luckysheet-formula-search-func")) === null || _b === void 0 ? void 0 : _b.textContent;
@@ -251,6 +256,7 @@ var InputBox = function InputBox() {
251
256
  };
252
257
  var onKeyDown = useCallback(function (e) {
253
258
  var _a, _b;
259
+ if (isComposingRef.current || !inputRef.current) return;
254
260
  lastKeyDownEventRef.current = new KeyboardEvent(e.type, e.nativeEvent);
255
261
  preText.current = inputRef.current.innerText;
256
262
  if (e.metaKey) {
@@ -268,8 +274,10 @@ var InputBox = function InputBox() {
268
274
  stopPropagation(e);
269
275
  }
270
276
  }
271
- var currentCommaCount = countCommasBeforeCursor(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
272
- setCommaCount(currentCommaCount);
277
+ if (!isComposingRef.current) {
278
+ var currentCommaCount = countCommasBeforeCursor(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
279
+ setCommaCount(currentCommaCount);
280
+ }
273
281
  var allowListNavigation = true;
274
282
  if ((e.key === "Delete" || e.key === "Backspace") && getCursorPosition(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === (inputRef === null || inputRef === void 0 ? void 0 : inputRef.current.innerText.length)) {
275
283
  setTimeout(function () {
@@ -386,6 +394,9 @@ var InputBox = function InputBox() {
386
394
  };
387
395
  var onChange = useCallback(function (__, isBlur) {
388
396
  var _a;
397
+ if (isComposingRef.current) {
398
+ return;
399
+ }
389
400
  if (context.isFlvReadOnly) return;
390
401
  handleHideShowHint();
391
402
  if (((_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.innerText.includes("=")) && /^=?[A-Za-z]*$/.test(getLastInputSpanText())) {
@@ -393,8 +404,10 @@ var InputBox = function InputBox() {
393
404
  } else {
394
405
  setShowSearchHint(false);
395
406
  }
396
- var currentCommaCount = countCommasBeforeCursor(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
397
- setCommaCount(currentCommaCount);
407
+ if (!isComposingRef.current) {
408
+ var currentCommaCount = countCommasBeforeCursor(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
409
+ setCommaCount(currentCommaCount);
410
+ }
398
411
  var e = lastKeyDownEventRef.current;
399
412
  if (!e) return;
400
413
  var kcode = e.keyCode;
@@ -410,6 +423,7 @@ var InputBox = function InputBox() {
410
423
  }
411
424
  }, [refs.cellInput, refs.fxInput, setContext]);
412
425
  var onPaste = useCallback(function (e) {
426
+ if (isComposingRef.current) return;
413
427
  if (_.isEmpty(context.luckysheetCellUpdate)) {
414
428
  e.preventDefault();
415
429
  }
@@ -555,12 +569,42 @@ var InputBox = function InputBox() {
555
569
  minHeight: firstSelection.height
556
570
  }, inputBoxStyle) : {}
557
571
  }, /*#__PURE__*/React.createElement(ContentEditable, {
572
+ onCompositionStart: function onCompositionStart() {
573
+ isComposingRef.current = true;
574
+ console.log("onCompositionStart");
575
+ },
576
+ onCompositionUpdate: function onCompositionUpdate(e) {
577
+ window.CompositData = e.currentTarget.innerText;
578
+ isComposingRef.current = true;
579
+ console.log("onCompositionUpdate", e.currentTarget.innerText);
580
+ },
581
+ onCompositionEnd: function onCompositionEnd(e) {
582
+ var rowIndex = (firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.row_focus) || 0;
583
+ var colIndex = (firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.column_focus) || 0;
584
+ console.log("onCompositionEnd", e.currentTarget.innerText, getCellAddress(), rowIndex, colIndex, setCellValue);
585
+ window.CompositData = e.currentTarget.innerText;
586
+ setContext(function (draftCtx) {
587
+ setCellValue(draftCtx, rowIndex, colIndex, null, window.CompositData);
588
+ window.CompositData = "";
589
+ });
590
+ isComposingRef.current = false;
591
+ },
558
592
  onMouseUp: function onMouseUp() {
593
+ if (isComposingRef.current) {
594
+ return;
595
+ }
559
596
  handleHideShowHint();
560
- var currentCommaCount = countCommasBeforeCursor(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
561
- setCommaCount(currentCommaCount);
597
+ if (!isComposingRef.current) {
598
+ var currentCommaCount = countCommasBeforeCursor(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
599
+ setCommaCount(currentCommaCount);
600
+ }
562
601
  },
563
602
  innerRef: function innerRef(e) {
603
+ if (isComposingRef.current) {
604
+ inputRef.current = null;
605
+ refs.cellInput.current = null;
606
+ return;
607
+ }
564
608
  inputRef.current = e;
565
609
  refs.cellInput.current = e;
566
610
  },
@@ -140,7 +140,6 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
140
140
  handleRedo: () => void;
141
141
  calculateFormula: () => void;
142
142
  calculateSubSheetFormula: (id: string) => void;
143
- calculateCellReferencedSubSheetFormula: (id: string, refCell?: string[]) => void;
144
143
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
145
144
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
146
145
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: () => void) => void;
@@ -389,12 +389,6 @@ export function generateAPIs(context, setContext, handleUndo, handleRedo, settin
389
389
  api.calculateSheetFromula(draftCtx, id);
390
390
  });
391
391
  },
392
- calculateCellReferencedSubSheetFormula: function calculateCellReferencedSubSheetFormula(id, refCell) {
393
- console.log("calculateCellReferencedSubSheetFormula", id, refCell);
394
- setContext(function (draftCtx) {
395
- api.calculateReferencedCellSheetFromula(draftCtx, id, refCell);
396
- });
397
- },
398
392
  dataToCelldata: function dataToCelldata(data) {
399
393
  return api.dataToCelldata(data);
400
394
  },
@@ -147,7 +147,6 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
147
147
  handleRedo: () => void;
148
148
  calculateFormula: () => void;
149
149
  calculateSubSheetFormula: (id: string) => void;
150
- calculateCellReferencedSubSheetFormula: (id: string, refCell?: string[] | undefined) => void;
151
150
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
152
151
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number | undefined, colCount?: number | undefined) => CellMatrix | null;
153
152
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: (() => void) | undefined) => void;
@@ -288,7 +288,7 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
288
288
  return newContext;
289
289
  });
290
290
  }
291
- }, [emitOp, globalCache]);
291
+ }, [emitOp]);
292
292
  var handleRedo = useCallback(function () {
293
293
  var history = globalCache.current.redoList.pop();
294
294
  if (history) {
@@ -74,6 +74,7 @@ var InputBox = function InputBox() {
74
74
  var col_index = firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.column_focus;
75
75
  var preText = (0, _react.useRef)("");
76
76
  var placeRef = (0, _react.useRef)("");
77
+ var isComposingRef = (0, _react.useRef)(false);
77
78
  var handleShowFormulaHint = function handleShowFormulaHint() {
78
79
  localStorage.setItem("formulaMore", String(showFormulaHint));
79
80
  setShowFormulaHint(!showFormulaHint);
@@ -139,7 +140,7 @@ var InputBox = function InputBox() {
139
140
  }
140
141
  }
141
142
  refs.globalCache.overwriteCell = false;
142
- if (!refs.globalCache.ignoreWriteCell) inputRef.current.innerHTML = (0, _fortuneCore.escapeHTMLTag)((0, _fortuneCore.escapeScriptTag)(value_1));
143
+ if (!refs.globalCache.ignoreWriteCell && inputRef.current) inputRef.current.innerHTML = (0, _fortuneCore.escapeHTMLTag)((0, _fortuneCore.escapeScriptTag)(value_1));
143
144
  refs.globalCache.ignoreWriteCell = false;
144
145
  if (!refs.globalCache.doNotFocus) {
145
146
  setTimeout(function () {
@@ -161,6 +162,7 @@ var InputBox = function InputBox() {
161
162
  }, [context.luckysheet_select_save]);
162
163
  (0, _react.useEffect)(function () {
163
164
  var _a;
165
+ if (isComposingRef.current) return;
164
166
  if (!firstSelection || ((_a = context.rangeDialog) === null || _a === void 0 ? void 0 : _a.show) || _lodash.default.isEmpty(context.luckysheetCellUpdate)) {
165
167
  setIsInputBoxActive(false);
166
168
  }
@@ -170,6 +172,7 @@ var InputBox = function InputBox() {
170
172
  }, []);
171
173
  var insertSelectedFormula = (0, _react.useCallback)(function (formulaName) {
172
174
  var _a;
175
+ if (isComposingRef.current) return;
173
176
  if (/^=[a-zA-Z]+$/.test(inputRef.current.innerText)) {
174
177
  var ht = "<span dir=\"auto\" class=\"luckysheet-formula-text-color\">=</span><span dir=\"auto\" class=\"luckysheet-formula-text-func\">".concat(formulaName, "</span><span dir=\"auto\" class=\"luckysheet-formula-text-lpar\">(</span>");
175
178
  inputRef.current.innerHTML = ht;
@@ -234,6 +237,7 @@ var InputBox = function InputBox() {
234
237
  }, [getActiveFormula]);
235
238
  var selectActiveFormula = (0, _react.useCallback)(function (e) {
236
239
  var _a, _b;
240
+ if (isComposingRef.current) return;
237
241
  var formulaName = (_b = (_a = getActiveFormula()) === null || _a === void 0 ? void 0 : _a.querySelector(".luckysheet-formula-search-func")) === null || _b === void 0 ? void 0 : _b.textContent;
238
242
  var lastSpanText = getLastInputSpanText();
239
243
  if (formulaName && !(0, _helper.isLetterNumberPattern)(lastSpanText)) {
@@ -244,6 +248,7 @@ var InputBox = function InputBox() {
244
248
  }, [getActiveFormula, insertSelectedFormula]);
245
249
  var selectActiveFormulaOnClick = (0, _react.useCallback)(function (e) {
246
250
  var _a, _b;
251
+ if (isComposingRef.current || !inputRef.current) return;
247
252
  if (e.target.className.includes("sign-fortune")) return;
248
253
  preText.current = inputRef.current.innerText;
249
254
  var formulaName = (_b = (_a = getActiveFormula()) === null || _a === void 0 ? void 0 : _a.querySelector(".luckysheet-formula-search-func")) === null || _b === void 0 ? void 0 : _b.textContent;
@@ -260,6 +265,7 @@ var InputBox = function InputBox() {
260
265
  };
261
266
  var onKeyDown = (0, _react.useCallback)(function (e) {
262
267
  var _a, _b;
268
+ if (isComposingRef.current || !inputRef.current) return;
263
269
  lastKeyDownEventRef.current = new KeyboardEvent(e.type, e.nativeEvent);
264
270
  preText.current = inputRef.current.innerText;
265
271
  if (e.metaKey) {
@@ -277,8 +283,10 @@ var InputBox = function InputBox() {
277
283
  stopPropagation(e);
278
284
  }
279
285
  }
280
- var currentCommaCount = (0, _helper.countCommasBeforeCursor)(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
281
- setCommaCount(currentCommaCount);
286
+ if (!isComposingRef.current) {
287
+ var currentCommaCount = (0, _helper.countCommasBeforeCursor)(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
288
+ setCommaCount(currentCommaCount);
289
+ }
282
290
  var allowListNavigation = true;
283
291
  if ((e.key === "Delete" || e.key === "Backspace") && (0, _helper.getCursorPosition)(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === (inputRef === null || inputRef === void 0 ? void 0 : inputRef.current.innerText.length)) {
284
292
  setTimeout(function () {
@@ -395,6 +403,9 @@ var InputBox = function InputBox() {
395
403
  };
396
404
  var onChange = (0, _react.useCallback)(function (__, isBlur) {
397
405
  var _a;
406
+ if (isComposingRef.current) {
407
+ return;
408
+ }
398
409
  if (context.isFlvReadOnly) return;
399
410
  handleHideShowHint();
400
411
  if (((_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.innerText.includes("=")) && /^=?[A-Za-z]*$/.test(getLastInputSpanText())) {
@@ -402,8 +413,10 @@ var InputBox = function InputBox() {
402
413
  } else {
403
414
  setShowSearchHint(false);
404
415
  }
405
- var currentCommaCount = (0, _helper.countCommasBeforeCursor)(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
406
- setCommaCount(currentCommaCount);
416
+ if (!isComposingRef.current) {
417
+ var currentCommaCount = (0, _helper.countCommasBeforeCursor)(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
418
+ setCommaCount(currentCommaCount);
419
+ }
407
420
  var e = lastKeyDownEventRef.current;
408
421
  if (!e) return;
409
422
  var kcode = e.keyCode;
@@ -419,6 +432,7 @@ var InputBox = function InputBox() {
419
432
  }
420
433
  }, [refs.cellInput, refs.fxInput, setContext]);
421
434
  var onPaste = (0, _react.useCallback)(function (e) {
435
+ if (isComposingRef.current) return;
422
436
  if (_lodash.default.isEmpty(context.luckysheetCellUpdate)) {
423
437
  e.preventDefault();
424
438
  }
@@ -564,12 +578,42 @@ var InputBox = function InputBox() {
564
578
  minHeight: firstSelection.height
565
579
  }, inputBoxStyle) : {}
566
580
  }, /*#__PURE__*/_react.default.createElement(_ContentEditable.default, {
581
+ onCompositionStart: function onCompositionStart() {
582
+ isComposingRef.current = true;
583
+ console.log("onCompositionStart");
584
+ },
585
+ onCompositionUpdate: function onCompositionUpdate(e) {
586
+ window.CompositData = e.currentTarget.innerText;
587
+ isComposingRef.current = true;
588
+ console.log("onCompositionUpdate", e.currentTarget.innerText);
589
+ },
590
+ onCompositionEnd: function onCompositionEnd(e) {
591
+ var rowIndex = (firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.row_focus) || 0;
592
+ var colIndex = (firstSelection === null || firstSelection === void 0 ? void 0 : firstSelection.column_focus) || 0;
593
+ console.log("onCompositionEnd", e.currentTarget.innerText, getCellAddress(), rowIndex, colIndex, _fortuneCore.setCellValue);
594
+ window.CompositData = e.currentTarget.innerText;
595
+ setContext(function (draftCtx) {
596
+ (0, _fortuneCore.setCellValue)(draftCtx, rowIndex, colIndex, null, window.CompositData);
597
+ window.CompositData = "";
598
+ });
599
+ isComposingRef.current = false;
600
+ },
567
601
  onMouseUp: function onMouseUp() {
602
+ if (isComposingRef.current) {
603
+ return;
604
+ }
568
605
  handleHideShowHint();
569
- var currentCommaCount = (0, _helper.countCommasBeforeCursor)(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
570
- setCommaCount(currentCommaCount);
606
+ if (!isComposingRef.current) {
607
+ var currentCommaCount = (0, _helper.countCommasBeforeCursor)(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
608
+ setCommaCount(currentCommaCount);
609
+ }
571
610
  },
572
611
  innerRef: function innerRef(e) {
612
+ if (isComposingRef.current) {
613
+ inputRef.current = null;
614
+ refs.cellInput.current = null;
615
+ return;
616
+ }
573
617
  inputRef.current = e;
574
618
  refs.cellInput.current = e;
575
619
  },
@@ -140,7 +140,6 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
140
140
  handleRedo: () => void;
141
141
  calculateFormula: () => void;
142
142
  calculateSubSheetFormula: (id: string) => void;
143
- calculateCellReferencedSubSheetFormula: (id: string, refCell?: string[]) => void;
144
143
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
145
144
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null;
146
145
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: () => void) => void;
@@ -396,12 +396,6 @@ function generateAPIs(context, setContext, handleUndo, handleRedo, settings, cel
396
396
  _fortuneCore.api.calculateSheetFromula(draftCtx, id);
397
397
  });
398
398
  },
399
- calculateCellReferencedSubSheetFormula: function calculateCellReferencedSubSheetFormula(id, refCell) {
400
- console.log("calculateCellReferencedSubSheetFormula", id, refCell);
401
- setContext(function (draftCtx) {
402
- _fortuneCore.api.calculateReferencedCellSheetFromula(draftCtx, id, refCell);
403
- });
404
- },
405
399
  dataToCelldata: function dataToCelldata(data) {
406
400
  return _fortuneCore.api.dataToCelldata(data);
407
401
  },
@@ -147,7 +147,6 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
147
147
  handleRedo: () => void;
148
148
  calculateFormula: () => void;
149
149
  calculateSubSheetFormula: (id: string) => void;
150
- calculateCellReferencedSubSheetFormula: (id: string, refCell?: string[] | undefined) => void;
151
150
  dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[];
152
151
  celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number | undefined, colCount?: number | undefined) => CellMatrix | null;
153
152
  insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: (() => void) | undefined) => void;
@@ -297,7 +297,7 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
297
297
  return newContext;
298
298
  });
299
299
  }
300
- }, [emitOp, globalCache]);
300
+ }, [emitOp]);
301
301
  var handleRedo = (0, _react.useCallback)(function () {
302
302
  var history = globalCache.current.redoList.pop();
303
303
  if (history) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.2.86-maitra-xl-1",
3
+ "version": "1.2.86-pinyin-2",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "module": "es/index.js",
@@ -16,7 +16,7 @@
16
16
  "tsc": "tsc"
17
17
  },
18
18
  "dependencies": {
19
- "@fileverse-dev/fortune-core": "1.2.86-maitra-xl-1",
19
+ "@fileverse-dev/fortune-core": "1.2.86-pinyin-2",
20
20
  "@fileverse/ui": "^4.1.7-patch-40",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",