@flipova/foundation 1.14.0 → 2.0.4

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 (268) hide show
  1. package/CHANGELOG.md +175 -0
  2. package/README.md +53 -178
  3. package/components/ui/accordion/ANIMATION_CUSTOMIZATION.md +162 -0
  4. package/components/ui/accordion/AccordionAnimatedHeight.tsx +56 -0
  5. package/components/ui/accordion/AccordionAnimatedIcon.tsx +41 -0
  6. package/components/ui/accordion/AnimatedHeight.tsx +56 -0
  7. package/components/ui/accordion/AnimatedIcon.tsx +41 -0
  8. package/components/ui/accordion/MIGRATION_SUMMARY.md +250 -0
  9. package/components/ui/accordion/USAGE_EXAMPLE.tsx +179 -0
  10. package/components/ui/accordion/animation-config.ts +32 -0
  11. package/components/ui/accordion/index.tsx +253 -0
  12. package/components/ui/actionsheet/index.tsx +511 -0
  13. package/components/ui/alert/index.tsx +158 -0
  14. package/components/ui/alert-dialog/index.tsx +254 -0
  15. package/components/ui/avatar/index.tsx +139 -0
  16. package/components/ui/badge/index.tsx +163 -0
  17. package/components/ui/bottomsheet/index.tsx +477 -0
  18. package/components/ui/box/index.tsx +19 -0
  19. package/components/ui/box/index.web.tsx +19 -0
  20. package/components/ui/box/styles.tsx +10 -0
  21. package/components/ui/button/index.tsx +264 -0
  22. package/components/ui/calendar/creator.tsx +366 -0
  23. package/components/ui/calendar/index.tsx +462 -0
  24. package/components/ui/calendar/styles.tsx +140 -0
  25. package/components/ui/card/index.tsx +23 -0
  26. package/components/ui/card/index.web.tsx +26 -0
  27. package/components/ui/card/styles.tsx +16 -0
  28. package/components/ui/center/index.tsx +22 -0
  29. package/components/ui/center/index.web.tsx +20 -0
  30. package/components/ui/center/styles.tsx +8 -0
  31. package/components/ui/checkbox/index.tsx +184 -0
  32. package/components/ui/date-time-picker/creator.tsx +109 -0
  33. package/components/ui/date-time-picker/index.tsx +585 -0
  34. package/components/ui/date-time-picker/index.web.tsx +217 -0
  35. package/components/ui/date-time-picker/styles.tsx +56 -0
  36. package/components/ui/divider/index.tsx +40 -0
  37. package/components/ui/drawer/index.tsx +362 -0
  38. package/components/ui/fab/index.tsx +215 -0
  39. package/components/ui/flat-list/index.tsx +21 -0
  40. package/components/ui/form-control/index.tsx +352 -0
  41. package/components/ui/gluestack-ui-provider/config.ts +72 -0
  42. package/components/ui/gluestack-ui-provider/index.tsx +47 -0
  43. package/components/ui/gluestack-ui-provider/index.web.tsx +96 -0
  44. package/components/ui/gluestack-ui-provider/script.ts +19 -0
  45. package/components/ui/gluestack-ui-provider/tokens.d.ts +17 -0
  46. package/components/ui/gluestack-ui-provider/tokens.js +188 -0
  47. package/components/ui/gluestack-ui-provider/useGluestackColors.ts +82 -0
  48. package/components/ui/grid/index.tsx +283 -0
  49. package/components/ui/grid/index.web.tsx +66 -0
  50. package/components/ui/grid/styles.tsx +15 -0
  51. package/components/ui/heading/index.tsx +220 -0
  52. package/components/ui/heading/index.web.tsx +202 -0
  53. package/components/ui/heading/styles.tsx +43 -0
  54. package/components/ui/hstack/index.tsx +27 -0
  55. package/components/ui/hstack/index.web.tsx +26 -0
  56. package/components/ui/hstack/styles.tsx +25 -0
  57. package/components/ui/icon/index.tsx +1588 -0
  58. package/components/ui/icon/index.web.tsx +1573 -0
  59. package/components/ui/image/index.tsx +48 -0
  60. package/components/ui/image-background/index.tsx +25 -0
  61. package/components/ui/image-viewer/index.tsx +743 -0
  62. package/components/ui/image-viewer/index.web.tsx +302 -0
  63. package/components/ui/index.ts +58 -0
  64. package/components/ui/input/index.tsx +125 -0
  65. package/components/ui/input-accessory-view/index.tsx +2 -0
  66. package/components/ui/keyboard-avoiding-view/index.tsx +2 -0
  67. package/components/ui/link/index.tsx +102 -0
  68. package/components/ui/liquid-glass/index.tsx +74 -0
  69. package/components/ui/menu/index.tsx +186 -0
  70. package/components/ui/modal/index.tsx +237 -0
  71. package/components/ui/popover/index.tsx +272 -0
  72. package/components/ui/portal/index.tsx +17 -0
  73. package/components/ui/pressable/index.tsx +39 -0
  74. package/components/ui/progress/index.tsx +83 -0
  75. package/components/ui/radio/index.tsx +217 -0
  76. package/components/ui/refresh-control/index.tsx +2 -0
  77. package/components/ui/safe-area-view/index.tsx +2 -0
  78. package/components/ui/scroll-view/index.tsx +2 -0
  79. package/components/ui/section-list/index.tsx +2 -0
  80. package/components/ui/select/index.tsx +277 -0
  81. package/components/ui/select/select-actionsheet.tsx +562 -0
  82. package/components/ui/skeleton/index.tsx +105 -0
  83. package/components/ui/skeleton/index.web.tsx +103 -0
  84. package/components/ui/skeleton/styles.tsx +35 -0
  85. package/components/ui/slider/index.tsx +181 -0
  86. package/components/ui/spinner/index.tsx +40 -0
  87. package/components/ui/status-bar/index.tsx +2 -0
  88. package/components/ui/switch/index.tsx +41 -0
  89. package/components/ui/table/index.tsx +210 -0
  90. package/components/ui/table/index.web.tsx +157 -0
  91. package/components/ui/table/styles.tsx +44 -0
  92. package/components/ui/tabs/TabsAnimatedIndicator.tsx +160 -0
  93. package/components/ui/tabs/animation-config.ts +3 -0
  94. package/components/ui/tabs/creator.tsx +206 -0
  95. package/components/ui/tabs/index.tsx +484 -0
  96. package/components/ui/text/index.tsx +48 -0
  97. package/components/ui/text/index.web.tsx +45 -0
  98. package/components/ui/text/styles.tsx +47 -0
  99. package/components/ui/textarea/index.tsx +94 -0
  100. package/components/ui/toast/index.tsx +252 -0
  101. package/components/ui/tooltip/index.tsx +131 -0
  102. package/components/ui/view/index.tsx +2 -0
  103. package/components/ui/virtualized-list/index.tsx +2 -0
  104. package/components/ui/vstack/index.tsx +28 -0
  105. package/components/ui/vstack/index.web.tsx +27 -0
  106. package/components/ui/vstack/styles.tsx +25 -0
  107. package/design/canonical.index.txt +53 -0
  108. package/design/documentation.xml +519 -0
  109. package/design/manifest.xml +90 -0
  110. package/design/schema.xsd +639 -0
  111. package/design/themes.xml +204 -0
  112. package/design/tokens.xml +510 -0
  113. package/design/tools/design.js +165 -0
  114. package/design/tools/npm.js +65 -0
  115. package/design/tools/requirements.txt +35 -0
  116. package/design/tools/sources/.checker/__init__.py +81 -0
  117. package/design/tools/sources/.checker/checks.py +198 -0
  118. package/design/tools/sources/.checker/cli.py +154 -0
  119. package/design/tools/sources/.checker/io.py +242 -0
  120. package/design/tools/sources/.checker/model.py +144 -0
  121. package/design/tools/sources/.checker/registry.py +115 -0
  122. package/design/tools/sources/.checker/report.py +21 -0
  123. package/design/tools/sources/.docgen/__init__.py +45 -0
  124. package/design/tools/sources/.docgen/cli.py +101 -0
  125. package/design/tools/sources/.docgen/model.py +147 -0
  126. package/design/tools/sources/.docgen/reference.py +97 -0
  127. package/design/tools/sources/.docgen/site.py +145 -0
  128. package/design/tools/sources/.docgen/xsddoc.py +329 -0
  129. package/design/tools/sources/.generate/__init__.py +35 -0
  130. package/design/tools/sources/.generate/cli.py +76 -0
  131. package/design/tools/sources/.generate/common.py +33 -0
  132. package/design/tools/sources/.generate/config.py +119 -0
  133. package/design/tools/sources/.generate/model.py +51 -0
  134. package/design/tools/sources/.generate/tokens.py +141 -0
  135. package/design/tools/sources/.linter/__init__.py +9 -0
  136. package/design/tools/sources/.linter/cli.py +44 -0
  137. package/design/tools/sources/.linter/discovery.py +30 -0
  138. package/design/tools/sources/.linter/errors.py +45 -0
  139. package/design/tools/sources/.linter/linter.py +68 -0
  140. package/design/tools/sources/.xmleditor/__init__.py +74 -0
  141. package/design/tools/sources/.xmleditor/blocks.py +185 -0
  142. package/design/tools/sources/.xmleditor/cli.py +141 -0
  143. package/design/tools/sources/.xmleditor/editor.py +906 -0
  144. package/design/tools/sources/.xmleditor/model.py +708 -0
  145. package/design/tools/sources/.xmleditor/widgets.py +1832 -0
  146. package/design/tools/sources/.xmleditor/xsdmodel.py +753 -0
  147. package/design/tools/sources/checker.py +55 -0
  148. package/design/tools/sources/docgen.py +66 -0
  149. package/design/tools/sources/generate.py +48 -0
  150. package/design/tools/sources/linter.py +54 -0
  151. package/design/tools/sources/ruff.toml +12 -0
  152. package/design/tools/sources/xmleditor.py +62 -0
  153. package/design/tools/unix/_venv_python.sh +16 -0
  154. package/design/tools/unix/check.sh +13 -0
  155. package/design/tools/unix/doc.sh +14 -0
  156. package/design/tools/unix/gen.sh +14 -0
  157. package/design/tools/unix/lint.sh +10 -0
  158. package/design/tools/unix/run.sh +20 -0
  159. package/design/tools/unix/verify.sh +12 -0
  160. package/design/tools/unix/xmledit.sh +12 -0
  161. package/design/tools/windows/check.cmd +12 -0
  162. package/design/tools/windows/doc.cmd +12 -0
  163. package/design/tools/windows/gen.cmd +11 -0
  164. package/design/tools/windows/lint.cmd +9 -0
  165. package/design/tools/windows/run.cmd +26 -0
  166. package/design/tools/windows/verify.cmd +10 -0
  167. package/design/tools/windows/xmledit.cmd +10 -0
  168. package/dist/chunk-LV4UIEQN.js +9730 -0
  169. package/dist/chunk-LV4UIEQN.js.map +1 -0
  170. package/dist/chunk-WNVU3BM2.mjs +9401 -0
  171. package/dist/chunk-WNVU3BM2.mjs.map +1 -0
  172. package/dist/index.d.mts +40 -10
  173. package/dist/index.d.ts +40 -10
  174. package/dist/index.js +726 -414
  175. package/dist/index.mjs +1 -5
  176. package/dist/ui/index.d.mts +6931 -3070
  177. package/dist/ui/index.d.ts +6931 -3070
  178. package/dist/ui/index.js +779 -352
  179. package/dist/ui/index.mjs +1 -2
  180. package/package.json +66 -149
  181. package/dist/chunk-2XORADW6.js +0 -24552
  182. package/dist/chunk-2XORADW6.js.map +0 -1
  183. package/dist/chunk-52BHHF5M.js +0 -46
  184. package/dist/chunk-52BHHF5M.js.map +0 -1
  185. package/dist/chunk-5647JY7Z.mjs +0 -100
  186. package/dist/chunk-5647JY7Z.mjs.map +0 -1
  187. package/dist/chunk-5N5HC4ZA.mjs +0 -3
  188. package/dist/chunk-5N5HC4ZA.mjs.map +0 -1
  189. package/dist/chunk-7QFZMGL6.js +0 -8583
  190. package/dist/chunk-7QFZMGL6.js.map +0 -1
  191. package/dist/chunk-ASZEP37D.js +0 -423
  192. package/dist/chunk-ASZEP37D.js.map +0 -1
  193. package/dist/chunk-BH5SU2JQ.mjs +0 -8282
  194. package/dist/chunk-BH5SU2JQ.mjs.map +0 -1
  195. package/dist/chunk-BO65GO53.mjs +0 -422
  196. package/dist/chunk-BO65GO53.mjs.map +0 -1
  197. package/dist/chunk-BSVXX52E.mjs +0 -413
  198. package/dist/chunk-BSVXX52E.mjs.map +0 -1
  199. package/dist/chunk-DNV5UBNF.mjs +0 -3
  200. package/dist/chunk-DNV5UBNF.mjs.map +0 -1
  201. package/dist/chunk-EDTAMUO2.js +0 -8310
  202. package/dist/chunk-EDTAMUO2.js.map +0 -1
  203. package/dist/chunk-IJTI6EX4.js +0 -4
  204. package/dist/chunk-IJTI6EX4.js.map +0 -1
  205. package/dist/chunk-M3YLASM2.js +0 -428
  206. package/dist/chunk-M3YLASM2.js.map +0 -1
  207. package/dist/chunk-OXKOGLXE.js +0 -4
  208. package/dist/chunk-OXKOGLXE.js.map +0 -1
  209. package/dist/chunk-RQXQK3ZO.mjs +0 -8486
  210. package/dist/chunk-RQXQK3ZO.mjs.map +0 -1
  211. package/dist/chunk-SR25V4EA.mjs +0 -40
  212. package/dist/chunk-SR25V4EA.mjs.map +0 -1
  213. package/dist/chunk-UB34WFEQ.js +0 -106
  214. package/dist/chunk-UB34WFEQ.js.map +0 -1
  215. package/dist/chunk-ZBRWXKDF.mjs +0 -24431
  216. package/dist/chunk-ZBRWXKDF.mjs.map +0 -1
  217. package/dist/cli/ds.d.mts +0 -1
  218. package/dist/cli/ds.d.ts +0 -1
  219. package/dist/cli/ds.js +0 -602
  220. package/dist/cli/ds.js.map +0 -1
  221. package/dist/cli/ds.mjs +0 -579
  222. package/dist/cli/ds.mjs.map +0 -1
  223. package/dist/cli/flipova.d.mts +0 -1
  224. package/dist/cli/flipova.d.ts +0 -1
  225. package/dist/cli/flipova.js +0 -161
  226. package/dist/cli/flipova.js.map +0 -1
  227. package/dist/cli/flipova.mjs +0 -154
  228. package/dist/cli/flipova.mjs.map +0 -1
  229. package/dist/config/index.d.mts +0 -123
  230. package/dist/config/index.d.ts +0 -123
  231. package/dist/config/index.js +0 -28
  232. package/dist/config/index.js.map +0 -1
  233. package/dist/config/index.mjs +0 -3
  234. package/dist/config/index.mjs.map +0 -1
  235. package/dist/createTheme-DQeX3s0I.d.mts +0 -78
  236. package/dist/createTheme-Y4jfz4-u.d.ts +0 -78
  237. package/dist/index-CuaJA3gM.d.mts +0 -78
  238. package/dist/index-CuaJA3gM.d.ts +0 -78
  239. package/dist/registry/index.d.mts +0 -10160
  240. package/dist/registry/index.d.ts +0 -10160
  241. package/dist/registry/index.js +0 -392
  242. package/dist/registry/index.js.map +0 -1
  243. package/dist/registry/index.mjs +0 -3
  244. package/dist/registry/index.mjs.map +0 -1
  245. package/dist/theme/index.d.mts +0 -35
  246. package/dist/theme/index.d.ts +0 -35
  247. package/dist/theme/index.js +0 -28
  248. package/dist/theme/index.js.map +0 -1
  249. package/dist/theme/index.mjs +0 -3
  250. package/dist/theme/index.mjs.map +0 -1
  251. package/dist/tokens/index.d.mts +0 -423
  252. package/dist/tokens/index.d.ts +0 -423
  253. package/dist/tokens/index.js +0 -44
  254. package/dist/tokens/index.js.map +0 -1
  255. package/dist/tokens/index.mjs +0 -3
  256. package/dist/tokens/index.mjs.map +0 -1
  257. package/dist/types/index.d.mts +0 -202
  258. package/dist/types/index.d.ts +0 -202
  259. package/dist/types/index.js +0 -4
  260. package/dist/types/index.js.map +0 -1
  261. package/dist/types/index.mjs +0 -3
  262. package/dist/types/index.mjs.map +0 -1
  263. package/dist/web/index.d.mts +0 -316
  264. package/dist/web/index.d.ts +0 -316
  265. package/dist/web/index.js +0 -1500
  266. package/dist/web/index.js.map +0 -1
  267. package/dist/web/index.mjs +0 -1396
  268. package/dist/web/index.mjs.map +0 -1
