@streamplace/components 0.7.26 → 0.7.29

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 (61) hide show
  1. package/dist/components/chat/chat-box.js +2 -2
  2. package/dist/components/chat/chat.js +1 -1
  3. package/dist/components/mobile-player/ui/autoplay-button.js +1 -0
  4. package/dist/components/mobile-player/ui/viewer-context-menu.js +1 -1
  5. package/dist/components/mobile-player/ui/viewer-loading-overlay.js +2 -2
  6. package/dist/components/mobile-player/use-webrtc.js +37 -1
  7. package/dist/components/mobile-player/video.native.js +10 -1
  8. package/dist/components/ui/button.js +107 -155
  9. package/dist/components/ui/dialog.js +83 -116
  10. package/dist/components/ui/dropdown.js +41 -18
  11. package/dist/components/ui/input.js +53 -128
  12. package/dist/components/ui/primitives/button.js +0 -2
  13. package/dist/components/ui/primitives/modal.js +2 -2
  14. package/dist/components/ui/primitives/text.js +48 -8
  15. package/dist/components/ui/text.js +37 -66
  16. package/dist/components/ui/toast.js +78 -40
  17. package/dist/components/ui/view.js +28 -41
  18. package/dist/crypto-polyfill.js +0 -0
  19. package/dist/crypto-polyfill.native.js +24 -0
  20. package/dist/index.js +1 -0
  21. package/dist/lib/theme/index.js +1 -2
  22. package/dist/lib/theme/theme.js +106 -54
  23. package/dist/lib/theme/tokens.js +94 -1
  24. package/dist/livestream-store/chat.js +0 -2
  25. package/dist/livestream-store/stream-key.js +1 -1
  26. package/dist/player-store/player-provider.js +10 -2
  27. package/dist/player-store/single-player-provider.js +1 -1
  28. package/dist/streamplace-store/stream.js +1 -1
  29. package/dist/ui/index.js +2 -3
  30. package/node-compile-cache/v22.15.0-x64-efe9a9df-0/37be0eec +0 -0
  31. package/package.json +3 -2
  32. package/src/components/chat/chat-box.tsx +6 -3
  33. package/src/components/chat/chat.tsx +1 -0
  34. package/src/components/mobile-player/ui/autoplay-button.tsx +1 -0
  35. package/src/components/mobile-player/ui/viewer-context-menu.tsx +2 -2
  36. package/src/components/mobile-player/ui/viewer-loading-overlay.tsx +2 -2
  37. package/src/components/mobile-player/use-webrtc.tsx +41 -1
  38. package/src/components/mobile-player/video.native.tsx +19 -4
  39. package/src/components/ui/button.tsx +110 -172
  40. package/src/components/ui/dialog.tsx +96 -138
  41. package/src/components/ui/dropdown.tsx +60 -22
  42. package/src/components/ui/input.tsx +57 -144
  43. package/src/components/ui/primitives/button.tsx +0 -2
  44. package/src/components/ui/primitives/modal.tsx +0 -2
  45. package/src/components/ui/primitives/text.tsx +51 -8
  46. package/src/components/ui/text.tsx +42 -67
  47. package/src/components/ui/toast.tsx +108 -90
  48. package/src/components/ui/view.tsx +27 -41
  49. package/src/crypto-polyfill.native.tsx +24 -0
  50. package/src/crypto-polyfill.tsx +0 -0
  51. package/src/index.tsx +2 -0
  52. package/src/lib/theme/index.ts +0 -2
  53. package/src/lib/theme/theme.tsx +179 -72
  54. package/src/lib/theme/tokens.ts +97 -0
  55. package/src/livestream-store/chat.tsx +0 -3
  56. package/src/livestream-store/stream-key.tsx +1 -1
  57. package/src/player-store/player-provider.tsx +13 -1
  58. package/src/player-store/single-player-provider.tsx +1 -1
  59. package/src/streamplace-store/stream.tsx +1 -1
  60. package/src/ui/index.ts +0 -2
  61. package/tsconfig.tsbuildinfo +1 -1
@@ -18,6 +18,28 @@ import {
18
18
  } from "./tokens";
19
19
 
20
20
  import { GestureHandlerRootView } from "react-native-gesture-handler";
