@jjlmoya/utils-babies 1.12.0 → 1.14.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-babies",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -10,7 +10,8 @@
10
10
  "./entries": "./src/entries.ts"
11
11
  },
12
12
  "files": [
13
- "src"
13
+ "src",
14
+ "scripts"
14
15
  ],
15
16
  "publishConfig": {
16
17
  "access": "public"
@@ -29,7 +30,8 @@
29
30
  "postversion": "git push && git push --tags",
30
31
  "patch": "npm version patch",
31
32
  "minor": "npm version minor",
32
- "major": "npm version major"
33
+ "major": "npm version major",
34
+ "postinstall": "node scripts/postinstall.mjs"
33
35
  },
34
36
  "lint-staged": {
35
37
  "*.{ts,tsx,astro}": [
@@ -0,0 +1,27 @@
1
+ import { readFileSync, writeFileSync, mkdirSync, readdirSync } from 'fs';
2
+ import { join, dirname } from 'path';
3
+ import { fileURLToPath } from 'url';
4
+
5
+ const libDir = dirname(fileURLToPath(import.meta.url));
6
+ const toolsDir = join(libDir, '../src/tool');
7
+
8
+ const inNodeModules = libDir.includes('node_modules');
9
+ if (!inNodeModules) process.exit(0);
10
+
11
+ const projectRoot = join(libDir, '../../../..');
12
+ const categoryKey = JSON.parse(readFileSync(join(libDir, '../package.json'), 'utf8')).name.replace('@jjlmoya/utils-', '');
13
+ const destDir = join(projectRoot, `public/styles/lib/${categoryKey}`);
14
+
15
+ mkdirSync(destDir, { recursive: true });
16
+
17
+ const tools = readdirSync(toolsDir, { withFileTypes: true }).filter(d => d.isDirectory());
18
+ for (const tool of tools) {
19
+ const toolDir = join(toolsDir, tool.name);
20
+ let files;
21
+ try { files = readdirSync(toolDir).filter(f => f.endsWith('.css')); }
22
+ catch { continue; }
23
+ for (const file of files) {
24
+ writeFileSync(join(destDir, file), readFileSync(join(toolDir, file)));
25
+ console.log(`[@jjlmoya/utils-${categoryKey}] copied ${file}`);
26
+ }
27
+ }
@@ -0,0 +1,402 @@
1
+ .bfc-card {
2
+ background: #fff;
3
+ border: 1px solid #e2e8f0;
4
+ border-radius: 28px;
5
+ overflow: hidden;
6
+ display: flex;
7
+ flex-direction: column;
8
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
9
+ }
10
+
11
+ .theme-dark .bfc-card {
12
+ background: #111827;
13
+ border-color: #1f2937;
14
+ }
15
+
16
+ .bfc-main {
17
+ display: grid;
18
+ grid-template-columns: 1fr 1fr;
19
+ }
20
+
21
+ .bfc-left {
22
+ background: #f8fafc;
23
+ padding: 40px;
24
+ border-right: 1px solid #e2e8f0;
25
+ }
26
+
27
+ .theme-dark .bfc-left {
28
+ background: #1f2937;
29
+ border-right-color: #374151;
30
+ }
31
+
32
+ .bfc-right {
33
+ background: #fff;
34
+ padding: 40px;
35
+ }
36
+
37
+ .theme-dark .bfc-right {
38
+ background: #111827;
39
+ }
40
+
41
+ .bfc-section-marker {
42
+ display: block;
43
+ font-size: 0.75rem;
44
+ font-weight: 800;
45
+ text-transform: uppercase;
46
+ letter-spacing: 0.15em;
47
+ color: #64748b;
48
+ margin-bottom: 32px;
49
+ }
50
+
51
+ .bfc-input-label {
52
+ display: block;
53
+ font-size: 0.95rem;
54
+ font-weight: 700;
55
+ color: #334155;
56
+ margin-bottom: 12px;
57
+ }
58
+
59
+ .theme-dark .bfc-input-label {
60
+ color: #e2e8f0;
61
+ }
62
+
63
+ .bfc-input-group {
64
+ margin-bottom: 28px;
65
+ }
66
+
67
+ .bfc-unit-nav {
68
+ display: flex;
69
+ background: #e2e8f0;
70
+ padding: 4px;
71
+ border-radius: 12px;
72
+ margin-bottom: 24px;
73
+ }
74
+
75
+ .theme-dark .bfc-unit-nav {
76
+ background: #374151;
77
+ }
78
+
79
+ .bfc-unit-tab {
80
+ flex: 1;
81
+ padding: 8px;
82
+ border: none;
83
+ background: #f1f5f9;
84
+ color: #64748b;
85
+ font-size: 0.85rem;
86
+ font-weight: 700;
87
+ border-radius: 8px;
88
+ cursor: pointer;
89
+ transition: all 0.2s ease;
90
+ margin: 2px;
91
+ }
92
+
93
+ .theme-dark .bfc-unit-tab {
94
+ background: #1f2937;
95
+ }
96
+
97
+ .bfc-unit-active {
98
+ background: #fff;
99
+ color: #0d9488;
100
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
101
+ }
102
+
103
+ .theme-dark .bfc-unit-active {
104
+ background: #4b5563;
105
+ color: #2dd4bf;
106
+ }
107
+
108
+ .bfc-stepper-box {
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: space-between;
112
+ background: #fff;
113
+ border: 1px solid #cbd5e1;
114
+ border-radius: 16px;
115
+ padding: 8px;
116
+ margin-bottom: 8px;
117
+ }
118
+
119
+ .theme-dark .bfc-stepper-box {
120
+ background: #111827;
121
+ border-color: #4b5563;
122
+ }
123
+
124
+ .bfc-btn-step {
125
+ width: 44px;
126
+ height: 44px;
127
+ border-radius: 12px;
128
+ border: none;
129
+ background: #f1f5f9;
130
+ color: #334155;
131
+ font-size: 1.25rem;
132
+ font-weight: 700;
133
+ cursor: pointer;
134
+ transition: all 0.2s ease;
135
+ }
136
+
137
+ .theme-dark .bfc-btn-step {
138
+ background: #374151;
139
+ color: #f9fafb;
140
+ }
141
+
142
+ .bfc-btn-step:hover {
143
+ background: #0d9488;
144
+ color: #fff;
145
+ }
146
+
147
+ .bfc-val-view {
148
+ text-align: center;
149
+ }
150
+
151
+ .bfc-val-big {
152
+ display: block;
153
+ font-size: 2rem;
154
+ font-weight: 800;
155
+ color: #0f172a;
156
+ }
157
+
158
+ .theme-dark .bfc-val-big {
159
+ color: #fff;
160
+ }
161
+
162
+ .bfc-val-sub {
163
+ display: block;
164
+ font-size: 0.85rem;
165
+ color: #64748b;
166
+ font-weight: 600;
167
+ }
168
+
169
+ .bfc-slider-wrap {
170
+ padding: 0 11px;
171
+ }
172
+
173
+ .bfc-slider {
174
+ -webkit-appearance: none;
175
+ appearance: none;
176
+ width: 100%;
177
+ margin: 16px 0;
178
+ height: 6px;
179
+ background: #e2e8f0;
180
+ border-radius: 3px;
181
+ outline: none;
182
+ }
183
+
184
+ .theme-dark .bfc-slider {
185
+ background: #374151;
186
+ }
187
+
188
+ .bfc-slider::-webkit-slider-thumb {
189
+ -webkit-appearance: none;
190
+ appearance: none;
191
+ width: 22px;
192
+ height: 22px;
193
+ border-radius: 50%;
194
+ background: #0d9488;
195
+ cursor: pointer;
196
+ border: 3px solid #fff;
197
+ box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
198
+ }
199
+
200
+ .bfc-type-rack {
201
+ display: grid;
202
+ grid-template-columns: repeat(3, 1fr);
203
+ gap: 12px;
204
+ }
205
+
206
+ .bfc-type-tile {
207
+ background: #f1f5f9;
208
+ border: 1px solid #cbd5e1;
209
+ border-radius: 14px;
210
+ padding: 14px 4px;
211
+ text-align: center;
212
+ cursor: pointer;
213
+ transition: all 0.2s ease;
214
+ font-size: 0.9rem;
215
+ font-weight: 700;
216
+ color: #64748b;
217
+ }
218
+
219
+ .theme-dark .bfc-type-tile {
220
+ background: #1f2937;
221
+ border-color: #4b5563;
222
+ }
223
+
224
+ .bfc-type-active {
225
+ background: #f0fdfa;
226
+ border-color: #0d9488;
227
+ color: #0f766e;
228
+ box-shadow: 0 2px 8px rgba(13, 148, 136, 0.1);
229
+ }
230
+
231
+ .theme-dark .bfc-type-active {
232
+ background: rgba(13, 148, 136, 0.1);
233
+ color: #2dd4bf;
234
+ border-color: #2dd4bf;
235
+ }
236
+
237
+ .bfc-gauge-area {
238
+ margin-top: 40px;
239
+ padding: 30px;
240
+ background: #fff;
241
+ border-radius: 20px;
242
+ border: 1px solid #e2e8f0;
243
+ }
244
+
245
+ .theme-dark .bfc-gauge-area {
246
+ background: #111827;
247
+ border-color: #374151;
248
+ }
249
+
250
+ .bfc-gauge-viz {
251
+ display: flex;
252
+ flex-direction: column;
253
+ align-items: center;
254
+ text-align: center;
255
+ gap: 16px;
256
+ }
257
+
258
+ .bfc-stomach-bubble {
259
+ width: 60px;
260
+ height: 60px;
261
+ background: radial-gradient(circle at 30% 30%, #5eead4 0%, #0d9488 100%);
262
+ border-radius: 50%;
263
+ transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
264
+ box-shadow: 0 10px 25px rgba(13, 148, 136, 0.2);
265
+ }
266
+
267
+ .bfc-visual-hint {
268
+ font-size: 0.95rem;
269
+ font-weight: 600;
270
+ color: #0f766e;
271
+ margin: 0;
272
+ }
273
+
274
+ .theme-dark .bfc-visual-hint {
275
+ color: #2dd4bf;
276
+ }
277
+
278
+ .bfc-res-card-box {
279
+ background: #f0fdfa;
280
+ border-radius: 24px;
281
+ padding: 32px 16px;
282
+ text-align: center;
283
+ margin-bottom: 24px;
284
+ }
285
+
286
+ .theme-dark .bfc-res-card-box {
287
+ background: rgba(13, 148, 136, 0.05);
288
+ }
289
+
290
+ .bfc-res-main-val {
291
+ display: block;
292
+ font-size: 3.5rem;
293
+ font-weight: 950;
294
+ color: #0d9488;
295
+ letter-spacing: -0.05em;
296
+ line-height: 1;
297
+ }
298
+
299
+ .theme-dark .bfc-res-main-val {
300
+ color: #2dd4bf;
301
+ }
302
+
303
+ .bfc-res-label {
304
+ display: block;
305
+ margin-top: 8px;
306
+ font-size: 1rem;
307
+ font-weight: 700;
308
+ color: #64748b;
309
+ }
310
+
311
+ .bfc-stats-grid {
312
+ display: grid;
313
+ grid-template-columns: 1fr 1fr;
314
+ gap: 20px;
315
+ margin-bottom: 32px;
316
+ }
317
+
318
+ .bfc-stat-item {
319
+ padding: 8px;
320
+ border-bottom: 2px solid #f1f5f9;
321
+ }
322
+
323
+ .theme-dark .bfc-stat-item {
324
+ border-bottom-color: #374151;
325
+ }
326
+
327
+ .bfc-stat-label {
328
+ display: block;
329
+ font-size: 0.7rem;
330
+ font-weight: 800;
331
+ color: #94a3b8;
332
+ text-transform: uppercase;
333
+ margin-bottom: 2px;
334
+ }
335
+
336
+ .bfc-stat-value {
337
+ font-size: 1.15rem;
338
+ font-weight: 800;
339
+ color: #334155;
340
+ }
341
+
342
+ .theme-dark .bfc-stat-value {
343
+ color: #e2e8f0;
344
+ }
345
+
346
+ .bfc-behavior-sec {
347
+ margin-top: 32px;
348
+ }
349
+
350
+ .bfc-pills-container {
351
+ display: flex;
352
+ flex-wrap: wrap;
353
+ gap: 8px;
354
+ margin-top: 12px;
355
+ }
356
+
357
+ .bfc-pill {
358
+ font-size: 0.8rem;
359
+ font-weight: 700;
360
+ padding: 6px 12px;
361
+ border-radius: 100px;
362
+ }
363
+
364
+ .bfc-pill-hunger {
365
+ background: #fff7ed;
366
+ color: #c2410c;
367
+ }
368
+
369
+ .theme-dark .bfc-pill-hunger {
370
+ background: rgba(194, 65, 12, 0.1);
371
+ color: #fdba74;
372
+ }
373
+
374
+ .bfc-pill-fullness {
375
+ background: #f0fdf4;
376
+ color: #15803d;
377
+ }
378
+
379
+ .theme-dark .bfc-pill-fullness {
380
+ background: rgba(21, 128, 61, 0.1);
381
+ color: #4ade80;
382
+ }
383
+
384
+ .bfc-hidden {
385
+ display: none;
386
+ }
387
+
388
+ @media (max-width: 800px) {
389
+ .bfc-main {
390
+ grid-template-columns: 1fr;
391
+ }
392
+
393
+ .bfc-left {
394
+ border-right: none;
395
+ border-bottom: 1px solid #e2e8f0;
396
+ padding: 30px 20px;
397
+ }
398
+
399
+ .bfc-right {
400
+ padding: 30px 20px;
401
+ }
402
+ }