@naiheyoung/use 0.0.1

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.
@@ -0,0 +1,149 @@
1
+ # MacOS
2
+ .DS_Store
3
+
4
+ # Logs
5
+ logs
6
+ *.log
7
+ npm-debug.log*
8
+ yarn-debug.log*
9
+ yarn-error.log*
10
+ lerna-debug.log*
11
+ .pnpm-debug.log*
12
+
13
+ # Diagnostic reports (https://nodejs.org/api/report.html)
14
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
15
+
16
+ # Runtime data
17
+ pids
18
+ *.pid
19
+ *.seed
20
+ *.pid.lock
21
+
22
+ # Directory for instrumented libs generated by jscoverage/JSCover
23
+ lib-cov
24
+
25
+ # Coverage directory used by tools like istanbul
26
+ coverage
27
+ *.lcov
28
+
29
+ # nyc test coverage
30
+ .nyc_output
31
+
32
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
33
+ .grunt
34
+
35
+ # Bower dependency directory (https://bower.io/)
36
+ bower_components
37
+
38
+ # node-waf configuration
39
+ .lock-wscript
40
+
41
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
42
+ build/Release
43
+
44
+ # Dependency directories
45
+ node_modules/
46
+ jspm_packages/
47
+
48
+ # Snowpack dependency directory (https://snowpack.dev/)
49
+ web_modules/
50
+
51
+ # TypeScript cache
52
+ *.tsbuildinfo
53
+
54
+ # Optional npm cache directory
55
+ .npm
56
+
57
+ # Optional eslint cache
58
+ .eslintcache
59
+
60
+ # Optional stylelint cache
61
+ .stylelintcache
62
+
63
+ # Microbundle cache
64
+ .rpt2_cache/
65
+ .rts2_cache_cjs/
66
+ .rts2_cache_es/
67
+ .rts2_cache_umd/
68
+
69
+ # Optional REPL history
70
+ .node_repl_history
71
+
72
+ # Output of 'npm pack'
73
+ *.tgz
74
+
75
+ # Yarn Integrity file
76
+ .yarn-integrity
77
+
78
+ # dotenv environment variable files
79
+ .env
80
+ .env.development.local
81
+ .env.test.local
82
+ .env.production.local
83
+ .env.local
84
+
85
+ # parcel-bundler cache (https://parceljs.org/)
86
+ .cache
87
+ .parcel-cache
88
+
89
+ # Next.js build output
90
+ .next
91
+ out
92
+
93
+ # Nuxt.js build / generate output
94
+ .nuxt
95
+ dist
96
+
97
+ # Gatsby files
98
+ .cache/
99
+ # Comment in the public line in if your project uses Gatsby and not Next.js
100
+ # https://nextjs.org/blog/next-9-1#public-directory-support
101
+ # public
102
+
103
+ # vuepress build output
104
+ .vuepress/dist
105
+
106
+ # vuepress v2.x temp and cache directory
107
+ .temp
108
+
109
+ # Docusaurus cache and generated files
110
+ .docusaurus
111
+
112
+ # Serverless directories
113
+ .serverless/
114
+
115
+ # FuseBox cache
116
+ .fusebox/
117
+
118
+ # DynamoDB Local files
119
+ .dynamodb/
120
+
121
+ # TernJS port file
122
+ .tern-port
123
+
124
+ # VSCode
125
+ .vscode/
126
+ .vscode-test
127
+
128
+ # yarn v2
129
+ .yarn/cache
130
+ .yarn/unplugged
131
+ .yarn/build-state.yml
132
+ .yarn/install-state.gz
133
+ .pnp.*
134
+
135
+ # Cloudflare
136
+ .wrangler/
137
+ .dev.vars*
138
+ !.dev.vars.example
139
+ !.env.example
140
+
141
+ # Vercel
142
+ .vercel/
143
+
144
+ # Sentry Vite Plugin
145
+ .env.sentry-build-plugin
146
+
147
+ # aws-cdk
148
+ .cdk.staging
149
+ cdk.out
@@ -0,0 +1,9 @@
1
+ {
2
+ "bracketSameLine": true,
3
+ "semi": false,
4
+ "singleQuote": true,
5
+ "htmlWhitespaceSensitivity": "ignore",
6
+ "trailingComma": "none",
7
+ "arrowParens": "avoid",
8
+ "printWidth": 95
9
+ }
@@ -0,0 +1,386 @@
1
+ /* Powered by @naiheyoung/use. 奈何*/
2
+ @import '@naiheyoung/color';
3
+
4
+ /* dm-mono-latin-400-normal */
5
+ @font-face {
6
+ font-family: 'DM Mono';
7
+ font-style: normal;
8
+ font-display: swap;
9
+ font-weight: 400;
10
+ src:
11
+ url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-400-normal.woff2)
12
+ format('woff2'),
13
+ url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-400-normal.woff)
14
+ format('woff');
15
+ unicode-range:
16
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
17
+ U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
18
+ }
19
+
20
+ /* dm-mono-latin-500-normal */
21
+ @font-face {
22
+ font-family: 'DM Mono';
23
+ font-style: normal;
24
+ font-display: swap;
25
+ font-weight: 500;
26
+ src:
27
+ url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-500-normal.woff2)
28
+ format('woff2'),
29
+ url(https://cdn.jsdelivr.net/fontsource/fonts/dm-mono@latest/latin-500-normal.woff)
30
+ format('woff');
31
+ unicode-range:
32
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
33
+ U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
34
+ }
35
+
36
+ /* dm-sans-latin-wght-normal */
37
+ @font-face {
38
+ font-family: 'DM Sans Variable';
39
+ font-style: normal;
40
+ font-display: swap;
41
+ font-weight: 100 1000;
42
+ src: url(https://cdn.jsdelivr.net/fontsource/fonts/dm-sans:vf@latest/latin-wght-normal.woff2)
43
+ format('woff2-variations');
44
+ unicode-range:
45
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
46
+ U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
47
+ }
48
+
49
+ /* jetbrains-mono-latin-wght-normal */
50
+ @font-face {
51
+ font-family: 'JetBrains Mono Variable';
52
+ font-style: normal;
53
+ font-display: swap;
54
+ font-weight: 100 800;
55
+ src: url(https://cdn.jsdelivr.net/fontsource/fonts/jetbrains-mono:vf@latest/latin-wght-normal.woff2)
56
+ format('woff2-variations');
57
+ unicode-range:
58
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
59
+ U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
60
+ }
61
+
62
+ :root,
63
+ :host {
64
+ --font-mono: 'DM Mono', monospace;
65
+ --font-sans: 'DM Sans Variable', monospace;
66
+ --font-code: 'JetBrains Mono Variable', monospace;
67
+ }
68
+
69
+ :root {
70
+ --shiki-dark-bg-0: #151515;
71
+ --prose-padding-block: 12px;
72
+ --prose-padding-inline: 1.5rem;
73
+ --prose-radius: 0.5rem;
74
+ --prose-diff-add-color: #3dd68c;
75
+ --prose-diff-remove-color: #cb7676;
76
+ --prose-highlighted-bg-color: rgba(101, 117, 133, 0.16);
77
+ --prose-highlighted-word-color: #e6a817;
78
+ --prose-focused-opacity: 0.7;
79
+ --prose-focused-blur: 0.095rem;
80
+ --prose-li-fg: var(--colors-pink-rgb);
81
+ }
82
+
83
+ .prose h1 {
84
+ font-weight: 800;
85
+ font-size: 2.25em;
86
+ margin-top: 0;
87
+ margin-bottom: 0.8888889em;
88
+ line-height: 1.1111111;
89
+ }
90
+
91
+ .prose h2 {
92
+ font-weight: 700;
93
+ font-size: 1.5em;
94
+ margin-top: 2em;
95
+ margin-bottom: 1em;
96
+ line-height: 1.3333333;
97
+ }
98
+
99
+ .prose h3 {
100
+ color: inherit;
101
+ font-weight: 600;
102
+ font-size: 1.25em;
103
+ margin-top: 1.6em;
104
+ margin-bottom: 0.6em;
105
+ line-height: 1.6;
106
+ opacity: 0.7;
107
+ }
108
+
109
+ .prose h4 {
110
+ color: inherit;
111
+ font-weight: 600;
112
+ margin-top: 1.5em;
113
+ margin-bottom: 0.5em;
114
+ line-height: 1.5;
115
+ }
116
+
117
+ html.dark .prose .has-diff span.diff::before {
118
+ position: absolute;
119
+ left: calc(var(--prose-padding-inline) / 3);
120
+ transition: color 0.35s;
121
+ }
122
+
123
+ html.dark .prose .has-diff span.diff.add::before {
124
+ content: '+';
125
+ color: var(--prose-diff-add-color);
126
+ }
127
+
128
+ html.dark .prose .has-diff span.diff.remove {
129
+ opacity: 0.85;
130
+
131
+ &::before {
132
+ content: '-';
133
+ color: var(--prose-diff-remove-color);
134
+ }
135
+ }
136
+
137
+ html.dark .prose .has-highlighted span.highlighted {
138
+ background-color: var(--prose-highlighted-bg-color);
139
+ transition: background-color 0.35s;
140
+ width: calc(100% + (var(--prose-padding-inline) * 2));
141
+ display: inline-block;
142
+ margin-inline: -1.5rem;
143
+ padding-inline: var(--prose-padding-inline);
144
+ }
145
+
146
+ html.dark .prose .shiki span.highlighted-word {
147
+ padding: 1px 3px;
148
+ margin: -1px -3px;
149
+ border-radius: 3px;
150
+ text-decoration: var(--prose-highlighted-word-color) underline;
151
+ }
152
+
153
+ html.dark .prose .has-focused .line:not(.focused) {
154
+ opacity: var(--prose-focused-opacity);
155
+ filter: blur(var(--prose-focused-blur));
156
+ transition:
157
+ opacity 0.35s,
158
+ filter 0.35s;
159
+ }
160
+
161
+ html.dark .prose .has-focused:hover .line:not(.focused) {
162
+ opacity: 1;
163
+ filter: blur(0);
164
+ }
165
+
166
+ .prose hr {
167
+ height: 1rem;
168
+ }
169
+
170
+ .prose mark,
171
+ .prose code:not(.shiki code) {
172
+ background-color: #fe5a1d;
173
+ border-radius: 3px;
174
+ padding: 1px 3px;
175
+ font-size: 0.875rem;
176
+ font-weight: 500;
177
+ color: marktext;
178
+ }
179
+
180
+ .prose blockquote {
181
+ position: relative;
182
+ font-weight: 500;
183
+ font-style: italic;
184
+ color: inherit;
185
+ margin-block: 1.6em;
186
+ padding-left: 1em;
187
+ padding-block: 0.5em;
188
+
189
+ &::before {
190
+ position: absolute;
191
+ content: '';
192
+ width: 0.25rem;
193
+ background-color: rgba(125, 125, 125, 0.3);
194
+ top: 0.6rem;
195
+ bottom: 0.4rem;
196
+ border-radius: 3px;
197
+ left: 0;
198
+ }
199
+ }
200
+
201
+ .prose > p,
202
+ .markdown-alert > p {
203
+ margin-block: 1.25em;
204
+ }
205
+
206
+ .prose .markdown-magic-link {
207
+ display: flex;
208
+ gap: 3px;
209
+ font-size: 0.875rem;
210
+ color: rgba(0, 0, 0, 0.55);
211
+ align-items: center;
212
+
213
+ &.markdown-magic-link-github-at {
214
+ background-color: rgba(0, 0, 0, 0.1);
215
+ border-radius: 1.5em;
216
+ width: fit-content;
217
+ padding-right: 0.6em;
218
+ transition: background-color 0.35s;
219
+
220
+ &:hover {
221
+ background-color: rgba(0, 0, 0, 0.15);
222
+ }
223
+ }
224
+
225
+ & .markdown-magic-link-image {
226
+ display: inline-block;
227
+ width: 1.5em;
228
+ height: 1.5em;
229
+ background-size: cover;
230
+ background-repeat: no-repeat;
231
+ background-position: center;
232
+ border-radius: 50%;
233
+ }
234
+ }
235
+
236
+ html.dark .prose .markdown-magic-link {
237
+ color: rgba(255, 255, 255, 0.55);
238
+
239
+ &.markdown-magic-link-github-at {
240
+ background-color: rgba(255, 255, 255, 0.1);
241
+
242
+ &:hover {
243
+ background-color: rgba(255, 255, 255, 0.15);
244
+ }
245
+ }
246
+ }
247
+
248
+ .prose ul {
249
+ padding: 1rem;
250
+
251
+ > li {
252
+ position: relative;
253
+ padding-inline: 2rem;
254
+ padding-bottom: 1.5rem;
255
+ font-size: 1.25rem;
256
+
257
+ &::before {
258
+ position: absolute;
259
+ content: '';
260
+ width: 0.625rem;
261
+ height: 0.625rem;
262
+ left: 0;
263
+ top: 0.7rem;
264
+ border-radius: 50%;
265
+ background: rgb(var(--prose-li-fg));
266
+ box-shadow: 0 0 0 0.25rem rgb(var(--prose-li-fg) / 0.3);
267
+ animation: living 2s infinite;
268
+ animation-delay: calc(0.2s * var(--living-delay));
269
+ }
270
+ &::after {
271
+ position: absolute;
272
+ content: '';
273
+ width: 1px;
274
+ height: 100%;
275
+ background-color: #a3a3a31a;
276
+ left: 0.3125rem;
277
+ top: 0.925rem;
278
+ z-index: -1;
279
+ }
280
+ }
281
+
282
+ > li:last-child::after {
283
+ height: 0;
284
+ }
285
+ }
286
+
287
+ @keyframes living {
288
+ 0% {
289
+ box-shadow: 0 0 0 0.25rem rgb(var(--prose-li-fg) / 0.3);
290
+ }
291
+ 50% {
292
+ box-shadow: 0 0 0 0.35rem rgb(var(--prose-li-fg) / 0.3);
293
+ }
294
+ 100% {
295
+ box-shadow: 0 0 0 0.25rem rgb(var(--prose-li-fg) / 0.3);
296
+ }
297
+ }
298
+
299
+ .prose ul > li:nth-child(1) {
300
+ --living-delay: 0;
301
+ }
302
+ .prose ul > li:nth-child(2) {
303
+ --living-delay: 1;
304
+ }
305
+ .prose ul > li:nth-child(3) {
306
+ --living-delay: 2;
307
+ }
308
+ .prose ul > li:nth-child(4) {
309
+ --living-delay: 3;
310
+ }
311
+ .prose ul > li:nth-child(5) {
312
+ --living-delay: 4;
313
+ }
314
+
315
+ .prose p > a:not(:has(img, picture, figure, figcaption)) {
316
+ position: relative;
317
+
318
+ &::after {
319
+ position: absolute;
320
+ content: '';
321
+ width: 0;
322
+ height: 3px;
323
+ background-color: rgb(var(--colors-d-rgb) / 0.47);
324
+ border-radius: var(--spacing);
325
+ bottom: -2px;
326
+ left: 50%;
327
+ transform: translateX(-50%);
328
+ transition: width 0.25s;
329
+ }
330
+ &:hover::after {
331
+ width: 95%;
332
+ }
333
+ }
334
+
335
+ .prose p > a.prose-link {
336
+ position: relative;
337
+
338
+ & [type='detail'] {
339
+ color: rgb(var(--colors-nord13-rgb) / 0.37);
340
+ > svg {
341
+ display: inline;
342
+ color: rgb(var(--colors-nord13-rgb) / 0.9);
343
+ margin-right: 0.0875em;
344
+ }
345
+ }
346
+ & [type='repo'] {
347
+ color: rgb(var(--colors-yellow-rgb) / 0.67);
348
+ > svg {
349
+ display: inline;
350
+ color: rgb(var(--colors-yellow-rgb) / 0.9);
351
+ margin-right: 0.0875em;
352
+ }
353
+ }
354
+ & [type='user'] {
355
+ color: rgb(var(--colors-pink-rgb) / 0.87);
356
+ > svg {
357
+ display: inline;
358
+ color: rgb(var(--colors-pink-rgb) / 0.9);
359
+ margin-right: 0.0875em;
360
+ }
361
+ }
362
+ &:has([type='user'])::after {
363
+ background: linear-gradient(-90deg, rgb(var(--colors-pink-rgb) / 0.87), transparent);
364
+ }
365
+ &:has([type='repo'])::after {
366
+ background: linear-gradient(
367
+ -90deg,
368
+ rgb(var(--colors-pink-rgb) / 0.87),
369
+ rgb(var(--colors-yellow-rgb) / 0.67)
370
+ );
371
+ }
372
+ &:has([type='detail'])::after {
373
+ background: linear-gradient(
374
+ -90deg,
375
+ rgb(var(--colors-yellow-rgb) / 0.67),
376
+ rgb(var(--colors-nord13-rgb) / 0.37)
377
+ );
378
+ }
379
+ }
380
+
381
+ .prose p > a.prose-link > span > svg {
382
+ display: inline;
383
+ margin-right: 0.0875em;
384
+ width: 1em;
385
+ height: 1em;
386
+ }
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@naiheyoung/use",
3
+ "version": "0.0.1",
4
+ "description": "Files used for personal development.",
5
+ "homepage": "https://github.com/naiheyoung/use#readme",
6
+ "author": "Naihe",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/naiheyoung/use.git"
10
+ },
11
+ "license": "MIT",
12
+ "type": "module",
13
+ "exports": {
14
+ "./prose": "./dist/templates/prose.css"
15
+ },
16
+ "bin": {
17
+ "use": "bin/cli.js"
18
+ },
19
+ "keywords": [
20
+ "pkg-lite",
21
+ "typescript",
22
+ "esm",
23
+ "cjs",
24
+ "cli",
25
+ "template"
26
+ ],
27
+ "files": [
28
+ "dist",
29
+ "README.md"
30
+ ],
31
+ "devDependencies": {
32
+ "@types/fs-extra": "^11.0.4",
33
+ "@types/node": "^25.0.5",
34
+ "@types/prompts": "^2.4.9",
35
+ "cac": "^6.7.14",
36
+ "chalk": "^5.6.2",
37
+ "fs-extra": "^11.3.3",
38
+ "ora": "^9.0.0",
39
+ "prettier": "^3.7.4",
40
+ "prompts": "^2.4.2",
41
+ "tsdown": "0.19.0",
42
+ "typescript": "^5.9.3",
43
+ "vitest": "^4.0.16"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
47
+ },
48
+ "dependencies": {
49
+ "@naiheyoung/color": "^1.1.0"
50
+ },
51
+ "peerDependencies": {
52
+ "@naiheyoung/color": "^1.1.0"
53
+ },
54
+ "peerDependenciesMeta": {
55
+ "@naiheyoung/color": {
56
+ "optional": true
57
+ }
58
+ },
59
+ "scripts": {
60
+ "test": "vitest",
61
+ "prebuild": "pnpm run format",
62
+ "build": "tsdown && node scripts/copy.ts",
63
+ "format": "prettier --write src/"
64
+ }
65
+ }