bleam 0.0.4 → 0.0.6

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 (114) hide show
  1. package/dist/ai.cjs +187 -0
  2. package/dist/ai.d.cts +52 -0
  3. package/dist/ai.d.ts +52 -0
  4. package/dist/ai.js +182 -0
  5. package/dist/animated.cjs +286 -0
  6. package/dist/animated.d.cts +47 -0
  7. package/dist/animated.d.ts +47 -0
  8. package/dist/animated.js +281 -0
  9. package/dist/app.d.cts +1 -2
  10. package/dist/app.d.ts +1 -2
  11. package/dist/app.js +1 -2
  12. package/dist/bundler.d.cts +1 -2
  13. package/dist/bundler.d.ts +1 -2
  14. package/dist/chrome.cjs +265 -0
  15. package/dist/chrome.d.cts +19 -0
  16. package/dist/chrome.d.ts +19 -0
  17. package/dist/chrome.js +262 -0
  18. package/dist/cli.cjs +918 -68
  19. package/dist/cli.js +917 -71
  20. package/dist/config-Bb6SULnR.cjs +46 -0
  21. package/dist/config-CfWa3q-k.js +28 -0
  22. package/dist/config-ClDGHNb3.d.ts +39 -0
  23. package/dist/config-D3gPaVMb.d.cts +39 -0
  24. package/dist/config.cjs +4 -25
  25. package/dist/config.d.cts +2 -28
  26. package/dist/config.d.ts +2 -28
  27. package/dist/config.js +2 -24
  28. package/dist/crypto-BB92-Upx.js +7 -0
  29. package/dist/crypto-CT3VZ7lF.cjs +13 -0
  30. package/dist/crypto.cjs +2 -2
  31. package/dist/crypto.d.cts +8 -1
  32. package/dist/crypto.d.ts +8 -1
  33. package/dist/crypto.js +2 -2
  34. package/dist/dev-protocol.d.cts +3 -3
  35. package/dist/dev-protocol.d.ts +3 -3
  36. package/dist/dev-protocol.js +1 -2
  37. package/dist/fs.cjs +12 -2
  38. package/dist/fs.d.cts +7 -1
  39. package/dist/fs.d.ts +7 -1
  40. package/dist/fs.js +10 -1
  41. package/dist/index.cjs +4 -5
  42. package/dist/index.d.cts +2 -3
  43. package/dist/index.d.ts +2 -3
  44. package/dist/index.js +2 -4
  45. package/dist/native-macos-D6p2SmUj.js +20 -0
  46. package/dist/native-macos-DLwo_ii9.cjs +31 -0
  47. package/dist/native-runtime-C85Nuc4F.js +10 -0
  48. package/dist/native-runtime-CbPzrs8j.d.cts +33 -0
  49. package/dist/{native-runtime-CdeT0JyQ.cjs → native-runtime-CsXnXkQn.cjs} +1 -14
  50. package/dist/native-runtime-DxHSrsTX.d.ts +33 -0
  51. package/dist/native.cjs +35 -32
  52. package/dist/native.d.cts +4 -34
  53. package/dist/native.d.ts +3 -33
  54. package/dist/native.js +36 -34
  55. package/dist/runtime.d.cts +1 -2
  56. package/dist/runtime.d.ts +1 -2
  57. package/dist/schema-BOuUHcqo.d.cts +58 -0
  58. package/dist/schema-DVmoD9JL.js +90 -0
  59. package/dist/schema-bxeeCyLn.cjs +102 -0
  60. package/dist/schema-ipsECAso.d.ts +58 -0
  61. package/dist/schema.cjs +4 -0
  62. package/dist/schema.d.cts +2 -0
  63. package/dist/schema.d.ts +2 -0
  64. package/dist/schema.js +3 -0
  65. package/dist/state.cjs +765 -0
  66. package/dist/state.d.cts +129 -0
  67. package/dist/state.d.ts +129 -0
  68. package/dist/state.js +747 -0
  69. package/dist/styles.cjs +742 -0
  70. package/dist/styles.d.cts +701 -0
  71. package/dist/styles.d.ts +701 -0
  72. package/dist/styles.js +739 -0
  73. package/dist/ui.cjs +113 -0
  74. package/dist/ui.d.cts +30 -0
  75. package/dist/ui.d.ts +30 -0
  76. package/dist/ui.js +110 -0
  77. package/metro-config.cjs +18 -13
  78. package/package.json +48 -13
  79. package/templates/basic/app/index.tsx +136 -0
  80. package/templates/basic/app.config.ts +4 -2
  81. package/dist/app.d.cts.map +0 -1
  82. package/dist/app.d.ts.map +0 -1
  83. package/dist/app.js.map +0 -1
  84. package/dist/bundler.d.cts.map +0 -1
  85. package/dist/bundler.d.ts.map +0 -1
  86. package/dist/cli.js.map +0 -1
  87. package/dist/config.d.cts.map +0 -1
  88. package/dist/config.d.ts.map +0 -1
  89. package/dist/config.js.map +0 -1
  90. package/dist/crypto-BNhWeXMj.cjs +0 -15
  91. package/dist/crypto-Bg8cD8wX.d.cts +0 -8
  92. package/dist/crypto-Bg8cD8wX.d.cts.map +0 -1
  93. package/dist/crypto-CCA_hvao.js +0 -11
  94. package/dist/crypto-CCA_hvao.js.map +0 -1
  95. package/dist/crypto-IOzbNoJD.d.ts +0 -8
  96. package/dist/crypto-IOzbNoJD.d.ts.map +0 -1
  97. package/dist/dev-protocol.d.cts.map +0 -1
  98. package/dist/dev-protocol.d.ts.map +0 -1
  99. package/dist/dev-protocol.js.map +0 -1
  100. package/dist/fs-BK7joD1g.js +0 -13
  101. package/dist/fs-BK7joD1g.js.map +0 -1
  102. package/dist/fs-CEhcjuN6.d.ts +0 -9
  103. package/dist/fs-CEhcjuN6.d.ts.map +0 -1
  104. package/dist/fs-CfE8CHf_.d.cts +0 -9
  105. package/dist/fs-CfE8CHf_.d.cts.map +0 -1
  106. package/dist/fs-DKHYTPua.cjs +0 -18
  107. package/dist/native-runtime-BoqybBBf.js +0 -18
  108. package/dist/native-runtime-BoqybBBf.js.map +0 -1
  109. package/dist/native.d.cts.map +0 -1
  110. package/dist/native.d.ts.map +0 -1
  111. package/dist/native.js.map +0 -1
  112. package/dist/runtime.d.cts.map +0 -1
  113. package/dist/runtime.d.ts.map +0 -1
  114. package/templates/basic/app.tsx +0 -18
