kritzel-stencil 0.4.19 → 0.4.21
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/LICENSE.md +49 -49
- package/dist/cjs/{index-Dn19mGl-.js → index-Xav9JFHg.js} +11 -47
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kritzel-active-users_47.cjs.entry.js +151 -119
- package/dist/cjs/kritzel-brush-style.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{schema.constants-CY0WWJYd.js → schema.constants-CjN-B633.js} +20 -44
- package/dist/cjs/stencil.cjs.js +2 -2
- package/dist/collection/classes/structures/app-state-map.structure.js +16 -6
- package/dist/collection/collection-manifest.json +1 -1
- 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 +160 -160
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +18 -18
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +80 -80
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +43 -21
- package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.css +29 -29
- package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.js +2 -2
- 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 +73 -73
- 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 +209 -209
- 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 +2 -2
- 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 +166 -166
- 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 +68 -68
- 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-sync-indicator/kritzel-sync-indicator.css +50 -50
- package/dist/collection/components/shared/kritzel-sync-indicator/kritzel-sync-indicator.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 +112 -112
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.css +331 -331
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +6 -6
- 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 +39 -39
- 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-loading-overlay/kritzel-loading-overlay.css +50 -50
- package/dist/collection/components/ui/kritzel-loading-overlay/kritzel-loading-overlay.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 +58 -58
- package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +2 -2
- package/dist/collection/components/ui/kritzel-notification-card/kritzel-notification-card.css +101 -101
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.css +137 -137
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +1 -1
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.css +150 -150
- 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 +16 -16
- package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.css +72 -72
- package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.js +1 -1
- 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 +41 -41
- package/dist/components/index.js +3 -3
- 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 +4 -4
- 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 +56 -56
- 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-icon.js +1 -1
- package/dist/components/kritzel-input.js +1 -1
- package/dist/components/kritzel-line-endings.js +1 -1
- package/dist/components/kritzel-loading-overlay.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-notification-card.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-sync-indicator.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-watermark.js +1 -1
- package/dist/components/kritzel-workspace-manager.js +1 -1
- package/dist/components/kritzel-zoom-panel.js +1 -1
- package/dist/components/{p-CLAz6RJc.js → p-2WiGyky4.js} +3 -3
- package/dist/components/{p-zG-WUBGF.js → p-4SPnZZkH.js} +4 -4
- package/dist/components/{p-MhQxGUvY.js → p-B-585egz.js} +3 -3
- package/dist/components/{p-C9_yBEoX.js → p-B43upypT.js} +10 -30
- package/dist/components/{p-CSKToqUl.js → p-B5SWPDuq.js} +4 -4
- package/dist/components/{p-Covorf4C.js → p-BFYtCsZu.js} +3 -3
- package/dist/components/{p-DYPA7jpg.js → p-BPsKYMH6.js} +2 -2
- package/dist/components/{p-BL0aCu3R.js → p-BdCrcQ0_.js} +9 -9
- package/dist/components/{p-Cx-L_28S.js → p-BoN700-O.js} +3 -3
- package/dist/components/{p-ME1sDz3f.js → p-BozrueXV.js} +2 -2
- package/dist/components/{p-D2VcPEtL.js → p-BrNsOp2v.js} +6 -6
- package/dist/components/{p-BXUx_C0N.js → p-BsLI_BWq.js} +2 -2
- package/dist/components/{p-dAXnRkjA.js → p-C98Eb3_R.js} +5 -5
- package/dist/components/{p-Bxi-Bm49.js → p-CAoN_STZ.js} +2 -2
- package/dist/components/{p-CSWCmyzb.js → p-CF8pLc07.js} +5 -5
- package/dist/components/{p-D3BzgkIE.js → p-CSPYkLLH.js} +2 -2
- package/dist/components/{p-Ck-87E2G.js → p-CSuU8frA.js} +1 -1
- package/dist/components/{p-Di--2boB.js → p-CXpv9Rxe.js} +3 -3
- package/dist/components/{p-Csxx9TbU.js → p-C_f_QElb.js} +104 -96
- package/dist/components/{p-o3NYKrVL.js → p-CaBbajU2.js} +3 -3
- package/dist/components/{p-3tBE7SyG.js → p-Cm33td2O.js} +2 -2
- package/dist/components/{p-vDCa_ZDm.js → p-CrHvaLRV.js} +3 -3
- package/dist/components/{p-DT_WBwsw.js → p-CwZ3KKFq.js} +6 -6
- package/dist/components/{p-BZZ3KRPk.js → p-CzW58DHM.js} +3 -3
- package/dist/components/{p-BrqSjRJN.js → p-Czhdc844.js} +3 -3
- package/dist/components/{p-BkXQL5Dl.js → p-D1rjfWgJ.js} +5 -5
- package/dist/components/{p-DPsbNStn.js → p-DB58Oa5V.js} +2 -2
- package/dist/components/{p-DafP9PAA.js → p-DBqoPgev.js} +2 -2
- package/dist/components/{p-BrA9NBEE.js → p-DDTMGbtA.js} +21 -21
- package/dist/components/{p-Dznwo6oc.js → p-DKGg-76-.js} +2 -2
- package/dist/components/{p-Dp1CD4gK.js → p-DVXTPI71.js} +2 -2
- package/dist/components/{p-QSyeAy8R.js → p-DX2nriaq.js} +2 -2
- package/dist/components/{p-CHoOe3FD.js → p-Df3BwVGy.js} +3 -3
- package/dist/components/{p-DcUIO14-.js → p-Dt7-I2Xz.js} +4 -4
- package/dist/components/{p-BShrnlam.js → p-DtnMdWWB.js} +2 -2
- package/dist/components/{p-Ch-KG9To.js → p-DwMqCX2P.js} +3 -3
- package/dist/components/{p-fSV6KVTC.js → p-GKmqCI8r.js} +3 -3
- package/dist/components/{p-CWAChRD5.js → p-HoO86l1o.js} +12 -12
- package/dist/components/{p-Qdo3E8dr.js → p-PjPPCHVL.js} +2 -2
- package/dist/components/{p-D6JycG-I.js → p-bAacqNHq.js} +3 -3
- package/dist/components/{p-DjXQxw9R.js → p-djJSnjAX.js} +3 -3
- package/dist/components/{p-b0J2ktAm.js → p-dsxHDlQ3.js} +7 -7
- package/dist/components/{p-BppcoKoo.js → p-eZXIu4yK.js} +5 -5
- package/dist/components/{p-BFYT03fw.js → p-fL9rl200.js} +3 -3
- package/dist/components/{p-1Q4VnThv.js → p-jIKskj3S.js} +3 -3
- package/dist/components/{p-D0Trc3IQ.js → p-vqEUQ-4Q.js} +5 -5
- package/dist/esm/{index-2va1Pk9z.js → index-Dhio9uis.js} +11 -47
- package/dist/esm/index.js +2 -2
- package/dist/esm/kritzel-active-users_47.entry.js +151 -119
- package/dist/esm/kritzel-brush-style.entry.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{schema.constants-DBvUmuDH.js → schema.constants-DfvqHmxc.js} +20 -44
- package/dist/esm/stencil.js +3 -3
- package/dist/stencil/index.esm.js +2 -2
- package/dist/stencil/{p-0250005e.entry.js → p-832b80e9.entry.js} +151 -119
- package/dist/stencil/{p-DBvUmuDH.js → p-DfvqHmxc.js} +20 -44
- package/dist/stencil/{p-2va1Pk9z.js → p-Dhio9uis.js} +11 -47
- package/dist/stencil/{p-df06ca3a.entry.js → p-fb32cd8f.entry.js} +2 -2
- package/dist/stencil/stencil.esm.js +4 -4
- package/dist/types/classes/structures/app-state-map.structure.d.ts +6 -0
- package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +5 -0
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +0 -12
- package/loader/index.d.ts +1 -1
- package/package.json +1 -1
- package/readme.md +10 -10
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100%;
|
|
5
|
-
width: 100%;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
isolation: isolate;
|
|
8
|
-
background-color: var(--kritzel-engine-background-color, #ffffff);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:host,
|
|
12
|
-
:host * {
|
|
13
|
-
touch-action: none;
|
|
14
|
-
user-select: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.ProseMirror {
|
|
18
|
-
outline: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
p, h1, h2, h3, h4, h5, h6, blockquote, pre {
|
|
22
|
-
margin: 0;
|
|
23
|
-
padding: 0;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.debug-panel {
|
|
27
|
-
position: absolute;
|
|
28
|
-
pointer-events: none;
|
|
29
|
-
top: 0;
|
|
30
|
-
right: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.origin {
|
|
34
|
-
position: relative;
|
|
35
|
-
top: 0;
|
|
36
|
-
left: 0;
|
|
37
|
-
height: 0;
|
|
38
|
-
width: 0;
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
-webkit-transform-origin: top left;
|
|
41
|
-
-moz-transform-origin: top left;
|
|
42
|
-
transform-origin: top left;
|
|
43
|
-
overflow: visible;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.object {
|
|
47
|
-
overflow: visible;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.kritzel-image-object--first-reveal {
|
|
51
|
-
animation: kritzel-image-first-reveal 180ms ease-out both;
|
|
52
|
-
will-change: filter;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@keyframes kritzel-image-first-reveal {
|
|
56
|
-
from {
|
|
57
|
-
filter: opacity(0);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
to {
|
|
61
|
-
filter: opacity(1);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@media (prefers-reduced-motion: reduce) {
|
|
66
|
-
.kritzel-image-object--first-reveal {
|
|
67
|
-
animation: none;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.PlaygroundEditorTheme__quote {
|
|
72
|
-
margin: 0;
|
|
73
|
-
margin-left: 20px;
|
|
74
|
-
margin-bottom: 10px;
|
|
75
|
-
font-size: 15px;
|
|
76
|
-
color: rgb(101, 103, 107);
|
|
77
|
-
border-left-color: rgb(206, 208, 212);
|
|
78
|
-
border-left-width: 4px;
|
|
79
|
-
border-left-style: solid;
|
|
80
|
-
padding-left: 16px;
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
position: relative;
|
|
4
|
+
height: 100%;
|
|
5
|
+
width: 100%;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
isolation: isolate;
|
|
8
|
+
background-color: var(--kritzel-engine-background-color, #ffffff);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host,
|
|
12
|
+
:host * {
|
|
13
|
+
touch-action: none;
|
|
14
|
+
user-select: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ProseMirror {
|
|
18
|
+
outline: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
p, h1, h2, h3, h4, h5, h6, blockquote, pre {
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.debug-panel {
|
|
27
|
+
position: absolute;
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
top: 0;
|
|
30
|
+
right: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.origin {
|
|
34
|
+
position: relative;
|
|
35
|
+
top: 0;
|
|
36
|
+
left: 0;
|
|
37
|
+
height: 0;
|
|
38
|
+
width: 0;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
-webkit-transform-origin: top left;
|
|
41
|
+
-moz-transform-origin: top left;
|
|
42
|
+
transform-origin: top left;
|
|
43
|
+
overflow: visible;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.object {
|
|
47
|
+
overflow: visible;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.kritzel-image-object--first-reveal {
|
|
51
|
+
animation: kritzel-image-first-reveal 180ms ease-out both;
|
|
52
|
+
will-change: filter;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@keyframes kritzel-image-first-reveal {
|
|
56
|
+
from {
|
|
57
|
+
filter: opacity(0);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
to {
|
|
61
|
+
filter: opacity(1);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (prefers-reduced-motion: reduce) {
|
|
66
|
+
.kritzel-image-object--first-reveal {
|
|
67
|
+
animation: none;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.PlaygroundEditorTheme__quote {
|
|
72
|
+
margin: 0;
|
|
73
|
+
margin-left: 20px;
|
|
74
|
+
margin-bottom: 10px;
|
|
75
|
+
font-size: 15px;
|
|
76
|
+
color: rgb(101, 103, 107);
|
|
77
|
+
border-left-color: rgb(206, 208, 212);
|
|
78
|
+
border-left-width: 4px;
|
|
79
|
+
border-left-style: solid;
|
|
80
|
+
padding-left: 16px;
|
|
81
81
|
}
|
|
@@ -2103,6 +2103,7 @@ export class KritzelEngine {
|
|
|
2103
2103
|
if (!this._isAssetStorageInitialized && this.assetStorageConfig) {
|
|
2104
2104
|
await this.initializeAssetStorage();
|
|
2105
2105
|
}
|
|
2106
|
+
await this.waitForRemoteAppStateIfEmpty();
|
|
2106
2107
|
if (this.activeWorkspaceId) {
|
|
2107
2108
|
const startupWorkspace = this.core.getWorkspaces().find(ws => ws.id === this.activeWorkspaceId);
|
|
2108
2109
|
if (startupWorkspace) {
|
|
@@ -2135,6 +2136,27 @@ export class KritzelEngine {
|
|
|
2135
2136
|
}
|
|
2136
2137
|
this.tryResolveActiveWorkspaceFromId();
|
|
2137
2138
|
}
|
|
2139
|
+
/**
|
|
2140
|
+
* On a cold start the remote workspace list may still be in flight; creating a
|
|
2141
|
+
* fallback workspace before it arrives would pollute the synced app state.
|
|
2142
|
+
*/
|
|
2143
|
+
async waitForRemoteAppStateIfEmpty() {
|
|
2144
|
+
if (this.core.getWorkspaces().length > 0) {
|
|
2145
|
+
return;
|
|
2146
|
+
}
|
|
2147
|
+
if (!this.core.appStateMap.hasNetworkSyncProvider || !this.isNetworkAvailable()) {
|
|
2148
|
+
return;
|
|
2149
|
+
}
|
|
2150
|
+
this._isWorkspaceLoading = true;
|
|
2151
|
+
this.syncLoadingState();
|
|
2152
|
+
try {
|
|
2153
|
+
await this.core.appStateMap.whenNetworkSynced();
|
|
2154
|
+
}
|
|
2155
|
+
finally {
|
|
2156
|
+
this._isWorkspaceLoading = false;
|
|
2157
|
+
this.syncLoadingState();
|
|
2158
|
+
}
|
|
2159
|
+
}
|
|
2138
2160
|
resolveStartupWorkspace() {
|
|
2139
2161
|
if (this.activeWorkspaceId) {
|
|
2140
2162
|
const workspaceById = this.core.getWorkspaces().find(ws => ws.id === this.activeWorkspaceId);
|
|
@@ -2970,7 +2992,7 @@ export class KritzelEngine {
|
|
|
2970
2992
|
"optional": true,
|
|
2971
2993
|
"docs": {
|
|
2972
2994
|
"tags": [],
|
|
2973
|
-
"text": "Configuration for binary asset storage (e.g., images).\
|
|
2995
|
+
"text": "Configuration for binary asset storage (e.g., images).\n\nThe Yjs document only persists asset ids; the actual bytes are stored\nby the providers listed here. Defaults to IndexedDB-only storage. To\nsupport cross-device image sync alongside a networked sync provider\n(Hocuspocus, WebSocket), configure at least one remote asset provider\nsuch as `HttpAssetProvider` or `PresignedAssetProvider`."
|
|
2974
2996
|
},
|
|
2975
2997
|
"getter": false,
|
|
2976
2998
|
"setter": false
|
|
@@ -4399,7 +4421,7 @@ export class KritzelEngine {
|
|
|
4399
4421
|
"return": "Promise<void>"
|
|
4400
4422
|
},
|
|
4401
4423
|
"docs": {
|
|
4402
|
-
"text": "Programmatically opens the context menu at a specified world-coordinate position.\
|
|
4424
|
+
"text": "Programmatically opens the context menu at a specified world-coordinate position.\nIf `objectId` is provided and found, the object context menu is shown for that object.\nIf no `objectId` is provided but a selection group already exists, the object context menu is shown.\nOtherwise, the global context menu is shown.",
|
|
4403
4425
|
"tags": [{
|
|
4404
4426
|
"name": "param",
|
|
4405
4427
|
"text": "options.x - The X position in world (canvas) coordinates."
|
|
@@ -4509,7 +4531,7 @@ export class KritzelEngine {
|
|
|
4509
4531
|
"return": "Promise<T[]>"
|
|
4510
4532
|
},
|
|
4511
4533
|
"docs": {
|
|
4512
|
-
"text": "Returns all objects that match the given predicate function.\
|
|
4534
|
+
"text": "Returns all objects that match the given predicate function.\nExcludes internal selection-related objects (selection groups and selection boxes).",
|
|
4513
4535
|
"tags": [{
|
|
4514
4536
|
"name": "param",
|
|
4515
4537
|
"text": "predicate - A filter function called for each object. Return `true` to include."
|
|
@@ -4518,7 +4540,7 @@ export class KritzelEngine {
|
|
|
4518
4540
|
"text": "An array of matching objects."
|
|
4519
4541
|
}, {
|
|
4520
4542
|
"name": "example",
|
|
4521
|
-
"text": "```ts\
|
|
4543
|
+
"text": "```ts\n// Find all text objects\nconst texts = await engine.findObjects(obj => obj.__class__ === 'KritzelText');\n\n// Find objects at a point\nconst hits = await engine.findObjects(obj => obj.hitTest(100, 200));\n\n// Combine criteria\nconst filtered = await engine.findObjects(obj => obj.__class__ === 'KritzelPath' && obj.opacity < 0.5);\n```"
|
|
4522
4544
|
}]
|
|
4523
4545
|
}
|
|
4524
4546
|
},
|
|
@@ -4651,7 +4673,7 @@ export class KritzelEngine {
|
|
|
4651
4673
|
"return": "Promise<T[]>"
|
|
4652
4674
|
},
|
|
4653
4675
|
"docs": {
|
|
4654
|
-
"text": "Adds multiple objects to the canvas in a single batch operation.\
|
|
4676
|
+
"text": "Adds multiple objects to the canvas in a single batch operation.\nAll objects are inserted within one Yjs transaction (single undo step),\ntriggering only one rerender cycle. Intended for programmatic streaming\nscenarios where per-object overhead would cause stutter.",
|
|
4655
4677
|
"tags": [{
|
|
4656
4678
|
"name": "param",
|
|
4657
4679
|
"text": "objects - The object instances to add."
|
|
@@ -4773,7 +4795,7 @@ export class KritzelEngine {
|
|
|
4773
4795
|
"return": "Promise<T[]>"
|
|
4774
4796
|
},
|
|
4775
4797
|
"docs": {
|
|
4776
|
-
"text": "Removes multiple objects from the canvas in a single batch operation.\
|
|
4798
|
+
"text": "Removes multiple objects from the canvas in a single batch operation.\nAll removals happen within one Yjs transaction (single undo step),\ntriggering only one rerender cycle. Intended for programmatic streaming\nscenarios where per-object overhead would cause stutter.",
|
|
4777
4799
|
"tags": [{
|
|
4778
4800
|
"name": "param",
|
|
4779
4801
|
"text": "objects - The objects to remove."
|
|
@@ -4961,7 +4983,7 @@ export class KritzelEngine {
|
|
|
4961
4983
|
"return": "Promise<void>"
|
|
4962
4984
|
},
|
|
4963
4985
|
"docs": {
|
|
4964
|
-
"text": "Pans the viewport to center on the given object without changing the zoom level.\
|
|
4986
|
+
"text": "Pans the viewport to center on the given object without changing the zoom level.\nUnlike `centerObjectInViewport`, this moves the camera \u2014 not the object.",
|
|
4965
4987
|
"tags": [{
|
|
4966
4988
|
"name": "param",
|
|
4967
4989
|
"text": "object - The object whose center the viewport should pan to."
|
|
@@ -4981,7 +5003,7 @@ export class KritzelEngine {
|
|
|
4981
5003
|
"return": "Promise<boolean>"
|
|
4982
5004
|
},
|
|
4983
5005
|
"docs": {
|
|
4984
|
-
"text": "Pans and zooms the viewport to fit the nearest content, with padding.\
|
|
5006
|
+
"text": "Pans and zooms the viewport to fit the nearest content, with padding.\nUseful when the user has panned away from all objects.",
|
|
4985
5007
|
"tags": [{
|
|
4986
5008
|
"name": "returns",
|
|
4987
5009
|
"text": "`true` if content was found and the viewport was adjusted, `false` otherwise."
|
|
@@ -5005,7 +5027,7 @@ export class KritzelEngine {
|
|
|
5005
5027
|
"return": "Promise<boolean>"
|
|
5006
5028
|
},
|
|
5007
5029
|
"docs": {
|
|
5008
|
-
"text": "Pans and zooms the viewport to fit ALL objects on the canvas, including those not currently rendered.\
|
|
5030
|
+
"text": "Pans and zooms the viewport to fit ALL objects on the canvas, including those not currently rendered.\nCalculates the combined bounding box of all objects and centers the viewport to show them.",
|
|
5009
5031
|
"tags": [{
|
|
5010
5032
|
"name": "param",
|
|
5011
5033
|
"text": "animate - Whether to animate the viewport transition (default: true)."
|
|
@@ -5042,7 +5064,7 @@ export class KritzelEngine {
|
|
|
5042
5064
|
"return": "Promise<boolean>"
|
|
5043
5065
|
},
|
|
5044
5066
|
"docs": {
|
|
5045
|
-
"text": "Pans and zooms the viewport to fit the provided objects.\
|
|
5067
|
+
"text": "Pans and zooms the viewport to fit the provided objects.\nCalculates the combined bounding box of the given objects and centers the viewport to show them.",
|
|
5046
5068
|
"tags": [{
|
|
5047
5069
|
"name": "param",
|
|
5048
5070
|
"text": "objects - The objects to center and fit in the viewport."
|
|
@@ -5149,7 +5171,7 @@ export class KritzelEngine {
|
|
|
5149
5171
|
"return": "Promise<void>"
|
|
5150
5172
|
},
|
|
5151
5173
|
"docs": {
|
|
5152
|
-
"text": "Zooms the viewport to the given scale level.\
|
|
5174
|
+
"text": "Zooms the viewport to the given scale level.\nOptionally centers on a world point; if omitted, zooms around the viewport center.",
|
|
5153
5175
|
"tags": [{
|
|
5154
5176
|
"name": "param",
|
|
5155
5177
|
"text": "scale - Target scale level."
|
|
@@ -5467,7 +5489,7 @@ export class KritzelEngine {
|
|
|
5467
5489
|
"return": "Promise<KritzelObjectExportFormat[]>"
|
|
5468
5490
|
},
|
|
5469
5491
|
"docs": {
|
|
5470
|
-
"text": "Returns export formats supported by the currently selected object.\
|
|
5492
|
+
"text": "Returns export formats supported by the currently selected object.\nOnly returns formats when exactly one object is selected.",
|
|
5471
5493
|
"tags": []
|
|
5472
5494
|
}
|
|
5473
5495
|
},
|
|
@@ -5494,7 +5516,7 @@ export class KritzelEngine {
|
|
|
5494
5516
|
"return": "Promise<boolean>"
|
|
5495
5517
|
},
|
|
5496
5518
|
"docs": {
|
|
5497
|
-
"text": "Checks whether the currently selected object supports a specific export format.\
|
|
5519
|
+
"text": "Checks whether the currently selected object supports a specific export format.\nReturns false when none or multiple objects are selected.",
|
|
5498
5520
|
"tags": []
|
|
5499
5521
|
}
|
|
5500
5522
|
},
|
|
@@ -5521,7 +5543,7 @@ export class KritzelEngine {
|
|
|
5521
5543
|
"return": "Promise<void>"
|
|
5522
5544
|
},
|
|
5523
5545
|
"docs": {
|
|
5524
|
-
"text": "Exports the currently selected object in the requested format and triggers a file download.\
|
|
5546
|
+
"text": "Exports the currently selected object in the requested format and triggers a file download.\nOnly supports single selection.",
|
|
5525
5547
|
"tags": []
|
|
5526
5548
|
}
|
|
5527
5549
|
},
|
|
@@ -5542,7 +5564,7 @@ export class KritzelEngine {
|
|
|
5542
5564
|
"return": "Promise<string>"
|
|
5543
5565
|
},
|
|
5544
5566
|
"docs": {
|
|
5545
|
-
"text": "Exports the current workspace and all its objects as a JSON string.\
|
|
5567
|
+
"text": "Exports the current workspace and all its objects as a JSON string.\nThe exported data includes workspace metadata (id, name, viewport) and all canvas objects.",
|
|
5546
5568
|
"tags": [{
|
|
5547
5569
|
"name": "returns",
|
|
5548
5570
|
"text": "A JSON string representing the complete workspace state."
|
|
@@ -5576,7 +5598,7 @@ export class KritzelEngine {
|
|
|
5576
5598
|
"return": "Promise<void>"
|
|
5577
5599
|
},
|
|
5578
5600
|
"docs": {
|
|
5579
|
-
"text": "Imports a workspace from a JSON string into a new workspace.\
|
|
5601
|
+
"text": "Imports a workspace from a JSON string into a new workspace.\nCreates a new workspace with the imported data and automatically switches to it.",
|
|
5580
5602
|
"tags": [{
|
|
5581
5603
|
"name": "param",
|
|
5582
5604
|
"text": "json - A JSON string containing workspace data (from exportAsJson)."
|
|
@@ -5613,7 +5635,7 @@ export class KritzelEngine {
|
|
|
5613
5635
|
"return": "Promise<number>"
|
|
5614
5636
|
},
|
|
5615
5637
|
"docs": {
|
|
5616
|
-
"text": "Loads objects from a workspace JSON string into the current workspace.\
|
|
5638
|
+
"text": "Loads objects from a workspace JSON string into the current workspace.\nUnlike importFromJson, this does not create a new workspace - it adds objects to the existing one.\nUseful for initializing a workspace with pre-existing content after the editor is ready.",
|
|
5617
5639
|
"tags": [{
|
|
5618
5640
|
"name": "param",
|
|
5619
5641
|
"text": "json - A JSON string containing workspace data (from exportAsJson)."
|
|
@@ -5673,7 +5695,7 @@ export class KritzelEngine {
|
|
|
5673
5695
|
"return": "Promise<void>"
|
|
5674
5696
|
},
|
|
5675
5697
|
"docs": {
|
|
5676
|
-
"text": "Opens a file picker dialog and imports the selected JSON file into the workspace.\
|
|
5698
|
+
"text": "Opens a file picker dialog and imports the selected JSON file into the workspace.\nThis method creates a hidden file input, triggers the browser's file chooser,\nreads the selected JSON file, and imports it using importFromJson.",
|
|
5677
5699
|
"tags": [{
|
|
5678
5700
|
"name": "returns",
|
|
5679
5701
|
"text": "A promise that resolves when the import is complete or rejects on error/cancel."
|
|
@@ -5856,7 +5878,7 @@ export class KritzelEngine {
|
|
|
5856
5878
|
"return": "Promise<void>"
|
|
5857
5879
|
},
|
|
5858
5880
|
"docs": {
|
|
5859
|
-
"text": "Loads a shared workspace by token.\
|
|
5881
|
+
"text": "Loads a shared workspace by token.\nIf the workspace exists locally, it switches to it.\nIf it doesn't exist, it adds it to the local workspaces list and then switches to it.",
|
|
5860
5882
|
"tags": [{
|
|
5861
5883
|
"name": "param",
|
|
5862
5884
|
"text": "token - The connection token identifying the shared workspace"
|
|
@@ -5876,7 +5898,7 @@ export class KritzelEngine {
|
|
|
5876
5898
|
"return": "Promise<void>"
|
|
5877
5899
|
},
|
|
5878
5900
|
"docs": {
|
|
5879
|
-
"text": "Reinitializes sync by performing a full teardown and re-initialization.\
|
|
5901
|
+
"text": "Reinitializes sync by performing a full teardown and re-initialization.\nDestroys the current Yjs documents and providers, then rebuilds everything\nfrom the current syncConfig. Data reloads from IndexedDB nearly instantly.\nCall this after updating the syncConfig prop (e.g. after authentication state changes).",
|
|
5880
5902
|
"tags": []
|
|
5881
5903
|
}
|
|
5882
5904
|
},
|
|
@@ -6139,7 +6161,7 @@ export class KritzelEngine {
|
|
|
6139
6161
|
"return": "Promise<Partial<Record<keyof KritzelTerms, string>>>"
|
|
6140
6162
|
},
|
|
6141
6163
|
"docs": {
|
|
6142
|
-
"text": "Resolves every known term key for the active locale into a flat map.\
|
|
6164
|
+
"text": "Resolves every known term key for the active locale into a flat map.\nUseful for UI layers that need to localize many strings at once.",
|
|
6143
6165
|
"tags": []
|
|
6144
6166
|
}
|
|
6145
6167
|
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
position: absolute;
|
|
3
|
-
bottom: var(--kritzel-watermark-offset-bottom, 12px);
|
|
4
|
-
right: var(--kritzel-watermark-offset-right, 12px);
|
|
5
|
-
z-index: 10000;
|
|
6
|
-
pointer-events: none;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.watermark-link {
|
|
10
|
-
pointer-events: auto;
|
|
11
|
-
display: inline-flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
padding: 4px 8px;
|
|
14
|
-
border-radius: var(--kritzel-watermark-border-radius, 6px);
|
|
15
|
-
font-family: var(--kritzel-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
16
|
-
font-size: var(--kritzel-watermark-font-size, 11px);
|
|
17
|
-
line-height: 1;
|
|
18
|
-
text-decoration: none;
|
|
19
|
-
color: var(--kritzel-watermark-color, rgba(60, 60, 60, 0.75));
|
|
20
|
-
background-color: var(--kritzel-watermark-background, rgba(255, 255, 255, 0.6));
|
|
21
|
-
box-shadow: var(--kritzel-watermark-box-shadow, 0 1px 2px rgba(0, 0, 0, 0.12));
|
|
22
|
-
opacity: var(--kritzel-watermark-opacity, 0.85);
|
|
23
|
-
transition: opacity 150ms ease;
|
|
24
|
-
user-select: none;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.watermark-link:hover {
|
|
28
|
-
opacity: 1;
|
|
29
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
position: absolute;
|
|
3
|
+
bottom: var(--kritzel-watermark-offset-bottom, 12px);
|
|
4
|
+
right: var(--kritzel-watermark-offset-right, 12px);
|
|
5
|
+
z-index: 10000;
|
|
6
|
+
pointer-events: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.watermark-link {
|
|
10
|
+
pointer-events: auto;
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
padding: 4px 8px;
|
|
14
|
+
border-radius: var(--kritzel-watermark-border-radius, 6px);
|
|
15
|
+
font-family: var(--kritzel-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
16
|
+
font-size: var(--kritzel-watermark-font-size, 11px);
|
|
17
|
+
line-height: 1;
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
color: var(--kritzel-watermark-color, rgba(60, 60, 60, 0.75));
|
|
20
|
+
background-color: var(--kritzel-watermark-background, rgba(255, 255, 255, 0.6));
|
|
21
|
+
box-shadow: var(--kritzel-watermark-box-shadow, 0 1px 2px rgba(0, 0, 0, 0.12));
|
|
22
|
+
opacity: var(--kritzel-watermark-opacity, 0.85);
|
|
23
|
+
transition: opacity 150ms ease;
|
|
24
|
+
user-select: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.watermark-link:hover {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
}
|
|
@@ -19,7 +19,7 @@ export class KritzelWatermark {
|
|
|
19
19
|
label;
|
|
20
20
|
render() {
|
|
21
21
|
const label = this.label ?? this.core.localizationManager.translate('watermark.poweredBy');
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: 'ae00d98f16912afcb7a90d47a9fc4d55fc7468f0' }, h("a", { key: '8781f94c9efe44b0e7a7a8c20a119160cb9feb8e', class: "watermark-link", href: KRITZEL_WEBSITE_URL, target: "_blank", rel: "noopener noreferrer", part: "watermark", onPointerDown: (ev) => ev.stopPropagation(), onPointerUp: (ev) => ev.stopPropagation() }, label)));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "kritzel-watermark"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -71,7 +71,7 @@ export class KritzelWatermark {
|
|
|
71
71
|
"optional": true,
|
|
72
72
|
"docs": {
|
|
73
73
|
"tags": [],
|
|
74
|
-
"text": "Resolved \"Powered by Kritzel\" label. Passed in by the engine so the badge\
|
|
74
|
+
"text": "Resolved \"Powered by Kritzel\" label. Passed in by the engine so the badge\nre-renders when the active locale changes. Falls back to resolving the term\nfrom the core when not provided."
|
|
75
75
|
},
|
|
76
76
|
"getter": false,
|
|
77
77
|
"setter": false,
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
justify-content: center;
|
|
4
|
-
align-items: center;
|
|
5
|
-
border-radius: 50%;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
user-select: none;
|
|
8
|
-
flex-shrink: 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.avatar-image {
|
|
12
|
-
display: block;
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 100%;
|
|
15
|
-
object-fit: cover;
|
|
16
|
-
border-radius: 50%;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.avatar-initials {
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
align-items: center;
|
|
23
|
-
width: 100%;
|
|
24
|
-
height: 100%;
|
|
25
|
-
border-radius: 50%;
|
|
26
|
-
color: var(--kritzel-avatar-initials-color, #ffffff);
|
|
27
|
-
font-weight: var(--kritzel-avatar-initials-font-weight, 500);
|
|
28
|
-
font-family: var(--kritzel-avatar-initials-font-family, sans-serif);
|
|
29
|
-
line-height: 1;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.avatar-default {
|
|
33
|
-
display: flex;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
align-items: center;
|
|
36
|
-
width: 100%;
|
|
37
|
-
height: 100%;
|
|
38
|
-
border-radius: 50%;
|
|
39
|
-
background-color: var(--kritzel-avatar-default-background, #e0e0e0);
|
|
40
|
-
color: var(--kritzel-avatar-default-color, #9e9e9e);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.avatar-default svg {
|
|
44
|
-
width: 60%;
|
|
45
|
-
height: 60%;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:host(.has-image) {
|
|
49
|
-
border: var(--kritzel-avatar-border, none);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:host(.has-initials) {
|
|
53
|
-
border: var(--kritzel-avatar-border, none);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
:host(.has-default) {
|
|
57
|
-
border: var(--kritzel-avatar-border, none);
|
|
58
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
border-radius: 50%;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
user-select: none;
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.avatar-image {
|
|
12
|
+
display: block;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
object-fit: cover;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.avatar-initials {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
color: var(--kritzel-avatar-initials-color, #ffffff);
|
|
27
|
+
font-weight: var(--kritzel-avatar-initials-font-weight, 500);
|
|
28
|
+
font-family: var(--kritzel-avatar-initials-font-family, sans-serif);
|
|
29
|
+
line-height: 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.avatar-default {
|
|
33
|
+
display: flex;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
border-radius: 50%;
|
|
39
|
+
background-color: var(--kritzel-avatar-default-background, #e0e0e0);
|
|
40
|
+
color: var(--kritzel-avatar-default-color, #9e9e9e);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.avatar-default svg {
|
|
44
|
+
width: 60%;
|
|
45
|
+
height: 60%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host(.has-image) {
|
|
49
|
+
border: var(--kritzel-avatar-border, none);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host(.has-initials) {
|
|
53
|
+
border: var(--kritzel-avatar-border, none);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host(.has-default) {
|
|
57
|
+
border: var(--kritzel-avatar-border, none);
|
|
58
|
+
}
|
|
@@ -81,16 +81,16 @@ export class KritzelAvatar {
|
|
|
81
81
|
height: `${this.size}px`,
|
|
82
82
|
fontSize: `${Math.round(this.size * 0.4)}px`,
|
|
83
83
|
};
|
|
84
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '90ce966bb2a374e68c544906c8c746df6cc01038', style: containerStyles, class: {
|
|
85
85
|
'has-image': !!showImage,
|
|
86
86
|
'has-initials': !!showInitials,
|
|
87
87
|
'has-default': !!showDefaultIcon,
|
|
88
|
-
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: '
|
|
88
|
+
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: '6799f4ad45c7d40ebaf640f191171ed6a5f14ae9', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
|
|
89
89
|
if (el) {
|
|
90
90
|
el.referrerPolicy = 'no-referrer';
|
|
91
91
|
el.crossOrigin = 'anonymous';
|
|
92
92
|
}
|
|
93
|
-
}, onError: this.handleImageError })), showInitials && (h("span", { key: '
|
|
93
|
+
}, onError: this.handleImageError })), showInitials && (h("span", { key: '98cdcda64b900994b61a03179be9f2af17c489e8', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (h("span", { key: '64e6a6ee67017c927dce0b51810a5bb02fc0d6d1', class: "avatar-default" }, h("svg", { key: '42f99637a3c23aaf10fa7c99753347ede1d518c0', viewBox: "0 0 24 24", fill: "currentColor" }, h("path", { key: '28b52a68b36e98b0e14891fd225457be65f1bb46', d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }))))));
|
|
94
94
|
}
|
|
95
95
|
static get is() { return "kritzel-avatar"; }
|
|
96
96
|
static get encapsulation() { return "shadow"; }
|