@orangecatai/adgen-canvas 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.
- package/README.md +8 -12
- package/dist/dev/chunk-EP27W34X.js +7 -0
- package/dist/dev/chunk-EP27W34X.js.map +7 -0
- package/dist/dev/{chunk-23ZG3JRJ.js → chunk-YOQUQ6O5.js} +17 -4
- package/dist/dev/chunk-YOQUQ6O5.js.map +7 -0
- package/dist/dev/data/{image-D63IS3GP.js → image-IZS5VEYX.js} +3 -3
- package/dist/dev/index.css +2086 -0
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +5175 -1599
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-6XBRNJFC.js → chunk-2ALGWY4R.js} +3 -3
- package/dist/prod/{chunk-TDN63PPO.js → chunk-I4SUBR2Z.js} +1 -1
- package/dist/prod/data/image-PKF4YK4A.js +1 -0
- package/dist/prod/index.css +2 -1
- package/dist/prod/index.js +74 -29
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/element/src/arrows/focus.d.ts +1 -1
- package/dist/types/element/src/binding.d.ts +3 -3
- package/dist/types/element/src/bounds.d.ts +1 -1
- package/dist/types/element/src/collision.d.ts +1 -1
- package/dist/types/element/src/delta.d.ts +2 -2
- package/dist/types/element/src/dragElements.d.ts +1 -1
- package/dist/types/element/src/duplicate.d.ts +1 -1
- package/dist/types/element/src/embeddable.d.ts +1 -1
- package/dist/types/element/src/flowchart.d.ts +1 -1
- package/dist/types/element/src/frame.d.ts +1 -1
- package/dist/types/element/src/groups.d.ts +1 -1
- package/dist/types/element/src/renderElement.d.ts +1 -1
- package/dist/types/element/src/selection.d.ts +1 -1
- package/dist/types/element/src/shape.d.ts +2 -2
- package/dist/types/element/src/store.d.ts +2 -2
- package/dist/types/element/src/textElement.d.ts +1 -1
- package/dist/types/element/src/transform.d.ts +1 -1
- package/dist/types/element/src/utils.d.ts +1 -1
- package/dist/types/element/src/zindex.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +7 -7
- package/dist/types/excalidraw/actions/actionExport.d.ts +9 -9
- package/dist/types/excalidraw/actions/actionProperties.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +4 -4
- package/dist/types/excalidraw/components/AIChatPanel.d.ts +10 -0
- package/dist/types/excalidraw/components/Actions.d.ts +1 -1
- package/dist/types/excalidraw/components/App.d.ts +13 -2
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +1 -1
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
- package/dist/types/excalidraw/components/DefaultSidebar.d.ts +1 -1
- package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +2 -2
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +1 -1
- package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +1 -1
- package/dist/types/excalidraw/components/ImageExportDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/ImageGeneratorPanel.d.ts +38 -0
- package/dist/types/excalidraw/components/ImageQuickEditPanel.d.ts +7 -0
- package/dist/types/excalidraw/components/JSONExportDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/LayerUI.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
- package/dist/types/excalidraw/components/TTDDialog/types.d.ts +2 -2
- package/dist/types/excalidraw/components/ai-chat/agentLoop.d.ts +60 -0
- package/dist/types/excalidraw/components/ai-chat/canvasTools.d.ts +288 -0
- package/dist/types/excalidraw/components/image-generation/pendingGenerations.d.ts +30 -0
- package/dist/types/excalidraw/components/ui/avatar.d.ts +6 -0
- package/dist/types/excalidraw/components/ui/button.d.ts +11 -0
- package/dist/types/excalidraw/components/ui/chat-container.d.ts +17 -0
- package/dist/types/excalidraw/components/ui/code-block.d.ts +16 -0
- package/dist/types/excalidraw/components/ui/markdown.d.ts +10 -0
- package/dist/types/excalidraw/components/ui/message.d.ts +35 -0
- package/dist/types/excalidraw/components/ui/prompt-input.d.ts +28 -0
- package/dist/types/excalidraw/components/ui/scroll-button.d.ts +10 -0
- package/dist/types/excalidraw/components/ui/select.d.ts +13 -0
- package/dist/types/excalidraw/components/ui/textarea.d.ts +3 -0
- package/dist/types/excalidraw/components/ui/tooltip.d.ts +7 -0
- package/dist/types/excalidraw/data/blob.d.ts +19 -17
- package/dist/types/excalidraw/data/json.d.ts +8 -8
- package/dist/types/excalidraw/data/library.d.ts +1 -1
- package/dist/types/excalidraw/fonts/Fonts.d.ts +2 -2
- package/dist/types/excalidraw/i18n.d.ts +1 -1
- package/dist/types/excalidraw/index.d.ts +3 -0
- package/dist/types/excalidraw/lib/utils.d.ts +2 -0
- package/dist/types/excalidraw/types.d.ts +9 -0
- package/dist/types/excalidraw/utils/geminiApiKey.d.ts +1 -0
- package/package.json +33 -15
- package/CHANGELOG.md +0 -34
- package/dist/dev/chunk-23ZG3JRJ.js.map +0 -7
- package/dist/dev/chunk-L5IYTQZ4.js +0 -7
- package/dist/dev/chunk-L5IYTQZ4.js.map +0 -7
- package/dist/prod/data/image-H66RFTQG.js +0 -1
- package/history.ts +0 -249
- /package/dist/dev/data/{image-D63IS3GP.js.map → image-IZS5VEYX.js.map} +0 -0
|
@@ -10,14 +10,6 @@ name?: string) => Promise<{
|
|
|
10
10
|
export declare const loadFromJSON: (localAppState: AppState, localElements: readonly ExcalidrawElement[] | null) => Promise<{
|
|
11
11
|
elements: import("@orangecatai/element/types").OrderedExcalidrawElement[];
|
|
12
12
|
appState: {
|
|
13
|
-
viewBackgroundColor: string;
|
|
14
|
-
theme: import("@orangecatai/element/types").Theme;
|
|
15
|
-
frameRendering: {
|
|
16
|
-
enabled: boolean;
|
|
17
|
-
name: boolean;
|
|
18
|
-
outline: boolean;
|
|
19
|
-
clip: boolean;
|
|
20
|
-
};
|
|
21
13
|
name: string | null;
|
|
22
14
|
zoom: import("../types").Zoom;
|
|
23
15
|
scrollX: number;
|
|
@@ -41,6 +33,7 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
41
33
|
[id: string]: true;
|
|
42
34
|
}>;
|
|
43
35
|
frameToHighlight: import("@orangecatai/element/types").NonDeleted<import("@orangecatai/element/types").ExcalidrawFrameLikeElement> | null;
|
|
36
|
+
theme: import("@orangecatai/element/types").Theme;
|
|
44
37
|
activeTool: {
|
|
45
38
|
lastActiveTool: import("../types").ActiveTool | null;
|
|
46
39
|
locked: boolean;
|
|
@@ -78,6 +71,12 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
78
71
|
hoveredElementIds: Readonly<{
|
|
79
72
|
[id: string]: true;
|
|
80
73
|
}>;
|
|
74
|
+
frameRendering: {
|
|
75
|
+
enabled: boolean;
|
|
76
|
+
name: boolean;
|
|
77
|
+
outline: boolean;
|
|
78
|
+
clip: boolean;
|
|
79
|
+
};
|
|
81
80
|
shouldCacheIgnoreZoom: boolean;
|
|
82
81
|
exportScale: number;
|
|
83
82
|
currentItemArrowType: "sharp" | "round" | "elbow";
|
|
@@ -117,6 +116,7 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
117
116
|
currentItemEndArrowhead: import("@orangecatai/element/types").Arrowhead | null;
|
|
118
117
|
currentHoveredFontFamily: import("@orangecatai/element/types").FontFamilyValues | null;
|
|
119
118
|
currentItemRoundness: import("@orangecatai/element/types").StrokeRoundness;
|
|
119
|
+
viewBackgroundColor: string;
|
|
120
120
|
cursorButton: "up" | "down";
|
|
121
121
|
scrolledOutside: boolean;
|
|
122
122
|
isResizing: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExcalidrawElement } from "@orangecatai/element/types";
|
|
2
1
|
import type { MaybePromise } from "@orangecatai/common/utility-types";
|
|
2
|
+
import type { ExcalidrawElement } from "@orangecatai/element/types";
|
|
3
3
|
import type App from "../components/App";
|
|
4
4
|
import type { LibraryItems, ExcalidrawImperativeAPI, LibraryItemsSource, LibraryItems_anyVersion } from "../types";
|
|
5
5
|
export type LibraryPersistedData = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type FontMetadata } from "@orangecatai/common";
|
|
2
|
-
import type { ExcalidrawElement } from "@orangecatai/element/types";
|
|
3
|
-
import type { Scene } from "@orangecatai/element";
|
|
4
2
|
import { ExcalidrawFontFace } from "./ExcalidrawFontFace";
|
|
3
|
+
import type { Scene } from "@orangecatai/element";
|
|
4
|
+
import type { ExcalidrawElement } from "@orangecatai/element/types";
|
|
5
5
|
export declare class Fonts {
|
|
6
6
|
static readonly loadedFontsCache: Set<string>;
|
|
7
7
|
private static _registered;
|
|
@@ -6,6 +6,7 @@ import WelcomeScreen from "./components/welcome-screen/WelcomeScreen";
|
|
|
6
6
|
import "./css/app.scss";
|
|
7
7
|
import "./css/styles.scss";
|
|
8
8
|
import "./fonts/fonts.css";
|
|
9
|
+
import "./css/tailwind.generated.css";
|
|
9
10
|
import type { ExcalidrawProps } from "./types";
|
|
10
11
|
export declare const Excalidraw: React.MemoExoticComponent<(props: ExcalidrawProps) => import("react/jsx-runtime").JSX.Element>;
|
|
11
12
|
export { getSceneVersion, hashElementsVersion, hashString, getNonDeletedElements, } from "@orangecatai/element";
|
|
@@ -45,3 +46,5 @@ export { getDataURL } from "./data/blob";
|
|
|
45
46
|
export { isElementLink } from "@orangecatai/element";
|
|
46
47
|
export { setCustomTextMetricsProvider } from "@orangecatai/element";
|
|
47
48
|
export { CommandPalette } from "./components/CommandPalette/CommandPalette";
|
|
49
|
+
export { AIChatPanel } from "./components/AIChatPanel";
|
|
50
|
+
export type { AIChatPanelProps } from "./components/AIChatPanel";
|
|
@@ -491,6 +491,12 @@ export interface ExcalidrawProps {
|
|
|
491
491
|
aiEnabled?: boolean;
|
|
492
492
|
showDeprecatedFonts?: boolean;
|
|
493
493
|
renderScrollbars?: boolean;
|
|
494
|
+
/**
|
|
495
|
+
* Gemini API key for image generation.
|
|
496
|
+
* When provided, takes precedence over the VITE_APP_GEMINI_API_KEY env variable.
|
|
497
|
+
* Required for image generation when using this package as an npm dependency.
|
|
498
|
+
*/
|
|
499
|
+
geminiApiKey?: string;
|
|
494
500
|
}
|
|
495
501
|
export type SceneData = {
|
|
496
502
|
elements?: ImportedDataState["elements"];
|
|
@@ -571,6 +577,9 @@ export type AppClassProperties = {
|
|
|
571
577
|
setOpenDialog: App["setOpenDialog"];
|
|
572
578
|
insertEmbeddableElement: App["insertEmbeddableElement"];
|
|
573
579
|
onMagicframeToolSelect: App["onMagicframeToolSelect"];
|
|
580
|
+
onImageGeneratorSelect: App["onImageGeneratorSelect"];
|
|
581
|
+
insertGeneratedImageIntoFrame: App["insertGeneratedImageIntoFrame"];
|
|
582
|
+
insertGeneratedImageNearElement: App["insertGeneratedImageNearElement"];
|
|
574
583
|
getName: App["getName"];
|
|
575
584
|
dismissLinearEditor: App["dismissLinearEditor"];
|
|
576
585
|
flowChartCreator: App["flowChartCreator"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveGeminiApiKey(propKey?: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangecatai/adgen-canvas",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/excalidraw/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -38,14 +38,15 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"description": "
|
|
41
|
+
"description": "OrangeCat's canvas component (adgen-canvas), forked from Excalidraw",
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"keywords": [
|
|
44
|
+
"orangecat",
|
|
45
|
+
"adgen-canvas",
|
|
44
46
|
"excalidraw",
|
|
45
|
-
"excalidraw-embed",
|
|
46
47
|
"react",
|
|
47
|
-
"
|
|
48
|
-
"
|
|
48
|
+
"canvas",
|
|
49
|
+
"whiteboard"
|
|
49
50
|
],
|
|
50
51
|
"browserslist": {
|
|
51
52
|
"production": [
|
|
@@ -66,12 +67,13 @@
|
|
|
66
67
|
"last 1 safari version"
|
|
67
68
|
]
|
|
68
69
|
},
|
|
69
|
-
"repository": "https://github.com/
|
|
70
|
-
"bugs": "https://github.com/
|
|
71
|
-
"homepage": "https://
|
|
70
|
+
"repository": "https://github.com/Kraken2003/adgen-canvas",
|
|
71
|
+
"bugs": "https://github.com/Kraken2003/adgen-canvas/issues",
|
|
72
|
+
"homepage": "https://orangecat.ai",
|
|
72
73
|
"scripts": {
|
|
73
74
|
"gen:types": "rimraf types && tsc",
|
|
74
|
-
"build:
|
|
75
|
+
"build:tailwind": "tailwindcss -i ./css/tailwind.css -o ./css/tailwind.generated.css",
|
|
76
|
+
"build:esm": "rimraf dist && yarn build:tailwind && node ../../scripts/buildPackage.js && yarn gen:types"
|
|
75
77
|
},
|
|
76
78
|
"peerDependencies": {
|
|
77
79
|
"react": "^17.0.2 || ^18.2.0 || ^19.0.0",
|
|
@@ -79,16 +81,20 @@
|
|
|
79
81
|
},
|
|
80
82
|
"dependencies": {
|
|
81
83
|
"@braintree/sanitize-url": "6.0.2",
|
|
82
|
-
"@orangecatai/common": "0.0.1",
|
|
83
|
-
"@orangecatai/element": "0.0.1",
|
|
84
84
|
"@excalidraw/laser-pointer": "1.3.1",
|
|
85
|
-
"@orangecatai/math": "0.0.1",
|
|
86
85
|
"@excalidraw/mermaid-to-excalidraw": "2.0.0-rfc3",
|
|
87
86
|
"@excalidraw/random-username": "1.1.0",
|
|
88
|
-
"
|
|
87
|
+
"@orangecatai/common": "0.0.2",
|
|
88
|
+
"@orangecatai/element": "0.0.2",
|
|
89
|
+
"@orangecatai/math": "0.0.2",
|
|
90
|
+
"@radix-ui/react-avatar": "1.1.11",
|
|
91
|
+
"@radix-ui/react-select": "2.2.6",
|
|
92
|
+
"@radix-ui/react-slot": "1.2.4",
|
|
93
|
+
"@radix-ui/react-tooltip": "1.2.8",
|
|
89
94
|
"browser-fs-access": "0.29.1",
|
|
90
95
|
"canvas-roundrect-polyfill": "0.0.1",
|
|
91
|
-
"
|
|
96
|
+
"class-variance-authority": "0.7.1",
|
|
97
|
+
"clsx": "2",
|
|
92
98
|
"cross-env": "7.0.3",
|
|
93
99
|
"es6-promise-pool": "2.5.0",
|
|
94
100
|
"fractional-indexing": "3.2.0",
|
|
@@ -98,6 +104,8 @@
|
|
|
98
104
|
"jotai-scope": "0.7.2",
|
|
99
105
|
"lodash.debounce": "4.0.8",
|
|
100
106
|
"lodash.throttle": "4.1.1",
|
|
107
|
+
"lucide-react": "0.577.0",
|
|
108
|
+
"marked": "17.0.4",
|
|
101
109
|
"nanoid": "3.3.3",
|
|
102
110
|
"pako": "2.0.3",
|
|
103
111
|
"perfect-freehand": "1.2.0",
|
|
@@ -107,12 +115,20 @@
|
|
|
107
115
|
"png-chunks-extract": "1.0.0",
|
|
108
116
|
"points-on-curve": "1.0.1",
|
|
109
117
|
"pwacompat": "2.0.17",
|
|
118
|
+
"radix-ui": "1.4.3",
|
|
119
|
+
"react-markdown": "10.1.0",
|
|
120
|
+
"remark-breaks": "4.0.0",
|
|
121
|
+
"remark-gfm": "4.0.1",
|
|
110
122
|
"roughjs": "4.6.4",
|
|
111
123
|
"sass": "1.51.0",
|
|
112
|
-
"
|
|
124
|
+
"shiki": "4.0.1",
|
|
125
|
+
"tailwind-merge": "3.5.0",
|
|
126
|
+
"tunnel-rat": "0.1.2",
|
|
127
|
+
"use-stick-to-bottom": "1.1.3"
|
|
113
128
|
},
|
|
114
129
|
"devDependencies": {
|
|
115
130
|
"@size-limit/preset-big-lib": "9.0.0",
|
|
131
|
+
"@tailwindcss/cli": "4.2.1",
|
|
116
132
|
"@testing-library/dom": "10.4.0",
|
|
117
133
|
"@testing-library/jest-dom": "6.6.3",
|
|
118
134
|
"@testing-library/react": "16.2.0",
|
|
@@ -131,6 +147,8 @@
|
|
|
131
147
|
"fonteditor-core": "2.4.1",
|
|
132
148
|
"harfbuzzjs": "0.3.6",
|
|
133
149
|
"jest-diff": "29.7.0",
|
|
150
|
+
"postcss": "8.5.8",
|
|
151
|
+
"tailwindcss": "4.2.1",
|
|
134
152
|
"typescript": "5.9.3"
|
|
135
153
|
}
|
|
136
154
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
<!--
|
|
4
|
-
Guidelines for changelog:
|
|
5
|
-
The change should be grouped under one of the below section and must contain PR link.
|
|
6
|
-
- Features: For new features.
|
|
7
|
-
- Fixes: For bug fixes.
|
|
8
|
-
- Chore: Changes for non src files example package.json.
|
|
9
|
-
- Refactor: For any refactoring.
|
|
10
|
-
|
|
11
|
-
Please add the latest change on the top under the correct section.
|
|
12
|
-
-->
|
|
13
|
-
|
|
14
|
-
## Excalidraw Library
|
|
15
|
-
|
|
16
|
-
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
## 0.0.1 (2026-03-01)
|
|
20
|
-
|
|
21
|
-
## Excalidraw Library
|
|
22
|
-
|
|
23
|
-
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
## 0.0.1
|
|
27
|
-
|
|
28
|
-
First release of `@orangecatai/adgen-canvas`
|
|
29
|
-
|
|
30
|
-
## Excalidraw Library
|
|
31
|
-
|
|
32
|
-
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
33
|
-
|
|
34
|
-
---
|