@m1kapp/kit 0.0.18 → 0.0.20
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/bin/m1kkit.mjs +0 -0
- package/dist/index.d.mts +36 -3
- package/dist/index.d.ts +36 -3
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/pwa.js +2 -2
- package/dist/pwa.mjs +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/bin/m1kkit.mjs
CHANGED
|
File without changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ReactNode, CSSProperties } from 'react';
|
|
3
|
+
import React__default, { ReactNode, CSSProperties, RefObject } from 'react';
|
|
4
4
|
import { MetadataRoute, Viewport } from 'next';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
6
6
|
|
|
@@ -69,6 +69,24 @@ interface AppShellContentProps {
|
|
|
69
69
|
*/
|
|
70
70
|
declare function AppShellContent({ children, className }: AppShellContentProps): react_jsx_runtime.JSX.Element;
|
|
71
71
|
|
|
72
|
+
interface FabProps {
|
|
73
|
+
onClick: () => void;
|
|
74
|
+
icon: ReactNode;
|
|
75
|
+
/** Accent background color. Default: zinc-900/white (follows dark mode) */
|
|
76
|
+
color?: string;
|
|
77
|
+
className?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Floating Action Button — positioned absolute bottom-right inside AppShell.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* <AppShellContent>
|
|
84
|
+
* {content}
|
|
85
|
+
* <Fab onClick={handleAdd} icon={<PlusIcon />} color="#6366f1" />
|
|
86
|
+
* </AppShellContent>
|
|
87
|
+
*/
|
|
88
|
+
declare function Fab({ onClick, icon, color, className }: FabProps): react_jsx_runtime.JSX.Element;
|
|
89
|
+
|
|
72
90
|
interface TabBarProps {
|
|
73
91
|
children: ReactNode;
|
|
74
92
|
className?: string;
|
|
@@ -559,6 +577,17 @@ declare function useInView(options?: UseInViewOptions): UseInViewResult;
|
|
|
559
577
|
*/
|
|
560
578
|
declare function useFocusTrap<T extends HTMLElement = HTMLElement>(active: boolean): React$1.RefObject<T | null>;
|
|
561
579
|
|
|
580
|
+
/**
|
|
581
|
+
* Calls `onEscape` when the Escape key is pressed while `active` is true.
|
|
582
|
+
*/
|
|
583
|
+
declare function useEscapeKey(active: boolean, onEscape: () => void): void;
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Locks scroll on the nearest `.tab-scroll` ancestor (or falls back to querySelector)
|
|
587
|
+
* while `active` is true. Restores previous overflow on cleanup.
|
|
588
|
+
*/
|
|
589
|
+
declare function useScrollLock(active: boolean, anchorRef?: RefObject<HTMLElement | null>): void;
|
|
590
|
+
|
|
562
591
|
interface SkeletonProps {
|
|
563
592
|
/** Tailwind classes for width / height (e.g. "h-4 w-3/4") */
|
|
564
593
|
className?: string;
|
|
@@ -602,8 +631,12 @@ interface InAppSheetProps {
|
|
|
602
631
|
className?: string;
|
|
603
632
|
/** true면 시트가 AppShell 전체 높이를 채움 */
|
|
604
633
|
fullHeight?: boolean;
|
|
634
|
+
/** 우상단 X 버튼 숨기기. Default: false (보임) */
|
|
635
|
+
hideClose?: boolean;
|
|
636
|
+
/** 닫기 버튼 aria-label. Default: "닫기" */
|
|
637
|
+
closeLabel?: string;
|
|
605
638
|
}
|
|
606
|
-
declare function InAppSheet({ open, onClose, children, className, fullHeight, }: InAppSheetProps): react_jsx_runtime.JSX.Element;
|
|
639
|
+
declare function InAppSheet({ open, onClose, children, className, fullHeight, hideClose, closeLabel, }: InAppSheetProps): react_jsx_runtime.JSX.Element;
|
|
607
640
|
|
|
608
641
|
type PWAInstallState = "android-ready" | "ios-safari" | "installed" | "unsupported";
|
|
609
642
|
interface UsePWAInstallReturn {
|
|
@@ -818,4 +851,4 @@ declare function formatPrice(amount: number, currency?: string, locale?: string)
|
|
|
818
851
|
|
|
819
852
|
declare function cn(...inputs: ClassValue[]): string;
|
|
820
853
|
|
|
821
|
-
export { type ApiClient, type ApiClientOptions, ApiError, AppShell, AppShellContent, type AppShellContentProps, AppShellHeader, type AppShellHeaderProps, type AppShellProps, Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, type ColorName, Dialog, type DialogProps, Divider, EmojiButton, type EmojiButtonProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerProps, EmptyState, type EmptyStateProps, FontLinks, type FontName, GrassMap, type GrassMapData, type GrassMapLabels, type GrassMapProps, IOSInstallSheet, InAppSheet, type InAppSheetProps, KitStyles, PWAInstallButton, type PWAInstallState, Section, SectionHeader, type SectionHeaderProps, type SectionProps, ShareButton, type ShareButtonProps, Skeleton, type SkeletonProps, StatChip, type StatChipProps, THEME_SCRIPT, Tab, TabBar, type TabBarProps, type TabProps, ThemeButton, type ThemeButtonProps, ThemeDialog, type ThemeDialogLabels, type ThemeDialogProps, type ToastOptions, ToastProvider, type ToastVariant, Tooltip, type TooltipProps, Typewriter, type TypewriterProps, type UseFetchOptions, type UseFetchResult, type UseFormSubmitOptions, type UseFormSubmitResult, type UseInViewOptions, type UseInViewResult, type UsePWAInstallReturn, type UsePollingOptions, type UsePollingResult, type UseShareOptions, type UseShareReturn, Watermark, type WatermarkProps, type WatermarkSponsor, clearFetchCache, cn, colors, createApiClient, createManifest, fontFamily, fonts, formatNumber, formatPrice, mobileViewport, relativeTime, svgIcon, useDebounce, useFetch, useFocusTrap, useFormSubmit, useInView, useLocalStorage, usePWAInstall, usePolling, useShare, useToast };
|
|
854
|
+
export { type ApiClient, type ApiClientOptions, ApiError, AppShell, AppShellContent, type AppShellContentProps, AppShellHeader, type AppShellHeaderProps, type AppShellProps, Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, type ColorName, Dialog, type DialogProps, Divider, EmojiButton, type EmojiButtonProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerProps, EmptyState, type EmptyStateProps, Fab, type FabProps, FontLinks, type FontName, GrassMap, type GrassMapData, type GrassMapLabels, type GrassMapProps, IOSInstallSheet, InAppSheet, type InAppSheetProps, KitStyles, PWAInstallButton, type PWAInstallState, Section, SectionHeader, type SectionHeaderProps, type SectionProps, ShareButton, type ShareButtonProps, Skeleton, type SkeletonProps, StatChip, type StatChipProps, THEME_SCRIPT, Tab, TabBar, type TabBarProps, type TabProps, ThemeButton, type ThemeButtonProps, ThemeDialog, type ThemeDialogLabels, type ThemeDialogProps, type ToastOptions, ToastProvider, type ToastVariant, Tooltip, type TooltipProps, Typewriter, type TypewriterProps, type UseFetchOptions, type UseFetchResult, type UseFormSubmitOptions, type UseFormSubmitResult, type UseInViewOptions, type UseInViewResult, type UsePWAInstallReturn, type UsePollingOptions, type UsePollingResult, type UseShareOptions, type UseShareReturn, Watermark, type WatermarkProps, type WatermarkSponsor, clearFetchCache, cn, colors, createApiClient, createManifest, fontFamily, fonts, formatNumber, formatPrice, mobileViewport, relativeTime, svgIcon, useDebounce, useEscapeKey, useFetch, useFocusTrap, useFormSubmit, useInView, useLocalStorage, usePWAInstall, usePolling, useScrollLock, useShare, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ReactNode, CSSProperties } from 'react';
|
|
3
|
+
import React__default, { ReactNode, CSSProperties, RefObject } from 'react';
|
|
4
4
|
import { MetadataRoute, Viewport } from 'next';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
6
6
|
|
|
@@ -69,6 +69,24 @@ interface AppShellContentProps {
|
|
|
69
69
|
*/
|
|
70
70
|
declare function AppShellContent({ children, className }: AppShellContentProps): react_jsx_runtime.JSX.Element;
|
|
71
71
|
|
|
72
|
+
interface FabProps {
|
|
73
|
+
onClick: () => void;
|
|
74
|
+
icon: ReactNode;
|
|
75
|
+
/** Accent background color. Default: zinc-900/white (follows dark mode) */
|
|
76
|
+
color?: string;
|
|
77
|
+
className?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Floating Action Button — positioned absolute bottom-right inside AppShell.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* <AppShellContent>
|
|
84
|
+
* {content}
|
|
85
|
+
* <Fab onClick={handleAdd} icon={<PlusIcon />} color="#6366f1" />
|
|
86
|
+
* </AppShellContent>
|
|
87
|
+
*/
|
|
88
|
+
declare function Fab({ onClick, icon, color, className }: FabProps): react_jsx_runtime.JSX.Element;
|
|
89
|
+
|
|
72
90
|
interface TabBarProps {
|
|
73
91
|
children: ReactNode;
|
|
74
92
|
className?: string;
|
|
@@ -559,6 +577,17 @@ declare function useInView(options?: UseInViewOptions): UseInViewResult;
|
|
|
559
577
|
*/
|
|
560
578
|
declare function useFocusTrap<T extends HTMLElement = HTMLElement>(active: boolean): React$1.RefObject<T | null>;
|
|
561
579
|
|
|
580
|
+
/**
|
|
581
|
+
* Calls `onEscape` when the Escape key is pressed while `active` is true.
|
|
582
|
+
*/
|
|
583
|
+
declare function useEscapeKey(active: boolean, onEscape: () => void): void;
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Locks scroll on the nearest `.tab-scroll` ancestor (or falls back to querySelector)
|
|
587
|
+
* while `active` is true. Restores previous overflow on cleanup.
|
|
588
|
+
*/
|
|
589
|
+
declare function useScrollLock(active: boolean, anchorRef?: RefObject<HTMLElement | null>): void;
|
|
590
|
+
|
|
562
591
|
interface SkeletonProps {
|
|
563
592
|
/** Tailwind classes for width / height (e.g. "h-4 w-3/4") */
|
|
564
593
|
className?: string;
|
|
@@ -602,8 +631,12 @@ interface InAppSheetProps {
|
|
|
602
631
|
className?: string;
|
|
603
632
|
/** true면 시트가 AppShell 전체 높이를 채움 */
|
|
604
633
|
fullHeight?: boolean;
|
|
634
|
+
/** 우상단 X 버튼 숨기기. Default: false (보임) */
|
|
635
|
+
hideClose?: boolean;
|
|
636
|
+
/** 닫기 버튼 aria-label. Default: "닫기" */
|
|
637
|
+
closeLabel?: string;
|
|
605
638
|
}
|
|
606
|
-
declare function InAppSheet({ open, onClose, children, className, fullHeight, }: InAppSheetProps): react_jsx_runtime.JSX.Element;
|
|
639
|
+
declare function InAppSheet({ open, onClose, children, className, fullHeight, hideClose, closeLabel, }: InAppSheetProps): react_jsx_runtime.JSX.Element;
|
|
607
640
|
|
|
608
641
|
type PWAInstallState = "android-ready" | "ios-safari" | "installed" | "unsupported";
|
|
609
642
|
interface UsePWAInstallReturn {
|
|
@@ -818,4 +851,4 @@ declare function formatPrice(amount: number, currency?: string, locale?: string)
|
|
|
818
851
|
|
|
819
852
|
declare function cn(...inputs: ClassValue[]): string;
|
|
820
853
|
|
|
821
|
-
export { type ApiClient, type ApiClientOptions, ApiError, AppShell, AppShellContent, type AppShellContentProps, AppShellHeader, type AppShellHeaderProps, type AppShellProps, Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, type ColorName, Dialog, type DialogProps, Divider, EmojiButton, type EmojiButtonProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerProps, EmptyState, type EmptyStateProps, FontLinks, type FontName, GrassMap, type GrassMapData, type GrassMapLabels, type GrassMapProps, IOSInstallSheet, InAppSheet, type InAppSheetProps, KitStyles, PWAInstallButton, type PWAInstallState, Section, SectionHeader, type SectionHeaderProps, type SectionProps, ShareButton, type ShareButtonProps, Skeleton, type SkeletonProps, StatChip, type StatChipProps, THEME_SCRIPT, Tab, TabBar, type TabBarProps, type TabProps, ThemeButton, type ThemeButtonProps, ThemeDialog, type ThemeDialogLabels, type ThemeDialogProps, type ToastOptions, ToastProvider, type ToastVariant, Tooltip, type TooltipProps, Typewriter, type TypewriterProps, type UseFetchOptions, type UseFetchResult, type UseFormSubmitOptions, type UseFormSubmitResult, type UseInViewOptions, type UseInViewResult, type UsePWAInstallReturn, type UsePollingOptions, type UsePollingResult, type UseShareOptions, type UseShareReturn, Watermark, type WatermarkProps, type WatermarkSponsor, clearFetchCache, cn, colors, createApiClient, createManifest, fontFamily, fonts, formatNumber, formatPrice, mobileViewport, relativeTime, svgIcon, useDebounce, useFetch, useFocusTrap, useFormSubmit, useInView, useLocalStorage, usePWAInstall, usePolling, useShare, useToast };
|
|
854
|
+
export { type ApiClient, type ApiClientOptions, ApiError, AppShell, AppShellContent, type AppShellContentProps, AppShellHeader, type AppShellHeaderProps, type AppShellProps, Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, type ColorName, Dialog, type DialogProps, Divider, EmojiButton, type EmojiButtonProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerProps, EmptyState, type EmptyStateProps, Fab, type FabProps, FontLinks, type FontName, GrassMap, type GrassMapData, type GrassMapLabels, type GrassMapProps, IOSInstallSheet, InAppSheet, type InAppSheetProps, KitStyles, PWAInstallButton, type PWAInstallState, Section, SectionHeader, type SectionHeaderProps, type SectionProps, ShareButton, type ShareButtonProps, Skeleton, type SkeletonProps, StatChip, type StatChipProps, THEME_SCRIPT, Tab, TabBar, type TabBarProps, type TabProps, ThemeButton, type ThemeButtonProps, ThemeDialog, type ThemeDialogLabels, type ThemeDialogProps, type ToastOptions, ToastProvider, type ToastVariant, Tooltip, type TooltipProps, Typewriter, type TypewriterProps, type UseFetchOptions, type UseFetchResult, type UseFormSubmitOptions, type UseFormSubmitResult, type UseInViewOptions, type UseInViewResult, type UsePWAInstallReturn, type UsePollingOptions, type UsePollingResult, type UseShareOptions, type UseShareReturn, Watermark, type WatermarkProps, type WatermarkSponsor, clearFetchCache, cn, colors, createApiClient, createManifest, fontFamily, fonts, formatNumber, formatPrice, mobileViewport, relativeTime, svgIcon, useDebounce, useEscapeKey, useFetch, useFocusTrap, useFormSubmit, useInView, useLocalStorage, usePWAInstall, usePolling, useScrollLock, useShare, useToast };
|