kritzel-stencil 0.1.76 → 0.1.78
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/dist/cjs/{index-Dc7LOVhs.js → index-BRZ6e6oa.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -330
- package/dist/cjs/kritzel-active-users_42.cjs.entry.js +88 -50
- package/dist/cjs/kritzel-brush-style.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stencil.cjs.js +2 -2
- package/dist/cjs/{workspace.migrations-DkmVO6dE.js → workspace.migrations-sUPrO23c.js} +378 -13
- package/dist/collection/classes/objects/selection-group.class.js +2 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.css +6 -1
- package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.js +5 -2
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.css +2 -0
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +16 -6
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +21 -0
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +24 -10
- package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.css +3 -0
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.css +1 -0
- package/dist/collection/configs/default-engine-config.js +1 -0
- package/dist/collection/constants/version.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/kritzel-active-users.js +1 -1
- package/dist/components/kritzel-avatar.js +1 -1
- package/dist/components/kritzel-awareness-cursors.js +1 -1
- package/dist/components/kritzel-back-to-content.js +1 -1
- package/dist/components/kritzel-brush-style.js +1 -1
- package/dist/components/kritzel-button.js +1 -1
- package/dist/components/kritzel-color-palette.js +1 -1
- package/dist/components/kritzel-color.js +1 -1
- package/dist/components/kritzel-context-menu.js +1 -1
- package/dist/components/kritzel-controls.js +1 -1
- package/dist/components/kritzel-current-user-dialog.js +1 -1
- package/dist/components/kritzel-current-user.js +1 -1
- package/dist/components/kritzel-cursor-trail.js +1 -1
- package/dist/components/kritzel-dialog.js +1 -1
- package/dist/components/kritzel-dropdown.js +1 -1
- package/dist/components/kritzel-editor.js +1 -1
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/kritzel-export.js +1 -1
- package/dist/components/kritzel-font-family.js +1 -1
- package/dist/components/kritzel-font-size.js +1 -1
- package/dist/components/kritzel-font.js +1 -1
- package/dist/components/kritzel-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-login-dialog.js +1 -1
- package/dist/components/kritzel-master-detail.js +1 -1
- package/dist/components/kritzel-menu-item.js +1 -1
- package/dist/components/kritzel-menu.js +1 -1
- package/dist/components/kritzel-more-menu.js +1 -1
- package/dist/components/kritzel-numeric-input.js +1 -1
- package/dist/components/kritzel-opacity-slider.js +1 -1
- package/dist/components/kritzel-pill-tabs.js +1 -1
- package/dist/components/kritzel-portal.js +1 -1
- package/dist/components/kritzel-settings.js +1 -1
- package/dist/components/kritzel-shape-fill.js +1 -1
- package/dist/components/kritzel-share-dialog.js +1 -1
- package/dist/components/kritzel-slide-toggle.js +1 -1
- package/dist/components/kritzel-split-button.js +1 -1
- package/dist/components/kritzel-stroke-size.js +1 -1
- package/dist/components/kritzel-tool-config.js +1 -1
- package/dist/components/kritzel-tooltip.js +1 -1
- package/dist/components/kritzel-utility-panel.js +1 -1
- package/dist/components/kritzel-workspace-manager.js +1 -1
- package/dist/components/{p-Dt-J69xt.js → p-53di1Zko.js} +1 -1
- package/dist/components/{p-DS0xx1eT.js → p-6NFl6EB2.js} +1 -1
- package/dist/components/{p-DSzQ6H2j.js → p-76W5pG2O.js} +1 -1
- package/dist/components/{p-DRbG92F9.js → p-BLsH_Oi0.js} +1 -1
- package/dist/components/p-Ban3OlgZ.js +9 -0
- package/dist/components/{p-CUkKKbnu.js → p-BrZ_gL8Q.js} +1 -1
- package/dist/components/{p-kj9wbLY8.js → p-BuI6Gkzg.js} +1 -1
- package/dist/components/{p-BeFUNGEI.js → p-BueaqfA2.js} +1 -1
- package/dist/components/{p-BiByyU2C.js → p-C2l9mZ1P.js} +1 -1
- package/dist/components/{p-CsR4owzk.js → p-C4fKLlrd.js} +1 -1
- package/dist/components/{p-BA0ayKqO.js → p-CBslLN3-.js} +1 -1
- package/dist/components/p-CHY71o5B.js +1 -0
- package/dist/components/{p-KQzWumjB.js → p-CI9Nbh-x.js} +1 -1
- package/dist/components/{p-CsoDfhD5.js → p-CN8IxBlU.js} +1 -1
- package/dist/components/{p-2OYw6GJ7.js → p-CWMFGEe0.js} +1 -1
- package/dist/components/{p-Dj_Qjga5.js → p-CYh7yV-K.js} +1 -1
- package/dist/components/{p-xM-_OeRO.js → p-Ck1dhpUQ.js} +1 -1
- package/dist/components/{p-b4gyXoju.js → p-Cns7qSKS.js} +1 -1
- package/dist/components/{p-C69Stayh.js → p-D14QNK3X.js} +1 -1
- package/dist/components/{p-iRL0wQHQ.js → p-D3pNw-SV.js} +1 -1
- package/dist/components/{p-BEJQ2kP7.js → p-D5IhryUR.js} +1 -1
- package/dist/components/{p-CZhyKp-f.js → p-D7yzmu1l.js} +1 -1
- package/dist/components/{p-HLbqRJGs.js → p-DDKjsXCe.js} +1 -1
- package/dist/components/{p-TyR-YTXm.js → p-DV7Z_qfa.js} +1 -1
- package/dist/components/{p-ByR0VXeU.js → p-DWsCbu01.js} +1 -1
- package/dist/components/{p-31FVoNWR.js → p-DaGZEV0R.js} +1 -1
- package/dist/components/{p-Da46jw3N.js → p-DkWWzVg8.js} +1 -1
- package/dist/components/{p-D1O7DxL4.js → p-Dr3-pKVg.js} +1 -1
- package/dist/components/{p-JdNoaqqb.js → p-Dte67BWd.js} +1 -1
- package/dist/components/{p-CHmi1QWx.js → p-DxzDda_J.js} +1 -1
- package/dist/components/{p-CAIGuV2J.js → p-KJ4dHzrS.js} +1 -1
- package/dist/components/{p-BiouZo1q.js → p-Lhyh6KeB.js} +1 -1
- package/dist/components/{p-CFhp1W9F.js → p-Md9Y-b3d.js} +1 -1
- package/dist/components/{p-C1uR_ZNW.js → p-ZC5YELQJ.js} +1 -1
- package/dist/components/{p-C7SBI_0T.js → p-ZQ2bKafG.js} +1 -1
- package/dist/components/{p-0kShCfeb.js → p-_QEHfsIk.js} +1 -1
- package/dist/components/{p-DXjuuVq9.js → p-gtQlsorg.js} +1 -1
- package/dist/components/{p-GYI7sDxr.js → p-l_YGO7RB.js} +1 -1
- package/dist/components/{p-DvIEvoZu.js → p-m1nVDC3G.js} +1 -1
- package/dist/components/{p-7o2FWtFx.js → p-pCC6t6BH.js} +1 -1
- package/dist/components/p-pGzF7PUB.js +1 -0
- package/dist/esm/{index-MV-81ybv.js → index-BbOHefEf.js} +1 -1
- package/dist/esm/index.js +2 -331
- package/dist/esm/kritzel-active-users_42.entry.js +88 -50
- package/dist/esm/kritzel-brush-style.entry.js +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stencil.js +3 -3
- package/dist/esm/{workspace.migrations-D48_Bqvh.js → workspace.migrations-NhRgr2_H.js} +378 -12
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/p-4a4b38e4.entry.js +9 -0
- package/dist/stencil/{p-fc21e29c.entry.js → p-98238bf9.entry.js} +1 -1
- package/dist/stencil/p-NhRgr2_H.js +1 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/classes/objects/selection-group.class.d.ts +1 -0
- package/dist/types/components.d.ts +4 -2
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/interfaces/engine-state.interface.d.ts +1 -0
- package/package.json +2 -2
- package/dist/components/p-CJ2eHeoV.js +0 -1
- package/dist/components/p-jdYmu4SA.js +0 -9
- package/dist/components/p-xNwOWoiT.js +0 -1
- package/dist/stencil/p-775a7246.entry.js +0 -9
- package/dist/stencil/p-D48_Bqvh.js +0 -1
- /package/dist/components/{p-pebXO4LU.js → p-CGGiwvWZ.js} +0 -0
- /package/dist/stencil/{p-MV-81ybv.js → p-BbOHefEf.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var workspace_migrations = require('./workspace.migrations-
|
|
3
|
+
var index = require('./index-BRZ6e6oa.js');
|
|
4
|
+
var workspace_migrations = require('./workspace.migrations-sUPrO23c.js');
|
|
5
5
|
var Y = require('yjs');
|
|
6
6
|
require('y-websocket');
|
|
7
7
|
require('y-indexeddb');
|
|
@@ -176,7 +176,7 @@ const KritzelAvatar = class {
|
|
|
176
176
|
};
|
|
177
177
|
KritzelAvatar.style = kritzelAvatarCss();
|
|
178
178
|
|
|
179
|
-
const kritzelAwarenessCursorsCss = () => `:host{display:block;position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:
|
|
179
|
+
const kritzelAwarenessCursorsCss = () => `:host{display:block;position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:1}.awareness-cursor{position:absolute;top:0;left:0;transition:transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out, opacity 300ms ease;will-change:transform}.awareness-cursor.stale{opacity:0}.awareness-cursor.tracking-object{transition-duration:0ms}.cursor-arrow{filter:drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3))}.cursor-label{position:absolute;left:16px;top:16px;white-space:nowrap;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;font-size:var(--kritzel-awareness-cursor-label-font-size, 12px);color:var(--kritzel-awareness-cursor-label-text-color, #ffffff);padding:2px 8px;border-radius:4px;line-height:1.4;font-weight:500;pointer-events:none;user-select:none}.edge-indicator{position:absolute;top:-12px;left:-12px;width:24px;height:24px;display:flex;align-items:center;justify-content:center;transition:transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out, opacity 300ms ease;will-change:transform;pointer-events:auto;user-select:none;cursor:pointer}.edge-indicator.stale{opacity:0}.edge-indicator.tracking-object{transition-duration:0ms}.edge-arrow{position:absolute;filter:drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));transition:opacity 300ms ease}.edge-arrow.stale{opacity:0}.edge-label{position:absolute;white-space:nowrap;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;font-size:var(--kritzel-awareness-cursor-label-font-size, 12px);color:var(--kritzel-awareness-cursor-label-text-color, #ffffff);padding:2px 8px;border-radius:4px;line-height:1.4;font-weight:500;pointer-events:none;opacity:0;transform-origin:center;transition:opacity 150ms ease}.edge-indicator:hover .edge-label{opacity:1}.remote-selection-box{position:absolute;top:0;left:0;border-width:2px;border-style:solid;pointer-events:none;will-change:transform, width, height;transition:transform var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out, width var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out, height var(--kritzel-awareness-cursor-transition-duration, 100ms) ease-out}`;
|
|
180
180
|
|
|
181
181
|
const STALE_THRESHOLD_MS = 10_000;
|
|
182
182
|
const REMOVE_THRESHOLD_MS = 30_000;
|
|
@@ -258,6 +258,9 @@ const KritzelAwarenessCursors = class {
|
|
|
258
258
|
updated.delete(clientId);
|
|
259
259
|
changed = true;
|
|
260
260
|
}
|
|
261
|
+
else if (!changed && now - cursor.lastCursorMove > STALE_THRESHOLD_MS) {
|
|
262
|
+
changed = true;
|
|
263
|
+
}
|
|
261
264
|
}
|
|
262
265
|
if (changed) {
|
|
263
266
|
this.remoteCursors = updated;
|
|
@@ -353,7 +356,7 @@ const KritzelAwarenessCursors = class {
|
|
|
353
356
|
}
|
|
354
357
|
render() {
|
|
355
358
|
const cursors = Array.from(this.remoteCursors.values());
|
|
356
|
-
return (index.h(index.Host, { key: '
|
|
359
|
+
return (index.h(index.Host, { key: '5a28def6e024249c4309c087502cde9f219f5421' }, cursors.map(remoteCursor => {
|
|
357
360
|
if (!remoteCursor.cursor)
|
|
358
361
|
return null;
|
|
359
362
|
// When a remote user is actively drawing, derive cursor position from
|
|
@@ -429,7 +432,7 @@ const KritzelAwarenessCursors = class {
|
|
|
429
432
|
const displayName = this.getUserDisplayName(cursor.user);
|
|
430
433
|
return (index.h("div", { key: `edge-${cursor.clientId}`, class: { 'edge-indicator': true, stale, 'tracking-object': trackingObject }, style: {
|
|
431
434
|
transform: `translate(${clamped.x}px, ${clamped.y}px)`,
|
|
432
|
-
} }, index.h("svg", { class:
|
|
435
|
+
} }, index.h("svg", { class: { 'edge-arrow': true, stale }, width: "16", height: "16", viewBox: "0 0 16 16", style: { transform: `rotate(${arrowDeg}deg)` } }, index.h("path", { d: "M8 1L14 13H2L8 1Z", fill: color, stroke: "#ffffff", "stroke-width": "1.5", "stroke-linejoin": "round" })), index.h("span", { class: "edge-label", style: {
|
|
433
436
|
backgroundColor: color,
|
|
434
437
|
transform: `translate(${labelX}px, ${labelY}px)`,
|
|
435
438
|
} }, displayName)));
|
|
@@ -1854,7 +1857,7 @@ const DEFAULT_SHAPE_CONFIG = {
|
|
|
1854
1857
|
const ABSOLUTE_SCALE_MAX = 1000;
|
|
1855
1858
|
const ABSOLUTE_SCALE_MIN = 0.0001;
|
|
1856
1859
|
|
|
1857
|
-
const kritzelEditorCss = () => `kritzel-editor{display:flex;margin:0;position:relative;overflow:hidden;width:100%;height:100%;align-items:center;justify-content:center;touch-action:manipulation;user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}kritzel-controls{position:absolute;bottom:var(--kritzel-editor-controls-bottom, 14px);transition:transform var(--kritzel-editor-controls-transition-duration, 0.1s) var(--kritzel-editor-controls-transition, ease-in-out)}kritzel-controls.keyboard-open{transform:var(--kritzel-editor-controls-transform, translateY(300%))}.top-left-buttons{position:absolute;top:var(--kritzel-editor-top-left-buttons-top, 14px);left:var(--kritzel-editor-top-left-buttons-left, 14px);display:flex;align-items:flex-start;gap:8px}.top-right-buttons{position:absolute;top:var(--kritzel-editor-top-right-buttons-top, 14px);right:var(--kritzel-editor-top-right-buttons-right, 14px);display:flex;align-items:center;gap:8px}.top-right-button{display:flex;align-items:center;justify-content:center;width:50px;height:50px;padding:0;border:var(--kritzel-split-button-border, 1px solid #ebebeb);border-radius:var(--kritzel-split-button-border-radius, 12px);background-color:var(--kritzel-split-button-background-color, #ffffff);cursor:var(--kritzel-global-pointer-cursor, pointer);box-shadow:var(--kritzel-split-button-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));transition:background-color 150ms ease;-webkit-tap-highlight-color:transparent}.top-right-button:hover{background-color:#f5f5f5}.top-right-button:active{background-color:#ebebeb}`;
|
|
1860
|
+
const kritzelEditorCss = () => `kritzel-editor{display:flex;margin:0;position:relative;overflow:hidden;width:100%;height:100%;align-items:center;justify-content:center;touch-action:manipulation;user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}kritzel-controls{position:absolute;bottom:var(--kritzel-editor-controls-bottom, 14px);transition:transform var(--kritzel-editor-controls-transition-duration, 0.1s) var(--kritzel-editor-controls-transition, ease-in-out)}kritzel-controls.keyboard-open{transform:var(--kritzel-editor-controls-transform, translateY(300%))}.top-left-buttons{position:absolute;top:var(--kritzel-editor-top-left-buttons-top, 14px);left:var(--kritzel-editor-top-left-buttons-left, 14px);display:flex;align-items:flex-start;gap:8px;z-index:10000}.top-right-buttons{position:absolute;top:var(--kritzel-editor-top-right-buttons-top, 14px);right:var(--kritzel-editor-top-right-buttons-right, 14px);display:flex;align-items:center;gap:8px;z-index:10000}.top-right-button{display:flex;align-items:center;justify-content:center;width:50px;height:50px;padding:0;border:var(--kritzel-split-button-border, 1px solid #ebebeb);border-radius:var(--kritzel-split-button-border-radius, 12px);background-color:var(--kritzel-split-button-background-color, #ffffff);cursor:var(--kritzel-global-pointer-cursor, pointer);box-shadow:var(--kritzel-split-button-box-shadow, 0 0 3px rgba(0, 0, 0, 0.08));transition:background-color 150ms ease;-webkit-tap-highlight-color:transparent}.top-right-button:hover{background-color:#f5f5f5}.top-right-button:active{background-color:#ebebeb}`;
|
|
1858
1861
|
|
|
1859
1862
|
const KritzelEditor = class {
|
|
1860
1863
|
constructor(hostRef) {
|
|
@@ -2033,10 +2036,19 @@ const KritzelEditor = class {
|
|
|
2033
2036
|
isControlsVisible = true;
|
|
2034
2037
|
isUtilityPanelVisible = true;
|
|
2035
2038
|
syncConfig = {
|
|
2036
|
-
|
|
2039
|
+
appStateId: 'kritzel-app-test',
|
|
2040
|
+
providers: [workspace_migrations.HocuspocusSyncProvider, workspace_migrations.IndexedDBSyncProvider]
|
|
2037
2041
|
};
|
|
2038
2042
|
/** Optional login configuration. When provided, a "Sign in" button is shown that opens a login dialog with the configured providers. */
|
|
2039
|
-
loginConfig
|
|
2043
|
+
loginConfig = {
|
|
2044
|
+
providers: [
|
|
2045
|
+
{
|
|
2046
|
+
label: 'Sign in with Google',
|
|
2047
|
+
icon: 'google',
|
|
2048
|
+
name: 'Google',
|
|
2049
|
+
}
|
|
2050
|
+
]
|
|
2051
|
+
};
|
|
2040
2052
|
/** Optional unique identifier for namespacing storage keys across multiple editor instances. */
|
|
2041
2053
|
editorId;
|
|
2042
2054
|
/** Optional workspace ID to set as active. If provided, the editor will automatically activate the workspace with this ID. */
|
|
@@ -2550,7 +2562,7 @@ const KritzelEditor = class {
|
|
|
2550
2562
|
const isLoggedIn = this.isLoggedIn;
|
|
2551
2563
|
const shouldShowCurrentUser = isLoggedIn;
|
|
2552
2564
|
const shouldShowLoginButton = !!this.loginConfig && !isLoggedIn;
|
|
2553
|
-
return (index.h(index.Host, { key: '
|
|
2565
|
+
return (index.h(index.Host, { key: '6dbc3a8c64dd097ba82e46341b3fb97cbd0194db' }, index.h("div", { key: '26ceb62f59ad830fd651a1712f57e5d711e7c6f4', class: "top-left-buttons" }, index.h("kritzel-workspace-manager", { key: 'afb4f5b87c5dc0a673444fb27930e43994df4e02', workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), index.h("kritzel-back-to-content", { key: 'f3c0f31841cb819917c3277852bc9b5ce291c09a', visible: this.isBackToContentButtonVisible, onBackToContent: () => this.backToContent() })), index.h("kritzel-engine", { key: '8a9e57132e6b74ec812ee516dc7f0d5fc6c8a2e1', ref: el => (this.engineRef = el), workspace: this.activeWorkspace, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, scaleMin: this.scaleMin, viewportBoundaryLeft: this.viewportBoundaryLeft, viewportBoundaryRight: this.viewportBoundaryRight, viewportBoundaryTop: this.viewportBoundaryTop, viewportBoundaryBottom: this.viewportBoundaryBottom, wheelEnabled: this.wheelEnabled, theme: this.currentTheme, debugInfo: this.debugInfo, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onActiveWorkspaceChange: event => this.handleActiveWorkspaceChange(event), onObjectsChange: event => this.handleObjectsChange(event), onObjectsAdded: event => this.handleObjectsAdded(event), onObjectsRemoved: event => this.handleObjectsRemoved(event), onObjectsUpdated: event => this.handleObjectsUpdated(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event), onViewportChange: event => this.handleViewportChange(event), onAwarenessChange: event => this.handleAwarenessChange(event) }), index.h("kritzel-controls", { key: '6caadf512a0208fecdb18b6d68b17daa522161a3', class: { 'keyboard-open': this.isVirtualKeyboardOpen }, style: { display: this.isControlsVisible ? 'flex' : 'none' }, ref: el => (this.controlsRef = el), controls: this.controls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState, theme: this.currentTheme, onIsControlsReady: () => (this.isControlsReady = true) }), index.h("div", { key: 'e27e5f3965be2fd15c83b91470ef87c4031dd7a2', class: "top-right-buttons" }, index.h("kritzel-settings", { key: '57f8e75287402aecbb7740d46dfa15839de2169f', ref: el => (this.settingsRef = el), shortcuts: this.shortcuts, editorId: this.editorId, onSettingsChange: event => this.handleSettingsChange(event) }), index.h("kritzel-export", { key: '5ccf176d4fe1221c5d7597bd1c8537cf3324d3ee', ref: el => (this.exportRef = el), workspaceName: this.activeWorkspace?.name || 'workspace', onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), index.h("kritzel-active-users", { key: '44a334b808706e11163e89b91074ca4ea8ab4b18', users: this.activeUsers }), shouldShowCurrentUser && index.h("kritzel-current-user", { key: 'bcb3c966e630b1a8fc4ccd438fc8fbb11cd2b167', user: this.user }), shouldShowLoginButton && index.h("kritzel-button", { key: 'f1957e56257b7c565311e41b770579f7e2bb910d', onButtonClick: () => this.loginDialogRef?.open() }, "Sign in"), index.h("kritzel-more-menu", { key: 'd8c1d1b51cf87725d68aaf4457b88828986a40dc', items: this.moreMenuItems }), index.h("kritzel-share-dialog", { key: 'f5840e7f56cf6897ec28b0f28d9b204037bf3348', ref: el => (this.shareDialogRef = el), isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (index.h("kritzel-login-dialog", { key: 'cfdcc3d5e7a5e29b0a352f0d4423ae79195dbf69', ref: el => (this.loginDialogRef = el), providers: this.loginConfig.providers, dialogTitle: this.loginConfig.title, subtitle: this.loginConfig.subtitle, onProviderLogin: this.handleProviderLogin })))));
|
|
2554
2566
|
}
|
|
2555
2567
|
static get watchers() { return {
|
|
2556
2568
|
"isEngineReady": [{
|
|
@@ -2599,7 +2611,7 @@ function requireLodash () {
|
|
|
2599
2611
|
var undefined$1;
|
|
2600
2612
|
|
|
2601
2613
|
/** Used as the semantic version number. */
|
|
2602
|
-
var VERSION = '4.
|
|
2614
|
+
var VERSION = '4.18.1';
|
|
2603
2615
|
|
|
2604
2616
|
/** Used as the size to enable large array optimizations. */
|
|
2605
2617
|
var LARGE_ARRAY_SIZE = 200;
|
|
@@ -2607,7 +2619,8 @@ function requireLodash () {
|
|
|
2607
2619
|
/** Error message constants. */
|
|
2608
2620
|
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
|
|
2609
2621
|
FUNC_ERROR_TEXT = 'Expected a function',
|
|
2610
|
-
INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'
|
|
2622
|
+
INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`',
|
|
2623
|
+
INVALID_TEMPL_IMPORTS_ERROR_TEXT = 'Invalid `imports` option passed into `_.template`';
|
|
2611
2624
|
|
|
2612
2625
|
/** Used to stand-in for `undefined` hash values. */
|
|
2613
2626
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
@@ -4339,6 +4352,10 @@ function requireLodash () {
|
|
|
4339
4352
|
* embedded Ruby (ERB) as well as ES2015 template strings. Change the
|
|
4340
4353
|
* following template settings to use alternative delimiters.
|
|
4341
4354
|
*
|
|
4355
|
+
* **Security:** See
|
|
4356
|
+
* [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md)
|
|
4357
|
+
* — `_.template` is insecure and will be removed in v5.
|
|
4358
|
+
*
|
|
4342
4359
|
* @static
|
|
4343
4360
|
* @memberOf _
|
|
4344
4361
|
* @type {Object}
|
|
@@ -4887,7 +4904,7 @@ function requireLodash () {
|
|
|
4887
4904
|
* @name has
|
|
4888
4905
|
* @memberOf SetCache
|
|
4889
4906
|
* @param {*} value The value to search for.
|
|
4890
|
-
* @returns {
|
|
4907
|
+
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
4891
4908
|
*/
|
|
4892
4909
|
function setCacheHas(value) {
|
|
4893
4910
|
return this.__data__.has(value);
|
|
@@ -6958,7 +6975,9 @@ function requireLodash () {
|
|
|
6958
6975
|
function baseUnset(object, path) {
|
|
6959
6976
|
path = castPath(path, object);
|
|
6960
6977
|
|
|
6961
|
-
// Prevent prototype pollution
|
|
6978
|
+
// Prevent prototype pollution:
|
|
6979
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
|
6980
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh
|
|
6962
6981
|
var index = -1,
|
|
6963
6982
|
length = path.length;
|
|
6964
6983
|
|
|
@@ -6966,32 +6985,17 @@ function requireLodash () {
|
|
|
6966
6985
|
return true;
|
|
6967
6986
|
}
|
|
6968
6987
|
|
|
6969
|
-
var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
|
|
6970
|
-
|
|
6971
6988
|
while (++index < length) {
|
|
6972
|
-
var key = path[index];
|
|
6973
|
-
|
|
6974
|
-
// skip non-string keys (e.g., Symbols, numbers)
|
|
6975
|
-
if (typeof key !== 'string') {
|
|
6976
|
-
continue;
|
|
6977
|
-
}
|
|
6989
|
+
var key = toKey(path[index]);
|
|
6978
6990
|
|
|
6979
6991
|
// Always block "__proto__" anywhere in the path if it's not expected
|
|
6980
6992
|
if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
|
|
6981
6993
|
return false;
|
|
6982
6994
|
}
|
|
6983
6995
|
|
|
6984
|
-
// Block
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
typeof path[index + 1] === 'string' &&
|
|
6988
|
-
path[index + 1] === 'prototype') {
|
|
6989
|
-
|
|
6990
|
-
// Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
|
|
6991
|
-
if (isRootPrimitive && index === 0) {
|
|
6992
|
-
continue;
|
|
6993
|
-
}
|
|
6994
|
-
|
|
6996
|
+
// Block constructor/prototype as non-terminal traversal keys to prevent
|
|
6997
|
+
// escaping the object graph into built-in constructors and prototypes.
|
|
6998
|
+
if ((key === 'constructor' || key === 'prototype') && index < length - 1) {
|
|
6995
6999
|
return false;
|
|
6996
7000
|
}
|
|
6997
7001
|
}
|
|
@@ -9548,7 +9552,7 @@ function requireLodash () {
|
|
|
9548
9552
|
|
|
9549
9553
|
/**
|
|
9550
9554
|
* Creates an array with all falsey values removed. The values `false`, `null`,
|
|
9551
|
-
* `0`, `""`, `undefined`, and `NaN` are
|
|
9555
|
+
* `0`, `-0`, `0n`, `""`, `undefined`, and `NaN` are falsy.
|
|
9552
9556
|
*
|
|
9553
9557
|
* @static
|
|
9554
9558
|
* @memberOf _
|
|
@@ -10087,7 +10091,7 @@ function requireLodash () {
|
|
|
10087
10091
|
|
|
10088
10092
|
while (++index < length) {
|
|
10089
10093
|
var pair = pairs[index];
|
|
10090
|
-
result
|
|
10094
|
+
baseAssignValue(result, pair[0], pair[1]);
|
|
10091
10095
|
}
|
|
10092
10096
|
return result;
|
|
10093
10097
|
}
|
|
@@ -16747,6 +16751,8 @@ function requireLodash () {
|
|
|
16747
16751
|
* **Note:** JavaScript follows the IEEE-754 standard for resolving
|
|
16748
16752
|
* floating-point values which can produce unexpected results.
|
|
16749
16753
|
*
|
|
16754
|
+
* **Note:** If `lower` is greater than `upper`, the values are swapped.
|
|
16755
|
+
*
|
|
16750
16756
|
* @static
|
|
16751
16757
|
* @memberOf _
|
|
16752
16758
|
* @since 0.7.0
|
|
@@ -16760,9 +16766,16 @@ function requireLodash () {
|
|
|
16760
16766
|
* _.random(0, 5);
|
|
16761
16767
|
* // => an integer between 0 and 5
|
|
16762
16768
|
*
|
|
16769
|
+
* // when lower is greater than upper the values are swapped
|
|
16770
|
+
* _.random(5, 0);
|
|
16771
|
+
* // => an integer between 0 and 5
|
|
16772
|
+
*
|
|
16763
16773
|
* _.random(5);
|
|
16764
16774
|
* // => also an integer between 0 and 5
|
|
16765
16775
|
*
|
|
16776
|
+
* _.random(-5);
|
|
16777
|
+
* // => an integer between -5 and 0
|
|
16778
|
+
*
|
|
16766
16779
|
* _.random(5, true);
|
|
16767
16780
|
* // => a floating-point number between 0 and 5
|
|
16768
16781
|
*
|
|
@@ -17364,6 +17377,10 @@ function requireLodash () {
|
|
|
17364
17377
|
* properties may be accessed as free variables in the template. If a setting
|
|
17365
17378
|
* object is given, it takes precedence over `_.templateSettings` values.
|
|
17366
17379
|
*
|
|
17380
|
+
* **Security:** `_.template` is insecure and should not be used. It will be
|
|
17381
|
+
* removed in Lodash v5. Avoid untrusted input. See
|
|
17382
|
+
* [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md).
|
|
17383
|
+
*
|
|
17367
17384
|
* **Note:** In the development build `_.template` utilizes
|
|
17368
17385
|
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
|
|
17369
17386
|
* for easier debugging.
|
|
@@ -17471,12 +17488,18 @@ function requireLodash () {
|
|
|
17471
17488
|
options = undefined$1;
|
|
17472
17489
|
}
|
|
17473
17490
|
string = toString(string);
|
|
17474
|
-
options =
|
|
17491
|
+
options = assignWith({}, options, settings, customDefaultsAssignIn);
|
|
17475
17492
|
|
|
17476
|
-
var imports =
|
|
17493
|
+
var imports = assignWith({}, options.imports, settings.imports, customDefaultsAssignIn),
|
|
17477
17494
|
importsKeys = keys(imports),
|
|
17478
17495
|
importsValues = baseValues(imports, importsKeys);
|
|
17479
17496
|
|
|
17497
|
+
arrayEach(importsKeys, function(key) {
|
|
17498
|
+
if (reForbiddenIdentifierChars.test(key)) {
|
|
17499
|
+
throw new Error(INVALID_TEMPL_IMPORTS_ERROR_TEXT);
|
|
17500
|
+
}
|
|
17501
|
+
});
|
|
17502
|
+
|
|
17480
17503
|
var isEscaping,
|
|
17481
17504
|
isEvaluating,
|
|
17482
17505
|
index = 0,
|
|
@@ -20903,6 +20926,7 @@ const DEFAULT_ENGINE_CONFIG = {
|
|
|
20903
20926
|
isDrawing: false,
|
|
20904
20927
|
isErasing: false,
|
|
20905
20928
|
isWriting: false,
|
|
20929
|
+
isWorkspaceLoading: false,
|
|
20906
20930
|
isCtrlKeyPressed: false,
|
|
20907
20931
|
isContextMenuVisible: false,
|
|
20908
20932
|
contextMenuItems: [],
|
|
@@ -25482,7 +25506,7 @@ async function toPng(node, options = {}) {
|
|
|
25482
25506
|
return canvas.toDataURL();
|
|
25483
25507
|
}
|
|
25484
25508
|
|
|
25485
|
-
const kritzelEngineCss = () => `:host{display:block;position:relative;height:100%;width:100%;overflow:hidden;background-color:var(--kritzel-engine-background-color, #ffffff)}:host,:host *{touch-action:none;user-select:none}.ProseMirror{outline:none}p,h1,h2,h3,h4,h5,h6,blockquote,pre{margin:0;padding:0}.debug-panel{position:absolute;pointer-events:none;top:0;right:0}.origin{position:relative;top:0;left:0;height:0;width:0;pointer-events:none;-webkit-transform-origin:top left;-moz-transform-origin:top left;transform-origin:top left;overflow:visible}.object{overflow:visible}.PlaygroundEditorTheme__quote{margin:0;margin-left:20px;margin-bottom:10px;font-size:15px;color:rgb(101, 103, 107);border-left-color:rgb(206, 208, 212);border-left-width:4px;border-left-style:solid;padding-left:16px}`;
|
|
25509
|
+
const kritzelEngineCss = () => `:host{display:block;position:relative;height:100%;width:100%;overflow:hidden;background-color:var(--kritzel-engine-background-color, #ffffff)}:host,:host *{touch-action:none;user-select:none}.ProseMirror{outline:none}p,h1,h2,h3,h4,h5,h6,blockquote,pre{margin:0;padding:0}.workspace-loading-overlay{position:absolute;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background-color:var(--kritzel-loading-overlay-background, rgba(255, 255, 255, 0.6));color:var(--kritzel-loading-overlay-color, #333);font-size:1.25rem;pointer-events:all;animation:workspace-loading-fade-in var(--kritzel-loading-overlay-delay, 300ms) ease-out forwards;opacity:0}@keyframes workspace-loading-fade-in{to{opacity:1}}.debug-panel{position:absolute;pointer-events:none;top:0;right:0}.origin{position:relative;top:0;left:0;height:0;width:0;pointer-events:none;-webkit-transform-origin:top left;-moz-transform-origin:top left;transform-origin:top left;overflow:visible}.object{overflow:visible}.PlaygroundEditorTheme__quote{margin:0;margin-left:20px;margin-bottom:10px;font-size:15px;color:rgb(101, 103, 107);border-left-color:rgb(206, 208, 212);border-left-width:4px;border-left-style:solid;padding-left:16px}`;
|
|
25486
25510
|
|
|
25487
25511
|
const KritzelEngine = class {
|
|
25488
25512
|
get host() { return index.getElement(this); }
|
|
@@ -26794,6 +26818,7 @@ const KritzelEngine = class {
|
|
|
26794
26818
|
await this._workspaceInitializationPromise;
|
|
26795
26819
|
return;
|
|
26796
26820
|
}
|
|
26821
|
+
this.core.store.state.isWorkspaceLoading = true;
|
|
26797
26822
|
const initializationPromise = this.core.initializeWorkspace(workspace, options);
|
|
26798
26823
|
this._workspaceInitializationPromise = initializationPromise;
|
|
26799
26824
|
this._workspaceInitializationTargetKey = targetKey;
|
|
@@ -26805,6 +26830,7 @@ const KritzelEngine = class {
|
|
|
26805
26830
|
this._workspaceInitializationPromise = null;
|
|
26806
26831
|
this._workspaceInitializationTargetKey = null;
|
|
26807
26832
|
}
|
|
26833
|
+
this.core.store.state.isWorkspaceLoading = false;
|
|
26808
26834
|
}
|
|
26809
26835
|
}
|
|
26810
26836
|
emitObjectsChange() {
|
|
@@ -26872,7 +26898,7 @@ const KritzelEngine = class {
|
|
|
26872
26898
|
this.emitObjectsInViewportChange();
|
|
26873
26899
|
}
|
|
26874
26900
|
}
|
|
26875
|
-
return (index.h(index.Host, null, this.core.store.state.debugInfo.showViewportInfo && (index.h("div", { class: "debug-panel" }, index.h("div", null, "ActiveWorkspaceId: ", this.core.store.state?.activeWorkspace?.id), index.h("div", null, "ActiveWorkspaceName: ", this.core.store.state?.activeWorkspace?.name), index.h("div", null, "TranslateX: ", this.core.store.state?.translateX), index.h("div", null, "TranslateY: ", this.core.store.state?.translateY), index.h("div", null, "ViewportWidth: ", this.core.store.state?.viewportWidth), index.h("div", null, "ViewportHeight: ", this.core.store.state?.viewportHeight), index.h("div", null, "PointerCount: ", this.core.store.state.pointers.size), index.h("div", null, "Scale: ", this.core.store.state?.scale), index.h("div", null, "ActiveTool: ", this.core.store.state?.activeTool?.name), index.h("div", null, "HasViewportChanged: ", this.core.store.state?.hasViewportChanged ? 'true' : 'false'), index.h("div", null, "IsEnabled: ", this.core.store.state?.isEnabled ? 'true' : 'false'), index.h("div", null, "IsScaling: ", this.core.store.state?.isScaling ? 'true' : 'false'), index.h("div", null, "IsPanning: ", this.core.store.state?.isPanning ? 'true' : 'false'), index.h("div", null, "IsSelecting: ", this.isSelecting ? 'true' : 'false'), index.h("div", null, "IsSelectionActive: ", this.isSelectionActive ? 'true' : 'false'), index.h("div", null, "IsResizeHandleSelected: ", this.core.store.state.isResizeHandleSelected ? 'true' : 'false'), index.h("div", null, "IsRotationHandleSelected: ", this.core.store.state.isRotationHandleSelected ? 'true' : 'false'), index.h("div", null, "IsRotationHandleHovered: ", this.core.store.state.isRotationHandleHovered ? 'true' : 'false'), index.h("div", null, "IsDrawing: ", this.core.store.state.isDrawing ? 'true' : 'false'), index.h("div", null, "IsWriting: ", this.core.store.state.isWriting ? 'true' : 'false'), index.h("div", null, "IsPointerDown: ", this.core.store.isPointerDown ? 'true' : 'false'), index.h("div", null, "PointerX: ", this.core.store.state?.pointerX), index.h("div", null, "PointerY: ", this.core.store.state?.pointerY), index.h("div", null, "TotalObjects: ", this.core.store.totalObjectCount), index.h("div", null, "ObjectsInViewport: ", this.core.store.objectsInViewport.length), index.h("div", null, "SelectedObjects: ", this.core.store.selectionGroup?.objects.length || 0), index.h("div", null, "ViewportCenter: (", viewportCenterX.toFixed(2), ", ", viewportCenterY.toFixed(2), ")"))), index.h("div", { id: "origin", class: "origin", style: {
|
|
26901
|
+
return (index.h(index.Host, null, this.core.store.state.isWorkspaceLoading && (index.h("div", { class: "workspace-loading-overlay" }, "Loading...")), this.core.store.state.debugInfo.showViewportInfo && (index.h("div", { class: "debug-panel" }, index.h("div", null, "ActiveWorkspaceId: ", this.core.store.state?.activeWorkspace?.id), index.h("div", null, "ActiveWorkspaceName: ", this.core.store.state?.activeWorkspace?.name), index.h("div", null, "TranslateX: ", this.core.store.state?.translateX), index.h("div", null, "TranslateY: ", this.core.store.state?.translateY), index.h("div", null, "ViewportWidth: ", this.core.store.state?.viewportWidth), index.h("div", null, "ViewportHeight: ", this.core.store.state?.viewportHeight), index.h("div", null, "PointerCount: ", this.core.store.state.pointers.size), index.h("div", null, "Scale: ", this.core.store.state?.scale), index.h("div", null, "ActiveTool: ", this.core.store.state?.activeTool?.name), index.h("div", null, "HasViewportChanged: ", this.core.store.state?.hasViewportChanged ? 'true' : 'false'), index.h("div", null, "IsEnabled: ", this.core.store.state?.isEnabled ? 'true' : 'false'), index.h("div", null, "IsScaling: ", this.core.store.state?.isScaling ? 'true' : 'false'), index.h("div", null, "IsPanning: ", this.core.store.state?.isPanning ? 'true' : 'false'), index.h("div", null, "IsSelecting: ", this.isSelecting ? 'true' : 'false'), index.h("div", null, "IsSelectionActive: ", this.isSelectionActive ? 'true' : 'false'), index.h("div", null, "IsResizeHandleSelected: ", this.core.store.state.isResizeHandleSelected ? 'true' : 'false'), index.h("div", null, "IsRotationHandleSelected: ", this.core.store.state.isRotationHandleSelected ? 'true' : 'false'), index.h("div", null, "IsRotationHandleHovered: ", this.core.store.state.isRotationHandleHovered ? 'true' : 'false'), index.h("div", null, "IsDrawing: ", this.core.store.state.isDrawing ? 'true' : 'false'), index.h("div", null, "IsWriting: ", this.core.store.state.isWriting ? 'true' : 'false'), index.h("div", null, "IsPointerDown: ", this.core.store.isPointerDown ? 'true' : 'false'), index.h("div", null, "PointerX: ", this.core.store.state?.pointerX), index.h("div", null, "PointerY: ", this.core.store.state?.pointerY), index.h("div", null, "TotalObjects: ", this.core.store.totalObjectCount), index.h("div", null, "ObjectsInViewport: ", this.core.store.objectsInViewport.length), index.h("div", null, "SelectedObjects: ", this.core.store.selectionGroup?.objects.length || 0), index.h("div", null, "ViewportCenter: (", viewportCenterX.toFixed(2), ", ", viewportCenterY.toFixed(2), ")"))), index.h("div", { id: "origin", class: "origin", style: {
|
|
26876
26902
|
transform: `matrix(${this.core.store.state?.scale}, 0, 0, ${this.core.store.state?.scale}, ${this.core.store.state?.translateX}, ${this.core.store.state?.translateY})`,
|
|
26877
26903
|
} }, visibleObjects?.map(object => {
|
|
26878
26904
|
return (index.h("div", { key: object.id, id: object.id, class: "object", style: {
|
|
@@ -27021,18 +27047,30 @@ const KritzelEngine = class {
|
|
|
27021
27047
|
zIndex: (object.zIndex + 2).toString(),
|
|
27022
27048
|
} }, index.h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "Id: ", object.id), index.h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "userId: ", object.userId), index.h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "width: ", object.width), index.h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "height: ", object.height), index.h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "translateX: ", object.translateX), index.h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "translateY: ", object.translateY), index.h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "rotationDegrees: ", object.rotationDegrees), index.h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "zIndex: ", object.zIndex))), (this.core.displaySelectionGroupUI(object) || this.core.displaySelectionLineUI(object)) &&
|
|
27023
27049
|
(() => {
|
|
27024
|
-
const
|
|
27025
|
-
|
|
27026
|
-
|
|
27027
|
-
|
|
27050
|
+
const isSelectionGroup = workspace_migrations.KritzelClassHelper.isInstanceOf(object, 'KritzelSelectionGroup');
|
|
27051
|
+
const localClientId = this.core.store.state.objects?.localClientId;
|
|
27052
|
+
const awarenessStates = this.core.store.state.objects?.awareness?.getStates();
|
|
27053
|
+
const isRemoteSelection = isSelectionGroup && (
|
|
27054
|
+
// Different user
|
|
27055
|
+
(object.userId != null && this.core.user?.id != null && object.userId !== this.core.user.id) ||
|
|
27056
|
+
// Same user but different client that is still actively connected (e.g. same account on another device)
|
|
27057
|
+
(object.userId != null && this.core.user?.id != null && object.userId === this.core.user.id &&
|
|
27058
|
+
object.clientId != null && localClientId != null && object.clientId !== localClientId &&
|
|
27059
|
+
awarenessStates?.has(object.clientId) === true));
|
|
27028
27060
|
let remoteUserColor;
|
|
27029
27061
|
if (isRemoteSelection) {
|
|
27030
|
-
const awarenessStates = this.core.store.state.objects?.awareness?.getStates();
|
|
27031
27062
|
if (awarenessStates) {
|
|
27032
|
-
|
|
27033
|
-
|
|
27034
|
-
|
|
27035
|
-
|
|
27063
|
+
// Try direct lookup by clientId first (most precise)
|
|
27064
|
+
if (isSelectionGroup && object.clientId != null) {
|
|
27065
|
+
remoteUserColor = awarenessStates.get(object.clientId)?.user?.color;
|
|
27066
|
+
}
|
|
27067
|
+
// Fall back to userId match (for selection groups without clientId)
|
|
27068
|
+
if (!remoteUserColor) {
|
|
27069
|
+
for (const state of awarenessStates.values()) {
|
|
27070
|
+
if (state.user?.id === object.userId) {
|
|
27071
|
+
remoteUserColor = state.user.color;
|
|
27072
|
+
break;
|
|
27073
|
+
}
|
|
27036
27074
|
}
|
|
27037
27075
|
}
|
|
27038
27076
|
}
|
|
@@ -27623,7 +27661,7 @@ const KritzelLineEndings = class {
|
|
|
27623
27661
|
};
|
|
27624
27662
|
KritzelLineEndings.style = kritzelLineEndingsCss();
|
|
27625
27663
|
|
|
27626
|
-
const kritzelLoginDialogCss = () => `:host{display:contents}kritzel-dialog{--kritzel-dialog-width-small:380px}.login-content{display:flex;flex-direction:column;gap:20px}.login-subtitle{font-size:13px;color:var(--kritzel-login-dialog-subtitle-color, #666666);margin:0;line-height:1.5;text-align:center}.login-providers{display:flex;flex-direction:column;gap:10px}.provider-button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 16px;border:1px solid var(--kritzel-login-dialog-button-border-color, #e0e0e0);border-radius:8px;background:var(--kritzel-login-dialog-button-background, #ffffff);color:var(--kritzel-login-dialog-button-text-color, #333333);font-size:14px;font-weight:500;font-family:inherit;cursor:var(--kritzel-global-pointer-cursor, pointer);transition:background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;-webkit-tap-highlight-color:transparent}.provider-button:hover:not(:disabled){background:var(--kritzel-login-dialog-button-hover-background, #f5f5f5);border-color:var(--kritzel-login-dialog-button-hover-border-color, #cccccc)}.provider-button:active:not(:disabled){background:var(--kritzel-login-dialog-button-active-background, #ebebeb)}.provider-button:focus-visible{outline:revert;outline-offset:revert}.provider-button.is-disabled{opacity:0.5;cursor:default;pointer-events:none}.provider-button.is-loading{cursor:default}.provider-label{flex-shrink:0}.provider-button.is-loading .provider-label{opacity:0.7}@keyframes kritzel-login-spin{to{transform:rotate(360deg)}}.spinner{width:20px;height:20px;border:2px solid var(--kritzel-login-dialog-spinner-color, #cccccc);border-top-color:var(--kritzel-login-dialog-spinner-active-color, #333333);border-radius:50%;animation:kritzel-login-spin 0.6s linear infinite}`;
|
|
27664
|
+
const kritzelLoginDialogCss = () => `:host{display:contents}kritzel-dialog{--kritzel-dialog-width-small:380px}.login-content{display:flex;flex-direction:column;gap:20px}.login-subtitle{font-size:13px;color:var(--kritzel-login-dialog-subtitle-color, #666666);margin:0;line-height:1.5;text-align:center}.login-providers{display:flex;flex-direction:column;gap:10px}.provider-button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 16px;border:1px solid var(--kritzel-login-dialog-button-border-color, #e0e0e0);border-radius:8px;background:var(--kritzel-login-dialog-button-background, #ffffff);color:var(--kritzel-login-dialog-button-text-color, #333333);font-size:14px;font-weight:500;font-family:inherit;cursor:var(--kritzel-global-pointer-cursor, pointer);transition:background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;-webkit-tap-highlight-color:transparent}.provider-button:hover:not(:disabled){background:var(--kritzel-login-dialog-button-hover-background, #f5f5f5);border-color:var(--kritzel-login-dialog-button-hover-border-color, #cccccc)}.provider-button:active:not(:disabled){background:var(--kritzel-login-dialog-button-active-background, #ebebeb)}.provider-button:focus-visible{outline:revert;outline-offset:revert}.provider-button.is-disabled{opacity:0.5;cursor:default;pointer-events:none}.provider-button.is-loading{cursor:default}.provider-label{flex-shrink:0}.provider-button.is-loading .provider-label{opacity:0.7}@keyframes kritzel-login-spin{to{transform:rotate(360deg)}}.spinner{width:20px;height:20px;box-sizing:border-box;display:block;flex-shrink:0;border:2px solid var(--kritzel-login-dialog-spinner-color, #cccccc);border-top-color:var(--kritzel-login-dialog-spinner-active-color, #333333);border-radius:50%;animation:kritzel-login-spin 0.6s linear infinite}`;
|
|
27627
27665
|
|
|
27628
27666
|
const KritzelLoginDialog = class {
|
|
27629
27667
|
constructor(hostRef) {
|
|
@@ -28521,7 +28559,7 @@ const KritzelPortal = class {
|
|
|
28521
28559
|
* This file is auto-generated by the version bump scripts.
|
|
28522
28560
|
* Do not modify manually.
|
|
28523
28561
|
*/
|
|
28524
|
-
const KRITZEL_VERSION = '0.1.
|
|
28562
|
+
const KRITZEL_VERSION = '0.1.78';
|
|
28525
28563
|
|
|
28526
28564
|
const kritzelSettingsCss = () => `:host{display:contents}kritzel-dialog{--kritzel-dialog-body-padding:0;--kritzel-dialog-width-large:800px;--kritzel-dialog-height-large:500px}.footer-button{padding:8px 16px;border-radius:6px;cursor:pointer;font-size:14px}.cancel-button{border:1px solid #ebebeb;background:#fff;color:inherit}.cancel-button:hover{background:#f5f5f5}.settings-content{padding:0}.settings-content h3{margin:0 0 16px 0;font-size:18px;font-weight:600;color:var(--kritzel-settings-content-heading-color, #333333)}.settings-content p{margin:0;font-size:14px;color:var(--kritzel-settings-content-text-color, #666666);line-height:1.5}.settings-group{display:flex;flex-direction:column;gap:24px}.settings-item{display:flex;flex-direction:column;gap:8px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.settings-label{font-size:14px;font-weight:600;color:var(--kritzel-settings-label-color, #333333);margin:0 0 4px 0}.settings-description{font-size:12px;color:var(--kritzel-settings-description-color, #888888);margin:0;line-height:1.4}.shortcuts-list{display:flex;flex-direction:column;gap:24px}.shortcuts-category{display:flex;flex-direction:column;gap:8px}.shortcuts-category-title{font-size:14px;font-weight:600;color:var(--kritzel-settings-label-color, #333333);margin:0 0 4px 0}.shortcuts-group{display:flex;flex-direction:column;gap:4px}.shortcut-item{display:flex;justify-content:space-between;align-items:center;padding:6px 8px;border-radius:4px;background:var(--kritzel-settings-shortcut-item-bg, rgba(0, 0, 0, 0.02))}.shortcut-label{font-size:14px;color:var(--kritzel-settings-content-text-color, #666666)}.shortcut-key{font-family:monospace;font-size:12px;padding:2px 8px;border-radius:4px;background:var(--kritzel-settings-shortcut-key-bg, #f0f0f0);color:var(--kritzel-settings-shortcut-key-color, #333333);border:1px solid var(--kritzel-settings-shortcut-key-border, #ddd)}`;
|
|
28527
28565
|
|
|
@@ -29366,7 +29404,7 @@ const KritzelTooltip = class {
|
|
|
29366
29404
|
};
|
|
29367
29405
|
KritzelTooltip.style = kritzelTooltipCss();
|
|
29368
29406
|
|
|
29369
|
-
const kritzelUtilityPanelCss = () => `:host{display:flex;flex-direction:row;align-items:center;padding:4px;gap:8px;border-top-left-radius:12px;border-top-right-radius:12px;background-color:var(--kritzel-utility-panel-background-color, #e2e2e2);width:fit-content;user-select:none}.utility-button{display:flex;justify-content:center;align-items:center;width:28px;height:28px;padding:8px 4px;border:none;background:none;cursor:var(--kritzel-global-pointer-cursor, pointer);color:var(--kritzel-utility-panel-button-color, #333333);--kritzel-icon-color:var(--kritzel-utility-panel-button-color, #333333);-webkit-tap-highlight-color:transparent;border-radius:var(--kritzel-utility-panel-button-border-radius, 8px)}.utility-button:hover,.utility-button:focus-visible{background-color:var(--kritzel-utility-panel-button-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.utility-button:disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.utility-separator{width:1px;height:16px;background-color:var(--kritzel-utility-panel-separator-color, hsl(0, 0%, 0%, 8%))}`;
|
|
29407
|
+
const kritzelUtilityPanelCss = () => `:host{display:flex;flex-direction:row;align-items:center;padding:4px;gap:8px;border-top-left-radius:12px;border-top-right-radius:12px;background-color:var(--kritzel-utility-panel-background-color, #e2e2e2);width:fit-content;user-select:none;z-index:10000}.utility-button{display:flex;justify-content:center;align-items:center;width:28px;height:28px;padding:8px 4px;border:none;background:none;cursor:var(--kritzel-global-pointer-cursor, pointer);color:var(--kritzel-utility-panel-button-color, #333333);--kritzel-icon-color:var(--kritzel-utility-panel-button-color, #333333);-webkit-tap-highlight-color:transparent;border-radius:var(--kritzel-utility-panel-button-border-radius, 8px)}.utility-button:hover,.utility-button:focus-visible{background-color:var(--kritzel-utility-panel-button-hover-background-color, hsl(0, 0%, 0%, 4.3%))}.utility-button:disabled{opacity:0.4;cursor:not-allowed;pointer-events:none}.utility-separator{width:1px;height:16px;background-color:var(--kritzel-utility-panel-separator-color, hsl(0, 0%, 0%, 8%))}`;
|
|
29370
29408
|
|
|
29371
29409
|
const KritzelUtilityPanel = class {
|
|
29372
29410
|
constructor(hostRef) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BRZ6e6oa.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
|
|
package/dist/cjs/loader.cjs.js
CHANGED
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-BRZ6e6oa.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.43.
|
|
8
|
+
Stencil Client Patch Browser v4.43.3 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
var patchBrowser = () => {
|