kritzel-stencil 0.4.22 → 0.4.24
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-Xav9JFHg.js → index-Dn19mGl-.js} +47 -11
- package/dist/cjs/index.cjs.js +2 -51
- package/dist/cjs/kritzel-active-users_47.cjs.entry.js +198 -231
- package/dist/cjs/kritzel-brush-style.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{schema.constants-CjN-B633.js → schema.constants-CY0WWJYd.js} +44 -20
- package/dist/cjs/stencil.cjs.js +2 -2
- package/dist/collection/classes/providers/sync/hocuspocus-sync-provider.class.js +0 -21
- package/dist/collection/classes/providers/sync/websocket-sync-provider.class.js +1 -29
- package/dist/collection/classes/structures/app-state-map.structure.js +1 -4
- package/dist/collection/classes/structures/object-map.structure.js +4 -66
- 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 -51
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +80 -80
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +102 -65
- 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 +4 -53
- 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 -61
- 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-jIKskj3S.js → p-1Q4VnThv.js} +3 -3
- package/dist/components/{p-Cm33td2O.js → p-3tBE7SyG.js} +2 -2
- package/dist/components/{p-fL9rl200.js → p-BFYT03fw.js} +3 -3
- package/dist/components/{p-DtnMdWWB.js → p-BShrnlam.js} +2 -2
- package/dist/components/{p-BsLI_BWq.js → p-BXUx_C0N.js} +2 -2
- package/dist/components/{p-CzW58DHM.js → p-BZZ3KRPk.js} +3 -3
- package/dist/components/{p-D1rjfWgJ.js → p-BkXQL5Dl.js} +5 -5
- package/dist/components/{p-eZXIu4yK.js → p-BppcoKoo.js} +5 -5
- package/dist/components/{p-DDTMGbtA.js → p-BrA9NBEE.js} +21 -21
- package/dist/components/{p-Czhdc844.js → p-BrqSjRJN.js} +3 -3
- package/dist/components/{p-CAoN_STZ.js → p-Bxi-Bm49.js} +2 -2
- package/dist/components/{p-B43upypT.js → p-C9_yBEoX.js} +30 -10
- package/dist/components/{p-Df3BwVGy.js → p-CHoOe3FD.js} +3 -3
- package/dist/components/{p-2WiGyky4.js → p-CLAz6RJc.js} +3 -3
- package/dist/components/{p-B5SWPDuq.js → p-CSKToqUl.js} +4 -4
- package/dist/components/{p-CF8pLc07.js → p-CSWCmyzb.js} +5 -5
- package/dist/components/{p-HoO86l1o.js → p-CWAChRD5.js} +12 -12
- package/dist/components/{p-DwMqCX2P.js → p-Ch-KG9To.js} +3 -3
- package/dist/components/{p-CSuU8frA.js → p-Ck-87E2G.js} +1 -1
- package/dist/components/{p-BFYtCsZu.js → p-Covorf4C.js} +3 -3
- package/dist/components/{p-BoN700-O.js → p-Cx-L_28S.js} +3 -3
- package/dist/components/{p-vqEUQ-4Q.js → p-D0Trc3IQ.js} +5 -5
- package/dist/components/{p-BrNsOp2v.js → p-D2VcPEtL.js} +6 -6
- package/dist/components/{p-CSPYkLLH.js → p-D3BzgkIE.js} +2 -2
- package/dist/components/{p-bAacqNHq.js → p-D6JycG-I.js} +3 -3
- package/dist/components/{p-DB58Oa5V.js → p-DPsbNStn.js} +2 -2
- package/dist/components/{p-CwZ3KKFq.js → p-DT_WBwsw.js} +6 -6
- package/dist/components/{p-Dx5NfJ0U.js → p-DW1B118Q.js} +9 -9
- package/dist/components/{p-BPsKYMH6.js → p-DYPA7jpg.js} +2 -2
- package/dist/components/{p-DBqoPgev.js → p-DafP9PAA.js} +2 -2
- package/dist/components/{p-Dt7-I2Xz.js → p-DcUIO14-.js} +4 -4
- package/dist/components/{p-CXpv9Rxe.js → p-Di--2boB.js} +3 -3
- package/dist/components/{p-djJSnjAX.js → p-DjXQxw9R.js} +3 -3
- package/dist/components/{p-DVXTPI71.js → p-Dp1CD4gK.js} +2 -2
- package/dist/components/{p-BNeE3SiZ.js → p-DwEYMvIn.js} +175 -179
- package/dist/components/{p-DKGg-76-.js → p-Dznwo6oc.js} +2 -2
- package/dist/components/{p-BozrueXV.js → p-ME1sDz3f.js} +2 -2
- package/dist/components/{p-B-585egz.js → p-MhQxGUvY.js} +3 -3
- package/dist/components/{p-DX2nriaq.js → p-QSyeAy8R.js} +2 -2
- package/dist/components/{p-PjPPCHVL.js → p-Qdo3E8dr.js} +2 -2
- package/dist/components/{p-dsxHDlQ3.js → p-b0J2ktAm.js} +7 -7
- package/dist/components/{p-C98Eb3_R.js → p-dAXnRkjA.js} +5 -5
- package/dist/components/{p-GKmqCI8r.js → p-fSV6KVTC.js} +3 -3
- package/dist/components/{p-CaBbajU2.js → p-o3NYKrVL.js} +3 -3
- package/dist/components/{p-CrHvaLRV.js → p-vDCa_ZDm.js} +3 -3
- package/dist/components/{p-4SPnZZkH.js → p-zG-WUBGF.js} +4 -4
- package/dist/esm/{index-Dhio9uis.js → index-2va1Pk9z.js} +47 -11
- package/dist/esm/index.js +3 -52
- package/dist/esm/kritzel-active-users_47.entry.js +198 -231
- package/dist/esm/kritzel-brush-style.entry.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{schema.constants-DfvqHmxc.js → schema.constants-DBvUmuDH.js} +44 -20
- package/dist/esm/stencil.js +3 -3
- package/dist/stencil/index.esm.js +3 -52
- package/dist/stencil/{p-Dhio9uis.js → p-2va1Pk9z.js} +47 -11
- package/dist/stencil/{p-DfvqHmxc.js → p-DBvUmuDH.js} +44 -20
- package/dist/stencil/{p-ab5c4292.entry.js → p-ce6d432e.entry.js} +198 -231
- package/dist/stencil/{p-fb32cd8f.entry.js → p-df06ca3a.entry.js} +2 -2
- package/dist/stencil/stencil.esm.js +4 -4
- package/dist/types/classes/providers/sync/hocuspocus-sync-provider.class.d.ts +0 -5
- package/dist/types/classes/providers/sync/websocket-sync-provider.class.d.ts +0 -6
- package/dist/types/classes/structures/object-map.structure.d.ts +2 -26
- package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +0 -3
- package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +11 -9
- package/dist/types/components.d.ts +1 -8
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/interfaces/sync-provider.interface.d.ts +0 -13
- package/dist/types/stencil-public-runtime.d.ts +12 -0
- package/loader/index.d.ts +1 -1
- package/package.json +1 -1
- package/readme.md +10 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Dn19mGl-.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
|
|
|
@@ -23,7 +23,7 @@ const KritzelBrushStyle = class {
|
|
|
23
23
|
value: option.value,
|
|
24
24
|
label: option.label,
|
|
25
25
|
}));
|
|
26
|
-
return (index.h(index.Host, { key: '
|
|
26
|
+
return (index.h(index.Host, { key: '51a7f84685032fd8fc967b22bee7c0711e811a54' }, index.h("kritzel-dropdown", { key: 'e49d7062c695458d345738d88a0adfc96b575e61', options: dropdownOptions, value: this.type, onValueChanged: event => this.handleDropdownValueChange(event) }, index.h("button", { key: 'ebbbf1a55b89e91012ca44c5cf30acfb77332b50', class: "brush-style-button", slot: "prefix" }, index.h("kritzel-icon", { key: 'dae002c9ab5e3486c726202426eb076a8f33b109', name: this.type, size: 16 })))));
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
KritzelBrushStyle.style = kritzelBrushStyleCss();
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5754,10 +5754,11 @@ class Fitter {
|
|
|
5754
5754
|
}
|
|
5755
5755
|
openMore() {
|
|
5756
5756
|
let { content, openStart, openEnd } = this.unplaced;
|
|
5757
|
-
|
|
5758
|
-
if (!inner.childCount || inner.firstChild.isLeaf)
|
|
5757
|
+
if (maxOpen(content, -1) <= openStart)
|
|
5759
5758
|
return false;
|
|
5760
|
-
this.unplaced
|
|
5759
|
+
if (this.unplaced.size > 1 && maxOpen(content, 1) > openEnd)
|
|
5760
|
+
openEnd++;
|
|
5761
|
+
this.unplaced = new Slice(content, openStart + 1, openEnd);
|
|
5761
5762
|
return true;
|
|
5762
5763
|
}
|
|
5763
5764
|
dropNode() {
|
|
@@ -5927,6 +5928,14 @@ function invalidMarks(type, fragment, start) {
|
|
|
5927
5928
|
function definesContent(type) {
|
|
5928
5929
|
return type.spec.defining || type.spec.definingForContent;
|
|
5929
5930
|
}
|
|
5931
|
+
function maxOpen(frag, side) {
|
|
5932
|
+
for (let count = 0;; count++) {
|
|
5933
|
+
let ch = side < 0 ? frag.firstChild : frag.lastChild;
|
|
5934
|
+
if (!ch || ch.isAtom)
|
|
5935
|
+
return count;
|
|
5936
|
+
frag = ch.content;
|
|
5937
|
+
}
|
|
5938
|
+
}
|
|
5930
5939
|
function replaceRange(tr, from, to, slice) {
|
|
5931
5940
|
if (!slice.size)
|
|
5932
5941
|
return tr.deleteRange(from, to);
|
|
@@ -8631,7 +8640,8 @@ class WidgetViewDesc extends ViewDesc {
|
|
|
8631
8640
|
wrap.appendChild(dom);
|
|
8632
8641
|
dom = wrap;
|
|
8633
8642
|
}
|
|
8634
|
-
dom.
|
|
8643
|
+
if (!dom.hasAttribute("contenteditable"))
|
|
8644
|
+
dom.contentEditable = "false";
|
|
8635
8645
|
dom.classList.add("ProseMirror-widget");
|
|
8636
8646
|
}
|
|
8637
8647
|
super(parent, [], dom, null);
|
|
@@ -10479,8 +10489,14 @@ function maybeWrapTrusted(html) {
|
|
|
10479
10489
|
// With the require-trusted-types-for CSP, Chrome will block
|
|
10480
10490
|
// innerHTML, even on a detached document. This wraps the string in
|
|
10481
10491
|
// a way that makes the browser allow us to use its parser again.
|
|
10482
|
-
if (!_policy)
|
|
10483
|
-
_policy = trustedTypes.defaultPolicy
|
|
10492
|
+
if (!_policy) {
|
|
10493
|
+
if (_policy = trustedTypes.defaultPolicy)
|
|
10494
|
+
try {
|
|
10495
|
+
return _policy.createHTML(html);
|
|
10496
|
+
}
|
|
10497
|
+
catch (_a) { }
|
|
10498
|
+
_policy = trustedTypes.createPolicy("ProseMirrorClipboard", { createHTML: (s) => s });
|
|
10499
|
+
}
|
|
10484
10500
|
return _policy.createHTML(html);
|
|
10485
10501
|
}
|
|
10486
10502
|
function readHTML(html) {
|
|
@@ -10537,6 +10553,12 @@ function addContext(slice, context) {
|
|
|
10537
10553
|
let type = schema.nodes[array[i]];
|
|
10538
10554
|
if (!type || type.hasRequiredAttrs())
|
|
10539
10555
|
break;
|
|
10556
|
+
try {
|
|
10557
|
+
type.checkAttrs(array[i + 1]);
|
|
10558
|
+
}
|
|
10559
|
+
catch (e) {
|
|
10560
|
+
break;
|
|
10561
|
+
}
|
|
10540
10562
|
content = Fragment.from(type.create(array[i + 1], content));
|
|
10541
10563
|
openStart++;
|
|
10542
10564
|
openEnd++;
|
|
@@ -14195,16 +14217,20 @@ a custom function to determine the type of the newly split off block.
|
|
|
14195
14217
|
*/
|
|
14196
14218
|
function splitBlockAs(splitNode) {
|
|
14197
14219
|
return (state, dispatch) => {
|
|
14198
|
-
let { $from} = state.selection;
|
|
14199
14220
|
if (state.selection instanceof NodeSelection && state.selection.node.isBlock) {
|
|
14221
|
+
let { $from } = state.selection;
|
|
14200
14222
|
if (!$from.parentOffset || !canSplit(state.doc, $from.pos))
|
|
14201
14223
|
return false;
|
|
14202
14224
|
if (dispatch)
|
|
14203
14225
|
dispatch(state.tr.split($from.pos).scrollIntoView());
|
|
14204
14226
|
return true;
|
|
14205
14227
|
}
|
|
14206
|
-
if (
|
|
14228
|
+
if (!state.selection.$from.depth)
|
|
14207
14229
|
return false;
|
|
14230
|
+
let tr = state.tr;
|
|
14231
|
+
if (!state.selection.empty && (state.selection instanceof TextSelection || state.selection instanceof AllSelection))
|
|
14232
|
+
tr.deleteSelection();
|
|
14233
|
+
let { $from } = tr.selection, mapFrom = tr.steps.length;
|
|
14208
14234
|
let types = [];
|
|
14209
14235
|
let splitDepth, deflt, atEnd = false, atStart = false;
|
|
14210
14236
|
for (let d = $from.depth;; d--) {
|
|
@@ -14223,10 +14249,7 @@ function splitBlockAs(splitNode) {
|
|
|
14223
14249
|
types.unshift(null);
|
|
14224
14250
|
}
|
|
14225
14251
|
}
|
|
14226
|
-
let
|
|
14227
|
-
if (state.selection instanceof TextSelection || state.selection instanceof AllSelection)
|
|
14228
|
-
tr.deleteSelection();
|
|
14229
|
-
let splitPos = tr.mapping.map($from.pos);
|
|
14252
|
+
let splitPos = $from.pos;
|
|
14230
14253
|
let can = canSplit(tr.doc, splitPos, types.length, types);
|
|
14231
14254
|
if (!can) {
|
|
14232
14255
|
types[0] = deflt ? { type: deflt } : null;
|
|
@@ -14236,9 +14259,10 @@ function splitBlockAs(splitNode) {
|
|
|
14236
14259
|
return false;
|
|
14237
14260
|
tr.split(splitPos, types.length, types);
|
|
14238
14261
|
if (!atEnd && atStart && $from.node(splitDepth).type != deflt) {
|
|
14239
|
-
let
|
|
14262
|
+
let mapping = tr.mapping.slice(mapFrom);
|
|
14263
|
+
let first = mapping.map($from.before(splitDepth)), $first = tr.doc.resolve(first);
|
|
14240
14264
|
if (deflt && $from.node(splitDepth - 1).canReplaceWith($first.index(), $first.index() + 1, deflt))
|
|
14241
|
-
tr.setNodeMarkup(
|
|
14265
|
+
tr.setNodeMarkup(mapping.map($from.before(splitDepth)), deflt);
|
|
14242
14266
|
}
|
|
14243
14267
|
if (dispatch)
|
|
14244
14268
|
dispatch(tr.scrollIntoView());
|
|
@@ -22879,12 +22903,12 @@ class KritzelCursorHelper {
|
|
|
22879
22903
|
// We rotate around the center of the SVG canvas
|
|
22880
22904
|
const center = size / 2;
|
|
22881
22905
|
// We use a group to apply the rotation
|
|
22882
|
-
const svg = `
|
|
22883
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${size} ${size}">
|
|
22884
|
-
<g transform="rotate(${rotation} ${center} ${center})">
|
|
22885
|
-
${content}
|
|
22886
|
-
</g>
|
|
22887
|
-
</svg>
|
|
22906
|
+
const svg = `
|
|
22907
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${size} ${size}">
|
|
22908
|
+
<g transform="rotate(${rotation} ${center} ${center})">
|
|
22909
|
+
${content}
|
|
22910
|
+
</g>
|
|
22911
|
+
</svg>
|
|
22888
22912
|
`;
|
|
22889
22913
|
// Encode the SVG for use in a data URI
|
|
22890
22914
|
// We need to be careful with encoding to ensure it works across browsers
|
package/dist/cjs/stencil.cjs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Dn19mGl-.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Browser v4.
|
|
8
|
+
Stencil Client Patch Browser v4.44.2 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
var patchBrowser = () => {
|
|
@@ -17,14 +17,9 @@ export class HocuspocusSyncProvider {
|
|
|
17
17
|
_connectionStatus = 'disconnected';
|
|
18
18
|
visibilityHandler = null;
|
|
19
19
|
onlineHandler = null;
|
|
20
|
-
syncedResolvers = [];
|
|
21
20
|
get awareness() {
|
|
22
21
|
return this.provider.awareness;
|
|
23
22
|
}
|
|
24
|
-
/** HocuspocusProvider applies remote updates with itself as the Yjs transaction origin. */
|
|
25
|
-
get updateOrigin() {
|
|
26
|
-
return this.provider;
|
|
27
|
-
}
|
|
28
23
|
get connectionStatus() {
|
|
29
24
|
return this._connectionStatus;
|
|
30
25
|
}
|
|
@@ -81,7 +76,6 @@ export class HocuspocusSyncProvider {
|
|
|
81
76
|
}
|
|
82
77
|
this.isSynced = true;
|
|
83
78
|
this._connectionStatus = 'synced';
|
|
84
|
-
this.releaseSyncedWaiters();
|
|
85
79
|
if (!options?.quiet) {
|
|
86
80
|
console.info(`Hocuspocus synced: ${name}`);
|
|
87
81
|
}
|
|
@@ -292,19 +286,6 @@ export class HocuspocusSyncProvider {
|
|
|
292
286
|
this.disconnect();
|
|
293
287
|
return this.connect();
|
|
294
288
|
}
|
|
295
|
-
releaseSyncedWaiters() {
|
|
296
|
-
const resolvers = this.syncedResolvers;
|
|
297
|
-
this.syncedResolvers = [];
|
|
298
|
-
resolvers.forEach(resolve => resolve());
|
|
299
|
-
}
|
|
300
|
-
async whenSynced() {
|
|
301
|
-
if (this.isSynced || this.isDestroyed || this.provider.isSynced) {
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
return new Promise(resolve => {
|
|
305
|
-
this.syncedResolvers.push(resolve);
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
289
|
disconnect() {
|
|
309
290
|
// Cancel any pending connection attempt
|
|
310
291
|
if (this.connectTimeout) {
|
|
@@ -326,7 +307,6 @@ export class HocuspocusSyncProvider {
|
|
|
326
307
|
this.isConnected = false;
|
|
327
308
|
this.isSynced = false;
|
|
328
309
|
this._connectionStatus = 'disconnected';
|
|
329
|
-
this.releaseSyncedWaiters();
|
|
330
310
|
}
|
|
331
311
|
destroy() {
|
|
332
312
|
// Mark as destroyed first to prevent any callbacks from doing work
|
|
@@ -346,6 +326,5 @@ export class HocuspocusSyncProvider {
|
|
|
346
326
|
this.isConnected = false;
|
|
347
327
|
this.isSynced = false;
|
|
348
328
|
this._connectionStatus = 'disconnected';
|
|
349
|
-
this.releaseSyncedWaiters();
|
|
350
329
|
}
|
|
351
330
|
}
|
|
@@ -8,15 +8,9 @@ export class WebSocketSyncProvider {
|
|
|
8
8
|
provider;
|
|
9
9
|
isConnected = false;
|
|
10
10
|
_quiet = false;
|
|
11
|
-
_isSynced = false;
|
|
12
|
-
_syncedResolvers = [];
|
|
13
11
|
get awareness() {
|
|
14
12
|
return this.provider.awareness;
|
|
15
13
|
}
|
|
16
|
-
/** y-websocket applies remote updates with the underlying provider as the Yjs transaction origin. */
|
|
17
|
-
get updateOrigin() {
|
|
18
|
-
return this.provider;
|
|
19
|
-
}
|
|
20
14
|
constructor(docName, doc, options) {
|
|
21
15
|
const url = options?.url || 'ws://localhost:1234';
|
|
22
16
|
const roomName = options?.roomName || docName;
|
|
@@ -63,29 +57,11 @@ export class WebSocketSyncProvider {
|
|
|
63
57
|
}
|
|
64
58
|
});
|
|
65
59
|
this.provider.on('sync', (synced) => {
|
|
66
|
-
if (!
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
this._isSynced = true;
|
|
70
|
-
this.releaseSyncedWaiters();
|
|
71
|
-
if (!this._quiet) {
|
|
60
|
+
if (synced && !this._quiet) {
|
|
72
61
|
console.info('WebSocket synced');
|
|
73
62
|
}
|
|
74
63
|
});
|
|
75
64
|
}
|
|
76
|
-
releaseSyncedWaiters() {
|
|
77
|
-
const resolvers = this._syncedResolvers;
|
|
78
|
-
this._syncedResolvers = [];
|
|
79
|
-
resolvers.forEach(resolve => resolve());
|
|
80
|
-
}
|
|
81
|
-
async whenSynced() {
|
|
82
|
-
if (this._isSynced || this.provider.synced) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
return new Promise(resolve => {
|
|
86
|
-
this._syncedResolvers.push(resolve);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
65
|
async connect() {
|
|
90
66
|
if (this.isConnected) {
|
|
91
67
|
return;
|
|
@@ -117,8 +93,6 @@ export class WebSocketSyncProvider {
|
|
|
117
93
|
this.provider.disconnect();
|
|
118
94
|
}
|
|
119
95
|
this.isConnected = false;
|
|
120
|
-
this._isSynced = false;
|
|
121
|
-
this.releaseSyncedWaiters();
|
|
122
96
|
}
|
|
123
97
|
async reconnect() {
|
|
124
98
|
this.disconnect();
|
|
@@ -129,7 +103,5 @@ export class WebSocketSyncProvider {
|
|
|
129
103
|
this.provider.destroy();
|
|
130
104
|
}
|
|
131
105
|
this.isConnected = false;
|
|
132
|
-
this._isSynced = false;
|
|
133
|
-
this.releaseSyncedWaiters();
|
|
134
106
|
}
|
|
135
107
|
}
|
|
@@ -120,10 +120,7 @@ export class KritzelAppStateMap {
|
|
|
120
120
|
if (showSyncProviderInfo && networkProviders.length > 0) {
|
|
121
121
|
console.info(`[Kritzel] App-state network providers connecting in background: ${networkProviders.length}`);
|
|
122
122
|
}
|
|
123
|
-
const networkConnectPromises = networkProviders.map(provider => provider
|
|
124
|
-
.connect()
|
|
125
|
-
.then(() => provider.whenSynced?.())
|
|
126
|
-
.catch(err => {
|
|
123
|
+
const networkConnectPromises = networkProviders.map(provider => provider.connect().catch(err => {
|
|
127
124
|
if (showSyncProviderInfo) {
|
|
128
125
|
console.error(`[Kritzel] Network sync provider "${provider.constructor.name}" failed to connect:`, err);
|
|
129
126
|
}
|
|
@@ -37,10 +37,6 @@ export class KritzelObjectMap {
|
|
|
37
37
|
_awarenessChangeHandler = null;
|
|
38
38
|
_awarenessChangeCallbacks = [];
|
|
39
39
|
_objectsChangeCallbacks = [];
|
|
40
|
-
_remoteChangesCallbacks = [];
|
|
41
|
-
_docUpdateHandler = null;
|
|
42
|
-
_remoteOrigins = new Set();
|
|
43
|
-
_appliedRemoteChanges = false;
|
|
44
40
|
_lastAwarenessEmitTime = 0;
|
|
45
41
|
_awarenessEmitTimeout = null;
|
|
46
42
|
AWARENESS_THROTTLE_INTERVAL = 100; // milliseconds
|
|
@@ -64,44 +60,12 @@ export class KritzelObjectMap {
|
|
|
64
60
|
return this._isReady;
|
|
65
61
|
}
|
|
66
62
|
/**
|
|
67
|
-
* Promise that settles when network providers finish connecting
|
|
68
|
-
*
|
|
63
|
+
* Promise that settles when network providers finish connecting.
|
|
64
|
+
* Resolves immediately if no network providers. Awaited by the loading overlay.
|
|
69
65
|
*/
|
|
70
66
|
whenNetworkSynced() {
|
|
71
67
|
return this._networkSyncPromise ?? Promise.resolve();
|
|
72
68
|
}
|
|
73
|
-
/**
|
|
74
|
-
* Whether any configured provider synchronizes over the network.
|
|
75
|
-
*/
|
|
76
|
-
get hasNetworkSyncProvider() {
|
|
77
|
-
return this._providers.some(provider => provider.type === 'network');
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Whether remote-originated changes can be told apart from local writes.
|
|
81
|
-
* Requires every network provider to expose its Yjs update origin.
|
|
82
|
-
*/
|
|
83
|
-
get supportsRemoteChangeDetection() {
|
|
84
|
-
const networkProviders = this._providers.filter(provider => provider.type === 'network');
|
|
85
|
-
return networkProviders.length > 0 && networkProviders.every(provider => provider.updateOrigin !== undefined);
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Whether at least one update originating from a network provider has been
|
|
89
|
-
* applied to this document. Stays `false` when the remote held no data the
|
|
90
|
-
* local document was missing, because Yjs suppresses empty updates.
|
|
91
|
-
*/
|
|
92
|
-
get hasAppliedRemoteChanges() {
|
|
93
|
-
return this._appliedRemoteChanges;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Registers a callback invoked whenever a network provider applies changes to this document.
|
|
97
|
-
* @returns A function that unregisters the callback.
|
|
98
|
-
*/
|
|
99
|
-
onRemoteChangesApplied(callback) {
|
|
100
|
-
this._remoteChangesCallbacks.push(callback);
|
|
101
|
-
return () => {
|
|
102
|
-
this._remoteChangesCallbacks = this._remoteChangesCallbacks.filter(registered => registered !== callback);
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
69
|
/**
|
|
106
70
|
* Returns the Yjs Awareness instance, if a network provider is available.
|
|
107
71
|
*/
|
|
@@ -344,22 +308,6 @@ export class KritzelObjectMap {
|
|
|
344
308
|
const providerList = this._providers.map(p => `${p.constructor.name} (${p.type})`).join(', ');
|
|
345
309
|
console.info(`[Kritzel] Workspace sync providers initialized for ${docName}: ${providerList || 'none'}`);
|
|
346
310
|
}
|
|
347
|
-
// Registered before any provider connects so no remote update can be missed.
|
|
348
|
-
for (const provider of this._providers) {
|
|
349
|
-
if (provider.type === 'network' && provider.updateOrigin !== undefined) {
|
|
350
|
-
this._remoteOrigins.add(provider.updateOrigin);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
this._docUpdateHandler = (_update, origin) => {
|
|
354
|
-
if (!this._remoteOrigins.has(origin)) {
|
|
355
|
-
return;
|
|
356
|
-
}
|
|
357
|
-
this._appliedRemoteChanges = true;
|
|
358
|
-
for (const callback of [...this._remoteChangesCallbacks]) {
|
|
359
|
-
callback();
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
this._ydoc.on('update', this._docUpdateHandler);
|
|
363
311
|
// captureTimeout is effectively infinite — undo-step boundaries are
|
|
364
312
|
// marked explicitly via markUndoBoundary() in insert/remove/reset and
|
|
365
313
|
// at stroke/gesture boundaries in the tools. This prevents a single
|
|
@@ -413,15 +361,12 @@ export class KritzelObjectMap {
|
|
|
413
361
|
if (showSyncProviderInfo && networkProviders.length > 0) {
|
|
414
362
|
console.info(`[Kritzel] Workspace network providers connecting in background: ${networkProviders.length}`);
|
|
415
363
|
}
|
|
416
|
-
const networkConnectPromises = networkProviders.map(provider => provider
|
|
417
|
-
.connect()
|
|
418
|
-
.then(() => provider.whenSynced?.())
|
|
419
|
-
.catch(err => {
|
|
364
|
+
const networkConnectPromises = networkProviders.map(provider => provider.connect().catch(err => {
|
|
420
365
|
if (showSyncProviderInfo) {
|
|
421
366
|
console.error(`[Kritzel] Network sync provider "${provider.constructor.name}" failed to connect:`, err);
|
|
422
367
|
}
|
|
423
368
|
}));
|
|
424
|
-
//
|
|
369
|
+
// Network sync awaited by loading overlay to show remote workspace hydration
|
|
425
370
|
this._networkSyncPromise = networkConnectPromises.length > 0 ? Promise.allSettled(networkConnectPromises).then(() => undefined) : null;
|
|
426
371
|
this._isReady = true;
|
|
427
372
|
// Find the first provider that exposes awareness (network providers)
|
|
@@ -1086,13 +1031,6 @@ export class KritzelObjectMap {
|
|
|
1086
1031
|
this._objectsMap.unobserve(this._objectsObserver);
|
|
1087
1032
|
this._objectsObserver = null;
|
|
1088
1033
|
}
|
|
1089
|
-
if (this._ydoc && this._docUpdateHandler) {
|
|
1090
|
-
this._ydoc.off('update', this._docUpdateHandler);
|
|
1091
|
-
}
|
|
1092
|
-
this._docUpdateHandler = null;
|
|
1093
|
-
this._remoteOrigins.clear();
|
|
1094
|
-
this._remoteChangesCallbacks = [];
|
|
1095
|
-
this._appliedRemoteChanges = false;
|
|
1096
1034
|
// Remove undo manager event listeners
|
|
1097
1035
|
if (this._undoManager) {
|
|
1098
1036
|
if (this._stackItemAddedHandler) {
|
package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.css
CHANGED
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
position: fixed;
|
|
4
|
-
top: 0;
|
|
5
|
-
left: 0;
|
|
6
|
-
width: 100vw;
|
|
7
|
-
height: 100vh;
|
|
8
|
-
pointer-events: none;
|
|
9
|
-
z-index: 1;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.awareness-cursor {
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 0;
|
|
15
|
-
left: 0;
|
|
16
|
-
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
17
|
-
opacity 300ms ease;
|
|
18
|
-
will-change: transform;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.awareness-cursor.stale {
|
|
22
|
-
opacity: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.awareness-cursor.tracking-object {
|
|
26
|
-
transition-duration: 0ms;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.cursor-arrow {
|
|
30
|
-
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.cursor-label {
|
|
34
|
-
position: absolute;
|
|
35
|
-
left: 16px;
|
|
36
|
-
top: 16px;
|
|
37
|
-
white-space: nowrap;
|
|
38
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
39
|
-
font-size: var(--kritzel-awareness-cursor-label-font-size, 12px);
|
|
40
|
-
color: var(--kritzel-awareness-cursor-label-text-color, #ffffff);
|
|
41
|
-
padding: 2px 8px;
|
|
42
|
-
border-radius: 4px;
|
|
43
|
-
line-height: 1.4;
|
|
44
|
-
font-weight: 500;
|
|
45
|
-
pointer-events: none;
|
|
46
|
-
user-select: none;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.edge-indicator {
|
|
50
|
-
position: absolute;
|
|
51
|
-
top: -12px;
|
|
52
|
-
left: -12px;
|
|
53
|
-
width: 24px;
|
|
54
|
-
height: 24px;
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
59
|
-
opacity 300ms ease;
|
|
60
|
-
will-change: transform;
|
|
61
|
-
pointer-events: auto;
|
|
62
|
-
user-select: none;
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.edge-indicator.stale {
|
|
67
|
-
opacity: 0;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.edge-indicator.tracking-object {
|
|
71
|
-
transition-duration: 0ms;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.edge-arrow {
|
|
75
|
-
position: absolute;
|
|
76
|
-
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
|
|
77
|
-
transition: opacity 300ms ease;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.edge-arrow.stale {
|
|
81
|
-
opacity: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.edge-label {
|
|
85
|
-
position: absolute;
|
|
86
|
-
white-space: nowrap;
|
|
87
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
88
|
-
font-size: var(--kritzel-awareness-cursor-label-font-size, 12px);
|
|
89
|
-
color: var(--kritzel-awareness-cursor-label-text-color, #ffffff);
|
|
90
|
-
padding: 2px 8px;
|
|
91
|
-
border-radius: 4px;
|
|
92
|
-
line-height: 1.4;
|
|
93
|
-
font-weight: 500;
|
|
94
|
-
pointer-events: none;
|
|
95
|
-
opacity: 0;
|
|
96
|
-
transform-origin: center;
|
|
97
|
-
transition: opacity 150ms ease;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.edge-indicator:hover .edge-label {
|
|
101
|
-
opacity: 1;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.remote-selection-box {
|
|
105
|
-
position: absolute;
|
|
106
|
-
top: 0;
|
|
107
|
-
left: 0;
|
|
108
|
-
border-width: 2px;
|
|
109
|
-
border-style: solid;
|
|
110
|
-
pointer-events: none;
|
|
111
|
-
will-change: transform, width, height;
|
|
112
|
-
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
113
|
-
width var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
114
|
-
height var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out;
|
|
115
|
-
}
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
width: 100vw;
|
|
7
|
+
height: 100vh;
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
z-index: 1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.awareness-cursor {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
17
|
+
opacity 300ms ease;
|
|
18
|
+
will-change: transform;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.awareness-cursor.stale {
|
|
22
|
+
opacity: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.awareness-cursor.tracking-object {
|
|
26
|
+
transition-duration: 0ms;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cursor-arrow {
|
|
30
|
+
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.cursor-label {
|
|
34
|
+
position: absolute;
|
|
35
|
+
left: 16px;
|
|
36
|
+
top: 16px;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
39
|
+
font-size: var(--kritzel-awareness-cursor-label-font-size, 12px);
|
|
40
|
+
color: var(--kritzel-awareness-cursor-label-text-color, #ffffff);
|
|
41
|
+
padding: 2px 8px;
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
line-height: 1.4;
|
|
44
|
+
font-weight: 500;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
user-select: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.edge-indicator {
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: -12px;
|
|
52
|
+
left: -12px;
|
|
53
|
+
width: 24px;
|
|
54
|
+
height: 24px;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
59
|
+
opacity 300ms ease;
|
|
60
|
+
will-change: transform;
|
|
61
|
+
pointer-events: auto;
|
|
62
|
+
user-select: none;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.edge-indicator.stale {
|
|
67
|
+
opacity: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.edge-indicator.tracking-object {
|
|
71
|
+
transition-duration: 0ms;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.edge-arrow {
|
|
75
|
+
position: absolute;
|
|
76
|
+
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
|
|
77
|
+
transition: opacity 300ms ease;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.edge-arrow.stale {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.edge-label {
|
|
85
|
+
position: absolute;
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
88
|
+
font-size: var(--kritzel-awareness-cursor-label-font-size, 12px);
|
|
89
|
+
color: var(--kritzel-awareness-cursor-label-text-color, #ffffff);
|
|
90
|
+
padding: 2px 8px;
|
|
91
|
+
border-radius: 4px;
|
|
92
|
+
line-height: 1.4;
|
|
93
|
+
font-weight: 500;
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
opacity: 0;
|
|
96
|
+
transform-origin: center;
|
|
97
|
+
transition: opacity 150ms ease;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.edge-indicator:hover .edge-label {
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.remote-selection-box {
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 0;
|
|
107
|
+
left: 0;
|
|
108
|
+
border-width: 2px;
|
|
109
|
+
border-style: solid;
|
|
110
|
+
pointer-events: none;
|
|
111
|
+
will-change: transform, width, height;
|
|
112
|
+
transition: transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
113
|
+
width var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out,
|
|
114
|
+
height var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out;
|
|
115
|
+
}
|
package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.js
CHANGED
|
@@ -210,7 +210,7 @@ export class KritzelAwarenessCursors {
|
|
|
210
210
|
void _ty;
|
|
211
211
|
void this.objectVersion;
|
|
212
212
|
const cursors = Array.from(this.remoteCursors.values());
|
|
213
|
-
return (h(Host, { key: '
|
|
213
|
+
return (h(Host, { key: 'b157f337127f7e5852acc0d6a246fa42e944a501' }, cursors.map(remoteCursor => {
|
|
214
214
|
if (!remoteCursor.cursor)
|
|
215
215
|
return null;
|
|
216
216
|
// When a remote user is actively drawing, derive cursor position from
|