@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,201 @@
|
|
|
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) 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
|
+
];
|
|
78
|
+
function buildGradient(at) {
|
|
79
|
+
var dir = at("__gradientDirection");
|
|
80
|
+
var from = at("__gradientFrom");
|
|
81
|
+
var via = at("__gradientVia");
|
|
82
|
+
var to = at("__gradientTo");
|
|
83
|
+
if (!dir || !from && !via && !to) return null;
|
|
84
|
+
var start = from || "transparent";
|
|
85
|
+
var end = to || "transparent";
|
|
86
|
+
return via ? `linear-gradient(${dir}, ${start}, ${via}, ${end})` : `linear-gradient(${dir}, ${start}, ${end})`;
|
|
87
|
+
}
|
|
88
|
+
var boxShadowKeys = [
|
|
89
|
+
"__ring",
|
|
90
|
+
"__ringColor",
|
|
91
|
+
"__ringInset",
|
|
92
|
+
"__insetRingWidth",
|
|
93
|
+
"__insetRingColor",
|
|
94
|
+
"__insetShadowGeometry",
|
|
95
|
+
"__insetShadowDefaultColor",
|
|
96
|
+
"__insetShadowColor",
|
|
97
|
+
"__shadow"
|
|
98
|
+
];
|
|
99
|
+
function buildBoxShadow(at) {
|
|
100
|
+
var shadows = [];
|
|
101
|
+
var insetShadowGeometry = at("__insetShadowGeometry");
|
|
102
|
+
if (insetShadowGeometry) {
|
|
103
|
+
var color = at("__insetShadowColor") || at("__insetShadowDefaultColor") || "rgb(0 0 0 / 0.05)";
|
|
104
|
+
shadows.push(`${insetShadowGeometry} ${color}`.trim());
|
|
105
|
+
}
|
|
106
|
+
var insetRingWidth = at("__insetRingWidth");
|
|
107
|
+
if (insetRingWidth != null) {
|
|
108
|
+
shadows.push(`inset 0 0 0 ${insetRingWidth} ${at("__insetRingColor") || "currentColor"}`);
|
|
109
|
+
}
|
|
110
|
+
var ring = at("__ring");
|
|
111
|
+
if (ring != null) {
|
|
112
|
+
var inset = at("__ringInset") ? "inset " : "";
|
|
113
|
+
shadows.push(`${inset}0 0 0 ${ring} ${at("__ringColor") || "currentColor"}`);
|
|
114
|
+
}
|
|
115
|
+
var shadow = at("__shadow");
|
|
116
|
+
if (shadow && shadow !== "none") shadows.push(shadow);
|
|
117
|
+
return shadows.length > 0 ? shadows.join(", ") : null;
|
|
118
|
+
}
|
|
119
|
+
var filterFunctions = [
|
|
120
|
+
["__filter_blur", "blur"],
|
|
121
|
+
["__filter_brightness", "brightness"],
|
|
122
|
+
["__filter_contrast", "contrast"],
|
|
123
|
+
["__filter_grayscale", "grayscale"],
|
|
124
|
+
["__filter_hueRotate", "hue-rotate"],
|
|
125
|
+
["__filter_invert", "invert"],
|
|
126
|
+
["__filter_saturate", "saturate"],
|
|
127
|
+
["__filter_sepia", "sepia"]
|
|
128
|
+
];
|
|
129
|
+
var filterKeys = [
|
|
130
|
+
"__filter_blur",
|
|
131
|
+
"__filter_brightness",
|
|
132
|
+
"__filter_contrast",
|
|
133
|
+
"__filter_grayscale",
|
|
134
|
+
"__filter_hueRotate",
|
|
135
|
+
"__filter_invert",
|
|
136
|
+
"__filter_saturate",
|
|
137
|
+
"__filter_sepia",
|
|
138
|
+
"__dropShadowGeometry",
|
|
139
|
+
"__dropShadowDefaultColor",
|
|
140
|
+
"__dropShadowColor"
|
|
141
|
+
];
|
|
142
|
+
function buildFilter(at) {
|
|
143
|
+
var parts = [];
|
|
144
|
+
for (var index = 0; index < filterFunctions.length; index++) {
|
|
145
|
+
var [key, cssName] = filterFunctions[index];
|
|
146
|
+
var value = at(key);
|
|
147
|
+
if (value != null && value !== "") parts.push(`${cssName}(${value})`);
|
|
148
|
+
}
|
|
149
|
+
var geometry = at("__dropShadowGeometry");
|
|
150
|
+
if (geometry) {
|
|
151
|
+
var color = at("__dropShadowColor") || at("__dropShadowDefaultColor") || "rgb(0 0 0 / 0.15)";
|
|
152
|
+
parts.push(`drop-shadow(${geometry} ${color})`.trim());
|
|
153
|
+
}
|
|
154
|
+
return parts.length > 0 ? parts.join(" ") : null;
|
|
155
|
+
}
|
|
156
|
+
var transformFunctions = [
|
|
157
|
+
["__transform_perspective", "perspective"],
|
|
158
|
+
["__transform_rotateX", "rotateX"],
|
|
159
|
+
["__transform_rotateY", "rotateY"],
|
|
160
|
+
["__transform_rotateZ", "rotateZ"],
|
|
161
|
+
["__transform_skewX", "skewX"],
|
|
162
|
+
["__transform_skewY", "skewY"]
|
|
163
|
+
];
|
|
164
|
+
var transformKeys = transformFunctions.map(function(param) {
|
|
165
|
+
var [key] = param;
|
|
166
|
+
return key;
|
|
167
|
+
});
|
|
168
|
+
function buildTransform(at) {
|
|
169
|
+
var parts = [];
|
|
170
|
+
for (var index = 0; index < transformFunctions.length; index++) {
|
|
171
|
+
var [key, cssName] = transformFunctions[index];
|
|
172
|
+
var value = at(key);
|
|
173
|
+
if (value != null && value !== "") parts.push(`${cssName}(${value})`);
|
|
174
|
+
}
|
|
175
|
+
return parts.length > 0 ? parts.join(" ") : null;
|
|
176
|
+
}
|
|
177
|
+
function composedResolver(props) {
|
|
178
|
+
var result = null;
|
|
179
|
+
var backgroundImage = compose(props, gradientKeys, buildGradient);
|
|
180
|
+
if (backgroundImage) (result !== null && result !== void 0 ? result : result = {}).backgroundImage = backgroundImage;
|
|
181
|
+
if (props.__ring != null || props.__insetRingWidth != null || props.__insetShadowGeometry != null) {
|
|
182
|
+
var boxShadow = compose(props, boxShadowKeys, buildBoxShadow);
|
|
183
|
+
if (boxShadow) (result !== null && result !== void 0 ? result : result = {}).boxShadow = boxShadow;
|
|
184
|
+
}
|
|
185
|
+
var filter = compose(props, filterKeys, buildFilter);
|
|
186
|
+
if (filter) (result !== null && result !== void 0 ? result : result = {}).filter = filter;
|
|
187
|
+
var transform = compose(props, transformKeys, buildTransform);
|
|
188
|
+
if (transform) (result !== null && result !== void 0 ? result : result = {}).transform = transform;
|
|
189
|
+
var preset = props.__textShadow_preset;
|
|
190
|
+
var color = props.__textShadow_color;
|
|
191
|
+
if (preset) {
|
|
192
|
+
result !== null && result !== void 0 ? result : result = {};
|
|
193
|
+
result.textShadowOffset = preset.offset;
|
|
194
|
+
result.textShadowRadius = preset.radius;
|
|
195
|
+
result.textShadowColor = color || preset.defaultColor;
|
|
196
|
+
} else if (color) {
|
|
197
|
+
;
|
|
198
|
+
(result !== null && result !== void 0 ? result : result = {}).textShadowColor = color;
|
|
199
|
+
}
|
|
200
|
+
return result;
|
|
201
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
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) 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
|
+
];
|
|
78
|
+
function buildGradient(at) {
|
|
79
|
+
var dir = at("__gradientDirection");
|
|
80
|
+
var from = at("__gradientFrom");
|
|
81
|
+
var via = at("__gradientVia");
|
|
82
|
+
var to = at("__gradientTo");
|
|
83
|
+
if (!dir || !from && !via && !to) return null;
|
|
84
|
+
var start = from || "transparent";
|
|
85
|
+
var end = to || "transparent";
|
|
86
|
+
return via ? `linear-gradient(${dir}, ${start}, ${via}, ${end})` : `linear-gradient(${dir}, ${start}, ${end})`;
|
|
87
|
+
}
|
|
88
|
+
var boxShadowKeys = [
|
|
89
|
+
"__ring",
|
|
90
|
+
"__ringColor",
|
|
91
|
+
"__ringInset",
|
|
92
|
+
"__insetRingWidth",
|
|
93
|
+
"__insetRingColor",
|
|
94
|
+
"__insetShadowGeometry",
|
|
95
|
+
"__insetShadowDefaultColor",
|
|
96
|
+
"__insetShadowColor",
|
|
97
|
+
"__shadow"
|
|
98
|
+
];
|
|
99
|
+
function buildBoxShadow(at) {
|
|
100
|
+
var shadows = [];
|
|
101
|
+
var insetShadowGeometry = at("__insetShadowGeometry");
|
|
102
|
+
if (insetShadowGeometry) {
|
|
103
|
+
var color = at("__insetShadowColor") || at("__insetShadowDefaultColor") || "rgb(0 0 0 / 0.05)";
|
|
104
|
+
shadows.push(`${insetShadowGeometry} ${color}`.trim());
|
|
105
|
+
}
|
|
106
|
+
var insetRingWidth = at("__insetRingWidth");
|
|
107
|
+
if (insetRingWidth != null) {
|
|
108
|
+
shadows.push(`inset 0 0 0 ${insetRingWidth} ${at("__insetRingColor") || "currentColor"}`);
|
|
109
|
+
}
|
|
110
|
+
var ring = at("__ring");
|
|
111
|
+
if (ring != null) {
|
|
112
|
+
var inset = at("__ringInset") ? "inset " : "";
|
|
113
|
+
shadows.push(`${inset}0 0 0 ${ring} ${at("__ringColor") || "currentColor"}`);
|
|
114
|
+
}
|
|
115
|
+
var shadow = at("__shadow");
|
|
116
|
+
if (shadow && shadow !== "none") shadows.push(shadow);
|
|
117
|
+
return shadows.length > 0 ? shadows.join(", ") : null;
|
|
118
|
+
}
|
|
119
|
+
var filterFunctions = [
|
|
120
|
+
["__filter_blur", "blur"],
|
|
121
|
+
["__filter_brightness", "brightness"],
|
|
122
|
+
["__filter_contrast", "contrast"],
|
|
123
|
+
["__filter_grayscale", "grayscale"],
|
|
124
|
+
["__filter_hueRotate", "hue-rotate"],
|
|
125
|
+
["__filter_invert", "invert"],
|
|
126
|
+
["__filter_saturate", "saturate"],
|
|
127
|
+
["__filter_sepia", "sepia"]
|
|
128
|
+
];
|
|
129
|
+
var filterKeys = [
|
|
130
|
+
"__filter_blur",
|
|
131
|
+
"__filter_brightness",
|
|
132
|
+
"__filter_contrast",
|
|
133
|
+
"__filter_grayscale",
|
|
134
|
+
"__filter_hueRotate",
|
|
135
|
+
"__filter_invert",
|
|
136
|
+
"__filter_saturate",
|
|
137
|
+
"__filter_sepia",
|
|
138
|
+
"__dropShadowGeometry",
|
|
139
|
+
"__dropShadowDefaultColor",
|
|
140
|
+
"__dropShadowColor"
|
|
141
|
+
];
|
|
142
|
+
function buildFilter(at) {
|
|
143
|
+
var parts = [];
|
|
144
|
+
for (var index = 0; index < filterFunctions.length; index++) {
|
|
145
|
+
var [key, cssName] = filterFunctions[index];
|
|
146
|
+
var value = at(key);
|
|
147
|
+
if (value != null && value !== "") parts.push(`${cssName}(${value})`);
|
|
148
|
+
}
|
|
149
|
+
var geometry = at("__dropShadowGeometry");
|
|
150
|
+
if (geometry) {
|
|
151
|
+
var color = at("__dropShadowColor") || at("__dropShadowDefaultColor") || "rgb(0 0 0 / 0.15)";
|
|
152
|
+
parts.push(`drop-shadow(${geometry} ${color})`.trim());
|
|
153
|
+
}
|
|
154
|
+
return parts.length > 0 ? parts.join(" ") : null;
|
|
155
|
+
}
|
|
156
|
+
var transformFunctions = [
|
|
157
|
+
["__transform_perspective", "perspective"],
|
|
158
|
+
["__transform_rotateX", "rotateX"],
|
|
159
|
+
["__transform_rotateY", "rotateY"],
|
|
160
|
+
["__transform_rotateZ", "rotateZ"],
|
|
161
|
+
["__transform_skewX", "skewX"],
|
|
162
|
+
["__transform_skewY", "skewY"]
|
|
163
|
+
];
|
|
164
|
+
var transformKeys = transformFunctions.map(function(param) {
|
|
165
|
+
var [key] = param;
|
|
166
|
+
return key;
|
|
167
|
+
});
|
|
168
|
+
function buildTransform(at) {
|
|
169
|
+
var parts = [];
|
|
170
|
+
for (var index = 0; index < transformFunctions.length; index++) {
|
|
171
|
+
var [key, cssName] = transformFunctions[index];
|
|
172
|
+
var value = at(key);
|
|
173
|
+
if (value != null && value !== "") parts.push(`${cssName}(${value})`);
|
|
174
|
+
}
|
|
175
|
+
return parts.length > 0 ? parts.join(" ") : null;
|
|
176
|
+
}
|
|
177
|
+
function composedResolver(props) {
|
|
178
|
+
var result = null;
|
|
179
|
+
var backgroundImage = compose(props, gradientKeys, buildGradient);
|
|
180
|
+
if (backgroundImage) (result !== null && result !== void 0 ? result : result = {}).backgroundImage = backgroundImage;
|
|
181
|
+
if (props.__ring != null || props.__insetRingWidth != null || props.__insetShadowGeometry != null) {
|
|
182
|
+
var boxShadow = compose(props, boxShadowKeys, buildBoxShadow);
|
|
183
|
+
if (boxShadow) (result !== null && result !== void 0 ? result : result = {}).boxShadow = boxShadow;
|
|
184
|
+
}
|
|
185
|
+
var filter = compose(props, filterKeys, buildFilter);
|
|
186
|
+
if (filter) (result !== null && result !== void 0 ? result : result = {}).filter = filter;
|
|
187
|
+
var transform = compose(props, transformKeys, buildTransform);
|
|
188
|
+
if (transform) (result !== null && result !== void 0 ? result : result = {}).transform = transform;
|
|
189
|
+
var preset = props.__textShadow_preset;
|
|
190
|
+
var color = props.__textShadow_color;
|
|
191
|
+
if (preset) {
|
|
192
|
+
result !== null && result !== void 0 ? result : result = {};
|
|
193
|
+
result.textShadowOffset = preset.offset;
|
|
194
|
+
result.textShadowRadius = preset.radius;
|
|
195
|
+
result.textShadowColor = color || preset.defaultColor;
|
|
196
|
+
} else if (color) {
|
|
197
|
+
;
|
|
198
|
+
(result !== null && result !== void 0 ? result : result = {}).textShadowColor = color;
|
|
199
|
+
}
|
|
200
|
+
return result;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
//# 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) 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];\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 = from || \"transparent\";\n var end = to || \"transparent\";\n return via ? `linear-gradient(${dir}, ${start}, ${via}, ${end})` : `linear-gradient(${dir}, ${start}, ${end})`;\n}\nvar boxShadowKeys = [\n \"__ring\",\n \"__ringColor\",\n \"__ringInset\",\n \"__insetRingWidth\",\n \"__insetRingColor\",\n \"__insetShadowGeometry\",\n \"__insetShadowDefaultColor\",\n \"__insetShadowColor\",\n \"__shadow\"\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 shadows.push(`${inset}0 0 0 ${ring} ${at(\"__ringColor\") || \"currentColor\"}`);\n }\n var shadow = at(\"__shadow\");\n if (shadow && shadow !== \"none\") shadows.push(shadow);\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}\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) {\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 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,KAAK,CAAC,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}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var frontend_exports = {};
|
|
22
|
+
__export(frontend_exports, {
|
|
23
|
+
parseStaticStyle: () => parseStaticStyle,
|
|
24
|
+
tailwindStyleFrontend: () => tailwindStyleFrontend
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(frontend_exports);
|
|
27
|
+
var import_candidate = require("./candidate.cjs");
|
|
28
|
+
var import_composedResolver = require("./composedResolver.cjs");
|
|
29
|
+
function parseStaticStyle(input, config) {
|
|
30
|
+
return (0, import_candidate.resolveTailwindClassName)(input, config);
|
|
31
|
+
}
|
|
32
|
+
function normalizeTailwindStaticConfig(staticConfig, config) {
|
|
33
|
+
let variants = staticConfig.variants;
|
|
34
|
+
if (variants) {
|
|
35
|
+
variants = Object.fromEntries(Object.entries(variants).map(([variantName, definition]) => [variantName, typeof definition === "object" && definition ? Object.fromEntries(Object.entries(definition).map(([matcher, value]) => [matcher, typeof value === "string" ? parseStaticStyle(value, config) : value])) : definition]));
|
|
36
|
+
}
|
|
37
|
+
let baseStyle = staticConfig.baseStyle;
|
|
38
|
+
let passthroughClassName = staticConfig.passthroughClassName;
|
|
39
|
+
if (staticConfig.baseClassName) {
|
|
40
|
+
const { className, ...styles } = parseStaticStyle(staticConfig.baseClassName, config);
|
|
41
|
+
baseStyle = styles;
|
|
42
|
+
passthroughClassName = className;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
baseStyle,
|
|
46
|
+
passthroughClassName,
|
|
47
|
+
variants
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const tailwindStyleFrontend = {
|
|
51
|
+
resolveClassName: import_candidate.resolveTailwindCandidate,
|
|
52
|
+
normalizeStaticConfig: normalizeTailwindStaticConfig,
|
|
53
|
+
compose: import_composedResolver.composedResolver
|
|
54
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
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 frontend_exports = {};
|
|
24
|
+
__export(frontend_exports, {
|
|
25
|
+
parseStaticStyle: () => parseStaticStyle,
|
|
26
|
+
tailwindStyleFrontend: () => tailwindStyleFrontend
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(frontend_exports);
|
|
29
|
+
var import_candidate = require("./candidate.native.js");
|
|
30
|
+
var import_composedResolver = require("./composedResolver.native.js");
|
|
31
|
+
function parseStaticStyle(input, config) {
|
|
32
|
+
return (0, import_candidate.resolveTailwindClassName)(input, config);
|
|
33
|
+
}
|
|
34
|
+
function normalizeTailwindStaticConfig(staticConfig, config) {
|
|
35
|
+
var variants = staticConfig.variants;
|
|
36
|
+
if (variants) {
|
|
37
|
+
variants = Object.fromEntries(Object.entries(variants).map(function(param) {
|
|
38
|
+
var [variantName, definition] = param;
|
|
39
|
+
return [variantName, typeof definition === "object" && definition ? Object.fromEntries(Object.entries(definition).map(function(param2) {
|
|
40
|
+
var [matcher, value] = param2;
|
|
41
|
+
return [matcher, typeof value === "string" ? parseStaticStyle(value, config) : value];
|
|
42
|
+
})) : definition];
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
var baseStyle = staticConfig.baseStyle;
|
|
46
|
+
var passthroughClassName = staticConfig.passthroughClassName;
|
|
47
|
+
if (staticConfig.baseClassName) {
|
|
48
|
+
var { className, ...styles } = parseStaticStyle(staticConfig.baseClassName, config);
|
|
49
|
+
baseStyle = styles;
|
|
50
|
+
passthroughClassName = className;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
baseStyle,
|
|
54
|
+
passthroughClassName,
|
|
55
|
+
variants
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
var tailwindStyleFrontend = {
|
|
59
|
+
resolveClassName: import_candidate.resolveTailwindCandidate,
|
|
60
|
+
normalizeStaticConfig: normalizeTailwindStaticConfig,
|
|
61
|
+
compose: import_composedResolver.composedResolver
|
|
62
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
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 frontend_exports = {};
|
|
24
|
+
__export(frontend_exports, {
|
|
25
|
+
parseStaticStyle: () => parseStaticStyle,
|
|
26
|
+
tailwindStyleFrontend: () => tailwindStyleFrontend
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(frontend_exports);
|
|
29
|
+
var import_candidate = require("./candidate.native.js");
|
|
30
|
+
var import_composedResolver = require("./composedResolver.native.js");
|
|
31
|
+
function parseStaticStyle(input, config) {
|
|
32
|
+
return (0, import_candidate.resolveTailwindClassName)(input, config);
|
|
33
|
+
}
|
|
34
|
+
function normalizeTailwindStaticConfig(staticConfig, config) {
|
|
35
|
+
var variants = staticConfig.variants;
|
|
36
|
+
if (variants) {
|
|
37
|
+
variants = Object.fromEntries(Object.entries(variants).map(function(param) {
|
|
38
|
+
var [variantName, definition] = param;
|
|
39
|
+
return [variantName, typeof definition === "object" && definition ? Object.fromEntries(Object.entries(definition).map(function(param2) {
|
|
40
|
+
var [matcher, value] = param2;
|
|
41
|
+
return [matcher, typeof value === "string" ? parseStaticStyle(value, config) : value];
|
|
42
|
+
})) : definition];
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
var baseStyle = staticConfig.baseStyle;
|
|
46
|
+
var passthroughClassName = staticConfig.passthroughClassName;
|
|
47
|
+
if (staticConfig.baseClassName) {
|
|
48
|
+
var { className, ...styles } = parseStaticStyle(staticConfig.baseClassName, config);
|
|
49
|
+
baseStyle = styles;
|
|
50
|
+
passthroughClassName = className;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
baseStyle,
|
|
54
|
+
passthroughClassName,
|
|
55
|
+
variants
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
var tailwindStyleFrontend = {
|
|
59
|
+
resolveClassName: import_candidate.resolveTailwindCandidate,
|
|
60
|
+
normalizeStaticConfig: normalizeTailwindStaticConfig,
|
|
61
|
+
compose: import_composedResolver.composedResolver
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=frontend.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontend.native.js","names":[],"sources":["cjs/frontend.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 frontend_exports = {};\n__export(frontend_exports, {\n parseStaticStyle: () => parseStaticStyle,\n tailwindStyleFrontend: () => tailwindStyleFrontend\n});\nmodule.exports = __toCommonJS(frontend_exports);\nvar import_candidate = require(\"./candidate\");\nvar import_composedResolver = require(\"./composedResolver\");\nfunction parseStaticStyle(input, config) {\n return (0, import_candidate.resolveTailwindClassName)(input, config);\n}\nfunction normalizeTailwindStaticConfig(staticConfig, config) {\n var variants = staticConfig.variants;\n if (variants) {\n variants = Object.fromEntries(Object.entries(variants).map(function(param) {\n var [variantName, definition] = param;\n return [\n variantName,\n typeof definition === \"object\" && definition ? Object.fromEntries(Object.entries(definition).map(function(param2) {\n var [matcher, value] = param2;\n return [\n matcher,\n typeof value === \"string\" ? parseStaticStyle(value, config) : value\n ];\n })) : definition\n ];\n }));\n }\n var baseStyle = staticConfig.baseStyle;\n var passthroughClassName = staticConfig.passthroughClassName;\n if (staticConfig.baseClassName) {\n var { className, ...styles } = parseStaticStyle(staticConfig.baseClassName, config);\n baseStyle = styles;\n passthroughClassName = className;\n }\n return {\n baseStyle,\n passthroughClassName,\n variants\n };\n}\nvar tailwindStyleFrontend = {\n resolveClassName: import_candidate.resolveTailwindCandidate,\n normalizeStaticConfig: normalizeTailwindStaticConfig,\n compose: import_composedResolver.composedResolver\n};\n//# sourceMappingURL=frontend.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;EA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L;EACA;EACA;CACF;AACF;AACA,IAAI,wBAAwB;CAC1B,kBAAkB,iBAAiB;CACnC,uBAAuB;CACvB,SAAS,wBAAwB;AACnC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
Text: () => Text,
|
|
24
|
+
View: () => View,
|
|
25
|
+
html: () => html,
|
|
26
|
+
parseStaticStyle: () => import_frontend2.parseStaticStyle,
|
|
27
|
+
styled: () => import_styled.styled,
|
|
28
|
+
tailwindStyleFrontend: () => import_frontend2.tailwindStyleFrontend
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(index_exports);
|
|
31
|
+
var import_internal_runtime = require("@tamagui/core/internal-runtime");
|
|
32
|
+
var import_frontend = require("./frontend.cjs");
|
|
33
|
+
var import_styled = require("./styled.cjs");
|
|
34
|
+
var import_frontend2 = require("./frontend.cjs");
|
|
35
|
+
const frontendViews = (0, import_internal_runtime.createFrontendViews)(import_frontend.tailwindStyleFrontend);
|
|
36
|
+
const View = frontendViews.View;
|
|
37
|
+
const Text = frontendViews.Text;
|
|
38
|
+
const html = (0, import_internal_runtime.createFrontendHTML)(import_frontend.tailwindStyleFrontend);
|