@srimandir/common 2.9.0 → 2.10.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/common.js +35 -35
- package/dist/common.js.map +1 -1
- package/dist/common.umd.cjs +1 -1
- package/dist/common.umd.cjs.map +1 -1
- package/dist/i18n/createI18n.d.ts +11 -1
- package/package.json +2 -2
package/dist/common.js
CHANGED
|
@@ -116,7 +116,7 @@ const oo = (e, r) => {
|
|
|
116
116
|
if (l.startsWith("[") && l.endsWith("]"))
|
|
117
117
|
return so(l);
|
|
118
118
|
const u = l.split(q), b = u[0] === "" && u.length > 1 ? 1 : 0;
|
|
119
|
-
return
|
|
119
|
+
return Se(u, b, r);
|
|
120
120
|
},
|
|
121
121
|
getConflictingClassGroupIds: (l, u) => {
|
|
122
122
|
if (u) {
|
|
@@ -126,12 +126,12 @@ const oo = (e, r) => {
|
|
|
126
126
|
return t[l] || xe;
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
|
-
},
|
|
129
|
+
}, Se = (e, r, t) => {
|
|
130
130
|
if (e.length - r === 0)
|
|
131
131
|
return t.classGroupId;
|
|
132
132
|
const a = e[r], d = t.nextPart.get(a);
|
|
133
133
|
if (d) {
|
|
134
|
-
const m =
|
|
134
|
+
const m = Se(e, r + 1, d);
|
|
135
135
|
if (m) return m;
|
|
136
136
|
}
|
|
137
137
|
const l = t.validators;
|
|
@@ -176,7 +176,7 @@ const oo = (e, r) => {
|
|
|
176
176
|
}
|
|
177
177
|
po(e, r, t, o);
|
|
178
178
|
}, co = (e, r, t) => {
|
|
179
|
-
const o = e === "" ? r :
|
|
179
|
+
const o = e === "" ? r : Le(r, e);
|
|
180
180
|
o.classGroupId = t;
|
|
181
181
|
}, mo = (e, r, t, o) => {
|
|
182
182
|
if (uo(e)) {
|
|
@@ -188,9 +188,9 @@ const oo = (e, r) => {
|
|
|
188
188
|
const a = Object.entries(e), d = a.length;
|
|
189
189
|
for (let l = 0; l < d; l++) {
|
|
190
190
|
const [u, b] = a[l];
|
|
191
|
-
le(b,
|
|
191
|
+
le(b, Le(r, u), t, o);
|
|
192
192
|
}
|
|
193
|
-
},
|
|
193
|
+
}, Le = (e, r) => {
|
|
194
194
|
let t = e;
|
|
195
195
|
const o = r.split(q), a = o.length;
|
|
196
196
|
for (let d = 0; d < a; d++) {
|
|
@@ -381,11 +381,11 @@ const oo = (e, r) => {
|
|
|
381
381
|
}, zo = [], h = (e) => {
|
|
382
382
|
const r = (t) => t[e] || zo;
|
|
383
383
|
return r.isThemeGetter = !0, r;
|
|
384
|
-
}, Pe = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Te = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Ao = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,
|
|
384
|
+
}, Pe = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Te = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Ao = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, So = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Lo = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Io = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Po = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, To = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, G = (e) => Ao.test(e), p = (e) => !!e && !Number.isNaN(Number(e)), L = (e) => !!e && Number.isInteger(Number(e)), ae = (e) => e.endsWith("%") && p(e.slice(0, -1)), R = (e) => So.test(e), Me = () => !0, Mo = (e) => (
|
|
385
385
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
386
386
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
387
387
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
388
|
-
|
|
388
|
+
Lo.test(e) && !Io.test(e)
|
|
389
389
|
), ce = () => !1, Ro = (e) => Po.test(e), No = (e) => To.test(e), Go = (e) => !n(e) && !s(e), Eo = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), _o = (e) => E(e, Ge, ce), n = (e) => Pe.test(e), O = (e) => E(e, Ee, Mo), ke = (e) => E(e, Uo, p), Bo = (e) => E(e, Be, Me), Oo = (e) => E(e, _e, ce), ve = (e) => E(e, Re, ce), jo = (e) => E(e, Ne, No), X = (e) => E(e, Oe, Ro), s = (e) => Te.test(e), D = (e) => j(e, Ee), Fo = (e) => j(e, _e), Ce = (e) => j(e, Re), Vo = (e) => j(e, Ge), Wo = (e) => j(e, Ne), Q = (e) => j(e, Oe, !0), $o = (e) => j(e, Be, !0), E = (e, r, t) => {
|
|
390
390
|
const o = Pe.exec(e);
|
|
391
391
|
return o ? o[1] ? r(o[1]) : t(o[2]) : !1;
|
|
@@ -411,9 +411,9 @@ const oo = (e, r) => {
|
|
|
411
411
|
"bottom-left",
|
|
412
412
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
413
413
|
"left-bottom"
|
|
414
|
-
], V = () => [...F(), s, n], W = () => ["auto", "hidden", "clip", "visible", "scroll"], M = () => ["auto", "contain", "none"], i = () => [s, n, b], z = () => [G, "full", "auto", ...i()], de = () => [
|
|
415
|
-
span: ["full",
|
|
416
|
-
},
|
|
414
|
+
], V = () => [...F(), s, n], W = () => ["auto", "hidden", "clip", "visible", "scroll"], M = () => ["auto", "contain", "none"], i = () => [s, n, b], z = () => [G, "full", "auto", ...i()], de = () => [L, "none", "subgrid", s, n], me = () => ["auto", {
|
|
415
|
+
span: ["full", L, s, n]
|
|
416
|
+
}, L, s, n], K = () => [L, "auto", s, n], pe = () => ["auto", "min", "max", "fr", s, n], ee = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], $ = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], S = () => ["auto", ...i()], B = () => [G, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...i()], oe = () => [G, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...i()], te = () => [G, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...i()], c = () => [e, s, n], ue = () => [...F(), Ce, ve, {
|
|
417
417
|
position: [s, n]
|
|
418
418
|
}], be = () => ["no-repeat", {
|
|
419
419
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -718,7 +718,7 @@ const oo = (e, r) => {
|
|
|
718
718
|
* @see https://tailwindcss.com/docs/z-index
|
|
719
719
|
*/
|
|
720
720
|
z: [{
|
|
721
|
-
z: [
|
|
721
|
+
z: [L, "auto", s, n]
|
|
722
722
|
}],
|
|
723
723
|
// ------------------------
|
|
724
724
|
// --- Flexbox and Grid ---
|
|
@@ -770,7 +770,7 @@ const oo = (e, r) => {
|
|
|
770
770
|
* @see https://tailwindcss.com/docs/order
|
|
771
771
|
*/
|
|
772
772
|
order: [{
|
|
773
|
-
order: [
|
|
773
|
+
order: [L, "first", "last", "none", s, n]
|
|
774
774
|
}],
|
|
775
775
|
/**
|
|
776
776
|
* Grid Template Columns
|
|
@@ -1020,77 +1020,77 @@ const oo = (e, r) => {
|
|
|
1020
1020
|
* @see https://tailwindcss.com/docs/margin
|
|
1021
1021
|
*/
|
|
1022
1022
|
m: [{
|
|
1023
|
-
m:
|
|
1023
|
+
m: S()
|
|
1024
1024
|
}],
|
|
1025
1025
|
/**
|
|
1026
1026
|
* Margin Inline
|
|
1027
1027
|
* @see https://tailwindcss.com/docs/margin
|
|
1028
1028
|
*/
|
|
1029
1029
|
mx: [{
|
|
1030
|
-
mx:
|
|
1030
|
+
mx: S()
|
|
1031
1031
|
}],
|
|
1032
1032
|
/**
|
|
1033
1033
|
* Margin Block
|
|
1034
1034
|
* @see https://tailwindcss.com/docs/margin
|
|
1035
1035
|
*/
|
|
1036
1036
|
my: [{
|
|
1037
|
-
my:
|
|
1037
|
+
my: S()
|
|
1038
1038
|
}],
|
|
1039
1039
|
/**
|
|
1040
1040
|
* Margin Inline Start
|
|
1041
1041
|
* @see https://tailwindcss.com/docs/margin
|
|
1042
1042
|
*/
|
|
1043
1043
|
ms: [{
|
|
1044
|
-
ms:
|
|
1044
|
+
ms: S()
|
|
1045
1045
|
}],
|
|
1046
1046
|
/**
|
|
1047
1047
|
* Margin Inline End
|
|
1048
1048
|
* @see https://tailwindcss.com/docs/margin
|
|
1049
1049
|
*/
|
|
1050
1050
|
me: [{
|
|
1051
|
-
me:
|
|
1051
|
+
me: S()
|
|
1052
1052
|
}],
|
|
1053
1053
|
/**
|
|
1054
1054
|
* Margin Block Start
|
|
1055
1055
|
* @see https://tailwindcss.com/docs/margin
|
|
1056
1056
|
*/
|
|
1057
1057
|
mbs: [{
|
|
1058
|
-
mbs:
|
|
1058
|
+
mbs: S()
|
|
1059
1059
|
}],
|
|
1060
1060
|
/**
|
|
1061
1061
|
* Margin Block End
|
|
1062
1062
|
* @see https://tailwindcss.com/docs/margin
|
|
1063
1063
|
*/
|
|
1064
1064
|
mbe: [{
|
|
1065
|
-
mbe:
|
|
1065
|
+
mbe: S()
|
|
1066
1066
|
}],
|
|
1067
1067
|
/**
|
|
1068
1068
|
* Margin Top
|
|
1069
1069
|
* @see https://tailwindcss.com/docs/margin
|
|
1070
1070
|
*/
|
|
1071
1071
|
mt: [{
|
|
1072
|
-
mt:
|
|
1072
|
+
mt: S()
|
|
1073
1073
|
}],
|
|
1074
1074
|
/**
|
|
1075
1075
|
* Margin Right
|
|
1076
1076
|
* @see https://tailwindcss.com/docs/margin
|
|
1077
1077
|
*/
|
|
1078
1078
|
mr: [{
|
|
1079
|
-
mr:
|
|
1079
|
+
mr: S()
|
|
1080
1080
|
}],
|
|
1081
1081
|
/**
|
|
1082
1082
|
* Margin Bottom
|
|
1083
1083
|
* @see https://tailwindcss.com/docs/margin
|
|
1084
1084
|
*/
|
|
1085
1085
|
mb: [{
|
|
1086
|
-
mb:
|
|
1086
|
+
mb: S()
|
|
1087
1087
|
}],
|
|
1088
1088
|
/**
|
|
1089
1089
|
* Margin Left
|
|
1090
1090
|
* @see https://tailwindcss.com/docs/margin
|
|
1091
1091
|
*/
|
|
1092
1092
|
ml: [{
|
|
1093
|
-
ml:
|
|
1093
|
+
ml: S()
|
|
1094
1094
|
}],
|
|
1095
1095
|
/**
|
|
1096
1096
|
* Space Between X
|
|
@@ -1435,7 +1435,7 @@ const oo = (e, r) => {
|
|
|
1435
1435
|
* @see https://tailwindcss.com/docs/tab-size
|
|
1436
1436
|
*/
|
|
1437
1437
|
"tab-size": [{
|
|
1438
|
-
tab: [
|
|
1438
|
+
tab: [L, s, n]
|
|
1439
1439
|
}],
|
|
1440
1440
|
/**
|
|
1441
1441
|
* Vertical Alignment
|
|
@@ -1532,9 +1532,9 @@ const oo = (e, r) => {
|
|
|
1532
1532
|
bg: ["none", {
|
|
1533
1533
|
linear: [{
|
|
1534
1534
|
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
1535
|
-
},
|
|
1535
|
+
}, L, s, n],
|
|
1536
1536
|
radial: ["", s, n],
|
|
1537
|
-
conic: [
|
|
1537
|
+
conic: [L, s, n]
|
|
1538
1538
|
}, Wo, jo]
|
|
1539
1539
|
}],
|
|
1540
1540
|
/**
|
|
@@ -2667,7 +2667,7 @@ const oo = (e, r) => {
|
|
|
2667
2667
|
* @see https://tailwindcss.com/docs/zoom
|
|
2668
2668
|
*/
|
|
2669
2669
|
zoom: [{
|
|
2670
|
-
zoom: [
|
|
2670
|
+
zoom: [L, s, n]
|
|
2671
2671
|
}],
|
|
2672
2672
|
// ---------------------
|
|
2673
2673
|
// --- Interactivity ---
|
|
@@ -3226,15 +3226,15 @@ const je = {
|
|
|
3226
3226
|
const r = e.toUpperCase().split("").map((t) => 127397 + t.charCodeAt(0));
|
|
3227
3227
|
return String.fromCodePoint(...r);
|
|
3228
3228
|
};
|
|
3229
|
-
function ot(e) {
|
|
3230
|
-
const
|
|
3231
|
-
const
|
|
3232
|
-
return /* @__PURE__ */ I(
|
|
3229
|
+
function ot(e, r) {
|
|
3230
|
+
const t = $e(null), o = ({ locale: d, children: l }) => {
|
|
3231
|
+
const b = { locale: d, t: (m) => e[d]?.[m] || (r ? e[r]?.[m] : void 0) || "" };
|
|
3232
|
+
return /* @__PURE__ */ I(t.Provider, { value: b, children: l });
|
|
3233
3233
|
};
|
|
3234
|
-
function
|
|
3235
|
-
return Ue(
|
|
3234
|
+
function a() {
|
|
3235
|
+
return Ue(t);
|
|
3236
3236
|
}
|
|
3237
|
-
return { I18nProvider:
|
|
3237
|
+
return { I18nProvider: o, useI18n: a };
|
|
3238
3238
|
}
|
|
3239
3239
|
export {
|
|
3240
3240
|
Yo as BottomSheet,
|