melta-app 0.1.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 (311) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +197 -0
  3. package/THIRD_PARTY_LICENSES.md +198 -0
  4. package/lib/module/components/ActionSheet.js +87 -0
  5. package/lib/module/components/ActionSheet.js.map +1 -0
  6. package/lib/module/components/Alert.js +93 -0
  7. package/lib/module/components/Alert.js.map +1 -0
  8. package/lib/module/components/Avatar.js +93 -0
  9. package/lib/module/components/Avatar.js.map +1 -0
  10. package/lib/module/components/BottomSheet.js +69 -0
  11. package/lib/module/components/BottomSheet.js.map +1 -0
  12. package/lib/module/components/Card.js +93 -0
  13. package/lib/module/components/Card.js.map +1 -0
  14. package/lib/module/components/Checkbox.js +115 -0
  15. package/lib/module/components/Checkbox.js.map +1 -0
  16. package/lib/module/components/EmptyState.js +70 -0
  17. package/lib/module/components/EmptyState.js.map +1 -0
  18. package/lib/module/components/Header.js +53 -0
  19. package/lib/module/components/Header.js.map +1 -0
  20. package/lib/module/components/Image.js +67 -0
  21. package/lib/module/components/Image.js.map +1 -0
  22. package/lib/module/components/Modal.js +95 -0
  23. package/lib/module/components/Modal.js.map +1 -0
  24. package/lib/module/components/Progress.js +113 -0
  25. package/lib/module/components/Progress.js.map +1 -0
  26. package/lib/module/components/Radio.js +134 -0
  27. package/lib/module/components/Radio.js.map +1 -0
  28. package/lib/module/components/Screen.js +57 -0
  29. package/lib/module/components/Screen.js.map +1 -0
  30. package/lib/module/components/Skeleton.js +169 -0
  31. package/lib/module/components/Skeleton.js.map +1 -0
  32. package/lib/module/components/Surface.js +49 -0
  33. package/lib/module/components/Surface.js.map +1 -0
  34. package/lib/module/components/TextField.js +84 -0
  35. package/lib/module/components/TextField.js.map +1 -0
  36. package/lib/module/components/Toast.js +105 -0
  37. package/lib/module/components/Toast.js.map +1 -0
  38. package/lib/module/components/Toggle.js +77 -0
  39. package/lib/module/components/Toggle.js.map +1 -0
  40. package/lib/module/components/action-sheet.styles.js +70 -0
  41. package/lib/module/components/action-sheet.styles.js.map +1 -0
  42. package/lib/module/components/alert.styles.js +80 -0
  43. package/lib/module/components/alert.styles.js.map +1 -0
  44. package/lib/module/components/avatar.styles.js +94 -0
  45. package/lib/module/components/avatar.styles.js.map +1 -0
  46. package/lib/module/components/bottom-sheet.styles.js +55 -0
  47. package/lib/module/components/bottom-sheet.styles.js.map +1 -0
  48. package/lib/module/components/card.styles.js +50 -0
  49. package/lib/module/components/card.styles.js.map +1 -0
  50. package/lib/module/components/checkbox.styles.js +55 -0
  51. package/lib/module/components/checkbox.styles.js.map +1 -0
  52. package/lib/module/components/empty-state.styles.js +60 -0
  53. package/lib/module/components/empty-state.styles.js.map +1 -0
  54. package/lib/module/components/header.styles.js +33 -0
  55. package/lib/module/components/header.styles.js.map +1 -0
  56. package/lib/module/components/image.styles.js +37 -0
  57. package/lib/module/components/image.styles.js.map +1 -0
  58. package/lib/module/components/index.js +26 -0
  59. package/lib/module/components/index.js.map +1 -0
  60. package/lib/module/components/modal.styles.js +68 -0
  61. package/lib/module/components/modal.styles.js.map +1 -0
  62. package/lib/module/components/progress.styles.js +55 -0
  63. package/lib/module/components/progress.styles.js.map +1 -0
  64. package/lib/module/components/radio.styles.js +96 -0
  65. package/lib/module/components/radio.styles.js.map +1 -0
  66. package/lib/module/components/screen.styles.js +38 -0
  67. package/lib/module/components/screen.styles.js.map +1 -0
  68. package/lib/module/components/skeleton.styles.js +114 -0
  69. package/lib/module/components/skeleton.styles.js.map +1 -0
  70. package/lib/module/components/surface.styles.js +37 -0
  71. package/lib/module/components/surface.styles.js.map +1 -0
  72. package/lib/module/components/textfield.styles.js +121 -0
  73. package/lib/module/components/textfield.styles.js.map +1 -0
  74. package/lib/module/components/toast.styles.js +81 -0
  75. package/lib/module/components/toast.styles.js.map +1 -0
  76. package/lib/module/components/toggle.styles.js +69 -0
  77. package/lib/module/components/toggle.styles.js.map +1 -0
  78. package/lib/module/contracts/contract-types.js +192 -0
  79. package/lib/module/contracts/contract-types.js.map +1 -0
  80. package/lib/module/icons/Icon.js +57 -0
  81. package/lib/module/icons/Icon.js.map +1 -0
  82. package/lib/module/icons/glyphs.js +257 -0
  83. package/lib/module/icons/glyphs.js.map +1 -0
  84. package/lib/module/icons/icon.styles.js +28 -0
  85. package/lib/module/icons/icon.styles.js.map +1 -0
  86. package/lib/module/icons/index.js +14 -0
  87. package/lib/module/icons/index.js.map +1 -0
  88. package/lib/module/index.js +20 -0
  89. package/lib/module/index.js.map +1 -0
  90. package/lib/module/package.json +1 -0
  91. package/lib/module/primitives/Button.js +105 -0
  92. package/lib/module/primitives/Button.js.map +1 -0
  93. package/lib/module/primitives/Metric.js +68 -0
  94. package/lib/module/primitives/Metric.js.map +1 -0
  95. package/lib/module/primitives/Row.js +43 -0
  96. package/lib/module/primitives/Row.js.map +1 -0
  97. package/lib/module/primitives/Stack.js +39 -0
  98. package/lib/module/primitives/Stack.js.map +1 -0
  99. package/lib/module/primitives/Tag.js +160 -0
  100. package/lib/module/primitives/Tag.js.map +1 -0
  101. package/lib/module/primitives/Text.js +54 -0
  102. package/lib/module/primitives/Text.js.map +1 -0
  103. package/lib/module/primitives/_internal/focus-ring.js +57 -0
  104. package/lib/module/primitives/_internal/focus-ring.js.map +1 -0
  105. package/lib/module/primitives/button.styles.js +88 -0
  106. package/lib/module/primitives/button.styles.js.map +1 -0
  107. package/lib/module/primitives/index.js +11 -0
  108. package/lib/module/primitives/index.js.map +1 -0
  109. package/lib/module/primitives/metric.styles.js +54 -0
  110. package/lib/module/primitives/metric.styles.js.map +1 -0
  111. package/lib/module/primitives/row.styles.js +53 -0
  112. package/lib/module/primitives/row.styles.js.map +1 -0
  113. package/lib/module/primitives/stack.styles.js +37 -0
  114. package/lib/module/primitives/stack.styles.js.map +1 -0
  115. package/lib/module/primitives/tag.styles.js +56 -0
  116. package/lib/module/primitives/tag.styles.js.map +1 -0
  117. package/lib/module/primitives/text.styles.js +33 -0
  118. package/lib/module/primitives/text.styles.js.map +1 -0
  119. package/lib/module/theme/ThemeProvider.js +41 -0
  120. package/lib/module/theme/ThemeProvider.js.map +1 -0
  121. package/lib/module/theme/index.js +19 -0
  122. package/lib/module/theme/index.js.map +1 -0
  123. package/lib/module/theme/native-theme.js +201 -0
  124. package/lib/module/theme/native-theme.js.map +1 -0
  125. package/lib/module/theme/types.js +4 -0
  126. package/lib/module/theme/types.js.map +1 -0
  127. package/lib/typescript/package.json +1 -0
  128. package/lib/typescript/src/components/ActionSheet.d.ts +45 -0
  129. package/lib/typescript/src/components/ActionSheet.d.ts.map +1 -0
  130. package/lib/typescript/src/components/Alert.d.ts +43 -0
  131. package/lib/typescript/src/components/Alert.d.ts.map +1 -0
  132. package/lib/typescript/src/components/Avatar.d.ts +45 -0
  133. package/lib/typescript/src/components/Avatar.d.ts.map +1 -0
  134. package/lib/typescript/src/components/BottomSheet.d.ts +36 -0
  135. package/lib/typescript/src/components/BottomSheet.d.ts.map +1 -0
  136. package/lib/typescript/src/components/Card.d.ts +46 -0
  137. package/lib/typescript/src/components/Card.d.ts.map +1 -0
  138. package/lib/typescript/src/components/Checkbox.d.ts +40 -0
  139. package/lib/typescript/src/components/Checkbox.d.ts.map +1 -0
  140. package/lib/typescript/src/components/EmptyState.d.ts +36 -0
  141. package/lib/typescript/src/components/EmptyState.d.ts.map +1 -0
  142. package/lib/typescript/src/components/Header.d.ts +34 -0
  143. package/lib/typescript/src/components/Header.d.ts.map +1 -0
  144. package/lib/typescript/src/components/Image.d.ts +41 -0
  145. package/lib/typescript/src/components/Image.d.ts.map +1 -0
  146. package/lib/typescript/src/components/Modal.d.ts +46 -0
  147. package/lib/typescript/src/components/Modal.d.ts.map +1 -0
  148. package/lib/typescript/src/components/Progress.d.ts +39 -0
  149. package/lib/typescript/src/components/Progress.d.ts.map +1 -0
  150. package/lib/typescript/src/components/Radio.d.ts +52 -0
  151. package/lib/typescript/src/components/Radio.d.ts.map +1 -0
  152. package/lib/typescript/src/components/Screen.d.ts +42 -0
  153. package/lib/typescript/src/components/Screen.d.ts.map +1 -0
  154. package/lib/typescript/src/components/Skeleton.d.ts +37 -0
  155. package/lib/typescript/src/components/Skeleton.d.ts.map +1 -0
  156. package/lib/typescript/src/components/Surface.d.ts +31 -0
  157. package/lib/typescript/src/components/Surface.d.ts.map +1 -0
  158. package/lib/typescript/src/components/TextField.d.ts +45 -0
  159. package/lib/typescript/src/components/TextField.d.ts.map +1 -0
  160. package/lib/typescript/src/components/Toast.d.ts +45 -0
  161. package/lib/typescript/src/components/Toast.d.ts.map +1 -0
  162. package/lib/typescript/src/components/Toggle.d.ts +39 -0
  163. package/lib/typescript/src/components/Toggle.d.ts.map +1 -0
  164. package/lib/typescript/src/components/action-sheet.styles.d.ts +65 -0
  165. package/lib/typescript/src/components/action-sheet.styles.d.ts.map +1 -0
  166. package/lib/typescript/src/components/alert.styles.d.ts +61 -0
  167. package/lib/typescript/src/components/alert.styles.d.ts.map +1 -0
  168. package/lib/typescript/src/components/avatar.styles.d.ts +60 -0
  169. package/lib/typescript/src/components/avatar.styles.d.ts.map +1 -0
  170. package/lib/typescript/src/components/bottom-sheet.styles.d.ts +50 -0
  171. package/lib/typescript/src/components/bottom-sheet.styles.d.ts.map +1 -0
  172. package/lib/typescript/src/components/card.styles.d.ts +27 -0
  173. package/lib/typescript/src/components/card.styles.d.ts.map +1 -0
  174. package/lib/typescript/src/components/checkbox.styles.d.ts +55 -0
  175. package/lib/typescript/src/components/checkbox.styles.d.ts.map +1 -0
  176. package/lib/typescript/src/components/empty-state.styles.d.ts +58 -0
  177. package/lib/typescript/src/components/empty-state.styles.d.ts.map +1 -0
  178. package/lib/typescript/src/components/header.styles.d.ts +30 -0
  179. package/lib/typescript/src/components/header.styles.d.ts.map +1 -0
  180. package/lib/typescript/src/components/image.styles.d.ts +28 -0
  181. package/lib/typescript/src/components/image.styles.d.ts.map +1 -0
  182. package/lib/typescript/src/components/index.d.ts +23 -0
  183. package/lib/typescript/src/components/index.d.ts.map +1 -0
  184. package/lib/typescript/src/components/modal.styles.d.ts +66 -0
  185. package/lib/typescript/src/components/modal.styles.d.ts.map +1 -0
  186. package/lib/typescript/src/components/progress.styles.d.ts +44 -0
  187. package/lib/typescript/src/components/progress.styles.d.ts.map +1 -0
  188. package/lib/typescript/src/components/radio.styles.d.ts +91 -0
  189. package/lib/typescript/src/components/radio.styles.d.ts.map +1 -0
  190. package/lib/typescript/src/components/screen.styles.d.ts +34 -0
  191. package/lib/typescript/src/components/screen.styles.d.ts.map +1 -0
  192. package/lib/typescript/src/components/skeleton.styles.d.ts +105 -0
  193. package/lib/typescript/src/components/skeleton.styles.d.ts.map +1 -0
  194. package/lib/typescript/src/components/surface.styles.d.ts +31 -0
  195. package/lib/typescript/src/components/surface.styles.d.ts.map +1 -0
  196. package/lib/typescript/src/components/textfield.styles.d.ts +75 -0
  197. package/lib/typescript/src/components/textfield.styles.d.ts.map +1 -0
  198. package/lib/typescript/src/components/toast.styles.d.ts +62 -0
  199. package/lib/typescript/src/components/toast.styles.d.ts.map +1 -0
  200. package/lib/typescript/src/components/toggle.styles.d.ts +53 -0
  201. package/lib/typescript/src/components/toggle.styles.d.ts.map +1 -0
  202. package/lib/typescript/src/contracts/contract-types.d.ts +193 -0
  203. package/lib/typescript/src/contracts/contract-types.d.ts.map +1 -0
  204. package/lib/typescript/src/icons/Icon.d.ts +40 -0
  205. package/lib/typescript/src/icons/Icon.d.ts.map +1 -0
  206. package/lib/typescript/src/icons/glyphs.d.ts +259 -0
  207. package/lib/typescript/src/icons/glyphs.d.ts.map +1 -0
  208. package/lib/typescript/src/icons/icon.styles.d.ts +20 -0
  209. package/lib/typescript/src/icons/icon.styles.d.ts.map +1 -0
  210. package/lib/typescript/src/icons/index.d.ts +12 -0
  211. package/lib/typescript/src/icons/index.d.ts.map +1 -0
  212. package/lib/typescript/src/index.d.ts +12 -0
  213. package/lib/typescript/src/index.d.ts.map +1 -0
  214. package/lib/typescript/src/primitives/Button.d.ts +48 -0
  215. package/lib/typescript/src/primitives/Button.d.ts.map +1 -0
  216. package/lib/typescript/src/primitives/Metric.d.ts +38 -0
  217. package/lib/typescript/src/primitives/Metric.d.ts.map +1 -0
  218. package/lib/typescript/src/primitives/Row.d.ts +37 -0
  219. package/lib/typescript/src/primitives/Row.d.ts.map +1 -0
  220. package/lib/typescript/src/primitives/Stack.d.ts +33 -0
  221. package/lib/typescript/src/primitives/Stack.d.ts.map +1 -0
  222. package/lib/typescript/src/primitives/Tag.d.ts +43 -0
  223. package/lib/typescript/src/primitives/Tag.d.ts.map +1 -0
  224. package/lib/typescript/src/primitives/Text.d.ts +45 -0
  225. package/lib/typescript/src/primitives/Text.d.ts.map +1 -0
  226. package/lib/typescript/src/primitives/_internal/focus-ring.d.ts +31 -0
  227. package/lib/typescript/src/primitives/_internal/focus-ring.d.ts.map +1 -0
  228. package/lib/typescript/src/primitives/button.styles.d.ts +29 -0
  229. package/lib/typescript/src/primitives/button.styles.d.ts.map +1 -0
  230. package/lib/typescript/src/primitives/index.d.ts +8 -0
  231. package/lib/typescript/src/primitives/index.d.ts.map +1 -0
  232. package/lib/typescript/src/primitives/metric.styles.d.ts +43 -0
  233. package/lib/typescript/src/primitives/metric.styles.d.ts.map +1 -0
  234. package/lib/typescript/src/primitives/row.styles.d.ts +50 -0
  235. package/lib/typescript/src/primitives/row.styles.d.ts.map +1 -0
  236. package/lib/typescript/src/primitives/stack.styles.d.ts +34 -0
  237. package/lib/typescript/src/primitives/stack.styles.d.ts.map +1 -0
  238. package/lib/typescript/src/primitives/tag.styles.d.ts +32 -0
  239. package/lib/typescript/src/primitives/tag.styles.d.ts.map +1 -0
  240. package/lib/typescript/src/primitives/text.styles.d.ts +26 -0
  241. package/lib/typescript/src/primitives/text.styles.d.ts.map +1 -0
  242. package/lib/typescript/src/theme/ThemeProvider.d.ts +32 -0
  243. package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -0
  244. package/lib/typescript/src/theme/index.d.ts +15 -0
  245. package/lib/typescript/src/theme/index.d.ts.map +1 -0
  246. package/lib/typescript/src/theme/native-theme.d.ts +3 -0
  247. package/lib/typescript/src/theme/native-theme.d.ts.map +1 -0
  248. package/lib/typescript/src/theme/types.d.ts +121 -0
  249. package/lib/typescript/src/theme/types.d.ts.map +1 -0
  250. package/package.json +120 -0
  251. package/src/components/ActionSheet.tsx +112 -0
  252. package/src/components/Alert.tsx +84 -0
  253. package/src/components/Avatar.tsx +110 -0
  254. package/src/components/BottomSheet.tsx +81 -0
  255. package/src/components/Card.tsx +102 -0
  256. package/src/components/Checkbox.tsx +107 -0
  257. package/src/components/EmptyState.tsx +64 -0
  258. package/src/components/Header.tsx +51 -0
  259. package/src/components/Image.tsx +89 -0
  260. package/src/components/Modal.tsx +113 -0
  261. package/src/components/Progress.tsx +124 -0
  262. package/src/components/Radio.tsx +151 -0
  263. package/src/components/Screen.tsx +62 -0
  264. package/src/components/Skeleton.tsx +154 -0
  265. package/src/components/Surface.tsx +37 -0
  266. package/src/components/TextField.tsx +102 -0
  267. package/src/components/Toast.tsx +103 -0
  268. package/src/components/Toggle.tsx +94 -0
  269. package/src/components/action-sheet.styles.ts +102 -0
  270. package/src/components/alert.styles.ts +115 -0
  271. package/src/components/avatar.styles.ts +110 -0
  272. package/src/components/bottom-sheet.styles.ts +78 -0
  273. package/src/components/card.styles.ts +56 -0
  274. package/src/components/checkbox.styles.ts +83 -0
  275. package/src/components/empty-state.styles.ts +98 -0
  276. package/src/components/header.styles.ts +44 -0
  277. package/src/components/image.styles.ts +36 -0
  278. package/src/components/index.ts +23 -0
  279. package/src/components/modal.styles.ts +106 -0
  280. package/src/components/progress.styles.ts +74 -0
  281. package/src/components/radio.styles.ts +132 -0
  282. package/src/components/screen.styles.ts +44 -0
  283. package/src/components/skeleton.styles.ts +155 -0
  284. package/src/components/surface.styles.ts +50 -0
  285. package/src/components/textfield.styles.ts +135 -0
  286. package/src/components/toast.styles.ts +115 -0
  287. package/src/components/toggle.styles.ts +73 -0
  288. package/src/contracts/contract-types.ts +199 -0
  289. package/src/icons/Icon.tsx +65 -0
  290. package/src/icons/glyphs.ts +54 -0
  291. package/src/icons/icon.styles.ts +37 -0
  292. package/src/icons/index.ts +12 -0
  293. package/src/index.ts +24 -0
  294. package/src/primitives/Button.tsx +114 -0
  295. package/src/primitives/Metric.tsx +67 -0
  296. package/src/primitives/Row.tsx +54 -0
  297. package/src/primitives/Stack.tsx +42 -0
  298. package/src/primitives/Tag.tsx +126 -0
  299. package/src/primitives/Text.tsx +71 -0
  300. package/src/primitives/_internal/focus-ring.tsx +59 -0
  301. package/src/primitives/button.styles.ts +69 -0
  302. package/src/primitives/index.ts +8 -0
  303. package/src/primitives/metric.styles.ts +75 -0
  304. package/src/primitives/row.styles.ts +66 -0
  305. package/src/primitives/stack.styles.ts +47 -0
  306. package/src/primitives/tag.styles.ts +65 -0
  307. package/src/primitives/text.styles.ts +42 -0
  308. package/src/theme/ThemeProvider.tsx +60 -0
  309. package/src/theme/index.ts +18 -0
  310. package/src/theme/native-theme.ts +215 -0
  311. package/src/theme/types.ts +137 -0
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Metric — 数値 + 単位 + ラベルの指標表示 primitive(設計書 §1、意思決定3)。
3
+ * contract: metric(app 先行定義)。ツー活カードの主役(走行距離 / 時間 / 獲得標高 等)。
4
+ *
5
+ * - value は tabular(fontVariant:["tabular-nums"])で桁揃え。Text primitive は fontVariant を
6
+ * 公開しないので、value は RN Text を直接使う。
7
+ * - size(sm/md/lg) は value の fontSize token にマップ(contract の height は想定行高、実 fontSize は
8
+ * pure resolver(metric.styles.ts)で token 解決する。metric.contract intent 参照)。
9
+ * - unit は value の1段下の fontSize でベースライン揃え。label は muted。
10
+ * - a11y: value+unit+label を1つの accessibilityLabel に合成して読み上げる(contract a11y)。
11
+ */
12
+ import { type StyleProp, type ViewStyle } from "react-native";
13
+ import { type SizeOf } from "../contracts/contract-types";
14
+ type MetricSize = SizeOf<"metric">;
15
+ interface MetricProps {
16
+ /** 整形済みの数値文字列(整形は呼び出し側)。 */
17
+ value: string;
18
+ /** 単位("km" / "m" / "h:mm" 等)。 */
19
+ unit?: string;
20
+ /** ラベル("走行距離" 等)。 */
21
+ label?: string;
22
+ size?: MetricSize;
23
+ align?: "start" | "center";
24
+ style?: StyleProp<ViewStyle>;
25
+ testID?: string;
26
+ }
27
+ export declare function Metric({ value, unit, label, size, align, style, testID, }: MetricProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare namespace Metric {
29
+ var __contract: {
30
+ readonly id: "metric";
31
+ readonly version: "0.1.0";
32
+ readonly variants: readonly ["default"];
33
+ readonly sizes: readonly ["sm", "md", "lg"];
34
+ readonly states: readonly ["default"];
35
+ };
36
+ }
37
+ export {};
38
+ //# sourceMappingURL=Metric.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Metric.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Metric.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAwB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpF,OAAO,EAAa,KAAK,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAGrE,KAAK,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEnC,UAAU,WAAW;IACnB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,IAAW,EACX,KAAe,EACf,KAAK,EACL,MAAM,GACP,EAAE,WAAW,2CAsBb;yBA9Be,MAAM"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Row — 横並び layout primitive。RN コア View の薄いラッパ。
3
+ * contract: row(app 先行定義、melta-contracts)。dogfood 不足-1(生 flexbox 手書き)の解消。
4
+ *
5
+ * - gap は spacing token キー限定(生数値不可、§5 lint の意味を保つ)。
6
+ * - align(交差軸、default center)/ justify(主軸、default start)/ wrap(折返し)。
7
+ * - 決定ロジックは pure resolver(row.styles.ts)に分離 — recipe との機械照合対象。
8
+ */
9
+ import { type ReactNode } from "react";
10
+ import { type StyleProp, type ViewStyle } from "react-native";
11
+ import type { SpacingKey } from "../theme";
12
+ import { type RowAlign, type RowJustify } from "./row.styles";
13
+ interface RowProps {
14
+ /** 子要素間の gap(spacing token キー限定)。省略時 gap なし。 */
15
+ gap?: SpacingKey;
16
+ /** 交差軸の配置。default "center"。 */
17
+ align?: RowAlign;
18
+ /** 主軸の配置。default "start"。 */
19
+ justify?: RowJustify;
20
+ /** 折返し。default false。 */
21
+ wrap?: boolean;
22
+ style?: StyleProp<ViewStyle>;
23
+ testID?: string;
24
+ children: ReactNode;
25
+ }
26
+ export declare function Row({ gap, align, justify, wrap, style, testID, children, }: RowProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare namespace Row {
28
+ var __contract: {
29
+ readonly id: "row";
30
+ readonly version: "0.1.0";
31
+ readonly variants: readonly ["default"];
32
+ readonly sizes: readonly [];
33
+ readonly states: readonly ["default"];
34
+ };
35
+ }
36
+ export {};
37
+ //# sourceMappingURL=Row.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Row.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAmB,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAiB,MAAM,cAAc,CAAC;AAE9F,UAAU,QAAQ;IAChB,gDAAgD;IAChD,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,yBAAyB;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,GAAG,CAAC,EAClB,GAAG,EACH,KAAgB,EAChB,OAAiB,EACjB,IAAY,EACZ,KAAK,EACL,MAAM,EACN,QAAQ,GACT,EAAE,QAAQ,2CAaV;yBArBe,GAAG"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Stack — 縦積み layout primitive。RN コア View の薄いラッパ。
3
+ * contract: stack(app 先行定義、melta-contracts)。dogfood 不足-1(生 flexbox 手書き)の解消。
4
+ *
5
+ * - gap は spacing token キー限定(生数値不可、§5 lint の意味を保つ)。
6
+ * - align は交差軸の配置(default stretch = RN デフォルト)。
7
+ * - 決定ロジックは pure resolver(stack.styles.ts)に分離 — recipe との機械照合対象。
8
+ */
9
+ import { type ReactNode } from "react";
10
+ import { type StyleProp, type ViewStyle } from "react-native";
11
+ import type { SpacingKey } from "../theme";
12
+ import { type StackAlign } from "./stack.styles";
13
+ interface StackProps {
14
+ /** 子要素間の gap(spacing token キー限定)。省略時 gap なし。 */
15
+ gap?: SpacingKey;
16
+ /** 交差軸の配置。default "stretch"。 */
17
+ align?: StackAlign;
18
+ style?: StyleProp<ViewStyle>;
19
+ testID?: string;
20
+ children: ReactNode;
21
+ }
22
+ export declare function Stack({ gap, align, style, testID, children }: StackProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare namespace Stack {
24
+ var __contract: {
25
+ readonly id: "stack";
26
+ readonly version: "0.1.0";
27
+ readonly variants: readonly ["default"];
28
+ readonly sizes: readonly [];
29
+ readonly states: readonly ["default"];
30
+ };
31
+ }
32
+ export {};
33
+ //# sourceMappingURL=Stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Stack.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAqB,KAAK,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAErF,UAAU,UAAU;IAClB,gDAAgD;IAChD,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,gCAAgC;IAChC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,KAAK,CAAC,EAAE,GAAG,EAAE,KAAiB,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,UAAU,2CAapF;yBAbe,KAAK"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Tag — タグ / フィルターチップ primitive(設計書 §1, §4 C-3)。contract: tag。discriminated union。
3
+ *
4
+ * - variant で必須 prop が変わるため DU(§4: basic は表示のみ、removable は onRemove 必須、
5
+ * filter-chip は selected/onToggle 必須)。
6
+ * - contract states active/inactive → prop selected:boolean(§2)。selected→accessibilityState.selected。
7
+ * - 配色: basic/removable は bg-page-alt、filter-chip は bg-surface+border、selected 時は
8
+ * active-bg=primary.50 / active-border=primary.200 / active-text=primary.700(tag.contract tokenRefs)。
9
+ * 色・寸法の決定は pure resolver(tag.styles.ts)に分離、recipe との機械照合は
10
+ * scripts/lib/tag-conformance.test.ts が行う。
11
+ * - label は Text primitive。filter-chip active の文字色だけ primary.700(SemanticColors 外なので style 上書き)。
12
+ * - focus outline は Button(Step8) で Pressable focus handling を共通化してから Tag にも適用する
13
+ * (§1 は Phase1 scope だが acceptance 外。今は accessibilityState のみ。Button 実装時に回収)。
14
+ */
15
+ import { type StyleProp, type ViewStyle } from "react-native";
16
+ interface TagBase {
17
+ label: string;
18
+ style?: StyleProp<ViewStyle>;
19
+ testID?: string;
20
+ }
21
+ type TagProps = (TagBase & {
22
+ variant?: "basic";
23
+ }) | (TagBase & {
24
+ variant: "removable";
25
+ onRemove: () => void;
26
+ removeAccessibilityLabel: string;
27
+ }) | (TagBase & {
28
+ variant: "filter-chip";
29
+ selected: boolean;
30
+ onToggle: () => void;
31
+ });
32
+ export declare function Tag(props: TagProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare namespace Tag {
34
+ var __contract: {
35
+ readonly id: "tag";
36
+ readonly version: "2.0.0";
37
+ readonly variants: readonly ["basic", "removable", "filter-chip"];
38
+ readonly sizes: readonly [];
39
+ readonly states: readonly ["default", "active", "inactive", "hover", "focus"];
40
+ };
41
+ }
42
+ export {};
43
+ //# sourceMappingURL=Tag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Tag.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAO/E,UAAU,OAAO;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,KAAK,QAAQ,GACT,CAAC,OAAO,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,GACjC,CAAC,OAAO,GAAG;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAAC,wBAAwB,EAAE,MAAM,CAAA;CAAE,CAAC,GAC5F,CAAC,OAAO,GAAG;IAAE,OAAO,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,CAAC;AA2EpF,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,2CAgBlC;yBAhBe,GAAG"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Text — 基本テキスト primitive(設計書 §1)。RN コア Text の薄いラッパ。
3
+ * contract: text(app 先行定義、melta-contracts)。
4
+ *
5
+ * - variant は contract 由来の VariantOf<"text">(= fontSize の段階)。theme の FontSizeKey と
6
+ * 構造一致している前提で theme.typography.fontSize[variant] を引く。乖離したら型エラーで検知
7
+ * される(= A-3 conformance の型レベル最低ライン、§2)。
8
+ * - 色は token キーのみ(生 hex 不可、§5 lint の意味を保つ)。
9
+ * - letterSpacing は role(heading/body) の ratio を fontSize から pt 換算(text.styles.ts)。
10
+ * - 形状(fontSize/lineHeight/letterSpacing/fontWeight)は variant/role/weight 依存なので useMemo で
11
+ * 分離(B-3 の「形状/色 分離 + 参照安定性」を Phase1 は useMemo で満たす。StyleSheet 事前生成の
12
+ * 最適化は Card で実証予定)。色のみ render 時に colors から取る。
13
+ */
14
+ import { type ReactNode } from "react";
15
+ import { type StyleProp, type TextStyle } from "react-native";
16
+ import type { FontWeightKey, SemanticColors } from "../theme";
17
+ import { type VariantOf } from "../contracts/contract-types";
18
+ import { type TextRole } from "./text.styles";
19
+ type TextVariant = VariantOf<"text">;
20
+ interface TextProps {
21
+ /** fontSize の段階(contract variant)。default "base"。 */
22
+ variant?: TextVariant;
23
+ /** フォントウェイト(token キー)。未指定は RN デフォルト。 */
24
+ weight?: FontWeightKey;
25
+ /** 文字色(semantic token キーのみ)。default "text-default"。 */
26
+ color?: keyof SemanticColors;
27
+ /** letterSpacing の切替軸。default "body"。 */
28
+ role?: TextRole;
29
+ numberOfLines?: number;
30
+ style?: StyleProp<TextStyle>;
31
+ testID?: string;
32
+ children: ReactNode;
33
+ }
34
+ export declare function Text({ variant, weight, color, role, numberOfLines, style, testID, children, }: TextProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare namespace Text {
36
+ var __contract: {
37
+ readonly id: "text";
38
+ readonly version: "0.1.0";
39
+ readonly variants: readonly ["xs", "sm", "base", "lg", "xl", "2xl", "3xl"];
40
+ readonly sizes: readonly [];
41
+ readonly states: readonly ["default"];
42
+ };
43
+ }
44
+ export {};
45
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Text.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAkB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEhE,KAAK,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAErC,UAAU,SAAS;IACjB,qDAAqD;IACrD,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,wCAAwC;IACxC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,cAAc,CAAC;IAC7B,yCAAyC;IACzC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,IAAI,CAAC,EACnB,OAAgB,EAChB,MAAM,EACN,KAAsB,EACtB,IAAa,EACb,aAAa,EACb,KAAK,EACL,MAAM,EACN,QAAQ,GACT,EAAE,SAAS,2CAoBX;yBA7Be,IAAI"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * focus-ring — Pressable の focus 可視化を共通化する internal helper(設計書 §1/§2)。
3
+ *
4
+ * RN にブラウザの focus-visible / ring はないので、focus 時に「outline 相当の View overlay」を
5
+ * 対象の外側に絶対配置で描く(§2 mapping: focus → accessible + Pressable onFocus で outline)。
6
+ * 外付けキーボード / TV / a11y focus で効く。Button / Tag / Card で共有する(個別実装の重複を防ぐ)。
7
+ *
8
+ * 使い方:
9
+ * const { focused, focusHandlers } = useFocusRing();
10
+ * <Pressable {...focusHandlers} style={{ ... }}>
11
+ * {children}
12
+ * <FocusRing visible={focused} radius={theme.radius.md} />
13
+ * </Pressable>
14
+ * 注: 親 Pressable は position:relative(RN 既定)かつ overflow を hidden にしないこと
15
+ * (ring は inset 負値で外側に出るため)。
16
+ */
17
+ export declare function useFocusRing(): {
18
+ focused: boolean;
19
+ focusHandlers: {
20
+ onFocus: () => void;
21
+ onBlur: () => void;
22
+ };
23
+ };
24
+ interface FocusRingProps {
25
+ visible: boolean;
26
+ /** 対象の borderRadius。ring はこれに inset 分を足した角丸で描く。 */
27
+ radius: number;
28
+ }
29
+ export declare function FocusRing({ visible, radius }: FocusRingProps): import("react/jsx-runtime").JSX.Element | null;
30
+ export {};
31
+ //# sourceMappingURL=focus-ring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-ring.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/_internal/focus-ring.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,wBAAgB,YAAY;;;;;;EAS3B;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;CAChB;AAID,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,cAAc,kDAkB5D"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * button.styles — Button の pure style resolver(P4 conformance 対応で Button.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
5
+ * 直接実行できる。recipes/app/button.recipe.json(melta-contracts の styleRefs)との
6
+ * 機械照合は scripts/lib/recipe-conformance.test.ts が行う。
7
+ */
8
+ import type { NativeTheme, ThemeMode, FontSizeKey, SpacingKey } from "../theme";
9
+ export type ButtonVariant = "contained" | "outlined" | "brand-outline" | "neutral" | "lighted" | "danger" | "subtle";
10
+ export type ButtonSize = "small" | "medium" | "large";
11
+ /** size → height / 横 padding / label fontSize / icon box(contract sizes/iconButton と整合)。 */
12
+ export declare const SIZE_SPEC: Record<ButtonSize, {
13
+ height: number;
14
+ px: SpacingKey;
15
+ font: FontSizeKey;
16
+ iconBox: number;
17
+ }>;
18
+ /**
19
+ * variant → 色解決(button.contract tokenRefs の 1:1 写像)。
20
+ * 文字色は variant により semantic 外(primary.500 等)もあるため hex 文字列で返し、
21
+ * Text の style で color 上書きする(Text の color prop は SemanticColors キー限定のため)。
22
+ */
23
+ export declare function resolveVariant(theme: NativeTheme, mode: ThemeMode, variant: ButtonVariant): {
24
+ bg?: string;
25
+ pressedBg?: string;
26
+ textColor: string;
27
+ border?: string;
28
+ };
29
+ //# sourceMappingURL=button.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.styles.d.ts","sourceRoot":"","sources":["../../../../src/primitives/button.styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEhF,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,UAAU,GACV,eAAe,GACf,SAAS,GACT,SAAS,GACT,QAAQ,GACR,QAAQ,CAAC;AACb,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,4FAA4F;AAC5F,eAAO,MAAM,SAAS,EAAE,MAAM,CAC5B,UAAU,EACV;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAKvE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,aAAa,GACrB;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CA6BzE"}
@@ -0,0 +1,8 @@
1
+ /** melta-app primitives の公開エントリ。実装ごとにここへ追記する(設計書 §1)。 */
2
+ export { Text } from "./Text";
3
+ export { Metric } from "./Metric";
4
+ export { Tag } from "./Tag";
5
+ export { Button } from "./Button";
6
+ export { Stack } from "./Stack";
7
+ export { Row } from "./Row";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,yDAAyD;AAEzD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * metric.styles — Metric の pure style resolver(styleRefs conformance 対応で Metric.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュール(型 import のみ可)にすることで node テスト
5
+ * (tsx --test)から直接実行できる。recipes/app/metric.recipe.json(melta-contracts の
6
+ * styleRefs)との機械照合は scripts/lib/metric-conformance.test.ts が行う。
7
+ */
8
+ import type { FontVariant } from "react-native";
9
+ import type { NativeTheme, ThemeMode, FontSizeKey, FontWeightValue } from "../theme";
10
+ export type MetricSize = "sm" | "md" | "lg";
11
+ /**
12
+ * size → value / unit の fontSize token(metric.recipe sizes と整合)。
13
+ * unit は value の1段下の fontSize(ベースライン揃え用)。
14
+ */
15
+ export declare const METRIC_FONT: Record<MetricSize, {
16
+ value: FontSizeKey;
17
+ unit: FontSizeKey;
18
+ }>;
19
+ export interface MetricStyles {
20
+ /** value(数値本体): tabular-nums で桁揃え + bold + text-heading。 */
21
+ valueStyle: {
22
+ fontSize: number;
23
+ lineHeight: number;
24
+ fontWeight: FontWeightValue;
25
+ color: string;
26
+ fontVariant: FontVariant[];
27
+ };
28
+ /** unit(単位): value の1段下 fontSize / medium / text-muted / marginLeft spacing.1。 */
29
+ unitStyle: {
30
+ fontSize: number;
31
+ fontWeight: FontWeightValue;
32
+ color: string;
33
+ marginLeft: number;
34
+ };
35
+ /** label(ラベル): sm / text-muted。 */
36
+ labelStyle: {
37
+ fontSize: number;
38
+ color: string;
39
+ };
40
+ }
41
+ /** size → value / unit / label の style 解決(metric.recipe styleRefs の 1:1 写像)。 */
42
+ export declare function resolveMetricStyles(theme: NativeTheme, mode: ThemeMode, size: MetricSize): MetricStyles;
43
+ //# sourceMappingURL=metric.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metric.styles.d.ts","sourceRoot":"","sources":["../../../../src/primitives/metric.styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAErF,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAAU,EAAE;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,CAIrF,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,4DAA4D;IAC5D,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,eAAe,CAAC;QAC5B,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,WAAW,EAAE,CAAC;KAC5B,CAAC;IACF,kFAAkF;IAClF,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,eAAe,CAAC;QAC5B,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,mCAAmC;IACnC,UAAU,EAAE;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,UAAU,GACf,YAAY,CAuBd"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * row.styles — Row の pure style resolver(styleRefs conformance 対応で Row.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
5
+ * 直接実行できる。recipes/app/row.recipe.json(melta-contracts の styleRefs)との
6
+ * 機械照合は scripts/lib/row-conformance.test.ts が行う。
7
+ */
8
+ import type { NativeTheme, SpacingKey } from "../theme";
9
+ /** 交差軸の配置(RN alignItems への写像)。default "center"(recipe default に焼いてある)。 */
10
+ export type RowAlign = "start" | "center" | "end" | "baseline" | "stretch";
11
+ /** 主軸の配置(RN justifyContent への写像)。default "start"(= RN デフォルト、style 出力なし)。 */
12
+ export type RowJustify = "start" | "center" | "end" | "between";
13
+ declare const ALIGN_MAP: {
14
+ readonly start: "flex-start";
15
+ readonly center: "center";
16
+ readonly end: "flex-end";
17
+ readonly baseline: "baseline";
18
+ readonly stretch: "stretch";
19
+ };
20
+ declare const JUSTIFY_MAP: {
21
+ readonly start: "flex-start";
22
+ readonly center: "center";
23
+ readonly end: "flex-end";
24
+ readonly between: "space-between";
25
+ };
26
+ export interface RowStyleProps {
27
+ /** 子要素間の gap(spacing token キー限定)。省略時は gap を出力しない。 */
28
+ gap?: SpacingKey;
29
+ /** 交差軸の配置。default "center"。 */
30
+ align?: RowAlign;
31
+ /** 主軸の配置。default "start"(style 出力なし)。 */
32
+ justify?: RowJustify;
33
+ /** 折返し。default false(style 出力なし)。 */
34
+ wrap?: boolean;
35
+ }
36
+ export interface RowStyle {
37
+ flexDirection: "row";
38
+ alignItems: (typeof ALIGN_MAP)[RowAlign];
39
+ justifyContent?: (typeof JUSTIFY_MAP)[RowJustify];
40
+ flexWrap?: "wrap";
41
+ gap?: number;
42
+ }
43
+ /**
44
+ * props → 横並び style の解決(row.recipe styleRefs の 1:1 写像)。
45
+ * デフォルト(align=center / justify=start / wrap=false / gap なし)は
46
+ * recipe の default variant(flexDirection + alignItems: "center")と一致させている。
47
+ */
48
+ export declare function resolveRowStyle(theme: NativeTheme, { gap, align, justify, wrap }?: RowStyleProps): RowStyle;
49
+ export {};
50
+ //# sourceMappingURL=row.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row.styles.d.ts","sourceRoot":"","sources":["../../../../src/primitives/row.styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAExD,0EAA0E;AAC1E,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;AAC3E,4EAA4E;AAC5E,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAEhE,QAAA,MAAM,SAAS;;;;;;CAML,CAAC;AAEX,QAAA,MAAM,WAAW;;;;;CAKP,CAAC;AAEX,MAAM,WAAW,aAAa;IAC5B,qDAAqD;IACrD,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,yCAAyC;IACzC,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,aAAa,EAAE,KAAK,CAAC;IACrB,UAAU,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;IACzC,cAAc,CAAC,EAAE,CAAC,OAAO,WAAW,CAAC,CAAC,UAAU,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,WAAW,EAClB,EAAE,GAAG,EAAE,KAAgB,EAAE,OAAiB,EAAE,IAAY,EAAE,GAAE,aAAkB,GAC7E,QAAQ,CAQV"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * stack.styles — Stack の pure style resolver(styleRefs conformance 対応で Stack.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
5
+ * 直接実行できる。recipes/app/stack.recipe.json(melta-contracts の styleRefs)との
6
+ * 機械照合は scripts/lib/stack-conformance.test.ts が行う。
7
+ */
8
+ import type { NativeTheme, SpacingKey } from "../theme";
9
+ /** 交差軸の配置(RN alignItems への写像。default stretch = RN デフォルトなので出力しない)。 */
10
+ export type StackAlign = "start" | "center" | "end" | "stretch";
11
+ declare const ALIGN_MAP: {
12
+ readonly start: "flex-start";
13
+ readonly center: "center";
14
+ readonly end: "flex-end";
15
+ readonly stretch: "stretch";
16
+ };
17
+ export interface StackStyleProps {
18
+ /** 子要素間の gap(spacing token キー限定)。省略時は gap を出力しない。 */
19
+ gap?: SpacingKey;
20
+ /** 交差軸の配置。default "stretch"(= RN デフォルト、style 出力なし)。 */
21
+ align?: StackAlign;
22
+ }
23
+ export interface StackStyle {
24
+ flexDirection: "column";
25
+ gap?: number;
26
+ alignItems?: (typeof ALIGN_MAP)[StackAlign];
27
+ }
28
+ /**
29
+ * props → 縦積み style の解決(stack.recipe styleRefs の 1:1 写像)。
30
+ * デフォルト(gap なし / align=stretch)は recipe の default variant(flexDirection のみ)と一致させている。
31
+ */
32
+ export declare function resolveStackStyle(theme: NativeTheme, { gap, align }?: StackStyleProps): StackStyle;
33
+ export {};
34
+ //# sourceMappingURL=stack.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack.styles.d.ts","sourceRoot":"","sources":["../../../../src/primitives/stack.styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAExD,qEAAqE;AACrE,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAEhE,QAAA,MAAM,SAAS;;;;;CAKL,CAAC;AAEX,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,uDAAuD;IACvD,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,QAAQ,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;CAC7C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,WAAW,EAClB,EAAE,GAAG,EAAE,KAAiB,EAAE,GAAE,eAAoB,GAC/C,UAAU,CAMZ"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * tag.styles — Tag の pure style resolver(styleRefs conformance 対応で Tag.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
5
+ * 直接実行できる。recipes/app/tag.recipe.json(melta-contracts の styleRefs)との
6
+ * 機械照合は scripts/lib/tag-conformance.test.ts が行う。
7
+ */
8
+ import type { NativeTheme, ThemeMode, FontSizeKey } from "../theme";
9
+ export type TagVariant = "basic" | "removable" | "filter-chip";
10
+ /** 共通形状(px-3 py-1 gap-1 rounded-full。tag.recipe の全 variant style と共通の寸法キー)。 */
11
+ export declare function resolveTagBase(theme: NativeTheme): {
12
+ gap: number;
13
+ paddingHorizontal: number;
14
+ paddingVertical: number;
15
+ borderRadius: number;
16
+ };
17
+ /**
18
+ * variant(+ filter-chip の selected 状態)→ 配色 + label fontSize(tag.recipe styleRefs の 1:1 写像)。
19
+ *
20
+ * - selected は contract states active/inactive → prop selected:boolean の写像(filter-chip のみ有効)。
21
+ * active は bg=primary.50 / border=primary.200 / text=primary.700 の差分、inactive は variant style そのまま。
22
+ * - 文字色は active 時に semantic 外(primary.700)になるため hex 文字列で返し、
23
+ * Text の style で color 上書きする(Text の color prop は SemanticColors キー限定のため)。
24
+ */
25
+ export declare function resolveTagVariant(theme: NativeTheme, mode: ThemeMode, variant: TagVariant, selected?: boolean): {
26
+ bg: string;
27
+ border?: string;
28
+ borderWidth?: number;
29
+ textColor: string;
30
+ font: FontSizeKey;
31
+ };
32
+ //# sourceMappingURL=tag.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag.styles.d.ts","sourceRoot":"","sources":["../../../../src/primitives/tag.styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpE,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,aAAa,CAAC;AAE/D,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG;IAClD,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB,CAOA;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,UAAU,EACnB,QAAQ,UAAQ,GACf;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,WAAW,CAAA;CAAE,CAwB7F"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * text.styles — Text の pure style resolver(styleRefs conformance 対応で Text.tsx から分離)。
3
+ *
4
+ * react-native を import しない純粋モジュールにすることで node テスト(tsx --test)から
5
+ * 直接実行できる。recipes/app/text.recipe.json(melta-contracts の styleRefs)との
6
+ * 機械照合は scripts/lib/text-conformance.test.ts が行う。
7
+ */
8
+ import type { NativeTheme, FontSizeKey, FontWeightKey, FontWeightValue } from "../theme";
9
+ /** letterSpacing の切替軸(text.recipe description の role prop に対応)。 */
10
+ export type TextRole = "heading" | "body";
11
+ /** Text の形状 style(mode 非依存部分。文字色は render 時に semantic colors から取る)。 */
12
+ export interface TextShape {
13
+ fontSize: number;
14
+ lineHeight: number;
15
+ letterSpacing: number;
16
+ fontWeight?: FontWeightValue;
17
+ }
18
+ /**
19
+ * variant / role / weight → 形状解決(text.recipe styleRefs の 1:1 写像)。
20
+ * - fontSize token は複合値(px + lineHeight 比率)。theme 生成時に lineHeight は px 化済み。
21
+ * - letterSpacing は em 比率 token のため fontSize × ratio で pt 化する。
22
+ * theme の resolveLetterSpacing と同一式だが、theme index 経由の runtime import は
23
+ * ThemeProvider → react-native を引くため、pure に保つ目的でここでは式を直書きする。
24
+ */
25
+ export declare function resolveTextShape(theme: NativeTheme, variant: FontSizeKey, role: TextRole, weight?: FontWeightKey): TextShape;
26
+ //# sourceMappingURL=text.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.styles.d.ts","sourceRoot":"","sources":["../../../../src/primitives/text.styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEzF,mEAAmE;AACnE,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAE1C,sEAAsE;AACtE,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,QAAQ,EACd,MAAM,CAAC,EAAE,aAAa,GACrB,SAAS,CAQX"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * ThemeProvider / useTheme — melta-app の theming 適用基盤(設計書 §3, B-3)。
3
+ *
4
+ * B-3: 形状(mode 非依存)は各 component 側で StyleSheet 化、色は theme.color.semantic[mode] から
5
+ * render 時に取る。Provider は「現在の mode と、その mode の semantic 色」を配る役割。
6
+ * useColorScheme() を Provider 内で1回だけ読む(RN コア、追加依存なし)。
7
+ *
8
+ * context value は useMemo 必須(§3): 毎レンダで新オブジェクトを配ると全 consumer が再レンダする。
9
+ */
10
+ import { type ReactNode } from "react";
11
+ import type { NativeTheme, SemanticColors } from "./types";
12
+ export type ThemeMode = "light" | "dark";
13
+ export interface ThemeContextValue {
14
+ /** 正規化済み theme 全体(色以外の形状トークンもここから取る)。 */
15
+ theme: NativeTheme;
16
+ /** 現在の表示モード。 */
17
+ mode: ThemeMode;
18
+ /** 現在 mode の semantic 色(= theme.color.semantic[mode])。最頻アクセスなので展開済みで配る。 */
19
+ colors: SemanticColors;
20
+ }
21
+ interface ThemeProviderProps {
22
+ children: ReactNode;
23
+ /**
24
+ * 明示モード。指定時は OS の colorScheme を無視して固定する。
25
+ * カタログの light/dark トグル(§6)や、特定画面の固定表示に使う。
26
+ */
27
+ forcedMode?: ThemeMode;
28
+ }
29
+ export declare function ThemeProvider({ children, forcedMode }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare function useTheme(): ThemeContextValue;
31
+ export {};
32
+ //# sourceMappingURL=ThemeProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3E,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE3D,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,KAAK,EAAE,WAAW,CAAC;IACnB,gBAAgB;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,2EAA2E;IAC3E,MAAM,EAAE,cAAc,CAAC;CACxB;AAID,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,kBAAkB,2CAczE;AAED,wBAAgB,QAAQ,IAAI,iBAAiB,CAM5C"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * melta-app theme エントリ。
3
+ * 型は types.ts、値は native-theme.ts(melta-contracts から自動生成)。
4
+ */
5
+ export * from "./types";
6
+ export { nativeTheme } from "./native-theme";
7
+ export { ThemeProvider, useTheme } from "./ThemeProvider";
8
+ export type { ThemeContextValue, ThemeMode } from "./ThemeProvider";
9
+ /**
10
+ * letterSpacingRatio(em 相当の比率)を、適用先の fontSize から RN の letterSpacing(pt) に解決する。
11
+ * 例: resolveLetterSpacing(18, theme.typography.letterSpacingRatio.body)
12
+ * theme.typography.letterSpacingRatio.* をそのまま style.letterSpacing に入れる誤用を避けるための helper。
13
+ */
14
+ export declare function resolveLetterSpacing(fontSize: number, ratio: number): number;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEpE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5E"}
@@ -0,0 +1,3 @@
1
+ import type { NativeTheme } from "./types";
2
+ export declare const nativeTheme: NativeTheme;
3
+ //# sourceMappingURL=native-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-theme.d.ts","sourceRoot":"","sources":["../../../../src/theme/native-theme.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,WAAW,EAAE,WAgNzB,CAAC"}