@lt-three/love3 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/README.md +40 -40
  2. package/dist/native/analytics/animation.d.ts +1 -1
  3. package/dist/native/analytics/animation.js +1 -1
  4. package/dist/native/analytics/chart.types.d.ts +3 -3
  5. package/dist/native/analytics/metric-card.d.ts +3 -3
  6. package/dist/native/analytics/metric-card.js +3 -3
  7. package/dist/native/analytics/multi-line-chart.d.ts +9 -8
  8. package/dist/native/analytics/multi-line-chart.js +14 -13
  9. package/dist/native/analytics/pie-chart.d.ts +7 -7
  10. package/dist/native/analytics/pie-chart.js +8 -8
  11. package/dist/native/analytics/single-number.d.ts +4 -4
  12. package/dist/native/analytics/single-number.js +2 -2
  13. package/dist/native/atom/avatar.d.ts +6 -6
  14. package/dist/native/atom/avatar.js +2 -2
  15. package/dist/native/atom/badge.d.ts +5 -5
  16. package/dist/native/atom/button.d.ts +12 -12
  17. package/dist/native/atom/button.js +8 -8
  18. package/dist/native/atom/checkbox.d.ts +4 -4
  19. package/dist/native/atom/checkbox.js +2 -2
  20. package/dist/native/atom/colored-value.d.ts +4 -4
  21. package/dist/native/atom/colored-value.js +4 -4
  22. package/dist/native/atom/image.d.ts +7 -7
  23. package/dist/native/atom/image.js +2 -2
  24. package/dist/native/atom/label.d.ts +5 -5
  25. package/dist/native/atom/label.js +2 -2
  26. package/dist/native/atom/link.d.ts +5 -5
  27. package/dist/native/atom/link.js +5 -5
  28. package/dist/native/atom/readout.d.ts +7 -7
  29. package/dist/native/atom/readout.js +3 -3
  30. package/dist/native/atom/search-input.d.ts +2 -2
  31. package/dist/native/atom/search-input.js +2 -2
  32. package/dist/native/atom/select.d.ts +14 -14
  33. package/dist/native/atom/select.js +8 -8
  34. package/dist/native/atom/separator.d.ts +2 -3
  35. package/dist/native/atom/separator.js +2 -3
  36. package/dist/native/atom/skeleton.d.ts +3 -3
  37. package/dist/native/atom/skeleton.js +3 -3
  38. package/dist/native/atom/slider.d.ts +6 -6
  39. package/dist/native/atom/slider.js +3 -3
  40. package/dist/native/atom/spinner.d.ts +4 -4
  41. package/dist/native/atom/spinner.js +2 -2
  42. package/dist/native/atom/switch.d.ts +4 -4
  43. package/dist/native/atom/switch.js +3 -3
  44. package/dist/native/atom/symbol.d.ts +7 -7
  45. package/dist/native/atom/symbol.js +7 -7
  46. package/dist/native/atom/symbol.types.d.ts +8 -8
  47. package/dist/native/atom/symbol.types.js +7 -7
  48. package/dist/native/atom/text-field.d.ts +15 -15
  49. package/dist/native/atom/text-field.js +5 -5
  50. package/dist/native/atom/theme-toggle.d.ts +7 -7
  51. package/dist/native/atom/theme-toggle.js +4 -4
  52. package/dist/native/atom/timezone-select.d.ts +5 -5
  53. package/dist/native/atom/timezone-select.js +4 -4
  54. package/dist/native/atom/typography.d.ts +2 -2
  55. package/dist/native/atom/typography.js +2 -2
  56. package/dist/native/base/button.d.ts +13 -13
  57. package/dist/native/base/button.js +4 -4
  58. package/dist/native/base/form.d.ts +15 -15
  59. package/dist/native/base/form.js +11 -11
  60. package/dist/native/base/glass-card.d.ts +3 -3
  61. package/dist/native/base/glass-card.js +3 -3
  62. package/dist/native/base/input.d.ts +8 -8
  63. package/dist/native/base/input.js +7 -7
  64. package/dist/native/base/sheet.d.ts +27 -27
  65. package/dist/native/base/sheet.js +15 -15
  66. package/dist/native/form/checkbox.d.ts +3 -3
  67. package/dist/native/form/checkbox.js +2 -2
  68. package/dist/native/form/date-picker.d.ts +9 -9
  69. package/dist/native/form/date-picker.js +9 -9
  70. package/dist/native/form/form.d.ts +5 -6
  71. package/dist/native/form/form.js +4 -5
  72. package/dist/native/form/radio-group.d.ts +5 -5
  73. package/dist/native/form/radio-group.js +4 -4
  74. package/dist/native/form/select.d.ts +2 -2
  75. package/dist/native/form/select.js +2 -2
  76. package/dist/native/form/slider.d.ts +2 -2
  77. package/dist/native/form/slider.js +2 -2
  78. package/dist/native/form/switch.d.ts +2 -2
  79. package/dist/native/form/switch.js +2 -2
  80. package/dist/native/form/text-area.d.ts +2 -2
  81. package/dist/native/form/text-area.js +1 -1
  82. package/dist/native/form/text-input.d.ts +5 -5
  83. package/dist/native/form/text-input.js +8 -8
  84. package/dist/native/layout/accordion.d.ts +5 -5
  85. package/dist/native/layout/accordion.js +2 -2
  86. package/dist/native/layout/card.d.ts +8 -8
  87. package/dist/native/layout/card.js +3 -3
  88. package/dist/native/layout/description.d.ts +2 -2
  89. package/dist/native/layout/description.js +2 -2
  90. package/dist/native/layout/error.d.ts +5 -5
  91. package/dist/native/layout/error.js +2 -2
  92. package/dist/native/layout/information.d.ts +4 -4
  93. package/dist/native/layout/information.js +3 -3
  94. package/dist/native/layout/locked.d.ts +15 -15
  95. package/dist/native/layout/locked.js +7 -7
  96. package/dist/native/layout/modal.d.ts +8 -8
  97. package/dist/native/layout/modal.js +5 -5
  98. package/dist/native/layout/not-found.d.ts +4 -4
  99. package/dist/native/layout/not-found.js +3 -3
  100. package/dist/native/layout/page-frame.d.ts +8 -8
  101. package/dist/native/layout/page-frame.js +3 -3
  102. package/dist/native/layout/panel.d.ts +5 -5
  103. package/dist/native/layout/panel.js +5 -5
  104. package/dist/native/layout/reorderable-list.d.ts +14 -14
  105. package/dist/native/layout/reorderable-list.js +10 -10
  106. package/dist/native/layout/sheet.d.ts +10 -10
  107. package/dist/native/layout/sheet.js +4 -4
  108. package/dist/native/layout/simple-dialog.d.ts +3 -3
  109. package/dist/native/layout/simple-dialog.js +2 -2
  110. package/dist/native/layout/simple-table.d.ts +18 -18
  111. package/dist/native/layout/simple-table.js +1 -1
  112. package/dist/native/layout/tab-bar.d.ts +10 -10
  113. package/dist/native/layout/tab-bar.js +4 -4
  114. package/dist/native/layout/tabs.d.ts +6 -6
  115. package/dist/native/layout/tabs.js +4 -4
  116. package/dist/native/layout/tuning-panel.d.ts +10 -10
  117. package/dist/native/layout/tuning-panel.js +15 -15
  118. package/dist/native/lib/autocomplete.d.ts +1 -1
  119. package/dist/native/lib/autocomplete.js +1 -1
  120. package/dist/native/lib/breakpoints.d.ts +3 -3
  121. package/dist/native/lib/breakpoints.js +3 -3
  122. package/dist/native/lib/chart-palette.d.ts +2 -2
  123. package/dist/native/lib/chart-palette.js +2 -2
  124. package/dist/native/lib/confirm.d.ts +15 -16
  125. package/dist/native/lib/confirm.js +9 -10
  126. package/dist/native/lib/control.d.ts +9 -9
  127. package/dist/native/lib/external-store.d.ts +4 -5
  128. package/dist/native/lib/keyboard.d.ts +7 -7
  129. package/dist/native/lib/keyboard.js +7 -7
  130. package/dist/native/lib/labels.d.ts +6 -6
  131. package/dist/native/lib/labels.js +6 -6
  132. package/dist/native/lib/loading.d.ts +3 -3
  133. package/dist/native/lib/loading.js +3 -3
  134. package/dist/native/lib/network.d.ts +5 -6
  135. package/dist/native/lib/network.js +5 -6
  136. package/dist/native/lib/scheme.d.ts +7 -7
  137. package/dist/native/lib/scheme.js +3 -3
  138. package/dist/native/lib/snackbar.d.ts +12 -13
  139. package/dist/native/lib/snackbar.js +7 -8
  140. package/dist/native/lib/theme.d.ts +15 -15
  141. package/dist/native/lib/theme.js +15 -15
  142. package/dist/native/lib/timezone.d.ts +13 -13
  143. package/dist/native/lib/timezone.js +13 -13
  144. package/dist/native/lib/token-color.d.ts +1 -1
  145. package/dist/native/lib/token-color.js +1 -1
  146. package/dist/native/lib/tuning-context.d.ts +2 -2
  147. package/dist/native/lib/tuning.d.ts +10 -10
  148. package/dist/native/lib/tuning.js +8 -8
  149. package/dist/native/lib/typography.d.ts +3 -3
  150. package/dist/native/lib/typography.js +3 -3
  151. package/dist/native/lib/utils.d.ts +3 -3
  152. package/dist/native/lib/utils.js +3 -3
  153. package/dist/native/once/confirm.d.ts +2 -2
  154. package/dist/native/once/confirm.js +2 -2
  155. package/dist/native/once/error-boundary.d.ts +3 -3
  156. package/dist/native/once/error-boundary.js +2 -2
  157. package/dist/native/once/loading-lock.d.ts +3 -3
  158. package/dist/native/once/loading-lock.js +3 -3
  159. package/dist/native/once/offline-banner.d.ts +6 -6
  160. package/dist/native/once/offline-banner.js +5 -5
  161. package/dist/native/once/snackbar.d.ts +7 -7
  162. package/dist/native/once/snackbar.js +5 -5
  163. package/dist/native/styles.css +21 -21
  164. package/dist/shared/analytics.d.ts +23 -23
  165. package/dist/shared/button.d.ts +1 -1
  166. package/dist/shared/form.d.ts +7 -7
  167. package/dist/shared/form.js +2 -2
  168. package/dist/tokens/contrast-pairs.d.ts +9 -9
  169. package/dist/tokens/contrast-pairs.js +10 -10
  170. package/dist/tokens/index.d.ts +1 -1
  171. package/dist/tokens/index.js +1 -1
  172. package/dist/tokens/styles.gen.css +87 -87
  173. package/dist/tokens/tokens.gen.d.ts +2 -2
  174. package/dist/tokens/tokens.gen.js +2 -2
  175. package/dist/tuning/catalog.d.ts +8 -8
  176. package/dist/tuning/catalog.js +9 -9
  177. package/dist/tuning/color.d.ts +4 -4
  178. package/dist/tuning/color.js +5 -5
  179. package/dist/tuning/css.d.ts +13 -13
  180. package/dist/tuning/css.js +17 -17
  181. package/dist/tuning/model.d.ts +11 -11
  182. package/dist/tuning/model.js +11 -11
  183. package/dist/tuning/native.d.ts +18 -18
  184. package/dist/tuning/native.js +18 -18
  185. package/dist/tuning/schema.d.ts +15 -15
  186. package/dist/tuning/schema.js +22 -22
  187. package/dist/tuning/types.d.ts +25 -25
  188. package/dist/tuning/types.js +6 -6
  189. package/dist/web/analytics/line-chart.d.ts +6 -6
  190. package/dist/web/analytics/line-chart.js +3 -3
  191. package/dist/web/analytics/metric-card.d.ts +6 -6
  192. package/dist/web/analytics/metric-card.js +5 -5
  193. package/dist/web/analytics/multi-line-chart.d.ts +23 -23
  194. package/dist/web/analytics/multi-line-chart.js +33 -33
  195. package/dist/web/atom/avatar.d.ts +1 -1
  196. package/dist/web/atom/checkbox.d.ts +6 -6
  197. package/dist/web/atom/checkbox.js +2 -2
  198. package/dist/web/atom/colored-value.d.ts +4 -4
  199. package/dist/web/atom/colored-value.js +4 -4
  200. package/dist/web/atom/help.d.ts +1 -1
  201. package/dist/web/atom/segmented-control.d.ts +13 -14
  202. package/dist/web/atom/segmented-control.js +6 -7
  203. package/dist/web/atom/select.d.ts +7 -7
  204. package/dist/web/atom/select.js +5 -5
  205. package/dist/web/atom/slider.d.ts +3 -3
  206. package/dist/web/atom/slider.js +2 -2
  207. package/dist/web/atom/switch.d.ts +3 -3
  208. package/dist/web/atom/text-area.d.ts +9 -8
  209. package/dist/web/atom/text-area.js +9 -8
  210. package/dist/web/atom/text-field.d.ts +5 -4
  211. package/dist/web/atom/text-field.js +5 -4
  212. package/dist/web/atom/toggle-chip.d.ts +6 -6
  213. package/dist/web/atom/toggle-chip.js +4 -4
  214. package/dist/web/atom/tooltip.d.ts +6 -6
  215. package/dist/web/atom/tooltip.js +2 -2
  216. package/dist/web/base/accordion.js +1 -1
  217. package/dist/web/base/breadcrumb.d.ts +1 -1
  218. package/dist/web/base/breadcrumb.js +1 -1
  219. package/dist/web/base/card.d.ts +3 -3
  220. package/dist/web/base/card.js +2 -2
  221. package/dist/web/base/dialog.d.ts +1 -1
  222. package/dist/web/base/dialog.js +1 -1
  223. package/dist/web/base/form.d.ts +7 -7
  224. package/dist/web/base/form.js +5 -5
  225. package/dist/web/base/pagination.d.ts +5 -5
  226. package/dist/web/base/pagination.js +1 -1
  227. package/dist/web/base/sheet.d.ts +1 -1
  228. package/dist/web/base/sheet.js +1 -1
  229. package/dist/web/base/slider.d.ts +1 -1
  230. package/dist/web/base/sonner.d.ts +2 -2
  231. package/dist/web/base/sonner.js +2 -2
  232. package/dist/web/base/spinner.js +1 -1
  233. package/dist/web/form/checkbox.d.ts +8 -8
  234. package/dist/web/form/checkbox.js +3 -3
  235. package/dist/web/form/radio-group.js +3 -3
  236. package/dist/web/form/select.js +1 -1
  237. package/dist/web/form/slider.d.ts +3 -3
  238. package/dist/web/form/slider.js +3 -3
  239. package/dist/web/form/switch.d.ts +3 -3
  240. package/dist/web/form/switch.js +4 -4
  241. package/dist/web/form/text-area.js +1 -1
  242. package/dist/web/form/text-input.d.ts +1 -1
  243. package/dist/web/form/text-input.js +1 -1
  244. package/dist/web/layout/accordion.d.ts +5 -5
  245. package/dist/web/layout/accordion.js +2 -2
  246. package/dist/web/layout/alert-modal.d.ts +11 -11
  247. package/dist/web/layout/alert-modal.js +7 -7
  248. package/dist/web/layout/card.d.ts +1 -1
  249. package/dist/web/layout/information.d.ts +9 -9
  250. package/dist/web/layout/information.js +7 -7
  251. package/dist/web/layout/modal.d.ts +1 -1
  252. package/dist/web/layout/page-frame.d.ts +14 -14
  253. package/dist/web/layout/page-frame.js +7 -7
  254. package/dist/web/layout/scroll-area.d.ts +1 -1
  255. package/dist/web/layout/sheet.d.ts +4 -4
  256. package/dist/web/layout/simple-table.d.ts +18 -18
  257. package/dist/web/layout/simple-table.js +2 -2
  258. package/dist/web/layout/tabs.d.ts +4 -4
  259. package/dist/web/layout/titled-modal.d.ts +10 -11
  260. package/dist/web/layout/titled-modal.js +7 -8
  261. package/dist/web/lib/css-vars.d.ts +6 -6
  262. package/dist/web/lib/css-vars.js +5 -5
  263. package/dist/web/lib/dialog.d.ts +4 -4
  264. package/dist/web/lib/labels.d.ts +8 -8
  265. package/dist/web/lib/labels.js +8 -8
  266. package/dist/web/lib/modal-open-focus.d.ts +7 -7
  267. package/dist/web/lib/modal-open-focus.js +9 -9
  268. package/dist/web/lib/restore-focus.d.ts +4 -4
  269. package/dist/web/lib/restore-focus.js +4 -4
  270. package/dist/web/styles.css +33 -33
  271. package/package.json +2 -2
