@orangecatai/adgen-canvas 0.0.14 → 0.0.16

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.
@@ -1 +1 @@
1
- import{a,b,c,d}from"./chunk-Z5NKEFVG.js";import"./chunk-4NRCN4F5.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-62H5HX6J.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-4NRCN4F5.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-62H5HX6J.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};
@@ -88,17 +88,14 @@ export type AIChatPanelProps = {
88
88
  assetType: string;
89
89
  blobUrl: string;
90
90
  }>>;
91
- onListBrandTemplates?: (campaignTag?: string) => Promise<Array<{
91
+ onListBrandTemplates?: (keywords?: string[]) => Promise<Array<{
92
92
  id: string;
93
93
  name: string;
94
94
  campaignTag?: string;
95
- variants: Array<{
96
- id: string;
97
- label: string;
98
- width: number;
99
- height: number;
100
- thumbnailBlobUrl?: string;
101
- }>;
95
+ label?: string;
96
+ width?: number;
97
+ height?: number;
98
+ thumbnailBlobUrl?: string;
102
99
  }>>;
103
100
  onGetTemplateVariant?: (variantId: string) => Promise<{
104
101
  canvasJson: string;
@@ -1,4 +1,4 @@
1
- import { type ToolExecutionContext, type ToolResult } from "./canvasTools";
1
+ import { type ToolExecutionContext } from "./canvasTools";
2
2
  import type { BrandContext } from "../../types";
3
3
  type ContentPart = {
4
4
  type: "text";
@@ -33,9 +33,10 @@ export type ToolCall = {
33
33
  };
34
34
  };
35
35
  export type ToolAction = {
36
- toolName: string;
37
- args: Record<string, unknown>;
38
- result: ToolResult;
36
+ result: {
37
+ success: boolean;
38
+ statusMessage: string;
39
+ };
39
40
  };
40
41
  export type AgentUpdate = {
41
42
  type: "status" | "tool_start" | "tool_done" | "final" | "content_delta";
@@ -462,13 +462,16 @@ export declare const BANNER_TOOLS: readonly [{
462
462
  readonly type: "function";
463
463
  readonly function: {
464
464
  readonly name: "list_brand_templates";
465
- readonly description: "List available brand templates. Call this when the user mentions a campaign, template, or asks for multiple sizes.";
465
+ readonly description: "List available brand templates by keyword search across template names, campaign tags, and labels.\n\nMANDATORY SEARCH PROTOCOL — follow exactly, no shortcuts:\n\nATTEMPT 1: Generate TWO sets of 10 keywords each from the user's request:\n - Set A (campaign tag variations): 10 synonyms/abbreviations/phrasings of the campaign topic (e.g. for \"noida datacenter\": [\"datacenter\", \"data center\", \"dc\", \"noida dc\", \"noida datacenter\", \"data centre\", \"server farm\", \"cloud infra\", \"hyperscale\", \"colocation\"])\n - Set B (template name variations): 10 different name keywords the template might have (e.g. [\"noida\", \"datacenter campaign\", \"new datacenter\", \"dc launch\", \"infrastructure\", \"cloud\", \"enterprise\", \"b2b\", \"tech\", \"facility\"])\n Merge all 20 into the keywords array. Call list_brand_templates with all 20.\n\nIF templates returned is empty → ATTEMPT 2 (MANDATORY — do NOT skip):\n Generate a completely DIFFERENT set of 20 keywords — do not reuse any from attempt 1. Think laterally: different synonyms, related industry terms, the city name, brand-adjacent words, seasonal terms. Call list_brand_templates again with the new 20.\n\nONLY after both attempts return empty → tell the user no matching template was found.\n\nIf no search context exists, call with an empty keywords array to list all templates.";
466
466
  readonly parameters: {
467
467
  readonly type: "object";
468
468
  readonly properties: {
469
- readonly campaignTag: {
470
- readonly type: "string";
471
- readonly description: "Optional campaign tag to filter templates";
469
+ readonly keywords: {
470
+ readonly type: "array";
471
+ readonly items: {
472
+ readonly type: "string";
473
+ };
474
+ readonly description: "Up to 20 keyword variations to search across template names, campaign tags, and labels. All are OR-matched case-insensitively. Generate 10 tag synonyms + 10 name variations from the user's request.";
472
475
  };
473
476
  };
474
477
  readonly required: readonly [];
@@ -625,6 +628,18 @@ export type ToolExecutionContext = {
625
628
  brandHeadlineFontName?: string;
626
629
  /** Brand body font file name. Sourced from brand DNA. */
627
630
  brandBodyFontName?: string;
631
+ /**
632
+ * Excalidraw fontFamilyId for the brand headline font.
633
+ * When set, ALL text elements (add_text, fill_template_slots headline slots)
634
+ * use this font. Falls back to brandBodyFontId, then Excalidraw default.
635
+ */
636
+ brandHeadlineFontId?: number;
637
+ /**
638
+ * Excalidraw fontFamilyId for the brand body font.
639
+ * When set, ALL text elements use this font — never a built-in fallback
640
+ * unless the font failed to load.
641
+ */
642
+ brandBodyFontId?: number;
628
643
  /**
629
644
  * Image file attachments the user uploaded in the current chat turn.
630
645
  * Indexed 0-based in the order they were attached.
@@ -641,7 +656,7 @@ export type ToolExecutionContext = {
641
656
  assetType: string;
642
657
  blobUrl: string;
643
658
  }>>;
644
- onListBrandTemplates?: (campaignTag?: string) => Promise<Array<{
659
+ onListBrandTemplates?: (keywords?: string[]) => Promise<Array<{
645
660
  id: string;
646
661
  name: string;
647
662
  campaignTag?: string;
@@ -53,4 +53,4 @@ export type { AppState, BinaryFiles, BinaryFileData, ExcalidrawProps, Excalidraw
53
53
  export type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted, OrderedExcalidrawElement, ExcalidrawElementType, } from "@orangecatai/element/types";
54
54
  export type { ImageEditToolbarCallbacks } from "./components/ImageEditToolbar";
55
55
  export type { CustomFontSpec, BrandContext } from "./types";
56
- export type { ReviewerFeedback, ReviewIssue } from "./components/ai-chat/reviewerAgent";
56
+ export type { ReviewerFeedback, ReviewIssue, } from "./components/ai-chat/reviewerAgent";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orangecatai/adgen-canvas",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
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-4DCJIUJX.js";import"../chunk-4NRCN4F5.js";import"../chunk-SRAX5OIU.js";export{c as decodePngMetadata,b as encodePngMetadata,a as getTEXtChunk};