@orangecatai/element 0.0.1 → 0.0.3

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 (127) hide show
  1. package/README.md +1 -1
  2. package/dist/dev/index.js +42 -3
  3. package/dist/dev/index.js.map +2 -2
  4. package/dist/prod/index.js +1 -1
  5. package/dist/types/common/src/keys.d.ts +2 -0
  6. package/dist/types/element/src/arrows/focus.d.ts +1 -1
  7. package/dist/types/element/src/binding.d.ts +3 -3
  8. package/dist/types/element/src/bounds.d.ts +1 -1
  9. package/dist/types/element/src/collision.d.ts +1 -1
  10. package/dist/types/element/src/delta.d.ts +2 -2
  11. package/dist/types/element/src/dragElements.d.ts +1 -1
  12. package/dist/types/element/src/duplicate.d.ts +1 -1
  13. package/dist/types/element/src/embeddable.d.ts +1 -1
  14. package/dist/types/element/src/flowchart.d.ts +1 -1
  15. package/dist/types/element/src/frame.d.ts +4 -4
  16. package/dist/types/element/src/groups.d.ts +1 -1
  17. package/dist/types/element/src/renderElement.d.ts +1 -1
  18. package/dist/types/element/src/selection.d.ts +1 -1
  19. package/dist/types/element/src/shape.d.ts +2 -2
  20. package/dist/types/element/src/store.d.ts +2 -2
  21. package/dist/types/element/src/textElement.d.ts +1 -1
  22. package/dist/types/element/src/transform.d.ts +1 -1
  23. package/dist/types/element/src/utils.d.ts +1 -1
  24. package/dist/types/element/src/zindex.d.ts +1 -1
  25. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +1 -1
  26. package/dist/types/excalidraw/actions/actionCanvas.d.ts +184 -7
  27. package/dist/types/excalidraw/actions/actionClipboard.d.ts +7 -7
  28. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +2 -2
  29. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
  30. package/dist/types/excalidraw/actions/actionElementLink.d.ts +6 -6
  31. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +1 -1
  32. package/dist/types/excalidraw/actions/actionExport.d.ts +9 -9
  33. package/dist/types/excalidraw/actions/actionFrame.d.ts +178 -0
  34. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +7 -7
  35. package/dist/types/excalidraw/actions/actionLink.d.ts +3 -3
  36. package/dist/types/excalidraw/actions/actionMenu.d.ts +1 -1
  37. package/dist/types/excalidraw/actions/actionProperties.d.ts +1 -1
  38. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +4 -4
  39. package/dist/types/excalidraw/actions/actionStyles.d.ts +2 -2
  40. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -4
  41. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +3 -3
  42. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +2 -2
  43. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -4
  44. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -4
  45. package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -8
  46. package/dist/types/excalidraw/actions/index.d.ts +1 -1
  47. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  48. package/dist/types/excalidraw/actions/types.d.ts +1 -1
  49. package/dist/types/excalidraw/appState.d.ts +4 -4
  50. package/dist/types/excalidraw/components/AIChatPanel.d.ts +114 -0
  51. package/dist/types/excalidraw/components/Actions.d.ts +4 -1
  52. package/dist/types/excalidraw/components/App.d.ts +13 -2
  53. package/dist/types/excalidraw/components/CanvasBackgroundSwatch.d.ts +7 -0
  54. package/dist/types/excalidraw/components/ColorPicker/AdvancedColorPicker.d.ts +8 -0
  55. package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -2
  56. package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +1 -1
  57. package/dist/types/excalidraw/components/ColorPicker/colorConversions.d.ts +27 -0
  58. package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
  59. package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
  60. package/dist/types/excalidraw/components/DefaultSidebar.d.ts +2 -2
  61. package/dist/types/excalidraw/components/ElementCanvasButtons.d.ts +1 -1
  62. package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +2 -2
  63. package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
  64. package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +1 -1
  65. package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +1 -1
  66. package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +1 -1
  67. package/dist/types/excalidraw/components/FrameToolbar.d.ts +1 -1
  68. package/dist/types/excalidraw/components/HintViewer.d.ts +1 -1
  69. package/dist/types/excalidraw/components/ImageEditToolbar.d.ts +16 -0
  70. package/dist/types/excalidraw/components/ImageExportDialog.d.ts +1 -1
  71. package/dist/types/excalidraw/components/ImageGeneratorPanel.d.ts +43 -0
  72. package/dist/types/excalidraw/components/ImageQuickEditPanel.d.ts +16 -0
  73. package/dist/types/excalidraw/components/JSONExportDialog.d.ts +1 -1
  74. package/dist/types/excalidraw/components/LayerUI.d.ts +1 -1
  75. package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +2 -2
  76. package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
  77. package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
  78. package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
  79. package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
  80. package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
  81. package/dist/types/excalidraw/components/Stats/index.d.ts +1 -1
  82. package/dist/types/excalidraw/components/TTDDialog/types.d.ts +2 -2
  83. package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +1 -0
  84. package/dist/types/excalidraw/components/ToolButton.d.ts +1 -1
  85. package/dist/types/excalidraw/components/ai-chat/agentLoop.d.ts +112 -0
  86. package/dist/types/excalidraw/components/ai-chat/audioUtils.d.ts +10 -0
  87. package/dist/types/excalidraw/components/ai-chat/canvasTools.d.ts +685 -0
  88. package/dist/types/excalidraw/components/ai-chat/htmlToExcalidraw.d.ts +53 -0
  89. package/dist/types/excalidraw/components/ai-chat/openRouterStream.d.ts +50 -0
  90. package/dist/types/excalidraw/components/ai-chat/reviewerAgent.d.ts +64 -0
  91. package/dist/types/excalidraw/components/auto-resize/AutoResizePanel.d.ts +17 -0
  92. package/dist/types/excalidraw/components/auto-resize/AutoResizePanelHost.d.ts +4 -0
  93. package/dist/types/excalidraw/components/auto-resize/AutoResizeShimmerLayer.d.ts +11 -0
  94. package/dist/types/excalidraw/components/auto-resize/autoResizeEngine.d.ts +144 -0
  95. package/dist/types/excalidraw/components/auto-resize/autoResizePanelStore.d.ts +15 -0
  96. package/dist/types/excalidraw/components/auto-resize/autoResizeStore.d.ts +16 -0
  97. package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
  98. package/dist/types/excalidraw/components/icons.d.ts +1 -0
  99. package/dist/types/excalidraw/components/image-generation/pendingGenerations.d.ts +30 -0
  100. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +1 -1
  101. package/dist/types/excalidraw/components/template-builder/TemplateBuilderPanelHost.d.ts +4 -0
  102. package/dist/types/excalidraw/components/template-builder/TemplateBuilderTray.d.ts +4 -0
  103. package/dist/types/excalidraw/components/template-builder/slotTypes.d.ts +43 -0
  104. package/dist/types/excalidraw/components/template-builder/templateBuilderStore.d.ts +19 -0
  105. package/dist/types/excalidraw/components/ui/avatar.d.ts +6 -0
  106. package/dist/types/excalidraw/components/ui/button.d.ts +11 -0
  107. package/dist/types/excalidraw/components/ui/chat-container.d.ts +17 -0
  108. package/dist/types/excalidraw/components/ui/code-block.d.ts +16 -0
  109. package/dist/types/excalidraw/components/ui/markdown.d.ts +10 -0
  110. package/dist/types/excalidraw/components/ui/message.d.ts +35 -0
  111. package/dist/types/excalidraw/components/ui/prompt-input.d.ts +28 -0
  112. package/dist/types/excalidraw/components/ui/scroll-button.d.ts +10 -0
  113. package/dist/types/excalidraw/components/ui/textarea.d.ts +3 -0
  114. package/dist/types/excalidraw/components/ui/tooltip.d.ts +7 -0
  115. package/dist/types/excalidraw/data/blob.d.ts +19 -17
  116. package/dist/types/excalidraw/data/json.d.ts +8 -8
  117. package/dist/types/excalidraw/data/library.d.ts +1 -1
  118. package/dist/types/excalidraw/fonts/Fonts.d.ts +19 -2
  119. package/dist/types/excalidraw/i18n.d.ts +1 -1
  120. package/dist/types/excalidraw/index.d.ts +9 -0
  121. package/dist/types/excalidraw/lib/utils.d.ts +2 -0
  122. package/dist/types/excalidraw/types.d.ts +229 -0
  123. package/dist/types/excalidraw/utils/geminiApiKey.d.ts +1 -0
  124. package/dist/types/excalidraw/utils/leonardoApiKey.d.ts +1 -0
  125. package/dist/types/excalidraw/utils/openRouterApiKey.d.ts +1 -0
  126. package/dist/types/excalidraw/utils/removeBgApiKey.d.ts +1 -0
  127. package/package.json +6 -6
