@griffel/transform 3.0.5 → 3.0.6

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 (188) hide show
  1. package/LICENSE.md +21 -0
  2. package/package.json +6 -5
  3. package/src/constants.d.mts +2 -0
  4. package/src/{constants.mts → constants.mjs} +1 -0
  5. package/src/constants.mjs.map +1 -0
  6. package/src/evaluation/astEvaluator.d.mts +20 -0
  7. package/src/evaluation/astEvaluator.mjs +90 -0
  8. package/src/evaluation/astEvaluator.mjs.map +1 -0
  9. package/src/evaluation/batchEvaluator.d.mts +13 -0
  10. package/src/evaluation/batchEvaluator.mjs +54 -0
  11. package/src/evaluation/batchEvaluator.mjs.map +1 -0
  12. package/src/evaluation/evalCache.d.mts +9 -0
  13. package/src/evaluation/evalCache.mjs +65 -0
  14. package/src/evaluation/evalCache.mjs.map +1 -0
  15. package/src/evaluation/fluentTokensPlugin.d.mts +2 -0
  16. package/src/evaluation/fluentTokensPlugin.mjs +70 -0
  17. package/src/evaluation/fluentTokensPlugin.mjs.map +1 -0
  18. package/src/evaluation/module.d.mts +44 -0
  19. package/src/evaluation/module.mjs +207 -0
  20. package/src/evaluation/module.mjs.map +1 -0
  21. package/src/evaluation/process.d.mts +24 -0
  22. package/src/evaluation/{process.mts → process.mjs} +7 -12
  23. package/src/evaluation/process.mjs.map +1 -0
  24. package/src/evaluation/types.d.mts +34 -0
  25. package/src/evaluation/types.mjs +2 -0
  26. package/src/evaluation/types.mjs.map +1 -0
  27. package/src/evaluation/vmEvaluator.d.mts +3 -0
  28. package/src/evaluation/vmEvaluator.mjs +33 -0
  29. package/src/evaluation/vmEvaluator.mjs.map +1 -0
  30. package/src/{index.mts → index.d.mts} +0 -4
  31. package/src/index.mjs +9 -0
  32. package/src/index.mjs.map +1 -0
  33. package/src/transformSync.d.mts +41 -0
  34. package/src/transformSync.mjs +253 -0
  35. package/src/transformSync.mjs.map +1 -0
  36. package/src/types.d.mts +12 -0
  37. package/src/types.mjs +2 -0
  38. package/src/types.mjs.map +1 -0
  39. package/src/utils/convertESMtoCJS.d.mts +6 -0
  40. package/src/utils/convertESMtoCJS.mjs +203 -0
  41. package/src/utils/convertESMtoCJS.mjs.map +1 -0
  42. package/src/utils/dedupeCSSRules.d.mts +6 -0
  43. package/src/utils/dedupeCSSRules.mjs +19 -0
  44. package/src/utils/dedupeCSSRules.mjs.map +1 -0
  45. package/CHANGELOG.json +0 -404
  46. package/CHANGELOG.md +0 -130
  47. package/__fixtures__/assets/blank.jpg +0 -0
  48. package/__fixtures__/assets/code.ts +0 -12
  49. package/__fixtures__/assets/empty.jpg +0 -0
  50. package/__fixtures__/assets/output.meta.json +0 -12
  51. package/__fixtures__/assets/output.ts +0 -12
  52. package/__fixtures__/assets-multiple-declarations/blank.jpg +0 -0
  53. package/__fixtures__/assets-multiple-declarations/code.ts +0 -8
  54. package/__fixtures__/assets-multiple-declarations/empty.jpg +0 -0
  55. package/__fixtures__/assets-multiple-declarations/output.meta.json +0 -9
  56. package/__fixtures__/assets-multiple-declarations/output.ts +0 -6
  57. package/__fixtures__/assets-reset-styles/blank.jpg +0 -0
  58. package/__fixtures__/assets-reset-styles/code.ts +0 -11
  59. package/__fixtures__/assets-reset-styles/empty.jpg +0 -0
  60. package/__fixtures__/assets-reset-styles/output.meta.json +0 -11
  61. package/__fixtures__/assets-reset-styles/output.ts +0 -7
  62. package/__fixtures__/assets-urls/code.ts +0 -13
  63. package/__fixtures__/assets-urls/output.meta.json +0 -14
  64. package/__fixtures__/assets-urls/output.ts +0 -10
  65. package/__fixtures__/at-rules/code.ts +0 -14
  66. package/__fixtures__/at-rules/output.meta.json +0 -15
  67. package/__fixtures__/at-rules/output.ts +0 -10
  68. package/__fixtures__/config-classname-hash-salt/code.ts +0 -5
  69. package/__fixtures__/config-classname-hash-salt/output.meta.json +0 -7
  70. package/__fixtures__/config-classname-hash-salt/output.ts +0 -3
  71. package/__fixtures__/config-evaluation-rules/code.ts +0 -8
  72. package/__fixtures__/config-evaluation-rules/consts.ts +0 -1
  73. package/__fixtures__/config-evaluation-rules/output.meta.json +0 -7
  74. package/__fixtures__/config-evaluation-rules/output.ts +0 -4
  75. package/__fixtures__/config-evaluation-rules/sampleEvaluator.cjs +0 -12
  76. package/__fixtures__/error-argument-count/fixture.js +0 -4
  77. package/__fixtures__/error-cjs/fixture.js +0 -4
  78. package/__fixtures__/error-on-undefined/fixture.ts +0 -7
  79. package/__fixtures__/error-on-undefined/tokens.ts +0 -1
  80. package/__fixtures__/export-default/code.ts +0 -6
  81. package/__fixtures__/export-default/output.meta.json +0 -14
  82. package/__fixtures__/export-default/output.ts +0 -6
  83. package/__fixtures__/function-mixin/code.ts +0 -6
  84. package/__fixtures__/function-mixin/mixins.ts +0 -7
  85. package/__fixtures__/function-mixin/output.meta.json +0 -7
  86. package/__fixtures__/function-mixin/output.ts +0 -4
  87. package/__fixtures__/function-mixin/tokens.ts +0 -3
  88. package/__fixtures__/import-alias/code.ts +0 -5
  89. package/__fixtures__/import-alias/output.meta.json +0 -7
  90. package/__fixtures__/import-alias/output.ts +0 -3
  91. package/__fixtures__/import-custom-module/code.ts +0 -6
  92. package/__fixtures__/import-custom-module/output.meta.json +0 -7
  93. package/__fixtures__/import-custom-module/output.ts +0 -4
  94. package/__fixtures__/keyframes/code.ts +0 -22
  95. package/__fixtures__/keyframes/output.meta.json +0 -17
  96. package/__fixtures__/keyframes/output.ts +0 -6
  97. package/__fixtures__/multiple-declarations/code.ts +0 -8
  98. package/__fixtures__/multiple-declarations/output.meta.json +0 -7
  99. package/__fixtures__/multiple-declarations/output.ts +0 -4
  100. package/__fixtures__/non-existing-module-call/code.ts +0 -10
  101. package/__fixtures__/non-existing-module-call/module.ts +0 -13
  102. package/__fixtures__/non-existing-module-call/output.meta.json +0 -7
  103. package/__fixtures__/non-existing-module-call/output.ts +0 -6
  104. package/__fixtures__/object/code.ts +0 -6
  105. package/__fixtures__/object/output.meta.json +0 -14
  106. package/__fixtures__/object/output.ts +0 -6
  107. package/__fixtures__/object-computed-keys/code.ts +0 -8
  108. package/__fixtures__/object-computed-keys/output.meta.json +0 -14
  109. package/__fixtures__/object-computed-keys/output.ts +0 -8
  110. package/__fixtures__/object-imported-keys/code.ts +0 -9
  111. package/__fixtures__/object-imported-keys/consts.ts +0 -2
  112. package/__fixtures__/object-imported-keys/output.meta.json +0 -7
  113. package/__fixtures__/object-imported-keys/output.ts +0 -4
  114. package/__fixtures__/object-mixins/code.ts +0 -11
  115. package/__fixtures__/object-mixins/mixins.ts +0 -17
  116. package/__fixtures__/object-mixins/output.meta.json +0 -16
  117. package/__fixtures__/object-mixins/output.ts +0 -10
  118. package/__fixtures__/object-mixins/tokens.ts +0 -3
  119. package/__fixtures__/object-nesting/code.ts +0 -13
  120. package/__fixtures__/object-nesting/consts.ts +0 -1
  121. package/__fixtures__/object-nesting/output.meta.json +0 -9
  122. package/__fixtures__/object-nesting/output.ts +0 -6
  123. package/__fixtures__/object-reset/code.ts +0 -8
  124. package/__fixtures__/object-reset/output.meta.json +0 -7
  125. package/__fixtures__/object-reset/output.ts +0 -5
  126. package/__fixtures__/object-sequence-expr/code.ts +0 -16
  127. package/__fixtures__/object-sequence-expr/output.meta.json +0 -7
  128. package/__fixtures__/object-sequence-expr/output.ts +0 -7
  129. package/__fixtures__/object-shorthands/code.ts +0 -8
  130. package/__fixtures__/object-shorthands/output.meta.json +0 -20
  131. package/__fixtures__/object-shorthands/output.ts +0 -5
  132. package/__fixtures__/object-variables/code.ts +0 -9
  133. package/__fixtures__/object-variables/output.meta.json +0 -15
  134. package/__fixtures__/object-variables/output.ts +0 -9
  135. package/__fixtures__/object-variables/vars.ts +0 -5
  136. package/__fixtures__/reset-styles/code.ts +0 -6
  137. package/__fixtures__/reset-styles/output.meta.json +0 -7
  138. package/__fixtures__/reset-styles/output.ts +0 -3
  139. package/__fixtures__/reset-styles-at-rules/code.ts +0 -7
  140. package/__fixtures__/reset-styles-at-rules/output.meta.json +0 -8
  141. package/__fixtures__/reset-styles-at-rules/output.ts +0 -3
  142. package/__fixtures__/rules-with-metadata/code.ts +0 -9
  143. package/__fixtures__/rules-with-metadata/output.meta.json +0 -14
  144. package/__fixtures__/rules-with-metadata/output.ts +0 -3
  145. package/__fixtures__/shared-mixins/code.ts +0 -7
  146. package/__fixtures__/shared-mixins/mixins.ts +0 -6
  147. package/__fixtures__/shared-mixins/output.meta.json +0 -7
  148. package/__fixtures__/shared-mixins/output.ts +0 -8
  149. package/__fixtures__/static-styles/code.ts +0 -7
  150. package/__fixtures__/static-styles/output.meta.json +0 -7
  151. package/__fixtures__/static-styles/output.ts +0 -3
  152. package/__fixtures__/static-styles-array/code.ts +0 -10
  153. package/__fixtures__/static-styles-array/output.meta.json +0 -7
  154. package/__fixtures__/static-styles-array/output.ts +0 -3
  155. package/__fixtures__/static-styles-string/code.ts +0 -3
  156. package/__fixtures__/static-styles-string/output.meta.json +0 -7
  157. package/__fixtures__/static-styles-string/output.ts +0 -3
  158. package/__fixtures__/tokens/code.ts +0 -11
  159. package/__fixtures__/tokens/output.meta.json +0 -12
  160. package/__fixtures__/tokens/output.ts +0 -7
  161. package/__fixtures__/tokens/tokens.ts +0 -4
  162. package/__fixtures__/unsupported-css-properties/fixture.ts +0 -16
  163. package/__fixtures__/unsupported-css-properties/output.meta.json +0 -5
  164. package/__fixtures__/unsupported-css-properties/output.ts +0 -3
  165. package/eslint.config.mjs +0 -31
  166. package/project.json +0 -51
  167. package/src/evaluation/astEvaluator.mts +0 -109
  168. package/src/evaluation/astEvaluator.test.mts +0 -126
  169. package/src/evaluation/batchEvaluator.mts +0 -79
  170. package/src/evaluation/evalCache.mts +0 -84
  171. package/src/evaluation/fluentTokensPlugin.mts +0 -82
  172. package/src/evaluation/fluentTokensPlugin.test.mts +0 -130
  173. package/src/evaluation/module.mts +0 -271
  174. package/src/evaluation/module.test.mts +0 -133
  175. package/src/evaluation/types.mts +0 -49
  176. package/src/evaluation/vmEvaluator.mts +0 -45
  177. package/src/evaluation/vmEvaluator.test.mts +0 -30
  178. package/src/transformSync.mts +0 -425
  179. package/src/transformSync.test.mts +0 -429
  180. package/src/types.mts +0 -13
  181. package/src/utils/convertESMtoCJS.mts +0 -226
  182. package/src/utils/convertESMtoCJS.test.mts +0 -159
  183. package/src/utils/dedupeCSSRules.mts +0 -25
  184. package/src/utils/dedupeCSSRules.test.mts +0 -39
  185. package/tsconfig.json +0 -19
  186. package/tsconfig.lib.json +0 -30
  187. package/tsconfig.spec.json +0 -24
  188. package/vitest.config.mts +0 -18
