@master/css 2.0.0-rc.49 → 2.0.0-rc.50

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/dist/core.cjs CHANGED
@@ -604,8 +604,8 @@ class MasterCSS {
604
604
  return this;
605
605
  }
606
606
  destroy() {
607
- // @ts-ignore
608
- this.classUsages = new Map();
607
+ this.reset();
608
+ this.classUsages.clear();
609
609
  masterCSSs.splice(masterCSSs.indexOf(this), 1);
610
610
  return this;
611
611
  }
package/dist/core.mjs CHANGED
@@ -600,8 +600,8 @@ class MasterCSS {
600
600
  return this;
601
601
  }
602
602
  destroy() {
603
- // @ts-ignore
604
- this.classUsages = new Map();
603
+ this.reset();
604
+ this.classUsages.clear();
605
605
  masterCSSs.splice(masterCSSs.indexOf(this), 1);
606
606
  return this;
607
607
  }
package/dist/layer.cjs CHANGED
@@ -99,7 +99,12 @@ class Layer {
99
99
  }
100
100
  // @ts-expect-error
101
101
  this.usages = {};
102
- if (this.native) {
102
+ const nativeSheet = this.css.style?.sheet;
103
+ if (this.native && nativeSheet) {
104
+ const foundIndex = findNativeCssRuleIndex(nativeSheet.cssRules, this.native);
105
+ if (foundIndex !== -1) {
106
+ nativeSheet.deleteRule(foundIndex);
107
+ }
103
108
  this.native = null;
104
109
  }
105
110
  }
package/dist/layer.mjs CHANGED
@@ -97,7 +97,12 @@ class Layer {
97
97
  }
98
98
  // @ts-expect-error
99
99
  this.usages = {};
100
- if (this.native) {
100
+ const nativeSheet = this.css.style?.sheet;
101
+ if (this.native && nativeSheet) {
102
+ const foundIndex = findNativeCSSRuleIndex(nativeSheet.cssRules, this.native);
103
+ if (foundIndex !== -1) {
104
+ nativeSheet.deleteRule(foundIndex);
105
+ }
101
106
  this.native = null;
102
107
  }
103
108
  }
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.1.7","csstype":"^3.1.3"},"devDependencies":{"shared":"^2.0.0-rc.49"},"version":"2.0.0-rc.49"}
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.1.7","csstype":"^3.1.3"},"devDependencies":{"shared":"^2.0.0-rc.50"},"version":"2.0.0-rc.50"}