@gram-ai/elements 1.3.0 → 1.4.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.
@@ -147,6 +147,11 @@ export interface Suggestion {
147
147
  label: string;
148
148
  action: string;
149
149
  }
150
+ type ModalDimension = {
151
+ width: number | `${number}%`;
152
+ height: number | `${number}%`;
153
+ maxHeight?: number | `${number}%`;
154
+ };
150
155
  export interface ModalConfig {
151
156
  /**
152
157
  * Whether to open the modal window by default.
@@ -158,9 +163,16 @@ export interface ModalConfig {
158
163
  */
159
164
  icon?: (state: 'open' | 'closed' | undefined) => ReactNode;
160
165
  /**
161
- * A class name to apply to the modal window.
166
+ * Whether the modal can be expanded to full screen.
167
+ */
168
+ expandable?: boolean;
169
+ /**
170
+ * The dimensions for the modal window.
162
171
  */
163
- className?: string;
172
+ dimensions?: {
173
+ default: ModalDimension;
174
+ expanded?: Pick<ModalDimension, 'width' | 'height'>;
175
+ };
164
176
  }
165
177
  export interface ComposerConfig {
166
178
  /**
@@ -178,6 +190,8 @@ export type ElementsContextType = {
178
190
  config: ElementsConfig;
179
191
  setModel: (model: Model) => void;
180
192
  model: Model;
193
+ isExpanded: boolean;
194
+ setIsExpanded: (isExpanded: boolean) => void;
181
195
  };
182
196
  declare const ContentSchema: z.ZodUnion<readonly [z.ZodObject<{
183
197
  type: z.ZodLiteral<"text">;
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.3.0",
5
+ "version": "1.4.0",
6
6
  "main": "dist/index.js",
7
7
  "exports": {
8
8
  ".": {