@fileverse-dev/fortune-core 1.2.90-bold-1 → 1.2.90-bold-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.
@@ -234,7 +234,7 @@ function handleControlPlusArrowKey(ctx, e, shiftPressed) {
234
234
  }
235
235
  export function handleWithCtrlOrMetaKey(ctx, cache, e, cellInput, fxInput, handleUndo, handleRedo) {
236
236
  var _a, _b, _c, _d;
237
- console.log("handleWithCtrlOrMetaKey", e);
237
+ console.log(e.code, "handleWithCtrlOrMetaKey");
238
238
  var flowdata = getFlowdata(ctx);
239
239
  if (!flowdata) return;
240
240
  if (e.shiftKey) {
@@ -261,10 +261,13 @@ export function handleWithCtrlOrMetaKey(ctx, cache, e, cellInput, fxInput, handl
261
261
  } else if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(e.key)) {
262
262
  handleControlPlusArrowKey(ctx, e, false);
263
263
  } else if (e.code === "KeyB") {
264
+ console.log(e.code, "handleBold");
264
265
  handleBold(ctx, cellInput);
265
266
  } else if (e.code === "KeyI") {
267
+ console.log(e.code, "handleItalic");
266
268
  handleItalic(ctx, cellInput);
267
269
  } else if (e.code === "KeyU") {
270
+ console.log(e.code, "handleUnderline");
268
271
  handleUnderline(ctx, cellInput);
269
272
  } else if (e.code === "Backslash") {
270
273
  deleteSelectedCellFormat(ctx);
@@ -383,7 +386,7 @@ export function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUnd
383
386
  return __awaiter(this, void 0, void 0, function () {
384
387
  var kcode, kstr, allowEdit, isFxInput, ignoredKeys, restCod, last, row_index, col_index, last, row_index, col_index;
385
388
  return __generator(this, function (_d) {
386
- console.log("handleGlobalKeyDown inside", e);
389
+ console.log(e.code, "handleGlobalKeyDown");
387
390
  if (e.shiftKey && e.code === "Space") {
388
391
  e.stopImmediatePropagation();
389
392
  e.stopPropagation();
@@ -459,12 +462,13 @@ export function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUnd
459
462
  moveHighlightCell(ctx, "down", 0, "rangeOfSelect");
460
463
  e.preventDefault();
461
464
  } else {
462
- console.log("kstr", kstr);
463
465
  if (e.ctrlKey || e.metaKey) {
466
+ console.log(e.code, "handleWithCtrlOrMetaKey in handleGlobalKeyDown");
464
467
  handleWithCtrlOrMetaKey(ctx, cache, e, cellInput, fxInput, handleUndo, handleRedo);
465
468
  return [2];
466
469
  }
467
470
  if (e.shiftKey && (kstr === "ArrowUp" || kstr === "ArrowDown" || kstr === "ArrowLeft" || kstr === "ArrowRight")) {
471
+ console.log(e.code, "handleShiftWithArrowKey in handleGlobalKeyDown");
468
472
  handleShiftWithArrowKey(ctx, e);
469
473
  } else if (kstr === "Escape") {
470
474
  ctx.contextMenu = {};
@@ -244,7 +244,7 @@ function handleControlPlusArrowKey(ctx, e, shiftPressed) {
244
244
  }
245
245
  function handleWithCtrlOrMetaKey(ctx, cache, e, cellInput, fxInput, handleUndo, handleRedo) {
246
246
  var _a, _b, _c, _d;
247
- console.log("handleWithCtrlOrMetaKey", e);
247
+ console.log(e.code, "handleWithCtrlOrMetaKey");
248
248
  var flowdata = (0, _context.getFlowdata)(ctx);
249
249
  if (!flowdata) return;
250
250
  if (e.shiftKey) {
@@ -271,10 +271,13 @@ function handleWithCtrlOrMetaKey(ctx, cache, e, cellInput, fxInput, handleUndo,
271
271
  } else if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(e.key)) {
272
272
  handleControlPlusArrowKey(ctx, e, false);
273
273
  } else if (e.code === "KeyB") {
274
+ console.log(e.code, "handleBold");
274
275
  (0, _toolbar.handleBold)(ctx, cellInput);
275
276
  } else if (e.code === "KeyI") {
277
+ console.log(e.code, "handleItalic");
276
278
  (0, _toolbar.handleItalic)(ctx, cellInput);
277
279
  } else if (e.code === "KeyU") {
280
+ console.log(e.code, "handleUnderline");
278
281
  (0, _toolbar.handleUnderline)(ctx, cellInput);
279
282
  } else if (e.code === "Backslash") {
280
283
  (0, _selection.deleteSelectedCellFormat)(ctx);
@@ -393,7 +396,7 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
393
396
  return __awaiter(this, void 0, void 0, function () {
394
397
  var kcode, kstr, allowEdit, isFxInput, ignoredKeys, restCod, last, row_index, col_index, last, row_index, col_index;
395
398
  return __generator(this, function (_d) {
396
- console.log("handleGlobalKeyDown inside", e);
399
+ console.log(e.code, "handleGlobalKeyDown");
397
400
  if (e.shiftKey && e.code === "Space") {
398
401
  e.stopImmediatePropagation();
399
402
  e.stopPropagation();
@@ -469,12 +472,13 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
469
472
  (0, _selection.moveHighlightCell)(ctx, "down", 0, "rangeOfSelect");
470
473
  e.preventDefault();
471
474
  } else {
472
- console.log("kstr", kstr);
473
475
  if (e.ctrlKey || e.metaKey) {
476
+ console.log(e.code, "handleWithCtrlOrMetaKey in handleGlobalKeyDown");
474
477
  handleWithCtrlOrMetaKey(ctx, cache, e, cellInput, fxInput, handleUndo, handleRedo);
475
478
  return [2];
476
479
  }
477
480
  if (e.shiftKey && (kstr === "ArrowUp" || kstr === "ArrowDown" || kstr === "ArrowLeft" || kstr === "ArrowRight")) {
481
+ console.log(e.code, "handleShiftWithArrowKey in handleGlobalKeyDown");
478
482
  handleShiftWithArrowKey(ctx, e);
479
483
  } else if (kstr === "Escape") {
480
484
  ctx.contextMenu = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.2.90-bold-1",
3
+ "version": "1.2.90-bold-2",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",