@tamagui/tailwind 3.0.0-beta.924.1 → 3.0.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.
Files changed (56) hide show
  1. package/dist/cjs/candidate.cjs +312 -137
  2. package/dist/cjs/candidate.native.cjs +342 -153
  3. package/dist/cjs/candidate.native.js +342 -153
  4. package/dist/cjs/candidate.native.js.map +1 -1
  5. package/dist/cjs/compose.cjs +383 -0
  6. package/dist/cjs/compose.native.cjs +389 -0
  7. package/dist/cjs/compose.native.js +391 -0
  8. package/dist/cjs/compose.native.js.map +1 -0
  9. package/dist/cjs/composedResolver.cjs +226 -0
  10. package/dist/cjs/composedResolver.native.cjs +255 -0
  11. package/dist/cjs/composedResolver.native.js +257 -0
  12. package/dist/cjs/composedResolver.native.js.map +1 -0
  13. package/dist/cjs/frontend.cjs +4 -11
  14. package/dist/cjs/frontend.native.cjs +5 -16
  15. package/dist/cjs/frontend.native.js +5 -16
  16. package/dist/cjs/frontend.native.js.map +1 -1
  17. package/dist/cjs/index.cjs +2 -0
  18. package/dist/cjs/index.native.cjs +2 -0
  19. package/dist/cjs/index.native.js +2 -0
  20. package/dist/cjs/index.native.js.map +1 -1
  21. package/dist/esm/candidate.mjs +314 -140
  22. package/dist/esm/candidate.mjs.map +1 -1
  23. package/dist/esm/candidate.native.js +344 -156
  24. package/dist/esm/candidate.native.js.map +1 -1
  25. package/dist/esm/compose.mjs +359 -0
  26. package/dist/esm/compose.mjs.map +1 -0
  27. package/dist/esm/compose.native.js +363 -0
  28. package/dist/esm/compose.native.js.map +1 -0
  29. package/dist/esm/composedResolver.mjs +206 -0
  30. package/dist/esm/composedResolver.mjs.map +1 -0
  31. package/dist/esm/composedResolver.native.js +233 -0
  32. package/dist/esm/composedResolver.native.js.map +1 -0
  33. package/dist/esm/frontend.mjs +4 -11
  34. package/dist/esm/frontend.mjs.map +1 -1
  35. package/dist/esm/frontend.native.js +5 -16
  36. package/dist/esm/frontend.native.js.map +1 -1
  37. package/dist/esm/index.mjs +3 -2
  38. package/dist/esm/index.mjs.map +1 -1
  39. package/dist/esm/index.native.js +3 -2
  40. package/dist/esm/index.native.js.map +1 -1
  41. package/package.json +18 -15
  42. package/src/candidate.ts +396 -60
  43. package/src/frontend.ts +3 -16
  44. package/src/index.tsx +14 -2
  45. package/src/types.ts +32 -4
  46. package/types/candidate.d.ts +2 -1
  47. package/types/candidate.d.ts.map +1 -1
  48. package/types/compose.d.ts +19 -0
  49. package/types/compose.d.ts.map +1 -0
  50. package/types/composedResolver.d.ts +19 -0
  51. package/types/composedResolver.d.ts.map +1 -0
  52. package/types/frontend.d.ts.map +1 -1
  53. package/types/index.d.ts +11 -1
  54. package/types/index.d.ts.map +1 -1
  55. package/types/types.d.ts +18 -3
  56. package/types/types.d.ts.map +1 -1
