@orangecatai/adgen-canvas 0.0.8 → 0.0.10

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 (27) hide show
  1. package/dist/dev/{chunk-FAXV62EG.js → chunk-DGD56WJE.js} +2 -2
  2. package/dist/dev/{chunk-FAXV62EG.js.map → chunk-DGD56WJE.js.map} +1 -1
  3. package/dist/dev/{chunk-LAGHQ2FH.js → chunk-UOXWFDVR.js} +3 -3
  4. package/dist/dev/data/{image-FJMUJMRD.js → image-L7LN675H.js} +3 -3
  5. package/dist/dev/index.css +0 -5
  6. package/dist/dev/index.css.map +2 -2
  7. package/dist/dev/index.js +2081 -1950
  8. package/dist/dev/index.js.map +4 -4
  9. package/dist/dev/subset-shared.chunk.js +1 -1
  10. package/dist/dev/subset-worker.chunk.js +1 -1
  11. package/dist/prod/{chunk-7LYXIGC7.js → chunk-EQ2VZGNJ.js} +2 -2
  12. package/dist/prod/{chunk-B427J75A.js → chunk-LVSKSH7E.js} +1 -1
  13. package/dist/prod/data/image-UOUIPUYX.js +1 -0
  14. package/dist/prod/index.css +1 -1
  15. package/dist/prod/index.js +43 -43
  16. package/dist/prod/subset-shared.chunk.js +1 -1
  17. package/dist/prod/subset-worker.chunk.js +1 -1
  18. package/dist/types/excalidraw/components/AIChatPanel.d.ts +2 -2
  19. package/dist/types/excalidraw/components/ImageGeneratorPanel.d.ts +1 -1
  20. package/dist/types/excalidraw/components/auto-resize/AutoResizePanel.d.ts +2 -1
  21. package/dist/types/excalidraw/components/auto-resize/AutoResizePanelHost.d.ts +4 -0
  22. package/dist/types/excalidraw/components/auto-resize/autoResizePanelStore.d.ts +15 -0
  23. package/dist/types/excalidraw/types.d.ts +8 -0
  24. package/package.json +1 -1
  25. package/dist/prod/data/image-RPDJGGN2.js +0 -1
  26. /package/dist/dev/{chunk-LAGHQ2FH.js.map → chunk-UOXWFDVR.js.map} +0 -0
  27. /package/dist/dev/data/{image-FJMUJMRD.js.map → image-L7LN675H.js.map} +0 -0
@@ -1 +1 @@
1
- import{a,b,c,d}from"./chunk-Z5NKEFVG.js";import"./chunk-B427J75A.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
1
+ import{a,b,c,d}from"./chunk-Z5NKEFVG.js";import"./chunk-LVSKSH7E.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
@@ -1 +1 @@
1
- import{a as r,c as t}from"./chunk-Z5NKEFVG.js";import"./chunk-B427J75A.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
1
+ import{a as r,c as t}from"./chunk-Z5NKEFVG.js";import"./chunk-LVSKSH7E.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
@@ -54,7 +54,7 @@ export type AIChatPanelProps = {
54
54
  onAfterImageGen?: () => void;
55
55
  /**
56
56
  * OpenRouter model tag for the chat system (both plain chat and agent loop).
57
- * @default "google/gemini-2.0-flash-001"
57
+ * @default "google/gemini-3.1-flash-lite-preview"
58
58
  * @example "openai/gpt-4o" or "anthropic/claude-sonnet-4"
59
59
  */
60
60
  chatModel?: string;
@@ -65,7 +65,7 @@ export type AIChatPanelProps = {
65
65
  voiceModel?: string;
66
66
  /**
67
67
  * Gemini model ID used by the agent's generate_image tool.
68
- * @default "gemini-2.5-flash-image"
68
+ * @default "gemini-3.1-flash-image-preview"
69
69
  * @example "gemini-2.0-flash-preview-image-generation"
70
70
  */
71
71
  agentImageModel?: string;
@@ -3,7 +3,7 @@ import type { ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "@o
3
3
  import type { AppClassProperties } from "../types";
4
4
  export declare const MODEL_CONFIG: {
5
5
  readonly "Gemini 2.5 Flash": {
6
- readonly geminiModelId: "gemini-2.5-flash-image";
6
+ readonly geminiModelId: "gemini-3.1-flash-image-preview";
7
7
  readonly supportsImageSize: false;
8
8
  readonly supportsThinking: false;
9
9
  readonly supportedResolutions: readonly ["1K"];
@@ -1,7 +1,7 @@
1
1
  import "./AutoResizePanel.scss";
2
2
  import type { ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "@orangecatai/element/types";
3
3
  import type { AppClassProperties } from "../../types";
4
- export declare const AutoResizePanel: ({ element, app, onClose, onBeforeAutoResize, onAfterAutoResize, openRouterApiKey, chatModel, agentImageModel, }: {
4
+ export declare const AutoResizePanel: ({ element, app, onClose, onBeforeAutoResize, onAfterAutoResize, onRunningChange, openRouterApiKey, chatModel, agentImageModel, }: {
5
5
  element: NonDeletedExcalidrawElement & ExcalidrawFrameLikeElement;
6
6
  app: AppClassProperties;
7
7
  onClose: () => void;
@@ -10,6 +10,7 @@ export declare const AutoResizePanel: ({ element, app, onClose, onBeforeAutoResi
10
10
  error?: string;
11
11
  }>;
12
12
  onAfterAutoResize?: () => void;
13
+ onRunningChange?: (running: boolean) => void;
13
14
  openRouterApiKey: string;
14
15
  chatModel: string;
15
16
  agentImageModel?: string;
@@ -0,0 +1,4 @@
1
+ import type { AppClassProperties } from "../../types";
2
+ export declare const AutoResizePanelHost: ({ app }: {
3
+ app: AppClassProperties;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import type { ExcalidrawFrameLikeElement, NonDeletedExcalidrawElement } from "@orangecatai/element/types";
2
+ export type AutoResizePanelState = {
3
+ element: (NonDeletedExcalidrawElement & ExcalidrawFrameLikeElement) | null;
4
+ isOpen: boolean;
5
+ isRunning: boolean;
6
+ };
7
+ type Listener = (state: AutoResizePanelState) => void;
8
+ export declare const autoResizePanelStore: {
9
+ open(element: NonDeletedExcalidrawElement & ExcalidrawFrameLikeElement): void;
10
+ close(): void;
11
+ setRunning(running: boolean): void;
12
+ getState(): AutoResizePanelState;
13
+ subscribe(fn: Listener): () => void;
14
+ };
15
+ export {};
@@ -628,6 +628,14 @@ export interface ExcalidrawProps {
628
628
  * @example "gemini-3.1-flash-image-preview"
629
629
  */
630
630
  agentImageModel?: string;
631
+ /**
632
+ * OpenRouter model tag used by the auto-resize engine for HTML layout
633
+ * generation. This is the LLM call that figures out how to reflow the ad
634
+ * content into the target dimensions before Gemini regenerates the background.
635
+ * @default "google/gemini-3.1-flash-lite-preview"
636
+ * @example "openai/gpt-4o"
637
+ */
638
+ chatModel?: string;
631
639
  /**
632
640
  * Show the Library sidebar trigger button. Defaults to `false`.
633
641
  * Set to `true` to show the library icon in the top-right area.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orangecatai/adgen-canvas",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
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-7LYXIGC7.js";import"../chunk-B427J75A.js";import"../chunk-SRAX5OIU.js";export{c as decodePngMetadata,b as encodePngMetadata,a as getTEXtChunk};