@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,17 +1,17 @@
1
1
  //#region src/native/once/snackbar.d.ts
2
2
  export type SnackbarProps = {
3
- /** 上端から出す(既定)か下端から出すか。 */
3
+ /** Whether toasts appear from the top edge (default) or the bottom edge. */
4
4
  position?: "top" | "bottom";
5
- /** 各トーストの閉じるボタンの読み上げ名(既定は「閉じる」)。 */
5
+ /** Spoken name of each toast's close button (default "閉じる", i.e. "Close"). */
6
6
  closeLabel?: string;
7
7
  };
8
8
  /**
9
- * トーストの置き場。アプリのルートに 1 つだけ置く(親は画面いっぱいの View にする。位置はその親の上端・下端)。
10
- * `@lt-three/web` の once/snackbar(sonner の Toaster)に対応する。
11
- * ルートには `react-native-safe-area-context` の `SafeAreaProvider` が要る(Expo Router は標準で入れる)。
9
+ * The home for toasts. Place exactly one at the app root (make the parent a full-screen View; the position is the top or bottom edge of that parent).
10
+ * Corresponds to the web `once/snackbar` (sonner's Toaster).
11
+ * The root needs `react-native-safe-area-context`'s `SafeAreaProvider` (Expo Router includes it by default).
12
12
  *
13
- * 表示は `lib/snackbar.ts` の `snackbar()` から行う。**置いていないと出ない**(開発時は `snackbar()` が警告を出す)。
14
- * エラーは `role="alert"`、ほかは `role="status"`(支援技術が読み上げる)。iOS は live region が無いので、出たとき `announceForAccessibility` で読ませる。
13
+ * Show toasts with `snackbar()` from `lib/snackbar.ts`. **Nothing appears unless this is mounted** (in development `snackbar()` warns).
14
+ * Errors use `role="alert"` and everything else `role="status"` (read out by assistive technology). iOS has no live region, so `announceForAccessibility` reads it out when a toast appears.
15
15
  */
16
16
  export declare function Snackbar({ position, closeLabel }: SnackbarProps): import("react").JSX.Element | null;
17
17
  //#endregion
@@ -16,12 +16,12 @@ const ICON = {
16
16
  warning: "alert-triangle"
17
17
  };
18
18
  /**
19
- * トーストの置き場。アプリのルートに 1 つだけ置く(親は画面いっぱいの View にする。位置はその親の上端・下端)。
20
- * `@lt-three/web` の once/snackbar(sonner の Toaster)に対応する。
21
- * ルートには `react-native-safe-area-context` の `SafeAreaProvider` が要る(Expo Router は標準で入れる)。
19
+ * The home for toasts. Place exactly one at the app root (make the parent a full-screen View; the position is the top or bottom edge of that parent).
20
+ * Corresponds to the web `once/snackbar` (sonner's Toaster).
21
+ * The root needs `react-native-safe-area-context`'s `SafeAreaProvider` (Expo Router includes it by default).
22
22
  *
23
- * 表示は `lib/snackbar.ts` の `snackbar()` から行う。**置いていないと出ない**(開発時は `snackbar()` が警告を出す)。
24
- * エラーは `role="alert"`、ほかは `role="status"`(支援技術が読み上げる)。iOS は live region が無いので、出たとき `announceForAccessibility` で読ませる。
23
+ * Show toasts with `snackbar()` from `lib/snackbar.ts`. **Nothing appears unless this is mounted** (in development `snackbar()` warns).
24
+ * Errors use `role="alert"` and everything else `role="status"` (read out by assistive technology). iOS has no live region, so `announceForAccessibility` reads it out when a toast appears.
25
25
  */
