@oxyhq/bloom 0.2.3 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/assets/fonts/BlomusModernus-Bold.ttf +0 -0
  2. package/assets/fonts/BlomusModernus-Bold.woff2 +0 -0
  3. package/assets/fonts/BlomusModernus-Regular.ttf +0 -0
  4. package/assets/fonts/BlomusModernus-Regular.woff2 +0 -0
  5. package/assets/fonts/GeistMono-Variable.ttf +0 -0
  6. package/assets/fonts/GeistMono-Variable.woff2 +0 -0
  7. package/assets/fonts/InterVariable.ttf +0 -0
  8. package/assets/fonts/InterVariable.woff2 +0 -0
  9. package/lib/commonjs/code/Code.js +47 -0
  10. package/lib/commonjs/code/Code.js.map +1 -0
  11. package/lib/commonjs/code/Pre.js +61 -0
  12. package/lib/commonjs/code/Pre.js.map +1 -0
  13. package/lib/commonjs/code/index.js +20 -0
  14. package/lib/commonjs/code/index.js.map +1 -0
  15. package/lib/commonjs/error-boundary/ErrorBoundary.js +27 -18
  16. package/lib/commonjs/error-boundary/ErrorBoundary.js.map +1 -1
  17. package/lib/commonjs/fonts/FontLoader.js +35 -0
  18. package/lib/commonjs/fonts/FontLoader.js.map +1 -0
  19. package/lib/commonjs/fonts/FontLoader.native.js +36 -0
  20. package/lib/commonjs/fonts/FontLoader.native.js.map +1 -0
  21. package/lib/commonjs/fonts/apply-font-faces.js +49 -0
  22. package/lib/commonjs/fonts/apply-font-faces.js.map +1 -0
  23. package/lib/commonjs/fonts/font-assets.js +23 -0
  24. package/lib/commonjs/fonts/font-assets.js.map +1 -0
  25. package/lib/commonjs/fonts/index.js +40 -0
  26. package/lib/commonjs/fonts/index.js.map +1 -0
  27. package/lib/commonjs/fonts/tokens.js +27 -0
  28. package/lib/commonjs/fonts/tokens.js.map +1 -0
  29. package/lib/commonjs/index.js +9 -3
  30. package/lib/commonjs/index.js.map +1 -1
  31. package/lib/commonjs/index.web.js +9 -3
  32. package/lib/commonjs/index.web.js.map +1 -1
  33. package/lib/commonjs/theme/BloomThemeProvider.js +8 -1
  34. package/lib/commonjs/theme/BloomThemeProvider.js.map +1 -1
  35. package/lib/commonjs/typography/index.js +41 -3
  36. package/lib/commonjs/typography/index.js.map +1 -1
  37. package/lib/module/code/Code.js +42 -0
  38. package/lib/module/code/Code.js.map +1 -0
  39. package/lib/module/code/Pre.js +56 -0
  40. package/lib/module/code/Pre.js.map +1 -0
  41. package/lib/module/code/index.js +5 -0
  42. package/lib/module/code/index.js.map +1 -0
  43. package/lib/module/error-boundary/ErrorBoundary.js +27 -18
  44. package/lib/module/error-boundary/ErrorBoundary.js.map +1 -1
  45. package/lib/module/fonts/FontLoader.js +30 -0
  46. package/lib/module/fonts/FontLoader.js.map +1 -0
  47. package/lib/module/fonts/FontLoader.native.js +31 -0
  48. package/lib/module/fonts/FontLoader.native.js.map +1 -0
  49. package/lib/module/fonts/apply-font-faces.js +43 -0
  50. package/lib/module/fonts/apply-font-faces.js.map +1 -0
  51. package/lib/module/fonts/font-assets.js +19 -0
  52. package/lib/module/fonts/font-assets.js.map +1 -0
  53. package/lib/module/fonts/index.js +7 -0
  54. package/lib/module/fonts/index.js.map +1 -0
  55. package/lib/module/fonts/tokens.js +23 -0
  56. package/lib/module/fonts/tokens.js.map +1 -0
  57. package/lib/module/index.js +6 -0
  58. package/lib/module/index.js.map +1 -1
  59. package/lib/module/index.web.js +6 -0
  60. package/lib/module/index.web.js.map +1 -1
  61. package/lib/module/theme/BloomThemeProvider.js +8 -1
  62. package/lib/module/theme/BloomThemeProvider.js.map +1 -1
  63. package/lib/module/typography/index.js +36 -3
  64. package/lib/module/typography/index.js.map +1 -1
  65. package/lib/typescript/commonjs/__tests__/BloomThemeProvider.fonts-web.test.d.ts +5 -0
  66. package/lib/typescript/commonjs/__tests__/BloomThemeProvider.fonts-web.test.d.ts.map +1 -0
  67. package/lib/typescript/commonjs/__tests__/Code.test.d.ts +2 -0
  68. package/lib/typescript/commonjs/__tests__/Code.test.d.ts.map +1 -0
  69. package/lib/typescript/commonjs/__tests__/FontLoader.native.test.d.ts +2 -0
  70. package/lib/typescript/commonjs/__tests__/FontLoader.native.test.d.ts.map +1 -0
  71. package/lib/typescript/commonjs/__tests__/Pre.test.d.ts +2 -0
  72. package/lib/typescript/commonjs/__tests__/Pre.test.d.ts.map +1 -0
  73. package/lib/typescript/commonjs/__tests__/apply-font-faces.test.d.ts +5 -0
  74. package/lib/typescript/commonjs/__tests__/apply-font-faces.test.d.ts.map +1 -0
  75. package/lib/typescript/commonjs/code/Code.d.ts +7 -0
  76. package/lib/typescript/commonjs/code/Code.d.ts.map +1 -0
  77. package/lib/typescript/commonjs/code/Pre.d.ts +8 -0
  78. package/lib/typescript/commonjs/code/Pre.d.ts.map +1 -0
  79. package/lib/typescript/commonjs/code/index.d.ts +5 -0
  80. package/lib/typescript/commonjs/code/index.d.ts.map +1 -0
  81. package/lib/typescript/commonjs/error-boundary/ErrorBoundary.d.ts.map +1 -1
  82. package/lib/typescript/commonjs/fonts/FontLoader.d.ts +28 -0
  83. package/lib/typescript/commonjs/fonts/FontLoader.d.ts.map +1 -0
  84. package/lib/typescript/commonjs/fonts/FontLoader.native.d.ts +22 -0
  85. package/lib/typescript/commonjs/fonts/FontLoader.native.d.ts.map +1 -0
  86. package/lib/typescript/commonjs/fonts/apply-font-faces.d.ts +15 -0
  87. package/lib/typescript/commonjs/fonts/apply-font-faces.d.ts.map +1 -0
  88. package/lib/typescript/commonjs/fonts/font-assets.d.ts +7 -0
  89. package/lib/typescript/commonjs/fonts/font-assets.d.ts.map +1 -0
  90. package/lib/typescript/commonjs/fonts/index.d.ts +7 -0
  91. package/lib/typescript/commonjs/fonts/index.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/fonts/tokens.d.ts +21 -0
  93. package/lib/typescript/commonjs/fonts/tokens.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/icons/common.d.ts +1 -1
  95. package/lib/typescript/commonjs/index.d.ts +2 -0
  96. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/index.web.d.ts +2 -0
  98. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/theme/BloomThemeProvider.d.ts +13 -1
  100. package/lib/typescript/commonjs/theme/BloomThemeProvider.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/toast/index.d.ts +7 -7
  102. package/lib/typescript/commonjs/typography/index.d.ts +2 -0
  103. package/lib/typescript/commonjs/typography/index.d.ts.map +1 -1
  104. package/lib/typescript/module/__tests__/BloomThemeProvider.fonts-web.test.d.ts +5 -0
  105. package/lib/typescript/module/__tests__/BloomThemeProvider.fonts-web.test.d.ts.map +1 -0
  106. package/lib/typescript/module/__tests__/Code.test.d.ts +2 -0
  107. package/lib/typescript/module/__tests__/Code.test.d.ts.map +1 -0
  108. package/lib/typescript/module/__tests__/FontLoader.native.test.d.ts +2 -0
  109. package/lib/typescript/module/__tests__/FontLoader.native.test.d.ts.map +1 -0
  110. package/lib/typescript/module/__tests__/Pre.test.d.ts +2 -0
  111. package/lib/typescript/module/__tests__/Pre.test.d.ts.map +1 -0
  112. package/lib/typescript/module/__tests__/apply-font-faces.test.d.ts +5 -0
  113. package/lib/typescript/module/__tests__/apply-font-faces.test.d.ts.map +1 -0
  114. package/lib/typescript/module/code/Code.d.ts +7 -0
  115. package/lib/typescript/module/code/Code.d.ts.map +1 -0
  116. package/lib/typescript/module/code/Pre.d.ts +8 -0
  117. package/lib/typescript/module/code/Pre.d.ts.map +1 -0
  118. package/lib/typescript/module/code/index.d.ts +5 -0
  119. package/lib/typescript/module/code/index.d.ts.map +1 -0
  120. package/lib/typescript/module/error-boundary/ErrorBoundary.d.ts.map +1 -1
  121. package/lib/typescript/module/fonts/FontLoader.d.ts +28 -0
  122. package/lib/typescript/module/fonts/FontLoader.d.ts.map +1 -0
  123. package/lib/typescript/module/fonts/FontLoader.native.d.ts +22 -0
  124. package/lib/typescript/module/fonts/FontLoader.native.d.ts.map +1 -0
  125. package/lib/typescript/module/fonts/apply-font-faces.d.ts +15 -0
  126. package/lib/typescript/module/fonts/apply-font-faces.d.ts.map +1 -0
  127. package/lib/typescript/module/fonts/font-assets.d.ts +7 -0
  128. package/lib/typescript/module/fonts/font-assets.d.ts.map +1 -0
  129. package/lib/typescript/module/fonts/index.d.ts +7 -0
  130. package/lib/typescript/module/fonts/index.d.ts.map +1 -0
  131. package/lib/typescript/module/fonts/tokens.d.ts +21 -0
  132. package/lib/typescript/module/fonts/tokens.d.ts.map +1 -0
  133. package/lib/typescript/module/icons/common.d.ts +1 -1
  134. package/lib/typescript/module/index.d.ts +2 -0
  135. package/lib/typescript/module/index.d.ts.map +1 -1
  136. package/lib/typescript/module/index.web.d.ts +2 -0
  137. package/lib/typescript/module/index.web.d.ts.map +1 -1
  138. package/lib/typescript/module/theme/BloomThemeProvider.d.ts +13 -1
  139. package/lib/typescript/module/theme/BloomThemeProvider.d.ts.map +1 -1
  140. package/lib/typescript/module/toast/index.d.ts +7 -7
  141. package/lib/typescript/module/typography/index.d.ts +2 -0
  142. package/lib/typescript/module/typography/index.d.ts.map +1 -1
  143. package/package.json +37 -2
  144. package/src/__tests__/BloomThemeProvider.fonts-web.test.tsx +42 -0
  145. package/src/__tests__/BloomThemeProvider.test.tsx +22 -0
  146. package/src/__tests__/Code.test.tsx +25 -0
  147. package/src/__tests__/FontLoader.native.test.tsx +75 -0
  148. package/src/__tests__/Pre.test.tsx +25 -0
  149. package/src/__tests__/apply-font-faces.test.ts +59 -0
  150. package/src/assets.d.ts +20 -0
  151. package/src/code/Code.tsx +52 -0
  152. package/src/code/Pre.tsx +76 -0
  153. package/src/code/index.ts +4 -0
  154. package/src/error-boundary/ErrorBoundary.tsx +22 -7
  155. package/src/fonts/FontLoader.native.tsx +30 -0
  156. package/src/fonts/FontLoader.tsx +37 -0
  157. package/src/fonts/apply-font-faces.ts +42 -0
  158. package/src/fonts/font-assets.ts +16 -0
  159. package/src/fonts/index.ts +6 -0
  160. package/src/fonts/tokens.ts +23 -0
  161. package/src/index.ts +6 -0
  162. package/src/index.web.ts +6 -0
  163. package/src/theme/BloomThemeProvider.tsx +18 -1
  164. package/src/typography/index.tsx +32 -3
