@oxy.so/bloom 4.13.1 → 4.13.3
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/ai-chat.mdx +3 -3
- package/lib/commonjs/ai-chat/AiChat.js +5 -2
- package/lib/commonjs/ai-chat/AiChat.js.map +1 -1
- package/lib/commonjs/ai-chat/AiChat.web.js +8 -5
- package/lib/commonjs/ai-chat/AiChat.web.js.map +1 -1
- package/lib/commonjs/ai-chat/AiChatContainer.js +67 -38
- package/lib/commonjs/ai-chat/AiChatContainer.js.map +1 -1
- package/lib/commonjs/ai-chat/bindAiChat.js +12 -1
- package/lib/commonjs/ai-chat/bindAiChat.js.map +1 -1
- package/lib/commonjs/ai-chat/context.js.map +1 -1
- package/lib/commonjs/ai-chat/index.js +1 -1
- package/lib/commonjs/ai-chat/index.js.map +1 -1
- package/lib/commonjs/ai-chat/index.web.js +1 -1
- package/lib/commonjs/ai-chat/index.web.js.map +1 -1
- package/lib/commonjs/ai-chat/shared.js +12 -8
- package/lib/commonjs/ai-chat/shared.js.map +1 -1
- package/lib/module/ai-chat/AiChat.js +4 -1
- package/lib/module/ai-chat/AiChat.js.map +1 -1
- package/lib/module/ai-chat/AiChat.web.js +4 -1
- package/lib/module/ai-chat/AiChat.web.js.map +1 -1
- package/lib/module/ai-chat/AiChatContainer.js +68 -39
- package/lib/module/ai-chat/AiChatContainer.js.map +1 -1
- package/lib/module/ai-chat/bindAiChat.js +12 -1
- package/lib/module/ai-chat/bindAiChat.js.map +1 -1
- package/lib/module/ai-chat/context.js.map +1 -1
- package/lib/module/ai-chat/index.js +2 -2
- package/lib/module/ai-chat/index.js.map +1 -1
- package/lib/module/ai-chat/index.web.js +2 -2
- package/lib/module/ai-chat/index.web.js.map +1 -1
- package/lib/module/ai-chat/shared.js +11 -7
- package/lib/module/ai-chat/shared.js.map +1 -1
- package/lib/typescript/commonjs/ai-chat/AiChat.d.ts +4 -0
- package/lib/typescript/commonjs/ai-chat/AiChat.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/AiChat.web.d.ts +4 -0
- package/lib/typescript/commonjs/ai-chat/AiChat.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/AiChatContainer.d.ts +7 -5
- package/lib/typescript/commonjs/ai-chat/AiChatContainer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/bindAiChat.d.ts +5 -1
- package/lib/typescript/commonjs/ai-chat/bindAiChat.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/context.d.ts +6 -0
- package/lib/typescript/commonjs/ai-chat/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/index.d.ts +2 -2
- package/lib/typescript/commonjs/ai-chat/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/index.web.d.ts +2 -2
- package/lib/typescript/commonjs/ai-chat/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/ai-chat/shared.d.ts +9 -6
- package/lib/typescript/commonjs/ai-chat/shared.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/AiChat.d.ts +4 -0
- package/lib/typescript/module/ai-chat/AiChat.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/AiChat.web.d.ts +4 -0
- package/lib/typescript/module/ai-chat/AiChat.web.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/AiChatContainer.d.ts +7 -5
- package/lib/typescript/module/ai-chat/AiChatContainer.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/bindAiChat.d.ts +5 -1
- package/lib/typescript/module/ai-chat/bindAiChat.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/context.d.ts +6 -0
- package/lib/typescript/module/ai-chat/context.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/index.d.ts +2 -2
- package/lib/typescript/module/ai-chat/index.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/index.web.d.ts +2 -2
- package/lib/typescript/module/ai-chat/index.web.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/shared.d.ts +9 -6
- package/lib/typescript/module/ai-chat/shared.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ai-chat/AiChat.tsx +3 -1
- package/src/ai-chat/AiChat.web.tsx +3 -1
- package/src/ai-chat/AiChatContainer.tsx +63 -39
- package/src/ai-chat/bindAiChat.tsx +12 -1
- package/src/ai-chat/context.ts +6 -0
- package/src/ai-chat/index.ts +2 -1
- package/src/ai-chat/index.web.ts +2 -1
- package/src/ai-chat/shared.ts +11 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AiChatAssistantMessage, AiChatFeedbackRow, AiChatGalleryPanel, AiChatImageGeneration, } from './AiChat';
|
|
1
|
+
export { AiChatAssistantMessage, AiChatContainer, AiChatFeedbackRow, AiChatGalleryPanel, AiChatImageGeneration, } from './AiChat';
|
|
2
2
|
export { AiChatCodePanel } from './AiChatCodePanel';
|
|
3
|
-
export {
|
|
3
|
+
export { AiChatThread } from './AiChatContainer';
|
|
4
4
|
export { AiChatBullet, AiChatBulletList, AiChatLinkChip, AiChatMessageLine, AiChatStrong, AiChatUserMessage, } from './AiChatMessages';
|
|
5
5
|
export { AiChatMobileHeader, AiChatResizeHandle, AiChatShell } from './AiChatShell';
|
|
6
6
|
export { useAiChatChromeInsets, useAiChatShell } from './context';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,
|
|
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,GACtB,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,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,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,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,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AiChatAssistantMessage, AiChatFeedbackRow, AiChatGalleryPanel, AiChatImageGeneration, } from './AiChat.web';
|
|
1
|
+
export { AiChatAssistantMessage, AiChatContainer, AiChatFeedbackRow, AiChatGalleryPanel, AiChatImageGeneration, } from './AiChat.web';
|
|
2
2
|
export { AiChatCodePanel } from './AiChatCodePanel';
|
|
3
|
-
export {
|
|
3
|
+
export { AiChatThread } from './AiChatContainer';
|
|
4
4
|
export { AiChatBullet, AiChatBulletList, AiChatLinkChip, AiChatMessageLine, AiChatStrong, AiChatUserMessage, } from './AiChatMessages';
|
|
5
5
|
export { AiChatMobileHeader, AiChatResizeHandle, AiChatShell } from './AiChatShell';
|
|
6
6
|
export { useAiChatChromeInsets, useAiChatShell } from './context';
|
|
@@ -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,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,
|
|
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,GACtB,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,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,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,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,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
|
|
@@ -61,12 +61,17 @@ export declare const SHELL_GUTTER = 12;
|
|
|
61
61
|
* sticky box nowhere to move.
|
|
62
62
|
*/
|
|
63
63
|
export declare const DOCUMENT_RAIL: WebCssStyle;
|
|
64
|
+
/**
|
|
65
|
+
* `scroll="document"`: the card is a `ContentPanel`, and this is its radius.
|
|
66
|
+
*/
|
|
67
|
+
export declare const DOCUMENT_CARD_RADIUS: 28;
|
|
64
68
|
/**
|
|
65
69
|
* `scroll="document"`: a layer the size of the visible card that takes no room
|
|
66
70
|
* in the flow — pinned like the rail, then pulled back out of the layout by an
|
|
67
71
|
* equal negative margin, so what follows it starts where it does. The card's
|
|
68
|
-
*
|
|
69
|
-
*
|
|
72
|
+
* `background` slot is drawn on it: the card grows with the conversation, the
|
|
73
|
+
* layer stays the size of the screen — the same geometry as the panel's own
|
|
74
|
+
* sticky frame.
|
|
70
75
|
*/
|
|
71
76
|
export declare const DOCUMENT_LAYER: WebCssStyle;
|
|
72
77
|
/**
|
|
@@ -86,11 +91,9 @@ export declare function dataHook(name: string, value?: string): Record<string, u
|
|
|
86
91
|
* percentage transitioning 0% → 132% over 1550ms;
|
|
87
92
|
* - the resize grip's hover reveal;
|
|
88
93
|
* - the composer field's placeholder colour;
|
|
89
|
-
* -
|
|
90
|
-
* `clip-path` from `style`), and its thread out of the browser's scroll
|
|
91
|
-
* anchoring.
|
|
94
|
+
* - a document-scrolled thread out of the browser's scroll anchoring.
|
|
92
95
|
*/
|
|
93
|
-
export declare const AI_CHAT_WEB_CSS = "\n@property --bloom-ai-reveal {\n syntax: '<percentage>';\n inherits: false;\n initial-value: 0%;\n}\n[data-bloom-ai-chat-control] {\n outline: none;\n cursor: pointer;\n transition: background-color 150ms ease, color 150ms ease, opacity 150ms ease;\n}\n[data-bloom-ai-chat-control]:focus-visible {\n box-shadow: 0 0 0 2px var(--bloom-ai-chat-ring);\n}\n[data-bloom-ai-chat-control=\"inset\"]:focus-visible {\n box-shadow: inset 0 0 0 2px var(--bloom-ai-chat-ring);\n}\n[data-bloom-ai-chat-control=\"bare\"]:focus-visible {\n box-shadow: none;\n}\n[data-bloom-ai-chat-zoom] { outline: none; }\n[data-bloom-ai-chat-zoom=\"in\"] { cursor: zoom-in; }\n[data-bloom-ai-chat-zoom=\"out\"] { cursor: zoom-out; }\n[data-bloom-ai-chat-zoom]:focus-visible { box-shadow: inset 0 0 0 2px var(--bloom-ai-chat-ring); }\n[data-bloom-ai-chat-
|
|
96
|
+
export declare const AI_CHAT_WEB_CSS = "\n@property --bloom-ai-reveal {\n syntax: '<percentage>';\n inherits: false;\n initial-value: 0%;\n}\n[data-bloom-ai-chat-control] {\n outline: none;\n cursor: pointer;\n transition: background-color 150ms ease, color 150ms ease, opacity 150ms ease;\n}\n[data-bloom-ai-chat-control]:focus-visible {\n box-shadow: 0 0 0 2px var(--bloom-ai-chat-ring);\n}\n[data-bloom-ai-chat-control=\"inset\"]:focus-visible {\n box-shadow: inset 0 0 0 2px var(--bloom-ai-chat-ring);\n}\n[data-bloom-ai-chat-control=\"bare\"]:focus-visible {\n box-shadow: none;\n}\n[data-bloom-ai-chat-zoom] { outline: none; }\n[data-bloom-ai-chat-zoom=\"in\"] { cursor: zoom-in; }\n[data-bloom-ai-chat-zoom=\"out\"] { cursor: zoom-out; }\n[data-bloom-ai-chat-zoom]:focus-visible { box-shadow: inset 0 0 0 2px var(--bloom-ai-chat-ring); }\n[data-bloom-ai-chat-thread] { overflow-anchor: none; }\n[data-bloom-ai-chat-scroll=\"thin\"] { scrollbar-width: thin; }\n[data-bloom-ai-chat-scroll=\"none\"] { scrollbar-width: none; }\n[data-bloom-ai-chat-scroll=\"none\"]::-webkit-scrollbar { display: none; }\n[data-bloom-ai-chat-tile] [data-bloom-ai-chat-scrim] {\n opacity: 0;\n transition: opacity 200ms cubic-bezier(0, 0, 0.2, 1);\n}\n[data-bloom-ai-chat-tile]:hover [data-bloom-ai-chat-scrim] { opacity: 1; }\n[data-bloom-ai-chat-tile-image] {\n transition: transform 300ms cubic-bezier(0, 0, 0.2, 1);\n}\n[data-bloom-ai-chat-tile=\"lift\"]:hover [data-bloom-ai-chat-tile-image] { transform: scale(1.03); }\n@keyframes bloom-ai-flap-fall {\n from { transform: rotateX(0deg); filter: brightness(1); }\n to { transform: rotateX(-90deg); filter: brightness(0.86); }\n}\n@keyframes bloom-ai-flap-rise {\n 0% { transform: rotateX(90deg); filter: brightness(0.86); }\n 70% { transform: rotateX(-9deg); }\n 86% { transform: rotateX(4deg); }\n 100% { transform: rotateX(0deg); filter: brightness(1); }\n}\n[data-bloom-ai-chat-flap-card] { perspective: 70px; }\n[data-bloom-ai-chat-fade] { transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1); }\n[data-bloom-ai-chat-flap=\"fall\"] {\n transform-origin: bottom center;\n backface-visibility: hidden;\n animation: bloom-ai-flap-fall 150ms cubic-bezier(0.55, 0, 0.9, 0.35) forwards;\n}\n[data-bloom-ai-chat-flap=\"rise\"] {\n transform-origin: top center;\n backface-visibility: hidden;\n animation: bloom-ai-flap-rise 230ms cubic-bezier(0.25, 0.7, 0.35, 1) 150ms both;\n}\n[data-bloom-ai-chat-reveal] {\n --bloom-ai-reveal: 0%;\n opacity: 0;\n filter: blur(10px);\n -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 calc(var(--bloom-ai-reveal) - 26%), transparent var(--bloom-ai-reveal));\n mask-image: radial-gradient(circle at 50% 50%, #000 calc(var(--bloom-ai-reveal) - 26%), transparent var(--bloom-ai-reveal));\n transition: --bloom-ai-reveal 1550ms cubic-bezier(0.4, 0, 0.2, 1), opacity 1550ms cubic-bezier(0.4, 0, 0.2, 1), filter 1550ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n[data-bloom-ai-chat-reveal=\"shown\"] {\n --bloom-ai-reveal: 132%;\n opacity: 1;\n filter: blur(0px);\n}\n[data-bloom-ai-chat-grip] [data-bloom-ai-chat-grip-pill] {\n opacity: 0;\n transition: opacity 150ms ease;\n}\n[data-bloom-ai-chat-grip]:hover [data-bloom-ai-chat-grip-pill],\n[data-bloom-ai-chat-grip-pill=\"dragging\"] { opacity: 1; }\n[data-bloom-ai-chat-grip] { cursor: col-resize; touch-action: none; outline: none; }\n[data-bloom-ai-chat-dragging=\"on\"] { cursor: col-resize; user-select: none; }\n[data-bloom-ai-chat-chip] {\n display: inline-flex;\n max-width: calc(100% - 4px);\n box-sizing: border-box;\n align-items: center;\n justify-content: center;\n gap: 2px;\n vertical-align: middle;\n}\n[data-bloom-ai-chat-chip] > svg { flex-shrink: 0; }\n[data-bloom-ai-chat-chip] > [dir] { min-width: 0; overflow-wrap: anywhere; }\n@media (prefers-reduced-motion: reduce) {\n [data-bloom-ai-chat-control],\n [data-bloom-ai-chat-tile] [data-bloom-ai-chat-scrim],\n [data-bloom-ai-chat-tile-image],\n [data-bloom-ai-chat-grip] [data-bloom-ai-chat-grip-pill] { transition: none; }\n [data-bloom-ai-chat-flap] { animation-duration: 1ms; animation-delay: 0ms; }\n}\n";
|
|
94
97
|
/** Adopt the family sheet once (web; a no-op on native). */
|
|
95
98
|
export declare function useAiChatWebCss(): void;
|
|
96
99
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/shared.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/shared.ts"],"names":[],"mappings":"AAGA,OAAO,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eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,4CAA4C;AAC5C,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,sBAAsB;AACtB,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,0CAA0C;AAC1C,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B,2DAA2D;AAC3D,eAAO,MAAM,cAAc,6BAA8B,CAAC;AAE1D,eAAO,MAAM,MAAM,SAAwB,CAAC;AAE5C,0FAA0F;AAC1F,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,8DAA8D;AAC9D,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,WAM3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,IAAoB,CAAC;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,WAM5B,CAAC;AAMF;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E;AAID;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,ohIAkG3B,CAAC;AAEF,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,IAAI,CAItC"}
|
|
@@ -14,4 +14,8 @@ export declare const AiChatGalleryPanel: {
|
|
|
14
14
|
(props: import("./types").AiChatGalleryPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
displayName: string;
|
|
16
16
|
};
|
|
17
|
+
export declare const AiChatContainer: {
|
|
18
|
+
(props: import("./types").AiChatContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
17
21
|
//# sourceMappingURL=AiChat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiChat.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChat.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AiChat.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChat.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,iBAAiB;;;CAA0B,CAAC;AACzD,eAAO,MAAM,sBAAsB;;;CAA+B,CAAC;AACnE,eAAO,MAAM,qBAAqB;;;CAA8B,CAAC;AACjE,eAAO,MAAM,kBAAkB;;;CAA2B,CAAC;AAC3D,eAAO,MAAM,eAAe;;;CAAwB,CAAC"}
|
|
@@ -14,4 +14,8 @@ export declare const AiChatGalleryPanel: {
|
|
|
14
14
|
(props: import("./types").AiChatGalleryPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
displayName: string;
|
|
16
16
|
};
|
|
17
|
+
export declare const AiChatContainer: {
|
|
18
|
+
(props: import("./types").AiChatContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
17
21
|
//# sourceMappingURL=AiChat.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiChat.web.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChat.web.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AiChat.web.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChat.web.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,iBAAiB;;;CAA0B,CAAC;AACzD,eAAO,MAAM,sBAAsB;;;CAA+B,CAAC;AACnE,eAAO,MAAM,qBAAqB;;;CAA8B,CAAC;AACjE,eAAO,MAAM,kBAAkB;;;CAA2B,CAAC;AAC3D,eAAO,MAAM,eAAe;;;CAAwB,CAAC"}
|
|
@@ -33,13 +33,15 @@ import type { AiChatContainerProps, AiChatThreadHandle, AiChatThreadProps } from
|
|
|
33
33
|
* `AiChatThread` child through context (its content padding) and any other
|
|
34
34
|
* child through `useAiChatChromeInsets()`.
|
|
35
35
|
*
|
|
36
|
-
* Under a shell with `scroll="document"` the
|
|
36
|
+
* Under a shell with `scroll="document"` the card is a `ContentPanel` — the
|
|
37
|
+
* framed document surface, whose sticky mask and edge keep the card's corners
|
|
38
|
+
* and gutter at the screen's edges — and the chrome always floats, since the
|
|
37
39
|
* document is what moves: the header and the footer are `sticky` in the flow,
|
|
38
|
-
* pinned to the screen's top and bottom gutter, the `background` slot
|
|
39
|
-
*
|
|
40
|
-
*
|
|
40
|
+
* pinned to the screen's top and bottom gutter, the `background` slot is a
|
|
41
|
+
* layer the size of the screen, and the card grows with the conversation. At
|
|
42
|
+
* rest nothing overlaps, so the insets are zero.
|
|
41
43
|
*/
|
|
42
|
-
export declare function
|
|
44
|
+
export declare function AiChatContainerBase({ project, title, projectIcon, onProjectPress, onShare, onMore, actions, header, children, composer, working, workingLabel, background, surface, floatingChrome, labels, style, testID, }: AiChatContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
43
45
|
/**
|
|
44
46
|
* The thread: the scrolling conversation, anchored to the bottom
|
|
45
47
|
* so a short exchange sits just above the composer and grows upward — px 16 /
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiChatContainer.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChatContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAUN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AiChatContainer.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/AiChatContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAUN,MAAM,OAAO,CAAC;AA0Cf,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAqB3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,KAAK,EACL,WAA0B,EAC1B,cAAc,EACd,OAAO,EACP,MAAM,EACN,OAAO,EACP,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,OAAe,EACf,YAAY,EACZ,UAAU,EACV,OAAc,EACd,cAAsB,EACtB,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE,oBAAoB,2CAsHtB;AAwND;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,YAAY,8FAGvB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AiChatPlatform } from './context';
|
|
2
|
-
import type { AiChatAssistantMessageProps, AiChatFeedbackRowProps, AiChatGalleryPanelProps, AiChatImageGenerationProps } from './types';
|
|
2
|
+
import type { AiChatAssistantMessageProps, AiChatContainerProps, AiChatFeedbackRowProps, AiChatGalleryPanelProps, AiChatImageGenerationProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Binds the shared implementation to one platform's forked families. Called
|
|
5
5
|
* once at module scope by `AiChat.tsx` (native) and `AiChat.web.tsx` (web) —
|
|
@@ -22,5 +22,9 @@ export declare function bindAiChat(platform: AiChatPlatform): {
|
|
|
22
22
|
(props: AiChatGalleryPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
displayName: string;
|
|
24
24
|
};
|
|
25
|
+
AiChatContainer: {
|
|
26
|
+
(props: AiChatContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
25
29
|
};
|
|
26
30
|
//# sourceMappingURL=bindAiChat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindAiChat.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/bindAiChat.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bindAiChat.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/bindAiChat.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,cAAc;;gBACf,sBAAsB;;;;gBASjB,2BAA2B;;;;gBAS5B,0BAA0B;;;;gBAS7B,uBAAuB;;;;gBAS1B,oBAAoB;;;EAUrD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ComponentType, type ReactNode } from 'react';
|
|
2
|
+
import type { ContentPanelProps } from '../content-panel/types';
|
|
2
3
|
import type { TooltipSize } from '../tooltip/constants';
|
|
3
4
|
import type { BloomIconComponent } from '../icons/icon-component';
|
|
4
5
|
/**
|
|
@@ -24,6 +25,11 @@ export interface AiChatPlatform {
|
|
|
24
25
|
children: ReactNode;
|
|
25
26
|
size?: TooltipSize;
|
|
26
27
|
}>;
|
|
28
|
+
/**
|
|
29
|
+
* The framed document surface: a document-scrolled chat's card is one, so
|
|
30
|
+
* its gutter mask, corners and edge are the panel's own.
|
|
31
|
+
*/
|
|
32
|
+
ContentPanel: ComponentType<ContentPanelProps>;
|
|
27
33
|
}
|
|
28
34
|
export declare const AiChatPlatformContext: import("react").Context<AiChatPlatform | null>;
|
|
29
35
|
export declare function useAiChatPlatform(): AiChatPlatform;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,aAAa,CAAC;QACrB,QAAQ,EAAE,SAAS,CAAC;QACpB,QAAQ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Y,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACtD;AAED,eAAO,MAAM,2BAA2B,sDAAmD,CAAC;AAE5F;;;;;GAKG;AACH,wBAAgB,qBAAqB,IAAI,kBAAkB,GAAG,IAAI,CAEjE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AiChatAssistantMessage, AiChatFeedbackRow, AiChatGalleryPanel, AiChatImageGeneration, } from './AiChat';
|
|
1
|
+
export { AiChatAssistantMessage, AiChatContainer, AiChatFeedbackRow, AiChatGalleryPanel, AiChatImageGeneration, } from './AiChat';
|
|
2
2
|
export { AiChatCodePanel } from './AiChatCodePanel';
|
|
3
|
-
export {
|
|
3
|
+
export { AiChatThread } from './AiChatContainer';
|
|
4
4
|
export { AiChatBullet, AiChatBulletList, AiChatLinkChip, AiChatMessageLine, AiChatStrong, AiChatUserMessage, } from './AiChatMessages';
|
|
5
5
|
export { AiChatMobileHeader, AiChatResizeHandle, AiChatShell } from './AiChatShell';
|
|
6
6
|
export { useAiChatChromeInsets, useAiChatShell } from './context';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,
|
|
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,GACtB,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,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,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,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,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AiChatAssistantMessage, AiChatFeedbackRow, AiChatGalleryPanel, AiChatImageGeneration, } from './AiChat.web';
|
|
1
|
+
export { AiChatAssistantMessage, AiChatContainer, AiChatFeedbackRow, AiChatGalleryPanel, AiChatImageGeneration, } from './AiChat.web';
|
|
2
2
|
export { AiChatCodePanel } from './AiChatCodePanel';
|
|
3
|
-
export {
|
|
3
|
+
export { AiChatThread } from './AiChatContainer';
|
|
4
4
|
export { AiChatBullet, AiChatBulletList, AiChatLinkChip, AiChatMessageLine, AiChatStrong, AiChatUserMessage, } from './AiChatMessages';
|
|
5
5
|
export { AiChatMobileHeader, AiChatResizeHandle, AiChatShell } from './AiChatShell';
|
|
6
6
|
export { useAiChatChromeInsets, useAiChatShell } from './context';
|
|
@@ -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,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,
|
|
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,GACtB,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,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpF,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,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,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
|
|
@@ -61,12 +61,17 @@ export declare const SHELL_GUTTER = 12;
|
|
|
61
61
|
* sticky box nowhere to move.
|
|
62
62
|
*/
|
|
63
63
|
export declare const DOCUMENT_RAIL: WebCssStyle;
|
|
64
|
+
/**
|
|
65
|
+
* `scroll="document"`: the card is a `ContentPanel`, and this is its radius.
|
|
66
|
+
*/
|
|
67
|
+
export declare const DOCUMENT_CARD_RADIUS: 28;
|
|
64
68
|
/**
|
|
65
69
|
* `scroll="document"`: a layer the size of the visible card that takes no room
|
|
66
70
|
* in the flow — pinned like the rail, then pulled back out of the layout by an
|
|
67
71
|
* equal negative margin, so what follows it starts where it does. The card's
|
|
68
|
-
*
|
|
69
|
-
*
|
|
72
|
+
* `background` slot is drawn on it: the card grows with the conversation, the
|
|
73
|
+
* layer stays the size of the screen — the same geometry as the panel's own
|
|
74
|
+
* sticky frame.
|
|
70
75
|
*/
|
|
71
76
|
export declare const DOCUMENT_LAYER: WebCssStyle;
|
|
72
77
|
/**
|
|
@@ -86,11 +91,9 @@ export declare function dataHook(name: string, value?: string): Record<string, u
|
|
|
86
91
|
* percentage transitioning 0% → 132% over 1550ms;
|
|
87
92
|
* - the resize grip's hover reveal;
|
|
88
93
|
* - the composer field's placeholder colour;
|
|
89
|
-
* -
|
|
90
|
-
* `clip-path` from `style`), and its thread out of the browser's scroll
|
|
91
|
-
* anchoring.
|
|
94
|
+
* - a document-scrolled thread out of the browser's scroll anchoring.
|
|
92
95
|
*/
|
|
93
|
-
export declare const AI_CHAT_WEB_CSS = "\n@property --bloom-ai-reveal {\n syntax: '<percentage>';\n inherits: false;\n initial-value: 0%;\n}\n[data-bloom-ai-chat-control] {\n outline: none;\n cursor: pointer;\n transition: background-color 150ms ease, color 150ms ease, opacity 150ms ease;\n}\n[data-bloom-ai-chat-control]:focus-visible {\n box-shadow: 0 0 0 2px var(--bloom-ai-chat-ring);\n}\n[data-bloom-ai-chat-control=\"inset\"]:focus-visible {\n box-shadow: inset 0 0 0 2px var(--bloom-ai-chat-ring);\n}\n[data-bloom-ai-chat-control=\"bare\"]:focus-visible {\n box-shadow: none;\n}\n[data-bloom-ai-chat-zoom] { outline: none; }\n[data-bloom-ai-chat-zoom=\"in\"] { cursor: zoom-in; }\n[data-bloom-ai-chat-zoom=\"out\"] { cursor: zoom-out; }\n[data-bloom-ai-chat-zoom]:focus-visible { box-shadow: inset 0 0 0 2px var(--bloom-ai-chat-ring); }\n[data-bloom-ai-chat-
|
|
96
|
+
export declare const AI_CHAT_WEB_CSS = "\n@property --bloom-ai-reveal {\n syntax: '<percentage>';\n inherits: false;\n initial-value: 0%;\n}\n[data-bloom-ai-chat-control] {\n outline: none;\n cursor: pointer;\n transition: background-color 150ms ease, color 150ms ease, opacity 150ms ease;\n}\n[data-bloom-ai-chat-control]:focus-visible {\n box-shadow: 0 0 0 2px var(--bloom-ai-chat-ring);\n}\n[data-bloom-ai-chat-control=\"inset\"]:focus-visible {\n box-shadow: inset 0 0 0 2px var(--bloom-ai-chat-ring);\n}\n[data-bloom-ai-chat-control=\"bare\"]:focus-visible {\n box-shadow: none;\n}\n[data-bloom-ai-chat-zoom] { outline: none; }\n[data-bloom-ai-chat-zoom=\"in\"] { cursor: zoom-in; }\n[data-bloom-ai-chat-zoom=\"out\"] { cursor: zoom-out; }\n[data-bloom-ai-chat-zoom]:focus-visible { box-shadow: inset 0 0 0 2px var(--bloom-ai-chat-ring); }\n[data-bloom-ai-chat-thread] { overflow-anchor: none; }\n[data-bloom-ai-chat-scroll=\"thin\"] { scrollbar-width: thin; }\n[data-bloom-ai-chat-scroll=\"none\"] { scrollbar-width: none; }\n[data-bloom-ai-chat-scroll=\"none\"]::-webkit-scrollbar { display: none; }\n[data-bloom-ai-chat-tile] [data-bloom-ai-chat-scrim] {\n opacity: 0;\n transition: opacity 200ms cubic-bezier(0, 0, 0.2, 1);\n}\n[data-bloom-ai-chat-tile]:hover [data-bloom-ai-chat-scrim] { opacity: 1; }\n[data-bloom-ai-chat-tile-image] {\n transition: transform 300ms cubic-bezier(0, 0, 0.2, 1);\n}\n[data-bloom-ai-chat-tile=\"lift\"]:hover [data-bloom-ai-chat-tile-image] { transform: scale(1.03); }\n@keyframes bloom-ai-flap-fall {\n from { transform: rotateX(0deg); filter: brightness(1); }\n to { transform: rotateX(-90deg); filter: brightness(0.86); }\n}\n@keyframes bloom-ai-flap-rise {\n 0% { transform: rotateX(90deg); filter: brightness(0.86); }\n 70% { transform: rotateX(-9deg); }\n 86% { transform: rotateX(4deg); }\n 100% { transform: rotateX(0deg); filter: brightness(1); }\n}\n[data-bloom-ai-chat-flap-card] { perspective: 70px; }\n[data-bloom-ai-chat-fade] { transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1); }\n[data-bloom-ai-chat-flap=\"fall\"] {\n transform-origin: bottom center;\n backface-visibility: hidden;\n animation: bloom-ai-flap-fall 150ms cubic-bezier(0.55, 0, 0.9, 0.35) forwards;\n}\n[data-bloom-ai-chat-flap=\"rise\"] {\n transform-origin: top center;\n backface-visibility: hidden;\n animation: bloom-ai-flap-rise 230ms cubic-bezier(0.25, 0.7, 0.35, 1) 150ms both;\n}\n[data-bloom-ai-chat-reveal] {\n --bloom-ai-reveal: 0%;\n opacity: 0;\n filter: blur(10px);\n -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 calc(var(--bloom-ai-reveal) - 26%), transparent var(--bloom-ai-reveal));\n mask-image: radial-gradient(circle at 50% 50%, #000 calc(var(--bloom-ai-reveal) - 26%), transparent var(--bloom-ai-reveal));\n transition: --bloom-ai-reveal 1550ms cubic-bezier(0.4, 0, 0.2, 1), opacity 1550ms cubic-bezier(0.4, 0, 0.2, 1), filter 1550ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n[data-bloom-ai-chat-reveal=\"shown\"] {\n --bloom-ai-reveal: 132%;\n opacity: 1;\n filter: blur(0px);\n}\n[data-bloom-ai-chat-grip] [data-bloom-ai-chat-grip-pill] {\n opacity: 0;\n transition: opacity 150ms ease;\n}\n[data-bloom-ai-chat-grip]:hover [data-bloom-ai-chat-grip-pill],\n[data-bloom-ai-chat-grip-pill=\"dragging\"] { opacity: 1; }\n[data-bloom-ai-chat-grip] { cursor: col-resize; touch-action: none; outline: none; }\n[data-bloom-ai-chat-dragging=\"on\"] { cursor: col-resize; user-select: none; }\n[data-bloom-ai-chat-chip] {\n display: inline-flex;\n max-width: calc(100% - 4px);\n box-sizing: border-box;\n align-items: center;\n justify-content: center;\n gap: 2px;\n vertical-align: middle;\n}\n[data-bloom-ai-chat-chip] > svg { flex-shrink: 0; }\n[data-bloom-ai-chat-chip] > [dir] { min-width: 0; overflow-wrap: anywhere; }\n@media (prefers-reduced-motion: reduce) {\n [data-bloom-ai-chat-control],\n [data-bloom-ai-chat-tile] [data-bloom-ai-chat-scrim],\n [data-bloom-ai-chat-tile-image],\n [data-bloom-ai-chat-grip] [data-bloom-ai-chat-grip-pill] { transition: none; }\n [data-bloom-ai-chat-flap] { animation-duration: 1ms; animation-delay: 0ms; }\n}\n";
|
|
94
97
|
/** Adopt the family sheet once (web; a no-op on native). */
|
|
95
98
|
export declare function useAiChatWebCss(): void;
|
|
96
99
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/shared.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/ai-chat/shared.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,KAAK,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AC;AACjC,0CAA0C;AAC1C,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B,2DAA2D;AAC3D,eAAO,MAAM,cAAc,6BAA8B,CAAC;AAE1D,eAAO,MAAM,MAAM,SAAwB,CAAC;AAE5C,0FAA0F;AAC1F,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,8DAA8D;AAC9D,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,WAM3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,IAAoB,CAAC;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,WAM5B,CAAC;AAMF;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E;AAID;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,ohIAkG3B,CAAC;AAEF,4DAA4D;AAC5D,wBAAgB,eAAe,IAAI,IAAI,CAItC"}
|
package/package.json
CHANGED
package/src/ai-chat/AiChat.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ContentPanel } from '../content-panel';
|
|
1
2
|
import { Tooltip, TooltipTextBubble, TooltipTrigger } from '../tooltip';
|
|
2
3
|
import { bindAiChat } from './bindAiChat';
|
|
3
4
|
|
|
@@ -6,9 +7,10 @@ import { bindAiChat } from './bindAiChat';
|
|
|
6
7
|
* implementation is the shared `*Base` files; this only names the platform's
|
|
7
8
|
* forked family.
|
|
8
9
|
*/
|
|
9
|
-
const parts = bindAiChat({ Tooltip, TooltipTrigger, TooltipTextBubble });
|
|
10
|
+
const parts = bindAiChat({ Tooltip, TooltipTrigger, TooltipTextBubble, ContentPanel });
|
|
10
11
|
|
|
11
12
|
export const AiChatFeedbackRow = parts.AiChatFeedbackRow;
|
|
12
13
|
export const AiChatAssistantMessage = parts.AiChatAssistantMessage;
|
|
13
14
|
export const AiChatImageGeneration = parts.AiChatImageGeneration;
|
|
14
15
|
export const AiChatGalleryPanel = parts.AiChatGalleryPanel;
|
|
16
|
+
export const AiChatContainer = parts.AiChatContainer;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ContentPanel } from '../content-panel/index.web';
|
|
1
2
|
import { Tooltip, TooltipTextBubble, TooltipTrigger } from '../tooltip/index.web';
|
|
2
3
|
import { bindAiChat } from './bindAiChat';
|
|
3
4
|
|
|
@@ -6,9 +7,10 @@ import { bindAiChat } from './bindAiChat';
|
|
|
6
7
|
* `.web` path because a bundler resolving `package.json#exports` applies no
|
|
7
8
|
* platform extensions to relative specifiers.
|
|
8
9
|
*/
|
|
9
|
-
const parts = bindAiChat({ Tooltip, TooltipTrigger, TooltipTextBubble });
|
|
10
|
+
const parts = bindAiChat({ Tooltip, TooltipTrigger, TooltipTextBubble, ContentPanel });
|
|
10
11
|
|
|
11
12
|
export const AiChatFeedbackRow = parts.AiChatFeedbackRow;
|
|
12
13
|
export const AiChatAssistantMessage = parts.AiChatAssistantMessage;
|
|
13
14
|
export const AiChatImageGeneration = parts.AiChatImageGeneration;
|
|
14
15
|
export const AiChatGalleryPanel = parts.AiChatGalleryPanel;
|
|
16
|
+
export const AiChatContainer = parts.AiChatContainer;
|
|
@@ -33,6 +33,7 @@ import { GlyphAction } from './AiChatControls';
|
|
|
33
33
|
import {
|
|
34
34
|
AiChatDocumentGutterContext,
|
|
35
35
|
AiChatFloatingChromeContext,
|
|
36
|
+
useAiChatPlatform,
|
|
36
37
|
useAiChatShell,
|
|
37
38
|
type AiChatChromeInsets,
|
|
38
39
|
type AiChatFloatingChrome,
|
|
@@ -41,6 +42,7 @@ import {
|
|
|
41
42
|
import {
|
|
42
43
|
CONTAINER_RADIUS,
|
|
43
44
|
dataHook,
|
|
45
|
+
DOCUMENT_CARD_RADIUS,
|
|
44
46
|
DOCUMENT_LAYER,
|
|
45
47
|
IS_WEB,
|
|
46
48
|
SHELL_GUTTER,
|
|
@@ -102,13 +104,15 @@ const HIDDEN_FROM_A11Y = {
|
|
|
102
104
|
* `AiChatThread` child through context (its content padding) and any other
|
|
103
105
|
* child through `useAiChatChromeInsets()`.
|
|
104
106
|
*
|
|
105
|
-
* Under a shell with `scroll="document"` the
|
|
107
|
+
* Under a shell with `scroll="document"` the card is a `ContentPanel` — the
|
|
108
|
+
* framed document surface, whose sticky mask and edge keep the card's corners
|
|
109
|
+
* and gutter at the screen's edges — and the chrome always floats, since the
|
|
106
110
|
* document is what moves: the header and the footer are `sticky` in the flow,
|
|
107
|
-
* pinned to the screen's top and bottom gutter, the `background` slot
|
|
108
|
-
*
|
|
109
|
-
*
|
|
111
|
+
* pinned to the screen's top and bottom gutter, the `background` slot is a
|
|
112
|
+
* layer the size of the screen, and the card grows with the conversation. At
|
|
113
|
+
* rest nothing overlaps, so the insets are zero.
|
|
110
114
|
*/
|
|
111
|
-
export function
|
|
115
|
+
export function AiChatContainerBase({
|
|
112
116
|
project,
|
|
113
117
|
title,
|
|
114
118
|
projectIcon = RiFolderLine,
|
|
@@ -198,19 +202,8 @@ export function AiChatContainer({
|
|
|
198
202
|
<FloatingChrome
|
|
199
203
|
documentScroll
|
|
200
204
|
testID={testID}
|
|
201
|
-
rootStyle={
|
|
202
|
-
|
|
203
|
-
// Grows with the conversation, one screen at the least; nothing
|
|
204
|
-
// clips it, so the header and composer inside can stick.
|
|
205
|
-
minHeight: webViewportHeightMinus(SHELL_GUTTER * 2),
|
|
206
|
-
minWidth: 0,
|
|
207
|
-
flex: 1,
|
|
208
|
-
flexDirection: 'column',
|
|
209
|
-
borderRadius: CONTAINER_RADIUS,
|
|
210
|
-
backgroundColor: surface ? palette.secondary : 'transparent',
|
|
211
|
-
},
|
|
212
|
-
style,
|
|
213
|
-
]}
|
|
205
|
+
rootStyle={style}
|
|
206
|
+
surfaceColor={surface ? palette.secondary : null}
|
|
214
207
|
backgroundLayer={
|
|
215
208
|
background ? (
|
|
216
209
|
<View pointerEvents="none" style={[DOCUMENT_LAYER, { overflow: 'hidden' }]}>
|
|
@@ -269,7 +262,9 @@ interface FloatingChromeProps {
|
|
|
269
262
|
footerBody: ReactNode;
|
|
270
263
|
/** The opaque surface the header's edge fades to, or `null` for no fade. */
|
|
271
264
|
fadeColor: string | null;
|
|
272
|
-
/** `documentScroll`: the
|
|
265
|
+
/** `documentScroll`: the card's own surface, or `null` for none. */
|
|
266
|
+
surfaceColor?: string | null;
|
|
267
|
+
/** `documentScroll`: the gutter around the card, which the panel masks in. */
|
|
273
268
|
gutterColor?: string | null;
|
|
274
269
|
children: ReactNode;
|
|
275
270
|
}
|
|
@@ -296,6 +291,7 @@ function FloatingChrome({
|
|
|
296
291
|
crumbRow,
|
|
297
292
|
footerBody,
|
|
298
293
|
fadeColor,
|
|
294
|
+
surfaceColor = null,
|
|
299
295
|
gutterColor = null,
|
|
300
296
|
children,
|
|
301
297
|
}: FloatingChromeProps) {
|
|
@@ -371,9 +367,9 @@ function FloatingChrome({
|
|
|
371
367
|
// does is a line across the transcript again.
|
|
372
368
|
height: Math.round(headerHeight * (1 + SCRIM_TAIL_RATIO)),
|
|
373
369
|
// The card's own corners, since nothing clips a document card.
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
370
|
+
...(documentScroll
|
|
371
|
+
? { borderTopLeftRadius: DOCUMENT_CARD_RADIUS, borderTopRightRadius: DOCUMENT_CARD_RADIUS, overflow: 'hidden' as const }
|
|
372
|
+
: null),
|
|
377
373
|
},
|
|
378
374
|
topStyle,
|
|
379
375
|
]}>
|
|
@@ -407,27 +403,12 @@ function FloatingChrome({
|
|
|
407
403
|
|
|
408
404
|
if (documentScroll) {
|
|
409
405
|
return (
|
|
410
|
-
<
|
|
406
|
+
<DocumentCard testID={testID} style={rootStyle} surfaceColor={surfaceColor} gutterColor={gutterColor}>
|
|
411
407
|
{backgroundLayer}
|
|
412
|
-
{gutterColor ? (
|
|
413
|
-
// The card's frame, pinned to the screen: a ring of the gutter's
|
|
414
|
-
// colour painted over whatever of the conversation scrolls past the
|
|
415
|
-
// card's visible edge, so the card keeps its rounded corners and its
|
|
416
|
-
// gutter at the top and the bottom of the screen. Clipped to the
|
|
417
|
-
// gutter sideways (the family sheet), so it never reaches the columns
|
|
418
|
-
// beside the card.
|
|
419
|
-
<View
|
|
420
|
-
testID={`${prefix}-frame`}
|
|
421
|
-
pointerEvents="none"
|
|
422
|
-
{...HIDDEN_FROM_A11Y}
|
|
423
|
-
{...dataHook('bloomAiChatFrame')}
|
|
424
|
-
style={[DOCUMENT_LAYER, { zIndex: 1, boxShadow: `0 0 0 ${SHELL_GUTTER}px ${gutterColor}` }]}
|
|
425
|
-
/>
|
|
426
|
-
) : null}
|
|
427
408
|
{top}
|
|
428
409
|
{thread}
|
|
429
410
|
{bottom}
|
|
430
|
-
</
|
|
411
|
+
</DocumentCard>
|
|
431
412
|
);
|
|
432
413
|
}
|
|
433
414
|
|
|
@@ -441,6 +422,49 @@ function FloatingChrome({
|
|
|
441
422
|
);
|
|
442
423
|
}
|
|
443
424
|
|
|
425
|
+
/**
|
|
426
|
+
* A document-scrolled chat's card: a `ContentPanel`, framed at the shell's
|
|
427
|
+
* gutter. The panel's sticky overlays keep the card's rounded corners, its
|
|
428
|
+
* gutter (masked in the shell's colour) and its edge at the screen's edges
|
|
429
|
+
* while the conversation scrolls the document under them — the same surface a
|
|
430
|
+
* framed Oxy web page stands on.
|
|
431
|
+
*/
|
|
432
|
+
function DocumentCard({
|
|
433
|
+
testID,
|
|
434
|
+
style,
|
|
435
|
+
surfaceColor,
|
|
436
|
+
gutterColor,
|
|
437
|
+
children,
|
|
438
|
+
}: {
|
|
439
|
+
testID?: string;
|
|
440
|
+
style: StyleProp<ViewStyle>;
|
|
441
|
+
surfaceColor: string | null;
|
|
442
|
+
gutterColor: string | null;
|
|
443
|
+
children: ReactNode;
|
|
444
|
+
}) {
|
|
445
|
+
const { ContentPanel } = useAiChatPlatform();
|
|
446
|
+
return (
|
|
447
|
+
<ContentPanel
|
|
448
|
+
framed
|
|
449
|
+
// The AI Chat card has no edge of its own — the template's card is a
|
|
450
|
+
// surface on background-full, not a bordered, lifted panel. The panel
|
|
451
|
+
// still masks the gutter and rounds the corners.
|
|
452
|
+
chrome="none"
|
|
453
|
+
overlayInset={SHELL_GUTTER}
|
|
454
|
+
maskColor={gutterColor ?? undefined}
|
|
455
|
+
surfaceStyle={{ backgroundColor: surfaceColor ?? 'transparent' }}
|
|
456
|
+
surfaceColor={surfaceColor ?? undefined}
|
|
457
|
+
contentStyle={{ flexDirection: 'column' }}>
|
|
458
|
+
<View
|
|
459
|
+
testID={testID}
|
|
460
|
+
// One screen at the least, growing with the conversation.
|
|
461
|
+
style={[{ minHeight: webViewportHeightMinus(SHELL_GUTTER * 2), flexGrow: 1, flexDirection: 'column' }, style]}>
|
|
462
|
+
{children}
|
|
463
|
+
</View>
|
|
464
|
+
</ContentPanel>
|
|
465
|
+
);
|
|
466
|
+
}
|
|
467
|
+
|
|
444
468
|
/**
|
|
445
469
|
* The thread: the scrolling conversation, anchored to the bottom
|
|
446
470
|
* so a short exchange sits just above the composer and grows upward — px 16 /
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
import { AiChatContainerBase } from './AiChatContainer';
|
|
3
4
|
import { AiChatFeedbackRowBase } from './AiChatFeedbackRowBase';
|
|
4
5
|
import { AiChatGalleryPanelBase } from './AiChatGalleryPanelBase';
|
|
5
6
|
import { AiChatImageGenerationBase } from './AiChatImageGenerationBase';
|
|
@@ -7,6 +8,7 @@ import { AiChatAssistantMessageBase } from './AiChatMessages';
|
|
|
7
8
|
import { AiChatPlatformContext, type AiChatPlatform } from './context';
|
|
8
9
|
import type {
|
|
9
10
|
AiChatAssistantMessageProps,
|
|
11
|
+
AiChatContainerProps,
|
|
10
12
|
AiChatFeedbackRowProps,
|
|
11
13
|
AiChatGalleryPanelProps,
|
|
12
14
|
AiChatImageGenerationProps,
|
|
@@ -54,5 +56,14 @@ export function bindAiChat(platform: AiChatPlatform) {
|
|
|
54
56
|
}
|
|
55
57
|
AiChatGalleryPanel.displayName = 'AiChatGalleryPanel';
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
function AiChatContainer(props: AiChatContainerProps) {
|
|
60
|
+
return (
|
|
61
|
+
<AiChatPlatformContext.Provider value={platform}>
|
|
62
|
+
<AiChatContainerBase {...props} />
|
|
63
|
+
</AiChatPlatformContext.Provider>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
AiChatContainer.displayName = 'AiChatContainer';
|
|
67
|
+
|
|
68
|
+
return { AiChatFeedbackRow, AiChatAssistantMessage, AiChatImageGeneration, AiChatGalleryPanel, AiChatContainer };
|
|
58
69
|
}
|
package/src/ai-chat/context.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createContext, useContext, type ComponentType, type ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
+
import type { ContentPanelProps } from '../content-panel/types';
|
|
3
4
|
import type { TooltipSize } from '../tooltip/constants';
|
|
4
5
|
import type { BloomIconComponent } from '../icons/icon-component';
|
|
5
6
|
|
|
@@ -21,6 +22,11 @@ export interface AiChatPlatform {
|
|
|
21
22
|
}>;
|
|
22
23
|
TooltipTrigger: ComponentType<{ children: ReactNode }>;
|
|
23
24
|
TooltipTextBubble: ComponentType<{ children: ReactNode; size?: TooltipSize }>;
|
|
25
|
+
/**
|
|
26
|
+
* The framed document surface: a document-scrolled chat's card is one, so
|
|
27
|
+
* its gutter mask, corners and edge are the panel's own.
|
|
28
|
+
*/
|
|
29
|
+
ContentPanel: ComponentType<ContentPanelProps>;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
export const AiChatPlatformContext = createContext<AiChatPlatform | null>(null);
|
package/src/ai-chat/index.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export {
|
|
2
2
|
AiChatAssistantMessage,
|
|
3
|
+
AiChatContainer,
|
|
3
4
|
AiChatFeedbackRow,
|
|
4
5
|
AiChatGalleryPanel,
|
|
5
6
|
AiChatImageGeneration,
|
|
6
7
|
} from './AiChat';
|
|
7
8
|
export { AiChatCodePanel } from './AiChatCodePanel';
|
|
8
|
-
export {
|
|
9
|
+
export { AiChatThread } from './AiChatContainer';
|
|
9
10
|
export {
|
|
10
11
|
AiChatBullet,
|
|
11
12
|
AiChatBulletList,
|
package/src/ai-chat/index.web.ts
CHANGED
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
export {
|
|
7
7
|
AiChatAssistantMessage,
|
|
8
|
+
AiChatContainer,
|
|
8
9
|
AiChatFeedbackRow,
|
|
9
10
|
AiChatGalleryPanel,
|
|
10
11
|
AiChatImageGeneration,
|
|
11
12
|
} from './AiChat.web';
|
|
12
13
|
export { AiChatCodePanel } from './AiChatCodePanel';
|
|
13
|
-
export {
|
|
14
|
+
export { AiChatThread } from './AiChatContainer';
|
|
14
15
|
export {
|
|
15
16
|
AiChatBullet,
|
|
16
17
|
AiChatBulletList,
|