vitrify 0.17.9 → 0.17.10
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.
|
@@ -48,12 +48,12 @@ const shortcuts = [
|
|
|
48
48
|
[
|
|
49
49
|
/^q-gutter-x-(none|xs|sm|md|lg|xl)$/,
|
|
50
50
|
([, size], { theme }) => `ml--${colGutter[size]}
|
|
51
|
-
space-x-${colGutter[size]}
|
|
51
|
+
space-x-${colGutter[size]}`
|
|
52
52
|
],
|
|
53
53
|
[
|
|
54
54
|
/^q-gutter-y-(none|xs|sm|md|lg|xl)$/,
|
|
55
55
|
([, size], { theme }) => `mt--${colGutter[size]}
|
|
56
|
-
space-y-${colGutter[size]}
|
|
56
|
+
space-y-${colGutter[size]}`
|
|
57
57
|
],
|
|
58
58
|
[/^wrap$/, ([, size], { theme }) => `flex-wrap`],
|
|
59
59
|
[/^no-wrap$/, ([, size], { theme }) => `flex-nowrap`],
|
|
@@ -82,10 +82,10 @@ import { preflights as DarkPreflights, shortcuts as DarkShortcuts } from './core
|
|
|
82
82
|
import { shortcuts as ElevationShortcuts, rules as ElevationRules } from './core/elevation.unocss.js';
|
|
83
83
|
import { shortcuts as FlexShortcuts } from './core/flex.unocss.js';
|
|
84
84
|
import { rules as HelperRules, preflights as HelperPreflights, shortcuts as HelperShortcuts } from './core/helpers.unocss.js';
|
|
85
|
-
import { preflights as MousePreflights, shortcuts as MouseShortcuts } from './core/mouse.unocss.js';
|
|
85
|
+
import { preflights as MousePreflights, shortcuts as MouseShortcuts, rules as MouseRules } from './core/mouse.unocss.js';
|
|
86
86
|
import { shortcuts as OrientationShortcuts } from './core/orientation.unocss.js';
|
|
87
87
|
import { shortcuts as PositionShortcuts } from './core/position.unocss.js';
|
|
88
|
-
import { shortcuts as SizeShortcuts } from './core/size.unocss.js';
|
|
88
|
+
import { preflights as SizePreflights, shortcuts as SizeShortcuts } from './core/size.unocss.js';
|
|
89
89
|
import { shortcuts as TouchShortcuts } from './core/touch.unocss.js';
|
|
90
90
|
import { preflights as TransitionPreflights, shortcuts as TransitionsShortcuts } from './core/transitions.unocss.js';
|
|
91
91
|
import { preflights as TypographyPreflights, shortcuts as TypographyShortcuts } from './core/typography.unocss.js';
|
|
@@ -230,10 +230,63 @@ const pluginSafelistMap = {
|
|
|
230
230
|
'q-btn__progress-indicator',
|
|
231
231
|
'q-btn__progress--dark',
|
|
232
232
|
'q-spinner',
|
|
233
|
-
'q-spinner-mat'
|
|
233
|
+
'q-spinner-mat',
|
|
234
|
+
'q-notifications__list',
|
|
235
|
+
'q-notifications__list--center',
|
|
236
|
+
'q-notifications__list--top',
|
|
237
|
+
'q-notifications__list--bottom',
|
|
238
|
+
'q-notification',
|
|
239
|
+
'q-notification__icon',
|
|
240
|
+
'q-notification__icon--additional',
|
|
241
|
+
'q-notification__avatar',
|
|
242
|
+
'q-notification__avatar--additional',
|
|
243
|
+
'q-notification__spinner',
|
|
244
|
+
'q-notification__spinner--additional',
|
|
245
|
+
'q-notification__message',
|
|
246
|
+
'q-notification__caption',
|
|
247
|
+
'q-notification__actions',
|
|
248
|
+
'q-notification__badge',
|
|
249
|
+
'q-notification__badge--top-left',
|
|
250
|
+
'q-notification__badge--top-right',
|
|
251
|
+
'q-notification__badge--bottom-left',
|
|
252
|
+
'q-notification__badge--bottom-right',
|
|
253
|
+
'q-notification__progress',
|
|
254
|
+
'q-notification--standard',
|
|
255
|
+
'q-notification--multi-line',
|
|
256
|
+
'q-notification--top-left-enter-from',
|
|
257
|
+
'q-notification--top-left-leave-to',
|
|
258
|
+
'q-notification--top-enter-from',
|
|
259
|
+
'q-notification--top-leave-to',
|
|
260
|
+
'q-notification--top-right-enter-from',
|
|
261
|
+
'q-notification--top-right-leave-to',
|
|
262
|
+
'q-notification--left-enter-from',
|
|
263
|
+
'q-notification--left-leave-to',
|
|
264
|
+
'q-notification--center-enter-from',
|
|
265
|
+
'q-notification--center-leave-to',
|
|
266
|
+
'q-notification--right-enter-from',
|
|
267
|
+
'q-notification--right-leave-to',
|
|
268
|
+
'q-notification--bottom-left-enter-from',
|
|
269
|
+
'q-notification--bottom-left-leave-to',
|
|
270
|
+
'q-notification--bottom-enter-from',
|
|
271
|
+
'q-notification--bottom-leave-to',
|
|
272
|
+
'q-notification--bottom-right-enter-from',
|
|
273
|
+
'q-notification--bottom-right-leave-to',
|
|
274
|
+
'q-notification--top-left-leave-active',
|
|
275
|
+
'q-notification--top-leave-active',
|
|
276
|
+
'q-notification--top-right-leave-active',
|
|
277
|
+
'q-notification--left-leave-active',
|
|
278
|
+
'q-notification--center-leave-active',
|
|
279
|
+
'q-notification--right-leave-active',
|
|
280
|
+
'q-notification--bottom-left-leave-active',
|
|
281
|
+
'q-notification--bottom-leave-active',
|
|
282
|
+
'q-notification--bottom-right-leave-active'
|
|
234
283
|
]
|
|
235
284
|
};
|
|
236
285
|
const baseSafelist = [
|
|
286
|
+
'bg-primary',
|
|
287
|
+
'col',
|
|
288
|
+
'row',
|
|
289
|
+
'text-primary',
|
|
237
290
|
'absolute',
|
|
238
291
|
'absolute-bottom',
|
|
239
292
|
'absolute-full',
|
|
@@ -1700,8 +1753,8 @@ export default definePreset((options = {}) => {
|
|
|
1700
1753
|
}
|
|
1701
1754
|
/* beasties:include end */`
|
|
1702
1755
|
}
|
|
1703
|
-
].concat(QBreadcrumbsPreflights, QCheckboxPreflights, QChipPreflights, QCircularProgressPreflights, QDialogPreflights, QFieldPreflights, QLayoutPreflights, QLinearProgressPreflights, QRadioPreflights, QSelectPreflights, QSpinnerPreflights, QSkeletonPreflights, QTablePreflights, QTogglePreflights, QTreePreflights, ColorPreflights, DarkPreflights, HelperPreflights, MousePreflights, TypographyPreflights, VisibilityPreflights, TransitionPreflights),
|
|
1704
|
-
rules: [].concat(HelperRules, ElevationRules, VisibilityRules),
|
|
1756
|
+
].concat(QBreadcrumbsPreflights, QCheckboxPreflights, QChipPreflights, QCircularProgressPreflights, QDialogPreflights, QFieldPreflights, QLayoutPreflights, QLinearProgressPreflights, QRadioPreflights, QSelectPreflights, QSpinnerPreflights, QSkeletonPreflights, QTablePreflights, QTogglePreflights, QTreePreflights, ColorPreflights, DarkPreflights, HelperPreflights, MousePreflights, TypographyPreflights, VisibilityPreflights, TransitionPreflights, SizePreflights),
|
|
1757
|
+
rules: [].concat(MouseRules, HelperRules, ElevationRules, VisibilityRules),
|
|
1705
1758
|
shortcuts: [].concat(QIconShortcuts, QAjaxBarShortcuts, QAvatarShortcuts, QBadgeShortcuts, QBreadcrumbsShortcuts, QBannerShortcuts, QBarShortcuts, QBtnShortcuts, QBtnDropdownShortcuts, QBtnGroupShortcuts, QBtnToggleShortcuts, QCardShortcuts, QCarouselShortcuts, QChatMessageShortcuts, QCheckboxShortcuts, QChipShortcuts, QCircularProgressShortcuts, QColorPickerShortcuts, QDateShortcuts, QDialogShortcuts, QEditorShortcuts, QExpansionItemShortcuts, QFabShortcuts, QFieldShortcuts, QFileShortcuts, QFormShortcuts, QImgShortcuts, QInnerLoadingShortcuts, QInputShortcuts, QIntersectionShortcuts, QItemShortcuts, QKnobShortcuts, QLayoutShortcuts, QLinearProgressShortcuts, QMenuShortcuts, QOptionGroupShortcuts, QPageShortcuts, QPageStickyShortcuts, QPaginationShortcuts, QParallaxShortcuts, QPopupEditShortcuts, QPullToRefreshShortcuts, QRadioShortcuts, QRatingShortcuts, QResponsiveShortcuts, QScrollareaShortcuts, QSelectShortcuts, QSeparatorShortcuts, QSkeletonShortcuts, QSlideItemShortcuts, QSliderShortcuts, QSpaceShortcuts, QSpinnerShortcuts, QSplitterShortcuts, QStepperShortcuts, QTabPanelShortcuts, QTableShortcuts, QTabsShortcuts, QTimeShortcuts, QTimelineShortcuts, QToggleShortcuts, QToolbarShortcuts, QTooltipShortcuts, QTreeShortcuts, QUploaderShortcuts, QVideoShortcuts, QVirtualScrollShortcuts, PanelShortcuts, QMorphShortcuts, QRippleShortcuts, QBottomSheetShortcuts, QDialogPluginShortcuts, QLoadingShortcuts, QNotifyShortcuts, DarkShortcuts, FlexShortcuts, HelperShortcuts, MouseShortcuts, OrientationShortcuts, PositionShortcuts, SizeShortcuts, TouchShortcuts, TransitionsShortcuts, TypographyShortcuts, VisibilityShortcuts, QHeaderShortcuts, QFooterShortcuts, QDrawerShortcuts, ElevationShortcuts),
|
|
1706
1759
|
theme: defaultTheme,
|
|
1707
1760
|
variants: [
|
|
@@ -1715,6 +1768,7 @@ export default definePreset((options = {}) => {
|
|
|
1715
1768
|
const kebabMatch = code.matchAll(/q-(\w)([\w-]*)/g);
|
|
1716
1769
|
const pascalMatch = code.matchAll(/Q([A-Z][a-z0-9]+)+/g);
|
|
1717
1770
|
const transitionMatch = code.matchAll(/(transition|transition-show|transition-hide)="(\S*)"/g);
|
|
1771
|
+
const colorMatch = code.matchAll(/color="(\S*)"/g);
|
|
1718
1772
|
const matches = [];
|
|
1719
1773
|
for (const match of kebabMatch)
|
|
1720
1774
|
matches.push(match[0]);
|
|
@@ -1732,8 +1786,12 @@ export default definePreset((options = {}) => {
|
|
|
1732
1786
|
'leave-to'
|
|
1733
1787
|
].map((v) => `q-transition--${match[2]}-${v}`));
|
|
1734
1788
|
}
|
|
1789
|
+
const colorClasses = [];
|
|
1790
|
+
for (const match of colorMatch) {
|
|
1791
|
+
colorClasses.push(`text-${match[1]}`, `bg-${match[1]}`);
|
|
1792
|
+
}
|
|
1735
1793
|
const classes = qClasses.filter((c) => matches.some((component) => c.includes(component)));
|
|
1736
|
-
classes.push(...transitionClasses);
|
|
1794
|
+
classes.push(...transitionClasses, ...colorClasses);
|
|
1737
1795
|
return classes;
|
|
1738
1796
|
}
|
|
1739
1797
|
}
|
package/package.json
CHANGED
|
@@ -59,13 +59,13 @@ const shortcuts: UserShortcuts<QuasarTheme> = [
|
|
|
59
59
|
/^q-gutter-x-(none|xs|sm|md|lg|xl)$/,
|
|
60
60
|
([, size], { theme }) =>
|
|
61
61
|
`ml--${colGutter[size as 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl']}
|
|
62
|
-
space-x-${colGutter[size as 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl']}
|
|
62
|
+
space-x-${colGutter[size as 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl']}`
|
|
63
63
|
],
|
|
64
64
|
[
|
|
65
65
|
/^q-gutter-y-(none|xs|sm|md|lg|xl)$/,
|
|
66
66
|
([, size], { theme }) =>
|
|
67
67
|
`mt--${colGutter[size as 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl']}
|
|
68
|
-
space-y-${colGutter[size as 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl']}
|
|
68
|
+
space-y-${colGutter[size as 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl']}`
|
|
69
69
|
],
|
|
70
70
|
[/^wrap$/, ([, size], { theme }) => `flex-wrap`],
|
|
71
71
|
[/^no-wrap$/, ([, size], { theme }) => `flex-nowrap`],
|
|
@@ -150,11 +150,15 @@ import {
|
|
|
150
150
|
} from './core/helpers.unocss.js'
|
|
151
151
|
import {
|
|
152
152
|
preflights as MousePreflights,
|
|
153
|
-
shortcuts as MouseShortcuts
|
|
153
|
+
shortcuts as MouseShortcuts,
|
|
154
|
+
rules as MouseRules
|
|
154
155
|
} from './core/mouse.unocss.js'
|
|
155
156
|
import { shortcuts as OrientationShortcuts } from './core/orientation.unocss.js'
|
|
156
157
|
import { shortcuts as PositionShortcuts } from './core/position.unocss.js'
|
|
157
|
-
import {
|
|
158
|
+
import {
|
|
159
|
+
preflights as SizePreflights,
|
|
160
|
+
shortcuts as SizeShortcuts
|
|
161
|
+
} from './core/size.unocss.js'
|
|
158
162
|
import { shortcuts as TouchShortcuts } from './core/touch.unocss.js'
|
|
159
163
|
import {
|
|
160
164
|
preflights as TransitionPreflights,
|
|
@@ -319,11 +323,64 @@ const pluginSafelistMap: Partial<Record<keyof QuasarPlugins, string[]>> = {
|
|
|
319
323
|
'q-btn__progress-indicator',
|
|
320
324
|
'q-btn__progress--dark',
|
|
321
325
|
'q-spinner',
|
|
322
|
-
'q-spinner-mat'
|
|
326
|
+
'q-spinner-mat',
|
|
327
|
+
'q-notifications__list',
|
|
328
|
+
'q-notifications__list--center',
|
|
329
|
+
'q-notifications__list--top',
|
|
330
|
+
'q-notifications__list--bottom',
|
|
331
|
+
'q-notification',
|
|
332
|
+
'q-notification__icon',
|
|
333
|
+
'q-notification__icon--additional',
|
|
334
|
+
'q-notification__avatar',
|
|
335
|
+
'q-notification__avatar--additional',
|
|
336
|
+
'q-notification__spinner',
|
|
337
|
+
'q-notification__spinner--additional',
|
|
338
|
+
'q-notification__message',
|
|
339
|
+
'q-notification__caption',
|
|
340
|
+
'q-notification__actions',
|
|
341
|
+
'q-notification__badge',
|
|
342
|
+
'q-notification__badge--top-left',
|
|
343
|
+
'q-notification__badge--top-right',
|
|
344
|
+
'q-notification__badge--bottom-left',
|
|
345
|
+
'q-notification__badge--bottom-right',
|
|
346
|
+
'q-notification__progress',
|
|
347
|
+
'q-notification--standard',
|
|
348
|
+
'q-notification--multi-line',
|
|
349
|
+
'q-notification--top-left-enter-from',
|
|
350
|
+
'q-notification--top-left-leave-to',
|
|
351
|
+
'q-notification--top-enter-from',
|
|
352
|
+
'q-notification--top-leave-to',
|
|
353
|
+
'q-notification--top-right-enter-from',
|
|
354
|
+
'q-notification--top-right-leave-to',
|
|
355
|
+
'q-notification--left-enter-from',
|
|
356
|
+
'q-notification--left-leave-to',
|
|
357
|
+
'q-notification--center-enter-from',
|
|
358
|
+
'q-notification--center-leave-to',
|
|
359
|
+
'q-notification--right-enter-from',
|
|
360
|
+
'q-notification--right-leave-to',
|
|
361
|
+
'q-notification--bottom-left-enter-from',
|
|
362
|
+
'q-notification--bottom-left-leave-to',
|
|
363
|
+
'q-notification--bottom-enter-from',
|
|
364
|
+
'q-notification--bottom-leave-to',
|
|
365
|
+
'q-notification--bottom-right-enter-from',
|
|
366
|
+
'q-notification--bottom-right-leave-to',
|
|
367
|
+
'q-notification--top-left-leave-active',
|
|
368
|
+
'q-notification--top-leave-active',
|
|
369
|
+
'q-notification--top-right-leave-active',
|
|
370
|
+
'q-notification--left-leave-active',
|
|
371
|
+
'q-notification--center-leave-active',
|
|
372
|
+
'q-notification--right-leave-active',
|
|
373
|
+
'q-notification--bottom-left-leave-active',
|
|
374
|
+
'q-notification--bottom-leave-active',
|
|
375
|
+
'q-notification--bottom-right-leave-active'
|
|
323
376
|
]
|
|
324
377
|
}
|
|
325
378
|
|
|
326
379
|
const baseSafelist = [
|
|
380
|
+
'bg-primary',
|
|
381
|
+
'col',
|
|
382
|
+
'row',
|
|
383
|
+
'text-primary',
|
|
327
384
|
'absolute',
|
|
328
385
|
'absolute-bottom',
|
|
329
386
|
'absolute-full',
|
|
@@ -1821,9 +1878,11 @@ export default definePreset((options: QuasarPresetOptions = {}) => {
|
|
|
1821
1878
|
MousePreflights,
|
|
1822
1879
|
TypographyPreflights,
|
|
1823
1880
|
VisibilityPreflights,
|
|
1824
|
-
TransitionPreflights
|
|
1881
|
+
TransitionPreflights,
|
|
1882
|
+
SizePreflights
|
|
1825
1883
|
),
|
|
1826
1884
|
rules: ([] as Rule<QuasarTheme>[]).concat(
|
|
1885
|
+
MouseRules,
|
|
1827
1886
|
HelperRules,
|
|
1828
1887
|
ElevationRules,
|
|
1829
1888
|
VisibilityRules
|
|
@@ -1935,6 +1994,7 @@ export default definePreset((options: QuasarPresetOptions = {}) => {
|
|
|
1935
1994
|
const transitionMatch = code.matchAll(
|
|
1936
1995
|
/(transition|transition-show|transition-hide)="(\S*)"/g
|
|
1937
1996
|
)
|
|
1997
|
+
const colorMatch = code.matchAll(/color="(\S*)"/g)
|
|
1938
1998
|
|
|
1939
1999
|
const matches: string[] = []
|
|
1940
2000
|
for (const match of kebabMatch) matches.push(match[0])
|
|
@@ -1954,11 +2014,15 @@ export default definePreset((options: QuasarPresetOptions = {}) => {
|
|
|
1954
2014
|
].map((v) => `q-transition--${match[2]}-${v}`)
|
|
1955
2015
|
)
|
|
1956
2016
|
}
|
|
2017
|
+
const colorClasses = []
|
|
2018
|
+
for (const match of colorMatch) {
|
|
2019
|
+
colorClasses.push(`text-${match[1]}`, `bg-${match[1]}`)
|
|
2020
|
+
}
|
|
1957
2021
|
|
|
1958
2022
|
const classes = qClasses.filter((c) =>
|
|
1959
2023
|
matches.some((component) => c.includes(component))
|
|
1960
2024
|
)
|
|
1961
|
-
classes.push(...transitionClasses)
|
|
2025
|
+
classes.push(...transitionClasses, ...colorClasses)
|
|
1962
2026
|
return classes
|
|
1963
2027
|
}
|
|
1964
2028
|
}
|