21
+ import { ToastProvider } from "../../components/ui";
22
+
23
+ // Import pairify function for generating theme tokens
24
+ function pairify<T extends Record<string, any>>(
25
+ obj: T,
26
+ styleKeyPrefix: string,
27
+ ): Record<keyof T, any> {
28
+ const result: Record<string, any> = {};
29
+ for (const [key, value] of Object.entries(obj)) {
30
+ if (typeof value === "object" && value !== null && !Array.isArray(value)) {
31
+ // For nested objects (like color scales), create another level
32
+ result[key] = {};
33
+ for (const [nestedKey, nestedValue] of Object.entries(value)) {
34
+ result[key][nestedKey] = { [styleKeyPrefix]: nestedValue };
35
+ }
36
+ } else {
37
+ // For simple values, create the style object directly
38
+ result[key] = { [styleKeyPrefix]: value };
39
+ }
40
+ }
41
+ return result as Record<keyof T, any>;
42
+ }
21
43
 
22
44
  // Theme interfaces
23
45
  export interface Theme {
@@ -80,30 +102,37 @@ export interface Theme {
80
102
  animations: typeof animations;
81
103
  }
82
104
 
83
- // Utility styles interface
84
- export interface ThemeStyles {
105
+ // Theme-aware zero interface (like atoms but with theme colors)
106
+ export interface ThemeZero {
107
+ // Colors using pairify
108
+ bg: Record<string, any>;
109
+ text: Record<string, any>;
110
+ border: Record<string, any>;
111
+
112
+ // Static design tokens (same as atoms)
85
113
  shadow: {
86
114
  sm: typeof shadows.sm;
87
115
  md: typeof shadows.md;
88
116
  lg: typeof shadows.lg;
89
117
  xl: typeof shadows.xl;
90
118
  };
119
+
120
+ // Common button styles
91
121
  button: {
92
122
  primary: object;
93
123
  secondary: object;
94
124
  outline: object;
95
125
  ghost: object;
96
126
  };
97
- text: {
98
- primary: object;
99
- muted: object;
100
- disabled: object;
101
- };
127
+
128
+ // Input styles
102
129
  input: {
103
130
  base: object;
104
131
  focused: object;
105
132
  error: object;
106
133
  };
134
+
135
+ // Card styles
107
136
  card: {
108
137
  base: object;
109
138
  };
@@ -129,56 +158,56 @@ export interface ThemeIcons {
129
158
  }
130
159
 
131
160
  // Create theme colors based on dark mode
132
- const createThemeColors = (isDark: boolean): Theme["colors"] => ({
133
- background: isDark ? colors.gray[950] : colors.white,
134
- foreground: isDark ? colors.gray[50] : colors.gray[950],
135
-
136
- card: isDark ? colors.gray[900] : colors.white,
137
- cardForeground: isDark ? colors.gray[50] : colors.gray[950],
138
-
139
- popover: isDark ? colors.gray[900] : colors.white,
140
- popoverForeground: isDark ? colors.gray[50] : colors.gray[950],
141
-
142
- primary: Platform.OS === "ios" ? colors.ios.systemBlue : colors.primary[500],
143
- primaryForeground: colors.white,
144
-
145
- secondary: isDark ? colors.gray[800] : colors.gray[100],
146
- secondaryForeground: isDark ? colors.gray[50] : colors.gray[900],
147
-
148
- muted: isDark ? colors.gray[800] : colors.gray[100],
149
- mutedForeground: isDark ? colors.gray[400] : colors.gray[500],
150
-
151
- accent: isDark ? colors.gray[800] : colors.gray[100],
152
- accentForeground: isDark ? colors.gray[50] : colors.gray[900],
153
-
154
- destructive:
155
- Platform.OS === "ios" ? colors.ios.systemRed : colors.destructive[500],
156
- destructiveForeground: colors.white,
157
-
158
- success: Platform.OS === "ios" ? colors.ios.systemGreen : colors.success[500],
159
- successForeground: colors.white,
160
-
161
- warning:
162
- Platform.OS === "ios" ? colors.ios.systemOrange : colors.warning[500],
163
- warningForeground: colors.white,
161
+ const createThemeColors = (
162
+ isDark: boolean,
163
+ lightTheme?: ColorPalette | Theme["colors"],
164
+ darkTheme?: ColorPalette | Theme["colors"],
165
+ colorTheme?: Partial<Theme["colors"]>,
166
+ ): Theme["colors"] => {
167
+ let baseColors: Theme["colors"];
168
+
169
+ if (isDark && darkTheme) {
170
+ // Use dark theme
171
+ baseColors = isColorPalette(darkTheme)
172
+ ? generateThemeColorsFromPalette(darkTheme, true)
173
+ : darkTheme;
174
+ } else if (!isDark && lightTheme) {
175
+ // Use light theme
176
+ baseColors = isColorPalette(lightTheme)
177
+ ? generateThemeColorsFromPalette(lightTheme, false)
178
+ : lightTheme;
179
+ } else {
180
+ // Fall back to default gray theme
181
+ const defaultPalette = colors.neutral;
182
+ baseColors = generateThemeColorsFromPalette(defaultPalette, isDark);
183
+ }
164
184
 
165
- border: isDark ? colors.gray[500] + "30" : colors.gray[200] + "30",
166
- input: isDark ? colors.gray[800] : colors.gray[200],
167
- ring: Platform.OS === "ios" ? colors.ios.systemBlue : colors.primary[500],
185
+ // Merge with custom color overrides if provided
186
+ return {
187
+ ...baseColors,
188
+ ...colorTheme,
189
+ };
190
+ };
168
191
 
169
- text: isDark ? colors.gray[50] : colors.gray[950],
170
- textMuted: isDark ? colors.gray[400] : colors.gray[500],
171
- textDisabled: isDark ? colors.gray[600] : colors.gray[400],
172
- });
192
+ // Create theme-aware zero tokens using pairify
193
+ const createThemeZero = (themeColors: Theme["colors"]): ThemeZero => ({
194
+ // Theme-aware colors using pairify
195
+ bg: pairify(themeColors, "backgroundColor"),
196
+ text: pairify(themeColors, "color"),
197
+ border: {
198
+ ...pairify(themeColors, "borderColor"),
199
+ default: { borderColor: themeColors.border },
200
+ },
173
201
 
174
- // Create theme styles based on colors
175
- const createThemeStyles = (themeColors: Theme["colors"]): ThemeStyles => ({
202
+ // Static design tokens
176
203
  shadow: {
177
204
  sm: shadows.sm,
178
205
  md: shadows.md,
179
206
  lg: shadows.lg,
180
207
  xl: shadows.xl,
181
208
  },
209
+
210
+ // Common button styles
182
211
  button: {
183
212
  primary: {
184
213
  backgroundColor: themeColors.primary,
@@ -199,17 +228,8 @@ const createThemeStyles = (themeColors: Theme["colors"]): ThemeStyles => ({
199
228
  borderWidth: 0,
200
229
  },
201
230
  },
202
- text: {
203
- primary: {
204
- color: themeColors.text,
205
- },
206
- muted: {
207
- color: themeColors.textMuted,
208
- },
209
- disabled: {
210
- color: themeColors.textDisabled,
211
- },
212
- },
231
+
232
+ // Input styles
213
233
  input: {
214
234
  base: {
215
235
  backgroundColor: themeColors.background,
@@ -229,6 +249,8 @@ const createThemeStyles = (themeColors: Theme["colors"]): ThemeStyles => ({
229
249
  borderWidth: 2,
230
250
  },
231
251
  },
252
+
253
+ // Card styles
232
254
  card: {
233
255
  base: {
234
256
  backgroundColor: themeColors.card,
@@ -260,7 +282,7 @@ const createThemeIcons = (themeColors: Theme["colors"]): ThemeIcons => ({
260
282
  // Theme context interface
261
283
  interface ThemeContextType {
262
284
  theme: Theme;
263
- styles: ThemeStyles;
285
+ zero: ThemeZero;
264
286
  icons: ThemeIcons;
265
287
  isDark: boolean;
266
288
  currentTheme: "light" | "dark" | "system";
@@ -272,18 +294,97 @@ interface ThemeContextType {
272
294
  // Create the theme context
273
295
  const ThemeContext = createContext<ThemeContextType | null>(null);
274
296
 
297
+ // Color palette type
298
+ type ColorPalette = {
299
+ 50: string;
300
+ 100: string;
301
+ 200: string;
302
+ 300: string;
303
+ 400: string;
304
+ 500: string;
305
+ 600: string;
306
+ 700: string;
307
+ 800: string;
308
+ 900: string;
309
+ 950: string;
310
+ };
311
+
312
+ // Helper function to check if input is a ColorPalette or Theme["colors"]
313
+ function isColorPalette(
314
+ input: ColorPalette | Theme["colors"],
315
+ ): input is ColorPalette {
316
+ return "50" in input && "100" in input && "950" in input;
317
+ }
318
+
319
+ // Helper function to generate Theme["colors"] from ColorPalette
320
+ function generateThemeColorsFromPalette(
321
+ palette: ColorPalette,
322
+ isDark: boolean,
323
+ ): Theme["colors"] {
324
+ return {
325
+ background: isDark ? palette[950] : colors.white,
326
+ foreground: isDark ? palette[50] : palette[950],
327
+
328
+ card: isDark ? palette[900] : colors.white,
329
+ cardForeground: isDark ? palette[50] : palette[950],
330
+
331
+ popover: isDark ? palette[900] : colors.white,
332
+ popoverForeground: isDark ? palette[50] : palette[950],
333
+
334
+ primary:
335
+ Platform.OS === "ios" ? colors.ios.systemBlue : colors.primary[500],
336
+ primaryForeground: colors.white,
337
+
338
+ secondary: isDark ? palette[800] : palette[100],
339
+ secondaryForeground: isDark ? palette[50] : palette[900],
340
+
341
+ muted: isDark ? palette[800] : palette[100],
342
+ mutedForeground: isDark ? palette[400] : palette[500],
343
+
344
+ accent: isDark ? palette[800] : palette[100],
345
+ accentForeground: isDark ? palette[50] : palette[900],
346
+
347
+ destructive:
348
+ Platform.OS === "ios" ? colors.ios.systemRed : colors.destructive[500],
349
+ destructiveForeground: colors.white,
350
+
351
+ success:
352
+ Platform.OS === "ios" ? colors.ios.systemGreen : colors.success[500],
353
+ successForeground: colors.white,
354
+
355
+ warning:
356
+ Platform.OS === "ios" ? colors.ios.systemOrange : colors.warning[500],
357
+ warningForeground: colors.white,
358
+
359
+ border: isDark ? palette[500] + "30" : palette[200] + "30",
360
+ input: isDark ? palette[800] : palette[200],
361
+ ring: Platform.OS === "ios" ? colors.ios.systemBlue : colors.primary[500],
362
+
363
+ text: isDark ? palette[50] : palette[950],
364
+ textMuted: isDark ? palette[400] : palette[500],
365
+ textDisabled: isDark ? palette[600] : palette[400],
366
+ };
367
+ }
368
+
275
369
  // Theme provider props
276
370
  interface ThemeProviderProps {
277
371
  children: ReactNode;
278
372
  defaultTheme?: "light" | "dark" | "system";
279
373
  forcedTheme?: "light" | "dark";
374
+ colorTheme?: Partial<Theme["colors"]>;
375
+ lightTheme?: ColorPalette | Theme["colors"];
376
+ darkTheme?: ColorPalette | Theme["colors"];
280
377
  }
281
378
 
282
379
  // Theme provider component
380
+ // Should be surrounded by SafeAreaProvider at the root
283
381
  export function ThemeProvider({
284
382
  children,
285
383
  defaultTheme = "system",
286
384
  forcedTheme,
385
+ colorTheme,
386
+ lightTheme,
387
+ darkTheme,
287
388
  }: ThemeProviderProps) {
288
389
  const systemColorScheme = useColorScheme();
289
390
  const [currentTheme, setCurrentTheme] = useState<"light" | "dark" | "system">(
@@ -302,7 +403,12 @@ export function ThemeProvider({
302
403
 
303
404
  // Create theme based on dark mode
304
405
  const theme = useMemo<Theme>(() => {
305
- const themeColors = createThemeColors(isDark);
406
+ const themeColors = createThemeColors(
407
+ isDark,
408
+ lightTheme,
409
+ darkTheme,
410
+ colorTheme,
411
+ );
306
412
  return {
307
413
  colors: themeColors,
308
414
  spacing,
@@ -312,11 +418,11 @@ export function ThemeProvider({
312
418
  touchTargets,
313
419
  animations,
314
420
  };
315
- }, [isDark]);
421
+ }, [isDark, lightTheme, darkTheme, colorTheme]);
316
422
 
317
- // Create utility styles
318
- const styles = useMemo<ThemeStyles>(() => {
319
- return createThemeStyles(theme.colors);
423
+ // Create theme-aware zero tokens
424
+ const zero = useMemo<ThemeZero>(() => {
425
+ return createThemeZero(theme.colors);
320
426
  }, [theme.colors]);
321
427
 
322
428
  // Create icon utilities
@@ -344,7 +450,7 @@ export function ThemeProvider({
344
450
  const value = useMemo<ThemeContextType>(
345
451
  () => ({
346
452
  theme,
347
- styles,
453
+ zero,
348
454
  icons,
349
455
  isDark,
350
456
  currentTheme: forcedTheme || currentTheme,
@@ -354,7 +460,7 @@ export function ThemeProvider({
354
460
  }),
355
461
  [
356
462
  theme,
357
- styles,
463
+ zero,
358
464
  icons,
359
465
  isDark,
360
466
  forcedTheme,
@@ -370,6 +476,7 @@ export function ThemeProvider({
370
476
  <GestureHandlerRootView>
371
477
  {children}
372
478
  <PortalHost />
479
+ <ToastProvider />
373
480
  </GestureHandlerRootView>
374
481
  </ThemeContext.Provider>
375
482
  );
@@ -400,13 +507,13 @@ export function usePlatformTypography() {
400
507
 
401
508
  // Utility function to create theme-aware styles
402
509
  export function createThemedStyles<T extends Record<string, any>>(
403
- styleCreator: (theme: Theme, styles: ThemeStyles, icons: ThemeIcons) => T,
510
+ styleCreator: (theme: Theme, zero: ThemeZero, icons: ThemeIcons) => T,
404
511
  ) {
405
512
  return function useThemedStyles() {
406
- const { theme, styles, icons } = useTheme();
513
+ const { theme, zero, icons } = useTheme();
407
514
  return useMemo(
408
- () => styleCreator(theme, styles, icons),
409
- [theme, styles, icons],
515
+ () => styleCreator(theme, zero, icons),
516
+ [theme, zero, icons],
410
517
  );
411
518
  };
412
519
  }
@@ -433,4 +540,4 @@ export const darkTheme: Theme = {
433
540
  };
434
541
 
435
542
  // Export individual theme utilities for convenience
436
- export { createThemeColors, createThemeIcons, createThemeStyles };
543
+ export { createThemeColors, createThemeIcons, createThemeZero };
@@ -443,56 +443,67 @@ export const typography = {
443
443
  fontSize: 34,
444
444
  lineHeight: 41,
445
445
  fontWeight: "700" as const,
446
+ fontFamily: "AtkinsonHyperlegibleNext-Bold",
446
447
  },
447
448
  title1: {
448
449
  fontSize: 28,
449
450
  lineHeight: 34,
450
451
  fontWeight: "700" as const,
452
+ fontFamily: "AtkinsonHyperlegibleNext-Bold",
451
453
  },
452
454
  title2: {
453
455
  fontSize: 22,
454
456
  lineHeight: 28,
455
457
  fontWeight: "700" as const,
458
+ fontFamily: "AtkinsonHyperlegibleNext-Bold",
456
459
  },
457
460
  title3: {
458
461
  fontSize: 20,
459
462
  lineHeight: 25,
460
463
  fontWeight: "600" as const,
464
+ fontFamily: "AtkinsonHyperlegibleNext-SemiBold",
461
465
  },
462
466
  headline: {
463
467
  fontSize: 17,
464
468
  lineHeight: 22,
465
469
  fontWeight: "600" as const,
470
+ fontFamily: "AtkinsonHyperlegibleNext-SemiBold",
466
471
  },
467
472
  body: {
468
473
  fontSize: 17,
469
474
  lineHeight: 22,
470
475
  fontWeight: "400" as const,
476
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
471
477
  },
472
478
  callout: {
473
479
  fontSize: 16,
474
480
  lineHeight: 21,
475
481
  fontWeight: "400" as const,
482
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
476
483
  },
477
484
  subhead: {
478
485
  fontSize: 15,
479
486
  lineHeight: 20,
480
487
  fontWeight: "400" as const,
488
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
481
489
  },
482
490
  footnote: {
483
491
  fontSize: 13,
484
492
  lineHeight: 18,
485
493
  fontWeight: "400" as const,
494
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
486
495
  },
487
496
  caption1: {
488
497
  fontSize: 12,
489
498
  lineHeight: 16,
490
499
  fontWeight: "400" as const,
500
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
491
501
  },
492
502
  caption2: {
493
503
  fontSize: 11,
494
504
  lineHeight: 13,
495
505
  fontWeight: "400" as const,
506
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
496
507
  },
497
508
  },
498
509
 
@@ -502,66 +513,79 @@ export const typography = {
502
513
  fontSize: 96,
503
514
  lineHeight: 112,
504
515
  fontWeight: "300" as const,
516
+ fontFamily: "AtkinsonHyperlegibleNext-ExtraLight",
505
517
  },
506
518
  headline2: {
507
519
  fontSize: 60,
508
520
  lineHeight: 72,
509
521
  fontWeight: "300" as const,
522
+ fontFamily: "AtkinsonHyperlegibleNext-Light",
510
523
  },
511
524
  headline3: {
512
525
  fontSize: 48,
513
526
  lineHeight: 56,
514
527
  fontWeight: "400" as const,
528
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
515
529
  },
516
530
  headline4: {
517
531
  fontSize: 34,
518
532
  lineHeight: 42,
519
533
  fontWeight: "400" as const,
534
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
520
535
  },
521
536
  headline5: {
522
537
  fontSize: 24,
523
538
  lineHeight: 32,
524
539
  fontWeight: "400" as const,
540
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
525
541
  },
526
542
  headline6: {
527
543
  fontSize: 20,
528
544
  lineHeight: 28,
529
545
  fontWeight: "500" as const,
546
+ fontFamily: "AtkinsonHyperlegibleNext-Medium",
530
547
  },
531
548
  subtitle1: {
532
549
  fontSize: 16,
533
550
  lineHeight: 24,
534
551
  fontWeight: "400" as const,
552
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
535
553
  },
536
554
  subtitle2: {
537
555
  fontSize: 14,
538
556
  lineHeight: 22,
539
557
  fontWeight: "500" as const,
558
+ fontFamily: "AtkinsonHyperlegibleNext-Medium",
540
559
  },
541
560
  body1: {
542
561
  fontSize: 16,
543
562
  lineHeight: 24,
544
563
  fontWeight: "400" as const,
564
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
545
565
  },
546
566
  body2: {
547
567
  fontSize: 14,
548
568
  lineHeight: 20,
549
569
  fontWeight: "400" as const,
570
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
550
571
  },
551
572
  button: {
552
573
  fontSize: 14,
553
574
  lineHeight: 16,
554
575
  fontWeight: "500" as const,
576
+ fontFamily: "AtkinsonHyperlegibleNext-Medium",
555
577
  },
556
578
  caption: {
557
579
  fontSize: 12,
558
580
  lineHeight: 16,
559
581
  fontWeight: "400" as const,
582
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
560
583
  },
561
584
  overline: {
562
585
  fontSize: 10,
563
586
  lineHeight: 16,
564
587
  fontWeight: "400" as const,
588
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
565
589
  },
566
590
  },
567
591
 
@@ -571,43 +595,115 @@ export const typography = {
571
595
  fontSize: 12,
572
596
  lineHeight: 16,
573
597
  fontWeight: "400" as const,
598
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
574
599
  },
575
600
  sm: {
576
601
  fontSize: 14,
577
602
  lineHeight: 20,
578
603
  fontWeight: "400" as const,
604
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
579
605
  },
580
606
  base: {
581
607
  fontSize: 16,
582
608
  lineHeight: 24,
583
609
  fontWeight: "400" as const,
610
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
584
611
  },
585
612
  lg: {
586
613
  fontSize: 18,
587
614
  lineHeight: 28,
588
615
  fontWeight: "400" as const,
616
+ fontFamily: "AtkinsonHyperlegibleNext-Regular",
589
617
  },
590
618
  xl: {
591
619
  fontSize: 20,
592
620
  lineHeight: 28,
593
621
  fontWeight: "500" as const,
622
+ fontFamily: "AtkinsonHyperlegibleNext-Medium",
594
623
  },
595
624
  "2xl": {
596
625
  fontSize: 24,
597
626
  lineHeight: 32,
598
627
  fontWeight: "600" as const,
628
+ fontFamily: "AtkinsonHyperlegibleNext-SemiBold",
599
629
  },
600
630
  "3xl": {
601
631
  fontSize: 30,
602
632
  lineHeight: 36,
603
633
  fontWeight: "700" as const,
634
+ fontFamily: "AtkinsonHyperlegibleNext-Bold",
604
635
  },
605
636
  "4xl": {
606
637
  fontSize: 36,
607
638
  lineHeight: 40,
608
639
  fontWeight: "700" as const,
640
+ fontFamily: "AtkinsonHyperlegibleNext-ExtraBold",
609
641
  },
610
642
  },
643
+
644
+ // Monospace typography for code and technical content
645
+ mono: {
646
+ xs: {
647
+ fontSize: 11,
648
+ lineHeight: 16,
649
+ fontWeight: "400" as const,
650
+ fontFamily: "AtkinsonHyperlegibleMono-Regular",
651
+ },
652
+ sm: {
653
+ fontSize: 13,
654
+ lineHeight: 18,
655
+ fontWeight: "400" as const,
656
+ fontFamily: "AtkinsonHyperlegibleMono-Regular",
657
+ },
658
+ base: {
659
+ fontSize: 14,
660
+ lineHeight: 20,
661
+ fontWeight: "400" as const,
662
+ fontFamily: "AtkinsonHyperlegibleMono-Regular",
663
+ },
664
+ lg: {
665
+ fontSize: 16,
666
+ lineHeight: 24,
667
+ fontWeight: "400" as const,
668
+ fontFamily: "AtkinsonHyperlegibleMono-Regular",
669
+ },
670
+ xl: {
671
+ fontSize: 18,
672
+ lineHeight: 28,
673
+ fontWeight: "500" as const,
674
+ fontFamily: "AtkinsonHyperlegibleMono-Medium",
675
+ },
676
+ "2xl": {
677
+ fontSize: 20,
678
+ lineHeight: 32,
679
+ fontWeight: "600" as const,
680
+ fontFamily: "AtkinsonHyperlegibleMono-SemiBold",
681
+ },
682
+ "3xl": {
683
+ fontSize: 24,
684
+ lineHeight: 36,
685
+ fontWeight: "700" as const,
686
+ fontFamily: "AtkinsonHyperlegibleMono-Bold",
687
+ },
688
+ },
689
+ } as const;
690
+
691
+ // Font families available in the app
692
+ export const fontFamilies = {
693
+ // Sans serif fonts
694
+ regular: "AtkinsonHyperlegibleNext-Regular",
695
+ light: "AtkinsonHyperlegibleNext-Light",
696
+ extraLight: "AtkinsonHyperlegibleNext-ExtraLight",
697
+ medium: "AtkinsonHyperlegibleNext-Medium",
698
+ semiBold: "AtkinsonHyperlegibleNext-SemiBold",
699
+ bold: "AtkinsonHyperlegibleNext-Bold",
700
+ extraBold: "AtkinsonHyperlegibleNext-ExtraBold",
701
+
702
+ // Monospace fonts
703
+ monoRegular: "AtkinsonHyperlegibleMono-Regular",
704
+ monoMedium: "AtkinsonHyperlegibleMono-Medium",
705
+ monoSemiBold: "AtkinsonHyperlegibleMono-SemiBold",
706
+ monoBold: "AtkinsonHyperlegibleMono-Bold",
611
707
  } as const;
612
708
 
613
709
  export const shadows = {
@@ -676,6 +772,7 @@ export type Colors = typeof colors;
676
772
  export type Spacing = typeof spacing;
677
773
  export type BorderRadius = typeof borderRadius;
678
774
  export type Typography = typeof typography;
775
+ export type FontFamilies = typeof fontFamilies;
679
776
  export type Shadows = typeof shadows;
680
777
  export type TouchTargets = typeof touchTargets;
681
778
  export type Animations = typeof animations;
@@ -212,12 +212,9 @@ export const reduceChatIncremental = (
212
212
  let hasChanges = false;
213
213
  const removedKeys = new Set<string>();
214
214
 
215
- console.log("newMessages", newMessages);
216
-
217
215
  for (const msg of newMessages) {
218
216
  if (msg.deleted) {
219
217
  hasChanges = true;
220
- console.log("deleted", msg.uri);
221
218
  removedKeys.add(msg.uri);
222
219
  }
223
220
  }
@@ -90,7 +90,7 @@ export const useStreamKey = (): {
90
90
  setKey(newKey);
91
91
  };
92
92
 
93
- generateKey();
93
+ generateKey().catch((err) => setError(err.message));
94
94
  // eslint-disable-next-line react-hooks/exhaustive-deps
95
95
  }, [key, setStreamKey]);
96
96