@m1kapp/kit 0.0.51 → 0.0.53
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 +18 -0
- package/dist/index.d.mts +12 -5
- package/dist/index.d.ts +12 -5
- package/dist/index.js +4 -4
- package/dist/index.mjs +3 -3
- package/dist/meta.json +6 -6
- package/dist/pwa.d.mts +12 -5
- package/dist/pwa.d.ts +12 -5
- 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
|
@@ -557,6 +557,24 @@ npx m1kkit pwa --bg=#0f0f1a # 앱 첫 화면 색과 맞춘다(다르면 열릴
|
|
|
557
557
|
Vite 는 `index.html` `<head>` 에 태그가 들어가고(다시 돌리면 교체), Next 는 출력된 태그를 layout 에 붙이세요.
|
|
558
558
|
서비스워커는 localhost 에선 등록하지 않습니다 — 확인은 배포 뒤에.
|
|
559
559
|
|
|
560
|
+
### 설치 버튼 (`PWAInstallButton` · `ShareButton install`)
|
|
561
|
+
|
|
562
|
+
```tsx
|
|
563
|
+
<PWAInstallButton variant="chip" label="설치" appName="환율계산기" iconSrc="/icon-192.png" />
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
설치할 수 있을 때만 보이고, 기기마다 알아서 다르게 안내합니다. 고칠 일은 kit 에서 고치고 앱은 버전만 올리면 됩니다.
|
|
567
|
+
|
|
568
|
+
| 들어온 곳 | 누르면 |
|
|
569
|
+
|---|---|
|
|
570
|
+
| 안드로이드 크롬 · PC 크롬 | 크롬 설치 창 |
|
|
571
|
+
| 아이폰 Safari | 좋은 점 + 공유 → 홈 화면에 추가 → 추가 |
|
|
572
|
+
| 카카오톡 · 라인 · 안드로이드 인스타 등 | 좋은 점 + **[기본 브라우저로 열기] 한 번** → 열린 브라우저에서 다시 설치 |
|
|
573
|
+
| 아이폰 인스타 · 스레드 | 좋은 점 + 그 앱 메뉴 이름대로 단계(··· → 외부 브라우저에서 열기) + 링크 복사 |
|
|
574
|
+
| 이미 설치 · 지원 안 함 | 버튼이 사라짐 |
|
|
575
|
+
|
|
576
|
+
앱 안 브라우저(인스타·카톡)에서는 어떤 웹앱도 바로 설치할 수 없습니다 — 플랫폼 제약이라 한 번은 바깥 브라우저로 넘어가야 합니다.
|
|
577
|
+
|
|
560
578
|
갱신: 온라인으로 열면 매번 새 배포(페이지는 네트워크 먼저). 켜 둔 채 다시 켜는 앱은 돌아올 때 30분에 한 번 새 배포를 확인해 새로고침합니다.
|
|
561
579
|
`sw.js` 는 배포마다 바꿀 필요가 없고, kit 을 올린 뒤 `npx m1kkit pwa` 를 다시 돌리면 그 판의 서비스워커로 바뀝니다.
|
|
562
580
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1700,7 +1700,7 @@ interface CumulativeCurveProps {
|
|
|
1700
1700
|
/** 누적 성장 곡선 + 마일스톤 배지 + 다음 목표선. 방문자·판매·적립 총량류에. */
|
|
1701
1701
|
declare function CumulativeCurve({ daily, total, todayCount, accent, milestones, empty, className, }: CumulativeCurveProps): react_jsx_runtime.JSX.Element | null;
|
|
1702
1702
|
|
|
1703
|
-
type PWAInstallState = "android-ready" | "ios-safari" | "installed" | "unsupported";
|
|
1703
|
+
type PWAInstallState = "android-ready" | "ios-safari" | "in-app" | "installed" | "unsupported";
|
|
1704
1704
|
interface UsePWAInstallReturn {
|
|
1705
1705
|
state: PWAInstallState;
|
|
1706
1706
|
/** Android only — triggers the native install dialog */
|
|
@@ -1713,12 +1713,17 @@ interface IOSInstallSheetProps {
|
|
|
1713
1713
|
onClose(): void;
|
|
1714
1714
|
appName: string;
|
|
1715
1715
|
iconSrc?: string;
|
|
1716
|
+
/** "in-app": 인스타·카톡 안 브라우저 — 바깥 브라우저로 여는 법을 안내한다 */
|
|
1717
|
+
mode?: "safari" | "in-app";
|
|
1718
|
+
/** 설치하면 뭐가 좋은지 — 이걸 먼저 보여 줘야 단계를 따라 한다 */
|
|
1719
|
+
benefits?: string[];
|
|
1716
1720
|
}
|
|
1717
1721
|
/**
|
|
1718
|
-
*
|
|
1719
|
-
*
|
|
1722
|
+
* 홈 화면 추가 안내 시트 — iOS Safari 와 앱 안 브라우저(인스타·카톡 …) 둘 다.
|
|
1723
|
+
* 앱 안이면 카카오톡·라인·안드로이드는 [브라우저로 열기] 한 번으로 넘기고, 안 되는 곳(iOS 인스타·스레드)은
|
|
1724
|
+
* 그 앱 메뉴 이름 그대로 단계를 보여 주고 링크 복사를 붙인다.
|
|
1720
1725
|
*/
|
|
1721
|
-
declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps): React$1.ReactPortal | null;
|
|
1726
|
+
declare function IOSInstallSheet({ open, onClose, appName, iconSrc, mode, benefits }: IOSInstallSheetProps): React$1.ReactPortal | null;
|
|
1722
1727
|
|
|
1723
1728
|
interface PWAInstallButtonProps {
|
|
1724
1729
|
/** App name shown in iOS guide sheet */
|
|
@@ -1730,6 +1735,8 @@ interface PWAInstallButtonProps {
|
|
|
1730
1735
|
/** Label shown when already installed. Default: undefined — button hidden */
|
|
1731
1736
|
installedLabel?: string;
|
|
1732
1737
|
className?: string;
|
|
1738
|
+
/** "chip": 헤더용 — ShareButton 과 같은 연회색 알약. 기본 "solid"(검은 버튼) */
|
|
1739
|
+
variant?: "solid" | "chip";
|
|
1733
1740
|
}
|
|
1734
1741
|
/**
|
|
1735
1742
|
* PWA install button that handles both Android and iOS.
|
|
@@ -1742,7 +1749,7 @@ interface PWAInstallButtonProps {
|
|
|
1742
1749
|
* Usage:
|
|
1743
1750
|
* <PWAInstallButton appName="My App" iconSrc="/icon.png" />
|
|
1744
1751
|
*/
|
|
1745
|
-
declare function PWAInstallButton({ appName, iconSrc, label, installedLabel, className, }: PWAInstallButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1752
|
+
declare function PWAInstallButton({ appName, iconSrc, label, installedLabel, className, variant, }: PWAInstallButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1746
1753
|
|
|
1747
1754
|
/**
|
|
1748
1755
|
* Drop into <head> in your root layout to pre-load kit styles and
|
package/dist/index.d.ts
CHANGED
|
@@ -1700,7 +1700,7 @@ interface CumulativeCurveProps {
|
|
|
1700
1700
|
/** 누적 성장 곡선 + 마일스톤 배지 + 다음 목표선. 방문자·판매·적립 총량류에. */
|
|
1701
1701
|
declare function CumulativeCurve({ daily, total, todayCount, accent, milestones, empty, className, }: CumulativeCurveProps): react_jsx_runtime.JSX.Element | null;
|
|
1702
1702
|
|
|
1703
|
-
type PWAInstallState = "android-ready" | "ios-safari" | "installed" | "unsupported";
|
|
1703
|
+
type PWAInstallState = "android-ready" | "ios-safari" | "in-app" | "installed" | "unsupported";
|
|
1704
1704
|
interface UsePWAInstallReturn {
|
|
1705
1705
|
state: PWAInstallState;
|
|
1706
1706
|
/** Android only — triggers the native install dialog */
|
|
@@ -1713,12 +1713,17 @@ interface IOSInstallSheetProps {
|
|
|
1713
1713
|
onClose(): void;
|
|
1714
1714
|
appName: string;
|
|
1715
1715
|
iconSrc?: string;
|
|
1716
|
+
/** "in-app": 인스타·카톡 안 브라우저 — 바깥 브라우저로 여는 법을 안내한다 */
|
|
1717
|
+
mode?: "safari" | "in-app";
|
|
1718
|
+
/** 설치하면 뭐가 좋은지 — 이걸 먼저 보여 줘야 단계를 따라 한다 */
|
|
1719
|
+
benefits?: string[];
|
|
1716
1720
|
}
|
|
1717
1721
|
/**
|
|
1718
|
-
*
|
|
1719
|
-
*
|
|
1722
|
+
* 홈 화면 추가 안내 시트 — iOS Safari 와 앱 안 브라우저(인스타·카톡 …) 둘 다.
|
|
1723
|
+
* 앱 안이면 카카오톡·라인·안드로이드는 [브라우저로 열기] 한 번으로 넘기고, 안 되는 곳(iOS 인스타·스레드)은
|
|
1724
|
+
* 그 앱 메뉴 이름 그대로 단계를 보여 주고 링크 복사를 붙인다.
|
|
1720
1725
|
*/
|
|
1721
|
-
declare function IOSInstallSheet({ open, onClose, appName, iconSrc }: IOSInstallSheetProps): React$1.ReactPortal | null;
|
|
1726
|
+
declare function IOSInstallSheet({ open, onClose, appName, iconSrc, mode, benefits }: IOSInstallSheetProps): React$1.ReactPortal | null;
|
|
1722
1727
|
|
|
1723
1728
|
interface PWAInstallButtonProps {
|
|
1724
1729
|
/** App name shown in iOS guide sheet */
|
|
@@ -1730,6 +1735,8 @@ interface PWAInstallButtonProps {
|
|
|
1730
1735
|
/** Label shown when already installed. Default: undefined — button hidden */
|
|
1731
1736
|
installedLabel?: string;
|
|
1732
1737
|
className?: string;
|
|
1738
|
+
/** "chip": 헤더용 — ShareButton 과 같은 연회색 알약. 기본 "solid"(검은 버튼) */
|
|
1739
|
+
variant?: "solid" | "chip";
|
|
1733
1740
|
}
|
|
1734
1741
|
/**
|
|
1735
1742
|
* PWA install button that handles both Android and iOS.
|
|
@@ -1742,7 +1749,7 @@ interface PWAInstallButtonProps {
|
|
|
1742
1749
|
* Usage:
|
|
1743
1750
|
* <PWAInstallButton appName="My App" iconSrc="/icon.png" />
|
|
1744
1751
|
*/
|
|
1745
|
-
declare function PWAInstallButton({ appName, iconSrc, label, installedLabel, className, }: PWAInstallButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1752
|
+
declare function PWAInstallButton({ appName, iconSrc, label, installedLabel, className, variant, }: PWAInstallButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
1746
1753
|
|
|
1747
1754
|
/**
|
|
1748
1755
|
* Drop into <head> in your root layout to pre-load kit styles and
|