@qualweb/util 0.7.0 → 0.7.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"getTextSize.d.ts","sourceRoot":"","sources":["../../src/domUtils/getTextSize.ts"],"names":[],"mappings":"AAEA,iBAAS,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAazG;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"getTextSize.d.ts","sourceRoot":"","sources":["../../src/domUtils/getTextSize.ts"],"names":[],"mappings":"AAEA,iBAAS,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAiBzG;AAED,eAAe,WAAW,CAAC"}
@@ -11,6 +11,9 @@ function getTextSize(font, fontSize, bold, italic, text) {
11
11
  else if (font === 'sans-serif') {
12
12
  font = 'arial';
13
13
  }
14
+ else if (font === 'times') {
15
+ font = 'times new roman';
16
+ }
14
17
  try {
15
18
  return (0, string_pixel_width_1.default)(text, { font: font, size: fontSize, bold: bold, italic: italic });
16
19
  }
@@ -1,10 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.default = isHumanLanguage;
7
- const franc_min_1 = __importDefault(require("franc-min"));
4
+ const franc_min_1 = require("franc-min");
8
5
  function isHumanLanguage(text) {
9
- return (0, franc_min_1.default)(text, { minLength: 2 }) !== 'und';
6
+ return (0, franc_min_1.franc)(text, { minLength: 2 }) !== 'und';
10
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qualweb/util",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Utilities module for qualweb",
5
5
  "main": "dist/__webpack/util.bundle.js",
6
6
  "files": [
@@ -56,7 +56,7 @@
56
56
  "author": "João Vicente",
57
57
  "license": "ISC",
58
58
  "devDependencies": {
59
- "@qualweb/qw-page": "^0.3.6",
59
+ "@qualweb/qw-page": "^0.3.7",
60
60
  "@tsconfig/recommended": "^1.0.3",
61
61
  "@types/chai": "^4.3.11",
62
62
  "@types/mocha": "^10.0.6",
@@ -77,7 +77,7 @@
77
77
  "webpack-cli": "^4.7.0"
78
78
  },
79
79
  "dependencies": {
80
- "franc-min": "^5.0.0",
80
+ "franc-min": "^6.2.0",
81
81
  "string-pixel-width": "^1.10.0"
82
82
  }
83
83
  }