@@ -11,22 +11,22 @@ export declare function ToastOutlet(): import("react/jsx-runtime").JSX.Element;
11
11
  /**
12
12
  * Access the full Sonner API
13
13
  */
14
- export declare const api: ((message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
14
+ export declare const api: ((message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
15
15
  id?: string | number;
16
16
  }) => string | number) & {
17
- success: (message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
17
+ success: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
18
18
  id?: string | number;
19
19
  }) => string | number;
20
- info: (message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
20
+ info: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
21
21
  id?: string | number;
22
22
  }) => string | number;
23
- error: (message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
23
+ error: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
24
24
  id?: string | number;
25
25
  }) => string | number;
26
- warning: (message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
26
+ warning: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
27
27
  id?: string | number;
28
28
  }) => string | number;
29
- custom: (jsx: React.ReactElement, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
29
+ custom: (jsx: React.ReactElement, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
30
30
  id?: string | number;
31
31
  }) => string | number;
32
32
  promise: <T>(promise: Promise<T>, options: Omit<{
@@ -40,7 +40,7 @@ export declare const api: ((message: string, data?: Omit<import("sonner-native")
40
40
  error?: import("sonner-native").ToastStyles;
41
41
  };
42
42
  }, "promise">) => string | number;
43
- loading: (message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
43
+ loading: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
44
44
  id?: string | number;
45
45
  }) => string | number;
