@antcde/component-library 0.1.37 → 0.1.38-rc.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/build/uno.safelist.d.ts +1 -1
- package/dist/build/uno.safelist.js +20 -20
- package/dist/index.js +8000 -7750
- package/dist/types/components/AntBottomSheet/index.vue.d.ts +9 -7
- package/dist/types/components/AntNoticeAlert.vue.d.ts +5 -3
- package/dist/types/components/AntTourZone/index.vue.d.ts +5 -3
- package/dist/types/components/BaseAntCard.vue.d.ts +9 -7
- package/dist/types/components/BaseAntInput.vue.d.ts +7 -5
- package/dist/types/components/BaseAppCard/_BaseAppCardMedia.vue.d.ts +7 -5
- package/dist/types/components/BaseAppCard/index.vue.d.ts +7 -5
- package/dist/types/components/BaseConfirmDialog.vue.d.ts +5 -3
- package/dist/types/components/BaseDeleteDialog.vue.d.ts +11 -9
- package/dist/types/components/BaseDialog.vue.d.ts +5 -3
- package/dist/types/components/BaseLimitedButton.vue.d.ts +6 -4
- package/dist/types/components/BaseResizePanel.vue.d.ts +5 -3
- package/dist/types/components/BulkLabelsMenu.vue.d.ts +8 -6
- package/dist/types/components/DmsFilePicker/composables/usePickerNavigation.d.ts +4 -0
- package/dist/types/components/FilePreviewContent/index.vue.d.ts +8 -6
- package/dist/types/components/ProjectNumber/AntProjectNumberHelp.vue.d.ts +22 -0
- package/dist/types/components/ProjectNumber/__tests__/useProjectNumber.spec.d.ts +1 -0
- package/dist/types/components/ProjectNumber/useProjectNumber.d.ts +48 -0
- package/dist/types/components/ScriptTrigger/composables/useTableSelection.d.ts +6 -0
- package/dist/types/components/TasksFlow/components/_dropzoneBackground.vue.d.ts +5 -3
- package/dist/types/components/TasksFlow/components/nodes/_DurationEditor.vue.d.ts +8 -6
- package/dist/types/components/TasksFlow/components/nodes/_UserPicker.vue.d.ts +7 -5
- package/dist/types/components/TasksFlow/composables/useEdgeConditionTables.d.ts +6 -0
- package/dist/types/components/UnifiedWindow/index.vue.d.ts +9 -7
- package/dist/types/components/Usage/_UsageClassRow.vue.d.ts +5 -3
- package/dist/types/components/_BaseAntInputField.vue.d.ts +5 -3
- package/dist/types/components/_BaseAntInputLabel.vue.d.ts +5 -3
- package/dist/types/components/form/AntDialogShell.vue.d.ts +19 -13
- package/dist/types/components/form/AntField.vue.d.ts +7 -5
- package/dist/types/components/form/AntHintBanner.vue.d.ts +5 -3
- package/dist/types/components/form/AntInput.vue.d.ts +5 -3
- package/dist/types/components/form/AntPanelSection.vue.d.ts +7 -5
- package/dist/types/components/form/AntScopePanel.vue.d.ts +7 -5
- package/dist/types/components/form/AntSectionCard.vue.d.ts +11 -9
- package/dist/types/components/form/AntStatusPill.vue.d.ts +5 -3
- package/dist/types/deprecated.d.ts +3 -3
- package/dist/types/index.d.ts +4 -1
- package/lib/build/uno.safelist.ts +20 -20
- package/lib/test/createMockAppContext.ts +16 -0
- package/lib/test/mountWithContext.ts +1 -1
- package/package.json +19 -19
|
@@ -40,12 +40,14 @@ type __VLS_Props = {
|
|
|
40
40
|
error?: string | null;
|
|
41
41
|
hint?: string | null;
|
|
42
42
|
};
|
|
43
|
-
declare
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} & {
|
|
47
|
-
|
|
43
|
+
declare const __VLS_template: () => {
|
|
44
|
+
__VLS_Slots: {
|
|
45
|
+
label?: (props: {}) => any;
|
|
46
|
+
} & {
|
|
47
|
+
default?: (props: {}) => any;
|
|
48
|
+
};
|
|
48
49
|
};
|
|
50
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
49
51
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
50
52
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
51
53
|
declare const _default: typeof __VLS_export;
|
|
@@ -21,10 +21,12 @@ type __VLS_Props = {
|
|
|
21
21
|
text?: string;
|
|
22
22
|
icon?: string;
|
|
23
23
|
};
|
|
24
|
-
declare
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
declare const __VLS_template: () => {
|
|
25
|
+
__VLS_Slots: {
|
|
26
|
+
default?: (props: {}) => any;
|
|
27
|
+
};
|
|
27
28
|
};
|
|
29
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
28
30
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
31
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
32
|
declare const _default: typeof __VLS_export;
|
|
@@ -79,10 +79,12 @@ type __VLS_ModelProps = {
|
|
|
79
79
|
modelValue?: string;
|
|
80
80
|
};
|
|
81
81
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
82
|
-
declare
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
declare const __VLS_template: () => {
|
|
83
|
+
__VLS_Slots: {
|
|
84
|
+
trailing?: (props: {}) => any;
|
|
85
|
+
};
|
|
85
86
|
};
|
|
87
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
86
88
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
87
89
|
"update:modelValue": (value: string) => any;
|
|
88
90
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
@@ -17,12 +17,14 @@ type __VLS_Props = {
|
|
|
17
17
|
title: string;
|
|
18
18
|
subtitle?: string;
|
|
19
19
|
};
|
|
20
|
-
declare
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} & {
|
|
24
|
-
|
|
20
|
+
declare const __VLS_template: () => {
|
|
21
|
+
__VLS_Slots: {
|
|
22
|
+
titleHint?: (props: {}) => any;
|
|
23
|
+
} & {
|
|
24
|
+
default?: (props: {}) => any;
|
|
25
|
+
};
|
|
25
26
|
};
|
|
27
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
26
28
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
27
29
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
30
|
declare const _default: typeof __VLS_export;
|
|
@@ -7,12 +7,14 @@ type __VLS_Props = {
|
|
|
7
7
|
/** No card chrome — a plain titled section, for use inside a dialog. */
|
|
8
8
|
bare?: boolean;
|
|
9
9
|
};
|
|
10
|
-
declare
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} & {
|
|
14
|
-
|
|
10
|
+
declare const __VLS_template: () => {
|
|
11
|
+
__VLS_Slots: {
|
|
12
|
+
default?: (props: {}) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: {}) => any;
|
|
15
|
+
};
|
|
15
16
|
};
|
|
17
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
16
18
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
20
|
declare const _default: typeof __VLS_export;
|
|
@@ -26,16 +26,18 @@ type __VLS_Props = {
|
|
|
26
26
|
/** Drop the card chrome (border/background/radius) — for embedding inside a dialog. */
|
|
27
27
|
bare?: boolean;
|
|
28
28
|
};
|
|
29
|
-
declare
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} & {
|
|
33
|
-
|
|
34
|
-
} & {
|
|
35
|
-
|
|
36
|
-
} & {
|
|
37
|
-
|
|
29
|
+
declare const __VLS_template: () => {
|
|
30
|
+
__VLS_Slots: {
|
|
31
|
+
title?: (props: {}) => any;
|
|
32
|
+
} & {
|
|
33
|
+
subtitle?: (props: {}) => any;
|
|
34
|
+
} & {
|
|
35
|
+
action?: (props: {}) => any;
|
|
36
|
+
} & {
|
|
37
|
+
default?: (props: {}) => any;
|
|
38
|
+
};
|
|
38
39
|
};
|
|
40
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
39
41
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
40
42
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
41
43
|
declare const _default: typeof __VLS_export;
|
|
@@ -23,10 +23,12 @@ type __VLS_Props = {
|
|
|
23
23
|
icon?: string;
|
|
24
24
|
small?: boolean;
|
|
25
25
|
};
|
|
26
|
-
declare
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
declare const __VLS_template: () => {
|
|
27
|
+
__VLS_Slots: {
|
|
28
|
+
default?: (props: {}) => any;
|
|
29
|
+
};
|
|
29
30
|
};
|
|
31
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
30
32
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
31
33
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
34
|
declare const _default: typeof __VLS_export;
|
|
@@ -417,7 +417,7 @@ export declare const BaseLimitedButton: {
|
|
|
417
417
|
size: "default" | "small" | "x-large" | "large" | "x-small";
|
|
418
418
|
color: string;
|
|
419
419
|
prependIcon: string;
|
|
420
|
-
variant: "text" | "flat" | "plain" | "tonal" | "
|
|
420
|
+
variant: "text" | "flat" | "plain" | "tonal" | "outlined" | "elevated";
|
|
421
421
|
limited: boolean;
|
|
422
422
|
tooltip: string;
|
|
423
423
|
tooltipMaxWidth: string | number;
|
|
@@ -442,7 +442,7 @@ export declare const BaseLimitedButton: {
|
|
|
442
442
|
size: "default" | "small" | "x-large" | "large" | "x-small";
|
|
443
443
|
color: string;
|
|
444
444
|
prependIcon: string;
|
|
445
|
-
variant: "text" | "flat" | "plain" | "tonal" | "
|
|
445
|
+
variant: "text" | "flat" | "plain" | "tonal" | "outlined" | "elevated";
|
|
446
446
|
limited: boolean;
|
|
447
447
|
tooltip: string;
|
|
448
448
|
tooltipMaxWidth: string | number;
|
|
@@ -466,7 +466,7 @@ export declare const BaseLimitedButton: {
|
|
|
466
466
|
size: "default" | "small" | "x-large" | "large" | "x-small";
|
|
467
467
|
color: string;
|
|
468
468
|
prependIcon: string;
|
|
469
|
-
variant: "text" | "flat" | "plain" | "tonal" | "
|
|
469
|
+
variant: "text" | "flat" | "plain" | "tonal" | "outlined" | "elevated";
|
|
470
470
|
limited: boolean;
|
|
471
471
|
tooltip: string;
|
|
472
472
|
tooltipMaxWidth: string | number;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { default as AntSectionCard } from './components/form/AntSectionCard.vue'
|
|
|
26
26
|
import { default as AntSelect } from './components/form/AntSelect.vue';
|
|
27
27
|
import { default as AntStatusPill } from './components/form/AntStatusPill.vue';
|
|
28
28
|
import { default as AntToggle } from './components/form/AntToggle.vue';
|
|
29
|
+
import { default as AntProjectNumberHelp } from './components/ProjectNumber/AntProjectNumberHelp.vue';
|
|
29
30
|
export type { SheetDetent } from './components/AntBottomSheet/sheet.types';
|
|
30
31
|
export { useSheetHistory, whenSheetHistorySettled } from './components/AntBottomSheet/useSheetHistory';
|
|
31
32
|
export type { ActionMenuItem } from './components/form/AntActionMenu.vue';
|
|
@@ -36,6 +37,8 @@ export type { OptionRow } from './components/form/AntOptionPicker.types';
|
|
|
36
37
|
export type { RadioCardOption } from './components/form/AntRadioCards.vue';
|
|
37
38
|
export type { SelectOption } from './components/form/AntSelect.vue';
|
|
38
39
|
export type { PillTone } from './components/form/AntStatusPill.vue';
|
|
40
|
+
export type { ProjectNumberStatus, UseProjectNumber, UseProjectNumberOptions } from './components/ProjectNumber/useProjectNumber';
|
|
41
|
+
export { useProjectNumber } from './components/ProjectNumber/useProjectNumber';
|
|
39
42
|
export type { MentionItem } from './components/RichTextEditor/index.vue';
|
|
40
43
|
export { formatBytes } from './components/Usage/formatBytes';
|
|
41
44
|
export * from './deprecated';
|
|
@@ -318,7 +321,7 @@ export declare const BaseResizePanel: {
|
|
|
318
321
|
default?: (props: {}) => any;
|
|
319
322
|
};
|
|
320
323
|
});
|
|
321
|
-
export { AntActionMenu, AntBottomSheet, AntCheckboxCards, AntDialogShell, AntField, AntFilterChips, AntFilterSelect, AntHintBanner, AntHintTip, AntInput, AntMultiSelect, AntNoticeAlert, AntNumberField, AntOptionPicker, AntPanelSection, AntRadioCards, AntSaveBar, AntSearchField, AntSectionCard, AntSelect, AntStatusPill, AntToggle, AntTourZone, BaseAntInput, BaseClickableIcon, BaseDeleteDialog, RichTextEditor, };
|
|
324
|
+
export { AntActionMenu, AntBottomSheet, AntCheckboxCards, AntDialogShell, AntField, AntFilterChips, AntFilterSelect, AntHintBanner, AntHintTip, AntInput, AntMultiSelect, AntNoticeAlert, AntNumberField, AntOptionPicker, AntPanelSection, AntProjectNumberHelp, AntRadioCards, AntSaveBar, AntSearchField, AntSectionCard, AntSelect, AntStatusPill, AntToggle, AntTourZone, BaseAntInput, BaseClickableIcon, BaseDeleteDialog, RichTextEditor, };
|
|
322
325
|
/**
|
|
323
326
|
* ⚠️ `BaseAntInput` and `BaseAntDatePicker` are the SUPERSEDED field idiom: Vuetify-field
|
|
324
327
|
* wrappers whose border weight and floating notched label make forms read as "raw Vuetify".
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Every utility class this library's own components use, so a consuming app emits
|
|
5
5
|
* them even though UnoCSS never scans `dist/index.js`. See the generator for why.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* 356 classes, from 1716 candidates, filtered by asking Uno
|
|
8
8
|
* which ones actually resolve.
|
|
9
9
|
*/
|
|
10
10
|
export const libraryClassSafelist: string[] = [
|
|
@@ -49,23 +49,23 @@ export const libraryClassSafelist: string[] = [
|
|
|
49
49
|
'opacity-30', 'opacity-40', 'opacity-45', 'opacity-50', 'opacity-55', 'opacity-60',
|
|
50
50
|
'opacity-70', 'opacity-80', 'outline-none', 'overflow-hidden', 'overflow-y-auto', 'p-0',
|
|
51
51
|
'p-3.5', 'p-5', 'pa-2', 'pa-3', 'pa-4', 'pb-0',
|
|
52
|
-
'pb-1', 'pb-10', 'pb-2', 'pb-
|
|
53
|
-
'pointer-events-none', 'position-relative', 'pr-1', 'pr-1.5', 'pt-1',
|
|
54
|
-
'pt-2', 'pt-3', 'pt-5', 'px', 'px-0',
|
|
55
|
-
'px-15', 'px-2', 'px-2.5', 'px-3', 'px-3.5',
|
|
56
|
-
'px-5', 'px-5.5', 'px-6', 'py-0', 'py-0.5',
|
|
57
|
-
'py-1.5', 'py-2', 'py-2.5', 'py-3', 'py-4',
|
|
58
|
-
'py-6', 'py-7', 'py-8', 'relative', 'resize',
|
|
59
|
-
'right-0', 'rounded', 'rounded-2xl', 'rounded-[10px]', 'rounded-[12px]',
|
|
60
|
-
'rounded-full', 'rounded-lg', 'rounded-xl', 'select-none', 'shadow',
|
|
61
|
-
'shrink-0', 'sm:grid-cols-2', 'sm:grid-cols-[auto_minmax(0,1fr)_minmax(0,1fr)_auto]', 'table', 'tabular-nums',
|
|
62
|
-
'text-[11.5px]', 'text-[11px]', 'text-[12.5px]', 'text-[12px]', 'text-[13.5px]',
|
|
63
|
-
'text-
|
|
64
|
-
'text-
|
|
65
|
-
'text-truncate', 'text-warning', 'text-warning-emphasis', 'text-white', 'text-white/45',
|
|
66
|
-
'text-xs', 'top-0.5', 'tracking-[0.16em]', 'transform', 'transition-[border-color]',
|
|
67
|
-
'transition-colors', 'transition-opacity', 'transition-transform', 'translate-x-0', 'translate-x-4',
|
|
68
|
-
'truncate', 'uppercase', 'w-2', 'w-4', 'w-8',
|
|
69
|
-
'w-[18px]', 'w-[34%]', 'w-[38px]', 'w-[60px]', 'w-full',
|
|
70
|
-
'whitespace-nowrap',
|
|
52
|
+
'pb-1', 'pb-10', 'pb-2', 'pb-20', 'pb-5', 'pb-6',
|
|
53
|
+
'pl-1', 'pointer-events-none', 'position-relative', 'pr-1', 'pr-1.5', 'pt-1',
|
|
54
|
+
'pt-1.5', 'pt-2', 'pt-3', 'pt-5', 'px', 'px-0',
|
|
55
|
+
'px-1.5', 'px-15', 'px-2', 'px-2.5', 'px-3', 'px-3.5',
|
|
56
|
+
'px-4', 'px-5', 'px-5.5', 'px-6', 'py-0', 'py-0.5',
|
|
57
|
+
'py-1', 'py-1.5', 'py-2', 'py-2.5', 'py-3', 'py-4',
|
|
58
|
+
'py-5', 'py-6', 'py-7', 'py-8', 'relative', 'resize',
|
|
59
|
+
'resize-y', 'right-0', 'rounded', 'rounded-2xl', 'rounded-[10px]', 'rounded-[12px]',
|
|
60
|
+
'rounded-[20px]', 'rounded-full', 'rounded-lg', 'rounded-xl', 'select-none', 'shadow',
|
|
61
|
+
'shadow-sm', 'shrink-0', 'sm:grid-cols-2', 'sm:grid-cols-[auto_minmax(0,1fr)_minmax(0,1fr)_auto]', 'table', 'tabular-nums',
|
|
62
|
+
'text-[10px]', 'text-[11.5px]', 'text-[11px]', 'text-[12.5px]', 'text-[12px]', 'text-[13.5px]',
|
|
63
|
+
'text-[13px]', 'text-black', 'text-body', 'text-center', 'text-error', 'text-heading',
|
|
64
|
+
'text-info', 'text-left', 'text-lg', 'text-muted', 'text-primary', 'text-sm',
|
|
65
|
+
'text-success', 'text-truncate', 'text-warning', 'text-warning-emphasis', 'text-white', 'text-white/45',
|
|
66
|
+
'text-wrap', 'text-xs', 'top-0.5', 'tracking-[0.16em]', 'transform', 'transition-[border-color]',
|
|
67
|
+
'transition-all', 'transition-colors', 'transition-opacity', 'transition-transform', 'translate-x-0', 'translate-x-4',
|
|
68
|
+
'translate-y-4', 'truncate', 'uppercase', 'w-2', 'w-4', 'w-8',
|
|
69
|
+
'w-9', 'w-[18px]', 'w-[34%]', 'w-[38px]', 'w-[60px]', 'w-full',
|
|
70
|
+
'whitespace-normal', 'whitespace-nowrap',
|
|
71
71
|
]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Signal } from '@antcde/connect-ts'
|
|
2
|
+
import type { DeviceClass, UseHostDeviceReturn } from '@antcde/vue-utils'
|
|
2
3
|
import type { Mock } from 'vitest'
|
|
3
4
|
import type { Ref } from 'vue'
|
|
4
5
|
import { vi } from 'vitest'
|
|
@@ -17,6 +18,8 @@ export type MockColorMode = Ref<string> & {
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export interface MockAppContext {
|
|
21
|
+
/** The shell's device class as `useHostDevice` reports it; desktop unless asked otherwise. */
|
|
22
|
+
device: UseHostDeviceReturn
|
|
20
23
|
comms: {
|
|
21
24
|
context: Ref<{ license?: any, project?: any, task?: any, [key: string]: any }>
|
|
22
25
|
toolbar: {
|
|
@@ -135,11 +138,23 @@ function createMockColorMode(): MockColorMode {
|
|
|
135
138
|
}) satisfies MockColorMode
|
|
136
139
|
}
|
|
137
140
|
|
|
141
|
+
function createMockDevice(device: DeviceClass): UseHostDeviceReturn {
|
|
142
|
+
return {
|
|
143
|
+
device: computed(() => device),
|
|
144
|
+
isPhone: computed(() => device === 'phone'),
|
|
145
|
+
isTablet: computed(() => device === 'tablet'),
|
|
146
|
+
isDesktop: computed(() => device === 'desktop'),
|
|
147
|
+
isTouch: computed(() => device !== 'desktop'),
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
138
151
|
export function createMockAppContext(overrides?: {
|
|
139
152
|
license?: Parameters<typeof createMockLicense>[0]
|
|
140
153
|
connect?: Record<string, any>
|
|
141
154
|
/** Pass app translation messages for realistic text. Import `en.json` and pass it. */
|
|
142
155
|
messages?: Record<string, any>
|
|
156
|
+
/** Mount as a phone or tablet; apps with a phone layout branch on it. */
|
|
157
|
+
device?: DeviceClass
|
|
143
158
|
}): MockAppContext {
|
|
144
159
|
const mockCtx = createMockContext({
|
|
145
160
|
license: createMockLicense(overrides?.license),
|
|
@@ -197,6 +212,7 @@ export function createMockAppContext(overrides?: {
|
|
|
197
212
|
})
|
|
198
213
|
|
|
199
214
|
return {
|
|
215
|
+
device: createMockDevice(overrides?.device ?? 'desktop'),
|
|
200
216
|
comms,
|
|
201
217
|
i18n,
|
|
202
218
|
colorMode,
|
|
@@ -31,7 +31,7 @@ export interface MountWithContextOptions {
|
|
|
31
31
|
function provideAppContext(ctx: MockAppContext): Plugin {
|
|
32
32
|
return {
|
|
33
33
|
install(app: App) {
|
|
34
|
-
const value = { comms: ctx.comms, i18n: ctx.i18n, colorMode: ctx.colorMode }
|
|
34
|
+
const value = { comms: ctx.comms, i18n: ctx.i18n, colorMode: ctx.colorMode, device: ctx.device }
|
|
35
35
|
// Matches `useSingleton('appContext', factory)` shape: inject(name)() returns the value.
|
|
36
36
|
app.provide<() => typeof value>('appContext', () => value)
|
|
37
37
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antcde/component-library",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.38-rc.1",
|
|
5
5
|
"description": "Helper to use ant components in Vue 3",
|
|
6
6
|
"author": "CollaborAll",
|
|
7
7
|
"exports": {
|
|
@@ -181,38 +181,38 @@
|
|
|
181
181
|
"dependencies": {
|
|
182
182
|
"@fontsource-variable/inter": "^5.3.0",
|
|
183
183
|
"@mdi/font": "^7.4.47",
|
|
184
|
-
"@tiptap/extension-link": "^3.32.
|
|
185
|
-
"@tiptap/extension-mention": "^3.32.
|
|
186
|
-
"@tiptap/extension-placeholder": "^3.32.
|
|
187
|
-
"@tiptap/starter-kit": "^3.32.
|
|
188
|
-
"@tiptap/suggestion": "^3.32.
|
|
189
|
-
"@tiptap/vue-3": "^3.32.
|
|
184
|
+
"@tiptap/extension-link": "^3.32.2",
|
|
185
|
+
"@tiptap/extension-mention": "^3.32.2",
|
|
186
|
+
"@tiptap/extension-placeholder": "^3.32.2",
|
|
187
|
+
"@tiptap/starter-kit": "^3.32.2",
|
|
188
|
+
"@tiptap/suggestion": "^3.32.2",
|
|
189
|
+
"@tiptap/vue-3": "^3.32.2",
|
|
190
190
|
"@vue-flow/background": "^1.3.2",
|
|
191
191
|
"@vue-flow/core": "^1.48.2",
|
|
192
192
|
"@vue-flow/minimap": "^1.5.4",
|
|
193
193
|
"@vueuse/core": "^14.4.0",
|
|
194
|
-
"pdfjs-dist": "^6.
|
|
195
|
-
"qs": "^6.17.
|
|
194
|
+
"pdfjs-dist": "^6.5.438",
|
|
195
|
+
"qs": "^6.17.1",
|
|
196
196
|
"sanitize-html": "^2.18.1",
|
|
197
|
-
"vue-i18n": "^11.4.
|
|
197
|
+
"vue-i18n": "^11.4.17"
|
|
198
198
|
},
|
|
199
199
|
"devDependencies": {
|
|
200
|
-
"@antcde/connect-ts": "0.4.
|
|
201
|
-
"@antcde/vue-utils": "0.2.
|
|
200
|
+
"@antcde/connect-ts": "0.4.40-rc.1",
|
|
201
|
+
"@antcde/vue-utils": "0.2.35-rc.1",
|
|
202
202
|
"@iconify-json/mdi": "^1.2.3",
|
|
203
|
-
"@iconify/vue": "^5.0.
|
|
204
|
-
"@intlify/unplugin-vue-i18n": "^11.2.
|
|
203
|
+
"@iconify/vue": "^5.0.5",
|
|
204
|
+
"@intlify/unplugin-vue-i18n": "^11.2.8",
|
|
205
205
|
"@mdi/font": "^7.2.96",
|
|
206
206
|
"@tsconfig/node22": "^22.0.6",
|
|
207
207
|
"@types/node": "^22.20.5",
|
|
208
208
|
"@types/qs": "^6.15.1",
|
|
209
209
|
"@vitejs/plugin-vue": "^6.0.10",
|
|
210
|
-
"@vue/language-core": "^3.3.
|
|
210
|
+
"@vue/language-core": "^3.3.14",
|
|
211
211
|
"@vue/test-utils": "^2.5.1",
|
|
212
212
|
"@vue/tsconfig": "^0.9.1",
|
|
213
|
-
"happy-dom": "^
|
|
213
|
+
"happy-dom": "^21.0.4",
|
|
214
214
|
"pinia": "^3.0.4",
|
|
215
|
-
"sass": "^1.
|
|
215
|
+
"sass": "^1.107.1",
|
|
216
216
|
"typescript": "~6.0.3",
|
|
217
217
|
"unplugin-icons": "^23.0.1",
|
|
218
218
|
"vite": "^8.3.5",
|
|
@@ -220,8 +220,8 @@
|
|
|
220
220
|
"vite-plugin-css-injected-by-js": "^5.0.3",
|
|
221
221
|
"vite-plugin-dts": "^5.1.2",
|
|
222
222
|
"vite-plugin-vuetify": "^2.1.3",
|
|
223
|
-
"vitest": "^5.0
|
|
223
|
+
"vitest": "^5.1.0",
|
|
224
224
|
"vue": "^3.5.44",
|
|
225
|
-
"vue-tsc": "^3.3.
|
|
225
|
+
"vue-tsc": "^3.3.14"
|
|
226
226
|
}
|
|
227
227
|
}
|