@gram-ai/elements 1.13.0 → 1.13.2
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/dist/elements.cjs +21 -21
- package/dist/elements.js +7398 -7542
- package/dist/index.d.ts +2 -3
- package/dist/types/index.d.ts +15 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { ElementsProvider as GramElementsProvider } from './contexts/ElementsProvider';
|
|
2
2
|
export { useElements as useGramElements } from './hooks/useElements';
|
|
3
3
|
export { Chat } from './components/Chat';
|
|
4
|
-
export {
|
|
5
|
-
export type {
|
|
6
|
-
export type { ElementsConfig, ComposerConfig, AttachmentsConfig, ModalConfig, SidecarConfig, ToolsConfig, ModelConfig, ThemeConfig, WelcomeConfig, Suggestion, Model, ModalTriggerPosition, ColorScheme, Radius, Density, Variant, } from './types';
|
|
4
|
+
export type { ElementsConfig, ComposerConfig, AttachmentsConfig, ModalConfig, SidecarConfig, ToolsConfig, ModelConfig, ThemeConfig, WelcomeConfig, Suggestion, Model, ModalTriggerPosition, ColorScheme, Radius, Density, Variant, Dimensions, Dimension, } from './types';
|
|
5
|
+
export type { Plugin } from './types/plugins';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -268,34 +268,36 @@ export interface Suggestion {
|
|
|
268
268
|
label: string;
|
|
269
269
|
action: string;
|
|
270
270
|
}
|
|
271
|
-
interface
|
|
272
|
-
default:
|
|
273
|
-
width: number | string;
|
|
274
|
-
height: number | string;
|
|
275
|
-
maxHeight?: number | string;
|
|
276
|
-
};
|
|
271
|
+
export interface Dimensions {
|
|
272
|
+
default: Dimension;
|
|
277
273
|
expanded?: {
|
|
278
274
|
width: number | string;
|
|
279
275
|
height: number | string;
|
|
280
276
|
};
|
|
281
277
|
}
|
|
282
|
-
interface
|
|
278
|
+
export interface Dimension {
|
|
279
|
+
width: number | string;
|
|
280
|
+
height: number | string;
|
|
281
|
+
maxHeight?: number | string;
|
|
282
|
+
}
|
|
283
|
+
export type ExpandedDimension = Omit<Dimension, 'maxHeight'>;
|
|
284
|
+
interface ExpandableConfig {
|
|
283
285
|
/**
|
|
284
|
-
* Whether the modal can be expanded
|
|
286
|
+
* Whether the modal or sidecar can be expanded
|
|
285
287
|
*/
|
|
286
288
|
expandable?: boolean;
|
|
287
289
|
/**
|
|
288
|
-
* Whether the modal should be expanded by default.
|
|
290
|
+
* Whether the modal or sidecar should be expanded by default.
|
|
289
291
|
* @default false
|
|
290
292
|
*/
|
|
291
293
|
defaultExpanded?: boolean;
|
|
292
294
|
/**
|
|
293
|
-
* The dimensions for the modal window.
|
|
295
|
+
* The dimensions for the modal or sidecar window.
|
|
294
296
|
*/
|
|
295
|
-
dimensions?:
|
|
297
|
+
dimensions?: Dimensions;
|
|
296
298
|
}
|
|
297
299
|
export type ModalTriggerPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
298
|
-
export interface ModalConfig extends
|
|
300
|
+
export interface ModalConfig extends ExpandableConfig {
|
|
299
301
|
/**
|
|
300
302
|
* Whether to open the modal window by default.
|
|
301
303
|
*/
|
|
@@ -355,7 +357,7 @@ export interface AttachmentsConfig {
|
|
|
355
357
|
*/
|
|
356
358
|
maxSize?: number;
|
|
357
359
|
}
|
|
358
|
-
export interface SidecarConfig extends
|
|
360
|
+
export interface SidecarConfig extends ExpandableConfig {
|
|
359
361
|
/**
|
|
360
362
|
* The title displayed in the sidecar header.
|
|
361
363
|
* @default 'Chat'
|
package/package.json
CHANGED