@gram-ai/elements 1.2.6 → 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.
- package/dist/elements.cjs +11 -11
- package/dist/elements.css +1 -1
- package/dist/elements.js +1089 -1051
- package/dist/{models-DBbuJvSc.js → models-cel0aeUV.js} +13 -13
- package/dist/server.cjs +33 -33
- package/dist/server.js +9676 -9661
- package/dist/types/index.d.ts +17 -4
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -38,8 +38,7 @@ export interface ElementsConfig {
|
|
|
38
38
|
/**
|
|
39
39
|
* Custom environment variable overrides for the Elements library.
|
|
40
40
|
* Will be used to override the environment variables for the MCP server.
|
|
41
|
-
*
|
|
42
|
-
* TODO: Not yet functional
|
|
41
|
+
* For more documentation on passing through different kinds of environment variables, including bearer tokens, see the [Gram documentation](https://www.speakeasy.com/docs/gram/host-mcp/public-private-servers#pass-through-authentication).
|
|
43
42
|
*/
|
|
44
43
|
environment?: Record<string, unknown>;
|
|
45
44
|
/**
|
|
@@ -148,6 +147,11 @@ export interface Suggestion {
|
|
|
148
147
|
label: string;
|
|
149
148
|
action: string;
|
|
150
149
|
}
|
|
150
|
+
type ModalDimension = {
|
|
151
|
+
width: number | `${number}%`;
|
|
152
|
+
height: number | `${number}%`;
|
|
153
|
+
maxHeight?: number | `${number}%`;
|
|
154
|
+
};
|
|
151
155
|
export interface ModalConfig {
|
|
152
156
|
/**
|
|
153
157
|
* Whether to open the modal window by default.
|
|
@@ -159,9 +163,16 @@ export interface ModalConfig {
|
|
|
159
163
|
*/
|
|
160
164
|
icon?: (state: 'open' | 'closed' | undefined) => ReactNode;
|
|
161
165
|
/**
|
|
162
|
-
*
|
|
166
|
+
* Whether the modal can be expanded to full screen.
|
|
167
|
+
*/
|
|
168
|
+
expandable?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* The dimensions for the modal window.
|
|
163
171
|
*/
|
|
164
|
-
|
|
172
|
+
dimensions?: {
|
|
173
|
+
default: ModalDimension;
|
|
174
|
+
expanded?: Pick<ModalDimension, 'width' | 'height'>;
|
|
175
|
+
};
|
|
165
176
|
}
|
|
166
177
|
export interface ComposerConfig {
|
|
167
178
|
/**
|
|
@@ -179,6 +190,8 @@ export type ElementsContextType = {
|
|
|
179
190
|
config: ElementsConfig;
|
|
180
191
|
setModel: (model: Model) => void;
|
|
181
192
|
model: Model;
|
|
193
|
+
isExpanded: boolean;
|
|
194
|
+
setIsExpanded: (isExpanded: boolean) => void;
|
|
182
195
|
};
|
|
183
196
|
declare const ContentSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
184
197
|
type: z.ZodLiteral<"text">;
|
package/package.json
CHANGED