@@ -0,0 +1,510 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Flipova Foundation Design Tokens
4
+ =================================
5
+ Namespace: urn:flipova:foundation:registry
6
+ Schema: flipova.foundation/registry/1
7
+ Schema Location: schema.xsd
8
+ Register: tokens
9
+
10
+ PURPOSE:
11
+ Design tokens are the atomic values of the design system.
12
+ They define spacing, colors, typography, shadows, animations, etc.
13
+
14
+ TOKEN KINDS:
15
+ - scale: Numeric scale values (spacing, radii, font sizes)
16
+ - map: Named values without a scale (z-index, opacity)
17
+ - font: Font family definitions with platform variants
18
+ - color: Color palette with shades
19
+ - shadow: Shadow definitions with offset, blur, color
20
+ - animation: Duration and easing definitions
21
+ -->
22
+ <tokens xmlns="urn:flipova:foundation:registry"
23
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24
+ xsi:schemaLocation="urn:flipova:foundation:registry schema.xsd"
25
+ schema="flipova.foundation/registry/1"
26
+ register="tokens">
27
+ <items>
28
+ <!-- Spacing Scale: base 4px, formula n * 4 -->
29
+ <token id="spacing" kind="scale" unit="px" base="4" formula="n * 4">
30
+ <values>
31
+ <value id="0">0</value>
32
+ <value id="0.5">2</value>
33
+ <value id="1">4</value>
34
+ <value id="1.5">6</value>
35
+ <value id="2">8</value>
36
+ <value id="2.5">10</value>
37
+ <value id="3">12</value>
38
+ <value id="3.5">14</value>
39
+ <value id="4">16</value>
40
+ <value id="5">20</value>
41
+ <value id="6">24</value>
42
+ <value id="7">28</value>
43
+ <value id="8">32</value>
44
+ <value id="9">36</value>
45
+ <value id="10">40</value>
46
+ <value id="11">44</value>
47
+ <value id="12">48</value>
48
+ <value id="14">56</value>
49
+ <value id="16">64</value>
50
+ <value id="20">80</value>
51
+ <value id="24">96</value>
52
+ <value id="32">128</value>
53
+ <value id="40">160</value>
54
+ <value id="48">192</value>
55
+ </values>
56
+ </token>
57
+ <!-- Border Radii Scale -->
58
+ <token id="radii" kind="scale" unit="px">
59
+ <values>
60
+ <value id="none">0</value>
61
+ <value id="xs">2</value>
62
+ <value id="sm">4</value>
63
+ <value id="md">8</value>
64
+ <value id="lg">12</value>
65
+ <value id="xl">16</value>
66
+ <value id="2xl">24</value>
67
+ <value id="3xl">32</value>
68
+ <value id="full">9999</value>
69
+ </values>
70
+ </token>
71
+ <!-- Breakpoints Scale (min-width mode) -->
72
+ <token id="breakpoints" kind="scale" unit="px" mode="min-width">
73
+ <values>
74
+ <value id="base">0</value>
75
+ <value id="xs">480</value>
76
+ <value id="sm">640</value>
77
+ <value id="md">768</value>
78
+ <value id="lg">1024</value>
79
+ <value id="xl">1280</value>
80
+ <value id="2xl">1536</value>
81
+ </values>
82
+ </token>
83
+ <!-- Font Families (with platform variants) -->
84
+ <token id="family" kind="font">
85
+ <values>
86
+ <value id="system">
87
+ <native>system</native>
88
+ <web>system-ui, -apple-system, Segoe UI, Roboto, sans-serif</web>
89
+ </value>
90
+ <value id="mono">
91
+ <native>monospace</native>
92
+ <web>ui-monospace, SFMono-Regular, Menlo, monospace</web>
93
+ </value>
94
+ <value id="serif">
95
+ <native>serif</native>
96
+ <web>Georgia, Cambria, Times New Roman, serif</web>
97
+ </value>
98
+ <value id="sans">
99
+ <native>System</native>
100
+ <web>var(--font-sans)</web>
101
+ </value>
102
+ <value id="body">
103
+ <native>System</native>
104
+ <web>var(--font-sans)</web>
105
+ </value>
106
+ <value id="heading">
107
+ <native>System</native>
108
+ <web>var(--font-heading)</web>
109
+ </value>
110
+ <value id="roboto">
111
+ <native>Roboto</native>
112
+ <web>Roboto, sans-serif</web>
113
+ </value>
114
+ </values>
115
+ </token>
116
+ <!-- Font Sizes Scale -->
117
+ <token id="fontSizes" kind="scale" unit="px">
118
+ <values>
119
+ <value id="2xs">10</value>
120
+ <value id="xs">12</value>
121
+ <value id="sm">14</value>
122
+ <value id="md">16</value>
123
+ <value id="lg">18</value>
124
+ <value id="xl">20</value>
125
+ <value id="2xl">24</value>
126
+ <value id="3xl">30</value>
127
+ <value id="4xl">36</value>
128
+ <value id="5xl">48</value>
129
+ <value id="6xl">60</value>
130
+ <value id="7xl">72</value>
131
+ <value id="8xl">96</value>
132
+ <value id="9xl">128</value>
133
+ </values>
134
+ </token>
135
+ <!-- Font Weights Map -->
136
+ <token id="fontWeights" kind="map">
137
+ <values>
138
+ <value id="thin">100</value>
139
+ <value id="extralight">200</value>
140
+ <value id="light">300</value>
141
+ <value id="normal">400</value>
142
+ <value id="medium">500</value>
143
+ <value id="semibold">600</value>
144
+ <value id="bold">700</value>
145
+ <value id="extrabold">800</value>
146
+ <value id="black">900</value>
147
+ </values>
148
+ </token>
149
+ <!-- Line Heights Scale -->
150
+ <token id="lineHeights" kind="scale" unit="px">
151
+ <values>
152
+ <value id="xs">16</value>
153
+ <value id="sm">20</value>
154
+ <value id="md">24</value>
155
+ <value id="lg">28</value>
156
+ <value id="xl">28</value>
157
+ <value id="2xl">32</value>
158
+ <value id="3xl">36</value>
159
+ <value id="4xl">40</value>
160
+ <value id="5xl">1</value>
161
+ <value id="6xl">1</value>
162
+ <value id="7xl">1</value>
163
+ <value id="8xl">1</value>
164
+ <value id="9xl">1</value>
165
+ </values>
166
+ </token>
167
+ <!-- Letter Spacing Scale -->
168
+ <token id="letterSpacings" kind="scale" unit="em">
169
+ <values>
170
+ <value id="tighter">-0.05</value>
171
+ <value id="tight">-0.025</value>
172
+ <value id="normal">0</value>
173
+ <value id="wide">0.025</value>
174
+ <value id="wider">0.05</value>
175
+ <value id="widest">0.1</value>
176
+ </values>
177
+ </token>
178
+ <!-- Color Palette -->
179
+ <token id="color" kind="color">
180
+ <values>
181
+ <!-- Primary Colors -->
182
+ <value id="primary.50">#EFF6FF</value>
183
+ <value id="primary.100">#DBEAFE</value>
184
+ <value id="primary.200">#BFDBFE</value>
185
+ <value id="primary.300">#93C5FD</value>
186
+ <value id="primary.400">#60A5FA</value>
187
+ <value id="primary.500">#3B82F6</value>
188
+ <value id="primary.600">#2563EB</value>
189
+ <value id="primary.700">#1D4ED8</value>
190
+ <value id="primary.800">#1E40AF</value>
191
+ <value id="primary.900">#1E3A8A</value>
192
+ <value id="primary.950">#172554</value>
193
+ <!-- Secondary Colors -->
194
+ <value id="secondary.50">#F8FAFC</value>
195
+ <value id="secondary.100">#F1F5F9</value>
196
+ <value id="secondary.200">#E2E8F0</value>
197
+ <value id="secondary.300">#CBD5E1</value>
198
+ <value id="secondary.400">#94A3B8</value>
199
+ <value id="secondary.500">#64748B</value>
200
+ <value id="secondary.600">#475569</value>
201
+ <value id="secondary.700">#334155</value>
202
+ <value id="secondary.800">#1E293B</value>
203
+ <value id="secondary.900">#0F172A</value>
204
+ <value id="secondary.950">#020617</value>
205
+ <!-- Gray Colors -->
206
+ <value id="gray.50">#FAFAFA</value>
207
+ <value id="gray.100">#F4F4F5</value>
208
+ <value id="gray.200">#E4E4E7</value>
209
+ <value id="gray.300">#D4D4D8</value>
210
+ <value id="gray.400">#A1A1AA</value>
211
+ <value id="gray.500">#71717A</value>
212
+ <value id="gray.600">#52525B</value>
213
+ <value id="gray.700">#3F3F46</value>
214
+ <value id="gray.800">#27272A</value>
215
+ <value id="gray.900">#18181B</value>
216
+ <value id="gray.950">#09090B</value>
217
+ <!-- Success Colors -->
218
+ <value id="success.50">#F0FDF4</value>
219
+ <value id="success.100">#DCFCE7</value>
220
+ <value id="success.200">#BBF7D0</value>
221
+ <value id="success.300">#86EFAC</value>
222
+ <value id="success.400">#4ADE80</value>
223
+ <value id="success.500">#22C55E</value>
224
+ <value id="success.600">#16A34A</value>
225
+ <value id="success.700">#15803D</value>
226
+ <value id="success.800">#166534</value>
227
+ <value id="success.900">#14532D</value>
228
+ <value id="success.950">#052E16</value>
229
+ <!-- Warning Colors -->
230
+ <value id="warning.50">#FFFBEB</value>
231
+ <value id="warning.100">#FEF3C7</value>
232
+ <value id="warning.200">#FDE68A</value>
233
+ <value id="warning.300">#FCD34D</value>
234
+ <value id="warning.400">#FBBF24</value>
235
+ <value id="warning.500">#F59E0B</value>
236
+ <value id="warning.600">#D97706</value>
237
+ <value id="warning.700">#B45309</value>
238
+ <value id="warning.800">#92400E</value>
239
+ <value id="warning.900">#78350F</value>
240
+ <value id="warning.950">#451A03</value>
241
+ <!-- Error Colors -->
242
+ <value id="error.50">#FEF2F2</value>
243
+ <value id="error.100">#FEE2E2</value>
244
+ <value id="error.200">#FECACA</value>
245
+ <value id="error.300">#FCA5A5</value>
246
+ <value id="error.400">#F87171</value>
247
+ <value id="error.500">#EF4444</value>
248
+ <value id="error.600">#DC2626</value>
249
+ <value id="error.700">#B91C1C</value>
250
+ <value id="error.800">#991B1B</value>
251
+ <value id="error.900">#7F1D1D</value>
252
+ <value id="error.950">#450A0A</value>
253
+ <!-- Info Colors -->
254
+ <value id="info.50">#F0F9FF</value>
255
+ <value id="info.100">#E0F2FE</value>
256
+ <value id="info.200">#BAE6FD</value>
257
+ <value id="info.300">#7DD3FC</value>
258
+ <value id="info.400">#38BDF8</value>
259
+ <value id="info.500">#0EA5E9</value>
260
+ <value id="info.600">#0284C7</value>
261
+ <value id="info.700">#0369A1</value>
262
+ <value id="info.800">#075985</value>
263
+ <value id="info.900">#0C4A6E</value>
264
+ <value id="info.950">#082F49</value>
265
+ <!-- Special Colors -->
266
+ <value id="neutral.900">#262626</value>
267
+ <value id="white">#FFFFFF</value>
268
+ <value id="black">#000000</value>
269
+ <value id="transparent">transparent</value>
270
+ </values>
271
+ </token>
272
+ <!-- Shadows -->
273
+ <token id="shadow" kind="shadow">
274
+ <values>
275
+ <value id="sm">
276
+ <color>
277
+ <ref>$ref.tokens.color.black</ref>
278
+ </color>
279
+ <offset>
280
+ <x>0</x>
281
+ <y>1</y>
282
+ </offset>
283
+ <opacity>0.05</opacity>
284
+ <radius>2</radius>
285
+ <elevation>1</elevation>
286
+ </value>
287
+ <value id="md">
288
+ <color>
289
+ <ref>$ref.tokens.color.black</ref>
290
+ </color>
291
+ <offset>
292
+ <x>0</x>
293
+ <y>3</y>
294
+ </offset>
295
+ <opacity>0.1</opacity>
296
+ <radius>4</radius>
297
+ <elevation>3</elevation>
298
+ </value>
299
+ <value id="lg">
300
+ <color>
301
+ <ref>$ref.tokens.color.black</ref>
302
+ </color>
303
+ <offset>
304
+ <x>0</x>
305
+ <y>6</y>
306
+ </offset>
307
+ <opacity>0.1</opacity>
308
+ <radius>12</radius>
309
+ <elevation>6</elevation>
310
+ </value>
311
+ <value id="xl">
312
+ <color>
313
+ <ref>$ref.tokens.color.black</ref>
314
+ </color>
315
+ <offset>
316
+ <x>0</x>
317
+ <y>12</y>
318
+ </offset>
319
+ <opacity>0.14</opacity>
320
+ <radius>24</radius>
321
+ <elevation>10</elevation>
322
+ </value>
323
+ <!-- Hard / soft shadows (gluestack decorative set) -->
324
+ <value id="hard-1">
325
+ <color>
326
+ <ref>$ref.tokens.color.neutral.900</ref>
327
+ </color>
328
+ <offset>
329
+ <x>-2</x>
330
+ <y>2</y>
331
+ </offset>
332
+ <opacity>0.2</opacity>
333
+ <radius>8</radius>
334
+ <elevation>1</elevation>
335
+ </value>
336
+ <value id="hard-2">
337
+ <color>
338
+ <ref>$ref.tokens.color.neutral.900</ref>
339
+ </color>
340
+ <offset>
341
+ <x>0</x>
342
+ <y>3</y>
343
+ </offset>
344
+ <opacity>0.2</opacity>
345
+ <radius>10</radius>
346
+ <elevation>1</elevation>
347
+ </value>
348
+ <value id="hard-3">
349
+ <color>
350
+ <ref>$ref.tokens.color.neutral.900</ref>
351
+ </color>
352
+ <offset>
353
+ <x>2</x>
354
+ <y>2</y>
355
+ </offset>
356
+ <opacity>0.2</opacity>
357
+ <radius>8</radius>
358
+ <elevation>1</elevation>
359
+ </value>
360
+ <value id="hard-4">
361
+ <color>
362
+ <ref>$ref.tokens.color.neutral.900</ref>
363
+ </color>
364
+ <offset>
365
+ <x>0</x>
366
+ <y>-3</y>
367
+ </offset>
368
+ <opacity>0.2</opacity>
369
+ <radius>10</radius>
370
+ <elevation>1</elevation>
371
+ </value>
372
+ <value id="hard-5">
373
+ <color>
374
+ <ref>$ref.tokens.color.neutral.900</ref>
375
+ </color>
376
+ <offset>
377
+ <x>0</x>
378
+ <y>2</y>
379
+ </offset>
380
+ <opacity>0.1</opacity>
381
+ <radius>10</radius>
382
+ <elevation>1</elevation>
383
+ </value>
384
+ <value id="soft-1">
385
+ <color>
386
+ <ref>$ref.tokens.color.neutral.900</ref>
387
+ </color>
388
+ <offset>
389
+ <x>0</x>
390
+ <y>0</y>
391
+ </offset>
392
+ <opacity>0.1</opacity>
393
+ <radius>10</radius>
394
+ <elevation>1</elevation>
395
+ </value>
396
+ <value id="soft-2">
397
+ <color>
398
+ <ref>$ref.tokens.color.neutral.900</ref>
399
+ </color>
400
+ <offset>
401
+ <x>0</x>
402
+ <y>0</y>
403
+ </offset>
404
+ <opacity>0.2</opacity>
405
+ <radius>20</radius>
406
+ <elevation>1</elevation>
407
+ </value>
408
+ <value id="soft-3">
409
+ <color>
410
+ <ref>$ref.tokens.color.neutral.900</ref>
411
+ </color>
412
+ <offset>
413
+ <x>0</x>
414
+ <y>0</y>
415
+ </offset>
416
+ <opacity>0.1</opacity>
417
+ <radius>30</radius>
418
+ <elevation>1</elevation>
419
+ </value>
420
+ <value id="soft-4">
421
+ <color>
422
+ <ref>$ref.tokens.color.neutral.900</ref>
423
+ </color>
424
+ <offset>
425
+ <x>0</x>
426
+ <y>0</y>
427
+ </offset>
428
+ <opacity>0.1</opacity>
429
+ <radius>40</radius>
430
+ <elevation>1</elevation>
431
+ </value>
432
+ </values>
433
+ </token>
434
+ <!-- Z-Index Map -->
435
+ <token id="zIndex" kind="map">
436
+ <values>
437
+ <value id="base">0</value>
438
+ <value id="sticky">100</value>
439
+ <value id="dropdown">1000</value>
440
+ <value id="popover">1500</value>
441
+ <value id="overlay">1300</value>
442
+ <value id="drawer">1400</value>
443
+ <value id="modal">2000</value>
444
+ <value id="toast">3000</value>
445
+ <value id="tooltip">3100</value>
446
+ </values>
447
+ </token>
448
+ <!-- Opacity Map -->
449
+ <token id="opacity" kind="map">
450
+ <values>
451
+ <value id="faint">0.08</value>
452
+ <value id="muted">0.4</value>
453
+ <value id="dim">0.6</value>
454
+ <value id="solid">1</value>
455
+ </values>
456
+ </token>
457
+ <!-- Animation Duration Map -->
458
+ <token id="duration" kind="map" unit="ms">
459
+ <values>
460
+ <value id="instant">0</value>
461
+ <value id="fastest">80</value>
462
+ <value id="fast">120</value>
463
+ <value id="normal">200</value>
464
+ <value id="slow">350</value>
465
+ <value id="slower">500</value>
466
+ <value id="slowest">700</value>
467
+ </values>
468
+ </token>
469
+ <!-- Animation Easing Map -->
470
+ <token id="easing" kind="animation">
471
+ <values>
472
+ <value id="standard">
473
+ <native>
474
+ <v>0.4</v>
475
+ <v>0</v>
476
+ <v>0.2</v>
477
+ <v>1</v>
478
+ </native>
479
+ <web>cubic-bezier(0.4, 0, 0.2, 1)</web>
480
+ </value>
481
+ <value id="enter">
482
+ <native>
483
+ <v>0</v>
484
+ <v>0</v>
485
+ <v>0.2</v>
486
+ <v>1</v>
487
+ </native>
488
+ <web>cubic-bezier(0, 0, 0.2, 1)</web>
489
+ </value>
490
+ <value id="exit">
491
+ <native>
492
+ <v>0.4</v>
493
+ <v>0</v>
494
+ <v>1</v>
495
+ <v>1</v>
496
+ </native>
497
+ <web>cubic-bezier(0.4, 0, 1, 1)</web>
498
+ </value>
499
+ <value id="spring">
500
+ <native>
501
+ <damping>14</damping>
502
+ <stiffness>220</stiffness>
503
+ <mass>1</mass>
504
+ </native>
505
+ <web>spring</web>
506
+ </value>
507
+ </values>
508
+ </token>
509
+ </items>
510
+ </tokens>
@@ -0,0 +1,165 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * design/tools/design.js — cross-platform npm entry point for the design
4
+ * toolchain (mirrors design/tools/windows/*.cmd and design/tools/unix/*.sh).
5
+ *
6
+ * Usage:
7
+ * node design/tools/design.js <target> [extra args...]
8
+ *
9
+ * Targets (same semantics as the .cmd/.sh wrappers):
10
+ * gen generate.py — compile tokens/themes into the gluestack config
11
+ * check checker.py — determinism rules + XSD pass + ruff lint of sources/
12
+ * verify checker.py — verify committed canonical index
13
+ * canonical checker.py — re-emit design/canonical.index.txt
14
+ * lint linter.py — XSD-validate every design XML
15
+ * doc docgen.py — regenerate docs/generated from documentation.xml
16
+ * edit xmleditor.py — visual, XSD-driven XML block editor (GUI by default)
17
+ * run passthrough — run any sources/*.py with the resolved python
18
+ *
19
+ * Python resolution order:
20
+ * 1. $FOUNDATION_PYTHON (explicit override)
21
+ * 2. design/tools/.venv (Scripts/python.exe on Windows, bin/python otherwise)
22
+ * 3. `python3` then `python` on PATH
23
+ *
24
+ * Examples:
25
+ * node design/tools/design.js gen --check
26
+ * node design/tools/design.js gen --element Button
27
+ * node design/tools/design.js run checker.py --list-rules -m design/manifest.xml
28
+ */
29
+ 'use strict';
30
+
31
+ const { spawnSync } = require('child_process');
32
+ const fs = require('fs');
33
+ const path = require('path');
34
+
35
+ const TOOLS_DIR = __dirname;
36
+ const DESIGN_DIR = process.env.FOUNDATION_DESIGN_DIR
37
+ ? path.resolve(process.env.FOUNDATION_DESIGN_DIR)
38
+ : path.join(TOOLS_DIR, '..');
39
+ const SOURCES_DIR = path.join(DESIGN_DIR, 'tools', 'sources');
40
+ const REPO_ROOT = process.env.FOUNDATION_PROJECT_ROOT
41
+ ? path.resolve(process.env.FOUNDATION_PROJECT_ROOT)
42
+ : path.join(DESIGN_DIR, '..');
43
+
44
+ const MANIFEST = path.join(DESIGN_DIR, 'manifest.xml');
45
+ const SCHEMA = path.join(DESIGN_DIR, 'schema.xsd');
46
+ const DOCUMENTATION = path.join(DESIGN_DIR, 'documentation.xml');
47
+ const DOCS_OUT = path.join(REPO_ROOT, 'docs', 'generated');
48
+
49
+ const TARGETS = {
50
+ gen: {
51
+ script: 'generate.py',
52
+ args: ['--manifest', MANIFEST, '--root', REPO_ROOT],
53
+ },
54
+ check: {
55
+ script: 'checker.py',
56
+ args: ['--manifest', MANIFEST, '--root', REPO_ROOT, '--schema', SCHEMA, '--check'],
57
+ },
58
+ verify: {
59
+ script: 'checker.py',
60
+ args: ['--manifest', MANIFEST, '--root', REPO_ROOT, '--verify-canonical'],
61
+ },
62
+ canonical: {
63
+ script: 'checker.py',
64
+ args: ['--manifest', MANIFEST, '--root', REPO_ROOT, '--emit-canonical'],
65
+ },
66
+ lint: {
67
+ script: 'linter.py',
68
+ args: ['--schema', SCHEMA, '--manifest', MANIFEST, '--dir', DESIGN_DIR],
69
+ },
70
+ doc: {
71
+ script: 'docgen.py',
72
+ args: ['--manifest', MANIFEST, '--documentation', DOCUMENTATION,
73
+ '--root', REPO_ROOT, '--out', DOCS_OUT],
74
+ },
75
+ pipeline: {
76
+ script: null,
77
+ args: [],
78
+ },
79
+ edit: {
80
+ script: 'xmleditor.py',
81
+ // No default args: an optional positional XML file and every CLI flag
82
+ // (--list-roots, --validate, --new, ...) pass through untouched.
83
+ args: [],
84
+ },
85
+ run: {
86
+ script: null, // passthrough: first extra arg is the script name
87
+ args: [],
88
+ },
89
+ };
90
+
91
+ function findPython() {
92
+ if (process.env.FOUNDATION_PYTHON) return process.env.FOUNDATION_PYTHON;
93
+
94
+ const venvDir = path.join(TOOLS_DIR, '.venv');
95
+ const venvCandidates = process.platform === 'win32'
96
+ ? [path.join(venvDir, 'Scripts', 'python.exe')]
97
+ : [path.join(venvDir, 'bin', 'python3'), path.join(venvDir, 'bin', 'python')];
98
+ for (const candidate of venvCandidates) {
99
+ if (fs.existsSync(candidate)) return candidate;
100
+ }
101
+
102
+ const pathExes = process.platform === 'win32'
103
+ ? ['python.exe', 'python3.exe']
104
+ : ['python3', 'python'];
105
+ for (const exe of pathExes) {
106
+ try {
107
+ const probe = spawnSync(exe, ['-c', 'import lxml.etree'], { stdio: 'ignore' });
108
+ if (probe.status === 0) return exe;
109
+ } catch (_) { /* not on PATH */ }
110
+ }
111
+ return null;
112
+ }
113
+
114
+ function main() {
115
+ const [target, ...extra] = process.argv.slice(2);
116
+ const spec = TARGETS[target];
117
+ if (!spec) {
118
+ process.stderr.write(
119
+ 'Unknown target: %s\nAvailable targets: %s\n'.replace('%s', String(target))
120
+ .replace('%s', Object.keys(TARGETS).join(', ')));
121
+ process.exit(2);
122
+ }
123
+
124
+ let scriptPath;
125
+ let args;
126
+ if (target === 'pipeline') {
127
+ for (const step of ['gen', 'check', 'verify', 'lint', 'doc']) {
128
+ const result = spawnSync(process.execPath, [__filename, step, ...extra], {
129
+ stdio: 'inherit',
130
+ env: process.env,
131
+ });
132
+ if (result.status !== 0) process.exit(result.status == null ? 1 : result.status);
133
+ }
134
+ process.exit(0);
135
+ }
136
+ if (target === 'run') {
137
+ const scriptName = extra.shift();
138
+ if (!scriptName) {
139
+ process.stderr.write('Usage: node design/tools/design.js run <script.py> [args...]\n');
140
+ process.exit(2);
141
+ }
142
+ scriptPath = path.join(SOURCES_DIR, scriptName);
143
+ args = extra;
144
+ } else {
145
+ scriptPath = path.join(SOURCES_DIR, spec.script);
146
+ args = spec.args.concat(extra);
147
+ }
148
+
149
+ const python = findPython();
150
+ if (!python) {
151
+ process.stderr.write(
152
+ 'No suitable Python found. Create the project venv or set FOUNDATION_PYTHON.\n' +
153
+ ' C:/opt/Python38-32/python3.exe -m venv --without-pip --system-site-packages design/tools/.venv\n');
154
+ process.exit(2);
155
+ }
156
+
157
+ const result = spawnSync(python, [scriptPath].concat(args), { stdio: 'inherit' });
158
+ if (result.error) {
159
+ process.stderr.write(String(result.error) + '\n');
160
+ process.exit(1);
161
+ }
162
+ process.exit(result.status == null ? 1 : result.status);
163
+ }
164
+
165
+ main();