@rexezuge/web 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AppPage.d.ts +6 -2
- package/dist/AppPage.d.ts.map +1 -1
- package/dist/AppPage.js +1 -7
- package/dist/AppPage.js.map +7 -1
- package/dist/Badge.d.ts +9 -3
- package/dist/Badge.d.ts.map +1 -1
- package/dist/Badge.js +1 -25
- package/dist/Badge.js.map +7 -1
- package/dist/Button.d.ts +6 -2
- package/dist/Button.d.ts.map +1 -1
- package/dist/Button.js +1 -39
- package/dist/Button.js.map +7 -1
- package/dist/Card.d.ts +12 -9
- package/dist/Card.d.ts.map +1 -1
- package/dist/Card.js +1 -42
- package/dist/Card.js.map +7 -1
- package/dist/ContextBar.d.ts +9 -3
- package/dist/ContextBar.d.ts.map +1 -1
- package/dist/ContextBar.js +1 -7
- package/dist/ContextBar.js.map +7 -1
- package/dist/FocusInput.d.ts +1 -2
- package/dist/FocusInput.d.ts.map +1 -1
- package/dist/FocusInput.js +1 -19
- package/dist/FocusInput.js.map +7 -1
- package/dist/Input.d.ts +9 -8
- package/dist/Input.d.ts.map +1 -1
- package/dist/Input.js +1 -49
- package/dist/Input.js.map +7 -1
- package/dist/LanguageSelector.d.ts +6 -2
- package/dist/LanguageSelector.d.ts.map +1 -1
- package/dist/LanguageSelector.js +1 -12
- package/dist/LanguageSelector.js.map +7 -1
- package/dist/LoadingButton.d.ts +19 -7
- package/dist/LoadingButton.d.ts.map +1 -1
- package/dist/LoadingButton.js +1 -30
- package/dist/LoadingButton.js.map +7 -1
- package/dist/ModalShell.d.ts +12 -4
- package/dist/ModalShell.d.ts.map +1 -1
- package/dist/ModalShell.js +1 -22
- package/dist/ModalShell.js.map +7 -1
- package/dist/NoticeBar.d.ts +7 -3
- package/dist/NoticeBar.d.ts.map +1 -1
- package/dist/NoticeBar.js +1 -12
- package/dist/NoticeBar.js.map +7 -1
- package/dist/PageHeaderCard.d.ts +6 -2
- package/dist/PageHeaderCard.d.ts.map +1 -1
- package/dist/PageHeaderCard.js +1 -7
- package/dist/PageHeaderCard.js.map +7 -1
- package/dist/PageState.d.ts +9 -3
- package/dist/PageState.d.ts.map +1 -1
- package/dist/PageState.js +1 -47
- package/dist/PageState.js.map +7 -1
- package/dist/Pagination.d.ts +36 -12
- package/dist/Pagination.d.ts.map +1 -1
- package/dist/Pagination.js +1 -75
- package/dist/Pagination.js.map +7 -1
- package/dist/ReadOnlyField.d.ts +12 -4
- package/dist/ReadOnlyField.d.ts.map +1 -1
- package/dist/ReadOnlyField.js +1 -17
- package/dist/ReadOnlyField.js.map +7 -1
- package/dist/RefreshButton.d.ts +6 -2
- package/dist/RefreshButton.d.ts.map +1 -1
- package/dist/RefreshButton.js +1 -8
- package/dist/RefreshButton.js.map +7 -1
- package/dist/Spinner.d.ts +15 -5
- package/dist/Spinner.d.ts.map +1 -1
- package/dist/Spinner.js +1 -14
- package/dist/Spinner.js.map +7 -1
- package/dist/TypeToConfirmModal.d.ts +15 -5
- package/dist/TypeToConfirmModal.d.ts.map +1 -1
- package/dist/TypeToConfirmModal.js +1 -24
- package/dist/TypeToConfirmModal.js.map +7 -1
- package/dist/Unauthorized.d.ts +6 -2
- package/dist/Unauthorized.d.ts.map +1 -1
- package/dist/Unauthorized.js +1 -11
- package/dist/Unauthorized.js.map +7 -1
- package/dist/api.d.ts +27 -9
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1 -258
- package/dist/api.js.map +7 -1
- package/dist/constants.js +1 -49
- package/dist/constants.js.map +7 -1
- package/dist/index.d.ts +51 -51
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -89
- package/dist/index.js.map +7 -1
- package/dist/theme.d.ts +24 -8
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +1 -134
- package/dist/theme.js.map +7 -1
- package/dist/useCopyToClipboard.d.ts +3 -1
- package/dist/useCopyToClipboard.d.ts.map +1 -1
- package/dist/useCopyToClipboard.js +1 -40
- package/dist/useCopyToClipboard.js.map +7 -1
- package/dist/useCurrentUser.d.ts +22 -8
- package/dist/useCurrentUser.d.ts.map +1 -1
- package/dist/useCurrentUser.js +1 -49
- package/dist/useCurrentUser.js.map +7 -1
- package/dist/useNotice.d.ts +21 -7
- package/dist/useNotice.d.ts.map +1 -1
- package/dist/useNotice.js +1 -34
- package/dist/useNotice.js.map +7 -1
- package/dist/useSpaLanguage.d.ts +27 -11
- package/dist/useSpaLanguage.d.ts.map +1 -1
- package/dist/useSpaLanguage.js +1 -149
- package/dist/useSpaLanguage.js.map +7 -1
- package/dist/utils.d.ts +6 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -346
- package/dist/utils.js.map +7 -1
- package/package.json +4 -4
package/dist/utils.js
CHANGED
|
@@ -1,346 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Class-name composition.
|
|
3
|
-
*
|
|
4
|
-
* ## Provenance
|
|
5
|
-
*
|
|
6
|
-
* `lib/utils.ts` in **CalDAV-Bridge**, **Durable-DAV**, **Durable-DAV-Router**,
|
|
7
|
-
* **Edge-Git**, **Edge-Sonic** and **Mail-Otter** — six byte-identical copies of
|
|
8
|
-
*
|
|
9
|
-
* ```ts
|
|
10
|
-
* export function cn(...inputs: ClassValue[]) {
|
|
11
|
-
* return twMerge(clsx(inputs));
|
|
12
|
-
* }
|
|
13
|
-
* ```
|
|
14
|
-
*
|
|
15
|
-
* The kit cannot import `clsx` or `tailwind-merge` (this package declares no
|
|
16
|
-
* dependency on either, and the consumers' own copies stay theirs), so the same
|
|
17
|
-
* contract is implemented here in-dependency-free form:
|
|
18
|
-
*
|
|
19
|
-
* - **clsx semantics** — strings, numbers, arrays and `{ [class]: active }`
|
|
20
|
-
* dictionaries are flattened, and falsy entries are dropped.
|
|
21
|
-
* - **tailwind-merge semantics, for a documented subset** — when a later class
|
|
22
|
-
* belongs to the same utility family as an earlier one, the earlier one is
|
|
23
|
-
* dropped, so `<Button className="px-6">` really does override the base
|
|
24
|
-
* `px-4` instead of shipping both and letting stylesheet order decide.
|
|
25
|
-
*
|
|
26
|
-
* The merged families are the ones whose value is a length or a count —
|
|
27
|
-
* spacing, sizing, border width, radius, transitions — plus the single-word
|
|
28
|
-
* utilities (position, display, flex direction, justification, alignment, text
|
|
29
|
-
* alignment, font weight). Families whose suffix is *not* a value
|
|
30
|
-
* (`text-red-500`, `bg-[var(--color-accent)]`, `border-white`) are left in
|
|
31
|
-
* source order on purpose: telling `text-sm` from `text-red-500` takes
|
|
32
|
-
* tailwind-merge's full class table, and guessing wrong would silently drop a
|
|
33
|
-
* colour. A consumer that needs the complete table can wrap this one:
|
|
34
|
-
* `const cn = (...values: ClassValue[]) => twMerge(kitCn(...values))`.
|
|
35
|
-
*/
|
|
36
|
-
/**
|
|
37
|
-
* Utility prefixes whose remainder is a length/count, merged longest-first so
|
|
38
|
-
* `px-` is matched before `p-`.
|
|
39
|
-
*/
|
|
40
|
-
const VALUE_UTILITY_PREFIXES = [
|
|
41
|
-
// Inset / spacing
|
|
42
|
-
'inset-x',
|
|
43
|
-
'inset-y',
|
|
44
|
-
'inset',
|
|
45
|
-
'scroll-mx',
|
|
46
|
-
'scroll-my',
|
|
47
|
-
'scroll-m',
|
|
48
|
-
'scroll-px',
|
|
49
|
-
'scroll-py',
|
|
50
|
-
'scroll-p',
|
|
51
|
-
'start',
|
|
52
|
-
'end',
|
|
53
|
-
'top',
|
|
54
|
-
'right',
|
|
55
|
-
'bottom',
|
|
56
|
-
'left',
|
|
57
|
-
'space-x',
|
|
58
|
-
'space-y',
|
|
59
|
-
'gap-x',
|
|
60
|
-
'gap-y',
|
|
61
|
-
'gap',
|
|
62
|
-
'px',
|
|
63
|
-
'py',
|
|
64
|
-
'pt',
|
|
65
|
-
'pr',
|
|
66
|
-
'pb',
|
|
67
|
-
'pl',
|
|
68
|
-
'ps',
|
|
69
|
-
'pe',
|
|
70
|
-
'p',
|
|
71
|
-
'mx',
|
|
72
|
-
'my',
|
|
73
|
-
'mt',
|
|
74
|
-
'mr',
|
|
75
|
-
'mb',
|
|
76
|
-
'ml',
|
|
77
|
-
'ms',
|
|
78
|
-
'me',
|
|
79
|
-
'm',
|
|
80
|
-
// Sizing
|
|
81
|
-
'min-w',
|
|
82
|
-
'min-h',
|
|
83
|
-
'max-w',
|
|
84
|
-
'max-h',
|
|
85
|
-
'size',
|
|
86
|
-
'w',
|
|
87
|
-
'h',
|
|
88
|
-
// Radius
|
|
89
|
-
'rounded-ss',
|
|
90
|
-
'rounded-se',
|
|
91
|
-
'rounded-ee',
|
|
92
|
-
'rounded-es',
|
|
93
|
-
'rounded-tl',
|
|
94
|
-
'rounded-tr',
|
|
95
|
-
'rounded-br',
|
|
96
|
-
'rounded-bl',
|
|
97
|
-
'rounded-s',
|
|
98
|
-
'rounded-e',
|
|
99
|
-
'rounded-t',
|
|
100
|
-
'rounded-r',
|
|
101
|
-
'rounded-b',
|
|
102
|
-
'rounded-l',
|
|
103
|
-
'rounded',
|
|
104
|
-
// Border width (a border *colour* never has a numeric suffix)
|
|
105
|
-
'border-x',
|
|
106
|
-
'border-y',
|
|
107
|
-
'border-t',
|
|
108
|
-
'border-r',
|
|
109
|
-
'border-b',
|
|
110
|
-
'border-l',
|
|
111
|
-
'border-s',
|
|
112
|
-
'border-e',
|
|
113
|
-
'border',
|
|
114
|
-
// Ring / outline width, divide, translate/scale/rotate
|
|
115
|
-
'ring-offset',
|
|
116
|
-
'ring',
|
|
117
|
-
'divide-x',
|
|
118
|
-
'divide-y',
|
|
119
|
-
'outline-offset',
|
|
120
|
-
'translate-x',
|
|
121
|
-
'translate-y',
|
|
122
|
-
'scale',
|
|
123
|
-
'rotate',
|
|
124
|
-
// Grid
|
|
125
|
-
'col-span',
|
|
126
|
-
'row-span',
|
|
127
|
-
'grid-cols',
|
|
128
|
-
'grid-rows',
|
|
129
|
-
// Flex box
|
|
130
|
-
'basis',
|
|
131
|
-
'grow',
|
|
132
|
-
'shrink',
|
|
133
|
-
'order',
|
|
134
|
-
'z',
|
|
135
|
-
'opacity',
|
|
136
|
-
'leading',
|
|
137
|
-
'tracking',
|
|
138
|
-
'duration',
|
|
139
|
-
'delay',
|
|
140
|
-
];
|
|
141
|
-
/**
|
|
142
|
-
* Single-word utilities that have no value, grouped by the property they set.
|
|
143
|
-
* Only words that are unambiguously that property are listed — `font-medium`
|
|
144
|
-
* (weight) is here, `font-mono` (family) is not.
|
|
145
|
-
*/
|
|
146
|
-
const SINGLETON_UTILITIES = {
|
|
147
|
-
// Position
|
|
148
|
-
static: 'position',
|
|
149
|
-
fixed: 'position',
|
|
150
|
-
absolute: 'position',
|
|
151
|
-
relative: 'position',
|
|
152
|
-
sticky: 'position',
|
|
153
|
-
// Display
|
|
154
|
-
block: 'display',
|
|
155
|
-
inline: 'display',
|
|
156
|
-
'inline-block': 'display',
|
|
157
|
-
flex: 'display',
|
|
158
|
-
'inline-flex': 'display',
|
|
159
|
-
grid: 'display',
|
|
160
|
-
'inline-grid': 'display',
|
|
161
|
-
table: 'display',
|
|
162
|
-
hidden: 'display',
|
|
163
|
-
contents: 'display',
|
|
164
|
-
'flow-root': 'display',
|
|
165
|
-
'list-item': 'display',
|
|
166
|
-
// Flex direction / wrapping
|
|
167
|
-
'flex-row': 'flex-direction',
|
|
168
|
-
'flex-col': 'flex-direction',
|
|
169
|
-
'flex-row-reverse': 'flex-direction',
|
|
170
|
-
'flex-col-reverse': 'flex-direction',
|
|
171
|
-
'flex-wrap': 'flex-wrap',
|
|
172
|
-
'flex-wrap-reverse': 'flex-wrap',
|
|
173
|
-
'flex-nowrap': 'flex-wrap',
|
|
174
|
-
// Justification / alignment
|
|
175
|
-
'justify-normal': 'justify-content',
|
|
176
|
-
'justify-start': 'justify-content',
|
|
177
|
-
'justify-end': 'justify-content',
|
|
178
|
-
'justify-center': 'justify-content',
|
|
179
|
-
'justify-between': 'justify-content',
|
|
180
|
-
'justify-around': 'justify-content',
|
|
181
|
-
'justify-evenly': 'justify-content',
|
|
182
|
-
'justify-stretch': 'justify-content',
|
|
183
|
-
'items-start': 'align-items',
|
|
184
|
-
'items-end': 'align-items',
|
|
185
|
-
'items-center': 'align-items',
|
|
186
|
-
'items-baseline': 'align-items',
|
|
187
|
-
'items-stretch': 'align-items',
|
|
188
|
-
'self-auto': 'align-self',
|
|
189
|
-
'self-start': 'align-self',
|
|
190
|
-
'self-end': 'align-self',
|
|
191
|
-
'self-center': 'align-self',
|
|
192
|
-
'self-stretch': 'align-self',
|
|
193
|
-
// Text alignment
|
|
194
|
-
'text-left': 'text-align',
|
|
195
|
-
'text-center': 'text-align',
|
|
196
|
-
'text-right': 'text-align',
|
|
197
|
-
'text-justify': 'text-align',
|
|
198
|
-
'text-start': 'text-align',
|
|
199
|
-
'text-end': 'text-align',
|
|
200
|
-
// Font weight (families are deliberately absent — see the comment above)
|
|
201
|
-
'font-thin': 'font-weight',
|
|
202
|
-
'font-extralight': 'font-weight',
|
|
203
|
-
'font-light': 'font-weight',
|
|
204
|
-
'font-normal': 'font-weight',
|
|
205
|
-
'font-medium': 'font-weight',
|
|
206
|
-
'font-semibold': 'font-weight',
|
|
207
|
-
'font-bold': 'font-weight',
|
|
208
|
-
'font-extrabold': 'font-weight',
|
|
209
|
-
'font-black': 'font-weight',
|
|
210
|
-
// Visibility
|
|
211
|
-
visible: 'visibility',
|
|
212
|
-
invisible: 'visibility',
|
|
213
|
-
collapse: 'visibility',
|
|
214
|
-
};
|
|
215
|
-
/** A length/count-like remainder: `-2`, `1.5`, `[3px]`, `px`, `full`, `none`. */
|
|
216
|
-
const VALUE_SUFFIX = /^(-?(?:\d+\.?\d*|\[[^\]]*\]|px|full|none|auto|screen|min|max|fit))$/;
|
|
217
|
-
function isClassList(value) {
|
|
218
|
-
return Array.isArray(value);
|
|
219
|
-
}
|
|
220
|
-
/** Pushes the whitespace-separated classes of one string, dropping empties. */
|
|
221
|
-
function pushClasses(into, value) {
|
|
222
|
-
for (const className of value.split(/\s+/)) {
|
|
223
|
-
if (className !== '') {
|
|
224
|
-
into.push(className);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
/** Flattens clsx-style inputs into the classes they contribute, in order. */
|
|
229
|
-
function flattenClasses(values, into) {
|
|
230
|
-
for (const value of values) {
|
|
231
|
-
if (value === null || value === undefined || value === false || value === '') {
|
|
232
|
-
continue;
|
|
233
|
-
}
|
|
234
|
-
if (typeof value === 'string') {
|
|
235
|
-
pushClasses(into, value);
|
|
236
|
-
continue;
|
|
237
|
-
}
|
|
238
|
-
if (typeof value === 'number') {
|
|
239
|
-
into.push(String(value));
|
|
240
|
-
continue;
|
|
241
|
-
}
|
|
242
|
-
if (isClassList(value)) {
|
|
243
|
-
flattenClasses(value, into);
|
|
244
|
-
continue;
|
|
245
|
-
}
|
|
246
|
-
for (const [className, active] of Object.entries(value)) {
|
|
247
|
-
if (active) {
|
|
248
|
-
// A dictionary key may itself carry several classes.
|
|
249
|
-
pushClasses(into, className);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Splits `hover:focus:px-2` into its variants and base, ignoring the colons
|
|
256
|
-
* that appear inside an arbitrary value such as `bg-[url(https://…)]`.
|
|
257
|
-
*/
|
|
258
|
-
function splitVariants(className) {
|
|
259
|
-
let depth = 0;
|
|
260
|
-
let lastSeparator = -1;
|
|
261
|
-
for (let index = 0; index < className.length; index += 1) {
|
|
262
|
-
const character = className[index];
|
|
263
|
-
if (character === '[' || character === '(') {
|
|
264
|
-
depth += 1;
|
|
265
|
-
}
|
|
266
|
-
else if (character === ']' || character === ')') {
|
|
267
|
-
depth -= 1;
|
|
268
|
-
}
|
|
269
|
-
else if (character === ':' && depth === 0) {
|
|
270
|
-
lastSeparator = index;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
if (lastSeparator === -1) {
|
|
274
|
-
return { variants: '', base: className };
|
|
275
|
-
}
|
|
276
|
-
return { variants: className.slice(0, lastSeparator), base: className.slice(lastSeparator + 1) };
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* The merge group a class belongs to, or `null` when it must be left alone.
|
|
280
|
-
*
|
|
281
|
-
* Two classes merge only when their group is equal, and the group carries the
|
|
282
|
-
* variant prefix — `sm:px-2` never overrides a bare `px-4`.
|
|
283
|
-
*/
|
|
284
|
-
function groupKeyFor(className) {
|
|
285
|
-
const { variants, base } = splitVariants(className);
|
|
286
|
-
const singletonGroup = SINGLETON_UTILITIES[base];
|
|
287
|
-
if (singletonGroup !== undefined) {
|
|
288
|
-
return `${variants}|${singletonGroup}`;
|
|
289
|
-
}
|
|
290
|
-
for (const prefix of VALUE_UTILITY_PREFIXES) {
|
|
291
|
-
if (base === prefix) {
|
|
292
|
-
return `${variants}|${prefix}`;
|
|
293
|
-
}
|
|
294
|
-
if (!base.startsWith(`${prefix}-`)) {
|
|
295
|
-
continue;
|
|
296
|
-
}
|
|
297
|
-
// `important` and a trailing `!` are not values; neither is an unknown word,
|
|
298
|
-
// which is how `text-sm`/`border-white` escape the numeric families.
|
|
299
|
-
const suffix = base.slice(prefix.length + 1);
|
|
300
|
-
if (!VALUE_SUFFIX.test(suffix)) {
|
|
301
|
-
return null;
|
|
302
|
-
}
|
|
303
|
-
return `${variants}|${prefix}`;
|
|
304
|
-
}
|
|
305
|
-
return null;
|
|
306
|
-
}
|
|
307
|
-
/** Drops an exact duplicate, keeping its last occurrence. */
|
|
308
|
-
function dedupeClasses(classes) {
|
|
309
|
-
const lastIndex = new Map();
|
|
310
|
-
classes.forEach((className, index) => {
|
|
311
|
-
lastIndex.set(className, index);
|
|
312
|
-
});
|
|
313
|
-
return classes.filter((className, index) => lastIndex.get(className) === index);
|
|
314
|
-
}
|
|
315
|
-
/** Drops each class that a later member of its own group has replaced. */
|
|
316
|
-
function mergeGroups(classes) {
|
|
317
|
-
const merged = [];
|
|
318
|
-
const positionByGroup = new Map();
|
|
319
|
-
for (const className of classes) {
|
|
320
|
-
const group = groupKeyFor(className);
|
|
321
|
-
if (group !== null) {
|
|
322
|
-
const previous = positionByGroup.get(group);
|
|
323
|
-
if (previous !== undefined) {
|
|
324
|
-
merged[previous] = '';
|
|
325
|
-
}
|
|
326
|
-
positionByGroup.set(group, merged.length);
|
|
327
|
-
}
|
|
328
|
-
merged.push(className);
|
|
329
|
-
}
|
|
330
|
-
return merged.filter((className) => className !== '');
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* Joins class names, dropping falsy entries, exact duplicates, and superseded
|
|
334
|
-
* utilities.
|
|
335
|
-
*
|
|
336
|
-
* ```ts
|
|
337
|
-
* cn('px-4', undefined, ['py-2', { 'font-bold': isActive }], 'px-6'); // 'py-2 px-6'
|
|
338
|
-
* ```
|
|
339
|
-
*/
|
|
340
|
-
function cn(...inputs) {
|
|
341
|
-
const flattened = [];
|
|
342
|
-
flattenClasses(inputs, flattened);
|
|
343
|
-
return mergeGroups(dedupeClasses(flattened)).join(' ');
|
|
344
|
-
}
|
|
345
|
-
export { cn };
|
|
346
|
-
//# sourceMappingURL=utils.js.map
|
|
1
|
+
const a=["inset-x","inset-y","inset","scroll-mx","scroll-my","scroll-m","scroll-px","scroll-py","scroll-p","start","end","top","right","bottom","left","space-x","space-y","gap-x","gap-y","gap","px","py","pt","pr","pb","pl","ps","pe","p","mx","my","mt","mr","mb","ml","ms","me","m","min-w","min-h","max-w","max-h","size","w","h","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl","rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded","border-x","border-y","border-t","border-r","border-b","border-l","border-s","border-e","border","ring-offset","ring","divide-x","divide-y","outline-offset","translate-x","translate-y","scale","rotate","col-span","row-span","grid-cols","grid-rows","basis","grow","shrink","order","z","opacity","leading","tracking","duration","delay"],o={static:"position",fixed:"position",absolute:"position",relative:"position",sticky:"position",block:"display",inline:"display","inline-block":"display",flex:"display","inline-flex":"display",grid:"display","inline-grid":"display",table:"display",hidden:"display",contents:"display","flow-root":"display","list-item":"display","flex-row":"flex-direction","flex-col":"flex-direction","flex-row-reverse":"flex-direction","flex-col-reverse":"flex-direction","flex-wrap":"flex-wrap","flex-wrap-reverse":"flex-wrap","flex-nowrap":"flex-wrap","justify-normal":"justify-content","justify-start":"justify-content","justify-end":"justify-content","justify-center":"justify-content","justify-between":"justify-content","justify-around":"justify-content","justify-evenly":"justify-content","justify-stretch":"justify-content","items-start":"align-items","items-end":"align-items","items-center":"align-items","items-baseline":"align-items","items-stretch":"align-items","self-auto":"align-self","self-start":"align-self","self-end":"align-self","self-center":"align-self","self-stretch":"align-self","text-left":"text-align","text-center":"text-align","text-right":"text-align","text-justify":"text-align","text-start":"text-align","text-end":"text-align","font-thin":"font-weight","font-extralight":"font-weight","font-light":"font-weight","font-normal":"font-weight","font-medium":"font-weight","font-semibold":"font-weight","font-bold":"font-weight","font-extrabold":"font-weight","font-black":"font-weight",visible:"visibility",invisible:"visibility",collapse:"visibility"},d=/^-?(?:\d+(?:\.\d*)?|\[[^\]]*\]|px|full|none|auto|screen|min|max|fit)$/;function u(i){return Array.isArray(i)}function l(i,e){for(const t of e.split(/\s+/))t!==""&&i.push(t)}function f(i,e){for(const t of i)if(!(t==null||t===!1||t==="")){if(typeof t=="string"){l(e,t);continue}if(typeof t=="number"){e.push(String(t));continue}if(u(t)){f(t,e);continue}for(const[n,s]of Object.entries(t))s&&l(e,n)}}function c(i){let e=0,t=-1,n=0;for(;n<i.length;){const s=i[n];s==="["||s==="("?e+=1:s==="]"||s===")"?e-=1:s===":"&&e===0&&(t=n),n+=1}return t===-1?{variants:"",base:i}:{variants:i.slice(0,t),base:i.slice(t+1)}}function p(i){const{variants:e,base:t}=c(i);if(Object.hasOwn(o,t))return`${e}|${o[t]}`;for(const n of a){if(t===n)return`${e}|${n}`;if(!t.startsWith(`${n}-`))continue;const s=t.slice(n.length+1);return d.test(s)?`${e}|${n}`:null}return null}function g(i){const e=new Map;return i.forEach((t,n)=>{e.set(t,n)}),i.filter((t,n)=>e.get(t)===n)}function y(i){const e=[],t=new Map;for(const n of i){const s=p(n);if(s!==null){const r=t.get(s);r!==void 0&&(e[r]=""),t.set(s,e.length)}e.push(n)}return e.filter(n=>n!=="")}function x(...i){const e=[];return f(i,e),y(g(e)).join(" ")}export{x as cn};
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAUH;;;GAGG;AACH,MAAM,sBAAsB,GAAsB;IAChD,kBAAkB;IAClB,SAAS;IACT,SAAS;IACT,OAAO;IACP,WAAW;IACX,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,UAAU;IACV,OAAO;IACP,KAAK;IACL,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,SAAS;IACT,SAAS;IACT,OAAO;IACP,OAAO;IACP,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,SAAS;IACT,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,GAAG;IACH,GAAG;IACH,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,SAAS;IACT,8DAA8D;IAC9D,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV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AACH,SAAS,EAAE,CAAC,GAAG,MAAoB;IACjC,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,cAAc,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAClC,OAAO,WAAW,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzD,CAAC;AAED,OAAO,EAAE,EAAE,EAAE,CAAC","sourcesContent":["/**\n * Class-name composition.\n *\n * ## Provenance\n *\n * `lib/utils.ts` in **CalDAV-Bridge**, **Durable-DAV**, **Durable-DAV-Router**,\n * **Edge-Git**, **Edge-Sonic** and **Mail-Otter** — six byte-identical copies of\n *\n * ```ts\n * export function cn(...inputs: ClassValue[]) {\n * return twMerge(clsx(inputs));\n * }\n * ```\n *\n * The kit cannot import `clsx` or `tailwind-merge` (this package declares no\n * dependency on either, and the consumers' own copies stay theirs), so the same\n * contract is implemented here in-dependency-free form:\n *\n * - **clsx semantics** — strings, numbers, arrays and `{ [class]: active }`\n * dictionaries are flattened, and falsy entries are dropped.\n * - **tailwind-merge semantics, for a documented subset** — when a later class\n * belongs to the same utility family as an earlier one, the earlier one is\n * dropped, so `<Button className=\"px-6\">` really does override the base\n * `px-4` instead of shipping both and letting stylesheet order decide.\n *\n * The merged families are the ones whose value is a length or a count —\n * spacing, sizing, border width, radius, transitions — plus the single-word\n * utilities (position, display, flex direction, justification, alignment, text\n * alignment, font weight). Families whose suffix is *not* a value\n * (`text-red-500`, `bg-[var(--color-accent)]`, `border-white`) are left in\n * source order on purpose: telling `text-sm` from `text-red-500` takes\n * tailwind-merge's full class table, and guessing wrong would silently drop a\n * colour. A consumer that needs the complete table can wrap this one:\n * `const cn = (...values: ClassValue[]) => twMerge(kitCn(...values))`.\n */\n\n/** Everything `cn` accepts, mirroring clsx's `ClassValue`. */\ntype ClassValue = string | number | boolean | null | undefined | ClassDictionary | readonly ClassValue[];\n\n/** `{ 'px-4': isActive }` — a class is present when its value is truthy. */\ninterface ClassDictionary {\n [className: string]: boolean | null | undefined;\n}\n\n/**\n * Utility prefixes whose remainder is a length/count, merged longest-first so\n * `px-` is matched before `p-`.\n */\nconst VALUE_UTILITY_PREFIXES: readonly string[] = [\n // Inset / spacing\n 'inset-x',\n 'inset-y',\n 'inset',\n 'scroll-mx',\n 'scroll-my',\n 'scroll-m',\n 'scroll-px',\n 'scroll-py',\n 'scroll-p',\n 'start',\n 'end',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'space-x',\n 'space-y',\n 'gap-x',\n 'gap-y',\n 'gap',\n 'px',\n 'py',\n 'pt',\n 'pr',\n 'pb',\n 'pl',\n 'ps',\n 'pe',\n 'p',\n 'mx',\n 'my',\n 'mt',\n 'mr',\n 'mb',\n 'ml',\n 'ms',\n 'me',\n 'm',\n // Sizing\n 'min-w',\n 'min-h',\n 'max-w',\n 'max-h',\n 'size',\n 'w',\n 'h',\n // Radius\n 'rounded-ss',\n 'rounded-se',\n 'rounded-ee',\n 'rounded-es',\n 'rounded-tl',\n 'rounded-tr',\n 'rounded-br',\n 'rounded-bl',\n 'rounded-s',\n 'rounded-e',\n 'rounded-t',\n 'rounded-r',\n 'rounded-b',\n 'rounded-l',\n 'rounded',\n // Border width (a border *colour* never has a numeric suffix)\n 'border-x',\n 'border-y',\n 'border-t',\n 'border-r',\n 'border-b',\n 'border-l',\n 'border-s',\n 'border-e',\n 'border',\n // Ring / outline width, divide, translate/scale/rotate\n 'ring-offset',\n 'ring',\n 'divide-x',\n 'divide-y',\n 'outline-offset',\n 'translate-x',\n 'translate-y',\n 'scale',\n 'rotate',\n // Grid\n 'col-span',\n 'row-span',\n 'grid-cols',\n 'grid-rows',\n // Flex box\n 'basis',\n 'grow',\n 'shrink',\n 'order',\n 'z',\n 'opacity',\n 'leading',\n 'tracking',\n 'duration',\n 'delay',\n];\n\n/**\n * Single-word utilities that have no value, grouped by the property they set.\n * Only words that are unambiguously that property are listed — `font-medium`\n * (weight) is here, `font-mono` (family) is not.\n */\nconst SINGLETON_UTILITIES: Record<string, string> = {\n // Position\n static: 'position',\n fixed: 'position',\n absolute: 'position',\n relative: 'position',\n sticky: 'position',\n // Display\n block: 'display',\n inline: 'display',\n 'inline-block': 'display',\n flex: 'display',\n 'inline-flex': 'display',\n grid: 'display',\n 'inline-grid': 'display',\n table: 'display',\n hidden: 'display',\n contents: 'display',\n 'flow-root': 'display',\n 'list-item': 'display',\n // Flex direction / wrapping\n 'flex-row': 'flex-direction',\n 'flex-col': 'flex-direction',\n 'flex-row-reverse': 'flex-direction',\n 'flex-col-reverse': 'flex-direction',\n 'flex-wrap': 'flex-wrap',\n 'flex-wrap-reverse': 'flex-wrap',\n 'flex-nowrap': 'flex-wrap',\n // Justification / alignment\n 'justify-normal': 'justify-content',\n 'justify-start': 'justify-content',\n 'justify-end': 'justify-content',\n 'justify-center': 'justify-content',\n 'justify-between': 'justify-content',\n 'justify-around': 'justify-content',\n 'justify-evenly': 'justify-content',\n 'justify-stretch': 'justify-content',\n 'items-start': 'align-items',\n 'items-end': 'align-items',\n 'items-center': 'align-items',\n 'items-baseline': 'align-items',\n 'items-stretch': 'align-items',\n 'self-auto': 'align-self',\n 'self-start': 'align-self',\n 'self-end': 'align-self',\n 'self-center': 'align-self',\n 'self-stretch': 'align-self',\n // Text alignment\n 'text-left': 'text-align',\n 'text-center': 'text-align',\n 'text-right': 'text-align',\n 'text-justify': 'text-align',\n 'text-start': 'text-align',\n 'text-end': 'text-align',\n // Font weight (families are deliberately absent — see the comment above)\n 'font-thin': 'font-weight',\n 'font-extralight': 'font-weight',\n 'font-light': 'font-weight',\n 'font-normal': 'font-weight',\n 'font-medium': 'font-weight',\n 'font-semibold': 'font-weight',\n 'font-bold': 'font-weight',\n 'font-extrabold': 'font-weight',\n 'font-black': 'font-weight',\n // Visibility\n visible: 'visibility',\n invisible: 'visibility',\n collapse: 'visibility',\n};\n\n/** A length/count-like remainder: `-2`, `1.5`, `[3px]`, `px`, `full`, `none`. */\nconst VALUE_SUFFIX = /^(-?(?:\\d+\\.?\\d*|\\[[^\\]]*\\]|px|full|none|auto|screen|min|max|fit))$/;\n\nfunction isClassList(value: ClassValue): value is readonly ClassValue[] {\n return Array.isArray(value);\n}\n\n/** Pushes the whitespace-separated classes of one string, dropping empties. */\nfunction pushClasses(into: string[], value: string): void {\n for (const className of value.split(/\\s+/)) {\n if (className !== '') {\n into.push(className);\n }\n }\n}\n\n/** Flattens clsx-style inputs into the classes they contribute, in order. */\nfunction flattenClasses(values: readonly ClassValue[], into: string[]): void {\n for (const value of values) {\n if (value === null || value === undefined || value === false || value === '') {\n continue;\n }\n if (typeof value === 'string') {\n pushClasses(into, value);\n continue;\n }\n if (typeof value === 'number') {\n into.push(String(value));\n continue;\n }\n if (isClassList(value)) {\n flattenClasses(value, into);\n continue;\n }\n for (const [className, active] of Object.entries(value)) {\n if (active) {\n // A dictionary key may itself carry several classes.\n pushClasses(into, className);\n }\n }\n }\n}\n\n/**\n * Splits `hover:focus:px-2` into its variants and base, ignoring the colons\n * that appear inside an arbitrary value such as `bg-[url(https://…)]`.\n */\nfunction splitVariants(className: string): { variants: string; base: string } {\n let depth = 0;\n let lastSeparator = -1;\n for (let index = 0; index < className.length; index += 1) {\n const character = className[index];\n if (character === '[' || character === '(') {\n depth += 1;\n } else if (character === ']' || character === ')') {\n depth -= 1;\n } else if (character === ':' && depth === 0) {\n lastSeparator = index;\n }\n }\n if (lastSeparator === -1) {\n return { variants: '', base: className };\n }\n return { variants: className.slice(0, lastSeparator), base: className.slice(lastSeparator + 1) };\n}\n\n/**\n * The merge group a class belongs to, or `null` when it must be left alone.\n *\n * Two classes merge only when their group is equal, and the group carries the\n * variant prefix — `sm:px-2` never overrides a bare `px-4`.\n */\nfunction groupKeyFor(className: string): string | null {\n const { variants, base } = splitVariants(className);\n const singletonGroup = SINGLETON_UTILITIES[base];\n if (singletonGroup !== undefined) {\n return `${variants}|${singletonGroup}`;\n }\n for (const prefix of VALUE_UTILITY_PREFIXES) {\n if (base === prefix) {\n return `${variants}|${prefix}`;\n }\n if (!base.startsWith(`${prefix}-`)) {\n continue;\n }\n // `important` and a trailing `!` are not values; neither is an unknown word,\n // which is how `text-sm`/`border-white` escape the numeric families.\n const suffix = base.slice(prefix.length + 1);\n if (!VALUE_SUFFIX.test(suffix)) {\n return null;\n }\n return `${variants}|${prefix}`;\n }\n return null;\n}\n\n/** Drops an exact duplicate, keeping its last occurrence. */\nfunction dedupeClasses(classes: readonly string[]): string[] {\n const lastIndex = new Map<string, number>();\n classes.forEach((className, index) => {\n lastIndex.set(className, index);\n });\n return classes.filter((className, index) => lastIndex.get(className) === index);\n}\n\n/** Drops each class that a later member of its own group has replaced. */\nfunction mergeGroups(classes: readonly string[]): string[] {\n const merged: string[] = [];\n const positionByGroup = new Map<string, number>();\n for (const className of classes) {\n const group = groupKeyFor(className);\n if (group !== null) {\n const previous = positionByGroup.get(group);\n if (previous !== undefined) {\n merged[previous] = '';\n }\n positionByGroup.set(group, merged.length);\n }\n merged.push(className);\n }\n return merged.filter((className) => className !== '');\n}\n\n/**\n * Joins class names, dropping falsy entries, exact duplicates, and superseded\n * utilities.\n *\n * ```ts\n * cn('px-4', undefined, ['py-2', { 'font-bold': isActive }], 'px-6'); // 'py-2 px-6'\n * ```\n */\nfunction cn(...inputs: ClassValue[]): string {\n const flattened: string[] = [];\n flattenClasses(inputs, flattened);\n return mergeGroups(dedupeClasses(flattened)).join(' ');\n}\n\nexport { cn };\nexport type { ClassDictionary, ClassValue };\n"]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/utils.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Class-name composition.\n *\n * ## Provenance\n *\n * `lib/utils.ts` in **CalDAV-Bridge**, **Durable-DAV**, **Durable-DAV-Router**,\n * **Edge-Git**, **Edge-Sonic** and **Mail-Otter** — six byte-identical copies of\n *\n * ```ts\n * export function cn(...inputs: ClassValue[]) {\n * return twMerge(clsx(inputs));\n * }\n * ```\n *\n * The kit cannot import `clsx` or `tailwind-merge` (this package declares no\n * dependency on either, and the consumers' own copies stay theirs), so the same\n * contract is implemented here in-dependency-free form:\n *\n * - **clsx semantics** — strings, numbers, arrays and `{ [class]: active }`\n * dictionaries are flattened, and falsy entries are dropped.\n * - **tailwind-merge semantics, for a documented subset** — when a later class\n * belongs to the same utility family as an earlier one, the earlier one is\n * dropped, so `<Button className=\"px-6\">` really does override the base\n * `px-4` instead of shipping both and letting stylesheet order decide.\n *\n * The merged families are the ones whose value is a length or a count —\n * spacing, sizing, border width, radius, transitions — plus the single-word\n * utilities (position, display, flex direction, justification, alignment, text\n * alignment, font weight). Families whose suffix is *not* a value\n * (`text-red-500`, `bg-[var(--color-accent)]`, `border-white`) are left in\n * source order on purpose: telling `text-sm` from `text-red-500` takes\n * tailwind-merge's full class table, and guessing wrong would silently drop a\n * colour. A consumer that needs the complete table can wrap this one:\n * `const cn = (...values: ClassValue[]) => twMerge(kitCn(...values))`.\n */\n\n/**\nEverything `cn` accepts, mirroring clsx's `ClassValue`.\n*/\ntype ClassValue = string | number | boolean | null | undefined | ClassDictionary | readonly ClassValue[];\n\n/**\n`{ 'px-4': isActive }` — a class is present when its value is truthy.\n*/\ninterface ClassDictionary {\n [className: string]: boolean | null | undefined;\n}\n\n/**\n * Utility prefixes whose remainder is a length/count, merged longest-first so\n * `px-` is matched before `p-`.\n */\nconst VALUE_UTILITY_PREFIXES: readonly string[] = [\n // Inset / spacing\n 'inset-x',\n 'inset-y',\n 'inset',\n 'scroll-mx',\n 'scroll-my',\n 'scroll-m',\n 'scroll-px',\n 'scroll-py',\n 'scroll-p',\n 'start',\n 'end',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'space-x',\n 'space-y',\n 'gap-x',\n 'gap-y',\n 'gap',\n 'px',\n 'py',\n 'pt',\n 'pr',\n 'pb',\n 'pl',\n 'ps',\n 'pe',\n 'p',\n 'mx',\n 'my',\n 'mt',\n 'mr',\n 'mb',\n 'ml',\n 'ms',\n 'me',\n 'm',\n // Sizing\n 'min-w',\n 'min-h',\n 'max-w',\n 'max-h',\n 'size',\n 'w',\n 'h',\n // Radius\n 'rounded-ss',\n 'rounded-se',\n 'rounded-ee',\n 'rounded-es',\n 'rounded-tl',\n 'rounded-tr',\n 'rounded-br',\n 'rounded-bl',\n 'rounded-s',\n 'rounded-e',\n 'rounded-t',\n 'rounded-r',\n 'rounded-b',\n 'rounded-l',\n 'rounded',\n // Border width (a border *colour* never has a numeric suffix)\n 'border-x',\n 'border-y',\n 'border-t',\n 'border-r',\n 'border-b',\n 'border-l',\n 'border-s',\n 'border-e',\n 'border',\n // Ring / outline width, divide, translate/scale/rotate\n 'ring-offset',\n 'ring',\n 'divide-x',\n 'divide-y',\n 'outline-offset',\n 'translate-x',\n 'translate-y',\n 'scale',\n 'rotate',\n // Grid\n 'col-span',\n 'row-span',\n 'grid-cols',\n 'grid-rows',\n // Flex box\n 'basis',\n 'grow',\n 'shrink',\n 'order',\n 'z',\n 'opacity',\n 'leading',\n 'tracking',\n 'duration',\n 'delay',\n];\n\n/**\n * Single-word utilities that have no value, grouped by the property they set.\n * Only words that are unambiguously that property are listed — `font-medium`\n * (weight) is here, `font-mono` (family) is not.\n */\nconst SINGLETON_UTILITIES: Record<string, string> = {\n // Position\n static: 'position',\n fixed: 'position',\n absolute: 'position',\n relative: 'position',\n sticky: 'position',\n // Display\n block: 'display',\n inline: 'display',\n 'inline-block': 'display',\n flex: 'display',\n 'inline-flex': 'display',\n grid: 'display',\n 'inline-grid': 'display',\n table: 'display',\n hidden: 'display',\n contents: 'display',\n 'flow-root': 'display',\n 'list-item': 'display',\n // Flex direction / wrapping\n 'flex-row': 'flex-direction',\n 'flex-col': 'flex-direction',\n 'flex-row-reverse': 'flex-direction',\n 'flex-col-reverse': 'flex-direction',\n 'flex-wrap': 'flex-wrap',\n 'flex-wrap-reverse': 'flex-wrap',\n 'flex-nowrap': 'flex-wrap',\n // Justification / alignment\n 'justify-normal': 'justify-content',\n 'justify-start': 'justify-content',\n 'justify-end': 'justify-content',\n 'justify-center': 'justify-content',\n 'justify-between': 'justify-content',\n 'justify-around': 'justify-content',\n 'justify-evenly': 'justify-content',\n 'justify-stretch': 'justify-content',\n 'items-start': 'align-items',\n 'items-end': 'align-items',\n 'items-center': 'align-items',\n 'items-baseline': 'align-items',\n 'items-stretch': 'align-items',\n 'self-auto': 'align-self',\n 'self-start': 'align-self',\n 'self-end': 'align-self',\n 'self-center': 'align-self',\n 'self-stretch': 'align-self',\n // Text alignment\n 'text-left': 'text-align',\n 'text-center': 'text-align',\n 'text-right': 'text-align',\n 'text-justify': 'text-align',\n 'text-start': 'text-align',\n 'text-end': 'text-align',\n // Font weight (families are deliberately absent — see the comment above)\n 'font-thin': 'font-weight',\n 'font-extralight': 'font-weight',\n 'font-light': 'font-weight',\n 'font-normal': 'font-weight',\n 'font-medium': 'font-weight',\n 'font-semibold': 'font-weight',\n 'font-bold': 'font-weight',\n 'font-extrabold': 'font-weight',\n 'font-black': 'font-weight',\n // Visibility\n visible: 'visibility',\n invisible: 'visibility',\n collapse: 'visibility',\n};\n\n/**\nA length/count-like remainder: `-2`, `1.5`, `[3px]`, `px`, `full`, `none`.\n*/\nconst VALUE_SUFFIX = /^-?(?:\\d+(?:\\.\\d*)?|\\[[^\\]]*\\]|px|full|none|auto|screen|min|max|fit)$/;\n\nfunction isClassList(value: ClassValue): value is readonly ClassValue[] {\n return Array.isArray(value);\n}\n\n/**\nPushes the whitespace-separated classes of one string, dropping empties.\n*/\nfunction pushClasses(into: string[], value: string): void {\n for (const className of value.split(/\\s+/)) {\n if (className !== '') {\n into.push(className);\n }\n }\n}\n\n/**\nFlattens clsx-style inputs into the classes they contribute, in order.\n*/\nfunction flattenClasses(values: readonly ClassValue[], into: string[]): void {\n for (const value of values) {\n if (value === null || value === undefined || value === false || value === '') {\n continue;\n }\n if (typeof value === 'string') {\n pushClasses(into, value);\n continue;\n }\n if (typeof value === 'number') {\n into.push(String(value));\n continue;\n }\n if (isClassList(value)) {\n flattenClasses(value, into);\n continue;\n }\n for (const [className, active] of Object.entries(value)) {\n if (active) {\n // A dictionary key may itself carry several classes.\n pushClasses(into, className);\n }\n }\n }\n}\n\n/**\n * Splits `hover:focus:px-2` into its variants and base, ignoring the colons\n * that appear inside an arbitrary value such as `bg-[url(https://…)]`.\n */\nfunction splitVariants(className: string): { variants: string; base: string } {\n let depth = 0;\n let lastSeparator = -1;\n let index = 0;\n while (index < className.length) {\n const character = className[index];\n if (character === '[' || character === '(') {\n depth += 1;\n } else if (character === ']' || character === ')') {\n depth -= 1;\n } else if (character === ':' && depth === 0) {\n lastSeparator = index;\n }\n index += 1;\n }\n if (lastSeparator === -1) {\n return { variants: '', base: className };\n }\n return { variants: className.slice(0, lastSeparator), base: className.slice(lastSeparator + 1) };\n}\n\n/**\n * The merge group a class belongs to, or `null` when it must be left alone.\n *\n * Two classes merge only when their group is equal, and the group carries the\n * variant prefix — `sm:px-2` never overrides a bare `px-4`.\n */\nfunction groupKeyFor(className: string): string | null {\n const { variants, base } = splitVariants(className);\n if (Object.hasOwn(SINGLETON_UTILITIES, base)) {\n return `${variants}|${SINGLETON_UTILITIES[base]}`;\n }\n for (const prefix of VALUE_UTILITY_PREFIXES) {\n if (base === prefix) {\n return `${variants}|${prefix}`;\n }\n if (!base.startsWith(`${prefix}-`)) {\n continue;\n }\n // `important` and a trailing `!` are not values; neither is an unknown word,\n // which is how `text-sm`/`border-white` escape the numeric families.\n const suffix = base.slice(prefix.length + 1);\n if (!VALUE_SUFFIX.test(suffix)) {\n return null;\n }\n return `${variants}|${prefix}`;\n }\n return null;\n}\n\n/**\nDrops an exact duplicate, keeping its last occurrence.\n*/\nfunction dedupeClasses(classes: readonly string[]): string[] {\n const lastIndex = new Map<string, number>();\n classes.forEach((className, index) => {\n lastIndex.set(className, index);\n });\n return classes.filter((className, index) => lastIndex.get(className) === index);\n}\n\n/**\nDrops each class that a later member of its own group has replaced.\n*/\nfunction mergeGroups(classes: readonly string[]): string[] {\n const merged: string[] = [];\n const positionByGroup = new Map<string, number>();\n for (const className of classes) {\n const group = groupKeyFor(className);\n if (group !== null) {\n const previous = positionByGroup.get(group);\n if (previous !== undefined) {\n merged[previous] = '';\n }\n positionByGroup.set(group, merged.length);\n }\n merged.push(className);\n }\n return merged.filter((className) => className !== '');\n}\n\n/**\n * Joins class names, dropping falsy entries, exact duplicates, and superseded\n * utilities.\n *\n * ```ts\n * cn('px-4', undefined, ['py-2', { 'font-bold': isActive }], 'px-6'); // 'py-2 px-6'\n * ```\n */\nfunction cn(...inputs: ClassValue[]): string {\n const flattened: string[] = [];\n flattenClasses(inputs, flattened);\n return mergeGroups(dedupeClasses(flattened)).join(' ');\n}\n\nexport { cn };\nexport type { ClassDictionary, ClassValue };\n"],
|
|
5
|
+
"mappings": "AAoDA,MAAMA,EAA4C,CAEhD,UACA,UACA,QACA,YACA,YACA,WACA,YACA,YACA,WACA,QACA,MACA,MACA,QACA,SACA,OACA,UACA,UACA,QACA,QACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IAEA,QACA,QACA,QACA,QACA,OACA,IACA,IAEA,aACA,aACA,aACA,aACA,aACA,aACA,aACA,aACA,YACA,YACA,YACA,YACA,YACA,YACA,UAEA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,SAEA,cACA,OACA,WACA,WACA,iBACA,cACA,cACA,QACA,SAEA,WACA,WACA,YACA,YAEA,QACA,OACA,SACA,QACA,IACA,UACA,UACA,WACA,WACA,SAQIC,EAA8C,CAElD,OAAQ,WACR,MAAO,WACP,SAAU,WACV,SAAU,WACV,OAAQ,WAER,MAAO,UACP,OAAQ,UACR,eAAgB,UAChB,KAAM,UACN,cAAe,UACf,KAAM,UACN,cAAe,UACf,MAAO,UACP,OAAQ,UACR,SAAU,UACV,YAAa,UACb,YAAa,UAEb,WAAY,iBACZ,WAAY,iBACZ,mBAAoB,iBACpB,mBAAoB,iBACpB,YAAa,YACb,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IAAa,SACfH,EAAOG,CAAQ,EAAI,IAErBF,EAAgB,IAAIC,EAAOF,EAAO,MAAM,CAC1C,CACAA,EAAO,KAAKlB,CAAS,CACvB,CACA,OAAOkB,EAAO,OAAQlB,GAAcA,IAAc,EAAE,CACtD,CAUA,SAASsB,KAAMC,EAAoB,CACjC,MAAMC,EAAsB,CAAA,EAC5B,OAAAvB,EAAesB,EAAQC,CAAS,EACzBP,EAAYH,EAAcU,CAAS,CAAC,EAAE,KAAK,GAAG,CACvD",
|
|
6
|
+
"names": ["VALUE_UTILITY_PREFIXES", "SINGLETON_UTILITIES", "VALUE_SUFFIX", "isClassList", "value", "pushClasses", "into", "className", "flattenClasses", "values", "active", "splitVariants", "depth", "lastSeparator", "index", "character", "groupKeyFor", "variants", "base", "prefix", "suffix", "dedupeClasses", "classes", "lastIndex", "mergeGroups", "merged", "positionByGroup", "group", "previous", "cn", "inputs", "flattened"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rexezuge/web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@rexezuge/errors": "1.
|
|
29
|
-
"@rexezuge/shared": "1.
|
|
28
|
+
"@rexezuge/errors": "1.4.0",
|
|
29
|
+
"@rexezuge/shared": "1.4.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"lucide-react": "^1.49.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"description": "React UI primitives, hooks, and API client for the family SPAs.",
|
|
52
52
|
"scripts": {
|
|
53
|
-
"build": "tsc -p tsconfig.json",
|
|
53
|
+
"build": "tsc -p tsconfig.json && node ../../scripts/minify-dist.mjs",
|
|
54
54
|
"typecheck": "tsc -p tsconfig.test.json --noEmit",
|
|
55
55
|
"test": "vitest run"
|
|
56
56
|
}
|