@m1kapp/kit 0.0.49 → 0.0.51
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 +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/meta.json +5 -5
- package/dist/pwa.d.mts +4 -3
- package/dist/pwa.d.ts +4 -3
- package/dist/pwa.js +2 -2
- package/dist/pwa.mjs +2 -2
- 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 {
|
|
@@ -1710,7 +1718,7 @@ interface IOSInstallSheetProps {
|
|
|
1710
1718
|
* Bottom-sheet guide for iOS "Add to Home Screen".
|
|
1711
1719
|
* Can also be used standalone if you need custom trigger UI.
|
|
1712
1720
|
*/
|
|
1713
|
-
declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps):
|
|
1721
|
+
declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps): React$1.ReactPortal | null;
|
|
1714
1722
|
|
|
1715
1723
|
interface PWAInstallButtonProps {
|
|
1716
1724
|
/** App name shown in iOS guide sheet */
|
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 {
|
|
@@ -1710,7 +1718,7 @@ interface IOSInstallSheetProps {
|
|
|
1710
1718
|
* Bottom-sheet guide for iOS "Add to Home Screen".
|
|
1711
1719
|
* Can also be used standalone if you need custom trigger UI.
|
|
1712
1720
|
*/
|
|
1713
|
-
declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps):
|
|
1721
|
+
declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps): React$1.ReactPortal | null;
|
|
1714
1722
|
|
|
1715
1723
|
interface PWAInstallButtonProps {
|
|
1716
1724
|
/** App name shown in iOS guide sheet */
|