@node-projects/web-component-designer 0.0.193 → 0.0.194

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 CHANGED
@@ -72,12 +72,11 @@ We have 2 tree components. One independent and one feature rich which uses Fancy
72
72
 
73
73
  ## DragDrop
74
74
 
75
- If you'd like to use the designer on mobile, you need the mobile-drag-drop npm library and include our polyfill.
75
+ If you'd like to use the designer on mobile, you need the mobile-drag-drop npm library.
76
76
  Your index.html should be extended as follows:
77
77
 
78
78
  <link rel="stylesheet" href="/node_modules/mobile-drag-drop/default.css">
79
79
  <script src="/node_modules/mobile-drag-drop/index.js"></script>
80
- <script src="/node_modules/@node-projects/web-component-designer/dist/polyfill/mobileDragDrop.js"></script>
81
80
 
82
81
  ## Copyright notice
83
82
 
@@ -24,7 +24,7 @@ export function convertCssUnitToPixel(cssValue, target, percentTarget) {
24
24
  'rlh': value => value * parseFloat(getComputedStyle(document.documentElement).lineHeight),
25
25
  '%': value => value / 100 * (percentTarget == 'height' ? target.getBoundingClientRect().height : target.getBoundingClientRect().width),
26
26
  /* todo
27
- //find parent with computed style where contaner-type is inline-size or size (regarding to query type)
27
+ //find parent with computed style where container-type is inline-size or size (regarding to query type)
28
28
  //use this size for calculation
29
29
  'cqw':
30
30
  'cqh':
@@ -1017,15 +1017,17 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
1017
1017
  }
1018
1018
  if (rule instanceof CSSStyleRule) {
1019
1019
  let parts = rule.selectorText.split(',');
1020
+ let sel = "";
1020
1021
  for (let p of parts) {
1021
1022
  if (p.includes(this.cssprefixConstant)) {
1022
- t += p;
1023
+ sel += p;
1023
1024
  continue;
1024
1025
  }
1025
- if (t)
1026
- t += ',';
1027
- t += this.cssprefixConstant + p;
1026
+ if (sel)
1027
+ sel += ',';
1028
+ sel += this.cssprefixConstant + p.trimStart();
1028
1029
  }
1030
+ t += sel;
1029
1031
  let cssText = rule.style.cssText;
1030
1032
  //bugfix for chrome issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1394353
1031
1033
  if (rule.styleMap && rule.styleMap.get('grid-template') && rule.styleMap.get('grid-template').toString().includes('repeat(')) {
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.193",
4
+ "version": "0.0.194",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "author": "",