@master/css 2.0.0-rc.2 → 2.0.0-rc.21

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 (82) hide show
  1. package/README.md +4 -43
  2. package/dist/_virtual/_commonjsHelpers.cjs +5 -0
  3. package/dist/_virtual/_commonjsHelpers.mjs +3 -0
  4. package/dist/_virtual/css-escape.cjs +5 -0
  5. package/dist/_virtual/css-escape.mjs +3 -0
  6. package/dist/bin/index.cjs +11 -0
  7. package/dist/bin/index.d.ts +0 -1
  8. package/dist/bin/index.mjs +9 -0
  9. package/dist/config/animations.cjs +113 -0
  10. package/dist/config/animations.mjs +111 -0
  11. package/dist/config/functions.cjs +352 -0
  12. package/dist/config/functions.mjs +350 -0
  13. package/dist/config/index.cjs +34 -0
  14. package/dist/config/index.d.ts +1 -1
  15. package/dist/config/index.mjs +25 -0
  16. package/dist/config/media-queries.cjs +7 -0
  17. package/dist/config/media-queries.mjs +1 -0
  18. package/dist/config/rules.cjs +2190 -0
  19. package/dist/config/rules.mjs +2184 -0
  20. package/dist/config/selectors.cjs +29 -0
  21. package/dist/config/selectors.mjs +27 -0
  22. package/dist/config/semantics.cjs +194 -0
  23. package/dist/config/semantics.mjs +192 -0
  24. package/dist/config/styles.cjs +2 -0
  25. package/dist/config/styles.mjs +1 -0
  26. package/dist/config/variables.cjs +116 -0
  27. package/dist/config/variables.d.ts +135 -168
  28. package/dist/config/variables.mjs +114 -0
  29. package/dist/constants/base-unit-regex.cjs +5 -0
  30. package/dist/constants/base-unit-regex.mjs +3 -0
  31. package/dist/constants/start-symbol.cjs +10 -0
  32. package/dist/constants/start-symbol.mjs +8 -0
  33. package/dist/core.cjs +979 -0
  34. package/dist/core.d.ts +16 -16
  35. package/dist/core.mjs +974 -0
  36. package/dist/functions/reorder-for-readable-classes.cjs +68 -0
  37. package/dist/functions/reorder-for-readable-classes.d.ts +1 -1
  38. package/dist/functions/reorder-for-readable-classes.mjs +66 -0
  39. package/dist/functions/transform-color-with-opacity.cjs +9 -0
  40. package/dist/functions/transform-color-with-opacity.mjs +7 -0
  41. package/dist/index.cjs +37 -0
  42. package/dist/index.d.ts +3 -6
  43. package/dist/index.mjs +13 -0
  44. package/dist/layer.cjs +23 -0
  45. package/dist/layer.mjs +23 -0
  46. package/dist/polyfills/css-escape.cjs +8 -0
  47. package/dist/polyfills/css-escape.mjs +2 -0
  48. package/dist/polyfills/css-escape2.cjs +68 -0
  49. package/dist/polyfills/css-escape2.mjs +64 -0
  50. package/dist/rule.cjs +702 -0
  51. package/dist/rule.d.ts +2 -2
  52. package/dist/rule.mjs +700 -0
  53. package/dist/shared/utils/css-escape.cjs +56 -0
  54. package/dist/shared/utils/css-escape.mjs +54 -0
  55. package/dist/tokens/screen-sizes.cjs +17 -0
  56. package/dist/tokens/screen-sizes.mjs +15 -0
  57. package/dist/types/global.cjs +2 -0
  58. package/dist/types/global.d.ts +3 -3
  59. package/dist/types/global.mjs +1 -0
  60. package/dist/utils/concat-arrays.cjs +12 -0
  61. package/dist/utils/concat-arrays.mjs +10 -0
  62. package/dist/utils/extend-config.cjs +59 -0
  63. package/dist/utils/extend-config.mjs +57 -0
  64. package/dist/utils/flatten-object.cjs +15 -0
  65. package/dist/utils/flatten-object.mjs +13 -0
  66. package/dist/utils/get-type.cjs +12 -0
  67. package/dist/utils/get-type.mjs +10 -0
  68. package/dist/utils/hex-to-rgb.cjs +30 -0
  69. package/dist/utils/hex-to-rgb.mjs +28 -0
  70. package/dist/utils/is-plain-object.cjs +15 -0
  71. package/dist/utils/is-plain-object.mjs +13 -0
  72. package/dist/utils/is-symbol.cjs +14 -0
  73. package/dist/utils/is-symbol.mjs +12 -0
  74. package/dist/utils/rgb-to-hex.cjs +7 -0
  75. package/dist/utils/rgb-to-hex.mjs +5 -0
  76. package/package.json +1 -1
  77. package/dist/bin/index.bundle.js +0 -36
  78. package/dist/constants/config-esm-text.d.ts +0 -1
  79. package/dist/constants/config-text.d.ts +0 -1
  80. package/dist/constants/config-ts-text.d.ts +0 -1
  81. package/dist/index.bundle.js +0 -35
  82. package/dist/index.bundle.mjs +0 -35
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,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">
@@ -60,49 +60,10 @@
60
60
  </div>
