kritzel-stencil 0.4.30 → 0.4.31
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.cjs.js +1 -1
- package/dist/cjs/kritzel-active-users_46.cjs.entry.js +112 -112
- package/dist/cjs/kritzel-brush-style.cjs.entry.js +1 -1
- package/dist/cjs/{schema.constants-CcvqL5nJ.js → schema.constants-0ySX0cg3.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 +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 +21 -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-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 +54 -54
- 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 +2 -2
- 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 +2 -2
- 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-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 +51 -51
- 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-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-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-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-DTB3ykgO.js → p-B65Z2K81.js} +1 -1
- package/dist/components/{p-4uoSa0Xl.js → p-B6cwfdo3.js} +2 -2
- package/dist/components/{p-ChPs27Fd.js → p-BBA9F6Bi.js} +4 -4
- package/dist/components/{p-Dvn6ad4a.js → p-BCrNNQKI.js} +1 -1
- package/dist/components/{p-CoXN583u.js → p-BGJ-1pXX.js} +3 -3
- package/dist/components/{p-CBrn5AIB.js → p-BTRiw0VC.js} +1 -1
- package/dist/components/{p-DoxFuOy1.js → p-Bu6TjCs0.js} +2 -2
- package/dist/components/{p-Ce1j1-Hg.js → p-BvpI1eL4.js} +3 -3
- package/dist/components/{p-CAXR5-S9.js → p-BwC3bHai.js} +4 -4
- package/dist/components/{p-DX2nriaq.js → p-C2NV0SgA.js} +1 -1
- package/dist/components/{p-BPzdPKWE.js → p-CAGey5Xt.js} +3 -3
- package/dist/components/{p-C0FEC_gS.js → p-C_4J10HD.js} +2 -2
- package/dist/components/{p-NOWtUeeQ.js → p-C_fBqaep.js} +1 -1
- package/dist/components/{p-Ba0c-tu2.js → p-CzibK3BJ.js} +2 -2
- package/dist/components/{p-Cm33td2O.js → p-D0SKmg_J.js} +1 -1
- package/dist/components/{p-OUl5CA4Y.js → p-D497dAd-.js} +1 -1
- package/dist/components/{p-BmBebQMI.js → p-DC7noKZD.js} +7 -7
- package/dist/components/{p-CXpv9Rxe.js → p-DGcug5rp.js} +2 -2
- package/dist/components/{p-DkHYY72B.js → p-DIE74Wkf.js} +2 -2
- package/dist/components/{p-DOTdJ3JQ.js → p-DKkQMbfN.js} +3 -3
- package/dist/components/{p-DnmVD1Mz.js → p-DKuxmP3T.js} +2 -2
- package/dist/components/{p-bAacqNHq.js → p-DQX5iqJB.js} +2 -2
- package/dist/components/{p-DUmLsjKb.js → p-DTzNzE9j.js} +1 -1
- package/dist/components/{p-Df3BwVGy.js → p-D_XWdMC3.js} +2 -2
- package/dist/components/{p-B38_9BJg.js → p-Da56LiC2.js} +1 -1
- package/dist/components/{p-CeffYwAK.js → p-DaE8xcJ8.js} +19 -19
- package/dist/components/{p-CYwoBiqy.js → p-DcG-UAoL.js} +50 -50
- package/dist/components/{p-BeSKOETx.js → p-Dm6TZsys.js} +2 -2
- package/dist/components/{p-DhabvHJM.js → p-DuyNKEne.js} +3 -3
- package/dist/components/{p-DFMZEarE.js → p-DyWg1f0y.js} +1 -1
- package/dist/components/{p-DN9p3G9K.js → p-FDwfHj3U.js} +3 -3
- package/dist/components/{p-DK0anxtL.js → p-P70dtHet.js} +1 -1
- package/dist/components/{p-CucCT7Qn.js → p-R6NeY_RA.js} +2 -2
- package/dist/components/{p-BFYtCsZu.js → p-XOXeNvvd.js} +2 -2
- package/dist/components/{p-jIKskj3S.js → p-ZwkkxMNZ.js} +1 -1
- package/dist/components/{p-BprEDRpA.js → p-auUCvUOc.js} +2 -2
- package/dist/components/{p-D0Ed8epW.js → p-b5XSApfh.js} +4 -4
- package/dist/components/{p-djJSnjAX.js → p-fp1y_eAN.js} +2 -2
- package/dist/components/{p-Dpm75DfV.js → p-mCRS0Vii.js} +5 -5
- package/dist/components/{p-DOl-95VY.js → p-ml3LLPFB.js} +10 -10
- package/dist/components/{p-D_cyY7Nd.js → p-xFCFDper.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/kritzel-active-users_46.entry.js +112 -112
- package/dist/esm/kritzel-brush-style.entry.js +1 -1
- package/dist/esm/{schema.constants-De_S50eB.js → schema.constants-D3OqvrMh.js} +6 -6
- package/dist/stencil/index.esm.js +2 -2
- package/dist/stencil/{p-1a398b42.entry.js → p-307b09bd.entry.js} +112 -112
- package/dist/stencil/{p-fb32cd8f.entry.js → p-905f7ab4.entry.js} +1 -1
- package/dist/stencil/{p-De_S50eB.js → p-D3OqvrMh.js} +6 -6
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/constants/version.d.ts +1 -1
- package/package.json +2 -1
- package/readme.md +10 -10
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
.expand-toggle {
|
|
2
|
-
background: none;
|
|
3
|
-
border: none;
|
|
4
|
-
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
5
|
-
padding: 0;
|
|
6
|
-
margin: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
width: 32px;
|
|
11
|
-
height: 32px;
|
|
12
|
-
color: var(--kritzel-icon-color, currentColor);
|
|
13
|
-
transition: transform 0.2s ease;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.expand-toggle:hover {
|
|
17
|
-
opacity: 0.7;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.expand-toggle:focus {
|
|
21
|
-
outline: none;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.expand-toggle:focus-visible {
|
|
25
|
-
outline: 2px solid var(--kritzel-focus-color, #007acc);
|
|
26
|
-
outline-offset: 2px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.expand-toggle:active {
|
|
30
|
-
transform: scale(0.95);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.divider {
|
|
34
|
-
height: 1px;
|
|
35
|
-
background-color: var(--kritzel-divider-color, #e0e0e0);
|
|
36
|
-
margin: 4px 0;
|
|
37
|
-
width: 100%;
|
|
38
|
-
}
|
|
1
|
+
.expand-toggle {
|
|
2
|
+
background: none;
|
|
3
|
+
border: none;
|
|
4
|
+
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
5
|
+
padding: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
width: 32px;
|
|
11
|
+
height: 32px;
|
|
12
|
+
color: var(--kritzel-icon-color, currentColor);
|
|
13
|
+
transition: transform 0.2s ease;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.expand-toggle:hover {
|
|
17
|
+
opacity: 0.7;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.expand-toggle:focus {
|
|
21
|
+
outline: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.expand-toggle:focus-visible {
|
|
25
|
+
outline: 2px solid var(--kritzel-focus-color, #007acc);
|
|
26
|
+
outline-offset: 2px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.expand-toggle:active {
|
|
30
|
+
transform: scale(0.95);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.divider {
|
|
34
|
+
height: 1px;
|
|
35
|
+
background-color: var(--kritzel-divider-color, #e0e0e0);
|
|
36
|
+
margin: 4px 0;
|
|
37
|
+
width: 100%;
|
|
38
|
+
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
align-items: center;
|
|
5
|
-
padding: 4px;
|
|
6
|
-
gap: 8px;
|
|
7
|
-
border-top-left-radius: 12px;
|
|
8
|
-
border-top-right-radius: 12px;
|
|
9
|
-
background-color: var(--kritzel-utility-panel-background-color, #e2e2e2);
|
|
10
|
-
width: fit-content;
|
|
11
|
-
user-select: none;
|
|
12
|
-
z-index: 1;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.utility-button {
|
|
16
|
-
display: flex;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
align-items: center;
|
|
19
|
-
width: 28px;
|
|
20
|
-
height: 28px;
|
|
21
|
-
padding: 8px 4px;
|
|
22
|
-
border: none;
|
|
23
|
-
background: none;
|
|
24
|
-
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
25
|
-
color: var(--kritzel-utility-panel-button-color, #333333);
|
|
26
|
-
--kritzel-icon-color: var(--kritzel-utility-panel-button-color, #333333);
|
|
27
|
-
-webkit-tap-highlight-color: transparent;
|
|
28
|
-
border-radius: var(--kritzel-utility-panel-button-border-radius, 8px);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.utility-button:hover,
|
|
32
|
-
.utility-button:focus-visible {
|
|
33
|
-
background-color: var(--kritzel-utility-panel-button-hover-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.utility-button:disabled {
|
|
37
|
-
opacity: 0.4;
|
|
38
|
-
cursor: not-allowed;
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.utility-separator {
|
|
43
|
-
width: 1px;
|
|
44
|
-
height: 16px;
|
|
45
|
-
background-color: var(--kritzel-utility-panel-separator-color, hsl(0, 0%, 0%, 8%));
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
align-items: center;
|
|
5
|
+
padding: 4px;
|
|
6
|
+
gap: 8px;
|
|
7
|
+
border-top-left-radius: 12px;
|
|
8
|
+
border-top-right-radius: 12px;
|
|
9
|
+
background-color: var(--kritzel-utility-panel-background-color, #e2e2e2);
|
|
10
|
+
width: fit-content;
|
|
11
|
+
user-select: none;
|
|
12
|
+
z-index: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.utility-button {
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
align-items: center;
|
|
19
|
+
width: 28px;
|
|
20
|
+
height: 28px;
|
|
21
|
+
padding: 8px 4px;
|
|
22
|
+
border: none;
|
|
23
|
+
background: none;
|
|
24
|
+
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
25
|
+
color: var(--kritzel-utility-panel-button-color, #333333);
|
|
26
|
+
--kritzel-icon-color: var(--kritzel-utility-panel-button-color, #333333);
|
|
27
|
+
-webkit-tap-highlight-color: transparent;
|
|
28
|
+
border-radius: var(--kritzel-utility-panel-button-border-radius, 8px);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.utility-button:hover,
|
|
32
|
+
.utility-button:focus-visible {
|
|
33
|
+
background-color: var(--kritzel-utility-panel-button-hover-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.utility-button:disabled {
|
|
37
|
+
opacity: 0.4;
|
|
38
|
+
cursor: not-allowed;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.utility-separator {
|
|
43
|
+
width: 1px;
|
|
44
|
+
height: 16px;
|
|
45
|
+
background-color: var(--kritzel-utility-panel-separator-color, hsl(0, 0%, 0%, 8%));
|
|
46
46
|
}
|
|
@@ -19,7 +19,7 @@ export class KritzelUtilityPanel {
|
|
|
19
19
|
this.redo.emit();
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: 'f4258951cbf62fc932fa48fbd8aaf2128aef1aed' }, h("button", { key: '953365123f654cd683b810fe82b90e4a57467d1d', class: "utility-button", "data-testid": "utility-undo", disabled: !this.undoState?.canUndo, onClick: event => this.handleUndo(event), "aria-label": this.terms['utility.undo'] ?? 'Undo' }, h("kritzel-icon", { key: 'cac7eade59c64b535a9b55e99feddc2f545246c2', name: "undo" })), h("button", { key: '45b1d0e3559c77215f85e17b46ba5d2fb86e6f50', class: "utility-button", "data-testid": "utility-redo", disabled: !this.undoState?.canRedo, onClick: event => this.handleRedo(event), "aria-label": this.terms['utility.redo'] ?? 'Redo' }, h("kritzel-icon", { key: '7de37e1ebe98a5698b0f22769a5a79948de3df25', name: "redo" })), h("div", { key: 'f9fbd4bfaa66df93fba40089e294cbce70b45dda', class: "utility-separator" }), h("button", { key: '4ccfdc2423de61de4f108cf1a198d62d7d2b24c4', class: "utility-button", "data-testid": "utility-delete", onClick: () => this.delete.emit(), "aria-label": this.terms['utility.delete'] ?? 'Delete selected items' }, h("kritzel-icon", { key: '3af4d475defe1712a5e975d0860f849c3015597b', name: "delete" }))));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "kritzel-utility-panel"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/ui/kritzel-workspace-manager/kritzel-workspace-manager.css
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
z-index: 1;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.manager {
|
|
8
|
-
opacity: 0;
|
|
9
|
-
pointer-events: none;
|
|
10
|
-
transition: opacity 0.2s ease-out;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.manager.visible {
|
|
14
|
-
opacity: 1;
|
|
15
|
-
pointer-events: auto;
|
|
16
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
z-index: 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.manager {
|
|
8
|
+
opacity: 0;
|
|
9
|
+
pointer-events: none;
|
|
10
|
+
transition: opacity 0.2s ease-out;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.manager.visible {
|
|
14
|
+
opacity: 1;
|
|
15
|
+
pointer-events: auto;
|
|
16
|
+
}
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
z-index: 1;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.panel {
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: row;
|
|
9
|
-
align-items: center;
|
|
10
|
-
gap: var(--kritzel-zoom-panel-gap, 4px);
|
|
11
|
-
padding: var(--kritzel-zoom-panel-padding, 4px);
|
|
12
|
-
border: var(--kritzel-zoom-panel-border, 1px solid #ebebeb);
|
|
13
|
-
border-radius: var(--kritzel-zoom-panel-border-radius, 12px);
|
|
14
|
-
background-color: var(--kritzel-zoom-panel-background-color, #ffffff);
|
|
15
|
-
box-shadow: var(--kritzel-zoom-panel-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));
|
|
16
|
-
opacity: 0;
|
|
17
|
-
pointer-events: none;
|
|
18
|
-
transition: opacity 0.2s ease-out;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.panel.visible {
|
|
22
|
-
opacity: 1;
|
|
23
|
-
pointer-events: auto;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.zoom-level {
|
|
27
|
-
display: inline-flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
justify-content: center;
|
|
30
|
-
min-width: 46px;
|
|
31
|
-
color: var(--kritzel-zoom-panel-icon-color, #000000);
|
|
32
|
-
font-family: var(--kritzel-font-family, sans-serif);
|
|
33
|
-
font-size: 12px;
|
|
34
|
-
font-weight: 500;
|
|
35
|
-
line-height: 1;
|
|
36
|
-
padding: 0 4px;
|
|
37
|
-
user-select: none;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.zoom-button {
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
width: var(--kritzel-zoom-panel-button-size, 32px);
|
|
45
|
-
height: var(--kritzel-zoom-panel-button-size, 32px);
|
|
46
|
-
padding: 0;
|
|
47
|
-
border: 0;
|
|
48
|
-
border-radius: var(--kritzel-zoom-panel-button-border-radius, 8px);
|
|
49
|
-
background: transparent;
|
|
50
|
-
background-color: transparent;
|
|
51
|
-
color: var(--kritzel-zoom-panel-icon-color, #000000);
|
|
52
|
-
--kritzel-icon-color: var(--kritzel-zoom-panel-icon-color, #000000);
|
|
53
|
-
box-shadow: none;
|
|
54
|
-
appearance: none;
|
|
55
|
-
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
56
|
-
-webkit-tap-highlight-color: transparent;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.zoom-button:hover,
|
|
60
|
-
.zoom-button:focus-visible {
|
|
61
|
-
background-color: var(--kritzel-zoom-panel-button-hover-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.zoom-button:active {
|
|
65
|
-
background-color: var(--kritzel-zoom-panel-button-active-background-color, hsl(0, 0%, 0%, 8.6%));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.zoom-button:disabled {
|
|
69
|
-
opacity: 0.5;
|
|
70
|
-
cursor: not-allowed;
|
|
71
|
-
pointer-events: none;
|
|
72
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
z-index: 1;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.panel {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
align-items: center;
|
|
10
|
+
gap: var(--kritzel-zoom-panel-gap, 4px);
|
|
11
|
+
padding: var(--kritzel-zoom-panel-padding, 4px);
|
|
12
|
+
border: var(--kritzel-zoom-panel-border, 1px solid #ebebeb);
|
|
13
|
+
border-radius: var(--kritzel-zoom-panel-border-radius, 12px);
|
|
14
|
+
background-color: var(--kritzel-zoom-panel-background-color, #ffffff);
|
|
15
|
+
box-shadow: var(--kritzel-zoom-panel-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));
|
|
16
|
+
opacity: 0;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
transition: opacity 0.2s ease-out;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.panel.visible {
|
|
22
|
+
opacity: 1;
|
|
23
|
+
pointer-events: auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.zoom-level {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
min-width: 46px;
|
|
31
|
+
color: var(--kritzel-zoom-panel-icon-color, #000000);
|
|
32
|
+
font-family: var(--kritzel-font-family, sans-serif);
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
line-height: 1;
|
|
36
|
+
padding: 0 4px;
|
|
37
|
+
user-select: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.zoom-button {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
width: var(--kritzel-zoom-panel-button-size, 32px);
|
|
45
|
+
height: var(--kritzel-zoom-panel-button-size, 32px);
|
|
46
|
+
padding: 0;
|
|
47
|
+
border: 0;
|
|
48
|
+
border-radius: var(--kritzel-zoom-panel-button-border-radius, 8px);
|
|
49
|
+
background: transparent;
|
|
50
|
+
background-color: transparent;
|
|
51
|
+
color: var(--kritzel-zoom-panel-icon-color, #000000);
|
|
52
|
+
--kritzel-icon-color: var(--kritzel-zoom-panel-icon-color, #000000);
|
|
53
|
+
box-shadow: none;
|
|
54
|
+
appearance: none;
|
|
55
|
+
cursor: var(--kritzel-global-pointer-cursor, pointer);
|
|
56
|
+
-webkit-tap-highlight-color: transparent;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.zoom-button:hover,
|
|
60
|
+
.zoom-button:focus-visible {
|
|
61
|
+
background-color: var(--kritzel-zoom-panel-button-hover-background-color, hsl(0, 0%, 0%, 4.3%));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.zoom-button:active {
|
|
65
|
+
background-color: var(--kritzel-zoom-panel-button-active-background-color, hsl(0, 0%, 0%, 8.6%));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.zoom-button:disabled {
|
|
69
|
+
opacity: 0.5;
|
|
70
|
+
cursor: not-allowed;
|
|
71
|
+
pointer-events: none;
|
|
72
|
+
}
|
|
@@ -26,7 +26,7 @@ export class KritzelZoomPanel {
|
|
|
26
26
|
return Number.isFinite(this.zoomPercent) ? Math.max(1, Math.round(this.zoomPercent)) : 100;
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: 'e5fc3a34076aaeb454d74bc54b029f40d467fc0b' }, h("div", { key: 'a0591585327eb48385948e248970d3e999ee98f9', class: { panel: true, visible: this.visible } }, h("button", { key: '1bbf4f2fbed22f445ab8761c9855adb28cb70a5c', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomOut'] ?? 'Zoom out', disabled: this.disabled, onClick: this.handleZoomOut }, h("kritzel-icon", { key: 'ace269950514105d0cbda2d2e946ddd9831fd889', name: "minus" })), h("span", { key: '0f597c6c620a8f9c3f0877ab1b1e48bb4eef2716', class: "zoom-level", "aria-live": "polite" }, this.normalizedZoomPercent, "%"), h("button", { key: '694fbbee105e73d85e077258caeee5a2206e60a6', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomIn'] ?? 'Zoom in', disabled: this.disabled, onClick: this.handleZoomIn }, h("kritzel-icon", { key: 'c17749be45aedfff9317efd96661dcdfb09f7c7f', name: "plus" })))));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "kritzel-zoom-panel"; }
|
|
32
32
|
static get encapsulation() { return "shadow"; }
|
|
@@ -38,12 +38,12 @@ export class KritzelCursorHelper {
|
|
|
38
38
|
// We rotate around the center of the SVG canvas
|
|
39
39
|
const center = size / 2;
|
|
40
40
|
// We use a group to apply the rotation
|
|
41
|
-
const svg = `
|
|
42
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${size} ${size}">
|
|
43
|
-
<g transform="rotate(${rotation} ${center} ${center})">
|
|
44
|
-
${content}
|
|
45
|
-
</g>
|
|
46
|
-
</svg>
|
|
41
|
+
const svg = `
|
|
42
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${size} ${size}">
|
|
43
|
+
<g transform="rotate(${rotation} ${center} ${center})">
|
|
44
|
+
${content}
|
|
45
|
+
</g>
|
|
46
|
+
</svg>
|
|
47
47
|
`;
|
|
48
48
|
// Encode the SVG for use in a data URI
|
|
49
49
|
// We need to be careful with encoding to ensure it works across browsers
|
|
@@ -66,8 +66,8 @@ export class KritzelSvgExportHelper {
|
|
|
66
66
|
.join('\n ');
|
|
67
67
|
const xmlDecl = includeXmlDeclaration ? '<?xml version="1.0" encoding="UTF-8"?>\n' : '';
|
|
68
68
|
const defsContent = defs.length > 0 ? `\n <defs>\n ${defs.join('\n ')}\n </defs>` : '';
|
|
69
|
-
return `${xmlDecl}<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}" width="${viewBoxWidth}" height="${viewBoxHeight}">${defsContent}
|
|
70
|
-
${elements}
|
|
69
|
+
return `${xmlDecl}<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBoxX} ${viewBoxY} ${viewBoxWidth} ${viewBoxHeight}" width="${viewBoxWidth}" height="${viewBoxHeight}">${defsContent}
|
|
70
|
+
${elements}
|
|
71
71
|
</svg>`;
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
@@ -219,8 +219,8 @@ export class KritzelSvgExportHelper {
|
|
|
219
219
|
const orient = end === 'start' ? 'auto-start-reverse' : 'auto';
|
|
220
220
|
const refX = 0;
|
|
221
221
|
const refY = size / 2;
|
|
222
|
-
return `<marker id="${markerId}" markerWidth="${size}" markerHeight="${size}" refX="${refX}" refY="${refY}" orient="${orient}" markerUnits="userSpaceOnUse">
|
|
223
|
-
<path d="${path}" fill="${fill}" transform="scale(${size / 10})"/>
|
|
222
|
+
return `<marker id="${markerId}" markerWidth="${size}" markerHeight="${size}" refX="${refX}" refY="${refY}" orient="${orient}" markerUnits="userSpaceOnUse">
|
|
223
|
+
<path d="${path}" fill="${fill}" transform="scale(${size / 10})"/>
|
|
224
224
|
</marker>`;
|
|
225
225
|
}
|
|
226
226
|
/**
|
|
@@ -267,10 +267,10 @@ export class KritzelSvgExportHelper {
|
|
|
267
267
|
const opacity = path.opacity !== 1 ? ` opacity="${path.opacity}"` : '';
|
|
268
268
|
const scale = this.getObjectScale(path);
|
|
269
269
|
// Path needs to be wrapped in a g with translation since path.d uses local coordinates
|
|
270
|
-
return `<g transform="${transform}"${opacity}>
|
|
271
|
-
<svg viewBox="${path.viewBox}" width="${path.totalWidth / scale}" height="${path.totalHeight / scale}" overflow="visible">
|
|
272
|
-
<path d="${path.d}" fill="${fill || 'none'}" stroke="${stroke || 'none'}"${path.strokeWidth ? ` stroke-width="${path.strokeWidth}"` : ''}/>
|
|
273
|
-
</svg>
|
|
270
|
+
return `<g transform="${transform}"${opacity}>
|
|
271
|
+
<svg viewBox="${path.viewBox}" width="${path.totalWidth / scale}" height="${path.totalHeight / scale}" overflow="visible">
|
|
272
|
+
<path d="${path.d}" fill="${fill || 'none'}" stroke="${stroke || 'none'}"${path.strokeWidth ? ` stroke-width="${path.strokeWidth}"` : ''}/>
|
|
273
|
+
</svg>
|
|
274
274
|
</g>`;
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
@@ -286,10 +286,10 @@ export class KritzelSvgExportHelper {
|
|
|
286
286
|
const scale = this.getObjectScale(line);
|
|
287
287
|
const markerStart = line.hasStartArrow ? ` marker-start="url(#${line.startMarkerId})"` : '';
|
|
288
288
|
const markerEnd = line.hasEndArrow ? ` marker-end="url(#${line.endMarkerId})"` : '';
|
|
289
|
-
return `<g transform="${transform}"${opacity}>
|
|
290
|
-
<svg viewBox="${line.viewBox}" width="${line.totalWidth / scale}" height="${line.totalHeight / scale}" overflow="visible">
|
|
291
|
-
<path d="${line.d}" fill="none" stroke="${stroke}" stroke-width="${line.strokeWidth}" stroke-linecap="round"${markerStart}${markerEnd}/>
|
|
292
|
-
</svg>
|
|
289
|
+
return `<g transform="${transform}"${opacity}>
|
|
290
|
+
<svg viewBox="${line.viewBox}" width="${line.totalWidth / scale}" height="${line.totalHeight / scale}" overflow="visible">
|
|
291
|
+
<path d="${line.d}" fill="none" stroke="${stroke}" stroke-width="${line.strokeWidth}" stroke-linecap="round"${markerStart}${markerEnd}/>
|
|
292
|
+
</svg>
|
|
293
293
|
</g>`;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
@@ -315,18 +315,18 @@ export class KritzelSvgExportHelper {
|
|
|
315
315
|
const textHtml = this.prosemirrorToHtml(shape.content, shape, theme);
|
|
316
316
|
if (textHtml) {
|
|
317
317
|
const fontColor = KritzelColorHelper.resolveThemeColor(shape.fontColor, theme);
|
|
318
|
-
textContent = `
|
|
319
|
-
<foreignObject x="${shape.x}" y="${shape.y}" width="${shape.width}" height="${shape.height}">
|
|
320
|
-
<div xmlns="http://www.w3.org/1999/xhtml" style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-family: ${shape.fontFamily}; font-size: ${shape.fontSize}px; color: ${fontColor}; overflow: hidden;">
|
|
321
|
-
${textHtml}
|
|
322
|
-
</div>
|
|
318
|
+
textContent = `
|
|
319
|
+
<foreignObject x="${shape.x}" y="${shape.y}" width="${shape.width}" height="${shape.height}">
|
|
320
|
+
<div xmlns="http://www.w3.org/1999/xhtml" style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-family: ${shape.fontFamily}; font-size: ${shape.fontSize}px; color: ${fontColor}; overflow: hidden;">
|
|
321
|
+
${textHtml}
|
|
322
|
+
</div>
|
|
323
323
|
</foreignObject>`;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
return `<g transform="${transform}"${opacity}>
|
|
327
|
-
<svg viewBox="${shape.viewBox}" width="${shape.totalWidth / scale}" height="${shape.totalHeight / scale}" overflow="visible" preserveAspectRatio="none">
|
|
328
|
-
<path d="${pathD}" fill="${fill || 'transparent'}" stroke="${stroke}" stroke-width="${shape.strokeWidth}"/>${textContent}
|
|
329
|
-
</svg>
|
|
326
|
+
return `<g transform="${transform}"${opacity}>
|
|
327
|
+
<svg viewBox="${shape.viewBox}" width="${shape.totalWidth / scale}" height="${shape.totalHeight / scale}" overflow="visible" preserveAspectRatio="none">
|
|
328
|
+
<path d="${pathD}" fill="${fill || 'transparent'}" stroke="${stroke}" stroke-width="${shape.strokeWidth}"/>${textContent}
|
|
329
|
+
</svg>
|
|
330
330
|
</g>`;
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
@@ -357,10 +357,10 @@ export class KritzelSvgExportHelper {
|
|
|
357
357
|
// adjusted font-size already accounts for it – keeping both would double-scale
|
|
358
358
|
// the content and overflow the foreignObject.
|
|
359
359
|
const svgFontSizePx = (text.fontSize * (4 / 3) * (text.scaleFactor || 1) / scale).toFixed(4);
|
|
360
|
-
return `<g transform="${transform}"${opacity}>
|
|
361
|
-
<foreignObject x="0" y="0" width="${width}" height="${height}" overflow="visible">
|
|
362
|
-
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: ${text.fontFamily}; font-size: ${svgFontSizePx}px; color: ${fontColor}; background-color: ${bgColor || 'transparent'}; white-space: pre-wrap; word-wrap: break-word; width: 100%; margin: 0; padding: 0; box-sizing: border-box;">${htmlContent.trim()}</div>
|
|
363
|
-
</foreignObject>
|
|
360
|
+
return `<g transform="${transform}"${opacity}>
|
|
361
|
+
<foreignObject x="0" y="0" width="${width}" height="${height}" overflow="visible">
|
|
362
|
+
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: ${text.fontFamily}; font-size: ${svgFontSizePx}px; color: ${fontColor}; background-color: ${bgColor || 'transparent'}; white-space: pre-wrap; word-wrap: break-word; width: 100%; margin: 0; padding: 0; box-sizing: border-box;">${htmlContent.trim()}</div>
|
|
363
|
+
</foreignObject>
|
|
364
364
|
</g>`;
|
|
365
365
|
}
|
|
366
366
|
/**
|
|
@@ -394,9 +394,9 @@ export class KritzelSvgExportHelper {
|
|
|
394
394
|
return `<tspan x="0" y="${y}" xml:space="preserve">${this.escapeHtml(line)}</tspan>`;
|
|
395
395
|
})
|
|
396
396
|
.join('');
|
|
397
|
-
return `<g transform="${transform}"${opacity}>
|
|
398
|
-
${bgRect}
|
|
399
|
-
<text font-family="${this.escapeHtml(text.fontFamily)}" font-size="${resolvedFontSizePx}" fill="${fontColor}">${tspans}</text>
|
|
397
|
+
return `<g transform="${transform}"${opacity}>
|
|
398
|
+
${bgRect}
|
|
399
|
+
<text font-family="${this.escapeHtml(text.fontFamily)}" font-size="${resolvedFontSizePx}" fill="${fontColor}">${tspans}</text>
|
|
400
400
|
</g>`;
|
|
401
401
|
}
|
|
402
402
|
/**
|
|
@@ -424,8 +424,8 @@ export class KritzelSvgExportHelper {
|
|
|
424
424
|
const width = image.totalWidth / scale;
|
|
425
425
|
const height = image.totalHeight / scale;
|
|
426
426
|
const href = imageDataUrls?.get(image.id) || image.resolvedSrc || image.src || '';
|
|
427
|
-
return `<g transform="${transform}"${opacity}>
|
|
428
|
-
<image href="${href}" x="0" y="0" width="${width}" height="${height}" preserveAspectRatio="xMidYMid meet"/>
|
|
427
|
+
return `<g transform="${transform}"${opacity}>
|
|
428
|
+
<image href="${href}" x="0" y="0" width="${width}" height="${height}" preserveAspectRatio="xMidYMid meet"/>
|
|
429
429
|
</g>`;
|
|
430
430
|
}
|
|
431
431
|
/**
|
|
@@ -445,19 +445,19 @@ export class KritzelSvgExportHelper {
|
|
|
445
445
|
if (rasterSafeForCanvas) {
|
|
446
446
|
// PNG export: render placeholder rect (foreignObject doesn't rasterize to PNG well)
|
|
447
447
|
console.warn('[KritzelCustomElement SVG Export] Custom elements do not serialize well to PNG. Use SVG export or screenshot instead.');
|
|
448
|
-
return `<g transform="${transform}"${opacity}>
|
|
449
|
-
<rect x="0" y="0" width="${width}" height="${height}" fill="#f0f0f0" stroke="#999" stroke-width="1" />
|
|
450
|
-
<text x="${width / 2}" y="${height / 2}" text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#999">[Custom Element]</text>
|
|
448
|
+
return `<g transform="${transform}"${opacity}>
|
|
449
|
+
<rect x="0" y="0" width="${width}" height="${height}" fill="#f0f0f0" stroke="#999" stroke-width="1" />
|
|
450
|
+
<text x="${width / 2}" y="${height / 2}" text-anchor="middle" dominant-baseline="middle" font-size="12" fill="#999">[Custom Element]</text>
|
|
451
451
|
</g>`;
|
|
452
452
|
}
|
|
453
453
|
// SVG export: use foreignObject to embed HTML
|
|
454
454
|
const html = obj.element?.outerHTML || '<div style="border:1px dashed #ccc">Empty</div>';
|
|
455
|
-
return `<g transform="${transform}"${opacity}>
|
|
456
|
-
<foreignObject x="0" y="0" width="${width}" height="${height}">
|
|
457
|
-
<div xmlns="http://www.w3.org/1999/xhtml" style="width:100%;height:100%;overflow:hidden;">
|
|
458
|
-
${html}
|
|
459
|
-
</div>
|
|
460
|
-
</foreignObject>
|
|
455
|
+
return `<g transform="${transform}"${opacity}>
|
|
456
|
+
<foreignObject x="0" y="0" width="${width}" height="${height}">
|
|
457
|
+
<div xmlns="http://www.w3.org/1999/xhtml" style="width:100%;height:100%;overflow:hidden;">
|
|
458
|
+
${html}
|
|
459
|
+
</div>
|
|
460
|
+
</foreignObject>
|
|
461
461
|
</g>`;
|
|
462
462
|
}
|
|
463
463
|
/**
|
|
@@ -477,8 +477,8 @@ export class KritzelSvgExportHelper {
|
|
|
477
477
|
return '';
|
|
478
478
|
}
|
|
479
479
|
const opacity = group.opacity !== 1 ? ` opacity="${group.opacity}"` : '';
|
|
480
|
-
return `<g${opacity}>
|
|
481
|
-
${children}
|
|
480
|
+
return `<g${opacity}>
|
|
481
|
+
${children}
|
|
482
482
|
</g>`;
|
|
483
483
|
}
|
|
484
484
|
/**
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { g as getAssetPath, r as render, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-B43upypT.js';
|
|
2
|
-
export { K as KritzelBaseObject, b as KritzelLine, a as KritzelPath } from './p-
|
|
3
|
-
export { v as APP_STATE_MIGRATIONS, A as AssetNotFoundError, D as DE_LOCALE, E as EN_LOCALE, F as FR_LOCALE, o as IndexedDBAssetProvider, I as IndexedDBSyncProvider, t as KritzelAlignment, p as KritzelAnchorManager, n as KritzelAssetResolver, e as KritzelBaseTool, f as KritzelBrushTool, l as KritzelCursorHelper, d as KritzelCustomElement, s as KritzelCustomElementRendererRegistry, h as KritzelEraserTool, b as KritzelGroup, a as KritzelImage, i as KritzelImageTool, r as KritzelLicenseManager, g as KritzelLineTool, q as KritzelLocalizationManager, m as KritzelSelectionTool, c as KritzelShape, k as KritzelShapeTool, K as KritzelText, j as KritzelTextTool, S as ShapeType, W as WORKSPACE_MIGRATIONS, u as runMigrations } from './p-
|
|
2
|
+
export { K as KritzelBaseObject, b as KritzelLine, a as KritzelPath } from './p-DQX5iqJB.js';
|
|
3
|
+
export { v as APP_STATE_MIGRATIONS, A as AssetNotFoundError, D as DE_LOCALE, E as EN_LOCALE, F as FR_LOCALE, o as IndexedDBAssetProvider, I as IndexedDBSyncProvider, t as KritzelAlignment, p as KritzelAnchorManager, n as KritzelAssetResolver, e as KritzelBaseTool, f as KritzelBrushTool, l as KritzelCursorHelper, d as KritzelCustomElement, s as KritzelCustomElementRendererRegistry, h as KritzelEraserTool, b as KritzelGroup, a as KritzelImage, i as KritzelImageTool, r as KritzelLicenseManager, g as KritzelLineTool, q as KritzelLocalizationManager, m as KritzelSelectionTool, c as KritzelShape, k as KritzelShapeTool, K as KritzelText, j as KritzelTextTool, S as ShapeType, W as WORKSPACE_MIGRATIONS, u as runMigrations } from './p-DcG-UAoL.js';
|
|
4
4
|
import * as Y from 'yjs';
|
|
5
5
|
import { WebsocketProvider } from 'y-websocket';
|
|
6
6
|
import { H as HocuspocusProvider, a as HocuspocusProviderWebsocket } from './kritzel-editor.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelActiveUsers$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelActiveUsers$1, d as defineCustomElement$1 } from './p-DyWg1f0y.js';
|
|
2
2
|
|
|
3
3
|
const KritzelActiveUsers = KritzelActiveUsers$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as KritzelAwarenessCursors$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { c as KritzelAwarenessCursors$1, d as defineCustomElement$1 } from './p-DQX5iqJB.js';
|
|
2
2
|
|
|
3
3
|
const KritzelAwarenessCursors = KritzelAwarenessCursors$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelBackToContent$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelBackToContent$1, d as defineCustomElement$1 } from './p-xFCFDper.js';
|
|
2
2
|
|
|
3
3
|
const KritzelBackToContent = KritzelBackToContent$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host, t as transformTag } from './p-B43upypT.js';
|
|
2
|
-
import { d as defineCustomElement$3 } from './p-
|
|
2
|
+
import { d as defineCustomElement$3 } from './p-D_XWdMC3.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './p-CSuU8frA.js';
|
|
4
4
|
|
|
5
5
|
const kritzelBrushStyleCss = () => `:host{display:flex;align-items:flex-start;gap:8px;padding:8px;box-sizing:border-box;width:100%}.brush-style-button{display:flex;justify-content:center;align-items:center;width:42px;height:32px;padding:0;border:none;outline:none;background:none;border-radius:0;color:var(--control-text-color);font-weight:bold;-webkit-tap-highlight-color:transparent}.font-style-button:not(:last-child){border-right:1px solid #333333}.font-style-button:hover{background-color:var(--control-hover-bg)}.font-style-button:active{background-color:var(--control-active-bg)}.font-style-button.selected,.font-style-button.selected:hover,.font-style-button.selected:active{background-color:var(--control-selected-bg);color:var(--control-selected-color)}`;
|
|
@@ -27,7 +27,7 @@ const KritzelBrushStyle$1 = /*@__PURE__*/ proxyCustomElement(class KritzelBrushS
|
|
|
27
27
|
value: option.value,
|
|
28
28
|
label: option.label,
|
|
29
29
|
}));
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '51a7f84685032fd8fc967b22bee7c0711e811a54' }, h("kritzel-dropdown", { key: 'e49d7062c695458d345738d88a0adfc96b575e61', options: dropdownOptions, value: this.type, onValueChanged: event => this.handleDropdownValueChange(event) }, h("button", { key: 'ebbbf1a55b89e91012ca44c5cf30acfb77332b50', class: "brush-style-button", slot: "prefix" }, h("kritzel-icon", { key: 'dae002c9ab5e3486c726202426eb076a8f33b109', name: this.type, size: 16 })))));
|
|
31
31
|
}
|
|
32
32
|
static get style() { return kritzelBrushStyleCss(); }
|
|
33
33
|
}, [513, "kritzel-brush-style", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelColorPalette$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelColorPalette$1, d as defineCustomElement$1 } from './p-Dm6TZsys.js';
|
|
2
2
|
|
|
3
3
|
const KritzelColorPalette = KritzelColorPalette$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KritzelColorComponent, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KritzelColorComponent, d as defineCustomElement$1 } from './p-DKkQMbfN.js';
|
|
2
2
|
|
|
3
3
|
const KritzelColor = KritzelColorComponent;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|