@oxyhq/bloom 0.35.5 → 0.35.7

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 (87) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +1 -1
  3. package/lib/commonjs/content-panel/index.js +22 -6
  4. package/lib/commonjs/content-panel/index.js.map +1 -1
  5. package/lib/commonjs/content-panel/index.web.js +37 -12
  6. package/lib/commonjs/content-panel/index.web.js.map +1 -1
  7. package/lib/commonjs/fonts/FontLoader.native.js +2 -2
  8. package/lib/commonjs/fonts/FontLoader.native.js.map +1 -1
  9. package/lib/commonjs/fonts/assets/GeistMono-OFL.txt +93 -0
  10. package/lib/commonjs/fonts/assets/Inter-OFL.txt +92 -0
  11. package/lib/commonjs/fonts/font-assets.js +16 -14
  12. package/lib/commonjs/fonts/font-assets.js.map +1 -1
  13. package/lib/commonjs/fonts/font-assets.native.js +31 -0
  14. package/lib/commonjs/fonts/font-assets.native.js.map +1 -0
  15. package/lib/commonjs/fonts/font-assets.web.js +24 -0
  16. package/lib/commonjs/fonts/font-assets.web.js.map +1 -0
  17. package/lib/commonjs/fonts/index.js +1 -1
  18. package/lib/commonjs/fonts/index.web.js +2 -2
  19. package/lib/commonjs/fonts/index.web.js.map +1 -1
  20. package/lib/commonjs/fonts/tokens.js +12 -0
  21. package/lib/commonjs/fonts/tokens.js.map +1 -1
  22. package/lib/commonjs/theme/init-css-interop.js +13 -1
  23. package/lib/commonjs/theme/init-css-interop.js.map +1 -1
  24. package/lib/module/content-panel/index.js +22 -6
  25. package/lib/module/content-panel/index.js.map +1 -1
  26. package/lib/module/content-panel/index.web.js +37 -12
  27. package/lib/module/content-panel/index.web.js.map +1 -1
  28. package/lib/module/fonts/FontLoader.native.js +1 -1
  29. package/lib/module/fonts/FontLoader.native.js.map +1 -1
  30. package/lib/module/fonts/assets/GeistMono-OFL.txt +93 -0
  31. package/lib/module/fonts/assets/Inter-OFL.txt +92 -0
  32. package/lib/module/fonts/font-assets.js +16 -14
  33. package/lib/module/fonts/font-assets.js.map +1 -1
  34. package/lib/module/fonts/font-assets.native.js +27 -0
  35. package/lib/module/fonts/font-assets.native.js.map +1 -0
  36. package/lib/module/fonts/font-assets.web.js +20 -0
  37. package/lib/module/fonts/font-assets.web.js.map +1 -0
  38. package/lib/module/fonts/index.js +1 -1
  39. package/lib/module/fonts/index.js.map +1 -1
  40. package/lib/module/fonts/index.web.js +15 -6
  41. package/lib/module/fonts/index.web.js.map +1 -1
  42. package/lib/module/fonts/tokens.js +12 -0
  43. package/lib/module/fonts/tokens.js.map +1 -1
  44. package/lib/module/theme/init-css-interop.js +13 -1
  45. package/lib/module/theme/init-css-interop.js.map +1 -1
  46. package/lib/typescript/commonjs/content-panel/index.d.ts +21 -8
  47. package/lib/typescript/commonjs/content-panel/index.d.ts.map +1 -1
  48. package/lib/typescript/commonjs/content-panel/index.web.d.ts +26 -6
  49. package/lib/typescript/commonjs/content-panel/index.web.d.ts.map +1 -1
  50. package/lib/typescript/commonjs/fonts/font-assets.d.ts +2 -6
  51. package/lib/typescript/commonjs/fonts/font-assets.d.ts.map +1 -1
  52. package/lib/typescript/commonjs/fonts/font-assets.native.d.ts +3 -0
  53. package/lib/typescript/commonjs/fonts/font-assets.native.d.ts.map +1 -0
  54. package/lib/typescript/commonjs/fonts/font-assets.web.d.ts +3 -0
  55. package/lib/typescript/commonjs/fonts/font-assets.web.d.ts.map +1 -0
  56. package/lib/typescript/commonjs/fonts/index.web.d.ts +1 -1
  57. package/lib/typescript/commonjs/fonts/index.web.d.ts.map +1 -1
  58. package/lib/typescript/commonjs/fonts/tokens.d.ts +12 -0
  59. package/lib/typescript/commonjs/fonts/tokens.d.ts.map +1 -1
  60. package/lib/typescript/commonjs/theme/init-css-interop.d.ts.map +1 -1
  61. package/lib/typescript/module/content-panel/index.d.ts +21 -8
  62. package/lib/typescript/module/content-panel/index.d.ts.map +1 -1
  63. package/lib/typescript/module/content-panel/index.web.d.ts +26 -6
  64. package/lib/typescript/module/content-panel/index.web.d.ts.map +1 -1
  65. package/lib/typescript/module/fonts/font-assets.d.ts +2 -6
  66. package/lib/typescript/module/fonts/font-assets.d.ts.map +1 -1
  67. package/lib/typescript/module/fonts/font-assets.native.d.ts +3 -0
  68. package/lib/typescript/module/fonts/font-assets.native.d.ts.map +1 -0
  69. package/lib/typescript/module/fonts/font-assets.web.d.ts +3 -0
  70. package/lib/typescript/module/fonts/font-assets.web.d.ts.map +1 -0
  71. package/lib/typescript/module/fonts/index.web.d.ts +1 -1
  72. package/lib/typescript/module/fonts/index.web.d.ts.map +1 -1
  73. package/lib/typescript/module/fonts/tokens.d.ts +12 -0
  74. package/lib/typescript/module/fonts/tokens.d.ts.map +1 -1
  75. package/lib/typescript/module/theme/init-css-interop.d.ts.map +1 -1
  76. package/package.json +2 -2
  77. package/src/content-panel/index.tsx +33 -14
  78. package/src/content-panel/index.web.tsx +62 -22
  79. package/src/fonts/FontLoader.native.tsx +1 -1
  80. package/src/fonts/assets/GeistMono-OFL.txt +93 -0
  81. package/src/fonts/assets/Inter-OFL.txt +92 -0
  82. package/src/fonts/font-assets.native.ts +25 -0
  83. package/src/fonts/font-assets.ts +17 -14
  84. package/src/fonts/font-assets.web.ts +18 -0
  85. package/src/fonts/index.web.ts +15 -6
  86. package/src/fonts/tokens.ts +13 -0
  87. package/src/theme/init-css-interop.ts +13 -1
