@duro-app/cli 5.16.0 → 5.18.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.
Files changed (64) hide show
  1. package/README.md +12 -5
  2. package/dist/bin.js +3 -2
  3. package/dist/bin.js.map +1 -1
  4. package/dist/commands/hook.d.ts.map +1 -1
  5. package/dist/commands/hook.js +11 -2
  6. package/dist/commands/hook.js.map +1 -1
  7. package/dist/commands/list.d.ts.map +1 -1
  8. package/dist/commands/list.js +23 -2
  9. package/dist/commands/list.js.map +1 -1
  10. package/dist/commands/lookup.d.ts.map +1 -1
  11. package/dist/commands/lookup.js +15 -1
  12. package/dist/commands/lookup.js.map +1 -1
  13. package/dist/commands/mcp.d.ts +12 -0
  14. package/dist/commands/mcp.d.ts.map +1 -1
  15. package/dist/commands/mcp.js +51 -36
  16. package/dist/commands/mcp.js.map +1 -1
  17. package/dist/commands/skill.d.ts +6 -0
  18. package/dist/commands/skill.d.ts.map +1 -1
  19. package/dist/commands/skill.js +168 -24
  20. package/dist/commands/skill.js.map +1 -1
  21. package/dist/format.d.ts.map +1 -1
  22. package/dist/format.js +7 -0
  23. package/dist/format.js.map +1 -1
  24. package/dist/hook-script.d.ts +2 -2
  25. package/dist/hook-script.d.ts.map +1 -1
  26. package/dist/hook-script.js +1 -1
  27. package/dist/manifest.d.ts.map +1 -1
  28. package/dist/manifest.js +10 -4
  29. package/dist/manifest.js.map +1 -1
  30. package/dist/registry-types.d.ts +5 -0
  31. package/dist/registry-types.d.ts.map +1 -1
  32. package/dist/registry.d.ts +20 -0
  33. package/dist/registry.d.ts.map +1 -1
  34. package/dist/registry.js +38 -0
  35. package/dist/registry.js.map +1 -1
  36. package/package.json +6 -5
  37. package/registry.json +35 -0
  38. package/{LICENSE → skills/colors/LICENSE} +1 -1
  39. package/skills/colors/NOTICE.md +36 -0
  40. package/skills/colors/SKILL.md +99 -0
  41. package/skills/colors/color-formats.md +90 -0
  42. package/skills/colors/color-usage.md +109 -0
  43. package/skills/colors/contrast.md +70 -0
  44. package/skills/colors/palette-generation.md +108 -0
  45. package/skills/colors/palette-structure.md +72 -0
  46. package/skills/colors/token-naming.md +99 -0
  47. package/skills/typography/LICENSE +21 -0
  48. package/skills/typography/NOTICE.md +36 -0
  49. package/skills/typography/SKILL.md +169 -0
  50. package/skills/typography/choosing-fonts.md +53 -0
  51. package/skills/typography/css-cheat-sheet.md +67 -0
  52. package/skills/typography/details-and-accessibility.md +84 -0
  53. package/skills/typography/spacing-and-sizing.md +87 -0
  54. package/skills/typography/variable-fonts-and-opentype.md +100 -0
  55. package/skills/typography/wrapping-and-punctuation.md +23 -0
  56. package/skills/ui/LICENSE +21 -0
  57. package/skills/ui/NOTICE.md +37 -0
  58. package/skills/ui/SKILL.md +139 -0
  59. package/skills/ui/animations.md +170 -0
  60. package/skills/ui/enter-exit.md +157 -0
  61. package/skills/ui/icon-transitions.md +72 -0
  62. package/skills/ui/icons.md +105 -0
  63. package/skills/ui/performance.md +63 -0
  64. package/skills/ui/surfaces.md +166 -0
