kritzel-vue 0.3.15 → 0.3.17
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 +50 -0
- package/README.md +80 -16
- package/dist/components.d.ts +3 -0
- package/dist/components.js +90 -2
- package/dist/composables.d.ts +10 -1
- package/dist/composables.js +22 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +5 -8
package/LICENSE.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Software License Agreement
|
|
2
|
+
|
|
3
|
+
**IMPORTANT NOTICE:** This is a source-available, non-commercial license.
|
|
4
|
+
* **Hobbyists & Personal Use:** 100% Free. You are welcome to use, modify, and experiment with this software for personal, hobby, or educational projects.
|
|
5
|
+
* **Commercial & Professional Use:** Strictly Prohibited. If you want to use this software in a corporate environment, for professional client work, or as part of a revenue-generating product, you must obtain a commercial license.
|
|
6
|
+
|
|
7
|
+
To purchase a commercial license, please visit: https://kritzel.io
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## PolyForm Noncommercial License 1.0.0
|
|
12
|
+
|
|
13
|
+
### Acceptance
|
|
14
|
+
By using or distributing this software, you accept this license.
|
|
15
|
+
|
|
16
|
+
### User
|
|
17
|
+
You is the person or organization who accepts this license. You can accept this license for only yourself or for an organization.
|
|
18
|
+
|
|
19
|
+
### Software
|
|
20
|
+
Software is the software that includes this license text.
|
|
21
|
+
|
|
22
|
+
### Practice
|
|
23
|
+
Practice is to use, copy, modify, distribute, or make derivative works of the Software.
|
|
24
|
+
|
|
25
|
+
### Grant
|
|
26
|
+
You may Practice the Software for noncommercial purposes.
|
|
27
|
+
|
|
28
|
+
### Noncommercial Purposes
|
|
29
|
+
Noncommercial purposes are purposes that are not commercial purposes.
|
|
30
|
+
|
|
31
|
+
### Commercial Purposes
|
|
32
|
+
Commercial purposes are purposes intended for or directed toward commercial advantage or monetary compensation. Commercial purposes include, but are not limited to, using the Software to provide services to others for a fee, using the Software as part of a product sold or licensed to others, or using the Software inside a business or for professional work.
|
|
33
|
+
|
|
34
|
+
### Redistribution
|
|
35
|
+
You may redistribute copies of the Software, with or without modification, provided that you include this license text with every copy.
|
|
36
|
+
|
|
37
|
+
### Notices
|
|
38
|
+
You must ensure that any copy of the Software you distribute includes all copyright notices, trademark notices, and other legal notices included in the Software.
|
|
39
|
+
|
|
40
|
+
### No Other Rights
|
|
41
|
+
This license does not grant any patent rights or trademark rights.
|
|
42
|
+
|
|
43
|
+
### Termination
|
|
44
|
+
If you violate any term of this license, your rights under this license terminate immediately.
|
|
45
|
+
|
|
46
|
+
### Defensive Patent Claims
|
|
47
|
+
If you make a patent claim against anyone alleging that the Software infringes a patent, your rights under this license terminate immediately.
|
|
48
|
+
|
|
49
|
+
### No Warranty
|
|
50
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,31 +1,95 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Kritzel for Vue
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Build infinite canvas and collaborative whiteboard experiences in Vue with Kritzel's native wrapper and TypeScript-first API.
|
|
4
|
+
|
|
5
|
+
Kritzel is a framework-agnostic infinite canvas and collaborative whiteboard engine. It provides web components that work natively in any framework, with a first-class Vue wrapper for idiomatic template integration.
|
|
6
|
+
|
|
7
|
+
Kritzel handles the hard parts of canvas-based applications — infinite pan and zoom, hit-testing, CRDT-based collaboration, undo and redo, and cross-browser rendering — so you can focus on your product's domain logic.
|
|
8
|
+
|
|
9
|
+
📖 **Full documentation:** [kritzel.io/docs/vue/overview](https://kritzel.io/docs/vue/overview)
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install kritzel-vue
|
|
6
15
|
```
|
|
7
16
|
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
import { createApp } from 'vue'
|
|
11
|
-
import App from './App.vue'
|
|
12
|
-
import { ComponentLibrary } from 'kritzel-vue'
|
|
17
|
+
## Setup
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
Render Kritzel in your component:
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
import { KritzelEditor } from 'kritzel-vue'
|
|
24
|
+
</script>
|
|
15
25
|
|
|
26
|
+
<template>
|
|
27
|
+
<KritzelEditor style="display: block; width: 100%; height: 100vh" />
|
|
28
|
+
</template>
|
|
16
29
|
```
|
|
17
30
|
|
|
18
|
-
|
|
31
|
+
This renders the editor with the **full default toolbar**: selection, brush, eraser, line, shape, text, and image tools.
|
|
32
|
+
|
|
33
|
+
## Optional Enhancements
|
|
34
|
+
|
|
35
|
+
### Persist Canvas State
|
|
36
|
+
|
|
37
|
+
By default, the editor 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`.
|
|
38
|
+
|
|
19
39
|
```html
|
|
20
40
|
<script setup lang="ts">
|
|
21
|
-
import {
|
|
41
|
+
import { KritzelEditor, IndexedDBSyncProvider } from 'kritzel-vue'
|
|
42
|
+
|
|
43
|
+
const syncConfig = {
|
|
44
|
+
providers: [IndexedDBSyncProvider],
|
|
45
|
+
}
|
|
22
46
|
</script>
|
|
23
47
|
|
|
24
48
|
<template>
|
|
25
|
-
<
|
|
26
|
-
<KritzelControls></KritzelControls>
|
|
49
|
+
<KritzelEditor :syncConfig="syncConfig" style="display: block; width: 100%; height: 100vh" />
|
|
27
50
|
</template>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Apply Full Viewport Styling
|
|
54
|
+
|
|
55
|
+
To ensure the Kritzel editor occupies the entire viewport and prevents unwanted scrolling, add the following CSS to your global stylesheet (e.g. `styles.css`):
|
|
28
56
|
|
|
29
|
-
|
|
30
|
-
|
|
57
|
+
```css
|
|
58
|
+
html,
|
|
59
|
+
body,
|
|
60
|
+
#app {
|
|
61
|
+
width: 100dvw;
|
|
62
|
+
height: 100dvh;
|
|
63
|
+
margin: 0;
|
|
64
|
+
padding: 0;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
}
|
|
31
67
|
```
|
|
68
|
+
|
|
69
|
+
### Include Mobile Viewport Meta Tag
|
|
70
|
+
|
|
71
|
+
For optimal rendering and responsiveness on mobile devices, add this meta tag within the `<head>` section of your `index.html`:
|
|
72
|
+
|
|
73
|
+
```html
|
|
74
|
+
<meta
|
|
75
|
+
name="viewport"
|
|
76
|
+
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"
|
|
77
|
+
/>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Core Concepts
|
|
81
|
+
|
|
82
|
+
Kritzel is composed of a small set of core concepts that work together to power your canvas experience:
|
|
83
|
+
|
|
84
|
+
- **Components** — Two entry points, a batteries-included editor and a headless engine, to match any integration style.
|
|
85
|
+
- **Tools** — State-machine interaction handlers that define how users draw, select, and manipulate the canvas.
|
|
86
|
+
- **Objects** — The visual building blocks on the canvas, such as paths, shapes, text, and images with shared spatial properties.
|
|
87
|
+
- **Workspaces** — Containers that manage an entire canvas collection, view state, and editor configuration.
|
|
88
|
+
- **Theming** — Built-in light and dark themes with full CSS variable customization to match your brand.
|
|
89
|
+
- **Collaboration** — Real-time multi-user sync powered by Yjs CRDTs with pluggable transport providers.
|
|
90
|
+
|
|
91
|
+
Learn more in the [full documentation](https://kritzel.io/docs/vue/overview).
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
See [LICENSE.md](./LICENSE.md). Kritzel is free for personal, hobby, and educational use. Commercial use requires a license — visit [kritzel.io](https://kritzel.io) for details.
|
package/dist/components.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare const KritzelButton: StencilVueComponent<JSX.KritzelButton>;
|
|
|
6
6
|
export declare const KritzelCurrentUserDialog: StencilVueComponent<JSX.KritzelCurrentUserDialog>;
|
|
7
7
|
export declare const KritzelDialog: StencilVueComponent<JSX.KritzelDialog>;
|
|
8
8
|
export declare const KritzelEditor: StencilVueComponent<JSX.KritzelEditor>;
|
|
9
|
+
export declare const KritzelEngine: StencilVueComponent<JSX.KritzelEngine>;
|
|
9
10
|
export declare const KritzelExport: StencilVueComponent<JSX.KritzelExport>;
|
|
10
11
|
export declare const KritzelInput: StencilVueComponent<JSX.KritzelInput>;
|
|
11
12
|
export declare const KritzelLineEndings: StencilVueComponent<JSX.KritzelLineEndings>;
|
|
@@ -15,3 +16,5 @@ export declare const KritzelNumericInput: StencilVueComponent<JSX.KritzelNumeric
|
|
|
15
16
|
export declare const KritzelOpacitySlider: StencilVueComponent<JSX.KritzelOpacitySlider>;
|
|
16
17
|
export declare const KritzelPillTabs: StencilVueComponent<JSX.KritzelPillTabs>;
|
|
17
18
|
export declare const KritzelSettings: StencilVueComponent<JSX.KritzelSettings>;
|
|
19
|
+
export declare const KritzelWatermark: StencilVueComponent<JSX.KritzelWatermark>;
|
|
20
|
+
export declare const KritzelZoomPanel: StencilVueComponent<JSX.KritzelZoomPanel>;
|
package/dist/components.js
CHANGED
|
@@ -8,6 +8,7 @@ import { defineCustomElement as defineKritzelButton } from '../../kritzel-stenci
|
|
|
8
8
|
import { defineCustomElement as defineKritzelCurrentUserDialog } from '../../kritzel-stencil/dist/components/kritzel-current-user-dialog.js';
|
|
9
9
|
import { defineCustomElement as defineKritzelDialog } from '../../kritzel-stencil/dist/components/kritzel-dialog.js';
|
|
10
10
|
import { defineCustomElement as defineKritzelEditor } from '../../kritzel-stencil/dist/components/kritzel-editor.js';
|
|
11
|
+
import { defineCustomElement as defineKritzelEngine } from '../../kritzel-stencil/dist/components/kritzel-engine.js';
|
|
11
12
|
import { defineCustomElement as defineKritzelExport } from '../../kritzel-stencil/dist/components/kritzel-export.js';
|
|
12
13
|
import { defineCustomElement as defineKritzelInput } from '../../kritzel-stencil/dist/components/kritzel-input.js';
|
|
13
14
|
import { defineCustomElement as defineKritzelLineEndings } from '../../kritzel-stencil/dist/components/kritzel-line-endings.js';
|
|
@@ -17,6 +18,8 @@ import { defineCustomElement as defineKritzelNumericInput } from '../../kritzel-
|
|
|
17
18
|
import { defineCustomElement as defineKritzelOpacitySlider } from '../../kritzel-stencil/dist/components/kritzel-opacity-slider.js';
|
|
18
19
|
import { defineCustomElement as defineKritzelPillTabs } from '../../kritzel-stencil/dist/components/kritzel-pill-tabs.js';
|
|
19
20
|
import { defineCustomElement as defineKritzelSettings } from '../../kritzel-stencil/dist/components/kritzel-settings.js';
|
|
21
|
+
import { defineCustomElement as defineKritzelWatermark } from '../../kritzel-stencil/dist/components/kritzel-watermark.js';
|
|
22
|
+
import { defineCustomElement as defineKritzelZoomPanel } from '../../kritzel-stencil/dist/components/kritzel-zoom-panel.js';
|
|
20
23
|
export const KritzelAwarenessCursors = /*@__PURE__*/ defineContainer('kritzel-awareness-cursors', defineKritzelAwarenessCursors, [
|
|
21
24
|
'core',
|
|
22
25
|
'showEdgeIndicators',
|
|
@@ -38,7 +41,8 @@ export const KritzelButton = /*@__PURE__*/ defineContainer('kritzel-button', def
|
|
|
38
41
|
'buttonClick'
|
|
39
42
|
]);
|
|
40
43
|
export const KritzelCurrentUserDialog = /*@__PURE__*/ defineContainer('kritzel-current-user-dialog', defineKritzelCurrentUserDialog, [
|
|
41
|
-
'user'
|
|
44
|
+
'user',
|
|
45
|
+
'terms'
|
|
42
46
|
]);
|
|
43
47
|
export const KritzelDialog = /*@__PURE__*/ defineContainer('kritzel-dialog', defineKritzelDialog, [
|
|
44
48
|
'isOpen',
|
|
@@ -65,7 +69,6 @@ export const KritzelEditor = /*@__PURE__*/ defineContainer('kritzel-editor', def
|
|
|
65
69
|
'viewportBoundaryRight',
|
|
66
70
|
'viewportBoundaryTop',
|
|
67
71
|
'viewportBoundaryBottom',
|
|
68
|
-
'wheelEnabled',
|
|
69
72
|
'debugInfo',
|
|
70
73
|
'user',
|
|
71
74
|
'activeUsers',
|
|
@@ -74,11 +77,18 @@ export const KritzelEditor = /*@__PURE__*/ defineContainer('kritzel-editor', def
|
|
|
74
77
|
'objectContextMenuItems',
|
|
75
78
|
'themes',
|
|
76
79
|
'theme',
|
|
80
|
+
'licenseKey',
|
|
81
|
+
'locale',
|
|
82
|
+
'locales',
|
|
83
|
+
'fallbackLocale',
|
|
77
84
|
'customSvgIcons',
|
|
85
|
+
'isPanningEnabled',
|
|
86
|
+
'isZoomingEnabled',
|
|
78
87
|
'isControlsVisible',
|
|
79
88
|
'isUtilityPanelVisible',
|
|
80
89
|
'isWorkspaceManagerVisible',
|
|
81
90
|
'isMoreMenuVisible',
|
|
91
|
+
'isZoomPanelVisible',
|
|
82
92
|
'isObjectDistanceFadingActive',
|
|
83
93
|
'syncConfig',
|
|
84
94
|
'assetStorageConfig',
|
|
@@ -95,6 +105,7 @@ export const KritzelEditor = /*@__PURE__*/ defineContainer('kritzel-editor', def
|
|
|
95
105
|
'objectsUpdated',
|
|
96
106
|
'undoStateChange',
|
|
97
107
|
'themeChange',
|
|
108
|
+
'localeChange',
|
|
98
109
|
'viewportChange',
|
|
99
110
|
'logout',
|
|
100
111
|
'login',
|
|
@@ -109,14 +120,74 @@ export const KritzelEditor = /*@__PURE__*/ defineContainer('kritzel-editor', def
|
|
|
109
120
|
'objectsUpdated',
|
|
110
121
|
'undoStateChange',
|
|
111
122
|
'themeChange',
|
|
123
|
+
'localeChange',
|
|
112
124
|
'viewportChange',
|
|
113
125
|
'logout',
|
|
114
126
|
'login',
|
|
115
127
|
'isPublicChange',
|
|
116
128
|
'awarenessChange'
|
|
117
129
|
]);
|
|
130
|
+
export const KritzelEngine = /*@__PURE__*/ defineContainer('kritzel-engine', defineKritzelEngine, [
|
|
131
|
+
'workspace',
|
|
132
|
+
'editorId',
|
|
133
|
+
'activeWorkspaceId',
|
|
134
|
+
'syncConfig',
|
|
135
|
+
'assetStorageConfig',
|
|
136
|
+
'user',
|
|
137
|
+
'globalContextMenuItems',
|
|
138
|
+
'objectContextMenuItems',
|
|
139
|
+
'scaleMax',
|
|
140
|
+
'scaleMin',
|
|
141
|
+
'cursorTarget',
|
|
142
|
+
'lockDrawingScale',
|
|
143
|
+
'isObjectDistanceFadingActive',
|
|
144
|
+
'theme',
|
|
145
|
+
'licenseKey',
|
|
146
|
+
'themes',
|
|
147
|
+
'locale',
|
|
148
|
+
'locales',
|
|
149
|
+
'fallbackLocale',
|
|
150
|
+
'viewportBoundaryLeft',
|
|
151
|
+
'viewportBoundaryRight',
|
|
152
|
+
'viewportBoundaryTop',
|
|
153
|
+
'viewportBoundaryBottom',
|
|
154
|
+
'debugInfo',
|
|
155
|
+
'isPanningEnabled',
|
|
156
|
+
'isZoomingEnabled',
|
|
157
|
+
'isLoading',
|
|
158
|
+
'isEngineReady',
|
|
159
|
+
'activeToolChange',
|
|
160
|
+
'objectsSelectionChange',
|
|
161
|
+
'workspacesChange',
|
|
162
|
+
'activeWorkspaceChange',
|
|
163
|
+
'longpress',
|
|
164
|
+
'objectsChange',
|
|
165
|
+
'objectsAdded',
|
|
166
|
+
'objectsRemoved',
|
|
167
|
+
'objectsUpdated',
|
|
168
|
+
'undoStateChange',
|
|
169
|
+
'objectsInViewportChange',
|
|
170
|
+
'viewportChange',
|
|
171
|
+
'awarenessChange'
|
|
172
|
+
], [
|
|
173
|
+
'isEngineReady',
|
|
174
|
+
'activeToolChange',
|
|
175
|
+
'objectsSelectionChange',
|
|
176
|
+
'workspacesChange',
|
|
177
|
+
'activeWorkspaceChange',
|
|
178
|
+
'longpress',
|
|
179
|
+
'objectsChange',
|
|
180
|
+
'objectsAdded',
|
|
181
|
+
'objectsRemoved',
|
|
182
|
+
'objectsUpdated',
|
|
183
|
+
'undoStateChange',
|
|
184
|
+
'objectsInViewportChange',
|
|
185
|
+
'viewportChange',
|
|
186
|
+
'awarenessChange'
|
|
187
|
+
]);
|
|
118
188
|
export const KritzelExport = /*@__PURE__*/ defineContainer('kritzel-export', defineKritzelExport, [
|
|
119
189
|
'workspaceName',
|
|
190
|
+
'terms',
|
|
120
191
|
'exportPng',
|
|
121
192
|
'exportSvg',
|
|
122
193
|
'exportJson'
|
|
@@ -190,9 +261,26 @@ export const KritzelPillTabs = /*@__PURE__*/ defineContainer('kritzel-pill-tabs'
|
|
|
190
261
|
]);
|
|
191
262
|
export const KritzelSettings = /*@__PURE__*/ defineContainer('kritzel-settings', defineKritzelSettings, [
|
|
192
263
|
'availableThemes',
|
|
264
|
+
'availableLocales',
|
|
193
265
|
'shortcuts',
|
|
266
|
+
'terms',
|
|
194
267
|
'settings',
|
|
195
268
|
'settingsChange'
|
|
196
269
|
], [
|
|
197
270
|
'settingsChange'
|
|
198
271
|
]);
|
|
272
|
+
export const KritzelWatermark = /*@__PURE__*/ defineContainer('kritzel-watermark', defineKritzelWatermark, [
|
|
273
|
+
'core',
|
|
274
|
+
'label'
|
|
275
|
+
]);
|
|
276
|
+
export const KritzelZoomPanel = /*@__PURE__*/ defineContainer('kritzel-zoom-panel', defineKritzelZoomPanel, [
|
|
277
|
+
'visible',
|
|
278
|
+
'disabled',
|
|
279
|
+
'zoomPercent',
|
|
280
|
+
'terms',
|
|
281
|
+
'zoomIn',
|
|
282
|
+
'zoomOut'
|
|
283
|
+
], [
|
|
284
|
+
'zoomIn',
|
|
285
|
+
'zoomOut'
|
|
286
|
+
]);
|
package/dist/composables.d.ts
CHANGED
|
@@ -21,8 +21,17 @@
|
|
|
21
21
|
* </script>
|
|
22
22
|
*
|
|
23
23
|
* <template>
|
|
24
|
-
* <KritzelEditor ref="
|
|
24
|
+
* <KritzelEditor ref="editor" @isReady="onReady" />
|
|
25
25
|
* </template>
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
export declare function getEditorRef(componentRef: string): import("vue").ComputedRef<HTMLKritzelEditorElement | null>;
|
|
29
|
+
/**
|
|
30
|
+
* Resolves the native Kritzel engine element from a specific Vue template ref.
|
|
31
|
+
*
|
|
32
|
+
* Because `<KritzelEngine>` is a Vue component (not a raw custom element),
|
|
33
|
+
* a template ref points to the component instance rather than the DOM element.
|
|
34
|
+
* Pass the same ref that is bound in your template to make sure the resolved
|
|
35
|
+
* engine always belongs to that exact component instance.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getEngineRef(componentRef: string): import("vue").ComputedRef<HTMLKritzelEngineElement | null>;
|
package/dist/composables.js
CHANGED
|
@@ -22,7 +22,7 @@ import { computed, useTemplateRef, } from "vue";
|
|
|
22
22
|
* </script>
|
|
23
23
|
*
|
|
24
24
|
* <template>
|
|
25
|
-
* <KritzelEditor ref="
|
|
25
|
+
* <KritzelEditor ref="editor" @isReady="onReady" />
|
|
26
26
|
* </template>
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
@@ -39,3 +39,24 @@ export function getEditorRef(componentRef) {
|
|
|
39
39
|
: value;
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Resolves the native Kritzel engine element from a specific Vue template ref.
|
|
44
|
+
*
|
|
45
|
+
* Because `<KritzelEngine>` is a Vue component (not a raw custom element),
|
|
46
|
+
* a template ref points to the component instance rather than the DOM element.
|
|
47
|
+
* Pass the same ref that is bound in your template to make sure the resolved
|
|
48
|
+
* engine always belongs to that exact component instance.
|
|
49
|
+
*/
|
|
50
|
+
export function getEngineRef(componentRef) {
|
|
51
|
+
const engineComponent = useTemplateRef(componentRef);
|
|
52
|
+
return computed(() => {
|
|
53
|
+
var _a;
|
|
54
|
+
const value = engineComponent.value;
|
|
55
|
+
if (!value) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return "$el" in value
|
|
59
|
+
? ((_a = value.$el) !== null && _a !== void 0 ? _a : null)
|
|
60
|
+
: value;
|
|
61
|
+
});
|
|
62
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './components';
|
|
2
2
|
export * from './composables';
|
|
3
3
|
export * from './plugin';
|
|
4
|
-
export { KritzelBaseObject, KritzelText, KritzelPath, KritzelImage, KritzelLine, KritzelShape, KritzelGroup, KritzelBrushTool, KritzelTextTool, KritzelLineTool, KritzelShapeTool, KritzelEraserTool, KritzelSelectionTool, KritzelImageTool, KritzelWorkspace, InMemorySyncProvider, IndexedDBSyncProvider, BroadcastSyncProvider, WebSocketSyncProvider, HocuspocusSyncProvider, KritzelThemeManager, ShapeType, KritzelAlignment, lightTheme, darkTheme, DEFAULT_BRUSH_CONFIG, DEFAULT_TEXT_CONFIG, } from 'kritzel-stencil';
|
|
5
|
-
export type { KritzelToolbarControl, KritzelBrushToolConfig, KritzelLineToolConfig, KritzelShapeToolConfig, KritzelTextToolConfig, KritzelSyncConfig, KritzelTheme, KritzelViewportState, ContextMenuItem, ThemeAwareColor, ThemeName, LoginEvent, EditorIsReadyEvent, ActiveWorkspaceChangeEvent, ObjectsAddedEvent, ObjectsRemovedEvent, ObjectsUpdatedEvent, } from 'kritzel-stencil';
|
|
4
|
+
export { KritzelBaseObject, KritzelText, KritzelPath, KritzelImage, KritzelLine, KritzelShape, KritzelGroup, KritzelBaseTool, KritzelBrushTool, KritzelTextTool, KritzelLineTool, KritzelShapeTool, KritzelEraserTool, KritzelSelectionTool, KritzelImageTool, KritzelWorkspace, InMemorySyncProvider, IndexedDBSyncProvider, BroadcastSyncProvider, WebSocketSyncProvider, HocuspocusSyncProvider, KritzelThemeManager, KritzelLocalizationManager, KritzelLicenseManager, ShapeType, KritzelAlignment, lightTheme, darkTheme, EN_LOCALE, DE_LOCALE, FR_LOCALE, DEFAULT_BRUSH_CONFIG, DEFAULT_TEXT_CONFIG, } from 'kritzel-stencil';
|
|
5
|
+
export type { HTMLKritzelEditorElement, HTMLKritzelEngineElement, KritzelToolbarControl, KritzelBrushToolConfig, KritzelLineToolConfig, KritzelShapeToolConfig, KritzelTextToolConfig, KritzelSyncConfig, KritzelTheme, KritzelViewportState, ContextMenuItem, ThemeAwareColor, ThemeName, KritzelLocale, LocaleCode, KritzelTerms, KritzelTermKey, KritzelTermVars, LoginEvent, EditorIsReadyEvent, ActiveWorkspaceChangeEvent, ObjectsAddedEvent, ObjectsRemovedEvent, ObjectsUpdatedEvent, ObjectsInViewportChangeEvent, KritzelUndoState, IKritzelIsPublicChangedEvent, KritzelEngineState, KritzelDebugInfo, IKritzelUser, } from 'kritzel-stencil';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export * from './components';
|
|
2
2
|
export * from './composables';
|
|
3
3
|
export * from './plugin';
|
|
4
|
-
export { KritzelBaseObject, KritzelText, KritzelPath, KritzelImage, KritzelLine, KritzelShape, KritzelGroup, KritzelBrushTool, KritzelTextTool, KritzelLineTool, KritzelShapeTool, KritzelEraserTool, KritzelSelectionTool, KritzelImageTool, KritzelWorkspace, InMemorySyncProvider, IndexedDBSyncProvider, BroadcastSyncProvider, WebSocketSyncProvider, HocuspocusSyncProvider, KritzelThemeManager, ShapeType, KritzelAlignment, lightTheme, darkTheme, DEFAULT_BRUSH_CONFIG, DEFAULT_TEXT_CONFIG, } from 'kritzel-stencil';
|
|
4
|
+
export { KritzelBaseObject, KritzelText, KritzelPath, KritzelImage, KritzelLine, KritzelShape, KritzelGroup, KritzelBaseTool, KritzelBrushTool, KritzelTextTool, KritzelLineTool, KritzelShapeTool, KritzelEraserTool, KritzelSelectionTool, KritzelImageTool, KritzelWorkspace, InMemorySyncProvider, IndexedDBSyncProvider, BroadcastSyncProvider, WebSocketSyncProvider, HocuspocusSyncProvider, KritzelThemeManager, KritzelLocalizationManager, KritzelLicenseManager, ShapeType, KritzelAlignment, lightTheme, darkTheme, EN_LOCALE, DE_LOCALE, FR_LOCALE, DEFAULT_BRUSH_CONFIG, DEFAULT_TEXT_CONFIG, } from 'kritzel-stencil';
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kritzel-vue",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"homepage": "https://
|
|
5
|
-
"
|
|
3
|
+
"version": "0.3.17",
|
|
4
|
+
"homepage": "https://kritzel.io/",
|
|
5
|
+
"description": "Build infinite canvas experiences in minutes.",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
7
|
"main": "dist/index.js",
|
|
7
8
|
"types": "dist/index.d.ts",
|
|
8
9
|
"directories": {
|
|
@@ -12,10 +13,6 @@
|
|
|
12
13
|
"files": [
|
|
13
14
|
"dist"
|
|
14
15
|
],
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "https://github.com/kasual1/kritzel.git"
|
|
18
|
-
},
|
|
19
16
|
"scripts": {
|
|
20
17
|
"test": "echo \"Error: run tests from root\" && exit 1",
|
|
21
18
|
"build": "npm run tsc",
|
|
@@ -34,6 +31,6 @@
|
|
|
34
31
|
"@stencil/vue-output-target": "0.11.8"
|
|
35
32
|
},
|
|
36
33
|
"peerDependencies": {
|
|
37
|
-
"kritzel-stencil": "^0.3.
|
|
34
|
+
"kritzel-stencil": "^0.3.17"
|
|
38
35
|
}
|
|
39
36
|
}
|