@@ -7,11 +7,20 @@
7
7
  * the rounded corners / lateral gutters is masked while a single seamless border
8
8
  * is drawn around the panel — see `index.web.tsx`.
9
9
  *
10
- * On NATIVE none of that applies: there is no document scroll, no sticky
11
- * positioning, and no bleed to mask, so the panel is simply a rounded, bordered
12
- * surface wrapping its content. The `framed` and `showStickyFrame` props are
13
- * accepted for cross-platform API parity but are intentionally no-ops here
14
- * (mirroring the no-op native fork of `../scroll`).
10
+ * On NATIVE none of the WEB overlay machinery applies: there is no document
11
+ * scroll, no sticky positioning, and no bleed to mask, so the panel is simply a
12
+ * surface wrapping its content. The `framed` prop still drives whether that
13
+ * surface is rounded + bordered, tri-state and resolved with pure NativeWind
14
+ * (`md:` evaluates against the window width on native too no JS breakpoint
15
+ * hook needed):
16
+ *
17
+ * - `undefined` (DEFAULT) → responsive: full-bleed below `md`, rounded +
18
+ * bordered at `md`+ (`md:rounded-radius-28 md:border md:border-border`).
19
+ * - `false` → never framed (plain full-bleed at every size).
20
+ * - `true` → always rounded + bordered.
21
+ *
22
+ * `showStickyFrame` and `maskColor` are accepted for cross-platform API parity
23
+ * but are no-ops here (there are no sticky overlays on native).
15
24
  *
16
25
  * Web bundlers select `./index.web` via the `"browser"` export condition in
17
26
  * `package.json`; native bundlers fall through to this file.
@@ -34,10 +43,14 @@ export declare const PANEL_BOTTOM_INSET = 8;
34
43
  export interface ContentPanelProps {
35
44
  children: React.ReactNode;
36
45
  /**
37
- * Whether the panel is framed (wide screens) or full-bleed (narrow screens).
38
- * No-op on native — the surface is always a rounded, bordered View.
46
+ * Framing mode. Tri-state, resolved purely with NativeWind no consumer
47
+ * breakpoint hook needed:
48
+ * - `undefined` (DEFAULT) → responsive: full-bleed below `md`, rounded +
49
+ * bordered at `md`+.
50
+ * - `false` → never framed (plain full-bleed at every size).
51
+ * - `true` → always rounded + bordered.
39
52
  */
40
- framed: boolean;
53
+ framed?: boolean;
41
54
  /** Override the surface background utility (defaults to `bg-card`). */
42
55
  surfaceClassName?: string;
43
56
  surfaceStyle?: StyleProp<ViewStyle>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAOpE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,wDAAwD;AACxD,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAqCD,eAAO,MAAM,YAAY,+CAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAOpE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,wDAAwD;AACxD,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2CD,eAAO,MAAM,YAAY,+CAA8B,CAAC"}
@@ -23,16 +23,29 @@
23
23
  * content rather than displacing it). They render BEFORE the content wrapper so
