@m3ui-vue/m3ui-vue 0.8.7 → 0.9.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/README.md +13 -3
- package/dist/{MMenuItem-DmrsQrK7.js → MTextField-B0wGv1Mx.js} +374 -364
- package/dist/MTextField-B0wGv1Mx.js.map +1 -0
- package/dist/barcode.js +9 -11
- package/dist/barcode.js.map +1 -1
- package/dist/code-editor.js +2 -2
- package/dist/code-editor.js.map +1 -1
- package/dist/components/MCarousel.vue.d.ts +55 -36
- package/dist/components/MDialog.vue.d.ts +4 -2
- package/dist/components/MEmojiSelector.vue.d.ts +21 -5
- package/dist/components/MFabMenu.vue.d.ts +1 -1
- package/dist/components/MFlex.vue.d.ts +1 -1
- package/dist/components/MLightbox.vue.d.ts +15 -5
- package/dist/components/MScheduler.vue.d.ts +38 -1
- package/dist/components/MShape.vue.d.ts +1 -1
- package/dist/components/MSimpleCarousel.vue.d.ts +2 -2
- package/dist/components/MSlider.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +1 -1
- package/dist/components/MToolbar.vue.d.ts +1 -1
- package/dist/components/MWindow.vue.d.ts +1 -1
- package/dist/composables/_carouselStrategy.d.ts +101 -0
- package/dist/composables/useLocale.d.ts +23 -0
- package/dist/data/emoji-names/emoji-names-de.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-en.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-es.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-fr.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-ja.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-ko.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-pt.d.ts +2 -0
- package/dist/data/emoji-names/emoji-names-zh.d.ts +2 -0
- package/dist/data/emojis.d.ts +7 -1
- package/dist/emoji-names-de-BphO5XpV.js +1877 -0
- package/dist/emoji-names-de-BphO5XpV.js.map +1 -0
- package/dist/emoji-names-en-9ZvMRvzi.js +1877 -0
- package/dist/emoji-names-en-9ZvMRvzi.js.map +1 -0
- package/dist/emoji-names-es-DvfWU3Pj.js +1877 -0
- package/dist/emoji-names-es-DvfWU3Pj.js.map +1 -0
- package/dist/emoji-names-fr-B-jhUlsP.js +1877 -0
- package/dist/emoji-names-fr-B-jhUlsP.js.map +1 -0
- package/dist/emoji-names-ja-l8cMFJo1.js +1877 -0
- package/dist/emoji-names-ja-l8cMFJo1.js.map +1 -0
- package/dist/emoji-names-ko-YP-o9G0c.js +1877 -0
- package/dist/emoji-names-ko-YP-o9G0c.js.map +1 -0
- package/dist/emoji-names-pt-DGj_Js4M.js +1877 -0
- package/dist/emoji-names-pt-DGj_Js4M.js.map +1 -0
- package/dist/emoji-names-zh-Dzecwtw_.js +1877 -0
- package/dist/emoji-names-zh-Dzecwtw_.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/locales/index.js +168 -7
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +3926 -2430
- package/dist/m3ui.js.map +1 -1
- package/dist/plugin.d.ts +6 -0
- package/dist/rich-text-editor.js +9 -9
- package/dist/styles.css +1 -1
- package/dist/terminal.js +34 -27
- package/dist/terminal.js.map +1 -1
- package/dist/{useLocale-Bircp823.js → useLocale-CmI675Ab.js} +25 -2
- package/dist/useLocale-CmI675Ab.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/MCarousel.test.ts +183 -21
- package/src/__tests__/MDialog.test.ts +18 -0
- package/src/__tests__/MEmojiSelector.test.ts +138 -0
- package/src/__tests__/MLightbox.test.ts +313 -5
- package/src/__tests__/MPagination.test.ts +37 -0
- package/src/__tests__/MPullToRefresh.test.ts +39 -0
- package/src/__tests__/MScheduler.test.ts +122 -0
- package/src/__tests__/MTerminal.test.ts +63 -0
- package/src/__tests__/attrsFallthrough.test.ts +65 -0
- package/src/__tests__/plugin.test.ts +28 -1
- package/src/components/MBarcode.vue +4 -2
- package/src/components/MBottomSheet.vue +1 -1
- package/src/components/MCarousel.vue +526 -200
- package/src/components/MCodeEditor.vue +3 -2
- package/src/components/MCommandPalette.vue +1 -1
- package/src/components/MContextMenu.vue +3 -1
- package/src/components/MDatePickerModal.vue +1 -1
- package/src/components/MDateRangePickerModal.vue +1 -1
- package/src/components/MDialog.vue +19 -6
- package/src/components/MEmojiSelector.vue +479 -78
- package/src/components/MFab.vue +3 -1
- package/src/components/MLightbox.vue +750 -268
- package/src/components/MLoadingOverlay.vue +6 -1
- package/src/components/MMenu.vue +3 -1
- package/src/components/MNavigationDrawer.vue +5 -1
- package/src/components/MNavigationRail.vue +8 -2
- package/src/components/MOverlay.vue +1 -0
- package/src/components/MPagination.vue +8 -5
- package/src/components/MPullToRefresh.vue +13 -1
- package/src/components/MScheduler.vue +282 -115
- package/src/components/MSideSheet.vue +1 -1
- package/src/components/MSplitButton.vue +3 -1
- package/src/components/MSpotlightSearch.vue +1 -1
- package/src/components/MTerminal.vue +22 -10
- package/src/components/MTimePickerModal.vue +1 -1
- package/src/components/MTooltip.vue +3 -0
- package/src/components/MTour.vue +2 -2
- package/src/composables/_carouselStrategy.ts +712 -0
- package/src/composables/useLocale.ts +48 -0
- package/src/data/emoji-names/emoji-names-de.ts +1875 -0
- package/src/data/emoji-names/emoji-names-en.ts +1875 -0
- package/src/data/emoji-names/emoji-names-es.ts +1875 -0
- package/src/data/emoji-names/emoji-names-fr.ts +1875 -0
- package/src/data/emoji-names/emoji-names-ja.ts +1875 -0
- package/src/data/emoji-names/emoji-names-ko.ts +1875 -0
- package/src/data/emoji-names/emoji-names-pt.ts +1875 -0
- package/src/data/emoji-names/emoji-names-zh.ts +1875 -0
- package/src/data/emojis.ts +29 -198
- package/src/index.ts +2 -2
- package/src/locales/de.ts +24 -0
- package/src/locales/es.ts +24 -0
- package/src/locales/fr.ts +24 -0
- package/src/locales/ja.ts +24 -0
- package/src/locales/ko.ts +24 -0
- package/src/locales/pt.ts +24 -0
- package/src/locales/zh.ts +24 -0
- package/src/plugin.ts +12 -1
- package/dist/MMenuItem-DmrsQrK7.js.map +0 -1
- package/dist/useLocale-Bircp823.js.map +0 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export interface Keyline {
|
|
2
|
+
size: number;
|
|
3
|
+
offset: number;
|
|
4
|
+
unadjustedOffset: number;
|
|
5
|
+
isFocal: boolean;
|
|
6
|
+
isAnchor: boolean;
|
|
7
|
+
isPivot: boolean;
|
|
8
|
+
cutoff: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const MIN_SMALL_ITEM_SIZE = 40;
|
|
11
|
+
export declare const MAX_SMALL_ITEM_SIZE = 56;
|
|
12
|
+
export declare class KeylineList {
|
|
13
|
+
readonly keylines: Keyline[];
|
|
14
|
+
readonly minSize: number;
|
|
15
|
+
readonly maxSize: number;
|
|
16
|
+
readonly pivotIndex: number;
|
|
17
|
+
readonly firstNonAnchorIndex: number;
|
|
18
|
+
readonly lastNonAnchorIndex: number;
|
|
19
|
+
readonly firstFocalIndex: number;
|
|
20
|
+
readonly lastFocalIndex: number;
|
|
21
|
+
constructor(keylines: Keyline[]);
|
|
22
|
+
get length(): number;
|
|
23
|
+
get isEmpty(): boolean;
|
|
24
|
+
at(i: number): Keyline;
|
|
25
|
+
get first(): Keyline;
|
|
26
|
+
get last(): Keyline;
|
|
27
|
+
get lastIndex(): number;
|
|
28
|
+
get pivot(): Keyline;
|
|
29
|
+
get firstNonAnchor(): Keyline;
|
|
30
|
+
get lastNonAnchor(): Keyline;
|
|
31
|
+
get firstFocal(): Keyline;
|
|
32
|
+
get lastFocal(): Keyline;
|
|
33
|
+
get focalCount(): number;
|
|
34
|
+
isFirstFocalItemAtStartOfContainer(): boolean;
|
|
35
|
+
isLastFocalItemAtEndOfContainer(carouselMainAxisSize: number): boolean;
|
|
36
|
+
firstIndexAfterFocalRangeWithSize(size: number): number;
|
|
37
|
+
lastIndexBeforeFocalRangeWithSize(size: number): number;
|
|
38
|
+
getKeylineBefore(unadjustedOffset: number): Keyline;
|
|
39
|
+
getKeylineAfter(unadjustedOffset: number): Keyline;
|
|
40
|
+
}
|
|
41
|
+
export interface Arrangement {
|
|
42
|
+
priority: number;
|
|
43
|
+
smallSize: number;
|
|
44
|
+
smallCount: number;
|
|
45
|
+
mediumSize: number;
|
|
46
|
+
mediumCount: number;
|
|
47
|
+
largeSize: number;
|
|
48
|
+
largeCount: number;
|
|
49
|
+
}
|
|
50
|
+
export declare function findLowestCostArrangement(o: {
|
|
51
|
+
availableSpace: number;
|
|
52
|
+
itemSpacing: number;
|
|
53
|
+
targetSmallSize: number;
|
|
54
|
+
minSmallSize: number;
|
|
55
|
+
maxSmallSize: number;
|
|
56
|
+
smallCounts: number[];
|
|
57
|
+
targetMediumSize: number;
|
|
58
|
+
mediumCounts: number[];
|
|
59
|
+
targetLargeSize: number;
|
|
60
|
+
largeCounts: number[];
|
|
61
|
+
}): Arrangement | null;
|
|
62
|
+
export declare function multiBrowseKeylineList(carouselMainAxisSize: number, preferredItemSize: number, itemSpacing: number, count: number, minSmallItemSize?: number, maxSmallItemSize?: number): KeylineList;
|
|
63
|
+
export declare function uncontainedKeylineList(carouselMainAxisSize: number, itemSize: number, itemSpacing: number): KeylineList;
|
|
64
|
+
export declare function heroKeylineList(carouselMainAxisSize: number, preferredItemSize: number | null, itemSpacing: number, count: number, isCentered: boolean, minSmallItemSize?: number, maxSmallItemSize?: number): KeylineList;
|
|
65
|
+
/** MDC-Android's FullScreenCarouselStrategy: one large item filling the container. */
|
|
66
|
+
export declare function fullScreenKeylineList(carouselMainAxisSize: number, itemSpacing: number): KeylineList;
|
|
67
|
+
export declare class Strategy {
|
|
68
|
+
readonly defaultKeylines: KeylineList;
|
|
69
|
+
readonly availableSpace: number;
|
|
70
|
+
readonly itemSpacing: number;
|
|
71
|
+
readonly beforeContentPadding: number;
|
|
72
|
+
readonly afterContentPadding: number;
|
|
73
|
+
readonly startKeylineSteps: KeylineList[];
|
|
74
|
+
readonly endKeylineSteps: KeylineList[];
|
|
75
|
+
readonly minItemSize: number;
|
|
76
|
+
readonly maxItemSize: number;
|
|
77
|
+
private readonly startShiftDistance;
|
|
78
|
+
private readonly endShiftDistance;
|
|
79
|
+
private readonly startShiftPoints;
|
|
80
|
+
private readonly endShiftPoints;
|
|
81
|
+
private lastStartAndEndSteps;
|
|
82
|
+
constructor(defaultKeylines: KeylineList, availableSpace: number, itemSpacing: number, beforeContentPadding: number, afterContentPadding: number);
|
|
83
|
+
get itemMainAxisSize(): number;
|
|
84
|
+
get isValid(): boolean;
|
|
85
|
+
getKeylineListForScrollOffset(scrollOffset: number, maxScrollOffset: number, roundToNearestStep?: boolean): KeylineList;
|
|
86
|
+
}
|
|
87
|
+
export declare function maxScrollOffset(strategy: Strategy, count: number): number;
|
|
88
|
+
/** Where item `index` sits, in pager terms, when it's the snapped item. */
|
|
89
|
+
export declare function snapPositionOffset(strategy: Strategy, index: number, count: number): number;
|
|
90
|
+
/** The scroll offset at which item `index` is snapped. */
|
|
91
|
+
export declare function snapScrollOffset(strategy: Strategy, index: number, count: number): number;
|
|
92
|
+
export interface ItemPlacement {
|
|
93
|
+
/** Translation of the item along the main axis, from the container's start edge. */
|
|
94
|
+
offset: number;
|
|
95
|
+
/** Visible (masked) size along the main axis. */
|
|
96
|
+
maskSize: number;
|
|
97
|
+
/** Start of the mask inside the item, which is `strategy.itemMainAxisSize` long. */
|
|
98
|
+
maskStart: number;
|
|
99
|
+
}
|
|
100
|
+
/** Modifier.carouselItem's layout block: where item `index` goes and how much of it shows. */
|
|
101
|
+
export declare function placeItem(strategy: Strategy, index: number, scrollOffset: number, maxScroll: number): ItemPlacement;
|
|
@@ -33,6 +33,23 @@ export interface M3Locale {
|
|
|
33
33
|
nextMonth: string;
|
|
34
34
|
dayView: string;
|
|
35
35
|
weekView: string;
|
|
36
|
+
allDay: string;
|
|
37
|
+
emojiSearch: string;
|
|
38
|
+
emojiNoResults: string;
|
|
39
|
+
emojiRecent: string;
|
|
40
|
+
emojiSkinTone: string;
|
|
41
|
+
emojiSkinTones: string;
|
|
42
|
+
emojiCategorySmileys: string;
|
|
43
|
+
emojiCategoryGestures: string;
|
|
44
|
+
emojiCategoryPeople: string;
|
|
45
|
+
emojiCategoryAnimals: string;
|
|
46
|
+
emojiCategoryNature: string;
|
|
47
|
+
emojiCategoryFood: string;
|
|
48
|
+
emojiCategoryActivities: string;
|
|
49
|
+
emojiCategoryTravel: string;
|
|
50
|
+
emojiCategoryObjects: string;
|
|
51
|
+
emojiCategorySymbols: string;
|
|
52
|
+
emojiCategoryFlags: string;
|
|
36
53
|
available: string;
|
|
37
54
|
selected: string;
|
|
38
55
|
noItems: string;
|
|
@@ -104,6 +121,12 @@ export interface M3Locale {
|
|
|
104
121
|
windowMinimize: string;
|
|
105
122
|
windowMaximize: string;
|
|
106
123
|
windowRestore: string;
|
|
124
|
+
paginationRange: string;
|
|
125
|
+
paginationPage: string;
|
|
126
|
+
previousPage: string;
|
|
127
|
+
nextPage: string;
|
|
128
|
+
carousel: string;
|
|
129
|
+
carouselItem: string;
|
|
107
130
|
}
|
|
108
131
|
export declare const defaultLocale: M3Locale;
|
|
109
132
|
export declare const M3_LOCALE_KEY: InjectionKey<MaybeRef<Partial<M3Locale>>>;
|
package/dist/data/emojis.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
export interface EmojiCategory {
|
|
2
2
|
id: string;
|
|
3
|
+
/** English name; MEmojiSelector shows the locale's (emojiCategory* keys). */
|
|
3
4
|
label: string;
|
|
4
5
|
icon: string;
|
|
5
6
|
emojis: string[];
|
|
6
7
|
}
|
|
7
8
|
export declare const emojiCategories: EmojiCategory[];
|
|
9
|
+
/** Emoji that take a skin tone (all five one-tone variants exist). */
|
|
10
|
+
export declare const toneableEmojis: Set<string>;
|
|
11
|
+
/** The five Fitzpatrick modifiers, light to dark. */
|
|
12
|
+
export declare const skinTones: readonly ["🏻", "🏼", "🏽", "🏾", "🏿"];
|
|
13
|
+
/** `emoji` with skin tone `tone` (0 = none, 1–5 = light to dark), if it takes one. */
|
|
14
|
+
export declare function withSkinTone(emoji: string, tone: number): string;
|
|
8
15
|
export declare const allEmojis: string[];
|
|
9
16
|
export declare function randomEmoji(from?: string[]): string;
|
|
10
|
-
export declare function searchEmojis(query: string): string[];
|