@oxyhq/bloom 0.68.0 → 0.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/lib/commonjs/animated-check/AnimatedCheck.js +22 -93
  2. package/lib/commonjs/animated-check/AnimatedCheck.js.map +1 -1
  3. package/lib/commonjs/avatar/Avatar.js +6 -24
  4. package/lib/commonjs/avatar/Avatar.js.map +1 -1
  5. package/lib/commonjs/avatar/AvatarRing.js +14 -30
  6. package/lib/commonjs/avatar/AvatarRing.js.map +1 -1
  7. package/lib/commonjs/bottom-sheet/index.js +9 -4
  8. package/lib/commonjs/bottom-sheet/index.js.map +1 -1
  9. package/lib/commonjs/connection-status/index.js +16 -7
  10. package/lib/commonjs/connection-status/index.js.map +1 -1
  11. package/lib/commonjs/connection-status/netinfo.js +119 -0
  12. package/lib/commonjs/connection-status/netinfo.js.map +1 -0
  13. package/lib/commonjs/hooks/haptics-module.js +109 -0
  14. package/lib/commonjs/hooks/haptics-module.js.map +1 -0
  15. package/lib/commonjs/hooks/useHaptics.js +6 -8
  16. package/lib/commonjs/hooks/useHaptics.js.map +1 -1
  17. package/lib/commonjs/loading/SpinnerIcon.js +22 -55
  18. package/lib/commonjs/loading/SpinnerIcon.js.map +1 -1
  19. package/lib/commonjs/theme/adaptive-colors.js +20 -4
  20. package/lib/commonjs/theme/adaptive-colors.js.map +1 -1
  21. package/lib/commonjs/theme/color-scope/style-builder.js +107 -6
  22. package/lib/commonjs/theme/color-scope/style-builder.js.map +1 -1
  23. package/lib/commonjs/theme/init-css-interop.js +13 -11
  24. package/lib/commonjs/theme/init-css-interop.js.map +1 -1
  25. package/lib/module/animated-check/AnimatedCheck.js +22 -91
  26. package/lib/module/animated-check/AnimatedCheck.js.map +1 -1
  27. package/lib/module/avatar/Avatar.js +1 -19
  28. package/lib/module/avatar/Avatar.js.map +1 -1
  29. package/lib/module/avatar/AvatarRing.js +7 -23
  30. package/lib/module/avatar/AvatarRing.js.map +1 -1
  31. package/lib/module/bottom-sheet/index.js +9 -4
  32. package/lib/module/bottom-sheet/index.js.map +1 -1
  33. package/lib/module/connection-status/index.js +16 -6
  34. package/lib/module/connection-status/index.js.map +1 -1
  35. package/lib/module/connection-status/netinfo.js +114 -0
  36. package/lib/module/connection-status/netinfo.js.map +1 -0
  37. package/lib/module/hooks/haptics-module.js +104 -0
  38. package/lib/module/hooks/haptics-module.js.map +1 -0
  39. package/lib/module/hooks/useHaptics.js +7 -11
  40. package/lib/module/hooks/useHaptics.js.map +1 -1
  41. package/lib/module/loading/SpinnerIcon.js +13 -46
  42. package/lib/module/loading/SpinnerIcon.js.map +1 -1
  43. package/lib/module/loading/index.web.js +2 -2
  44. package/lib/module/theme/adaptive-colors.js +20 -4
  45. package/lib/module/theme/adaptive-colors.js.map +1 -1
  46. package/lib/module/theme/color-scope/style-builder.js +107 -6
  47. package/lib/module/theme/color-scope/style-builder.js.map +1 -1
  48. package/lib/module/theme/init-css-interop.js +13 -11
  49. package/lib/module/theme/init-css-interop.js.map +1 -1
  50. package/lib/typescript/commonjs/animated-check/AnimatedCheck.d.ts.map +1 -1
  51. package/lib/typescript/commonjs/avatar/Avatar.d.ts.map +1 -1
  52. package/lib/typescript/commonjs/avatar/AvatarRing.d.ts.map +1 -1
  53. package/lib/typescript/commonjs/bottom-sheet/index.d.ts.map +1 -1
  54. package/lib/typescript/commonjs/connection-status/index.d.ts.map +1 -1
  55. package/lib/typescript/commonjs/connection-status/netinfo.d.ts +69 -0
  56. package/lib/typescript/commonjs/connection-status/netinfo.d.ts.map +1 -0
  57. package/lib/typescript/commonjs/hooks/haptics-module.d.ts +58 -0
  58. package/lib/typescript/commonjs/hooks/haptics-module.d.ts.map +1 -0
  59. package/lib/typescript/commonjs/hooks/useHaptics.d.ts.map +1 -1
  60. package/lib/typescript/commonjs/loading/SpinnerIcon.d.ts +9 -2
  61. package/lib/typescript/commonjs/loading/SpinnerIcon.d.ts.map +1 -1
  62. package/lib/typescript/commonjs/theme/adaptive-colors.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/theme/color-scope/style-builder.d.ts.map +1 -1
  64. package/lib/typescript/commonjs/theme/init-css-interop.d.ts.map +1 -1
  65. package/lib/typescript/module/animated-check/AnimatedCheck.d.ts.map +1 -1
  66. package/lib/typescript/module/avatar/Avatar.d.ts.map +1 -1
  67. package/lib/typescript/module/avatar/AvatarRing.d.ts.map +1 -1
  68. package/lib/typescript/module/bottom-sheet/index.d.ts.map +1 -1
  69. package/lib/typescript/module/connection-status/index.d.ts.map +1 -1
  70. package/lib/typescript/module/connection-status/netinfo.d.ts +69 -0
  71. package/lib/typescript/module/connection-status/netinfo.d.ts.map +1 -0
  72. package/lib/typescript/module/hooks/haptics-module.d.ts +58 -0
  73. package/lib/typescript/module/hooks/haptics-module.d.ts.map +1 -0
  74. package/lib/typescript/module/hooks/useHaptics.d.ts.map +1 -1
  75. package/lib/typescript/module/loading/SpinnerIcon.d.ts +9 -2
  76. package/lib/typescript/module/loading/SpinnerIcon.d.ts.map +1 -1
  77. package/lib/typescript/module/theme/adaptive-colors.d.ts.map +1 -1
  78. package/lib/typescript/module/theme/color-scope/style-builder.d.ts.map +1 -1
  79. package/lib/typescript/module/theme/init-css-interop.d.ts.map +1 -1
  80. package/package.json +2 -2
  81. package/src/__tests__/color-scope-nativewind.test.ts +135 -0
  82. package/src/__tests__/connection-status-netinfo.test.tsx +203 -0
  83. package/src/__tests__/optional-peer-imports.test.ts +406 -0
  84. package/src/__tests__/svg-required-peer.test.tsx +75 -0
  85. package/src/__tests__/useHaptics.test.tsx +203 -16
  86. package/src/animated-check/AnimatedCheck.tsx +19 -86
  87. package/src/avatar/Avatar.tsx +1 -11
  88. package/src/avatar/AvatarRing.tsx +7 -15
  89. package/src/bottom-sheet/index.tsx +9 -4
  90. package/src/connection-status/index.tsx +16 -6
  91. package/src/connection-status/netinfo.ts +131 -0
  92. package/src/hooks/haptics-module.ts +118 -0
  93. package/src/hooks/useHaptics.tsx +6 -9
  94. package/src/loading/SpinnerIcon.tsx +13 -52
  95. package/src/loading/index.web.ts +2 -2
  96. package/src/theme/adaptive-colors.ts +20 -4
  97. package/src/theme/color-scope/style-builder.ts +118 -6
  98. package/src/theme/init-css-interop.ts +13 -11
  99. package/lib/commonjs/avatar/svg-module.js +0 -15
  100. package/lib/commonjs/avatar/svg-module.js.map +0 -1
  101. package/lib/commonjs/utils/lazy-require.js +0 -37
  102. package/lib/commonjs/utils/lazy-require.js.map +0 -1
  103. package/lib/module/avatar/svg-module.js +0 -11
  104. package/lib/module/avatar/svg-module.js.map +0 -1
  105. package/lib/module/utils/lazy-require.js +0 -33
  106. package/lib/module/utils/lazy-require.js.map +0 -1
  107. package/lib/typescript/commonjs/avatar/svg-module.d.ts +0 -8
  108. package/lib/typescript/commonjs/avatar/svg-module.d.ts.map +0 -1
  109. package/lib/typescript/commonjs/utils/lazy-require.d.ts +0 -15
  110. package/lib/typescript/commonjs/utils/lazy-require.d.ts.map +0 -1
  111. package/lib/typescript/module/avatar/svg-module.d.ts +0 -8
  112. package/lib/typescript/module/avatar/svg-module.d.ts.map +0 -1
  113. package/lib/typescript/module/utils/lazy-require.d.ts +0 -15
  114. package/lib/typescript/module/utils/lazy-require.d.ts.map +0 -1
  115. package/src/avatar/svg-module.ts +0 -11
  116. package/src/utils/lazy-require.ts +0 -31
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.lazyRequire = lazyRequire;
7
- /**
8
- * Creates a lazy-loaded module getter that caches the result.
9
- *
10
- * Safely handles environments where `require` is not defined (e.g. Vite/browser ESM)
11
- * and returns `null` when the module is not installed. The result is cached after the
12
- * first call so subsequent calls are zero-cost.
13
- *
14
- * @example
15
- * ```ts
16
- * const getSvg = lazyRequire<typeof import('react-native-svg')>('react-native-svg');
17
- * const svg = getSvg(); // SvgModuleType | null
18
- * ```
19
- */
20
- function lazyRequire(moduleName) {
21
- let module = null;
22
- let resolved = false;
23
- return () => {
24
- if (!resolved) {
25
- resolved = true;
26
- try {
27
- if (typeof require !== 'undefined') {
28
- module = require(moduleName);
29
- }
30
- } catch {
31
- module = null;
32
- }
33
- }
34
- return module;
35
- };
36
- }
37
- //# sourceMappingURL=lazy-require.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["lazyRequire","moduleName","module","resolved","require"],"sourceRoot":"../../../src","sources":["utils/lazy-require.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,WAAWA,CAAIC,UAAkB,EAAkB;EACjE,IAAIC,MAAgB,GAAG,IAAI;EAC3B,IAAIC,QAAQ,GAAG,KAAK;EAEpB,OAAO,MAAgB;IACrB,IAAI,CAACA,QAAQ,EAAE;MACbA,QAAQ,GAAG,IAAI;MACf,IAAI;QACF,IAAI,OAAOC,OAAO,KAAK,WAAW,EAAE;UAClCF,MAAM,GAAGE,OAAO,CAACH,UAAU,CAAC;QAC9B;MACF,CAAC,CAAC,MAAM;QACNC,MAAM,GAAG,IAAI;MACf;IACF;IACA,OAAOA,MAAM;EACf,CAAC;AACH","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- import { lazyRequire } from "../utils/lazy-require.js";
4
- /**
5
- * Lazily loads `react-native-svg`, returning `null` when it is not installed
6
- * (e.g. a web bundle that does not ship the optional peer). Shared by the
7
- * squircle avatar image clip in `Avatar.tsx` and the `AvatarRing` so there is a
8
- * single loader rather than one per call site.
9
- */
10
- export const getSvgModule = lazyRequire('react-native-svg');
11
- //# sourceMappingURL=svg-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["lazyRequire","getSvgModule"],"sourceRoot":"../../../src","sources":["avatar/svg-module.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,0BAAuB;AAInD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAGD,WAAW,CAAgB,kBAAkB,CAAC","ignoreList":[]}
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- /**
4
- * Creates a lazy-loaded module getter that caches the result.
5
- *
6
- * Safely handles environments where `require` is not defined (e.g. Vite/browser ESM)
7
- * and returns `null` when the module is not installed. The result is cached after the
8
- * first call so subsequent calls are zero-cost.
9
- *
10
- * @example
11
- * ```ts
12
- * const getSvg = lazyRequire<typeof import('react-native-svg')>('react-native-svg');
13
- * const svg = getSvg(); // SvgModuleType | null
14
- * ```
15
- */
16
- export function lazyRequire(moduleName) {
17
- let module = null;
18
- let resolved = false;
19
- return () => {
20
- if (!resolved) {
21
- resolved = true;
22
- try {
23
- if (typeof require !== 'undefined') {
24
- module = require(moduleName);
25
- }
26
- } catch {
27
- module = null;
28
- }
29
- }
30
- return module;
31
- };
32
- }
33
- //# sourceMappingURL=lazy-require.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["lazyRequire","moduleName","module","resolved","require"],"sourceRoot":"../../../src","sources":["utils/lazy-require.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,WAAWA,CAAIC,UAAkB,EAAkB;EACjE,IAAIC,MAAgB,GAAG,IAAI;EAC3B,IAAIC,QAAQ,GAAG,KAAK;EAEpB,OAAO,MAAgB;IACrB,IAAI,CAACA,QAAQ,EAAE;MACbA,QAAQ,GAAG,IAAI;MACf,IAAI;QACF,IAAI,OAAOC,OAAO,KAAK,WAAW,EAAE;UAClCF,MAAM,GAAGE,OAAO,CAACH,UAAU,CAAC;QAC9B;MACF,CAAC,CAAC,MAAM;QACNC,MAAM,GAAG,IAAI;MACf;IACF;IACA,OAAOA,MAAM;EACf,CAAC;AACH","ignoreList":[]}
@@ -1,8 +0,0 @@
1
- /**
2
- * Lazily loads `react-native-svg`, returning `null` when it is not installed
3
- * (e.g. a web bundle that does not ship the optional peer). Shared by the
4
- * squircle avatar image clip in `Avatar.tsx` and the `AvatarRing` so there is a
5
- * single loader rather than one per call site.
6
- */
7
- export declare const getSvgModule: () => typeof import("react-native-svg") | null;
8
- //# sourceMappingURL=svg-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"svg-module.d.ts","sourceRoot":"","sources":["../../../../src/avatar/svg-module.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,gDAAiD,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Creates a lazy-loaded module getter that caches the result.
3
- *
4
- * Safely handles environments where `require` is not defined (e.g. Vite/browser ESM)
5
- * and returns `null` when the module is not installed. The result is cached after the
6
- * first call so subsequent calls are zero-cost.
7
- *
8
- * @example
9
- * ```ts
10
- * const getSvg = lazyRequire<typeof import('react-native-svg')>('react-native-svg');
11
- * const svg = getSvg(); // SvgModuleType | null
12
- * ```
13
- */
14
- export declare function lazyRequire<T>(moduleName: string): () => T | null;
15
- //# sourceMappingURL=lazy-require.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazy-require.d.ts","sourceRoot":"","sources":["../../../../src/utils/lazy-require.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,CAiBjE"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Lazily loads `react-native-svg`, returning `null` when it is not installed
3
- * (e.g. a web bundle that does not ship the optional peer). Shared by the
4
- * squircle avatar image clip in `Avatar.tsx` and the `AvatarRing` so there is a
5
- * single loader rather than one per call site.
6
- */
7
- export declare const getSvgModule: () => typeof import("react-native-svg") | null;
8
- //# sourceMappingURL=svg-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"svg-module.d.ts","sourceRoot":"","sources":["../../../../src/avatar/svg-module.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,gDAAiD,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * Creates a lazy-loaded module getter that caches the result.
3
- *
4
- * Safely handles environments where `require` is not defined (e.g. Vite/browser ESM)
5
- * and returns `null` when the module is not installed. The result is cached after the
6
- * first call so subsequent calls are zero-cost.
7
- *
8
- * @example
9
- * ```ts
10
- * const getSvg = lazyRequire<typeof import('react-native-svg')>('react-native-svg');
11
- * const svg = getSvg(); // SvgModuleType | null
12
- * ```
13
- */
14
- export declare function lazyRequire<T>(moduleName: string): () => T | null;
15
- //# sourceMappingURL=lazy-require.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazy-require.d.ts","sourceRoot":"","sources":["../../../../src/utils/lazy-require.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,CAiBjE"}
@@ -1,11 +0,0 @@
1
- import { lazyRequire } from '../utils/lazy-require';
2
-
3
- type SvgModuleType = typeof import('react-native-svg');
4
-
5
- /**
6
- * Lazily loads `react-native-svg`, returning `null` when it is not installed
7
- * (e.g. a web bundle that does not ship the optional peer). Shared by the
8
- * squircle avatar image clip in `Avatar.tsx` and the `AvatarRing` so there is a
9
- * single loader rather than one per call site.
10
- */
11
- export const getSvgModule = lazyRequire<SvgModuleType>('react-native-svg');
@@ -1,31 +0,0 @@
1
- /**
2
- * Creates a lazy-loaded module getter that caches the result.
3
- *
4
- * Safely handles environments where `require` is not defined (e.g. Vite/browser ESM)
5
- * and returns `null` when the module is not installed. The result is cached after the
6
- * first call so subsequent calls are zero-cost.
7
- *
8
- * @example
9
- * ```ts
10
- * const getSvg = lazyRequire<typeof import('react-native-svg')>('react-native-svg');
11
- * const svg = getSvg(); // SvgModuleType | null
12
- * ```
13
- */
14
- export function lazyRequire<T>(moduleName: string): () => T | null {
15
- let module: T | null = null;
16
- let resolved = false;
17
-
18
- return (): T | null => {
19
- if (!resolved) {
20
- resolved = true;
21
- try {
22
- if (typeof require !== 'undefined') {
23
- module = require(moduleName);
24
- }
25
- } catch {
26
- module = null;
27
- }
28
- }
29
- return module;
30
- };
31
- }