24
24
  * z-index — not DOM order — decides layering.
25
25
  *
26
- * When `framed` is false (narrow screens) the panel is full-bleed: a single
27
- * flat surface, no rounding, no overlays.
26
+ * Framing is tri-state via the `framed` prop:
27
+ *
28
+ * - `undefined` (DEFAULT) → RESPONSIVE, driven purely by NativeWind: full-bleed
29
+ * below `md`, framed at `md`+. The rounding is `md:`-gated and both overlays
30
+ * are always rendered but carry `max-md:hidden` (`display:none` below `md`),
31
+ * so the breakpoint is decided in CSS — no consumer JS breakpoint hook.
32
+ * - `false` → NEVER framed (full-bleed at every size): a single flat surface,
33
+ * no rounding, no overlays.
34
+ * - `true` → ALWAYS framed (rounded + overlays at every size).
35
+ *
36
+ * The overlays are gated by VISIBILITY (a `max-md:hidden` literal) rather than
37
+ * by conditional mounting for the responsive case, so crossing the breakpoint
38
+ * never remounts them. The content wrapper likewise keeps a stable `key` so
39
+ * `{children}` reconciles in place across the breakpoint instead of remounting
40
+ * (which would reset feed scroll / the virtualizer + refetch).
28
41
  *
29
42
  * Native bundlers use `./index.tsx` (a plain rounded surface); web bundlers
30
43
  * select this file via the `"browser"` export condition in `package.json`.
31
44
  *
32
45
  * Styling is NativeWind-className-first; the literal class strings below MUST
33
46
  * stay literal so a consumer's Tailwind content-scan over `lib/**` picks them up
34
- * (no dynamic concatenation of the arbitrary `web:[…]` / `rounded-radius-28`
35
- * parts).
47
+ * (no dynamic concatenation of the arbitrary `web:[…]` / `rounded-radius-28` /
48
+ * `md:` parts — whole class strings are selected per mode instead).
36
49
  */
37
50
  import React from 'react';
38
51
  import { type StyleProp, type ViewStyle } from 'react-native';
@@ -44,8 +57,15 @@ export declare const PANEL_TOP_INSET = 8;
44
57
  export declare const PANEL_BOTTOM_INSET = 8;
45
58
  export interface ContentPanelProps {
46
59
  children: React.ReactNode;
47
- /** Framed (wide screens) vs full-bleed (narrow screens). */
48
- framed: boolean;
60
+ /**
61
+ * Framing mode. Tri-state, resolved purely with NativeWind — no consumer
62
+ * breakpoint hook needed:
63
+ * - `undefined` (DEFAULT) → responsive: full-bleed below `md`, framed at
64
+ * `md`+ (rounded corners + sticky bleed-mask/border overlays).
65
+ * - `false` → never framed (full-bleed at every size).
66
+ * - `true` → always framed (rounded + overlays at every size).
67
+ */
68
+ framed?: boolean;
49
69
  /** Override the surface background utility (defaults to `bg-card`). */
50
70
  surfaceClassName?: string;
51
71
  surfaceStyle?: StyleProp<ViewStyle>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/index.web.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAQpE,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,6DAA6D;AAC7D,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,4DAA4D;IAC5D,MAAM,EAAE,OAAO,CAAC;IAChB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qEAAqE;IACrE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAqED,eAAO,MAAM,YAAY,+CAA8B,CAAC"}
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/index.web.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAQpE,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,6DAA6D;AAC7D,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qEAAqE;IACrE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyFD,eAAO,MAAM,YAAY,+CAA8B,CAAC"}
@@ -1,7 +1,3 @@
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
- };
1
+ import type { FontAssetMap } from './tokens';
2
+ export declare const FONT_ASSETS: FontAssetMap;
7
3
  //# sourceMappingURL=font-assets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"font-assets.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-assets.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW;;;;;CAKd,CAAC"}
