@xpert-ai/plugin-excalidraw 0.1.0
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/.xpertai-plugin/plugin.json +118 -0
- package/README.md +5 -0
- package/assets/composerIcon.svg +5 -0
- package/assets/logo.svg +8 -0
- package/dist/docs/excalidraw-agent-skill.md +32 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +153 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/constants.d.ts +24 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +42 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/entities/excalidraw-action-log.entity.d.ts +18 -0
- package/dist/lib/entities/excalidraw-action-log.entity.d.ts.map +1 -0
- package/dist/lib/entities/excalidraw-action-log.entity.js +69 -0
- package/dist/lib/entities/excalidraw-action-log.entity.js.map +1 -0
- package/dist/lib/entities/excalidraw-drawing-version.entity.d.ts +21 -0
- package/dist/lib/entities/excalidraw-drawing-version.entity.d.ts.map +1 -0
- package/dist/lib/entities/excalidraw-drawing-version.entity.js +82 -0
- package/dist/lib/entities/excalidraw-drawing-version.entity.js.map +1 -0
- package/dist/lib/entities/excalidraw-drawing.entity.d.ts +24 -0
- package/dist/lib/entities/excalidraw-drawing.entity.d.ts.map +1 -0
- package/dist/lib/entities/excalidraw-drawing.entity.js +94 -0
- package/dist/lib/entities/excalidraw-drawing.entity.js.map +1 -0
- package/dist/lib/entities/index.d.ts +4 -0
- package/dist/lib/entities/index.d.ts.map +1 -0
- package/dist/lib/entities/index.js +4 -0
- package/dist/lib/entities/index.js.map +1 -0
- package/dist/lib/excalidraw-view.provider.d.ts +14 -0
- package/dist/lib/excalidraw-view.provider.d.ts.map +1 -0
- package/dist/lib/excalidraw-view.provider.js +423 -0
- package/dist/lib/excalidraw-view.provider.js.map +1 -0
- package/dist/lib/excalidraw.middleware.d.ts +10 -0
- package/dist/lib/excalidraw.middleware.d.ts.map +1 -0
- package/dist/lib/excalidraw.middleware.js +173 -0
- package/dist/lib/excalidraw.middleware.js.map +1 -0
- package/dist/lib/excalidraw.plugin.d.ts +8 -0
- package/dist/lib/excalidraw.plugin.d.ts.map +1 -0
- package/dist/lib/excalidraw.plugin.js +27 -0
- package/dist/lib/excalidraw.plugin.js.map +1 -0
- package/dist/lib/excalidraw.service.d.ts +169 -0
- package/dist/lib/excalidraw.service.d.ts.map +1 -0
- package/dist/lib/excalidraw.service.js +441 -0
- package/dist/lib/excalidraw.service.js.map +1 -0
- package/dist/lib/excalidraw.templates.d.ts +3 -0
- package/dist/lib/excalidraw.templates.d.ts.map +1 -0
- package/dist/lib/excalidraw.templates.js +78 -0
- package/dist/lib/excalidraw.templates.js.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/app.css +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/app.js +5105 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/i18n.d.ts +3 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/i18n.d.ts.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/i18n.js +103 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/i18n.js.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/i18n.ts +151 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/main.tsx +1411 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-dom-client-shim.d.ts +3 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-dom-client-shim.d.ts.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-dom-client-shim.js +4 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-dom-client-shim.js.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-dom-client-shim.ts +4 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-dom-shim.d.ts +11 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-dom-shim.d.ts.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-dom-shim.js +11 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-dom-shim.js.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-dom-shim.ts +11 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-jsx-runtime-shim.d.ts +5 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-jsx-runtime-shim.d.ts.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-jsx-runtime-shim.js +8 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-jsx-runtime-shim.js.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-jsx-runtime-shim.ts +8 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-shim.d.ts +36 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-shim.d.ts.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-shim.js +36 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-shim.js.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/react-shim.ts +36 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/runtime.d.ts +21 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/runtime.d.ts.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/runtime.js +198 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/runtime.js.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/runtime.ts +228 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/styles.d.ts +2 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/styles.d.ts.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/styles.js +324 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/styles.js.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/styles.ts +323 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/vendor.d.ts +4 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/vendor.d.ts.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/vendor.js +4 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/vendor.js.map +1 -0
- package/dist/lib/remote-components/excalidraw-workbench/src/vendor.ts +3 -0
- package/dist/lib/types.d.ts +74 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/xpert-excalidraw-assistant.yaml +129 -0
- package/package.json +87 -0
- package/skills/index/SKILL.md +46 -0
- package/skills/index/agents/xpertai.yaml +6 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
export function injectStyles() {
|
|
2
|
+
if (document.getElementById('excalidraw-workbench-styles')) {
|
|
3
|
+
return
|
|
4
|
+
}
|
|
5
|
+
const style = document.createElement('style')
|
|
6
|
+
style.id = 'excalidraw-workbench-styles'
|
|
7
|
+
style.textContent = `
|
|
8
|
+
html, body, #root {
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
min-height: 100%;
|
|
12
|
+
margin: 0;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
background: var(--xps-background);
|
|
15
|
+
color: var(--xps-foreground);
|
|
16
|
+
font-family: var(--xps-font-sans);
|
|
17
|
+
}
|
|
18
|
+
* {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
}
|
|
21
|
+
button, input, select, textarea {
|
|
22
|
+
font: inherit;
|
|
23
|
+
}
|
|
24
|
+
.exw-shell {
|
|
25
|
+
--exw-rail-width: var(--xps-sidebar-rail-width, 44px);
|
|
26
|
+
--exw-panel-header-height: 2.5rem;
|
|
27
|
+
--exw-left-width: minmax(var(--exw-rail-width), clamp(240px, 20vw, 300px));
|
|
28
|
+
--exw-right-width: var(--exw-rail-width);
|
|
29
|
+
--exw-right-panel-width: min(320px, calc(100vw - var(--exw-rail-width) - 96px));
|
|
30
|
+
width: 100%;
|
|
31
|
+
height: 100vh;
|
|
32
|
+
min-height: 720px;
|
|
33
|
+
display: grid;
|
|
34
|
+
grid-template-columns: var(--exw-left-width) minmax(0, 1fr) var(--exw-right-width);
|
|
35
|
+
background: var(--xps-background);
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
transition: grid-template-columns 160ms ease;
|
|
38
|
+
}
|
|
39
|
+
.exw-shell.left-collapsed {
|
|
40
|
+
--exw-left-width: var(--exw-rail-width);
|
|
41
|
+
}
|
|
42
|
+
.exw-shell.right-collapsed {
|
|
43
|
+
--exw-right-width: var(--exw-rail-width);
|
|
44
|
+
}
|
|
45
|
+
.exw-shell.left-collapsed.right-collapsed {
|
|
46
|
+
--exw-left-width: var(--exw-rail-width);
|
|
47
|
+
--exw-right-width: var(--exw-rail-width);
|
|
48
|
+
}
|
|
49
|
+
.exw-sidebar, .exw-inspector {
|
|
50
|
+
min-width: 0;
|
|
51
|
+
height: 100vh;
|
|
52
|
+
min-height: 720px;
|
|
53
|
+
}
|
|
54
|
+
.exw-inspector.xps-sidebar {
|
|
55
|
+
position: relative;
|
|
56
|
+
z-index: 30;
|
|
57
|
+
overflow: visible;
|
|
58
|
+
}
|
|
59
|
+
.exw-inspector[aria-expanded="true"] {
|
|
60
|
+
background: color-mix(in srgb, var(--xps-card) 94%, var(--xps-muted) 6%);
|
|
61
|
+
}
|
|
62
|
+
.exw-inspector[aria-expanded="true"] > .xps-sidebar-header,
|
|
63
|
+
.exw-inspector[aria-expanded="true"] > .xps-sidebar-content {
|
|
64
|
+
position: absolute;
|
|
65
|
+
right: 0;
|
|
66
|
+
width: var(--exw-right-panel-width);
|
|
67
|
+
max-width: calc(100vw - 16px);
|
|
68
|
+
z-index: 31;
|
|
69
|
+
background: var(--xps-card);
|
|
70
|
+
border-left: 1px solid var(--xps-border);
|
|
71
|
+
border-right: 1px solid var(--xps-border);
|
|
72
|
+
box-shadow: -12px 0 28px color-mix(in srgb, var(--xps-foreground) 14%, transparent);
|
|
73
|
+
}
|
|
74
|
+
.exw-inspector[aria-expanded="true"] > .xps-sidebar-header {
|
|
75
|
+
top: 0;
|
|
76
|
+
min-height: var(--exw-panel-header-height);
|
|
77
|
+
border-bottom: 1px solid var(--xps-border);
|
|
78
|
+
}
|
|
79
|
+
.exw-inspector[aria-expanded="true"] > .xps-sidebar-content {
|
|
80
|
+
top: var(--exw-panel-header-height);
|
|
81
|
+
bottom: 0;
|
|
82
|
+
min-height: 0;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
}
|
|
85
|
+
.exw-sidebar-title-truncate {
|
|
86
|
+
flex: 1 1 auto;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
text-overflow: ellipsis;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
}
|
|
91
|
+
.exw-sidebar-trigger-right {
|
|
92
|
+
margin-left: auto;
|
|
93
|
+
}
|
|
94
|
+
.exw-inspector-actions {
|
|
95
|
+
min-width: 0;
|
|
96
|
+
flex: 0 0 auto;
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
gap: 6px;
|
|
100
|
+
}
|
|
101
|
+
.exw-inspector-actions .xps-button,
|
|
102
|
+
.exw-inspector-actions .xps-badge {
|
|
103
|
+
flex: 0 0 auto;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
}
|
|
106
|
+
.exw-sidebar-controls {
|
|
107
|
+
padding: 8px;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
gap: 8px;
|
|
111
|
+
border-bottom: 1px solid var(--xps-border);
|
|
112
|
+
}
|
|
113
|
+
.exw-main {
|
|
114
|
+
min-width: 0;
|
|
115
|
+
height: 100vh;
|
|
116
|
+
min-height: 720px;
|
|
117
|
+
display: grid;
|
|
118
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
119
|
+
background: var(--xps-background);
|
|
120
|
+
}
|
|
121
|
+
.exw-toolbar {
|
|
122
|
+
display: grid;
|
|
123
|
+
grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
|
|
124
|
+
align-items: center;
|
|
125
|
+
gap: 8px 10px;
|
|
126
|
+
min-height: 48px;
|
|
127
|
+
padding: 8px 12px;
|
|
128
|
+
background: var(--xps-card);
|
|
129
|
+
border-bottom: 1px solid var(--xps-border);
|
|
130
|
+
min-width: 0;
|
|
131
|
+
overflow: visible;
|
|
132
|
+
}
|
|
133
|
+
.exw-toolbar-title {
|
|
134
|
+
min-width: 0;
|
|
135
|
+
}
|
|
136
|
+
.exw-toolbar-actions {
|
|
137
|
+
min-width: 0;
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-wrap: wrap;
|
|
140
|
+
align-items: center;
|
|
141
|
+
gap: 8px;
|
|
142
|
+
}
|
|
143
|
+
.exw-toolbar-actions .xps-button,
|
|
144
|
+
.exw-toolbar-actions .xps-badge {
|
|
145
|
+
flex: 0 0 auto;
|
|
146
|
+
}
|
|
147
|
+
.exw-title-input {
|
|
148
|
+
width: 100%;
|
|
149
|
+
}
|
|
150
|
+
.exw-button-icon {
|
|
151
|
+
width: 1rem;
|
|
152
|
+
height: 1rem;
|
|
153
|
+
flex: 0 0 auto;
|
|
154
|
+
stroke-width: 2;
|
|
155
|
+
}
|
|
156
|
+
.exw-canvas {
|
|
157
|
+
min-height: 0;
|
|
158
|
+
height: 100%;
|
|
159
|
+
background: var(--xps-background);
|
|
160
|
+
position: relative;
|
|
161
|
+
overflow: hidden;
|
|
162
|
+
}
|
|
163
|
+
.exw-canvas .excalidraw {
|
|
164
|
+
--color-primary: var(--xps-primary);
|
|
165
|
+
}
|
|
166
|
+
.exw-list {
|
|
167
|
+
flex: 1 1 auto;
|
|
168
|
+
min-height: 0;
|
|
169
|
+
padding: 6px;
|
|
170
|
+
}
|
|
171
|
+
.exw-item-title {
|
|
172
|
+
display: block;
|
|
173
|
+
width: 100%;
|
|
174
|
+
color: var(--xps-foreground);
|
|
175
|
+
font-weight: 650;
|
|
176
|
+
overflow: hidden;
|
|
177
|
+
text-overflow: ellipsis;
|
|
178
|
+
white-space: nowrap;
|
|
179
|
+
}
|
|
180
|
+
.exw-item-meta, .exw-muted {
|
|
181
|
+
color: var(--xps-muted-foreground);
|
|
182
|
+
font-size: 12px;
|
|
183
|
+
min-width: 0;
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
text-overflow: ellipsis;
|
|
186
|
+
white-space: nowrap;
|
|
187
|
+
}
|
|
188
|
+
.exw-status {
|
|
189
|
+
margin-left: auto;
|
|
190
|
+
flex: 0 0 auto;
|
|
191
|
+
}
|
|
192
|
+
.exw-inspector-scroll {
|
|
193
|
+
min-height: 0;
|
|
194
|
+
height: 100%;
|
|
195
|
+
flex: 1 1 auto;
|
|
196
|
+
}
|
|
197
|
+
.exw-inspector-stack {
|
|
198
|
+
padding: 10px;
|
|
199
|
+
padding-right: 12px;
|
|
200
|
+
display: flex;
|
|
201
|
+
flex-direction: column;
|
|
202
|
+
gap: 10px;
|
|
203
|
+
min-width: 0;
|
|
204
|
+
max-width: 100%;
|
|
205
|
+
}
|
|
206
|
+
.exw-section {
|
|
207
|
+
display: flex;
|
|
208
|
+
flex-direction: column;
|
|
209
|
+
gap: 8px;
|
|
210
|
+
min-width: 0;
|
|
211
|
+
max-width: 100%;
|
|
212
|
+
}
|
|
213
|
+
.exw-section-title {
|
|
214
|
+
font-size: 13px;
|
|
215
|
+
font-weight: 700;
|
|
216
|
+
color: var(--xps-foreground);
|
|
217
|
+
}
|
|
218
|
+
.exw-inline-actions {
|
|
219
|
+
display: flex;
|
|
220
|
+
flex-wrap: wrap;
|
|
221
|
+
gap: 8px;
|
|
222
|
+
}
|
|
223
|
+
.exw-version {
|
|
224
|
+
border: 1px solid var(--xps-border);
|
|
225
|
+
border-radius: var(--xps-radius);
|
|
226
|
+
background: color-mix(in srgb, var(--xps-card) 94%, var(--xps-muted) 6%);
|
|
227
|
+
padding: 8px;
|
|
228
|
+
display: grid;
|
|
229
|
+
grid-template-columns: minmax(0, 1fr) var(--xps-control-height);
|
|
230
|
+
align-items: center;
|
|
231
|
+
gap: 8px;
|
|
232
|
+
width: 100%;
|
|
233
|
+
min-width: 0;
|
|
234
|
+
overflow: hidden;
|
|
235
|
+
}
|
|
236
|
+
.exw-version > div {
|
|
237
|
+
min-width: 0;
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
}
|
|
240
|
+
.exw-version > div > div {
|
|
241
|
+
min-width: 0;
|
|
242
|
+
overflow: hidden;
|
|
243
|
+
text-overflow: ellipsis;
|
|
244
|
+
white-space: nowrap;
|
|
245
|
+
}
|
|
246
|
+
.exw-version-action.xps-button {
|
|
247
|
+
width: var(--xps-control-height);
|
|
248
|
+
height: var(--xps-control-height);
|
|
249
|
+
padding: 0;
|
|
250
|
+
justify-self: end;
|
|
251
|
+
}
|
|
252
|
+
.exw-inspector .xps-input,
|
|
253
|
+
.exw-inspector .xps-textarea,
|
|
254
|
+
.exw-inspector .xps-scroll-area,
|
|
255
|
+
.exw-inspector .xps-scroll-area-viewport {
|
|
256
|
+
min-width: 0;
|
|
257
|
+
max-width: 100%;
|
|
258
|
+
}
|
|
259
|
+
.exw-inspector .xps-textarea {
|
|
260
|
+
overflow-x: hidden;
|
|
261
|
+
overflow-wrap: anywhere;
|
|
262
|
+
word-break: break-word;
|
|
263
|
+
}
|
|
264
|
+
.exw-inspector .exw-muted {
|
|
265
|
+
overflow: visible;
|
|
266
|
+
text-overflow: clip;
|
|
267
|
+
white-space: normal;
|
|
268
|
+
overflow-wrap: anywhere;
|
|
269
|
+
}
|
|
270
|
+
.exw-empty {
|
|
271
|
+
height: 100%;
|
|
272
|
+
display: flex;
|
|
273
|
+
align-items: center;
|
|
274
|
+
justify-content: center;
|
|
275
|
+
color: var(--xps-muted-foreground);
|
|
276
|
+
}
|
|
277
|
+
.exw-hidden-file {
|
|
278
|
+
display: none;
|
|
279
|
+
}
|
|
280
|
+
@media (max-width: 1040px) {
|
|
281
|
+
.exw-shell,
|
|
282
|
+
.exw-shell.left-collapsed,
|
|
283
|
+
.exw-shell.right-collapsed,
|
|
284
|
+
.exw-shell.left-collapsed.right-collapsed {
|
|
285
|
+
--exw-left-width: var(--exw-rail-width);
|
|
286
|
+
--exw-right-width: var(--exw-rail-width);
|
|
287
|
+
--exw-right-panel-width: min(300px, calc(100vw - var(--exw-rail-width) - 32px));
|
|
288
|
+
grid-template-columns: var(--exw-left-width) minmax(0, 1fr) var(--exw-right-width);
|
|
289
|
+
}
|
|
290
|
+
.exw-sidebar:not([aria-expanded="false"]),
|
|
291
|
+
.exw-inspector:not([aria-expanded="false"]) {
|
|
292
|
+
width: var(--exw-rail-width);
|
|
293
|
+
}
|
|
294
|
+
.exw-sidebar .xps-sidebar-content,
|
|
295
|
+
.exw-inspector-scroll {
|
|
296
|
+
display: none;
|
|
297
|
+
}
|
|
298
|
+
.exw-inspector[aria-expanded="true"] .exw-inspector-scroll {
|
|
299
|
+
display: block;
|
|
300
|
+
}
|
|
301
|
+
.exw-sidebar .xps-sidebar-header .xps-sidebar-title,
|
|
302
|
+
.exw-sidebar .xps-sidebar-header .xps-badge,
|
|
303
|
+
.exw-sidebar .xps-sidebar-header .xps-button:not(.xps-sidebar-trigger),
|
|
304
|
+
.exw-inspector[aria-expanded="false"] .xps-sidebar-header .xps-sidebar-title,
|
|
305
|
+
.exw-inspector[aria-expanded="false"] .xps-sidebar-header .xps-badge,
|
|
306
|
+
.exw-inspector[aria-expanded="false"] .xps-sidebar-header .xps-button:not(.xps-sidebar-trigger) {
|
|
307
|
+
display: none;
|
|
308
|
+
}
|
|
309
|
+
.xps-sidebar-rail {
|
|
310
|
+
display: flex;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
@media (max-width: 920px) {
|
|
314
|
+
.exw-toolbar {
|
|
315
|
+
grid-template-columns: minmax(0, 1fr);
|
|
316
|
+
}
|
|
317
|
+
.exw-status {
|
|
318
|
+
margin-left: 0;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
`
|
|
322
|
+
document.head.appendChild(style)
|
|
323
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendor.d.ts","sourceRoot":"","sources":["../../../../../src/lib/remote-components/excalidraw-workbench/src/vendor.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,KAAwB,CAAA;AAC1C,eAAO,MAAM,QAAQ,KAA2B,CAAA;AAChD,eAAO,MAAM,CAAC,KAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vendor.js","sourceRoot":"","sources":["../../../../../src/lib/remote-components/excalidraw-workbench/src/vendor.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAI,MAAc,CAAC,KAAK,CAAA;AAC1C,MAAM,CAAC,MAAM,QAAQ,GAAI,MAAc,CAAC,QAAQ,CAAA;AAChD,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,aAAa,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export type ExcalidrawDrawingStatus = 'draft' | 'reviewed' | 'archived';
|
|
2
|
+
export type ExcalidrawDrawingKind = 'diagram' | 'whiteboard' | 'flowchart' | 'architecture' | 'wireframe' | 'other';
|
|
3
|
+
export type ExcalidrawVersionSource = 'agent_json' | 'agent_patch' | 'agent_mermaid' | 'workbench' | 'workbench_mermaid' | 'import' | 'restore';
|
|
4
|
+
export type ExcalidrawActorType = 'agent' | 'user' | 'system';
|
|
5
|
+
export type ExcalidrawActionType = 'drawing_created' | 'version_saved' | 'scene_patched' | 'mermaid_draft_saved' | 'status_updated' | 'version_restored' | 'drawing_archived' | 'failure_reported';
|
|
6
|
+
export interface ExcalidrawScope {
|
|
7
|
+
tenantId: string;
|
|
8
|
+
organizationId?: string | null;
|
|
9
|
+
workspaceId?: string | null;
|
|
10
|
+
projectId?: string | null;
|
|
11
|
+
userId?: string | null;
|
|
12
|
+
assistantId?: string | null;
|
|
13
|
+
conversationId?: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface ExcalidrawSceneInput {
|
|
16
|
+
elements?: unknown[];
|
|
17
|
+
appState?: Record<string, unknown> | null;
|
|
18
|
+
files?: Record<string, unknown> | null;
|
|
19
|
+
mermaidSource?: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface CreateExcalidrawDrawingInput extends ExcalidrawSceneInput {
|
|
22
|
+
title: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
kind?: ExcalidrawDrawingKind;
|
|
25
|
+
tags?: string[];
|
|
26
|
+
source?: string;
|
|
27
|
+
changeSummary?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SaveExcalidrawSceneVersionInput extends ExcalidrawSceneInput {
|
|
30
|
+
drawingId: string;
|
|
31
|
+
sourceType?: ExcalidrawVersionSource;
|
|
32
|
+
changeSummary?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface PatchExcalidrawSceneInput {
|
|
35
|
+
drawingId: string;
|
|
36
|
+
addElements?: unknown[];
|
|
37
|
+
updateElements?: Array<Record<string, unknown> & {
|
|
38
|
+
id: string;
|
|
39
|
+
}>;
|
|
40
|
+
deleteElementIds?: string[];
|
|
41
|
+
appStatePatch?: Record<string, unknown>;
|
|
42
|
+
files?: Record<string, unknown> | null;
|
|
43
|
+
mermaidSource?: string | null;
|
|
44
|
+
changeSummary?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface SaveExcalidrawMermaidDraftInput {
|
|
47
|
+
drawingId?: string;
|
|
48
|
+
title?: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
kind?: ExcalidrawDrawingKind;
|
|
51
|
+
mermaidSource: string;
|
|
52
|
+
changeSummary?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface SearchExcalidrawDrawingsInput {
|
|
55
|
+
status?: ExcalidrawDrawingStatus;
|
|
56
|
+
kind?: ExcalidrawDrawingKind;
|
|
57
|
+
search?: string;
|
|
58
|
+
page?: number;
|
|
59
|
+
pageSize?: number;
|
|
60
|
+
}
|
|
61
|
+
export interface UpdateExcalidrawDrawingStatusInput {
|
|
62
|
+
drawingId: string;
|
|
63
|
+
status: ExcalidrawDrawingStatus;
|
|
64
|
+
reason?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface ReportExcalidrawFailureInput {
|
|
67
|
+
drawingId?: string;
|
|
68
|
+
versionId?: string;
|
|
69
|
+
operation: string;
|
|
70
|
+
errorMessage: string;
|
|
71
|
+
recoverable?: boolean;
|
|
72
|
+
evidence?: unknown;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
team:
|
|
2
|
+
name: excalidraw-assistant
|
|
3
|
+
type: agent
|
|
4
|
+
title: Excalidraw 绘图助手
|
|
5
|
+
description: 面向流程图、架构图、线框图和自由白板的 Agentic Drawing 助手
|
|
6
|
+
avatar:
|
|
7
|
+
emoji:
|
|
8
|
+
id: art
|
|
9
|
+
background: rgb(219, 234, 254)
|
|
10
|
+
options:
|
|
11
|
+
templateKey: excalidraw-assistant
|
|
12
|
+
dataXpert:
|
|
13
|
+
managedBy: data-xpert
|
|
14
|
+
templateKey: excalidraw-assistant
|
|
15
|
+
assistantKind: business-assistant
|
|
16
|
+
businessDomain: excalidraw
|
|
17
|
+
requiredPlugin: '@xpert-ai/plugin-excalidraw'
|
|
18
|
+
requiredPlugins:
|
|
19
|
+
- '@xpert-ai/plugin-excalidraw'
|
|
20
|
+
requiredCapabilities:
|
|
21
|
+
- excalidraw
|
|
22
|
+
- diagram-workbench
|
|
23
|
+
- agent-drawing
|
|
24
|
+
agentConfig:
|
|
25
|
+
stateVariables:
|
|
26
|
+
- name: currentDrawingId
|
|
27
|
+
type: string
|
|
28
|
+
default: ""
|
|
29
|
+
description: Current Excalidraw drawing id selected in the workbench
|
|
30
|
+
operation: null
|
|
31
|
+
- name: currentVersionId
|
|
32
|
+
type: string
|
|
33
|
+
default: ""
|
|
34
|
+
description: Current Excalidraw version id selected in the workbench
|
|
35
|
+
operation: null
|
|
36
|
+
recursionLimit: 10000
|
|
37
|
+
features:
|
|
38
|
+
sandbox:
|
|
39
|
+
enabled: true
|
|
40
|
+
provider: docker-sandbox
|
|
41
|
+
version: "1"
|
|
42
|
+
agent:
|
|
43
|
+
key: Agent_Excalidraw
|
|
44
|
+
copilotModel:
|
|
45
|
+
referencedId: null
|
|
46
|
+
modelType: llm
|
|
47
|
+
model: qwen3.6-plus
|
|
48
|
+
options:
|
|
49
|
+
context_size: 1000000
|
|
50
|
+
temperature: 0.2
|
|
51
|
+
maxRetries: 6
|
|
52
|
+
max_tokens: 8192
|
|
53
|
+
top_p: 0.95
|
|
54
|
+
knowledgebases: []
|
|
55
|
+
toolsets: []
|
|
56
|
+
tags: []
|
|
57
|
+
nodes:
|
|
58
|
+
- type: agent
|
|
59
|
+
key: Agent_Excalidraw
|
|
60
|
+
position:
|
|
61
|
+
x: 860
|
|
62
|
+
y: 20
|
|
63
|
+
entity:
|
|
64
|
+
key: Agent_Excalidraw
|
|
65
|
+
name: excalidraw-assistant
|
|
66
|
+
title: Excalidraw 绘图助手
|
|
67
|
+
description: 面向流程图、架构图、线框图和自由白板的 Agentic Drawing 助手
|
|
68
|
+
avatar:
|
|
69
|
+
emoji:
|
|
70
|
+
id: art
|
|
71
|
+
background: rgb(219, 234, 254)
|
|
72
|
+
prompt: >
|
|
73
|
+
You are Excalidraw Drawing Assistant, a data-xpert business assistant for
|
|
74
|
+
creating and managing reviewable Excalidraw drawings.
|
|
75
|
+
|
|
76
|
+
Use Excalidraw middleware tools as the system of record. Do not claim that a
|
|
77
|
+
drawing was saved unless a tool call succeeded. Keep every drawing reviewable,
|
|
78
|
+
editable, and versioned.
|
|
79
|
+
|
|
80
|
+
Drawing workflow:
|
|
81
|
+
1. Clarify the drawing goal, audience, key nodes, relationships, and any visual
|
|
82
|
+
constraints when the request is ambiguous.
|
|
83
|
+
2. Prefer Mermaid for flowcharts, architecture flows, state flows, and simple
|
|
84
|
+
dependency diagrams. Save Mermaid with excalidraw_save_mermaid_draft so the
|
|
85
|
+
workbench can auto-preview it as an Excalidraw scene for user review.
|
|
86
|
+
3. Use direct Excalidraw JSON elements when the user needs precise layout,
|
|
87
|
+
annotations, freeform whiteboarding, wireframes, or a targeted edit.
|
|
88
|
+
4. When updating an existing drawing, call excalidraw_get_drawing first, preserve
|
|
89
|
+
existing user edits, then call excalidraw_patch_scene for small changes or
|
|
90
|
+
excalidraw_save_scene_version for a full replacement.
|
|
91
|
+
5. Use clear titles, short change summaries, and tags when useful.
|
|
92
|
+
6. If source material cannot be converted or the request conflicts with the
|
|
93
|
+
current drawing, call excalidraw_report_failure and explain the smallest
|
|
94
|
+
useful next step.
|
|
95
|
+
|
|
96
|
+
Mermaid rules:
|
|
97
|
+
- Flowcharts convert to editable Excalidraw elements best.
|
|
98
|
+
- For Mermaid diagram types that may convert as an image, warn the user that
|
|
99
|
+
manual editing may be limited after conversion.
|
|
100
|
+
- Keep Mermaid source concise, syntactically valid, and readable.
|
|
101
|
+
|
|
102
|
+
Excalidraw JSON rules:
|
|
103
|
+
- Elements must be serializable JSON and include stable ids.
|
|
104
|
+
- Use simple shapes, text labels, arrows, and grouping by visual proximity.
|
|
105
|
+
- Avoid overwriting files or appState unless required.
|
|
106
|
+
- Report uncertainty in the response instead of inventing missing domain facts.
|
|
107
|
+
|
|
108
|
+
Prefer concise Chinese responses for end users unless they ask otherwise.
|
|
109
|
+
collaboratorNames: []
|
|
110
|
+
toolsetIds: []
|
|
111
|
+
knowledgebaseIds: []
|
|
112
|
+
hash: excalidraw-agent-v1
|
|
113
|
+
- type: workflow
|
|
114
|
+
key: Middleware_Excalidraw
|
|
115
|
+
position:
|
|
116
|
+
x: 1160
|
|
117
|
+
y: 332
|
|
118
|
+
entity:
|
|
119
|
+
type: middleware
|
|
120
|
+
key: Middleware_Excalidraw
|
|
121
|
+
title: Excalidraw Agent Tools
|
|
122
|
+
provider: ExcalidrawMiddleware
|
|
123
|
+
required: true
|
|
124
|
+
hash: excalidraw-middleware-v1
|
|
125
|
+
connections:
|
|
126
|
+
- type: workflow
|
|
127
|
+
key: Agent_Excalidraw/Middleware_Excalidraw
|
|
128
|
+
from: Agent_Excalidraw
|
|
129
|
+
to: Middleware_Excalidraw
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xpert-ai/plugin-excalidraw",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Excalidraw app plugin for agent-created diagrams, reviewable drawing versions, Mermaid drafts, and an editable workbench.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "XpertAI",
|
|
7
|
+
"url": "https://xpertai.cn"
|
|
8
|
+
},
|
|
9
|
+
"license": "AGPL-3.0",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/xpert-ai/xpert-plugins.git",
|
|
13
|
+
"directory": "xpertai/apps/excalidraw"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/xpert-ai/xpert-plugins/issues"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
"./package.json": "./package.json",
|
|
24
|
+
".": {
|
|
25
|
+
"@xpert-plugins-starter/source": "./src/index.ts",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"default": "./dist/index.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
".xpertai-plugin",
|
|
34
|
+
"assets",
|
|
35
|
+
"skills",
|
|
36
|
+
"README.md",
|
|
37
|
+
"!**/*.tsbuildinfo"
|
|
38
|
+
],
|
|
39
|
+
"xpert": {
|
|
40
|
+
"plugin": {
|
|
41
|
+
"level": "system"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@excalidraw/excalidraw": "0.18.1",
|
|
46
|
+
"@excalidraw/mermaid-to-excalidraw": "2.2.2",
|
|
47
|
+
"tslib": "^2.3.0",
|
|
48
|
+
"@xpert-ai/plugin-shadcn-ui": "0.1.0"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@langchain/core": ">=0.3.0",
|
|
52
|
+
"@nestjs/common": "^11.1.6",
|
|
53
|
+
"@nestjs/core": "^11.1.6",
|
|
54
|
+
"@nestjs/typeorm": "^11.0.0",
|
|
55
|
+
"@xpert-ai/contracts": "^3.10.1",
|
|
56
|
+
"@xpert-ai/plugin-sdk": "^3.10.1",
|
|
57
|
+
"react": ">=18",
|
|
58
|
+
"react-dom": ">=18",
|
|
59
|
+
"typeorm": "^0.3.24",
|
|
60
|
+
"zod": "3.25.67"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@langchain/core": "0.3.72",
|
|
64
|
+
"@nestjs/common": "^11.1.6",
|
|
65
|
+
"@nestjs/core": "^11.1.6",
|
|
66
|
+
"@nestjs/typeorm": "^11.0.0",
|
|
67
|
+
"@types/node": "^20.19.9",
|
|
68
|
+
"@xpert-ai/contracts": "3.10.1",
|
|
69
|
+
"@xpert-ai/plugin-sdk": "^3.10.1",
|
|
70
|
+
"esbuild": "^0.27.0",
|
|
71
|
+
"react": "^18.3.1",
|
|
72
|
+
"react-dom": "^18.3.1",
|
|
73
|
+
"reflect-metadata": "^0.2.2",
|
|
74
|
+
"typeorm": "^0.3.24",
|
|
75
|
+
"typescript": "^5.9.2",
|
|
76
|
+
"zod": "3.25.67"
|
|
77
|
+
},
|
|
78
|
+
"publishConfig": {
|
|
79
|
+
"access": "public"
|
|
80
|
+
},
|
|
81
|
+
"scripts": {
|
|
82
|
+
"build": "node scripts/build-remote-components.mjs && tsc -p tsconfig.lib.json && node scripts/copy-assets.mjs",
|
|
83
|
+
"lint": "echo \"(todo) add lint\"",
|
|
84
|
+
"test": "tsc -p tsconfig.spec.json --noEmit && node scripts/build-remote-components.mjs --check",
|
|
85
|
+
"typecheck": "tsc -p tsconfig.spec.json --noEmit && node scripts/build-remote-components.mjs --check"
|
|
86
|
+
}
|
|
87
|
+
}
|