@webstudio-is/css-engine 0.185.0 → 0.191.0

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/lib/index.js CHANGED
@@ -21,6 +21,104 @@ var prefixStyles = (styleMap) => {
21
21
 
22
22
  // src/schema.ts
23
23
  import { z } from "zod";
24
+
25
+ // src/core/to-value.ts
26
+ import { captureError } from "@webstudio-is/error-utils";
27
+ import { DEFAULT_FONT_FALLBACK, SYSTEM_FONTS } from "@webstudio-is/fonts";
28
+ var fallbackTransform = (styleValue) => {
29
+ if (styleValue.type !== "fontFamily") {
30
+ return;
31
+ }
32
+ let { value } = styleValue;
33
+ if (value.length === 0) {
34
+ value = [DEFAULT_FONT_FALLBACK];
35
+ }
36
+ if (value.length === 1) {
37
+ const stack = SYSTEM_FONTS.get(value[0])?.stack;
38
+ value = stack ?? [value[0], DEFAULT_FONT_FALLBACK];
39
+ }
40
+ return {
41
+ type: "fontFamily",
42
+ value: Array.from(new Set(value))
43
+ };
44
+ };
45
+ var sanitizeCssUrl = (str) => JSON.stringify(str);
46
+ var toValue = (styleValue, transformValue) => {
47
+ if (styleValue === void 0) {
48
+ return "";
49
+ }
50
+ const transformedValue = transformValue?.(styleValue) ?? fallbackTransform(styleValue);
51
+ const value = transformedValue ?? styleValue;
52
+ if (value.type === "unit") {
53
+ return value.value + (value.unit === "number" ? "" : value.unit);
54
+ }
55
+ if (value.type === "fontFamily") {
56
+ const families = [];
57
+ for (const family of value.value) {
58
+ families.push(family.includes(" ") ? `"${family}"` : family);
59
+ }
60
+ return families.join(", ");
61
+ }
62
+ if (value.type === "var") {
63
+ if (value.hidden) {
64
+ return "";
65
+ }
66
+ let fallbacksString = "";
67
+ if (value.fallback) {
68
+ fallbacksString = `, ${toValue(value.fallback, transformValue)}`;
69
+ }
70
+ return `var(--${value.value}${fallbacksString})`;
71
+ }
72
+ if (value.type === "keyword") {
73
+ if (value.hidden === true) {
74
+ return "";
75
+ }
76
+ return value.value;
77
+ }
78
+ if (value.type === "invalid") {
79
+ return value.value;
80
+ }
81
+ if (value.type === "unset") {
82
+ return value.value;
83
+ }
84
+ if (value.type === "rgb") {
85
+ return `rgba(${value.r}, ${value.g}, ${value.b}, ${value.alpha})`;
86
+ }
87
+ if (value.type === "image") {
88
+ if (value.hidden || value.value.type !== "url") {
89
+ return "none";
90
+ }
91
+ return `url(${sanitizeCssUrl(value.value.url)})`;
92
+ }
93
+ if (value.type === "unparsed") {
94
+ if (value.hidden === true) {
95
+ return "none";
96
+ }
97
+ return value.value;
98
+ }
99
+ if (value.type === "layers") {
100
+ const valueString = value.value.filter((layer) => layer.hidden !== true).map((layer) => toValue(layer, transformValue)).join(", ");
101
+ return valueString === "" ? "none" : valueString;
102
+ }
103
+ if (value.type === "tuple") {
104
+ if (value.hidden === true) {
105
+ return "none";
106
+ }
107
+ return value.value.filter((value2) => value2.hidden !== true).map((value2) => toValue(value2, transformValue)).join(" ");
108
+ }
109
+ if (value.type === "function") {
110
+ if (value.hidden === true) {
111
+ return "";
112
+ }
113
+ return `${value.name}(${toValue(value.args, transformValue)})`;
114
+ }
115
+ if (value.type === "guaranteedInvalid") {
116
+ return "";
117
+ }
118
+ return captureError(new Error("Unknown value type"), value);
119
+ };
120
+
121
+ // src/schema.ts
24
122
  var Unit = z.string();
25
123
  var UnitValue = z.object({
26
124
  type: z.literal("unit"),
@@ -84,7 +182,19 @@ var UnsetValue = z.object({
84
182
  value: z.literal(""),
85
183
  hidden: z.boolean().optional()
86
184
  });
87
- var VarFallback = z.union([UnparsedValue, KeywordValue]);
185
+ var VarFallback = z.union([
186
+ UnparsedValue,
187
+ KeywordValue,
188
+ UnitValue,
189
+ RgbValue
190
+ ]);
191
+ var toVarFallback = (styleValue, transformValue) => {
192
+ if (styleValue.type === "unparsed" || styleValue.type === "keyword" || styleValue.type === "unit" || styleValue.type === "rgb") {
193
+ return styleValue;
194
+ }
195
+ styleValue;
196
+ return { type: "unparsed", value: toValue(styleValue, transformValue) };
197
+ };
88
198
  var VarValue = z.object({
89
199
  type: z.literal("var"),
90
200
  value: z.string(),
@@ -147,102 +257,6 @@ var cssWideKeywords = /* @__PURE__ */ new Set([
147
257
  "revert-layer"
148
258
  ]);
149
259
 
150
- // src/core/to-value.ts
151
- import { captureError } from "@webstudio-is/error-utils";
152
- import { DEFAULT_FONT_FALLBACK, SYSTEM_FONTS } from "@webstudio-is/fonts";
153
- var fallbackTransform = (styleValue) => {
154
- if (styleValue.type !== "fontFamily") {
155
- return;
156
- }
157
- let { value } = styleValue;
158
- if (value.length === 0) {
159
- value = [DEFAULT_FONT_FALLBACK];
160
- }
161
- if (value.length === 1) {
162
- const stack = SYSTEM_FONTS.get(value[0])?.stack;
163
- value = stack ?? [value[0], DEFAULT_FONT_FALLBACK];
164
- }
165
- return {
166
- type: "fontFamily",
167
- value: Array.from(new Set(value))
168
- };
169
- };
170
- var sanitizeCssUrl = (str) => JSON.stringify(str);
171
- var toValue = (styleValue, transformValue) => {
172
- if (styleValue === void 0) {
173
- return "";
174
- }
175
- const transformedValue = transformValue?.(styleValue) ?? fallbackTransform(styleValue);
176
- const value = transformedValue ?? styleValue;
177
- if (value.type === "unit") {
178
- return value.value + (value.unit === "number" ? "" : value.unit);
179
- }
180
- if (value.type === "fontFamily") {
181
- const families = [];
182
- for (const family of value.value) {
183
- families.push(family.includes(" ") ? `"${family}"` : family);
184
- }
185
- return families.join(", ");
186
- }
187
- if (value.type === "var") {
188
- if (value.hidden) {
189
- return "";
190
- }
191
- let fallbacksString = "";
192
- if (value.fallback) {
193
- fallbacksString = `, ${toValue(value.fallback, transformValue)}`;
194
- }
195
- return `var(--${value.value}${fallbacksString})`;
196
- }
197
- if (value.type === "keyword") {
198
- if (value.hidden === true) {
199
- return "";
200
- }
201
- return value.value;
202
- }
203
- if (value.type === "invalid") {
204
- return value.value;
205
- }
206
- if (value.type === "unset") {
207
- return value.value;
208
- }
209
- if (value.type === "rgb") {
210
- return `rgba(${value.r}, ${value.g}, ${value.b}, ${value.alpha})`;
211
- }
212
- if (value.type === "image") {
213
- if (value.hidden || value.value.type !== "url") {
214
- return "none";
215
- }
216
- return `url(${sanitizeCssUrl(value.value.url)})`;
217
- }
218
- if (value.type === "unparsed") {
219
- if (value.hidden === true) {
220
- return "none";
221
- }
222
- return value.value;
223
- }
224
- if (value.type === "layers") {
225
- const valueString = value.value.filter((layer) => layer.hidden !== true).map((layer) => toValue(layer, transformValue)).join(", ");
226
- return valueString === "" ? "none" : valueString;
227
- }
228
- if (value.type === "tuple") {
229
- if (value.hidden === true) {
230
- return "none";
231
- }
232
- return value.value.filter((value2) => value2.hidden !== true).map((value2) => toValue(value2, transformValue)).join(" ");
233
- }
234
- if (value.type === "function") {
235
- if (value.hidden === true) {
236
- return "";
237
- }
238
- return `${value.name}(${toValue(value.args, transformValue)})`;
239
- }
240
- if (value.type === "guaranteedInvalid") {
241
- return "";
242
- }
243
- return captureError(new Error("Unknown value type"), value);
244
- };
245
-
246
260
  // src/core/merger.ts
247
261
  var isLonghandValue = (value) => {
248
262
  if (value === void 0) {
@@ -312,6 +326,9 @@ var mergeWhiteSpaceAndTextWrap = (styleMap) => {
312
326
  if (collapse === "break-spaces") {
313
327
  styleMap.set("white-space", { type: "keyword", value: "break-spaces" });
314
328
  }
329
+ if (style === "auto") {
330
+ styleMap.set("text-wrap", modeValue ?? { type: "keyword", value: "wrap" });
331
+ }
315
332
  if (style === "balance" || style === "stable" || style === "pretty") {
316
333
  styleMap.set("text-wrap", { type: "keyword", value: style });
317
334
  }
@@ -931,5 +948,6 @@ export {
931
948
  matchMedia,
932
949
  mergeStyles,
933
950
  prefixStyles,
934
- toValue
951
+ toValue,
952
+ toVarFallback
935
953
  };
@@ -1,21 +1,27 @@
1
1
  import { StyleValue } from "../schema";
2
2
  import type { StyleMap } from "./rules";
3
3
  export declare const mergeStyles: (styleMap: StyleMap) => Map<string, {
4
- type: "unit";
4
+ value: {
5
+ value: string;
6
+ type: "asset";
7
+ } | {
8
+ type: "url";
9
+ url: string;
10
+ };
11
+ type: "image";
12
+ hidden?: boolean | undefined;
13
+ } | {
5
14
  value: number;
15
+ type: "unit";
6
16
  unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
7
17
  hidden?: boolean | undefined;
8
18
  } | {
9
- type: "keyword";
10
19
  value: string;
20
+ type: "keyword";
11
21
  hidden?: boolean | undefined;
12
22
  } | {
13
- type: "unparsed";
14
23
  value: string;
15
- hidden?: boolean | undefined;
16
- } | {
17
- type: "fontFamily";
18
- value: string[];
24
+ type: "unparsed";
19
25
  hidden?: boolean | undefined;
20
26
  } | {
21
27
  type: "rgb";
@@ -30,42 +36,53 @@ export declare const mergeStyles: (styleMap: StyleMap) => Map<string, {
30
36
  args: StyleValue;
31
37
  hidden?: boolean;
32
38
  } | {
33
- type: "image";
34
- value: {
35
- type: "asset";
36
- value: string;
37
- } | {
38
- type: "url";
39
- url: string;
40
- };
41
- hidden?: boolean | undefined;
42
- } | {
43
- type: "var";
44
39
  value: string;
40
+ type: "var";
45
41
  fallback?: {
46
- type: "keyword";
42
+ value: number;
43
+ type: "unit";
44
+ unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
45
+ hidden?: boolean | undefined;
46
+ } | {
47
47
  value: string;
48
+ type: "keyword";
48
49
  hidden?: boolean | undefined;
49
50
  } | {
50
- type: "unparsed";
51
51
  value: string;
52
+ type: "unparsed";
53
+ hidden?: boolean | undefined;
54
+ } | {
55
+ type: "rgb";
56
+ r: number;
57
+ g: number;
58
+ b: number;
59
+ alpha: number;
52
60
  hidden?: boolean | undefined;
53
61
  } | undefined;
54
62
  hidden?: boolean | undefined;
55
63
  } | {
56
- type: "tuple";
57
64
  value: ({
58
- type: "unit";
65
+ value: {
66
+ value: string;
67
+ type: "asset";
68
+ } | {
69
+ type: "url";
70
+ url: string;
71
+ };
72
+ type: "image";
73
+ hidden?: boolean | undefined;
74
+ } | {
59
75
  value: number;
76
+ type: "unit";
60
77
  unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
61
78
  hidden?: boolean | undefined;
62
79
  } | {
63
- type: "keyword";
64
80
  value: string;
81
+ type: "keyword";
65
82
  hidden?: boolean | undefined;
66
83
  } | {
67
- type: "unparsed";
68
84
  value: string;
85
+ type: "unparsed";
69
86
  hidden?: boolean | undefined;
70
87
  } | {
71
88
  type: "rgb";
@@ -80,48 +97,60 @@ export declare const mergeStyles: (styleMap: StyleMap) => Map<string, {
80
97
  args: StyleValue;
81
98
  hidden?: boolean;
82
99
  } | {
83
- type: "image";
84
- value: {
85
- type: "asset";
86
- value: string;
87
- } | {
88
- type: "url";
89
- url: string;
90
- };
91
- hidden?: boolean | undefined;
92
- } | {
93
- type: "var";
94
100
  value: string;
101
+ type: "var";
95
102
  fallback?: {
96
- type: "keyword";
103
+ value: number;
104
+ type: "unit";
105
+ unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
106
+ hidden?: boolean | undefined;
107
+ } | {
97
108
  value: string;
109
+ type: "keyword";
98
110
  hidden?: boolean | undefined;
99
111
  } | {
100
- type: "unparsed";
101
112
  value: string;
113
+ type: "unparsed";
114
+ hidden?: boolean | undefined;
115
+ } | {
116
+ type: "rgb";
117
+ r: number;
118
+ g: number;
119
+ b: number;
120
+ alpha: number;
102
121
  hidden?: boolean | undefined;
103
122
  } | undefined;
104
123
  hidden?: boolean | undefined;
105
124
  })[];
125
+ type: "tuple";
106
126
  hidden?: boolean | undefined;
107
127
  } | {
108
- type: "invalid";
109
128
  value: string;
129
+ type: "invalid";
110
130
  hidden?: boolean | undefined;
111
131
  } | {
112
- type: "layers";
113
132
  value: ({
114
- type: "unit";
133
+ value: {
134
+ value: string;
135
+ type: "asset";
136
+ } | {
137
+ type: "url";
138
+ url: string;
139
+ };
140
+ type: "image";
141
+ hidden?: boolean | undefined;
142
+ } | {
115
143
  value: number;
144
+ type: "unit";
116
145
  unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
117
146
  hidden?: boolean | undefined;
118
147
  } | {
119
- type: "keyword";
120
148
  value: string;
149
+ type: "keyword";
121
150
  hidden?: boolean | undefined;
122
151
  } | {
123
- type: "unparsed";
124
152
  value: string;
153
+ type: "unparsed";
125
154
  hidden?: boolean | undefined;
126
155
  } | {
127
156
  type: "rgb";
@@ -136,42 +165,53 @@ export declare const mergeStyles: (styleMap: StyleMap) => Map<string, {
136
165
  args: StyleValue;
137
166
  hidden?: boolean;
138
167
  } | {
139
- type: "image";
140
- value: {
141
- type: "asset";
142
- value: string;
143
- } | {
144
- type: "url";
145
- url: string;
146
- };
147
- hidden?: boolean | undefined;
148
- } | {
149
- type: "var";
150
168
  value: string;
169
+ type: "var";
151
170
  fallback?: {
152
- type: "keyword";
171
+ value: number;
172
+ type: "unit";
173
+ unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
174
+ hidden?: boolean | undefined;
175
+ } | {
153
176
  value: string;
177
+ type: "keyword";
154
178
  hidden?: boolean | undefined;
155
179
  } | {
156
- type: "unparsed";
157
180
  value: string;
181
+ type: "unparsed";
182
+ hidden?: boolean | undefined;
183
+ } | {
184
+ type: "rgb";
185
+ r: number;
186
+ g: number;
187
+ b: number;
188
+ alpha: number;
158
189
  hidden?: boolean | undefined;
159
190
  } | undefined;
160
191
  hidden?: boolean | undefined;
161
192
  } | {
162
- type: "tuple";
163
193
  value: ({
164
- type: "unit";
194
+ value: {
195
+ value: string;
196
+ type: "asset";
197
+ } | {
198
+ type: "url";
199
+ url: string;
200
+ };
201
+ type: "image";
202
+ hidden?: boolean | undefined;
203
+ } | {
165
204
  value: number;
205
+ type: "unit";
166
206
  unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
167
207
  hidden?: boolean | undefined;
168
208
  } | {
169
- type: "keyword";
170
209
  value: string;
210
+ type: "keyword";
171
211
  hidden?: boolean | undefined;
172
212
  } | {
173
- type: "unparsed";
174
213
  value: string;
214
+ type: "unparsed";
175
215
  hidden?: boolean | undefined;
176
216
  } | {
177
217
  type: "rgb";
@@ -186,41 +226,49 @@ export declare const mergeStyles: (styleMap: StyleMap) => Map<string, {
186
226
  args: StyleValue;
187
227
  hidden?: boolean;
188
228
  } | {
189
- type: "image";
190
- value: {
191
- type: "asset";
192
- value: string;
193
- } | {
194
- type: "url";
195
- url: string;
196
- };
197
- hidden?: boolean | undefined;
198
- } | {
199
- type: "var";
200
229
  value: string;
230
+ type: "var";
201
231
  fallback?: {
202
- type: "keyword";
232
+ value: number;
233
+ type: "unit";
234
+ unit: "number" | "%" | "deg" | "grad" | "rad" | "turn" | "db" | "fr" | "hz" | "khz" | "cm" | "mm" | "q" | "in" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "ic" | "ric" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqw" | "cqh" | "cqi" | "cqb" | "cqmin" | "cqmax" | "dpi" | "dpcm" | "dppx" | "x" | "st" | "s" | "ms";
235
+ hidden?: boolean | undefined;
236
+ } | {
203
237
  value: string;
238
+ type: "keyword";
204
239
  hidden?: boolean | undefined;
205
240
  } | {
206
- type: "unparsed";
207
241
  value: string;
242
+ type: "unparsed";
243
+ hidden?: boolean | undefined;
244
+ } | {
245
+ type: "rgb";
246
+ r: number;
247
+ g: number;
248
+ b: number;
249
+ alpha: number;
208
250
  hidden?: boolean | undefined;
209
251
  } | undefined;
210
252
  hidden?: boolean | undefined;
211
253
  })[];
254
+ type: "tuple";
212
255
  hidden?: boolean | undefined;
213
256
  } | {
214
- type: "invalid";
215
257
  value: string;
258
+ type: "invalid";
216
259
  hidden?: boolean | undefined;
217
260
  })[];
261
+ type: "layers";
262
+ hidden?: boolean | undefined;
263
+ } | {
264
+ value: string[];
265
+ type: "fontFamily";
218
266
  hidden?: boolean | undefined;
219
267
  } | {
220
268
  type: "guaranteedInvalid";
221
269
  hidden?: boolean | undefined;
222
270
  } | {
223
- type: "unset";
224
271
  value: "";
272
+ type: "unset";
225
273
  hidden?: boolean | undefined;
226
274
  }>;
@@ -33,7 +33,7 @@ export declare class MixinRule {
33
33
  clearBreakpoints(): void;
34
34
  setDeclaration(declaration: Declaration): void;
35
35
  deleteDeclaration(declaration: DeclarationKey): void;
36
- getDeclarations(): IterableIterator<Declaration>;
36
+ getDeclarations(): MapIterator<Declaration>;
37
37
  }
38
38
  /**
39
39
  * Universal style rule with nested selectors and media queries support