@@ -1,68 +1,68 @@
1
1
  /*
2
- * このファイルは生成物。直接編集しない。
3
- * ソース: design/love3/src/tokens/definition.ts
4
- * 再生成: bun run generate(design/love3 で)
2
+ * This file is generated. Do not edit it directly.
3
+ * Source: src/tokens/definition.ts
4
+ * Regenerate: bun run generate
5
5
  */
6
6
 
7
7
  @custom-variant dark (&:is(.dark *));
8
8
 
9
9
  :root {
10
10
  /*
11
- * 生トークン: 文字のランプと、背景の階層
12
- * 文字は 3 段(主 = ink-900 / 副 = ink-700 / 補助 = ink-500)。背景は frame < paper < raised < overlay の順に「手前」になる。
13
- * ダークは別パレットではなくロールの反転で、純黒でなく青みのある near-black の階層にする。
11
+ * Raw tokens: text ramp and background layers
12
+ * Text has 3 levels (primary = ink-900 / secondary = ink-700 / tertiary = ink-500). Backgrounds come "forward" in the order frame < paper < raised < overlay.
13
+ * Dark is not a separate palette but an inversion of the roles, built as layers of bluish near-black rather than pure black.
14
14
  */
15
- --ink-1000: #0f1012; /* 最も強い文字 */
16
- --ink-900: #1b1c20; /* 見出し・主要テキスト */
17
- --ink-700: #40434a; /* 本文(副) */
18
- --ink-500: #676b74; /* 補助・ミュート、プレースホルダ */
19
- --ink-300: #a3a6ad; /* 無効、薄いラベル */
20
- --line: #e6e7eb; /* 1px の極薄の枠・区切り線 */
21
- --line-strong: #d5d7dd; /* テキスト入力の枠・強めの枠(3:1 には届かない既知の例外。操作部品の枠は line-control) */
22
- --line-control: #80858f; /* 未選択の Checkbox / Radio / Switch の枠。どの面の上でも 3:1 以上(非テキストの AA) */
23
- --frame: #f4f5f7; /* 外枠・サイドバー・ページのキャンバス */
24
- --paper: #ffffff; /* 本文パネル(基本背景) */
25
- --raised: #ffffff; /* カード・入力・secondary ボタンの面 */
26
- --overlay: #ffffff; /* ポップオーバー・ダイアログ・メニュー */
27
- --wash: #f1f2f4; /* hover・zebra 用の淡い面 */
28
- --scrim: rgba(0, 0, 0, 0.32); /* モーダルのスクリム。ブラー無し */
29
- --shadow-color: rgba(16, 24, 40, 0.1); /* 影の色。shadow-xs〜2xl が参照する */
15
+ --ink-1000: #0f1012; /* Strongest text */
16
+ --ink-900: #1b1c20; /* Headings and primary text */
17
+ --ink-700: #40434a; /* Body text (secondary) */
18
+ --ink-500: #676b74; /* Tertiary, muted, placeholder */
19
+ --ink-300: #a3a6ad; /* Disabled, faint labels */
20
+ --line: #e6e7eb; /* 1px hairline border and divider */
21
+ --line-strong: #d5d7dd; /* Border of text inputs and stronger borders (a known exception that does not reach 3:1; borders of interactive controls use line-control) */
22
+ --line-control: #80858f; /* Border of unselected Checkbox / Radio / Switch. At least 3:1 on every surface (non-text AA) */
23
+ --frame: #f4f5f7; /* Outer frame, sidebar, page canvas */
24
+ --paper: #ffffff; /* Main content panel (base background) */
25
+ --raised: #ffffff; /* Surface of cards, inputs and secondary buttons */
26
+ --overlay: #ffffff; /* Popovers, dialogs, menus */
27
+ --wash: #f1f2f4; /* Light surface for hover and zebra rows */
28
+ --scrim: rgba(0, 0, 0, 0.32); /* Modal scrim. No blur */
29
+ --shadow-color: rgba(16, 24, 40, 0.1); /* Shadow color. Referenced by shadow-xs to shadow-2xl */
30
30
 
31
31
  /*
32
- * 主操作の色(インディゴ)
33
- * 主操作・フォーカス・選択状態に使う落ち着いたインディゴ。ライト・ダークで同じ値。
34
- * 塗り(action)の上の文字は action-foreground(白)。暗い面の上に action を「文字・リンク」として置くと AA に届かないので、
35
- * 文字には action-ink を使う。hover は塗りを少し深くする(白文字の AA を保つ)。
32
+ * Primary action color (indigo)
33
+ * A calm indigo for the primary action, focus and selected states. The same value in light and dark.
34
+ * Text on the fill (action) is action-foreground (white). Placing action as "text or link" on a dark surface does not reach AA,
35
+ * so use action-ink for text. Hover deepens the fill slightly (keeping AA for white text).
36
36
  */
37
- --action: #5e6ad2; /* 主操作の塗り・ring */
38
- --action-hover: #5059c2; /* 主操作の hover */
37
+ --action: #5e6ad2; /* Fill of the primary action, and the ring */
38
+ --action-hover: #5059c2; /* Hover of the primary action */
39
39
  --action-foreground: #ffffff;
40
- --action-ink: #4a55c0; /* 文字・リンクとして置くインディゴ */
40
+ --action-ink: #4a55c0; /* Indigo used as text or a link */
41
41
 
42
42
  /*
43
- * ブランド色(<3 / Less Than Three)
44
- * インディゴの外にあるブランド色で、`<3` variant を持つコンポーネントだけが使う。
45
- * 文字は黒(白は 2.98:1 で AA に届かず、黒なら余裕で超える)。ダークでも反転させない。
43
+ * Brand color (<3 / Less Than Three)
44
+ * A brand color outside the indigo, used only by components that have a `<3` variant.
45
+ * Text on it is black (white is 2.98:1 and misses AA, while black clears it easily). Not inverted in dark.
46
46
  */
47
47
  --lt-three: #ff5c76;
48
48
  --lt-three-foreground: #000000;
49
49
 
50
50
  /*
51
- * セマンティック状態
52
- * 文字・枠・小アイコンに使い、バッジやアラートでは `bg-state-xxx/10` 程度の淡い塗りも使える。
53
- * ソリッドの塗りは破壊的操作の主操作(destructive-solid)だけ。ダークは near-black 上で読めるよう明るくする。
51
+ * Semantic states
52
+ * Used for text, borders and small icons; badges and alerts can also use a light fill such as `bg-state-xxx/10`.
53
+ * A solid fill is only for the primary action of a destructive operation (destructive-solid). In dark they are brightened to stay readable on near-black.
54
54
  */
55
55
  --state-success: #187548;
56
56
  --state-error: #c42b3a;
57
57
  --state-warning: #8f5f00;
58
- --destructive-solid: #c42b3a; /* 破壊的操作の塗り(ソリッド)。上の文字は destructive-solid-foreground(白)。state-error は文字用で、暗い面では明るく、塗りには向かない */
58
+ --destructive-solid: #c42b3a; /* Fill (solid) of a destructive action. Text on it is destructive-solid-foreground (white). state-error is for text: it is bright on dark surfaces and not suited to a fill */
59
59
  --destructive-solid-foreground: #ffffff;
60
60
 
61
61
  /*
62
- * 書体
63
- * 欧文は Geist、数字・ID・コード・データテーブルは Geist Mono、和文は OS 同梱の游ゴシック。
64
- * --font-geist に generic (sans-serif) を含めない(含めると合成スタックで和文フォールバックより前に generic が現れ、和文が游ゴシックに届かなくなる)。
65
- * フォント実体の読み込みはプラットフォームごとに行う(web は woff2、native は expo-font で ttf)。
62
+ * Typefaces
63
+ * Geist for Latin text, Geist Mono for numbers, IDs, code and data tables, and the OS-bundled Yu Gothic for Japanese text.
64
+ * Do not put a generic family (sans-serif) in --font-geist: it would appear in the composed stack before the Japanese fallback, and Japanese text would never reach Yu Gothic.
65
+ * Load the font files per platform (woff2 on web, ttf via expo-font on native).
66
66
  */
67
67
  --font-geist: "Geist Variable", "Geist";
68
68
  --font-geist-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, monospace;
@@ -70,35 +70,35 @@
70
70
  --font-mono: var(--font-geist-mono);
71
71
 
72
72
  /*
73
- * セマンティックトークン(shadcn 互換のエイリアス)
74
- * 生トークンを var() で参照するので、生トークンを差し替えるだけで体系全体(ダーク含む)が連動する。
73
+ * Semantic tokens (shadcn-compatible aliases)
74
+ * They reference the raw tokens with var(), so swapping only the raw tokens moves the whole system (dark included).
75
75
  */
76
- --background: var(--paper); /* 本文パネル */
76
+ --background: var(--paper); /* Main content panel */
77
77
  --foreground: var(--ink-900);
78
- --card: var(--raised); /* カードは raised 面 + 薄い枠(影なし) */
78
+ --card: var(--raised); /* Cards are a raised surface plus a thin border (no shadow) */
79
79
  --card-foreground: var(--ink-900);
80
- --popover: var(--overlay); /* 浮くもの(ポップオーバー・メニュー・ダイアログ) */
80
+ --popover: var(--overlay); /* Floating things (popovers, menus, dialogs) */
81
81
  --popover-foreground: var(--ink-900);
82
- --primary: var(--action); /* 主操作のインディゴ塗り(web・native 共通) */
82
+ --primary: var(--action); /* Indigo fill of the primary action (shared by web and native) */
83
83
  --primary-foreground: var(--action-foreground);
84
- --secondary: var(--wash); /* secondary・accent・muted は wash */
84
+ --secondary: var(--wash); /* secondary, accent and muted are wash */
85
85
  --secondary-foreground: var(--ink-900);
86
86
  --muted: var(--wash);
87
87
  --muted-foreground: var(--ink-500);
88
88
  --accent: var(--wash);
89
89
  --accent-foreground: var(--ink-900);
90
- --destructive: var(--state-error); /* native が使う(文字・枠の state-error)。web の破壊的操作の塗りは destructive-solid */
90
+ --destructive: var(--state-error); /* Used by native (state-error for text and borders). The fill of a destructive action on web is destructive-solid */
91
91
  --destructive-foreground: var(--paper);
92
92
  --border: var(--line);
93
93
  --input: var(--line-strong);
94
- --ring: var(--action); /* フォーカスはインディゴのリング */
95
- --chart-1: #5e6ad2; /* チャートは色を使う。ダークでも読める 5 色 */
94
+ --ring: var(--action); /* Focus is an indigo ring */
95
+ --chart-1: #5e6ad2; /* Charts use color. Five colors that stay readable in dark */
96
96
  --chart-2: #1f9d6a;
97
97
  --chart-3: #bd7100;
98
98
  --chart-4: #d6495c;
99
99
  --chart-5: #7a8194;
100
- --section: var(--frame); /* ページ・ブロックのキャンバス */
101
- --radius: 6px; /* shadcn 互換の基準の角丸。control(6px)と同じ値 */
100
+ --section: var(--frame); /* Canvas of pages and blocks */
101
+ --radius: 6px; /* The shadcn-compatible base radius. Same value as control (6px) */
102
102
  --sidebar: var(--frame);
103
103
  --sidebar-foreground: var(--ink-900);
104
104
  --sidebar-primary: var(--action);
@@ -110,27 +110,27 @@
110
110
  }
