kritzel-stencil 0.4.20 → 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-25ExYYPf.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-d19d1b82.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,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: '57c1a6746e4d5b319bb368c9d0bfc52a31d8c8de' }, h("button", { key: '5fb00d62b68de41feda9fafb3eec46cc0b85ba0e', 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: '5ed2c36405ac7113ac697de9102aaf7067127e2a', name: "undo" })), h("button", { key: '0d58c8cbbb8e9547b9416dbf81a2c8011208dc6c', 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: '70264118cbe0f54335a02941fdc868f63476cd1c', name: "redo" })), h("div", { key: '6eed6a603b8bc62e55b1f6fe82e7d035d1f5833c', class: "utility-separator" }), h("button", { key: 'd11195da7a86496afcca26105a6a0f066b1b2340', class: "utility-button", "data-testid": "utility-delete", onClick: () => this.delete.emit(), "aria-label": this.terms['utility.delete'] ?? 'Delete selected items' }, h("kritzel-icon", { key: '5e4c731f90863b4db917c67ac7e87c2945c7bcaa', 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: 'ac5b3f37fbc298b1522f0ff80c26734164b5358a' }, h("div", { key: '8ac3f3600c45c064d9c4c4c9efa78397790edf4b', class: { panel: true, visible: this.visible } }, h("button", { key: '63b2a3fce804a310146d95cc9c2a874707f9e265', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomOut'] ?? 'Zoom out', disabled: this.disabled, onClick: this.handleZoomOut }, h("kritzel-icon", { key: '86ebb85dfc2b746cedd0ed63cd2ae90378f6bbb8', name: "minus" })), h("span", { key: '5191cc1aa9966234c1634882af145403acd32211', class: "zoom-level", "aria-live": "polite" }, this.normalizedZoomPercent, "%"), h("button", { key: '47a7ee5b6c1cf1c99cd1826877e0a1c4ce224442', class: "zoom-button", type: "button", "aria-label": this.terms['zoom.zoomIn'] ?? 'Zoom in', disabled: this.disabled, onClick: this.handleZoomIn }, h("kritzel-icon", { key: '09782e094534fbc5bbcc612f24eea359568d6132', 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
|
-
export { g as getAssetPath, r as render, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-
|
|
2
|
-
export { K as KritzelBaseObject, b as KritzelLine, a as KritzelPath } from './p-
|
|
3
|
-
export { u as APP_STATE_MIGRATIONS, A as AssetNotFoundError, D as DE_LOCALE, E as EN_LOCALE, F as FR_LOCALE, I as IndexedDBAssetProvider, s as KritzelAlignment, o as KritzelAnchorManager, n as KritzelAssetResolver, e as KritzelBaseTool, f as KritzelBrushTool, l as KritzelCursorHelper, d as KritzelCustomElement, r as KritzelCustomElementRendererRegistry, h as KritzelEraserTool, b as KritzelGroup, a as KritzelImage, i as KritzelImageTool, q as KritzelLicenseManager, g as KritzelLineTool, p as KritzelLocalizationManager, m as KritzelSelectionTool, c as KritzelShape, k as KritzelShapeTool, K as KritzelText, j as KritzelTextTool, S as ShapeType, W as WORKSPACE_MIGRATIONS, t as runMigrations } from './p-
|
|
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-bAacqNHq.js';
|
|
3
|
+
export { u as APP_STATE_MIGRATIONS, A as AssetNotFoundError, D as DE_LOCALE, E as EN_LOCALE, F as FR_LOCALE, I as IndexedDBAssetProvider, s as KritzelAlignment, o as KritzelAnchorManager, n as KritzelAssetResolver, e as KritzelBaseTool, f as KritzelBrushTool, l as KritzelCursorHelper, d as KritzelCustomElement, r as KritzelCustomElementRendererRegistry, h as KritzelEraserTool, b as KritzelGroup, a as KritzelImage, i as KritzelImageTool, q as KritzelLicenseManager, g as KritzelLineTool, p as KritzelLocalizationManager, m as KritzelSelectionTool, c as KritzelShape, k as KritzelShapeTool, K as KritzelText, j as KritzelTextTool, S as ShapeType, W as WORKSPACE_MIGRATIONS, t as runMigrations } from './p-C_f_QElb.js';
|
|
4
4
|
import * as Y from 'yjs';
|
|
5
5
|
import { IndexeddbPersistence } from 'y-indexeddb';
|
|
6
6
|
import { WebsocketProvider } from 'y-websocket';
|
|
@@ -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-DBqoPgev.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-bAacqNHq.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-Czhdc844.js';
|
|
2
2
|
|
|
3
3
|
const KritzelBackToContent = KritzelBackToContent$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, c as createEvent, h, d as Host, t as transformTag } from './p-
|
|
2
|
-
import { d as defineCustomElement$3 } from './p-
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
|
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-Df3BwVGy.js';
|
|
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)}`;
|
|
6
6
|
|
|
@@ -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: '7b05e93ce8d28c23503e4ca358a487165169f1ad' }, h("kritzel-dropdown", { key: 'a8f2f30762b339411cd3995482c3bc658855f749', options: dropdownOptions, value: this.type, onValueChanged: event => this.handleDropdownValueChange(event) }, h("button", { key: 'ac06462897a0fbd5011533095fafb7491a75508a', class: "brush-style-button", slot: "prefix" }, h("kritzel-icon", { key: 'caee4c657c7fee478b1038ebd2ef3b502cf73e5e', 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-B-585egz.js';
|
|
2
2
|
|
|
3
3
|
const KritzelColorPalette = KritzelColorPalette$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|