@@ -0,0 +1,255 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var composedResolver_exports = {};
24
+ __export(composedResolver_exports, { composedResolver: () => composedResolver });
25
+ module.exports = __toCommonJS(composedResolver_exports);
26
+ function compose(props, keys, build) {
27
+ var conditions = null;
28
+ var present = false;
29
+ for (var index = 0; index < keys.length; index++) {
30
+ var value = props[keys[index]];
31
+ if (value == null) continue;
32
+ present = true;
33
+ if (typeof value === "object" && !Array.isArray(value)) {
34
+ conditions || (conditions = /* @__PURE__ */ new Set());
35
+ for (var condition in value) conditions.add(condition);
36
+ }
37
+ }
38
+ if (!present) return null;
39
+ if (!conditions) return build(function(key) {
40
+ return props[key];
41
+ });
42
+ conditions.add("default");
43
+ var result = {};
44
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
45
+ try {
46
+ var _loop = function() {
47
+ var condition2 = _step.value;
48
+ var value2 = build(function(key) {
49
+ var raw = props[key];
50
+ var _raw_condition;
51
+ return raw && typeof raw === "object" && !Array.isArray(raw) ? (_raw_condition = raw[condition2]) !== null && _raw_condition !== void 0 ? _raw_condition : raw.default : raw;
52
+ });
53
+ if (value2 != null && value2 !== "") result[condition2] = value2;
54
+ };
55
+ for (var _iterator = conditions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop();
56
+ } catch (err) {
57
+ _didIteratorError = true;
58
+ _iteratorError = err;
59
+ } finally {
60
+ try {
61
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
62
+ _iterator.return();
63
+ }
64
+ } finally {
65
+ if (_didIteratorError) {
66
+ throw _iteratorError;
67
+ }
68
+ }
69
+ }
70
+ return Object.keys(result).length > 0 ? result : null;
71
+ }
72
+ var gradientKeys = [
73
+ "__gradientDirection",
74
+ "__gradientFrom",
75
+ "__gradientVia",
76
+ "__gradientTo",
77
+ "__gradientFromPosition",
78
+ "__gradientViaPosition",
79
+ "__gradientToPosition"
80
+ ];
81
+ function gradientStop(color, position) {
82
+ return position ? `${color} ${position}` : color;
83
+ }
84
+ function buildGradient(at) {
85
+ var dir = at("__gradientDirection");
86
+ var from = at("__gradientFrom");
87
+ var via = at("__gradientVia");
88
+ var to = at("__gradientTo");
89
+ if (!dir || !from && !via && !to) return null;
90
+ var start = gradientStop(from || "transparent", at("__gradientFromPosition"));
91
+ var end = gradientStop(to || "transparent", at("__gradientToPosition"));
92
+ return via ? `linear-gradient(${dir}, ${start}, ${gradientStop(via, at("__gradientViaPosition"))}, ${end})` : `linear-gradient(${dir}, ${start}, ${end})`;
93
+ }
94
+ var boxShadowKeys = [
95
+ "__ring",
96
+ "__ringColor",
97
+ "__ringInset",
98
+ "__ringOffsetWidth",
99
+ "__ringOffsetColor",
100
+ "__insetRingWidth",
101
+ "__insetRingColor",
102
+ "__insetShadowGeometry",
103
+ "__insetShadowDefaultColor",
104
+ "__insetShadowColor",
105
+ "__shadow",
106
+ "__shadowColor"
107
+ ];
108
+ function splitTopLevel(value, separator) {
109
+ var parts = [];
110
+ var depth = 0;
111
+ var start = 0;
112
+ for (var index = 0; index < value.length; index++) {
113
+ var char = value[index];
114
+ if (char === "(") depth++;
115
+ else if (char === ")") depth--;
116
+ else if (char === separator && depth === 0) {
117
+ var part = value.slice(start, index).trim();
118
+ if (part) parts.push(part);
119
+ start = index + 1;
120
+ }
121
+ }
122
+ var last = value.slice(start).trim();
123
+ if (last) parts.push(last);
124
+ return parts;
125
+ }
126
+ var shadowLength = /^(?:inset|-?(?:\d+|\d*\.\d+)(?:px)?)$/;
127
+ function recolorShadow(shadow, color) {
128
+ return splitTopLevel(shadow, ",").map(function(layer) {
129
+ var geometry = splitTopLevel(layer, " ").filter(function(part) {
130
+ return shadowLength.test(part);
131
+ });
132
+ return `${geometry.join(" ")} ${color}`;
133
+ }).join(", ");
134
+ }
135
+ function px(value) {
136
+ return Number.parseFloat(value) || 0;
137
+ }
138
+ function buildBoxShadow(at) {
139
+ var shadows = [];
140
+ var insetShadowGeometry = at("__insetShadowGeometry");
141
+ if (insetShadowGeometry) {
142
+ var color = at("__insetShadowColor") || at("__insetShadowDefaultColor") || "rgb(0 0 0 / 0.05)";
143
+ shadows.push(`${insetShadowGeometry} ${color}`.trim());
144
+ }
145
+ var insetRingWidth = at("__insetRingWidth");
146
+ if (insetRingWidth != null) {
147
+ shadows.push(`inset 0 0 0 ${insetRingWidth} ${at("__insetRingColor") || "currentColor"}`);
148
+ }
149
+ var ring = at("__ring");
150
+ if (ring != null) {
151
+ var inset = at("__ringInset") ? "inset " : "";
152
+ var offset = at("__ringOffsetWidth");
153
+ if (offset != null && px(offset) > 0) {
154
+ shadows.push(`${inset}0 0 0 ${offset} ${at("__ringOffsetColor") || "#fff"}`);
155
+ }
156
+ var spread = offset != null ? `${px(ring) + px(offset)}px` : ring;
157
+ shadows.push(`${inset}0 0 0 ${spread} ${at("__ringColor") || "currentColor"}`);
158
+ }
159
+ var shadow = at("__shadow");
160
+ if (shadow && shadow !== "none") {
161
+ var color1 = at("__shadowColor");
162
+ shadows.push(color1 ? recolorShadow(shadow, color1) : shadow);
163
+ }
164
+ return shadows.length > 0 ? shadows.join(", ") : null;
165
+ }
166
+ var filterFunctions = [
167
+ ["__filter_blur", "blur"],
168
+ ["__filter_brightness", "brightness"],
169
+ ["__filter_contrast", "contrast"],
170
+ ["__filter_grayscale", "grayscale"],
171
+ ["__filter_hueRotate", "hue-rotate"],
172
+ ["__filter_invert", "invert"],
173
+ ["__filter_saturate", "saturate"],
174
+ ["__filter_sepia", "sepia"]
175
+ ];
176
+ var filterKeys = [
177
+ "__filter_blur",
178
+ "__filter_brightness",
179
+ "__filter_contrast",
180
+ "__filter_grayscale",
181
+ "__filter_hueRotate",
182
+ "__filter_invert",
183
+ "__filter_saturate",
184
+ "__filter_sepia",
185
+ "__dropShadowGeometry",
186
+ "__dropShadowDefaultColor",
187
+ "__dropShadowColor"
188
+ ];
189
+ function buildFilter(at) {
190
+ var parts = [];
191
+ for (var index = 0; index < filterFunctions.length; index++) {
192
+ var [key, cssName] = filterFunctions[index];
193
+ var value = at(key);
194
+ if (value != null && value !== "") parts.push(`${cssName}(${value})`);
195
+ }
196
+ var geometry = at("__dropShadowGeometry");
197
+ if (geometry) {
198
+ var color = at("__dropShadowColor") || at("__dropShadowDefaultColor") || "rgb(0 0 0 / 0.15)";
199
+ parts.push(`drop-shadow(${geometry} ${color})`.trim());
200
+ }
201
+ return parts.length > 0 ? parts.join(" ") : null;
202
+ }
203
+ var transformFunctions = [
204
+ ["__transform_perspective", "perspective"],
205
+ ["__transform_rotateX", "rotateX"],
206
+ ["__transform_rotateY", "rotateY"],
207
+ ["__transform_rotateZ", "rotateZ"],
208
+ ["__transform_skewX", "skewX"],
209
+ ["__transform_skewY", "skewY"]
210
+ ];
211
+ var transformKeys = transformFunctions.map(function(param) {
212
+ var [key] = param;
213
+ return key;
214
+ });
215
+ function buildTransform(at) {
216
+ var parts = [];
217
+ for (var index = 0; index < transformFunctions.length; index++) {
218
+ var [key, cssName] = transformFunctions[index];
219
+ var value = at(key);
220
+ if (value != null && value !== "") parts.push(`${cssName}(${value})`);
221
+ }
222
+ return parts.length > 0 ? parts.join(" ") : null;
223
+ }
224
+ var leadingKeys = ["__leading", "__textLeading"];
225
+ function buildLeading(at) {
226
+ var _at, _ref;
227
+ return (_ref = (_at = at("__leading")) !== null && _at !== void 0 ? _at : at("__textLeading")) !== null && _ref !== void 0 ? _ref : null;
228
+ }
229
+ function composedResolver(props) {
230
+ var result = null;
231
+ var backgroundImage = compose(props, gradientKeys, buildGradient);
232
+ if (backgroundImage) (result !== null && result !== void 0 ? result : result = {}).backgroundImage = backgroundImage;
233
+ if (props.__ring != null || props.__insetRingWidth != null || props.__insetShadowGeometry != null || props.__shadowColor != null) {
234
+ var boxShadow = compose(props, boxShadowKeys, buildBoxShadow);
235
+ if (boxShadow) (result !== null && result !== void 0 ? result : result = {}).boxShadow = boxShadow;
236
+ }
237
+ var filter = compose(props, filterKeys, buildFilter);
238
+ if (filter) (result !== null && result !== void 0 ? result : result = {}).filter = filter;
239
+ var transform = compose(props, transformKeys, buildTransform);
240
+ if (transform) (result !== null && result !== void 0 ? result : result = {}).transform = transform;
241
+ var lineHeight = compose(props, leadingKeys, buildLeading);
242
+ if (lineHeight != null) (result !== null && result !== void 0 ? result : result = {}).lineHeight = lineHeight;
243
+ var preset = props.__textShadow_preset;
244
+ var color = props.__textShadow_color;
245
+ if (preset) {
246
+ result !== null && result !== void 0 ? result : result = {};
247
+ result.textShadowOffset = preset.offset;
248
+ result.textShadowRadius = preset.radius;
249
+ result.textShadowColor = color || preset.defaultColor;
250
+ } else if (color) {
251
+ ;
252
+ (result !== null && result !== void 0 ? result : result = {}).textShadowColor = color;
253
+ }
254
+ return result;
255
+ }
@@ -0,0 +1,257 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
+ var composedResolver_exports = {};
24
+ __export(composedResolver_exports, { composedResolver: () => composedResolver });
25
+ module.exports = __toCommonJS(composedResolver_exports);
26
+ function compose(props, keys, build) {
27
+ var conditions = null;
28
+ var present = false;
29
+ for (var index = 0; index < keys.length; index++) {
30
+ var value = props[keys[index]];
31
+ if (value == null) continue;
32
+ present = true;
33
+ if (typeof value === "object" && !Array.isArray(value)) {
34
+ conditions || (conditions = /* @__PURE__ */ new Set());
35
+ for (var condition in value) conditions.add(condition);
36
+ }
37
+ }
38
+ if (!present) return null;
39
+ if (!conditions) return build(function(key) {
40
+ return props[key];
41
+ });
42
+ conditions.add("default");
43
+ var result = {};
44
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
45
+ try {
46
+ var _loop = function() {
47
+ var condition2 = _step.value;
48
+ var value2 = build(function(key) {
49
+ var raw = props[key];
50
+ var _raw_condition;
51
+ return raw && typeof raw === "object" && !Array.isArray(raw) ? (_raw_condition = raw[condition2]) !== null && _raw_condition !== void 0 ? _raw_condition : raw.default : raw;
52
+ });
53
+ if (value2 != null && value2 !== "") result[condition2] = value2;
54
+ };
55
+ for (var _iterator = conditions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop();
56
+ } catch (err) {
57
+ _didIteratorError = true;
58
+ _iteratorError = err;
59
+ } finally {
60
+ try {
61
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
62
+ _iterator.return();
63
+ }
64
+ } finally {
65
+ if (_didIteratorError) {
66
+ throw _iteratorError;
67
+ }
68
+ }
69
+ }
70
+ return Object.keys(result).length > 0 ? result : null;
71
+ }
72
+ var gradientKeys = [
73
+ "__gradientDirection",
74
+ "__gradientFrom",
75
+ "__gradientVia",
76
+ "__gradientTo",
77
+ "__gradientFromPosition",
78
+ "__gradientViaPosition",
79
+ "__gradientToPosition"
80
+ ];
81
+ function gradientStop(color, position) {
82
+ return position ? `${color} ${position}` : color;
83
+ }
84
+ function buildGradient(at) {
85
+ var dir = at("__gradientDirection");
86
+ var from = at("__gradientFrom");
87
+ var via = at("__gradientVia");
88
+ var to = at("__gradientTo");
89
+ if (!dir || !from && !via && !to) return null;
90
+ var start = gradientStop(from || "transparent", at("__gradientFromPosition"));
91
+ var end = gradientStop(to || "transparent", at("__gradientToPosition"));
92
+ return via ? `linear-gradient(${dir}, ${start}, ${gradientStop(via, at("__gradientViaPosition"))}, ${end})` : `linear-gradient(${dir}, ${start}, ${end})`;
93
+ }
94
+ var boxShadowKeys = [
95
+ "__ring",
96
+ "__ringColor",
97
+ "__ringInset",
98
+ "__ringOffsetWidth",
99
+ "__ringOffsetColor",
100
+ "__insetRingWidth",
101
+ "__insetRingColor",
102
+ "__insetShadowGeometry",
103
+ "__insetShadowDefaultColor",
104
+ "__insetShadowColor",
105
+ "__shadow",
106
+ "__shadowColor"
107
+ ];
108
+ function splitTopLevel(value, separator) {
109
+ var parts = [];
110
+ var depth = 0;
111
+ var start = 0;
112
+ for (var index = 0; index < value.length; index++) {
113
+ var char = value[index];
114
+ if (char === "(") depth++;
115
+ else if (char === ")") depth--;
116
+ else if (char === separator && depth === 0) {
117
+ var part = value.slice(start, index).trim();
118
+ if (part) parts.push(part);
119
+ start = index + 1;
120
+ }
121
+ }
122
+ var last = value.slice(start).trim();
123
+ if (last) parts.push(last);
124
+ return parts;
125
+ }
126
+ var shadowLength = /^(?:inset|-?(?:\d+|\d*\.\d+)(?:px)?)$/;
127
+ function recolorShadow(shadow, color) {
128
+ return splitTopLevel(shadow, ",").map(function(layer) {
129
+ var geometry = splitTopLevel(layer, " ").filter(function(part) {
130
+ return shadowLength.test(part);
131
+ });
132
+ return `${geometry.join(" ")} ${color}`;
133
+ }).join(", ");
134
+ }
135
+ function px(value) {
136
+ return Number.parseFloat(value) || 0;
137
+ }
138
+ function buildBoxShadow(at) {
139
+ var shadows = [];
140
+ var insetShadowGeometry = at("__insetShadowGeometry");
141
+ if (insetShadowGeometry) {
142
+ var color = at("__insetShadowColor") || at("__insetShadowDefaultColor") || "rgb(0 0 0 / 0.05)";
143
+ shadows.push(`${insetShadowGeometry} ${color}`.trim());
144
+ }
145
+ var insetRingWidth = at("__insetRingWidth");
146
+ if (insetRingWidth != null) {
147
+ shadows.push(`inset 0 0 0 ${insetRingWidth} ${at("__insetRingColor") || "currentColor"}`);
148
+ }
149
+ var ring = at("__ring");
150
+ if (ring != null) {
151
+ var inset = at("__ringInset") ? "inset " : "";
152
+ var offset = at("__ringOffsetWidth");
153
+ if (offset != null && px(offset) > 0) {
154
+ shadows.push(`${inset}0 0 0 ${offset} ${at("__ringOffsetColor") || "#fff"}`);
155
+ }
156
+ var spread = offset != null ? `${px(ring) + px(offset)}px` : ring;
157
+ shadows.push(`${inset}0 0 0 ${spread} ${at("__ringColor") || "currentColor"}`);
158
+ }
159
+ var shadow = at("__shadow");
160
+ if (shadow && shadow !== "none") {
161
+ var color1 = at("__shadowColor");
162
+ shadows.push(color1 ? recolorShadow(shadow, color1) : shadow);
163
+ }
164
+ return shadows.length > 0 ? shadows.join(", ") : null;
165
+ }
166
+ var filterFunctions = [
167
+ ["__filter_blur", "blur"],
168
+ ["__filter_brightness", "brightness"],
169
+ ["__filter_contrast", "contrast"],
170
+ ["__filter_grayscale", "grayscale"],
171
+ ["__filter_hueRotate", "hue-rotate"],
172
+ ["__filter_invert", "invert"],
173
+ ["__filter_saturate", "saturate"],
174
+ ["__filter_sepia", "sepia"]
175
+ ];
176
+ var filterKeys = [
177
+ "__filter_blur",
178
+ "__filter_brightness",
179
+ "__filter_contrast",
180
+ "__filter_grayscale",
181
+ "__filter_hueRotate",
182
+ "__filter_invert",
183
+ "__filter_saturate",
184
+ "__filter_sepia",
185
+ "__dropShadowGeometry",
186
+ "__dropShadowDefaultColor",
187
+ "__dropShadowColor"
188
+ ];
189
+ function buildFilter(at) {
190
+ var parts = [];
191
+ for (var index = 0; index < filterFunctions.length; index++) {
192
+ var [key, cssName] = filterFunctions[index];
193
+ var value = at(key);
194
+ if (value != null && value !== "") parts.push(`${cssName}(${value})`);
195
+ }
196
+ var geometry = at("__dropShadowGeometry");
197
+ if (geometry) {
198
+ var color = at("__dropShadowColor") || at("__dropShadowDefaultColor") || "rgb(0 0 0 / 0.15)";
199
+ parts.push(`drop-shadow(${geometry} ${color})`.trim());
200
+ }
201
+ return parts.length > 0 ? parts.join(" ") : null;
202
+ }
203
+ var transformFunctions = [
204
+ ["__transform_perspective", "perspective"],
205
+ ["__transform_rotateX", "rotateX"],
206
+ ["__transform_rotateY", "rotateY"],
207
+ ["__transform_rotateZ", "rotateZ"],
208
+ ["__transform_skewX", "skewX"],
209
+ ["__transform_skewY", "skewY"]
210
+ ];
211
+ var transformKeys = transformFunctions.map(function(param) {
212
+ var [key] = param;
213
+ return key;
214
+ });
215
+ function buildTransform(at) {
216
+ var parts = [];
217
+ for (var index = 0; index < transformFunctions.length; index++) {
218
+ var [key, cssName] = transformFunctions[index];
219
+ var value = at(key);
220
+ if (value != null && value !== "") parts.push(`${cssName}(${value})`);
221
+ }
222
+ return parts.length > 0 ? parts.join(" ") : null;
223
+ }
224
+ var leadingKeys = ["__leading", "__textLeading"];
225
+ function buildLeading(at) {
226
+ var _at, _ref;
227
+ return (_ref = (_at = at("__leading")) !== null && _at !== void 0 ? _at : at("__textLeading")) !== null && _ref !== void 0 ? _ref : null;
228
+ }
229
+ function composedResolver(props) {
230
+ var result = null;
231
+ var backgroundImage = compose(props, gradientKeys, buildGradient);
232
+ if (backgroundImage) (result !== null && result !== void 0 ? result : result = {}).backgroundImage = backgroundImage;
233
+ if (props.__ring != null || props.__insetRingWidth != null || props.__insetShadowGeometry != null || props.__shadowColor != null) {
234
+ var boxShadow = compose(props, boxShadowKeys, buildBoxShadow);
235
+ if (boxShadow) (result !== null && result !== void 0 ? result : result = {}).boxShadow = boxShadow;
236
+ }
237
+ var filter = compose(props, filterKeys, buildFilter);
238
+ if (filter) (result !== null && result !== void 0 ? result : result = {}).filter = filter;
239
+ var transform = compose(props, transformKeys, buildTransform);
240
+ if (transform) (result !== null && result !== void 0 ? result : result = {}).transform = transform;
241
+ var lineHeight = compose(props, leadingKeys, buildLeading);
242
+ if (lineHeight != null) (result !== null && result !== void 0 ? result : result = {}).lineHeight = lineHeight;
243
+ var preset = props.__textShadow_preset;
244
+ var color = props.__textShadow_color;
245
+ if (preset) {
246
+ result !== null && result !== void 0 ? result : result = {};
247
+ result.textShadowOffset = preset.offset;
248
+ result.textShadowRadius = preset.radius;
249
+ result.textShadowColor = color || preset.defaultColor;
250
+ } else if (color) {
251
+ ;
252
+ (result !== null && result !== void 0 ? result : result = {}).textShadowColor = color;
253
+ }
254
+ return result;
255
+ }
256
+
257
+ //# sourceMappingURL=composedResolver.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composedResolver.native.js","names":[],"sources":["cjs/composedResolver.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar composedResolver_exports = {};\n__export(composedResolver_exports, {\n composedResolver: () => composedResolver\n});\nmodule.exports = __toCommonJS(composedResolver_exports);\nfunction compose(props, keys, build) {\n var conditions = null;\n var present = false;\n for (var index = 0; index < keys.length; index++) {\n var value = props[keys[index]];\n if (value == null) continue;\n present = true;\n if (typeof value === \"object\" && !Array.isArray(value)) {\n conditions || (conditions = /* @__PURE__ */ new Set());\n for (var condition in value) conditions.add(condition);\n }\n }\n if (!present) return null;\n if (!conditions) return build(function(key) {\n return props[key];\n });\n conditions.add(\"default\");\n var result = {};\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n var _loop = function() {\n var condition2 = _step.value;\n var value2 = build(function(key) {\n var raw = props[key];\n var _raw_condition;\n return raw && typeof raw === \"object\" && !Array.isArray(raw) ? (_raw_condition = raw[condition2]) !== null && _raw_condition !== void 0 ? _raw_condition : raw.default : raw;\n });\n if (value2 != null && value2 !== \"\") result[condition2] = value2;\n };\n for (var _iterator = conditions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop();\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return Object.keys(result).length > 0 ? result : null;\n}\nvar gradientKeys = [\n \"__gradientDirection\",\n \"__gradientFrom\",\n \"__gradientVia\",\n \"__gradientTo\",\n \"__gradientFromPosition\",\n \"__gradientViaPosition\",\n \"__gradientToPosition\"\n];\nfunction gradientStop(color, position) {\n return position ? `${color} ${position}` : color;\n}\nfunction buildGradient(at) {\n var dir = at(\"__gradientDirection\");\n var from = at(\"__gradientFrom\");\n var via = at(\"__gradientVia\");\n var to = at(\"__gradientTo\");\n if (!dir || !from && !via && !to) return null;\n var start = gradientStop(from || \"transparent\", at(\"__gradientFromPosition\"));\n var end = gradientStop(to || \"transparent\", at(\"__gradientToPosition\"));\n return via ? `linear-gradient(${dir}, ${start}, ${gradientStop(via, at(\"__gradientViaPosition\"))}, ${end})` : `linear-gradient(${dir}, ${start}, ${end})`;\n}\nvar boxShadowKeys = [\n \"__ring\",\n \"__ringColor\",\n \"__ringInset\",\n \"__ringOffsetWidth\",\n \"__ringOffsetColor\",\n \"__insetRingWidth\",\n \"__insetRingColor\",\n \"__insetShadowGeometry\",\n \"__insetShadowDefaultColor\",\n \"__insetShadowColor\",\n \"__shadow\",\n \"__shadowColor\"\n];\nfunction splitTopLevel(value, separator) {\n var parts = [];\n var depth = 0;\n var start = 0;\n for (var index = 0; index < value.length; index++) {\n var char = value[index];\n if (char === \"(\") depth++;\n else if (char === \")\") depth--;\n else if (char === separator && depth === 0) {\n var part = value.slice(start, index).trim();\n if (part) parts.push(part);\n start = index + 1;\n }\n }\n var last = value.slice(start).trim();\n if (last) parts.push(last);\n return parts;\n}\nvar shadowLength = /^(?:inset|-?(?:\\d+|\\d*\\.\\d+)(?:px)?)$/;\nfunction recolorShadow(shadow, color) {\n return splitTopLevel(shadow, \",\").map(function(layer) {\n var geometry = splitTopLevel(layer, \" \").filter(function(part) {\n return shadowLength.test(part);\n });\n return `${geometry.join(\" \")} ${color}`;\n }).join(\", \");\n}\nfunction px(value) {\n return Number.parseFloat(value) || 0;\n}\nfunction buildBoxShadow(at) {\n var shadows = [];\n var insetShadowGeometry = at(\"__insetShadowGeometry\");\n if (insetShadowGeometry) {\n var color = at(\"__insetShadowColor\") || at(\"__insetShadowDefaultColor\") || \"rgb(0 0 0 / 0.05)\";\n shadows.push(`${insetShadowGeometry} ${color}`.trim());\n }\n var insetRingWidth = at(\"__insetRingWidth\");\n if (insetRingWidth != null) {\n shadows.push(`inset 0 0 0 ${insetRingWidth} ${at(\"__insetRingColor\") || \"currentColor\"}`);\n }\n var ring = at(\"__ring\");\n if (ring != null) {\n var inset = at(\"__ringInset\") ? \"inset \" : \"\";\n var offset = at(\"__ringOffsetWidth\");\n if (offset != null && px(offset) > 0) {\n shadows.push(`${inset}0 0 0 ${offset} ${at(\"__ringOffsetColor\") || \"#fff\"}`);\n }\n var spread = offset != null ? `${px(ring) + px(offset)}px` : ring;\n shadows.push(`${inset}0 0 0 ${spread} ${at(\"__ringColor\") || \"currentColor\"}`);\n }\n var shadow = at(\"__shadow\");\n if (shadow && shadow !== \"none\") {\n var color1 = at(\"__shadowColor\");\n shadows.push(color1 ? recolorShadow(shadow, color1) : shadow);\n }\n return shadows.length > 0 ? shadows.join(\", \") : null;\n}\nvar filterFunctions = [\n [\n \"__filter_blur\",\n \"blur\"\n ],\n [\n \"__filter_brightness\",\n \"brightness\"\n ],\n [\n \"__filter_contrast\",\n \"contrast\"\n ],\n [\n \"__filter_grayscale\",\n \"grayscale\"\n ],\n [\n \"__filter_hueRotate\",\n \"hue-rotate\"\n ],\n [\n \"__filter_invert\",\n \"invert\"\n ],\n [\n \"__filter_saturate\",\n \"saturate\"\n ],\n [\n \"__filter_sepia\",\n \"sepia\"\n ]\n];\nvar filterKeys = [\n \"__filter_blur\",\n \"__filter_brightness\",\n \"__filter_contrast\",\n \"__filter_grayscale\",\n \"__filter_hueRotate\",\n \"__filter_invert\",\n \"__filter_saturate\",\n \"__filter_sepia\",\n \"__dropShadowGeometry\",\n \"__dropShadowDefaultColor\",\n \"__dropShadowColor\"\n];\nfunction buildFilter(at) {\n var parts = [];\n for (var index = 0; index < filterFunctions.length; index++) {\n var [key, cssName] = filterFunctions[index];\n var value = at(key);\n if (value != null && value !== \"\") parts.push(`${cssName}(${value})`);\n }\n var geometry = at(\"__dropShadowGeometry\");\n if (geometry) {\n var color = at(\"__dropShadowColor\") || at(\"__dropShadowDefaultColor\") || \"rgb(0 0 0 / 0.15)\";\n parts.push(`drop-shadow(${geometry} ${color})`.trim());\n }\n return parts.length > 0 ? parts.join(\" \") : null;\n}\nvar transformFunctions = [\n [\n \"__transform_perspective\",\n \"perspective\"\n ],\n [\n \"__transform_rotateX\",\n \"rotateX\"\n ],\n [\n \"__transform_rotateY\",\n \"rotateY\"\n ],\n [\n \"__transform_rotateZ\",\n \"rotateZ\"\n ],\n [\n \"__transform_skewX\",\n \"skewX\"\n ],\n [\n \"__transform_skewY\",\n \"skewY\"\n ]\n];\nvar transformKeys = transformFunctions.map(function(param) {\n var [key] = param;\n return key;\n});\nfunction buildTransform(at) {\n var parts = [];\n for (var index = 0; index < transformFunctions.length; index++) {\n var [key, cssName] = transformFunctions[index];\n var value = at(key);\n if (value != null && value !== \"\") parts.push(`${cssName}(${value})`);\n }\n return parts.length > 0 ? parts.join(\" \") : null;\n}\nvar leadingKeys = [\n \"__leading\",\n \"__textLeading\"\n];\nfunction buildLeading(at) {\n var _at, _ref;\n return (_ref = (_at = at(\"__leading\")) !== null && _at !== void 0 ? _at : at(\"__textLeading\")) !== null && _ref !== void 0 ? _ref : null;\n}\nfunction composedResolver(props) {\n var result = null;\n var backgroundImage = compose(props, gradientKeys, buildGradient);\n if (backgroundImage) (result !== null && result !== void 0 ? result : result = {}).backgroundImage = backgroundImage;\n if (props.__ring != null || props.__insetRingWidth != null || props.__insetShadowGeometry != null || props.__shadowColor != null) {\n var boxShadow = compose(props, boxShadowKeys, buildBoxShadow);\n if (boxShadow) (result !== null && result !== void 0 ? result : result = {}).boxShadow = boxShadow;\n }\n var filter = compose(props, filterKeys, buildFilter);\n if (filter) (result !== null && result !== void 0 ? result : result = {}).filter = filter;\n var transform = compose(props, transformKeys, buildTransform);\n if (transform) (result !== null && result !== void 0 ? result : result = {}).transform = transform;\n var lineHeight = compose(props, leadingKeys, buildLeading);\n if (lineHeight != null) (result !== null && result !== void 0 ? result : result = {}).lineHeight = lineHeight;\n var preset = props.__textShadow_preset;\n var color = props.__textShadow_color;\n if (preset) {\n result !== null && result !== void 0 ? result : result = {};\n result.textShadowOffset = preset.offset;\n result.textShadowRadius = preset.radius;\n result.textShadowColor = color || preset.defaultColor;\n } else if (color) {\n ;\n (result !== null && result !== void 0 ? result : result = {}).textShadowColor = color;\n }\n return result;\n}\n//# sourceMappingURL=composedResolver.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO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W,CAAC,WAAW,QAAQ,WAAW,KAAK,IAAI,SAAS,SAAS,CAAC,EAAC,CAAE,YAAY;CACzF,IAAI,aAAa,QAAQ,OAAO,aAAa,YAAY;CACzD,IAAI,cAAc,MAAM,CAAC,WAAW,QAAQ,WAAW,KAAK,IAAI,SAAS,SAAS,CAAC,EAAC,CAAE,aAAa;CACnG,IAAI,SAAS,MAAM;CACnB,IAAI,QAAQ,MAAM;CAClB,IAAI,QAAQ;EACV,WAAW,QAAQ,WAAW,KAAK,IAAI,SAAS,SAAS,CAAC;EAC1D,OAAO,mBAAmB,OAAO;EACjC,OAAO,mBAAmB,OAAO;EACjC,OAAO,kBAAkB,SAAS,OAAO;CAC3C,OAAO,IAAI,OAAO;EAChB;EACA,CAAC,WAAW,QAAQ,WAAW,KAAK,IAAI,SAAS,SAAS,CAAC,EAAC,CAAE,kBAAkB;CAClF;CACA,OAAO;AACT"}
@@ -25,6 +25,7 @@ __export(frontend_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(frontend_exports);
27
27
  var import_candidate = require("./candidate.cjs");
28
+ var import_composedResolver = require("./composedResolver.cjs");
28
29
  function parseStaticStyle(input, config) {
29
30
  return (0, import_candidate.resolveTailwindClassName)(input, config);
30
31
  }
@@ -46,16 +47,8 @@ function normalizeTailwindStaticConfig(staticConfig, config) {
46
47
  variants
47
48
  };
48
49
  }
