@gram-ai/elements 1.4.0 → 1.5.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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { ElementsProvider as GramElementsProvider } from './contexts/ElementsProvider';
2
2
  export { useElements as useGramElements } from './contexts/ElementsProvider';
3
3
  export { Chat } from './components/Chat';
4
- export type { ElementsConfig, ComposerConfig, ModalConfig, ToolsConfig, ModelConfig, WelcomeConfig, Suggestion, } from './types';
4
+ export type { ElementsConfig, ComposerConfig, ModalConfig, ToolsConfig, ModelConfig, WelcomeConfig, Suggestion, Model, ModalTriggerPosition, } from './types';
@@ -152,11 +152,18 @@ type ModalDimension = {
152
152
  height: number | `${number}%`;
153
153
  maxHeight?: number | `${number}%`;
154
154
  };
155
+ export type ModalTriggerPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
155
156
  export interface ModalConfig {
156
157
  /**
157
158
  * Whether to open the modal window by default.
158
159
  */
159
160
  defaultOpen?: boolean;
161
+ /**
162
+ * The position of the modal trigger
163
+ *
164
+ * @default 'bottom-right'
165
+ */
166
+ position?: ModalTriggerPosition;
160
167
  /**
161
168
  * The icon to use for the modal window.
162
169
  * Receives the current state of the modal window.
@@ -170,7 +177,13 @@ export interface ModalConfig {
170
177
  * The dimensions for the modal window.
171
178
  */
172
179
  dimensions?: {
180
+ /**
181
+ * The default dimensions for the modal window.
182
+ */
173
183
  default: ModalDimension;
184
+ /**
185
+ * The expanded dimensions for the modal window.
186
+ */
174
187
  expanded?: Pick<ModalDimension, 'width' | 'height'>;
175
188
  };
176
189
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@gram-ai/elements",
3
3
  "description": "Gram Elements is a library of UI primitives for building chat-like experiences for MCP Servers.",
4
4
  "type": "module",
5
- "version": "1.4.0",
5
+ "version": "1.5.0",
6
6
  "main": "dist/index.js",
7
7
  "exports": {
8
8
  ".": {