kritzel-stencil 0.1.83 → 0.1.86
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 +21 -21
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kritzel-active-users_42.cjs.entry.js +94 -94
- package/dist/cjs/kritzel-brush-style.cjs.entry.js +1 -1
- package/dist/cjs/{workspace.migrations-K5oVASsb.js → workspace.migrations-Dj-FiYEO.js} +6 -6
- package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.css +115 -115
- package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.js +1 -1
- package/dist/collection/components/core/kritzel-cursor-trail/kritzel-cursor-trail.css +10 -10
- package/dist/collection/components/core/kritzel-cursor-trail/kritzel-cursor-trail.js +1 -1
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.css +71 -71
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +12 -12
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +99 -99
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +14 -14
- package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.css +58 -58
- package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.js +3 -3
- package/dist/collection/components/shared/kritzel-brush-style/kritzel-brush-style.css +42 -42
- package/dist/collection/components/shared/kritzel-brush-style/kritzel-brush-style.js +3 -3
- package/dist/collection/components/shared/kritzel-button/kritzel-button.css +72 -72
- package/dist/collection/components/shared/kritzel-button/kritzel-button.js +2 -2
- package/dist/collection/components/shared/kritzel-color/kritzel-color.css +24 -24
- package/dist/collection/components/shared/kritzel-color/kritzel-color.js +2 -2
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.css +46 -46
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js +1 -1
- package/dist/collection/components/shared/kritzel-dialog/kritzel-dialog.css +179 -179
- package/dist/collection/components/shared/kritzel-dropdown/kritzel-dropdown.css +190 -190
- package/dist/collection/components/shared/kritzel-dropdown/kritzel-dropdown.js +2 -2
- package/dist/collection/components/shared/kritzel-font/kritzel-font.css +10 -10
- package/dist/collection/components/shared/kritzel-font/kritzel-font.js +1 -1
- package/dist/collection/components/shared/kritzel-font-family/kritzel-font-family.css +48 -48
- package/dist/collection/components/shared/kritzel-font-family/kritzel-font-family.js +3 -3
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.css +30 -30
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js +1 -1
- package/dist/collection/components/shared/kritzel-icon/kritzel-icon.css +18 -18
- package/dist/collection/components/shared/kritzel-input/kritzel-input.css +69 -69
- package/dist/collection/components/shared/kritzel-input/kritzel-input.js +1 -1
- package/dist/collection/components/shared/kritzel-line-endings/kritzel-line-endings.css +60 -60
- package/dist/collection/components/shared/kritzel-line-endings/kritzel-line-endings.js +3 -3
- package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.css +190 -190
- package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.js +3 -3
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.css +34 -34
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js +1 -1
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.css +160 -160
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js +2 -2
- package/dist/collection/components/shared/kritzel-numeric-input/kritzel-numeric-input.css +102 -102
- package/dist/collection/components/shared/kritzel-numeric-input/kritzel-numeric-input.js +1 -1
- package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.css +85 -85
- package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.js +1 -1
- package/dist/collection/components/shared/kritzel-pill-tabs/kritzel-pill-tabs.css +58 -58
- package/dist/collection/components/shared/kritzel-pill-tabs/kritzel-pill-tabs.js +2 -2
- package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +1 -1
- package/dist/collection/components/shared/kritzel-shape-fill/kritzel-shape-fill.css +47 -47
- package/dist/collection/components/shared/kritzel-shape-fill/kritzel-shape-fill.js +4 -4
- package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.css +48 -48
- package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.js +1 -1
- package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.css +78 -78
- package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.js +1 -1
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.css +37 -37
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js +1 -1
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.css +18 -18
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +2 -2
- package/dist/collection/components/ui/kritzel-active-users/kritzel-active-users.css +65 -65
- package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.css +42 -42
- package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.js +1 -1
- package/dist/collection/components/ui/kritzel-context-menu/kritzel-context-menu.css +105 -105
- package/dist/collection/components/ui/kritzel-context-menu/kritzel-context-menu.js +1 -1
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.css +330 -330
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +5 -5
- package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.css +11 -11
- package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.js +1 -1
- package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.css +29 -29
- package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js +1 -1
- package/dist/collection/components/ui/kritzel-export/kritzel-export.css +89 -89
- package/dist/collection/components/ui/kritzel-export/kritzel-export.js +1 -1
- package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.css +98 -98
- package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.js +1 -1
- package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.css +45 -45
- package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +2 -2
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.css +129 -129
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +1 -1
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.css +133 -133
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
- package/dist/collection/components/ui/kritzel-tool-config/kritzel-tool-config.css +38 -38
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.css +45 -45
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
- package/dist/collection/components/ui/kritzel-workspace-manager/kritzel-workspace-manager.css +5 -5
- package/dist/collection/constants/version.js +1 -1
- package/dist/collection/helpers/cursor.helper.js +6 -6
- package/dist/collection/helpers/svg-export.helper.js +31 -31
- package/dist/components/index.js +1 -1
- package/dist/components/kritzel-active-users.js +1 -1
- package/dist/components/kritzel-avatar.js +1 -1
- package/dist/components/kritzel-awareness-cursors.js +1 -1
- package/dist/components/kritzel-back-to-content.js +1 -1
- package/dist/components/kritzel-brush-style.js +1 -1
- package/dist/components/kritzel-button.js +1 -1
- package/dist/components/kritzel-color-palette.js +1 -1
- package/dist/components/kritzel-color.js +1 -1
- package/dist/components/kritzel-context-menu.js +1 -1
- package/dist/components/kritzel-controls.js +1 -1
- package/dist/components/kritzel-current-user-dialog.js +1 -1
- package/dist/components/kritzel-current-user.js +1 -1
- package/dist/components/kritzel-cursor-trail.js +1 -1
- package/dist/components/kritzel-dialog.js +1 -1
- package/dist/components/kritzel-dropdown.js +1 -1
- package/dist/components/kritzel-editor.js +1 -1
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/kritzel-export.js +1 -1
- package/dist/components/kritzel-font-family.js +1 -1
- package/dist/components/kritzel-font-size.js +1 -1
- package/dist/components/kritzel-font.js +1 -1
- package/dist/components/kritzel-input.js +1 -1
- package/dist/components/kritzel-line-endings.js +1 -1
- package/dist/components/kritzel-login-dialog.js +1 -1
- package/dist/components/kritzel-master-detail.js +1 -1
- package/dist/components/kritzel-menu-item.js +1 -1
- package/dist/components/kritzel-menu.js +1 -1
- package/dist/components/kritzel-more-menu.js +1 -1
- package/dist/components/kritzel-numeric-input.js +1 -1
- package/dist/components/kritzel-opacity-slider.js +1 -1
- package/dist/components/kritzel-pill-tabs.js +1 -1
- package/dist/components/kritzel-portal.js +1 -1
- package/dist/components/kritzel-settings.js +1 -1
- package/dist/components/kritzel-shape-fill.js +1 -1
- package/dist/components/kritzel-share-dialog.js +1 -1
- package/dist/components/kritzel-slide-toggle.js +1 -1
- package/dist/components/kritzel-split-button.js +1 -1
- package/dist/components/kritzel-stroke-size.js +1 -1
- package/dist/components/kritzel-tool-config.js +1 -1
- package/dist/components/kritzel-tooltip.js +1 -1
- package/dist/components/kritzel-utility-panel.js +1 -1
- package/dist/components/kritzel-workspace-manager.js +1 -1
- package/dist/components/{p-B5WII1Lk.js → p-0cs6zQLB.js} +1 -1
- package/dist/components/p-7yTPTHbQ.js +1 -0
- package/dist/components/{p-DwemlMvt.js → p-B3UJucEe.js} +1 -1
- package/dist/components/{p-DUQmBcTy.js → p-B5a3arJg.js} +1 -1
- package/dist/components/{p-DCH4Rlqx.js → p-BIdZCZ_l.js} +1 -1
- package/dist/components/{p-CNMpVlot.js → p-BMPgR5Bt.js} +1 -1
- package/dist/components/{p-CKfjz1gj.js → p-BOcGfEkz.js} +1 -1
- package/dist/components/{p-DUnKjQN7.js → p-BVEYAGm1.js} +1 -1
- package/dist/components/{p-CMGHx71q.js → p-BYX50YSd.js} +1 -1
- package/dist/components/{p-BjPmEs5A.js → p-BfJav4Zz.js} +1 -1
- package/dist/components/{p-CLo-TjD_.js → p-BgopgrfE.js} +1 -1
- package/dist/components/{p-CJzg_ejc.js → p-BsQ4E7I8.js} +1 -1
- package/dist/components/{p-V3VW2JKl.js → p-C-ZoFpSf.js} +1 -1
- package/dist/components/p-C0U3Mg5I.js +1 -0
- package/dist/components/{p-Brwz_Dpb.js → p-C3Dwuqka.js} +1 -1
- package/dist/components/{p-CS7r-zhx.js → p-C4vg_-vg.js} +1 -1
- package/dist/components/{p-DrsORMoT.js → p-C4zfI-dj.js} +1 -1
- package/dist/components/{p-cjeDomsc.js → p-CBTqCoUx.js} +1 -1
- package/dist/components/{p-BaaFG0p-.js → p-CBq-KE9C.js} +1 -1
- package/dist/components/{p-CfEGaTaV.js → p-CTj2UdbS.js} +1 -1
- package/dist/components/{p-Bat829Bg.js → p-C_OSXZqJ.js} +1 -1
- package/dist/components/{p-B4F19Aqj.js → p-CaKSDRid.js} +1 -1
- package/dist/components/{p-BZ8bK8qT.js → p-CekG3_ce.js} +1 -1
- package/dist/components/{p-Dw0Obsn5.js → p-Cz2gQKbL.js} +1 -1
- package/dist/components/{p-VxgCvVox.js → p-CzIuqMQA.js} +1 -1
- package/dist/components/{p-1ppb4M65.js → p-D6KNaj_Y.js} +1 -1
- package/dist/components/{p-rNu5JVNH.js → p-D8fQwcNC.js} +1 -1
- package/dist/components/{p-CYl_JKvH.js → p-DBZRCL1u.js} +1 -1
- package/dist/components/{p-DkT0KZCm.js → p-DDBaFNFi.js} +1 -1
- package/dist/components/{p-CM7rYf9A.js → p-DEd2L0e3.js} +1 -1
- package/dist/components/{p-DYcsC2zO.js → p-DMvIGnOt.js} +1 -1
- package/dist/components/{p-C9zsWWH2.js → p-DPmAV68B.js} +1 -1
- package/dist/components/{p-7yR-sKH8.js → p-DRbR0Li3.js} +1 -1
- package/dist/components/{p-C-MtTi6x.js → p-DXO_ppUK.js} +1 -1
- package/dist/components/p-DemKKw9U.js +1 -0
- package/dist/components/{p-D5BXoK9m.js → p-Dxb22STM.js} +1 -1
- package/dist/components/p-Nq8UyPCc.js +1 -0
- package/dist/components/{p-DEOUiiyI.js → p-R9M5PnAz.js} +1 -1
- package/dist/components/{p-D7pwbRUy.js → p-qBqQhAmh.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/kritzel-active-users_42.entry.js +94 -94
- package/dist/esm/kritzel-brush-style.entry.js +1 -1
- package/dist/esm/{workspace.migrations-D5iSPf3E.js → workspace.migrations-ByWmiPl8.js} +6 -6
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/{p-b0be4da1.entry.js → p-10c2b77c.entry.js} +1 -1
- package/dist/stencil/p-b38650d2.entry.js +9 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/constants/version.d.ts +1 -1
- package/package.json +2 -2
- package/readme.md +114 -114
- package/dist/components/p-B4h_tGG1.js +0 -1
- package/dist/components/p-CJKsuQun.js +0 -1
- package/dist/components/p-DKeBfe_l.js +0 -1
- package/dist/components/p-HK-6khHo.js +0 -1
- package/dist/stencil/p-c28b30ab.entry.js +0 -9
- /package/dist/stencil/{p-D5iSPf3E.js → p-ByWmiPl8.js} +0 -0
|
@@ -23,7 +23,7 @@ const KritzelBrushStyle = class {
|
|
|
23
23
|
value: option.value,
|
|
24
24
|
label: option.label,
|
|
25
25
|
}));
|
|
26
|
-
return (index.h(index.Host, { key: '
|
|
26
|
+
return (index.h(index.Host, { key: '126d6ebbd4b90eef936ccb90905da373a5f9b3ac' }, index.h("kritzel-dropdown", { key: '22e8e49b74c43b410384e247d4b0c779b1ee7b2e', options: dropdownOptions, value: this.type, onValueChanged: event => this.handleDropdownValueChange(event) }, index.h("button", { key: '0b00fc066db7a2afb5ab101bc20badbb8c065d4a', class: "brush-style-button", slot: "prefix" }, index.h("kritzel-icon", { key: 'ed074981009c37c86a22cbc70656663060c22553', name: this.type, size: 16 })))));
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
KritzelBrushStyle.style = kritzelBrushStyleCss();
|
|
@@ -20158,12 +20158,12 @@ class KritzelCursorHelper {
|
|
|
20158
20158
|
// We rotate around the center of the SVG canvas
|
|
20159
20159
|
const center = size / 2;
|
|
20160
20160
|
// We use a group to apply the rotation
|
|
20161
|
-
const svg = `
|
|
20162
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${size} ${size}">
|
|
20163
|
-
<g transform="rotate(${rotation} ${center} ${center})">
|
|
20164
|
-
${content}
|
|
20165
|
-
</g>
|
|
20166
|
-
</svg>
|
|
20161
|
+
const svg = `
|
|
20162
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${size} ${size}">
|
|
20163
|
+
<g transform="rotate(${rotation} ${center} ${center})">
|
|
20164
|
+
${content}
|
|
20165
|
+
</g>
|
|
20166
|
+
</svg>
|
|
20167
20167
|
`;
|
|
20168
20168
|
// Encode the SVG for use in a data URI
|
|
20169
20169
|
// We need to be careful with encoding to ensure it works across browsers
|
package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.css
CHANGED
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
position: fixed;
|
|
4
|
-
top: 0;
|
|
5
|
-
left: 0;
|
|
6
|
-
width: 100vw;
|
|
7
|
-
height: 100vh;
|
|
8
|
-
pointer-events: none;
|
|
9
|
-
z-index: 1;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.awareness-cursor {
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 0;
|
|
15
|
-
left: 0;
|
|
16
|
-
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
17
|
-
opacity 300ms ease;
|
|
18
|
-
will-change: transform;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.awareness-cursor.stale {
|
|
22
|
-
opacity: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.awareness-cursor.tracking-object {
|
|
26
|
-
transition-duration: 0ms;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.cursor-arrow {
|
|
30
|
-
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.cursor-label {
|
|
34
|
-
position: absolute;
|
|
35
|
-
left: 16px;
|
|
36
|
-
top: 16px;
|
|
37
|
-
white-space: nowrap;
|
|
38
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
39
|
-
font-size: var(--kritzel-awareness-cursor-label-font-size, 12px);
|
|
40
|
-
color: var(--kritzel-awareness-cursor-label-text-color, #ffffff);
|
|
41
|
-
padding: 2px 8px;
|
|
42
|
-
border-radius: 4px;
|
|
43
|
-
line-height: 1.4;
|
|
44
|
-
font-weight: 500;
|
|
45
|
-
pointer-events: none;
|
|
46
|
-
user-select: none;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.edge-indicator {
|
|
50
|
-
position: absolute;
|
|
51
|
-
top: -12px;
|
|
52
|
-
left: -12px;
|
|
53
|
-
width: 24px;
|
|
54
|
-
height: 24px;
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
59
|
-
opacity 300ms ease;
|
|
60
|
-
will-change: transform;
|
|
61
|
-
pointer-events: auto;
|
|
62
|
-
user-select: none;
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.edge-indicator.stale {
|
|
67
|
-
opacity: 0;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.edge-indicator.tracking-object {
|
|
71
|
-
transition-duration: 0ms;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.edge-arrow {
|
|
75
|
-
position: absolute;
|
|
76
|
-
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
|
|
77
|
-
transition: opacity 300ms ease;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.edge-arrow.stale {
|
|
81
|
-
opacity: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.edge-label {
|
|
85
|
-
position: absolute;
|
|
86
|
-
white-space: nowrap;
|
|
87
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
88
|
-
font-size: var(--kritzel-awareness-cursor-label-font-size, 12px);
|
|
89
|
-
color: var(--kritzel-awareness-cursor-label-text-color, #ffffff);
|
|
90
|
-
padding: 2px 8px;
|
|
91
|
-
border-radius: 4px;
|
|
92
|
-
line-height: 1.4;
|
|
93
|
-
font-weight: 500;
|
|
94
|
-
pointer-events: none;
|
|
95
|
-
opacity: 0;
|
|
96
|
-
transform-origin: center;
|
|
97
|
-
transition: opacity 150ms ease;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.edge-indicator:hover .edge-label {
|
|
101
|
-
opacity: 1;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.remote-selection-box {
|
|
105
|
-
position: absolute;
|
|
106
|
-
top: 0;
|
|
107
|
-
left: 0;
|
|
108
|
-
border-width: 2px;
|
|
109
|
-
border-style: solid;
|
|
110
|
-
pointer-events: none;
|
|
111
|
-
will-change: transform, width, height;
|
|
112
|
-
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
113
|
-
width var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
114
|
-
height var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out;
|
|
115
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
width: 100vw;
|
|
7
|
+
height: 100vh;
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
z-index: 1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.awareness-cursor {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
17
|
+
opacity 300ms ease;
|
|
18
|
+
will-change: transform;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.awareness-cursor.stale {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.awareness-cursor.tracking-object {
|
|
26
|
+
transition-duration: 0ms;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cursor-arrow {
|
|
30
|
+
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.cursor-label {
|
|
34
|
+
position: absolute;
|
|
35
|
+
left: 16px;
|
|
36
|
+
top: 16px;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
39
|
+
font-size: var(--kritzel-awareness-cursor-label-font-size, 12px);
|
|
40
|
+
color: var(--kritzel-awareness-cursor-label-text-color, #ffffff);
|
|
41
|
+
padding: 2px 8px;
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
line-height: 1.4;
|
|
44
|
+
font-weight: 500;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
user-select: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.edge-indicator {
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: -12px;
|
|
52
|
+
left: -12px;
|
|
53
|
+
width: 24px;
|
|
54
|
+
height: 24px;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
59
|
+
opacity 300ms ease;
|
|
60
|
+
will-change: transform;
|
|
61
|
+
pointer-events: auto;
|
|
62
|
+
user-select: none;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.edge-indicator.stale {
|
|
67
|
+
opacity: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.edge-indicator.tracking-object {
|
|
71
|
+
transition-duration: 0ms;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.edge-arrow {
|
|
75
|
+
position: absolute;
|
|
76
|
+
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
|
|
77
|
+
transition: opacity 300ms ease;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.edge-arrow.stale {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.edge-label {
|
|
85
|
+
position: absolute;
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
88
|
+
font-size: var(--kritzel-awareness-cursor-label-font-size, 12px);
|
|
89
|
+
color: var(--kritzel-awareness-cursor-label-text-color, #ffffff);
|
|
90
|
+
padding: 2px 8px;
|
|
91
|
+
border-radius: 4px;
|
|
92
|
+
line-height: 1.4;
|
|
93
|
+
font-weight: 500;
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
opacity: 0;
|
|
96
|
+
transform-origin: center;
|
|
97
|
+
transition: opacity 150ms ease;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.edge-indicator:hover .edge-label {
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.remote-selection-box {
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 0;
|
|
107
|
+
left: 0;
|
|
108
|
+
border-width: 2px;
|
|
109
|
+
border-style: solid;
|
|
110
|
+
pointer-events: none;
|
|
111
|
+
will-change: transform, width, height;
|
|
112
|
+
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
113
|
+
width var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
114
|
+
height var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out;
|
|
115
|
+
}
|
package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.js
CHANGED
|
@@ -185,7 +185,7 @@ export class KritzelAwarenessCursors {
|
|
|
185
185
|
void _ty;
|
|
186
186
|
void this.objectVersion;
|
|
187
187
|
const cursors = Array.from(this.remoteCursors.values());
|
|
188
|
-
return (h(Host, { key: '
|
|
188
|
+
return (h(Host, { key: '7147977660886684c8030075206790de5597c342' }, cursors.map(remoteCursor => {
|
|
189
189
|
if (!remoteCursor.cursor)
|
|
190
190
|
return null;
|
|
191
191
|
// When a remote user is actively drawing, derive cursor position from
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
position: fixed;
|
|
4
|
-
top: 0;
|
|
5
|
-
left: 0;
|
|
6
|
-
width: 100vw;
|
|
7
|
-
height: 100vh;
|
|
8
|
-
pointer-events: none;
|
|
9
|
-
z-index: 9000;
|
|
10
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
width: 100vw;
|
|
7
|
+
height: 100vh;
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
z-index: 9000;
|
|
10
|
+
}
|
|
@@ -63,7 +63,7 @@ export class KritzelCursorTrail {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
|
-
return (h(Host, { key: '
|
|
66
|
+
return (h(Host, { key: '2e40e68375f4b8b4531181d249c1638a01d9dac5' }, this.cursorTrailPoints.length > 1 && (h("svg", { key: 'c015f003cc5f4c5c532803846fa5201edf4c211a', class: "cursor-trail-svg", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
67
67
|
position: 'absolute',
|
|
68
68
|
left: '0',
|
|
69
69
|
top: '0',
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
kritzel-editor{
|
|
2
|
-
display: flex;
|
|
3
|
-
margin: 0;
|
|
4
|
-
position: relative;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
touch-action: manipulation;
|
|
11
|
-
user-select: none;
|
|
12
|
-
-webkit-touch-callout: none;
|
|
13
|
-
-webkit-user-select: none;
|
|
14
|
-
-khtml-user-select: none;
|
|
15
|
-
-moz-user-select: none;
|
|
16
|
-
-ms-user-select: none;
|
|
17
|
-
user-select: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
kritzel-controls {
|
|
21
|
-
position: absolute;
|
|
22
|
-
bottom: var(--kritzel-editor-controls-bottom, 14px);
|
|
23
|
-
transition: transform var(--kritzel-editor-controls-transition-duration, 0.1s) var(--kritzel-editor-controls-transition, ease-in-out);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
kritzel-controls.keyboard-open {
|
|
27
|
-
transform: var(--kritzel-editor-controls-transform, translateY(300%));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.top-left-buttons {
|
|
31
|
-
position: absolute;
|
|
32
|
-
top: var(--kritzel-editor-top-left-buttons-top, 14px);
|
|
33
|
-
left: var(--kritzel-editor-top-left-buttons-left, 14px);
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: flex-start;
|
|
36
|
-
gap: 8px;
|
|
37
|
-
z-index: 10000;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.top-right-buttons {
|
|
41
|
-
position: absolute;
|
|
42
|
-
top: var(--kritzel-editor-top-right-buttons-top, 14px);
|
|
43
|
-
right: var(--kritzel-editor-top-right-buttons-right, 14px);
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
gap: 8px;
|
|
47
|
-
z-index: 10000;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.top-right-button {
|
|
51
|
-
display: flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
width: 50px;
|
|
55
|
-
height: 50px;
|
|
56
|
-
padding: 0;
|
|
57
|
-
border: var(--kritzel-split-button-border, 1px solid #ebebeb);
|
|
58
|
-
border-radius: var(--kritzel-split-button-border-radius, 12px);
|
|
59
|
-
background-color: var(--kritzel-split-button-background-color, #ffffff);
|
|
60
|
-
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
61
|
-
box-shadow: var(--kritzel-split-button-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));
|
|
62
|
-
transition: background-color 150ms ease;
|
|
63
|
-
-webkit-tap-highlight-color: transparent;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.top-right-button:hover {
|
|
67
|
-
background-color: #f5f5f5;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.top-right-button:active {
|
|
71
|
-
background-color: #ebebeb;
|
|
1
|
+
kritzel-editor{
|
|
2
|
+
display: flex;
|
|
3
|
+
margin: 0;
|
|
4
|
+
position: relative;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
touch-action: manipulation;
|
|
11
|
+
user-select: none;
|
|
12
|
+
-webkit-touch-callout: none;
|
|
13
|
+
-webkit-user-select: none;
|
|
14
|
+
-khtml-user-select: none;
|
|
15
|
+
-moz-user-select: none;
|
|
16
|
+
-ms-user-select: none;
|
|
17
|
+
user-select: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
kritzel-controls {
|
|
21
|
+
position: absolute;
|
|
22
|
+
bottom: var(--kritzel-editor-controls-bottom, 14px);
|
|
23
|
+
transition: transform var(--kritzel-editor-controls-transition-duration, 0.1s) var(--kritzel-editor-controls-transition, ease-in-out);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
kritzel-controls.keyboard-open {
|
|
27
|
+
transform: var(--kritzel-editor-controls-transform, translateY(300%));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.top-left-buttons {
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: var(--kritzel-editor-top-left-buttons-top, 14px);
|
|
33
|
+
left: var(--kritzel-editor-top-left-buttons-left, 14px);
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: flex-start;
|
|
36
|
+
gap: 8px;
|
|
37
|
+
z-index: 10000;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.top-right-buttons {
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: var(--kritzel-editor-top-right-buttons-top, 14px);
|
|
43
|
+
right: var(--kritzel-editor-top-right-buttons-right, 14px);
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: 8px;
|
|
47
|
+
z-index: 10000;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.top-right-button {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
width: 50px;
|
|
55
|
+
height: 50px;
|
|
56
|
+
padding: 0;
|
|
57
|
+
border: var(--kritzel-split-button-border, 1px solid #ebebeb);
|
|
58
|
+
border-radius: var(--kritzel-split-button-border-radius, 12px);
|
|
59
|
+
background-color: var(--kritzel-split-button-background-color, #ffffff);
|
|
60
|
+
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
61
|
+
box-shadow: var(--kritzel-split-button-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));
|
|
62
|
+
transition: background-color 150ms ease;
|
|
63
|
+
-webkit-tap-highlight-color: transparent;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.top-right-button:hover {
|
|
67
|
+
background-color: #f5f5f5;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.top-right-button:active {
|
|
71
|
+
background-color: #ebebeb;
|
|
72
72
|
}
|
|
@@ -715,27 +715,27 @@ export class KritzelEditor {
|
|
|
715
715
|
const isLoggedIn = this.isLoggedIn;
|
|
716
716
|
const shouldShowCurrentUser = isLoggedIn;
|
|
717
717
|
const shouldShowLoginButton = !!this.loginConfig && !isLoggedIn;
|
|
718
|
-
return (h(Host, { key: '
|
|
718
|
+
return (h(Host, { key: 'd8a67f8c972b419312aa79fa94309a4c3c28e559' }, h("div", { key: '8d6014bb9f6782112ede03b004ec7f2e1e30cc61', class: "top-left-buttons" }, h("kritzel-workspace-manager", { key: '3aeb146fa84ff212d48eef81f9699d9050d95955', workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), h("kritzel-back-to-content", { key: '341a7383c54d378e3a7ed484852751d08df73f3e', visible: this.isBackToContentButtonVisible, onBackToContent: () => this.backToContent() })), h("kritzel-engine", { key: 'b081b6e393f7523f9c41f17bed67ab2f0ba307e0', ref: el => {
|
|
719
719
|
if (el) {
|
|
720
720
|
this.engineRef = el;
|
|
721
721
|
}
|
|
722
|
-
}, workspace: this.activeWorkspace, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, scaleMin: this.scaleMin, isLoading: this.isLoading, viewportBoundaryLeft: this.viewportBoundaryLeft, viewportBoundaryRight: this.viewportBoundaryRight, viewportBoundaryTop: this.viewportBoundaryTop, viewportBoundaryBottom: this.viewportBoundaryBottom, wheelEnabled: this.wheelEnabled, theme: this.currentTheme, debugInfo: this.debugInfo, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onActiveWorkspaceChange: event => this.handleActiveWorkspaceChange(event), onObjectsChange: event => this.handleObjectsChange(event), onObjectsAdded: event => this.handleObjectsAdded(event), onObjectsRemoved: event => this.handleObjectsRemoved(event), onObjectsUpdated: event => this.handleObjectsUpdated(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event), onViewportChange: event => this.handleViewportChange(event), onAwarenessChange: event => this.handleAwarenessChange(event) }), h("kritzel-controls", { key: '
|
|
722
|
+
}, workspace: this.activeWorkspace, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, scaleMin: this.scaleMin, isLoading: this.isLoading, viewportBoundaryLeft: this.viewportBoundaryLeft, viewportBoundaryRight: this.viewportBoundaryRight, viewportBoundaryTop: this.viewportBoundaryTop, viewportBoundaryBottom: this.viewportBoundaryBottom, wheelEnabled: this.wheelEnabled, theme: this.currentTheme, debugInfo: this.debugInfo, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onActiveWorkspaceChange: event => this.handleActiveWorkspaceChange(event), onObjectsChange: event => this.handleObjectsChange(event), onObjectsAdded: event => this.handleObjectsAdded(event), onObjectsRemoved: event => this.handleObjectsRemoved(event), onObjectsUpdated: event => this.handleObjectsUpdated(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event), onViewportChange: event => this.handleViewportChange(event), onAwarenessChange: event => this.handleAwarenessChange(event) }), h("kritzel-controls", { key: 'e27061ec3d8b9b612cb6da6d4a7467361058f2ba', class: { 'keyboard-open': this.isVirtualKeyboardOpen }, style: { display: this.isControlsVisible ? 'flex' : 'none' }, ref: el => {
|
|
723
723
|
if (el) {
|
|
724
724
|
this.controlsRef = el;
|
|
725
725
|
}
|
|
726
|
-
}, controls: this.controls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.currentTheme, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: '
|
|
726
|
+
}, controls: this.controls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.currentTheme, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: '620b5c46a8a9bc33be69d91cb8e147358b7be117', class: "top-right-buttons" }, h("kritzel-settings", { key: 'ef39941ab724501ffdb8b5425b7882494e8b35ba', ref: el => {
|
|
727
727
|
if (el) {
|
|
728
728
|
this.settingsRef = el;
|
|
729
729
|
}
|
|
730
|
-
}, shortcuts: this.shortcuts, editorId: this.editorId, onSettingsChange: event => this.handleSettingsChange(event) }), h("kritzel-export", { key: '
|
|
730
|
+
}, shortcuts: this.shortcuts, editorId: this.editorId, onSettingsChange: event => this.handleSettingsChange(event) }), h("kritzel-export", { key: '643c6d287068705a523e602e207a2bc562c58cd2', ref: el => {
|
|
731
731
|
if (el) {
|
|
732
732
|
this.exportRef = el;
|
|
733
733
|
}
|
|
734
|
-
}, workspaceName: this.activeWorkspace?.name || 'workspace', onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), h("kritzel-active-users", { key: '
|
|
734
|
+
}, workspaceName: this.activeWorkspace?.name || 'workspace', onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), h("kritzel-active-users", { key: '6cfdae4fe8f4c902a3b37d1d27c1d80d2780d8fd', users: this.activeUsers }), shouldShowCurrentUser && h("kritzel-current-user", { key: '145ff28fe73069f3e47f5bde42741ccb0d33d635', user: this.user }), shouldShowLoginButton && h("kritzel-button", { key: 'f30dc2bd31b8862cba7124090eb7e5a9a0621371', onButtonClick: () => this.loginDialogRef?.open() }, "Sign in"), h("kritzel-more-menu", { key: 'd23ed0f6b4cc993e37d1838f277a95fc3ae0fe36', items: this.moreMenuItems }), h("kritzel-share-dialog", { key: '9b9eacdf41a5546abcaba336e0dca1185465ecb4', ref: el => {
|
|
735
735
|
if (el) {
|
|
736
736
|
this.shareDialogRef = el;
|
|
737
737
|
}
|
|
738
|
-
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: '
|
|
738
|
+
}, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: 'dd97a5b6e94433f550b016713d77d98e89bc23c3', ref: el => {
|
|
739
739
|
if (el) {
|
|
740
740
|
this.loginDialogRef = el;
|
|
741
741
|
}
|
|
@@ -937,7 +937,7 @@ export class KritzelEditor {
|
|
|
937
937
|
},
|
|
938
938
|
"getter": false,
|
|
939
939
|
"setter": false,
|
|
940
|
-
"defaultValue": "{\
|
|
940
|
+
"defaultValue": "{\n showViewportInfo: false,\n showObjectInfo: false,\n showSyncProviderInfo: true,\n showMigrationInfo: true,\n }"
|
|
941
941
|
},
|
|
942
942
|
"user": {
|
|
943
943
|
"type": "unknown",
|
|
@@ -1010,7 +1010,7 @@ export class KritzelEditor {
|
|
|
1010
1010
|
},
|
|
1011
1011
|
"getter": false,
|
|
1012
1012
|
"setter": false,
|
|
1013
|
-
"defaultValue": "[\
|
|
1013
|
+
"defaultValue": "[\n {\n name: 'selection',\n type: 'tool',\n isDefault: true,\n tool: KritzelSelectionTool,\n icon: 'cursor',\n },\n {\n name: 'brush',\n type: 'tool',\n tool: KritzelBrushTool,\n icon: 'pen',\n config: DEFAULT_BRUSH_CONFIG,\n },\n {\n name: 'eraser',\n type: 'tool',\n tool: KritzelEraserTool,\n icon: 'eraser',\n },\n {\n name: 'line',\n type: 'tool',\n tool: KritzelLineTool,\n icon: 'arrow',\n config: DEFAULT_LINE_TOOL_CONFIG,\n },\n {\n name: 'shape',\n type: 'tool',\n tool: KritzelShapeTool,\n icon: 'shape-rectangle',\n config: DEFAULT_SHAPE_CONFIG,\n subOptions: [\n { id: 'rectangle', icon: 'shape-rectangle', label: 'Rectangle', value: ShapeType.Rectangle, toolProperty: 'shapeType' },\n { id: 'ellipse', icon: 'shape-ellipse', label: 'Ellipse', value: ShapeType.Ellipse, toolProperty: 'shapeType' },\n { id: 'triangle', icon: 'shape-triangle', label: 'Triangle', value: ShapeType.Triangle, toolProperty: 'shapeType' },\n ],\n },\n {\n name: 'text',\n type: 'tool',\n tool: KritzelTextTool,\n icon: 'type',\n config: DEFAULT_TEXT_CONFIG,\n },\n {\n name: 'image',\n type: 'tool',\n tool: KritzelImageTool,\n icon: 'image',\n },\n {\n name: 'config',\n type: 'config',\n },\n ]"
|
|
1014
1014
|
},
|
|
1015
1015
|
"globalContextMenuItems": {
|
|
1016
1016
|
"type": "unknown",
|
|
@@ -1035,7 +1035,7 @@ export class KritzelEditor {
|
|
|
1035
1035
|
},
|
|
1036
1036
|
"getter": false,
|
|
1037
1037
|
"setter": false,
|
|
1038
|
-
"defaultValue": "[\
|
|
1038
|
+
"defaultValue": "[\n {\n label: 'Paste',\n icon: 'paste',\n disabled: async () => (await this.engineRef.getCopiedObjects()).length === 0,\n action: menu => this.engineRef.paste(menu.x, menu.y),\n },\n {\n label: 'Select All',\n icon: 'select-all',\n disabled: async () => (await this.engineRef.getObjectsInViewport()).length === 0,\n action: () => this.selectAllObjectsInViewport(),\n },\n ]"
|
|
1039
1039
|
},
|
|
1040
1040
|
"objectContextMenuItems": {
|
|
1041
1041
|
"type": "unknown",
|
|
@@ -1060,7 +1060,7 @@ export class KritzelEditor {
|
|
|
1060
1060
|
},
|
|
1061
1061
|
"getter": false,
|
|
1062
1062
|
"setter": false,
|
|
1063
|
-
"defaultValue": "[\
|
|
1063
|
+
"defaultValue": "[\n { label: 'Copy', icon: 'copy', group: 'clipboard', action: () => this.engineRef.copy() },\n {\n label: 'Paste',\n icon: 'paste',\n group: 'clipboard',\n disabled: async () => (await this.engineRef.getCopiedObjects()).length === 0,\n action: (menu, _) => this.engineRef.paste(menu.x, menu.y),\n },\n {\n label: 'Order',\n icon: 'ordering',\n group: 'other',\n children: [\n { label: 'Bring to Front', icon: 'bring-to-front', action: () => this.engineRef.bringToFront() },\n { label: 'Send to Back', icon: 'send-to-back', action: () => this.engineRef.sendToBack() },\n { label: 'Move Up', icon: 'arrow-up-from-dot', action: () => this.engineRef.bringForward() },\n { label: 'Move Down', icon: 'arrow-down-from-dot', action: () => this.engineRef.sendBackward() },\n ],\n },\n {\n label: 'Align',\n icon: 'align',\n group: 'other',\n disabled: async () => (await this.engineRef.getSelectedObjects()).length < 2,\n children: [\n { label: 'Align Left', icon: 'align-start-vertical', action: () => this.engineRef.alignObjects(KritzelAlignment.StartHorizontal) },\n { label: 'Align Center Horizontally', icon: 'align-center-horizontal', action: () => this.engineRef.alignObjects(KritzelAlignment.CenterHorizontal) },\n { label: 'Align Right', icon: 'align-end-vertical', action: () => this.engineRef.alignObjects(KritzelAlignment.EndHorizontal) },\n { label: 'Align Top', icon: 'align-start-horizontal', action: () => this.engineRef.alignObjects(KritzelAlignment.StartVertical) },\n { label: 'Align Center Vertically', icon: 'align-center-vertical', action: () => this.engineRef.alignObjects(KritzelAlignment.CenterVertical) },\n { label: 'Align Bottom', icon: 'align-end-horizontal', action: () => this.engineRef.alignObjects(KritzelAlignment.EndVertical) },\n ],\n },\n {\n label: 'Group',\n icon: 'group',\n group: 'other',\n children: [\n {\n label: 'Group',\n icon: 'group',\n disabled: async () => (await this.engineRef.getSelectedObjects()).length < 2,\n action: () => this.engineRef.group(),\n },\n {\n label: 'Ungroup',\n icon: 'ungroup',\n disabled: async () => {\n const selectedObjects = await this.engineRef.getSelectedObjects();\n return !selectedObjects.some(obj => obj.__class__ === 'KritzelGroup');\n },\n action: () => this.engineRef.ungroup(),\n },\n ],\n },\n {\n label: 'Export',\n icon: 'download',\n group: 'export',\n children: [\n { label: 'Export as SVG', icon: 'download', action: () => this.engineRef.exportSelectedObjectsAsSvg() },\n { label: 'Export as PNG', icon: 'download', action: () => this.engineRef.exportSelectedObjectsAsPng() },\n ],\n },\n { label: 'Delete', icon: 'delete', group: 'edit', action: () => this.engineRef.delete() },\n ]"
|
|
1064
1064
|
},
|
|
1065
1065
|
"customSvgIcons": {
|
|
1066
1066
|
"type": "unknown",
|
|
@@ -1148,7 +1148,7 @@ export class KritzelEditor {
|
|
|
1148
1148
|
},
|
|
1149
1149
|
"getter": false,
|
|
1150
1150
|
"setter": false,
|
|
1151
|
-
"defaultValue": "{\
|
|
1151
|
+
"defaultValue": "{\n appStateId: 'kritzel-app-test',\n providers: [HocuspocusSyncProvider, IndexedDBSyncProvider]\n }"
|
|
1152
1152
|
},
|
|
1153
1153
|
"loginConfig": {
|
|
1154
1154
|
"type": "unknown",
|
|
@@ -1173,7 +1173,7 @@ export class KritzelEditor {
|
|
|
1173
1173
|
},
|
|
1174
1174
|
"getter": false,
|
|
1175
1175
|
"setter": false,
|
|
1176
|
-
"defaultValue": "{\
|
|
1176
|
+
"defaultValue": "{\n providers: [\n {\n label: 'Sign in with Google',\n icon: 'google',\n name: 'Google',\n }\n ]\n }"
|
|
1177
1177
|
},
|
|
1178
1178
|
"isLoading": {
|
|
1179
1179
|
"type": "boolean",
|