@@ -1,14 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": false,
4
- "cssRulesByBucket": {
5
- "d": [
6
- ".f405sdg{background-image:url(http://www.example.com);}",
7
- ".fvpuk3z{background-image:url(https://www.example.com);}",
8
- ".fcrzfig{background-image:url(\"https://www.example.com\");}",
9
- ".f1b0d1k8{background-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);}",
10
- ".f15gfcnl{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" height=\"32\" aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"32\" data-view-component=\"true\" class=\"octicon octicon-mark-github v-align-middle\"%3E%3Cpath fill-rule=\"evenodd\" d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z\"%3E%3C/path%3E%3C/svg%3E');}",
11
- ".f1bk4c0y{filter:url(#a);}"
12
- ]
13
- }
14
- }
@@ -1,10 +0,0 @@
1
- import { __css } from '@griffel/react';
2
-
3
- export const useStyles = __css({
4
- httpUrl: { Bcmaq0h: 'f405sdg' },
5
- httpsUrl: { Bcmaq0h: 'fvpuk3z' },
6
- httpsUrlWithQuotes: { Bcmaq0h: 'fcrzfig' },
7
- dataUrl: { Bcmaq0h: 'f1b0d1k8' },
8
- dataUrlQuotes: { Bcmaq0h: 'f15gfcnl' },
9
- hashOnly: { Bhu2qc9: 'f1bk4c0y' },
10
- });
@@ -1,14 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
-
3
- export const useStyles = makeStyles({
4
- root: {
5
- '@media (min-width: 600px)': {
6
- paddingLeft: '4px',
7
- paddingRight: '4px',
8
- },
9
- '@supports (display: flex)': {
10
- paddingLeft: '4px',
11
- paddingRight: '4px',
12
- },
13
- },
14
- });
@@ -1,15 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": false,
4
- "cssRulesByBucket": {
5
- "m": [
6
- [
7
- "@media (min-width: 600px){.f1h4p6a1{padding-right:4px;}.fgefjy{padding-left:4px;}}",
8
- {
9
- "m": "(min-width: 600px)"
10
- }
11
- ]
12
- ],
13
- "t": ["@supports (display: flex){.f1dyc5nu{padding-left:4px;}.f1kq3x14{padding-right:4px;}}"]
14
- }
15
- }
@@ -1,10 +0,0 @@
1
- import { __css } from '@griffel/react';
2
-
3
- export const useStyles = __css({
4
- root: {
5
- wbkd2a: ['fgefjy', 'f1h4p6a1'],
6
- Dt0rau: ['f1h4p6a1', 'fgefjy'],
7
- k2kg1z: ['f1dyc5nu', 'f1kq3x14'],
8
- Blnc60a: ['f1kq3x14', 'f1dyc5nu'],
9
- },
10
- });
@@ -1,5 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
-
3
- export const useStyles = makeStyles({
4
- root: { color: 'red', paddingLeft: '4px' },
5
- });
@@ -1,7 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": false,
4
- "cssRulesByBucket": {
5
- "d": [".feohi3x{color:red;}", ".f1rwgqon{padding-left:4px;}", ".f1tyzn0d{padding-right:4px;}"]
6
- }
7
- }
@@ -1,3 +0,0 @@
1
- import { __css } from '@griffel/react';
2
-
3
- export const useStyles = __css({ root: { sj55zd: 'feohi3x', uwmqm3: ['f1rwgqon', 'f1tyzn0d'] } });
@@ -1,8 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
- import { colorRed } from './consts';
3
-
4
- export const useStyles = makeStyles({
5
- // This import has no sense, but it will prevent us from evaluation in AST by Babel
6
- // This fixture uses "sampleEvaluator.js" in transformPlugin's config so input we should get a different color
7
- root: { color: colorRed },
8
- });
@@ -1 +0,0 @@
1
- export const colorRed = 'red';
@@ -1,7 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": true,
4
- "cssRulesByBucket": {
5
- "d": [".f163i14w{color:blue;}"]
6
- }
7
- }
@@ -1,4 +0,0 @@
1
- import { __css } from '@griffel/react';
2
- import { colorRed } from './consts';
3
-
4
- export const useStyles = __css({ root: { sj55zd: 'f163i14w' } });
@@ -1,12 +0,0 @@
1
- // @ts-check
2
-
3
- /** @type {import("@linaria/babel-preset").Evaluator} */
4
- const sampleEvaluator = () => {
5
- // Evaluators transform input code to something that will be evaluated by Node later. In evaluatePathsInVM() we expect
6
- // that results will be available as "exports.__mkPreval", this evaluator mocks it
7
- const result = `exports.__mkPreval = [{ root: { color: 'blue' } }]`;
8
-
9
- return { code: result, imports: null, moduleKind: 'cjs' };
10
- };
11
-
12
- module.exports.default = sampleEvaluator;
@@ -1,4 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
-
3
- // This file is .js intentionally to avoid TS compiler errors
4
- export const useStyles = makeStyles({ root: { color: 'red' } }, 'foo');
@@ -1,4 +0,0 @@
1
- const { makeStyles } = require('@griffel/react');
2
-
3
- const useStyles = makeStyles({ root: { color: 'red' } });
4
- module.exports = { useStyles };
@@ -1,7 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
- // @ts-expect-error This module does not have exported member 'colors'
3
- import { colors } from './tokens';
4
-
5
- export const useClassesA = makeStyles({
6
- root: { color: colors.foreground },
7
- });
@@ -1 +0,0 @@
1
- export const tokens = {};
@@ -1,6 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
-
3
- export default makeStyles({
4
- root: { color: 'red', paddingLeft: '4px' },
5
- icon: { backgroundColor: 'green', marginLeft: '4px' },
6
- });
@@ -1,14 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": false,
4
- "cssRulesByBucket": {
5
- "d": [
6
- ".fe3e8s9{color:red;}",
7
- ".fycuoez{padding-left:4px;}",
8
- ".f8wuabp{padding-right:4px;}",
9
- ".fcnqdeg{background-color:green;}",
10
- ".fjf1xye{margin-left:4px;}",
11
- ".f8zmjen{margin-right:4px;}"
12
- ]
13
- }
14
- }
@@ -1,6 +0,0 @@
1
- import { __css } from '@griffel/react';
2
-
3
- export default __css({
4
- root: { sj55zd: 'fe3e8s9', uwmqm3: ['fycuoez', 'f8wuabp'] },
5
- icon: { De3pzq: 'fcnqdeg', Frg6f3: ['fjf1xye', 'f8zmjen'] },
6
- });
@@ -1,6 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
- import { createMixin } from './mixins';
3
-
4
- export const useStyles = makeStyles({
5
- avatar: createMixin({ display: 'block', opacity: '0' }),
6
- });
@@ -1,7 +0,0 @@
1
- import type { GriffelStyle } from '@griffel/core';
2
- import { tokens } from './tokens';
3
-
4
- export const createMixin = (rule: GriffelStyle): GriffelStyle => ({
5
- color: tokens.colorBrandBackground,
6
- ...rule,
7
- });
@@ -1,7 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": true,
4
- "cssRulesByBucket": {
5
- "d": [".f1817uup{color:var(--colorBrandBackground);}", ".ftgm304{display:block;}", ".fk73vx1{opacity:0;}"]
6
- }
7
- }
@@ -1,4 +0,0 @@
1
- import { __css } from '@griffel/react';
2
- import { createMixin } from './mixins';
3
-
4
- export const useStyles = __css({ avatar: { sj55zd: 'f1817uup', mc9l5x: 'ftgm304', abs64n: 'fk73vx1' } });
@@ -1,3 +0,0 @@
1
- export const tokens = {
2
- colorBrandBackground: 'var(--colorBrandBackground)',
3
- };
@@ -1,5 +0,0 @@
1
- import { makeStyles as createStyles } from '@griffel/react';
2
-
3
- export const useStyles = createStyles({
4
- root: { color: 'red' },
5
- });
@@ -1,7 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": false,
4
- "cssRulesByBucket": {
5
- "d": [".fe3e8s9{color:red;}"]
6
- }
7
- }
@@ -1,3 +0,0 @@
1
- import { __css } from '@griffel/react';
2
-
3
- export const useStyles = __css({ root: { sj55zd: 'fe3e8s9' } });
@@ -1,6 +0,0 @@
1
- // @ts-expect-error This module does not exist, but will be resolved via aliases
2
- import { makeStyles } from 'custom-package';
3
-
4
- export const useStyles = makeStyles({
5
- root: { color: 'red' },
6
- });
@@ -1,7 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": false,
4
- "cssRulesByBucket": {
5
- "d": [".fe3e8s9{color:red;}"]
6
- }
7
- }
@@ -1,4 +0,0 @@
1
- // @ts-expect-error This module does not exist, but will be resolved via aliases
2
- import { __css } from 'custom-package';
3
-
4
- export const useStyles = __css({ root: { sj55zd: 'fe3e8s9' } });
@@ -1,22 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
-
3
- export const useStyles = makeStyles({
4
- single: {
5
- animationName: {
6
- from: { transform: 'rotate(0deg)' },
7
- to: { transform: 'rotate(360deg)' },
8
- },
9
- },
10
- multiple: {
11
- animationName: [
12
- {
13
- from: { transform: 'rotate(0deg)' },
14
- to: { transform: 'rotate(360deg)' },
15
- },
16
- {
17
- from: { height: '100px' },
18
- to: { height: '200px' },
19
- },
20
- ],
21
- },
22
- });
@@ -1,17 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": true,
4
- "cssRulesByBucket": {
5
- "k": [
6
- "@keyframes f1q8eu9e{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}",
7
- "@keyframes f55c0se{from{transform:rotate(0deg);}to{transform:rotate(-360deg);}}",
8
- "@keyframes f19fnzg9{from{height:100px;}to{height:200px;}}"
9
- ],
10
- "d": [
11
- ".f1g6ul6r{animation-name:f1q8eu9e;}",
12
- ".f1fp4ujf{animation-name:f55c0se;}",
13
- ".f1e467oh{animation-name:f1q8eu9e,f19fnzg9;}",
14
- ".f1w9bd63{animation-name:f55c0se,f19fnzg9;}"
15
- ]
16
- }
17
- }
@@ -1,6 +0,0 @@
1
- import { __css } from '@griffel/react';
2
-
3
- export const useStyles = __css({
4
- single: { Bv12yb3: ['f1g6ul6r', 'f1fp4ujf'] },
5
- multiple: { Bv12yb3: ['f1e467oh', 'f1w9bd63'] },
6
- });
@@ -1,8 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
-
3
- export const useStyles1 = makeStyles({
4
- root: { color: 'red' },
5
- });
6
- export const useStyles2 = makeStyles({
7
- root: { color: 'green' },
8
- });
@@ -1,7 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": false,
4
- "cssRulesByBucket": {
5
- "d": [".fka9v86{color:green;}", ".fe3e8s9{color:red;}"]
6
- }
7
- }
@@ -1,4 +0,0 @@
1
- import { __css } from '@griffel/react';
2
-
3
- export const useStyles1 = __css({ root: { sj55zd: 'fe3e8s9' } });
4
- export const useStyles2 = __css({ root: { sj55zd: 'fka9v86' } });
@@ -1,10 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
- import { createModule } from './module';
3
-
4
- export const useStyles = makeStyles({
5
- container: {
6
- color: 'red',
7
- },
8
- });
9
-
10
- createModule().baz();
@@ -1,13 +0,0 @@
1
- type FakeModule = {
2
- foo: () => void;
3
- bar: () => void;
4
- baz: () => void;
5
- };
6
-
7
- export function createModule(): FakeModule {
8
- return {
9
- foo: () => {},
10
- bar: () => {},
11
- // this implementation intentionally missing "baz" property to throw on calls in runtime
12
- } as unknown as FakeModule;
13
- }
@@ -1,7 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": false,
4
- "cssRulesByBucket": {
5
- "d": [".fe3e8s9{color:red;}"]
6
- }
7
- }
@@ -1,6 +0,0 @@
1
- import { __css } from '@griffel/react';
2
- import { createModule } from './module';
3
-
4
- export const useStyles = __css({ container: { sj55zd: 'fe3e8s9' } });
5
-
6
- createModule().baz();
@@ -1,6 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
-
3
- export const useStyles = makeStyles({
4
- root: { color: 'red', paddingLeft: '4px' },
5
- icon: { backgroundColor: 'green', marginLeft: '4px' },
6
- });
@@ -1,14 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": false,
4
- "cssRulesByBucket": {
5
- "d": [
6
- ".fe3e8s9{color:red;}",
7
- ".fycuoez{padding-left:4px;}",
8
- ".f8wuabp{padding-right:4px;}",
9
- ".fcnqdeg{background-color:green;}",
10
- ".fjf1xye{margin-left:4px;}",
11
- ".f8zmjen{margin-right:4px;}"
12
- ]
13
- }
14
- }
@@ -1,6 +0,0 @@
1
- import { __css } from '@griffel/react';
2
-
3
- export const useStyles = __css({
4
- root: { sj55zd: 'fe3e8s9', uwmqm3: ['fycuoez', 'f8wuabp'] },
5
- icon: { De3pzq: 'fcnqdeg', Frg6f3: ['fjf1xye', 'f8zmjen'] },
6
- });
@@ -1,8 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
-
3
- const rootSlot = 'root';
4
-
5
- export const useStyles = makeStyles({
6
- [rootSlot]: { color: 'red', paddingLeft: '4px' },
7
- [rootSlot + 'primary']: { backgroundColor: 'green', marginLeft: '4px' },
8
- });
@@ -1,14 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": true,
4
- "cssRulesByBucket": {
5
- "d": [
6
- ".fe3e8s9{color:red;}",
7
- ".fycuoez{padding-left:4px;}",
8
- ".f8wuabp{padding-right:4px;}",
9
- ".fcnqdeg{background-color:green;}",
10
- ".fjf1xye{margin-left:4px;}",
11
- ".f8zmjen{margin-right:4px;}"
12
- ]
13
- }
14
- }
@@ -1,8 +0,0 @@
1
- import { __css } from '@griffel/react';
2
-
3
- const rootSlot = 'root';
4
-
5
- export const useStyles = __css({
6
- root: { sj55zd: 'fe3e8s9', uwmqm3: ['fycuoez', 'f8wuabp'] },
7
- rootprimary: { De3pzq: 'fcnqdeg', Frg6f3: ['fjf1xye', 'f8zmjen'] },
8
- });
@@ -1,9 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
- import { className, selector } from './consts';
3
-
4
- export const useStyles = makeStyles({
5
- root: {
6
- [selector]: { color: 'red' },
7
- [`& .${className}`]: { color: 'blue' },
8
- },
9
- });
@@ -1,2 +0,0 @@
1
- export const className = 'component-foo';
2
- export const selector = '& .component-bar';
@@ -1,7 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": true,
4
- "cssRulesByBucket": {
5
- "d": [".f1wgwx3x .component-bar{color:red;}", ".fglt6ox .component-foo{color:blue;}"]
6
- }
7
- }
@@ -1,4 +0,0 @@
1
- import { __css } from '@griffel/react';
2
- import { className, selector } from './consts';
3
-
4
- export const useStyles = __css({ root: { B0egftl: 'f1wgwx3x', qhv8v2: 'fglt6ox' } });
@@ -1,11 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
- import { flexStyles, gridStyles, typography } from './mixins';
3
-
4
- export const useStyles = makeStyles({
5
- root: flexStyles,
6
- label: typography.text,
7
- header: typography.header,
8
-
9
- icon: { ...flexStyles, color: 'red' },
10
- image: { ...gridStyles('10px'), color: 'green' },
11
- });
@@ -1,17 +0,0 @@
1
- import type { GriffelStyle } from '@griffel/core';
2
- import { tokens } from './tokens';
3
-
4
- export const flexStyles: GriffelStyle = {
5
- display: 'flex',
6
- flexDirection: 'column',
7
- };
8
-
9
- export const gridStyles = (gridGap: string): GriffelStyle => ({
10
- display: 'grid',
11
- gridRowGap: gridGap,
12
- });
13
-
14
- export const typography: Record<'text' | 'header', GriffelStyle> = {
15
- text: { fontWeight: tokens.fontWeightRegular },
16
- header: { fontWeight: 'bold' },
17
- };
@@ -1,16 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": true,
4
- "cssRulesByBucket": {
5
- "d": [
6
- ".f22iagw{display:flex;}",
7
- ".f1vx9l62{flex-direction:column;}",
8
- ".figsok6{font-weight:var(--fontWeightRegular);}",
9
- ".f16wzh4i{font-weight:bold;}",
10
- ".fe3e8s9{color:red;}",
11
- ".f13qh94s{display:grid;}",
12
- ".f85kjgz{grid-row-gap:10px;}",
13
- ".fka9v86{color:green;}"
14
- ]
15
- }
16
- }
@@ -1,10 +0,0 @@
1
- import { __css } from '@griffel/react';
2
- import { flexStyles, gridStyles, typography } from './mixins';
3
-
4
- export const useStyles = __css({
5
- root: { mc9l5x: 'f22iagw', Beiy3e4: 'f1vx9l62' },
6
- label: { Bhrd7zp: 'figsok6' },
7
- header: { Bhrd7zp: 'f16wzh4i' },
8
- icon: { mc9l5x: 'f22iagw', Beiy3e4: 'f1vx9l62', sj55zd: 'fe3e8s9' },
9
- image: { mc9l5x: 'f13qh94s', a6qtfi: 'f85kjgz', sj55zd: 'fka9v86' },
10
- });
@@ -1,3 +0,0 @@
1
- export const tokens = {
2
- fontWeightRegular: 'var(--fontWeightRegular)',
3
- };
@@ -1,13 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
- import { colorBlue } from './consts';
3
-
4
- export const useStyles = makeStyles({
5
- root: {
6
- display: 'flex',
7
-
8
- ':hover': { color: 'red' },
9
- ':focus': { ':hover': { color: colorBlue } },
10
-
11
- '& .foo': { ':hover': { color: 'green' } },
12
- },
13
- });
@@ -1 +0,0 @@
1
- export const colorBlue = 'blue';
@@ -1,9 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": true,
4
- "cssRulesByBucket": {
5
- "d": [".f22iagw{display:flex;}", ".fh8e7tb .foo:hover{color:green;}"],
6
- "h": [".faf35ka:hover{color:red;}"],
7
- "f": [".f17t1d3d:focus:hover{color:blue;}"]
8
- }
9
- }
@@ -1,6 +0,0 @@
1
- import { __css } from '@griffel/react';
2
- import { colorBlue } from './consts';
3
-
4
- export const useStyles = __css({
5
- root: { mc9l5x: 'f22iagw', Bi91k9c: 'faf35ka', Bb9khzn: 'f17t1d3d', Btk3f3y: 'fh8e7tb' },
6
- });
@@ -1,8 +0,0 @@
1
- import { makeStyles } from '@griffel/react';
2
-
3
- export const RESET = 'DO_NOT_USE_DIRECTLY: @griffel/reset-value' as unknown as 'unset';
4
-
5
- export const useStyles = makeStyles({
6
- root: { color: 'red', paddingLeft: RESET },
7
- icon: { color: RESET },
8
- });
@@ -1,7 +0,0 @@
1
- {
2
- "usedProcessing": true,
3
- "usedVMForEvaluation": true,
4
- "cssRulesByBucket": {
5
- "d": [".fe3e8s9{color:red;}"]
6
- }
7
- }
@@ -1,5 +0,0 @@
1
- import { __css } from '@griffel/react';
2
-
3
- export const RESET = 'DO_NOT_USE_DIRECTLY: @griffel/reset-value' as unknown as 'unset';
4
-
5
- export const useStyles = __css({ root: { sj55zd: 'fe3e8s9', uwmqm3: 0 }, icon: { sj55zd: 0 } });
@@ -1,16 +0,0 @@
1
- import type { GriffelStyle } from '@griffel/react';
2
- import { makeStyles } from '@griffel/react';
3
-
4
- const switchClassName = 'fui-Switch';
5
- let _a: Record<string, GriffelStyle>;
6
-
7
- export const useStyles = makeStyles({
8
- root:
9
- ((_a = {}),
10
- (_a[':hover .' + switchClassName] = {
11
- ':before': {
12
- backgroundColor: 'red',
13
- },
14
- }),
15
- _a),
16
- });