@master/css 2.0.0-rc.8 → 2.0.0-rc.81

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.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -48
  3. package/dist/index.d.ts +2 -7
  4. package/dist/index.js +2 -0
  5. package/package.json +80 -1
  6. package/src/base.css +1 -0
  7. package/src/index.css +1 -0
  8. package/src/theme.css +1 -0
  9. package/src/utilities.css +1 -0
  10. package/src/variants.css +1 -0
  11. package/dist/bin/index.bundle.js +0 -33
  12. package/dist/bin/index.d.ts +0 -2
  13. package/dist/config/animations.d.ts +0 -110
  14. package/dist/config/functions.d.ts +0 -3
  15. package/dist/config/index.d.ts +0 -68
  16. package/dist/config/media-queries.d.ts +0 -1
  17. package/dist/config/rules.d.ts +0 -279
  18. package/dist/config/selectors.d.ts +0 -20
  19. package/dist/config/semantics.d.ts +0 -191
  20. package/dist/config/styles.d.ts +0 -3
  21. package/dist/config/variables.d.ts +0 -551
  22. package/dist/constants/base-unit-regex.d.ts +0 -1
  23. package/dist/constants/start-symbol.d.ts +0 -6
  24. package/dist/core.d.ts +0 -96
  25. package/dist/functions/reorder-for-readable-classes.d.ts +0 -12
  26. package/dist/functions/transform-color-with-opacity.d.ts +0 -1
  27. package/dist/index.bundle.js +0 -1
  28. package/dist/index.bundle.mjs +0 -1
  29. package/dist/layer.d.ts +0 -11
  30. package/dist/polyfills/css-escape.d.ts +0 -0
  31. package/dist/rule.d.ts +0 -116
  32. package/dist/tokens/screen-sizes.d.ts +0 -14
  33. package/dist/types/global.d.ts +0 -5
  34. package/dist/utils/concat-arrays.d.ts +0 -1
  35. package/dist/utils/extend-config.d.ts +0 -2
  36. package/dist/utils/flatten-object.d.ts +0 -1
  37. package/dist/utils/get-type.d.ts +0 -7
  38. package/dist/utils/hex-to-rgb.d.ts +0 -1
  39. package/dist/utils/is-plain-object.d.ts +0 -8
  40. package/dist/utils/is-symbol.d.ts +0 -7
  41. package/dist/utils/rgb-to-hex.d.ts +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) Aoyue Design LLC.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  </picture>
11
11
  </a>
12
12
  </p>
13
- <p align="center">A markup-driven CSS language with enhanced syntax</p>
13
+ <p align="center">The CSS language and framework for rapidly building modern and high-performance websites</p>
14
14
 
15
15
  <p align="center">
16
16
  <a aria-label="GitHub release (latest by date including pre-releases)" href="https://github.com/master-co/css/releases">
@@ -48,61 +48,20 @@
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/ci-release.yml">
52
52
  <picture>
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
- <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">
55
- <img alt="Github release actions" src="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">
53
+ <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/master-co/css/ci-release.yml?branch=rc&label=%20&message=twitter&color=212022&logo=githubactions&style=for-the-badge">
54
+ <source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/actions/workflow/status/master-co/css/ci-release.yml?branch=rc&label=%20&message=twitter&color=f6f7f8&logo=githubactions&style=for-the-badge&logoColor=%23000">
55
+ <img alt="Github release actions" src="https://img.shields.io/github/actions/workflow/status/master-co/css/ci-release.yml?branch=rc&label=%20&message=twitter&color=f6f7f8&logo=githubactions&style=for-the-badge&logoColor=%23000">
56
56
  </picture>
57
57
  </a>
58
58
  </p>
59
59
 
60
60
  </div>
61
61
 
