@orangecatai/adgen-canvas 0.0.3 → 0.0.4

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.
Files changed (52) hide show
  1. package/dist/dev/{chunk-YOQUQ6O5.js → chunk-3FGOYDLK.js} +3 -3
  2. package/dist/dev/{chunk-EP27W34X.js → chunk-IRIUFXMO.js} +2 -2
  3. package/dist/dev/data/{image-IZS5VEYX.js → image-HH4XNQRO.js} +3 -3
  4. package/dist/dev/index.css +149 -1
  5. package/dist/dev/index.css.map +2 -2
  6. package/dist/dev/index.js +1400 -590
  7. package/dist/dev/index.js.map +4 -4
  8. package/dist/dev/subset-shared.chunk.js +1 -1
  9. package/dist/dev/subset-worker.chunk.js +1 -1
  10. package/dist/prod/{chunk-2ALGWY4R.js → chunk-LUZI7MFZ.js} +2 -2
  11. package/dist/prod/{chunk-I4SUBR2Z.js → chunk-SG4RCQVC.js} +1 -1
  12. package/dist/prod/data/image-J2ZJZU4A.js +1 -0
  13. package/dist/prod/index.css +1 -1
  14. package/dist/prod/index.js +42 -32
  15. package/dist/prod/subset-shared.chunk.js +1 -1
  16. package/dist/prod/subset-worker.chunk.js +1 -1
  17. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +1 -1
  18. package/dist/types/excalidraw/actions/actionCanvas.d.ts +177 -0
  19. package/dist/types/excalidraw/actions/actionClipboard.d.ts +7 -7
  20. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +2 -2
  21. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  22. package/dist/types/excalidraw/actions/actionElementLink.d.ts +6 -6
  23. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +1 -1
  24. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +7 -7
  25. package/dist/types/excalidraw/actions/actionLink.d.ts +3 -3
  26. package/dist/types/excalidraw/actions/actionMenu.d.ts +1 -1
  27. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +4 -4
  28. package/dist/types/excalidraw/actions/actionStyles.d.ts +2 -2
  29. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -4
  30. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +3 -3
  31. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +2 -2
  32. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -4
  33. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -4
  34. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  35. package/dist/types/excalidraw/actions/index.d.ts +1 -1
  36. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  37. package/dist/types/excalidraw/components/AIChatPanel.d.ts +49 -3
  38. package/dist/types/excalidraw/components/Actions.d.ts +3 -0
  39. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +1 -1
  40. package/dist/types/excalidraw/components/ImageGeneratorPanel.d.ts +6 -1
  41. package/dist/types/excalidraw/components/ImageQuickEditPanel.d.ts +6 -1
  42. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +2 -2
  43. package/dist/types/excalidraw/components/ai-chat/agentLoop.d.ts +13 -0
  44. package/dist/types/excalidraw/components/ai-chat/audioUtils.d.ts +10 -0
  45. package/dist/types/excalidraw/index.d.ts +4 -1
  46. package/dist/types/excalidraw/types.d.ts +14 -0
  47. package/dist/types/excalidraw/utils/openRouterApiKey.d.ts +1 -0
  48. package/package.json +1 -1
  49. package/dist/prod/data/image-PKF4YK4A.js +0 -1
  50. /package/dist/dev/{chunk-YOQUQ6O5.js.map → chunk-3FGOYDLK.js.map} +0 -0
  51. /package/dist/dev/{chunk-EP27W34X.js.map → chunk-IRIUFXMO.js.map} +0 -0
  52. /package/dist/dev/data/{image-IZS5VEYX.js.map → image-HH4XNQRO.js.map} +0 -0