49
- function resolveTailwindCandidate(candidate, config, sink) {
50
- const plan = (0, import_candidate.getTailwindClassPlan)(candidate, config);
51
- if (plan === "raw") return true;
52
- if (plan === null) return null;
53
- const parent = Array.isArray(plan) ? null : plan;
54
- const entries = parent ? parent.entries : plan;
55
- for (let index = 0; index < entries.length; index++) sink(entries[index]);
56
- return parent?.preserveRawClass || false;
57
- }
58
50
  const tailwindStyleFrontend = {
59
- resolveClassName: resolveTailwindCandidate,
60
- normalizeStaticConfig: normalizeTailwindStaticConfig
51
+ resolveClassName: import_candidate.resolveTailwindCandidate,
52
+ normalizeStaticConfig: normalizeTailwindStaticConfig,
53
+ compose: import_composedResolver.composedResolver
61
54
  };
@@ -27,10 +27,7 @@ __export(frontend_exports, {
27
27
  });
28
28
  module.exports = __toCommonJS(frontend_exports);
29
29
  var import_candidate = require("./candidate.native.js");
30
- function _type_of(obj) {
31
- "@swc/helpers - typeof";
32
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
33
- }
30
+ var import_composedResolver = require("./composedResolver.native.js");
34
31
  function parseStaticStyle(input, config) {
35
32
  return (0, import_candidate.resolveTailwindClassName)(input, config);
36
33
  }
