@roxyapi/ui 0.1.2 → 0.2.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 (220) hide show
  1. package/AGENTS.md +6 -0
  2. package/README.md +327 -14
  3. package/THEMING.md +24 -7
  4. package/dist/cdn/components/ashtakavarga-grid.js +349 -0
  5. package/dist/cdn/components/ashtakavarga-grid.js.map +7 -0
  6. package/dist/cdn/components/biorhythm-chart.js +15 -22
  7. package/dist/cdn/components/biorhythm-chart.js.map +3 -3
  8. package/dist/cdn/components/choghadiya-grid.js +239 -0
  9. package/dist/cdn/components/choghadiya-grid.js.map +7 -0
  10. package/dist/cdn/components/compatibility-card.js +36 -34
  11. package/dist/cdn/components/compatibility-card.js.map +4 -4
  12. package/dist/cdn/components/dasha-timeline.js +35 -39
  13. package/dist/cdn/components/dasha-timeline.js.map +4 -4
  14. package/dist/cdn/components/data.js +9 -9
  15. package/dist/cdn/components/data.js.map +4 -4
  16. package/dist/cdn/components/divisional-chart.js +279 -0
  17. package/dist/cdn/components/divisional-chart.js.map +7 -0
  18. package/dist/cdn/components/dosha-card.js +49 -49
  19. package/dist/cdn/components/dosha-card.js.map +3 -3
  20. package/dist/cdn/components/endpoint-form.js +47 -28
  21. package/dist/cdn/components/endpoint-form.js.map +4 -4
  22. package/dist/cdn/components/guna-milan.js +66 -24
  23. package/dist/cdn/components/guna-milan.js.map +4 -4
  24. package/dist/cdn/components/hexagram.js +26 -26
  25. package/dist/cdn/components/hexagram.js.map +3 -3
  26. package/dist/cdn/components/horoscope-card.js +47 -40
  27. package/dist/cdn/components/horoscope-card.js.map +4 -4
  28. package/dist/cdn/components/kp-planets-table.js +10 -10
  29. package/dist/cdn/components/kp-planets-table.js.map +4 -4
  30. package/dist/cdn/components/location-search.js +6 -6
  31. package/dist/cdn/components/location-search.js.map +3 -3
  32. package/dist/cdn/components/moon-phase.js +18 -18
  33. package/dist/cdn/components/moon-phase.js.map +4 -4
  34. package/dist/cdn/components/natal-chart.js +240 -24
  35. package/dist/cdn/components/natal-chart.js.map +4 -4
  36. package/dist/cdn/components/numerology-card.js +40 -31
  37. package/dist/cdn/components/numerology-card.js.map +4 -4
  38. package/dist/cdn/components/panchang-table.js +30 -30
  39. package/dist/cdn/components/panchang-table.js.map +4 -4
  40. package/dist/cdn/components/shadbala-table.js +312 -0
  41. package/dist/cdn/components/shadbala-table.js.map +7 -0
  42. package/dist/cdn/components/synastry-chart.js +129 -39
  43. package/dist/cdn/components/synastry-chart.js.map +4 -4
  44. package/dist/cdn/components/tarot-card.js +49 -20
  45. package/dist/cdn/components/tarot-card.js.map +3 -3
  46. package/dist/cdn/components/tarot-spread.js +43 -27
  47. package/dist/cdn/components/tarot-spread.js.map +3 -3
  48. package/dist/cdn/components/transits-table.js +391 -0
  49. package/dist/cdn/components/transits-table.js.map +7 -0
  50. package/dist/cdn/components/vedic-kundli.js +63 -27
  51. package/dist/cdn/components/vedic-kundli.js.map +4 -4
  52. package/dist/cdn/components/yoga-list.js +334 -0
  53. package/dist/cdn/components/yoga-list.js.map +7 -0
  54. package/dist/cdn/roxy-ui.js +2104 -544
  55. package/dist/cdn/roxy-ui.js.map +4 -4
  56. package/dist/components/ashtakavarga-grid.d.ts +26 -0
  57. package/dist/components/ashtakavarga-grid.d.ts.map +1 -0
  58. package/dist/components/ashtakavarga-grid.js +457 -0
  59. package/dist/components/ashtakavarga-grid.js.map +7 -0
  60. package/dist/components/biorhythm-chart.d.ts +2 -46
  61. package/dist/components/biorhythm-chart.d.ts.map +1 -1
  62. package/dist/components/biorhythm-chart.js +24 -23
  63. package/dist/components/biorhythm-chart.js.map +2 -2
  64. package/dist/components/choghadiya-grid.d.ts +19 -0
  65. package/dist/components/choghadiya-grid.d.ts.map +1 -0
  66. package/dist/components/choghadiya-grid.js +304 -0
  67. package/dist/components/choghadiya-grid.js.map +7 -0
  68. package/dist/components/compatibility-card.d.ts +2 -27
  69. package/dist/components/compatibility-card.d.ts.map +1 -1
  70. package/dist/components/compatibility-card.js +50 -29
  71. package/dist/components/compatibility-card.js.map +3 -3
  72. package/dist/components/dasha-timeline.d.ts +2 -31
  73. package/dist/components/dasha-timeline.d.ts.map +1 -1
  74. package/dist/components/dasha-timeline.js +32 -30
  75. package/dist/components/dasha-timeline.js.map +3 -3
  76. package/dist/components/data.d.ts +11 -7
  77. package/dist/components/data.d.ts.map +1 -1
  78. package/dist/components/data.js +16 -6
  79. package/dist/components/data.js.map +3 -3
  80. package/dist/components/divisional-chart.d.ts +20 -0
  81. package/dist/components/divisional-chart.d.ts.map +1 -0
  82. package/dist/components/divisional-chart.js +471 -0
  83. package/dist/components/divisional-chart.js.map +7 -0
  84. package/dist/components/dosha-card.d.ts +2 -16
  85. package/dist/components/dosha-card.d.ts.map +1 -1
  86. package/dist/components/dosha-card.js +45 -43
  87. package/dist/components/dosha-card.js.map +2 -2
  88. package/dist/components/endpoint-form.d.ts +2 -0
  89. package/dist/components/endpoint-form.d.ts.map +1 -1
  90. package/dist/components/endpoint-form.js +71 -11
  91. package/dist/components/endpoint-form.js.map +3 -3
  92. package/dist/components/guna-milan.d.ts +2 -20
  93. package/dist/components/guna-milan.d.ts.map +1 -1
  94. package/dist/components/guna-milan.js +79 -20
  95. package/dist/components/guna-milan.js.map +4 -4
  96. package/dist/components/hexagram.d.ts +3 -27
  97. package/dist/components/hexagram.d.ts.map +1 -1
  98. package/dist/components/hexagram.js +48 -15
  99. package/dist/components/hexagram.js.map +2 -2
  100. package/dist/components/horoscope-card.d.ts +2 -20
  101. package/dist/components/horoscope-card.d.ts.map +1 -1
  102. package/dist/components/horoscope-card.js +54 -18
  103. package/dist/components/horoscope-card.js.map +3 -3
  104. package/dist/components/kp-planets-table.d.ts +2 -21
  105. package/dist/components/kp-planets-table.d.ts.map +1 -1
  106. package/dist/components/kp-planets-table.js +10 -4
  107. package/dist/components/kp-planets-table.js.map +3 -3
  108. package/dist/components/location-search.d.ts +5 -14
  109. package/dist/components/location-search.d.ts.map +1 -1
  110. package/dist/components/location-search.js +45 -5
  111. package/dist/components/location-search.js.map +2 -2
  112. package/dist/components/moon-phase.d.ts +4 -21
  113. package/dist/components/moon-phase.d.ts.map +1 -1
  114. package/dist/components/moon-phase.js +34 -4
  115. package/dist/components/moon-phase.js.map +3 -3
  116. package/dist/components/natal-chart.d.ts +9 -43
  117. package/dist/components/natal-chart.d.ts.map +1 -1
  118. package/dist/components/natal-chart.js +346 -79
  119. package/dist/components/natal-chart.js.map +3 -3
  120. package/dist/components/numerology-card.d.ts +5 -37
  121. package/dist/components/numerology-card.d.ts.map +1 -1
  122. package/dist/components/numerology-card.js +58 -30
  123. package/dist/components/numerology-card.js.map +3 -3
  124. package/dist/components/panchang-table.d.ts +3 -62
  125. package/dist/components/panchang-table.d.ts.map +1 -1
  126. package/dist/components/panchang-table.js +62 -32
  127. package/dist/components/panchang-table.js.map +3 -3
  128. package/dist/components/shadbala-table.d.ts +18 -0
  129. package/dist/components/shadbala-table.d.ts.map +1 -0
  130. package/dist/components/shadbala-table.js +400 -0
  131. package/dist/components/shadbala-table.js.map +7 -0
  132. package/dist/components/synastry-chart.d.ts +9 -28
  133. package/dist/components/synastry-chart.d.ts.map +1 -1
  134. package/dist/components/synastry-chart.js +201 -56
  135. package/dist/components/synastry-chart.js.map +3 -3
  136. package/dist/components/tarot-card.d.ts +5 -29
  137. package/dist/components/tarot-card.d.ts.map +1 -1
  138. package/dist/components/tarot-card.js +59 -20
  139. package/dist/components/tarot-card.js.map +2 -2
  140. package/dist/components/tarot-spread.d.ts +2 -24
  141. package/dist/components/tarot-spread.d.ts.map +1 -1
  142. package/dist/components/tarot-spread.js +39 -13
  143. package/dist/components/tarot-spread.js.map +2 -2
  144. package/dist/components/transits-table.d.ts +21 -0
  145. package/dist/components/transits-table.d.ts.map +1 -0
  146. package/dist/components/transits-table.js +515 -0
  147. package/dist/components/transits-table.js.map +7 -0
  148. package/dist/components/vedic-kundli.d.ts +5 -28
  149. package/dist/components/vedic-kundli.d.ts.map +1 -1
  150. package/dist/components/vedic-kundli.js +147 -83
  151. package/dist/components/vedic-kundli.js.map +3 -3
  152. package/dist/components/yoga-list.d.ts +29 -0
  153. package/dist/components/yoga-list.d.ts.map +1 -0
  154. package/dist/components/yoga-list.js +389 -0
  155. package/dist/components/yoga-list.js.map +7 -0
  156. package/dist/index.cjs +3693 -1180
  157. package/dist/index.cjs.map +4 -4
  158. package/dist/index.d.ts +11 -4
  159. package/dist/index.d.ts.map +1 -1
  160. package/dist/index.js +3709 -1196
  161. package/dist/index.js.map +4 -4
  162. package/dist/manifest.d.ts +43 -0
  163. package/dist/manifest.d.ts.map +1 -0
  164. package/dist/manifest.json +7 -2
  165. package/dist/styles/tokens.css +73 -1
  166. package/dist/tokens/index.d.ts +6 -0
  167. package/dist/tokens/index.d.ts.map +1 -1
  168. package/dist/types/index.d.ts +2 -0
  169. package/dist/types/index.d.ts.map +1 -0
  170. package/dist/types/types.gen.d.ts +27811 -0
  171. package/dist/types/types.gen.d.ts.map +1 -0
  172. package/dist/utils/debounce.d.ts +9 -1
  173. package/dist/utils/debounce.d.ts.map +1 -1
  174. package/dist/utils/format.d.ts +29 -0
  175. package/dist/utils/format.d.ts.map +1 -0
  176. package/dist/utils/kundli-render.d.ts +63 -0
  177. package/dist/utils/kundli-render.d.ts.map +1 -0
  178. package/dist/utils/string.d.ts +14 -0
  179. package/dist/utils/string.d.ts.map +1 -0
  180. package/dist/version.d.ts +2 -0
  181. package/dist/version.d.ts.map +1 -0
  182. package/package.json +7 -1
  183. package/src/components/ashtakavarga-grid.ts +354 -0
  184. package/src/components/biorhythm-chart.ts +39 -84
  185. package/src/components/choghadiya-grid.ts +185 -0
  186. package/src/components/compatibility-card.ts +85 -52
  187. package/src/components/dasha-timeline.ts +55 -73
  188. package/src/components/data.ts +28 -16
  189. package/src/components/divisional-chart.ts +214 -0
  190. package/src/components/dosha-card.ts +72 -68
  191. package/src/components/endpoint-form.ts +80 -18
  192. package/src/components/guna-milan.ts +87 -47
  193. package/src/components/hexagram.ts +53 -43
  194. package/src/components/horoscope-card.ts +59 -43
  195. package/src/components/kp-planets-table.ts +8 -27
  196. package/src/components/location-search.ts +47 -23
  197. package/src/components/moon-phase.ts +28 -25
  198. package/src/components/natal-chart.ts +364 -110
  199. package/src/components/numerology-card.ts +86 -84
  200. package/src/components/panchang-table.ts +40 -78
  201. package/src/components/shadbala-table.ts +286 -0
  202. package/src/components/synastry-chart.ts +213 -97
  203. package/src/components/tarot-card.ts +76 -62
  204. package/src/components/tarot-spread.ts +72 -45
  205. package/src/components/transits-table.ts +350 -0
  206. package/src/components/vedic-kundli.ts +59 -173
  207. package/src/components/yoga-list.ts +328 -0
  208. package/src/index.ts +18 -26
  209. package/src/manifest.ts +340 -0
  210. package/src/styles/tokens.css +73 -1
  211. package/src/tokens/index.ts +14 -0
  212. package/src/types/types.gen.ts +3 -3
  213. package/src/utils/debounce.ts +23 -4
  214. package/src/utils/format.ts +75 -0
  215. package/src/utils/kundli-render.ts +197 -0
  216. package/src/utils/string.ts +23 -0
  217. package/src/version.ts +2 -0
  218. package/dist/utils/motion.d.ts +0 -13
  219. package/dist/utils/motion.d.ts.map +0 -1
  220. package/src/utils/motion.ts +0 -18
