@master/css 2.0.0-rc.57 → 2.0.0-rc.58

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.
@@ -94,10 +94,11 @@ class SyntaxLayer extends layer {
94
94
  }
95
95
  if (matchStartIndex !== -1) {
96
96
  for(let i = matchEndIndex; i >= matchStartIndex; i--){
97
- const value = (this.rules[i].at.media?.find(({ name })=>name === 'min-width')).value;
98
- if (value > minWidthFeature.value) {
97
+ const feature = this.rules[i].at.media?.find(({ name })=>name === 'min-width');
98
+ if (!feature) continue;
99
+ if (feature.value > minWidthFeature.value) {
99
100
  matchEndIndex = i - 1;
100
- } else if (value < minWidthFeature.value) {
101
+ } else if (feature.value < minWidthFeature.value) {
101
102
  matchStartIndex = i + 1;
102
103
  break;
103
104
  }
@@ -116,10 +117,11 @@ class SyntaxLayer extends layer {
116
117
  }
117
118
  if (matchStartIndex !== -1) {
118
119
  for(let i = matchEndIndex; i >= matchStartIndex; i--){
119
- const value = (this.rules[i].at.media?.find(({ name })=>name === 'max-width')).value;
120
- if (value < maxWidthFeature.value) {
120
+ const feature = this.rules[i].at.media?.find(({ name })=>name === 'max-width');
121
+ if (!feature) continue;
122
+ if (feature.value < maxWidthFeature.value) {
121
123
  matchEndIndex = i - 1;
122
- } else if (value > maxWidthFeature.value) {
124
+ } else if (feature.value > maxWidthFeature.value) {
123
125
  matchStartIndex = i + 1;
124
126
  break;
125
127
  }
@@ -92,10 +92,11 @@ class SyntaxLayer extends Layer {
92
92
  }
93
93
  if (matchStartIndex !== -1) {
94
94
  for(let i = matchEndIndex; i >= matchStartIndex; i--){
95
- const value = (this.rules[i].at.media?.find(({ name })=>name === 'min-width')).value;
96
- if (value > minWidthFeature.value) {
95
+ const feature = this.rules[i].at.media?.find(({ name })=>name === 'min-width');
96
+ if (!feature) continue;
97
+ if (feature.value > minWidthFeature.value) {
97
98
  matchEndIndex = i - 1;
98
- } else if (value < minWidthFeature.value) {
99
+ } else if (feature.value < minWidthFeature.value) {
99
100
  matchStartIndex = i + 1;
100
101
  break;
101
102
  }
@@ -114,10 +115,11 @@ class SyntaxLayer extends Layer {
114
115
  }
115
116
  if (matchStartIndex !== -1) {
116
117
  for(let i = matchEndIndex; i >= matchStartIndex; i--){
117
- const value = (this.rules[i].at.media?.find(({ name })=>name === 'max-width')).value;
118
- if (value < maxWidthFeature.value) {
118
+ const feature = this.rules[i].at.media?.find(({ name })=>name === 'max-width');
119
+ if (!feature) continue;
120
+ if (feature.value < maxWidthFeature.value) {
119
121
  matchEndIndex = i - 1;
120
- } else if (value > maxWidthFeature.value) {
122
+ } else if (feature.value > maxWidthFeature.value) {
121
123
  matchStartIndex = i + 1;
122
124
  break;
123
125
  }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@master/css","type":"module","scripts":{"build":"techor build \"src/**/*.ts\"","dev":"pnpm build --watch","test":"vitest","type-check":"tsc --noEmit","lint":"eslint"},"license":"MIT","description":"The CSS language and framework for rapidly building modern and high-performance websites","author":"Aoyue Design LLC.","funding":"https://rc.css.master.co/sponsor","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/core"},"keywords":["style","styles","html","variants","virtual","virtual-css","utility","css","ui","lightweight","class","webpack","plugin","integration","vite","parcel","build-tools","mastercss"],"sideEffects":false,"main":"./dist/index.cjs","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"bin":"./dist/bin/index.mjs","files":["dist"],"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/colors":"^2.1.0","@master/normal.css":"^3.1.0","@techor/extend":"^3.2.0","csstype":"^3.1.3"},"devDependencies":{"shared":"^2.0.0-rc.57"},"version":"2.0.0-rc.57"}
1
+ {"name":"@master/css","type":"module","scripts":{"build":"techor build \"src/**/*.ts\"","dev":"pnpm build --watch","test":"vitest","type-check":"tsc --noEmit","lint":"eslint"},"license":"MIT","description":"The CSS language and framework for rapidly building modern and high-performance websites","author":"Aoyue Design LLC.","funding":"https://rc.css.master.co/sponsor","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/core"},"keywords":["style","styles","html","variants","virtual","virtual-css","utility","css","ui","lightweight","class","webpack","plugin","integration","vite","parcel","build-tools","mastercss"],"sideEffects":false,"main":"./dist/index.cjs","jsnext:main":"./dist/index.mjs","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"}},"bin":"./dist/bin/index.mjs","files":["dist"],"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/colors":"^2.1.0","@master/normal.css":"^3.1.0","@techor/extend":"^3.2.0","csstype":"^3.1.3"},"devDependencies":{"shared":"^2.0.0-rc.58"},"version":"2.0.0-rc.58"}