@@ -6,9 +6,9 @@ export declare const actionSendBackward: {
6
6
  trackEvent: {
7
7
  category: "element";
8
8
  };
9
- perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => {
9
+ perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>, value: unknown, app: import("../types").AppClassProperties) => {
10
10
  elements: readonly import("@orangecatai/element/types").ExcalidrawElement[];
11
- appState: Readonly<import("../types").AppState>;
11
+ appState: Readonly<import("..").AppState>;
12
12
  captureUpdate: "IMMEDIATELY";
13
13
  };
14
14
  keyPriority: number;
@@ -25,9 +25,9 @@ export declare const actionBringForward: {
25
25
  trackEvent: {
26
26
  category: "element";
27
27
  };
28
- perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => {
28
+ perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>, value: unknown, app: import("../types").AppClassProperties) => {
29
29
  elements: readonly import("@orangecatai/element/types").ExcalidrawElement[];
30
- appState: Readonly<import("../types").AppState>;
30
+ appState: Readonly<import("..").AppState>;
31
31
  captureUpdate: "IMMEDIATELY";
32
32
  };
33
33
  keyPriority: number;
@@ -44,9 +44,9 @@ export declare const actionSendToBack: {
44
44
  trackEvent: {
45
45
  category: "element";
46
46
  };
47
- perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
47
+ perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>) => {
48
48
  elements: readonly import("@orangecatai/element/types").ExcalidrawElement[] | import("@orangecatai/element/types").ExcalidrawElement[];
49
- appState: Readonly<import("../types").AppState>;
49
+ appState: Readonly<import("..").AppState>;
50
50
  captureUpdate: "IMMEDIATELY";
51
51
  };
52
52
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
@@ -62,9 +62,9 @@ export declare const actionBringToFront: {
62
62
  trackEvent: {
63
63
  category: "element";
64
64
  };
65
- perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
65
+ perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>) => {
66
66
  elements: readonly import("@orangecatai/element/types").ExcalidrawElement[] | import("@orangecatai/element/types").ExcalidrawElement[];
67
- appState: Readonly<import("../types").AppState>;
67
+ appState: Readonly<import("..").AppState>;
68
68
  captureUpdate: "IMMEDIATELY";
69
69
  };
70
70
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
@@ -3,7 +3,7 @@ export { actionBringForward, actionBringToFront, actionSendBackward, actionSendT
3
3
  export { actionSelectAll } from "./actionSelectAll";
4
4
  export { actionDuplicateSelection } from "./actionDuplicateSelection";
5
5
  export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
6
- export { actionChangeViewBackgroundColor, actionClearCanvas, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, } from "./actionCanvas";
6
+ export { actionChangeViewBackgroundColor, actionClearCanvas, actionZoomIn, actionZoomOut, actionResetZoom, actionScrollBackToContent, actionZoomToFit, actionToggleTheme, } from "./actionCanvas";
7
7
  export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
8
8
  export { actionFinalize } from "./actionFinalize";
9
9
  export { actionChangeProjectName, actionChangeExportBackground, actionSaveToActiveFile, actionSaveFileToDisk, actionLoadScene, } from "./actionExport";
@@ -14,7 +14,7 @@ export type ActionResult = {
14
14
  type ActionFn<TData = any> = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: TData | undefined, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
15
15
  export type UpdaterFn = (res: ActionResult) => void;
16
16
  export type ActionFilterFn = (action: Action) => void;
17
- export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
17
+ export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "scrollBackToContent" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "commandPalette" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
18
18
  export type PanelComponentProps = {
19
19
  elements: readonly ExcalidrawElement[];
20
20
  appState: AppState;
@@ -1,10 +1,56 @@
1
- import type { ExcalidrawImperativeAPI } from "../types";
1
+ import React from "react";
2
+ import { type ToolAction } from "./ai-chat/agentLoop";
2
3
  import "./AIChatPanel.scss";
4
+ import type { ExcalidrawImperativeAPI } from "../types";
5
+ export type ChatMessage = {
6
+ id: string;
7
+ role: "user" | "assistant";
8
+ content: string;
9
+ timestamp: Date;
10
+ toolActions?: ToolAction[];
11
+ attachments?: Array<{
12
+ name: string;
13
+ type: "image" | "text";
14
+ dataUrl?: string;
15
+ }>;
16
+ };
17
+ export type ChatSession = {
18
+ id: string;
19
+ title: string;
20
+ messages: ChatMessage[];
21
+ };
22
+ export type AIChatPanelRef = {
23
+ setMessages: (messages: ChatMessage[]) => void;
24
+ send: (text: string) => void;
25
+ };
3
26
  export type AIChatPanelProps = {
4
27
  isOpen: boolean;
5
28
  onClose: () => void;
6
- apiKey: string;
29
+ apiKey?: string;
7
30
  excalidrawAPI?: ExcalidrawImperativeAPI;
8
31
  geminiApiKey?: string;
32
+ initialMessages?: ChatMessage[];
33
+ initialSessionId?: string;
34
+ initialSessions?: ChatSession[];
35
+ onMessagesChange?: (messages: ChatMessage[], sessionId: string) => void;
36
+ onSessionCreate?: (session: {
37
+ id: string;
38
+ title: string;
39
+ }) => void;
40
+ onSessionSwitch?: (sessionId: string) => void;
41
+ onBeforeSend?: (ctx: {
42
+ hasVoice: boolean;
43
+ }) => Promise<{
44
+ allowed: boolean;
45
+ error?: string;
46
+ }>;
47
+ onAfterSend?: (ctx: {
48
+ hasVoice: boolean;
49
+ }) => void;
50
+ onBeforeImageGen?: () => Promise<{
51
+ allowed: boolean;
52
+ error?: string;
53
+ }>;
54
+ onAfterImageGen?: () => void;
9
55
  };
10
- export declare const AIChatPanel: ({ isOpen, onClose, apiKey, excalidrawAPI, geminiApiKey, }: AIChatPanelProps) => import("react/jsx-runtime").JSX.Element | null;
56
+ export declare const AIChatPanel: React.ForwardRefExoticComponent<AIChatPanelProps & React.RefAttributes<AIChatPanelRef>>;
@@ -30,6 +30,9 @@ export declare const ShapesSwitcher: ({ activeTool, setAppState, app, UIOptions,
30
30
  app: AppClassProperties;
31
31
  UIOptions: AppProps["UIOptions"];
32
32
  }) => import("react/jsx-runtime").JSX.Element;
33
+ export declare const ScrollBackToContentAction: ({ renderAction, }: {
34
+ renderAction: ActionManager["renderAction"];
35
+ }) => import("react/jsx-runtime").JSX.Element | null;
33
36
  export declare const ZoomActions: ({ renderAction, zoom, }: {
34
37
  renderAction: ActionManager["renderAction"];
35
38
  zoom: Zoom;
@@ -4,7 +4,7 @@ import type { SidebarProps, SidebarTriggerProps } from "./Sidebar/common";
4
4
  export declare const DefaultSidebar: import("react").FC<Omit<MarkOptional<Omit<{
5
5
  name: import("../types").SidebarName;
6
6
  children: React.ReactNode;
7
- onStateChange?: (state: import("../types").AppState["openSidebar"]) => void;
7
+ onStateChange?: (state: import("..").AppState["openSidebar"]) => void;
8
8
  onDock?: (docked: boolean) => void;
9
9
  docked?: boolean;
10
10
  className?: string;
@@ -32,7 +32,12 @@ export declare function getDimensions(model: ModelName, ratio: string, resolutio
32
32
  height: number;
33
33
  };
34
34
  export declare function callGeminiAPI(prompt: string, modelId: string, aspectRatio: string, resolution: Resolution, supportsImageSize: boolean, supportsThinking: boolean, apiKey: string, referenceImageDataUrl?: string, signal?: AbortSignal): Promise<string>;
35
- export declare const ImageGeneratorPanel: ({ element, app, }: {
35
+ export declare const ImageGeneratorPanel: ({ element, app, onBeforeImageGen, onAfterImageGen, }: {
36
36
  element: NonDeletedExcalidrawElement & ExcalidrawFrameLikeElement;
37
37
  app: AppClassProperties;
38
+ onBeforeImageGen?: () => Promise<{
39
+ allowed: boolean;
40
+ error?: string;
41
+ }>;
42
+ onAfterImageGen?: () => void;
38
43
  }) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,7 +1,12 @@
1
1
  import "./ImageQuickEditPanel.scss";
2
2
  import type { ExcalidrawImageElement, NonDeletedExcalidrawElement } from "@orangecatai/element/types";
3
3
  import type { AppClassProperties } from "../types";
4
- export declare const ImageQuickEditPanel: ({ element, app, }: {
4
+ export declare const ImageQuickEditPanel: ({ element, app, onBeforeImageGen, onAfterImageGen, }: {
5
5
  element: ExcalidrawImageElement & NonDeletedExcalidrawElement;
6
6
  app: AppClassProperties;
7
+ onBeforeImageGen?: () => Promise<{
8
+ allowed: boolean;
9
+ error?: string;
10
+ }>;
11
+ onAfterImageGen?: () => void;
7
12
  }) => import("react/jsx-runtime").JSX.Element | null;
@@ -14,7 +14,7 @@ export declare const isSidebarDockedAtom: import("jotai/vanilla/atom").Primitive
14
14
  export declare const SidebarInner: React.ForwardRefExoticComponent<Omit<{
15
15
  name: import("../../types").SidebarName;
16
16
  children: React.ReactNode;
17
- onStateChange?: (state: import("../../types").AppState["openSidebar"]) => void;
17
+ onStateChange?: (state: import("../..").AppState["openSidebar"]) => void;
18
18
  onDock?: (docked: boolean) => void;
19
19
  docked?: boolean;
20
20
  className?: string;
@@ -23,7 +23,7 @@ export declare const SidebarInner: React.ForwardRefExoticComponent<Omit<{
23
23
  export declare const Sidebar: React.ForwardRefExoticComponent<{
24
24
  name: import("../../types").SidebarName;
25
25
  children: React.ReactNode;
26
- onStateChange?: (state: import("../../types").AppState["openSidebar"]) => void;
26
+ onStateChange?: (state: import("../..").AppState["openSidebar"]) => void;
27
27
  onDock?: (docked: boolean) => void;
28
28
  docked?: boolean;
29
29
  className?: string;
@@ -45,6 +45,12 @@ export type AgentResult = {
45
45
  reply: string;
46
46
  toolActions: ToolAction[];
47
47
  };
48
+ export type FileAttachment = {
49
+ name: string;
50
+ type: "image" | "text";
51
+ dataUrl?: string;
52
+ textContent?: string;
53
+ };
48
54
  export declare function runAgentLoop(opts: {
49
55
  userMessages: Array<{
50
56
  role: "user" | "assistant";
@@ -52,9 +58,16 @@ export declare function runAgentLoop(opts: {
52
58
  }>;
53
59
  elementContext?: string;
54
60
  frameScreenshot?: string;
61
+ fileAttachments?: FileAttachment[];
62
+ webSearchEnabled?: boolean;
55
63
  apiKey: string;
56
64
  toolCtx: ToolExecutionContext;
57
65
  onUpdate: (update: AgentUpdate) => void;
58
66
  signal?: AbortSignal;
67
+ onBeforeImageGen?: () => Promise<{
68
+ allowed: boolean;
69
+ error?: string;
70
+ }>;
71
+ onAfterImageGen?: () => void;
59
72
  }): Promise<AgentResult>;
60
73
  export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Converts any audio Blob (webm, mp4, ogg…) to a base64-encoded WAV string
3
+ * using the Web Audio API. Mistral Voxtral only accepts mp3 or wav.
4
+ */
5
+ export declare function blobToWavBase64(blob: Blob): Promise<string>;
6
+ /**
7
+ * Sends a base64-encoded audio string to the OpenRouter Voxtral model for
8
+ * transcription. `format` must be "wav" or "mp3".
9
+ */
10
+ export declare function transcribeAudio(base64Audio: string, format: string, apiKey: string): Promise<string>;
@@ -47,4 +47,7 @@ export { isElementLink } from "@orangecatai/element";
47
47
  export { setCustomTextMetricsProvider } from "@orangecatai/element";
48
48
  export { CommandPalette } from "./components/CommandPalette/CommandPalette";
49
49
  export { AIChatPanel } from "./components/AIChatPanel";
50
- export type { AIChatPanelProps } from "./components/AIChatPanel";
50
+ export type { AIChatPanelProps, AIChatPanelRef, ChatMessage, ChatSession, } from "./components/AIChatPanel";
51
+ export type { ExcalidrawImperativeAPI } from "./types";
52
+ export type { AppState, BinaryFiles, BinaryFileData, ExcalidrawProps, ExcalidrawInitialDataState, LibraryItem, LibraryItems, SceneData, UnsubscribeCallback, } from "./types";
53
+ export type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted, OrderedExcalidrawElement, ExcalidrawElementType, } from "@orangecatai/element/types";
@@ -497,6 +497,19 @@ export interface ExcalidrawProps {
497
497
  * Required for image generation when using this package as an npm dependency.
498
498
  */
499
499
  geminiApiKey?: string;
500
+ /**
501
+ * Called before any image generation (ImageGeneratorPanel, ImageQuickEditPanel,
502
+ * or agent loop generate_image tool). Return `{ allowed: false }` to block.
503
+ * Host apps use this for credit gating.
504
+ */
505
+ onBeforeImageGen?: () => Promise<{
506
+ allowed: boolean;
507
+ error?: string;
508
+ }>;
509
+ /**
510
+ * Called after a successful image generation from any panel or agent tool.
511
+ */
512
+ onAfterImageGen?: () => void;
500
513
  }
501
514
  export type SceneData = {
502
515
  elements?: ImportedDataState["elements"];
@@ -517,6 +530,7 @@ export type CanvasActions = Partial<{
517
530
  saveToActiveFile: boolean;
518
531
  toggleTheme: boolean | null;
519
532
  saveAsImage: boolean;
533
+ scrollBackToContent: boolean;
520
534
  }>;
521
535
  export type UIOptions = Partial<{
522
536
  dockedSidebarBreakpoint: number;
@@ -0,0 +1 @@
1
+ export declare function resolveOpenRouterApiKey(propKey?: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orangecatai/adgen-canvas",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "types": "./dist/types/excalidraw/index.d.ts",
6
6
  "main": "./dist/prod/index.js",
@@ -1 +0,0 @@
1
- import{T as a,U as b,V as c}from"../chunk-2ALGWY4R.js";import"../chunk-I4SUBR2Z.js";import"../chunk-SRAX5OIU.js";export{c as decodePngMetadata,b as encodePngMetadata,a as getTEXtChunk};