@oxy.so/bloom 4.24.0 → 4.25.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.
- package/docs/adoption-matrix.mdx +6 -6
- package/docs/ai-chat.mdx +1 -1
- package/docs/context-menu.mdx +2 -0
- package/lib/commonjs/ai-chat/AiChatContainer.js +60 -7
- package/lib/commonjs/ai-chat/AiChatContainer.js.map +1 -1
- package/lib/commonjs/ai-chat/use-panel-interaction.js +6 -1
- package/lib/commonjs/ai-chat/use-panel-interaction.js.map +1 -1
- package/lib/commonjs/bottom-bar/BottomBarBase.js +5 -2
- package/lib/commonjs/bottom-bar/BottomBarBase.js.map +1 -1
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js +6 -2
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/commonjs/bottom-sheet/context.js +29 -0
- package/lib/commonjs/bottom-sheet/context.js.map +1 -0
- package/lib/commonjs/composer-panel/ComposerPanelBase.js +32 -11
- package/lib/commonjs/composer-panel/ComposerPanelBase.js.map +1 -1
- package/lib/commonjs/composer-panel/ComposerPopover.js +13 -5
- package/lib/commonjs/composer-panel/ComposerPopover.js.map +1 -1
- package/lib/commonjs/composer-panel/ModelPickerBase.js +13 -2
- package/lib/commonjs/composer-panel/ModelPickerBase.js.map +1 -1
- package/lib/commonjs/context-menu/ContextMenu.js +10 -2
- package/lib/commonjs/context-menu/ContextMenu.js.map +1 -1
- package/lib/commonjs/dialog/DialogBottomSheet.js +27 -6
- package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/commonjs/floating/LongPressArea.js +107 -0
- package/lib/commonjs/floating/LongPressArea.js.map +1 -0
- package/lib/commonjs/settings-modal/SettingsModal.js +8 -1
- package/lib/commonjs/settings-modal/SettingsModal.js.map +1 -1
- package/lib/commonjs/settings-modal/use-keyboard-reveal.js +76 -0
- package/lib/commonjs/settings-modal/use-keyboard-reveal.js.map +1 -0
- package/lib/commonjs/sidebar/Sidebar.js +6 -2
- package/lib/commonjs/sidebar/Sidebar.js.map +1 -1
- package/lib/commonjs/sidebar/SidebarItem.js +5 -1
- package/lib/commonjs/sidebar/SidebarItem.js.map +1 -1
- package/lib/module/ai-chat/AiChatContainer.js +60 -7
- package/lib/module/ai-chat/AiChatContainer.js.map +1 -1
- package/lib/module/ai-chat/use-panel-interaction.js +7 -2
- package/lib/module/ai-chat/use-panel-interaction.js.map +1 -1
- package/lib/module/bottom-bar/BottomBarBase.js +5 -2
- package/lib/module/bottom-bar/BottomBarBase.js.map +1 -1
- package/lib/module/bottom-sheet/BottomSheetBase.js +6 -2
- package/lib/module/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/module/bottom-sheet/context.js +25 -0
- package/lib/module/bottom-sheet/context.js.map +1 -0
- package/lib/module/composer-panel/ComposerPanelBase.js +33 -12
- package/lib/module/composer-panel/ComposerPanelBase.js.map +1 -1
- package/lib/module/composer-panel/ComposerPopover.js +13 -5
- package/lib/module/composer-panel/ComposerPopover.js.map +1 -1
- package/lib/module/composer-panel/ModelPickerBase.js +13 -2
- package/lib/module/composer-panel/ModelPickerBase.js.map +1 -1
- package/lib/module/context-menu/ContextMenu.js +10 -2
- package/lib/module/context-menu/ContextMenu.js.map +1 -1
- package/lib/module/dialog/DialogBottomSheet.js +25 -4
- package/lib/module/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/module/floating/LongPressArea.js +100 -0
- package/lib/module/floating/LongPressArea.js.map +1 -0
- package/lib/module/settings-modal/SettingsModal.js +8 -1
- package/lib/module/settings-modal/SettingsModal.js.map +1 -1
- package/lib/module/settings-modal/use-keyboard-reveal.js +72 -0
- package/lib/module/settings-modal/use-keyboard-reveal.js.map +1 -0
- package/lib/module/sidebar/Sidebar.js +6 -2
- package/lib/module/sidebar/Sidebar.js.map +1 -1
- package/lib/module/sidebar/SidebarItem.js +5 -1
- package/lib/module/sidebar/SidebarItem.js.map +1 -1
- package/lib/typescript/commonjs/ai-chat/use-panel-interaction.d.ts +5 -1
- package/lib/typescript/commonjs/ai-chat/use-panel-interaction.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-bar/BottomBarBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/context.d.ts +5 -0
- package/lib/typescript/commonjs/bottom-sheet/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/composer-panel/ComposerPanelBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/composer-panel/ComposerPopover.d.ts.map +1 -1
- package/lib/typescript/commonjs/composer-panel/ModelPickerBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/context-menu/ContextMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/floating/LongPressArea.d.ts +34 -0
- package/lib/typescript/commonjs/floating/LongPressArea.d.ts.map +1 -0
- package/lib/typescript/commonjs/settings-modal/SettingsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/settings-modal/use-keyboard-reveal.d.ts +21 -0
- package/lib/typescript/commonjs/settings-modal/use-keyboard-reveal.d.ts.map +1 -0
- package/lib/typescript/commonjs/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/SidebarItem.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/use-panel-interaction.d.ts +5 -1
- package/lib/typescript/module/ai-chat/use-panel-interaction.d.ts.map +1 -1
- package/lib/typescript/module/bottom-bar/BottomBarBase.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/context.d.ts +5 -0
- package/lib/typescript/module/bottom-sheet/context.d.ts.map +1 -0
- package/lib/typescript/module/composer-panel/ComposerPanelBase.d.ts.map +1 -1
- package/lib/typescript/module/composer-panel/ComposerPopover.d.ts.map +1 -1
- package/lib/typescript/module/composer-panel/ModelPickerBase.d.ts.map +1 -1
- package/lib/typescript/module/context-menu/ContextMenu.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/floating/LongPressArea.d.ts +34 -0
- package/lib/typescript/module/floating/LongPressArea.d.ts.map +1 -0
- package/lib/typescript/module/settings-modal/SettingsModal.d.ts.map +1 -1
- package/lib/typescript/module/settings-modal/use-keyboard-reveal.d.ts +21 -0
- package/lib/typescript/module/settings-modal/use-keyboard-reveal.d.ts.map +1 -0
- package/lib/typescript/module/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/SidebarItem.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ai-chat/AiChatContainer.tsx +44 -5
- package/src/ai-chat/use-panel-interaction.ts +7 -2
- package/src/bottom-bar/BottomBarBase.tsx +5 -2
- package/src/bottom-sheet/BottomSheetBase.tsx +4 -1
- package/src/bottom-sheet/context.ts +23 -0
- package/src/composer-panel/ComposerPanelBase.tsx +38 -13
- package/src/composer-panel/ComposerPopover.tsx +13 -5
- package/src/composer-panel/ModelPickerBase.tsx +11 -3
- package/src/context-menu/ContextMenu.tsx +7 -2
- package/src/dialog/DialogBottomSheet.tsx +16 -4
- package/src/floating/LongPressArea.tsx +114 -0
- package/src/settings-modal/SettingsModal.tsx +9 -2
- package/src/settings-modal/use-keyboard-reveal.ts +62 -0
- package/src/sidebar/Sidebar.tsx +6 -2
- package/src/sidebar/SidebarItem.tsx +5 -1
|
@@ -75,7 +75,11 @@ const SidebarItemComponent = ({
|
|
|
75
75
|
// Not clipped: the collapsed badge hangs off the square's top-end corner.
|
|
76
76
|
// The content clips itself instead, so the label can't spill mid-morph.
|
|
77
77
|
overflow: 'visible',
|
|
78
|
-
|
|
78
|
+
// Collapsed it is a square. Expanded it is at LEAST the square: at the
|
|
79
|
+
// default type scale the label's line fits exactly, and at the largest
|
|
80
|
+
// system font a fixed height clipped it top and bottom (Android 16).
|
|
81
|
+
height: collapsed ? metrics.row.square : undefined,
|
|
82
|
+
minHeight: metrics.row.square,
|
|
79
83
|
paddingLeft: metrics.row.padding,
|
|
80
84
|
paddingRight: metrics.row.padding,
|
|
81
85
|
paddingTop: metrics.row.padding,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","Pressable","View","Animated","useAnimatedStyle","useInteractionState","Text","useSidebarGeometry","useSidebarMetrics","useSidebarPalette","borderRadius","Collapsible","IS_WEB","useInSidebar","useSidebarCollapseProgress","useSidebarWebCss","jsx","_jsx","jsxs","_jsxs","AnimatedPressable","createAnimatedComponent","SidebarItemComponent","icon","Icon","label","size","href","badge","collapsedBadge","selected","collapsed","onPress","onLongPress","style","testID","palette","metrics","state","hovered","onIn","onOut","inSidebar","progress","lane","collapsedLane","row","square","horizontalInset","margin","value","marginLeft","marginRight","itemGap","gap","contentStyle","collapsedBadgeStyle","opacity","foreground","selectedForeground","textSecondary","rowStyle","flexDirection","alignItems","justifyContent","overflow","height","paddingLeft","padding","paddingRight","paddingTop","paddingBottom","full","alignSelf","width","
|
|
1
|
+
{"version":3,"names":["React","memo","Pressable","View","Animated","useAnimatedStyle","useInteractionState","Text","useSidebarGeometry","useSidebarMetrics","useSidebarPalette","borderRadius","Collapsible","IS_WEB","useInSidebar","useSidebarCollapseProgress","useSidebarWebCss","jsx","_jsx","jsxs","_jsxs","AnimatedPressable","createAnimatedComponent","SidebarItemComponent","icon","Icon","label","size","href","badge","collapsedBadge","selected","collapsed","onPress","onLongPress","style","testID","palette","metrics","state","hovered","onIn","onOut","inSidebar","progress","lane","collapsedLane","row","square","horizontalInset","margin","value","marginLeft","marginRight","itemGap","gap","contentStyle","collapsedBadgeStyle","opacity","foreground","selectedForeground","textSecondary","rowStyle","flexDirection","alignItems","justifyContent","overflow","height","undefined","minHeight","paddingLeft","padding","paddingRight","paddingTop","paddingBottom","full","alignSelf","width","backgroundColor","rowHover","ring","webProps","dataSet","bloomSidebar","title","role","accessibilityLabel","accessibilityState","onHoverIn","onHoverOut","event","preventDefault","children","minWidth","flexShrink","fill","variant","numberOfLines","color","pointerEvents","accessibilityElementsHidden","importantForAccessibility","position","top","insetInlineEnd","SidebarItem","displayName"],"sourceRoot":"../../../src","sources":["sidebar/SidebarItem.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -5,7 +5,11 @@ import { type View } from 'react-native';
|
|
|
5
5
|
*
|
|
6
6
|
* open Escape (web) and back (Android) close it
|
|
7
7
|
* modal it covers the workspace: focus moves in on open, Tab is kept
|
|
8
|
-
* inside, and focus goes back to the opener on close
|
|
8
|
+
* inside, and focus goes back to the opener on close (web); on
|
|
9
|
+
* native the keyboard goes down as it opens — a composer that had
|
|
10
|
+
* the focus (say, regained after a sheet closed) otherwise kept the
|
|
11
|
+
* keyboard up under the drawer (Android 16). Nothing refocuses the
|
|
12
|
+
* composer on close.
|
|
9
13
|
*
|
|
10
14
|
* Any portaled overlay above (a dialog, a menu) takes all of it first.
|
|
11
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-panel-interaction.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/use-panel-interaction.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"use-panel-interaction.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/use-panel-interaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAmC,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAK1E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,0CAyCnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomBarBase.d.ts","sourceRoot":"","sources":["../../../../src/bottom-bar/BottomBarBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAYzE,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU,KAAM,SAAQ,cAAc;IACpC,UAAU,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,IAAI,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACvC,IAAI,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC3C;AACD,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAC3H,eAAwB,EAAE,cAAuB,EAAE,QAAwB,EAAE,gBAAgB,EAAE,IAAW,EAAE,QAAc,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"BottomBarBase.d.ts","sourceRoot":"","sources":["../../../../src/bottom-bar/BottomBarBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAYzE,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU,KAAM,SAAQ,cAAc;IACpC,UAAU,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,IAAI,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACvC,IAAI,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC3C;AACD,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAC3H,eAAwB,EAAE,cAAuB,EAAE,QAAwB,EAAE,gBAAgB,EAAE,IAAW,EAAE,QAAc,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,kDAyEnJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetBase.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/BottomSheetBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BottomSheetBase.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/BottomSheetBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqC/B,OAAO,KAAK,EAAE,cAAc,EAA2C,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAsB7G,eAAO,MAAM,eAAe,6FAgsB1B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
2
|
+
export declare const SheetKeyboardProvider: import("react").Provider<SharedValue<number> | null>;
|
|
3
|
+
/** The sheet's keyboard height, or a constant 0 outside a sheet. */
|
|
4
|
+
export declare function useSheetKeyboardHeight(): SharedValue<number>;
|
|
5
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAe3E,eAAO,MAAM,qBAAqB,sDAAgC,CAAC;AAEnE,oEAAoE;AACpE,wBAAgB,sBAAsB,IAAI,WAAW,CAAC,MAAM,CAAC,CAG5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerPanelBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPanelBase.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAuB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAkEvE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,YAAiB,EACjB,aAAa,EACb,QAAQ,EACR,MAAM,EACN,IAAY,EACZ,QAAgB,EAChB,WAA2C,EAC3C,WAAwC,EACxC,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,OAAiC,EACjC,eAAe,EACf,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,gBAAwB,EACxB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ComposerPanelBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPanelBase.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAuB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAkEvE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,YAAiB,EACjB,aAAa,EACb,QAAQ,EACR,MAAM,EACN,IAAY,EACZ,QAAgB,EAChB,WAA2C,EAC3C,WAAwC,EACxC,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,OAAiC,EACjC,eAAe,EACf,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,gBAAwB,EACxB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,kBAAkB,2CAiNpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerPopover.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPopover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComposerPopover.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPopover.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAYpD,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,KAAK,EACL,IAAI,EACJ,UAAU,EACV,KAAK,EACL,MAAM,EACN,QAAQ,GACT,EAAE,oBAAoB,kDAgGtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelPickerBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ModelPickerBase.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAuC,gBAAgB,EAAuB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ModelPickerBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ModelPickerBase.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAuC,gBAAgB,EAAuB,MAAM,SAAS,CAAC;AAyX1G;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAA8B,EAC9B,cAAc,EACd,YAAyC,EACzC,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,gBAAgB,2CAiUlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/context-menu/ContextMenu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAyC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/context-menu/ContextMenu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAW9D,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,gBAAgB,2CAqBvE;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,KAAK,EACL,MAAM,GACP,EAAE,uBAAuB,2CA6BzB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,KAAsB,EACtB,KAAK,GACN,EAAE,uBAAuB,2CAmBzB;AAID,eAAO,MAAM,eAAe,yDAAY,CAAC;AACzC,eAAO,MAAM,uBAAuB,iEAAoB,CAAC;AACzD,eAAO,MAAM,qBAAqB,gEAAkB,CAAC;AACrD,eAAO,MAAM,oBAAoB,8DAAiB,CAAC;AACnD,eAAO,MAAM,gBAAgB,2DAAa,CAAC;AAC3C,eAAO,MAAM,oBAAoB,4CAAiB,CAAC;AACnD,eAAO,MAAM,mBAAmB,8DAAgB,CAAC;AACjD,eAAO,MAAM,gBAAgB,2DAAa,CAAC;AAC3C,eAAO,MAAM,cAAc,yDAAW,CAAC;AACvC,eAAO,MAAM,qBAAqB,gEAAkB,CAAC;AACrD,eAAO,MAAM,qBAAqB,gEAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogBottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/dialog/DialogBottomSheet.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DialogBottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/dialog/DialogBottomSheet.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAsB,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,SAAS,EACT,OAAO,EACP,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,cAAyC,EACzC,UAAiB,EACjB,iBAAwB,EACxB,cAA+C,EAC/C,UAAU,EACV,KAAK,EACL,KAAK,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,KAAK,EACL,QAAQ,GACT,EAAE,sBAAsB,2CAgRxB;AAqBD;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,WAAW,EACT,SAAS,GACT,MAAM,GACN,WAAW,GACX,SAAS,GACT,QAAQ,GACR,OAAO,GACP,aAAa,GACb,SAAS,GACT,QAAQ,GACR,gBAAgB,GAChB,YAAY,GACZ,mBAAmB,GACnB,gBAAgB,GAChB,YAAY,GACZ,OAAO,GACP,OAAO,GACP,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,oBAAoB,GACpB,OAAO,GACP,UAAU,CACb,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A long-press target that never becomes the touch RESPONDER — native only,
|
|
3
|
+
* the trigger `ContextMenuTrigger` renders around content it does not own.
|
|
4
|
+
*
|
|
5
|
+
* ── WHY NOT A `Pressable` ───────────────────────────────────────────────────
|
|
6
|
+
*
|
|
7
|
+
* On Android the view holding the JS responder intercepts every later MOVE of
|
|
8
|
+
* that touch natively (`JSResponderHandler.onInterceptTouchEvent` returns true
|
|
9
|
+
* for the responder's own id). A `Pressable` claims the responder on touch
|
|
10
|
+
* start, so a horizontal `ScrollView` INSIDE it never sees the drag: a turn
|
|
11
|
+
* wrapped in the context menu's trigger could not scroll its code block
|
|
12
|
+
* sideways (Pixel 8a, Android 16; the same block scrolled without the wrapper).
|
|
13
|
+
* A vertical scroller ABOVE the trigger kept working, because a parent
|
|
14
|
+
* intercepts before its child — which is why only the inner one broke.
|
|
15
|
+
*
|
|
16
|
+
* So the hold is timed off the RAW touch events, which every ancestor receives
|
|
17
|
+
* without claiming anything: a scroller that takes the drag cancels the touch,
|
|
18
|
+
* and a finger that travels past the slop or lifts early cancels the timer.
|
|
19
|
+
* Taps keep going to whatever the content itself makes pressable.
|
|
20
|
+
*
|
|
21
|
+
* Assistive tech reaches the menu through the `longpress` accessibility action
|
|
22
|
+
* (TalkBack's double-tap-and-hold, VoiceOver's actions rotor).
|
|
23
|
+
*/
|
|
24
|
+
import React from 'react';
|
|
25
|
+
import type { TriggerHandleProps } from './types';
|
|
26
|
+
/** `Pressable`'s own default, so a context menu opens on the platform's usual hold. */
|
|
27
|
+
export declare const LONG_PRESS_MS = 500;
|
|
28
|
+
/** How far the finger may drift and still be holding, in dp (`Pressability`'s deactivation distance). */
|
|
29
|
+
export declare const LONG_PRESS_SLOP = 10;
|
|
30
|
+
export type LongPressAreaProps = Partial<TriggerHandleProps> & {
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
};
|
|
33
|
+
export declare function LongPressArea({ children, onLongPress, onPress: _onPress, disabled, accessibilityLabel, accessibilityRole, ...aria }: LongPressAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
//# sourceMappingURL=LongPressArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LongPressArea.d.ts","sourceRoot":"","sources":["../../../../src/floating/LongPressArea.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,uFAAuF;AACvF,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,yGAAyG;AACzG,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,GAAG;IAC7D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,WAAW,EAEX,OAAO,EAAE,QAAQ,EACjB,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,kBAAkB,2CA+DpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsModal.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/SettingsModal.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,kBAAkB,EAAqC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingsModal.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/SettingsModal.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,kBAAkB,EAAqC,MAAM,SAAS,CAAC;AAoFrF,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,OAAO,EACP,aAAa,EACb,MAAM,EACN,KAAK,EACL,IAAI,EAAE,cAAc,EACpB,WAAW,EACX,YAAY,EACZ,WAA0B,EAC1B,MAAM,EACN,MAAM,GACP,EAAE,kBAAkB,kDA4VpB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { type ScrollView } from 'react-native';
|
|
3
|
+
/** Clearance kept between the focused field and the keyboard's top, px. */
|
|
4
|
+
export declare const KEYBOARD_REVEAL_MARGIN = 16;
|
|
5
|
+
/**
|
|
6
|
+
* Keep a settings page's focused field above the software keyboard — native
|
|
7
|
+
* only; on web the browser scrolls a focused field into view itself.
|
|
8
|
+
*
|
|
9
|
+
* The settings modal draws edge to edge, so the keyboard slides OVER it rather
|
|
10
|
+
* than resizing it: a field low on a page (Personalization's last input, a
|
|
11
|
+
* Pixel 8a at Android 16) stayed behind the keyboard with nothing to scroll it
|
|
12
|
+
* out. This returns the keyboard's height for the page to pad its content by —
|
|
13
|
+
* so there is room to scroll — and, when the keyboard shows, scrolls the page
|
|
14
|
+
* by exactly what the focused field sits below the keyboard's top.
|
|
15
|
+
*
|
|
16
|
+
* `offset` is the page's current scroll offset (its scroll handler keeps it).
|
|
17
|
+
*/
|
|
18
|
+
export declare function useKeyboardReveal(scrollRef: RefObject<ScrollView | null>, offset: {
|
|
19
|
+
value: number;
|
|
20
|
+
}, enabled: boolean): number;
|
|
21
|
+
//# sourceMappingURL=use-keyboard-reveal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-keyboard-reveal.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/use-keyboard-reveal.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAqD,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAElG,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAIzC;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC,EACvC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EACzB,OAAO,EAAE,OAAO,GACf,MAAM,CAoCR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkE,MAAM,OAAO,CAAC;AA4CvF,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkE,MAAM,OAAO,CAAC;AA4CvF,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,SAAS,CAAC;AAquB5D,eAAO,MAAM,OAAO,0CAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarItem.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/SidebarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAYpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"SidebarItem.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/SidebarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAYpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAoIhD,eAAO,MAAM,WAAW,8CAA6B,CAAC"}
|
|
@@ -5,7 +5,11 @@ import { type View } from 'react-native';
|
|
|
5
5
|
*
|
|
6
6
|
* open Escape (web) and back (Android) close it
|
|
7
7
|
* modal it covers the workspace: focus moves in on open, Tab is kept
|
|
8
|
-
* inside, and focus goes back to the opener on close
|
|
8
|
+
* inside, and focus goes back to the opener on close (web); on
|
|
9
|
+
* native the keyboard goes down as it opens — a composer that had
|
|
10
|
+
* the focus (say, regained after a sheet closed) otherwise kept the
|
|
11
|
+
* keyboard up under the drawer (Android 16). Nothing refocuses the
|
|
12
|
+
* composer on close.
|
|
9
13
|
*
|
|
10
14
|
* Any portaled overlay above (a dialog, a menu) takes all of it first.
|
|
11
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-panel-interaction.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/use-panel-interaction.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"use-panel-interaction.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/use-panel-interaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAmC,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAK1E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,0CAyCnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomBarBase.d.ts","sourceRoot":"","sources":["../../../../src/bottom-bar/BottomBarBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAYzE,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU,KAAM,SAAQ,cAAc;IACpC,UAAU,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,IAAI,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACvC,IAAI,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC3C;AACD,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAC3H,eAAwB,EAAE,cAAuB,EAAE,QAAwB,EAAE,gBAAgB,EAAE,IAAW,EAAE,QAAc,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"BottomBarBase.d.ts","sourceRoot":"","sources":["../../../../src/bottom-bar/BottomBarBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAYzE,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU,KAAM,SAAQ,cAAc;IACpC,UAAU,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,IAAI,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IACvC,IAAI,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC3C;AACD,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAC3H,eAAwB,EAAE,cAAuB,EAAE,QAAwB,EAAE,gBAAgB,EAAE,IAAW,EAAE,QAAc,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,kDAyEnJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetBase.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/BottomSheetBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BottomSheetBase.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/BottomSheetBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqC/B,OAAO,KAAK,EAAE,cAAc,EAA2C,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAsB7G,eAAO,MAAM,eAAe,6FAgsB1B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
2
|
+
export declare const SheetKeyboardProvider: import("react").Provider<SharedValue<number> | null>;
|
|
3
|
+
/** The sheet's keyboard height, or a constant 0 outside a sheet. */
|
|
4
|
+
export declare function useSheetKeyboardHeight(): SharedValue<number>;
|
|
5
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAe3E,eAAO,MAAM,qBAAqB,sDAAgC,CAAC;AAEnE,oEAAoE;AACpE,wBAAgB,sBAAsB,IAAI,WAAW,CAAC,MAAM,CAAC,CAG5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerPanelBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPanelBase.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAuB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAkEvE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,YAAiB,EACjB,aAAa,EACb,QAAQ,EACR,MAAM,EACN,IAAY,EACZ,QAAgB,EAChB,WAA2C,EAC3C,WAAwC,EACxC,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,OAAiC,EACjC,eAAe,EACf,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,gBAAwB,EACxB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ComposerPanelBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPanelBase.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAuB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAkEvE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,YAAiB,EACjB,aAAa,EACb,QAAQ,EACR,MAAM,EACN,IAAY,EACZ,QAAgB,EAChB,WAA2C,EAC3C,WAAwC,EACxC,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,OAAiC,EACjC,eAAe,EACf,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,gBAAwB,EACxB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,kBAAkB,2CAiNpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerPopover.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPopover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComposerPopover.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ComposerPopover.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAYpD,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,KAAK,EACL,IAAI,EACJ,UAAU,EACV,KAAK,EACL,MAAM,EACN,QAAQ,GACT,EAAE,oBAAoB,kDAgGtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelPickerBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ModelPickerBase.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAuC,gBAAgB,EAAuB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ModelPickerBase.d.ts","sourceRoot":"","sources":["../../../../src/composer-panel/ModelPickerBase.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAuC,gBAAgB,EAAuB,MAAM,SAAS,CAAC;AAyX1G;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,MAAM,EACN,aAA8B,EAC9B,cAAc,EACd,YAAyC,EACzC,MAAM,EAAE,cAAc,EACtB,KAAK,EACL,MAAM,GACP,EAAE,gBAAgB,2CAiUlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/context-menu/ContextMenu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAyC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/context-menu/ContextMenu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAW9D,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,gBAAgB,2CAqBvE;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,KAAK,EACL,MAAM,GACP,EAAE,uBAAuB,2CA6BzB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,KAAsB,EACtB,KAAK,GACN,EAAE,uBAAuB,2CAmBzB;AAID,eAAO,MAAM,eAAe,yDAAY,CAAC;AACzC,eAAO,MAAM,uBAAuB,iEAAoB,CAAC;AACzD,eAAO,MAAM,qBAAqB,gEAAkB,CAAC;AACrD,eAAO,MAAM,oBAAoB,8DAAiB,CAAC;AACnD,eAAO,MAAM,gBAAgB,2DAAa,CAAC;AAC3C,eAAO,MAAM,oBAAoB,4CAAiB,CAAC;AACnD,eAAO,MAAM,mBAAmB,8DAAgB,CAAC;AACjD,eAAO,MAAM,gBAAgB,2DAAa,CAAC;AAC3C,eAAO,MAAM,cAAc,yDAAW,CAAC;AACvC,eAAO,MAAM,qBAAqB,gEAAkB,CAAC;AACrD,eAAO,MAAM,qBAAqB,gEAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogBottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/dialog/DialogBottomSheet.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DialogBottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/dialog/DialogBottomSheet.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAsB,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,SAAS,EACT,OAAO,EACP,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,cAAyC,EACzC,UAAiB,EACjB,iBAAwB,EACxB,cAA+C,EAC/C,UAAU,EACV,KAAK,EACL,KAAK,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,KAAK,EACL,QAAQ,GACT,EAAE,sBAAsB,2CAgRxB;AAqBD;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,WAAW,EACT,SAAS,GACT,MAAM,GACN,WAAW,GACX,SAAS,GACT,QAAQ,GACR,OAAO,GACP,aAAa,GACb,SAAS,GACT,QAAQ,GACR,gBAAgB,GAChB,YAAY,GACZ,mBAAmB,GACnB,gBAAgB,GAChB,YAAY,GACZ,OAAO,GACP,OAAO,GACP,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,oBAAoB,GACpB,OAAO,GACP,UAAU,CACb,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A long-press target that never becomes the touch RESPONDER — native only,
|
|
3
|
+
* the trigger `ContextMenuTrigger` renders around content it does not own.
|
|
4
|
+
*
|
|
5
|
+
* ── WHY NOT A `Pressable` ───────────────────────────────────────────────────
|
|
6
|
+
*
|
|
7
|
+
* On Android the view holding the JS responder intercepts every later MOVE of
|
|
8
|
+
* that touch natively (`JSResponderHandler.onInterceptTouchEvent` returns true
|
|
9
|
+
* for the responder's own id). A `Pressable` claims the responder on touch
|
|
10
|
+
* start, so a horizontal `ScrollView` INSIDE it never sees the drag: a turn
|
|
11
|
+
* wrapped in the context menu's trigger could not scroll its code block
|
|
12
|
+
* sideways (Pixel 8a, Android 16; the same block scrolled without the wrapper).
|
|
13
|
+
* A vertical scroller ABOVE the trigger kept working, because a parent
|
|
14
|
+
* intercepts before its child — which is why only the inner one broke.
|
|
15
|
+
*
|
|
16
|
+
* So the hold is timed off the RAW touch events, which every ancestor receives
|
|
17
|
+
* without claiming anything: a scroller that takes the drag cancels the touch,
|
|
18
|
+
* and a finger that travels past the slop or lifts early cancels the timer.
|
|
19
|
+
* Taps keep going to whatever the content itself makes pressable.
|
|
20
|
+
*
|
|
21
|
+
* Assistive tech reaches the menu through the `longpress` accessibility action
|
|
22
|
+
* (TalkBack's double-tap-and-hold, VoiceOver's actions rotor).
|
|
23
|
+
*/
|
|
24
|
+
import React from 'react';
|
|
25
|
+
import type { TriggerHandleProps } from './types';
|
|
26
|
+
/** `Pressable`'s own default, so a context menu opens on the platform's usual hold. */
|
|
27
|
+
export declare const LONG_PRESS_MS = 500;
|
|
28
|
+
/** How far the finger may drift and still be holding, in dp (`Pressability`'s deactivation distance). */
|
|
29
|
+
export declare const LONG_PRESS_SLOP = 10;
|
|
30
|
+
export type LongPressAreaProps = Partial<TriggerHandleProps> & {
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
};
|
|
33
|
+
export declare function LongPressArea({ children, onLongPress, onPress: _onPress, disabled, accessibilityLabel, accessibilityRole, ...aria }: LongPressAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
//# sourceMappingURL=LongPressArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LongPressArea.d.ts","sourceRoot":"","sources":["../../../../src/floating/LongPressArea.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,uFAAuF;AACvF,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,yGAAyG;AACzG,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,GAAG;IAC7D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,WAAW,EAEX,OAAO,EAAE,QAAQ,EACjB,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,kBAAkB,2CA+DpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsModal.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/SettingsModal.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,kBAAkB,EAAqC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingsModal.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/SettingsModal.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,kBAAkB,EAAqC,MAAM,SAAS,CAAC;AAoFrF,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,IAAI,EAAE,cAAc,EACpB,OAAO,EACP,aAAa,EACb,MAAM,EACN,KAAK,EACL,IAAI,EAAE,cAAc,EACpB,WAAW,EACX,YAAY,EACZ,WAA0B,EAC1B,MAAM,EACN,MAAM,GACP,EAAE,kBAAkB,kDA4VpB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { type ScrollView } from 'react-native';
|
|
3
|
+
/** Clearance kept between the focused field and the keyboard's top, px. */
|
|
4
|
+
export declare const KEYBOARD_REVEAL_MARGIN = 16;
|
|
5
|
+
/**
|
|
6
|
+
* Keep a settings page's focused field above the software keyboard — native
|
|
7
|
+
* only; on web the browser scrolls a focused field into view itself.
|
|
8
|
+
*
|
|
9
|
+
* The settings modal draws edge to edge, so the keyboard slides OVER it rather
|
|
10
|
+
* than resizing it: a field low on a page (Personalization's last input, a
|
|
11
|
+
* Pixel 8a at Android 16) stayed behind the keyboard with nothing to scroll it
|
|
12
|
+
* out. This returns the keyboard's height for the page to pad its content by —
|
|
13
|
+
* so there is room to scroll — and, when the keyboard shows, scrolls the page
|
|
14
|
+
* by exactly what the focused field sits below the keyboard's top.
|
|
15
|
+
*
|
|
16
|
+
* `offset` is the page's current scroll offset (its scroll handler keeps it).
|
|
17
|
+
*/
|
|
18
|
+
export declare function useKeyboardReveal(scrollRef: RefObject<ScrollView | null>, offset: {
|
|
19
|
+
value: number;
|
|
20
|
+
}, enabled: boolean): number;
|
|
21
|
+
//# sourceMappingURL=use-keyboard-reveal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-keyboard-reveal.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/use-keyboard-reveal.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAqD,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAElG,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAIzC;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC,EACvC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EACzB,OAAO,EAAE,OAAO,GACf,MAAM,CAoCR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkE,MAAM,OAAO,CAAC;AA4CvF,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkE,MAAM,OAAO,CAAC;AA4CvF,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,SAAS,CAAC;AAquB5D,eAAO,MAAM,OAAO,0CAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarItem.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/SidebarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAYpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"SidebarItem.d.ts","sourceRoot":"","sources":["../../../../src/sidebar/SidebarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAYpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAoIhD,eAAO,MAAM,WAAW,8CAA6B,CAAC"}
|
package/package.json
CHANGED
|
@@ -537,6 +537,16 @@ const ScrollThread = forwardRef<AiChatThreadHandle, AiChatThreadProps>(function
|
|
|
537
537
|
const contentHeight = useRef(0);
|
|
538
538
|
const offset = useRef(0);
|
|
539
539
|
const viewport = useRef(0);
|
|
540
|
+
/**
|
|
541
|
+
* A scroll to the end is on its way and has not landed. `offset` is only
|
|
542
|
+
* what the LAST scroll event said, so two growths between a `scrollToEnd`
|
|
543
|
+
* and the event it causes measured the reader against the old offset, read
|
|
544
|
+
* them as far from the bottom and dropped the follow for good (Android,
|
|
545
|
+
* streaming). While this holds, growth follows whatever `offset` says; it
|
|
546
|
+
* clears when a scroll event lands at the end or moves UP — only a reader
|
|
547
|
+
* (or a host) scrolls up, the follow never does.
|
|
548
|
+
*/
|
|
549
|
+
const following = useRef(false);
|
|
540
550
|
/** An `onStartReached` is out and its page has not landed yet. */
|
|
541
551
|
const pageOut = useRef(false);
|
|
542
552
|
/** The reader has left the top zone, so the next approach may fire again. */
|
|
@@ -560,7 +570,10 @@ const ScrollThread = forwardRef<AiChatThreadHandle, AiChatThreadProps>(function
|
|
|
560
570
|
useImperativeHandle(
|
|
561
571
|
ref,
|
|
562
572
|
(): AiChatThreadHandle => ({
|
|
563
|
-
scrollToEnd: (options) =>
|
|
573
|
+
scrollToEnd: (options) => {
|
|
574
|
+
following.current = true;
|
|
575
|
+
scrollRef.current?.scrollToEnd({ animated: options?.animated ?? true });
|
|
576
|
+
},
|
|
564
577
|
scrollToOffset: ({ offset: y, animated = false }) => scrollRef.current?.scrollTo({ y, animated }),
|
|
565
578
|
getScrollView: () => scrollRef.current,
|
|
566
579
|
}),
|
|
@@ -577,9 +590,13 @@ const ScrollThread = forwardRef<AiChatThreadHandle, AiChatThreadProps>(function
|
|
|
577
590
|
const handleScroll = useCallback(
|
|
578
591
|
(event: NativeSyntheticEvent<NativeScrollEvent>) => {
|
|
579
592
|
const { contentOffset, layoutMeasurement, contentSize } = event.nativeEvent;
|
|
593
|
+
const movedUp = contentOffset.y < offset.current - 0.5;
|
|
580
594
|
offset.current = contentOffset.y;
|
|
581
595
|
viewport.current = layoutMeasurement.height;
|
|
582
596
|
if (contentSize?.height) contentHeight.current = contentSize.height;
|
|
597
|
+
if (movedUp || contentHeight.current - contentOffset.y - layoutMeasurement.height <= EDGE_THRESHOLD) {
|
|
598
|
+
following.current = false;
|
|
599
|
+
}
|
|
583
600
|
report();
|
|
584
601
|
if (onStartReached) {
|
|
585
602
|
if (contentOffset.y <= onStartReachedThreshold) {
|
|
@@ -624,7 +641,8 @@ const ScrollThread = forwardRef<AiChatThreadHandle, AiChatThreadProps>(function
|
|
|
624
641
|
const chromeShift = shift.top + shift.bottom;
|
|
625
642
|
if (chromeShift !== 0 && Math.abs(height - previous - chromeShift) < 1) {
|
|
626
643
|
const fromBottom = previous - offset.current - viewport.current;
|
|
627
|
-
if (fromBottom <= EDGE_THRESHOLD) {
|
|
644
|
+
if (following.current || fromBottom <= EDGE_THRESHOLD) {
|
|
645
|
+
following.current = true;
|
|
628
646
|
scrollRef.current?.scrollToEnd({ animated: false });
|
|
629
647
|
} else if (offset.current > 0 && shift.top !== 0) {
|
|
630
648
|
scrollRef.current?.scrollTo({ y: offset.current + shift.top, animated: false });
|
|
@@ -642,15 +660,23 @@ const ScrollThread = forwardRef<AiChatThreadHandle, AiChatThreadProps>(function
|
|
|
642
660
|
pageOut.current = false;
|
|
643
661
|
|
|
644
662
|
if (!autoFollow) return;
|
|
645
|
-
if (followThreshold !== undefined) {
|
|
663
|
+
if (followThreshold !== undefined && !following.current) {
|
|
646
664
|
// Measured against the height BEFORE the growth: was the reader near
|
|
647
665
|
// the bottom when this arrived?
|
|
648
666
|
const fromBottom = previous - offset.current - viewport.current;
|
|
649
|
-
if (fromBottom > followThreshold)
|
|
667
|
+
if (fromBottom > followThreshold) {
|
|
668
|
+
// Staying put moves no scroll, so a host tracking the distance to
|
|
669
|
+
// the end from `onScroll` (a jump-to-latest button) would not hear
|
|
670
|
+
// that the end moved away. Tell it, as `DocumentThread` does on every
|
|
671
|
+
// growth.
|
|
672
|
+
onScroll?.(syntheticScroll(offset.current, viewport.current, height));
|
|
673
|
+
return;
|
|
674
|
+
}
|
|
650
675
|
}
|
|
676
|
+
following.current = true;
|
|
651
677
|
scrollRef.current?.scrollToEnd({ animated: followAnimated });
|
|
652
678
|
},
|
|
653
|
-
[autoFollow, followAnimated, followThreshold, maintainStartPosition],
|
|
679
|
+
[autoFollow, followAnimated, followThreshold, maintainStartPosition, onScroll],
|
|
654
680
|
);
|
|
655
681
|
|
|
656
682
|
return (
|
|
@@ -682,6 +708,19 @@ const ScrollThread = forwardRef<AiChatThreadHandle, AiChatThreadProps>(function
|
|
|
682
708
|
);
|
|
683
709
|
});
|
|
684
710
|
|
|
711
|
+
/** A scroll event for a position that did not change while the content did. */
|
|
712
|
+
function syntheticScroll(offset: number, viewport: number, content: number): NativeSyntheticEvent<NativeScrollEvent> {
|
|
713
|
+
return {
|
|
714
|
+
nativeEvent: {
|
|
715
|
+
contentOffset: { x: 0, y: offset },
|
|
716
|
+
layoutMeasurement: { width: 0, height: viewport },
|
|
717
|
+
contentSize: { width: 0, height: content },
|
|
718
|
+
contentInset: { top: 0, left: 0, bottom: 0, right: 0 },
|
|
719
|
+
zoomScale: 1,
|
|
720
|
+
},
|
|
721
|
+
} as NativeSyntheticEvent<NativeScrollEvent>;
|
|
722
|
+
}
|
|
723
|
+
|
|
685
724
|
/** The window's scroll position and extent, px. */
|
|
686
725
|
function readWindow() {
|
|
687
726
|
const page = document.scrollingElement ?? document.documentElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
|
-
import { BackHandler, Platform, type View } from 'react-native';
|
|
2
|
+
import { BackHandler, Keyboard, Platform, type View } from 'react-native';
|
|
3
3
|
import { useAccessibilityFocus } from '../hooks/use-accessibility-focus';
|
|
4
4
|
import { listenForEscape, tabbablesWithin, wrapTab } from '../overlay/modal-keyboard';
|
|
5
5
|
import { hasActiveOverlays } from '../overlay/stack';
|
|
@@ -10,7 +10,11 @@ import { hasActiveOverlays } from '../overlay/stack';
|
|
|
10
10
|
*
|
|
11
11
|
* open Escape (web) and back (Android) close it
|
|
12
12
|
* modal it covers the workspace: focus moves in on open, Tab is kept
|
|
13
|
-
* inside, and focus goes back to the opener on close
|
|
13
|
+
* inside, and focus goes back to the opener on close (web); on
|
|
14
|
+
* native the keyboard goes down as it opens — a composer that had
|
|
15
|
+
* the focus (say, regained after a sheet closed) otherwise kept the
|
|
16
|
+
* keyboard up under the drawer (Android 16). Nothing refocuses the
|
|
17
|
+
* composer on close.
|
|
14
18
|
*
|
|
15
19
|
* Any portaled overlay above (a dialog, a menu) takes all of it first.
|
|
16
20
|
*/
|
|
@@ -22,6 +26,7 @@ export function usePanelInteraction(open: boolean, modal: boolean, close: () =>
|
|
|
22
26
|
useEffect(() => {
|
|
23
27
|
if (!open) return;
|
|
24
28
|
if (Platform.OS !== 'web') {
|
|
29
|
+
if (modal) Keyboard?.dismiss?.();
|
|
25
30
|
const subscription = BackHandler?.addEventListener('hardwareBackPress', () => {
|
|
26
31
|
if (hasActiveOverlays()) return false;
|
|
27
32
|
closeRef.current();
|
|
@@ -61,6 +61,9 @@ export function BottomBarBase({ Navigation, Item, Blur, items, value, onValueCha
|
|
|
61
61
|
const rowStyle = useAnimatedStyle(() => ({
|
|
62
62
|
height: interpolate(reducedMotion ? Number(progress.value > 0.01) : progress.value, [0, 1], [EXPANDED_HEIGHT, MINIMIZED_HEIGHT], 'clamp'),
|
|
63
63
|
}), [progress, reducedMotion]);
|
|
64
|
+
// Not `items.length` in the mapper: a worklet copies `items` whole to the UI
|
|
65
|
+
// runtime, icon elements and all (`worklet-captures.test.ts`).
|
|
66
|
+
const hasItems = items.length > 0;
|
|
64
67
|
const actionStyle = useAnimatedStyle(() => {
|
|
65
68
|
const amount = hideAction ? Math.min(1, Math.max(0, reducedMotion ? Number(progress.value > 0.01) : progress.value)) : 0;
|
|
66
69
|
return {
|
|
@@ -68,11 +71,11 @@ export function BottomBarBase({ Navigation, Item, Blur, items, value, onValueCha
|
|
|
68
71
|
// Logical, and the CSS name rather than RN's `marginStart`: reanimated's
|
|
69
72
|
// web writer hands a mapper's result to RNW's `createReactDOMStyle`,
|
|
70
73
|
// which never rewrites `marginStart`, so the browser would drop it.
|
|
71
|
-
marginInlineStart:
|
|
74
|
+
marginInlineStart: hasItems && !above ? 10 * (1 - amount) : 0,
|
|
72
75
|
opacity: 1 - amount,
|
|
73
76
|
transform: [{ scale: 1 - amount * 0.15 }],
|
|
74
77
|
};
|
|
75
|
-
}, [progress, hideAction, reducedMotion, actionWidth,
|
|
78
|
+
}, [progress, hideAction, reducedMotion, actionWidth, hasItems, above]);
|
|
76
79
|
if (keyboardVisible || (!items.length && !action)) return null;
|
|
77
80
|
return <View {...dirProps} testID={testID} pointerEvents="box-none" style={[{ height: bottom + footprint, justifyContent: 'flex-end' }, style]}>
|
|
78
81
|
{blur && material === 'translucent' && <Blur direction="bottom" style={{ position: 'absolute', left: 0, right: 0, bottom: 0, height: bottom + footprint + BLUR_BLEED }} />}
|
|
@@ -34,6 +34,7 @@ import { EDGE_GAP, windowEdgeGap } from '../layout/edge';
|
|
|
34
34
|
import { Backdrop, BACKDROP_DIM_OPACITY } from '../overlay';
|
|
35
35
|
import { ModalKeyboard } from '../overlay/ModalKeyboard';
|
|
36
36
|
import { useTheme } from '../theme/use-theme';
|
|
37
|
+
import { SheetKeyboardProvider } from './context';
|
|
37
38
|
import type { BottomSheetRef, BottomSheetProps, BottomSheetShellProps, BottomSheetBaseProps } from './types';
|
|
38
39
|
|
|
39
40
|
/** Hook that returns current screen dimensions and updates on rotation/resize. */
|
|
@@ -659,7 +660,9 @@ export const BottomSheetBase = forwardRef((props: BottomSheetBaseProps, ref: Rea
|
|
|
659
660
|
// (`layout/screen-scope.tsx`).
|
|
660
661
|
const surfaceChildren = (
|
|
661
662
|
<SurfaceLevelProvider level={0} fill={colors.background}>
|
|
662
|
-
<
|
|
663
|
+
<SheetKeyboardProvider value={keyboardHeight}>
|
|
664
|
+
<ScreenScope>{children}</ScreenScope>
|
|
665
|
+
</SheetKeyboardProvider>
|
|
663
666
|
</SurfaceLevelProvider>
|
|
664
667
|
);
|
|
665
668
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
import { useSharedValue, type SharedValue } from 'react-native-reanimated';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The open keyboard's height under a `BottomSheet`, for content that owns a
|
|
6
|
+
* bottom inset of its own. Native only: the sheet's shell writes it, web leaves
|
|
7
|
+
* it at 0 (the browser owns keyboard layout).
|
|
8
|
+
*
|
|
9
|
+
* `DialogBottomSheet` reads it to fold its safe-area spacer while the keyboard
|
|
10
|
+
* is up: the keyboard covers the gesture bar the spacer clears, so keeping it
|
|
11
|
+
* floated the sheet's buttons a bar's height above the keyboard (Android 16).
|
|
12
|
+
*
|
|
13
|
+
* Internal: not in the family barrel.
|
|
14
|
+
*/
|
|
15
|
+
const SheetKeyboardContext = createContext<SharedValue<number> | null>(null);
|
|
16
|
+
|
|
17
|
+
export const SheetKeyboardProvider = SheetKeyboardContext.Provider;
|
|
18
|
+
|
|
19
|
+
/** The sheet's keyboard height, or a constant 0 outside a sheet. */
|
|
20
|
+
export function useSheetKeyboardHeight(): SharedValue<number> {
|
|
21
|
+
const none = useSharedValue(0);
|
|
22
|
+
return useContext(SheetKeyboardContext) ?? none;
|
|
23
|
+
}
|