1
+ {"version":3,"file":"font-assets.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-assets.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,WAAW,EAAE,YAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FontAssetMap } from './tokens';
2
+ export declare const FONT_ASSETS: FontAssetMap;
3
+ //# sourceMappingURL=font-assets.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-assets.native.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-assets.native.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,WAAW,EAAE,YAKzB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FontAssetMap } from './tokens';
2
+ export declare const FONT_ASSETS: FontAssetMap;
3
+ //# sourceMappingURL=font-assets.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-assets.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-assets.web.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,WAAW,EAAE,YAAiB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export { fontFamilies, fontCssVars } from './tokens';
2
2
  export type { FontFamilyName } from './tokens';
3
3
  export { applyFontFaces } from './apply-font-faces.web';
4
- export { FONT_ASSETS } from './font-assets';
4
+ export { FONT_ASSETS } from './font-assets.web';
5
5
  export { FontLoader } from './FontLoader';
6
6
  export type { FontLoaderProps } from './FontLoader';
7
7
  //# sourceMappingURL=index.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/index.web.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/index.web.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
@@ -18,4 +18,16 @@ export declare const fontCssVars: {
18
18
  readonly mono: "--bloom-font-mono";
19
19
  };
20
20
  export type FontFamilyName = keyof typeof fontFamilies;
21
+ /**
22
+ * Shape of the font asset map handed to `expo-font`'s `useFonts()`.
23
+ *
24
+ * Values are Metro asset-registry ids produced by `require('./assets/*.ttf')`,
25
+ * so the map is only ever populated under Metro (`font-assets.native.ts`).
26
+ * Every other platform resolves an empty map — web installs the same families
27
+ * as `@font-face` rules instead (`apply-font-faces.web.ts`).
28
+ *
29
+ * Declared here, in the platform-neutral tokens module, so all three
30
+ * `font-assets` variants can share it without importing each other.
31
+ */
32
+ export type FontAssetMap = Record<string, number>;
21
33
  //# sourceMappingURL=tokens.d.ts.map
@@ -1 +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"}
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;AAEvD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"init-css-interop.d.ts","sourceRoot":"","sources":["../../../../src/theme/init-css-interop.ts"],"names":[],"mappings":"AA2GA;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAS7C"}
1
+ {"version":3,"file":"init-css-interop.d.ts","sourceRoot":"","sources":["../../../../src/theme/init-css-interop.ts"],"names":[],"mappings":"AAuHA;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAS7C"}
@@ -7,11 +7,20 @@
7
7
  * the rounded corners / lateral gutters is masked while a single seamless border
8
8
  * is drawn around the panel — see `index.web.tsx`.
9
9
  *
10
- * On NATIVE none of that applies: there is no document scroll, no sticky
11
- * positioning, and no bleed to mask, so the panel is simply a rounded, bordered
12
- * surface wrapping its content. The `framed` and `showStickyFrame` props are
13
- * accepted for cross-platform API parity but are intentionally no-ops here
14
- * (mirroring the no-op native fork of `../scroll`).
10
+ * On NATIVE none of the WEB overlay machinery applies: there is no document
11
+ * scroll, no sticky positioning, and no bleed to mask, so the panel is simply a
12
+ * surface wrapping its content. The `framed` prop still drives whether that
13
+ * surface is rounded + bordered, tri-state and resolved with pure NativeWind
14
+ * (`md:` evaluates against the window width on native too no JS breakpoint
15
+ * hook needed):
16
+ *
17
+ * - `undefined` (DEFAULT) → responsive: full-bleed below `md`, rounded +
18
+ * bordered at `md`+ (`md:rounded-radius-28 md:border md:border-border`).
19
+ * - `false` → never framed (plain full-bleed at every size).
20
+ * - `true` → always rounded + bordered.
21
+ *
22
+ * `showStickyFrame` and `maskColor` are accepted for cross-platform API parity
23
+ * but are no-ops here (there are no sticky overlays on native).
15
24
  *
16
25
  * Web bundlers select `./index.web` via the `"browser"` export condition in
17
26
  * `package.json`; native bundlers fall through to this file.
@@ -34,10 +43,14 @@ export declare const PANEL_BOTTOM_INSET = 8;
34
43
  export interface ContentPanelProps {
35
44
  children: React.ReactNode;
36
45
  /**
37
- * Whether the panel is framed (wide screens) or full-bleed (narrow screens).
38
- * No-op on native — the surface is always a rounded, bordered View.
46
+ * Framing mode. Tri-state, resolved purely with NativeWind no consumer
47
+ * breakpoint hook needed:
48
+ * - `undefined` (DEFAULT) → responsive: full-bleed below `md`, rounded +
49
+ * bordered at `md`+.
50
+ * - `false` → never framed (plain full-bleed at every size).
51
+ * - `true` → always rounded + bordered.
39
52
  */
40
- framed: boolean;
53
+ framed?: boolean;
41
54
  /** Override the surface background utility (defaults to `bg-card`). */
42
55
  surfaceClassName?: string;
43
56
  surfaceStyle?: StyleProp<ViewStyle>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAOpE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,wDAAwD;AACxD,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAqCD,eAAO,MAAM,YAAY,+CAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAOpE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,wDAAwD;AACxD,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2CD,eAAO,MAAM,YAAY,+CAA8B,CAAC"}
@@ -23,16 +23,29 @@
23
23
  * content rather than displacing it). They render BEFORE the content wrapper so
24
24
  * z-index — not DOM order — decides layering.
25
25
  *
