@oxy.so/bloom 5.1.1 → 5.2.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/app-shell.mdx +3 -1
- package/docs/chat-people.mdx +8 -0
- package/docs/settings-modal.mdx +15 -0
- package/lib/commonjs/ai-chat/AiChatResizeHandle.js +166 -0
- package/lib/commonjs/ai-chat/AiChatResizeHandle.js.map +1 -0
- package/lib/commonjs/ai-chat/AiChatShell.js +6 -154
- package/lib/commonjs/ai-chat/AiChatShell.js.map +1 -1
- package/lib/commonjs/ai-chat/index.js +2 -1
- package/lib/commonjs/ai-chat/index.js.map +1 -1
- package/lib/commonjs/ai-chat/index.web.js +2 -1
- package/lib/commonjs/ai-chat/index.web.js.map +1 -1
- package/lib/commonjs/ai-chat/messages.js +15 -30
- package/lib/commonjs/ai-chat/messages.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellSplit.js +2 -2
- package/lib/commonjs/app-shell/AppShellSplit.js.map +1 -1
- package/lib/commonjs/chat-people/contact-row.js +13 -0
- package/lib/commonjs/chat-people/contact-row.js.map +1 -0
- package/lib/commonjs/chat-screen/ChatSplitLayout.js +2 -2
- package/lib/commonjs/chat-screen/ChatSplitLayout.js.map +1 -1
- package/lib/commonjs/locale/common-messages.js +30 -15
- package/lib/commonjs/locale/common-messages.js.map +1 -1
- package/lib/commonjs/settings-modal/rows.js +37 -0
- package/lib/commonjs/settings-modal/rows.js.map +1 -0
- package/lib/module/ai-chat/AiChatResizeHandle.js +160 -0
- package/lib/module/ai-chat/AiChatResizeHandle.js.map +1 -0
- package/lib/module/ai-chat/AiChatShell.js +5 -152
- package/lib/module/ai-chat/AiChatShell.js.map +1 -1
- package/lib/module/ai-chat/index.js +2 -1
- package/lib/module/ai-chat/index.js.map +1 -1
- package/lib/module/ai-chat/index.web.js +2 -1
- package/lib/module/ai-chat/index.web.js.map +1 -1
- package/lib/module/ai-chat/messages.js +15 -30
- package/lib/module/ai-chat/messages.js.map +1 -1
- package/lib/module/app-shell/AppShellSplit.js +1 -1
- package/lib/module/app-shell/AppShellSplit.js.map +1 -1
- package/lib/module/chat-people/contact-row.js +10 -0
- package/lib/module/chat-people/contact-row.js.map +1 -0
- package/lib/module/chat-screen/ChatSplitLayout.js +1 -1
- package/lib/module/chat-screen/ChatSplitLayout.js.map +1 -1
- package/lib/module/locale/common-messages.js +30 -15
- package/lib/module/locale/common-messages.js.map +1 -1
- package/lib/module/settings-modal/rows.js +10 -0
- package/lib/module/settings-modal/rows.js.map +1 -0
- package/lib/typescript/commonjs/ai-chat/AiChatResizeHandle.d.ts +11 -0
- package/lib/typescript/commonjs/ai-chat/AiChatResizeHandle.d.ts.map +1 -0
- package/lib/typescript/commonjs/ai-chat/AiChatShell.d.ts +1 -10
- package/lib/typescript/commonjs/ai-chat/AiChatShell.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/index.d.ts +2 -1
- package/lib/typescript/commonjs/ai-chat/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/index.web.d.ts +2 -1
- package/lib/typescript/commonjs/ai-chat/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/messages.d.ts +0 -1
- package/lib/typescript/commonjs/ai-chat/messages.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-people/contact-row.d.ts +9 -0
- package/lib/typescript/commonjs/chat-people/contact-row.d.ts.map +1 -0
- package/lib/typescript/commonjs/locale/common-messages.d.ts +2 -0
- package/lib/typescript/commonjs/locale/common-messages.d.ts.map +1 -1
- package/lib/typescript/commonjs/settings-modal/rows.d.ts +9 -0
- package/lib/typescript/commonjs/settings-modal/rows.d.ts.map +1 -0
- package/lib/typescript/module/ai-chat/AiChatResizeHandle.d.ts +11 -0
- package/lib/typescript/module/ai-chat/AiChatResizeHandle.d.ts.map +1 -0
- package/lib/typescript/module/ai-chat/AiChatShell.d.ts +1 -10
- package/lib/typescript/module/ai-chat/AiChatShell.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/index.d.ts +2 -1
- package/lib/typescript/module/ai-chat/index.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/index.web.d.ts +2 -1
- package/lib/typescript/module/ai-chat/index.web.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/messages.d.ts +0 -1
- package/lib/typescript/module/ai-chat/messages.d.ts.map +1 -1
- package/lib/typescript/module/chat-people/contact-row.d.ts +9 -0
- package/lib/typescript/module/chat-people/contact-row.d.ts.map +1 -0
- package/lib/typescript/module/locale/common-messages.d.ts +2 -0
- package/lib/typescript/module/locale/common-messages.d.ts.map +1 -1
- package/lib/typescript/module/settings-modal/rows.d.ts +9 -0
- package/lib/typescript/module/settings-modal/rows.d.ts.map +1 -0
- package/package.json +35 -1
- package/src/ai-chat/AiChatResizeHandle.tsx +151 -0
- package/src/ai-chat/AiChatShell.tsx +8 -143
- package/src/ai-chat/index.ts +2 -1
- package/src/ai-chat/index.web.ts +2 -1
- package/src/ai-chat/messages.ts +0 -16
- package/src/app-shell/AppShellSplit.tsx +1 -1
- package/src/chat-people/contact-row.ts +8 -0
- package/src/chat-screen/ChatSplitLayout.tsx +1 -1
- package/src/locale/common-messages.ts +17 -0
- package/src/settings-modal/rows.ts +21 -0
- package/src/__tests__/support/adoption-matrix.ts +0 -708
- package/src/__tests__/support/card-surface.ts +0 -17
- package/src/__tests__/support/collision-fixture-barrel.ts +0 -20
- package/src/__tests__/support/commerce-harness.tsx +0 -97
- package/src/__tests__/support/composite.ts +0 -68
- package/src/__tests__/support/constructed-style-sheets.ts +0 -68
- package/src/__tests__/support/press-host.ts +0 -30
- package/src/__tests__/support/rendered-style.ts +0 -99
- package/src/__tests__/support/unread-hook-fixture.ts +0 -33
- package/src/__tests__/support/worklet-capture-fixture.tsx +0 -28
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +0 -9346
- package/src/theme/__tests__/__fixtures__/tonal-glass-primary-failures.json +0 -69
- package/src/theme/__tests__/fixtures/color-engine-golden.json +0 -1
|
@@ -2,7 +2,8 @@ export { AiChatAssistantMessage, AiChatContainer, AiChatFeedbackRow, AiChatGalle
|
|
|
2
2
|
export { AiChatCodePanel } from './AiChatCodePanel';
|
|
3
3
|
export { AiChatThread } from './AiChatContainer';
|
|
4
4
|
export { AiChatBullet, AiChatBulletList, AiChatLinkChip, AiChatMessageLine, AiChatStrong, } from './AiChatMessages';
|
|
5
|
-
export {
|
|
5
|
+
export { AiChatResizeHandle } from './AiChatResizeHandle';
|
|
6
|
+
export { AiChatMobileHeader, AiChatShell } from './AiChatShell';
|
|
6
7
|
export { useAiChatChromeInsets, useAiChatShell } from './context';
|
|
7
8
|
export type { AiChatChromeInsets, AiChatShellState } from './context';
|
|
8
9
|
export type { AiChatAssistantMessageProps, AiChatBulletListProps, AiChatBulletProps, AiChatChangedFile, AiChatCodePanelLabels, AiChatCodePanelProps, AiChatContainerLabels, AiChatContainerProps, AiChatCopyResult, AiChatFeedbackLabels, AiChatFeedbackRowProps, AiChatGalleryPanelLabels, AiChatGalleryPanelProps, AiChatGeneration, AiChatIconComponent, AiChatImageGenerationLabels, AiChatImageGenerationProps, AiChatLinkChipProps, AiChatMessageLineProps, AiChatMobileHeaderProps, AiChatPanelAction, AiChatPanelTab, AiChatResizeHandleProps, AiChatShellLabels, AiChatShellProps, AiChatStrongProps, AiChatThreadHandle, AiChatThreadProps, AiChatTurnAction, AiChatUserMessageProps, } from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.web.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.web.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACtE,YAAY,EACV,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB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AAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;QACvC,IAAI,EAAE,MAAM,CAAC;QACb,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,4BAA4B;IAC5B,YAAY,EAAE;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;QACpC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;QACrC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;KACtC,CAAC;IACF,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB;IACzB,SAAS,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,8CAA8C;IAC9C,KAAK,EAAE;QACL,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;QACxB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;QACrC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;KACvC,CAAC;IACF,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,cAAc,CAymB3D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight entry for a single person row (a suggestion, a search result)
|
|
3
|
+
* outside a contact list. Same `ContactRow` as `chat-people`, without linking
|
|
4
|
+
* the lists, the group form or the story viewer in Metro, which does not
|
|
5
|
+
* tree-shake barrel exports.
|
|
6
|
+
*/
|
|
7
|
+
export { ContactRow } from './ContactRow';
|
|
8
|
+
export type { ContactRowProps, ContactRowTrailing, PersonAvatarSource, PersonSummary } from './types';
|
|
9
|
+
//# sourceMappingURL=contact-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-row.d.ts","sourceRoot":"","sources":["../../../../src/chat-people/contact-row.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -47,6 +47,8 @@ export interface CommonMessages {
|
|
|
47
47
|
send: string;
|
|
48
48
|
clear: string;
|
|
49
49
|
seeAll: string;
|
|
50
|
+
/** The divider between two resizable panes (`AiChatResizeHandle`). */
|
|
51
|
+
resizePanels: string;
|
|
50
52
|
}
|
|
51
53
|
export declare const COMMON_MESSAGES: MessageCatalog<CommonMessages>;
|
|
52
54
|
/** The common words in the locale in effect (prop → `LocaleProvider` → runtime). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-messages.d.ts","sourceRoot":"","sources":["../../../../src/locale/common-messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,6FAA6F;IAC7F,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAChD;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IACrD,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"common-messages.d.ts","sourceRoot":"","sources":["../../../../src/locale/common-messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,6FAA6F;IAC7F,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,MAAM,EAAE,MA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
|
2
|
+
* Lightweight entry for settings rows drawn outside the dialog — a preference
|
|
3
|
+
* card on a screen or in a sheet. Same components as `settings-modal`, without
|
|
4
|
+
* linking `SettingsModal`, the storage/tools/plan pages or the date field's
|
|
5
|
+
* calendar in Metro, which does not tree-shake barrel exports.
|
|
6
|
+
*/
|
|
7
|
+
export { SettingsCard, SettingsRow, SettingsSection, SettingsSectionLabel, SettingsValueField, } from './SettingsRows';
|
|
8
|
+
export type { SettingsCardProps, SettingsIcon, SettingsRowProps, SettingsSectionLabelProps, SettingsSectionProps, SettingsValueFieldProps, } from './types';
|
|
9
|
+
//# sourceMappingURL=rows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/rows.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,YAAY,EACZ,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AiChatResizeHandleProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The resize grip (`DragHandle`): a 20px strip straddling the chat's right edge
|
|
4
|
+
* (10px past it). Hovering it reveals a 15×25 grip — radius 4, 1px
|
|
5
|
+
* border-button-default, background-primary, shadow-xs, three 1×13
|
|
6
|
+
* icon-quaternary lines 2 apart — that follows the pointer along the edge
|
|
7
|
+
* (kept 13px inside it) and stays up while dragging (150ms fade). Holding and
|
|
8
|
+
* dragging reports the horizontal distance from where the drag started.
|
|
9
|
+
*/
|
|
10
|
+
export declare function AiChatResizeHandle({ onResizeStart, onResize, onResizeEnd, label: labelProp, onNudge, style, testID, }: AiChatResizeHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=AiChatResizeHandle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiChatResizeHandle.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChatResizeHandle.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,aAAa,EACb,QAAQ,EACR,WAAW,EACX,KAAK,EAAE,SAAS,EAChB,OAAO,EACP,KAAK,EACL,MAAM,GACP,EAAE,uBAAuB,2CAsHzB"}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { type GestureResponderEvent } from 'react-native';
|
|
2
|
-
import type { AiChatMobileHeaderProps,
|
|
3
|
-
/**
|
|
4
|
-
* The resize grip (`DragHandle`): a 20px strip straddling the chat's right edge
|
|
5
|
-
* (10px past it). Hovering it reveals a 15×25 grip — radius 4, 1px
|
|
6
|
-
* border-button-default, background-primary, shadow-xs, three 1×13
|
|
7
|
-
* icon-quaternary lines 2 apart — that follows the pointer along the edge
|
|
8
|
-
* (kept 13px inside it) and stays up while dragging (150ms fade). Holding and
|
|
9
|
-
* dragging reports the horizontal distance from where the drag started.
|
|
10
|
-
*/
|
|
11
|
-
export declare function AiChatResizeHandle({ onResizeStart, onResize, onResizeEnd, label: labelProp, onNudge, style, testID, }: AiChatResizeHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
import type { AiChatMobileHeaderProps, AiChatShellProps } from './types';
|
|
12
3
|
/**
|
|
13
4
|
* The in-container header below `xl`: at least 48 tall, px 12 / pt 11. The menu
|
|
14
5
|
* button (below `lg`, where the sidebar is a drawer) and the chat's name in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiChatShell.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChatShell.tsx"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"AiChatShell.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChatShell.tsx"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,qBAAqB,EAG3B,MAAM,cAAc,CAAC;AA+BtB,OAAO,KAAK,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAsDzE;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,uBAAuB,kDAoCnF;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,YAAY,EACZ,gBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACb,QAAQ,EACR,KAAK,EACL,UAAU,EAAE,cAAc,EAC1B,SAAuB,EACvB,iBAAuB,EACvB,aAAmB,EACnB,aAAmB,EACnB,OAAO,EAAE,WAAW,EACpB,eAAe,EACf,eAAsB,EACtB,SAAS,EAAE,aAAa,EACxB,iBAAiB,EACjB,UAAU,EACV,OAAc,EACd,MAAoB,EACpB,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,gBAAgB,2CAmblB;AAED,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -2,7 +2,8 @@ export { AiChatAssistantMessage, AiChatContainer, AiChatFeedbackRow, AiChatGalle
|
|
|
2
2
|
export { AiChatCodePanel } from './AiChatCodePanel';
|
|
3
3
|
export { AiChatThread } from './AiChatContainer';
|
|
4
4
|
export { AiChatBullet, AiChatBulletList, AiChatLinkChip, AiChatMessageLine, AiChatStrong, } from './AiChatMessages';
|
|
5
|
-
export {
|
|
5
|
+
export { AiChatResizeHandle } from './AiChatResizeHandle';
|
|
6
|
+
export { AiChatMobileHeader, AiChatShell } from './AiChatShell';
|
|
6
7
|
export { useAiChatChromeInsets, useAiChatShell } from './context';
|
|
7
8
|
export type { AiChatChromeInsets, AiChatShellState } from './context';
|
|
8
9
|
export type { AiChatAssistantMessageProps, AiChatBulletListProps, AiChatBulletProps, AiChatChangedFile, AiChatCodePanelLabels, AiChatCodePanelProps, AiChatContainerLabels, AiChatContainerProps, AiChatCopyResult, AiChatFeedbackLabels, AiChatFeedbackRowProps, AiChatGalleryPanelLabels, AiChatGalleryPanelProps, AiChatGeneration, AiChatIconComponent, AiChatImageGenerationLabels, AiChatImageGenerationProps, AiChatLinkChipProps, AiChatMessageLineProps, AiChatMobileHeaderProps, AiChatPanelAction, AiChatPanelTab, AiChatResizeHandleProps, AiChatShellLabels, AiChatShellProps, AiChatStrongProps, AiChatThreadHandle, AiChatThreadProps, AiChatTurnAction, AiChatUserMessageProps, } from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACtE,YAAY,EACV,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
|
|
@@ -2,7 +2,8 @@ export { AiChatAssistantMessage, AiChatContainer, AiChatFeedbackRow, AiChatGalle
|
|
|
2
2
|
export { AiChatCodePanel } from './AiChatCodePanel';
|
|
3
3
|
export { AiChatThread } from './AiChatContainer';
|
|
4
4
|
export { AiChatBullet, AiChatBulletList, AiChatLinkChip, AiChatMessageLine, AiChatStrong, } from './AiChatMessages';
|
|
5
|
-
export {
|
|
5
|
+
export { AiChatResizeHandle } from './AiChatResizeHandle';
|
|
6
|
+
export { AiChatMobileHeader, AiChatShell } from './AiChatShell';
|
|
6
7
|
export { useAiChatChromeInsets, useAiChatShell } from './context';
|
|
7
8
|
export type { AiChatChromeInsets, AiChatShellState } from './context';
|
|
8
9
|
export type { AiChatAssistantMessageProps, AiChatBulletListProps, AiChatBulletProps, AiChatChangedFile, AiChatCodePanelLabels, AiChatCodePanelProps, AiChatContainerLabels, AiChatContainerProps, AiChatCopyResult, AiChatFeedbackLabels, AiChatFeedbackRowProps, AiChatGalleryPanelLabels, AiChatGalleryPanelProps, AiChatGeneration, AiChatIconComponent, AiChatImageGenerationLabels, AiChatImageGenerationProps, AiChatLinkChipProps, AiChatMessageLineProps, AiChatMobileHeaderProps, AiChatPanelAction, AiChatPanelTab, AiChatResizeHandleProps, AiChatShellLabels, AiChatShellProps, AiChatStrongProps, AiChatThreadHandle, AiChatThreadProps, AiChatTurnAction, AiChatUserMessageProps, } from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.web.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.web.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACtE,YAAY,EACV,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,gEAAgE;IAChE,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,gCAAgC;QAChC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AAE,MAAM,KAAK,MAAM,CAAC;QACrC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;KACtC,CAAC;IACF,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB;IACzB,SAAS,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,8CAA8C;IAC9C,KAAK,EAAE;QACL,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;QACxB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;QACrC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;KACvC,CAAC;IACF,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,cAAc,CAymB3D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight entry for a single person row (a suggestion, a search result)
|
|
3
|
+
* outside a contact list. Same `ContactRow` as `chat-people`, without linking
|
|
4
|
+
* the lists, the group form or the story viewer in Metro, which does not
|
|
5
|
+
* tree-shake barrel exports.
|
|
6
|
+
*/
|
|
7
|
+
export { ContactRow } from './ContactRow';
|
|
8
|
+
export type { ContactRowProps, ContactRowTrailing, PersonAvatarSource, PersonSummary } from './types';
|
|
9
|
+
//# sourceMappingURL=contact-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-row.d.ts","sourceRoot":"","sources":["../../../../src/chat-people/contact-row.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -47,6 +47,8 @@ export interface CommonMessages {
|
|
|
47
47
|
send: string;
|
|
48
48
|
clear: string;
|
|
49
49
|
seeAll: string;
|
|
50
|
+
/** The divider between two resizable panes (`AiChatResizeHandle`). */
|
|
51
|
+
resizePanels: string;
|
|
50
52
|
}
|
|
51
53
|
export declare const COMMON_MESSAGES: MessageCatalog<CommonMessages>;
|
|
52
54
|
/** The common words in the locale in effect (prop → `LocaleProvider` → runtime). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-messages.d.ts","sourceRoot":"","sources":["../../../../src/locale/common-messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,6FAA6F;IAC7F,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAChD;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IACrD,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,M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;IACrD,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,cAAc,CA+f1D,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,cAAc,CAEjE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight entry for settings rows drawn outside the dialog — a preference
|
|
3
|
+
* card on a screen or in a sheet. Same components as `settings-modal`, without
|
|
4
|
+
* linking `SettingsModal`, the storage/tools/plan pages or the date field's
|
|
5
|
+
* calendar in Metro, which does not tree-shake barrel exports.
|
|
6
|
+
*/
|
|
7
|
+
export { SettingsCard, SettingsRow, SettingsSection, SettingsSectionLabel, SettingsValueField, } from './SettingsRows';
|
|
8
|
+
export type { SettingsCardProps, SettingsIcon, SettingsRowProps, SettingsSectionLabelProps, SettingsSectionProps, SettingsValueFieldProps, } from './types';
|
|
9
|
+
//# sourceMappingURL=rows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/rows.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,YAAY,EACZ,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/bloom",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"packageManager": "bun@1.3.14",
|
|
5
5
|
"description": "Bloom UI — Oxy ecosystem component library for React Native + Expo + Web",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
@@ -769,6 +769,20 @@
|
|
|
769
769
|
"default": "./lib/commonjs/settings-modal/index.js"
|
|
770
770
|
}
|
|
771
771
|
},
|
|
772
|
+
"./settings-modal/rows": {
|
|
773
|
+
"react-native": {
|
|
774
|
+
"types": "./lib/typescript/module/settings-modal/rows.d.ts",
|
|
775
|
+
"default": "./src/settings-modal/rows.ts"
|
|
776
|
+
},
|
|
777
|
+
"import": {
|
|
778
|
+
"types": "./lib/typescript/module/settings-modal/rows.d.ts",
|
|
779
|
+
"default": "./lib/module/settings-modal/rows.js"
|
|
780
|
+
},
|
|
781
|
+
"require": {
|
|
782
|
+
"types": "./lib/typescript/commonjs/settings-modal/rows.d.ts",
|
|
783
|
+
"default": "./lib/commonjs/settings-modal/rows.js"
|
|
784
|
+
}
|
|
785
|
+
},
|
|
772
786
|
"./auth-card": {
|
|
773
787
|
"react-native": {
|
|
774
788
|
"types": "./lib/typescript/module/auth-card/index.d.ts",
|
|
@@ -1966,6 +1980,20 @@
|
|
|
1966
1980
|
"default": "./lib/commonjs/chat-people/index.js"
|
|
1967
1981
|
}
|
|
1968
1982
|
},
|
|
1983
|
+
"./chat-people/contact-row": {
|
|
1984
|
+
"react-native": {
|
|
1985
|
+
"types": "./lib/typescript/module/chat-people/contact-row.d.ts",
|
|
1986
|
+
"default": "./src/chat-people/contact-row.ts"
|
|
1987
|
+
},
|
|
1988
|
+
"import": {
|
|
1989
|
+
"types": "./lib/typescript/module/chat-people/contact-row.d.ts",
|
|
1990
|
+
"default": "./lib/module/chat-people/contact-row.js"
|
|
1991
|
+
},
|
|
1992
|
+
"require": {
|
|
1993
|
+
"types": "./lib/typescript/commonjs/chat-people/contact-row.d.ts",
|
|
1994
|
+
"default": "./lib/commonjs/chat-people/contact-row.js"
|
|
1995
|
+
}
|
|
1996
|
+
},
|
|
1969
1997
|
"./chat-screen": {
|
|
1970
1998
|
"react-native": {
|
|
1971
1999
|
"types": "./lib/typescript/module/chat-screen/index.d.ts",
|
|
@@ -3659,6 +3687,9 @@
|
|
|
3659
3687
|
"settings-modal": [
|
|
3660
3688
|
"./lib/typescript/module/settings-modal/index.d.ts"
|
|
3661
3689
|
],
|
|
3690
|
+
"settings-modal/rows": [
|
|
3691
|
+
"./lib/typescript/module/settings-modal/rows.d.ts"
|
|
3692
|
+
],
|
|
3662
3693
|
"auth-card": [
|
|
3663
3694
|
"./lib/typescript/module/auth-card/index.d.ts"
|
|
3664
3695
|
],
|
|
@@ -3893,6 +3924,9 @@
|
|
|
3893
3924
|
"chat-people": [
|
|
3894
3925
|
"./lib/typescript/module/chat-people/index.d.ts"
|
|
3895
3926
|
],
|
|
3927
|
+
"chat-people/contact-row": [
|
|
3928
|
+
"./lib/typescript/module/chat-people/contact-row.d.ts"
|
|
3929
|
+
],
|
|
3896
3930
|
"chat-screen": [
|
|
3897
3931
|
"./lib/typescript/module/chat-screen/index.d.ts"
|
|
3898
3932
|
],
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The divider grip between two resizable panes. Its own module because three
|
|
3
|
+
* families draw it — `AiChatShell`, `AppShell`'s `split` variant and
|
|
4
|
+
* `ChatSplitLayout` — and the two that are not the AI chat must not link the
|
|
5
|
+
* chat shell (Metro does not tree-shake): importing it from `AiChatShell` put
|
|
6
|
+
* that module, its reanimated drawers and the whole ai-chat message catalog in
|
|
7
|
+
* every app that renders an `AppShell`.
|
|
8
|
+
*/
|
|
9
|
+
import React, { useMemo, useRef, useState } from 'react';
|
|
10
|
+
import { PanResponder, View, type LayoutChangeEvent, type PointerEvent } from 'react-native';
|
|
11
|
+
|
|
12
|
+
import { useCommonMessages } from '../locale/common-messages';
|
|
13
|
+
import type { WebCssStyle } from '../styles/web-view-style';
|
|
14
|
+
import { dataHook, IS_WEB, useAiChatPalette, useAiChatWebCss } from './shared';
|
|
15
|
+
import type { AiChatResizeHandleProps } from './types';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The resize grip (`DragHandle`): a 20px strip straddling the chat's right edge
|
|
19
|
+
* (10px past it). Hovering it reveals a 15×25 grip — radius 4, 1px
|
|
20
|
+
* border-button-default, background-primary, shadow-xs, three 1×13
|
|
21
|
+
* icon-quaternary lines 2 apart — that follows the pointer along the edge
|
|
22
|
+
* (kept 13px inside it) and stays up while dragging (150ms fade). Holding and
|
|
23
|
+
* dragging reports the horizontal distance from where the drag started.
|
|
24
|
+
*/
|
|
25
|
+
export function AiChatResizeHandle({
|
|
26
|
+
onResizeStart,
|
|
27
|
+
onResize,
|
|
28
|
+
onResizeEnd,
|
|
29
|
+
label: labelProp,
|
|
30
|
+
onNudge,
|
|
31
|
+
style,
|
|
32
|
+
testID,
|
|
33
|
+
}: AiChatResizeHandleProps) {
|
|
34
|
+
useAiChatWebCss();
|
|
35
|
+
const palette = useAiChatPalette();
|
|
36
|
+
const common = useCommonMessages();
|
|
37
|
+
const label = labelProp ?? common.resizePanels;
|
|
38
|
+
const [gripY, setGripY] = useState<number | null>(null);
|
|
39
|
+
const [dragging, setDragging] = useState(false);
|
|
40
|
+
const height = useRef(0);
|
|
41
|
+
const startX = useRef(0);
|
|
42
|
+
const callbacks = useRef({ onResizeStart, onResize, onResizeEnd });
|
|
43
|
+
callbacks.current = { onResizeStart, onResize, onResizeEnd };
|
|
44
|
+
|
|
45
|
+
const track = (localY: number) => {
|
|
46
|
+
const h = height.current;
|
|
47
|
+
if (h > 0) setGripY(Math.min(h - 13, Math.max(13, localY)));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Native: a pan responder (web uses pointer capture below).
|
|
51
|
+
const responder = useMemo(
|
|
52
|
+
() =>
|
|
53
|
+
PanResponder.create({
|
|
54
|
+
onStartShouldSetPanResponder: () => true,
|
|
55
|
+
onMoveShouldSetPanResponder: () => true,
|
|
56
|
+
onPanResponderGrant: (event) => {
|
|
57
|
+
track(event.nativeEvent.locationY);
|
|
58
|
+
setDragging(true);
|
|
59
|
+
callbacks.current.onResizeStart?.();
|
|
60
|
+
},
|
|
61
|
+
onPanResponderMove: (_event, gesture) => callbacks.current.onResize(gesture.dx),
|
|
62
|
+
onPanResponderRelease: () => {
|
|
63
|
+
setDragging(false);
|
|
64
|
+
callbacks.current.onResizeEnd?.();
|
|
65
|
+
},
|
|
66
|
+
onPanResponderTerminate: () => {
|
|
67
|
+
setDragging(false);
|
|
68
|
+
callbacks.current.onResizeEnd?.();
|
|
69
|
+
},
|
|
70
|
+
}),
|
|
71
|
+
[],
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
type DomTarget = {
|
|
75
|
+
getBoundingClientRect: () => { top: number };
|
|
76
|
+
setPointerCapture: (id: number) => void;
|
|
77
|
+
hasPointerCapture: (id: number) => boolean;
|
|
78
|
+
};
|
|
79
|
+
const web = IS_WEB
|
|
80
|
+
? {
|
|
81
|
+
onPointerDown: (event: PointerEvent) => {
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
startX.current = event.nativeEvent.clientX;
|
|
84
|
+
setDragging(true);
|
|
85
|
+
callbacks.current.onResizeStart?.();
|
|
86
|
+
(event.currentTarget as unknown as DomTarget).setPointerCapture(event.nativeEvent.pointerId);
|
|
87
|
+
},
|
|
88
|
+
onPointerMove: (event: PointerEvent) => {
|
|
89
|
+
const target = event.currentTarget as unknown as DomTarget;
|
|
90
|
+
track(event.nativeEvent.clientY - target.getBoundingClientRect().top);
|
|
91
|
+
if (target.hasPointerCapture(event.nativeEvent.pointerId)) {
|
|
92
|
+
callbacks.current.onResize(event.nativeEvent.clientX - startX.current);
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
onPointerUp: () => {
|
|
96
|
+
setDragging(false);
|
|
97
|
+
callbacks.current.onResizeEnd?.();
|
|
98
|
+
},
|
|
99
|
+
onPointerCancel: () => {
|
|
100
|
+
setDragging(false);
|
|
101
|
+
callbacks.current.onResizeEnd?.();
|
|
102
|
+
},
|
|
103
|
+
onKeyDown: (event: { nativeEvent: { key: string } }) => {
|
|
104
|
+
if (event.nativeEvent.key === 'ArrowLeft') onNudge?.(-16);
|
|
105
|
+
if (event.nativeEvent.key === 'ArrowRight') onNudge?.(16);
|
|
106
|
+
},
|
|
107
|
+
tabIndex: onNudge ? (0 as const) : undefined,
|
|
108
|
+
}
|
|
109
|
+
: responder.panHandlers;
|
|
110
|
+
|
|
111
|
+
const grip: WebCssStyle = {
|
|
112
|
+
position: 'absolute',
|
|
113
|
+
...(gripY === null ? { top: '50%' } : { top: gripY }),
|
|
114
|
+
width: 15,
|
|
115
|
+
height: 25,
|
|
116
|
+
marginTop: -12.5,
|
|
117
|
+
flexDirection: 'row',
|
|
118
|
+
alignItems: 'center',
|
|
119
|
+
justifyContent: 'center',
|
|
120
|
+
gap: 2,
|
|
121
|
+
borderRadius: 4,
|
|
122
|
+
borderWidth: 1,
|
|
123
|
+
borderColor: palette.border,
|
|
124
|
+
backgroundColor: palette.primary,
|
|
125
|
+
boxShadow: palette.shadowXs,
|
|
126
|
+
...(IS_WEB ? null : { opacity: dragging ? 1 : 0 }),
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<View
|
|
131
|
+
{...dataHook('bloomAiChatGrip')}
|
|
132
|
+
{...web}
|
|
133
|
+
role="separator"
|
|
134
|
+
aria-orientation="vertical"
|
|
135
|
+
accessibilityLabel={label}
|
|
136
|
+
testID={testID}
|
|
137
|
+
onLayout={(event: LayoutChangeEvent) => {
|
|
138
|
+
height.current = event.nativeEvent.layout.height;
|
|
139
|
+
}}
|
|
140
|
+
style={[
|
|
141
|
+
{ position: 'absolute', top: 0, bottom: 0, right: -10, zIndex: 10, width: 20, alignItems: 'center' },
|
|
142
|
+
style,
|
|
143
|
+
]}>
|
|
144
|
+
<View {...dataHook('bloomAiChatGripPill', dragging ? 'dragging' : '')} pointerEvents="none" style={grip}>
|
|
145
|
+
{[0, 1, 2].map((line) => (
|
|
146
|
+
<View key={line} style={{ width: 1, height: 13, backgroundColor: palette.iconQuaternary }} />
|
|
147
|
+
))}
|
|
148
|
+
</View>
|
|
149
|
+
</View>
|
|
150
|
+
);
|
|
151
|
+
}
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
useWindowDimensions,
|
|
10
10
|
type GestureResponderEvent,
|
|
11
11
|
type LayoutChangeEvent,
|
|
12
|
-
type PointerEvent,
|
|
13
12
|
type ViewProps,
|
|
14
13
|
} from 'react-native';
|
|
15
14
|
import Animated, {
|
|
@@ -39,9 +38,11 @@ import {
|
|
|
39
38
|
useAiChatPalette,
|
|
40
39
|
useAiChatWebCss,
|
|
41
40
|
} from './shared';
|
|
41
|
+
import { useCommonMessages } from '../locale/common-messages';
|
|
42
42
|
import { useMessages } from '../locale/messages';
|
|
43
43
|
import { AI_CHAT_MESSAGES } from './messages';
|
|
44
|
-
import type { AiChatMobileHeaderProps,
|
|
44
|
+
import type { AiChatMobileHeaderProps, AiChatShellProps } from './types';
|
|
45
|
+
import { AiChatResizeHandle } from './AiChatResizeHandle';
|
|
45
46
|
import { clamp01 } from '../styles/clamp';
|
|
46
47
|
|
|
47
48
|
const REVEAL_EASE = Easing.bezier(0.42, 0, 0.58, 1);
|
|
@@ -90,146 +91,6 @@ const NAV_SETTLE_MIN_MS = 120;
|
|
|
90
91
|
|
|
91
92
|
|
|
92
93
|
|
|
93
|
-
// ---------------------------------------------------------------------------
|
|
94
|
-
// Resize handle
|
|
95
|
-
// ---------------------------------------------------------------------------
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* The resize grip (`DragHandle`): a 20px strip straddling the chat's right edge
|
|
99
|
-
* (10px past it). Hovering it reveals a 15×25 grip — radius 4, 1px
|
|
100
|
-
* border-button-default, background-primary, shadow-xs, three 1×13
|
|
101
|
-
* icon-quaternary lines 2 apart — that follows the pointer along the edge
|
|
102
|
-
* (kept 13px inside it) and stays up while dragging (150ms fade). Holding and
|
|
103
|
-
* dragging reports the horizontal distance from where the drag started.
|
|
104
|
-
*/
|
|
105
|
-
export function AiChatResizeHandle({
|
|
106
|
-
onResizeStart,
|
|
107
|
-
onResize,
|
|
108
|
-
onResizeEnd,
|
|
109
|
-
label: labelProp,
|
|
110
|
-
onNudge,
|
|
111
|
-
style,
|
|
112
|
-
testID,
|
|
113
|
-
}: AiChatResizeHandleProps) {
|
|
114
|
-
useAiChatWebCss();
|
|
115
|
-
const palette = useAiChatPalette();
|
|
116
|
-
const { messages } = useMessages(AI_CHAT_MESSAGES);
|
|
117
|
-
const label = labelProp ?? messages.shell.resize;
|
|
118
|
-
const [gripY, setGripY] = useState<number | null>(null);
|
|
119
|
-
const [dragging, setDragging] = useState(false);
|
|
120
|
-
const height = useRef(0);
|
|
121
|
-
const startX = useRef(0);
|
|
122
|
-
const callbacks = useRef({ onResizeStart, onResize, onResizeEnd });
|
|
123
|
-
callbacks.current = { onResizeStart, onResize, onResizeEnd };
|
|
124
|
-
|
|
125
|
-
const track = (localY: number) => {
|
|
126
|
-
const h = height.current;
|
|
127
|
-
if (h > 0) setGripY(Math.min(h - 13, Math.max(13, localY)));
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
// Native: a pan responder (web uses pointer capture below).
|
|
131
|
-
const responder = useMemo(
|
|
132
|
-
() =>
|
|
133
|
-
PanResponder.create({
|
|
134
|
-
onStartShouldSetPanResponder: () => true,
|
|
135
|
-
onMoveShouldSetPanResponder: () => true,
|
|
136
|
-
onPanResponderGrant: (event) => {
|
|
137
|
-
track(event.nativeEvent.locationY);
|
|
138
|
-
setDragging(true);
|
|
139
|
-
callbacks.current.onResizeStart?.();
|
|
140
|
-
},
|
|
141
|
-
onPanResponderMove: (_event, gesture) => callbacks.current.onResize(gesture.dx),
|
|
142
|
-
onPanResponderRelease: () => {
|
|
143
|
-
setDragging(false);
|
|
144
|
-
callbacks.current.onResizeEnd?.();
|
|
145
|
-
},
|
|
146
|
-
onPanResponderTerminate: () => {
|
|
147
|
-
setDragging(false);
|
|
148
|
-
callbacks.current.onResizeEnd?.();
|
|
149
|
-
},
|
|
150
|
-
}),
|
|
151
|
-
[],
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
type DomTarget = {
|
|
155
|
-
getBoundingClientRect: () => { top: number };
|
|
156
|
-
setPointerCapture: (id: number) => void;
|
|
157
|
-
hasPointerCapture: (id: number) => boolean;
|
|
158
|
-
};
|
|
159
|
-
const web = IS_WEB
|
|
160
|
-
? {
|
|
161
|
-
onPointerDown: (event: PointerEvent) => {
|
|
162
|
-
event.preventDefault();
|
|
163
|
-
startX.current = event.nativeEvent.clientX;
|
|
164
|
-
setDragging(true);
|
|
165
|
-
callbacks.current.onResizeStart?.();
|
|
166
|
-
(event.currentTarget as unknown as DomTarget).setPointerCapture(event.nativeEvent.pointerId);
|
|
167
|
-
},
|
|
168
|
-
onPointerMove: (event: PointerEvent) => {
|
|
169
|
-
const target = event.currentTarget as unknown as DomTarget;
|
|
170
|
-
track(event.nativeEvent.clientY - target.getBoundingClientRect().top);
|
|
171
|
-
if (target.hasPointerCapture(event.nativeEvent.pointerId)) {
|
|
172
|
-
callbacks.current.onResize(event.nativeEvent.clientX - startX.current);
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
onPointerUp: () => {
|
|
176
|
-
setDragging(false);
|
|
177
|
-
callbacks.current.onResizeEnd?.();
|
|
178
|
-
},
|
|
179
|
-
onPointerCancel: () => {
|
|
180
|
-
setDragging(false);
|
|
181
|
-
callbacks.current.onResizeEnd?.();
|
|
182
|
-
},
|
|
183
|
-
onKeyDown: (event: { nativeEvent: { key: string } }) => {
|
|
184
|
-
if (event.nativeEvent.key === 'ArrowLeft') onNudge?.(-16);
|
|
185
|
-
if (event.nativeEvent.key === 'ArrowRight') onNudge?.(16);
|
|
186
|
-
},
|
|
187
|
-
tabIndex: onNudge ? (0 as const) : undefined,
|
|
188
|
-
}
|
|
189
|
-
: responder.panHandlers;
|
|
190
|
-
|
|
191
|
-
const grip: WebCssStyle = {
|
|
192
|
-
position: 'absolute',
|
|
193
|
-
...(gripY === null ? { top: '50%' } : { top: gripY }),
|
|
194
|
-
width: 15,
|
|
195
|
-
height: 25,
|
|
196
|
-
marginTop: -12.5,
|
|
197
|
-
flexDirection: 'row',
|
|
198
|
-
alignItems: 'center',
|
|
199
|
-
justifyContent: 'center',
|
|
200
|
-
gap: 2,
|
|
201
|
-
borderRadius: 4,
|
|
202
|
-
borderWidth: 1,
|
|
203
|
-
borderColor: palette.border,
|
|
204
|
-
backgroundColor: palette.primary,
|
|
205
|
-
boxShadow: palette.shadowXs,
|
|
206
|
-
...(IS_WEB ? null : { opacity: dragging ? 1 : 0 }),
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
return (
|
|
210
|
-
<View
|
|
211
|
-
{...dataHook('bloomAiChatGrip')}
|
|
212
|
-
{...web}
|
|
213
|
-
role="separator"
|
|
214
|
-
aria-orientation="vertical"
|
|
215
|
-
accessibilityLabel={label}
|
|
216
|
-
testID={testID}
|
|
217
|
-
onLayout={(event: LayoutChangeEvent) => {
|
|
218
|
-
height.current = event.nativeEvent.layout.height;
|
|
219
|
-
}}
|
|
220
|
-
style={[
|
|
221
|
-
{ position: 'absolute', top: 0, bottom: 0, right: -10, zIndex: 10, width: 20, alignItems: 'center' },
|
|
222
|
-
style,
|
|
223
|
-
]}>
|
|
224
|
-
<View {...dataHook('bloomAiChatGripPill', dragging ? 'dragging' : '')} pointerEvents="none" style={grip}>
|
|
225
|
-
{[0, 1, 2].map((line) => (
|
|
226
|
-
<View key={line} style={{ width: 1, height: 13, backgroundColor: palette.iconQuaternary }} />
|
|
227
|
-
))}
|
|
228
|
-
</View>
|
|
229
|
-
</View>
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
94
|
// ---------------------------------------------------------------------------
|
|
234
95
|
// Mobile header
|
|
235
96
|
// ---------------------------------------------------------------------------
|
|
@@ -344,7 +205,11 @@ export function AiChatShell({
|
|
|
344
205
|
const reducedMotion = useReducedMotion();
|
|
345
206
|
const { messages } = useMessages(AI_CHAT_MESSAGES);
|
|
346
207
|
const panelLabel = panelLabelProp ?? messages.code;
|
|
347
|
-
const
|
|
208
|
+
const common = useCommonMessages();
|
|
209
|
+
const l = useMemo(
|
|
210
|
+
() => ({ ...messages.shell, resize: common.resizePanels, ...labels }),
|
|
211
|
+
[messages, common, labels],
|
|
212
|
+
);
|
|
348
213
|
const { width: windowWidth } = useWindowDimensions();
|
|
349
214
|
// Native has no document: `document` is `container` there.
|
|
350
215
|
const documentScroll = IS_WEB && scroll === 'document';
|