@@ -1,8 +1,8 @@
1
1
  export declare const actionLink: {
2
2
  name: "hyperlink";
3
- label: (elements: readonly import("@orangecatai/element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => "labels.link.editEmbed" | "labels.link.edit" | "labels.link.create";
3
+ label: (elements: readonly import("@orangecatai/element/types").ExcalidrawElement[], appState: Readonly<import("..").AppState>) => "labels.link.editEmbed" | "labels.link.edit" | "labels.link.create";
4
4
  icon: import("react/jsx-runtime").JSX.Element;
5
- perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>) => false | {
5
+ perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>) => false | {
6
6
  elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[];
7
7
  appState: {
8
8
  showHyperlinkPopup: "editor";
@@ -170,7 +170,7 @@ export declare const actionLink: {
170
170
  action: string;
171
171
  };
172
172
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
173
- predicate: (elements: readonly import("@orangecatai/element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
173
+ predicate: (elements: readonly import("@orangecatai/element/types").ExcalidrawElement[], appState: import("..").AppState) => boolean;
174
174
  PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
175
175
  } & {
176
176
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -7,7 +7,7 @@ export declare const actionShortcuts: {
7
7
  category: "menu";
8
8
  action: string;
9
9
  };
10
- perform: (_elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, { focusContainer }: import("../types").AppClassProperties) => {
10
+ perform: (_elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>, _: unknown, { focusContainer }: import("../types").AppClassProperties) => {
11
11
  appState: {
12
12
  openDialog: {
13
13
  name: "help";
@@ -6,7 +6,7 @@ export declare const getFormValue: <T extends Primitive>(elements: readonly Exca
6
6
  export declare const actionChangeStrokeColor: import("./types").Action<Pick<AppState, "currentItemStrokeColor">> & {
7
7
  keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
8
8
  };
9
- export declare const actionChangeBackgroundColor: import("./types").Action<Pick<AppState, "viewBackgroundColor" | "currentItemBackgroundColor">> & {
9
+ export declare const actionChangeBackgroundColor: import("./types").Action<Pick<AppState, "currentItemBackgroundColor" | "viewBackgroundColor">> & {
10
10
  keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
11
11
  };
12
12
  export declare const actionChangeFillStyle: import("./types").Action<import("@orangecatai/element/types").FillStyle> & {
@@ -8,12 +8,12 @@ export declare const actionSelectAll: {
8
8
  category: "canvas";
9
9
  };
10
10
  viewMode: false;
11
- perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: unknown, app: import("../types").AppClassProperties) => false | {
11
+ perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>, value: unknown, app: import("../types").AppClassProperties) => false | {
12
12
  appState: {
13
13
  selectedLinearElement: LinearElementEditor | null;
14
- editingGroupId: import("../types").AppState["editingGroupId"];
15
- selectedElementIds: import("../types").AppState["selectedElementIds"];
16
- selectedGroupIds: import("../types").AppState["selectedGroupIds"];
14
+ editingGroupId: import("..").AppState["editingGroupId"];
15
+ selectedElementIds: import("..").AppState["selectedElementIds"];
16
+ selectedGroupIds: import("..").AppState["selectedGroupIds"];
17
17
  contextMenu: {
18
18
  items: import("../components/ContextMenu").ContextMenuItems;
19
19
  top: number;
@@ -6,7 +6,7 @@ export declare const actionCopyStyles: {
6
6
  trackEvent: {
7
7
  category: "element";
8
8
  };
9
- perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: unknown, app: import("../types").AppClassProperties) => {
9
+ perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>, formData: unknown, app: import("../types").AppClassProperties) => {
10
10
  appState: {
11
11
  toast: {
12
12
  message: string;
@@ -177,7 +177,7 @@ export declare const actionPasteStyles: {
177
177
  trackEvent: {
178
178
  category: "element";
179
179
  };
180
- perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, formData: unknown, app: import("../types").AppClassProperties) => {
180
+ perform: (elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>, formData: unknown, app: import("../types").AppClassProperties) => {
181
181
  elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[];
182
182
  captureUpdate: "EVENTUALLY";
183
183
  } | {
@@ -5,9 +5,9 @@ export declare const actionToggleObjectsSnapMode: {
5
5
  viewMode: false;
6
6
  trackEvent: {
7
7
  category: "canvas";
8
- predicate: (appState: Readonly<import("../types").AppState>) => boolean;
8
+ predicate: (appState: Readonly<import("..").AppState>) => boolean;
9
9
  };
10
- perform(elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
10
+ perform(elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>): {
11
11
  appState: {
12
12
  objectsSnapModeEnabled: boolean;
13
13
  gridModeEnabled: false;
@@ -169,8 +169,8 @@ export declare const actionToggleObjectsSnapMode: {
169
169
  };
170
170
  captureUpdate: "EVENTUALLY";
171
171
  };
172
- checked: (appState: Readonly<import("../types").AppState>) => boolean;
173
- predicate: (elements: readonly import("@orangecatai/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
172
+ checked: (appState: Readonly<import("..").AppState>) => boolean;
173
+ predicate: (elements: readonly import("@orangecatai/element/types").ExcalidrawElement[], appState: import("..").AppState, appProps: import("..").ExcalidrawProps) => boolean;
174
174
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
175
175
  } & {
176
176
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -9,11 +9,11 @@ export declare const actionToggleShapeSwitch: {
9
9
  action: string;
10
10
  };
11
11
  keywords: string[];
12
- perform(elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: unknown, app: import("../types").AppClassProperties): {
12
+ perform(elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>, _: unknown, app: import("../types").AppClassProperties): {
13
13
  captureUpdate: "NEVER";
14
14
  };
15
- checked: (appState: Readonly<import("../types").AppState>) => boolean;
16
- predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, props: import("../types").ExcalidrawProps) => boolean;
15
+ checked: (appState: Readonly<import("..").AppState>) => boolean;
16
+ predicate: (elements: readonly ExcalidrawElement[], appState: import("..").AppState, props: import("..").ExcalidrawProps) => boolean;
17
17
  } & {
18
18
  keyTest?: undefined;
19
19
  };
@@ -7,7 +7,7 @@ export declare const actionToggleStats: {
7
7
  category: "menu";
8
8
  };
9
9
  keywords: string[];
10
- perform(elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
10
+ perform(elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>): {
11
11
  appState: {
12
12
  stats: {
13
13
  open: boolean;
@@ -169,7 +169,7 @@ export declare const actionToggleStats: {
169
169
  };
170
170
  captureUpdate: "EVENTUALLY";
171
171
  };
172
- checked: (appState: Readonly<import("../types").AppState>) => boolean;
172
+ checked: (appState: Readonly<import("..").AppState>) => boolean;
173
173
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
174
174
  } & {
175
175
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -5,9 +5,9 @@ export declare const actionToggleViewMode: {
5
5
  viewMode: true;
6
6
  trackEvent: {
7
7
  category: "canvas";
8
- predicate: (appState: Readonly<import("../types").AppState>) => boolean;
8
+ predicate: (appState: Readonly<import("..").AppState>) => boolean;
9
9
  };
10
- perform(elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
10
+ perform(elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>): {
11
11
  appState: {
12
12
  viewModeEnabled: boolean;
13
13
  contextMenu: {
@@ -169,8 +169,8 @@ export declare const actionToggleViewMode: {
169
169
  };
170
170
  captureUpdate: "EVENTUALLY";
171
171
  };
172
- checked: (appState: Readonly<import("../types").AppState>) => boolean;
173
- predicate: (elements: readonly import("@orangecatai/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
172
+ checked: (appState: Readonly<import("..").AppState>) => boolean;
173
+ predicate: (elements: readonly import("@orangecatai/element/types").ExcalidrawElement[], appState: import("..").AppState, appProps: import("..").ExcalidrawProps) => boolean;
174
174
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
175
175
  } & {
176
176
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -5,9 +5,9 @@ export declare const actionToggleZenMode: {
5
5
  viewMode: true;
6
6
  trackEvent: {
7
7
  category: "canvas";
8
- predicate: (appState: Readonly<import("../types").AppState>) => boolean;
8
+ predicate: (appState: Readonly<import("..").AppState>) => boolean;
9
9
  };
10
- perform(elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
10
+ perform(elements: readonly import("@orangecatai/element/types").OrderedExcalidrawElement[], appState: Readonly<import("..").AppState>): {
11
11
  appState: {
12
12
  zenModeEnabled: boolean;
13
13
  contextMenu: {
@@ -169,8 +169,8 @@ export declare const actionToggleZenMode: {
169
169
  };
170
170
  captureUpdate: "EVENTUALLY";
171
171
  };
172
- checked: (appState: Readonly<import("../types").AppState>) => boolean;
173
- predicate: (elements: readonly import("@orangecatai/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
172
+ checked: (appState: Readonly<import("..").AppState>) => boolean;
173
+ predicate: (elements: readonly import("@orangecatai/element/types").ExcalidrawElement[], appState: import("..").AppState, appProps: import("..").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
174
174
  keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
175
175
  } & {
176
176
  keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
@@ -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";
@@ -1,4 +1,4 @@
1
1
  import type { SubtypeOf } from "@orangecatai/common/utility-types";
2
2
  import type { ActionName } from "./types";
3
- export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu" | "toolLock";
3
+ export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "clearCanvas" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "zenMode" | "objectsSnapMode" | "stats" | "addToLibrary" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "toggleEraserTool" | "toggleHandTool" | "setFrameAsActiveTool" | "cycleThroughFrameChildren" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame"> | "saveScene" | "imageExport" | "commandPalette" | "searchMenu" | "toolLock";
4
4
  export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
@@ -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" | "cycleThroughFrameChildren" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
18
18
  export type PanelComponentProps = {
19
19
  elements: readonly ExcalidrawElement[];
20
20
  appState: AppState;
@@ -1,8 +1,6 @@
1
1
  import type { AppState, NormalizedZoomValue } from "./types";
2
2
  export declare const getDefaultAppState: () => Omit<AppState, "offsetTop" | "offsetLeft" | "width" | "height">;
3
3
  export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>) => {
4
- viewBackgroundColor?: string | undefined;
5
- theme?: import("@orangecatai/element/types").Theme | undefined;
6
4
  name?: string | null | undefined;
7
5
  zoom?: Readonly<{
8
6
  value: NormalizedZoomValue;
@@ -13,6 +11,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
13
11
  selectedElementIds?: Readonly<{
14
12
  [id: string]: true;
15
13
  }> | undefined;
14
+ theme?: import("@orangecatai/element/types").Theme | undefined;
16
15
  activeTool?: ({
17
16
  lastActiveTool: import("./types").ActiveTool | null;
18
17
  locked: boolean;
@@ -51,6 +50,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
51
50
  currentItemStartArrowhead?: import("@orangecatai/element/types").Arrowhead | null | undefined;
52
51
  currentItemEndArrowhead?: import("@orangecatai/element/types").Arrowhead | null | undefined;
53
52
  currentItemRoundness?: import("@orangecatai/element/types").StrokeRoundness | undefined;
53
+ viewBackgroundColor?: string | undefined;
54
54
  cursorButton?: "up" | "down" | undefined;
55
55
  scrolledOutside?: boolean | undefined;
56
56
  openMenu?: "canvas" | null | undefined;
@@ -76,8 +76,8 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
76
76
  } | undefined;
77
77
  };
78
78
  export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
79
- viewBackgroundColor?: string | undefined;
80
79
  gridSize?: number | undefined;
80
+ viewBackgroundColor?: string | undefined;
81
81
  gridStep?: number | undefined;
82
82
  gridModeEnabled?: boolean | undefined;
83
83
  lockedMultiSelections?: {
@@ -85,8 +85,8 @@ export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
85
85
  } | undefined;
86
86
  };
87
87
  export declare const clearAppStateForDatabase: (appState: Partial<AppState>) => {
88
- viewBackgroundColor?: string | undefined;
89
88
  gridSize?: number | undefined;
89
+ viewBackgroundColor?: string | undefined;
90
90
  gridStep?: number | undefined;
91
91
  gridModeEnabled?: boolean | undefined;
92
92
  lockedMultiSelections?: {
@@ -0,0 +1,114 @@
1
+ import React from "react";
2
+ import { type ToolAction } from "./ai-chat/agentLoop";
3
+ import "./AIChatPanel.scss";
4
+ import type { ReviewerFeedback } from "./ai-chat/reviewerAgent";
5
+ import type { ExcalidrawImperativeAPI } from "../types";
6
+ export type ChatMessage = {
7
+ id: string;
8
+ role: "user" | "assistant";
9
+ content: string;
10
+ timestamp: Date;
11
+ toolActions?: ToolAction[];
12
+ attachments?: Array<{
13
+ name: string;
14
+ type: "image" | "text";
15
+ dataUrl?: string;
16
+ }>;
17
+ /** Reviewer feedback attached to an assistant message after HTML ad generation */
18
+ reviewFeedback?: ReviewerFeedback;
19
+ };
20
+ export type ChatSession = {
21
+ id: string;
22
+ title: string;
23
+ messages: ChatMessage[];
24
+ };
25
+ export type AIChatPanelRef = {
26
+ setMessages: (messages: ChatMessage[], sessionId?: string) => void;
27
+ send: (text: string) => void;
28
+ };
29
+ export type AIChatPanelProps = {
30
+ isOpen: boolean;
31
+ onClose: () => void;
32
+ apiKey?: string;
33
+ excalidrawAPI?: ExcalidrawImperativeAPI;
34
+ geminiApiKey?: string;
35
+ initialMessages?: ChatMessage[];
36
+ initialSessionId?: string;
37
+ initialSessions?: ChatSession[];
38
+ onMessagesChange?: (messages: ChatMessage[], sessionId: string) => void;
39
+ onSessionCreate?: (session: {
40
+ id: string;
41
+ title: string;
42
+ }) => void;
43
+ onSessionSwitch?: (sessionId: string) => void;
44
+ onBeforeSend?: (ctx: {
45
+ hasVoice: boolean;
46
+ }) => Promise<{
47
+ allowed: boolean;
48
+ error?: string;
49
+ }>;
50
+ onAfterSend?: (ctx: {
51
+ hasVoice: boolean;
52
+ }) => void;
53
+ onBeforeImageGen?: () => Promise<{
54
+ allowed: boolean;
55
+ error?: string;
56
+ }>;
57
+ onAfterImageGen?: () => void;
58
+ /**
59
+ * OpenRouter model tag for the chat system (both plain chat and agent loop).
60
+ * @default "google/gemini-3.1-flash-lite-preview"
61
+ * @example "openai/gpt-4o" or "anthropic/claude-sonnet-4"
62
+ */
63
+ chatModel?: string;
64
+ /**
65
+ * OpenRouter model tag for voice/speech-to-text transcription.
66
+ * @default "mistralai/voxtral-small-24b-2507"
67
+ */
68
+ voiceModel?: string;
69
+ /**
70
+ * Gemini model ID used by the agent's generate_image tool.
71
+ * @default "gemini-3.1-flash-image-preview"
72
+ * @example "gemini-2.0-flash-preview-image-generation"
73
+ */
74
+ agentImageModel?: string;
75
+ /**
76
+ * Optional brand identity context. When provided, the AI agent receives
77
+ * the brand's colors, typography, tone of voice, and imagery direction as
78
+ * a system-level context message so it can create on-brand ads.
79
+ *
80
+ * Pair this with `customFonts` on `<Excalidraw>` so that any uploaded
81
+ * brand font files are also registered in the canvas.
82
+ */
83
+ brandContext?: import("../types").BrandContext;
84
+ onSearchBrandAssets?: (query: string, type?: string) => Promise<Array<{
85
+ id: string;
86
+ name: string;
87
+ tags: string[];
88
+ assetType: string;
89
+ blobUrl: string;
90
+ }>>;
91
+ onListBrandTemplates?: (keywords?: string[]) => Promise<Array<{
92
+ id: string;
93
+ name: string;
94
+ campaignTag?: string;
95
+ label?: string;
96
+ width?: number;
97
+ height?: number;
98
+ thumbnailBlobUrl?: string;
99
+ }>>;
100
+ onGetTemplateVariant?: (variantId: string) => Promise<{
101
+ canvasJson: string;
102
+ }>;
103
+ /**
104
+ * OpenRouter model tag for the reviewer agent. Must be vision-capable.
105
+ * Defaults to the same model as chatModel.
106
+ */
107
+ reviewerModel?: string;
108
+ /**
109
+ * Maximum number of reviewer rounds per banner before the reviewer is skipped.
110
+ * @default 2
111
+ */
112
+ maxReviewRounds?: number;
113
+ };
114
+ export declare const AIChatPanel: React.ForwardRefExoticComponent<AIChatPanelProps & React.RefAttributes<AIChatPanelRef>>;
@@ -1,5 +1,5 @@
1
- import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "@orangecatai/element/types";
2
1
  import "./Actions.scss";
2
+ import type { ExcalidrawElement, NonDeletedElementsMap, NonDeletedSceneElementsMap } from "@orangecatai/element/types";
3
3
  import type { AppClassProperties, AppProps, UIAppState, Zoom, AppState } from "../types";
4
4
  import type { ActionManager } from "../actions/manager";
5
5
  export declare const canChangeStrokeColor: (appState: UIAppState, targetElements: ExcalidrawElement[]) => boolean;
@@ -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;
@@ -1,8 +1,6 @@
1
1
  import React from "react";
2
2
  import { type EXPORT_IMAGE_TYPES, Emitter, type EditorInterface, type StylesPanelMode } from "@orangecatai/common";
3
3
  import { LinearElementEditor, FlowChartCreator, Scene, type ElementUpdate, StoreDelta, type ApplyToOptions } from "@orangecatai/element";
4
- import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@orangecatai/element/types";
5
- import type { Mutable } from "@orangecatai/common/utility-types";
6
4
  import { ActionManager } from "../actions/manager";
7
5
  import { AnimationFrameHandler } from "../animation-frame-handler";
8
6
  import { Fonts } from "../fonts";
@@ -12,6 +10,8 @@ import { LaserTrails } from "../laser-trails";
12
10
  import { isOverScrollBars } from "../scene/scrollbars";
13
11
  import { LassoTrail } from "../lasso";
14
12
  import { EraserTrail } from "../eraser";
13
+ import type { ExcalidrawElement, NonDeleted, ExcalidrawImageElement, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@orangecatai/element/types";
14
+ import type { Mutable } from "@orangecatai/common/utility-types";
15
15
  import type { ExportedElements } from "../data";
16
16
  import type { FileSystemHandle } from "../data/filesystem";
17
17
  import type { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, FrameNameBoundsCache, SidebarName, SidebarTabName, ToolType, OnUserFollowedPayload, GenerateDiagramToCode, NullableGridSize, Offsets } from "../types";
@@ -283,6 +283,17 @@ declare class App extends React.Component<AppProps, AppState> {
283
283
  private onMagicFrameGenerate;
284
284
  private onIframeSrcCopy;
285
285
  onMagicframeToolSelect: () => void;
286
+ onImageGeneratorSelect: () => void;
287
+ /**
288
+ * Inserts a generated image (base64 data URL) into a frame element,
289
+ * sized to fill the frame exactly. Used by the image generator panel.
290
+ */
291
+ insertGeneratedImageIntoFrame: (dataURL: string, frameElement: import("@orangecatai/element/types").ExcalidrawFrameLikeElement & import("@orangecatai/element/types").NonDeletedExcalidrawElement) => Promise<void>;
292
+ /**
293
+ * Inserts a generated image near a source element (≥ 25 px clearance).
294
+ * Tries right → below → left → above; falls back to right if all collide.
295
+ */
296
+ insertGeneratedImageNearElement: (dataURL: string, sourceElement: ExcalidrawImageElement, targetWidth: number, targetHeight: number) => Promise<void>;
286
297
  private openEyeDropper;
287
298
  dismissLinearEditor: () => void;
288
299
  syncActionResult: (actionResult: ActionResult) => void;
@@ -0,0 +1,7 @@
1
+ import "./CanvasBackgroundSwatch.scss";
2
+ import type { ActionManager } from "../actions/manager";
3
+ import type { UIAppState } from "../types";
4
+ export declare const CanvasBackgroundSwatch: ({ actionManager, appState, }: {
5
+ actionManager: ActionManager;
6
+ appState: UIAppState;
7
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import "./AdvancedColorPicker.scss";
2
+ interface AdvancedColorPickerProps {
3
+ color: string;
4
+ onChange: (color: string) => void;
5
+ showAlpha?: boolean;
6
+ }
7
+ export declare const AdvancedColorPicker: ({ color, onChange, showAlpha, }: AdvancedColorPickerProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -1,6 +1,6 @@
1
- import type { ColorTuple, ColorPaletteCustom } from "@orangecatai/common";
2
- import type { ExcalidrawElement } from "@orangecatai/element/types";
3
1
  import "./ColorPicker.scss";
2
+ import type { ExcalidrawElement } from "@orangecatai/element/types";
3
+ import type { ColorTuple, ColorPaletteCustom } from "@orangecatai/common";
4
4
  import type { ColorPickerType } from "./colorPickerUtils";
5
5
  import type { AppState } from "../../types";
6
6
  interface ColorPickerProps {
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import type { ExcalidrawElement } from "@orangecatai/element/types";
3
2
  import type { ColorPaletteCustom } from "@orangecatai/common";
3
+ import type { ExcalidrawElement } from "@orangecatai/element/types";
4
4
  import type { ColorPickerType } from "./colorPickerUtils";
5
5
  interface PickerProps {
6
6
  color: string | null;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Pure color conversion utilities for HSV ↔ RGB ↔ Hex with alpha support.
3
+ */
4
+ export interface HSVA {
5
+ h: number;
6
+ s: number;
7
+ v: number;
8
+ a: number;
9
+ }
10
+ export interface RGBA {
11
+ r: number;
12
+ g: number;
13
+ b: number;
14
+ a: number;
15
+ }
16
+ export declare const hsvaToRgba: ({ h, s, v, a }: HSVA) => RGBA;
17
+ export declare const rgbaToHsva: ({ r, g, b, a }: RGBA) => HSVA;
18
+ export declare const rgbaToHex: ({ r, g, b, a }: RGBA) => string;
19
+ export declare const hexToRgba: (hex: string) => RGBA;
20
+ export declare const hsvaToHex: (hsva: HSVA) => string;
21
+ export declare const hexToHsva: (hex: string) => HSVA;
22
+ /** Produces a CSS-safe rgba() string */
23
+ export declare const hsvaToRgbaString: (hsva: HSVA) => string;
24
+ /**
25
+ * Clamp a number between min and max.
26
+ */
27
+ export declare const clampValue: (value: number, min: number, max: number) => number;
@@ -1,6 +1,6 @@
1
+ import "./ConvertElementTypePopup.scss";
1
2
  import type { ConvertibleTypes, ExcalidrawElement, ExcalidrawTextContainer, ExcalidrawTextElementWithContainer } from "@orangecatai/element/types";
2
3
  import type { Scene } from "@orangecatai/element";
3
- import "./ConvertElementTypePopup.scss";
4
4
  import type App from "./App";
5
5
  export declare const convertElementTypePopupAtom: import("jotai/vanilla/atom").PrimitiveAtom<{
6
6
  type: "panel";
@@ -1,5 +1,5 @@
1
- import type { Theme } from "@orangecatai/element/types";
2
1
  import "./ToolIcon.scss";
2
+ import type { Theme } from "@orangecatai/element/types";
3
3
  export declare const DarkModeToggle: (props: {
4
4
  value: Theme;
5
5
  onChange: (value: Theme) => void;
@@ -1,10 +1,10 @@
1
- import type { MarkOptional } from "@orangecatai/common/utility-types";
2
1
  import "../components/dropdownMenu/DropdownMenu.scss";
2
+ import type { MarkOptional } from "@orangecatai/common/utility-types";
3
3
  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;
@@ -1,5 +1,5 @@
1
- import type { ElementsMap, NonDeletedExcalidrawElement } from "@orangecatai/element/types";
2
1
  import "./ElementCanvasButtons.scss";
2
+ import type { ElementsMap, NonDeletedExcalidrawElement } from "@orangecatai/element/types";
3
3
  export declare const ElementCanvasButtons: ({ children, element, elementsMap, }: {
4
4
  children: React.ReactNode;
5
5
  element: NonDeletedExcalidrawElement;
@@ -1,6 +1,6 @@
1
- import type { ExcalidrawElement } from "@orangecatai/element/types";
2
- import type { Scene } from "@orangecatai/element";
3
1
  import "./ElementLinkDialog.scss";
2
+ import type { Scene } from "@orangecatai/element";
3
+ import type { ExcalidrawElement } from "@orangecatai/element/types";
4
4
  import type { AppProps, UIAppState } from "../types";
5
5
  declare const ElementLinkDialog: ({ sourceElementId, onClose, appState, scene, generateLinkForSelection, }: {
6
6
  sourceElementId: ExcalidrawElement["id"];
@@ -1,5 +1,5 @@
1
- import type { ExcalidrawElement } from "@orangecatai/element/types";
2
1
  import "./EyeDropper.scss";
2
+ import type { ExcalidrawElement } from "@orangecatai/element/types";
3
3
  import type { ColorPickerType } from "./ColorPicker/colorPickerUtils";
4
4
  export type EyeDropperProperties = {
5
5
  keepOpenOnAlt: boolean;