26
- * When `framed` is false (narrow screens) the panel is full-bleed: a single
27
- * flat surface, no rounding, no overlays.
26
+ * Framing is tri-state via the `framed` prop:
27
+ *
28
+ * - `undefined` (DEFAULT) → RESPONSIVE, driven purely by NativeWind: full-bleed
29
+ * below `md`, framed at `md`+. The rounding is `md:`-gated and both overlays
30
+ * are always rendered but carry `max-md:hidden` (`display:none` below `md`),
31
+ * so the breakpoint is decided in CSS — no consumer JS breakpoint hook.
32
+ * - `false` → NEVER framed (full-bleed at every size): a single flat surface,
33
+ * no rounding, no overlays.
34
+ * - `true` → ALWAYS framed (rounded + overlays at every size).
35
+ *
36
+ * The overlays are gated by VISIBILITY (a `max-md:hidden` literal) rather than
37
+ * by conditional mounting for the responsive case, so crossing the breakpoint
38
+ * never remounts them. The content wrapper likewise keeps a stable `key` so
39
+ * `{children}` reconciles in place across the breakpoint instead of remounting
40
+ * (which would reset feed scroll / the virtualizer + refetch).
28
41
  *
29
42
  * Native bundlers use `./index.tsx` (a plain rounded surface); web bundlers
30
43
  * select this file via the `"browser"` export condition in `package.json`.
31
44
  *
32
45
  * Styling is NativeWind-className-first; the literal class strings below MUST
33
46
  * stay literal so a consumer's Tailwind content-scan over `lib/**` picks them up
34
- * (no dynamic concatenation of the arbitrary `web:[…]` / `rounded-radius-28`
35
- * parts).
47
+ * (no dynamic concatenation of the arbitrary `web:[…]` / `rounded-radius-28` /
48
+ * `md:` parts — whole class strings are selected per mode instead).
36
49
  */
37
50
  import React from 'react';
38
51
  import { type StyleProp, type ViewStyle } from 'react-native';
@@ -44,8 +57,15 @@ export declare const PANEL_TOP_INSET = 8;
44
57
  export declare const PANEL_BOTTOM_INSET = 8;
45
58
  export interface ContentPanelProps {
46
59
  children: React.ReactNode;
47
- /** Framed (wide screens) vs full-bleed (narrow screens). */
48
- framed: boolean;
60
+ /**
61
+ * Framing mode. Tri-state, resolved purely with NativeWind — no consumer
62
+ * breakpoint hook needed:
63
+ * - `undefined` (DEFAULT) → responsive: full-bleed below `md`, framed at
64
+ * `md`+ (rounded corners + sticky bleed-mask/border overlays).
65
+ * - `false` → never framed (full-bleed at every size).
66
+ * - `true` → always framed (rounded + overlays at every size).
67
+ */
68
+ framed?: boolean;
49
69
  /** Override the surface background utility (defaults to `bg-card`). */
50
70
  surfaceClassName?: string;
51
71
  surfaceStyle?: StyleProp<ViewStyle>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/index.web.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAQpE,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,6DAA6D;AAC7D,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,4DAA4D;IAC5D,MAAM,EAAE,OAAO,CAAC;IAChB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qEAAqE;IACrE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAqED,eAAO,MAAM,YAAY,+CAA8B,CAAC"}
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/index.web.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAQpE,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,6DAA6D;AAC7D,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,qEAAqE;IACrE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyFD,eAAO,MAAM,YAAY,+CAA8B,CAAC"}
@@ -1,7 +1,3 @@
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
- };
1
+ import type { FontAssetMap } from './tokens';
2
+ export declare const FONT_ASSETS: FontAssetMap;
7
3
  //# sourceMappingURL=font-assets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"font-assets.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-assets.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW;;;;;CAKd,CAAC"}
