@torpor/view 0.1.3 → 0.1.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @torpor/view
2
2
 
3
+ ## 0.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - daba2ad: Fix: passing `:class` and `:style` to components
8
+
3
9
  ## 0.1.3
4
10
 
5
11
  ### Patch Changes
package/dist/compile.cjs CHANGED
@@ -3666,6 +3666,11 @@ function parseStyleAttribute(status) {
3666
3666
  };
3667
3667
  }
3668
3668
 
3669
+ // src/compile/types/nodes/isComponentNode.ts
3670
+ function isComponentNode(node) {
3671
+ return node.type === "component";
3672
+ }
3673
+
3669
3674
  // src/compile/types/nodes/isParentNode.ts
3670
3675
  function isParentNode(node) {
3671
3676
  return "children" in node;
@@ -3684,7 +3689,7 @@ function scopeStyles(status) {
3684
3689
  }
3685
3690
  }
3686
3691
  function scopeStylesOnNode(node, selectors) {
3687
- if (isElementNode(node)) {
3692
+ if (isElementNode(node) || isComponentNode(node)) {
3688
3693
  let scopeStyles2 = selectors.includes(node.tagName);
3689
3694
  if (!scopeStyles2) {
3690
3695
  for (let a of node.attributes) {