@devalok/shilp-sutra 0.45.1 → 0.46.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/MIGRATION.md +836 -808
- package/dist/_chunks/chat.js +6 -6
- package/dist/_chunks/chat.js.map +1 -1
- package/dist/_chunks/document-preview.js +5 -5
- package/dist/_chunks/image-preview.js +7 -7
- package/dist/_chunks/success.js +16 -16
- package/dist/composed/activity-feed.js +19 -19
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +31 -31
- package/dist/composed/deadline-indicator.js.map +1 -1
- package/dist/composed/emoji-picker.js +15 -15
- package/dist/composed/file-preview.js +18 -18
- package/dist/composed/file-preview.js.map +1 -1
- package/dist/composed/filter-bar.js +1 -1
- package/dist/composed/filter-bar.js.map +1 -1
- package/dist/composed/multi-select-popover.js +1 -1
- package/dist/composed/multi-select-popover.js.map +1 -1
- package/dist/tokens/base.css +6 -0
- package/dist/tokens/index.css +1 -1
- package/dist/tokens/semantic.css +1 -1
- package/dist/tokens/typography.css +10 -0
- package/dist/tokens/utilities.css +6 -0
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +57 -56
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge-indicator.js +1 -1
- package/dist/ui/badge-indicator.js.map +1 -1
- package/dist/ui/data-table-body.js +27 -27
- package/dist/ui/data-table-card.js +20 -20
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +40 -36
- package/dist/ui/data-table-toolbar.js.map +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +37 -36
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/radio.js +1 -1
- package/dist/ui/radio.js.map +1 -1
- package/dist/ui/sidebar.js +7 -7
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +48 -47
- package/dist/ui/stat-card.js.map +1 -1
- package/dist/ui/surface.d.ts +46 -0
- package/dist/ui/surface.d.ts.map +1 -0
- package/dist/ui/surface.js +51 -0
- package/dist/ui/surface.js.map +1 -0
- package/dist/ui/text.js +6 -6
- package/dist/ui/text.js.map +1 -1
- package/docs/components/ui/surface.md +55 -0
- package/fonts/Manrope-Variable.woff2 +0 -0
- package/llms.txt +2 -1
- package/make-kit/components/overview.md +7 -3
- package/make-kit/components/surface.md +60 -0
- package/mcp-manifest.json +91 -2
- package/package.json +6 -1
- package/skill/SKILL.md +1 -1
- package/skill/references/components.md +2 -1
package/MIGRATION.md
CHANGED
|
@@ -1,808 +1,836 @@
|
|
|
1
|
-
# Migration Guide
|
|
2
|
-
|
|
3
|
-
This page indexes all breaking changes across `@devalok/shilp-sutra` versions. For the full changelog, see [CHANGELOG.md](./CHANGELOG.md).
|
|
4
|
-
|
|
5
|
-
> **Upgrading from < 0.36?** Start here, then read each intermediate version section. Breaking changes stack — skipping versions means stacking migrations.
|
|
6
|
-
|
|
7
|
-
## v0.
|
|
8
|
-
|
|
9
|
-
Nothing breaks at the TypeScript level. One
|
|
10
|
-
|
|
11
|
-
###
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
####
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
####
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
+ </
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
@
|
|
529
|
-
@
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
```
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
|
640
|
-
|
|
641
|
-
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
```sh
|
|
651
|
-
|
|
652
|
-
```
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
-
|
|
665
|
-
|
|
666
|
-
-
|
|
667
|
-
-
|
|
668
|
-
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
-
|
|
700
|
-
-
|
|
701
|
-
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
###
|
|
725
|
-
|
|
726
|
-
```diff
|
|
727
|
-
-
|
|
728
|
-
-
|
|
729
|
-
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
###
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
```
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
//
|
|
788
|
-
<
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
1
|
+
# Migration Guide
|
|
2
|
+
|
|
3
|
+
This page indexes all breaking changes across `@devalok/shilp-sutra` versions. For the full changelog, see [CHANGELOG.md](./CHANGELOG.md).
|
|
4
|
+
|
|
5
|
+
> **Upgrading from < 0.36?** Start here, then read each intermediate version section. Breaking changes stack — skipping versions means stacking migrations.
|
|
6
|
+
|
|
7
|
+
## v0.46.0 — Manrope display font, design system owns heading typography
|
|
8
|
+
|
|
9
|
+
Nothing breaks at the TypeScript level. One visual behavior change to check after upgrade.
|
|
10
|
+
|
|
11
|
+
### Visual: headings now render in Manrope
|
|
12
|
+
|
|
13
|
+
`--font-display` moved from Inter to `"Manrope", "Inter", system-ui, sans-serif`, and the design system now binds that face to headings, which it previously did not do:
|
|
14
|
+
|
|
15
|
+
- bare `h1`–`h6` (via `@layer base`)
|
|
16
|
+
- the `text-heading-{2xl…xs}` utilities
|
|
17
|
+
- the `Text` component's `heading-*` variants
|
|
18
|
+
|
|
19
|
+
Until now `--font-display` was an orphan token — no shipped component or utility consumed it, so `<h1>` inherited the Inter body face and each app wired its own heading font by hand. Headings that rendered in Inter now render in Manrope. Manrope ships in the tarball (`fonts/Manrope-Variable.woff2`, OFL, weights 200–800).
|
|
20
|
+
|
|
21
|
+
**If you already wire your own heading font** (e.g. an `app/globals.css` rule on `h1`–`h6`, or a `next/font` variable applied to headings) in **unlayered** CSS, nothing changes — your rule wins over the DS `@layer base` default. Drop that local wiring to adopt Manrope.
|
|
22
|
+
|
|
23
|
+
**To keep headings in Inter,** point the token back in your consumer CSS:
|
|
24
|
+
|
|
25
|
+
```css
|
|
26
|
+
:root { --font-display: "Inter", system-ui, sans-serif; }
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Ranade is **unchanged** — still `--font-accent` (the brand-moment face), still drives `.prose-devsabha`. Body copy stays Inter. Manrope has no italic axis; italic display text falls back per the `@font-face` stack.
|
|
30
|
+
|
|
31
|
+
### New APIs (additive)
|
|
32
|
+
|
|
33
|
+
`Surface` (`ui/surface`) — the low-level elevated container primitive that `Card` and the hand-rolled `bg-surface-raised … shadow-raised` blocks compose on top of. No existing component changed.
|
|
34
|
+
|
|
35
|
+
## v0.45.0 — Card spacing variable, table overhaul, AI docs switch to MCP
|
|
36
|
+
|
|
37
|
+
Nothing breaks at the TypeScript level. One doc-surface removal + two visual things to check after upgrade:
|
|
38
|
+
|
|
39
|
+
### REMOVED: `llms-full.txt` and `llms-quick.txt` (AI doc surface)
|
|
40
|
+
|
|
41
|
+
The concatenated doc dumps no longer ship in the tarball. Replacements, in priority order:
|
|
42
|
+
|
|
43
|
+
1. **Hosted MCP** (new): `claude mcp add --transport http shilp-sutra https://shilp-sutra.devalok.in/mcp` — six tools (`find_component`, `get_component`, `get_tokens`, `get_setup`, `upgrade`, `search_docs`), every one takes a `version` param; pass your installed version for version-exact answers.
|
|
44
|
+
2. `llms.txt` — now a ~2.5K-token router (what exists + where to get detail), not a cheatsheet.
|
|
45
|
+
3. `docs/components/<tier>/<name>.md` — per-component reference (~3K tokens each), unchanged.
|
|
46
|
+
4. `mcp-manifest.json` (new, package root) — all props/tokens/composition as JSON (react-docgen shape, schema in `mcp-manifest.schema.json`).
|
|
47
|
+
|
|
48
|
+
Anything that read the removed file paths (custom agent rules, scripts, editor doc references) must switch to one of the above.
|
|
49
|
+
|
|
50
|
+
### Visual: table rows tighten
|
|
51
|
+
|
|
52
|
+
Standard density rows go from ~53px to ~37px (comfortable ~85px → ~45px) — the density map was re-benchmarked against Carbon/Radix/Polaris. If a screen depended on the old airy rows, pass `density="comfortable"`. Rows also regain their hairline separators (they had been silently lost) and row hover is now actually visible on cards.
|
|
53
|
+
|
|
54
|
+
### CSS selectors targeting Card/Table internals
|
|
55
|
+
|
|
56
|
+
Card's per-size literal classes (`px-ds-05b` on slots, `top-ds-05b` on CardAction) are gone — spacing now flows through `--card-spacing`/`--card-gap` CSS variables. Consumer `className` overrides via tw-merge keep working; only hand-written CSS selectors targeting the old class names need to move to the variables:
|
|
57
|
+
|
|
58
|
+
```diff
|
|
59
|
+
- .my-card .px-ds-05b { … }
|
|
60
|
+
+ .my-card { --card-spacing: 24px; }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Table cells similarly moved from `py-ds-03 px-ds-03` literals to `py-(--table-py) px-ds-04` + `--table-edge` on first/last cells.
|
|
64
|
+
|
|
65
|
+
### New APIs (additive)
|
|
66
|
+
|
|
67
|
+
`CardBleed`, `CardSection`, `Card orientation="horizontal"`, `StatCard size`, `Table density/striped`, `TableCell/TableHead numeric`, `TableRowActions`, `TableRowLink` (`ui/table-row-link`). StatCard's `footer` now renders behind a full-width rule instead of an inset border — purely visual.
|
|
68
|
+
|
|
69
|
+
## v0.44.0 — Card system: gap-model, corner slots, truncation primitive
|
|
70
|
+
|
|
71
|
+
Three breaking changes (`Card` `accent`/`accentColor` removed, `StatCard` `surface` → `variant`, `ContentCard` deprecated). Everything else is additive.
|
|
72
|
+
|
|
73
|
+
### Breaking: `Card` `accent` / `accentColor` removed
|
|
74
|
+
|
|
75
|
+
The decorative colored edge-bar (`accent="left" | "top" | "right" | "bottom"` + `accentColor`) is gone — same anti-convergence reasoning as the 0.43 StatCard rail (a colored bar stacked on a bordered, shadowed card is an AI tell). Replace it with a corner slot or a tinted border:
|
|
76
|
+
|
|
77
|
+
```diff
|
|
78
|
+
- <Card accent="left" accentColor="success">
|
|
79
|
+
- <CardHeader><CardTitle>Deploy succeeded</CardTitle></CardHeader>
|
|
80
|
+
- </Card>
|
|
81
|
+
+ <Card color="success"> {/* tints the 1px border */}
|
|
82
|
+
+ <CardAction><Badge color="success" size="xs">DEPLOYED</Badge></CardAction>
|
|
83
|
+
+ <CardHeader><CardTitle>Deploy succeeded</CardTitle></CardHeader>
|
|
84
|
+
+ </Card>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Breaking: `StatCard` `surface` → `variant`
|
|
88
|
+
|
|
89
|
+
`StatCard` now composes `<Card>`, so its surface is the Card's `variant` (4-way) instead of the old `surface` (2-way):
|
|
90
|
+
|
|
91
|
+
```diff
|
|
92
|
+
- <StatCard label="Revenue" value="$48k" surface="raised" />
|
|
93
|
+
+ <StatCard label="Revenue" value="$48k" variant="default" />
|
|
94
|
+
- <StatCard label="Revenue" value="$48k" surface="flat" />
|
|
95
|
+
+ <StatCard label="Revenue" value="$48k" variant="outline" />
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`variant` accepts `default` (ring-in-shadow) | `elevated` | `outline` (border, no shadow) | `flat` (filled, no edge).
|
|
99
|
+
|
|
100
|
+
### Breaking: `ContentCard` deprecated
|
|
101
|
+
|
|
102
|
+
`ContentCard` (composed) is deprecated. Compose `Card` + `CardHeader` / `CardContent` / `CardAction` directly — the gap-model padding makes the manual wrapper unnecessary. It still ships in 0.44 (with a `@deprecated` JSDoc) and is scheduled for removal in a later minor.
|
|
103
|
+
|
|
104
|
+
### New (additive, opt-in — no migration needed)
|
|
105
|
+
|
|
106
|
+
- `<CardAction>` — a composable corner slot (`placement`: 4 corners, `tuck` for icon-button optical alignment). Use for badges, menu buttons, overflow actions. `Card` is now `relative` to anchor it.
|
|
107
|
+
- `StatCard` `deltaPlacement="block" | "inline"` — inline rides the value's baseline for compact dashboards.
|
|
108
|
+
- `<TruncatedText>` — a text primitive that truncates (`end` / `clamp` / `middle`) AND recovers (tooltip only on real overflow, full string as the accessible name). Applied internally across ~25 file/email/user-text/nav sites.
|
|
109
|
+
|
|
110
|
+
### Visual changes (no code change required)
|
|
111
|
+
|
|
112
|
+
- `Card` uses a **gap-model** layout: the container owns vertical padding + inter-slot gap; slots own only horizontal padding. Adding/removing a slot can no longer unbalance the bottom edge. Re-baseline Chromatic if you snapshot the DS.
|
|
113
|
+
- A long filename / email / user name / nav label now truncates with an overflow-aware tooltip instead of wrapping or clipping silently.
|
|
114
|
+
|
|
115
|
+
## v0.43.0 — Anti-convergence surface & elevation pass
|
|
116
|
+
|
|
117
|
+
One breaking change (`StatCard` `accent` removed). Everything else is a visual refresh that needs no code change — but it shifts Chromatic baselines library-wide, so re-baseline if you snapshot the DS.
|
|
118
|
+
|
|
119
|
+
### Breaking: `StatCard` `accent` prop removed
|
|
120
|
+
|
|
121
|
+
The colored left-rail (`accent="default" | "success" | "warning" | "error" | "info"`) is gone. An accent rail on a rounded, shadowed card is the single most recognizable "AI-generated" tell, and it stacked a third edge on a card that already carried a border + shadow.
|
|
122
|
+
|
|
123
|
+
Migrate — pick the treatment that fits, or drop it (the `delta` arrow already carries trend direction + colour):
|
|
124
|
+
|
|
125
|
+
```diff
|
|
126
|
+
- <StatCard label="Revenue" value="$48k" accent="success" />
|
|
127
|
+
+ <StatCard label="Revenue" value="$48k" accentStyle="tint" />
|
|
128
|
+
+ <StatCard label="Revenue" value="$48k" icon={<IconCurrencyDollar />} accentStyle="icon" />
|
|
129
|
+
+ <StatCard label="Revenue" value="$48k" />
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`accent` mapped a semantic colour to the rail. The new model separates concerns: **state** rides the `delta` (semantic up/down/neutral colour), **brand accent** rides `accentStyle` (`none` | `icon` | `tint`). There is no per-semantic-colour card accent — semantic status belongs on the `delta`, not the card edge.
|
|
133
|
+
|
|
134
|
+
### New (additive, opt-in — no migration needed)
|
|
135
|
+
|
|
136
|
+
- `StatCard`: `surface="raised" | "flat"`, `accentStyle`, `iconFill`, `flash` + `flashSpeed`.
|
|
137
|
+
- New `StatFlash` component — a state→identity entrance (a toned glyph settles to the metric icon), `prefers-reduced-motion` gated.
|
|
138
|
+
- `AppSidebar`: composable `navItemRadius` (`sm` | `md` | `lg` | `pill`, default `md`).
|
|
139
|
+
|
|
140
|
+
### Visual changes (no code change required)
|
|
141
|
+
|
|
142
|
+
- Overlays and cards no longer stack a visible border with a drop shadow — the shadow tokens' own 1px ring is the edge (make-kit Guidelines rule #6). The ring is strengthened, with a light ring in dark mode via the new `--shadow-edge-ring` token.
|
|
143
|
+
- `Card` `default` / `elevated` dropped their border (ring-in-shadow). Use `variant="outline"` for a border-led card.
|
|
144
|
+
- Sidebar active item: the accent rail was removed; active is now marked by tint + accent text + weight.
|
|
145
|
+
- `InputOTP` cells are border-led (dropped a redundant shadow).
|
|
146
|
+
|
|
147
|
+
## v0.42.0 — Figma Make kit guidelines (no migration needed)
|
|
148
|
+
|
|
149
|
+
**Non-breaking minor.** No consumer code changes required.
|
|
150
|
+
|
|
151
|
+
- **New:** `packages/core/make-kit/` ships in the tarball — 26 guideline files Figma Make consumes when registering this package as a Make kit. Includes `Guidelines.md`, `setup.md`, 8 `foundations/*.md`, `components/overview.md`, and 15 per-component deep guides. Reachable at `node_modules/@devalok/shilp-sutra/make-kit/` after install, or via subpath exports `@devalok/shilp-sutra/make-kit` and `/make-kit/*`. Adds ~140 KB to tarball.
|
|
152
|
+
- No source code changes. No runtime impact. Existing consumers see a slightly larger install footprint and nothing else.
|
|
153
|
+
- See https://developers.figma.com/docs/code/bring-your-design-system-package/ for the Figma Make kit registration flow.
|
|
154
|
+
|
|
155
|
+
## v0.41.0 — `BREAKING.json` manifest + recipe polish (no migration needed)
|
|
156
|
+
|
|
157
|
+
**Non-breaking minor.** No consumer code changes required.
|
|
158
|
+
|
|
159
|
+
- **New:** `packages/core/BREAKING.json` ships in the tarball — a machine-readable record of every breaking change per version. AI agents and migration tooling can `import manifest from '@devalok/shilp-sutra/BREAKING.json'` instead of parsing this file. Schema at `BREAKING.schema.json`.
|
|
160
|
+
- **Docs:** Next.js App Router install recipe gained a Tested-on matrix, explicit replace-the-whole-scaffold-globals.css guidance, Turbopack note, and three new gotchas (`pnpm-workspace.yaml`, auto-generated `AGENTS.md` markers, scaffold body-font cascade). No setup change required for existing consumers.
|
|
161
|
+
- **Internals:** release.yml now regenerates Agent Skill references before the pre-publish audit (kills the skill-drift email spam class). No impact on the published tarball.
|
|
162
|
+
|
|
163
|
+
## v0.40.0 — Barrel peer-cliff cleanup + Icon API unification
|
|
164
|
+
|
|
165
|
+
This release pairs one breaking change (barrel peer-cliff cleanup) with one non-breaking type widening (Icon API unification). Read the breaking section first.
|
|
166
|
+
|
|
167
|
+
### Icon API unification (mostly non-breaking — one narrowing)
|
|
168
|
+
|
|
169
|
+
**Mostly non-breaking, with one narrowing for `React.ReactNode`-typed props.** For the 14 components whose `icon` prop was previously `React.ReactNode`, `IconInput` accepts **less** — it excludes `string`, `number`, and iterables. If you store icons in a `Record<string, React.ReactNode>` map or a `icon?: React.ReactNode` field and pass them to a migrated component, `tsc` will fail even though the runtime JSX is valid. **Fix: retype the icon source to `React.ReactElement`** (or import `IconInput`). Known affected props: `CommandItem.icon` (CommandBar/CommandPalette), `ActivityItem.icon` (ActivityFeed), `Chat.Message.Avatar` `icon`. For props that were `ComponentType`-only the change is a genuine widening (accepts more). Build-time only — no runtime impact.
|
|
170
|
+
|
|
171
|
+
Every icon-accepting prop across the design system now takes the same shape: **`IconInput`**. Before 0.40 there were six distinct prop types for the same conceptual "icon":
|
|
172
|
+
|
|
173
|
+
| Old shape | Components |
|
|
174
|
+
|---|---|
|
|
175
|
+
| `React.ReactElement \| null` | Button (startIcon/endIcon), IconButton (icon), Badge (startIcon/endIcon) |
|
|
176
|
+
| `React.ReactNode` | 14 components (Combobox option, Stepper step, TreeItem, OAuthButton, AppCommandPalette, CommandRegistry, BottomNavbar, Sidebar's three NavItem types, TopBar, Chat.Message.Avatar, SystemMessage, AIConversation, ActivityFeed, CommandPalette item) |
|
|
177
|
+
| `React.ReactNode \| React.ComponentType<{className}>` | EmptyState, StatCard (dual-detect logic duplicated in both source files) |
|
|
178
|
+
| `React.ComponentType<{className?}>` | SegmentedControl (option), SlashCommand |
|
|
179
|
+
| `IconProps['icon']` (strict Tabler ref) | BulkActionBar (action), Chat.Message.Action |
|
|
180
|
+
| `React.ForwardRefExoticComponent<any>` | Toast (internal, sonner pass-through — unchanged) |
|
|
181
|
+
|
|
182
|
+
All six collapse to `IconInput`:
|
|
183
|
+
|
|
184
|
+
```ts
|
|
185
|
+
type IconInput =
|
|
186
|
+
| React.ReactElement
|
|
187
|
+
| React.ComponentType<{ className?: string; size?: number | string }>
|
|
188
|
+
| null
|
|
189
|
+
| undefined
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### Migration
|
|
193
|
+
|
|
194
|
+
For every prop now typed as `IconInput`, all four shapes work identically:
|
|
195
|
+
|
|
196
|
+
```tsx
|
|
197
|
+
<Button startIcon={<Icon icon={IconPlus} />}>OK</Button> // canonical
|
|
198
|
+
<Button startIcon={<IconPlus />}>OK</Button> // raw Tabler element
|
|
199
|
+
<Button startIcon={IconPlus}>OK</Button> // component ref
|
|
200
|
+
<Button startIcon={<span>+</span>}>OK</Button> // custom node
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**Calls passing a JSX element or component ref still work.** The exception is the narrowing above: if your icon *source* is annotated `React.ReactNode` (a map value or field type), retype it to `React.ReactElement` — one-line per source, not per call site.
|
|
204
|
+
|
|
205
|
+
**You can now delete `className="h-4 w-4"` overrides** on icon-prop usages — `IconProvider` wires size through context. Stories cleanup is voluntary; behavior unchanged.
|
|
206
|
+
|
|
207
|
+
**Strict-to-loose call sites that newly compile:**
|
|
208
|
+
- `SegmentedControl options[*].icon` previously rejected `<IconX />` instantiated elements (only accepted bare `IconX` refs). Now both work.
|
|
209
|
+
- `BulkActionBar actions[*].icon` previously rejected non-Tabler nodes. Now accepts any `IconInput`.
|
|
210
|
+
- `Message.Action` same.
|
|
211
|
+
- `EmptyState` no longer needs the dual `<X />` / `X` differentiation in your call sites.
|
|
212
|
+
|
|
213
|
+
#### What got removed internally
|
|
214
|
+
|
|
215
|
+
- Five duplicate `iconSizeMap` declarations (Badge, Combobox, EmptyState, StatCard, etc.) → one shared `<IconProvider size={token}>` per call site
|
|
216
|
+
- Two duplicate dual-detect branches (`React.isValidElement(icon) || ('$$typeof' in icon)`) — replaced with `normalizeIcon()`
|
|
217
|
+
- The orphan `IconProps['icon']` references in BulkActionBar + Chat.Message.Action
|
|
218
|
+
|
|
219
|
+
#### Helpers exported (for consumer composability)
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
import type { IconInput } from '@devalok/shilp-sutra/ui/lib/icon-input'
|
|
223
|
+
import { normalizeIcon } from '@devalok/shilp-sutra/ui/lib/normalize-icon'
|
|
224
|
+
|
|
225
|
+
// In your own component:
|
|
226
|
+
function MyCard({ icon }: { icon: IconInput }) {
|
|
227
|
+
return (
|
|
228
|
+
<div>
|
|
229
|
+
<IconProvider size="md">{normalizeIcon(icon)}</IconProvider>
|
|
230
|
+
</div>
|
|
231
|
+
)
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Use these in custom wrappers that consume our icon-style props.
|
|
236
|
+
|
|
237
|
+
### Barrel peer-cliff cleanup (breaking)
|
|
238
|
+
|
|
239
|
+
**Breaking.** Twelve symbols that statically pulled optional peer dependencies have been removed from their parent barrels (`/ui`, `/composed`, `/ai`, `/ai/blocks`). They remain fully available via their per-component subpath.
|
|
240
|
+
|
|
241
|
+
#### Why
|
|
242
|
+
|
|
243
|
+
Optional peer deps (`input-otp`, `sonner`, `date-fns`, `@emoji-mart/*`, `@tiptap/*`, `react-pdf`, `react-zoom-pan-pinch`, `react-markdown`, `react-syntax-highlighter`, `remark-gfm`) were declared `peerDependenciesMeta.optional = true` but the components that needed them were re-exported from the corresponding barrel with **static** ESM `import` statements. Result: a fresh consumer who wrote `import { Text } from '@devalok/shilp-sutra/ui'` without installing `input-otp` got:
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
Module not found: Can't resolve 'input-otp'
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
…at `next build`/`vite build` time. "Optional" was a lie at the bundler level. This release closes that cliff for every affected component.
|
|
250
|
+
|
|
251
|
+
#### Search-and-replace migration table
|
|
252
|
+
|
|
253
|
+
For each symbol below, change ONLY the import path. Prop / type signatures are unchanged.
|
|
254
|
+
|
|
255
|
+
| Symbol(s) | Old (no longer works) | New (in 0.40.0+) | Peer it pulls |
|
|
256
|
+
|---|---|---|---|
|
|
257
|
+
| `InputOTP`, `InputOTPGroup`, `InputOTPSeparator`, `InputOTPSlot`, `InputOTPProps` | `from '@devalok/shilp-sutra/ui'` | `from '@devalok/shilp-sutra/ui/input-otp'` | `input-otp` |
|
|
258
|
+
| `toast`, `formatFileSize`, `ToastActionOptions`, `ToastOptions`, `ToastProps`, `ToastType`, `ToastUndoOptions`, `ToastUploadOptions`, `UploadFile` | `from '@devalok/shilp-sutra/ui'` | `from '@devalok/shilp-sutra/ui/toast'` | `sonner` |
|
|
259
|
+
| `Toaster`, `ToasterProps` | `from '@devalok/shilp-sutra/ui'` | `from '@devalok/shilp-sutra/ui/toaster'` | `sonner` |
|
|
260
|
+
| `DatePicker`, `DateRangePicker`, `DateTimePicker`, `TimePicker`, `CalendarGrid`, `MonthPicker`, `YearPicker`, `Presets`, `useCalendar`, all related `*Props` + `CalendarEvent` + `PresetKey` | `from '@devalok/shilp-sutra/composed'` | `from '@devalok/shilp-sutra/composed/date-picker'` | `date-fns` |
|
|
261
|
+
| `EmojiPicker`, `EmojiPickerPopover`, `EmojiData`, `EmojiPickerProps`, `EmojiPickerPopoverProps`, `EmojiSet` | `from '@devalok/shilp-sutra/composed'` | `from '@devalok/shilp-sutra/composed/emoji-picker'` | `@emoji-mart/data` + `@emoji-mart/react` |
|
|
262
|
+
| `EmojiNode`, `EmojiNodeAttrs` | `from '@devalok/shilp-sutra/composed'` | `from '@devalok/shilp-sutra/composed/extensions/emoji-node'` (new in 0.40.0) | `@tiptap/*` |
|
|
263
|
+
| `createEmojiSuggestion` | `from '@devalok/shilp-sutra/composed'` | `from '@devalok/shilp-sutra/composed/extensions/emoji-suggestion'` (new in 0.40.0) | `@tiptap/*` |
|
|
264
|
+
| `FilePreview`, `FilePreviewProps` | `from '@devalok/shilp-sutra/composed'` | `from '@devalok/shilp-sutra/composed/file-preview'` | `react-pdf` + `react-zoom-pan-pinch` |
|
|
265
|
+
| `MarkdownViewer`, `MarkdownViewerProps` | `from '@devalok/shilp-sutra/composed'` | `from '@devalok/shilp-sutra/composed/markdown-viewer'` | `react-markdown` + `react-syntax-highlighter` + `remark-gfm` |
|
|
266
|
+
| `RichChatInput`, `AudioPlayer`, `AudioWaveform`, `useVoiceRecorder`, all related `*Props` + `*Message` | `from '@devalok/shilp-sutra/composed'` | `from '@devalok/shilp-sutra/composed/rich-chat-input'` | `@tiptap/*` |
|
|
267
|
+
| `RichTextEditor`, `RichTextViewer`, `RichTextEditorProps`, `RichTextViewerProps`, `MentionItem`, `ToolbarItem` | `from '@devalok/shilp-sutra/composed'` | `from '@devalok/shilp-sutra/composed/rich-text-editor'` | `@tiptap/*` |
|
|
268
|
+
| `BlockRenderer`, `BlockRendererProps` | `from '@devalok/shilp-sutra/ai'` | `from '@devalok/shilp-sutra/ai/block-renderer'` | `react-markdown` + `remark-gfm` (transitively via TextBlock/ErrorBlock) |
|
|
269
|
+
| `ErrorBlock` | `from '@devalok/shilp-sutra/ai'` OR `from '@devalok/shilp-sutra/ai/blocks'` | `from '@devalok/shilp-sutra/ai/blocks/error'` (new in 0.40.0) | `react-markdown` + `remark-gfm` |
|
|
270
|
+
| `TextBlock` | `from '@devalok/shilp-sutra/ai'` OR `from '@devalok/shilp-sutra/ai/blocks'` | `from '@devalok/shilp-sutra/ai/blocks/text'` (new in 0.40.0) | `react-markdown` + `remark-gfm` |
|
|
271
|
+
|
|
272
|
+
The seven other AI blocks (`BlockTable`, `ConfirmBlock`, `DividerBlock`, `InfoBlock`, `LoadingBlock`, `StatRowBlock`, `SuccessBlock`) have no peer-dep imports and remain available via `from '@devalok/shilp-sutra/ai/blocks'` (the sub-barrel) or `from '@devalok/shilp-sutra/ai'` (the main barrel).
|
|
273
|
+
|
|
274
|
+
#### Codemod helper (recommended)
|
|
275
|
+
|
|
276
|
+
The fastest path is the official ESLint plugin — its `prefer-per-component-import` rule detects every peer-cliff symbol still imported from a barrel and **autofixes the import path** for you:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
pnpm add -D @devalok/eslint-plugin-shilp-sutra
|
|
280
|
+
# one-shot codemod across your source
|
|
281
|
+
pnpm eslint --fix --config node_modules/@devalok/eslint-plugin-shilp-sutra/migration src/
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Or wire `shilpSutra.configs['flat/migration']` into your `eslint.config.ts` and run `eslint --fix`. The rule splits multi-symbol barrel lines correctly, which the `sed` approach below cannot.
|
|
285
|
+
|
|
286
|
+
<details><summary>Manual <code>sed</code> fallback (single-symbol lines only)</summary>
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
# Replace barrel imports of toast / Toaster with per-component imports
|
|
290
|
+
grep -rl "from '@devalok/shilp-sutra/ui'" src/ | xargs sed -i.bak \
|
|
291
|
+
-e "s|import { \\(.*\\)toast\\(.*\\)} from '@devalok/shilp-sutra/ui'|import { toast } from '@devalok/shilp-sutra/ui/toast'\\nimport { \\1\\2} from '@devalok/shilp-sutra/ui'|"
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
(Adjust per project — the regex assumes a single `toast` import on the line. For multi-symbol lines, the ESLint autofix above is far more reliable.)
|
|
295
|
+
|
|
296
|
+
</details>
|
|
297
|
+
|
|
298
|
+
#### Per-chart subpaths added (non-breaking)
|
|
299
|
+
|
|
300
|
+
`/ui/charts/<chart>` subpaths are now exported for `area-chart`, `bar-chart`, `chart-container`, `gauge-chart`, `line-chart`, `pie-chart`, `radar-chart`, `sparkline`. The `/ui/charts` barrel still works and still pulls all 9 d3-\* peers — but if you only need `BarChart`, `import { BarChart } from '@devalok/shilp-sutra/ui/charts/bar-chart'` pulls only the d3-\* peers it actually needs (`d3-scale`, `d3-axis`, `d3-selection`).
|
|
301
|
+
|
|
302
|
+
#### What didn't change
|
|
303
|
+
|
|
304
|
+
- All per-component subpaths existed before 0.40.0 (except the 4 new ones noted above). Consumers already importing per-component need zero changes.
|
|
305
|
+
- Component APIs, prop signatures, types, runtime behavior, default styles: all unchanged.
|
|
306
|
+
- Storybook stories, tests, internal imports inside the DS itself: all use relative paths and were never affected.
|
|
307
|
+
|
|
308
|
+
#### Why this isn't behind a flag
|
|
309
|
+
|
|
310
|
+
There is no good additive solution. Tree-shaking can't drop a static `import 'sonner'` if `sonner` isn't on disk — the resolver fails before tree-shaking runs. Lazy-imports (`import('sonner')`) move the failure from build-time to runtime, which is worse. Removing the barrel re-export is the only fix.
|
|
311
|
+
|
|
312
|
+
## v0.39.0 — Shape presets & semantic radius role tokens
|
|
313
|
+
|
|
314
|
+
No API breaks. Component prop signatures unchanged. But the visual output of several components shifts because radius is now role-driven, not per-size ad-hoc.
|
|
315
|
+
|
|
316
|
+
### What changed under the hood
|
|
317
|
+
|
|
318
|
+
Radius now has TWO layers:
|
|
319
|
+
|
|
320
|
+
- **Primitive scale** (private, unchanged): `--radius-ds-sm/md/lg/xl/2xl/full`
|
|
321
|
+
- **Semantic roles** (new, public): `--radius-control`, `--radius-control-inner`, `--radius-surface`, `--radius-overlay-sm`, `--radius-overlay`, `--radius-overlay-lg`, `--radius-pill`, `--radius-bubble`
|
|
322
|
+
|
|
323
|
+
Components reference roles. A new `[data-shape]` attribute on `<html>` (or any subtree) remaps all roles at once. Three presets ship: `sharp`, `slightly-rounded` (default), `rounded`.
|
|
324
|
+
|
|
325
|
+
### Visual changes consumers see
|
|
326
|
+
|
|
327
|
+
| Component | Was (px) | Now (px) | Why |
|
|
328
|
+
|---|---|---|---|
|
|
329
|
+
| Button md | 10 | 6 | Per-size radius scaling removed — same role, same radius |
|
|
330
|
+
| Button lg | 16 | 6 | Same |
|
|
331
|
+
| Button icon-lg | 10 | 6 | Same |
|
|
332
|
+
| Input lg | 10 | 6 | Now matches Button at same height |
|
|
333
|
+
| Tabs trigger (contained) | 10 | 6 | Now matches Button |
|
|
334
|
+
| SegmentedControl item | 10 | 9999 | Renamed `pill` is now actually pill |
|
|
335
|
+
| Menubar trigger | 2 | 6 | Now matches DropdownMenu item |
|
|
336
|
+
| Autocomplete listbox | 6 | 10 | Now matches Popover / DropdownMenu |
|
|
337
|
+
| ChatMessage bubble | 24 | 24 (preset-aware) | Now `rounded-bubble` — shifts with preset |
|
|
338
|
+
| Everything else | unchanged | | |
|
|
339
|
+
|
|
340
|
+
### If you liked the old "chunky big controls" look
|
|
341
|
+
|
|
342
|
+
Either set the `rounded` preset on `<html>`:
|
|
343
|
+
|
|
344
|
+
```diff
|
|
345
|
+
- <html lang="en">
|
|
346
|
+
+ <html lang="en" data-shape="rounded">
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Or override just `--radius-control` to keep the previous v0.38 default:
|
|
350
|
+
|
|
351
|
+
```css
|
|
352
|
+
:root { --radius-control: 10px; }
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Opting into the preset system
|
|
356
|
+
|
|
357
|
+
To set the default (slightly-rounded) preset on your app explicitly:
|
|
358
|
+
|
|
359
|
+
```diff
|
|
360
|
+
- <html lang="en">
|
|
361
|
+
+ <html lang="en" data-shape="slightly-rounded">
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
Scoped overrides also work — apply `data-shape` to any subtree:
|
|
365
|
+
|
|
366
|
+
```tsx
|
|
367
|
+
<div data-shape="sharp">
|
|
368
|
+
<DeveloperConsole />
|
|
369
|
+
</div>
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### Migrating your own code from `rounded-ds-*` / `rounded-full`
|
|
373
|
+
|
|
374
|
+
Your existing classes still render (primitive tokens are unchanged), but they're pinned to fixed values and won't respond to `[data-shape]` presets. To opt in, swap to role tokens:
|
|
375
|
+
|
|
376
|
+
```diff
|
|
377
|
+
- className="rounded-ds-md ..." /* control-sized, 6px */
|
|
378
|
+
+ className="rounded-control ..."
|
|
379
|
+
|
|
380
|
+
- className="rounded-ds-lg ..." /* surface context — Card, Alert, panel */
|
|
381
|
+
+ className="rounded-surface ..."
|
|
382
|
+
|
|
383
|
+
- className="rounded-ds-lg ..." /* overlay context — Popover, Dropdown, listbox */
|
|
384
|
+
+ className="rounded-overlay ..."
|
|
385
|
+
|
|
386
|
+
- className="rounded-ds-xl ..." /* Dialog, Sheet, picker panel */
|
|
387
|
+
+ className="rounded-overlay-lg ..."
|
|
388
|
+
|
|
389
|
+
- className="rounded-ds-2xl ..." /* chat bubble */
|
|
390
|
+
+ className="rounded-bubble ..."
|
|
391
|
+
|
|
392
|
+
- className="rounded-ds-sm ..." /* checkbox box, focus ring, small chip */
|
|
393
|
+
+ className="rounded-control-inner ..."
|
|
394
|
+
|
|
395
|
+
- className="rounded-ds-full ..." /* and bare rounded-full */
|
|
396
|
+
+ className="rounded-pill ..."
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
A re-runnable codemod lives at `scripts/migrate-radius-roles.mjs` in this repo. Dry-run by default — pass `--write` to apply.
|
|
400
|
+
|
|
401
|
+
### Custom presets
|
|
402
|
+
|
|
403
|
+
Define your own `[data-shape="..."]` block:
|
|
404
|
+
|
|
405
|
+
```css
|
|
406
|
+
[data-shape="brand-soft"] {
|
|
407
|
+
--radius-control: 8px;
|
|
408
|
+
--radius-control-inner: 3px;
|
|
409
|
+
--radius-surface: 14px;
|
|
410
|
+
--radius-overlay-sm: 8px;
|
|
411
|
+
--radius-overlay: 14px;
|
|
412
|
+
--radius-overlay-lg: 20px;
|
|
413
|
+
--radius-pill: 9999px;
|
|
414
|
+
--radius-bubble: 28px;
|
|
415
|
+
}
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
```html
|
|
419
|
+
<html data-shape="brand-soft">
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### Reference
|
|
423
|
+
|
|
424
|
+
- Role token map: `packages/core/llms-full.txt` → "Shape Presets & Radius Roles" section
|
|
425
|
+
- Recipe: `packages/core/docs/recipes/customize-brand.md` → "Shape presets" section
|
|
426
|
+
- Storybook: `Foundations / Shape Presets` story — interactive switcher + custom-preset demo
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## v0.38.0 — Deprecation sweep
|
|
431
|
+
|
|
432
|
+
0.38 removes 8 deprecated APIs that were soft-deprecated in earlier minor releases. All were available as aliases alongside their replacements; this release drops the aliases.
|
|
433
|
+
|
|
434
|
+
### Removed APIs and replacements
|
|
435
|
+
|
|
436
|
+
| Package | Removed | Use instead |
|
|
437
|
+
|---------|---------|-------------|
|
|
438
|
+
| `@devalok/shilp-sutra/ui/alert` | `variant="filled"` | `variant="solid"` |
|
|
439
|
+
| `@devalok/shilp-sutra/ui/banner` | `action` prop | `actions` prop |
|
|
440
|
+
| `@devalok/shilp-sutra/ui/input` | `startIcon` / `endIcon` props | `startSection` / `endSection` |
|
|
441
|
+
| `@devalok/shilp-sutra/ui/input` | `inputVariants` export | `inputWrapperVariants` |
|
|
442
|
+
| `@devalok/shilp-sutra/ui/segmented-control` | `variant="accent"` | `variant="solid"` |
|
|
443
|
+
| `@devalok/shilp-sutra/composed` | `ResponsiveOverlay` component | `Dialog` or `Sheet` directly |
|
|
444
|
+
| `@devalok/shilp-sutra/tailwind` | entire `./tailwind` export | CSS import (see v0.37 guide) |
|
|
445
|
+
| `@devalok/shilp-sutra/hooks/use-toast` | entire `./hooks/use-toast` export | `toast` from `@devalok/shilp-sutra` |
|
|
446
|
+
|
|
447
|
+
### Quick migration checklist
|
|
448
|
+
|
|
449
|
+
**Alert `variant="filled"` → `variant="solid"`:**
|
|
450
|
+
```diff
|
|
451
|
+
- <Alert variant="filled" color="error">Error occurred</Alert>
|
|
452
|
+
+ <Alert variant="solid" color="error">Error occurred</Alert>
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
**Banner `action` → `actions`:**
|
|
456
|
+
```diff
|
|
457
|
+
- <Banner action={<Button>Dismiss</Button>}>Update available</Banner>
|
|
458
|
+
+ <Banner actions={<Button>Dismiss</Button>}>Update available</Banner>
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
**Input `startIcon`/`endIcon` → `startSection`/`endSection`:**
|
|
462
|
+
```diff
|
|
463
|
+
- <Input startIcon={<Icon icon={IconSearch} />} />
|
|
464
|
+
+ <Input startSection={<Icon icon={IconSearch} />} />
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
**Input `inputVariants` → `inputWrapperVariants`:**
|
|
468
|
+
```diff
|
|
469
|
+
- import { inputVariants } from '@devalok/shilp-sutra'
|
|
470
|
+
+ import { inputWrapperVariants } from '@devalok/shilp-sutra'
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
**SegmentedControl `variant="accent"` → `variant="solid"`:**
|
|
474
|
+
```diff
|
|
475
|
+
- <SegmentedControl variant="accent" ... />
|
|
476
|
+
+ <SegmentedControl variant="solid" ... />
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
**ResponsiveOverlay → Dialog or Sheet:**
|
|
480
|
+
```diff
|
|
481
|
+
- import { ResponsiveOverlay } from '@devalok/shilp-sutra/composed'
|
|
482
|
+
- <ResponsiveOverlay open={open} onOpenChange={setOpen} title="Details">...</ResponsiveOverlay>
|
|
483
|
+
+ import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@devalok/shilp-sutra'
|
|
484
|
+
+ <Dialog open={open} onOpenChange={setOpen}>
|
|
485
|
+
+ <DialogContent><DialogHeader><DialogTitle>Details</DialogTitle></DialogHeader>...</DialogContent>
|
|
486
|
+
+ </Dialog>
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
**`./tailwind` preset:** Already removed in 0.37 — follow the [v0.37 migration guide](#v0370--tailwind-4-css-first-migration) if you haven't already.
|
|
490
|
+
|
|
491
|
+
**`hooks/use-toast`:**
|
|
492
|
+
```diff
|
|
493
|
+
- import { toast } from '@devalok/shilp-sutra/hooks/use-toast'
|
|
494
|
+
+ import { toast } from '@devalok/shilp-sutra'
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
## v0.37.0 — Tailwind 4 CSS-first migration
|
|
498
|
+
|
|
499
|
+
0.37 completes the Tailwind 3 → 4 migration that started in 0.34. The JS preset is gone. Tokens now ship as `@theme` CSS variables that TW4 consumes directly. **This is a breaking setup change; component APIs are unchanged.**
|
|
500
|
+
|
|
501
|
+
> **During the RC window, 0.37 lives on the `@next` dist-tag.** Use `@devalok/shilp-sutra@next` in the commands below. Once stable promotes to `@latest`, plain `@devalok/shilp-sutra` or `@latest` resolves to 0.37.x too. Pin via `@0.37.0` only after the stable release announcement.
|
|
502
|
+
|
|
503
|
+
### Before you start — two constraints inherited from Tailwind 4 itself
|
|
504
|
+
|
|
505
|
+
- **Browser support.** Tailwind 4 requires **Safari 16.4+, Chrome 111+, Firefox 128+**. Consumer apps that must support older browsers should stay on 0.36 (via the `latest-0.36` dist-tag) until they can drop those targets.
|
|
506
|
+
- **PostCSS plugin rename.** If your app had a TW3-style `postcss.config.js` like this:
|
|
507
|
+
```js
|
|
508
|
+
// TW3 — no longer works in v4
|
|
509
|
+
module.exports = { plugins: { tailwindcss: {}, autoprefixer: {} } }
|
|
510
|
+
```
|
|
511
|
+
update to the v4 plugin:
|
|
512
|
+
```js
|
|
513
|
+
// TW4 — required
|
|
514
|
+
module.exports = { plugins: { '@tailwindcss/postcss': {} } }
|
|
515
|
+
```
|
|
516
|
+
Install: `pnpm add -D @tailwindcss/postcss`. Next.js 15+ / Vite users whose build already handles this transparently can skip this step.
|
|
517
|
+
|
|
518
|
+
### Quick migration checklist
|
|
519
|
+
|
|
520
|
+
1. Install the new required peers:
|
|
521
|
+
```sh
|
|
522
|
+
pnpm add framer-motion @devalok/shilp-sutra@next
|
|
523
|
+
# if you use toasts:
|
|
524
|
+
pnpm add sonner
|
|
525
|
+
```
|
|
526
|
+
2. Rewrite `app/globals.css`:
|
|
527
|
+
```diff
|
|
528
|
+
- @import "tailwindcss";
|
|
529
|
+
- @config "./tailwind.config.ts";
|
|
530
|
+
+ @import "tailwindcss";
|
|
531
|
+
+ @import "@devalok/shilp-sutra/css";
|
|
532
|
+
```
|
|
533
|
+
3. **Delete `tailwind.config.ts`** — unless you have your own plugins (see "Keeping your own plugins" below).
|
|
534
|
+
4. Verify `next.config.ts` transpiles BOTH packages:
|
|
535
|
+
```ts
|
|
536
|
+
transpilePackages: ['@devalok/shilp-sutra', '@devalok/shilp-sutra-brand'],
|
|
537
|
+
```
|
|
538
|
+
5. Run `pnpm why framer-motion` and confirm **a single version** (see "Framer-motion single-copy check").
|
|
539
|
+
6. Run a dark-mode sanity check (see below).
|
|
540
|
+
7. `pnpm build` — should succeed with no warnings mentioning shilp-sutra.
|
|
541
|
+
|
|
542
|
+
### Before / after: globals.css
|
|
543
|
+
|
|
544
|
+
**Before (0.36.x):**
|
|
545
|
+
```css
|
|
546
|
+
@import "tailwindcss";
|
|
547
|
+
@config "./tailwind.config.ts";
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
**After (0.37.0):**
|
|
551
|
+
```css
|
|
552
|
+
@import "tailwindcss";
|
|
553
|
+
@import "@devalok/shilp-sutra/css";
|
|
554
|
+
|
|
555
|
+
/* Optional — your own plugins or content globs go here */
|
|
556
|
+
@plugin "@tailwindcss/typography";
|
|
557
|
+
@source "./app/**/*.{ts,tsx}";
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
`@import "@devalok/shilp-sutra/css"` pulls in our full token set (`@theme` blocks for color, spacing-ds, text-ds, leading-ds, radius, shadow, ease, duration, breakpoints, z-layers, animate), custom utilities (typography composites, focus-ring, touch-target, safe-area insets, z-layer utilities), the dark-mode `@custom-variant`, and a `@source` directive that scans our compiled classes.
|
|
561
|
+
|
|
562
|
+
### Delete tailwind.config.ts
|
|
563
|
+
|
|
564
|
+
You **no longer need** `tailwind.config.ts` for shilp-sutra. TW4 config is CSS-first via `@theme`. Delete it if that was its only purpose.
|
|
565
|
+
|
|
566
|
+
### Keeping your own plugins
|
|
567
|
+
|
|
568
|
+
If you had TW plugins of your own (e.g., `@tailwindcss/typography`, `@tailwindcss/forms`), keep them with the TW4 CSS directive:
|
|
569
|
+
|
|
570
|
+
```css
|
|
571
|
+
@plugin "@tailwindcss/typography";
|
|
572
|
+
@plugin "@tailwindcss/forms";
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
No JS config file required. If you had custom theme extensions, translate them to `@theme` blocks inside your `globals.css`.
|
|
576
|
+
|
|
577
|
+
### Legacy TW3 config APIs removed in v4
|
|
578
|
+
|
|
579
|
+
If your old `tailwind.config.ts` used any of these, they no longer exist:
|
|
580
|
+
|
|
581
|
+
| Removed API | Replacement |
|
|
582
|
+
|---|---|
|
|
583
|
+
| `corePlugins: { … }` | Omit utilities you don't want by not including them; use `@source not "..."` or custom variants to exclude patterns |
|
|
584
|
+
| `safelist: [...]` | `@source inline("bg-red-500 text-lg")` in globals.css |
|
|
585
|
+
| `separator: ':'` | Not configurable; always `:` |
|
|
586
|
+
| `prefix: 'tw-'` | `@import "tailwindcss" prefix(tw);` at top of globals.css |
|
|
587
|
+
| `resolveConfig()` / `defaultTheme` helpers | Read `@theme` CSS vars at runtime via `getComputedStyle(document.documentElement)` |
|
|
588
|
+
| `content: [...]` | `@source "./app/**/*.{ts,tsx}"` in globals.css |
|
|
589
|
+
| `darkMode: 'class'` | `@custom-variant dark (&:where(.dark, .dark *));` (already included in our `/css` bundle) |
|
|
590
|
+
|
|
591
|
+
If you relied on `resolveConfig()` for runtime theme access in TypeScript (e.g., to pull brand colors into framer-motion variants), migrate to reading CSS custom properties directly — they're all declared on `:root` / `.dark` by the `/css` import.
|
|
592
|
+
|
|
593
|
+
### Peer dependency changes
|
|
594
|
+
|
|
595
|
+
| Dep | 0.36.x | 0.37.0 |
|
|
596
|
+
|---|---|---|
|
|
597
|
+
| `framer-motion` | bundled | **required peer** (`^12.0.0`) |
|
|
598
|
+
| `sonner` | bundled | **optional peer** (`^2.0.0`) — only if you render a `<Toaster />` |
|
|
599
|
+
| `tailwindcss` | `^3.4.0 \|\| ^4.0.0` | **`^4.0.0` only** |
|
|
600
|
+
| `use-sync-external-store` | optional peer | now in `dependencies` (auto-installed) |
|
|
601
|
+
|
|
602
|
+
**Why framer-motion moved to peer:** module-scoped React contexts (`MotionConfig`, `AnimatePresence`, `LayoutGroup`) fail silently if two copies resolve. Making it a peer means *you* pin the version and pnpm dedupes it.
|
|
603
|
+
|
|
604
|
+
### Framer-motion single-copy check
|
|
605
|
+
|
|
606
|
+
Run:
|
|
607
|
+
```sh
|
|
608
|
+
pnpm why framer-motion
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
**Expected:** one version, one instance. If you see two different versions, run:
|
|
612
|
+
```sh
|
|
613
|
+
pnpm dedupe
|
|
614
|
+
```
|
|
615
|
+
If dedupe doesn't collapse them (version ranges don't overlap), pin `framer-motion` at the top of your app's `package.json` `dependencies`, then `pnpm install`.
|
|
616
|
+
|
|
617
|
+
> **Note:** `pnpm why` reports what the lockfile resolved. Under strict-hoist, two copies can still coexist if they satisfy different peer ranges. If animations feel "stuck" or `AnimatePresence` exits don't fire, check `pnpm list framer-motion --depth=Infinity` as a second-level verification.
|
|
618
|
+
|
|
619
|
+
### Dark mode sanity check
|
|
620
|
+
|
|
621
|
+
Our `.dark` variant now uses `@custom-variant dark (&:where(.dark *))`. After upgrading, render a representative screen with `.dark` toggled on `<html>` (or your usual ancestor) and verify:
|
|
622
|
+
|
|
623
|
+
- Card backgrounds re-theme (not stuck on light)
|
|
624
|
+
- Solid buttons keep contrast
|
|
625
|
+
- Input borders are visible in dark
|
|
626
|
+
- Toast colors invert correctly
|
|
627
|
+
- Any surface shadows still appear (check `shadow-raised`, `shadow-overlay`)
|
|
628
|
+
|
|
629
|
+
If any of these is stuck on light, the `.dark` class isn't on an ancestor — add it to `<html>` (recommended) or `<body>`.
|
|
630
|
+
|
|
631
|
+
### Token collisions
|
|
632
|
+
|
|
633
|
+
Our spacing scale is namespaced `--spacing-ds-*` (→ `p-ds-03`, `gap-ds-04` etc.) to avoid colliding with TW4's default numeric spacing (`p-4`, `gap-6`). **If you define your own `--spacing-4` in `@theme`, it wins** — our utilities are `p-ds-04` not `p-4`. Typography uses `--text-ds-*`, `--leading-ds-*`. Radius is unprefixed (`--radius`, `--radius-ds-*`) because bare `rounded` / `rounded-ds-md` are the common idiom.
|
|
634
|
+
|
|
635
|
+
### Source class changes (in consumer code too)
|
|
636
|
+
|
|
637
|
+
If your own app code used any of these TW3-era patterns, update:
|
|
638
|
+
|
|
639
|
+
| TW3 (dead in TW4) | TW4 |
|
|
640
|
+
|---|---|
|
|
641
|
+
| `w-[--my-var]` | `w-(--my-var)` |
|
|
642
|
+
| `theme(spacing.4)` inside `w-[…]` | literal value (e.g., `1rem`) |
|
|
643
|
+
| `bg-gradient-to-r` | `bg-linear-to-r` |
|
|
644
|
+
| bare `shadow` | `shadow-sm`, `shadow-raised`, etc. |
|
|
645
|
+
| `outline-none` | `outline-hidden` |
|
|
646
|
+
| `rounded-sm` | `rounded-xs` |
|
|
647
|
+
| `!prefix` | `suffix!` |
|
|
648
|
+
|
|
649
|
+
Quick grep in your repo:
|
|
650
|
+
```sh
|
|
651
|
+
grep -rn 'w-\[--\|bg-gradient-to-\|theme(spacing' src/
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
### Troubleshooting
|
|
655
|
+
|
|
656
|
+
| Symptom | Cause | Fix |
|
|
657
|
+
|---|---|---|
|
|
658
|
+
| `Module not found: Can't resolve 'framer-motion'` on `next build` | framer-motion moved to peer, not installed | `pnpm add framer-motion` |
|
|
659
|
+
| `Module not found: Can't resolve 'sonner'` on `next build` | You import `Toaster`/`toast` from shilp-sutra but sonner isn't installed (optional peer) | `pnpm add sonner` |
|
|
660
|
+
| Toasts render without styling / `toast()` no-ops in dev | Same as above, but you didn't notice the build warning | `pnpm add sonner` |
|
|
661
|
+
| Classes like `p-ds-03` produce no CSS | missing `@import "@devalok/shilp-sutra/css"` in globals.css | add it |
|
|
662
|
+
| Classes like `p-ds-03` produce no CSS (import present) | pnpm strict-hoist hiding our dist from `@source` | verify `node_modules/.pnpm/@devalok+shilp-sutra@0.37.0/node_modules/@devalok/shilp-sutra/dist/` exists |
|
|
663
|
+
| Dark mode not switching | `.dark` not on an ancestor of the component | add `.dark` to `<html>` via `next-themes` or your color-mode hook |
|
|
664
|
+
| Animations feel broken / exits don't fire | two framer-motion copies | see "Framer-motion single-copy check" |
|
|
665
|
+
| `@config` warning on build | legacy config import in your CSS | remove `@config "..."` and use `@import "@devalok/shilp-sutra/css"` |
|
|
666
|
+
| `Unknown at-rule @theme` / `Unknown at-rule @utility` | PostCSS config still references `tailwindcss` + `autoprefixer` (TW3 style). TW4 uses a single plugin. | Install `@tailwindcss/postcss` and replace both plugins with `'@tailwindcss/postcss': {}` in `postcss.config.js`. See "Before you start" above. |
|
|
667
|
+
| `[@devalok/shilp-sutra] DEPRECATION: The JS preset at "./tailwind"...` notice on build | your `tailwind.config.ts` still has `presets: [shilpSutra]`, or a dependency's does | delete that line AND add `@import "@devalok/shilp-sutra/css"` to globals.css (both steps — the preset is a no-op stub in 0.37, removed in 0.38) |
|
|
668
|
+
| **App renders unstyled after upgrade; no build error** | You upgraded the package but did not add `@import "@devalok/shilp-sutra/css"` to `globals.css`. TW4 silently drops unknown utilities, so every `bg-surface-raised`/`p-ds-*`/`shadow-raised` class is emitting zero CSS. | Add the `@import` per step 2 above. If you see the DEPRECATION notice in your build output, heed it — that's the signal for exactly this scenario. |
|
|
669
|
+
| Dark mode no longer switches (worked on 0.36) | Same as above — the `@custom-variant dark` declaration lives in the DS `/css` bundle. Without the import, `dark:*` utilities also silently no-op. | Add `@import "@devalok/shilp-sutra/css"` to globals.css. |
|
|
670
|
+
|
|
671
|
+
### Upgrading from < 0.36
|
|
672
|
+
|
|
673
|
+
Read the intermediate sections below (0.34, 0.33, 0.32, 0.30, 0.29, 0.23, 0.9) in order. Each has component-level breakage you'll need to resolve before 0.37's setup-level breakage matters.
|
|
674
|
+
|
|
675
|
+
### Need to pin 0.36 temporarily?
|
|
676
|
+
|
|
677
|
+
Use the `latest-0.36` dist-tag:
|
|
678
|
+
```sh
|
|
679
|
+
pnpm add @devalok/shilp-sutra@latest-0.36
|
|
680
|
+
```
|
|
681
|
+
This keeps you on the last TW3-compatible minor. We will backport critical security fixes to the `latest-0.36` line through at least 2026-10-01.
|
|
682
|
+
|
|
683
|
+
### Rollback recipe (for maintainers)
|
|
684
|
+
|
|
685
|
+
See [`docs/rollback.md`](./docs/rollback.md) for the executable playbook.
|
|
686
|
+
|
|
687
|
+
## v0.34.0 (Tailwind 4 + Toolchain)
|
|
688
|
+
|
|
689
|
+
**Tailwind CSS 3 → 4:**
|
|
690
|
+
- `outline-none` → `outline-hidden`
|
|
691
|
+
- `rounded-sm` → `rounded-xs`
|
|
692
|
+
- `backdrop-blur-sm` → `backdrop-blur-xs`
|
|
693
|
+
- `!prefix` → `suffix!` important syntax
|
|
694
|
+
- Replace `darkMode: 'class'` with `@variant dark (&:is(.dark *))` in CSS
|
|
695
|
+
- Add `@import "tailwindcss"` + `@config` to your CSS entry point
|
|
696
|
+
- Peer dep accepts both `^3.4.0 || ^4.0.0`
|
|
697
|
+
|
|
698
|
+
**Other toolchain:**
|
|
699
|
+
- `tailwind-merge` 3.0 → 3.5 (required for TW4 class recognition)
|
|
700
|
+
- TypeScript 5.7 → 6.0.2 (`types` defaults to `[]` — add `"types": ["node"]` to tsconfig if needed)
|
|
701
|
+
- ESLint 9 → 10 (config lookup starts from linted file directory, not CWD)
|
|
702
|
+
- `react-zoom-pan-pinch` 3 → 4 (`onTransformed` → `onTransform`)
|
|
703
|
+
|
|
704
|
+
## v0.33.0
|
|
705
|
+
|
|
706
|
+
**2 breaking changes:**
|
|
707
|
+
|
|
708
|
+
### EmojiSuggestion factory pattern
|
|
709
|
+
|
|
710
|
+
```diff
|
|
711
|
+
- import { EmojiSuggestion } from '@devalok/shilp-sutra/composed'
|
|
712
|
+
+ import { createEmojiSuggestion } from '@devalok/shilp-sutra/composed'
|
|
713
|
+
+ const EmojiSuggestion = createEmojiSuggestion() // or createEmojiSuggestion('apple')
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
### Emoji HTML output changed
|
|
717
|
+
|
|
718
|
+
Non-native `emojiSet` renders emoji as `<span data-emoji-id="..." role="img">` nodes, not raw Unicode. `plainText` still returns Unicode.
|
|
719
|
+
|
|
720
|
+
## v0.32.0
|
|
721
|
+
|
|
722
|
+
**6 breaking changes:**
|
|
723
|
+
|
|
724
|
+
### Button variant/color rename
|
|
725
|
+
|
|
726
|
+
```diff
|
|
727
|
+
- <Button variant="default"> → <Button variant="solid">
|
|
728
|
+
- <Button variant="destructive"> → <Button variant="solid" color="error">
|
|
729
|
+
- <Button color="default"> → <Button color="accent">
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
### Chip removed — use Badge
|
|
733
|
+
|
|
734
|
+
```diff
|
|
735
|
+
- import { Chip } from '@devalok/shilp-sutra/ui'
|
|
736
|
+
+ import { Badge } from '@devalok/shilp-sutra/ui'
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
### SegmentedControl rewritten
|
|
740
|
+
|
|
741
|
+
```diff
|
|
742
|
+
- <SegmentedControl variant="filled"> → <SegmentedControl variant="accent">
|
|
743
|
+
- <SegmentedControl variant="tonal"> → <SegmentedControl variant="default">
|
|
744
|
+
- <SegmentedControlItem> → (no longer exported — use options array)
|
|
745
|
+
- size="small|medium|big" → size="sm|md|lg"
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
### TopBar renders as `<header>`
|
|
749
|
+
|
|
750
|
+
Was `<div>`, now `<header>`. If you had a wrapping `<header>`, remove it to avoid nested landmarks.
|
|
751
|
+
|
|
752
|
+
### Surface token rename
|
|
753
|
+
|
|
754
|
+
```diff
|
|
755
|
+
- bg-surface-1 → bg-surface-base
|
|
756
|
+
- bg-surface-2 → bg-surface-raised
|
|
757
|
+
- bg-surface-3 → bg-surface-raised-hover
|
|
758
|
+
- bg-surface-4 → bg-surface-raised-active
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
### Shadow token rename
|
|
762
|
+
|
|
763
|
+
```diff
|
|
764
|
+
- shadow-01 → shadow-raised
|
|
765
|
+
- shadow-02 → shadow-raised-hover
|
|
766
|
+
- shadow-03 → shadow-floating
|
|
767
|
+
- shadow-04 → shadow-overlay
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
## v0.30.0
|
|
771
|
+
|
|
772
|
+
- **`@devalok/shilp-sutra-karm` removed** — Domain components moved to Karm app repo. The npm package is deprecated at v0.9.0.
|
|
773
|
+
|
|
774
|
+
No component API breakage. Drop-in upgrade from 0.29.0.
|
|
775
|
+
|
|
776
|
+
## v0.29.0
|
|
777
|
+
|
|
778
|
+
**4 breaking changes:**
|
|
779
|
+
|
|
780
|
+
### Warning color remapped (yellow → amber-bright)
|
|
781
|
+
|
|
782
|
+
`warning-*` tokens now use warm amber (OKLCH hue 65-70) instead of yellow (hue 85). If you hardcoded any `--yellow-*` primitives for warning states, switch to `--amber-bright-*` or the semantic `warning-*` tokens.
|
|
783
|
+
|
|
784
|
+
### Button icon API change
|
|
785
|
+
|
|
786
|
+
```tsx
|
|
787
|
+
// Before (0.28.x)
|
|
788
|
+
<Button startIcon={<IconPlus />}>Add</Button>
|
|
789
|
+
|
|
790
|
+
// After (0.29.0)
|
|
791
|
+
<Button startIcon={<Icon icon={IconPlus} />}>Add</Button>
|
|
792
|
+
```
|
|
793
|
+
|
|
794
|
+
### Badge rewrite
|
|
795
|
+
|
|
796
|
+
```tsx
|
|
797
|
+
// Before (0.28.x)
|
|
798
|
+
<Badge variant="secondary">Tag</Badge>
|
|
799
|
+
<Badge variant="destructive">Error</Badge>
|
|
800
|
+
|
|
801
|
+
// After (0.29.0)
|
|
802
|
+
<Badge variant="subtle">Tag</Badge>
|
|
803
|
+
<Badge variant="solid" color="error">Error</Badge>
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
Removed: `variant="secondary"`, `variant="destructive"`, `color="brand"`.
|
|
807
|
+
Added: `variant="soft"`, `color="custom"`, interactive props, `Badge.Indicator`, `Badge.Group`.
|
|
808
|
+
|
|
809
|
+
### Chip deprecated
|
|
810
|
+
|
|
811
|
+
```tsx
|
|
812
|
+
// Before
|
|
813
|
+
<Chip label="Tag" onDelete={fn} />
|
|
814
|
+
|
|
815
|
+
// After
|
|
816
|
+
<Badge onClick={fn} onDismiss={fn}>Tag</Badge>
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
## v0.23.0
|
|
820
|
+
|
|
821
|
+
**Surface and shadow token migration.** See the detailed guide: [plans/2026-03-16-surface-shadow-consistency-design.md](plans/2026-03-16-surface-shadow-consistency-design.md).
|
|
822
|
+
|
|
823
|
+
Key renames:
|
|
824
|
+
- `bg-surface-1` → `bg-surface-base`
|
|
825
|
+
- `bg-surface-2` → `bg-surface-raised`
|
|
826
|
+
- `bg-surface-3` → `bg-surface-raised-hover`
|
|
827
|
+
- `bg-surface-4` → `bg-surface-raised-active`
|
|
828
|
+
- `shadow-01` through `shadow-05` → `shadow-raised`, `shadow-raised-hover`, `shadow-floating`, `shadow-overlay`
|
|
829
|
+
|
|
830
|
+
## v0.9.0
|
|
831
|
+
|
|
832
|
+
**Dependency bundling.** All runtime deps now bundled into dist. Only React + peer deps stay external. Fixes React #527 in Next.js + pnpm. No API changes, but consumers should add to `next.config.js`:
|
|
833
|
+
|
|
834
|
+
```js
|
|
835
|
+
transpilePackages: ["@devalok/shilp-sutra", "@devalok/shilp-sutra-brand"]
|
|
836
|
+
```
|