1
+ {"version":3,"file":"font-assets.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-assets.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,WAAW,EAAE,YAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FontAssetMap } from './tokens';
2
+ export declare const FONT_ASSETS: FontAssetMap;
3
+ //# sourceMappingURL=font-assets.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-assets.native.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-assets.native.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,WAAW,EAAE,YAKzB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FontAssetMap } from './tokens';
2
+ export declare const FONT_ASSETS: FontAssetMap;
3
+ //# sourceMappingURL=font-assets.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-assets.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/font-assets.web.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,WAAW,EAAE,YAAiB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export { fontFamilies, fontCssVars } from './tokens';
2
2
  export type { FontFamilyName } from './tokens';
3
3
  export { applyFontFaces } from './apply-font-faces.web';
4
- export { FONT_ASSETS } from './font-assets';
4
+ export { FONT_ASSETS } from './font-assets.web';
5
5
  export { FontLoader } from './FontLoader';
6
6
  export type { FontLoaderProps } from './FontLoader';
7
7
  //# sourceMappingURL=index.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/index.web.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/fonts/index.web.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
@@ -18,4 +18,16 @@ export declare const fontCssVars: {
18
18
  readonly mono: "--bloom-font-mono";
19
19
  };
20
20
  export type FontFamilyName = keyof typeof fontFamilies;
21
+ /**
22
+ * Shape of the font asset map handed to `expo-font`'s `useFonts()`.
23
+ *
24
+ * Values are Metro asset-registry ids produced by `require('./assets/*.ttf')`,
25
+ * so the map is only ever populated under Metro (`font-assets.native.ts`).
26
+ * Every other platform resolves an empty map — web installs the same families
27
+ * as `@font-face` rules instead (`apply-font-faces.web.ts`).
28
+ *
29
+ * Declared here, in the platform-neutral tokens module, so all three
30
+ * `font-assets` variants can share it without importing each other.
31
+ */
32
+ export type FontAssetMap = Record<string, number>;
21
33
  //# sourceMappingURL=tokens.d.ts.map
@@ -1 +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"}
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;AAEvD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"init-css-interop.d.ts","sourceRoot":"","sources":["../../../../src/theme/init-css-interop.ts"],"names":[],"mappings":"AA2GA;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAS7C"}
1
+ {"version":3,"file":"init-css-interop.d.ts","sourceRoot":"","sources":["../../../../src/theme/init-css-interop.ts"],"names":[],"mappings":"AAuHA;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAS7C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/bloom",
3
- "version": "0.35.5",
3
+ "version": "0.35.7",
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",
@@ -1033,7 +1033,7 @@
1033
1033
  "type": "git",
1034
1034
  "url": "https://github.com/OxyHQ/Bloom.git"
1035
1035
  },
