@upmade/angular-engine 0.0.0-stage → 0.6.2
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/LICENSE.md +21 -0
- package/README.md +116 -3
- package/fesm2022/upmade-angular-engine.mjs +404 -0
- package/fesm2022/upmade-angular-engine.mjs.map +1 -0
- package/package.json +39 -3
- package/types/upmade-angular-engine.d.ts +276 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Lukas Mühlenbeck
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,116 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# Upmade Engine for Angular
|
|
2
|
+
|
|
3
|
+
Build infinite canvas and collaborative whiteboard experiences in Angular with Upmade's native wrapper and TypeScript-first API.
|
|
4
|
+
|
|
5
|
+
Upmade is a framework-agnostic infinite canvas and collaborative whiteboard engine. It provides web components that work natively in any framework, with a first-class Angular wrapper for idiomatic template integration.
|
|
6
|
+
|
|
7
|
+
Upmade handles the hard parts of canvas-based applications — infinite pan/zoom, hit-testing, CRDT-based collaboration, undo/redo, and cross-browser rendering — so you can focus on your product's domain logic.
|
|
8
|
+
|
|
9
|
+
**Full documentation:** [upmade.io/docs/angular/getting-started/quick-start](https://upmade.io/docs/angular/getting-started/quick-start)
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @upmade/angular-engine
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Setup
|
|
18
|
+
|
|
19
|
+
Register Upmade in your application config:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { ApplicationConfig } from '@angular/core';
|
|
23
|
+
import { provideUpmade } from '@upmade/angular-engine';
|
|
24
|
+
|
|
25
|
+
export const appConfig: ApplicationConfig = {
|
|
26
|
+
providers: [
|
|
27
|
+
// ... other providers
|
|
28
|
+
provideUpmade(),
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Then use the component in your template:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { Component } from '@angular/core';
|
|
37
|
+
import { UpmadeEngine } from '@upmade/angular-engine';
|
|
38
|
+
|
|
39
|
+
@Component({
|
|
40
|
+
selector: 'app-editor',
|
|
41
|
+
imports: [UpmadeEngine],
|
|
42
|
+
template: `<upmade-engine></upmade-engine>`,
|
|
43
|
+
styles: [`upmade-engine { display: block; width: 100%; height: 100vh; }`],
|
|
44
|
+
})
|
|
45
|
+
export class EditorComponent {}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This renders the lower-level engine canvas without the editor toolbar shell.
|
|
49
|
+
|
|
50
|
+
## Optional Enhancements
|
|
51
|
+
|
|
52
|
+
### Persist Canvas State
|
|
53
|
+
|
|
54
|
+
By default, the engine uses an empty sync provider list, so canvas state is reset on reload. To persist objects locally across page reloads, configure `syncConfig` explicitly with `IndexedDBSyncProvider`.
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { Component } from '@angular/core';
|
|
58
|
+
import { IndexedDBSyncProvider, UpmadeEngine, UpmadeSyncConfig } from '@upmade/angular-engine';
|
|
59
|
+
|
|
60
|
+
@Component({
|
|
61
|
+
selector: 'app-editor',
|
|
62
|
+
imports: [UpmadeEngine],
|
|
63
|
+
template: `<upmade-engine [syncConfig]="syncConfig"></upmade-engine>`,
|
|
64
|
+
styles: [`upmade-engine { display: block; width: 100%; height: 100vh; }`],
|
|
65
|
+
})
|
|
66
|
+
export class EditorComponent {
|
|
67
|
+
readonly syncConfig: UpmadeSyncConfig = {
|
|
68
|
+
providers: [IndexedDBSyncProvider],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Apply Full Viewport Styling
|
|
74
|
+
|
|
75
|
+
To ensure the Upmade engine occupies the entire viewport and prevents unwanted scrolling, add the following CSS to your global stylesheet (e.g. `styles.css`):
|
|
76
|
+
|
|
77
|
+
```css
|
|
78
|
+
html,
|
|
79
|
+
body,
|
|
80
|
+
app-root {
|
|
81
|
+
width: 100dvw;
|
|
82
|
+
height: 100dvh;
|
|
83
|
+
margin: 0;
|
|
84
|
+
padding: 0;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
display: block;
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Include Mobile Viewport Meta Tag
|
|
91
|
+
|
|
92
|
+
For optimal rendering and responsiveness on mobile devices, add this meta tag within the `<head>` section of your `index.html`:
|
|
93
|
+
|
|
94
|
+
```html
|
|
95
|
+
<meta
|
|
96
|
+
name="viewport"
|
|
97
|
+
content="viewport-fit=cover, width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0, interactive-widget=resizes-content"
|
|
98
|
+
/>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Fundamentals
|
|
102
|
+
|
|
103
|
+
Upmade is composed of a small set of core concepts that work together to power your canvas experience:
|
|
104
|
+
|
|
105
|
+
- **[Components](https://upmade.io/docs/angular/getting-started/basic-usage)** — Two entry points, a batteries-included editor and a headless engine, to match any integration style.
|
|
106
|
+
- **[Tools](https://upmade.io/docs/angular/fundamentals/tools)** — State-machine interaction handlers that define how users draw, select, and manipulate the canvas.
|
|
107
|
+
- **[Objects](https://upmade.io/docs/angular/fundamentals/objects)** — The visual building blocks on the canvas — paths, shapes, text, and images with shared spatial properties.
|
|
108
|
+
- **[Workspaces](https://upmade.io/docs/angular/fundamentals/workspaces)** — Containers that manage an entire canvas collection, view state, and editor configuration.
|
|
109
|
+
- **[Theming](https://upmade.io/docs/angular/customization/themes)** — Built-in light and dark themes with full CSS variable customization to match your brand.
|
|
110
|
+
- **[Collaboration](https://upmade.io/docs/angular/advanced/collaboration)** — Real-time multi-user sync powered by Yjs CRDTs with pluggable transport providers.
|
|
111
|
+
|
|
112
|
+
Learn more in the [full documentation](https://upmade.io/docs/angular/getting-started/basic-usage).
|
|
113
|
+
|
|
114
|
+
## License
|
|
115
|
+
|
|
116
|
+
Upmade is released under the [MIT License](./LICENSE.md).
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, Output, makeEnvironmentProviders, provideAppInitializer } from "@angular/core";
|
|
4
|
+
import { defineCustomElement } from "@upmade/engine/dist/components/upmade-engine.js";
|
|
5
|
+
import { defineCustomElements } from "@upmade/engine/loader";
|
|
6
|
+
import { AGENT_TOOL_REASON_HINTS, BroadcastSyncProvider, DEFAULT_BRUSH_CONFIG, DEFAULT_TEXT_CONFIG, DE_LOCALE, EN_LOCALE, FR_LOCALE, HocuspocusSyncProvider, InMemorySyncProvider, IndexedDBSyncProvider, MODEL_IFRAME_CONTENT_SECURITY_POLICY, ShapeType, UPMADE_CHAT_PROTOCOL_VERSION, UPMADE_DEFAULT_OBJECT_TITLEBAR, UpmadeAgent, UpmadeAgentActionError, UpmadeAlignment, UpmadeBaseObject, UpmadeBaseTool, UpmadeBrushTool, UpmadeChatHttpError, UpmadeChatSession, UpmadeDynamicObject, UpmadeDynamicObjectRendererRegistry, UpmadeEraserTool, UpmadeFontRegistry, UpmadeGroup, UpmadeIframeObject, UpmadeImage, UpmadeImageTool, UpmadeLine, UpmadeLineTool, UpmadeLocalizationManager, UpmadePath, UpmadeSelectionTool, UpmadeShape, UpmadeShapeTool, UpmadeText, UpmadeTextTool, UpmadeThemeManager, UpmadeWorkspace, WebSocketSyncProvider, createHttpTransport, createScriptedTransport, darkTheme, formatAgentToolResult, hasRemoteSyncProvider, isUpmadeAgent, isUpmadeChatSession, lightTheme, parsePartialJson } from "@upmade/engine";
|
|
7
|
+
const serverInstances = /* @__PURE__ */ new WeakSet();
|
|
8
|
+
const toDashCase = (str) => str.replace(/([A-Z0-9])/g, (match) => ` ${match[0]}`).trim().split(" ").join("-").toLowerCase();
|
|
9
|
+
const setServerAttribute = (el, item, val, ssr) => {
|
|
10
|
+
const name = ssr.attributes?.[item] ?? toDashCase(item);
|
|
11
|
+
if (val == null) el.removeAttribute(name);
|
|
12
|
+
else if (ssr.refs?.includes(item) || val === false || typeof val !== "string" && typeof val !== "number" && val !== true) el.setAttribute(name, ssr.ssrProp(val));
|
|
13
|
+
else el.setAttribute(name, val === true ? "" : String(val));
|
|
14
|
+
};
|
|
15
|
+
const proxyInputs = (Cmp, inputs, ssr) => {
|
|
16
|
+
const Prototype = Cmp.prototype;
|
|
17
|
+
inputs.forEach((item) => {
|
|
18
|
+
Object.defineProperty(Prototype, item, {
|
|
19
|
+
get() {
|
|
20
|
+
return this.el[item];
|
|
21
|
+
},
|
|
22
|
+
set(val) {
|
|
23
|
+
if (ssr && serverInstances.has(this)) {
|
|
24
|
+
this.el[item] = val;
|
|
25
|
+
setServerAttribute(this.el, item, val, ssr);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
this.z.runOutsideAngular(() => this.el[item] = val);
|
|
29
|
+
},
|
|
30
|
+
configurable: true
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const proxyMethods = (Cmp, methods) => {
|
|
35
|
+
const Prototype = Cmp.prototype;
|
|
36
|
+
methods.forEach((methodName) => {
|
|
37
|
+
Prototype[methodName] = function() {
|
|
38
|
+
const args = arguments;
|
|
39
|
+
return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
function ProxyCmp(opts) {
|
|
44
|
+
const decorator = function(cls) {
|
|
45
|
+
const { defineCustomElementFn, inputs, methods, ssr } = opts;
|
|
46
|
+
if (defineCustomElementFn !== void 0) defineCustomElementFn();
|
|
47
|
+
if (inputs) proxyInputs(cls, inputs, ssr);
|
|
48
|
+
if (methods) proxyMethods(cls, methods);
|
|
49
|
+
return cls;
|
|
50
|
+
};
|
|
51
|
+
return decorator;
|
|
52
|
+
}
|
|
53
|
+
let UpmadeEngine = class UpmadeEngine {
|
|
54
|
+
constructor(c, r, z) {
|
|
55
|
+
this.z = z;
|
|
56
|
+
this.isEngineReady = new EventEmitter();
|
|
57
|
+
this.activeToolChange = new EventEmitter();
|
|
58
|
+
this.workspacesChange = new EventEmitter();
|
|
59
|
+
this.activeWorkspaceChange = new EventEmitter();
|
|
60
|
+
this.longpress = new EventEmitter();
|
|
61
|
+
this.objectsChange = new EventEmitter();
|
|
62
|
+
this.objectsAdded = new EventEmitter();
|
|
63
|
+
this.objectsRemoved = new EventEmitter();
|
|
64
|
+
this.objectsUpdated = new EventEmitter();
|
|
65
|
+
this.objectsSelectionChange = new EventEmitter();
|
|
66
|
+
this.undoStateChange = new EventEmitter();
|
|
67
|
+
this.objectsInViewportChange = new EventEmitter();
|
|
68
|
+
this.viewportChange = new EventEmitter();
|
|
69
|
+
this.awarenessChange = new EventEmitter();
|
|
70
|
+
this.notificationsChange = new EventEmitter();
|
|
71
|
+
this.contextMenuStateChange = new EventEmitter();
|
|
72
|
+
this.isLoadingChange = new EventEmitter();
|
|
73
|
+
this.agentsChange = new EventEmitter();
|
|
74
|
+
this.objectTitlebarAction = new EventEmitter();
|
|
75
|
+
this.objectTitlebarMenuStateChange = new EventEmitter();
|
|
76
|
+
this.objectElementHover = new EventEmitter();
|
|
77
|
+
this.objectElementClick = new EventEmitter();
|
|
78
|
+
this.objectElementPick = new EventEmitter();
|
|
79
|
+
c.detach();
|
|
80
|
+
this.el = r.nativeElement;
|
|
81
|
+
}
|
|
82
|
+
static {
|
|
83
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
84
|
+
minVersion: "12.0.0",
|
|
85
|
+
version: "22.2.6",
|
|
86
|
+
ngImport: i0,
|
|
87
|
+
type: UpmadeEngine,
|
|
88
|
+
deps: [
|
|
89
|
+
{ token: i0.ChangeDetectorRef },
|
|
90
|
+
{ token: i0.ElementRef },
|
|
91
|
+
{ token: i0.NgZone }
|
|
92
|
+
],
|
|
93
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
static {
|
|
97
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
98
|
+
minVersion: "14.0.0",
|
|
99
|
+
version: "22.2.6",
|
|
100
|
+
type: UpmadeEngine,
|
|
101
|
+
isStandalone: true,
|
|
102
|
+
selector: "upmade-engine",
|
|
103
|
+
inputs: {
|
|
104
|
+
activeWorkspaceId: "activeWorkspaceId",
|
|
105
|
+
assetStorageConfig: "assetStorageConfig",
|
|
106
|
+
chatSession: "chatSession",
|
|
107
|
+
cursorTarget: "cursorTarget",
|
|
108
|
+
debugInfo: "debugInfo",
|
|
109
|
+
editorId: "editorId",
|
|
110
|
+
fallbackLocale: "fallbackLocale",
|
|
111
|
+
globalContextMenuItems: "globalContextMenuItems",
|
|
112
|
+
isPanningEnabled: "isPanningEnabled",
|
|
113
|
+
isWatermarkVisible: "isWatermarkVisible",
|
|
114
|
+
isZoomingEnabled: "isZoomingEnabled",
|
|
115
|
+
locale: "locale",
|
|
116
|
+
locales: "locales",
|
|
117
|
+
lockDrawingScale: "lockDrawingScale",
|
|
118
|
+
objectConfig: "objectConfig",
|
|
119
|
+
objectContextMenuItems: "objectContextMenuItems",
|
|
120
|
+
objectTitlebar: "objectTitlebar",
|
|
121
|
+
scaleMax: "scaleMax",
|
|
122
|
+
scaleMin: "scaleMin",
|
|
123
|
+
syncConfig: "syncConfig",
|
|
124
|
+
theme: "theme",
|
|
125
|
+
themes: "themes",
|
|
126
|
+
tools: "tools",
|
|
127
|
+
user: "user",
|
|
128
|
+
viewportBoundaryBottom: "viewportBoundaryBottom",
|
|
129
|
+
viewportBoundaryLeft: "viewportBoundaryLeft",
|
|
130
|
+
viewportBoundaryRight: "viewportBoundaryRight",
|
|
131
|
+
viewportBoundaryTop: "viewportBoundaryTop",
|
|
132
|
+
workspaces: "workspaces"
|
|
133
|
+
},
|
|
134
|
+
outputs: {
|
|
135
|
+
isEngineReady: "isEngineReady",
|
|
136
|
+
activeToolChange: "activeToolChange",
|
|
137
|
+
workspacesChange: "workspacesChange",
|
|
138
|
+
activeWorkspaceChange: "activeWorkspaceChange",
|
|
139
|
+
longpress: "longpress",
|
|
140
|
+
objectsChange: "objectsChange",
|
|
141
|
+
objectsAdded: "objectsAdded",
|
|
142
|
+
objectsRemoved: "objectsRemoved",
|
|
143
|
+
objectsUpdated: "objectsUpdated",
|
|
144
|
+
objectsSelectionChange: "objectsSelectionChange",
|
|
145
|
+
undoStateChange: "undoStateChange",
|
|
146
|
+
objectsInViewportChange: "objectsInViewportChange",
|
|
147
|
+
viewportChange: "viewportChange",
|
|
148
|
+
awarenessChange: "awarenessChange",
|
|
149
|
+
notificationsChange: "notificationsChange",
|
|
150
|
+
contextMenuStateChange: "contextMenuStateChange",
|
|
151
|
+
isLoadingChange: "isLoadingChange",
|
|
152
|
+
agentsChange: "agentsChange",
|
|
153
|
+
objectTitlebarAction: "objectTitlebarAction",
|
|
154
|
+
objectTitlebarMenuStateChange: "objectTitlebarMenuStateChange",
|
|
155
|
+
objectElementHover: "objectElementHover",
|
|
156
|
+
objectElementClick: "objectElementClick",
|
|
157
|
+
objectElementPick: "objectElementPick"
|
|
158
|
+
},
|
|
159
|
+
ngImport: i0,
|
|
160
|
+
template: "<ng-content></ng-content>",
|
|
161
|
+
isInline: true,
|
|
162
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
UpmadeEngine = __decorate([ProxyCmp({
|
|
167
|
+
defineCustomElementFn: defineCustomElement,
|
|
168
|
+
inputs: [
|
|
169
|
+
"activeWorkspaceId",
|
|
170
|
+
"assetStorageConfig",
|
|
171
|
+
"chatSession",
|
|
172
|
+
"cursorTarget",
|
|
173
|
+
"debugInfo",
|
|
174
|
+
"editorId",
|
|
175
|
+
"fallbackLocale",
|
|
176
|
+
"globalContextMenuItems",
|
|
177
|
+
"isPanningEnabled",
|
|
178
|
+
"isWatermarkVisible",
|
|
179
|
+
"isZoomingEnabled",
|
|
180
|
+
"locale",
|
|
181
|
+
"locales",
|
|
182
|
+
"lockDrawingScale",
|
|
183
|
+
"objectConfig",
|
|
184
|
+
"objectContextMenuItems",
|
|
185
|
+
"objectTitlebar",
|
|
186
|
+
"scaleMax",
|
|
187
|
+
"scaleMin",
|
|
188
|
+
"syncConfig",
|
|
189
|
+
"theme",
|
|
190
|
+
"themes",
|
|
191
|
+
"tools",
|
|
192
|
+
"user",
|
|
193
|
+
"viewportBoundaryBottom",
|
|
194
|
+
"viewportBoundaryLeft",
|
|
195
|
+
"viewportBoundaryRight",
|
|
196
|
+
"viewportBoundaryTop",
|
|
197
|
+
"workspaces"
|
|
198
|
+
],
|
|
199
|
+
methods: [
|
|
200
|
+
"triggerSelectionChange",
|
|
201
|
+
"beginSceneBootstrap",
|
|
202
|
+
"endSceneBootstrap",
|
|
203
|
+
"registerTool",
|
|
204
|
+
"setActiveTool",
|
|
205
|
+
"disable",
|
|
206
|
+
"enable",
|
|
207
|
+
"delete",
|
|
208
|
+
"copy",
|
|
209
|
+
"cut",
|
|
210
|
+
"paste",
|
|
211
|
+
"bringForward",
|
|
212
|
+
"sendBackward",
|
|
213
|
+
"bringToFront",
|
|
214
|
+
"sendToBack",
|
|
215
|
+
"alignObjects",
|
|
216
|
+
"group",
|
|
217
|
+
"ungroup",
|
|
218
|
+
"undo",
|
|
219
|
+
"redo",
|
|
220
|
+
"hideContextMenu",
|
|
221
|
+
"closeObjectTitlebarMenu",
|
|
222
|
+
"selectObjectTitlebarMenuItem",
|
|
223
|
+
"openContextMenu",
|
|
224
|
+
"getObjectById",
|
|
225
|
+
"getAllObjects",
|
|
226
|
+
"findObjects",
|
|
227
|
+
"getObjectsTotalCount",
|
|
228
|
+
"addObject",
|
|
229
|
+
"addObjects",
|
|
230
|
+
"updateObject",
|
|
231
|
+
"removeObject",
|
|
232
|
+
"removeObjects",
|
|
233
|
+
"getSelectedObjects",
|
|
234
|
+
"getDisplayableShortcuts",
|
|
235
|
+
"selectObjects",
|
|
236
|
+
"selectAllObjectsInViewport",
|
|
237
|
+
"clearSelection",
|
|
238
|
+
"centerObjectInViewport",
|
|
239
|
+
"panToObject",
|
|
240
|
+
"backToContent",
|
|
241
|
+
"centerAllObjects",
|
|
242
|
+
"centerObjects",
|
|
243
|
+
"setViewport",
|
|
244
|
+
"panTo",
|
|
245
|
+
"zoomTo",
|
|
246
|
+
"zoomIn",
|
|
247
|
+
"zoomOut",
|
|
248
|
+
"getViewport",
|
|
249
|
+
"screenToWorld",
|
|
250
|
+
"worldToScreen",
|
|
251
|
+
"getObjectsInViewport",
|
|
252
|
+
"addAgent",
|
|
253
|
+
"removeAgent",
|
|
254
|
+
"getAgent",
|
|
255
|
+
"getAgents",
|
|
256
|
+
"getRemoteAgents",
|
|
257
|
+
"setObjectElementPicking",
|
|
258
|
+
"highlightObjectElements",
|
|
259
|
+
"clearObjectElementHighlights",
|
|
260
|
+
"queryObjectElements",
|
|
261
|
+
"getScreenshot",
|
|
262
|
+
"exportViewportAsPng",
|
|
263
|
+
"exportViewportAsSvg",
|
|
264
|
+
"getSelectedObjectSupportedExportFormats",
|
|
265
|
+
"canExportSelectedObjectAs",
|
|
266
|
+
"exportSelectedObject",
|
|
267
|
+
"exportAsJson",
|
|
268
|
+
"importFromJson",
|
|
269
|
+
"loadObjectsFromJson",
|
|
270
|
+
"downloadAsJson",
|
|
271
|
+
"importFromFile",
|
|
272
|
+
"cancelImportFromFile",
|
|
273
|
+
"setActiveWorkspace",
|
|
274
|
+
"createWorkspace",
|
|
275
|
+
"updateWorkspace",
|
|
276
|
+
"deleteWorkspace",
|
|
277
|
+
"getWorkspaces",
|
|
278
|
+
"getActiveWorkspace",
|
|
279
|
+
"getIsPublic",
|
|
280
|
+
"loadSharedWorkspace",
|
|
281
|
+
"reinitSync",
|
|
282
|
+
"saveSettings",
|
|
283
|
+
"loadSettings",
|
|
284
|
+
"registerLocales",
|
|
285
|
+
"configureLocales",
|
|
286
|
+
"setLocale",
|
|
287
|
+
"getLocale",
|
|
288
|
+
"getAvailableLocales",
|
|
289
|
+
"getAvailableLocaleOptions",
|
|
290
|
+
"t",
|
|
291
|
+
"getResolvedTerms",
|
|
292
|
+
"getTool"
|
|
293
|
+
]
|
|
294
|
+
})], UpmadeEngine);
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
296
|
+
minVersion: "12.0.0",
|
|
297
|
+
version: "22.2.6",
|
|
298
|
+
ngImport: i0,
|
|
299
|
+
type: UpmadeEngine,
|
|
300
|
+
decorators: [{
|
|
301
|
+
type: Component,
|
|
302
|
+
args: [{
|
|
303
|
+
selector: "upmade-engine",
|
|
304
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
305
|
+
template: "<ng-content></ng-content>",
|
|
306
|
+
inputs: [
|
|
307
|
+
"activeWorkspaceId",
|
|
308
|
+
"assetStorageConfig",
|
|
309
|
+
"chatSession",
|
|
310
|
+
"cursorTarget",
|
|
311
|
+
"debugInfo",
|
|
312
|
+
"editorId",
|
|
313
|
+
"fallbackLocale",
|
|
314
|
+
"globalContextMenuItems",
|
|
315
|
+
"isPanningEnabled",
|
|
316
|
+
"isWatermarkVisible",
|
|
317
|
+
"isZoomingEnabled",
|
|
318
|
+
"locale",
|
|
319
|
+
"locales",
|
|
320
|
+
"lockDrawingScale",
|
|
321
|
+
"objectConfig",
|
|
322
|
+
"objectContextMenuItems",
|
|
323
|
+
"objectTitlebar",
|
|
324
|
+
"scaleMax",
|
|
325
|
+
"scaleMin",
|
|
326
|
+
"syncConfig",
|
|
327
|
+
"theme",
|
|
328
|
+
"themes",
|
|
329
|
+
"tools",
|
|
330
|
+
"user",
|
|
331
|
+
"viewportBoundaryBottom",
|
|
332
|
+
"viewportBoundaryLeft",
|
|
333
|
+
"viewportBoundaryRight",
|
|
334
|
+
"viewportBoundaryTop",
|
|
335
|
+
"workspaces"
|
|
336
|
+
],
|
|
337
|
+
outputs: [
|
|
338
|
+
"isEngineReady",
|
|
339
|
+
"activeToolChange",
|
|
340
|
+
"workspacesChange",
|
|
341
|
+
"activeWorkspaceChange",
|
|
342
|
+
"longpress",
|
|
343
|
+
"objectsChange",
|
|
344
|
+
"objectsAdded",
|
|
345
|
+
"objectsRemoved",
|
|
346
|
+
"objectsUpdated",
|
|
347
|
+
"objectsSelectionChange",
|
|
348
|
+
"undoStateChange",
|
|
349
|
+
"objectsInViewportChange",
|
|
350
|
+
"viewportChange",
|
|
351
|
+
"awarenessChange",
|
|
352
|
+
"notificationsChange",
|
|
353
|
+
"contextMenuStateChange",
|
|
354
|
+
"isLoadingChange",
|
|
355
|
+
"agentsChange",
|
|
356
|
+
"objectTitlebarAction",
|
|
357
|
+
"objectTitlebarMenuStateChange",
|
|
358
|
+
"objectElementHover",
|
|
359
|
+
"objectElementClick",
|
|
360
|
+
"objectElementPick"
|
|
361
|
+
]
|
|
362
|
+
}]
|
|
363
|
+
}],
|
|
364
|
+
ctorParameters: () => [
|
|
365
|
+
{ type: i0.ChangeDetectorRef },
|
|
366
|
+
{ type: i0.ElementRef },
|
|
367
|
+
{ type: i0.NgZone }
|
|
368
|
+
],
|
|
369
|
+
propDecorators: {
|
|
370
|
+
isEngineReady: [{ type: Output }],
|
|
371
|
+
activeToolChange: [{ type: Output }],
|
|
372
|
+
workspacesChange: [{ type: Output }],
|
|
373
|
+
activeWorkspaceChange: [{ type: Output }],
|
|
374
|
+
longpress: [{ type: Output }],
|
|
375
|
+
objectsChange: [{ type: Output }],
|
|
376
|
+
objectsAdded: [{ type: Output }],
|
|
377
|
+
objectsRemoved: [{ type: Output }],
|
|
378
|
+
objectsUpdated: [{ type: Output }],
|
|
379
|
+
objectsSelectionChange: [{ type: Output }],
|
|
380
|
+
undoStateChange: [{ type: Output }],
|
|
381
|
+
objectsInViewportChange: [{ type: Output }],
|
|
382
|
+
viewportChange: [{ type: Output }],
|
|
383
|
+
awarenessChange: [{ type: Output }],
|
|
384
|
+
notificationsChange: [{ type: Output }],
|
|
385
|
+
contextMenuStateChange: [{ type: Output }],
|
|
386
|
+
isLoadingChange: [{ type: Output }],
|
|
387
|
+
agentsChange: [{ type: Output }],
|
|
388
|
+
objectTitlebarAction: [{ type: Output }],
|
|
389
|
+
objectTitlebarMenuStateChange: [{ type: Output }],
|
|
390
|
+
objectElementHover: [{ type: Output }],
|
|
391
|
+
objectElementClick: [{ type: Output }],
|
|
392
|
+
objectElementPick: [{ type: Output }]
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
const DIRECTIVES = [UpmadeEngine];
|
|
396
|
+
function provideUpmade() {
|
|
397
|
+
return makeEnvironmentProviders([provideAppInitializer(() => {
|
|
398
|
+
console.info("Initializing Upmade custom elements");
|
|
399
|
+
return defineCustomElements(window);
|
|
400
|
+
})]);
|
|
401
|
+
}
|
|
402
|
+
export { AGENT_TOOL_REASON_HINTS, BroadcastSyncProvider, DEFAULT_BRUSH_CONFIG, DEFAULT_TEXT_CONFIG, DE_LOCALE, DIRECTIVES, EN_LOCALE, FR_LOCALE, HocuspocusSyncProvider, InMemorySyncProvider, IndexedDBSyncProvider, MODEL_IFRAME_CONTENT_SECURITY_POLICY, ShapeType, UPMADE_CHAT_PROTOCOL_VERSION, UPMADE_DEFAULT_OBJECT_TITLEBAR, UpmadeAgent, UpmadeAgentActionError, UpmadeAlignment, UpmadeBaseObject, UpmadeBaseTool, UpmadeBrushTool, UpmadeChatHttpError, UpmadeChatSession, UpmadeDynamicObject, UpmadeDynamicObjectRendererRegistry, UpmadeEngine, UpmadeEraserTool, UpmadeFontRegistry, UpmadeGroup, UpmadeIframeObject, UpmadeImage, UpmadeImageTool, UpmadeLine, UpmadeLineTool, UpmadeLocalizationManager, UpmadePath, UpmadeSelectionTool, UpmadeShape, UpmadeShapeTool, UpmadeText, UpmadeTextTool, UpmadeThemeManager, UpmadeWorkspace, WebSocketSyncProvider, createHttpTransport, createScriptedTransport, darkTheme, formatAgentToolResult, hasRemoteSyncProvider, isUpmadeAgent, isUpmadeChatSession, lightTheme, parsePartialJson, provideUpmade };
|
|
403
|
+
|
|
404
|
+
//# sourceMappingURL=upmade-angular-engine.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upmade-angular-engine.mjs","names":["defineCustomElement","defineUpmadeEngine","d.UpmadeEngine"],"sources":["../../../projects/lib/src/lib/angular-component-lib/utils.ts","../../../projects/lib/src/lib/proxy.ts","../../../projects/lib/src/lib/index.ts","../../../projects/lib/src/lib/provide.function.ts"],"sourcesContent":["/* eslint-disable */\n/* tslint:disable */\nimport { inject, PLATFORM_ID } from '@angular/core';\n\n/**\n * Server rendering options (the output target's `ssrPropModule`).\n */\ninterface SsrOptions {\n /** The component library's `ssrProp()`, which hands a value to Stencil's server render. */\n ssrProp: (value: any) => any;\n /** Inputs whose attribute isn't Stencil's dash-cased prop name. */\n attributes?: Record<string, string>;\n /** Inputs with no attribute: every value goes through `ssrProp()`. */\n refs?: string[];\n}\n\nconst serverInstances = new WeakSet<object>();\n\n/**\n * Records a wrapper created during server rendering. Call from the constructor.\n */\nexport const markServer = (instance: object) => {\n // what `isPlatformServer()` from `@angular/common` checks\n if (inject(PLATFORM_ID) === 'server') {\n serverInstances.add(instance);\n }\n};\n\n/**\n * Stencil's own prop name to attribute name conversion (`prop1` -> `prop-1`).\n */\nconst toDashCase = (str: string): string =>\n str\n .replace(/([A-Z0-9])/g, (match) => ` ${match[0]}`)\n .trim()\n .split(' ')\n .join('-')\n .toLowerCase();\n\n/**\n * Angular's server DOM never writes properties to the HTML, so on the server an input becomes an\n * attribute, which Stencil's `renderToString()` reads:\n * - a string or number as itself, and `true` as an empty attribute, so the component's first\n * render in the browser sees them too;\n * - `false`, anything that isn't a primitive, and any value for a prop with no attribute through\n * `ssrProp()`, which gives the server render the exact value and leaves no attribute behind.\n */\nconst setServerAttribute = (el: any, item: string, val: any, ssr: SsrOptions) => {\n const name = ssr.attributes?.[item] ?? toDashCase(item);\n if (val == null) {\n el.removeAttribute(name);\n } else if (\n ssr.refs?.includes(item) ||\n val === false ||\n (typeof val !== 'string' && typeof val !== 'number' && val !== true)\n ) {\n el.setAttribute(name, ssr.ssrProp(val));\n } else {\n el.setAttribute(name, val === true ? '' : String(val));\n }\n};\n\nexport const proxyInputs = (Cmp: any, inputs: string[], ssr?: SsrOptions) => {\n const Prototype = Cmp.prototype;\n inputs.forEach((item) => {\n Object.defineProperty(Prototype, item, {\n get() {\n return this.el[item];\n },\n set(val: any) {\n if (ssr && serverInstances.has(this)) {\n // kept on the element too, so reading the input back on the server works\n this.el[item] = val;\n setServerAttribute(this.el, item, val, ssr);\n return;\n }\n this.z.runOutsideAngular(() => (this.el[item] = val));\n },\n /**\n * In the event that proxyInputs is called\n * multiple times re-defining these inputs\n * will cause an error to be thrown. As a result\n * we set configurable: true to indicate these\n * properties can be changed.\n */\n configurable: true,\n });\n });\n};\n\nexport const proxyMethods = (Cmp: any, methods: string[]) => {\n const Prototype = Cmp.prototype;\n methods.forEach((methodName) => {\n Prototype[methodName] = function () {\n const args = arguments;\n return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));\n };\n });\n};\n\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\n// tslint:disable-next-line: only-arrow-functions\nexport function ProxyCmp(opts: { defineCustomElementFn?: () => void; inputs?: any; methods?: any; ssr?: SsrOptions }) {\n const decorator = function (cls: any) {\n const { defineCustomElementFn, inputs, methods, ssr } = opts;\n\n if (defineCustomElementFn !== undefined) {\n defineCustomElementFn();\n }\n\n if (inputs) {\n proxyInputs(cls, inputs, ssr);\n }\n if (methods) {\n proxyMethods(cls, methods);\n }\n return cls;\n };\n return decorator;\n}\n","/* tslint:disable */\n/* auto-generated angular directive proxies */\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, Output, NgZone } from '@angular/core';\n\nimport { ProxyCmp } from './angular-component-lib/utils';\n\nimport type { Components } from '@upmade/engine/dist/components';\n\nimport { defineCustomElement as defineUpmadeEngine } from '@upmade/engine/dist/components/upmade-engine.js';\n@ProxyCmp({\n defineCustomElementFn: defineUpmadeEngine,\n inputs: ['activeWorkspaceId', 'assetStorageConfig', 'chatSession', 'cursorTarget', 'debugInfo', 'editorId', 'fallbackLocale', 'globalContextMenuItems', 'isPanningEnabled', 'isWatermarkVisible', 'isZoomingEnabled', 'locale', 'locales', 'lockDrawingScale', 'objectConfig', 'objectContextMenuItems', 'objectTitlebar', 'scaleMax', 'scaleMin', 'syncConfig', 'theme', 'themes', 'tools', 'user', 'viewportBoundaryBottom', 'viewportBoundaryLeft', 'viewportBoundaryRight', 'viewportBoundaryTop', 'workspaces'],\n methods: ['triggerSelectionChange', 'beginSceneBootstrap', 'endSceneBootstrap', 'registerTool', 'setActiveTool', 'disable', 'enable', 'delete', 'copy', 'cut', 'paste', 'bringForward', 'sendBackward', 'bringToFront', 'sendToBack', 'alignObjects', 'group', 'ungroup', 'undo', 'redo', 'hideContextMenu', 'closeObjectTitlebarMenu', 'selectObjectTitlebarMenuItem', 'openContextMenu', 'getObjectById', 'getAllObjects', 'findObjects', 'getObjectsTotalCount', 'addObject', 'addObjects', 'updateObject', 'removeObject', 'removeObjects', 'getSelectedObjects', 'getDisplayableShortcuts', 'selectObjects', 'selectAllObjectsInViewport', 'clearSelection', 'centerObjectInViewport', 'panToObject', 'backToContent', 'centerAllObjects', 'centerObjects', 'setViewport', 'panTo', 'zoomTo', 'zoomIn', 'zoomOut', 'getViewport', 'screenToWorld', 'worldToScreen', 'getObjectsInViewport', 'addAgent', 'removeAgent', 'getAgent', 'getAgents', 'getRemoteAgents', 'setObjectElementPicking', 'highlightObjectElements', 'clearObjectElementHighlights', 'queryObjectElements', 'getScreenshot', 'exportViewportAsPng', 'exportViewportAsSvg', 'getSelectedObjectSupportedExportFormats', 'canExportSelectedObjectAs', 'exportSelectedObject', 'exportAsJson', 'importFromJson', 'loadObjectsFromJson', 'downloadAsJson', 'importFromFile', 'cancelImportFromFile', 'setActiveWorkspace', 'createWorkspace', 'updateWorkspace', 'deleteWorkspace', 'getWorkspaces', 'getActiveWorkspace', 'getIsPublic', 'loadSharedWorkspace', 'reinitSync', 'saveSettings', 'loadSettings', 'registerLocales', 'configureLocales', 'setLocale', 'getLocale', 'getAvailableLocales', 'getAvailableLocaleOptions', 't', 'getResolvedTerms', 'getTool']\n})\n@Component({\n selector: 'upmade-engine',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content></ng-content>',\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: ['activeWorkspaceId', 'assetStorageConfig', 'chatSession', 'cursorTarget', 'debugInfo', 'editorId', 'fallbackLocale', 'globalContextMenuItems', 'isPanningEnabled', 'isWatermarkVisible', 'isZoomingEnabled', 'locale', 'locales', 'lockDrawingScale', 'objectConfig', 'objectContextMenuItems', 'objectTitlebar', 'scaleMax', 'scaleMin', 'syncConfig', 'theme', 'themes', 'tools', 'user', 'viewportBoundaryBottom', 'viewportBoundaryLeft', 'viewportBoundaryRight', 'viewportBoundaryTop', 'workspaces'],\n outputs: ['isEngineReady', 'activeToolChange', 'workspacesChange', 'activeWorkspaceChange', 'longpress', 'objectsChange', 'objectsAdded', 'objectsRemoved', 'objectsUpdated', 'objectsSelectionChange', 'undoStateChange', 'objectsInViewportChange', 'viewportChange', 'awarenessChange', 'notificationsChange', 'contextMenuStateChange', 'isLoadingChange', 'agentsChange', 'objectTitlebarAction', 'objectTitlebarMenuStateChange', 'objectElementHover', 'objectElementClick', 'objectElementPick'],\n})\nexport class UpmadeEngine {\n protected el: HTMLUpmadeEngineElement;\n @Output() isEngineReady = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeEngineState>>();\n @Output() activeToolChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeBaseTool>>();\n @Output() workspacesChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeWorkspace[]>>();\n @Output() activeWorkspaceChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeWorkspace>>();\n @Output() longpress = new EventEmitter<UpmadeEngineCustomEvent<PointerEvent>>();\n @Output() objectsChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeBaseObject[]>>();\n @Output() objectsAdded = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineObjectsAddedEvent>>();\n @Output() objectsRemoved = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineObjectsRemovedEvent>>();\n @Output() objectsUpdated = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineObjectsUpdatedEvent>>();\n @Output() objectsSelectionChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeBaseObject[]>>();\n @Output() undoStateChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeUndoState>>();\n @Output() objectsInViewportChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineObjectsInViewportChangeEvent>>();\n @Output() viewportChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeViewportState>>();\n @Output() awarenessChange = new EventEmitter<UpmadeEngineCustomEvent<Map<number, Record<string, any>>>>();\n @Output() notificationsChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeNotification>>();\n @Output() contextMenuStateChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeContextMenuState>>();\n @Output() isLoadingChange = new EventEmitter<UpmadeEngineCustomEvent<boolean>>();\n @Output() agentsChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeAgentsChangeEvent>>();\n @Output() objectTitlebarAction = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeObjectTitlebarActionEvent>>();\n @Output() objectTitlebarMenuStateChange = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeObjectTitlebarMenuState>>();\n @Output() objectElementHover = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeObjectElementHoverEvent>>();\n @Output() objectElementClick = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeObjectElementClickEvent>>();\n @Output() objectElementPick = new EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeObjectElementPickEvent>>();\n constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {\n c.detach();\n this.el = r.nativeElement;\n }\n}\n\n\nimport type { UpmadeEngineCustomEvent } from '@upmade/engine/dist/components';\nimport type { UpmadeEngineState as IUpmadeEngineUpmadeEngineState } from '@upmade/engine/dist/components';\nimport type { UpmadeBaseTool as IUpmadeEngineUpmadeBaseTool } from '@upmade/engine/dist/components';\nimport type { UpmadeWorkspace as IUpmadeEngineUpmadeWorkspace } from '@upmade/engine/dist/components';\nimport type { UpmadeBaseObject as IUpmadeEngineUpmadeBaseObject } from '@upmade/engine/dist/components';\nimport type { ObjectsAddedEvent as IUpmadeEngineObjectsAddedEvent } from '@upmade/engine/dist/components';\nimport type { ObjectsRemovedEvent as IUpmadeEngineObjectsRemovedEvent } from '@upmade/engine/dist/components';\nimport type { ObjectsUpdatedEvent as IUpmadeEngineObjectsUpdatedEvent } from '@upmade/engine/dist/components';\nimport type { UpmadeUndoState as IUpmadeEngineUpmadeUndoState } from '@upmade/engine/dist/components';\nimport type { ObjectsInViewportChangeEvent as IUpmadeEngineObjectsInViewportChangeEvent } from '@upmade/engine/dist/components';\nimport type { UpmadeViewportState as IUpmadeEngineUpmadeViewportState } from '@upmade/engine/dist/components';\nimport type { UpmadeNotification as IUpmadeEngineUpmadeNotification } from '@upmade/engine/dist/components';\nimport type { UpmadeContextMenuState as IUpmadeEngineUpmadeContextMenuState } from '@upmade/engine/dist/components';\nimport type { UpmadeAgentsChangeEvent as IUpmadeEngineUpmadeAgentsChangeEvent } from '@upmade/engine/dist/components';\nimport type { UpmadeObjectTitlebarActionEvent as IUpmadeEngineUpmadeObjectTitlebarActionEvent } from '@upmade/engine/dist/components';\nimport type { UpmadeObjectTitlebarMenuState as IUpmadeEngineUpmadeObjectTitlebarMenuState } from '@upmade/engine/dist/components';\nimport type { UpmadeObjectElementHoverEvent as IUpmadeEngineUpmadeObjectElementHoverEvent } from '@upmade/engine/dist/components';\nimport type { UpmadeObjectElementClickEvent as IUpmadeEngineUpmadeObjectElementClickEvent } from '@upmade/engine/dist/components';\nimport type { UpmadeObjectElementPickEvent as IUpmadeEngineUpmadeObjectElementPickEvent } from '@upmade/engine/dist/components';\n\nexport declare interface UpmadeEngine extends Components.UpmadeEngine {\n /**\n * Emitted when the engine has fully initialized and is ready for interaction.\n */\n isEngineReady: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeEngineState>>;\n /**\n * Emitted when the active drawing tool changes.\n */\n activeToolChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeBaseTool>>;\n /**\n * Emitted when workspaces are created, updated, or deleted.\n */\n workspacesChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeWorkspace[]>>;\n /**\n * Emitted when the active workspace changes (e.g., after import).\n */\n activeWorkspaceChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeWorkspace>>;\n /**\n * Emitted on long-press (touch/pen). Useful for showing custom context menus on mobile.\n */\n longpress: EventEmitter<UpmadeEngineCustomEvent<PointerEvent>>;\n /**\n * Emitted when objects on the canvas are added, removed, or modified.\n */\n objectsChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeBaseObject[]>>;\n /**\n * Emitted when one or more objects are added to the canvas. `source` is set when an agent made the change.\n */\n objectsAdded: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineObjectsAddedEvent>>;\n /**\n * Emitted when one or more objects are removed from the canvas. `source` is set when an agent made the change.\n */\n objectsRemoved: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineObjectsRemovedEvent>>;\n /**\n * Emitted when one or more objects are updated on the canvas. `source` is set when an agent made the change.\n */\n objectsUpdated: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineObjectsUpdatedEvent>>;\n /**\n * Emitted when the set of selected objects changes.\n */\n objectsSelectionChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeBaseObject[]>>;\n /**\n * Emitted when the undo/redo state changes, providing current undo availability.\n */\n undoStateChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeUndoState>>;\n /**\n * Emitted when the set of objects visible in the current viewport changes (e.g., after pan or zoom).\n */\n objectsInViewportChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineObjectsInViewportChangeEvent>>;\n /**\n * Emitted when the viewport position, scale, or dimensions change (e.g., after pan, zoom, or resize).\n */\n viewportChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeViewportState>>;\n /**\n * Emitted when the awareness state changes (remote user cursors, presence).\n */\n awarenessChange: EventEmitter<UpmadeEngineCustomEvent<Map<number, Record<string, any>>>>;\n /**\n * Emitted when notifications change.\n */\n notificationsChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeNotification>>;\n /**\n * Emitted when context-menu visibility, items, or position changes.\n */\n contextMenuStateChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeContextMenuState>>;\n /**\n * Emitted while the selected workspace's objects are being initialized and synchronized.\n */\n isLoadingChange: EventEmitter<UpmadeEngineCustomEvent<boolean>>;\n /**\n * Emitted when agents are added or removed, or when what the avatar stack shows of them changes\r\n(name, color, avatar, status, visibility, activity). Lists the local agents first, then the agents of\r\ncollaborators (`isRemote: true`). Never emitted for plain cursor motion.\n */\n agentsChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeAgentsChangeEvent>>;\n /**\n * Emitted when a button or a menu item in an object titlebar is clicked.\n */\n objectTitlebarAction: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeObjectTitlebarActionEvent>>;\n /**\n * Emitted when a titlebar menu opens or closes. The engine renders no menu itself; hosts render\r\n`items` anchored to `anchor` and report selections through `selectObjectTitlebarMenuItem`.\n */\n objectTitlebarMenuStateChange: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeObjectTitlebarMenuState>>;\n /**\n * Emitted when the pointer moves onto another element inside the content of an interactive (selected) object,\r\nsuch as an iframe object, and with `element: null` when it leaves the content or the object stops being interactive.\n */\n objectElementHover: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeObjectElementHoverEvent>>;\n /**\n * Emitted when the user clicks an element inside the content of an interactive (selected) object. The click works as usual.\n */\n objectElementClick: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeObjectElementClickEvent>>;\n /**\n * Emitted when the user picks an element inside an object that is picking elements, see `setObjectElementPicking`.\n */\n objectElementPick: EventEmitter<UpmadeEngineCustomEvent<IUpmadeEngineUpmadeObjectElementPickEvent>>;\n}\n\n\n","\nimport * as d from './proxy';\n\nexport const DIRECTIVES = [\n d.UpmadeEngine\n];\n","import {\r\n provideAppInitializer,\r\n EnvironmentProviders,\r\n makeEnvironmentProviders,\r\n} from '@angular/core';\r\nimport { defineCustomElements } from '@upmade/engine/loader';\r\n\r\nexport function provideUpmade(): EnvironmentProviders {\r\n return makeEnvironmentProviders([\r\n provideAppInitializer(() => {\r\n console.info('Initializing Upmade custom elements');\r\n return defineCustomElements(window);\r\n }),\r\n ]);\r\n}\r\n"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upmade/angular-engine",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "0.6.2",
|
|
4
|
+
"homepage": "https://upmade.io/",
|
|
5
|
+
"description": "Upmade engine wrapper for Angular.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"infinite canvas",
|
|
8
|
+
"collaboration",
|
|
9
|
+
"whiteboard",
|
|
10
|
+
"drawing",
|
|
11
|
+
"angular"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"@angular/common": "^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
16
|
+
"@angular/core": "^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
17
|
+
"@upmade/engine": "^0.6.2"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"tslib": "^2.3.0"
|
|
21
|
+
},
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/kasual1/kritzel.git"
|
|
29
|
+
},
|
|
30
|
+
"module": "fesm2022/upmade-angular-engine.mjs",
|
|
31
|
+
"typings": "types/upmade-angular-engine.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
"./package.json": {
|
|
34
|
+
"default": "./package.json"
|
|
35
|
+
},
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./types/upmade-angular-engine.d.ts",
|
|
38
|
+
"default": "./fesm2022/upmade-angular-engine.mjs"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"type": "module"
|
|
6
42
|
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectorRef, ElementRef, EnvironmentProviders, EventEmitter, NgZone } from "@angular/core";
|
|
3
|
+
import { Components, ObjectsAddedEvent as ObjectsAddedEvent$1, ObjectsInViewportChangeEvent as ObjectsInViewportChangeEvent$1, ObjectsRemovedEvent as ObjectsRemovedEvent$1, ObjectsUpdatedEvent as ObjectsUpdatedEvent$1, UpmadeAgentsChangeEvent as UpmadeAgentsChangeEvent$1, UpmadeBaseObject as UpmadeBaseObject$1, UpmadeBaseTool as UpmadeBaseTool$1, UpmadeContextMenuState, UpmadeEngineCustomEvent, UpmadeEngineState as UpmadeEngineState$1, UpmadeNotification, UpmadeObjectElementClickEvent as UpmadeObjectElementClickEvent$1, UpmadeObjectElementHoverEvent as UpmadeObjectElementHoverEvent$1, UpmadeObjectElementPickEvent as UpmadeObjectElementPickEvent$1, UpmadeObjectTitlebarActionEvent as UpmadeObjectTitlebarActionEvent$1, UpmadeObjectTitlebarMenuState as UpmadeObjectTitlebarMenuState$1, UpmadeUndoState as UpmadeUndoState$1, UpmadeViewportState as UpmadeViewportState$1, UpmadeWorkspace as UpmadeWorkspace$1 } from "@upmade/engine/dist/components";
|
|
4
|
+
import { AGENT_TOOL_REASON_HINTS, ActiveWorkspaceChangeEvent, ArrowHeadConfig, ArrowHeadStyle, BroadcastSyncOptions, BroadcastSyncProvider, ContextMenuItem, DEFAULT_BRUSH_CONFIG, DEFAULT_TEXT_CONFIG, DE_LOCALE, EN_LOCALE, EditorIsReadyEvent, FR_LOCALE, HTMLUpmadeEngineElement as HTMLUpmadeEngineElement$1, HocuspocusSyncProvider, IUpmadeIsPublicChangeEvent, IUpmadeUser, InMemorySyncProvider, IndexedDBSyncProvider, LineArrowConfig, LocaleCode, LoginEvent, MODEL_IFRAME_CONTENT_SECURITY_POLICY, ObjectsAddedEvent, ObjectsInViewportChangeEvent, ObjectsRemovedEvent, ObjectsUpdatedEvent, ShapeType, ThemeAwareColor, ThemeName, UPMADE_CHAT_PROTOCOL_VERSION, UPMADE_DEFAULT_OBJECT_TITLEBAR, UpmadeAgent, UpmadeAgentActionError, UpmadeAgentChangeSource, UpmadeAgentDetachedEvent, UpmadeAgentEventMap, UpmadeAgentInterruptedEvent, UpmadeAgentOptions, UpmadeAgentPresence, UpmadeAgentState, UpmadeAgentTool, UpmadeAgentToolCall, UpmadeAgentToolContext, UpmadeAgentToolResult, UpmadeAgentToolSchema, UpmadeAgentToolsOptions, UpmadeAgenticAction, UpmadeAgenticActionFailureReason, UpmadeAgenticActionOptions, UpmadeAgenticActionResult, UpmadeAgenticActionType, UpmadeAgenticAddObjectAction, UpmadeAgenticAnchor, UpmadeAgenticAttachment, UpmadeAgenticClearSelectionAction, UpmadeAgenticClickAction, UpmadeAgenticColor, UpmadeAgenticConnectAction, UpmadeAgenticCopyObjectsAction, UpmadeAgenticCreateShapeAction, UpmadeAgenticCreateTextAction, UpmadeAgenticDeleteObjectsAction, UpmadeAgenticDrawLineAction, UpmadeAgenticDrawPathAction, UpmadeAgenticEditLineAction, UpmadeAgenticElementTarget, UpmadeAgenticFill, UpmadeAgenticGroupObjectsAction, UpmadeAgenticInteractWithElementAction, UpmadeAgenticLineEnd, UpmadeAgenticLineStyle, UpmadeAgenticMoveObjectAction, UpmadeAgenticMoveOptions, UpmadeAgenticMoveResult, UpmadeAgenticObjectStyle, UpmadeAgenticObjectTarget, UpmadeAgenticOrder, UpmadeAgenticOrderObjectsAction, UpmadeAgenticPointTarget, UpmadeAgenticRedoAction, UpmadeAgenticResizeHandle, UpmadeAgenticResizeObjectAction, UpmadeAgenticRotateObjectAction, UpmadeAgenticSelectAction, UpmadeAgenticSetStyleAction, UpmadeAgenticShapeStyle, UpmadeAgenticStrokeStyle, UpmadeAgenticTarget, UpmadeAgenticTextStyle, UpmadeAgenticTypeTextAction, UpmadeAgenticUndoAction, UpmadeAgenticUngroupObjectsAction, UpmadeAgentsChangeEvent, UpmadeAlignment, UpmadeBaseObject, UpmadeBaseTool, UpmadeBrushTool, UpmadeBrushToolConfig, UpmadeCanvasElement, UpmadeCanvasObject, UpmadeCanvasSnapshot, UpmadeChatActor, UpmadeChatHttpError, UpmadeChatImagePart, UpmadeChatInput, UpmadeChatMessage, UpmadeChatPart, UpmadeChatProviderData, UpmadeChatRequest, UpmadeChatResponse, UpmadeChatSendResult, UpmadeChatSession, UpmadeChatSessionEventMap, UpmadeChatSessionOptions, UpmadeChatStopReason, UpmadeChatStreamEvent, UpmadeChatTextPart, UpmadeChatTool, UpmadeChatToolCallPart, UpmadeChatToolCallState, UpmadeChatToolCallUpdate, UpmadeChatToolContext, UpmadeChatToolDefinition, UpmadeChatToolResultPart, UpmadeChatTransport, UpmadeChatTransportOptions, UpmadeDebugInfo, UpmadeDynamicObject, UpmadeDynamicObjectConfig, UpmadeDynamicObjectRenderContext, UpmadeDynamicObjectRenderer, UpmadeDynamicObjectRendererRegistry, UpmadeEasing, UpmadeElementAwareObject, UpmadeEngineState, UpmadeEraserTool, UpmadeExportable, UpmadeFontDefinition, UpmadeFontMap, UpmadeFontRegistration, UpmadeFontRegistry, UpmadeGroup, UpmadeGroupConfig, UpmadeHttpTransportOptions, UpmadeIframeObject, UpmadeImage, UpmadeImageConfig, UpmadeImageTool, UpmadeLine, UpmadeLineConfig, UpmadeLineTool, UpmadeLineToolConfig, UpmadeLocale, UpmadeLocalizationManager, UpmadeLoginConfig, UpmadeLoginProvider, UpmadeObjectChangeSource, UpmadeObjectConfig, UpmadeObjectElementClickEvent, UpmadeObjectElementHighlight, UpmadeObjectElementHoverEvent, UpmadeObjectElementInfo, UpmadeObjectElementInteraction, UpmadeObjectElementInteractionFailureReason, UpmadeObjectElementInteractionOptions, UpmadeObjectElementInteractionResult, UpmadeObjectElementInteractionType, UpmadeObjectElementModifiers, UpmadeObjectElementPickEvent, UpmadeObjectElementPickingOptions, UpmadeObjectElementQueryOptions, UpmadeObjectElementRect, UpmadeObjectElementState, UpmadeObjectExportContext, UpmadeObjectExportFormat, UpmadeObjectTitlebarActionEvent, UpmadeObjectTitlebarConfig, UpmadeObjectTitlebarContext, UpmadeObjectTitlebarMenuState, UpmadeObserveOptions, UpmadePath, UpmadePathConfig, UpmadePoint, UpmadeRegisteredFont, UpmadeRemoteAgentPresence, UpmadeScriptedAnswer, UpmadeScriptedStep, UpmadeScriptedToolCall, UpmadeScriptedTransportOptions, UpmadeSelectionTool, UpmadeShape, UpmadeShapeConfig, UpmadeShapeTool, UpmadeShapeToolConfig, UpmadeSyncConfig, UpmadeTermKey, UpmadeTermVars, UpmadeTerms, UpmadeText, UpmadeTextConfig, UpmadeTextTool, UpmadeTextToolConfig, UpmadeTheme, UpmadeThemeManager, UpmadeTitlebarButton, UpmadeTitlebarElement, UpmadeTitlebarIcon, UpmadeTitlebarMenu, UpmadeTitlebarMenuItem, UpmadeTitlebarSection, UpmadeTitlebarSpacer, UpmadeTitlebarText, UpmadeTitlebarTitle, UpmadeTitlebarValue, UpmadeToolbarItem, UpmadeUndoState, UpmadeViewportState, UpmadeWorkspace, UpmadeWorkspaceConfig, WebSocketSyncProvider, createHttpTransport, createScriptedTransport, darkTheme, formatAgentToolResult, hasRemoteSyncProvider, isUpmadeAgent, isUpmadeChatSession, lightTheme, parsePartialJson } from "@upmade/engine";
|
|
5
|
+
export declare class UpmadeEngine {
|
|
6
|
+
protected z: NgZone;
|
|
7
|
+
protected el: HTMLUpmadeEngineElement;
|
|
8
|
+
isEngineReady: EventEmitter<UpmadeEngineCustomEvent<UpmadeEngineState$1>>;
|
|
9
|
+
activeToolChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeBaseTool$1>>;
|
|
10
|
+
workspacesChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeWorkspace$1[]>>;
|
|
11
|
+
activeWorkspaceChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeWorkspace$1>>;
|
|
12
|
+
longpress: EventEmitter<UpmadeEngineCustomEvent<PointerEvent>>;
|
|
13
|
+
objectsChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeBaseObject$1<HTMLElement | SVGElement>[]>>;
|
|
14
|
+
objectsAdded: EventEmitter<UpmadeEngineCustomEvent<ObjectsAddedEvent$1>>;
|
|
15
|
+
objectsRemoved: EventEmitter<UpmadeEngineCustomEvent<ObjectsRemovedEvent$1>>;
|
|
16
|
+
objectsUpdated: EventEmitter<UpmadeEngineCustomEvent<ObjectsUpdatedEvent$1>>;
|
|
17
|
+
objectsSelectionChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeBaseObject$1<HTMLElement | SVGElement>[]>>;
|
|
18
|
+
undoStateChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeUndoState$1>>;
|
|
19
|
+
objectsInViewportChange: EventEmitter<UpmadeEngineCustomEvent<ObjectsInViewportChangeEvent$1>>;
|
|
20
|
+
viewportChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeViewportState$1>>;
|
|
21
|
+
awarenessChange: EventEmitter<UpmadeEngineCustomEvent<Map<number, Record<string, any>>>>;
|
|
22
|
+
notificationsChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeNotification>>;
|
|
23
|
+
contextMenuStateChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeContextMenuState>>;
|
|
24
|
+
isLoadingChange: EventEmitter<UpmadeEngineCustomEvent<boolean>>;
|
|
25
|
+
agentsChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeAgentsChangeEvent$1>>;
|
|
26
|
+
objectTitlebarAction: EventEmitter<UpmadeEngineCustomEvent<UpmadeObjectTitlebarActionEvent$1>>;
|
|
27
|
+
objectTitlebarMenuStateChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeObjectTitlebarMenuState$1>>;
|
|
28
|
+
objectElementHover: EventEmitter<UpmadeEngineCustomEvent<UpmadeObjectElementHoverEvent$1>>;
|
|
29
|
+
objectElementClick: EventEmitter<UpmadeEngineCustomEvent<UpmadeObjectElementClickEvent$1>>;
|
|
30
|
+
objectElementPick: EventEmitter<UpmadeEngineCustomEvent<UpmadeObjectElementPickEvent$1>>;
|
|
31
|
+
constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UpmadeEngine, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UpmadeEngine, "upmade-engine", never, {
|
|
34
|
+
"activeWorkspaceId": {
|
|
35
|
+
"alias": "activeWorkspaceId";
|
|
36
|
+
"required": false;
|
|
37
|
+
};
|
|
38
|
+
"assetStorageConfig": {
|
|
39
|
+
"alias": "assetStorageConfig";
|
|
40
|
+
"required": false;
|
|
41
|
+
};
|
|
42
|
+
"chatSession": {
|
|
43
|
+
"alias": "chatSession";
|
|
44
|
+
"required": false;
|
|
45
|
+
};
|
|
46
|
+
"cursorTarget": {
|
|
47
|
+
"alias": "cursorTarget";
|
|
48
|
+
"required": false;
|
|
49
|
+
};
|
|
50
|
+
"debugInfo": {
|
|
51
|
+
"alias": "debugInfo";
|
|
52
|
+
"required": false;
|
|
53
|
+
};
|
|
54
|
+
"editorId": {
|
|
55
|
+
"alias": "editorId";
|
|
56
|
+
"required": false;
|
|
57
|
+
};
|
|
58
|
+
"fallbackLocale": {
|
|
59
|
+
"alias": "fallbackLocale";
|
|
60
|
+
"required": false;
|
|
61
|
+
};
|
|
62
|
+
"globalContextMenuItems": {
|
|
63
|
+
"alias": "globalContextMenuItems";
|
|
64
|
+
"required": false;
|
|
65
|
+
};
|
|
66
|
+
"isPanningEnabled": {
|
|
67
|
+
"alias": "isPanningEnabled";
|
|
68
|
+
"required": false;
|
|
69
|
+
};
|
|
70
|
+
"isWatermarkVisible": {
|
|
71
|
+
"alias": "isWatermarkVisible";
|
|
72
|
+
"required": false;
|
|
73
|
+
};
|
|
74
|
+
"isZoomingEnabled": {
|
|
75
|
+
"alias": "isZoomingEnabled";
|
|
76
|
+
"required": false;
|
|
77
|
+
};
|
|
78
|
+
"locale": {
|
|
79
|
+
"alias": "locale";
|
|
80
|
+
"required": false;
|
|
81
|
+
};
|
|
82
|
+
"locales": {
|
|
83
|
+
"alias": "locales";
|
|
84
|
+
"required": false;
|
|
85
|
+
};
|
|
86
|
+
"lockDrawingScale": {
|
|
87
|
+
"alias": "lockDrawingScale";
|
|
88
|
+
"required": false;
|
|
89
|
+
};
|
|
90
|
+
"objectConfig": {
|
|
91
|
+
"alias": "objectConfig";
|
|
92
|
+
"required": false;
|
|
93
|
+
};
|
|
94
|
+
"objectContextMenuItems": {
|
|
95
|
+
"alias": "objectContextMenuItems";
|
|
96
|
+
"required": false;
|
|
97
|
+
};
|
|
98
|
+
"objectTitlebar": {
|
|
99
|
+
"alias": "objectTitlebar";
|
|
100
|
+
"required": false;
|
|
101
|
+
};
|
|
102
|
+
"scaleMax": {
|
|
103
|
+
"alias": "scaleMax";
|
|
104
|
+
"required": false;
|
|
105
|
+
};
|
|
106
|
+
"scaleMin": {
|
|
107
|
+
"alias": "scaleMin";
|
|
108
|
+
"required": false;
|
|
109
|
+
};
|
|
110
|
+
"syncConfig": {
|
|
111
|
+
"alias": "syncConfig";
|
|
112
|
+
"required": false;
|
|
113
|
+
};
|
|
114
|
+
"theme": {
|
|
115
|
+
"alias": "theme";
|
|
116
|
+
"required": false;
|
|
117
|
+
};
|
|
118
|
+
"themes": {
|
|
119
|
+
"alias": "themes";
|
|
120
|
+
"required": false;
|
|
121
|
+
};
|
|
122
|
+
"tools": {
|
|
123
|
+
"alias": "tools";
|
|
124
|
+
"required": false;
|
|
125
|
+
};
|
|
126
|
+
"user": {
|
|
127
|
+
"alias": "user";
|
|
128
|
+
"required": false;
|
|
129
|
+
};
|
|
130
|
+
"viewportBoundaryBottom": {
|
|
131
|
+
"alias": "viewportBoundaryBottom";
|
|
132
|
+
"required": false;
|
|
133
|
+
};
|
|
134
|
+
"viewportBoundaryLeft": {
|
|
135
|
+
"alias": "viewportBoundaryLeft";
|
|
136
|
+
"required": false;
|
|
137
|
+
};
|
|
138
|
+
"viewportBoundaryRight": {
|
|
139
|
+
"alias": "viewportBoundaryRight";
|
|
140
|
+
"required": false;
|
|
141
|
+
};
|
|
142
|
+
"viewportBoundaryTop": {
|
|
143
|
+
"alias": "viewportBoundaryTop";
|
|
144
|
+
"required": false;
|
|
145
|
+
};
|
|
146
|
+
"workspaces": {
|
|
147
|
+
"alias": "workspaces";
|
|
148
|
+
"required": false;
|
|
149
|
+
};
|
|
150
|
+
}, {
|
|
151
|
+
"isEngineReady": "isEngineReady";
|
|
152
|
+
"activeToolChange": "activeToolChange";
|
|
153
|
+
"workspacesChange": "workspacesChange";
|
|
154
|
+
"activeWorkspaceChange": "activeWorkspaceChange";
|
|
155
|
+
"longpress": "longpress";
|
|
156
|
+
"objectsChange": "objectsChange";
|
|
157
|
+
"objectsAdded": "objectsAdded";
|
|
158
|
+
"objectsRemoved": "objectsRemoved";
|
|
159
|
+
"objectsUpdated": "objectsUpdated";
|
|
160
|
+
"objectsSelectionChange": "objectsSelectionChange";
|
|
161
|
+
"undoStateChange": "undoStateChange";
|
|
162
|
+
"objectsInViewportChange": "objectsInViewportChange";
|
|
163
|
+
"viewportChange": "viewportChange";
|
|
164
|
+
"awarenessChange": "awarenessChange";
|
|
165
|
+
"notificationsChange": "notificationsChange";
|
|
166
|
+
"contextMenuStateChange": "contextMenuStateChange";
|
|
167
|
+
"isLoadingChange": "isLoadingChange";
|
|
168
|
+
"agentsChange": "agentsChange";
|
|
169
|
+
"objectTitlebarAction": "objectTitlebarAction";
|
|
170
|
+
"objectTitlebarMenuStateChange": "objectTitlebarMenuStateChange";
|
|
171
|
+
"objectElementHover": "objectElementHover";
|
|
172
|
+
"objectElementClick": "objectElementClick";
|
|
173
|
+
"objectElementPick": "objectElementPick";
|
|
174
|
+
}, never, ["*"], true, never>;
|
|
175
|
+
}
|
|
176
|
+
export declare interface UpmadeEngine extends Components.UpmadeEngine {
|
|
177
|
+
/**
|
|
178
|
+
* Emitted when the engine has fully initialized and is ready for interaction.
|
|
179
|
+
*/
|
|
180
|
+
isEngineReady: EventEmitter<UpmadeEngineCustomEvent<UpmadeEngineState$1>>;
|
|
181
|
+
/**
|
|
182
|
+
* Emitted when the active drawing tool changes.
|
|
183
|
+
*/
|
|
184
|
+
activeToolChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeBaseTool$1>>;
|
|
185
|
+
/**
|
|
186
|
+
* Emitted when workspaces are created, updated, or deleted.
|
|
187
|
+
*/
|
|
188
|
+
workspacesChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeWorkspace$1[]>>;
|
|
189
|
+
/**
|
|
190
|
+
* Emitted when the active workspace changes (e.g., after import).
|
|
191
|
+
*/
|
|
192
|
+
activeWorkspaceChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeWorkspace$1>>;
|
|
193
|
+
/**
|
|
194
|
+
* Emitted on long-press (touch/pen). Useful for showing custom context menus on mobile.
|
|
195
|
+
*/
|
|
196
|
+
longpress: EventEmitter<UpmadeEngineCustomEvent<PointerEvent>>;
|
|
197
|
+
/**
|
|
198
|
+
* Emitted when objects on the canvas are added, removed, or modified.
|
|
199
|
+
*/
|
|
200
|
+
objectsChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeBaseObject$1[]>>;
|
|
201
|
+
/**
|
|
202
|
+
* Emitted when one or more objects are added to the canvas. `source` is set when an agent made the change.
|
|
203
|
+
*/
|
|
204
|
+
objectsAdded: EventEmitter<UpmadeEngineCustomEvent<ObjectsAddedEvent$1>>;
|
|
205
|
+
/**
|
|
206
|
+
* Emitted when one or more objects are removed from the canvas. `source` is set when an agent made the change.
|
|
207
|
+
*/
|
|
208
|
+
objectsRemoved: EventEmitter<UpmadeEngineCustomEvent<ObjectsRemovedEvent$1>>;
|
|
209
|
+
/**
|
|
210
|
+
* Emitted when one or more objects are updated on the canvas. `source` is set when an agent made the change.
|
|
211
|
+
*/
|
|
212
|
+
objectsUpdated: EventEmitter<UpmadeEngineCustomEvent<ObjectsUpdatedEvent$1>>;
|
|
213
|
+
/**
|
|
214
|
+
* Emitted when the set of selected objects changes.
|
|
215
|
+
*/
|
|
216
|
+
objectsSelectionChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeBaseObject$1[]>>;
|
|
217
|
+
/**
|
|
218
|
+
* Emitted when the undo/redo state changes, providing current undo availability.
|
|
219
|
+
*/
|
|
220
|
+
undoStateChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeUndoState$1>>;
|
|
221
|
+
/**
|
|
222
|
+
* Emitted when the set of objects visible in the current viewport changes (e.g., after pan or zoom).
|
|
223
|
+
*/
|
|
224
|
+
objectsInViewportChange: EventEmitter<UpmadeEngineCustomEvent<ObjectsInViewportChangeEvent$1>>;
|
|
225
|
+
/**
|
|
226
|
+
* Emitted when the viewport position, scale, or dimensions change (e.g., after pan, zoom, or resize).
|
|
227
|
+
*/
|
|
228
|
+
viewportChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeViewportState$1>>;
|
|
229
|
+
/**
|
|
230
|
+
* Emitted when the awareness state changes (remote user cursors, presence).
|
|
231
|
+
*/
|
|
232
|
+
awarenessChange: EventEmitter<UpmadeEngineCustomEvent<Map<number, Record<string, any>>>>;
|
|
233
|
+
/**
|
|
234
|
+
* Emitted when notifications change.
|
|
235
|
+
*/
|
|
236
|
+
notificationsChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeNotification>>;
|
|
237
|
+
/**
|
|
238
|
+
* Emitted when context-menu visibility, items, or position changes.
|
|
239
|
+
*/
|
|
240
|
+
contextMenuStateChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeContextMenuState>>;
|
|
241
|
+
/**
|
|
242
|
+
* Emitted while the selected workspace's objects are being initialized and synchronized.
|
|
243
|
+
*/
|
|
244
|
+
isLoadingChange: EventEmitter<UpmadeEngineCustomEvent<boolean>>;
|
|
245
|
+
/**
|
|
246
|
+
* Emitted when agents are added or removed, or when what the avatar stack shows of them changes
|
|
247
|
+
(name, color, avatar, status, visibility, activity). Lists the local agents first, then the agents of
|
|
248
|
+
collaborators (`isRemote: true`). Never emitted for plain cursor motion.
|
|
249
|
+
*/
|
|
250
|
+
agentsChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeAgentsChangeEvent$1>>;
|
|
251
|
+
/**
|
|
252
|
+
* Emitted when a button or a menu item in an object titlebar is clicked.
|
|
253
|
+
*/
|
|
254
|
+
objectTitlebarAction: EventEmitter<UpmadeEngineCustomEvent<UpmadeObjectTitlebarActionEvent$1>>;
|
|
255
|
+
/**
|
|
256
|
+
* Emitted when a titlebar menu opens or closes. The engine renders no menu itself; hosts render
|
|
257
|
+
`items` anchored to `anchor` and report selections through `selectObjectTitlebarMenuItem`.
|
|
258
|
+
*/
|
|
259
|
+
objectTitlebarMenuStateChange: EventEmitter<UpmadeEngineCustomEvent<UpmadeObjectTitlebarMenuState$1>>;
|
|
260
|
+
/**
|
|
261
|
+
* Emitted when the pointer moves onto another element inside the content of an interactive (selected) object,
|
|
262
|
+
such as an iframe object, and with `element: null` when it leaves the content or the object stops being interactive.
|
|
263
|
+
*/
|
|
264
|
+
objectElementHover: EventEmitter<UpmadeEngineCustomEvent<UpmadeObjectElementHoverEvent$1>>;
|
|
265
|
+
/**
|
|
266
|
+
* Emitted when the user clicks an element inside the content of an interactive (selected) object. The click works as usual.
|
|
267
|
+
*/
|
|
268
|
+
objectElementClick: EventEmitter<UpmadeEngineCustomEvent<UpmadeObjectElementClickEvent$1>>;
|
|
269
|
+
/**
|
|
270
|
+
* Emitted when the user picks an element inside an object that is picking elements, see `setObjectElementPicking`.
|
|
271
|
+
*/
|
|
272
|
+
objectElementPick: EventEmitter<UpmadeEngineCustomEvent<UpmadeObjectElementPickEvent$1>>;
|
|
273
|
+
}
|
|
274
|
+
export declare const DIRECTIVES: (typeof UpmadeEngine)[];
|
|
275
|
+
export declare function provideUpmade(): EnvironmentProviders;
|
|
276
|
+
export { AGENT_TOOL_REASON_HINTS, type ActiveWorkspaceChangeEvent, type ArrowHeadConfig, type ArrowHeadStyle, type BroadcastSyncOptions, BroadcastSyncProvider, type ContextMenuItem, DEFAULT_BRUSH_CONFIG, DEFAULT_TEXT_CONFIG, DE_LOCALE, EN_LOCALE, type EditorIsReadyEvent, FR_LOCALE, type HTMLUpmadeEngineElement$1 as HTMLUpmadeEngineElement, HocuspocusSyncProvider, type IUpmadeIsPublicChangeEvent, type IUpmadeUser, InMemorySyncProvider, IndexedDBSyncProvider, type LineArrowConfig, type LocaleCode, type LoginEvent, MODEL_IFRAME_CONTENT_SECURITY_POLICY, type ObjectsAddedEvent, type ObjectsInViewportChangeEvent, type ObjectsRemovedEvent, type ObjectsUpdatedEvent, ShapeType, type ThemeAwareColor, type ThemeName, UPMADE_CHAT_PROTOCOL_VERSION, UPMADE_DEFAULT_OBJECT_TITLEBAR, UpmadeAgent, UpmadeAgentActionError, type UpmadeAgentChangeSource, type UpmadeAgentDetachedEvent, type UpmadeAgentEventMap, type UpmadeAgentInterruptedEvent, type UpmadeAgentOptions, type UpmadeAgentPresence, type UpmadeAgentState, type UpmadeAgentTool, type UpmadeAgentToolCall, type UpmadeAgentToolContext, type UpmadeAgentToolResult, type UpmadeAgentToolSchema, type UpmadeAgentToolsOptions, type UpmadeAgenticAction, type UpmadeAgenticActionFailureReason, type UpmadeAgenticActionOptions, type UpmadeAgenticActionResult, type UpmadeAgenticActionType, type UpmadeAgenticAddObjectAction, type UpmadeAgenticAnchor, type UpmadeAgenticAttachment, type UpmadeAgenticClearSelectionAction, type UpmadeAgenticClickAction, type UpmadeAgenticColor, type UpmadeAgenticConnectAction, type UpmadeAgenticCopyObjectsAction, type UpmadeAgenticCreateShapeAction, type UpmadeAgenticCreateTextAction, type UpmadeAgenticDeleteObjectsAction, type UpmadeAgenticDrawLineAction, type UpmadeAgenticDrawPathAction, type UpmadeAgenticEditLineAction, type UpmadeAgenticElementTarget, type UpmadeAgenticFill, type UpmadeAgenticGroupObjectsAction, type UpmadeAgenticInteractWithElementAction, type UpmadeAgenticLineEnd, type UpmadeAgenticLineStyle, type UpmadeAgenticMoveObjectAction, type UpmadeAgenticMoveOptions, type UpmadeAgenticMoveResult, type UpmadeAgenticObjectStyle, type UpmadeAgenticObjectTarget, type UpmadeAgenticOrder, type UpmadeAgenticOrderObjectsAction, type UpmadeAgenticPointTarget, type UpmadeAgenticRedoAction, type UpmadeAgenticResizeHandle, type UpmadeAgenticResizeObjectAction, type UpmadeAgenticRotateObjectAction, type UpmadeAgenticSelectAction, type UpmadeAgenticSetStyleAction, type UpmadeAgenticShapeStyle, type UpmadeAgenticStrokeStyle, type UpmadeAgenticTarget, type UpmadeAgenticTextStyle, type UpmadeAgenticTypeTextAction, type UpmadeAgenticUndoAction, type UpmadeAgenticUngroupObjectsAction, type UpmadeAgentsChangeEvent, UpmadeAlignment, UpmadeBaseObject, UpmadeBaseTool, UpmadeBrushTool, type UpmadeBrushToolConfig, type UpmadeCanvasElement, type UpmadeCanvasObject, type UpmadeCanvasSnapshot, type UpmadeChatActor, UpmadeChatHttpError, type UpmadeChatImagePart, type UpmadeChatInput, type UpmadeChatMessage, type UpmadeChatPart, type UpmadeChatProviderData, type UpmadeChatRequest, type UpmadeChatResponse, type UpmadeChatSendResult, UpmadeChatSession, type UpmadeChatSessionEventMap, type UpmadeChatSessionOptions, type UpmadeChatStopReason, type UpmadeChatStreamEvent, type UpmadeChatTextPart, type UpmadeChatTool, type UpmadeChatToolCallPart, type UpmadeChatToolCallState, type UpmadeChatToolCallUpdate, type UpmadeChatToolContext, type UpmadeChatToolDefinition, type UpmadeChatToolResultPart, type UpmadeChatTransport, type UpmadeChatTransportOptions, type UpmadeDebugInfo, UpmadeDynamicObject, type UpmadeDynamicObjectConfig, type UpmadeDynamicObjectRenderContext, type UpmadeDynamicObjectRenderer, UpmadeDynamicObjectRendererRegistry, type UpmadeEasing, type UpmadeElementAwareObject, type UpmadeEngineState, UpmadeEraserTool, type UpmadeExportable, type UpmadeFontDefinition, type UpmadeFontMap, type UpmadeFontRegistration, UpmadeFontRegistry, UpmadeGroup, type UpmadeGroupConfig, type UpmadeHttpTransportOptions, UpmadeIframeObject, UpmadeImage, type UpmadeImageConfig, UpmadeImageTool, UpmadeLine, type UpmadeLineConfig, UpmadeLineTool, type UpmadeLineToolConfig, type UpmadeLocale, UpmadeLocalizationManager, type UpmadeLoginConfig, type UpmadeLoginProvider, type UpmadeObjectChangeSource, type UpmadeObjectConfig, type UpmadeObjectElementClickEvent, type UpmadeObjectElementHighlight, type UpmadeObjectElementHoverEvent, type UpmadeObjectElementInfo, type UpmadeObjectElementInteraction, type UpmadeObjectElementInteractionFailureReason, type UpmadeObjectElementInteractionOptions, type UpmadeObjectElementInteractionResult, type UpmadeObjectElementInteractionType, type UpmadeObjectElementModifiers, type UpmadeObjectElementPickEvent, type UpmadeObjectElementPickingOptions, type UpmadeObjectElementQueryOptions, type UpmadeObjectElementRect, type UpmadeObjectElementState, type UpmadeObjectExportContext, type UpmadeObjectExportFormat, type UpmadeObjectTitlebarActionEvent, type UpmadeObjectTitlebarConfig, type UpmadeObjectTitlebarContext, type UpmadeObjectTitlebarMenuState, type UpmadeObserveOptions, UpmadePath, type UpmadePathConfig, type UpmadePoint, type UpmadeRegisteredFont, type UpmadeRemoteAgentPresence, type UpmadeScriptedAnswer, type UpmadeScriptedStep, type UpmadeScriptedToolCall, type UpmadeScriptedTransportOptions, UpmadeSelectionTool, UpmadeShape, type UpmadeShapeConfig, UpmadeShapeTool, type UpmadeShapeToolConfig, type UpmadeSyncConfig, type UpmadeTermKey, type UpmadeTermVars, type UpmadeTerms, UpmadeText, type UpmadeTextConfig, UpmadeTextTool, type UpmadeTextToolConfig, type UpmadeTheme, UpmadeThemeManager, type UpmadeTitlebarButton, type UpmadeTitlebarElement, type UpmadeTitlebarIcon, type UpmadeTitlebarMenu, type UpmadeTitlebarMenuItem, type UpmadeTitlebarSection, type UpmadeTitlebarSpacer, type UpmadeTitlebarText, type UpmadeTitlebarTitle, type UpmadeTitlebarValue, type UpmadeToolbarItem, type UpmadeUndoState, type UpmadeViewportState, UpmadeWorkspace, type UpmadeWorkspaceConfig, WebSocketSyncProvider, createHttpTransport, createScriptedTransport, darkTheme, formatAgentToolResult, hasRemoteSyncProvider, isUpmadeAgent, isUpmadeChatSession, lightTheme, parsePartialJson };
|