46
46
  dismiss: (id?: string | number) => string | number | undefined;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type TextProps as RNTextProps } from 'react-native';
3
+ import { fontFamilies } from '../fonts/tokens';
3
4
  export type TextProps = RNTextProps;
4
5
  export declare const Text: React.MemoExoticComponent<({ children, style, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element>;
5
6
  export { Text as Span };
@@ -13,4 +14,5 @@ export declare function P({ style, ...rest }: TextProps): import("react/jsx-runt
13
14
  export declare namespace P {
14
15
  var displayName: string;
15
16
  }
17
+ export { fontFamilies };
16
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/typography/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAEL,KAAK,SAAS,IAAI,WAAW,EAI9B,MAAM,cAAc,CAAC;AAItB,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC;AAiBpC,eAAO,MAAM,IAAI,2DAZiD,SAAS,6CAYpC,CAAC;AAGxC,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC;AAYxB,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAGrD,wBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAU9C;yBAVe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/typography/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAEL,KAAK,SAAS,IAAI,WAAW,EAI9B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC;AAsCpC,eAAO,MAAM,IAAI,2DAZiD,SAAS,6CAYpC,CAAC;AAGxC,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC;AAiBxB,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAGrD,wBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAU9C;yBAVe,CAAC;;;AAajB,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @jest-environment jsdom
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=BloomThemeProvider.fonts-web.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BloomThemeProvider.fonts-web.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/BloomThemeProvider.fonts-web.test.tsx"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Code.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Code.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/Code.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=FontLoader.native.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontLoader.native.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/FontLoader.native.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Pre.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pre.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/Pre.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @jest-environment jsdom
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=apply-font-faces.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-font-faces.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/apply-font-faces.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { type TextProps as RNTextProps, type StyleProp, type TextStyle } from 'react-native';
3
+ export interface CodeProps extends RNTextProps {
4
+ style?: StyleProp<TextStyle>;
5
+ }
6
+ export declare const Code: React.MemoExoticComponent<({ children, style, ...rest }: CodeProps) => import("react/jsx-runtime").JSX.Element>;
7
+ //# sourceMappingURL=Code.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../../src/code/Code.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAEL,KAAK,SAAS,IAAI,WAAW,EAE7B,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,MAAM,WAAW,SAAU,SAAQ,WAAW;IAC5C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAqCD,eAAO,MAAM,IAAI,2DA/BiD,SAAS,6CA+BpC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { type TextProps as RNTextProps, type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
3
+ export interface PreProps extends Omit<RNTextProps, 'style'> {
4
+ containerStyle?: StyleProp<ViewStyle>;
5
+ style?: StyleProp<TextStyle>;
6
+ }
7
+ export declare const Pre: React.MemoExoticComponent<({ children, containerStyle, style, ...rest }: PreProps) => import("react/jsx-runtime").JSX.Element>;
8
+ //# sourceMappingURL=Pre.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pre.d.ts","sourceRoot":"","sources":["../../../../src/code/Pre.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAGL,KAAK,SAAS,IAAI,WAAW,EAE7B,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IAC1D,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AA0DD,eAAO,MAAM,GAAG,2EA/Cb,QAAQ,6CA+C0B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { Code } from './Code';
2
+ export type { CodeProps } from './Code';
3
+ export { Pre } from './Pre';
4
+ export type { PreProps } from './Pre';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/code/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/error-boundary/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AA8BD,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAClF,MAAM,CAAC,WAAW,SAAmB;IAErC,KAAK,EAAE,kBAAkB,CAGvB;IAEF,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB;IAIjE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI;IAI3D,OAAO,CAAC,WAAW,CAEjB;IAEF,MAAM,IAAI,SAAS;CAkBpB"}
1
+ {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/error-boundary/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAwCD,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAClF,MAAM,CAAC,WAAW,SAAmB;IAErC,KAAK,EAAE,kBAAkB,CAGvB;IAEF,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB;IAIjE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI;IAI3D,OAAO,CAAC,WAAW,CAEjB;IAEF,MAAM,IAAI,SAAS;CAkBpB"}
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ export interface FontLoaderProps {
3
+ /**
4
+ * Whether to load and inject the Bloom font system. When false, this
5
+ * component is a pass-through. Default true (set by `BloomThemeProvider`).
6
+ */
7
+ enabled: boolean;
8
+ /**
9
+ * Rendered while native fonts load. Ignored on web — the web variant
10
+ * applies CSS `@font-face` rules synchronously and uses `font-display: swap`
11
+ * to handle the FOUT period.
12
+ */
13
+ fallback?: React.ReactNode;
14
+ children: React.ReactNode;
15
+ }
16
+ /**
17
+ * Web font loader. Applies the Bloom `@font-face` rules and CSS variables
18
+ * to `:root` on first render, before the first paint, using the same
19
+ * `useRef`-during-render pattern as `BloomThemeProvider`'s color application.
20
+ *
21
+ * No `useEffect`: the side effect runs synchronously inside the render phase,
22
+ * gated by a ref so it only executes once. Subsequent renders short-circuit.
23
+ *
24
+ * Native consumers resolve `FontLoader.native.tsx` via the React Native /
25
+ * Metro bundler's platform extension resolution — they never load this file.
26
+ */
27
+ export declare function FontLoader({ enabled, children }: FontLoaderProps): import("react/jsx-runtime").JSX.Element;
28
+ //# sourceMappingURL=FontLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontLoader.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAOhE"}
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ export interface FontLoaderProps {
3
+ /**
4
+ * Whether to gate rendering on fonts being loaded. When false the
5
+ * component is a pass-through that still calls `useFonts` (the hook must
6
+ * run unconditionally per the Rules of Hooks).
7
+ */
8
+ enabled: boolean;
9
+ /** Rendered while native fonts load. Defaults to `null`. */
10
+ fallback?: React.ReactNode;
11
+ children: React.ReactNode;
12
+ }
13
+ /**
14
+ * Native font loader. Calls `expo-font`'s `useFonts` with the Bloom font
15
+ * asset map and gates `children` on the load result. The hook is invoked
16
+ * unconditionally — `enabled` only affects what's rendered, not whether
17
+ * fonts get loaded. This keeps Hook order stable across renders and means
18
+ * `<BloomThemeProvider fonts={false}>` still gets fonts pre-loaded if the
19
+ * provider tree ever flips `fonts` back on.
20
+ */
21
+ export declare function FontLoader({ enabled, fallback, children }: FontLoaderProps): import("react/jsx-runtime").JSX.Element;
22
+ //# sourceMappingURL=FontLoader.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontLoader.native.d.ts","sourceRoot":"","sources":["../../../../src/fonts/FontLoader.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAK1E"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Inject @font-face rules and font CSS variables onto :root.
3
+ *
4
+ * No-op on native and when `document` is unavailable (SSR). Idempotent —
5
+ * safe to call multiple times; subsequent calls early-return after the
6
+ * `<style id="bloom-fonts">` tag has been mounted.
7
+ *
8
+ * Follows the same shape as `applyDarkClass` / `applyColorPresetVars`: a
9
+ * single file with an internal `Platform.OS` check rather than a `.web.ts` /
10
+ * `.native.ts` split. Bundlers strip the unreachable web import code path
11
+ * on native because the function body short-circuits before referencing the
12
+ * woff2 URLs.
13
+ */
14
+ export declare function applyFontFaces(): void;
15
+ //# sourceMappingURL=apply-font-faces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-font-faces.d.ts","sourceRoot":"","sources":["../../../../src/fonts/apply-font-faces.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAkBrC"}
@@ -0,0 +1,7 @@
1
+ export declare const FONT_ASSETS: {
2
+ readonly BlomusModernus: any;
3
+ readonly 'BlomusModernus-Bold': any;
4
+ readonly Inter: any;
5
+ readonly 'Geist Mono': any;
6
+ };
7
+ //# sourceMappingURL=font-assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-assets.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-assets.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW;;;;;CAKd,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { fontFamilies, fontCssVars } from './tokens';
2
+ export type { FontFamilyName } from './tokens';
3
+ export { applyFontFaces } from './apply-font-faces';
4
+ export { FONT_ASSETS } from './font-assets';
5
+ export { FontLoader } from './FontLoader';
6
+ export type { FontLoaderProps } from './FontLoader';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/fonts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Font family tokens for the Bloom design system.
3
+ *
4
+ * `fontFamilies` resolves to CSS-style stacks (with system fallbacks) and is
5
+ * used to populate the `:root` custom properties on web and as the literal
6
+ * `fontFamily` string source on native.
7
+ *
8
+ * `fontCssVars` is the inverse map: name -> CSS custom property name.
9
+ */
10
+ export declare const fontFamilies: {
11
+ readonly display: "BlomusModernus, Georgia, \"Times New Roman\", serif";
12
+ readonly sans: "Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif";
13
+ readonly mono: "\"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, monospace";
14
+ };
15
+ export declare const fontCssVars: {
16
+ readonly display: "--bloom-font-display";
17
+ readonly sans: "--bloom-font-sans";
18
+ readonly mono: "--bloom-font-mono";
19
+ };
20
+ export type FontFamilyName = keyof typeof fontFamilies;
21
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/fonts/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX,eAAO,MAAM,WAAW;;;;CAId,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,YAAY,CAAC"}
@@ -34,6 +34,7 @@ export declare const sizes: {
34
34
  };
35
35
  export declare function useCommonSVGProps(props: Props): {
36
36
  style: false | "" | IconStyle | import("react-native").RecursiveArray<import("react-native").Falsy | IconStyle> | null;
37
+ title?: string | undefined;
37
38
  children?: React.ReactNode;
38
39
  filter?: string | undefined;
39
40
  pointerEvents?: "box-none" | "none" | "box-only" | "auto" | undefined;
@@ -142,7 +143,6 @@ export declare function useCommonSVGProps(props: Props): {
142
143
  height?: import("react-native-svg").NumberProp | undefined;
143
144
  viewBox?: string | undefined;
144
145
  preserveAspectRatio?: string | undefined;
145
- title?: string | undefined;
146
146
  opacity?: import("react-native-svg").NumberProp | undefined;
147
147
  fillOpacity?: import("react-native-svg").NumberProp | undefined;
148
148
  fillRule?: import("react-native-svg").FillRule | undefined;
@@ -45,4 +45,6 @@ export * as Menu from './menu';
45
45
  export * as Tooltip from './tooltip';
46
46
  export * as Select from './select';
47
47
  export * as ContextMenu from './context-menu';
48
+ export * as Code from './code';
49
+ export * as Fonts from './fonts';
48
50
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,KAAK,KAAK,IAAI,SAAS,EAAE,KAAK,IAAI,SA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as Menu from './menu/index.web';
45
45
  export * as Tooltip from './tooltip/index.web';
46
46
  export * as Select from './select/index.web';
47
47
  export * as ContextMenu from './context-menu/index.web';
48
+ export * as Code from './code';
49
+ export * as Fonts from './fonts';
48
50
  //# sourceMappingURL=index.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAMA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,KAAK,KAAK,IAAI,SAAS,EAAE,KAAK,IAAI,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGhG,cAAc,oBAAoB,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,cAA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CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,gBAAgB,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGvE,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAGzC,cAAc,iBAAiB,CAAC;AAGhC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,WAAW,MAAM,0BAA0B,CAAC;AAGxD,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
@@ -16,9 +16,21 @@ export interface BloomThemeProviderProps {
16
16
  colorPreset?: AppColorName;
17
17
  onModeChange?: (mode: ThemeMode) => void;
18
18
  onColorPresetChange?: (preset: AppColorName) => void;
19
+ /**
20
+ * Load and inject the Bloom font system (BlomusModernus + Inter Variable
21
+ * + Geist Mono Variable). Default true. Set to false to opt out — e.g.
22
+ * apps that already ship their own font loader.
23
+ */
24
+ fonts?: boolean;
25
+ /**
26
+ * Rendered while native fonts load. Ignored on web. Useful for matching
27
+ * an app-level splash screen so consumers don't see a system-font flash
28
+ * before the bundled fonts resolve.
29
+ */
30
+ onFontsLoading?: React.ReactNode;
19
31
  children: React.ReactNode;
20
32
  }
21
- export declare function BloomThemeProvider({ mode: controlledMode, colorPreset: controlledPreset, onModeChange, onColorPresetChange, children, }: BloomThemeProviderProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function BloomThemeProvider({ mode: controlledMode, colorPreset: controlledPreset, onModeChange, onColorPresetChange, fonts, onFontsLoading, children, }: BloomThemeProviderProps): import("react/jsx-runtime").JSX.Element;
22
34
  /**
23
35
  * Scoped color override for a subtree.
24
36
  * Inherits mode/dark from the parent BloomThemeProvider but overrides the color preset.
@@ -1 +1 @@
1
- {"version":3,"file":"BloomThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theme/BloomThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4E,MAAM,OAAO,CAAC;AAEjG,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIvE,OAAO,KAAK,EAAE,KAAK,EAAe,SAAS,EAAE,MAAM,SAAS,CAAC;AAmB7D,kFAAkF;AAClF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,EAAE,UAAU,GAAE,OAAe,GAAG,KAAK,CAuEjH;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,YAAY,CAAC;IAC1B,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,iBAAiB,8CAAqD,CAAC;AAEpF,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACzC,mBAAmB,CAAC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;IAC3B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACzC,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACrD;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EAAE,cAAc,EACpB,WAAW,EAAE,gBAAgB,EAC7B,YAAY,EACZ,mBAAmB,EACnB,KAAY,EACZ,cAAc,EACd,QAAQ,GACT,EAAE,uBAAuB,2CA2DzB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,YAAY,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,eAAe,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAoB9E"}
@@ -11,22 +11,22 @@ export declare function ToastOutlet(): import("react/jsx-runtime").JSX.Element;
11
11
  /**
12
12
  * Access the full Sonner API
13
13
  */
14
- export declare const api: ((message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
14
+ export declare const api: ((message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
15
15
  id?: string | number;
16
16
  }) => string | number) & {
17
- success: (message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
17
+ success: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
18
18
  id?: string | number;
19
19
  }) => string | number;
20
- info: (message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
20
+ info: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
21
21
  id?: string | number;
22
22
  }) => string | number;
23
- error: (message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
23
+ error: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
24
24
  id?: string | number;
25
25
  }) => string | number;
26
- warning: (message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
26
+ warning: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
27
27
  id?: string | number;
28
28
  }) => string | number;
29
- custom: (jsx: React.ReactElement, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
29
+ custom: (jsx: React.ReactElement, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
30
30
  id?: string | number;
31
31
  }) => string | number;
32
32
  promise: <T>(promise: Promise<T>, options: Omit<{
@@ -40,7 +40,7 @@ export declare const api: ((message: string, data?: Omit<import("sonner-native")
40
40
  error?: import("sonner-native").ToastStyles;
41
41
  };
42
42
  }, "promise">) => string | number;
43
- loading: (message: string, data?: Omit<import("sonner-native").ToastProps, "id" | "title" | "type" | "variant" | "jsx" | "promise"> & {
43
+ loading: (message: string, data?: Omit<import("sonner-native").ToastProps, "title" | "id" | "type" | "variant" | "jsx" | "promise"> & {
44
44
  id?: string | number;
45
45
  }) => string | number;
46
46
  dismiss: (id?: string | number) => string | number | undefined;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type TextProps as RNTextProps } from 'react-native';
3
+ import { fontFamilies } from '../fonts/tokens';
3
4
  export type TextProps = RNTextProps;
4
5
  export declare const Text: React.MemoExoticComponent<({ children, style, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element>;
5
6
  export { Text as Span };
@@ -13,4 +14,5 @@ export declare function P({ style, ...rest }: TextProps): import("react/jsx-runt
13
14
  export declare namespace P {
14
15
  var displayName: string;
15
16
  }
17
+ export { fontFamilies };
16
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/typography/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAEL,KAAK,SAAS,IAAI,WAAW,EAI9B,MAAM,cAAc,CAAC;AAItB,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC;AAiBpC,eAAO,MAAM,IAAI,2DAZiD,SAAS,6CAYpC,CAAC;AAGxC,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC;AAYxB,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAGrD,wBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAU9C;yBAVe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/typography/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAEL,KAAK,SAAS,IAAI,WAAW,EAI9B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC;AAsCpC,eAAO,MAAM,IAAI,2DAZiD,SAAS,6CAYpC,CAAC;AAGxC,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC;AAiBxB,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAErD,eAAO,MAAM,EAAE,uBAAqC,CAAC;AAGrD,wBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAU9C;yBAVe,CAAC;;;AAajB,OAAO,EAAE,YAAY,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/bloom",
3
- "version": "0.2.3",
3
+ "version": "0.3.1",
4
4
  "description": "Bloom UI — Oxy ecosystem component library for React Native + Expo + Web",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -514,11 +514,34 @@
514
514
  "default": "./lib/commonjs/settings-list/index.js"
515
515
  }
516
516
  },
517
+ "./code": {
518
+ "react-native": "./src/code/index.ts",
519
+ "import": {
520
+ "types": "./lib/typescript/module/code/index.d.ts",
521
+ "default": "./lib/module/code/index.js"
522
+ },
523
+ "require": {
524
+ "types": "./lib/typescript/commonjs/code/index.d.ts",
525
+ "default": "./lib/commonjs/code/index.js"
526
+ }
527
+ },
528
+ "./fonts": {
529
+ "react-native": "./src/fonts/index.ts",
530
+ "import": {
531
+ "types": "./lib/typescript/module/fonts/index.d.ts",
532
+ "default": "./lib/module/fonts/index.js"
533
+ },
534
+ "require": {
535
+ "types": "./lib/typescript/commonjs/fonts/index.d.ts",
536
+ "default": "./lib/commonjs/fonts/index.js"
537
+ }
538
+ },
517
539
  "./package.json": "./package.json"
518
540
  },
519
541
  "files": [
520
542
  "src",
521
- "lib"
543
+ "lib",
544
+ "assets"
522
545
  ],
523
546
  "keywords": [
524
547
  "react-native",
@@ -555,6 +578,8 @@
555
578
  "tabs",
556
579
  "checkbox",
557
580
  "accordion",
581
+ "code",
582
+ "fonts",
558
583
  "ai"
559
584
  ],
560
585
  "repository": {
@@ -579,7 +604,9 @@
579
604
  "@types/react": "~19.1.0",
580
605
  "@types/react-dom": "^19.2.3",
581
606
  "@types/react-native": "*",
607
+ "expo-font": "^56.0.5",
582
608
  "jest": "^30.3.0",
609
+ "jest-environment-jsdom": "^30.4.1",
583
610
  "react": "19.2.0",
584
611
  "react-dom": "19.2.0",
585
612
  "react-native": "0.83.2",
@@ -597,6 +624,8 @@
597
624
  },
598
625
  "peerDependencies": {
599
626
  "@gorhom/bottom-sheet": ">=5.0.0",
627
+ "expo": "*",
628
+ "expo-font": "*",
600
629
  "react": ">=18.0.0",
601
630
  "react-dom": ">=18.0.0",
602
631
  "react-native": ">=0.73.0",
@@ -611,6 +640,12 @@
611
640
  "@gorhom/bottom-sheet": {
612
641
  "optional": true
613
642
  },
643
+ "expo": {
644
+ "optional": true
645
+ },
646
+ "expo-font": {
647
+ "optional": true
648
+ },
614
649
  "react-dom": {
615
650
  "optional": true
616
651
  },
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @jest-environment jsdom
3
+ */
4
+
5
+ import React from 'react';
6
+ import { Platform, Text } from 'react-native';
7
+ import { render } from '@testing-library/react-native';
8
+
9
+ import { BloomThemeProvider } from '../theme/BloomThemeProvider';
10
+
11
+ describe('BloomThemeProvider — font injection on web', () => {
12
+ const originalOS = Platform.OS;
13
+
14
+ beforeEach(() => {
15
+ document.head.innerHTML = '';
16
+ document.body.innerHTML = '';
17
+ Platform.OS = 'web';
18
+ });
19
+
20
+ afterAll(() => {
21
+ Platform.OS = originalOS;
22
+ });
23
+
24
+ it('injects <style id="bloom-fonts"> by default', () => {
25
+ expect(document.getElementById('bloom-fonts')).toBeNull();
26
+ render(
27
+ <BloomThemeProvider>
28
+ <Text>hi</Text>
29
+ </BloomThemeProvider>,
30
+ );
31
+ expect(document.getElementById('bloom-fonts')).not.toBeNull();
32
+ });
33
+
34
+ it('does not inject the style tag when fonts={false}', () => {
35
+ render(
36
+ <BloomThemeProvider fonts={false}>
37
+ <Text>hi</Text>
38
+ </BloomThemeProvider>,
39
+ );
40
+ expect(document.getElementById('bloom-fonts')).toBeNull();
41
+ });
42
+ });
@@ -158,3 +158,25 @@ describe('useBloomTheme', () => {
158
158
  spy.mockRestore();
159
159
  });
160
160
  });
161
+
162
+ describe('BloomThemeProvider font integration', () => {
163
+ it('still renders children when fonts default is enabled', () => {
164
+ const { getByTestId } = render(
165
+ <BloomThemeProvider>
166
+ <ThemeDisplay />
167
+ </BloomThemeProvider>,
168
+ );
169
+ // In the node test environment without document, applyFontFaces is a
170
+ // no-op but the FontLoader still passes children through.
171
+ expect(getByTestId('mode').props.children).toBe('light');
172
+ });
173
+
174
+ it('still renders children when fonts={false}', () => {
175
+ const { getByTestId } = render(
176
+ <BloomThemeProvider fonts={false}>
177
+ <ThemeDisplay />
178
+ </BloomThemeProvider>,
179
+ );
180
+ expect(getByTestId('mode').props.children).toBe('light');
181
+ });
182
+ });
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react-native';
3
+
4
+ import { BloomThemeProvider } from '../theme/BloomThemeProvider';
5
+ import { Code } from '../code';
6
+
7
+ function renderWithTheme(ui: React.ReactElement) {
8
+ return render(<BloomThemeProvider mode="light">{ui}</BloomThemeProvider>);
9
+ }
10
+
11
+ describe('Code', () => {
12
+ it('renders children', () => {
13
+ const { getByText } = renderWithTheme(<Code>const x = 1</Code>);
14
+ expect(getByText('const x = 1')).toBeTruthy();
15
+ });
16
+
17
+ it('applies the Geist Mono font family on native', () => {
18
+ const { getByText } = renderWithTheme(<Code>foo</Code>);
19
+ const node = getByText('foo');
20
+ const flat = Array.isArray(node.props.style)
21
+ ? Object.assign({}, ...node.props.style.filter(Boolean))
22
+ : node.props.style;
23
+ expect(flat.fontFamily).toBe('Geist Mono');
24
+ });
25
+ });