@oxyhq/bloom 0.35.6 → 0.35.8

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.
@@ -18,11 +18,21 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
18
18
  * the rounded corners / lateral gutters is masked while a single seamless border
19
19
  * is drawn around the panel — see `index.web.tsx`.
20
20
  *
21
- * On NATIVE none of that applies: there is no document scroll, no sticky
22
- * positioning, and no bleed to mask, so the panel is simply a rounded, bordered
23
- * surface wrapping its content. The `framed` and `showStickyFrame` props are
24
- * accepted for cross-platform API parity but are intentionally no-ops here
25
- * (mirroring the no-op native fork of `../scroll`).
21
+ * On NATIVE none of the WEB overlay machinery applies: there is no document
22
+ * scroll, no sticky positioning, and no bleed to mask, so the panel is simply a
23
+ * surface wrapping its content. The `framed` prop still drives whether that
24
+ * surface is rounded + bordered, tri-state and resolved with pure NativeWind
25
+ * (the breakpoint's `min-*:` variant evaluates against the window width on
26
+ * native too — no JS breakpoint hook needed):
27
+ *
28
+ * - `undefined` (DEFAULT) → responsive: full-bleed below the `framedFrom`
29
+ * breakpoint (default `768` / Tailwind `md`), rounded + bordered at/above it
30
+ * (e.g. `md:rounded-radius-28 md:border md:border-border`).
31
+ * - `false` → never framed (plain full-bleed at every size).
32
+ * - `true` → always rounded + bordered.
33
+ *
34
+ * `showStickyFrame` and `maskColor` are accepted for cross-platform API parity
35
+ * but are no-ops here (there are no sticky overlays on native).
26
36
  *
27
37
  * Web bundlers select `./index.web` via the `"browser"` export condition in
28
38
  * `package.json`; native bundlers fall through to this file.
@@ -41,8 +51,34 @@ const GUTTER_MASK_SPREAD = exports.GUTTER_MASK_SPREAD = 40;
41
51
  const PANEL_TOP_INSET = exports.PANEL_TOP_INSET = 8;
42
52
  /** Bottom sticky inset (px) of the framed panel chrome. */
43
53
  const PANEL_BOTTOM_INSET = exports.PANEL_BOTTOM_INSET = 8;
