tungsten 0.3.12 → 0.3.13

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.
@@ -1 +1 @@
1
- 1786886454316
1
+ 1786887752204
@@ -1 +1 @@
1
- {"version":3,"file":"TransformCssNames.d.ts","sourceRoot":"","sources":["../../src/postcssPlugins/TransformCssNames.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,IAAI,EAAQ,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAoE9C,KAAK,IAAI,GAAG;IACR,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;CACrB,CAAA;AAYD,eAAO,MAAM,iBAAiB;WAAU,IAAI;;mBAezB,IAAI;;;CAqJtB,CAAA"}
1
+ {"version":3,"file":"TransformCssNames.d.ts","sourceRoot":"","sources":["../../src/postcssPlugins/TransformCssNames.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,IAAI,EAAQ,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAoE9C,KAAK,IAAI,GAAG;IACR,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;CACrB,CAAA;AAaD,eAAO,MAAM,iBAAiB;WAAU,IAAI;;mBAezB,IAAI;;;CAqJtB,CAAA"}
@@ -61,8 +61,9 @@ function separatePseudo(selector) {
61
61
  // matches @keyframes and its vendor prefixed forms, e.g. @-webkit-keyframes
62
62
  // at-rule and property names are case insensitive in css, hence the i flag on both
63
63
  const keyframesAtRule = /(^|-)keyframes$/i;
64
- // the declarations that name an animation, e.g. `animation: fade 2s` / `animation-name: fade`
65
- const animationDecl = /^animation(-name)?$/i;
64
+ // the declarations that name an animation, e.g. `animation: fade 2s` / `animation-name: fade`,
65
+ // and their vendor prefixed forms, e.g. `-webkit-animation`
66
+ const animationDecl = /^(-\w+-)?animation(-name)?$/i;
66
67
  const bump = '.' + componentBumpClass + '.' + componentBumpClass + '.' + componentBumpClass;
67
68
  export const TransformCssNames = opts => {
68
69
  //console.log('TransformCssNames')
@@ -1 +1 @@
1
- {"version":3,"file":"scopeAnimationValue.d.ts","sourceRoot":"","sources":["../../src/postcssPlugins/scopeAnimationValue.ts"],"names":[],"mappings":"AA2BA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAW9F"}
1
+ {"version":3,"file":"scopeAnimationValue.d.ts","sourceRoot":"","sources":["../../src/postcssPlugins/scopeAnimationValue.ts"],"names":[],"mappings":"AA+BA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAkB9F"}
@@ -20,6 +20,9 @@ function isAnimationName(word) {
20
20
  if (animationKeywords.has(word.toLowerCase())) return false;
21
21
  return identifierStart.test(word);
22
22
  }
23
+ // The value side of the `:i()` selector marker, naming an animation to leave global. A colon
24
+ // cannot open a declaration value in css, sass or scss, so the marker drops it here
25
+ const ignoreMarker = /^(?:i|ignore)\((.*)\)$/i;
23
26
  // Scopes the animation names in an `animation` or `animation-name` value, e.g.
24
27
  // `fade 2s linear, slide 1s` -> `Card_fade 2s linear, Card_slide 1s`.
25
28
  // A value may list several animations, separated by commas, but names only one per list entry.
@@ -30,6 +33,11 @@ export function scopeAnimationValue(value, scopeName) {
30
33
  named = false;
31
34
  return part;
32
35
  }
36
+ const ignored = ignoreMarker.exec(part);
37
+ if (ignored !== null) {
38
+ named = true;
39
+ return (ignored[1] ?? '').trim();
40
+ }
33
41
  if (named || !isAnimationName(part)) return part;
34
42
  named = true;
35
43
  return scopeName(part);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tungsten",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "bin": {