111
111
 
112
112
  .dark {
113
- --ink-1000: #f7f8f8; /* 最も強い文字 */
114
- --ink-900: #eceef0; /* 見出し・主要テキスト */
115
- --ink-700: #cfd3da; /* 本文(副) */
116
- --ink-500: #8a8f98; /* 補助・ミュート、プレースホルダ */
117
- --ink-300: #5b5f67; /* 無効、薄いラベル */
118
- --line: #25272c; /* 1px の極薄の枠・区切り線 */
119
- --line-strong: #34363d; /* テキスト入力の枠・強めの枠(3:1 には届かない既知の例外。操作部品の枠は line-control) */
120
- --line-control: #6b707a; /* 未選択の Checkbox / Radio / Switch の枠。どの面の上でも 3:1 以上(非テキストの AA) */
121
- --frame: #0a0b0d; /* 外枠・サイドバー・ページのキャンバス */
122
- --paper: #121316; /* 本文パネル(基本背景) */
123
- --raised: #17181c; /* カード・入力・secondary ボタンの面 */
124
- --overlay: #1d1e23; /* ポップオーバー・ダイアログ・メニュー */
125
- --wash: #1b1c20; /* hover・zebra 用の淡い面 */
126
- --scrim: rgba(0, 0, 0, 0.72); /* モーダルのスクリム。ブラー無し */
127
- --shadow-color: rgba(0, 0, 0, 0.7); /* 影の色。shadow-xs〜2xl が参照する */
128
- --action-ink: #98a2f5; /* 文字・リンクとして置くインディゴ */
113
+ --ink-1000: #f7f8f8; /* Strongest text */
114
+ --ink-900: #eceef0; /* Headings and primary text */
115
+ --ink-700: #cfd3da; /* Body text (secondary) */
116
+ --ink-500: #8a8f98; /* Tertiary, muted, placeholder */
117
+ --ink-300: #5b5f67; /* Disabled, faint labels */
118
+ --line: #25272c; /* 1px hairline border and divider */
119
+ --line-strong: #34363d; /* Border of text inputs and stronger borders (a known exception that does not reach 3:1; borders of interactive controls use line-control) */
120
+ --line-control: #6b707a; /* Border of unselected Checkbox / Radio / Switch. At least 3:1 on every surface (non-text AA) */
121
+ --frame: #0a0b0d; /* Outer frame, sidebar, page canvas */
122
+ --paper: #121316; /* Main content panel (base background) */
123
+ --raised: #17181c; /* Surface of cards, inputs and secondary buttons */
124
+ --overlay: #1d1e23; /* Popovers, dialogs, menus */
125
+ --wash: #1b1c20; /* Light surface for hover and zebra rows */
126
+ --scrim: rgba(0, 0, 0, 0.72); /* Modal scrim. No blur */
127
+ --shadow-color: rgba(0, 0, 0, 0.7); /* Shadow color. Referenced by shadow-xs to shadow-2xl */
128
+ --action-ink: #98a2f5; /* Indigo used as text or a link */
129
129
  --state-success: #4cc38a;
130
130
  --state-error: #f2707f;
131
131
  --state-warning: #e0a53a;
132
- --destructive-solid: #cf3345; /* 破壊的操作の塗り(ソリッド)。上の文字は destructive-solid-foreground(白)。state-error は文字用で、暗い面では明るく、塗りには向かない */
133
- --chart-1: #7c86e8; /* チャートは色を使う。ダークでも読める 5 色 */
132
+ --destructive-solid: #cf3345; /* Fill (solid) of a destructive action. Text on it is destructive-solid-foreground (white). state-error is for text: it is bright on dark surfaces and not suited to a fill */
133
+ --chart-1: #7c86e8; /* Charts use color. Five colors that stay readable in dark */
134
134
  --chart-2: #4cc38a;
135
135
  --chart-3: #e5a23f;
136
136
  --chart-4: #f2707f;
@@ -138,27 +138,27 @@
138
138
  }
