Skip to content

Commit 6237569

Browse files
committed
fix: update consume import in theme
1 parent 7802a3f commit 6237569

20 files changed

Lines changed: 168 additions & 168 deletions

theme/src/utils/createUseVariable.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Variable } from "@styleframe/core";
22
import { styleframe } from "@styleframe/core";
3-
import { consume } from "@styleframe/transpiler";
3+
import { consumeCSS } from "@styleframe/transpiler";
44
import { createUseVariable } from "./createUseVariable";
55

66
describe("createUseVariable", () => {
@@ -176,7 +176,7 @@ describe("createUseVariable", () => {
176176
large: "32px",
177177
});
178178

179-
const css = consume(s.root, s.options);
179+
const css = consumeCSS(s.root, s.options);
180180

181181
expect(css).toBe(`:root {
182182
--padding: 16px;
@@ -375,7 +375,7 @@ describe("createUseVariable", () => {
375375
large: "2",
376376
});
377377

378-
const css = consume(s.root, s.options);
378+
const css = consumeCSS(s.root, s.options);
379379

380380
expect(css).toBe(`:root {
381381
--margin: 1rem;
@@ -602,7 +602,7 @@ describe("createUseVariable", () => {
602602
medium: "@default",
603603
});
604604

605-
const css = consume(s.root, s.options);
605+
const css = consumeCSS(s.root, s.options);
606606

607607
expect(css).toBe(`:root {
608608
--spacing: 16px;
@@ -756,7 +756,7 @@ describe("createUseVariable", () => {
756756
small: "8px",
757757
});
758758

759-
const css = consume(s.root, s.options);
759+
const css = consumeCSS(s.root, s.options);
760760

761761
expect(css).toBe(`:root {
762762
--spacing: 16px;

theme/src/variables/useBorderRadius.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Variable } from "@styleframe/core";
22
import { styleframe } from "@styleframe/core";
3-
import { consume } from "@styleframe/transpiler";
3+
import { consumeCSS } from "@styleframe/transpiler";
44
import { useBorderRadius } from "./useBorderRadius";
55

66
describe("useBorderRadius", () => {
@@ -16,7 +16,7 @@ describe("useBorderRadius", () => {
1616
value: "0.25rem",
1717
});
1818

19-
const css = consume(borderRadius, s.options);
19+
const css = consumeCSS(borderRadius, s.options);
2020
expect(css).toBe(`--border-radius: 0.25rem;`);
2121
});
2222

@@ -32,7 +32,7 @@ describe("useBorderRadius", () => {
3232
value: "0.125rem",
3333
});
3434

35-
const css = consume(borderRadiusSm, s.options);
35+
const css = consumeCSS(borderRadiusSm, s.options);
3636
expect(css).toBe(`--border-radius--sm: 0.125rem;`);
3737
});
3838

@@ -243,7 +243,7 @@ describe("useBorderRadius", () => {
243243
});
244244
});
245245

246-
it("should compile to correct CSS output using consume", () => {
246+
it("should compile to correct CSS output using consumeCSS", () => {
247247
const s = styleframe();
248248
useBorderRadius(s, {
249249
default: "0.25rem",
@@ -253,7 +253,7 @@ describe("useBorderRadius", () => {
253253
lg: "0.5rem",
254254
});
255255

256-
const css = consume(s.root, s.options);
256+
const css = consumeCSS(s.root, s.options);
257257

258258
expect(css).toBe(`:root {
259259
--border-radius: 0.25rem;

theme/src/variables/useBorderStyle.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Variable } from "@styleframe/core";
22
import { styleframe } from "@styleframe/core";
3-
import { consume } from "@styleframe/transpiler";
3+
import { consumeCSS } from "@styleframe/transpiler";
44
import { useBorderStyle, defaultBorderStyleValues } from "./useBorderStyle";
55

66
describe("useBorderStyle", () => {
@@ -110,11 +110,11 @@ describe("useBorderStyle", () => {
110110
]);
111111
});
112112

113-
it("should compile to correct CSS output using consume", () => {
113+
it("should compile to correct CSS output using consumeCSS", () => {
114114
const s = styleframe();
115115
useBorderStyle(s);
116116

117-
const css = consume(s.root, s.options);
117+
const css = consumeCSS(s.root, s.options);
118118

119119
expect(css).toBe(`:root {
120120
--border-style--none: none;
@@ -133,7 +133,7 @@ describe("useBorderStyle", () => {
133133
const s = styleframe();
134134
const { borderStyleDashed } = useBorderStyle(s);
135135

136-
const css = consume(borderStyleDashed, s.options);
136+
const css = consumeCSS(borderStyleDashed, s.options);
137137

138138
expect(css).toBe("--border-style--dashed: dashed;");
139139
});
@@ -164,7 +164,7 @@ describe("useBorderStyle", () => {
164164
fallback: undefined,
165165
});
166166

167-
const css = consume(s.root, s.options);
167+
const css = consumeCSS(s.root, s.options);
168168
expect(css).toEqual(`:root {
169169
--border-style--none: none;
170170
--border-style--solid: solid;
@@ -187,7 +187,7 @@ describe("useBorderStyle", () => {
187187
variable(borderStyleSolid, "dashed");
188188
});
189189

190-
const css = consume(s.root, s.options);
190+
const css = consumeCSS(s.root, s.options);
191191

192192
expect(css).toEqual(`:root {
193193
--border-style--none: none;
@@ -293,7 +293,7 @@ describe("useBorderStyle", () => {
293293
default: "@dotted",
294294
});
295295

296-
const css = consume(s.root, s.options);
296+
const css = consumeCSS(s.root, s.options);
297297

298298
expect(css).toEqual(`:root {
299299
--border-style--none: none;
@@ -402,7 +402,7 @@ describe("useBorderStyle", () => {
402402
variable("border-style", s.ref(borderStyleDashed));
403403
});
404404

405-
const css = consume(s.root, s.options);
405+
const css = consumeCSS(s.root, s.options);
406406
expect(css).toEqual(`:root {
407407
--border-style--none: none;
408408
--border-style--solid: solid;
@@ -437,7 +437,7 @@ describe("useBorderStyle", () => {
437437
variable(buttonBorderStyle, s.ref(borderStyleDashed));
438438
});
439439

440-
const css = consume(s.root, s.options);
440+
const css = consumeCSS(s.root, s.options);
441441
expect(css).toEqual(`:root {
442442
--border-style--none: none;
443443
--border-style--solid: solid;
@@ -464,7 +464,7 @@ describe("useBorderStyle", () => {
464464
variable(borderStyleSolid, s.ref(borderStyleDotted));
465465
});
466466

467-
const css = consume(s.root, s.options);
467+
const css = consumeCSS(s.root, s.options);
468468
expect(css).toEqual(`:root {
469469
--border-style--none: none;
470470
--border-style--solid: solid;
@@ -499,7 +499,7 @@ describe("useBorderStyle", () => {
499499
variable("border-style", s.ref(borderStyleNone));
500500
});
501501

502-
const css = consume(s.root, s.options);
502+
const css = consumeCSS(s.root, s.options);
503503
expect(css).toEqual(`:root {
504504
--border-style--none: none;
505505
--border-style--solid: solid;
@@ -541,7 +541,7 @@ describe("useBorderStyle", () => {
541541
variable(borderWidth, "3px");
542542
});
543543

544-
const css = consume(s.root, s.options);
544+
const css = consumeCSS(s.root, s.options);
545545
expect(css).toEqual(`:root {
546546
--border-style--none: none;
547547
--border-style--solid: solid;

theme/src/variables/useBorderWidth.test.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Variable } from "@styleframe/core";
22
import { styleframe } from "@styleframe/core";
3-
import { consume } from "@styleframe/transpiler";
3+
import { consumeCSS } from "@styleframe/transpiler";
44
import { defaultBorderWidthValues, useBorderWidth } from "./useBorderWidth";
55

66
describe("useBorderWidth", () => {
@@ -74,11 +74,11 @@ describe("useBorderWidth", () => {
7474
]);
7575
});
7676

77-
it("should compile to correct CSS output using consume", () => {
77+
it("should compile to correct CSS output using consumeCSS", () => {
7878
const s = styleframe();
7979
useBorderWidth(s);
8080

81-
const css = consume(s.root, s.options);
81+
const css = consumeCSS(s.root, s.options);
8282

8383
expect(css).toBe(`:root {
8484
--border-width--none: 0;
@@ -93,7 +93,7 @@ describe("useBorderWidth", () => {
9393
const s = styleframe();
9494
const { borderWidthMedium } = useBorderWidth(s);
9595

96-
const css = consume(borderWidthMedium, s.options);
96+
const css = consumeCSS(borderWidthMedium, s.options);
9797

9898
expect(css).toBe("--border-width--medium: medium;");
9999
});
@@ -124,7 +124,7 @@ describe("useBorderWidth", () => {
124124
fallback: undefined,
125125
});
126126

127-
const css = consume(s.root, s.options);
127+
const css = consumeCSS(s.root, s.options);
128128
expect(css).toEqual(`:root {
129129
--border-width--none: 0;
130130
--border-width--thin: thin;
@@ -143,7 +143,7 @@ describe("useBorderWidth", () => {
143143
variable(borderWidthThin, "2px");
144144
});
145145

146-
const css = consume(s.root, s.options);
146+
const css = consumeCSS(s.root, s.options);
147147

148148
expect(css).toEqual(`:root {
149149
--border-width--none: 0;
@@ -228,7 +228,7 @@ describe("useBorderWidth", () => {
228228
default: "@thick",
229229
});
230230

231-
const css = consume(s.root, s.options);
231+
const css = consumeCSS(s.root, s.options);
232232

233233
expect(css).toEqual(`:root {
234234
--border-width--none: 0;
@@ -311,7 +311,7 @@ describe("useBorderWidth", () => {
311311
variable("border-width", s.ref(borderWidthThick));
312312
});
313313

314-
const css = consume(s.root, s.options);
314+
const css = consumeCSS(s.root, s.options);
315315
expect(css).toEqual(`:root {
316316
--border-width--none: 0;
317317
--border-width--thin: thin;
@@ -342,7 +342,7 @@ describe("useBorderWidth", () => {
342342
variable(buttonBorderWidth, s.ref(borderWidthMedium));
343343
});
344344

345-
const css = consume(s.root, s.options);
345+
const css = consumeCSS(s.root, s.options);
346346
expect(css).toEqual(`:root {
347347
--border-width--none: 0;
348348
--border-width--thin: thin;
@@ -365,7 +365,7 @@ describe("useBorderWidth", () => {
365365
variable(borderWidthThin, s.ref(borderWidthThick));
366366
});
367367

368-
const css = consume(s.root, s.options);
368+
const css = consumeCSS(s.root, s.options);
369369
expect(css).toEqual(`:root {
370370
--border-width--none: 0;
371371
--border-width--thin: thin;
@@ -396,7 +396,7 @@ describe("useBorderWidth", () => {
396396
variable("border-width", s.ref(borderWidthNone));
397397
});
398398

399-
const css = consume(s.root, s.options);
399+
const css = consumeCSS(s.root, s.options);
400400
expect(css).toEqual(`:root {
401401
--border-width--none: 0;
402402
--border-width--thin: thin;
@@ -434,7 +434,7 @@ describe("useBorderWidth", () => {
434434
variable(borderStyle, "double");
435435
});
436436

437-
const css = consume(s.root, s.options);
437+
const css = consumeCSS(s.root, s.options);
438438
expect(css).toEqual(`:root {
439439
--border-width--none: 0;
440440
--border-width--thin: thin;
@@ -467,7 +467,7 @@ describe("useBorderWidth", () => {
467467
variable(borderWidthThin, "3px");
468468
});
469469

470-
const css = consume(s.root, s.options);
470+
const css = consumeCSS(s.root, s.options);
471471
expect(css).toEqual(`:root {
472472
--border-width--none: 0;
473473
--border-width--thin: thin;
@@ -493,7 +493,7 @@ describe("useBorderWidth", () => {
493493
variable("border-width", s.ref(borderWidthNone));
494494
});
495495

496-
const css = consume(s.root, s.options);
496+
const css = consumeCSS(s.root, s.options);
497497
expect(css).toEqual(`:root {
498498
--border-width--none: 0;
499499
--border-width--thin: thin;

theme/src/variables/useBoxShadow.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Variable } from "@styleframe/core";
22
import { styleframe } from "@styleframe/core";
3-
import { consume } from "@styleframe/transpiler";
3+
import { consumeCSS } from "@styleframe/transpiler";
44
import { useBoxShadow } from "./useBoxShadow";
55

66
describe("useBoxShadow", () => {
@@ -16,7 +16,7 @@ describe("useBoxShadow", () => {
1616
value: "0 2px 4px rgba(0, 0, 0, 0.1)",
1717
});
1818

19-
const css = consume(boxShadow, s.options);
19+
const css = consumeCSS(boxShadow, s.options);
2020
expect(css).toBe(`--box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);`);
2121
});
2222

@@ -32,7 +32,7 @@ describe("useBoxShadow", () => {
3232
value: "0 1px 2px rgba(0, 0, 0, 0.05)",
3333
});
3434

35-
const css = consume(boxShadowSm, s.options);
35+
const css = consumeCSS(boxShadowSm, s.options);
3636
expect(css).toBe(`--box-shadow--sm: 0 1px 2px rgba(0, 0, 0, 0.05);`);
3737
});
3838

@@ -231,7 +231,7 @@ describe("useBoxShadow", () => {
231231
});
232232
});
233233

234-
it("should compile to correct CSS output using consume", () => {
234+
it("should compile to correct CSS output using consumeCSS", () => {
235235
const s = styleframe();
236236
useBoxShadow(s, {
237237
default: "0 2px 4px rgba(0, 0, 0, 0.1)",
@@ -241,7 +241,7 @@ describe("useBoxShadow", () => {
241241
lg: "0 8px 16px rgba(0, 0, 0, 0.15)",
242242
});
243243

244-
const css = consume(s.root, s.options);
244+
const css = consumeCSS(s.root, s.options);
245245

246246
expect(css).toBe(`:root {
247247
--box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

0 commit comments

Comments
 (0)