@master/css 2.0.0-rc.16 → 2.0.0-rc.19

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
@@ -48,7 +48,7 @@
48
48
  <img alt="Follow @mastercorg" src="https://img.shields.io/static/v1?label=%20&message=twitter&color=f6f7f8&logo=twitter&style=for-the-badge">
49
49
  </picture>
50
50
  </a>
51
- <a aria-label="Github Actions" href="https://github.com/1aron/repo/actions/workflows/release.yml">
51
+ <a aria-label="Github Actions" href="https://github.com/master-co/css/actions/workflows/release.yml">
52
52
  <picture>
53
53
  <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/master-co/css/release.yml?branch=rc&label=%20&message=twitter&color=212022&logo=githubactions&style=for-the-badge">
54
54
  <source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/actions/workflow/status/master-co/css/release.yml?branch=rc&label=%20&message=twitter&color=f6f7f8&logo=githubactions&style=for-the-badge&logoColor=%23000">
@@ -32,7 +32,7 @@ export type RuleDefinitions = {
32
32
  [key in keyof typeof rules | string]?: RuleDefinition;
33
33
  };
34
34
  export type VariableDefinitions = {
35
- [key in keyof typeof rules]?: VariableDefinition;
35
+ [key in keyof typeof rules]?: VariableDefinition | VariableValue;
36
36
  } & {
37
37
  [key: string]: VariableDefinition | VariableValue;
38
38
  };
