@pi-r/chrome 0.6.0 → 0.6.3
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 +2 -0
- package/index.d.ts +6 -6
- package/index.js +1 -2
- package/package.json +6 -6
package/README.md
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IFileManager } from '@e-mc/types/lib';
|
|
2
|
-
|
|
3
|
-
import type { ChromeDocumentConstructor, DocumentAsset } from './types';
|
|
4
|
-
|
|
5
|
-
declare const Chrome: ChromeDocumentConstructor<IFileManager<DocumentAsset>>;
|
|
6
|
-
|
|
1
|
+
import type { IFileManager } from '@e-mc/types/lib';
|
|
2
|
+
|
|
3
|
+
import type { ChromeDocumentConstructor, DocumentAsset } from './types';
|
|
4
|
+
|
|
5
|
+
declare const Chrome: ChromeDocumentConstructor<IFileManager<DocumentAsset>>;
|
|
6
|
+
|
|
7
7
|
export = Chrome;
|
package/index.js
CHANGED
|
@@ -1718,12 +1718,11 @@ class ChromeDocument extends Document {
|
|
|
1718
1718
|
const cloudUrl = endpoint ? url.replace(endpoint, '') : url;
|
|
1719
1719
|
file.cloudUrl = cloudUrl;
|
|
1720
1720
|
if (inlineUrlCloud) {
|
|
1721
|
-
const htmlFile = this.htmlFile;
|
|
1722
1721
|
const pattern = new RegExp((0, types_1.escapePattern)(inlineUrlCloud), 'g');
|
|
1723
1722
|
for (const item of this.editing) {
|
|
1724
1723
|
if (item.inlineUrlCloudMap?.[inlineUrlCloud]) {
|
|
1725
1724
|
const source = host.getUTF8String(item);
|
|
1726
|
-
const output = source.replace(pattern, endpoint && item
|
|
1725
|
+
const output = source.replace(pattern, endpoint && item.imported && cloudUrl.includes('/') ? url : cloudUrl);
|
|
1727
1726
|
if (source !== output) {
|
|
1728
1727
|
item.sourceUTF8 = output;
|
|
1729
1728
|
item.modified = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/chrome",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Chrome document constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/anpham6/pi-r.git",
|
|
11
|
+
"url": "git+https://github.com/anpham6/pi-r.git",
|
|
12
12
|
"directory": "src/module/chrome"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/cloud": "^0.8.
|
|
24
|
-
"@e-mc/core": "^0.8.
|
|
25
|
-
"@e-mc/document": "^0.8.
|
|
26
|
-
"@e-mc/types": "^0.8.
|
|
23
|
+
"@e-mc/cloud": "^0.8.3",
|
|
24
|
+
"@e-mc/core": "^0.8.3",
|
|
25
|
+
"@e-mc/document": "^0.8.3",
|
|
26
|
+
"@e-mc/types": "^0.8.3"
|
|
27
27
|
}
|
|
28
28
|
}
|