61
61
 
62
62
  ## Documentation
63
- Visit [rc.css.master.co](https://rc.css.master.co) to view the full documentation
63
+ Visit [rc.css.master.co](https://rc.css.master.co) to view the full documentation.
64
64
 
65
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
66
+ Check out the [official guides](https://rc.css.master.co/docs) to get started with Master CSS.
106
67
 
107
68
  ## Community
108
69
  The Master CSS community can be found here:
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
+
5
+ exports.commonjsGlobal = commonjsGlobal;
@@ -0,0 +1,3 @@
1
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2
+
3
+ export { commonjsGlobal };
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ var cssEscape = {};
4
+
5
+ exports.__exports = cssEscape;
@@ -0,0 +1,3 @@
1
+ var cssEscape = {};
2
+
3
+ export { cssEscape as __exports };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var child_process = require('child_process');
4
+
5
+ try {
6
+ child_process.execSync('mastercss', {
7
+ stdio: 'inherit'
8
+ });
9
+ } catch (error) {
10
+ console.error('Command not found. Try installing "@master/css-cli" first.');
11
+ }
@@ -1,2 +1 @@
1
- #!/usr/bin/env node
2
1
  export {};
@@ -0,0 +1,9 @@
1
+ import { execSync } from 'child_process';
2
+
3
+ try {
4
+ execSync('mastercss', {
5
+ stdio: 'inherit'
6
+ });
7
+ } catch (error) {
8
+ console.error('Command not found. Try installing "@master/css-cli" first.');
9
+ }
@@ -0,0 +1,113 @@
1
+ 'use strict';
2
+
3
+ const animations = {
4
+ fade: {
5
+ '0%': {
6
+ opacity: 0
7
+ },
8
+ to: {
9
+ opacity: 1
10
+ }
11
+ },
12
+ flash: {
13
+ '0%,50%,to': {
14
+ opacity: 1
15
+ },
16
+ '25%,75%': {
17
+ opacity: 0
18
+ }
19
+ },
20
+ float: {
21
+ '0%': {
22
+ transform: 'none'
23
+ },
24
+ '50%': {
25
+ transform: 'translateY(-1.25rem)'
26
+ },
27
+ to: {
28
+ transform: 'none'
29
+ }
30
+ },
31
+ heart: {
32
+ '0%': {
33
+ transform: 'scale(1)'
34
+ },
35
+ '14%': {
36
+ transform: 'scale(1.3)'
37
+ },
38
+ '28%': {
39
+ transform: 'scale(1)'
40
+ },
41
+ '42%': {
42
+ transform: 'scale(1.3)'
43
+ },
44
+ '70%': {
45
+ transform: 'scale(1)'
46
+ }
47
+ },
48
+ jump: {
49
+ '0%,to': {
50
+ transform: 'translateY(-25%)',
51
+ 'animation-timing-function': 'cubic-bezier(.8,0,1,1)'
52
+ },
53
+ '50%': {
54
+ transform: 'translateY(0)',
55
+ 'animation-timing-function': 'cubic-bezier(0,0,.2,1)'
56
+ }
57
+ },
58
+ ping: {
59
+ '75%,to': {
60
+ transform: 'scale(2)',
61
+ opacity: 0
62
+ }
63
+ },
64
+ pulse: {
65
+ '0%': {
66
+ transform: 'none'
67
+ },
68
+ '50%': {
69
+ transform: 'scale(1.05)'
70
+ },
71
+ to: {
72
+ transform: 'none'
73
+ }
74
+ },
75
+ rotate: {
76
+ '0%': {
77
+ transform: 'rotate(-360deg)'
78
+ },
79
+ to: {
80
+ transform: 'none'
81
+ }
82
+ },
83
+ shake: {
84
+ '0%': {
85
+ transform: 'none'
86
+ },
87
+ '6.5%': {
88
+ transform: 'translateX(-6px) rotateY(-9deg)'
89
+ },
90
+ '18.5%': {
91
+ transform: 'translateX(5px) rotateY(7deg)'
92
+ },
93
+ '31.5%': {
94
+ transform: 'translateX(-3px) rotateY(-5deg)'
95
+ },
96
+ '43.5%': {
97
+ transform: 'translateX(2px) rotateY(3deg)'
98
+ },
99
+ '50%': {
100
+ transform: 'none'
101
+ }
102
+ },
103
+ zoom: {
104
+ '0%': {
105
+ transform: 'scale(0)'
106
+ },
107
+ to: {
108
+ transform: 'none'
109
+ }
110
+ }
111
+ };
112
+
113
+ module.exports = animations;
@@ -0,0 +1,111 @@
1
+ const animations = {
2
+ fade: {
3
+ '0%': {
4
+ opacity: 0
5
+ },
6
+ to: {
7
+ opacity: 1
8
+ }
9
+ },
10
+ flash: {
11
+ '0%,50%,to': {
12
+ opacity: 1
13
+ },
14
+ '25%,75%': {
15
+ opacity: 0
16
+ }
17
+ },
18
+ float: {
19
+ '0%': {
20
+ transform: 'none'
21
+ },
22
+ '50%': {
23
+ transform: 'translateY(-1.25rem)'
24
+ },
25
+ to: {
26
+ transform: 'none'
27
+ }
28
+ },
29
+ heart: {
30
+ '0%': {
31
+ transform: 'scale(1)'
32
+ },
33
+ '14%': {
34
+ transform: 'scale(1.3)'
35
+ },
36
+ '28%': {
37
+ transform: 'scale(1)'
38
+ },
39
+ '42%': {
40
+ transform: 'scale(1.3)'
41
+ },
42
+ '70%': {
43
+ transform: 'scale(1)'
44
+ }
45
+ },
46
+ jump: {
47
+ '0%,to': {
48
+ transform: 'translateY(-25%)',
49
+ 'animation-timing-function': 'cubic-bezier(.8,0,1,1)'
50
+ },
51
+ '50%': {
52
+ transform: 'translateY(0)',
53
+ 'animation-timing-function': 'cubic-bezier(0,0,.2,1)'
54
+ }
55
+ },
56
+ ping: {
57
+ '75%,to': {
58
+ transform: 'scale(2)',
59
+ opacity: 0
60
+ }
61
+ },
62
+ pulse: {
63
+ '0%': {
64
+ transform: 'none'
65
+ },
66
+ '50%': {
67
+ transform: 'scale(1.05)'
68
+ },
69
+ to: {
70
+ transform: 'none'
71
+ }
72
+ },
73
+ rotate: {
74
+ '0%': {
75
+ transform: 'rotate(-360deg)'
76
+ },
77
+ to: {
78
+ transform: 'none'
79
+ }
80
+ },
81
+ shake: {
82
+ '0%': {
83
+ transform: 'none'
84
+ },
85
+ '6.5%': {
86
+ transform: 'translateX(-6px) rotateY(-9deg)'
87
+ },
88
+ '18.5%': {
89
+ transform: 'translateX(5px) rotateY(7deg)'
90
+ },
91
+ '31.5%': {
92
+ transform: 'translateX(-3px) rotateY(-5deg)'
93
+ },
94
+ '43.5%': {
95
+ transform: 'translateX(2px) rotateY(3deg)'
96
+ },
97
+ '50%': {
98
+ transform: 'none'
99
+ }
100
+ },
101
+ zoom: {
102
+ '0%': {
103
+ transform: 'scale(0)'
104
+ },
105
+ to: {
106
+ transform: 'none'
107
+ }
108
+ }
109
+ };
110
+
111
+ export { animations as default };