62
- ## Documentation
63
- Visit [rc.css.master.co](https://rc.css.master.co) to view the full documentation
62
+ ## Getting started
64
63
 
65
- ## Getting Started
66
- Check out the [official guides](https://rc.css.master.co/docs) to get started with Master CSS, or walk through the [examples](https://github.com/master-co/css/tree/rc/examples) for a quick overview of integrating with your framework.
67
-
68
- ## Rendering Modes
69
- Master CSS provides various [rendering modes](https://rc.css.master.co/docs/rendering-modes), allowing you to choose according to the characteristics and needs of different projects.
70
-
71
- - [Progressive Rendering](https://rc.css.master.co/docs/rendering-modes/progressive-rendering) - Scan the requested HTML on the server side, generate CSS rules, and enable runtime engine on the browser side
72
- - [Runtime Rendering](https://rc.css.master.co/docs/rendering-modes/runtime-rendering) - Observe the DOM tree, manipulate CSS rules according to the changed class name, and synchronize to the running style sheet at runtime
73
- - [Static Extraction](https://rc.css.master.co/docs/rendering-modes/static-extraction) - Scan source files for class names at build time, extract class names, and generate CSS files/virtual modules, then import them in the entry file
74
-
75
- ## Ecosystem
76
- We've built various Master CSS core functionality/integration packages:
77
-
78
- - [CSS](https://github.com/master-co/css/tree/rc/packages/css) - The core of Master CSS, including the runtime engine
79
-
80
- ##### Frameworks
81
- - [React](https://github.com/master-co/css/tree/rc/packages/react) - Integrate Master CSS the React way
82
- - [Svelte](https://github.com/master-co/css/tree/rc/packages/svelte) - Integrate Master CSS the Svelte way
83
- - [Vue](https://github.com/master-co/css/tree/rc/packages/vue) - Integrate Master CSS the Vue.js way
84
-
85
- ##### Progressive Rendering
86
- - [Server](https://github.com/master-co/css/tree/rc/packages/server) - Generate Master CSS text from markup on the server
87
- - [Renderer](https://github.com/master-co/css/tree/rc/packages/renderer) - Pre-renders and injects HTML-required CSS
88
-
89
- ##### Static Extraction
90
- - [Extractor](https://github.com/master-co/css/tree/rc/packages/extractor) - Master CSS static extractor for various raw text extraction.
91
- - [Vite](https://github.com/master-co/css/tree/rc/packages/extractor.vite) - Integrate Master CSS Static Extraction in Vite way
92
- - [Webpack](https://github.com/master-co/css/tree/rc/packages/extractor.webpack) - Integrate Master CSS Static Extraction in Webpack way
93
-
94
- ##### Validation
95
- - [Validator](https://github.com/master-co/css/tree/rc/packages/validator) for Master CSS class syntax
96
-
97
- ##### Language
98
- - [Server](https://github.com/master-co/css/tree/rc/packages/language-server) - The core of the Master CSS language server
99
- - [Service](https://github.com/master-co/css/tree/rc/packages/language-service) - The core of the Master CSS language service
100
- - [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=masterco.master-css-language-service) - Master CSS Language Service for Visual Studio Code Extension
101
-
102
- ##### Others
103
- - [Normal CSS](https://rc.css.master.co/docs/global-styles) - Normalize the browser's styles
104
- - [Theme Service](https://rc.css.master.co/docs/theme-service) - A CSS theme-switching service for Master CSS
105
- - [Class Variant](https://rc.css.master.co/docs/class-variant) - Create reusable, extensible, and customizable style class variants
64
+ Read the [installation guide](https://rc.css.master.co/guide/installation) to set up Master CSS for an application.
106
65
 
107
66
  ## Community
108
67
  The Master CSS community can be found here:
package/dist/index.d.ts CHANGED
@@ -1,7 +1,2 @@
1
- export { MasterCSS, MasterCSS as default } from './core';
2
- export { Rule } from './rule';
3
- export type { NativeRule, MediaFeatureComponent, MediaQuery } from './rule';
4
- export { Layer } from './layer';
5
- export { default as extend } from '@techor/extend';
6
- export { default as reorderForReadableClasses } from './functions/reorder-for-readable-classes';
7
- export * from './config';
1
+ import css_engine_default, { AnimationRule, CompiledUtility, GeneratedRule, Layer, MasterCSS, MasterCSSClassInspection, MasterCSSCreateOptions, MasterCSSEmittedGlobals, MasterCSSGeneratedRuleIR, MasterCSSHydrationManifest, MasterCSSInspectedClassVariable, MasterCSSManifest, MasterCSSManifestSettings, MasterCSSManifestUtility, MasterCSSManifestUtilityLayerName, MasterCSSManifestVariable, MasterCSSManifestVariableNumericValue, MasterCSSManifestVariant, MasterCSSNormalizedNumericValue, MasterCSSOptions, NativeCSSDeclaration, NativeCSSDeclarationMatcher, NonLayer, Rule, ThemeLayer, UtilityLayer, VariableRule, compareRulePriority, createHydrationManifest } from "@master/css-engine";
2
+ export { AnimationRule, type CompiledUtility, type GeneratedRule, Layer, MasterCSS, type MasterCSSClassInspection, type MasterCSSCreateOptions, type MasterCSSEmittedGlobals, type MasterCSSGeneratedRuleIR, type MasterCSSHydrationManifest, type MasterCSSInspectedClassVariable, type MasterCSSManifest, type MasterCSSManifestSettings, type MasterCSSManifestUtility, type MasterCSSManifestUtilityLayerName, type MasterCSSManifestVariable, type MasterCSSManifestVariableNumericValue, type MasterCSSManifestVariant, type MasterCSSNormalizedNumericValue, type MasterCSSOptions, type NativeCSSDeclaration, type NativeCSSDeclarationMatcher, NonLayer, Rule, ThemeLayer, UtilityLayer, VariableRule, compareRulePriority, createHydrationManifest, css_engine_default as default };
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import css_engine_default, { AnimationRule, Layer, MasterCSS, NonLayer, Rule, ThemeLayer, UtilityLayer, VariableRule, compareRulePriority, createHydrationManifest } from "@master/css-engine";
2
+ export { AnimationRule, Layer, MasterCSS, NonLayer, Rule, ThemeLayer, UtilityLayer, VariableRule, compareRulePriority, createHydrationManifest, css_engine_default as default };
package/package.json CHANGED
@@ -1 +1,80 @@
1
- {"name":"@master/css","scripts":{"build":"techor pack --declare --external @master/css-renderer @master/css-extractor","dev":"pnpm run build --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"A markup-driven CSS language with enhanced syntax","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.bundle.js","jsnext:main":"./dist/index.bundle.mjs","esnext":"./dist/index.bundle.mjs","module":"./dist/index.bundle.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.bundle.js","import":"./dist/index.bundle.mjs","types":"./dist/index.d.ts"}},"bin":{"@master/css":"./dist/bin/index.bundle.js","mcss":"./dist/bin/index.bundle.js","mastercss":"./dist/bin/index.bundle.js"},"files":["dist"],"publishConfig":{"access":"public"},"dependencies":{"@master/normal.css":"^2.0.0-rc.8","@techor/fs":"^2.5.24","@techor/log":"^2.5.24","commander":"^11.0.0"},"devDependencies":{"@techor/extend":"^2.5.24","@techor/pack":"^2.5.24","@types/jest":"^29.5.11","css-shared":"^2.0.0-rc.8","csstype":"^3.1.2","puppeteer":"^21.0.1","vite":"^4.2.1"},"version":"2.0.0-rc.8"}
1
+ {
2
+ "name": "@master/css",
3
+ "type": "module",
4
+ "license": "MIT",
5
+ "description": "The CSS language and framework for rapidly building modern and high-performance websites",
6
+ "author": "Aoyue Design LLC.",
7
+ "funding": "https://rc.css.master.co/sponsor",
8
+ "homepage": "https://css.master.co",
9
+ "bugs": {
10
+ "url": "https://github.com/master-co/css/issues"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/master-co/css.git",
15
+ "directory": "packages/facade"
16
+ },
17
+ "keywords": [
18
+ "style",
19
+ "styles",
20
+ "html",
21
+ "variants",
22
+ "virtual",
23
+ "virtual-css",
24
+ "utility",
25
+ "css",
26
+ "ui",
27
+ "lightweight",
28
+ "class",
29
+ "webpack",
30
+ "plugin",
31
+ "integration",
32
+ "vite",
33
+ "parcel",
34
+ "build-tools",
35
+ "mastercss"
36
+ ],
37
+ "sideEffects": [
38
+ "./src/*.css"
39
+ ],
40
+ "main": "./dist/index.js",
41
+ "jsnext:main": "./dist/index.js",
42
+ "esnext": "./dist/index.js",
43
+ "module": "./dist/index.js",
44
+ "style": "./src/index.css",
45
+ "types": "./dist/index.d.ts",
46
+ "exports": {
47
+ ".": {
48
+ "style": "./src/index.css",
49
+ "types": "./dist/index.d.ts",
50
+ "import": "./dist/index.js",
51
+ "default": "./dist/index.js"
52
+ },
53
+ "./index.css": "./src/index.css",
54
+ "./base.css": "./src/base.css",
55
+ "./theme.css": "./src/theme.css",
56
+ "./variants.css": "./src/variants.css",
57
+ "./utilities.css": "./src/utilities.css"
58
+ },
59
+ "files": [
60
+ "dist",
61
+ "src/*.css"
62
+ ],
63
+ "publishConfig": {
64
+ "access": "public",
65
+ "provenance": true
66
+ },
67
+ "dependencies": {
68
+ "@master/css-preset": "^2.0.0-rc.81",
69
+ "@master/css-engine": "^2.0.0-rc.81"
70
+ },
71
+ "version": "2.0.0-rc.81",
72
+ "scripts": {
73
+ "build": "tsdown --config ../../shared/tsdown-package.config.ts",
74
+ "dev": "tsdown --config ../../shared/tsdown-package.config.ts --watch",
75
+ "test": "vitest",
76
+ "bench": "vitest bench",
77
+ "type-check": "tsc -b tsconfig.typecheck.json",
78
+ "lint": "eslint"
79
+ }
80
+ }
package/src/base.css ADDED
@@ -0,0 +1 @@
1
+ @import "@master/css-preset/base.css";
package/src/index.css ADDED
@@ -0,0 +1 @@
1
+ @import "@master/css-preset";
package/src/theme.css ADDED
@@ -0,0 +1 @@
1
+ @import "@master/css-preset/theme.css";
@@ -0,0 +1 @@
1
+ @import "@master/css-preset/utilities.css";
@@ -0,0 +1 @@
1
+ @import "@master/css-preset/variants.css";
@@ -1,33 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";var T=Object.create;var d=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var j=(e,s,t,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of v(s))!_.call(e,o)&&o!==t&&d(e,o,{get:()=>s[o],enumerable:!(r=C(s,o))||r.enumerable});return e};var p=(e,s,t)=>(t=e!=null?T(x(e)):{},j(s||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e));var h=require("commander"),m=p(require("path")),c=p(require("fs"));var g=`/** @type {import('@master/css').Config} */
3
- module.exports = {
4
- styles: {},
5
- rules: {},
6
- variables: {},
7
- semantics: {},
8
- mediaQueries: {},
9
- animations: {},
10
- selectors: {},
11
- functions: {}
12
- }`;var y=`/** @type {import('@master/css').Config} */
13
- export default {
14
- styles: {},
15
- rules: {},
16
- variables: {},
17
- semantics: {},
18
- mediaQueries: {},
19
- animations: {},
20
- selectors: {},
21
- functions: {}
22
- }`;var S=`import type { Config } from '@master/css'
23
-
24
- export default {
25
- styles: {},
26
- rules: {},
27
- variables: {},
28
- semantics: {},
29
- mediaQueries: {},
30
- animations: {},
31
- selectors: {},
32
- functions: {}
33
- } as Config`;var n=p(require("@techor/log")),l=require("@techor/fs"),{version:b,name:M,description:F}=(0,l.readJSONFileSync)(m.default.resolve(__dirname,"../../package.json")),a=new h.Command;a.name(M).description(F).version(b||"0.0.0");a.command("init").description("Initialize definition files for Master CSS").option("-o, --override","Override existing definition file").option("--esm","ES Module .mjs").option("--ts","TypeScript .ts").option("--cjs","CommonJS .js").action(async function(e){let{esm:s,ts:t,cjs:r}=e;if(!s&&!t&&!r)if(c.default.existsSync("tsconfig.json"))t=!0;else{let{type:i}=(0,l.readJSONFileSync)("./package.json")||{};i==="module"?s=!0:r=!0}let o=(i,f)=>{let u=c.default.existsSync(m.default.join(process.cwd(),i));u?u&&e.override?(c.default.writeFileSync(i,f),n.default.ok`**${i}** file is overridden`):n.default.x`**${i}** file already exists`:(c.default.writeFileSync(i,f),n.default.ok`**${i}** file is created`)};s&&o("master.css.mjs",y),t&&o("master.css.ts",S),r&&o("master.css.js",g)});a.command("render").description("Scans HTML and injects generated CSS rules").argument("<source paths>","The path in glob patterns of the source of the HTML file").option("-c --config <path>","The source path of the Master CSS configuration","master.css.*").option("-a --analyze","Analyze injected CSS and HTML size ( brotli ) without writing to file").action(async function(e,s){try{await require("@master/css-renderer/actions/main")(e,s)}catch(t){t.code==="ERR_MODULE_NOT_FOUND"?n.default.i`Please run **npm** **install** **@master/css-renderer** first`:console.error(t)}});a.command("extract").argument("[source paths]","The glob pattern path to extract sources").option("-w, --watch","Watch file changed and generate CSS rules.").option("-o, --output <path>","Specify your CSS file output path").option("-v, --verbose","Verbose logging 0~N","1").option("--options <path>","Specify your extractor options sources","master.css-extractor.*").action(async function(e,s){try{await require("@master/css-extractor/actions/main")(e,s)}catch(t){t.code==="ERR_MODULE_NOT_FOUND"?n.default.i`Please run **npm** **install** **@master/css-extractor** first`:console.error(t)}});console.log(a.parse);a.parse();
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,110 +0,0 @@
1
- declare const animations: {
2
- fade: {
3
- '0%': {
4
- opacity: number;
5
- };
6
- to: {
7
- opacity: number;
8
- };
9
- };
10
- flash: {
11
- '0%,50%,to': {
12
- opacity: number;
13
- };
14
- '25%,75%': {
15
- opacity: number;
16
- };
17
- };
18
- float: {
19
- '0%': {
20
- transform: string;
21
- };
22
- '50%': {
23
- transform: string;
24
- };
25
- to: {
26
- transform: string;
27
- };
28
- };
29
- heart: {
30
- '0%': {
31
- transform: string;
32
- };
33
- '14%': {
34
- transform: string;
35
- };
36
- '28%': {
37
- transform: string;
38
- };
39
- '42%': {
40
- transform: string;
41
- };
42
- '70%': {
43
- transform: string;
44
- };
45
- };
46
- jump: {
47
- '0%,to': {
48
- transform: string;
49
- 'animation-timing-function': string;
50
- };
51
- '50%': {
52
- transform: string;
53
- 'animation-timing-function': string;
54
- };
55
- };
56
- ping: {
57
- '75%,to': {
58
- transform: string;
59
- opacity: number;
60
- };
61
- };
62
- pulse: {
63
- '0%': {
64
- transform: string;
65
- };
66
- '50%': {
67
- transform: string;
68
- };
69
- to: {
70
- transform: string;
71
- };
72
- };
73
- rotate: {
74
- '0%': {
75
- transform: string;
76
- };
77
- to: {
78
- transform: string;
79
- };
80
- };
81
- shake: {
82
- '0%': {
83
- transform: string;
84
- };
85
- '6.5%': {
86
- transform: string;
87
- };
88
- '18.5%': {
89
- transform: string;
90
- };
91
- '31.5%': {
92
- transform: string;
93
- };
94
- '43.5%': {
95
- transform: string;
96
- };
97
- '50%': {
98
- transform: string;
99
- };
100
- };
101
- zoom: {
102
- '0%': {
103
- transform: string;
104
- };
105
- to: {
106
- transform: string;
107
- };
108
- };
109
- };
110
- export default animations;
@@ -1,3 +0,0 @@
1
- import type { FunctionDefinitions } from './';
2
- declare const functions: FunctionDefinitions;
3
- export default functions;
@@ -1,68 +0,0 @@
1
- import mediaQueries from './media-queries';
2
- import selectors from './selectors';
3
- import semantics from './semantics';
4
- import animations from './animations';
5
- import variables from './variables';
6
- import rules from './rules';
7
- import functions from './functions';
8
- import type { PropertiesHyphen } from 'csstype';
9
- import type { Rule, RuleDefinition, ValueComponent } from '../rule';
10
- declare const config: Config;
11
- export { config, mediaQueries, selectors, semantics, rules, functions, animations, variables };
12
- export type VariableValue = number | string | Array<number | string>;
13
- export type VariableDefinition = {
14
- [key in '' | `@${string}` | string]?: VariableValue | VariableDefinition;
15
- };
16
- export type CSSKeyframes = {
17
- [key in 'from' | 'to' | string]: PropertiesHyphen;
18
- };
19
- export type AnimationDefinitions = {
20
- [key: string]: CSSKeyframes;
21
- };
22
- export type SelectorDefinitions = {
23
- [key: string]: string | string[] | SelectorDefinitions;
24
- };
25
- export type MediaQueryDefinitions = {
26
- [key: string]: number | string | MediaQueryDefinitions;
27
- };
28
- export type StyleDefinitions = {
29
- [key: string]: string | StyleDefinitions;
30
- };
31
- export type RuleDefinitions = {
32
- [key in keyof typeof rules | string]?: RuleDefinition;
33
- };
34
- export type VariableDefinitions = {
35
- [key in keyof typeof rules]?: VariableDefinition;
36
- } & {
37
- [key: string]: VariableDefinition | VariableValue;
38
- };
39
- export type SemanticDefinitions = {
40
- [key in keyof typeof semantics]?: PropertiesHyphen;
41
- } & {
42
- [key: string]: PropertiesHyphen;
43
- };
44
- export interface FunctionDefinition {
45
- unit?: string;
46
- colored?: boolean;
47
- transform?(this: Rule, value: string, bypassVariableNames: string[]): string | ValueComponent[];
48
- }
49
- export type FunctionDefinitions = {
50
- [key: string]: FunctionDefinition;
51
- };
52
- export interface Config {
53
- extends?: (Config | any)[];
54
- styles?: StyleDefinitions;
55
- mediaQueries?: MediaQueryDefinitions;
56
- selectors?: SelectorDefinitions;
57
- semantics?: SemanticDefinitions;
58
- variables?: VariableDefinitions;
59
- rules?: RuleDefinitions;
60
- rootSize?: number;
61
- baseUnit?: number;
62
- scope?: string;
63
- important?: boolean;
64
- override?: boolean;
65
- functions?: FunctionDefinitions;
66
- animations?: AnimationDefinitions;
67
- themeDriver?: 'class' | 'media' | 'host';
68
- }
@@ -1 +0,0 @@
1
- export { default } from '../tokens/screen-sizes';