@@ -514,7 +514,7 @@ const rules = {
514
514
  match: /^size:/,
515
515
  layer: layer.Layer.CoreShorthand,
516
516
  unit: 'rem',
517
- declare (value, valueComponents) {
517
+ declare (_value, valueComponents) {
518
518
  const length = valueComponents.length;
519
519
  return {
520
520
  width: length === 1 ? valueComponents[0].text : valueComponents[0].text,
@@ -526,7 +526,7 @@ const rules = {
526
526
  match: /^min:/,
527
527
  layer: layer.Layer.CoreShorthand,
528
528
  unit: 'rem',
529
- declare (value, valueComponents) {
529
+ declare (_value, valueComponents) {
530
530
  const length = valueComponents.length;
531
531
  return {
532
532
  'min-width': length === 1 ? valueComponents[0].text : valueComponents[0].text,
@@ -538,7 +538,7 @@ const rules = {
538
538
  match: /^max:/,
539
539
  layer: layer.Layer.CoreShorthand,
540
540
  unit: 'rem',
541
- declare (value, valueComponents) {
541
+ declare (_value, valueComponents) {
542
542
  const length = valueComponents.length;
543
543
  return {
544
544
  'max-width': length === 1 ? valueComponents[0].text : valueComponents[0].text,
@@ -510,7 +510,7 @@ const rules = {
510
510
  match: /^size:/,
511
511
  layer: Layer.CoreShorthand,
512
512
  unit: 'rem',
513
- declare (value, valueComponents) {
513
+ declare (_value, valueComponents) {
514
514
  const length = valueComponents.length;
515
515
  return {
516
516
  width: length === 1 ? valueComponents[0].text : valueComponents[0].text,
@@ -522,7 +522,7 @@ const rules = {
522
522
  match: /^min:/,
523
523
  layer: Layer.CoreShorthand,
524
524
  unit: 'rem',
525
- declare (value, valueComponents) {
525
+ declare (_value, valueComponents) {
526
526
  const length = valueComponents.length;
527
527
  return {
528
528
  'min-width': length === 1 ? valueComponents[0].text : valueComponents[0].text,
@@ -534,7 +534,7 @@ const rules = {
534
534
  match: /^max:/,
535
535
  layer: Layer.CoreShorthand,
536
536
  unit: 'rem',
537
- declare (value, valueComponents) {
537
+ declare (_value, valueComponents) {
538
538
  const length = valueComponents.length;
539
539
  return {
540
540
  'max-width': length === 1 ? valueComponents[0].text : valueComponents[0].text,
package/dist/core.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { Rule, NativeRule, RegisteredRule } from './rule';
1
+ import { Rule, type NativeRule, type RegisteredRule } from './rule';
2
2
  import type { Config, AnimationDefinitions } from './config';
3
+ import './types/global';
3
4
  type VariableValue = {
4
5
  type: 'string';
5
6
  value: string;
@@ -19,20 +20,6 @@ export type Variable = Omit<VariableValue, 'value' | 'space'> & {
19
20
  [theme: string]: VariableValue;
20
21
  };
21
22
  };
22
- export default interface MasterCSS {
23
- readonly style: HTMLStyleElement;
24
- styles: Record<string, string[]>;
25
- stylesBy: Record<string, string[]>;
26
- selectors: Record<string, [RegExp, string[]][]>;
27
- variables: Record<string, Variable>;
28
- mediaQueries: Record<string, string | number>;
29
- variablesNativeRules: Record<string, NativeRule>;
30
- hasKeyframesRule: boolean;
31
- animations: Record<string, AnimationDefinitions & {
32
- usage?: number;
33
- native?: NativeRule;
34
- }>;
35
- }
36
23
  export default class MasterCSS {
37
24
  customConfig: Config;
38
25
  static config: Config;
@@ -92,4 +79,18 @@ export default class MasterCSS {
92
79
  pushVariableNativeRule(theme: string, variableCSSRule: CSSStyleRule): NativeRule;
93
80
  }
94
81
  export declare const masterCSSs: MasterCSS[];
82
+ export default interface MasterCSS {
83
+ readonly style: HTMLStyleElement;
84
+ styles: Record<string, string[]>;
85
+ stylesBy: Record<string, string[]>;
86
+ selectors: Record<string, [RegExp, string[]][]>;
87
+ variables: Record<string, Variable>;
88
+ mediaQueries: Record<string, string | number>;
89
+ variablesNativeRules: Record<string, NativeRule>;
90
+ hasKeyframesRule: boolean;
91
+ animations: Record<string, AnimationDefinitions & {
92
+ usage?: number;
93
+ native?: NativeRule;
94
+ }>;
95
+ }
95
96
  export {};
package/dist/rule.cjs CHANGED
@@ -622,7 +622,7 @@ class Rule {
622
622
  return arr;
623
623
  }, []).join(',');
624
624
  let cssText = getCssText(className) + (classNames ? classNames.reduce((str, className)=>str + ',' + getCssText(className), '') : '') + '{' + propertiesText.join(';') + '}';
625
- for (const key of Object.keys(this.at).sort((a, b)=>b === 'supports' ? -1 : 1)){
625
+ for (const key of Object.keys(this.at).sort((_a, b)=>b === 'supports' ? -1 : 1)){
626
626
  cssText = '@' + key + (key.includes(' ') ? '' : ' ') + this.at[key] + '{' + cssText + '}';
627
627
  }
628
628
  if (this.theme && themeDriver === 'media') {
package/dist/rule.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import MasterCSS, { type Variable } from './core';
2
2
  import { Layer } from './layer';
3
- import { PropertiesHyphen } from 'csstype';
3
+ import { type PropertiesHyphen } from 'csstype';
4
4
  export declare class Rule {
5
5
  readonly className: string;
6
6
  css: MasterCSS;
package/dist/rule.mjs CHANGED
@@ -620,7 +620,7 @@ class Rule {
620
620
  return arr;
621
621
  }, []).join(',');
622
622
  let cssText = getCssText(className) + (classNames ? classNames.reduce((str, className)=>str + ',' + getCssText(className), '') : '') + '{' + propertiesText.join(';') + '}';
623
- for (const key of Object.keys(this.at).sort((a, b)=>b === 'supports' ? -1 : 1)){
623
+ for (const key of Object.keys(this.at).sort((_a, b)=>b === 'supports' ? -1 : 1)){
624
624
  cssText = '@' + key + (key.includes(' ') ? '' : ' ') + this.at[key] + '{' + cssText + '}';
625
625
  }
626
626
  if (this.theme && themeDriver === 'media') {
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -0,0 +1,5 @@
1
+ import type Core from '../core';
2
+ declare global {
3
+ var masterCSSs: Core[];
4
+ var MasterCSS: typeof Core;
5
+ }
@@ -0,0 +1 @@
1
+
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@master/css","type":"module","scripts":{"build":"techor build \"src/**/*.ts\"","dev":"pnpm build --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"The CSS language and framework for rapidly building modern and high-performance websites","author":"Aoyue Design LLC.","funding":"https://css.master.co/docs/donate","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/css"},"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":{".":{"require":"./dist/index.cjs","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"bin":"./dist/bin/index.mjs","files":["dist"],"publishConfig":{"access":"public"},"dependencies":{"@master/normal.css":"^2.0.0-rc.16","@techor/extend":"^3.0.11"},"devDependencies":{"css-shared":"^2.0.0-rc.16","csstype":"^3.1.2"},"version":"2.0.0-rc.16"}
1
+ {"name":"@master/css","type":"module","scripts":{"build":"techor build \"src/**/*.ts\"","dev":"pnpm build --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"The CSS language and framework for rapidly building modern and high-performance websites","author":"Aoyue Design LLC.","funding":"https://css.master.co/docs/donate","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/css"},"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":{".":{"require":"./dist/index.cjs","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"bin":"./dist/bin/index.mjs","files":["dist"],"publishConfig":{"access":"public","provenance":true},"dependencies":{"@master/normal.css":"^2.0.0-rc.19","@techor/extend":"^3.0.16"},"devDependencies":{"css-shared":"^2.0.0-rc.19","csstype":"^3.1.3"},"version":"2.0.0-rc.19"}