@@ -39,7 +36,7 @@ function normalizeTailwindStaticConfig(staticConfig, config) {
39
36
  if (variants) {
40
37
  variants = Object.fromEntries(Object.entries(variants).map(function(param) {
41
38
  var [variantName, definition] = param;
42
- return [variantName, (typeof definition === "undefined" ? "undefined" : _type_of(definition)) === "object" && definition ? Object.fromEntries(Object.entries(definition).map(function(param2) {
39
+ return [variantName, typeof definition === "object" && definition ? Object.fromEntries(Object.entries(definition).map(function(param2) {
43
40
  var [matcher, value] = param2;
44
41
  return [matcher, typeof value === "string" ? parseStaticStyle(value, config) : value];
45
42
  })) : definition];
@@ -58,16 +55,8 @@ function normalizeTailwindStaticConfig(staticConfig, config) {
58
55
  variants
59
56
  };
60
57
  }
61
- function resolveTailwindCandidate(candidate, config, sink) {
62
- var plan = (0, import_candidate.getTailwindClassPlan)(candidate, config);
63
- if (plan === "raw") return true;
64
- if (plan === null) return null;
65
- var parent = Array.isArray(plan) ? null : plan;
66
- var entries = parent ? parent.entries : plan;
67
- for (var index = 0; index < entries.length; index++) sink(entries[index]);
68
- return (parent === null || parent === void 0 ? void 0 : parent.preserveRawClass) || false;
69
- }
70
58
  var tailwindStyleFrontend = {
71
- resolveClassName: resolveTailwindCandidate,
72
- normalizeStaticConfig: normalizeTailwindStaticConfig
59
+ resolveClassName: import_candidate.resolveTailwindCandidate,
60
+ normalizeStaticConfig: normalizeTailwindStaticConfig,
61
+ compose: import_composedResolver.composedResolver
73
62
  };
@@ -27,10 +27,7 @@ __export(frontend_exports, {
27
27
  });
28
28
  module.exports = __toCommonJS(frontend_exports);
29
29
  var import_candidate = require("./candidate.native.js");
30
- function _type_of(obj) {
31
- "@swc/helpers - typeof";
32
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
33
- }
30
+ var import_composedResolver = require("./composedResolver.native.js");
34
31
  function parseStaticStyle(input, config) {
35
32
  return (0, import_candidate.resolveTailwindClassName)(input, config);
36
33
  }
@@ -39,7 +36,7 @@ function normalizeTailwindStaticConfig(staticConfig, config) {
39
36
  if (variants) {
40
37
  variants = Object.fromEntries(Object.entries(variants).map(function(param) {
41
38
  var [variantName, definition] = param;
42
- return [variantName, (typeof definition === "undefined" ? "undefined" : _type_of(definition)) === "object" && definition ? Object.fromEntries(Object.entries(definition).map(function(param2) {
39
+ return [variantName, typeof definition === "object" && definition ? Object.fromEntries(Object.entries(definition).map(function(param2) {
43
40
  var [matcher, value] = param2;
44
41
  return [matcher, typeof value === "string" ? parseStaticStyle(value, config) : value];
45
42
  })) : definition];
@@ -58,18 +55,10 @@ function normalizeTailwindStaticConfig(staticConfig, config) {
58
55
  variants
59
56
  };
60
57
  }
61
- function resolveTailwindCandidate(candidate, config, sink) {
62
- var plan = (0, import_candidate.getTailwindClassPlan)(candidate, config);
63
- if (plan === "raw") return true;
64
- if (plan === null) return null;
65
- var parent = Array.isArray(plan) ? null : plan;
66
- var entries = parent ? parent.entries : plan;
67
- for (var index = 0; index < entries.length; index++) sink(entries[index]);
68
- return (parent === null || parent === void 0 ? void 0 : parent.preserveRawClass) || false;
69
- }
70
58
  var tailwindStyleFrontend = {
71
- resolveClassName: resolveTailwindCandidate,
72
- normalizeStaticConfig: normalizeTailwindStaticConfig
59
+ resolveClassName: import_candidate.resolveTailwindCandidate,
60
+ normalizeStaticConfig: normalizeTailwindStaticConfig,
61
+ compose: import_composedResolver.composedResolver
73
62
  };
74
63
 
75
64
  //# sourceMappingURL=frontend.native.js.map