54
+
55
+ /**
56
+ * Viewport width (px) at which a RESPONSIVE `ContentPanel` (`framed` undefined)
57
+ * switches from full-bleed to framed. Each value maps to a PRE-SHIPPED literal
58
+ * Tailwind class bundle — `768` (default) uses the named `md:` screen
59
+ * (byte-identical to prior behavior), `640` uses `sm:`, `1024` uses `lg:`, and
60
+ * `500` uses the arbitrary `min-[500px]:` variant (there is no named screen at
61
+ * 500px). The breakpoint tokens are never built at runtime, so a consumer's
62
+ * Tailwind content-scan over `src/**`/`lib/**` resolves them verbatim.
63
+ */
64
+
65
+ /**
66
+ * Per-breakpoint literal Tailwind surface class bundle for the NATIVE responsive
67
+ * mode. Each value is a WHOLE literal string (never assembled from parts at
68
+ * runtime) so the Tailwind content-scan over `src/**`/`lib/**` picks up every
69
+ * `min-*`/`sm:`/`md:`/`lg:` token verbatim. Selecting a bundle by `framedFrom`
70
+ * value is the only runtime decision.
71
+ */
72
+ const RESPONSIVE_SURFACE = {
73
+ 500: 'min-[500px]:overflow-hidden min-[500px]:rounded-radius-28 min-[500px]:border min-[500px]:border-border',
74
+ 640: 'sm:overflow-hidden sm:rounded-radius-28 sm:border sm:border-border',
75
+ 768: 'md:overflow-hidden md:rounded-radius-28 md:border md:border-border',
76
+ 1024: 'lg:overflow-hidden lg:rounded-radius-28 lg:border lg:border-border'
77
+ };
44
78
  const ContentPanelComponent = ({
45
79
  children,
80
+ framed,
81
+ framedFrom = 768,
46
82
  surfaceClassName,
47
83
  surfaceStyle,
48
84
  contentClassName,
@@ -50,7 +86,15 @@ const ContentPanelComponent = ({
50
86
  }) => {
51
87
  // Dev-only invariant — a ContentPanel must never be nested inside another.
52
88
  (0, _nestingContext.useContentPanelNestingGuard)();
53
- const surfaceClass = ['flex-1', 'rounded-radius-28', 'overflow-hidden border border-border', surfaceClassName ?? 'bg-card'].join(' ');
89
+
90
+ // Tri-state: `undefined` → responsive (breakpoint-gated), `true` → always
91
+ // framed, `false` → never framed (plain full-bleed). Whole literal class
92
+ // strings are selected per mode so the Tailwind content-scan over `src/**`
93
+ // picks up every `min-*`/`sm:`/`md:`/`lg:` / `rounded-radius-28` token verbatim
94
+ // (the breakpoint bundle lives whole in `RESPONSIVE_SURFACE`; `framed ===
95
+ // true`/`false` ignore `framedFrom` for fixed always/never framing).
96
+ const surfaceBase = framed === undefined ? `flex-1 ${RESPONSIVE_SURFACE[framedFrom]}` : framed ? 'flex-1 overflow-hidden rounded-radius-28 border border-border' : 'flex-1';
97
+ const surfaceClass = [surfaceBase, surfaceClassName ?? 'bg-card'].join(' ');
54
98
  const contentClass = ['flex-1', contentClassName].filter(Boolean).join(' ');
55
99
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_nestingContext.ContentPanelNestingContext.Provider, {
56
100
  value: true,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_nestingContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GUTTER_MASK_SPREAD","exports","PANEL_TOP_INSET","PANEL_BOTTOM_INSET","ContentPanelComponent","children","surfaceClassName","surfaceStyle","contentClassName","contentStyle","useContentPanelNestingGuard","surfaceClass","join","contentClass","filter","Boolean","jsx","ContentPanelNestingContext","Provider","value","View","className","style","ContentPanel","memo","displayName"],"sourceRoot":"../../../src","sources":["content-panel/index.tsx"],"mappings":";;;;;;AAsBA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AAG2B,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA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ACnB,sCAAsC,EACtCL,gBAAgB,IAAI,SAAS,CAC9B,CAACM,IAAI,CAAC,GAAG,CAAC;EACX,MAAMC,YAAY,GAAG,CAAC,QAAQ,EAAEL,gBAAgB,CAAC,CAACM,MAAM,CAACC,OAAO,CAAC,CAACH,IAAI,CAAC,GAAG,CAAC;EAE3E,oBACE,IAAAhC,WAAA,CAAAoC,GAAA,EAACrC,eAAA,CAAAsC,0BAA0B,CAACC,QAAQ;IAACC,KAAK,EAAE,IAAK;IAAAd,QAAA,eAC/C,IAAAzB,WAAA,CAAAoC,GAAA,EAACtC,YAAA,CAAA0C,IAAI;MACIC,SAAS,EAAEV,YAAY;MAC9BW,KAAK,EAAEf,YAAa;MAAAF,QAAA,eAEpB,IAAAzB,WAAA,CAAAoC,GAAA,EAACtC,YAAA,CAAA0C,IAAI;QACIC,SAAS,EAAER,YAAY;QAC9BS,KAAK,EAAEb,YAAa;QAAAJ,QAAA,EAEnBA;MAAQ,CACL;IAAC,CACH;EAAC,CAC4B,CAAC;AAE1C,CAAC;AAEM,MAAMkB,YAAY,GAAAtB,OAAA,CAAAsB,YAAA,gBAAG,IAAAC,WAAI,EAACpB,qBAAqB,CAAC;AACvDmB,YAAY,CAACE,WAAW,GAAG,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_nestingContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GUTTER_MASK_SPREAD","exports","PANEL_TOP_INSET","PANEL_BOTTOM_INSET","RESPONSIVE_SURFACE","ContentPanelComponent","children","framed","framedFrom","surfaceClassName","surfaceStyle","contentClassName","contentStyle","useContentPanelNestingGuard","surfaceBase","undefined","surfaceClass","join","contentClass","filter","Boolean","jsx","ContentPanelNestingContext","Provider","value","View","className","style","ContentPanel","memo","displayName"],"sourceRoot":"../../../src","sources":["content-panel/index.tsx"],"mappings":";;;;;;AAgCA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V,YAAY;MAC9BW,KAAK,EAAEjB,YAAa;MAAAJ,QAAA,eAEpB,IAAA1B,WAAA,CAAAyC,GAAA,EAAC3C,YAAA,CAAA+C,IAAI;QACIC,SAAS,EAAER,YAAY;QAC9BS,KAAK,EAAEf,YAAa;QAAAN,QAAA,EAEnBA;MAAQ,CACL;IAAC,CACH;EAAC,CAC4B,CAAC;AAE1C,CAAC;AAEM,MAAMsB,YAAY,GAAA3B,OAAA,CAAA2B,YAAA,gBAAG,IAAAC,WAAI,EAACxB,qBAAqB,CAAC;AACvDuB,YAAY,CAACE,WAAW,GAAG,cAAc","ignoreList":[]}
@@ -35,16 +35,33 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
35
35
  * content rather than displacing it). They render BEFORE the content wrapper so
36
36
  * z-index — not DOM order — decides layering.
37
37
  *
38
- * When `framed` is false (narrow screens) the panel is full-bleed: a single
39
- * flat surface, no rounding, no overlays.
38
+ * Framing is tri-state via the `framed` prop:
39
+ *
40
+ * - `undefined` (DEFAULT) → RESPONSIVE, driven purely by NativeWind: full-bleed
41
+ * below the `framedFrom` breakpoint, framed at/above it. The breakpoint is
42
+ * configurable per consumer (`framedFrom`, default `768` / Tailwind `md`); the
43
+ * rounding is gated by that breakpoint's `min-*:` variant and both overlays
44
+ * are always rendered but carry the matching `max-*:hidden` literal
45
+ * (`display:none` below the breakpoint), so the breakpoint is decided entirely
46
+ * in CSS — no consumer JS breakpoint hook.
47
+ * - `false` → NEVER framed (full-bleed at every size): a single flat surface,
48
+ * no rounding, no overlays.
49
+ * - `true` → ALWAYS framed (rounded + overlays at every size).
50
+ *
51
+ * The overlays are gated by VISIBILITY (a `max-*:hidden` literal for the chosen
52
+ * breakpoint) rather than by conditional mounting for the responsive case, so
53
+ * crossing the breakpoint never remounts them. The content wrapper likewise
54
+ * keeps a stable `key` so `{children}` reconciles in place across the breakpoint
55
+ * instead of remounting (which would reset feed scroll / the virtualizer +
56
+ * refetch).
40
57
  *
41
58
  * Native bundlers use `./index.tsx` (a plain rounded surface); web bundlers
42
59
  * select this file via the `"browser"` export condition in `package.json`.
43
60
  *
44
61
  * Styling is NativeWind-className-first; the literal class strings below MUST
45
62
  * stay literal so a consumer's Tailwind content-scan over `lib/**` picks them up
46
- * (no dynamic concatenation of the arbitrary `web:[…]` / `rounded-radius-28`
47
- * parts).
63
+ * (no dynamic concatenation of the arbitrary `web:[…]` / `rounded-radius-28` /
64
+ * `md:` parts — whole class strings are selected per mode instead).
48
65
  */
49
66
 
50
67
  /** Width (in px) of the sticky gutter-mask box-shadow ring. */
@@ -53,9 +70,58 @@ const GUTTER_MASK_SPREAD = exports.GUTTER_MASK_SPREAD = 40;
53
70
  const PANEL_TOP_INSET = exports.PANEL_TOP_INSET = 8;
54
71
  /** Bottom sticky inset (px) of the framed panel chrome. */
55
72
  const PANEL_BOTTOM_INSET = exports.PANEL_BOTTOM_INSET = 8;
73
+
74
+ /**
75
+ * Viewport width (px) at which a RESPONSIVE `ContentPanel` (`framed` undefined)
76
+ * switches from full-bleed to framed. Each value maps to a PRE-SHIPPED literal
77
+ * Tailwind class bundle — `768` (default) uses the named `md:`/`max-md:` screens
78
+ * (byte-identical to prior behavior), `640` uses `sm:`/`max-sm:`, `1024` uses
79
+ * `lg:`/`max-lg:`, and `500` uses the arbitrary `min-[500px]:`/`max-[500px]:`
80
+ * variants (there is no named screen at 500px). The breakpoint tokens are never
81
+ * built at runtime, so a consumer's Tailwind content-scan over `lib/**` resolves
82
+ * them verbatim.
83
+ */
84
+
85
+ /**
86
+ * Per-breakpoint literal Tailwind variant tokens for the WEB responsive mode.
87
+ * Each field is a WHOLE literal class string (never assembled from parts at
88
+ * runtime) so the consumer's content-scan over `lib/**` picks up every
89
+ * arbitrary/`min-*`/`max-*`/`web:` token verbatim. Selecting a bundle by
90
+ * `framedFrom` value is the only runtime decision:
91
+ * - `surface` → framing rounding on the surface at/above the breakpoint.
92
+ * - `content` → the same rounding + a web-only horizontal clip on the
93
+ * inner content wrapper (`web:<bp>:overflow-x-clip`, platform-first-then-
94
+ * breakpoint — matching the consumer convention `web:sm:flex` in `@mercaria/ui`).
95
+ * - `overlayHidden` → `display:none` for the sticky overlays BELOW the breakpoint.
96
+ * `min-[500px]:` (≥500) and `max-[500px]:` (<500) are exactly complementary
97
+ * (meet at 500, no overlap/gap), mirroring the named `md:`/`max-md:` pair.
98
+ */
99
+ const RESPONSIVE_WEB = {
100
+ 500: {
101
+ surface: 'min-[500px]:rounded-radius-28',
102
+ content: 'min-[500px]:rounded-radius-28 web:min-[500px]:overflow-x-clip',
103
+ overlayHidden: 'max-[500px]:hidden'
104
+ },
105
+ 640: {
106
+ surface: 'sm:rounded-radius-28',
107
+ content: 'sm:rounded-radius-28 web:sm:overflow-x-clip',
108
+ overlayHidden: 'max-sm:hidden'
109
+ },
110
+ 768: {
111
+ surface: 'md:rounded-radius-28',
112
+ content: 'md:rounded-radius-28 web:md:overflow-x-clip',
113
+ overlayHidden: 'max-md:hidden'
114
+ },
115
+ 1024: {
116
+ surface: 'lg:rounded-radius-28',
117
+ content: 'lg:rounded-radius-28 web:lg:overflow-x-clip',
118
+ overlayHidden: 'max-lg:hidden'
119
+ }
120
+ };
56
121
  const ContentPanelComponent = ({
57
122
  children,
58
123
  framed,
124
+ framedFrom = 768,
59
125
  surfaceClassName,
60
126
  surfaceStyle,
61
127
  contentClassName,
@@ -63,28 +129,43 @@ const ContentPanelComponent = ({
63
129
  showStickyFrame,
64
130
  maskColor
65
131
  }) => {
66
- // Dev-only invariant — must run unconditionally before the early `!framed`
67
- // return so the hook order stays stable across renders (rules of hooks).
132
+ // Dev-only invariant — must run unconditionally (before deriving any
133
+ // mode-specific branch) so the hook order stays stable (rules of hooks).
68
134
  (0, _nestingContext.useContentPanelNestingGuard)();
69
135
  const {
70
136
  colors
71
137
  } = (0, _useTheme.useTheme)();
72
- const surfaceClass = framed ? ['flex-1 rounded-radius-28', surfaceClassName ?? 'bg-card'].join(' ') : ['flex-1', surfaceClassName ?? 'bg-card'].join(' ');
73
- const contentClass = framed ? ['flex-1 rounded-radius-28 web:overflow-x-clip', contentClassName].filter(Boolean).join(' ') : ['flex-1', contentClassName].filter(Boolean).join(' ');
138
+
139
+ // Tri-state: `undefined` responsive (md:-gated), `true` always framed,
140
+ // `false` → never framed (full-bleed).
141
+ const responsive = framed === undefined;
142
+ const showOverlays = framed !== false;
143
+ // Responsive mode selects a pre-shipped literal breakpoint bundle by value;
144
+ // `framed === true`/`false` ignore `framedFrom` (fixed always/never framing).
145
+ const bp = RESPONSIVE_WEB[framedFrom];
146
+
147
+ // Whole literal class strings selected per mode (the Tailwind content-scan
148
+ // over `lib/**` requires each arbitrary/`min-*`/`max-*`/`web:` token stay
149
+ // literal — the breakpoint tokens live whole in `RESPONSIVE_WEB` above and are
150
+ // only spliced in, never assembled from parts).
151
+ const surfaceBase = responsive ? `flex-1 ${bp.surface}` : framed ? 'flex-1 rounded-radius-28' : 'flex-1';
152
+ const contentBase = responsive ? `flex-1 ${bp.content}` : framed ? 'flex-1 rounded-radius-28 web:overflow-x-clip' : 'flex-1';
153
+ const surfaceClass = [surfaceBase, surfaceClassName ?? 'bg-card'].join(' ');
154
+ const contentClass = [contentBase, contentClassName].filter(Boolean).join(' ');
74
155
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_nestingContext.ContentPanelNestingContext.Provider, {
75
156
  value: true,
76
157
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
77
158
  className: surfaceClass,
78
159
  style: surfaceStyle,
79
- children: [framed && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
160
+ children: [showOverlays && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
80
161
  pointerEvents: "none",
81
- className: '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)]',
162
+ className: responsive ? `web:sticky web:top-2 z-30 h-[calc(100dvh-16px)] w-full rounded-radius-28 ${bp.overlayHidden} web:[margin-bottom:calc(-100dvh+16px)] web:[clip-path:inset(-12px)]` : '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)]',
82
163
  style: {
83
164
  boxShadow: `0 0 0 ${GUTTER_MASK_SPREAD}px ${maskColor ?? colors.background}`
84
165
  }
85
- }, "bleed-mask"), framed && showStickyFrame !== false && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
166
+ }, "bleed-mask"), showOverlays && showStickyFrame !== false && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
86
167
  pointerEvents: "none",
87
- className: '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)]'
168
+ className: responsive ? `web:sticky web:top-2 z-[120] h-[calc(100dvh-16px)] w-full rounded-radius-28 border border-border ${bp.overlayHidden} web:[margin-bottom:calc(-100dvh+16px)]` : '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)]'
88
169
  }, "border-frame"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
89
170
  className: contentClass,
90
171
  style: contentStyle,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_useTheme","_nestingContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GUTTER_MASK_SPREAD","exports","PANEL_TOP_INSET","PANEL_BOTTOM_INSET","ContentPanelComponent","children","framed","surfaceClassName","surfaceStyle","contentClassName","contentStyle","showStickyFrame","maskColor","useContentPanelNestingGuard","colors","useTheme","surfaceClass","join","contentClass","filter","Boolean","jsx","ContentPanelNestingContext","Provider","value","jsxs","View","className","style","pointerEvents","bo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AAI;MACIC,SAAS,EAAEX,YAAY;MAC9BY,KAAK,EAAEpB,YAAa;MAAAH,QAAA,GAGnBC,MAAM,iBACL,IAAA1B,WAAA,CAAAyC,GAAA,EAAC5C,YAAA,CAAAiD,IAAI;QAEHG,aAAa,EAAC,MAAM;QAElBF,SAAS,EACP,8IAA8I;QAElJC,KAAK,EAAE;UAAEE,SAAS,EAAE,SAAS9B,kBAAkB,MAAMY,SAAS,IAAIE,MAAM,CAACiB,UAAU;QAAG;MAAE,GANpF,YAOL,CACF,EAEAzB,MAAM,IAAIK,eAAe,KAAK,KAAK,iBAClC,IAAA/B,WAAA,CAAAyC,GAAA,EAAC5C,YAAA,CAAAiD,IAAI;QAEHG,aAAa,EAAC,MAAM;QAElBF,SAAS,EACP;MAAyI,GAJzI,cAML,CACF,eAKD,IAAA/C,WAAA,CAAAyC,GAAA,EAAC5C,YAAA,CAAAiD,IAAI;QAEIC,SAAS,EAAET,YAAY;QAC9BU,KAAK,EAAElB,YAAa;QAAAL,QAAA,EAEnBA;MAAQ,GAJL,SAKA,CAAC;IAAA,CACH;EAAC,CAC4B,CAAC;AAE1C,CAAC;AAEM,MAAM2B,YAAY,GAAA/B,OAAA,CAAA+B,YAAA,gBAAG,IAAAC,WAAI,EAAC7B,qBAAqB,CAAC;AACvD4B,YAAY,CAACE,WAAW,GAAG,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_useTheme","_nestingContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GUTTER_MASK_SPREAD","exports","PANEL_TOP_INSET","PANEL_BOTTOM_INSET","RESPONSIVE_WEB","surface","content","overlayHidden","ContentPanelComponent","children","framed","framedFrom","surfaceClassName","surfaceStyle","contentClassName","contentStyle","showStickyFrame","maskColor","useContentPanelNestingGuard","colors","useTheme","responsive","undefined","showOverlays","bp","surfaceBase","contentBase","surfaceClass","join","contentClass","filter","Boolean","jsx","ContentPanelNestingContext","Provider","value","jsxs","View","className","style","pointerEvents","boxShadow","background","ContentPanel","memo","displayName"],"sourceRoot":"../../../src","sources":["content-panel/index.web.tsx"],"mappings":"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AAS,EAAE,SAASzC,kBAAkB,MAAMiB,SAAS,IAAIE,MAAM,CAACuB,UAAU;QAAG;MAAE,GAPpF,YAQL,CACF,EAGAnB,YAAY,IAAIP,eAAe,KAAK,KAAK,iBACxC,IAAApC,WAAA,CAAAoD,GAAA,EAACvD,YAAA,CAAA4D,IAAI;QAEHG,aAAa,EAAC,MAAM;QAElBF,SAAS,EAAEjB,UAAU,GACjB,oGAAoGG,EAAE,CAACjB,aAAa,yCAAyC,GAC7J;MAAyI,GAL3I,cAOL,CACF,eAKD,IAAA3B,WAAA,CAAAoD,GAAA,EAACvD,YAAA,CAAA4D,IAAI;QAEIC,SAAS,EAAET,YAAY;QAC9BU,KAAK,EAAExB,YAAa;QAAAN,QAAA,EAEnBA;MAAQ,GAJL,SAKA,CAAC;IAAA,CACH;EAAC,CAC4B,CAAC;AAE1C,CAAC;AAEM,MAAMkC,YAAY,GAAA1C,OAAA,CAAA0C,YAAA,gBAAG,IAAAC,WAAI,EAACpC,qBAAqB,CAAC;AACvDmC,YAAY,CAACE,WAAW,GAAG,cAAc","ignoreList":[]}
@@ -9,11 +9,21 @@
9
9
  * the rounded corners / lateral gutters is masked while a single seamless border
10
10
  * is drawn around the panel — see `index.web.tsx`.
11
11
  *
12
- * On NATIVE none of that applies: there is no document scroll, no sticky
13
- * positioning, and no bleed to mask, so the panel is simply a rounded, bordered
14
- * surface wrapping its content. The `framed` and `showStickyFrame` props are
15
- * accepted for cross-platform API parity but are intentionally no-ops here
16
- * (mirroring the no-op native fork of `../scroll`).
12
+ * On NATIVE none of the WEB overlay machinery applies: there is no document
13
+ * scroll, no sticky positioning, and no bleed to mask, so the panel is simply a
14
+ * surface wrapping its content. The `framed` prop still drives whether that
15
+ * surface is rounded + bordered, tri-state and resolved with pure NativeWind
16
+ * (the breakpoint's `min-*:` variant evaluates against the window width on
17
+ * native too — no JS breakpoint hook needed):
18
+ *
19
+ * - `undefined` (DEFAULT) → responsive: full-bleed below the `framedFrom`
20
+ * breakpoint (default `768` / Tailwind `md`), rounded + bordered at/above it
21
+ * (e.g. `md:rounded-radius-28 md:border md:border-border`).
22
+ * - `false` → never framed (plain full-bleed at every size).
23
+ * - `true` → always rounded + bordered.
24
+ *
25
+ * `showStickyFrame` and `maskColor` are accepted for cross-platform API parity
26
+ * but are no-ops here (there are no sticky overlays on native).
17
27
  *
18
28
  * Web bundlers select `./index.web` via the `"browser"` export condition in
19
29
  * `package.json`; native bundlers fall through to this file.
@@ -36,8 +46,34 @@ export const GUTTER_MASK_SPREAD = 40;
36
46
  export const PANEL_TOP_INSET = 8;
37
47
  /** Bottom sticky inset (px) of the framed panel chrome. */
38
48
  export const PANEL_BOTTOM_INSET = 8;
49
+
50
+ /**
51
+ * Viewport width (px) at which a RESPONSIVE `ContentPanel` (`framed` undefined)
52
+ * switches from full-bleed to framed. Each value maps to a PRE-SHIPPED literal
53
+ * Tailwind class bundle — `768` (default) uses the named `md:` screen
54
+ * (byte-identical to prior behavior), `640` uses `sm:`, `1024` uses `lg:`, and
55
+ * `500` uses the arbitrary `min-[500px]:` variant (there is no named screen at
56
+ * 500px). The breakpoint tokens are never built at runtime, so a consumer's
57
+ * Tailwind content-scan over `src/**`/`lib/**` resolves them verbatim.
58
+ */
59
+
60
+ /**
61
+ * Per-breakpoint literal Tailwind surface class bundle for the NATIVE responsive
62
+ * mode. Each value is a WHOLE literal string (never assembled from parts at
63
+ * runtime) so the Tailwind content-scan over `src/**`/`lib/**` picks up every
64
+ * `min-*`/`sm:`/`md:`/`lg:` token verbatim. Selecting a bundle by `framedFrom`
65
+ * value is the only runtime decision.
66
+ */
67
+ const RESPONSIVE_SURFACE = {
68
+ 500: 'min-[500px]:overflow-hidden min-[500px]:rounded-radius-28 min-[500px]:border min-[500px]:border-border',
69
+ 640: 'sm:overflow-hidden sm:rounded-radius-28 sm:border sm:border-border',
70
+ 768: 'md:overflow-hidden md:rounded-radius-28 md:border md:border-border',
71
+ 1024: 'lg:overflow-hidden lg:rounded-radius-28 lg:border lg:border-border'
72
+ };
39
73
  const ContentPanelComponent = ({
40
74
  children,
75
+ framed,
76
+ framedFrom = 768,
41
77
  surfaceClassName,
42
78
  surfaceStyle,
43
79
  contentClassName,
@@ -45,7 +81,15 @@ const ContentPanelComponent = ({
45
81
  }) => {
46
82
  // Dev-only invariant — a ContentPanel must never be nested inside another.
47
83
  useContentPanelNestingGuard();
48
- const surfaceClass = ['flex-1', 'rounded-radius-28', 'overflow-hidden border border-border', surfaceClassName ?? 'bg-card'].join(' ');
84
+
85
+ // Tri-state: `undefined` → responsive (breakpoint-gated), `true` → always
86
+ // framed, `false` → never framed (plain full-bleed). Whole literal class
87
+ // strings are selected per mode so the Tailwind content-scan over `src/**`
88
+ // picks up every `min-*`/`sm:`/`md:`/`lg:` / `rounded-radius-28` token verbatim
89
+ // (the breakpoint bundle lives whole in `RESPONSIVE_SURFACE`; `framed ===
90
+ // true`/`false` ignore `framedFrom` for fixed always/never framing).
91
+ const surfaceBase = framed === undefined ? `flex-1 ${RESPONSIVE_SURFACE[framedFrom]}` : framed ? 'flex-1 overflow-hidden rounded-radius-28 border border-border' : 'flex-1';
92
+ const surfaceClass = [surfaceBase, surfaceClassName ?? 'bg-card'].join(' ');
49
93
  const contentClass = ['flex-1', contentClassName].filter(Boolean).join(' ');
50
94
  return /*#__PURE__*/_jsx(ContentPanelNestingContext.Provider, {
51
95
  value: true,
@@ -1 +1 @@
1
- {"version":3,"names":["React","memo","View","ContentPanelNestingContext","useContentPanelNestingGuard","jsx","_jsx","GUTTER_MASK_SPREAD","PANEL_TOP_INSET","PANEL_BOTTOM_INSET","ContentPanelComponent","children","surfaceClassName","surfaceStyle","contentClassName","contentStyle","surfaceClass","join","contentClass","filter","Boolean","Provider","value","className","style","ContentPanel","displayName"],"sourceRoot":"../../../src","sources":["content-panel/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,IAAI,QAAwC,cAAc;AAEnE,SACEC,0BAA0B,EAC1BC,2BAA2B,QACtB,sBAAmB;;AAE1B;AACA;AACA;AACA;AAHA,SAAAC,GAAA,IAAAC,IAAA;AAIA,OAAO,MAAMC,kBAAkB,GAAG,EAAE;AACpC;AACA,OAAO,MAAMC,eAAe,GAAG,CAAC;AAChC;AACA,OAAO,MAAMC,kBAAkB,GAAG,CAAC;AA2BnC,MAAMC,qBAAkD,GAAGA,CAAC;EAC1DC,QAAQ;EACRC,gBAAgB;EAChBC,YAAY;EACZC,gBAAgB;EAChBC;AACF,CAAC,KAAK;EACJ;EACAX,2BAA2B,CAAC,CAAC;EAE7B,MAAMY,YAAY,GAAG,CACnB,QAAQ,EACR,mBAAmB,EACnB,sCAAsC,EACtCJ,gBAAgB,IAAI,SAAS,CAC9B,CAACK,IAAI,CAAC,GAAG,CAAC;EACX,MAAMC,YAAY,GAAG,CAAC,QAAQ,EAAEJ,gBAAgB,CAAC,CAACK,MAAM,CAACC,OAAO,CAAC,CAACH,IAAI,CAAC,GAAG,CAAC;EAE3E,oBACEX,IAAA,CAACH,0BAA0B,CAACkB,QAAQ;IAACC,KAAK,EAAE,IAAK;IAAAX,QAAA,eAC/CL,IAAA,CAACJ,IAAI;MACIqB,SAAS,EAAEP,YAAY;MAC9BQ,KAAK,EAAEX,YAAa;MAAAF,QAAA,eAEpBL,IAAA,CAACJ,IAAI;QACIqB,SAAS,EAAEL,YAAY;QAC9BM,KAAK,EAAET,YAAa;QAAAJ,QAAA,EAEnBA;MAAQ,CACL;IAAC,CACH;EAAC,CAC4B,CAAC;AAE1C,CAAC;AAED,OAAO,MAAMc,YAAY,gBAAGxB,IAAI,CAACS,qBAAqB,CAAC;AACvDe,YAAY,CAACC,WAAW,GAAG,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["React","memo","View","ContentPanelNestingContext","useContentPanelNestingGuard","jsx","_jsx","GUTTER_MASK_SPREAD","PANEL_TOP_INSET","PANEL_BOTTOM_INSET","RESPONSIVE_SURFACE","ContentPanelComponent","children","framed","framedFrom","surfaceClassName","surfaceStyle","contentClassName","contentStyle","surfaceBase","undefined","surfaceClass","join","contentClass","filter","Boolean","Provider","value","className","style","ContentPanel","displayName"],"sourceRoot":"../../../src","sources":["content-panel/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,IAAI,QAAwC,cAAc;AAEnE,SACEC,0BAA0B,EAC1BC,2BAA2B,QACtB,sBAAmB;;AAE1B;AACA;AACA;AACA;AAHA,SAAAC,GAAA,IAAAC,IAAA;AAIA,OAAO,MAAMC,kBAAkB,GAAG,EAAE;AACpC;AACA,OAAO,MAAMC,eAAe,GAAG,CAAC;AAChC;AACA,OAAO,MAAMC,kBAAkB,GAAG,CAAC;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAuCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAgE,GAAG;EACvE,GAAG,EAAE,wGAAwG;EAC7G,GAAG,EAAE,oEAAoE;EACzE,GAAG,EAAE,oEAAoE;EACzE,IAAI,EAAE;AACR,CAAC;AAED,MAAMC,qBAAkD,GAAGA,CAAC;EAC1DC,QAAQ;EACRC,MAAM;EACNC,UAAU,GAAG,GAAG;EAChBC,gBAAgB;EAChBC,YAAY;EACZC,gBAAgB;EAChBC;AACF,CAAC,KAAK;EACJ;EACAd,2BAA2B,CAAC,CAAC;;EAE7B;EACA;EACA;EACA;EACA;EACA;EACA,MAAMe,WAAW,GACfN,MAAM,KAAKO,SAAS,GAChB,UAAUV,kBAAkB,CAACI,UAAU,CAAC,EAAE,GAC1CD,MAAM,GACJ,+DAA+D,GAC/D,QAAQ;EAChB,MAAMQ,YAAY,GAAG,CAACF,WAAW,EAAEJ,gBAAgB,IAAI,SAAS,CAAC,CAACO,IAAI,CAAC,GAAG,CAAC;EAC3E,MAAMC,YAAY,GAAG,CAAC,QAAQ,EAAEN,gBAAgB,CAAC,CAACO,MAAM,CAACC,OAAO,CAAC,CAACH,IAAI,CAAC,GAAG,CAAC;EAE3E,oBACEhB,IAAA,CAACH,0BAA0B,CAACuB,QAAQ;IAACC,KAAK,EAAE,IAAK;IAAAf,QAAA,eAC/CN,IAAA,CAACJ,IAAI;MACI0B,SAAS,EAAEP,YAAY;MAC9BQ,KAAK,EAAEb,YAAa;MAAAJ,QAAA,eAEpBN,IAAA,CAACJ,IAAI;QACI0B,SAAS,EAAEL,YAAY;QAC9BM,KAAK,EAAEX,YAAa;QAAAN,QAAA,EAEnBA;MAAQ,CACL;IAAC,CACH;EAAC,CAC4B,CAAC;AAE1C,CAAC;AAED,OAAO,MAAMkB,YAAY,gBAAG7B,IAAI,CAACU,qBAAqB,CAAC;AACvDmB,YAAY,CAACC,WAAW,GAAG,cAAc","ignoreList":[]}
@@ -25,16 +25,33 @@
25
25
  * content rather than displacing it). They render BEFORE the content wrapper so
26
26
  * z-index — not DOM order — decides layering.
27
27
  *
28
- * When `framed` is false (narrow screens) the panel is full-bleed: a single
29
- * flat surface, no rounding, no overlays.
28
+ * Framing is tri-state via the `framed` prop:
29
+ *
30
+ * - `undefined` (DEFAULT) → RESPONSIVE, driven purely by NativeWind: full-bleed
31
+ * below the `framedFrom` breakpoint, framed at/above it. The breakpoint is
32
+ * configurable per consumer (`framedFrom`, default `768` / Tailwind `md`); the
33
+ * rounding is gated by that breakpoint's `min-*:` variant and both overlays
34
+ * are always rendered but carry the matching `max-*:hidden` literal
35
+ * (`display:none` below the breakpoint), so the breakpoint is decided entirely
36
+ * in CSS — no consumer JS breakpoint hook.
37
+ * - `false` → NEVER framed (full-bleed at every size): a single flat surface,
38
+ * no rounding, no overlays.
39
+ * - `true` → ALWAYS framed (rounded + overlays at every size).
40
+ *
41
+ * The overlays are gated by VISIBILITY (a `max-*:hidden` literal for the chosen
42
+ * breakpoint) rather than by conditional mounting for the responsive case, so
43
+ * crossing the breakpoint never remounts them. The content wrapper likewise
44
+ * keeps a stable `key` so `{children}` reconciles in place across the breakpoint
45
+ * instead of remounting (which would reset feed scroll / the virtualizer +
46
+ * refetch).
30
47
  *
31
48
  * Native bundlers use `./index.tsx` (a plain rounded surface); web bundlers
32
49
  * select this file via the `"browser"` export condition in `package.json`.
33
50
  *
34
51
  * Styling is NativeWind-className-first; the literal class strings below MUST
35
52
  * stay literal so a consumer's Tailwind content-scan over `lib/**` picks them up
36
- * (no dynamic concatenation of the arbitrary `web:[…]` / `rounded-radius-28`
37
- * parts).
53
+ * (no dynamic concatenation of the arbitrary `web:[…]` / `rounded-radius-28` /
54
+ * `md:` parts — whole class strings are selected per mode instead).
38
55
  */
39
56
  import React, { memo } from 'react';
40
57
  import { View } from 'react-native';
@@ -48,9 +65,58 @@ export const GUTTER_MASK_SPREAD = 40;
48
65
  export const PANEL_TOP_INSET = 8;
49
66
  /** Bottom sticky inset (px) of the framed panel chrome. */
50
67
  export const PANEL_BOTTOM_INSET = 8;
68
+
69
+ /**
70
+ * Viewport width (px) at which a RESPONSIVE `ContentPanel` (`framed` undefined)
71
+ * switches from full-bleed to framed. Each value maps to a PRE-SHIPPED literal
72
+ * Tailwind class bundle — `768` (default) uses the named `md:`/`max-md:` screens
73
+ * (byte-identical to prior behavior), `640` uses `sm:`/`max-sm:`, `1024` uses
74
+ * `lg:`/`max-lg:`, and `500` uses the arbitrary `min-[500px]:`/`max-[500px]:`
75
+ * variants (there is no named screen at 500px). The breakpoint tokens are never
76
+ * built at runtime, so a consumer's Tailwind content-scan over `lib/**` resolves
77
+ * them verbatim.
78
+ */
79
+
80
+ /**
81
+ * Per-breakpoint literal Tailwind variant tokens for the WEB responsive mode.
82
+ * Each field is a WHOLE literal class string (never assembled from parts at
83
+ * runtime) so the consumer's content-scan over `lib/**` picks up every
84
+ * arbitrary/`min-*`/`max-*`/`web:` token verbatim. Selecting a bundle by
85
+ * `framedFrom` value is the only runtime decision:
86
+ * - `surface` → framing rounding on the surface at/above the breakpoint.
87
+ * - `content` → the same rounding + a web-only horizontal clip on the
88
+ * inner content wrapper (`web:<bp>:overflow-x-clip`, platform-first-then-
89
+ * breakpoint — matching the consumer convention `web:sm:flex` in `@mercaria/ui`).
90
+ * - `overlayHidden` → `display:none` for the sticky overlays BELOW the breakpoint.
91
+ * `min-[500px]:` (≥500) and `max-[500px]:` (<500) are exactly complementary
92
+ * (meet at 500, no overlap/gap), mirroring the named `md:`/`max-md:` pair.
93
+ */
94
+ const RESPONSIVE_WEB = {
95
+ 500: {
96
+ surface: 'min-[500px]:rounded-radius-28',
97
+ content: 'min-[500px]:rounded-radius-28 web:min-[500px]:overflow-x-clip',
98
+ overlayHidden: 'max-[500px]:hidden'
99
+ },
100
+ 640: {
101
+ surface: 'sm:rounded-radius-28',
102
+ content: 'sm:rounded-radius-28 web:sm:overflow-x-clip',
103
+ overlayHidden: 'max-sm:hidden'
104
+ },
105
+ 768: {
106
+ surface: 'md:rounded-radius-28',
107
+ content: 'md:rounded-radius-28 web:md:overflow-x-clip',
108
+ overlayHidden: 'max-md:hidden'
109
+ },
110
+ 1024: {
111
+ surface: 'lg:rounded-radius-28',
112
+ content: 'lg:rounded-radius-28 web:lg:overflow-x-clip',
113
+ overlayHidden: 'max-lg:hidden'
114
+ }
115
+ };
51
116
  const ContentPanelComponent = ({
52
117
  children,
53
118
  framed,
119
+ framedFrom = 768,
54
120
  surfaceClassName,
55
121
  surfaceStyle,
56
122
  contentClassName,
@@ -58,28 +124,43 @@ const ContentPanelComponent = ({
58
124
  showStickyFrame,
59
125
  maskColor
60
126
  }) => {
61
- // Dev-only invariant — must run unconditionally before the early `!framed`
62
- // return so the hook order stays stable across renders (rules of hooks).
127
+ // Dev-only invariant — must run unconditionally (before deriving any
128
+ // mode-specific branch) so the hook order stays stable (rules of hooks).
63
129
  useContentPanelNestingGuard();
64
130
  const {
65
131
  colors
66
132
  } = useTheme();
67
- const surfaceClass = framed ? ['flex-1 rounded-radius-28', surfaceClassName ?? 'bg-card'].join(' ') : ['flex-1', surfaceClassName ?? 'bg-card'].join(' ');
68
- const contentClass = framed ? ['flex-1 rounded-radius-28 web:overflow-x-clip', contentClassName].filter(Boolean).join(' ') : ['flex-1', contentClassName].filter(Boolean).join(' ');
133
+
134
+ // Tri-state: `undefined` responsive (md:-gated), `true` always framed,
135
+ // `false` → never framed (full-bleed).
136
+ const responsive = framed === undefined;
137
+ const showOverlays = framed !== false;
138
+ // Responsive mode selects a pre-shipped literal breakpoint bundle by value;
139
+ // `framed === true`/`false` ignore `framedFrom` (fixed always/never framing).
140
+ const bp = RESPONSIVE_WEB[framedFrom];
141
+
142
+ // Whole literal class strings selected per mode (the Tailwind content-scan
143
+ // over `lib/**` requires each arbitrary/`min-*`/`max-*`/`web:` token stay
144
+ // literal — the breakpoint tokens live whole in `RESPONSIVE_WEB` above and are
145
+ // only spliced in, never assembled from parts).
146
+ const surfaceBase = responsive ? `flex-1 ${bp.surface}` : framed ? 'flex-1 rounded-radius-28' : 'flex-1';
147
+ const contentBase = responsive ? `flex-1 ${bp.content}` : framed ? 'flex-1 rounded-radius-28 web:overflow-x-clip' : 'flex-1';
148
+ const surfaceClass = [surfaceBase, surfaceClassName ?? 'bg-card'].join(' ');
149
+ const contentClass = [contentBase, contentClassName].filter(Boolean).join(' ');
69
150
  return /*#__PURE__*/_jsx(ContentPanelNestingContext.Provider, {
70
151
  value: true,
71
152
  children: /*#__PURE__*/_jsxs(View, {
72
153
  className: surfaceClass,
73
154
  style: surfaceStyle,
74
- children: [framed && /*#__PURE__*/_jsx(View, {
155
+ children: [showOverlays && /*#__PURE__*/_jsx(View, {
75
156
  pointerEvents: "none",
76
- className: '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)]',
157
+ className: responsive ? `web:sticky web:top-2 z-30 h-[calc(100dvh-16px)] w-full rounded-radius-28 ${bp.overlayHidden} web:[margin-bottom:calc(-100dvh+16px)] web:[clip-path:inset(-12px)]` : '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)]',
77
158
  style: {
78
159
  boxShadow: `0 0 0 ${GUTTER_MASK_SPREAD}px ${maskColor ?? colors.background}`
79
160
  }
80
- }, "bleed-mask"), framed && showStickyFrame !== false && /*#__PURE__*/_jsx(View, {
161
+ }, "bleed-mask"), showOverlays && showStickyFrame !== false && /*#__PURE__*/_jsx(View, {
81
162
  pointerEvents: "none",
82
- className: '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)]'
163
+ className: responsive ? `web:sticky web:top-2 z-[120] h-[calc(100dvh-16px)] w-full rounded-radius-28 border border-border ${bp.overlayHidden} web:[margin-bottom:calc(-100dvh+16px)]` : '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)]'
83
164
  }, "border-frame"), /*#__PURE__*/_jsx(View, {
84
165
  className: contentClass,
85
166
  style: contentStyle,
@@ -1 +1 @@
1
- {"version":3,"names":["React","memo","View","useTheme","ContentPanelNestingContext","useContentPanelNestingGuard","jsx","_jsx","jsxs","_jsxs","GUTTER_MASK_SPREAD","PANEL_TOP_INSET","PANEL_BOTTOM_INSET","ContentPanelComponent","children","framed","surfaceClassName","surfaceStyle","contentClassName","contentStyle","showStickyFrame","maskColor","colors","surfaceClass","join","contentClass","filter","Boolean","Provider","value","className","style","pointerEvents","boxShadow","background","ContentPanel","displayName"],"sourceRoot":"../../../src","sources":["content-panel/index.web.tsx"],"mappings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;EAE1D,oBACEjB,IAAA,CAACH,0BAA0B,CAACwB,QAAQ;IAACC,KAAK,EAAE,IAAK;IAAAf,QAAA,eAC/CL,KAAA,CAACP,IAAI;MACI4B,SAAS,EAAEP,YAAY;MAC9BQ,KAAK,EAAEd,YAAa;MAAAH,QAAA,GAGnBC,MAAM,iBACLR,IAAA,CAACL,IAAI;QAEH8B,aAAa,EAAC,MAAM;QAElBF,SAAS,EACP,8IAA8I;QAElJC,KAAK,EAAE;UAAEE,SAAS,EAAE,SAASvB,kBAAkB,MAAMW,SAAS,IAAIC,MAAM,CAACY,UAAU;QAAG;MAAE,GANpF,YAOL,CACF,EAEAnB,MAAM,IAAIK,eAAe,KAAK,KAAK,iBAClCb,IAAA,CAACL,IAAI;QAEH8B,aAAa,EAAC,MAAM;QAElBF,SAAS,EACP;MAAyI,GAJzI,cAML,CACF,eAKDvB,IAAA,CAACL,IAAI;QAEI4B,SAAS,EAAEL,YAAY;QAC9BM,KAAK,EAAEZ,YAAa;QAAAL,QAAA,EAEnBA;MAAQ,GAJL,SAKA,CAAC;IAAA,CACH;EAAC,CAC4B,CAAC;AAE1C,CAAC;AAED,OAAO,MAAMqB,YAAY,gBAAGlC,IAAI,CAACY,qBAAqB,CAAC;AACvDsB,YAAY,CAACC,WAAW,GAAG,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["React","memo","View","useTheme","ContentPanelNestingContext","useContentPanelNestingGuard","jsx","_jsx","jsxs","_jsxs","GUTTER_MASK_SPREAD","PANEL_TOP_INSET","PANEL_BOTTOM_INSET","RESPONSIVE_WEB","surface","content","overlayHidden","ContentPanelComponent","children","framed","framedFrom","surfaceClassName","surfaceStyle","contentClassName","contentStyle","showStickyFrame","maskColor","colors","responsive","undefined","showOverlays","bp","surfaceBase","contentBase","surfaceClass","join","contentClass","filter","Boolean","Provider","value","className","style","pointerEvents","boxShadow","background","ContentPanel","displayName"],"sourceRoot":"../../../src","sources":["content-panel/index.web.tsx"],"mappings":";;AAAA;AACA;AAC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AkB,MAAMgB,SAAS,IAAIC,MAAM,CAACkB,UAAU;QAAG;MAAE,GAPpF,YAQL,CACF,EAGAf,YAAY,IAAIL,eAAe,KAAK,KAAK,iBACxClB,IAAA,CAACL,IAAI;QAEHyC,aAAa,EAAC,MAAM;QAElBF,SAAS,EAAEb,UAAU,GACjB,oGAAoGG,EAAE,CAACf,aAAa,yCAAyC,GAC7J;MAAyI,GAL3I,cAOL,CACF,eAKDT,IAAA,CAACL,IAAI;QAEIuC,SAAS,EAAEL,YAAY;QAC9BM,KAAK,EAAElB,YAAa;QAAAN,QAAA,EAEnBA;MAAQ,GAJL,SAKA,CAAC;IAAA,CACH;EAAC,CAC4B,CAAC;AAE1C,CAAC;AAED,OAAO,MAAM4B,YAAY,gBAAG7C,IAAI,CAACgB,qBAAqB,CAAC;AACvD6B,YAAY,CAACC,WAAW,GAAG,cAAc","ignoreList":[]}
@@ -7,11 +7,21 @@
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
+ * (the breakpoint's `min-*:` variant evaluates against the window width on
15
+ * native too — no JS breakpoint hook needed):
16
+ *
17
+ * - `undefined` (DEFAULT) → responsive: full-bleed below the `framedFrom`
18
+ * breakpoint (default `768` / Tailwind `md`), rounded + bordered at/above it
19
+ * (e.g. `md:rounded-radius-28 md:border md:border-border`).
20
+ * - `false` → never framed (plain full-bleed at every size).
21
+ * - `true` → always rounded + bordered.
22
+ *
23
+ * `showStickyFrame` and `maskColor` are accepted for cross-platform API parity
24
+ * but are no-ops here (there are no sticky overlays on native).
15
25
  *
16
26
  * Web bundlers select `./index.web` via the `"browser"` export condition in
17
27
  * `package.json`; native bundlers fall through to this file.
@@ -31,13 +41,34 @@ export declare const GUTTER_MASK_SPREAD = 40;
31
41
  export declare const PANEL_TOP_INSET = 8;
32
42
  /** Bottom sticky inset (px) of the framed panel chrome. */
33
43
  export declare const PANEL_BOTTOM_INSET = 8;
44
+ /**
45
+ * Viewport width (px) at which a RESPONSIVE `ContentPanel` (`framed` undefined)
46
+ * switches from full-bleed to framed. Each value maps to a PRE-SHIPPED literal
47
+ * Tailwind class bundle — `768` (default) uses the named `md:` screen
48
+ * (byte-identical to prior behavior), `640` uses `sm:`, `1024` uses `lg:`, and
49
+ * `500` uses the arbitrary `min-[500px]:` variant (there is no named screen at
50
+ * 500px). The breakpoint tokens are never built at runtime, so a consumer's
51
+ * Tailwind content-scan over `src/**`/`lib/**` resolves them verbatim.
52
+ */
53
+ export type ContentPanelFramedBreakpoint = 500 | 640 | 768 | 1024;
34
54
  export interface ContentPanelProps {
35
55
  children: React.ReactNode;
36
56
  /**
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.
57
+ * Framing mode. Tri-state, resolved purely with NativeWind no consumer
58
+ * breakpoint hook needed:
59
+ * - `undefined` (DEFAULT) → responsive: full-bleed below the `framedFrom`
60
+ * breakpoint, rounded + bordered at/above it.
61
+ * - `false` → never framed (plain full-bleed at every size).
62
+ * - `true` → always rounded + bordered.
63
+ */
64
+ framed?: boolean;
65
+ /**
66
+ * Viewport width at which the RESPONSIVE panel switches from full-bleed to
67
+ * framed. Only meaningful when `framed` is `undefined` (responsive) — ignored
68
+ * when `framed` is `true` (always framed) or `false` (never framed). Defaults
69
+ * to `768` (Tailwind `md`), reproducing the prior fixed behavior exactly.
39
70
  */
40
- framed: boolean;
71
+ framedFrom?: ContentPanelFramedBreakpoint;
41
72
  /** Override the surface background utility (defaults to `bg-card`). */
42
73
  surfaceClassName?: string;
43
74
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAOpE;;;GAGG;A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