@fileverse-dev/fortune-core 1.3.5 → 1.3.6

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,6 @@ exports.handlePastedTable = handlePastedTable;
8
8
  var _lodash = _interopRequireDefault(require("lodash"));
9
9
  var _locale = require("./locale");
10
10
  var _modules = require("./modules");
11
- var _format = require("./modules/format");
12
11
  var _utils = require("./utils");
13
12
  var _api = require("./api");
14
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -135,8 +134,7 @@ function brToNewline(str) {
135
134
  return str.replace(/<br\s*\/?>/gi, "\n");
136
135
  }
137
136
  var buildCellFromTd = function buildCellFromTd(td, classStyles, ctx) {
138
- var _a;
139
- var _b, _c, _d, _e;
137
+ var _a, _b, _c, _d;
140
138
  var cell = {};
141
139
  var rawText = (td.innerText || td.innerHTML || "").trim();
142
140
  var isLineBreak = rawText.includes("<br />");
@@ -154,22 +152,24 @@ var buildCellFromTd = function buildCellFromTd(td, classStyles, ctx) {
154
152
  })
155
153
  });
156
154
  } else {
157
- var mask = (0, _format.genarate)(rawText);
158
- _a = mask || [], cell.m = _a[0], cell.ct = _a[1], cell.v = _a[2];
155
+ cell.v = rawText;
156
+ cell.m = rawText;
157
+ cell.ct = {
158
+ fa: "General",
159
+ t: "g"
160
+ };
159
161
  if (HEX_REGEX.test(rawText)) {
160
162
  cell.ct = {
161
163
  fa: "@",
162
164
  t: "s"
163
165
  };
164
- cell.m = rawText;
165
- cell.v = rawText;
166
166
  }
167
167
  }
168
- if (((_b = td.style) === null || _b === void 0 ? void 0 : _b.alignItems) === "center") {
168
+ if (((_a = td.style) === null || _a === void 0 ? void 0 : _a.alignItems) === "center") {
169
169
  cell.vt = 0;
170
- } else if (((_c = td.style) === null || _c === void 0 ? void 0 : _c.alignItems) === "flex-end") {
170
+ } else if (((_b = td.style) === null || _b === void 0 ? void 0 : _b.alignItems) === "flex-end") {
171
171
  cell.vt = 2;
172
- } else if (((_d = td.style) === null || _d === void 0 ? void 0 : _d.alignItems) === "flex-start") {
172
+ } else if (((_c = td.style) === null || _c === void 0 ? void 0 : _c.alignItems) === "flex-start") {
173
173
  cell.vt = 1;
174
174
  }
175
175
  var styleBlock = typeof classStyles[".".concat(td.className)] === "string" ? classStyles[".".concat(td.className)] : "";
@@ -196,7 +196,7 @@ var buildCellFromTd = function buildCellFromTd(td, classStyles, ctx) {
196
196
  } else {
197
197
  cell.ht = 1;
198
198
  }
199
- if (((_e = td === null || td === void 0 ? void 0 : td.style) === null || _e === void 0 ? void 0 : _e["overflow-wrap"]) === "anywhere") {
199
+ if (((_d = td === null || td === void 0 ? void 0 : td.style) === null || _d === void 0 ? void 0 : _d["overflow-wrap"]) === "anywhere") {
200
200
  cell.tb = "2";
201
201
  } else {
202
202
  cell.tb = "2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",