@loafacto/ui 0.1.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.
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,55 @@
1
+ import type { ServiceDescriptor, ShellUser, ShortcutLink } from '../types';
2
+ type __VLS_Props = {
3
+ services?: ServiceDescriptor[];
4
+ currentServiceId?: string;
5
+ /** 다른 사이트로 나가는 링크. 상단바에 아이콘으로 놓이고 새 탭에서 열린다. */
6
+ shortcuts?: ShortcutLink[];
7
+ brandName?: string;
8
+ brandHref?: string;
9
+ logoUrl?: string;
10
+ user?: ShellUser | null;
11
+ backgroundColor?: string;
12
+ backgroundImage?: string;
13
+ /** 연도를 주입받는다 — 테스트에서 고정할 수 있도록 */
14
+ year?: number;
15
+ };
16
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_9: {};
17
+ type __VLS_Slots = {} & {
18
+ actions?: (props: typeof __VLS_1) => any;
19
+ } & {
20
+ 'user-menu'?: (props: typeof __VLS_3) => any;
21
+ } & {
22
+ 'auth-actions'?: (props: typeof __VLS_5) => any;
23
+ } & {
24
+ default?: (props: typeof __VLS_7) => any;
25
+ } & {
26
+ footer?: (props: typeof __VLS_9) => any;
27
+ };
28
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
29
+ navigate: (payload: {
30
+ path: string;
31
+ event: MouseEvent;
32
+ service?: ServiceDescriptor;
33
+ }) => any;
34
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
35
+ onNavigate?: ((payload: {
36
+ path: string;
37
+ event: MouseEvent;
38
+ service?: ServiceDescriptor;
39
+ }) => any) | undefined;
40
+ }>, {
41
+ services: ServiceDescriptor[];
42
+ shortcuts: ShortcutLink[];
43
+ brandName: string;
44
+ brandHref: string;
45
+ user: ShellUser | null;
46
+ year: number;
47
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
48
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
49
+ declare const _default: typeof __VLS_export;
50
+ export default _default;
51
+ type __VLS_WithSlots<T, S> = T & {
52
+ new (): {
53
+ $slots: S;
54
+ };
55
+ };
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { type ConfirmOptions } from '../stores/confirm';
2
+ /**
3
+ * 네이티브 confirm() 대체. AppConfirmModal 이 트리 어딘가에 마운트되어 있어야 한다.
4
+ *
5
+ * const confirm = useConfirm()
6
+ * if (await confirm({ message: '삭제할까요?', danger: true })) { ... }
7
+ */
8
+ export declare function useConfirm(): (opts: ConfirmOptions) => Promise<boolean>;
@@ -0,0 +1,8 @@
1
+ /** 전역 토스트 알림. API 에러/성공 메시지 등에 사용 */
2
+ export declare function useToast(): {
3
+ success: (message: string, duration?: number) => string;
4
+ error: (message: string, duration?: number) => string;
5
+ info: (message: string, duration?: number) => string;
6
+ warning: (message: string, duration?: number) => string;
7
+ add: (message: string, type?: import("..").ToastType, duration?: number) => string;
8
+ };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @loafacto/ui
3
+ *
4
+ * Loafacto 서비스가 공유하는 표현 계층. 의존성은 vue 와 pinia 뿐이다.
5
+ * Vuetify 에 의존하지 않는 것은 의도적이다 — 서비스마다 Vuetify 버전을
6
+ * 따로 올릴 수 있어야 하고, 공용 라이브러리가 그 버전을 고정해버리면
7
+ * 서비스의 독립 배포가 이름뿐인 것이 된다.
8
+ *
9
+ * 스타일은 별도 진입점이다:
10
+ * import '@loafacto/ui/styles.css'
11
+ *
12
+ * 진입점 이름이 `.css` 로 끝나는 건 의도된 것이다. 그래야 소비 측의 vite/client
13
+ * 타입에 있는 `declare module '*.css'` 가 그대로 잡아서, 앱마다 shim 선언을
14
+ * 따로 만들지 않아도 된다.
15
+ */
16
+ import './styles/base.css';
17
+ export { default as AppShell } from './components/AppShell.vue';
18
+ export { default as AppToast } from './components/AppToast.vue';
19
+ export { default as AppLoadingOverlay } from './components/AppLoadingOverlay.vue';
20
+ export { default as AppConfirmModal } from './components/AppConfirmModal.vue';
21
+ export { useToastStore, type ToastItem, type ToastType } from './stores/toast';
22
+ export { useLoadingStore } from './stores/loading';
23
+ export { useConfirmStore, type ConfirmOptions } from './stores/confirm';
24
+ export { useToast } from './composables/useToast';
25
+ export { useConfirm } from './composables/useConfirm';
26
+ export { applyTheme, DEFAULT_THEME, type ThemeConfig } from './theme/applyTheme';
27
+ export { deriveSemanticPalette, applySemanticPalette, isLightBackground, colorToRgb, hexToRgb, luminance, contrastRatio, type SemanticPalette, } from './theme/themeColors';
28
+ export type { ServiceDescriptor, ShellUser, ShortcutLink } from './types';