26
26
  function Snackbar({ position = "top", closeLabel = CLOSE_LABEL }) {
27
27
  const items = snackbarStore.use();
@@ -1,14 +1,14 @@
1
1
  /*
2
- * love3 の native 用スタイル(`@lt-three/love3/native/styles.css`)。**Metro(実機)の CSS の入口**。
3
- * アプリの `global.css` で 1 度だけ import する(NativeWind v5 / react-native-css が Tailwind v4 としてコンパイルする)。
2
+ * love3's native styles (`@lt-three/love3/native/styles.css`). **The CSS entry point for Metro (real devices)**.
3
+ * Import it exactly once in the app's `global.css` (NativeWind v5 / react-native-css compiles it as Tailwind v4).
4
4
  *
5
5
  * @import "@lt-three/love3/native/styles.css";
6
6
  *
7
- * **`native/web/styles.css` とは別物。** あちらは preview・vitest が react-native-web で描くときの入口
8
- * (web の Tailwind に乗るので `nativewind/theme` も要らず、ダークは `<html class="dark">`)。実機では使わない。
7
+ * **Not the same as `native/web/styles.css`.** That one is the entry point used when preview and vitest draw with react-native-web
8
+ * (it rides on web Tailwind, so `nativewind/theme` is not needed, and dark is `<html class="dark">`). It is not used on real devices.
9
9
  *
10
- * 中身は、Tailwind v4 の本体・NativeWind のテーマ・トークン(`@lt-three/love3/styles.css`)・部品のクラスの検出。
11
- * トークンの値は `src/tokens/definition.ts`(SSOT)が持つ。ここにはトークンを書かない。
10
+ * Contents: the Tailwind v4 core, the NativeWind theme, the tokens (`@lt-three/love3/styles.css`), and detection of component classes.
11
+ * Token values live in `src/tokens/definition.ts` (the single source of truth). No tokens are written here.
12
12
  */
13
13
  @import "tailwindcss/theme.css" layer(theme);
14
14
  @import "tailwindcss/preflight.css" layer(base);
@@ -16,31 +16,31 @@
16
16
 
17
17
  @import "nativewind/theme";
18
18
 
19
- /* トークン本体(@theme・ライト・ダーク)。生成物なので、値を変えるときは definition.ts を直す */
19
+ /* The token body (@theme, light, dark). It is generated, so to change values, edit definition.ts */
20
20
  @import "@lt-three/love3/styles.css";
21
21
 
22
22
  /*
23
- * love3 の native の部品が使う Tailwind のクラスを拾う。node_modules(workspace の symlink 越し)は
24
- * 自動検出の対象外なので、ここで明示する。`@source` のパスは、この CSS ファイルの位置が基準。
25
- * 公開物(`dist/`)では部品が `*.js` になるので、`tsx` と `js` の両方を拾う(同じファイルを src と dist の両方に置く)。
26
- * `web/` は react-native-web 用の補助(クラスを持たない)なので除く。
23
+ * Pick up the Tailwind classes used by love3's native components. node_modules (through the workspace symlink) is
24
+ * outside automatic detection, so it is listed explicitly here. The `@source` paths are relative to this CSS file's location.
25
+ * In the published package (`dist/`) components are `*.js`, so both `tsx` and `js` are picked up (the same files exist in both src and dist).
26
+ * `web/` is a helper for react-native-web (it has no classes), so it is excluded.
27
27
  */
28
28
  @source "./**/*.{tsx,js}";
29
29
  @source not "./**/*.test.tsx";
30
30
  @source not "./web/**";
31
31
 
32
32
  /*
33
- * native の `dark:` は **クラスではなく OS の配色設定**で解決する。
33
+ * On native, `dark:` is resolved **by the OS color scheme setting, not by a class**.
34
34
  *
35
- * `@lt-three/love3/styles.css` の既定は `&:is(.dark *)`(web の `<html class="dark">` 前提)。
36
- * これを native でも使うと、`dark:` を持つ規則の祖先セレクタとして `.dark` が現れるため
37
- * react-native-css が `.dark` の付いたビューを **container** として扱い、
38
- * hover/active/focus の追跡ハンドラを載せる。すると**そのビューの子孫にある
39
- * ScrollView が pan を受け取れなくなり、アプリ全体がスクロール不能になる**
40
- * (タップは通るので気づきにくい。実機で確認)。
35
+ * The default of `@lt-three/love3/styles.css` is `&:is(.dark *)` (it assumes web's `<html class="dark">`).
36
+ * Using that on native too would make `.dark` appear as an ancestor selector of rules that have `dark:`,
37
+ * so react-native-css would treat a view with `.dark` as a **container**
38
+ * and attach hover/active/focus tracking handlers. Then **a ScrollView among that view's descendants
39
+ * can no longer receive pan, and the whole app becomes unscrollable**
40
+ * (taps still go through, so it is easy to miss; confirmed on a real device).
41
41
  *
42
- * OS の配色は `Appearance.setColorScheme()` で切り替えられる(`ThemeRoot` がやっている)ので、
43
- * アプリ内のテーマ設定はこれまで通り効く。`.dark` は**変数を配るだけ**のクラスに戻る。
44
- * `lib/tokens-check.ts`(`tokens.test.ts`)が、container を作るクラスが無いことを守る。
42
+ * The OS color scheme can be switched with `Appearance.setColorScheme()` (`ThemeRoot` does this), so
43
+ * the app's in-app theme setting keeps working as before. `.dark` goes back to being a class that **only distributes variables**.
44
+ * `lib/tokens-check.ts` (`tokens.test.ts`) guards that no class creates a container.
45
45
  */
46
46
  @custom-variant dark (@media (prefers-color-scheme: dark));
@@ -1,70 +1,70 @@
1
1
  //#region src/shared/analytics.d.ts
2
2
  export type LinePoint = {
3
- /** 読み出しに出す見出し(日付など)。 */
3
+ /** The heading shown in the readout (a date, for example). */
4
4
  x: string | number;
5
5
  y: number;
6
6
  /**
7
- * 横位置に使う値(Unix 秒などの連続量)。
7
+ * The value used for the horizontal position (a continuous quantity such as Unix seconds).
8
8
  *
9
- * **複数系列を重ねるときは必ず入れる。** 省略すると並び順で等間隔に置くので、
10
- * 刻みの違う系列(日次の残高と不定間隔のエクイティ)を重ねたときに
11
- * 同じ横位置が別の時刻を指してしまう。
9
+ * **Always set it when overlaying multiple series.** When omitted, points are spaced evenly by order,
10
+ * so when series with different intervals (a daily balance and irregularly spaced equity) are overlaid,
11
+ * the same horizontal position would point to different times.
12
12
  */
13
13
  t?: number;
14
14
  };
15
- /** 複数系列の折れ線 1 本ぶん。 */
15
+ /** One line of a multi-series line chart. */
16
16
  export type LineSeries = {
17
- /** React の key と系列の識別子。 */
17
+ /** The React key and the identifier of the series. */
18
18
  key: string;
19
- /** 凡例に出す名前。 */
19
+ /** The name shown in the legend. */
20
20
  label: string;
21
21
  points: LinePoint[];
22
- /** 線の色。CSS の色(`var(--chart-1)` などトークンの参照を推奨)。 */
22
+ /** The line color. A CSS color (a token reference such as `var(--chart-1)` is recommended). */
23
23
  color: string;
24
- /** 破線にする(副系列を主系列と見分けるため)。 */
24
+ /** Draw the line dashed (to tell a secondary series from the primary one). */
25
25
  dashed?: boolean;
26
26
  };
27
- /** 折れ線の props のうち、見た目の寸法と読み上げの要約(web と native で共通)。 */
27
+ /** The line chart props for visual dimensions and the spoken summary (shared by web and native). */
28
28
  export type ChartCommonProps = {
29
29
  height?: number;
30
30
  /**
31
- * チャートの要約(読み上げ用。例: 「残高は 1 月 1 日の $1,000 から 7 日の $1,210 へ上がった」)。渡すと `role="img"` の
32
- * 名前になる。**図形(svg)そのものは名前を持たない**ので、値が読めないユーザー(スクリーンリーダー・キーボード)へは
33
- * これで伝える。共有パッケージなので文言は使用側が持つ。
31
+ * A summary of the chart for screen readers (for example: "The balance rose from $1,000 on January 1 to $1,210 on the 7th"). When passed, it becomes the
32
+ * name of `role="img"`. **The graphic (svg) itself has no name**, so this is how the values reach users who cannot read them
33
+ * (screen reader and keyboard users). This is a shared package, so the wording is left to the consumer.
34
34
  */
35
35
  accessibilityLabel?: string;
36
36
  };
37
- /** 単一系列の折れ線(`LineChart`)。 */
37
+ /** A single-series line chart (`LineChart`). */
38
38
  export type LineChartSharedProps = {
39
39
  data: LinePoint[];
40
40
  color?: string;
41
41
  };
42
- /** 複数系列の折れ線(`MultiLineChart`)。 */
42
+ /** A multi-series line chart (`MultiLineChart`). */
43
43
  export type MultiLineChartSharedProps = {
44
44
  series: LineSeries[];
45
- /** 縦軸の目盛りの整形。通貨記号などは使用側が決める。 */
45
+ /** Formats the vertical axis ticks. Currency symbols and the like are decided by the consumer. */
46
46
  formatValue?: (value: number) => string;
47
- /** 全系列が空のときに出す文言。 */
47
+ /** The text shown when every series is empty. */
48
48
  emptyText?: string;
49
49
  };
50
- /** 面付きの単一指標(`MetricCard`)。 */
50
+ /** A single metric on a surface (`MetricCard`). */
51
51
  export type MetricCardSharedProps = {
52
52
  label: string;
53
53
  value: string;
54
54
  subValue?: string;
55
- /** 増減の符号。正なら state-success・負なら state-error で値を塗る(トークンの色。ダークにも追従する)。 */
55
+ /** The sign of the change. The value is colored state-success when positive and state-error when negative (token colors; they follow dark mode too). */
56
56
  trend?: number;
57
57
  className?: string;
58
58
  };
59
- /** 符号で色が変わる数値(`ColoredValue`)。 */
59
+ /** A number whose color changes with its sign (`ColoredValue`). */
60
60
  export interface ColoredValueSharedProps<TValue> {
61
61
  value: TValue;
62
62
  format?: (value: TValue) => string;
63
63
  isPositive?: (value: TValue) => boolean;
64
64
  isNegative?: (value: TValue) => boolean;
65
- /** 増を表すクラス。既定は `text-state-success`(トークン。ダークに追従する)。 */
65
+ /** The class for an increase. Defaults to `text-state-success` (a token; follows dark mode). */
66
66
  positiveColor?: string;
67
- /** 減を表すクラス。既定は `text-state-error`。 */
67
+ /** The class for a decrease. Defaults to `text-state-error`. */
68
68
  negativeColor?: string;
69
69
  className?: string;
70
70
  }
@@ -1,6 +1,6 @@
1
1
  //#region src/shared/button.d.ts
2
2
  export declare const BUTTON_VARIANTS: readonly ["default", "destructive", "outline", "secondary", "ghost", "link", "plate", "<3"];
3
- /** `"<3"` は Less Than Three のブランド色(ピンク塗り)。画面に 1 つだけ置く想定の確定操作用 */
3
+ /** `"<3"` is the Less Than Three brand color (pink fill). Meant for a confirming action, placed only once per screen */
4
4
  export type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
5
5
  export declare const BUTTON_SIZES: readonly ["default", "xs", "sm", "lg", "xl", "icon", "icon-xs"];
6
6
  export type ButtonSize = (typeof BUTTON_SIZES)[number];
@@ -3,13 +3,13 @@ import React from "react";
3
3
  //#region src/shared/form.d.ts
4
4
  export declare const fieldContext: React.Context<AnyFieldApi>, formContext: React.Context<import("@tanstack/react-form").AnyFormApi>, useFormContext: () => import("@tanstack/react-form").ReactFormExtendedApi<Record<string, never>, any, any, any, any, any, any, any, any, any, any, any>, useFieldContext: <TData>() => import("@tanstack/react-form").FieldApi<any, string, TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>;
5
5
  /**
6
- * フィールドの中なら field を、外なら null を返す(`useFieldContext` は外だと投げる)。
7
- * 戻り値は null を含む型にしてある。呼び出し側が `?.` を忘れると tsc が落ちる。
6
+ * Returns the field inside a field and null outside (`useFieldContext` throws outside).
7
+ * The return type includes null, so tsc fails if a caller forgets `?.`.
8
8
  */
9
9
  export declare function useOptionalFieldContext(): AnyFieldApi | null;
10
10
  /**
11
- * フィールド型の入力(`form/*`)が共通で受ける props。値は field context(TanStack Form)が持つので、
12
- * `value` / `onValueChange` は受けない(受けて黙って無視する形にしない)。
11
+ * The props that every field-type input (`form/*`) accepts. The value is held by the field context (TanStack Form),
12
+ * so `value` / `onValueChange` are not accepted (rather than accepting them and silently ignoring them).
13
13
  */
14
14
  export type FieldInputProps = {
15
15
  label?: React.ReactNode;
@@ -21,12 +21,12 @@ export type FieldInputProps = {
21
21
  disabled?: boolean;
22
22
  helpText?: React.ReactNode;
23
23
  debounce?: number;
24
- /** テスト用の data-testid。実際の input 要素にそのまま付与される。 */
24
+ /** A data-testid for tests. It is applied as is to the actual input element. */
25
25
  "data-testid"?: string;
26
26
  };
27
27
  /**
28
- * `FieldInputProps` に、制御モード(`value` / `onValueChange` を渡すと field context を使わない)を足したもの。
29
- * 制御モードを実装している入力(`form/checkbox` `form/switch`)だけが使う。
28
+ * `FieldInputProps` plus a controlled mode (passing `value` / `onValueChange` skips the field context).
29
+ * Used only by inputs that implement the controlled mode (`form/checkbox`, `form/switch`).
30
30
  */
31
31
  export type BaseInputProps<T> = FieldInputProps & ({
32
32
  value: T;
@@ -6,8 +6,8 @@ import { useContext, useState } from "react";
6
6
  //#region src/shared/form.ts
7
7
  const { fieldContext, formContext, useFormContext, useFieldContext } = createFormHookContexts();
8
8
  /**
9
- * フィールドの中なら field を、外なら null を返す(`useFieldContext` は外だと投げる)。
10
- * 戻り値は null を含む型にしてある。呼び出し側が `?.` を忘れると tsc が落ちる。
9
+ * Returns the field inside a field and null outside (`useFieldContext` throws outside).
10
+ * The return type includes null, so tsc fails if a caller forgets `?.`.
11
11
  */
12
12
  function useOptionalFieldContext() {
13
13
  return useContext(fieldContext);
@@ -1,23 +1,23 @@
1
1
  //#region src/tokens/contrast-pairs.d.ts
2
2
  export type ContrastKind = "text" | "ui";
3
- /** 検査する前景 / 背景の組。`text` は本文の 4.5:1、`ui` は大きい文字と UI 部品・図形の 3:1。 */
3
+ /** The foreground / background pairs to check. `text` is 4.5:1 for body text; `ui` is 3:1 for large text and UI components and graphics. */
4
4
  export declare const CONTRAST_PAIRS: ReadonlyArray<{
5
5
  kind: ContrastKind;
6
6
  fg: string;
7
7
  bg: string;
8
8
  }>;
9
9
  /**
10
- * 基準を満たさないと分かっていて、理由があって許している組。キーは `<モード>:<前景>/<背景>`。
10
+ * Pairs that are known not to meet the criterion and are allowed for a stated reason. The key is `<mode>:<foreground>/<background>`.
11
11
  *
12
- * **ここに足すときは理由を書く。** 例外の組は「まだ基準を下回っている」ことも検査する
13
- * (満たすようになったら、例外から外すよう落ちる。一覧が実態から離れないようにする)。
14
- * 無効(disabled)の `ink-300` は WCAG が対象外にしているので、そもそも組に入れていない。
12
+ * **Write a reason when adding here.** Exception pairs are also checked to still be below the criterion
13
+ * (once they meet it, the test fails and asks for them to be removed from the exceptions, so the list does not drift from reality).
14
+ * A disabled `ink-300` is out of scope in WCAG, so it is not in the pairs at all.
15
15
  */
16
16
  export declare const KNOWN_CONTRAST_EXCEPTIONS: Readonly<Record<string, string>>;
17
17
  /**
18
- * 淡い塗り(`bg-state-error/5` など、state の色を `alpha` だけ面に混ぜた塗り)の上の、同じ state の文字(12px の本文の 4.5:1)。
19
- * 半透明の合成値は `CONTRAST_PAIRS`(トークン同士の組)に入らないので、面の色に塗りを合成してから比を計算する(contrast.test.ts)。
20
- * `usedIn` のファイルが `tintClass` を使っていることもテストが見る(alpha を変えるときは、ここと部品を一緒に直す)。
18
+ * Text of the same state on a light fill (such as `bg-state-error/5`, a fill that mixes the state color into the surface by `alpha` only), at 4.5:1 for 12px body text.
19
+ * A translucent composite does not fit in `CONTRAST_PAIRS` (pairs of tokens), so the fill is composited onto the surface color before the ratio is computed (contrast.test.ts).
20
+ * The test also checks that the files in `usedIn` use `tintClass` (when you change alpha, fix this and the components together).
21
21
  */
22
22
  export declare const TINTED_STATE_PAIRS: ReadonlyArray<{
23
23
  token: string;
@@ -25,6 +25,6 @@ export declare const TINTED_STATE_PAIRS: ReadonlyArray<{
25
25
  tintClass: string;
26
26
  usedIn: readonly string[];
27
27
  }>;
28
- /** 淡い塗りを置く面(背景の 4 階層と wash)。 */
28
+ /** The surfaces a light fill is placed on (the 4 background levels and wash). */
29
29
  export declare const TINT_SURFACES: readonly ["frame", "paper", "raised", "overlay", "wash"];
30
30
  //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/tokens/contrast-pairs.ts
2
- /** 検査する前景 / 背景の組。`text` は本文の 4.5:1、`ui` は大きい文字と UI 部品・図形の 3:1。 */
2
+ /** The foreground / background pairs to check. `text` is 4.5:1 for body text; `ui` is 3:1 for large text and UI components and graphics. */
3
3
  const CONTRAST_PAIRS = [
4
4
  {
5
5
  kind: "text",
@@ -363,23 +363,23 @@ const CONTRAST_PAIRS = [
363
363
  }
364
364
  ];
365
365
  /**
366
- * 基準を満たさないと分かっていて、理由があって許している組。キーは `<モード>:<前景>/<背景>`。
366
+ * Pairs that are known not to meet the criterion and are allowed for a stated reason. The key is `<mode>:<foreground>/<background>`.
367
367
  *
368
- * **ここに足すときは理由を書く。** 例外の組は「まだ基準を下回っている」ことも検査する
369
- * (満たすようになったら、例外から外すよう落ちる。一覧が実態から離れないようにする)。
370
- * 無効(disabled)の `ink-300` は WCAG が対象外にしているので、そもそも組に入れていない。
368
+ * **Write a reason when adding here.** Exception pairs are also checked to still be below the criterion
369
+ * (once they meet it, the test fails and asks for them to be removed from the exceptions, so the list does not drift from reality).
370
+ * A disabled `ink-300` is out of scope in WCAG, so it is not in the pairs at all.
371
371
  */
372
372
  const KNOWN_CONTRAST_EXCEPTIONS = {
373
- "light:border/background": "1px の極薄の枠(#e6e7eb)は面の区切りで、情報は文字と余白・面の明るさの差が持つ。カードや区切り線の輪郭は 3:1 に届かない(1.23:1)。Linear 流の「枠は極めて薄く」を意図した値",
373
+ "light:border/background": "1px の極薄の枠(#e6e7eb)は面の区切りで、情報は文字と余白・面の明るさの差が持つ。カードや区切り線の輪郭は 3:1 に届かない(1.23:1)。「枠は極めて薄く」を意図した値",
374
374
  "dark:border/background": "同上(ダークは 1.24:1)",
375
375
  "light:input/background": "**テキスト入力(Input・Textarea・Select のトリガー)の枠だけ**の例外。枠(line-strong #d5d7dd)は 3:1 に届かない(1.4:1)が、入力欄はラベル・プレースホルダ・フォーカス時のインディゴの枠(4.7:1)でも識別できる。Checkbox・Radio・Switch の枠は、文字を持たず形だけで識別されるので例外にせず line-control(3:1 以上)にした",
376
376
  "dark:input/background": "同上(ダークは 1.54:1)",
377
377
  "light:lt-three/paper": "ブランドのピンク(#ff5c76)は塗りとして使い、必ず黒文字を載せる(7.04:1)。紙の上の単独の図形としては 2.98:1 で 3:1 にわずかに届かない"
378
378
  };
379
379
  /**
380
- * 淡い塗り(`bg-state-error/5` など、state の色を `alpha` だけ面に混ぜた塗り)の上の、同じ state の文字(12px の本文の 4.5:1)。
381
- * 半透明の合成値は `CONTRAST_PAIRS`(トークン同士の組)に入らないので、面の色に塗りを合成してから比を計算する(contrast.test.ts)。
382
- * `usedIn` のファイルが `tintClass` を使っていることもテストが見る(alpha を変えるときは、ここと部品を一緒に直す)。
380
+ * Text of the same state on a light fill (such as `bg-state-error/5`, a fill that mixes the state color into the surface by `alpha` only), at 4.5:1 for 12px body text.
381
+ * A translucent composite does not fit in `CONTRAST_PAIRS` (pairs of tokens), so the fill is composited onto the surface color before the ratio is computed (contrast.test.ts).
382
+ * The test also checks that the files in `usedIn` use `tintClass` (when you change alpha, fix this and the components together).
383
383
  */
384
384
  const TINTED_STATE_PAIRS = [{
385
385
  token: "state-error",
@@ -391,7 +391,7 @@ const TINTED_STATE_PAIRS = [{
391
391
  "../native/atom/badge.tsx"
392
392
  ]
393
393
  }];
394
- /** 淡い塗りを置く面(背景の 4 階層と wash)。 */
394
+ /** The surfaces a light fill is placed on (the 4 background levels and wash). */
395
395
  const TINT_SURFACES = [
396
396
  "frame",
397
397
  "paper",
@@ -1,6 +1,6 @@
1
1
  import { TokenName, TokenValues, tokenNames, tokens } from "./tokens.gen.js";
2
2
  //#region src/tokens/index.d.ts
3
- /** CSS 変数の参照(`var(--ink-500)`)。実値が要るときは `tokens.light[name]` / `tokens.dark[name]`。 */
3
+ /** A CSS variable reference (`var(--ink-500)`). When you need the actual value, use `tokens.light[name]` / `tokens.dark[name]`. */
4
4
  export declare function cssVar(name: TokenName): string;
5
5
  //#endregion
6
6
  export { type TokenName, type TokenValues, tokenNames, tokens };
@@ -1,7 +1,7 @@
1
1
  import { tokenNames, tokens } from "./tokens.gen.js";
2
2
 
3
3
  //#region src/tokens/index.ts
4
- /** CSS 変数の参照(`var(--ink-500)`)。実値が要るときは `tokens.light[name]` / `tokens.dark[name]`。 */
4
+ /** A CSS variable reference (`var(--ink-500)`). When you need the actual value, use `tokens.light[name]` / `tokens.dark[name]`. */
5
5
  function cssVar(name) {
6
6
  return `var(--${name})`;
7
7
  }