package/dist/styles.js ADDED
@@ -0,0 +1,739 @@
1
+ import { Appearance, PlatformColor } from "react-native";
2
+
3
+ //#region src/styles.ts
4
+ const isDev = process.env.NODE_ENV !== "production";
5
+ const spacing = {
6
+ "0": 0,
7
+ px: 1,
8
+ "0.5": 2,
9
+ "1": 4,
10
+ "1.5": 6,
11
+ "2": 8,
12
+ "2.5": 10,
13
+ "3": 12,
14
+ "3.5": 14,
15
+ "4": 16,
16
+ "5": 20,
17
+ "6": 24,
18
+ "7": 28,
19
+ "8": 32,
20
+ "9": 36,
21
+ "10": 40,
22
+ "11": 44,
23
+ "12": 48,
24
+ "14": 56,
25
+ "16": 64,
26
+ "20": 80,
27
+ "24": 96,
28
+ "28": 112,
29
+ "32": 128,
30
+ "36": 144,
31
+ "40": 160,
32
+ "44": 176,
33
+ "48": 192,
34
+ "52": 208,
35
+ "56": 224,
36
+ "60": 240,
37
+ "64": 256,
38
+ "72": 288,
39
+ "80": 320,
40
+ "96": 384
41
+ };
42
+ const fontSizes = {
43
+ xs: {
44
+ fontSize: 12,
45
+ lineHeight: 16
46
+ },
47
+ sm: {
48
+ fontSize: 14,
49
+ lineHeight: 20
50
+ },
51
+ base: {
52
+ fontSize: 16,
53
+ lineHeight: 24
54
+ },
55
+ lg: {
56
+ fontSize: 18,
57
+ lineHeight: 28
58
+ },
59
+ xl: {
60
+ fontSize: 20,
61
+ lineHeight: 28
62
+ },
63
+ "2xl": {
64
+ fontSize: 24,
65
+ lineHeight: 32
66
+ },
67
+ "3xl": {
68
+ fontSize: 30,
69
+ lineHeight: 36
70
+ },
71
+ "4xl": {
72
+ fontSize: 36,
73
+ lineHeight: 40
74
+ },
75
+ "5xl": {
76
+ fontSize: 48,
77
+ lineHeight: 56
78
+ },
79
+ "6xl": {
80
+ fontSize: 60,
81
+ lineHeight: 68
82
+ }
83
+ };
84
+ const tracking = {
85
+ tighter: -.8,
86
+ tight: -.4,
87
+ normal: 0,
88
+ wide: .8,
89
+ wider: 1.5,
90
+ widest: 3.2
91
+ };
92
+ const lineHeights = {
93
+ none: 1,
94
+ "3": 12,
95
+ "4": 16,
96
+ "5": 20,
97
+ "6": 24,
98
+ "7": 28,
99
+ "8": 32,
100
+ "9": 36,
101
+ "10": 40
102
+ };
103
+ const fractions = {
104
+ "1/2": "50%",
105
+ "1/3": "33.333333%",
106
+ "2/3": "66.666667%",
107
+ "1/4": "25%",
108
+ "2/4": "50%",
109
+ "3/4": "75%",
110
+ "1/5": "20%",
111
+ "2/5": "40%",
112
+ "3/5": "60%",
113
+ "4/5": "80%",
114
+ "1/6": "16.666667%",
115
+ "2/6": "33.333333%",
116
+ "3/6": "50%",
117
+ "4/6": "66.666667%",
118
+ "5/6": "83.333333%",
119
+ "1/12": "8.333333%",
120
+ "2/12": "16.666667%",
121
+ "3/12": "25%",
122
+ "4/12": "33.333333%",
123
+ "5/12": "41.666667%",
124
+ "6/12": "50%",
125
+ "7/12": "58.333333%",
126
+ "8/12": "66.666667%",
127
+ "9/12": "75%",
128
+ "10/12": "83.333333%",
129
+ "11/12": "91.666667%"
130
+ };
131
+ const maxWidths = {
132
+ xs: 320,
133
+ sm: 384,
134
+ md: 448,
135
+ lg: 512,
136
+ xl: 576,
137
+ "2xl": 672,
138
+ "3xl": 768,
139
+ "4xl": 896,
140
+ "5xl": 1024,
141
+ "6xl": 1152,
142
+ "7xl": 1280
143
+ };
144
+ const maxHeights = {
145
+ xs: 320,
146
+ sm: 384,
147
+ md: 448,
148
+ lg: 512,
149
+ xl: 576,
150
+ "2xl": 672,
151
+ "3xl": 768,
152
+ "4xl": 896,
153
+ "5xl": 1024,
154
+ "6xl": 1152,
155
+ "7xl": 1280
156
+ };
157
+ const rotateTransforms = {
158
+ "0": "0deg",
159
+ "1": "1deg",
160
+ "2": "2deg",
161
+ "3": "3deg",
162
+ "6": "6deg",
163
+ "12": "12deg",
164
+ "30": "30deg",
165
+ "45": "45deg",
166
+ "90": "90deg",
167
+ "180": "180deg"
168
+ };
169
+ const scaleTransforms = {
170
+ "50": .5,
171
+ "75": .75,
172
+ "90": .9,
173
+ "95": .95,
174
+ "100": 1,
175
+ "105": 1.05,
176
+ "110": 1.1,
177
+ "125": 1.25,
178
+ "150": 1.5
179
+ };
180
+ const borderWidths = [
181
+ "0",
182
+ "2",
183
+ "4",
184
+ "8"
185
+ ];
186
+ const borderSides = {
187
+ t: "borderTopWidth",
188
+ r: "borderRightWidth",
189
+ b: "borderBottomWidth",
190
+ l: "borderLeftWidth"
191
+ };
192
+ const opacityValues = [
193
+ 0,
194
+ 5,
195
+ 10,
196
+ 15,
197
+ 20,
198
+ 25,
199
+ 30,
200
+ 35,
201
+ 40,
202
+ 45,
203
+ 50,
204
+ 55,
205
+ 60,
206
+ 65,
207
+ 70,
208
+ 75,
209
+ 80,
210
+ 85,
211
+ 90,
212
+ 95,
213
+ 100
214
+ ];
215
+ const radii = {
216
+ none: 0,
217
+ sm: 2,
218
+ DEFAULT: 4,
219
+ md: 6,
220
+ lg: 8,
221
+ xl: 12,
222
+ "2xl": 16,
223
+ "3xl": 24,
224
+ full: 9999
225
+ };
226
+ const paletteColors = {
227
+ transparent: "transparent",
228
+ black: "#000000",
229
+ white: "#ffffff",
230
+ "slate-50": "#f8fafc",
231
+ "slate-100": "#f1f5f9",
232
+ "slate-200": "#e2e8f0",
233
+ "slate-300": "#cbd5e1",
234
+ "slate-400": "#94a3b8",
235
+ "slate-500": "#64748b",
236
+ "slate-600": "#475569",
237
+ "slate-700": "#334155",
238
+ "slate-800": "#1e293b",
239
+ "slate-900": "#0f172a",
240
+ "slate-950": "#020617",
241
+ "gray-50": "#f9fafb",
242
+ "gray-100": "#f3f4f6",
243
+ "gray-200": "#e5e7eb",
244
+ "gray-300": "#d1d5db",
245
+ "gray-400": "#9ca3af",
246
+ "gray-500": "#6b7280",
247
+ "gray-600": "#4b5563",
248
+ "gray-700": "#374151",
249
+ "gray-800": "#1f2937",
250
+ "gray-900": "#111827",
251
+ "gray-950": "#030712",
252
+ "zinc-50": "#fafafa",
253
+ "zinc-100": "#f4f4f5",
254
+ "zinc-200": "#e4e4e7",
255
+ "zinc-300": "#d4d4d8",
256
+ "zinc-400": "#a1a1aa",
257
+ "zinc-500": "#71717a",
258
+ "zinc-600": "#52525b",
259
+ "zinc-700": "#3f3f46",
260
+ "zinc-800": "#27272a",
261
+ "zinc-900": "#18181b",
262
+ "zinc-950": "#09090b",
263
+ "neutral-50": "#fafafa",
264
+ "neutral-100": "#f5f5f5",
265
+ "neutral-200": "#e5e5e5",
266
+ "neutral-300": "#d4d4d4",
267
+ "neutral-400": "#a3a3a3",
268
+ "neutral-500": "#737373",
269
+ "neutral-600": "#525252",
270
+ "neutral-700": "#404040",
271
+ "neutral-800": "#262626",
272
+ "neutral-900": "#171717",
273
+ "neutral-950": "#0a0a0a",
274
+ "stone-50": "#fafaf9",
275
+ "stone-100": "#f5f5f4",
276
+ "stone-200": "#e7e5e4",
277
+ "stone-300": "#d6d3d1",
278
+ "stone-400": "#a8a29e",
279
+ "stone-500": "#78716c",
280
+ "stone-600": "#57534e",
281
+ "stone-700": "#44403c",
282
+ "stone-800": "#292524",
283
+ "stone-900": "#1c1917",
284
+ "stone-950": "#0c0a09",
285
+ "red-50": "#fef2f2",
286
+ "red-100": "#fee2e2",
287
+ "red-200": "#fecaca",
288
+ "red-300": "#fca5a5",
289
+ "red-400": "#f87171",
290
+ "red-500": "#ef4444",
291
+ "red-600": "#dc2626",
292
+ "red-700": "#b91c1c",
293
+ "red-800": "#991b1b",
294
+ "red-900": "#7f1d1d",
295
+ "red-950": "#450a0a",
296
+ "orange-50": "#fff7ed",
297
+ "orange-100": "#ffedd5",
298
+ "orange-200": "#fed7aa",
299
+ "orange-300": "#fdba74",
300
+ "orange-400": "#fb923c",
301
+ "orange-500": "#f97316",
302
+ "orange-600": "#ea580c",
303
+ "orange-700": "#c2410c",
304
+ "orange-800": "#9a3412",
305
+ "orange-900": "#7c2d12",
306
+ "orange-950": "#431407",
307
+ "amber-50": "#fffbeb",
308
+ "amber-100": "#fef3c7",
309
+ "amber-200": "#fde68a",
310
+ "amber-300": "#fcd34d",
311
+ "amber-400": "#fbbf24",
312
+ "amber-500": "#f59e0b",
313
+ "amber-600": "#d97706",
314
+ "amber-700": "#b45309",
315
+ "amber-800": "#92400e",
316
+ "amber-900": "#78350f",
317
+ "amber-950": "#451a03",
318
+ "yellow-50": "#fefce8",
319
+ "yellow-100": "#fef9c3",
320
+ "yellow-200": "#fef08a",
321
+ "yellow-300": "#fde047",
322
+ "yellow-400": "#facc15",
323
+ "yellow-500": "#eab308",
324
+ "yellow-600": "#ca8a04",
325
+ "yellow-700": "#a16207",
326
+ "yellow-800": "#854d0e",
327
+ "yellow-900": "#713f12",
328
+ "yellow-950": "#422006",
329
+ "lime-50": "#f7fee7",
330
+ "lime-100": "#ecfccb",
331
+ "lime-200": "#d9f99d",
332
+ "lime-300": "#bef264",
333
+ "lime-400": "#a3e635",
334
+ "lime-500": "#84cc16",
335
+ "lime-600": "#65a30d",
336
+ "lime-700": "#4d7c0f",
337
+ "lime-800": "#3f6212",
338
+ "lime-900": "#365314",
339
+ "lime-950": "#1a2e05",
340
+ "green-50": "#f0fdf4",
341
+ "green-100": "#dcfce7",
342
+ "green-200": "#bbf7d0",
343
+ "green-300": "#86efac",
344
+ "green-400": "#4ade80",
345
+ "green-500": "#22c55e",
346
+ "green-600": "#16a34a",
347
+ "green-700": "#15803d",
348
+ "green-800": "#166534",
349
+ "green-900": "#14532d",
350
+ "green-950": "#052e16",
351
+ "emerald-50": "#ecfdf5",
352
+ "emerald-100": "#d1fae5",
353
+ "emerald-200": "#a7f3d0",
354
+ "emerald-300": "#6ee7b7",
355
+ "emerald-400": "#34d399",
356
+ "emerald-500": "#10b981",
357
+ "emerald-600": "#059669",
358
+ "emerald-700": "#047857",
359
+ "emerald-800": "#065f46",
360
+ "emerald-900": "#064e3b",
361
+ "emerald-950": "#022c22",
362
+ "teal-50": "#f0fdfa",
363
+ "teal-100": "#ccfbf1",
364
+ "teal-200": "#99f6e4",
365
+ "teal-300": "#5eead4",
366
+ "teal-400": "#2dd4bf",
367
+ "teal-500": "#14b8a6",
368
+ "teal-600": "#0d9488",
369
+ "teal-700": "#0f766e",
370
+ "teal-800": "#115e59",
371
+ "teal-900": "#134e4a",
372
+ "teal-950": "#042f2e",
373
+ "cyan-50": "#ecfeff",
374
+ "cyan-100": "#cffafe",
375
+ "cyan-200": "#a5f3fc",
376
+ "cyan-300": "#67e8f9",
377
+ "cyan-400": "#22d3ee",
378
+ "cyan-500": "#06b6d4",
379
+ "cyan-600": "#0891b2",
380
+ "cyan-700": "#0e7490",
381
+ "cyan-800": "#155e75",
382
+ "cyan-900": "#164e63",
383
+ "cyan-950": "#083344",
384
+ "sky-50": "#f0f9ff",
385
+ "sky-100": "#e0f2fe",
386
+ "sky-200": "#bae6fd",
387
+ "sky-300": "#7dd3fc",
388
+ "sky-400": "#38bdf8",
389
+ "sky-500": "#0ea5e9",
390
+ "sky-600": "#0284c7",
391
+ "sky-700": "#0369a1",
392
+ "sky-800": "#075985",
393
+ "sky-900": "#0c4a6e",
394
+ "sky-950": "#082f49",
395
+ "blue-50": "#eff6ff",
396
+ "blue-100": "#dbeafe",
397
+ "blue-200": "#bfdbfe",
398
+ "blue-300": "#93c5fd",
399
+ "blue-400": "#60a5fa",
400
+ "blue-500": "#3b82f6",
401
+ "blue-600": "#2563eb",
402
+ "blue-700": "#1d4ed8",
403
+ "blue-800": "#1e40af",
404
+ "blue-900": "#1e3a8a",
405
+ "blue-950": "#172554",
406
+ "indigo-50": "#eef2ff",
407
+ "indigo-100": "#e0e7ff",
408
+ "indigo-200": "#c7d2fe",
409
+ "indigo-300": "#a5b4fc",
410
+ "indigo-400": "#818cf8",
411
+ "indigo-500": "#6366f1",
412
+ "indigo-600": "#4f46e5",
413
+ "indigo-700": "#4338ca",
414
+ "indigo-800": "#3730a3",
415
+ "indigo-900": "#312e81",
416
+ "indigo-950": "#1e1b4b",
417
+ "violet-50": "#f5f3ff",
418
+ "violet-100": "#ede9fe",
419
+ "violet-200": "#ddd6fe",
420
+ "violet-300": "#c4b5fd",
421
+ "violet-400": "#a78bfa",
422
+ "violet-500": "#8b5cf6",
423
+ "violet-600": "#7c3aed",
424
+ "violet-700": "#6d28d9",
425
+ "violet-800": "#5b21b6",
426
+ "violet-900": "#4c1d95",
427
+ "violet-950": "#2e1065",
428
+ "purple-50": "#faf5ff",
429
+ "purple-100": "#f3e8ff",
430
+ "purple-200": "#e9d5ff",
431
+ "purple-300": "#d8b4fe",
432
+ "purple-400": "#c084fc",
433
+ "purple-500": "#a855f7",
434
+ "purple-600": "#9333ea",
435
+ "purple-700": "#7e22ce",
436
+ "purple-800": "#6b21a8",
437
+ "purple-900": "#581c87",
438
+ "purple-950": "#3b0764",
439
+ "fuchsia-50": "#fdf4ff",
440
+ "fuchsia-100": "#fae8ff",
441
+ "fuchsia-200": "#f5d0fe",
442
+ "fuchsia-300": "#f0abfc",
443
+ "fuchsia-400": "#e879f9",
444
+ "fuchsia-500": "#d946ef",
445
+ "fuchsia-600": "#c026d3",
446
+ "fuchsia-700": "#a21caf",
447
+ "fuchsia-800": "#86198f",
448
+ "fuchsia-900": "#701a75",
449
+ "fuchsia-950": "#4a044e",
450
+ "pink-50": "#fdf2f8",
451
+ "pink-100": "#fce7f3",
452
+ "pink-200": "#fbcfe8",
453
+ "pink-300": "#f9a8d4",
454
+ "pink-400": "#f472b6",
455
+ "pink-500": "#ec4899",
456
+ "pink-600": "#db2777",
457
+ "pink-700": "#be185d",
458
+ "pink-800": "#9d174d",
459
+ "pink-900": "#831843",
460
+ "pink-950": "#500724",
461
+ "rose-50": "#fff1f2",
462
+ "rose-100": "#ffe4e6",
463
+ "rose-200": "#fecdd3",
464
+ "rose-300": "#fda4af",
465
+ "rose-400": "#fb7185",
466
+ "rose-500": "#f43f5e",
467
+ "rose-600": "#e11d48",
468
+ "rose-700": "#be123c",
469
+ "rose-800": "#9f1239",
470
+ "rose-900": "#881337",
471
+ "rose-950": "#4c0519"
472
+ };
473
+ const colors = {
474
+ system: PlatformColor("systemBackground"),
475
+ secondarySystem: PlatformColor("secondarySystemBackground"),
476
+ tertiarySystem: PlatformColor("tertiarySystemBackground"),
477
+ systemGrouped: PlatformColor("systemGroupedBackground"),
478
+ secondarySystemGrouped: PlatformColor("secondarySystemGroupedBackground"),
479
+ tertiarySystemGrouped: PlatformColor("tertiarySystemGroupedBackground"),
480
+ fill: PlatformColor("systemFill"),
481
+ secondaryFill: PlatformColor("secondarySystemFill"),
482
+ tertiaryFill: PlatformColor("tertiarySystemFill"),
483
+ quaternaryFill: PlatformColor("quaternarySystemFill"),
484
+ label: PlatformColor("label"),
485
+ secondaryLabel: PlatformColor("secondaryLabel"),
486
+ tertiaryLabel: PlatformColor("tertiaryLabel"),
487
+ quaternaryLabel: PlatformColor("quaternaryLabel"),
488
+ placeholder: PlatformColor("placeholderText"),
489
+ separator: PlatformColor("separator"),
490
+ opaqueSeparator: PlatformColor("opaqueSeparator"),
491
+ link: PlatformColor("link"),
492
+ clear: PlatformColor("clear"),
493
+ blue: PlatformColor("systemBlue"),
494
+ brown: PlatformColor("systemBrown"),
495
+ cyan: PlatformColor("systemCyan"),
496
+ green: PlatformColor("systemGreen"),
497
+ indigo: PlatformColor("systemIndigo"),
498
+ mint: PlatformColor("systemMint"),
499
+ orange: PlatformColor("systemOrange"),
500
+ pink: PlatformColor("systemPink"),
501
+ purple: PlatformColor("systemPurple"),
502
+ red: PlatformColor("systemRed"),
503
+ teal: PlatformColor("systemTeal"),
504
+ yellow: PlatformColor("systemYellow"),
505
+ gray: PlatformColor("systemGray"),
506
+ gray2: PlatformColor("systemGray2"),
507
+ gray3: PlatformColor("systemGray3"),
508
+ gray4: PlatformColor("systemGray4"),
509
+ gray5: PlatformColor("systemGray5"),
510
+ gray6: PlatformColor("systemGray6")
511
+ };
512
+ const platformColors = {
513
+ system: "systemBackground",
514
+ "secondary-system": "secondarySystemBackground",
515
+ "tertiary-system": "tertiarySystemBackground",
516
+ "system-grouped": "systemGroupedBackground",
517
+ "secondary-system-grouped": "secondarySystemGroupedBackground",
518
+ "tertiary-system-grouped": "tertiarySystemGroupedBackground",
519
+ fill: "systemFill",
520
+ "secondary-fill": "secondarySystemFill",
521
+ "tertiary-fill": "tertiarySystemFill",
522
+ "quaternary-fill": "quaternarySystemFill",
523
+ label: "label",
524
+ "secondary-label": "secondaryLabel",
525
+ "tertiary-label": "tertiaryLabel",
526
+ "quaternary-label": "quaternaryLabel",
527
+ placeholder: "placeholderText",
528
+ separator: "separator",
529
+ "opaque-separator": "opaqueSeparator",
530
+ link: "link",
531
+ clear: "clear",
532
+ "system-blue": "systemBlue",
533
+ "system-brown": "systemBrown",
534
+ "system-cyan": "systemCyan",
535
+ "system-green": "systemGreen",
536
+ "system-indigo": "systemIndigo",
537
+ "system-mint": "systemMint",
538
+ "system-orange": "systemOrange",
539
+ "system-pink": "systemPink",
540
+ "system-purple": "systemPurple",
541
+ "system-red": "systemRed",
542
+ "system-teal": "systemTeal",
543
+ "system-yellow": "systemYellow",
544
+ "system-gray": "systemGray",
545
+ "system-gray-2": "systemGray2",
546
+ "system-gray-3": "systemGray3",
547
+ "system-gray-4": "systemGray4",
548
+ "system-gray-5": "systemGray5",
549
+ "system-gray-6": "systemGray6"
550
+ };
551
+ const staticStyles = {
552
+ flex: { display: "flex" },
553
+ hidden: { display: "none" },
554
+ "flex-1": { flex: 1 },
555
+ "flex-row": { flexDirection: "row" },
556
+ "flex-col": { flexDirection: "column" },
557
+ "flex-wrap": { flexWrap: "wrap" },
558
+ "flex-nowrap": { flexWrap: "nowrap" },
559
+ "items-start": { alignItems: "flex-start" },
560
+ "items-center": { alignItems: "center" },
561
+ "items-end": { alignItems: "flex-end" },
562
+ "items-stretch": { alignItems: "stretch" },
563
+ "justify-start": { justifyContent: "flex-start" },
564
+ "justify-center": { justifyContent: "center" },
565
+ "justify-end": { justifyContent: "flex-end" },
566
+ "justify-between": { justifyContent: "space-between" },
567
+ "justify-around": { justifyContent: "space-around" },
568
+ "justify-evenly": { justifyContent: "space-evenly" },
569
+ "self-start": { alignSelf: "flex-start" },
570
+ "self-center": { alignSelf: "center" },
571
+ "self-end": { alignSelf: "flex-end" },
572
+ "self-stretch": { alignSelf: "stretch" },
573
+ relative: { position: "relative" },
574
+ absolute: { position: "absolute" },
575
+ "text-left": { textAlign: "left" },
576
+ "text-center": { textAlign: "center" },
577
+ "text-right": { textAlign: "right" },
578
+ "font-thin": { fontWeight: "100" },
579
+ "font-extralight": { fontWeight: "200" },
580
+ "font-light": { fontWeight: "300" },
581
+ "font-normal": { fontWeight: "400" },
582
+ "font-medium": { fontWeight: "500" },
583
+ "font-semibold": { fontWeight: "600" },
584
+ "font-bold": { fontWeight: "700" },
585
+ "font-extrabold": { fontWeight: "800" },
586
+ "font-black": { fontWeight: "900" },
587
+ italic: { fontStyle: "italic" },
588
+ underline: { textDecorationLine: "underline" },
589
+ "line-through": { textDecorationLine: "line-through" },
590
+ uppercase: { textTransform: "uppercase" },
591
+ lowercase: { textTransform: "lowercase" },
592
+ capitalize: { textTransform: "capitalize" },
593
+ border: { borderWidth: 1 },
594
+ "border-0": { borderWidth: 0 },
595
+ "border-2": { borderWidth: 2 },
596
+ "border-4": { borderWidth: 4 },
597
+ "border-8": { borderWidth: 8 },
598
+ "overflow-hidden": { overflow: "hidden" },
599
+ "overflow-visible": { overflow: "visible" }
600
+ };
601
+ function oneSide(property, value) {
602
+ return { [property]: value };
603
+ }
604
+ function twoSides(first, second, value) {
605
+ return {
606
+ [first]: value,
607
+ [second]: value
608
+ };
609
+ }
610
+ function fourSides(first, second, third, fourth, value) {
611
+ return {
612
+ [first]: value,
613
+ [second]: value,
614
+ [third]: value,
615
+ [fourth]: value
616
+ };
617
+ }
618
+ function createTokenStyles() {
619
+ const tokens = { ...staticStyles };
620
+ for (const [key, size] of Object.entries(spacing)) Object.assign(tokens, {
621
+ [`p-${key}`]: oneSide("padding", size),
622
+ [`px-${key}`]: twoSides("paddingLeft", "paddingRight", size),
623
+ [`py-${key}`]: twoSides("paddingTop", "paddingBottom", size),
624
+ [`pt-${key}`]: oneSide("paddingTop", size),
625
+ [`pr-${key}`]: oneSide("paddingRight", size),
626
+ [`pb-${key}`]: oneSide("paddingBottom", size),
627
+ [`pl-${key}`]: oneSide("paddingLeft", size),
628
+ [`m-${key}`]: oneSide("margin", size),
629
+ [`mx-${key}`]: twoSides("marginLeft", "marginRight", size),
630
+ [`my-${key}`]: twoSides("marginTop", "marginBottom", size),
631
+ [`mt-${key}`]: oneSide("marginTop", size),
632
+ [`mr-${key}`]: oneSide("marginRight", size),
633
+ [`mb-${key}`]: oneSide("marginBottom", size),
634
+ [`ml-${key}`]: oneSide("marginLeft", size),
635
+ [`gap-${key}`]: oneSide("gap", size),
636
+ [`w-${key}`]: oneSide("width", size),
637
+ [`h-${key}`]: oneSide("height", size),
638
+ [`max-w-${key}`]: oneSide("maxWidth", size),
639
+ [`max-h-${key}`]: oneSide("maxHeight", size),
640
+ [`inset-${key}`]: fourSides("top", "right", "bottom", "left", size),
641
+ [`inset-x-${key}`]: twoSides("left", "right", size),
642
+ [`inset-y-${key}`]: twoSides("top", "bottom", size),
643
+ [`top-${key}`]: oneSide("top", size),
644
+ [`right-${key}`]: oneSide("right", size),
645
+ [`bottom-${key}`]: oneSide("bottom", size),
646
+ [`left-${key}`]: oneSide("left", size)
647
+ });
648
+ for (const [key, maxWidth] of Object.entries(maxWidths)) tokens[`max-w-${key}`] = oneSide("maxWidth", maxWidth);
649
+ for (const [key, maxHeight] of Object.entries(maxHeights)) tokens[`max-h-${key}`] = oneSide("maxHeight", maxHeight);
650
+ tokens["w-full"] = oneSide("width", "100%");
651
+ tokens["h-full"] = oneSide("height", "100%");
652
+ tokens["max-w-full"] = oneSide("maxWidth", "100%");
653
+ tokens["max-h-full"] = oneSide("maxHeight", "100%");
654
+ for (const [key, value] of Object.entries(fractions)) {
655
+ tokens[`w-${key}`] = oneSide("width", value);
656
+ tokens[`h-${key}`] = oneSide("height", value);
657
+ tokens[`max-w-${key}`] = oneSide("maxWidth", value);
658
+ tokens[`max-h-${key}`] = oneSide("maxHeight", value);
659
+ }
660
+ for (const [key, property] of Object.entries(borderSides)) {
661
+ tokens[`border-${key}`] = oneSide(property, 1);
662
+ for (const width of borderWidths) tokens[`border-${key}-${width}`] = oneSide(property, Number(width));
663
+ }
664
+ for (const [key, rotate] of Object.entries(rotateTransforms)) {
665
+ tokens[`rotate-${key}`] = { transform: [{ rotate }] };
666
+ tokens[`-rotate-${key}`] = { transform: [{ rotate: `-${rotate}` }] };
667
+ }
668
+ for (const [key, scale] of Object.entries(scaleTransforms)) tokens[`scale-${key}`] = { transform: [{ scale }] };
669
+ tokens.rounded = oneSide("borderRadius", radii.DEFAULT);
670
+ for (const [key, radius] of Object.entries(radii)) tokens[`rounded-${key}`] = oneSide("borderRadius", radius);
671
+ for (const [key, style] of Object.entries(fontSizes)) tokens[`text-${key}`] = style;
672
+ for (const [key, letterSpacing] of Object.entries(tracking)) tokens[`tracking-${key}`] = { letterSpacing };
673
+ for (const [key, lineHeight] of Object.entries(lineHeights)) tokens[`leading-${key}`] = { lineHeight };
674
+ for (const opacity of opacityValues) tokens[`opacity-${opacity}`] = { opacity: opacity / 100 };
675
+ for (const [key, color] of Object.entries(paletteColors)) {
676
+ tokens[`bg-${key}`] = { backgroundColor: color };
677
+ tokens[`text-${key}`] = { color };
678
+ tokens[`tint-${key}`] = { tintColor: color };
679
+ tokens[`border-${key}`] = { borderColor: color };
680
+ }
681
+ for (const [key, name] of Object.entries(platformColors)) {
682
+ const color = PlatformColor(name);
683
+ tokens[`bg-${key}`] = { backgroundColor: color };
684
+ tokens[`text-${key}`] = { color };
685
+ tokens[`tint-${key}`] = { tintColor: color };
686
+ tokens[`border-${key}`] = { borderColor: color };
687
+ }
688
+ return tokens;
689
+ }
690
+ const tokenStyles = createTokenStyles();
691
+ function variantApplies(variant) {
692
+ switch (variant) {
693
+ case "light": return Appearance.getColorScheme() !== "dark";
694
+ case "dark": return Appearance.getColorScheme() === "dark";
695
+ }
696
+ }
697
+ function resolveVariantToken(token) {
698
+ const parts = token.split(":");
699
+ if (parts.length === 1) return token;
700
+ const baseToken = parts.at(-1);
701
+ if (!baseToken) return token;
702
+ for (const variant of parts.slice(0, -1)) {
703
+ const applies = variantApplies(variant);
704
+ if (applies === void 0) return token;
705
+ if (!applies) return;
706
+ }
707
+ return baseToken;
708
+ }
709
+ function parseToken(token) {
710
+ const resolvedToken = resolveVariantToken(token);
711
+ if (!resolvedToken) return;
712
+ token = resolvedToken;
713
+ return tokenStyles[token];
714
+ }
715
+ function pushInput(input, output) {
716
+ if (!input) return;
717
+ if (typeof input === "object") {
718
+ output.push(input);
719
+ return;
720
+ }
721
+ if (/\s/.test(input)) {
722
+ if (isDev) throw new Error(`Bleam style strings must contain exactly one token: ${input}`);
723
+ return;
724
+ }
725
+ const style = parseToken(input);
726
+ if (style) {
727
+ output.push(style);
728
+ return;
729
+ }
730
+ if (isDev) throw new Error(`Unknown bleam style token: ${input}`);
731
+ }
732
+ function sx(...inputs) {
733
+ const output = [];
734
+ for (const input of inputs) pushInput(input, output);
735
+ return Object.assign({}, ...output);
736
+ }
737
+
738
+ //#endregion
739
+ export { colors, sx };