@e-mc/image 0.13.4 → 0.13.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.
- package/README.md +4 -4
- package/index.js +4 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Interface
|
|
11
11
|
|
|
12
|
-
* [View Source](https://www.unpkg.com/@e-mc/types@0.13.
|
|
12
|
+
* [View Source](https://www.unpkg.com/@e-mc/types@0.13.6/lib/index.d.ts)
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
import type { IHost, ModuleConstructor } from "./index";
|
|
@@ -95,9 +95,9 @@ NOTE: Usage without a **Host** is conducted through static methods. The **using*
|
|
|
95
95
|
|
|
96
96
|
## References
|
|
97
97
|
|
|
98
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
99
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
100
|
-
- https://www.unpkg.com/@e-mc/types@0.13.
|
|
98
|
+
- https://www.unpkg.com/@e-mc/types@0.13.6/lib/asset.d.ts
|
|
99
|
+
- https://www.unpkg.com/@e-mc/types@0.13.6/lib/image.d.ts
|
|
100
|
+
- https://www.unpkg.com/@e-mc/types@0.13.6/lib/settings.d.ts
|
|
101
101
|
|
|
102
102
|
## LICENSE
|
|
103
103
|
|
package/index.js
CHANGED
|
@@ -5,8 +5,7 @@ const REGEXP_CROP = /\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*\|\s*(\d+)\s*[xX]\s*(\d+
|
|
|
5
5
|
const REGEXP_OPACITY = /\|\s*(\d*\.\d+)\s*\|/;
|
|
6
6
|
const REGEXP_QUALITY = /\|\s*(\d+)?(?:\s*\[\s*(photo|picture|drawing|icon|text)\s*\])?(?:\s*\[\s*(\d+)\s*\])?(?:\s*m\[\s*(\d+)\s*\])?\s*\|/;
|
|
7
7
|
const REGEXP_RESIZE = /\(\s*(\d+|auto)\s*x\s*(\d+|auto)(?:\s*\[\s*(bilinear|bicubic|hermite|bezier)\s*\])?(?:\s*\^\s*(contain|cover|scale)(?:\s*\[\s*(left|center|right)?(?:\s*\|?\s*(top|middle|bottom))?\s*\])?)?(?:\s*#\s*([a-f\d]{1,8}))?\s*\)/;
|
|
8
|
-
const REGEXP_ROTATE = /\{((?:\s*-?\d+\s*,?)+)(?:\s*#\s*([
|
|
9
|
-
const REGEXP_METHOD = /!\s*([a-z$][\w$]*)(\()?/gi;
|
|
8
|
+
const REGEXP_ROTATE = /\{((?:\s*-?\d+\s*,?)+)(?:\s*#\s*([A-Fa-f\d]{1,8}))?\s*\}/;
|
|
10
9
|
function isEscaped(value, checkQuote) {
|
|
11
10
|
if (!checkQuote || /["']/.test(value)) {
|
|
12
11
|
let k = 0;
|
|
@@ -187,8 +186,9 @@ class Image extends core_1.Client {
|
|
|
187
186
|
}
|
|
188
187
|
parseMethod(value) {
|
|
189
188
|
const result = [];
|
|
189
|
+
const pattern = /!\s*([A-Za-z$][\w$]*)(\()?/g;
|
|
190
190
|
let match;
|
|
191
|
-
while (match =
|
|
191
|
+
while (match = pattern.exec(value)) {
|
|
192
192
|
if (!match[2]) {
|
|
193
193
|
result.push([match[1]]);
|
|
194
194
|
continue;
|
|
@@ -356,9 +356,8 @@ class Image extends core_1.Client {
|
|
|
356
356
|
result.push([match[1], args]);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
|
|
359
|
+
pattern.lastIndex = i;
|
|
360
360
|
}
|
|
361
|
-
REGEXP_METHOD.lastIndex = 0;
|
|
362
361
|
return result.length > 0 ? result : null;
|
|
363
362
|
}
|
|
364
363
|
parseWorker(command, outputType) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/image",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.6",
|
|
4
4
|
"description": "Image constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
"license": "BSD-3-Clause",
|
|
20
20
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@e-mc/core": "0.13.
|
|
22
|
+
"@e-mc/core": "0.13.6"
|
|
23
23
|
}
|
|
24
24
|
}
|