@node-projects/web-component-designer 0.0.271 → 0.0.272
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.
|
@@ -25,12 +25,12 @@ export function pointInRect(point, rect) {
|
|
|
25
25
|
return point.x >= rect.x && point.x <= rect.x + rect.width && point.y >= rect.y && point.y <= rect.y + rect.height;
|
|
26
26
|
}
|
|
27
27
|
export function removeTrailing(text, char) {
|
|
28
|
-
if (text.endsWith('/'))
|
|
28
|
+
if (text.endsWith(char ?? '/'))
|
|
29
29
|
return text.substring(0, text.length - 1);
|
|
30
30
|
return text;
|
|
31
31
|
}
|
|
32
32
|
export function removeLeading(text, char) {
|
|
33
|
-
if (text.startsWith('/'))
|
|
33
|
+
if (text.startsWith(char ?? '/'))
|
|
34
34
|
return text.substring(1);
|
|
35
35
|
return text;
|
|
36
36
|
}
|
|
@@ -288,15 +288,17 @@ export class NpmPackageLoader {
|
|
|
288
288
|
i = getImport(i);
|
|
289
289
|
if (!(typeof i == 'string'))
|
|
290
290
|
i = getImport(i);
|
|
291
|
+
if (!(typeof i == 'string'))
|
|
292
|
+
i = null;
|
|
291
293
|
return i;
|
|
292
294
|
};
|
|
293
295
|
//Names to use: browser, import, default, node
|
|
294
296
|
let imp = getImportFlat(packageJsonObj.exports);
|
|
295
297
|
if (imp) {
|
|
296
|
-
importMap.imports[packageJsonObj.name] = baseUrl + removeTrailing(imp, '/');
|
|
298
|
+
importMap.imports[packageJsonObj.name] = baseUrl + removeLeading(removeTrailing(imp, '/'), '.');
|
|
297
299
|
}
|
|
298
300
|
else if (imp = getImportFlat(packageJsonObj.exports?.['.'])) {
|
|
299
|
-
importMap.imports[packageJsonObj.name] = baseUrl + removeTrailing(imp, '/');
|
|
301
|
+
importMap.imports[packageJsonObj.name] = baseUrl + removeLeading(removeTrailing(imp, '/'), '.');
|
|
300
302
|
}
|
|
301
303
|
}
|
|
302
304
|
let mainImport = packageJsonObj.main;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "A UI designer for Polymer apps",
|
|
3
3
|
"name": "@node-projects/web-component-designer",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.272",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "",
|
|
@@ -16,27 +16,27 @@
|
|
|
16
16
|
"@node-projects/base-custom-webcomponent": "^0.13.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@adobe/css-tools": "4.3.
|
|
19
|
+
"@adobe/css-tools": "4.3.1",
|
|
20
20
|
"@node-projects/lean-he-esm": "^3.3.0",
|
|
21
21
|
"@node-projects/node-html-parser-esm": "^6.1.5",
|
|
22
22
|
"@papyrs/stylo": "^0.0.45",
|
|
23
|
-
"@types/codemirror": "^5.60.
|
|
23
|
+
"@types/codemirror": "^5.60.9",
|
|
24
24
|
"@types/css-tree": "^2.3.1",
|
|
25
|
-
"@types/jquery": "^3.5.
|
|
25
|
+
"@types/jquery": "^3.5.17",
|
|
26
26
|
"@types/jquery.fancytree": "0.0.7",
|
|
27
|
-
"@types/node": "^20.
|
|
28
|
-
"ace-builds": "^1.24.
|
|
27
|
+
"@types/node": "^20.5.6",
|
|
28
|
+
"ace-builds": "^1.24.1",
|
|
29
29
|
"codemirror": "^5.0.0",
|
|
30
30
|
"css-tree": "^2.3.1",
|
|
31
31
|
"esprima-next": "^5.8.4",
|
|
32
32
|
"html2canvas": "*",
|
|
33
|
-
"jest": "^29.6.
|
|
33
|
+
"jest": "^29.6.4",
|
|
34
34
|
"jquery": "^3.7.0",
|
|
35
35
|
"jquery.fancytree": "^2.38.3",
|
|
36
|
-
"mdn-data": "^2.0.
|
|
36
|
+
"mdn-data": "^2.0.33",
|
|
37
37
|
"monaco-editor": "^0.41.0",
|
|
38
38
|
"ts-jest": "^29.1.1",
|
|
39
|
-
"typescript": "^5.
|
|
39
|
+
"typescript": "^5.2.2",
|
|
40
40
|
"typescript-lit-html-plugin": "^0.9.0"
|
|
41
41
|
},
|
|
42
42
|
"repository": {
|