@@ -0,0 +1,63 @@
1
+ # Performance
2
+
3
+ Recipes for transition specificity and compositing hints.
4
+
5
+ ## Transition only what changes
6
+
7
+ `transition: all` animates properties nobody meant to animate, such as colors on a theme flip. On layout properties such as `width` and `padding` it re-runs layout on every frame. Tailwind's bare `transition` is a curated list rather than `all`, and still covers more than most elements change.
8
+
9
+ ```css
10
+ /* Good: only what changes */
11
+ .button {
12
+ transition-property: scale, background-color;
13
+ transition-duration: 150ms;
14
+ transition-timing-function: ease-out;
15
+ }
16
+
17
+ /* Bad: everything */
18
+ .button {
19
+ transition: all 150ms ease-out;
20
+ }
21
+ ```
22
+
23
+ ```tsx
24
+ // Good: explicit properties
25
+ <button className="transition-[scale,background-color] duration-150 ease-out">
26
+
27
+ // Bad: transition all
28
+ <button className="transition-all duration-150 ease-out">
29
+ ```
30
+
31
+ In Tailwind 4, `transition-transform` covers `transform, translate, scale, rotate`, and in Tailwind 3 only `transform`. Use it when animating transforms alone. Mixing transform and other properties takes the bracket syntax, as in `transition-[scale,opacity,filter]`.
32
+
33
+ ## Use will-change sparingly
34
+
35
+ `will-change` promotes an element to its own compositing layer ahead of time. Without it the browser promotes when the animation starts, and that one-time promotion can stutter on the first frame. Each extra layer costs memory, so never add it preemptively.
36
+
37
+ ```css
38
+ /* Good: names the property that animates */
39
+ .animated-card {
40
+ will-change: scale, opacity;
41
+ }
42
+
43
+ /* Bad: never all */
44
+ .animated-card {
45
+ will-change: all;
46
+ }
47
+
48
+ /* Bad: these never composite */
49
+ .animated-card {
50
+ will-change: background-color, padding;
51
+ }
52
+ ```
53
+
54
+ | Property | Worth `will-change` |
55
+ | --- | --- |
56
+ | `transform`, `translate`, `scale`, `rotate` | Yes |
57
+ | `opacity` | Yes |
58
+ | `filter` | Yes |
59
+ | `clip-path` | Rarely, since compositing it is not reliable across browsers |
60
+ | `top`, `left`, `width`, `height` | No |
61
+ | `background`, `border`, `color` | No |
62
+
63
+ `will-change` on a transform property or `filter` makes the element the containing block for its `position: fixed` descendants, so a fixed modal or tooltip inside it stops tracking the viewport. Any of these values also creates a stacking context, which can reorder `z-index` against siblings.
@@ -0,0 +1,166 @@
1
+ # Surfaces
2
+
3
+ Recipes for concentric radius, optical alignment, shadow rings and image outlines.
4
+
5
+ ## Concentric border radius
6
+
7
+ ```
8
+ outerRadius = innerRadius + padding + borderWidth
9
+ ```
10
+
11
+ ```css
12
+ /* Good: concentric radii */
13
+ .card {
14
+ border-radius: 20px; /* 12 + 8 */
15
+ padding: 8px;
16
+ }
17
+ .card-inner {
18
+ border-radius: 12px;
19
+ }
20
+
21
+ /* Bad: same radius on both */
22
+ .card {
23
+ border-radius: 12px;
24
+ padding: 8px;
25
+ }
26
+ .card-inner {
27
+ border-radius: 12px;
28
+ }
29
+ ```
30
+
31
+ ```tsx
32
+ // Good: outer radius accounts for padding
33
+ <div className="rounded-2xl p-2"> {/* 16px radius, 8px padding */}
34
+ <div className="rounded-lg"> {/* 8px radius = 16 - 8 */}
35
+ ...
36
+ </div>
37
+ </div>
38
+
39
+ // Bad: same radius on both
40
+ <div className="rounded-xl p-2">
41
+ <div className="rounded-xl">
42
+ ...
43
+ </div>
44
+ </div>
45
+ ```
46
+
47
+ ## Optical alignment
48
+
49
+ ### Buttons with text and an icon
50
+
51
+ Start the icon side at `2px` less padding than the text side, then judge by eye.
52
+
53
+ ```css
54
+ /* Good: less padding on the trailing icon side */
55
+ .button-with-icon {
56
+ padding-inline-start: 16px;
57
+ padding-inline-end: 14px;
58
+ }
59
+
60
+ /* Bad: equal padding pushes the icon visually outward */
61
+ .button-with-icon {
62
+ padding-inline: 16px;
63
+ }
64
+ ```
65
+
66
+ ```tsx
67
+ // Tailwind
68
+ <button className="ps-4 pe-3.5 flex items-center gap-2">
69
+ <span>Continue</span>
70
+ <ArrowRightIcon />
71
+ </button>
72
+ ```
73
+
74
+ ### Play button triangles
75
+
76
+ A triangle's geometric center sits left of its visual center, so shift it toward its point:
77
+
78
+ ```css
79
+ .play-button svg {
80
+ transform: translateX(2px); /* physical on purpose: playback icons never mirror */
81
+ }
82
+ ```
83
+
84
+ ### Asymmetric icons
85
+
86
+ Stars, arrows and carets carry uneven visual weight. Fix the `viewBox` or path in the SVG, so the component needs no extra offset. Where the asset cannot change, nudge its wrapper:
87
+
88
+ ```tsx
89
+ <span className="translate-x-px">
90
+ <StarIcon />
91
+ </span>
92
+ ```
93
+
94
+ ## Shadow recipes
95
+
96
+ ### Light mode
97
+
98
+ Three layers. The first acts as a 1px ring, the second adds lift and the third ambient depth:
99
+
100
+ ```css
101
+ :root {
102
+ --shadow-border:
103
+ 0px 0px 0px 1px oklch(0 0 0 / 0.06),
104
+ 0px 1px 2px -1px oklch(0 0 0 / 0.06),
105
+ 0px 2px 4px 0px oklch(0 0 0 / 0.04);
106
+ --shadow-border-hover:
107
+ 0px 0px 0px 1px oklch(0 0 0 / 0.08),
108
+ 0px 1px 2px -1px oklch(0 0 0 / 0.08),
109
+ 0px 2px 4px 0px oklch(0 0 0 / 0.06);
110
+ }
111
+ ```
112
+
113
+ ### Dark mode
114
+
115
+ Depth shadows vanish on dark backgrounds, so dark mode keeps one white ring:
116
+
117
+ ```css
118
+ /* Redefine under the project's dark selector */
119
+ --shadow-border: 0 0 0 1px oklch(1 0 0 / 0.08);
120
+ --shadow-border-hover: 0 0 0 1px oklch(1 0 0 / 0.13);
121
+ ```
122
+
123
+ ### Usage
124
+
125
+ ```css
126
+ .card {
127
+ border: 1px solid transparent; /* forced-colors mode drops box-shadow and paints this border */
128
+ box-shadow: var(--shadow-border);
129
+ transition-property: box-shadow;
130
+ transition-duration: 150ms;
131
+ transition-timing-function: ease-out;
132
+ }
133
+
134
+ .card:hover {
135
+ box-shadow: var(--shadow-border-hover);
136
+ }
137
+ ```
138
+
139
+ The transparent border keeps the box the same size as the border it replaces.
140
+
141
+ ## Image outlines
142
+
143
+ ```css
144
+ :root {
145
+ --image-outline: oklch(0 0 0 / 0.1);
146
+ }
147
+ /* Redefine under the project's dark selector */
148
+ --image-outline: oklch(1 0 0 / 0.1);
149
+
150
+ .content-image {
151
+ outline: 1px solid var(--image-outline);
152
+ outline-offset: -1px;
153
+ }
154
+ ```
155
+
156
+ ```tsx
157
+ <img
158
+ className="outline outline-1 -outline-offset-1 outline-black/10 dark:outline-white/10"
159
+ src={src}
160
+ alt={alt}
161
+ />
162
+ ```
163
+
164
+ Never `outline-slate-*`, `outline-zinc-*`, `outline-neutral-*` or a palette near-black such as `#111827`.
165
+
166
+ Use `outline` rather than `border` because it never changes the image's size. At `outline-offset: -1px` it sits just inside the edge and follows the corner radius.