@m1kapp/kit 0.0.23 → 0.0.25
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 +221 -2
- package/bin/claim.mjs +77 -0
- package/bin/m1kkit.mjs +16 -0
- package/bin/skills/m1kapp-init.md +108 -92
- package/bin/stats.mjs +211 -0
- package/bin/track.mjs +95 -0
- package/dist/index.d.mts +652 -4
- package/dist/index.d.ts +652 -4
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/meta.json +325 -0
- package/dist/pwa.js +2 -2
- package/dist/pwa.mjs +2 -2
- package/dist/styles.css +1 -1
- package/dist/utils.d.mts +17 -1
- package/dist/utils.d.ts +17 -1
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +2 -2
package/dist/utils.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{clsx as
|
|
1
|
+
import{clsx as f}from"clsx";import{twMerge as g}from"tailwind-merge";function $(r){let t=new Date(r),n=Date.now()-t.getTime(),e=Math.floor(n/1e3);return e<60?"\uBC29\uAE08 \uC804":e<3600?`${Math.floor(e/60)}\uBD84 \uC804`:e<86400?`${Math.floor(e/3600)}\uC2DC\uAC04 \uC804`:e<86400*2?"\uC5B4\uC81C":e<86400*7?`${Math.floor(e/86400)}\uC77C \uC804`:e<86400*30?`${Math.floor(e/(86400*7))}\uC8FC \uC804`:t.toLocaleDateString("ko-KR",{year:"numeric",month:"long",day:"numeric"})}function p(r){let t=Math.abs(r),n=r<0?"-":"";return t>=1e8?`${n}${(t/1e8).toFixed(1).replace(/\.0$/,"")}\uC5B5`:t>=1e4?`${n}${(t/1e4).toFixed(1).replace(/\.0$/,"")}\uB9CC`:t>=1e3?`${n}${(t/1e3).toFixed(1).replace(/\.0$/,"")}\uCC9C`:r.toLocaleString("ko-KR")}function D(r,t="KRW",n="ko-KR"){return new Intl.NumberFormat(n,{style:"currency",currency:t,maximumFractionDigits:t==="KRW"?0:2}).format(r)}function y(...r){return g(f(r))}function d(r,t={}){let{style:n="short"}=t,e=Math.max(0,Math.floor(r/1e3)),o=Math.floor(e/3600),a=Math.floor(e%3600/60),i=e%60;return n==="clock"?o>0?`${o}:${String(a).padStart(2,"0")}:${String(i).padStart(2,"0")}`:`${a}:${String(i).padStart(2,"0")}`:o>0?a>0?`${o}\uC2DC\uAC04 ${a}\uBD84`:`${o}\uC2DC\uAC04`:a>0?i>0?`${a}\uBD84 ${i}\uCD08`:`${a}\uBD84`:`${i}\uCD08`}var m=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function c(r){return`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`}function l(r){let t=new Date(r),n=c(t);return n===c(new Date)?"\uC624\uB298":n===c(new Date(Date.now()-864e5))?"\uC5B4\uC81C":`${t.getMonth()+1}\uC6D4 ${t.getDate()}\uC77C (${m[t.getDay()]})`}function x(r,t){let n=[],e=new Map;for(let o of r){let a=t(o),i=new Date(a),s=c(i),u=e.get(s);u||(u={date:s,label:l(a),items:[]},e.set(s,u),n.push(s)),u.items.push(o)}return n.map(o=>e.get(o))}export{y as cn,l as formatDayLabel,d as formatDuration,p as formatNumber,D as formatPrice,x as groupByDay,$ as relativeTime};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m1kapp/kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "UI, SEO, and PWA utilities for side projects",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"postinstall": "node bin/postinstall.mjs",
|
|
56
|
-
"build": "rm -rf dist && mkdir -p .tmp && npx @tailwindcss/cli -i src/ui/styles.css -o .tmp/styles.css --minify && node scripts/embed-css.mjs && tsup",
|
|
56
|
+
"build": "rm -rf dist && mkdir -p .tmp && npx @tailwindcss/cli -i src/ui/styles.css -o .tmp/styles.css --minify && node scripts/embed-css.mjs && tsup && node scripts/gen-meta.mjs",
|
|
57
57
|
"dev": "tsup --watch",
|
|
58
58
|
"test": "vitest run",
|
|
59
59
|
"test:watch": "vitest",
|