@@ -0,0 +1,197 @@
1
+ import type { TemplateResult } from 'lit';
2
+ import { nothing, svg } from 'lit';
3
+ import { PLANET_ABBR, SIGN_ABBR, SIGNS_ORDER } from '../tokens/index.js';
4
+ import { capitalize } from './string.js';
5
+
6
+ export const KUNDLI_SIZE = 300;
7
+ export const KUNDLI_CENTER = 150;
8
+
9
+ /**
10
+ * Maps a lowercase rashi key (e.g. "aries") back to its canonical sign name
11
+ * (e.g. "Aries"). Used by every kundli consumer to bridge spec lowercase
12
+ * rashi keys to the title-cased SIGNS_ORDER tokens.
13
+ */
14
+ export const RASHI_TO_SIGN: Record<string, string> = Object.fromEntries(
15
+ SIGNS_ORDER.map((s) => [s.toLowerCase(), s] as const),
16
+ );
17
+
18
+ /**
19
+ * South Indian fixed-house square grid: house centers for planet text labels.
20
+ * House 1 is fixed top-center; positions are in the 300x300 viewBox.
21
+ */
22
+ export const SOUTH_HOUSE_CENTERS: Record<number, { x: number; y: number }> = {
23
+ 1: { x: 150, y: 58 },
24
+ 2: { x: 205, y: 52 },
25
+ 3: { x: 253, y: 112 },
26
+ 4: { x: 243, y: 150 },
27
+ 5: { x: 253, y: 188 },
28
+ 6: { x: 205, y: 248 },
29
+ 7: { x: 150, y: 242 },
30
+ 8: { x: 95, y: 248 },
31
+ 9: { x: 47, y: 188 },
32
+ 10: { x: 57, y: 150 },
33
+ 11: { x: 47, y: 112 },
34
+ 12: { x: 95, y: 52 },
35
+ };
36
+
37
+ /**
38
+ * South Indian sign abbreviation positions (slightly outward from center).
39
+ */
40
+ export const SOUTH_SIGN_POSITIONS: Record<number, { x: number; y: number }> = {
41
+ 1: { x: 150, y: 35 },
42
+ 2: { x: 222, y: 40 },
43
+ 3: { x: 265, y: 100 },
44
+ 4: { x: 265, y: 150 },
45
+ 5: { x: 265, y: 200 },
46
+ 6: { x: 222, y: 260 },
47
+ 7: { x: 150, y: 265 },
48
+ 8: { x: 78, y: 260 },
49
+ 9: { x: 35, y: 200 },
50
+ 10: { x: 35, y: 150 },
51
+ 11: { x: 35, y: 100 },
52
+ 12: { x: 78, y: 40 },
53
+ };
54
+
55
+ /**
56
+ * North Indian style: 12 triangular house positions.
57
+ * Lagna (house 1) is the top diamond, numbered clockwise.
58
+ * Centers represent the visual midpoint of each triangular cell.
59
+ */
60
+ export const NORTH_HOUSE_CENTERS: Record<number, { x: number; y: number }> = {
61
+ 1: { x: 150, y: 60 },
62
+ 2: { x: 225, y: 100 },
63
+ 3: { x: 255, y: 150 },
64
+ 4: { x: 225, y: 200 },
65
+ 5: { x: 150, y: 240 },
66
+ 6: { x: 75, y: 200 },
67
+ 7: { x: 45, y: 150 },
68
+ 8: { x: 75, y: 100 },
69
+ 9: { x: 100, y: 80 },
70
+ 10: { x: 150, y: 108 },
71
+ 11: { x: 200, y: 80 },
72
+ 12: { x: 200, y: 220 },
73
+ };
74
+
75
+ export interface HouseDef {
76
+ /** 1-based house number. */
77
+ number: number;
78
+ /** Sign name (TitleCase, e.g. "Aries"). */
79
+ sign: string;
80
+ /** Planet abbreviation strings to display. */
81
+ planets: string[];
82
+ /** Whether this house is the ascendant (Lagna). */
83
+ isLagna: boolean;
84
+ }
85
+
86
+ /**
87
+ * Render a single house group: lagna highlight, sign abbreviation, planet labels.
88
+ * Returns an SVG fragment for use inside an `<svg>` element.
89
+ */
90
+ export function renderSouthHouseGroup(
91
+ h: HouseDef,
92
+ ): TemplateResult | typeof nothing {
93
+ const center = SOUTH_HOUSE_CENTERS[h.number];
94
+ const signPos = SOUTH_SIGN_POSITIONS[h.number];
95
+ if (!center || !signPos) return nothing;
96
+ const signAbbr = SIGN_ABBR[h.sign] ?? '';
97
+ const planets = h.planets;
98
+ return svg`
99
+ <g>
100
+ ${
101
+ h.isLagna
102
+ ? svg`<rect
103
+ class="lagna-bg"
104
+ x=${center.x - 30} y=${center.y - 28}
105
+ width="60" height="56" rx="6"
106
+ />`
107
+ : nothing
108
+ }
109
+ ${
110
+ signAbbr
111
+ ? svg`<text class="sign-text" x=${signPos.x} y=${signPos.y} text-anchor="middle" dominant-baseline="central">${signAbbr}</text>`
112
+ : nothing
113
+ }
114
+ ${
115
+ h.isLagna
116
+ ? svg`<text class="lagna-marker" x=${center.x} y=${center.y - 18} text-anchor="middle" dominant-baseline="central">LAGNA</text>`
117
+ : nothing
118
+ }
119
+ ${planets.map((planet, j) => {
120
+ const abbr = PLANET_ABBR[capitalize(planet)] ?? planet.slice(0, 2);
121
+ const lineHeight = 13;
122
+ const baseY = h.isLagna ? center.y + 8 : center.y;
123
+ const startY = baseY - ((planets.length - 1) * lineHeight) / 2;
124
+ const yPos = startY + j * lineHeight;
125
+ return svg`<text class="planet-text" x=${center.x} y=${yPos} text-anchor="middle" dominant-baseline="central">${abbr}</text>`;
126
+ })}
127
+ </g>
128
+ `;
129
+ }
130
+
131
+ /**
132
+ * Render a north-Indian-style kundli wheel frame (grid lines only).
133
+ * Returns the SVG structural lines; call `renderNorthHouseGroup` for content.
134
+ */
135
+ export function renderNorthFrame(): TemplateResult {
136
+ return svg`
137
+ <polygon class="line" points="150,10 290,150 150,290 10,150" stroke-width="1.5" />
138
+ <line class="line" x1="150" y1="10" x2="150" y2="290" stroke-width="1" />
139
+ <line class="line" x1="10" y1="150" x2="290" y2="150" stroke-width="1" />
140
+ <line class="line" x1="150" y1="10" x2="10" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
141
+ <line class="line" x1="150" y1="10" x2="290" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
142
+ <line class="line" x1="150" y1="290" x2="10" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
143
+ <line class="line" x1="150" y1="290" x2="290" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
144
+ `;
145
+ }
146
+
147
+ /**
148
+ * Render a north-Indian house group (sign abbr + house number + planets).
149
+ */
150
+ export function renderNorthHouseGroup(
151
+ h: HouseDef,
152
+ ): TemplateResult | typeof nothing {
153
+ const center = NORTH_HOUSE_CENTERS[h.number];
154
+ if (!center) return nothing;
155
+ const signAbbr = SIGN_ABBR[h.sign] ?? '';
156
+ const planets = h.planets;
157
+ return svg`
158
+ <g>
159
+ ${
160
+ h.isLagna
161
+ ? svg`<circle class="lagna-bg" cx=${center.x} cy=${center.y} r="22" />`
162
+ : nothing
163
+ }
164
+ ${
165
+ signAbbr
166
+ ? svg`<text class="sign-text" x=${center.x} y=${center.y - 10} text-anchor="middle" dominant-baseline="central">${signAbbr}</text>`
167
+ : nothing
168
+ }
169
+ <text class="house-num" x=${center.x} y=${center.y + 2} text-anchor="middle" dominant-baseline="central">${h.number}</text>
170
+ ${planets.map((planet, j) => {
171
+ const abbr = PLANET_ABBR[capitalize(planet)] ?? planet.slice(0, 2);
172
+ const lineHeight = 11;
173
+ const startY = center.y + 14 - ((planets.length - 1) * lineHeight) / 2;
174
+ const yPos = startY + j * lineHeight;
175
+ return svg`<text class="planet-text" x=${center.x} y=${yPos} text-anchor="middle" dominant-baseline="central">${abbr}</text>`;
176
+ })}
177
+ </g>
178
+ `;
179
+ }
180
+
181
+ /**
182
+ * Render the south-Indian square frame (border diamond + inner square + radial lines).
183
+ */
184
+ export function renderSouthFrame(): TemplateResult {
185
+ return svg`
186
+ <polygon class="line" points="150,10 290,150 150,290 10,150" stroke-width="1.5" />
187
+ <polygon class="line" points="220,80 220,220 80,220 80,80" stroke-width="1" fill="none" />
188
+ <line class="line" x1="150" y1="10" x2="80" y2="80" stroke-width="1" />
189
+ <line class="line" x1="150" y1="10" x2="220" y2="80" stroke-width="1" />
190
+ <line class="line" x1="290" y1="150" x2="220" y2="80" stroke-width="1" />
191
+ <line class="line" x1="290" y1="150" x2="220" y2="220" stroke-width="1" />
192
+ <line class="line" x1="150" y1="290" x2="220" y2="220" stroke-width="1" />
193
+ <line class="line" x1="150" y1="290" x2="80" y2="220" stroke-width="1" />
194
+ <line class="line" x1="10" y1="150" x2="80" y2="220" stroke-width="1" />
195
+ <line class="line" x1="10" y1="150" x2="80" y2="80" stroke-width="1" />
196
+ `;
197
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Shared string helpers used across components. Single source of truth so the
3
+ * same formatting rules apply to every key/label/title that surfaces in the
4
+ * shadow tree.
5
+ *
6
+ * - `capitalize`: title-cases the first character, lowercases the rest. Used
7
+ * when matching API-supplied planet/sign names against the glyph maps in
8
+ * `tokens/index.ts`, which use canonical TitleCase keys.
9
+ * - `humanize`: turns an API key (`birth_date`, `birthDate`, `mahadasha-end`)
10
+ * into a label suitable for display ("Birth date", "Mahadasha end").
11
+ */
12
+
13
+ export function capitalize(s: string): string {
14
+ if (!s) return '';
15
+ return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();
16
+ }
17
+
18
+ export function humanize(s: string): string {
19
+ return s
20
+ .replace(/[_-]+/g, ' ')
21
+ .replace(/([a-z])([A-Z])/g, '$1 $2')
22
+ .replace(/^\w/, (c) => c.toUpperCase());
23
+ }
package/src/version.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Generated by scripts/sync-version.ts. Do not edit.
2
+ export const ROXY_UI_VERSION = '0.2.0';
@@ -1,13 +0,0 @@
1
- /**
2
- * Motion guard. All component animations honor:
3
- * 1. --roxy-motion-duration CSS variable (set to 0ms to disable)
4
- * 2. prefers-reduced-motion: reduce media query (forces 0ms regardless)
5
- *
6
- * Components apply transitions and entry animations using the duration var
7
- * directly. The reduced-motion override is enforced at the tokens.css layer.
8
- */
9
- export declare function prefersReducedMotion(): boolean;
10
- /** CSS snippet that components paste into their styles to read the motion duration. */
11
- export declare const MOTION_DURATION = "var(--roxy-motion-duration, 200ms)";
12
- export declare const MOTION_EASING = "var(--roxy-motion-easing, cubic-bezier(0.4, 0, 0.2, 1))";
13
- //# sourceMappingURL=motion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/utils/motion.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED,uFAAuF;AACvF,eAAO,MAAM,eAAe,uCAAuC,CAAC;AACpE,eAAO,MAAM,aAAa,4DACgC,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Motion guard. All component animations honor:
3
- * 1. --roxy-motion-duration CSS variable (set to 0ms to disable)
4
- * 2. prefers-reduced-motion: reduce media query (forces 0ms regardless)
5
- *
6
- * Components apply transitions and entry animations using the duration var
7
- * directly. The reduced-motion override is enforced at the tokens.css layer.
8
- */
9
-
10
- export function prefersReducedMotion(): boolean {
11
- if (typeof window === 'undefined' || !window.matchMedia) return false;
12
- return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
13
- }
14
-
15
- /** CSS snippet that components paste into their styles to read the motion duration. */
16
- export const MOTION_DURATION = 'var(--roxy-motion-duration, 200ms)';
17
- export const MOTION_EASING =
18
- 'var(--roxy-motion-easing, cubic-bezier(0.4, 0, 0.2, 1))';