139
139
 
140
140
  .theme-light {
141
- --ink-1000: #0f1012; /* 最も強い文字 */
142
- --ink-900: #1b1c20; /* 見出し・主要テキスト */
143
- --ink-700: #40434a; /* 本文(副) */
144
- --ink-500: #676b74; /* 補助・ミュート、プレースホルダ */
145
- --ink-300: #a3a6ad; /* 無効、薄いラベル */
146
- --line: #e6e7eb; /* 1px の極薄の枠・区切り線 */
147
- --line-strong: #d5d7dd; /* テキスト入力の枠・強めの枠(3:1 には届かない既知の例外。操作部品の枠は line-control) */
148
- --line-control: #80858f; /* 未選択の Checkbox / Radio / Switch の枠。どの面の上でも 3:1 以上(非テキストの AA) */
149
- --frame: #f4f5f7; /* 外枠・サイドバー・ページのキャンバス */
150
- --paper: #ffffff; /* 本文パネル(基本背景) */
151
- --raised: #ffffff; /* カード・入力・secondary ボタンの面 */
152
- --overlay: #ffffff; /* ポップオーバー・ダイアログ・メニュー */
153
- --wash: #f1f2f4; /* hover・zebra 用の淡い面 */
154
- --scrim: rgba(0, 0, 0, 0.32); /* モーダルのスクリム。ブラー無し */
155
- --shadow-color: rgba(16, 24, 40, 0.1); /* 影の色。shadow-xs〜2xl が参照する */
156
- --action-ink: #4a55c0; /* 文字・リンクとして置くインディゴ */
141
+ --ink-1000: #0f1012; /* Strongest text */
142
+ --ink-900: #1b1c20; /* Headings and primary text */
143
+ --ink-700: #40434a; /* Body text (secondary) */
144
+ --ink-500: #676b74; /* Tertiary, muted, placeholder */
145
+ --ink-300: #a3a6ad; /* Disabled, faint labels */
146
+ --line: #e6e7eb; /* 1px hairline border and divider */
147
+ --line-strong: #d5d7dd; /* Border of text inputs and stronger borders (a known exception that does not reach 3:1; borders of interactive controls use line-control) */
148
+ --line-control: #80858f; /* Border of unselected Checkbox / Radio / Switch. At least 3:1 on every surface (non-text AA) */
149
+ --frame: #f4f5f7; /* Outer frame, sidebar, page canvas */
150
+ --paper: #ffffff; /* Main content panel (base background) */
151
+ --raised: #ffffff; /* Surface of cards, inputs and secondary buttons */
152
+ --overlay: #ffffff; /* Popovers, dialogs, menus */
153
+ --wash: #f1f2f4; /* Light surface for hover and zebra rows */
154
+ --scrim: rgba(0, 0, 0, 0.32); /* Modal scrim. No blur */
155
+ --shadow-color: rgba(16, 24, 40, 0.1); /* Shadow color. Referenced by shadow-xs to shadow-2xl */
156
+ --action-ink: #4a55c0; /* Indigo used as text or a link */
157
157
  --state-success: #187548;
158
158
  --state-error: #c42b3a;
159
159
  --state-warning: #8f5f00;
160
- --destructive-solid: #c42b3a; /* 破壊的操作の塗り(ソリッド)。上の文字は destructive-solid-foreground(白)。state-error は文字用で、暗い面では明るく、塗りには向かない */
161
- --chart-1: #5e6ad2; /* チャートは色を使う。ダークでも読める 5 色 */
160
+ --destructive-solid: #c42b3a; /* Fill (solid) of a destructive action. Text on it is destructive-solid-foreground (white). state-error is for text: it is bright on dark surfaces and not suited to a fill */
161
+ --chart-1: #5e6ad2; /* Charts use color. Five colors that stay readable in dark */
162
162
  --chart-2: #1f9d6a;
163
163
  --chart-3: #bd7100;
164
164
  --chart-4: #d6495c;
@@ -1,9 +1,9 @@
1
1
  //#region src/tokens/tokens.gen.d.ts
2
- /** love3 のトークン名(先頭の `--` を除いた CSS 変数名)。 */
2
+ /** Token names of love3 (the CSS variable names without the leading `--`). */
3
3
  export declare const tokenNames: readonly ["ink-1000", "ink-900", "ink-700", "ink-500", "ink-300", "line", "line-strong", "line-control", "frame", "paper", "raised", "overlay", "wash", "scrim", "shadow-color", "action", "action-hover", "action-foreground", "action-ink", "lt-three", "lt-three-foreground", "state-success", "state-error", "state-warning", "destructive-solid", "destructive-solid-foreground", "font-geist", "font-geist-mono", "font-jp", "font-mono", "background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "destructive-foreground", "border", "input", "ring", "chart-1", "chart-2", "chart-3", "chart-4", "chart-5", "section", "radius", "sidebar", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring"];
4
4
  export type TokenName = (typeof tokenNames)[number];
5
5
  export type TokenValues = Readonly<Record<TokenName, string>>;
6
- /** `var()` を解決した実値。ダークは上書きを重ねた全トークン。 */
6
+ /** Values with `var()` resolved. For dark, every token with the dark overrides layered on. */
7
7
  export declare const tokens: {
8
8
  readonly light: {
9
9
  readonly "ink-1000": "#0f1012";
@@ -1,5 +1,5 @@
1
1
  //#region src/tokens/tokens.gen.ts
2
- /** love3 のトークン名(先頭の `--` を除いた CSS 変数名)。 */
2
+ /** Token names of love3 (the CSS variable names without the leading `--`). */
3
3
  const tokenNames = [
4
4
  "ink-1000",
5
5
  "ink-900",
@@ -66,7 +66,7 @@ const tokenNames = [
66
66
  "sidebar-border",
67
67
  "sidebar-ring"
68
68
  ];
69
- /** `var()` を解決した実値。ダークは上書きを重ねた全トークン。 */
69
+ /** Values with `var()` resolved. For dark, every token with the dark overrides layered on. */
70
70
  const tokens = {
71
71
  light: {
72
72
  "ink-1000": "#0f1012",
@@ -1,14 +1,14 @@
1
1
  import { ColorToken, Mode, TuningCatalog } from "./types.js";
2
2
  //#region src/tuning/catalog.d.ts
3
3
  /**
4
- * 定義から、調整の対象を作る。
4
+ * Builds what can be tuned from the definition.
5
5
  *
6
- * - 色のトークン: 値が色のリテラル(`#…`・`rgba(…)`)のもの。名前の接頭辞でランプ・主操作・ブランド・状態・チャートに分ける
7
- * - セマンティックの既定の参照先: **生成された CSS の `:root`** から読む(`--background: var(--paper)`)。
8
- * `tokens` は `var()` を解決した実値なので、参照先は残らない。CSS が実際に走る値なので、これを正にする
9
- * - 本文サイズ: CSS の `@theme` の `--text-body` / `--text-body--line-height`
6
+ * - Color tokens: those whose value is a color literal (`#…`, `rgba(…)`). Split into ramp, primary action, brand, state, and chart by name prefix
7
+ * - Default references of semantic tokens: read from **`:root` in the generated CSS** (`--background: var(--paper)`).
8
+ * `tokens` holds actual values with `var()` resolved, so the targets are not preserved. The CSS holds the values that actually run, so it is the source of truth here
9
+ * - Body size: `--text-body` / `--text-body--line-height` in the CSS `@theme`
10
10
  *
11
- * 読めなければ投げる(既定の形が変わって、この読み取りが古くなったことを黙って見逃さない)。
11
+ * Throws if it cannot be read (so a change in the default shape that makes this reading stale is not silently missed).
12
12
  */
13
13
  export declare function buildCatalog({ tokens, tokenNames, css }: {
14
14
  tokens: Readonly<Record<Mode, Readonly<Record<string, string>>>>;
@@ -17,8 +17,8 @@ export declare function buildCatalog({ tokens, tokenNames, css }: {
17
17
  }): TuningCatalog;
18
18
  export declare function findColor(catalog: TuningCatalog, name: string): ColorToken | undefined;
19
19
  /**
20
- * `buildCatalog` を、失敗しても投げずに返す。生成 CSS の形が変わって読み取りが古くなったとき、**調整だけを無効にして**ほかの画面を動かす
21
- * (`error` に理由。調整の対象が空のカタログを返すので、調整は何も効かない)。呼ぶ側が `error` を表示・記録する。
20
+ * Runs `buildCatalog` and returns instead of throwing on failure. When the generated CSS changes shape and the reading goes stale, **only tuning is disabled** and the rest of the screens keep working
21
+ * (the reason is in `error`. An empty catalog is returned, so tuning has no effect). The caller shows and records `error`.
22
22
  */
23
23
  export declare function buildCatalogSafe(input: Parameters<typeof buildCatalog>[0]): {
24
24
  catalog: TuningCatalog;
@@ -24,7 +24,7 @@ function groupOf(name) {
24
24
  if (name.startsWith("chart-")) return "chart";
25
25
  return "ramp";
26
26
  }
27
- /** 半透明の値か(`rgba(…, 0.45)`・`#rrggbbaa` など)。読めない値は半透明として扱わない。 */
27
+ /** Whether it is a translucent value (`rgba(…, 0.45)`, `#rrggbbaa`, and so on). Unreadable values are not treated as translucent. */
28
28
  function hasAlpha(value) {
29
29
  const text = value.trim();
30
30
  if (/^#[0-9a-f]{8}$/i.test(text)) return Number.parseInt(text.slice(7), 16) < 255;
@@ -32,14 +32,14 @@ function hasAlpha(value) {
32
32
  return alpha !== void 0 && Number(alpha) < 1;
33
33
  }
34
34
  /**
35
- * 定義から、調整の対象を作る。
35
+ * Builds what can be tuned from the definition.
36
36
  *
37
- * - 色のトークン: 値が色のリテラル(`#…`・`rgba(…)`)のもの。名前の接頭辞でランプ・主操作・ブランド・状態・チャートに分ける
38
- * - セマンティックの既定の参照先: **生成された CSS の `:root`** から読む(`--background: var(--paper)`)。
39
- * `tokens` は `var()` を解決した実値なので、参照先は残らない。CSS が実際に走る値なので、これを正にする
40
- * - 本文サイズ: CSS の `@theme` の `--text-body` / `--text-body--line-height`
37
+ * - Color tokens: those whose value is a color literal (`#…`, `rgba(…)`). Split into ramp, primary action, brand, state, and chart by name prefix
38
+ * - Default references of semantic tokens: read from **`:root` in the generated CSS** (`--background: var(--paper)`).
39
+ * `tokens` holds actual values with `var()` resolved, so the targets are not preserved. The CSS holds the values that actually run, so it is the source of truth here
40
+ * - Body size: `--text-body` / `--text-body--line-height` in the CSS `@theme`
41
41
  *
42
- * 読めなければ投げる(既定の形が変わって、この読み取りが古くなったことを黙って見逃さない)。
42
+ * Throws if it cannot be read (so a change in the default shape that makes this reading stale is not silently missed).
43
43
  */
44
44
  function buildCatalog({ tokens, tokenNames, css }) {
45
45
  const root = /:root\s*\{([\s\S]*?)\n\}/.exec(css)?.[1];
@@ -94,8 +94,8 @@ function findColor(catalog, name) {
94
94
  return catalog.colors.find((color) => color.name === name);
95
95
  }
96
96
  /**
97
- * `buildCatalog` を、失敗しても投げずに返す。生成 CSS の形が変わって読み取りが古くなったとき、**調整だけを無効にして**ほかの画面を動かす
98
- * (`error` に理由。調整の対象が空のカタログを返すので、調整は何も効かない)。呼ぶ側が `error` を表示・記録する。
97
+ * Runs `buildCatalog` and returns instead of throwing on failure. When the generated CSS changes shape and the reading goes stale, **only tuning is disabled** and the rest of the screens keep working
98
+ * (the reason is in `error`. An empty catalog is returned, so tuning has no effect). The caller shows and records `error`.
99
99
  */
100
100
  function buildCatalogSafe(input) {
101
101
  try {
@@ -7,12 +7,12 @@ export type ColorResult = {
7
7
  reason: string;
8
8
  };
9
9
  /**
10
- * トークンの色の入力を読んで、正規の形にする。
10
+ * Reads a color token input and turns it into the canonical form.
11
11
  *
12
- * - 不透明な色(既定): `#rgb` / `#rrggbb` を、小文字の `#rrggbb` にする(`<input type="color">` と同じ形)
13
- * - 半透明を許す色(scrim。`alpha: true`): 上に加えて `#rrggbbaa` と `rgb()` / `rgba()`。`rgba(r, g, b, a)` の形にする
12
+ * - Opaque colors (the default): `#rgb` / `#rrggbb` becomes a lowercase `#rrggbb` (the same form as `<input type="color">`)
13
+ * - Colors that allow translucency (scrim; `alpha: true`): additionally `#rrggbbaa` and `rgb()` / `rgba()`, normalized to the `rgba(r, g, b, a)` form
14
14
  *
15
- * 読めない値と、範囲外の値(255 超・不透明度が 0〜1 の外)は理由つきで断る。
15
+ * Unreadable values and out-of-range values (above 255, or an opacity outside 0 to 1) are rejected with a reason.
16
16
  */
17
17
  export declare function parseTokenColor(input: string, options: {
18
18
  alpha: boolean;
@@ -4,12 +4,12 @@ const HEX3 = /^#([0-9a-f]{3})$/i;
4
4
  const HEX8 = /^#([0-9a-f]{8})$/i;
5
5
  const RGBA = /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*\.?\d+)\s*)?\)$/i;
6
6
  /**
7
- * トークンの色の入力を読んで、正規の形にする。
7
+ * Reads a color token input and turns it into the canonical form.
8
8
  *
9
- * - 不透明な色(既定): `#rgb` / `#rrggbb` を、小文字の `#rrggbb` にする(`<input type="color">` と同じ形)
10
- * - 半透明を許す色(scrim。`alpha: true`): 上に加えて `#rrggbbaa` と `rgb()` / `rgba()`。`rgba(r, g, b, a)` の形にする
9
+ * - Opaque colors (the default): `#rgb` / `#rrggbb` becomes a lowercase `#rrggbb` (the same form as `<input type="color">`)
10
+ * - Colors that allow translucency (scrim; `alpha: true`): additionally `#rrggbbaa` and `rgb()` / `rgba()`, normalized to the `rgba(r, g, b, a)` form
11
11
  *
12
- * 読めない値と、範囲外の値(255 超・不透明度が 0〜1 の外)は理由つきで断る。
12
+ * Unreadable values and out-of-range values (above 255, or an opacity outside 0 to 1) are rejected with a reason.
13
13
  */
14
14
  function parseTokenColor(input, options) {
15
15
  const text = input.trim();
@@ -71,7 +71,7 @@ function toRgba(rgb, alpha255) {
71
71
  const channel = (offset) => Number.parseInt(rgb.slice(offset, offset + 2), 16);
72
72
  return `rgba(${channel(0)}, ${channel(2)}, ${channel(4)}, ${trimNumber(alpha255 / 255)})`;
73
73
  }
74
- /** 小数を丸めて、末尾の 0 を落とす(0.45 → `0.45`、1 → `1`)。 */
74
+ /** Rounds a decimal and drops trailing zeros (0.45 → `0.45`, 1 → `1`). */
75
75
  function trimNumber(value) {
76
76
  return String(Math.round(value * 100) / 100);
77
77
  }
@@ -1,6 +1,6 @@
1
1
  import { Tuning, TuningCatalog } from "./types.js";
2
2
  //#region src/tuning/css.d.ts
3
- /** 影の preset(Tailwind の既定の影)。love3 の既定は `--shadow-color` を使う淡い影(`definition.ts` の `theme`)。 */
3
+ /** The shadow preset (Tailwind's default shadows). The love3 default is a soft shadow using `--shadow-color` (the `theme` in `definition.ts`). */
4
4
  export declare const SHADOW_PRESET: {
5
5
  readonly "2xs": "0 1px rgb(0 0 0 / 0.05)";
6
6
  readonly xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
@@ -11,25 +11,25 @@ export declare const SHADOW_PRESET: {
11
11
  readonly "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)";
12
12
  };
13
13
  /**
14
- * **実行時に `<style id="love3-tuning">` へ差し込む CSS。** 既定どおりなら空文字(差し込まない)。
14
+ * **The CSS injected into `<style id="love3-tuning">` at runtime.** An empty string when everything is at the defaults (nothing is injected).
15
15
  *
16
- * love3 の生成 CSS と同じ形(`:root` がライト・`.dark` がダーク)で、後から読み込んで上書きする。
17
- * - 変えた色は、**ライトとダークの両方を書く**。生成 CSS は `:root` の後に `.dark` が来るので、ライトだけを上書きすると、
18
- * 後ろに置いた `:root` が生成の `.dark` に勝ってダークまで潰れる。`.dark` にも実効値を書いて、ダークは別に守る
19
- * - セマンティックの参照・角丸・書体・本文サイズは `:root` だけ(生成の `.dark` は色のトークンしか再定義しない)
20
- * - 角丸(`--radius-control` / `--radius-surface`)は Tailwind の `@theme` の変数だが実行時は `:root` の変数として効く。
21
- * 影は Tailwind がクラスに畳み込む(`.shadow-md { --tw-shadow: … }`)ので、クラスごとに `--tw-shadow` を上書きする
16
+ * It has the same shape as the generated CSS of love3 (`:root` for light, `.dark` for dark), and is loaded later to override it.
17
+ * - For a changed color, **write both light and dark**. In the generated CSS `.dark` comes after `:root`, so if only light were overridden,
18
+ * the `:root` placed later would beat the generated `.dark` and flatten dark mode too. The effective value is also written to `.dark` to protect dark separately
19
+ * - Semantic references, radius, typeface, and body size go only in `:root` (the generated `.dark` redefines only color tokens)
20
+ * - The radius (`--radius-control` / `--radius-surface`) is a variable of Tailwind's `@theme`, but at runtime it takes effect as a `:root` variable.
21
+ * Tailwind folds shadows into classes (`.shadow-md { --tw-shadow: … }`), so `--tw-shadow` is overridden per class
22
22
  */
23
23
  export declare function toRuntimeCss(tuning: Tuning, catalog: TuningCatalog): string;
24
24
  /**
25
- * **コピー用の CSS。** `styles.gen.css` と同じ書式で、既定との差分だけ(`:root` / `.dark` / `@theme`)。
26
- * `@theme` は Tailwind のビルド時の変数(角丸・影・本文サイズ)で、`styles.gen.css` では `definition.ts` の `theme` から出る。
27
- * 実行時に効かせる CSS(`toRuntimeCss`)とは別物(そちらは `@theme` を使えない)。
25
+ * **The CSS for copying.** The same format as `styles.gen.css`, with only the difference from the defaults (`:root` / `.dark` / `@theme`).
26
+ * `@theme` holds Tailwind build-time variables (radius, shadow, body size), which `styles.gen.css` emits from the `theme` in `definition.ts`.
27
+ * It is separate from the CSS applied at runtime (`toRuntimeCss`; that one cannot use `@theme`).
28
28
  */
29
29
  export declare function toExportCss(tuning: Tuning, catalog: TuningCatalog): string;
30
30
  /**
31
- * **`definition.ts` に取り込むための差分。** SSOT のトークンの行(`{ name, value, dark }`)と、`theme` の行の形で、
32
- * 変えた項目だけを出す。名前は変えず、値を差し替える(トークンの直し方)。取り込んだら `bun run generate`。
31
+ * **The diff to bring into `definition.ts`.** In the shape of the SSOT token lines (`{ name, value, dark }`) and the `theme` lines,
32
+ * it outputs only the changed items. Names stay the same and only values are swapped (how to edit tokens). Run `bun run generate` after bringing it in.
33
33
  */
34
34
  export declare function toDefinitionDiff(tuning: Tuning, catalog: TuningCatalog): string;
35
35
  //#endregion
@@ -2,7 +2,7 @@ import { FONT_KEYS, FONT_TOKEN, RADIUS_ROLES } from "./types.js";
2
2
  import { bodyLineHeight, colorValue, normalize } from "./model.js";
3
3
 
4
4
  //#region src/tuning/css.ts
5
- /** 影の preset(Tailwind の既定の影)。love3 の既定は `--shadow-color` を使う淡い影(`definition.ts` の `theme`)。 */
5
+ /** The shadow preset (Tailwind's default shadows). The love3 default is a soft shadow using `--shadow-color` (the `theme` in `definition.ts`). */
6
6
  const SHADOW_PRESET = {
7
7
  "2xs": "0 1px rgb(0 0 0 / 0.05)",
8
8
  xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
@@ -12,7 +12,7 @@ const SHADOW_PRESET = {
12
12
  xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
13
13
  "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)"
14
14
  };
15
- /** 影を消す preset(`SHADOW_PRESET` と同じ段)。 */
15
+ /** The preset that removes shadows (the same steps as `SHADOW_PRESET`). */
16
16
  const SHADOW_NONE = {
17
17
  "2xs": "none",
18
18
  xs: "none",
@@ -22,12 +22,12 @@ const SHADOW_NONE = {
22
22
  xl: "none",
23
23
  "2xl": "none"
24
24
  };
25
- /** 調整で差し替える影の値。既定(`default`)は差し替えない。 */
25
+ /** The shadow values a tuning swaps in. The default (`default`) is not swapped. */
26
26
  function shadowValues(n) {
27
27
  if (n.shadow === "default") return [];
28
28
  return Object.entries(n.shadow === "none" ? SHADOW_NONE : SHADOW_PRESET);
29
29
  }
30
- /** 変えた色のトークン名(ライト・ダークのどちらかで変えたもの)。定義の順。 */
30
+ /** The names of the color tokens that were changed (in either light or dark), in definition order. */
31
31
  function touchedColors(n, catalog) {
32
32
  return catalog.colors.map((color) => color.name).filter((name) => n.tokens.light[name] !== void 0 || n.tokens.dark[name] !== void 0);
33
33
  }
@@ -37,7 +37,7 @@ function decl(name, value) {
37
37
  function block(selector, lines) {
38
38
  return lines.length === 0 ? "" : `${selector} {\n${lines.join("\n")}\n}`;
39
39
  }
40
- /** 既定と違う役割(`normalize` 済みなので、`radius` に残っているのが差分)。 */
40
+ /** The roles that differ from the defaults (already `normalize`d, so what remains in `radius` is the difference). */
41
41
  function radiusRoles(n) {
42
42
  return RADIUS_ROLES.flatMap((role) => {
43
43
  const px = n.radius[role];
@@ -45,14 +45,14 @@ function radiusRoles(n) {
45
45
  });
46
46
  }
47
47
  /**
48
- * **実行時に `<style id="love3-tuning">` へ差し込む CSS。** 既定どおりなら空文字(差し込まない)。
48
+ * **The CSS injected into `<style id="love3-tuning">` at runtime.** An empty string when everything is at the defaults (nothing is injected).
49
49
  *
50
- * love3 の生成 CSS と同じ形(`:root` がライト・`.dark` がダーク)で、後から読み込んで上書きする。
51
- * - 変えた色は、**ライトとダークの両方を書く**。生成 CSS は `:root` の後に `.dark` が来るので、ライトだけを上書きすると、
52
- * 後ろに置いた `:root` が生成の `.dark` に勝ってダークまで潰れる。`.dark` にも実効値を書いて、ダークは別に守る
53
- * - セマンティックの参照・角丸・書体・本文サイズは `:root` だけ(生成の `.dark` は色のトークンしか再定義しない)
54
- * - 角丸(`--radius-control` / `--radius-surface`)は Tailwind の `@theme` の変数だが実行時は `:root` の変数として効く。
55
- * 影は Tailwind がクラスに畳み込む(`.shadow-md { --tw-shadow: … }`)ので、クラスごとに `--tw-shadow` を上書きする
50
+ * It has the same shape as the generated CSS of love3 (`:root` for light, `.dark` for dark), and is loaded later to override it.
51
+ * - For a changed color, **write both light and dark**. In the generated CSS `.dark` comes after `:root`, so if only light were overridden,
52
+ * the `:root` placed later would beat the generated `.dark` and flatten dark mode too. The effective value is also written to `.dark` to protect dark separately
53
+ * - Semantic references, radius, typeface, and body size go only in `:root` (the generated `.dark` redefines only color tokens)
54
+ * - The radius (`--radius-control` / `--radius-surface`) is a variable of Tailwind's `@theme`, but at runtime it takes effect as a `:root` variable.
55
+ * Tailwind folds shadows into classes (`.shadow-md { --tw-shadow: … }`), so `--tw-shadow` is overridden per class
56
56
  */
57
57
  function toRuntimeCss(tuning, catalog) {
58
58
  const n = normalize(tuning, catalog);
@@ -78,9 +78,9 @@ function toRuntimeCss(tuning, catalog) {
78
78
  return parts.filter((part) => part !== "").join("\n");
79
79
  }
80
80
  /**
81
- * **コピー用の CSS。** `styles.gen.css` と同じ書式で、既定との差分だけ(`:root` / `.dark` / `@theme`)。
82
- * `@theme` は Tailwind のビルド時の変数(角丸・影・本文サイズ)で、`styles.gen.css` では `definition.ts` の `theme` から出る。
83
- * 実行時に効かせる CSS(`toRuntimeCss`)とは別物(そちらは `@theme` を使えない)。
81
+ * **The CSS for copying.** The same format as `styles.gen.css`, with only the difference from the defaults (`:root` / `.dark` / `@theme`).
82
+ * `@theme` holds Tailwind build-time variables (radius, shadow, body size), which `styles.gen.css` emits from the `theme` in `definition.ts`.
83
+ * It is separate from the CSS applied at runtime (`toRuntimeCss`; that one cannot use `@theme`).
84
84
  */
85
85
  function toExportCss(tuning, catalog) {
86
86
  const n = normalize(tuning, catalog);
@@ -110,8 +110,8 @@ function toExportCss(tuning, catalog) {
110
110
  ].filter((part) => part !== "").join("\n\n");
111
111
  }
112
112
  /**
113
- * **`definition.ts` に取り込むための差分。** SSOT のトークンの行(`{ name, value, dark }`)と、`theme` の行の形で、
114
- * 変えた項目だけを出す。名前は変えず、値を差し替える(トークンの直し方)。取り込んだら `bun run generate`。
113
+ * **The diff to bring into `definition.ts`.** In the shape of the SSOT token lines (`{ name, value, dark }`) and the `theme` lines,
114
+ * it outputs only the changed items. Names stay the same and only values are swapped (how to edit tokens). Run `bun run generate` after bringing it in.
115
115
  */
116
116
  function toDefinitionDiff(tuning, catalog) {
117
117
  const n = normalize(tuning, catalog);
@@ -1,28 +1,28 @@
1
1
  import { FontKey, Mode, RadiusRole, ShadowPreset, Tuning, TuningCatalog } from "./types.js";
2
2
  //#region src/tuning/model.d.ts
3
- /** 色のトークンを実際に持つモード。ブランド色は共通なので、ダークの指定は `light` に寄せる。 */
3
+ /** The mode that actually holds a color token. Brand colors are common to both, so a dark specification is folded into `light`. */
4
4
  export declare function modeOf(catalog: TuningCatalog, name: string, mode: Mode): Mode;
5
- /** 既定のフォント値。 */
5
+ /** The default font value. */
6
6
  export declare function defaultFont(catalog: TuningCatalog, key: FontKey): string;
7
- /** 役割ごとの角丸(px)。指定が無ければ既定(control 6・surface 10)。 */
7
+ /** The radius (px) per role. Falls back to the default (control 6, surface 10) when unspecified. */
8
8
  export declare function radiusPx(tuning: Tuning, catalog: TuningCatalog, role: RadiusRole): number;
9
- /** 本文の行の高さ(px)。サイズに比例させる(既定の 14px / 22px の比)。 */
9
+ /** The body line height (px). Proportional to the size (the ratio of the default 14px / 22px). */
10
10
  export declare function bodyLineHeight(catalog: TuningCatalog, size: number): number;
11
11
  /**
12
- * 既定と同じ値の項目を落として、同じ内容が 1 通りの形になるようにする(保存・エクスポート・比較の前に通す)。
13
- * 色は正規の形(小文字の `#rrggbb`)にそろえる。読めない色は落とさずそのまま残す(検証は `parseTuning` の仕事)。
12
+ * Drops items equal to the defaults so that the same content has a single form (run before saving, exporting, and comparing).
13
+ * Colors are aligned to the canonical form (lowercase `#rrggbb`). Unreadable colors are kept as they are (validation is the job of `parseTuning`).
14
14
  */
15
15
  export declare function normalize(tuning: Tuning, catalog: TuningCatalog): Tuning;
16
- /** 既定と同じ(差分が無い)か。 */
16
+ /** Whether it equals the defaults (has no difference). */
17
17
  export declare function isEmpty(tuning: Tuning, catalog: TuningCatalog): boolean;
18
- /** 既定との差分の数(色・参照先・角丸・書体・影の項目ごとに 1)。 */
18
+ /** The number of differences from the defaults (1 per item of color, reference, radius, typeface, and shadow). */
19
19
  export declare function countChanges(tuning: Tuning, catalog: TuningCatalog): number;
20
20
  /**
21
- * トークンの実値。**参照(`var()`)をたどる**: セマンティックトークンは参照先(上書きがあればそれ、無ければ既定)の実値になる。
22
- * 参照先のランプを調整すれば、それを指すセマンティックトークンも変わる(実行時の CSS と同じ解決)。
21
+ * The actual value of a token. **It follows references (`var()`)**: a semantic token takes the actual value of its target (the override if there is one, the default otherwise).
22
+ * If you tune the ramp it refers to, the semantic tokens pointing at it change too (resolved the same way as the runtime CSS).
23
23
  */
24
24
  export declare function colorValue(tuning: Tuning, catalog: TuningCatalog, mode: Mode, name: string): string;
25
- /** 全トークン(色・書体・調整した角丸)の実値の表。調整を重ねた後の値で、`tokens` と同じ形。 */
25
+ /** A table of the actual values of all tokens (color, typeface, tuned radius). The values after the tuning is applied, in the same shape as `tokens`. */
26
26
  export declare function effectiveTokens(tuning: Tuning, catalog: TuningCatalog): Record<Mode, Record<string, string>>;
27
27
  export declare function withColor(tuning: Tuning, catalog: TuningCatalog, mode: Mode, name: string, value: string | undefined): Tuning;
28
28
  export declare function withSemantic(tuning: Tuning, name: string, ref: string | undefined): Tuning;