@m1kapp/kit 0.0.50 → 0.0.52
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 +2 -0
- package/dist/index.d.mts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/meta.json +6 -6
- package/dist/pwa.d.mts +10 -5
- package/dist/pwa.d.ts +10 -5
- package/dist/pwa.js +2 -2
- package/dist/pwa.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -219,6 +219,8 @@ import { ShareButton, useShare } from "@m1kapp/kit";
|
|
|
219
219
|
|
|
220
220
|
// 버튼 그대로 사용 — 모바일은 네이티브 공유, 데스크탑은 클립보드 복사
|
|
221
221
|
<ShareButton url="https://m1k.app" title="My App" />
|
|
222
|
+
// 설치할 수 있는 기기면 "링크 보내기 · 홈 화면에 추가" 시트를 띄운다(AppShell 안에서)
|
|
223
|
+
<ShareButton url="https://m1k.app" title="My App" install={{ appName: "My App", iconSrc: "/icon-192.png" }} />
|
|
222
224
|
|
|
223
225
|
// 커스텀 UI
|
|
224
226
|
const { share, copied, canNativeShare } = useShare({ url: "https://m1k.app" });
|
package/dist/index.d.mts
CHANGED
|
@@ -817,8 +817,16 @@ interface ShareButtonProps {
|
|
|
817
817
|
label?: string;
|
|
818
818
|
copiedLabel?: string;
|
|
819
819
|
className?: string;
|
|
820
|
+
/**
|
|
821
|
+
* 설치할 수 있는 기기면 누를 때 "링크 보내기 · 홈 화면에 추가" 시트를 띄운다.
|
|
822
|
+
* 이미 설치했거나 지원 안 하는 브라우저면 지금처럼 바로 공유. AppShell 안에서 쓴다(시트가 거기 뜬다).
|
|
823
|
+
*/
|
|
824
|
+
install?: boolean | {
|
|
825
|
+
appName?: string;
|
|
826
|
+
iconSrc?: string;
|
|
827
|
+
};
|
|
820
828
|
}
|
|
821
|
-
declare function ShareButton({ url, title, text, label, copiedLabel, className, }: ShareButtonProps): react_jsx_runtime.JSX.Element;
|
|
829
|
+
declare function ShareButton({ url, title, text, label, copiedLabel, className, install, }: ShareButtonProps): react_jsx_runtime.JSX.Element;
|
|
822
830
|
|
|
823
831
|
type ToastVariant = "default" | "success" | "error" | "info";
|
|
824
832
|
interface ToastOptions {
|
|
@@ -1692,7 +1700,7 @@ interface CumulativeCurveProps {
|
|
|
1692
1700
|
/** 누적 성장 곡선 + 마일스톤 배지 + 다음 목표선. 방문자·판매·적립 총량류에. */
|
|
1693
1701
|
declare function CumulativeCurve({ daily, total, todayCount, accent, milestones, empty, className, }: CumulativeCurveProps): react_jsx_runtime.JSX.Element | null;
|
|
1694
1702
|
|
|
1695
|
-
type PWAInstallState = "android-ready" | "ios-safari" | "installed" | "unsupported";
|
|
1703
|
+
type PWAInstallState = "android-ready" | "ios-safari" | "in-app" | "installed" | "unsupported";
|
|
1696
1704
|
interface UsePWAInstallReturn {
|
|
1697
1705
|
state: PWAInstallState;
|
|
1698
1706
|
/** Android only — triggers the native install dialog */
|
|
@@ -1705,12 +1713,14 @@ interface IOSInstallSheetProps {
|
|
|
1705
1713
|
onClose(): void;
|
|
1706
1714
|
appName: string;
|
|
1707
1715
|
iconSrc?: string;
|
|
1716
|
+
/** "in-app": 인스타·카톡 안 브라우저 — 바깥 브라우저로 여는 법을 안내한다 */
|
|
1717
|
+
mode?: "safari" | "in-app";
|
|
1708
1718
|
}
|
|
1709
1719
|
/**
|
|
1710
1720
|
* Bottom-sheet guide for iOS "Add to Home Screen".
|
|
1711
1721
|
* Can also be used standalone if you need custom trigger UI.
|
|
1712
1722
|
*/
|
|
1713
|
-
declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps):
|
|
1723
|
+
declare function IOSInstallSheet({ open, onClose, appName, iconSrc, mode }: IOSInstallSheetProps): React$1.ReactPortal | null;
|
|
1714
1724
|
|
|
1715
1725
|
interface PWAInstallButtonProps {
|
|
1716
1726
|
/** App name shown in iOS guide sheet */
|
|
@@ -1722,6 +1732,8 @@ interface PWAInstallButtonProps {
|
|
|
1722
1732
|
/** Label shown when already installed. Default: undefined — button hidden */
|
|
1723
1733
|
installedLabel?: string;
|
|
1724
1734
|
className?: string;
|
|
1735
|
+
/** "chip": 헤더용 — ShareButton 과 같은 연회색 알약. 기본 "solid"(검은 버튼) */
|
|
1736
|
+
variant?: "solid" | "chip";
|
|
1725
1737
|
}
|
|
1726
1738
|
/**
|
|
1727
1739
|
* PWA install button that handles both Android and iOS.
|
|
@@ -1734,7 +1746,7 @@ interface PWAInstallButtonProps {
|
|
|
1734
1746
|
* Usage:
|
|
1735
1747
|
* <PWAInstallButton appName="My App" iconSrc="/icon.png" />
|
|
1736
1748
|
*/
|
|
1737
|
-
declare function PWAInstallButton({ appName, iconSrc, label, installedLabel, className, }: PWAInstallButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1749
|
+
declare function PWAInstallButton({ appName, iconSrc, label, installedLabel, className, variant, }: PWAInstallButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1738
1750
|
|
|
1739
1751
|
/**
|
|
1740
1752
|
* Drop into <head> in your root layout to pre-load kit styles and
|
package/dist/index.d.ts
CHANGED
|
@@ -817,8 +817,16 @@ interface ShareButtonProps {
|
|
|
817
817
|
label?: string;
|
|
818
818
|
copiedLabel?: string;
|
|
819
819
|
className?: string;
|
|
820
|
+
/**
|
|
821
|
+
* 설치할 수 있는 기기면 누를 때 "링크 보내기 · 홈 화면에 추가" 시트를 띄운다.
|
|
822
|
+
* 이미 설치했거나 지원 안 하는 브라우저면 지금처럼 바로 공유. AppShell 안에서 쓴다(시트가 거기 뜬다).
|
|
823
|
+
*/
|
|
824
|
+
install?: boolean | {
|
|
825
|
+
appName?: string;
|
|
826
|
+
iconSrc?: string;
|
|
827
|
+
};
|
|
820
828
|
}
|
|
821
|
-
declare function ShareButton({ url, title, text, label, copiedLabel, className, }: ShareButtonProps): react_jsx_runtime.JSX.Element;
|
|
829
|
+
declare function ShareButton({ url, title, text, label, copiedLabel, className, install, }: ShareButtonProps): react_jsx_runtime.JSX.Element;
|
|
822
830
|
|
|
823
831
|
type ToastVariant = "default" | "success" | "error" | "info";
|
|
824
832
|
interface ToastOptions {
|
|
@@ -1692,7 +1700,7 @@ interface CumulativeCurveProps {
|
|
|
1692
1700
|
/** 누적 성장 곡선 + 마일스톤 배지 + 다음 목표선. 방문자·판매·적립 총량류에. */
|
|
1693
1701
|
declare function CumulativeCurve({ daily, total, todayCount, accent, milestones, empty, className, }: CumulativeCurveProps): react_jsx_runtime.JSX.Element | null;
|
|
1694
1702
|
|
|
1695
|
-
type PWAInstallState = "android-ready" | "ios-safari" | "installed" | "unsupported";
|
|
1703
|
+
type PWAInstallState = "android-ready" | "ios-safari" | "in-app" | "installed" | "unsupported";
|
|
1696
1704
|
interface UsePWAInstallReturn {
|
|
1697
1705
|
state: PWAInstallState;
|
|
1698
1706
|
/** Android only — triggers the native install dialog */
|
|
@@ -1705,12 +1713,14 @@ interface IOSInstallSheetProps {
|
|
|
1705
1713
|
onClose(): void;
|
|
1706
1714
|
appName: string;
|
|
1707
1715
|
iconSrc?: string;
|
|
1716
|
+
/** "in-app": 인스타·카톡 안 브라우저 — 바깥 브라우저로 여는 법을 안내한다 */
|
|
1717
|
+
mode?: "safari" | "in-app";
|
|
1708
1718
|
}
|
|
1709
1719
|
/**
|
|
1710
1720
|
* Bottom-sheet guide for iOS "Add to Home Screen".
|
|
1711
1721
|
* Can also be used standalone if you need custom trigger UI.
|
|
1712
1722
|
*/
|
|
1713
|
-
declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps):
|
|
1723
|
+
declare function IOSInstallSheet({ open, onClose, appName, iconSrc, mode }: IOSInstallSheetProps): React$1.ReactPortal | null;
|
|
1714
1724
|
|
|
1715
1725
|
interface PWAInstallButtonProps {
|
|
1716
1726
|
/** App name shown in iOS guide sheet */
|
|
@@ -1722,6 +1732,8 @@ interface PWAInstallButtonProps {
|
|
|
1722
1732
|
/** Label shown when already installed. Default: undefined — button hidden */
|
|
1723
1733
|
installedLabel?: string;
|
|
1724
1734
|
className?: string;
|
|
1735
|
+
/** "chip": 헤더용 — ShareButton 과 같은 연회색 알약. 기본 "solid"(검은 버튼) */
|
|
1736
|
+
variant?: "solid" | "chip";
|
|
1725
1737
|
}
|
|
1726
1738
|
/**
|
|
1727
1739
|
* PWA install button that handles both Android and iOS.
|
|
@@ -1734,7 +1746,7 @@ interface PWAInstallButtonProps {
|
|
|
1734
1746
|
* Usage:
|
|
1735
1747
|
* <PWAInstallButton appName="My App" iconSrc="/icon.png" />
|
|
1736
1748
|
*/
|
|
1737
|
-
declare function PWAInstallButton({ appName, iconSrc, label, installedLabel, className, }: PWAInstallButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1749
|
+
declare function PWAInstallButton({ appName, iconSrc, label, installedLabel, className, variant, }: PWAInstallButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1738
1750
|
|
|
1739
1751
|
/**
|
|
1740
1752
|
* Drop into <head> in your root layout to pre-load kit styles and
|