1036
- "license": "MIT",
1036
+ "license": "AGPL-3.0-only",
1037
1037
  "scripts": {
1038
1038
  "generate:exports": "node scripts/generate-platform-exports.mjs",
1039
1039
  "generate:font-data": "node scripts/generate-font-data.mjs",
@@ -7,11 +7,20 @@
7
7
  * the rounded corners / lateral gutters is masked while a single seamless border
8
8
  * is drawn around the panel — see `index.web.tsx`.
9
9
  *
10
- * On NATIVE none of that applies: there is no document scroll, no sticky
11
- * positioning, and no bleed to mask, so the panel is simply a rounded, bordered
12
- * surface wrapping its content. The `framed` and `showStickyFrame` props are
13
- * accepted for cross-platform API parity but are intentionally no-ops here
14
- * (mirroring the no-op native fork of `../scroll`).
10
+ * On NATIVE none of the WEB overlay machinery applies: there is no document
11
+ * scroll, no sticky positioning, and no bleed to mask, so the panel is simply a
12
+ * surface wrapping its content. The `framed` prop still drives whether that
13
+ * surface is rounded + bordered, tri-state and resolved with pure NativeWind
14
+ * (`md:` evaluates against the window width on native too no JS breakpoint
15
+ * hook needed):
16
+ *
17
+ * - `undefined` (DEFAULT) → responsive: full-bleed below `md`, rounded +
18
+ * bordered at `md`+ (`md:rounded-radius-28 md:border md:border-border`).
19
+ * - `false` → never framed (plain full-bleed at every size).
20
+ * - `true` → always rounded + bordered.
21
+ *
22
+ * `showStickyFrame` and `maskColor` are accepted for cross-platform API parity
23
+ * but are no-ops here (there are no sticky overlays on native).
15
24
  *
16
25
  * Web bundlers select `./index.web` via the `"browser"` export condition in
17
26
  * `package.json`; native bundlers fall through to this file.
@@ -41,10 +50,14 @@ export const PANEL_BOTTOM_INSET = 8;
41
50
  export interface ContentPanelProps {
42
51
  children: React.ReactNode;
43
52
  /**
44
- * Whether the panel is framed (wide screens) or full-bleed (narrow screens).
45
- * No-op on native — the surface is always a rounded, bordered View.
53
+ * Framing mode. Tri-state, resolved purely with NativeWind no consumer
54
+ * breakpoint hook needed:
55
+ * - `undefined` (DEFAULT) → responsive: full-bleed below `md`, rounded +
56
+ * bordered at `md`+.
57
+ * - `false` → never framed (plain full-bleed at every size).
58
+ * - `true` → always rounded + bordered.
46
59
  */
47
- framed: boolean;
60
+ framed?: boolean;
48
61
  /** Override the surface background utility (defaults to `bg-card`). */
49
62
  surfaceClassName?: string;
50
63
  surfaceStyle?: StyleProp<ViewStyle>;
@@ -65,6 +78,7 @@ export interface ContentPanelProps {
65
78
 
66
79
  const ContentPanelComponent: React.FC<ContentPanelProps> = ({
67
80
  children,
81
+ framed,
68
82
  surfaceClassName,
69
83
  surfaceStyle,
70
84
  contentClassName,
@@ -73,12 +87,17 @@ const ContentPanelComponent: React.FC<ContentPanelProps> = ({
73
87
  // Dev-only invariant — a ContentPanel must never be nested inside another.
74
88
  useContentPanelNestingGuard();
75
89
 
76
- const surfaceClass = [
77
- 'flex-1',
78
- 'rounded-radius-28',
79
- 'overflow-hidden border border-border',
80
- surfaceClassName ?? 'bg-card',
81
- ].join(' ');
90
+ // Tri-state: `undefined` → responsive (md:-gated), `true` → always framed,
91
+ // `false` → never framed (plain full-bleed). Whole literal class strings are
92
+ // selected per mode so the Tailwind content-scan over `src/**` picks up every
93
+ // `md:` / `rounded-radius-28` token verbatim (no dynamic concatenation).
94
+ const surfaceBase =
95
+ framed === undefined
96
+ ? 'flex-1 md:overflow-hidden md:rounded-radius-28 md:border md:border-border'
97
+ : framed
98
+ ? 'flex-1 overflow-hidden rounded-radius-28 border border-border'
99
+ : 'flex-1';
100
+ const surfaceClass = [surfaceBase, surfaceClassName ?? 'bg-card'].join(' ');
82
101
  const contentClass = ['flex-1', contentClassName].filter(Boolean).join(' ');
83
102
 
84
103
  return (
@@ -23,16 +23,29 @@
23
23
  * content rather than displacing it). They render BEFORE the content wrapper so
24
24
  * z-index — not DOM order — decides layering.
25
25
  *
26
- * When `framed` is false (narrow screens) the panel is full-bleed: a single
27
- * flat surface, no rounding, no overlays.
26
+ * Framing is tri-state via the `framed` prop:
27
+ *
28
+ * - `undefined` (DEFAULT) → RESPONSIVE, driven purely by NativeWind: full-bleed
29
+ * below `md`, framed at `md`+. The rounding is `md:`-gated and both overlays
30
+ * are always rendered but carry `max-md:hidden` (`display:none` below `md`),
31
+ * so the breakpoint is decided in CSS — no consumer JS breakpoint hook.
32
+ * - `false` → NEVER framed (full-bleed at every size): a single flat surface,
33
+ * no rounding, no overlays.
34
+ * - `true` → ALWAYS framed (rounded + overlays at every size).
35
+ *
36
+ * The overlays are gated by VISIBILITY (a `max-md:hidden` literal) rather than
37
+ * by conditional mounting for the responsive case, so crossing the breakpoint
38
+ * never remounts them. The content wrapper likewise keeps a stable `key` so
39
+ * `{children}` reconciles in place across the breakpoint instead of remounting
40
+ * (which would reset feed scroll / the virtualizer + refetch).
28
41
  *
29
42
  * Native bundlers use `./index.tsx` (a plain rounded surface); web bundlers
30
43
  * select this file via the `"browser"` export condition in `package.json`.
31
44
  *
32
45
  * Styling is NativeWind-className-first; the literal class strings below MUST
33
46
  * stay literal so a consumer's Tailwind content-scan over `lib/**` picks them up
34
- * (no dynamic concatenation of the arbitrary `web:[…]` / `rounded-radius-28`
35
- * parts).
47
+ * (no dynamic concatenation of the arbitrary `web:[…]` / `rounded-radius-28` /
48
+ * `md:` parts — whole class strings are selected per mode instead).
36
49
  */
37
50
  import React, { memo } from 'react';
38
51
  import { View, type StyleProp, type ViewStyle } from 'react-native';
@@ -52,8 +65,15 @@ export const PANEL_BOTTOM_INSET = 8;
52
65
 
53
66
  export interface ContentPanelProps {
54
67
  children: React.ReactNode;
55
- /** Framed (wide screens) vs full-bleed (narrow screens). */
56
- framed: boolean;
68
+ /**
69
+ * Framing mode. Tri-state, resolved purely with NativeWind — no consumer
70
+ * breakpoint hook needed:
71
+ * - `undefined` (DEFAULT) → responsive: full-bleed below `md`, framed at
72
+ * `md`+ (rounded corners + sticky bleed-mask/border overlays).
73
+ * - `false` → never framed (full-bleed at every size).
74
+ * - `true` → always framed (rounded + overlays at every size).
75
+ */
76
+ framed?: boolean;
57
77
  /** Override the surface background utility (defaults to `bg-card`). */
58
78
  surfaceClassName?: string;
59
79
  surfaceStyle?: StyleProp<ViewStyle>;
@@ -83,17 +103,32 @@ const ContentPanelComponent: React.FC<ContentPanelProps> = ({
83
103
  showStickyFrame,
84
104
  maskColor,
85
105
  }) => {
86
- // Dev-only invariant — must run unconditionally before the early `!framed`
87
- // return so the hook order stays stable across renders (rules of hooks).
106
+ // Dev-only invariant — must run unconditionally (before deriving any
107
+ // mode-specific branch) so the hook order stays stable (rules of hooks).
88
108
  useContentPanelNestingGuard();
89
109
  const { colors } = useTheme();
90
110
 
91
- const surfaceClass = framed
92
- ? ['flex-1 rounded-radius-28', surfaceClassName ?? 'bg-card'].join(' ')
93
- : ['flex-1', surfaceClassName ?? 'bg-card'].join(' ');
94
- const contentClass = framed
95
- ? ['flex-1 rounded-radius-28 web:overflow-x-clip', contentClassName].filter(Boolean).join(' ')
96
- : ['flex-1', contentClassName].filter(Boolean).join(' ');
111
+ // Tri-state: `undefined` → responsive (md:-gated), `true` → always framed,
112
+ // `false` never framed (full-bleed).
113
+ const responsive = framed === undefined;
114
+ const showOverlays = framed !== false;
115
+
116
+ // Whole literal class strings selected per mode (the Tailwind content-scan
117
+ // over `lib/**` requires each arbitrary/`md:`/`web:` token stay literal).
118
+ // `web:md:overflow-x-clip` is platform-first-then-breakpoint, matching the
119
+ // consumer convention (`web:sm:flex` in `@mercaria/ui`).
120
+ const surfaceBase = responsive
121
+ ? 'flex-1 md:rounded-radius-28'
122
+ : framed
123
+ ? 'flex-1 rounded-radius-28'
124
+ : 'flex-1';
125
+ const contentBase = responsive
126
+ ? 'flex-1 md:rounded-radius-28 web:md:overflow-x-clip'
127
+ : framed
128
+ ? 'flex-1 rounded-radius-28 web:overflow-x-clip'
129
+ : 'flex-1';
130
+ const surfaceClass = [surfaceBase, surfaceClassName ?? 'bg-card'].join(' ');
131
+ const contentClass = [contentBase, contentClassName].filter(Boolean).join(' ');
97
132
 
98
133
  return (
99
134
  <ContentPanelNestingContext.Provider value={true}>
@@ -101,26 +136,31 @@ const ContentPanelComponent: React.FC<ContentPanelProps> = ({
101
136
  {...({ className: surfaceClass } as Record<string, string>)}
102
137
  style={surfaceStyle}
103
138
  >
104
- {/* (1) Bleed-mask overlay — gutter box-shadow ring, below chrome. Framed only. */}
105
- {framed && (
139
+ {/* (1) Bleed-mask overlay — gutter box-shadow ring, below chrome. Not
140
+ rendered when never-framed; `max-md:hidden` (display:none <md) when
141
+ responsive, so the breakpoint is decided in CSS, not by remounting. */}
142
+ {showOverlays && (
106
143
  <View
107
144
  key="bleed-mask"
108
145
  pointerEvents="none"
109
146
  {...({
110
- className:
111
- 'web:sticky web:top-2 z-30 h-[calc(100dvh-16px)] w-full rounded-radius-28 web:[margin-bottom:calc(-100dvh+16px)] web:[clip-path:inset(-12px)]',
147
+ className: responsive
148
+ ? 'web:sticky web:top-2 z-30 h-[calc(100dvh-16px)] w-full rounded-radius-28 max-md:hidden web:[margin-bottom:calc(-100dvh+16px)] web:[clip-path:inset(-12px)]'
149
+ : 'web:sticky web:top-2 z-30 h-[calc(100dvh-16px)] w-full rounded-radius-28 web:[margin-bottom:calc(-100dvh+16px)] web:[clip-path:inset(-12px)]',
112
150
  } as Record<string, string>)}
113
151
  style={{ boxShadow: `0 0 0 ${GUTTER_MASK_SPREAD}px ${maskColor ?? colors.background}` }}
114
152
  />
115
153
  )}
116
- {/* (2) Border-frame overlay — one continuous rounded border, above all. Framed only. */}
117
- {framed && showStickyFrame !== false && (
154
+ {/* (2) Border-frame overlay — one continuous rounded border, above all.
155
+ Same visibility gating as the bleed-mask. */}
156
+ {showOverlays && showStickyFrame !== false && (
118
157
  <View
119
158
  key="border-frame"
120
159
  pointerEvents="none"
121
160
  {...({
122
- className:
123
- 'web:sticky web:top-2 z-[120] h-[calc(100dvh-16px)] w-full rounded-radius-28 border border-border web:[margin-bottom:calc(-100dvh+16px)]',
161
+ className: responsive
162
+ ? 'web:sticky web:top-2 z-[120] h-[calc(100dvh-16px)] w-full rounded-radius-28 border border-border max-md:hidden web:[margin-bottom:calc(-100dvh+16px)]'
163
+ : 'web:sticky web:top-2 z-[120] h-[calc(100dvh-16px)] w-full rounded-radius-28 border border-border web:[margin-bottom:calc(-100dvh+16px)]',
124
164
  } as Record<string, string>)}
125
165
  />
126
166
  )}