@tamagui/tailwind 0.0.0-bootstrap.0 → 3.0.0-beta.1093.1
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/dist/cjs/candidate.cjs +540 -0
- package/dist/cjs/candidate.native.cjs +578 -0
- package/dist/cjs/candidate.native.js +580 -0
- package/dist/cjs/candidate.native.js.map +1 -0
- package/dist/cjs/compose.cjs +352 -0
- package/dist/cjs/compose.native.cjs +358 -0
- package/dist/cjs/compose.native.js +360 -0
- package/dist/cjs/compose.native.js.map +1 -0
- package/dist/cjs/composedResolver.cjs +175 -0
- package/dist/cjs/composedResolver.native.cjs +201 -0
- package/dist/cjs/composedResolver.native.js +203 -0
- package/dist/cjs/composedResolver.native.js.map +1 -0
- package/dist/cjs/frontend.cjs +54 -0
- package/dist/cjs/frontend.native.cjs +62 -0
- package/dist/cjs/frontend.native.js +64 -0
- package/dist/cjs/frontend.native.js.map +1 -0
- package/dist/cjs/index.cjs +38 -0
- package/dist/cjs/index.native.cjs +40 -0
- package/dist/cjs/index.native.js +42 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/styled.cjs +29 -0
- package/dist/cjs/styled.native.cjs +31 -0
- package/dist/cjs/styled.native.js +33 -0
- package/dist/cjs/styled.native.js.map +1 -0
- package/dist/cjs/types.cjs +16 -0
- package/dist/cjs/types.native.cjs +18 -0
- package/dist/cjs/types.native.js +20 -0
- package/dist/cjs/types.native.js.map +1 -0
- package/dist/cjs/vite/state.cjs +249 -0
- package/dist/cjs/vite/state.native.cjs +331 -0
- package/dist/cjs/vite/state.native.js +333 -0
- package/dist/cjs/vite/state.native.js.map +1 -0
- package/dist/cjs/vite.cjs +147 -0
- package/dist/cjs/vite.native.cjs +187 -0
- package/dist/cjs/vite.native.js +189 -0
- package/dist/cjs/vite.native.js.map +1 -0
- package/dist/esm/candidate.mjs +514 -0
- package/dist/esm/candidate.mjs.map +1 -0
- package/dist/esm/candidate.native.js +550 -0
- package/dist/esm/candidate.native.js.map +1 -0
- package/dist/esm/compose.mjs +328 -0
- package/dist/esm/compose.mjs.map +1 -0
- package/dist/esm/compose.native.js +332 -0
- package/dist/esm/compose.native.js.map +1 -0
- package/dist/esm/composedResolver.mjs +155 -0
- package/dist/esm/composedResolver.mjs.map +1 -0
- package/dist/esm/composedResolver.native.js +179 -0
- package/dist/esm/composedResolver.native.js.map +1 -0
- package/dist/esm/frontend.mjs +32 -0
- package/dist/esm/frontend.mjs.map +1 -0
- package/dist/esm/frontend.native.js +38 -0
- package/dist/esm/frontend.native.js.map +1 -0
- package/dist/esm/index.mjs +11 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +11 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/styled.mjs +10 -0
- package/dist/esm/styled.mjs.map +1 -0
- package/dist/esm/styled.native.js +10 -0
- package/dist/esm/styled.native.js.map +1 -0
- package/dist/esm/types.mjs +0 -0
- package/dist/esm/types.native.js +0 -0
- package/dist/esm/vite/state.mjs +216 -0
- package/dist/esm/vite/state.mjs.map +1 -0
- package/dist/esm/vite/state.native.js +296 -0
- package/dist/esm/vite/state.native.js.map +1 -0
- package/dist/esm/vite.mjs +116 -0
- package/dist/esm/vite.mjs.map +1 -0
- package/dist/esm/vite.native.js +154 -0
- package/dist/esm/vite.native.js.map +1 -0
- package/package.json +90 -5
- package/src/candidate.ts +805 -0
- package/src/frontend.ts +73 -0
- package/src/index.tsx +35 -0
- package/src/styled.tsx +52 -0
- package/src/types.ts +249 -0
- package/src/vite/state.ts +274 -0
- package/src/vite.ts +204 -0
- package/types/candidate.d.ts +18 -0
- package/types/candidate.d.ts.map +1 -0
- package/types/compose.d.ts +19 -0
- package/types/compose.d.ts.map +1 -0
- package/types/composedResolver.d.ts +18 -0
- package/types/composedResolver.d.ts.map +1 -0
- package/types/frontend.d.ts +19 -0
- package/types/frontend.d.ts.map +1 -0
- package/types/index.d.ts +17 -0
- package/types/index.d.ts.map +1 -0
- package/types/styled.d.ts +12 -0
- package/types/styled.d.ts.map +1 -0
- package/types/types.d.ts +169 -0
- package/types/types.d.ts.map +1 -0
- package/types/vite/state.d.ts +28 -0
- package/types/vite/state.d.ts.map +1 -0
- package/types/vite.d.ts +20 -0
- package/types/vite.d.ts.map +1 -0
- package/README.md +0 -1
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
import { isWeb } from "@tamagui/constants";
|
|
2
|
+
import { stylePropsUnitless } from "@tamagui/helpers";
|
|
3
|
+
import { mergeFrontendCondition, plainValueToPayload } from "@tamagui/core/internal-runtime";
|
|
4
|
+
import { noteBoxShadow, noteTailwindTransform, tryCompose } from "./compose.mjs";
|
|
5
|
+
import { composedResolver } from "./composedResolver.mjs";
|
|
6
|
+
import { borderSideSuffix, configRevisionSymbol, createGrammarConfigView, getSafeAreaEdge, getTokenCategory, insetAxisProps, percentUtilityProps, radiusCornerProps, sizeUtilityProps, splitColorOpacitySuffix } from "@tamagui/style-grammar/runtime";
|
|
7
|
+
import { classifyCandidate, decodeArbitrary, resolveTokenName } from "@tamagui/style-grammar/tooling/candidate";
|
|
8
|
+
|
|
9
|
+
const styleGrammarConfigCache = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
function getStyleGrammarConfig(config) {
|
|
11
|
+
const cached = styleGrammarConfigCache.get(config);
|
|
12
|
+
const revision = config[configRevisionSymbol]?.revision || 0;
|
|
13
|
+
if (cached && cached.revision === revision) return cached.value;
|
|
14
|
+
const view = createGrammarConfigView(config);
|
|
15
|
+
styleGrammarConfigCache.set(config, {
|
|
16
|
+
revision,
|
|
17
|
+
value: view
|
|
18
|
+
});
|
|
19
|
+
return view;
|
|
20
|
+
}
|
|
21
|
+
function isTokenValueProp(prop) {
|
|
22
|
+
return getTokenCategory(prop) !== null;
|
|
23
|
+
}
|
|
24
|
+
function arbitraryValue(inner, prop) {
|
|
25
|
+
const px = /^(-?\d*\.?\d+)px$/.exec(inner);
|
|
26
|
+
if (px) return prop && stylePropsUnitless[prop] ? inner : Number(px[1]);
|
|
27
|
+
if (/^-?\d*\.?\d+$/.test(inner)) return Number(inner);
|
|
28
|
+
return inner;
|
|
29
|
+
}
|
|
30
|
+
function unwrapArbitraryValue(raw) {
|
|
31
|
+
return arbitraryValue(raw.length > 1 && raw[0] === "[" && raw[raw.length - 1] === "]" ? decodeArbitrary(raw.slice(1, -1)) : raw);
|
|
32
|
+
}
|
|
33
|
+
function tailwindSizingValue(prop, value) {
|
|
34
|
+
if (value === "full") return "100%";
|
|
35
|
+
if (value === "auto") return "auto";
|
|
36
|
+
if (value === "screen") return /[Hh]eight|[Bb]lock/.test(prop) ? "100vh" : "100vw";
|
|
37
|
+
if (value === "min") return "min-content";
|
|
38
|
+
if (value === "max") return "max-content";
|
|
39
|
+
if (value === "fit") return "fit-content";
|
|
40
|
+
const frac = /^(\d+)\/(\d+)$/.exec(value);
|
|
41
|
+
if (frac && Number(frac[2]) !== 0) return `${Number(frac[1]) / Number(frac[2]) * 100}%`;
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
function expansionProps(parsed) {
|
|
45
|
+
const prefix = parsed.prefix;
|
|
46
|
+
if (!prefix) return null;
|
|
47
|
+
if (prefix === "size") return sizeUtilityProps;
|
|
48
|
+
if (prefix === "translate") return ["x", "y"];
|
|
49
|
+
if (prefix === "skew") return ["skewX", "skewY"];
|
|
50
|
+
if (prefix === "inset-x" || prefix === "inset-y") return insetAxisProps[prefix.slice(6)];
|
|
51
|
+
if (prefix.startsWith("rounded-")) {
|
|
52
|
+
const props = radiusCornerProps[prefix.slice(8)];
|
|
53
|
+
if (!props || props.length === 1) return null;
|
|
54
|
+
return props;
|
|
55
|
+
}
|
|
56
|
+
const m = /^border-([trblxy])$/.exec(prefix);
|
|
57
|
+
if (!m) return null;
|
|
58
|
+
const sides = borderSideSuffix[m[1]];
|
|
59
|
+
const suffix = parsed.entry?.prop.endsWith("Width") ? "Width" : "Color";
|
|
60
|
+
return sides.map((side) => `border${side}${suffix}`);
|
|
61
|
+
}
|
|
62
|
+
function tailwindClassToFlatProp(parsed, grammarConfig) {
|
|
63
|
+
if (parsed.kind !== "dynamic" || !parsed.entry || parsed.rawValue === void 0) return null;
|
|
64
|
+
const prop = parsed.entry.prop;
|
|
65
|
+
const category = parsed.entry.tokenCategory;
|
|
66
|
+
let value = parsed.rawValue;
|
|
67
|
+
if (parsed.negative && value === "0" && parsed.convenience !== "angle") return {
|
|
68
|
+
key: prop,
|
|
69
|
+
value: 0
|
|
70
|
+
};
|
|
71
|
+
if (parsed.convenience === "zero") return {
|
|
72
|
+
key: prop,
|
|
73
|
+
value: 0
|
|
74
|
+
};
|
|
75
|
+
if (parsed.convenience === "angle") return {
|
|
76
|
+
key: prop,
|
|
77
|
+
value: `${parsed.negative ? "-" : ""}${value}deg`
|
|
78
|
+
};
|
|
79
|
+
if ((prop === "x" || prop === "y") && parsed.valueKind !== "token") {
|
|
80
|
+
const sized = tailwindSizingValue(prop, value);
|
|
81
|
+
if (sized != null) return {
|
|
82
|
+
key: prop,
|
|
83
|
+
value: parsed.negative && sized[0] !== "-" ? `-${sized}` : sized
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
if (prop === "lineHeight" && /^\d+(?:\.\d+)?$/.test(value)) return {
|
|
87
|
+
key: prop,
|
|
88
|
+
value: Number(value) * 4
|
|
89
|
+
};
|
|
90
|
+
if (prop === "gridTemplateColumns" && /^\d+$/.test(value)) return {
|
|
91
|
+
key: prop,
|
|
92
|
+
value: `repeat(${value}, minmax(0, 1fr))`
|
|
93
|
+
};
|
|
94
|
+
if (prop === "gridColumn" && /^\d+$/.test(value)) return {
|
|
95
|
+
key: prop,
|
|
96
|
+
value: `span ${value} / span ${value}`
|
|
97
|
+
};
|
|
98
|
+
if (prop === "gridRow" && /^\d+$/.test(value)) return {
|
|
99
|
+
key: prop,
|
|
100
|
+
value: `span ${value} / span ${value}`
|
|
101
|
+
};
|
|
102
|
+
if ((prop === "gridColumnStart" || prop === "gridColumnEnd" || prop === "gridRowStart" || prop === "gridRowEnd") && /^\d+$/.test(value)) return {
|
|
103
|
+
key: prop,
|
|
104
|
+
value: Number(value)
|
|
105
|
+
};
|
|
106
|
+
if (prop.endsWith("Width") && parsed.prefix?.startsWith("border")) {
|
|
107
|
+
if (parsed.valueKind === "token") {
|
|
108
|
+
value = `${parsed.negative ? "-" : ""}${value}`;
|
|
109
|
+
if (grammarConfig && parsed.entry?.tokenCategory) value = resolveTokenName(grammarConfig, parsed.entry.tokenCategory, value) ?? value;
|
|
110
|
+
} else if (parsed.valueKind === "arbitrary") value = unwrapArbitraryValue(value);
|
|
111
|
+
else return null;
|
|
112
|
+
return {
|
|
113
|
+
key: prop,
|
|
114
|
+
value
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
if (prop === "fontFamily") {
|
|
118
|
+
let famValue;
|
|
119
|
+
if (value.length > 2 && value[0] === "[" && value[value.length - 1] === "]") famValue = decodeArbitrary(value.slice(1, -1));
|
|
120
|
+
else famValue = parsed.valueKind === "token" ? value : {
|
|
121
|
+
sans: "sans-serif",
|
|
122
|
+
serif: "serif",
|
|
123
|
+
mono: "monospace"
|
|
124
|
+
}[value] || value;
|
|
125
|
+
return {
|
|
126
|
+
key: "fontFamily",
|
|
127
|
+
value: famValue
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
if (prop === "fontSize") {
|
|
131
|
+
let fsValue;
|
|
132
|
+
if (value.length > 2 && value[0] === "[" && value[value.length - 1] === "]") fsValue = arbitraryValue(decodeArbitrary(value.slice(1, -1)));
|
|
133
|
+
else fsValue = value;
|
|
134
|
+
return {
|
|
135
|
+
key: "fontSize",
|
|
136
|
+
value: fsValue
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
if (prop === "lineHeight") {
|
|
140
|
+
let lhValue;
|
|
141
|
+
if (value.length > 2 && value[0] === "[" && value[value.length - 1] === "]") {
|
|
142
|
+
const inner = decodeArbitrary(value.slice(1, -1));
|
|
143
|
+
lhValue = /^-?\d*\.?\d+px$/.test(inner) ? Number.parseFloat(inner) : inner;
|
|
144
|
+
} else lhValue = value;
|
|
145
|
+
return {
|
|
146
|
+
key: "lineHeight",
|
|
147
|
+
value: lhValue
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
if (prop === "letterSpacing") {
|
|
151
|
+
let lsValue;
|
|
152
|
+
if (value.length > 2 && value[0] === "[" && value[value.length - 1] === "]") lsValue = arbitraryValue(decodeArbitrary(value.slice(1, -1)));
|
|
153
|
+
else lsValue = value;
|
|
154
|
+
return {
|
|
155
|
+
key: "letterSpacing",
|
|
156
|
+
value: lsValue
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
if (prop === "boxShadow" && value[0] === "[" && value[value.length - 1] === "]") return {
|
|
160
|
+
key: "boxShadow",
|
|
161
|
+
value: decodeArbitrary(value.slice(1, -1))
|
|
162
|
+
};
|
|
163
|
+
if (value.length > 2 && value[0] === "[" && value[value.length - 1] === "]") {
|
|
164
|
+
const inner = decodeArbitrary(value.slice(1, -1));
|
|
165
|
+
if (inner === "") return null;
|
|
166
|
+
let resolved = arbitraryValue(inner, prop);
|
|
167
|
+
if ((prop === "rotate" || prop === "rotateX" || prop === "rotateY" || prop === "rotateZ" || prop === "skewX" || prop === "skewY") && typeof resolved === "number") resolved = `${resolved}deg`;
|
|
168
|
+
if (parsed.negative) {
|
|
169
|
+
if (typeof resolved === "number") resolved = -resolved;
|
|
170
|
+
else if (resolved[0] !== "-") resolved = `-${resolved}`;
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
key: prop,
|
|
174
|
+
value: resolved
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
if (parsed.valueKind !== "token" && (category === "size" || parsed.convenience === "sizing-keyword")) {
|
|
178
|
+
const sized = tailwindSizingValue(prop, value);
|
|
179
|
+
if (sized != null) return {
|
|
180
|
+
key: prop,
|
|
181
|
+
value: parsed.negative && sized[0] !== "-" ? `-${sized}` : sized
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
let opacitySuffix = "";
|
|
185
|
+
if (category === "color" && typeof value === "string") {
|
|
186
|
+
const suffix = splitColorOpacitySuffix(value);
|
|
187
|
+
if (suffix.kind === "invalid") return {
|
|
188
|
+
key: prop,
|
|
189
|
+
value
|
|
190
|
+
};
|
|
191
|
+
if (suffix.kind === "valid") {
|
|
192
|
+
opacitySuffix = value.slice(suffix.name.length);
|
|
193
|
+
value = suffix.name;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (percentUtilityProps.has(prop) && /^\d+$/.test(value)) value = Number(value) / 100;
|
|
197
|
+
else if (/^\d+(\.\d+)?$/.test(value)) if (category === "zIndex" && parsed.valueKind === "convenience") value = Number(value) * (parsed.negative ? -1 : 1);
|
|
198
|
+
else if (category) {
|
|
199
|
+
value = `${parsed.negative ? "-" : ""}${value}`;
|
|
200
|
+
if (grammarConfig) value = resolveTokenName(grammarConfig, category, value) ?? value;
|
|
201
|
+
} else value = Number(value);
|
|
202
|
+
else if (typeof value === "string") {
|
|
203
|
+
if (category && !((category === "space" || category === "size" || category === "radius") && getSafeAreaEdge(value))) value = `${parsed.negative ? "-" : ""}${value}`;
|
|
204
|
+
}
|
|
205
|
+
if (opacitySuffix && typeof value === "string") value = `${value}${opacitySuffix}`;
|
|
206
|
+
if (parsed.negative && !category) {
|
|
207
|
+
if (typeof value === "number") value = -value;
|
|
208
|
+
else if (typeof value === "string" && value[0] !== "-") value = `-${value}`;
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
key: prop,
|
|
212
|
+
value
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
const classPlanCache = /* @__PURE__ */ new WeakMap();
|
|
216
|
+
const nativeTarget = !isWeb || false;
|
|
217
|
+
const cssGridProps = /* @__PURE__ */ new Set([
|
|
218
|
+
"gridTemplateColumns",
|
|
219
|
+
"gridColumn",
|
|
220
|
+
"gridColumnStart",
|
|
221
|
+
"gridColumnEnd",
|
|
222
|
+
"gridRow",
|
|
223
|
+
"gridRowStart",
|
|
224
|
+
"gridRowEnd"
|
|
225
|
+
]);
|
|
226
|
+
const nativeUnsupportedProps = /* @__PURE__ */ new Set([
|
|
227
|
+
"objectFit",
|
|
228
|
+
"order",
|
|
229
|
+
"overflowX",
|
|
230
|
+
"overflowY",
|
|
231
|
+
"textOverflow",
|
|
232
|
+
"whiteSpace",
|
|
233
|
+
"visibility"
|
|
234
|
+
]);
|
|
235
|
+
const nativeUnsupportedSizingValues = /* @__PURE__ */ new Set([
|
|
236
|
+
"screen",
|
|
237
|
+
"min",
|
|
238
|
+
"max",
|
|
239
|
+
"fit"
|
|
240
|
+
]);
|
|
241
|
+
const nativeUnsupportedDisplayValues = /* @__PURE__ */ new Set([
|
|
242
|
+
"block",
|
|
243
|
+
"inline",
|
|
244
|
+
"inline-flex"
|
|
245
|
+
]);
|
|
246
|
+
const nativeUnsupportedPositionValues = /* @__PURE__ */ new Set(["fixed", "sticky"]);
|
|
247
|
+
function shouldGateNative(parsed) {
|
|
248
|
+
if (!nativeTarget) return false;
|
|
249
|
+
const properties = parsed.properties || {};
|
|
250
|
+
if (process.env.TAMAGUI_CSS_GRID !== "1" && (parsed.entry && cssGridProps.has(parsed.entry.prop) || properties.display === "grid" || Object.keys(properties).some((prop) => cssGridProps.has(prop)))) return true;
|
|
251
|
+
if (parsed.entry && nativeUnsupportedProps.has(parsed.entry.prop) || Object.keys(properties).some((prop) => nativeUnsupportedProps.has(prop))) return true;
|
|
252
|
+
if (parsed.convenience === "sizing-keyword" && nativeUnsupportedSizingValues.has(parsed.rawValue || "")) return true;
|
|
253
|
+
return nativeUnsupportedDisplayValues.has(String(properties.display)) || nativeUnsupportedPositionValues.has(String(properties.position)) || properties.overflow === "auto" || properties.cursor !== void 0 && properties.cursor !== "auto" && properties.cursor !== "pointer";
|
|
254
|
+
}
|
|
255
|
+
function getClassPlanCache(grammarConfig) {
|
|
256
|
+
let cache = classPlanCache.get(grammarConfig);
|
|
257
|
+
if (!cache) {
|
|
258
|
+
cache = /* @__PURE__ */ new Map();
|
|
259
|
+
classPlanCache.set(grammarConfig, cache);
|
|
260
|
+
}
|
|
261
|
+
return cache;
|
|
262
|
+
}
|
|
263
|
+
function createPlanEntry(property, value, modifiers) {
|
|
264
|
+
if (modifiers.length === 0) return [property, value];
|
|
265
|
+
const payload = plainValueToPayload(value, property);
|
|
266
|
+
if (payload === null) return null;
|
|
267
|
+
let condition = "";
|
|
268
|
+
for (let index = 0; index < modifiers.length; index++) {
|
|
269
|
+
if (index) condition += ":";
|
|
270
|
+
condition += modifiers[index];
|
|
271
|
+
}
|
|
272
|
+
return [
|
|
273
|
+
property,
|
|
274
|
+
payload,
|
|
275
|
+
condition,
|
|
276
|
+
modifiers
|
|
277
|
+
];
|
|
278
|
+
}
|
|
279
|
+
const shorthandResets = {
|
|
280
|
+
padding: [
|
|
281
|
+
"paddingTop",
|
|
282
|
+
"paddingRight",
|
|
283
|
+
"paddingBottom",
|
|
284
|
+
"paddingLeft",
|
|
285
|
+
"paddingStart",
|
|
286
|
+
"paddingEnd",
|
|
287
|
+
"paddingInlineStart",
|
|
288
|
+
"paddingInlineEnd",
|
|
289
|
+
"paddingBlockStart",
|
|
290
|
+
"paddingBlockEnd",
|
|
291
|
+
"paddingHorizontal",
|
|
292
|
+
"paddingVertical",
|
|
293
|
+
"paddingInline",
|
|
294
|
+
"paddingBlock"
|
|
295
|
+
],
|
|
296
|
+
margin: [
|
|
297
|
+
"marginTop",
|
|
298
|
+
"marginRight",
|
|
299
|
+
"marginBottom",
|
|
300
|
+
"marginLeft",
|
|
301
|
+
"marginStart",
|
|
302
|
+
"marginEnd",
|
|
303
|
+
"marginInlineStart",
|
|
304
|
+
"marginInlineEnd",
|
|
305
|
+
"marginBlockStart",
|
|
306
|
+
"marginBlockEnd",
|
|
307
|
+
"marginHorizontal",
|
|
308
|
+
"marginVertical",
|
|
309
|
+
"marginInline",
|
|
310
|
+
"marginBlock"
|
|
311
|
+
],
|
|
312
|
+
gap: ["rowGap", "columnGap"],
|
|
313
|
+
borderRadius: [
|
|
314
|
+
"borderTopLeftRadius",
|
|
315
|
+
"borderTopRightRadius",
|
|
316
|
+
"borderBottomLeftRadius",
|
|
317
|
+
"borderBottomRightRadius",
|
|
318
|
+
"borderTopStartRadius",
|
|
319
|
+
"borderTopEndRadius",
|
|
320
|
+
"borderBottomStartRadius",
|
|
321
|
+
"borderBottomEndRadius",
|
|
322
|
+
"borderStartStartRadius",
|
|
323
|
+
"borderStartEndRadius",
|
|
324
|
+
"borderEndStartRadius",
|
|
325
|
+
"borderEndEndRadius"
|
|
326
|
+
],
|
|
327
|
+
borderWidth: [
|
|
328
|
+
"borderTopWidth",
|
|
329
|
+
"borderRightWidth",
|
|
330
|
+
"borderBottomWidth",
|
|
331
|
+
"borderLeftWidth",
|
|
332
|
+
"borderStartWidth",
|
|
333
|
+
"borderEndWidth",
|
|
334
|
+
"borderInlineStartWidth",
|
|
335
|
+
"borderInlineEndWidth",
|
|
336
|
+
"borderBlockStartWidth",
|
|
337
|
+
"borderBlockEndWidth",
|
|
338
|
+
"borderInlineWidth",
|
|
339
|
+
"borderBlockWidth"
|
|
340
|
+
],
|
|
341
|
+
borderColor: [
|
|
342
|
+
"borderTopColor",
|
|
343
|
+
"borderRightColor",
|
|
344
|
+
"borderBottomColor",
|
|
345
|
+
"borderLeftColor",
|
|
346
|
+
"borderStartColor",
|
|
347
|
+
"borderEndColor",
|
|
348
|
+
"borderInlineStartColor",
|
|
349
|
+
"borderInlineEndColor",
|
|
350
|
+
"borderBlockStartColor",
|
|
351
|
+
"borderBlockEndColor",
|
|
352
|
+
"borderInlineColor",
|
|
353
|
+
"borderBlockColor"
|
|
354
|
+
]
|
|
355
|
+
};
|
|
356
|
+
function attachShorthandResets(entries, modifiers) {
|
|
357
|
+
if (isWeb || modifiers.length > 0) return entries;
|
|
358
|
+
const unsets = [];
|
|
359
|
+
for (let i = 0; i < entries.length; i++) {
|
|
360
|
+
const resets = shorthandResets[entries[i][0]];
|
|
361
|
+
if (!resets) continue;
|
|
362
|
+
for (let j = 0; j < resets.length; j++) unsets.push([resets[j], "unset"]);
|
|
363
|
+
}
|
|
364
|
+
return unsets.length === 0 ? entries : unsets.concat(entries);
|
|
365
|
+
}
|
|
366
|
+
function computeClassPlan(cls, grammarConfig) {
|
|
367
|
+
const groupMarker = /^group(?:\/([A-Za-z0-9_-]+))?$/.exec(cls);
|
|
368
|
+
if (groupMarker) return {
|
|
369
|
+
entries: [["group", groupMarker[1] || true]],
|
|
370
|
+
preserveRawClass: isWeb
|
|
371
|
+
};
|
|
372
|
+
const containerMarker = /^@container(-size)?(?:\/([A-Za-z0-9_-]+))?$/.exec(cls);
|
|
373
|
+
if (containerMarker) {
|
|
374
|
+
const isSize = containerMarker[1] !== void 0;
|
|
375
|
+
const name = containerMarker[2];
|
|
376
|
+
const entries = [];
|
|
377
|
+
entries.push(["container", name || true]);
|
|
378
|
+
if (isSize) entries.push(["containerType", "size"]);
|
|
379
|
+
return {
|
|
380
|
+
entries,
|
|
381
|
+
preserveRawClass: isWeb
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
const classification = classifyCandidate(cls, grammarConfig);
|
|
385
|
+
if (classification.kind === "passthrough") return isWeb ? "raw" : null;
|
|
386
|
+
const parsed = classification.parsed;
|
|
387
|
+
if (!nativeTarget && parsed.entry?.prop === "perspective") return "raw";
|
|
388
|
+
if (shouldGateNative(parsed)) return null;
|
|
389
|
+
if (parsed.entry?.prop === "flex" && parsed.rawValue) {
|
|
390
|
+
const fraction = /^(\d+)\/(\d+)$/.exec(parsed.rawValue);
|
|
391
|
+
if (fraction && Number(fraction[2]) !== 0) {
|
|
392
|
+
const basis = `${Number(fraction[1]) / Number(fraction[2]) * 100}%`;
|
|
393
|
+
const entries = [
|
|
394
|
+
createPlanEntry("flexGrow", 1, parsed.modifiers),
|
|
395
|
+
createPlanEntry("flexShrink", 1, parsed.modifiers),
|
|
396
|
+
createPlanEntry("flexBasis", basis, parsed.modifiers)
|
|
397
|
+
];
|
|
398
|
+
return entries.every(Boolean) ? entries : "raw";
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
const util = parsed.kind === "utility" ? parsed.properties : null;
|
|
402
|
+
if (util) {
|
|
403
|
+
const entries = [];
|
|
404
|
+
for (const p in util) {
|
|
405
|
+
const entry = createPlanEntry(p, nativeTarget && p === "transform" && util[p] === "none" ? [] : util[p], parsed.modifiers);
|
|
406
|
+
if (!entry) return "raw";
|
|
407
|
+
entries.push(entry);
|
|
408
|
+
}
|
|
409
|
+
return attachShorthandResets(entries, parsed.modifiers);
|
|
410
|
+
}
|
|
411
|
+
const expandedProps = expansionProps(parsed);
|
|
412
|
+
if (expandedProps) {
|
|
413
|
+
const entries = [];
|
|
414
|
+
for (const prop of expandedProps) {
|
|
415
|
+
const flatProp2 = tailwindClassToFlatProp({
|
|
416
|
+
...parsed,
|
|
417
|
+
entry: parsed.entry ? {
|
|
418
|
+
...parsed.entry,
|
|
419
|
+
prop
|
|
420
|
+
} : parsed.entry
|
|
421
|
+
}, grammarConfig);
|
|
422
|
+
if (!flatProp2) return "raw";
|
|
423
|
+
const entry = createPlanEntry(flatProp2.key, flatProp2.value, parsed.modifiers);
|
|
424
|
+
if (!entry) return "raw";
|
|
425
|
+
entries.push(entry);
|
|
426
|
+
}
|
|
427
|
+
return attachShorthandResets(entries, parsed.modifiers);
|
|
428
|
+
}
|
|
429
|
+
const flatProp = tailwindClassToFlatProp(parsed, grammarConfig);
|
|
430
|
+
if (flatProp) {
|
|
431
|
+
const entry = createPlanEntry(flatProp.key, flatProp.value, parsed.modifiers);
|
|
432
|
+
return entry ? attachShorthandResets([entry], parsed.modifiers) : "raw";
|
|
433
|
+
}
|
|
434
|
+
return "raw";
|
|
435
|
+
}
|
|
436
|
+
function getTailwindClassPlan(candidate, config) {
|
|
437
|
+
const grammarConfig = getStyleGrammarConfig(config);
|
|
438
|
+
const plans = getClassPlanCache(grammarConfig);
|
|
439
|
+
let plan = plans.get(candidate);
|
|
440
|
+
if (plan === void 0) {
|
|
441
|
+
plan = computeClassPlan(candidate, grammarConfig);
|
|
442
|
+
plans.set(candidate, plan);
|
|
443
|
+
}
|
|
444
|
+
return plan;
|
|
445
|
+
}
|
|
446
|
+
function resolveTailwindCandidate(candidate, config, sink) {
|
|
447
|
+
const composed = tryCompose(candidate, getStyleGrammarConfig(config), sink);
|
|
448
|
+
if (composed !== void 0) return composed;
|
|
449
|
+
const plan = getTailwindClassPlan(candidate, config);
|
|
450
|
+
if (plan === "raw") return true;
|
|
451
|
+
if (plan === null) return null;
|
|
452
|
+
const parent = Array.isArray(plan) ? null : plan;
|
|
453
|
+
const entries = parent ? parent.entries : plan;
|
|
454
|
+
for (let index = 0; index < entries.length; index++) {
|
|
455
|
+
const entry = entries[index];
|
|
456
|
+
const transformTokenCategory = entry[0] === "x" || entry[0] === "y" ? "space" : entry[0] === "perspective" ? "perspective" : null;
|
|
457
|
+
const transformValue = transformTokenCategory && typeof entry[1] === "string" ? config.tokensParsed?.[transformTokenCategory]?.[entry[1]]?.val ?? entry[1] : entry[1];
|
|
458
|
+
if (noteTailwindTransform(sink, [
|
|
459
|
+
entry[0],
|
|
460
|
+
transformValue,
|
|
461
|
+
entry[2],
|
|
462
|
+
entry[3]
|
|
463
|
+
])) continue;
|
|
464
|
+
if (entry[0] === "boxShadow" && typeof entry[1] === "string") noteBoxShadow(sink, config.tokensParsed?.boxShadow?.[entry[1]]?.val ?? entry[1], entry[3] || []);
|
|
465
|
+
sink(entry);
|
|
466
|
+
}
|
|
467
|
+
return parent?.preserveRawClass || false;
|
|
468
|
+
}
|
|
469
|
+
function resolveTailwindClassName(className, config) {
|
|
470
|
+
const result = {};
|
|
471
|
+
let composedProps = null;
|
|
472
|
+
let rawClassName = "";
|
|
473
|
+
const sink = (entry) => {
|
|
474
|
+
const [key, value, condition] = entry;
|
|
475
|
+
if (key.charCodeAt(0) === 95 && key.charCodeAt(1) === 95) {
|
|
476
|
+
composedProps ||= {};
|
|
477
|
+
composedProps[key] = mergeFrontendCondition(composedProps[key], value, condition);
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
if (condition === void 0) {
|
|
481
|
+
const resets = shorthandResets[key];
|
|
482
|
+
if (resets) for (let i = 0; i < resets.length; i++) delete result[resets[i]];
|
|
483
|
+
}
|
|
484
|
+
setInAuthoredOrder(result, key, mergeFrontendCondition(result[key], value, condition));
|
|
485
|
+
};
|
|
486
|
+
let start = 0;
|
|
487
|
+
for (let index = 0; index <= className.length; index++) {
|
|
488
|
+
if (index !== className.length && className.charCodeAt(index) > 32) continue;
|
|
489
|
+
if (start === index) {
|
|
490
|
+
start = index + 1;
|
|
491
|
+
continue;
|
|
492
|
+
}
|
|
493
|
+
const candidate = className.slice(start, index);
|
|
494
|
+
if (resolveTailwindCandidate(candidate, config, sink)) rawClassName = rawClassName ? `${rawClassName} ${candidate}` : candidate;
|
|
495
|
+
start = index + 1;
|
|
496
|
+
}
|
|
497
|
+
if (composedProps) {
|
|
498
|
+
const composed = composedResolver(composedProps);
|
|
499
|
+
for (const key in composed) setInAuthoredOrder(result, key, composed[key]);
|
|
500
|
+
}
|
|
501
|
+
if (rawClassName) result.className = rawClassName;
|
|
502
|
+
return result;
|
|
503
|
+
}
|
|
504
|
+
function setInAuthoredOrder(target, key, value) {
|
|
505
|
+
if (value === "unset") {
|
|
506
|
+
delete target[key];
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
if (key in target) delete target[key];
|
|
510
|
+
target[key] = value;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export { getStyleGrammarConfig, getTailwindClassPlan, isTokenValueProp, resolveTailwindCandidate, resolveTailwindClassName, setInAuthoredOrder };
|
|
514
|
+
//# sourceMappingURL=candidate.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candidate.js","names":[],"sources":["esm/candidate.js"],"sourcesContent":["import { isWeb } from \"@tamagui/constants\";\nimport { stylePropsUnitless } from \"@tamagui/helpers\";\nimport { mergeFrontendCondition, plainValueToPayload } from \"@tamagui/core/internal-runtime\";\nimport { noteBoxShadow, noteTailwindTransform, tryCompose } from \"./compose\";\nimport { composedResolver } from \"./composedResolver\";\nimport { borderSideSuffix, configRevisionSymbol, createGrammarConfigView, getSafeAreaEdge, getTokenCategory, insetAxisProps, percentUtilityProps, radiusCornerProps, sizeUtilityProps, splitColorOpacitySuffix } from \"@tamagui/style-grammar/runtime\";\nimport { classifyCandidate, decodeArbitrary, resolveTokenName } from \"@tamagui/style-grammar/tooling/candidate\";\n\nconst styleGrammarConfigCache = /* @__PURE__ */ new WeakMap();\nfunction getStyleGrammarConfig(config) {\n\tconst cached = styleGrammarConfigCache.get(config);\n\tconst revision = config[configRevisionSymbol]?.revision || 0;\n\tif (cached && cached.revision === revision) return cached.value;\n\tconst view = createGrammarConfigView(config);\n\tstyleGrammarConfigCache.set(config, {\n\t\trevision,\n\t\tvalue: view\n\t});\n\treturn view;\n}\nfunction isTokenValueProp(prop) {\n\treturn getTokenCategory(prop) !== null;\n}\nfunction arbitraryValue(inner, prop) {\n\tconst px = /^(-?\\d*\\.?\\d+)px$/.exec(inner);\n\tif (px) return prop && stylePropsUnitless[prop] ? inner : Number(px[1]);\n\tif (/^-?\\d*\\.?\\d+$/.test(inner)) return Number(inner);\n\treturn inner;\n}\nfunction unwrapArbitraryValue(raw) {\n\treturn arbitraryValue(raw.length > 1 && raw[0] === \"[\" && raw[raw.length - 1] === \"]\" ? decodeArbitrary(raw.slice(1, -1)) : raw);\n}\nfunction tailwindSizingValue(prop, value) {\n\tif (value === \"full\") return \"100%\";\n\tif (value === \"auto\") return \"auto\";\n\tif (value === \"screen\") return /[Hh]eight|[Bb]lock/.test(prop) ? \"100vh\" : \"100vw\";\n\tif (value === \"min\") return \"min-content\";\n\tif (value === \"max\") return \"max-content\";\n\tif (value === \"fit\") return \"fit-content\";\n\tconst frac = /^(\\d+)\\/(\\d+)$/.exec(value);\n\tif (frac && Number(frac[2]) !== 0) return `${Number(frac[1]) / Number(frac[2]) * 100}%`;\n\treturn null;\n}\nfunction expansionProps(parsed) {\n\tconst prefix = parsed.prefix;\n\tif (!prefix) return null;\n\tif (prefix === \"size\") return sizeUtilityProps;\n\tif (prefix === \"translate\") return [\"x\", \"y\"];\n\tif (prefix === \"skew\") return [\"skewX\", \"skewY\"];\n\tif (prefix === \"inset-x\" || prefix === \"inset-y\") return insetAxisProps[prefix.slice(6)];\n\tif (prefix.startsWith(\"rounded-\")) {\n\t\tconst props = radiusCornerProps[prefix.slice(8)];\n\t\tif (!props || props.length === 1) return null;\n\t\treturn props;\n\t}\n\tconst m = /^border-([trblxy])$/.exec(prefix);\n\tif (!m) return null;\n\tconst sides = borderSideSuffix[m[1]];\n\tconst suffix = parsed.entry?.prop.endsWith(\"Width\") ? \"Width\" : \"Color\";\n\treturn sides.map((side) => `border${side}${suffix}`);\n}\nfunction tailwindClassToFlatProp(parsed, grammarConfig) {\n\tif (parsed.kind !== \"dynamic\" || !parsed.entry || parsed.rawValue === void 0) return null;\n\tconst prop = parsed.entry.prop;\n\tconst category = parsed.entry.tokenCategory;\n\tlet value = parsed.rawValue;\n\tif (parsed.negative && value === \"0\" && parsed.convenience !== \"angle\") return {\n\t\tkey: prop,\n\t\tvalue: 0\n\t};\n\tif (parsed.convenience === \"zero\") return {\n\t\tkey: prop,\n\t\tvalue: 0\n\t};\n\tif (parsed.convenience === \"angle\") return {\n\t\tkey: prop,\n\t\tvalue: `${parsed.negative ? \"-\" : \"\"}${value}deg`\n\t};\n\tif ((prop === \"x\" || prop === \"y\") && parsed.valueKind !== \"token\") {\n\t\tconst sized = tailwindSizingValue(prop, value);\n\t\tif (sized != null) return {\n\t\t\tkey: prop,\n\t\t\tvalue: parsed.negative && sized[0] !== \"-\" ? `-${sized}` : sized\n\t\t};\n\t}\n\tif (prop === \"lineHeight\" && /^\\d+(?:\\.\\d+)?$/.test(value)) return {\n\t\tkey: prop,\n\t\tvalue: Number(value) * 4\n\t};\n\tif (prop === \"gridTemplateColumns\" && /^\\d+$/.test(value)) return {\n\t\tkey: prop,\n\t\tvalue: `repeat(${value}, minmax(0, 1fr))`\n\t};\n\tif (prop === \"gridColumn\" && /^\\d+$/.test(value)) return {\n\t\tkey: prop,\n\t\tvalue: `span ${value} / span ${value}`\n\t};\n\tif (prop === \"gridRow\" && /^\\d+$/.test(value)) return {\n\t\tkey: prop,\n\t\tvalue: `span ${value} / span ${value}`\n\t};\n\tif ((prop === \"gridColumnStart\" || prop === \"gridColumnEnd\" || prop === \"gridRowStart\" || prop === \"gridRowEnd\") && /^\\d+$/.test(value)) return {\n\t\tkey: prop,\n\t\tvalue: Number(value)\n\t};\n\tif (prop.endsWith(\"Width\") && parsed.prefix?.startsWith(\"border\")) {\n\t\tif (parsed.valueKind === \"token\") {\n\t\t\tvalue = `${parsed.negative ? \"-\" : \"\"}${value}`;\n\t\t\tif (grammarConfig && parsed.entry?.tokenCategory) value = resolveTokenName(grammarConfig, parsed.entry.tokenCategory, value) ?? value;\n\t\t} else if (parsed.valueKind === \"arbitrary\") value = unwrapArbitraryValue(value);\n\t\telse return null;\n\t\treturn {\n\t\t\tkey: prop,\n\t\t\tvalue\n\t\t};\n\t}\n\tif (prop === \"fontFamily\") {\n\t\tlet famValue;\n\t\tif (value.length > 2 && value[0] === \"[\" && value[value.length - 1] === \"]\") famValue = decodeArbitrary(value.slice(1, -1));\n\t\telse famValue = parsed.valueKind === \"token\" ? value : {\n\t\t\tsans: \"sans-serif\",\n\t\t\tserif: \"serif\",\n\t\t\tmono: \"monospace\"\n\t\t}[value] || value;\n\t\treturn {\n\t\t\tkey: \"fontFamily\",\n\t\t\tvalue: famValue\n\t\t};\n\t}\n\tif (prop === \"fontSize\") {\n\t\tlet fsValue;\n\t\tif (value.length > 2 && value[0] === \"[\" && value[value.length - 1] === \"]\") fsValue = arbitraryValue(decodeArbitrary(value.slice(1, -1)));\n\t\telse fsValue = value;\n\t\treturn {\n\t\t\tkey: \"fontSize\",\n\t\t\tvalue: fsValue\n\t\t};\n\t}\n\tif (prop === \"lineHeight\") {\n\t\tlet lhValue;\n\t\tif (value.length > 2 && value[0] === \"[\" && value[value.length - 1] === \"]\") {\n\t\t\tconst inner = decodeArbitrary(value.slice(1, -1));\n\t\t\tlhValue = /^-?\\d*\\.?\\d+px$/.test(inner) ? Number.parseFloat(inner) : inner;\n\t\t} else lhValue = value;\n\t\treturn {\n\t\t\tkey: \"lineHeight\",\n\t\t\tvalue: lhValue\n\t\t};\n\t}\n\tif (prop === \"letterSpacing\") {\n\t\tlet lsValue;\n\t\tif (value.length > 2 && value[0] === \"[\" && value[value.length - 1] === \"]\") lsValue = arbitraryValue(decodeArbitrary(value.slice(1, -1)));\n\t\telse lsValue = value;\n\t\treturn {\n\t\t\tkey: \"letterSpacing\",\n\t\t\tvalue: lsValue\n\t\t};\n\t}\n\tif (prop === \"boxShadow\" && value[0] === \"[\" && value[value.length - 1] === \"]\") return {\n\t\tkey: \"boxShadow\",\n\t\tvalue: decodeArbitrary(value.slice(1, -1))\n\t};\n\tif (value.length > 2 && value[0] === \"[\" && value[value.length - 1] === \"]\") {\n\t\tconst inner = decodeArbitrary(value.slice(1, -1));\n\t\tif (inner === \"\") return null;\n\t\tlet resolved = arbitraryValue(inner, prop);\n\t\tif ((prop === \"rotate\" || prop === \"rotateX\" || prop === \"rotateY\" || prop === \"rotateZ\" || prop === \"skewX\" || prop === \"skewY\") && typeof resolved === \"number\") resolved = `${resolved}deg`;\n\t\tif (parsed.negative) {\n\t\t\tif (typeof resolved === \"number\") resolved = -resolved;\n\t\t\telse if (resolved[0] !== \"-\") resolved = `-${resolved}`;\n\t\t}\n\t\treturn {\n\t\t\tkey: prop,\n\t\t\tvalue: resolved\n\t\t};\n\t}\n\tif (parsed.valueKind !== \"token\" && (category === \"size\" || parsed.convenience === \"sizing-keyword\")) {\n\t\tconst sized = tailwindSizingValue(prop, value);\n\t\tif (sized != null) return {\n\t\t\tkey: prop,\n\t\t\tvalue: parsed.negative && sized[0] !== \"-\" ? `-${sized}` : sized\n\t\t};\n\t}\n\tlet opacitySuffix = \"\";\n\tif (category === \"color\" && typeof value === \"string\") {\n\t\tconst suffix = splitColorOpacitySuffix(value);\n\t\tif (suffix.kind === \"invalid\") return {\n\t\t\tkey: prop,\n\t\t\tvalue\n\t\t};\n\t\tif (suffix.kind === \"valid\") {\n\t\t\topacitySuffix = value.slice(suffix.name.length);\n\t\t\tvalue = suffix.name;\n\t\t}\n\t}\n\tif (percentUtilityProps.has(prop) && /^\\d+$/.test(value)) value = Number(value) / 100;\n\telse if (/^\\d+(\\.\\d+)?$/.test(value)) if (category === \"zIndex\" && parsed.valueKind === \"convenience\") value = Number(value) * (parsed.negative ? -1 : 1);\n\telse if (category) {\n\t\tvalue = `${parsed.negative ? \"-\" : \"\"}${value}`;\n\t\tif (grammarConfig) value = resolveTokenName(grammarConfig, category, value) ?? value;\n\t} else value = Number(value);\n\telse if (typeof value === \"string\") {\n\t\tif (category && !((category === \"space\" || category === \"size\" || category === \"radius\") && getSafeAreaEdge(value))) value = `${parsed.negative ? \"-\" : \"\"}${value}`;\n\t}\n\tif (opacitySuffix && typeof value === \"string\") value = `${value}${opacitySuffix}`;\n\tif (parsed.negative && !category) {\n\t\tif (typeof value === \"number\") value = -value;\n\t\telse if (typeof value === \"string\" && value[0] !== \"-\") value = `-${value}`;\n\t}\n\treturn {\n\t\tkey: prop,\n\t\tvalue\n\t};\n}\nconst classPlanCache = /* @__PURE__ */ new WeakMap();\nconst nativeTarget = !isWeb || false;\nconst cssGridProps = /* @__PURE__ */ new Set([\n\t\"gridTemplateColumns\",\n\t\"gridColumn\",\n\t\"gridColumnStart\",\n\t\"gridColumnEnd\",\n\t\"gridRow\",\n\t\"gridRowStart\",\n\t\"gridRowEnd\"\n]);\nconst nativeUnsupportedProps = /* @__PURE__ */ new Set([\n\t\"objectFit\",\n\t\"order\",\n\t\"overflowX\",\n\t\"overflowY\",\n\t\"textOverflow\",\n\t\"whiteSpace\",\n\t\"visibility\"\n]);\nconst nativeUnsupportedSizingValues = /* @__PURE__ */ new Set([\n\t\"screen\",\n\t\"min\",\n\t\"max\",\n\t\"fit\"\n]);\nconst nativeUnsupportedDisplayValues = /* @__PURE__ */ new Set([\n\t\"block\",\n\t\"inline\",\n\t\"inline-flex\"\n]);\nconst nativeUnsupportedPositionValues = /* @__PURE__ */ new Set([\"fixed\", \"sticky\"]);\nfunction shouldGateNative(parsed) {\n\tif (!nativeTarget) return false;\n\tconst properties = parsed.properties || {};\n\tif (process.env.TAMAGUI_CSS_GRID !== \"1\" && (parsed.entry && cssGridProps.has(parsed.entry.prop) || properties.display === \"grid\" || Object.keys(properties).some((prop) => cssGridProps.has(prop)))) return true;\n\tif (parsed.entry && nativeUnsupportedProps.has(parsed.entry.prop) || Object.keys(properties).some((prop) => nativeUnsupportedProps.has(prop))) return true;\n\tif (parsed.convenience === \"sizing-keyword\" && nativeUnsupportedSizingValues.has(parsed.rawValue || \"\")) return true;\n\treturn nativeUnsupportedDisplayValues.has(String(properties.display)) || nativeUnsupportedPositionValues.has(String(properties.position)) || properties.overflow === \"auto\" || properties.cursor !== void 0 && properties.cursor !== \"auto\" && properties.cursor !== \"pointer\";\n}\nfunction getClassPlanCache(grammarConfig) {\n\tlet cache = classPlanCache.get(grammarConfig);\n\tif (!cache) {\n\t\tcache = /* @__PURE__ */ new Map();\n\t\tclassPlanCache.set(grammarConfig, cache);\n\t}\n\treturn cache;\n}\nfunction createPlanEntry(property, value, modifiers) {\n\tif (modifiers.length === 0) return [property, value];\n\tconst payload = plainValueToPayload(value, property);\n\tif (payload === null) return null;\n\tlet condition = \"\";\n\tfor (let index = 0; index < modifiers.length; index++) {\n\t\tif (index) condition += \":\";\n\t\tcondition += modifiers[index];\n\t}\n\treturn [\n\t\tproperty,\n\t\tpayload,\n\t\tcondition,\n\t\tmodifiers\n\t];\n}\nconst shorthandResets = {\n\tpadding: [\n\t\t\"paddingTop\",\n\t\t\"paddingRight\",\n\t\t\"paddingBottom\",\n\t\t\"paddingLeft\",\n\t\t\"paddingStart\",\n\t\t\"paddingEnd\",\n\t\t\"paddingInlineStart\",\n\t\t\"paddingInlineEnd\",\n\t\t\"paddingBlockStart\",\n\t\t\"paddingBlockEnd\",\n\t\t\"paddingHorizontal\",\n\t\t\"paddingVertical\",\n\t\t\"paddingInline\",\n\t\t\"paddingBlock\"\n\t],\n\tmargin: [\n\t\t\"marginTop\",\n\t\t\"marginRight\",\n\t\t\"marginBottom\",\n\t\t\"marginLeft\",\n\t\t\"marginStart\",\n\t\t\"marginEnd\",\n\t\t\"marginInlineStart\",\n\t\t\"marginInlineEnd\",\n\t\t\"marginBlockStart\",\n\t\t\"marginBlockEnd\",\n\t\t\"marginHorizontal\",\n\t\t\"marginVertical\",\n\t\t\"marginInline\",\n\t\t\"marginBlock\"\n\t],\n\tgap: [\"rowGap\", \"columnGap\"],\n\tborderRadius: [\n\t\t\"borderTopLeftRadius\",\n\t\t\"borderTopRightRadius\",\n\t\t\"borderBottomLeftRadius\",\n\t\t\"borderBottomRightRadius\",\n\t\t\"borderTopStartRadius\",\n\t\t\"borderTopEndRadius\",\n\t\t\"borderBottomStartRadius\",\n\t\t\"borderBottomEndRadius\",\n\t\t\"borderStartStartRadius\",\n\t\t\"borderStartEndRadius\",\n\t\t\"borderEndStartRadius\",\n\t\t\"borderEndEndRadius\"\n\t],\n\tborderWidth: [\n\t\t\"borderTopWidth\",\n\t\t\"borderRightWidth\",\n\t\t\"borderBottomWidth\",\n\t\t\"borderLeftWidth\",\n\t\t\"borderStartWidth\",\n\t\t\"borderEndWidth\",\n\t\t\"borderInlineStartWidth\",\n\t\t\"borderInlineEndWidth\",\n\t\t\"borderBlockStartWidth\",\n\t\t\"borderBlockEndWidth\",\n\t\t\"borderInlineWidth\",\n\t\t\"borderBlockWidth\"\n\t],\n\tborderColor: [\n\t\t\"borderTopColor\",\n\t\t\"borderRightColor\",\n\t\t\"borderBottomColor\",\n\t\t\"borderLeftColor\",\n\t\t\"borderStartColor\",\n\t\t\"borderEndColor\",\n\t\t\"borderInlineStartColor\",\n\t\t\"borderInlineEndColor\",\n\t\t\"borderBlockStartColor\",\n\t\t\"borderBlockEndColor\",\n\t\t\"borderInlineColor\",\n\t\t\"borderBlockColor\"\n\t]\n};\nfunction attachShorthandResets(entries, modifiers) {\n\tif (isWeb || modifiers.length > 0) return entries;\n\tconst unsets = [];\n\tfor (let i = 0; i < entries.length; i++) {\n\t\tconst resets = shorthandResets[entries[i][0]];\n\t\tif (!resets) continue;\n\t\tfor (let j = 0; j < resets.length; j++) unsets.push([resets[j], \"unset\"]);\n\t}\n\treturn unsets.length === 0 ? entries : unsets.concat(entries);\n}\nfunction computeClassPlan(cls, grammarConfig) {\n\tconst groupMarker = /^group(?:\\/([A-Za-z0-9_-]+))?$/.exec(cls);\n\tif (groupMarker) return {\n\t\tentries: [[\"group\", groupMarker[1] || true]],\n\t\tpreserveRawClass: isWeb\n\t};\n\tconst containerMarker = /^@container(-size)?(?:\\/([A-Za-z0-9_-]+))?$/.exec(cls);\n\tif (containerMarker) {\n\t\tconst isSize = containerMarker[1] !== void 0;\n\t\tconst name = containerMarker[2];\n\t\tconst entries = [];\n\t\tentries.push([\"container\", name || true]);\n\t\tif (isSize) entries.push([\"containerType\", \"size\"]);\n\t\treturn {\n\t\t\tentries,\n\t\t\tpreserveRawClass: isWeb\n\t\t};\n\t}\n\tconst classification = classifyCandidate(cls, grammarConfig);\n\tif (classification.kind === \"passthrough\") return isWeb ? \"raw\" : null;\n\tconst parsed = classification.parsed;\n\tif (!nativeTarget && parsed.entry?.prop === \"perspective\") return \"raw\";\n\tif (shouldGateNative(parsed)) return null;\n\tif (parsed.entry?.prop === \"flex\" && parsed.rawValue) {\n\t\tconst fraction = /^(\\d+)\\/(\\d+)$/.exec(parsed.rawValue);\n\t\tif (fraction && Number(fraction[2]) !== 0) {\n\t\t\tconst basis = `${Number(fraction[1]) / Number(fraction[2]) * 100}%`;\n\t\t\tconst entries = [\n\t\t\t\tcreatePlanEntry(\"flexGrow\", 1, parsed.modifiers),\n\t\t\t\tcreatePlanEntry(\"flexShrink\", 1, parsed.modifiers),\n\t\t\t\tcreatePlanEntry(\"flexBasis\", basis, parsed.modifiers)\n\t\t\t];\n\t\t\treturn entries.every(Boolean) ? entries : \"raw\";\n\t\t}\n\t}\n\tconst util = parsed.kind === \"utility\" ? parsed.properties : null;\n\tif (util) {\n\t\tconst entries = [];\n\t\tfor (const p in util) {\n\t\t\tconst entry = createPlanEntry(p, nativeTarget && p === \"transform\" && util[p] === \"none\" ? [] : util[p], parsed.modifiers);\n\t\t\tif (!entry) return \"raw\";\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn attachShorthandResets(entries, parsed.modifiers);\n\t}\n\tconst expandedProps = expansionProps(parsed);\n\tif (expandedProps) {\n\t\tconst entries = [];\n\t\tfor (const prop of expandedProps) {\n\t\t\tconst flatProp2 = tailwindClassToFlatProp({\n\t\t\t\t...parsed,\n\t\t\t\tentry: parsed.entry ? {\n\t\t\t\t\t...parsed.entry,\n\t\t\t\t\tprop\n\t\t\t\t} : parsed.entry\n\t\t\t}, grammarConfig);\n\t\t\tif (!flatProp2) return \"raw\";\n\t\t\tconst entry = createPlanEntry(flatProp2.key, flatProp2.value, parsed.modifiers);\n\t\t\tif (!entry) return \"raw\";\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn attachShorthandResets(entries, parsed.modifiers);\n\t}\n\tconst flatProp = tailwindClassToFlatProp(parsed, grammarConfig);\n\tif (flatProp) {\n\t\tconst entry = createPlanEntry(flatProp.key, flatProp.value, parsed.modifiers);\n\t\treturn entry ? attachShorthandResets([entry], parsed.modifiers) : \"raw\";\n\t}\n\treturn \"raw\";\n}\nfunction getTailwindClassPlan(candidate, config) {\n\tconst grammarConfig = getStyleGrammarConfig(config);\n\tconst plans = getClassPlanCache(grammarConfig);\n\tlet plan = plans.get(candidate);\n\tif (plan === void 0) {\n\t\tplan = computeClassPlan(candidate, grammarConfig);\n\t\tplans.set(candidate, plan);\n\t}\n\treturn plan;\n}\nfunction resolveTailwindCandidate(candidate, config, sink) {\n\tconst composed = tryCompose(candidate, getStyleGrammarConfig(config), sink);\n\tif (composed !== void 0) return composed;\n\tconst plan = getTailwindClassPlan(candidate, config);\n\tif (plan === \"raw\") return true;\n\tif (plan === null) return null;\n\tconst parent = Array.isArray(plan) ? null : plan;\n\tconst entries = parent ? parent.entries : plan;\n\tfor (let index = 0; index < entries.length; index++) {\n\t\tconst entry = entries[index];\n\t\tconst transformTokenCategory = entry[0] === \"x\" || entry[0] === \"y\" ? \"space\" : entry[0] === \"perspective\" ? \"perspective\" : null;\n\t\tconst transformValue = transformTokenCategory && typeof entry[1] === \"string\" ? config.tokensParsed?.[transformTokenCategory]?.[entry[1]]?.val ?? entry[1] : entry[1];\n\t\tif (noteTailwindTransform(sink, [\n\t\t\tentry[0],\n\t\t\ttransformValue,\n\t\t\tentry[2],\n\t\t\tentry[3]\n\t\t])) continue;\n\t\tif (entry[0] === \"boxShadow\" && typeof entry[1] === \"string\") noteBoxShadow(sink, config.tokensParsed?.boxShadow?.[entry[1]]?.val ?? entry[1], entry[3] || []);\n\t\tsink(entry);\n\t}\n\treturn parent?.preserveRawClass || false;\n}\nfunction resolveTailwindClassName(className, config) {\n\tconst result = {};\n\tlet composedProps = null;\n\tlet rawClassName = \"\";\n\tconst sink = (entry) => {\n\t\tconst [key, value, condition] = entry;\n\t\tif (key.charCodeAt(0) === 95 && key.charCodeAt(1) === 95) {\n\t\t\tcomposedProps ||= {};\n\t\t\tcomposedProps[key] = mergeFrontendCondition(composedProps[key], value, condition);\n\t\t\treturn;\n\t\t}\n\t\tif (condition === void 0) {\n\t\t\tconst resets = shorthandResets[key];\n\t\t\tif (resets) for (let i = 0; i < resets.length; i++) delete result[resets[i]];\n\t\t}\n\t\tsetInAuthoredOrder(result, key, mergeFrontendCondition(result[key], value, condition));\n\t};\n\tlet start = 0;\n\tfor (let index = 0; index <= className.length; index++) {\n\t\tif (index !== className.length && className.charCodeAt(index) > 32) continue;\n\t\tif (start === index) {\n\t\t\tstart = index + 1;\n\t\t\tcontinue;\n\t\t}\n\t\tconst candidate = className.slice(start, index);\n\t\tif (resolveTailwindCandidate(candidate, config, sink)) rawClassName = rawClassName ? `${rawClassName} ${candidate}` : candidate;\n\t\tstart = index + 1;\n\t}\n\tif (composedProps) {\n\t\tconst composed = composedResolver(composedProps);\n\t\tfor (const key in composed) setInAuthoredOrder(result, key, composed[key]);\n\t}\n\tif (rawClassName) result.className = rawClassName;\n\treturn result;\n}\nfunction setInAuthoredOrder(target, key, value) {\n\tif (value === \"unset\") {\n\t\tdelete target[key];\n\t\treturn;\n\t}\n\tif (key in target) delete target[key];\n\ttarget[key] = value;\n}\n\nexport { getStyleGrammarConfig, getTailwindClassPlan, isTokenValueProp, resolveTailwindCandidate, resolveTailwindClassName, setInAuthoredOrder };"],"mappings":";;;;;;;;;AAQA,MAAM,0CAA0C,IAAI,QAAQ;AAC5D,SAAS,sBAAsB,QAAQ;CACtC,MAAM,SAAS,wBAAwB,IAAI,MAAM;CACjD,MAAM,WAAW,OAAO,qBAAqB,EAAE,YAAY;CAC3D,IAAI,UAAU,OAAO,aAAa,UAAU,OAAO,OAAO;CAC1D,MAAM,OAAO,wBAAwB,MAAM;CAC3C,wBAAwB,IAAI,QAAQ;EACnC;EACA,OAAO;CACR,CAAC;CACD,OAAO;AACR;AACA,SAAS,iBAAiB,MAAM;CAC/B,OAAO,iBAAiB,IAAI,MAAM;AACnC;AACA,SAAS,eAAe,OAAO,MAAM;CACpC,MAAM,KAAK,oBAAoB,KAAK,KAAK;CACzC,IAAI,IAAI,OAAO,QAAQ,mBAAmB,QAAQ,QAAQ,OAAO,GAAG,EAAE;CACtE,IAAI,gBAAgB,KAAK,KAAK,GAAG,OAAO,OAAO,KAAK;CACpD,OAAO;AACR;AACA,SAAS,qBAAqB,KAAK;CAClC,OAAO,eAAe,IAAI,SAAS,KAAK,IAAI,OAAO,OAAO,IA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