kritzel-stencil 0.2.2 → 0.2.3
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.cjs.js +1 -1
- package/dist/cjs/kritzel-active-users_42.cjs.entry.js +30 -25
- package/dist/cjs/{workspace.migrations-BPwtowiJ.js → workspace.migrations-CYeB_XRB.js} +8 -0
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +5 -5
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +7 -0
- package/dist/collection/components/shared/kritzel-dialog/kritzel-dialog.css +3 -2
- package/dist/collection/components/shared/kritzel-dialog/kritzel-dialog.js +3 -2
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +7 -10
- 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.js +1 -1
- package/dist/collection/components/ui/kritzel-export/kritzel-export.js +1 -1
- 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.js +1 -1
- package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +1 -1
- package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
- package/dist/collection/constants/version.js +1 -1
- package/dist/collection/themes/dark-theme.js +4 -0
- package/dist/collection/themes/light-theme.js +4 -0
- package/dist/components/index.js +1 -1
- package/dist/components/kritzel-awareness-cursors.js +1 -1
- package/dist/components/kritzel-color-palette.js +1 -1
- package/dist/components/kritzel-color.js +1 -1
- package/dist/components/kritzel-controls.js +1 -1
- package/dist/components/kritzel-current-user-dialog.js +1 -1
- package/dist/components/kritzel-current-user.js +1 -1
- package/dist/components/kritzel-dialog.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-login-dialog.js +1 -1
- package/dist/components/kritzel-more-menu.js +1 -1
- package/dist/components/kritzel-settings.js +1 -1
- package/dist/components/kritzel-share-dialog.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-utility-panel.js +1 -1
- package/dist/components/p-0F9_lw6l.js +1 -0
- package/dist/components/{p-mYhFNPgz.js → p-BAjrJjMX.js} +1 -1
- package/dist/components/{p-R9M5PnAz.js → p-BDOSy6zd.js} +1 -1
- package/dist/components/{p-574MVXxi.js → p-Be6E_RMf.js} +1 -1
- package/dist/components/p-BeeKeeeo.js +1 -0
- package/dist/components/{p-CoyqJSjT.js → p-BmYsz1bP.js} +1 -1
- package/dist/components/{p-DFeyobdy.js → p-Bs7lEBy5.js} +2 -2
- package/dist/components/p-C-qyWv4d.js +1 -0
- package/dist/components/{p-BYOIzv_f.js → p-C1Fv9rVN.js} +1 -1
- package/dist/components/{p-C6Td7I4k.js → p-C1UNiqO2.js} +1 -1
- package/dist/components/{p-Bfa-Amjn.js → p-C2MdRsg6.js} +1 -1
- package/dist/components/{p-DE2xDwUM.js → p-CdaOQi45.js} +1 -1
- package/dist/components/{p-u-827ZX7.js → p-CsMMZSAP.js} +1 -1
- package/dist/components/{p-Dxb22STM.js → p-DYHF_MSN.js} +1 -1
- package/dist/components/{p-BWrxz4mM.js → p-Dg_nGsFe.js} +1 -1
- package/dist/components/{p-BtJB7FsW.js → p-DoDI-v-H.js} +1 -1
- package/dist/components/p-R60vdaIY.js +1 -0
- package/dist/components/{p-CU6kJPth.js → p-ZpItdhxS.js} +1 -1
- package/dist/components/{p-DfB7uJ0N.js → p-yX5Zk5pS.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/kritzel-active-users_42.entry.js +30 -25
- package/dist/esm/{workspace.migrations-C_uxbvuH.js → workspace.migrations-BrA5xRPn.js} +8 -0
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/p-56b81681.entry.js +9 -0
- package/dist/stencil/p-BrA5xRPn.js +1 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/interfaces/theme.interface.d.ts +5 -5
- package/package.json +1 -1
- package/dist/components/p-BCzbwL4m.js +0 -1
- package/dist/components/p-BfJav4Zz.js +0 -1
- package/dist/components/p-BmcAX-1k.js +0 -1
- package/dist/components/p-CqYIRmoh.js +0 -1
- package/dist/stencil/p-4d28c496.entry.js +0 -9
- package/dist/stencil/p-C_uxbvuH.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-CFnj_FXt.js');
|
|
4
|
-
var workspace_migrations = require('./workspace.migrations-
|
|
4
|
+
var workspace_migrations = require('./workspace.migrations-CYeB_XRB.js');
|
|
5
5
|
var Y = require('yjs');
|
|
6
6
|
require('y-indexeddb');
|
|
7
7
|
require('y-websocket');
|
|
@@ -957,10 +957,7 @@ const KritzelControls = class {
|
|
|
957
957
|
}
|
|
958
958
|
handleDisplayValuesChange = (event) => {
|
|
959
959
|
const newVal = event.detail;
|
|
960
|
-
if (this.displayValues &&
|
|
961
|
-
this.displayValues.color === newVal.color &&
|
|
962
|
-
this.displayValues.size === newVal.size &&
|
|
963
|
-
this.displayValues.fontFamily === newVal.fontFamily) {
|
|
960
|
+
if (this.displayValues && this.displayValues.color === newVal.color && this.displayValues.size === newVal.size && this.displayValues.fontFamily === newVal.fontFamily) {
|
|
964
961
|
return;
|
|
965
962
|
}
|
|
966
963
|
this.displayValues = newVal;
|
|
@@ -1092,13 +1089,13 @@ const KritzelControls = class {
|
|
|
1092
1089
|
// Separate tool controls from config control
|
|
1093
1090
|
const toolControls = this.controls.filter(c => c.type === 'tool' || c.type === 'separator');
|
|
1094
1091
|
const configControl = this.controls.find(c => c.type === 'config' && c.name === this.firstConfig?.name);
|
|
1095
|
-
return (index.h(index.Host, { key: '
|
|
1092
|
+
return (index.h(index.Host, { key: '93d08a3268edb67fc4cccb291b6e0aff6cf5a4bd', class: {
|
|
1096
1093
|
mobile: this.isTouchDevice,
|
|
1097
|
-
} }, this.isUtilityPanelVisible && (index.h("kritzel-utility-panel", { key: '
|
|
1094
|
+
} }, this.isUtilityPanelVisible && (index.h("kritzel-utility-panel", { key: '8862ea7e524b3e23d87ffea2929e04df7231bb0c', style: {
|
|
1098
1095
|
position: 'absolute',
|
|
1099
1096
|
bottom: '56px',
|
|
1100
1097
|
left: '12px',
|
|
1101
|
-
}, undoState: this.undoState, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), index.h("div", { key: '
|
|
1098
|
+
}, undoState: this.undoState, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), index.h("div", { key: '2ea2a41ba4cda77f5abde9231d293da181a2a568', class: "kritzel-controls" }, index.h("div", { key: '6bd4f6d930a0a51d5549b6dbae1e7be14cbe7822', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), index.h("div", { key: 'c712ca502a4ebd244394158b39391a49839bc386', class: "kritzel-tools-scroll", ref: el => (this.toolsScrollRef = el), onScroll: this.handleToolsScroll }, toolControls.map(control => {
|
|
1102
1099
|
// Check if this control has sub-options (split-button)
|
|
1103
1100
|
if (control.subOptions?.length) {
|
|
1104
1101
|
const selectedSubOption = this.getSelectedSubOption(control);
|
|
@@ -1128,10 +1125,10 @@ const KritzelControls = class {
|
|
|
1128
1125
|
'kritzel-control': true,
|
|
1129
1126
|
'selected': this.activeControl?.name === control?.name,
|
|
1130
1127
|
}, key: control.name, "data-testid": `tool-${control.name}`, onClick: _event => this.handleControlClick?.(control) }, index.h("kritzel-icon", { name: control.icon })));
|
|
1131
|
-
})), index.h("div", { key: '
|
|
1128
|
+
})), index.h("div", { key: '6ca260915b2880443a324855a1de96d10affd256', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (index.h("div", { class: {
|
|
1132
1129
|
'kritzel-config-container': true,
|
|
1133
1130
|
'visible': hasConfigUI,
|
|
1134
|
-
}, key: configControl.name }, index.h("div", { key: '
|
|
1131
|
+
}, key: configControl.name }, index.h("div", { key: '984d30bd7f508d2fc56a9e81692fdf05dfb852c9', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), index.h("kritzel-tooltip", { key: '90c59995d229c606b9bf3b625f6eefc0632371c6', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, index.h("kritzel-tool-config", { key: 'cdb56f983e1f6840b11d06d166f982a93c07331b', tool: this.activeControl.tool, theme: this.theme, onToolChange: event => this.handleToolChange?.(event), onDisplayValuesChange: this.handleDisplayValuesChange, style: { width: '100%', height: '100%' } })), index.h("div", { key: 'c79db07dd02995d3ee105e8d7a773f89cd7072a5', tabIndex: hasConfigUI ? 0 : -1, class: "kritzel-config", "data-testid": "tool-config", ref: el => {
|
|
1135
1132
|
if (el)
|
|
1136
1133
|
this.configTriggerRef = el;
|
|
1137
1134
|
}, onKeyDown: event => {
|
|
@@ -1140,7 +1137,7 @@ const KritzelControls = class {
|
|
|
1140
1137
|
}
|
|
1141
1138
|
}, style: {
|
|
1142
1139
|
cursor: 'pointer',
|
|
1143
|
-
} }, this.
|
|
1140
|
+
} }, this.displayValues && (index.h("div", { key: '0573a22c3105076729eb986c98b7e8644392f767', class: "color-container" }, index.h("kritzel-color", { key: '1e9711c219a5c520873b3206072957f2d406c56c', value: this.displayValues.color, theme: this.theme, size: 18, style: {
|
|
1144
1141
|
borderRadius: '50%',
|
|
1145
1142
|
border: 'none',
|
|
1146
1143
|
} })))))))));
|
|
@@ -1175,7 +1172,7 @@ const KritzelCurrentUser = class {
|
|
|
1175
1172
|
this.dialogRef?.open();
|
|
1176
1173
|
};
|
|
1177
1174
|
render() {
|
|
1178
|
-
return (index.h(index.Host, { key: '
|
|
1175
|
+
return (index.h(index.Host, { key: 'c392caf731f8352fd8e2a95918fe48a2f00dd9e5' }, index.h("kritzel-avatar", { key: 'b3bdce0efa0c0610aa028303386c643d53bc8300', user: this.user, size: this.avatarSize, onClick: this.handleAvatarClick }), index.h("kritzel-current-user-dialog", { key: '5e7af1aea468028e091ad8f461e4352cb9f9636b', ref: el => (this.dialogRef = el), user: this.user })));
|
|
1179
1176
|
}
|
|
1180
1177
|
};
|
|
1181
1178
|
KritzelCurrentUser.style = kritzelCurrentUserCss();
|
|
@@ -1207,7 +1204,7 @@ const KritzelCurrentUserDialog = class {
|
|
|
1207
1204
|
}
|
|
1208
1205
|
render() {
|
|
1209
1206
|
const displayName = this.getDisplayName();
|
|
1210
|
-
return (index.h(index.Host, { key: '
|
|
1207
|
+
return (index.h(index.Host, { key: 'e1dd44cdfdbaebfe886fed0d9feba2ef232b6615' }, index.h("kritzel-dialog", { key: '49dd037cca0741cc949f20d9d44cfd028492dc60', dialogTitle: "Account", isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small" }, index.h("div", { key: 'ddcdfb82cc0c896025559888d475ab5c9ad59b4c', class: "user-info" }, index.h("kritzel-avatar", { key: '4d164b784cde6787d26ac164c7450c0352e6a7cb', user: this.user, size: 80 }), displayName && index.h("div", { key: '13ad719d8bd90cd608c78438fccbb38ed1d5e5ba', class: "user-name" }, displayName), this.user?.email && index.h("div", { key: 'df360afd434293d9c9d5fcf114713e0a6925a78e', class: "user-email" }, this.user.email)))));
|
|
1211
1208
|
}
|
|
1212
1209
|
};
|
|
1213
1210
|
KritzelCurrentUserDialog.style = kritzelCurrentUserDialogCss();
|
|
@@ -1368,7 +1365,7 @@ class KritzelHTMLHelper {
|
|
|
1368
1365
|
}
|
|
1369
1366
|
}
|
|
1370
1367
|
|
|
1371
|
-
const kritzelDialogCss = () => `:host{display:contents}.backdrop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:10002;display:flex;align-items:center;justify-content:center;background-color:var(--kritzel-dialog-backdrop-color, rgba(0, 0, 0, 0.5));opacity:1;transition:opacity 150ms ease-out}.backdrop.is-animating{opacity:0}.dialog-content{position:relative;display:flex;flex-direction:column;background-color:var(--kritzel-dialog-background-color, #ffffff);border-radius:var(--kritzel-dialog-border-radius, 12px);box-shadow:var(--kritzel-dialog-box-shadow, 0 4px 20px rgba(0, 0, 0, 0.15));border:var(--kritzel-dialog-border, 1px solid #ebebeb);max-height:var(--kritzel-dialog-max-height, 90vh);max-width:var(--kritzel-dialog-max-width, 90vw);overflow:hidden;transform:scale(1);opacity:1;transition:transform 200ms ease-out, opacity 200ms ease-out;font-family:var(--kritzel-dialog-font-family, sans-serif)}.dialog-content.is-animating{transform:scale(0.95);opacity:0}.dialog-content.size-small{width:var(--kritzel-dialog-width-small, 320px);height:var(--kritzel-dialog-height-small, auto)}.dialog-content.size-medium{width:var(--kritzel-dialog-width-medium, 480px);height:var(--kritzel-dialog-height-medium, auto)}.dialog-content.size-large{width:var(--kritzel-dialog-width-large, 640px);height:var(--kritzel-dialog-height-large, auto)}.dialog-content.size-fullscreen{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100vh;max-height:100dvh;border-radius:0}@media (max-width: 576px){.backdrop:has(.fullscreen-on-mobile){background-color:transparent}.dialog-content.fullscreen-on-mobile{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100vh;max-height:100dvh;border-radius:0}.dialog-content.fullscreen-on-mobile .dialog-body{display:flex;flex-direction:column}.dialog-content.fullscreen-on-mobile .dialog-body ::slotted(*){flex:1;min-height:0}}.dialog-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kritzel-dialog-header-padding, 16px 20px);border-bottom:var(--kritzel-dialog-header-border, 1px solid #ebebeb);gap:12px}.dialog-title{margin:0;font-size:var(--kritzel-dialog-title-font-size, 18px);font-weight:var(--kritzel-dialog-title-font-weight, 600);color:var(--kritzel-dialog-title-color, #1a1a1a);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.close-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:var(--kritzel-dialog-close-button-border-radius, 6px);background-color:var(--kritzel-dialog-close-button-background, transparent);color:var(--kritzel-dialog-close-button-color, #666666);cursor:var(--kritzel-global-pointer-cursor, pointer);transition:background-color 150ms ease, color 150ms ease;flex-shrink:0;-webkit-tap-highlight-color:transparent}.close-button:hover{background-color:var(--kritzel-dialog-close-button-hover-background, #f5f5f5);color:var(--kritzel-dialog-close-button-hover-color, #1a1a1a)}.close-button:active{background-color:var(--kritzel-dialog-close-button-active-background, #ebebeb)}.close-button:focus-visible{outline:revert;outline-offset:revert}.dialog-body{padding:var(--kritzel-dialog-body-padding, 20px);overflow-y:auto;flex:1;min-height:0;scrollbar-color:var(--kritzel-global-scrollbar-thumb-color, #ebebeb) transparent;scrollbar-width:thin}.dialog-footer{display:flex;align-items:center;justify-content:flex-end;gap:var(--kritzel-dialog-footer-gap, 8px);padding:var(--kritzel-dialog-footer-padding, 16px 20px);border-top:var(--kritzel-dialog-footer-border, 1px solid #ebebeb)}::slotted([slot='header']){flex:1}::slotted([slot='footer']){display:contents}`;
|
|
1368
|
+
const kritzelDialogCss = () => `:host{display:contents}.backdrop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:10002;display:flex;align-items:center;justify-content:center;background-color:var(--kritzel-dialog-backdrop-color, rgba(0, 0, 0, 0.5));opacity:1;transition:opacity 150ms ease-out}.backdrop.is-animating{opacity:0}.dialog-content{position:relative;display:flex;flex-direction:column;background-color:var(--kritzel-dialog-background-color, #ffffff);border-radius:var(--kritzel-dialog-border-radius, 12px);box-shadow:var(--kritzel-dialog-box-shadow, 0 4px 20px rgba(0, 0, 0, 0.15));border:var(--kritzel-dialog-border, 1px solid #ebebeb);max-height:var(--kritzel-dialog-max-height, 90vh);max-width:var(--kritzel-dialog-max-width, 90vw);overflow:hidden;transform:scale(1);opacity:1;transition:transform 200ms ease-out, opacity 200ms ease-out;font-family:var(--kritzel-dialog-font-family, sans-serif)}.dialog-content.is-animating{transform:scale(0.95);opacity:0}.dialog-content.size-small{width:var(--kritzel-dialog-width-small, 320px);height:var(--kritzel-dialog-height-small, auto)}.dialog-content.size-medium{width:var(--kritzel-dialog-width-medium, 480px);height:var(--kritzel-dialog-height-medium, auto)}.dialog-content.size-large{width:var(--kritzel-dialog-width-large, 640px);height:var(--kritzel-dialog-height-large, auto)}.dialog-content.size-fullscreen{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100vh;max-height:100dvh;border-radius:0}@media (max-width: 576px), (max-height: 576px) and (orientation: landscape){.backdrop:has(.fullscreen-on-mobile){background-color:transparent}.dialog-content.fullscreen-on-mobile{width:100vw;height:100vh;height:100dvh;max-width:100vw;max-height:100vh;max-height:100dvh;border-radius:0}.dialog-content.fullscreen-on-mobile .dialog-body{display:flex;flex-direction:column}.dialog-content.fullscreen-on-mobile .dialog-body ::slotted(*){flex:1;min-height:0}}.dialog-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kritzel-dialog-header-padding, 16px 20px);border-bottom:var(--kritzel-dialog-header-border, 1px solid #ebebeb);gap:12px}.dialog-title{margin:0;font-size:var(--kritzel-dialog-title-font-size, 18px);font-weight:var(--kritzel-dialog-title-font-weight, 600);color:var(--kritzel-dialog-title-color, #1a1a1a);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.close-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:var(--kritzel-dialog-close-button-border-radius, 6px);background-color:var(--kritzel-dialog-close-button-background, transparent);color:var(--kritzel-dialog-close-button-color, #666666);cursor:var(--kritzel-global-pointer-cursor, pointer);transition:background-color 150ms ease, color 150ms ease;flex-shrink:0;-webkit-tap-highlight-color:transparent}.close-button:hover{background-color:var(--kritzel-dialog-close-button-hover-background, #f5f5f5);color:var(--kritzel-dialog-close-button-hover-color, #1a1a1a)}.close-button:active{background-color:var(--kritzel-dialog-close-button-active-background, #ebebeb)}.close-button:focus-visible{outline:revert;outline-offset:revert}.dialog-body{padding:var(--kritzel-dialog-body-padding, 20px);overflow-y:auto;flex:1;min-height:0;scrollbar-color:var(--kritzel-global-scrollbar-thumb-color, #ebebeb) transparent;scrollbar-width:thin}.dialog-footer{display:flex;align-items:center;justify-content:flex-end;gap:var(--kritzel-dialog-footer-gap, 8px);padding:var(--kritzel-dialog-footer-padding, 16px 20px);border-top:var(--kritzel-dialog-footer-border, 1px solid #ebebeb)}::slotted([slot='header']){flex:1}::slotted([slot='footer']){display:contents}`;
|
|
1372
1369
|
|
|
1373
1370
|
const KritzelDialog = class {
|
|
1374
1371
|
constructor(hostRef) {
|
|
@@ -1470,8 +1467,9 @@ const KritzelDialog = class {
|
|
|
1470
1467
|
document.body.style.overflow = 'hidden';
|
|
1471
1468
|
}
|
|
1472
1469
|
lockMobileViewportHeight() {
|
|
1473
|
-
// Only lock height on mobile when fullscreenOnMobile is enabled
|
|
1474
|
-
|
|
1470
|
+
// Only lock height on mobile when fullscreenOnMobile is enabled.
|
|
1471
|
+
// Use the smaller dimension so landscape phones (wide but short) are also detected.
|
|
1472
|
+
if (!this.fullscreenOnMobile || Math.min(window.innerWidth, window.innerHeight) > 576) {
|
|
1475
1473
|
this.mobileLockedHeight = null;
|
|
1476
1474
|
return;
|
|
1477
1475
|
}
|
|
@@ -25778,7 +25776,7 @@ async function toPng(node, options = {}) {
|
|
|
25778
25776
|
return canvas.toDataURL();
|
|
25779
25777
|
}
|
|
25780
25778
|
|
|
25781
|
-
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;gap:10px;background-color:var(--kritzel-loading-overlay-background, rgba(255, 255, 255, 0.6));color:var(--kritzel-loading-overlay-color, #333);font-family:var(--kritzel-font-family, sans-serif);font-size:1.25rem;pointer-events:all;animation:workspace-loading-fade-in 200ms ease-out var(--kritzel-loading-overlay-delay, 300ms) forwards;opacity:0}.workspace-loading-spinner{width:20px;height:20px;box-sizing:border-box;display:block;flex-shrink:0;border:2px solid var(--kritzel-loading-overlay-spinner-color, #cccccc);border-top-color:var(--kritzel-loading-overlay-spinner-active-color, #333333);border-radius:50%;animation:workspace-loading-spin 0.6s linear infinite}@keyframes workspace-loading-spin{to{transform:rotate(360deg)}}@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}`;
|
|
25779
|
+
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;gap:10px;background-color:var(--kritzel-engine-loading-overlay-background, rgba(255, 255, 255, 0.6));color:var(--kritzel-engine-loading-overlay-color, #333);font-family:var(--kritzel-font-family, sans-serif);font-size:1.25rem;pointer-events:all;animation:workspace-loading-fade-in 200ms ease-out var(--kritzel-engine-loading-overlay-delay, 300ms) forwards;opacity:0}.workspace-loading-spinner{width:20px;height:20px;box-sizing:border-box;display:block;flex-shrink:0;border:2px solid var(--kritzel-engine-loading-overlay-spinner-color, #cccccc);border-top-color:var(--kritzel-engine-loading-overlay-spinner-active-color, #333333);border-radius:50%;animation:workspace-loading-spin 0.6s linear infinite}@keyframes workspace-loading-spin{to{transform:rotate(360deg)}}@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}`;
|
|
25782
25780
|
|
|
25783
25781
|
const KritzelEngine = class {
|
|
25784
25782
|
get host() { return index.getElement(this); }
|
|
@@ -26009,6 +26007,7 @@ const KritzelEngine = class {
|
|
|
26009
26007
|
if (this.core.store.isDisabled) {
|
|
26010
26008
|
return;
|
|
26011
26009
|
}
|
|
26010
|
+
const wasTracked = this.core.store.state.pointers.has(ev.pointerId);
|
|
26012
26011
|
this.core.store.state.pointers.delete(ev.pointerId);
|
|
26013
26012
|
if (this.host.hasPointerCapture(ev.pointerId)) {
|
|
26014
26013
|
this.host.releasePointerCapture(ev.pointerId);
|
|
@@ -26017,6 +26016,12 @@ const KritzelEngine = class {
|
|
|
26017
26016
|
if (this.core.store.state.pointers.size === 0) {
|
|
26018
26017
|
this.core.cursorManager.resetToDefault();
|
|
26019
26018
|
}
|
|
26019
|
+
// If the corresponding pointerdown was never processed (e.g. consumed by a capture-phase
|
|
26020
|
+
// listener like a tooltip close handler), skip tool logic to avoid spurious interactions
|
|
26021
|
+
// such as a selected text object entering edit mode when clicking to dismiss a popup.
|
|
26022
|
+
if (!wasTracked) {
|
|
26023
|
+
return;
|
|
26024
|
+
}
|
|
26020
26025
|
this.viewport.handlePointerUp(ev);
|
|
26021
26026
|
this.core.store.state?.activeTool?.handlePointerUp(ev);
|
|
26022
26027
|
}
|
|
@@ -27868,7 +27873,7 @@ const KritzelExport = class {
|
|
|
27868
27873
|
return (index.h("div", { class: "export-tab-content" }, index.h("kritzel-input", { label: "Filename", value: this.exportFilename, placeholder: "Enter filename", suffix: ".json", onValueChange: this.handleFilenameChange })));
|
|
27869
27874
|
}
|
|
27870
27875
|
render() {
|
|
27871
|
-
return (index.h(index.Host, { key: '
|
|
27876
|
+
return (index.h(index.Host, { key: '5178e66f75b94697c771e2dc6fe7ce317e21cd1a' }, index.h("kritzel-dialog", { key: '01aae6955be6828945b20e8a8a4d7c49eb92b2e2', isOpen: this.isDialogOpen, dialogTitle: "Export", closable: true, onDialogClose: this.closeDialog }, index.h("div", { key: '57c6f6de2917fb51201d737c4d0e1877f5671466', class: "export-content" }, index.h("kritzel-pill-tabs", { key: '800b8c058078ba1bba06b5edbaf370c4fa3c6806', tabs: this.tabs, value: this.activeTab, onValueChange: this.handleTabChange }), this.activeTab === 'viewport' && this.renderViewportExport(), this.activeTab === 'workspace' && this.renderWorkspaceExport(), index.h("button", { key: '99fb3b3d8dc42fdb47a3110e8403dde4e508e6cd', class: "export-primary-button", onClick: this.handleExport }, "Export")))));
|
|
27872
27877
|
}
|
|
27873
27878
|
};
|
|
27874
27879
|
KritzelExport.style = kritzelExportCss();
|
|
@@ -28165,7 +28170,7 @@ const KritzelLoginDialog = class {
|
|
|
28165
28170
|
this.dialogClosed.emit();
|
|
28166
28171
|
};
|
|
28167
28172
|
render() {
|
|
28168
|
-
return (index.h(index.Host, { key: '
|
|
28173
|
+
return (index.h(index.Host, { key: '1a664868b840030a773f61c2a0f4388dfb014675' }, index.h("kritzel-dialog", { key: '09ece6fb5949fc8b204f29cd931c583e525590e1', dialogTitle: this.dialogTitle, isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small" }, index.h("div", { key: '57218d7762734929691b82700c31922f5a4991c8', class: "login-content" }, this.subtitle && (index.h("p", { key: '9ee071786f393857cd6a666e395526a139359d60', class: "login-subtitle" }, this.subtitle)), index.h("div", { key: 'a487687345aabcfb55976437ddc85feb464f0cae', class: "login-providers" }, this.providers.map(provider => (index.h("button", { key: provider.name, class: {
|
|
28169
28174
|
'provider-button': true,
|
|
28170
28175
|
'is-loading': this.loadingProvider === provider.name,
|
|
28171
28176
|
'is-disabled': this.loadingProvider !== null && this.loadingProvider !== provider.name,
|
|
@@ -28533,7 +28538,7 @@ const KritzelMoreMenu = class {
|
|
|
28533
28538
|
this.closeMenu();
|
|
28534
28539
|
};
|
|
28535
28540
|
render() {
|
|
28536
|
-
return (index.h(index.Host, { key: '
|
|
28541
|
+
return (index.h(index.Host, { key: '0e12ffc8c72566ec92080e6a19bd1d929795bef9', class: { mobile: this.isTouchDevice } }, index.h("div", { key: 'cc73b51c5aa39522a7ab7ec23d5c0a2732ed7acc', class: { 'more-menu-wrapper': true, visible: this.visible } }, index.h("button", { key: 'c35b8c7aa56e5e0e2773fed9fbbbead0b6b01a71', class: "more-menu-button", onClick: this.toggleMenu }, index.h("kritzel-icon", { key: '8b3261da5a10371a17b2562b71fde48dd0ba8ccd', name: this.icon, size: this.iconSize })), index.h("kritzel-portal", { key: 'be4a42061f27bbca3d435dec8e4dd25fc78febb0', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, index.h("kritzel-menu", { key: '763043f4d02819097396ce1baa85f398695e38b5', items: this.visibleItems, onItemSelect: this.handleMenuItemSelect })))));
|
|
28537
28542
|
}
|
|
28538
28543
|
};
|
|
28539
28544
|
KritzelMoreMenu.style = kritzelMoreMenuCss();
|
|
@@ -29036,7 +29041,7 @@ const KritzelPortal = class {
|
|
|
29036
29041
|
* This file is auto-generated by the version bump scripts.
|
|
29037
29042
|
* Do not modify manually.
|
|
29038
29043
|
*/
|
|
29039
|
-
const KRITZEL_VERSION = '0.2.
|
|
29044
|
+
const KRITZEL_VERSION = '0.2.3';
|
|
29040
29045
|
|
|
29041
29046
|
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)}`;
|
|
29042
29047
|
|
|
@@ -29231,7 +29236,7 @@ const KritzelSettings = class {
|
|
|
29231
29236
|
}
|
|
29232
29237
|
}
|
|
29233
29238
|
render() {
|
|
29234
|
-
return (index.h(index.Host, { key: '
|
|
29239
|
+
return (index.h(index.Host, { key: '78a4eb80f2a4d9e7ef67d06bb39137dbde3a3301' }, index.h("kritzel-dialog", { key: '1adf437125186758f75dc085db9a4e0c572fccd9', isOpen: this.isDialogOpen, dialogTitle: "Settings", size: "large", onDialogClose: this.closeDialog }, index.h("kritzel-master-detail", { key: '68ed27f5c9c03589d0444c02ff0524dfcaa053a3', items: SETTINGS_CATEGORIES, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
|
|
29235
29240
|
}
|
|
29236
29241
|
};
|
|
29237
29242
|
KritzelSettings.style = kritzelSettingsCss();
|
|
@@ -29357,9 +29362,9 @@ const KritzelShareDialog = class {
|
|
|
29357
29362
|
this.dialogClosed.emit();
|
|
29358
29363
|
};
|
|
29359
29364
|
render() {
|
|
29360
|
-
return (index.h(index.Host, { key: '
|
|
29365
|
+
return (index.h(index.Host, { key: 'bd58f146337b3eca96ca34408a3d30621f01765a' }, index.h("kritzel-dialog", { key: 'c152f4ec5739a18b265f9a8b161ec8501c1a053b', dialogTitle: "Share Workspace", isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small" }, index.h("div", { key: '2810061b1c99e4f4644342453de693e1cddf9a27', class: "share-content" }, index.h("div", { key: 'bc56de53fd6136c6867018af24019383094cab0d', class: "share-section" }, index.h("div", { key: '43464ffd61e5a19653cc081e823f01c0eb17e454', class: "share-row" }, index.h("div", { key: 'ed83ea6684695d09dc6af82b3367fbbff6e4c7e2', class: "share-label-group" }, index.h("label", { key: 'fe2eaf501dd80ad0b8d83f93a2dcdd18bc093d3b', class: "share-label" }, "Link sharing"), index.h("p", { key: '738f1a6afc0421380164b9d270920631cefdfd78', class: "share-description" }, this.internalIsPublic
|
|
29361
29366
|
? 'Anyone with the link can access this workspace.'
|
|
29362
|
-
: 'Link sharing is disabled. Only you can access this workspace.')), index.h("kritzel-slide-toggle", { key: '
|
|
29367
|
+
: 'Link sharing is disabled. Only you can access this workspace.')), index.h("kritzel-slide-toggle", { key: '60f0200ea8f9c207cd5ee76f5a86f82707bb724b', checked: this.internalIsPublic, onCheckedChange: this.handleToggleChange, label: "Enable link sharing" }))), this.internalIsPublic && (index.h("div", { key: '83212a2a996b85996eee119d5535203f77d3c8dd', class: "share-section" }, index.h("div", { key: '297031b5aef2018f7aa33c32fd0f8c82f1ddb4cb', class: "share-url-container" }, index.h("input", { key: '467cca4a8c31b75daa82670f64b562730c241f52', type: "text", class: "share-url-input", value: this.getShareUrl(), readOnly: true, onClick: (e) => e.target.select() }), index.h("button", { key: 'fdc0f490339cb7050fb020cb1e83e51f6374b183', class: { 'copy-button': true, 'copy-success': this.copySuccess }, onClick: this.handleCopyUrl, title: this.copySuccess ? 'Copied!' : 'Copy link' }, index.h("kritzel-icon", { key: '5ff1a76d7977c75ea7bc8c339bdf515ba102e511', name: this.copySuccess ? 'check' : 'copy', size: 18 })))))))));
|
|
29363
29368
|
}
|
|
29364
29369
|
static get watchers() { return {
|
|
29365
29370
|
"isPublic": [{
|
|
@@ -29907,7 +29912,7 @@ const KritzelUtilityPanel = class {
|
|
|
29907
29912
|
this.redo.emit();
|
|
29908
29913
|
}
|
|
29909
29914
|
render() {
|
|
29910
|
-
return (index.h(index.Host, { key: '
|
|
29915
|
+
return (index.h(index.Host, { key: 'f800ea5843cf73ae132b56396ad05d664043f789' }, index.h("button", { key: 'd5dd4dc6e91c106eced7551c02d5f12a915b1d22', class: "utility-button", "data-testid": "utility-undo", disabled: !this.undoState?.canUndo, onClick: event => this.handleUndo(event) }, index.h("kritzel-icon", { key: '64ac3c8f118c991b50dc99e70d4b952fc759c958', name: "undo" })), index.h("button", { key: '97a8d694fd999eb505fdcdb532d4476ce369e60d', class: "utility-button", "data-testid": "utility-redo", disabled: !this.undoState?.canRedo, onClick: event => this.handleRedo(event) }, index.h("kritzel-icon", { key: 'ba22d5c6b246967b00112dc2efeb26920187d88f', name: "redo" })), index.h("div", { key: 'a4aa6a3202640742826d2217f2bbae9ebd2b84da', class: "utility-separator" }), index.h("button", { key: '1de2a896a6a70c22f9fa16a21af10f07f4b0303a', class: "utility-button", "data-testid": "utility-delete", onClick: () => this.delete.emit() }, index.h("kritzel-icon", { key: '202612645c1a3e8ee7e4cc01a0305d4e673874e4', name: "delete" }))));
|
|
29911
29916
|
}
|
|
29912
29917
|
};
|
|
29913
29918
|
KritzelUtilityPanel.style = kritzelUtilityPanelCss();
|
|
@@ -14511,6 +14511,10 @@ const lightTheme = {
|
|
|
14511
14511
|
},
|
|
14512
14512
|
engine: {
|
|
14513
14513
|
backgroundColor: '#ffffff',
|
|
14514
|
+
loadingOverlayBackground: 'rgba(255, 255, 255, 0.85)',
|
|
14515
|
+
loadingOverlayColor: '#333333',
|
|
14516
|
+
loadingOverlaySpinnerActiveColor: '#333333',
|
|
14517
|
+
loadingOverlaySpinnerColor: '#cccccc',
|
|
14514
14518
|
},
|
|
14515
14519
|
snap: {
|
|
14516
14520
|
indicatorFill: 'rgba(59, 130, 246, 0.3)',
|
|
@@ -14780,6 +14784,10 @@ const darkTheme = {
|
|
|
14780
14784
|
},
|
|
14781
14785
|
engine: {
|
|
14782
14786
|
backgroundColor: '#1a1a1a',
|
|
14787
|
+
loadingOverlayBackground: 'rgba(26, 26, 26, 0.85)',
|
|
14788
|
+
loadingOverlayColor: '#e0e0e0',
|
|
14789
|
+
loadingOverlaySpinnerActiveColor: '#e0e0e0',
|
|
14790
|
+
loadingOverlaySpinnerColor: '#555555',
|
|
14783
14791
|
},
|
|
14784
14792
|
snap: {
|
|
14785
14793
|
indicatorFill: 'rgba(10, 132, 255, 0.35)',
|
|
@@ -30,12 +30,12 @@ p, h1, h2, h3, h4, h5, h6, blockquote, pre {
|
|
|
30
30
|
align-items: center;
|
|
31
31
|
justify-content: center;
|
|
32
32
|
gap: 10px;
|
|
33
|
-
background-color: var(--kritzel-loading-overlay-background, rgba(255, 255, 255, 0.6));
|
|
34
|
-
color: var(--kritzel-loading-overlay-color, #333);
|
|
33
|
+
background-color: var(--kritzel-engine-loading-overlay-background, rgba(255, 255, 255, 0.6));
|
|
34
|
+
color: var(--kritzel-engine-loading-overlay-color, #333);
|
|
35
35
|
font-family: var(--kritzel-font-family, sans-serif);
|
|
36
36
|
font-size: 1.25rem;
|
|
37
37
|
pointer-events: all;
|
|
38
|
-
animation: workspace-loading-fade-in 200ms ease-out var(--kritzel-loading-overlay-delay, 300ms) forwards;
|
|
38
|
+
animation: workspace-loading-fade-in 200ms ease-out var(--kritzel-engine-loading-overlay-delay, 300ms) forwards;
|
|
39
39
|
opacity: 0;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -45,8 +45,8 @@ p, h1, h2, h3, h4, h5, h6, blockquote, pre {
|
|
|
45
45
|
box-sizing: border-box;
|
|
46
46
|
display: block;
|
|
47
47
|
flex-shrink: 0;
|
|
48
|
-
border: 2px solid var(--kritzel-loading-overlay-spinner-color, #cccccc);
|
|
49
|
-
border-top-color: var(--kritzel-loading-overlay-spinner-active-color, #333333);
|
|
48
|
+
border: 2px solid var(--kritzel-engine-loading-overlay-spinner-color, #cccccc);
|
|
49
|
+
border-top-color: var(--kritzel-engine-loading-overlay-spinner-active-color, #333333);
|
|
50
50
|
border-radius: 50%;
|
|
51
51
|
animation: workspace-loading-spin 0.6s linear infinite;
|
|
52
52
|
}
|
|
@@ -251,6 +251,7 @@ export class KritzelEngine {
|
|
|
251
251
|
if (this.core.store.isDisabled) {
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
|
+
const wasTracked = this.core.store.state.pointers.has(ev.pointerId);
|
|
254
255
|
this.core.store.state.pointers.delete(ev.pointerId);
|
|
255
256
|
if (this.host.hasPointerCapture(ev.pointerId)) {
|
|
256
257
|
this.host.releasePointerCapture(ev.pointerId);
|
|
@@ -259,6 +260,12 @@ export class KritzelEngine {
|
|
|
259
260
|
if (this.core.store.state.pointers.size === 0) {
|
|
260
261
|
this.core.cursorManager.resetToDefault();
|
|
261
262
|
}
|
|
263
|
+
// If the corresponding pointerdown was never processed (e.g. consumed by a capture-phase
|
|
264
|
+
// listener like a tooltip close handler), skip tool logic to avoid spurious interactions
|
|
265
|
+
// such as a selected text object entering edit mode when clicking to dismiss a popup.
|
|
266
|
+
if (!wasTracked) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
262
269
|
this.viewport.handlePointerUp(ev);
|
|
263
270
|
this.core.store.state?.activeTool?.handlePointerUp(ev);
|
|
264
271
|
}
|
|
@@ -71,8 +71,9 @@
|
|
|
71
71
|
border-radius: 0;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
/* Responsive: auto fullscreen on mobile when enabled */
|
|
75
|
-
@media (max-width: 576px)
|
|
74
|
+
/* Responsive: auto fullscreen on mobile when enabled (portrait) */
|
|
75
|
+
@media (max-width: 576px),
|
|
76
|
+
(max-height: 576px) and (orientation: landscape) {
|
|
76
77
|
.backdrop:has(.fullscreen-on-mobile) {
|
|
77
78
|
background-color: transparent;
|
|
78
79
|
}
|
|
@@ -95,8 +95,9 @@ export class KritzelDialog {
|
|
|
95
95
|
document.body.style.overflow = 'hidden';
|
|
96
96
|
}
|
|
97
97
|
lockMobileViewportHeight() {
|
|
98
|
-
// Only lock height on mobile when fullscreenOnMobile is enabled
|
|
99
|
-
|
|
98
|
+
// Only lock height on mobile when fullscreenOnMobile is enabled.
|
|
99
|
+
// Use the smaller dimension so landscape phones (wide but short) are also detected.
|
|
100
|
+
if (!this.fullscreenOnMobile || Math.min(window.innerWidth, window.innerHeight) > 576) {
|
|
100
101
|
this.mobileLockedHeight = null;
|
|
101
102
|
return;
|
|
102
103
|
}
|
|
@@ -66,10 +66,7 @@ export class KritzelControls {
|
|
|
66
66
|
}
|
|
67
67
|
handleDisplayValuesChange = (event) => {
|
|
68
68
|
const newVal = event.detail;
|
|
69
|
-
if (this.displayValues &&
|
|
70
|
-
this.displayValues.color === newVal.color &&
|
|
71
|
-
this.displayValues.size === newVal.size &&
|
|
72
|
-
this.displayValues.fontFamily === newVal.fontFamily) {
|
|
69
|
+
if (this.displayValues && this.displayValues.color === newVal.color && this.displayValues.size === newVal.size && this.displayValues.fontFamily === newVal.fontFamily) {
|
|
73
70
|
return;
|
|
74
71
|
}
|
|
75
72
|
this.displayValues = newVal;
|
|
@@ -201,13 +198,13 @@ export class KritzelControls {
|
|
|
201
198
|
// Separate tool controls from config control
|
|
202
199
|
const toolControls = this.controls.filter(c => c.type === 'tool' || c.type === 'separator');
|
|
203
200
|
const configControl = this.controls.find(c => c.type === 'config' && c.name === this.firstConfig?.name);
|
|
204
|
-
return (h(Host, { key: '
|
|
201
|
+
return (h(Host, { key: '93d08a3268edb67fc4cccb291b6e0aff6cf5a4bd', class: {
|
|
205
202
|
mobile: this.isTouchDevice,
|
|
206
|
-
} }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: '
|
|
203
|
+
} }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: '8862ea7e524b3e23d87ffea2929e04df7231bb0c', style: {
|
|
207
204
|
position: 'absolute',
|
|
208
205
|
bottom: '56px',
|
|
209
206
|
left: '12px',
|
|
210
|
-
}, undoState: this.undoState, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), h("div", { key: '
|
|
207
|
+
}, undoState: this.undoState, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), h("div", { key: '2ea2a41ba4cda77f5abde9231d293da181a2a568', class: "kritzel-controls" }, h("div", { key: '6bd4f6d930a0a51d5549b6dbae1e7be14cbe7822', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), h("div", { key: 'c712ca502a4ebd244394158b39391a49839bc386', class: "kritzel-tools-scroll", ref: el => (this.toolsScrollRef = el), onScroll: this.handleToolsScroll }, toolControls.map(control => {
|
|
211
208
|
// Check if this control has sub-options (split-button)
|
|
212
209
|
if (control.subOptions?.length) {
|
|
213
210
|
const selectedSubOption = this.getSelectedSubOption(control);
|
|
@@ -237,10 +234,10 @@ export class KritzelControls {
|
|
|
237
234
|
'kritzel-control': true,
|
|
238
235
|
'selected': this.activeControl?.name === control?.name,
|
|
239
236
|
}, key: control.name, "data-testid": `tool-${control.name}`, onClick: _event => this.handleControlClick?.(control) }, h("kritzel-icon", { name: control.icon })));
|
|
240
|
-
})), h("div", { key: '
|
|
237
|
+
})), h("div", { key: '6ca260915b2880443a324855a1de96d10affd256', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (h("div", { class: {
|
|
241
238
|
'kritzel-config-container': true,
|
|
242
239
|
'visible': hasConfigUI,
|
|
243
|
-
}, key: configControl.name }, h("div", { key: '
|
|
240
|
+
}, key: configControl.name }, h("div", { key: '984d30bd7f508d2fc56a9e81692fdf05dfb852c9', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), h("kritzel-tooltip", { key: '90c59995d229c606b9bf3b625f6eefc0632371c6', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, h("kritzel-tool-config", { key: 'cdb56f983e1f6840b11d06d166f982a93c07331b', tool: this.activeControl.tool, theme: this.theme, onToolChange: event => this.handleToolChange?.(event), onDisplayValuesChange: this.handleDisplayValuesChange, style: { width: '100%', height: '100%' } })), h("div", { key: 'c79db07dd02995d3ee105e8d7a773f89cd7072a5', tabIndex: hasConfigUI ? 0 : -1, class: "kritzel-config", "data-testid": "tool-config", ref: el => {
|
|
244
241
|
if (el)
|
|
245
242
|
this.configTriggerRef = el;
|
|
246
243
|
}, onKeyDown: event => {
|
|
@@ -249,7 +246,7 @@ export class KritzelControls {
|
|
|
249
246
|
}
|
|
250
247
|
}, style: {
|
|
251
248
|
cursor: 'pointer',
|
|
252
|
-
} }, this.
|
|
249
|
+
} }, this.displayValues && (h("div", { key: '0573a22c3105076729eb986c98b7e8644392f767', class: "color-container" }, h("kritzel-color", { key: '1e9711c219a5c520873b3206072957f2d406c56c', value: this.displayValues.color, theme: this.theme, size: 18, style: {
|
|
253
250
|
borderRadius: '50%',
|
|
254
251
|
border: 'none',
|
|
255
252
|
} })))))))));
|
|
@@ -15,7 +15,7 @@ export class KritzelCurrentUser {
|
|
|
15
15
|
this.dialogRef?.open();
|
|
16
16
|
};
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: 'c392caf731f8352fd8e2a95918fe48a2f00dd9e5' }, h("kritzel-avatar", { key: 'b3bdce0efa0c0610aa028303386c643d53bc8300', user: this.user, size: this.avatarSize, onClick: this.handleAvatarClick }), h("kritzel-current-user-dialog", { key: '5e7af1aea468028e091ad8f461e4352cb9f9636b', ref: el => (this.dialogRef = el), user: this.user })));
|
|
19
19
|
}
|
|
20
20
|
static get is() { return "kritzel-current-user"; }
|
|
21
21
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js
CHANGED
|
@@ -21,7 +21,7 @@ export class KritzelCurrentUserDialog {
|
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
23
|
const displayName = this.getDisplayName();
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'e1dd44cdfdbaebfe886fed0d9feba2ef232b6615' }, h("kritzel-dialog", { key: '49dd037cca0741cc949f20d9d44cfd028492dc60', dialogTitle: "Account", isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small" }, h("div", { key: 'ddcdfb82cc0c896025559888d475ab5c9ad59b4c', class: "user-info" }, h("kritzel-avatar", { key: '4d164b784cde6787d26ac164c7450c0352e6a7cb', user: this.user, size: 80 }), displayName && h("div", { key: '13ad719d8bd90cd608c78438fccbb38ed1d5e5ba', class: "user-name" }, displayName), this.user?.email && h("div", { key: 'df360afd434293d9c9d5fcf114713e0a6925a78e', class: "user-email" }, this.user.email)))));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "kritzel-current-user-dialog"; }
|
|
27
27
|
static get encapsulation() { return "shadow"; }
|
|
@@ -65,7 +65,7 @@ export class KritzelExport {
|
|
|
65
65
|
return (h("div", { class: "export-tab-content" }, h("kritzel-input", { label: "Filename", value: this.exportFilename, placeholder: "Enter filename", suffix: ".json", onValueChange: this.handleFilenameChange })));
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
|
-
return (h(Host, { key: '
|
|
68
|
+
return (h(Host, { key: '5178e66f75b94697c771e2dc6fe7ce317e21cd1a' }, h("kritzel-dialog", { key: '01aae6955be6828945b20e8a8a4d7c49eb92b2e2', isOpen: this.isDialogOpen, dialogTitle: "Export", closable: true, onDialogClose: this.closeDialog }, h("div", { key: '57c6f6de2917fb51201d737c4d0e1877f5671466', class: "export-content" }, h("kritzel-pill-tabs", { key: '800b8c058078ba1bba06b5edbaf370c4fa3c6806', tabs: this.tabs, value: this.activeTab, onValueChange: this.handleTabChange }), this.activeTab === 'viewport' && this.renderViewportExport(), this.activeTab === 'workspace' && this.renderWorkspaceExport(), h("button", { key: '99fb3b3d8dc42fdb47a3110e8403dde4e508e6cd', class: "export-primary-button", onClick: this.handleExport }, "Export")))));
|
|
69
69
|
}
|
|
70
70
|
static get is() { return "kritzel-export"; }
|
|
71
71
|
static get encapsulation() { return "shadow"; }
|
|
@@ -44,7 +44,7 @@ export class KritzelLoginDialog {
|
|
|
44
44
|
this.dialogClosed.emit();
|
|
45
45
|
};
|
|
46
46
|
render() {
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: '1a664868b840030a773f61c2a0f4388dfb014675' }, h("kritzel-dialog", { key: '09ece6fb5949fc8b204f29cd931c583e525590e1', dialogTitle: this.dialogTitle, isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small" }, h("div", { key: '57218d7762734929691b82700c31922f5a4991c8', class: "login-content" }, this.subtitle && (h("p", { key: '9ee071786f393857cd6a666e395526a139359d60', class: "login-subtitle" }, this.subtitle)), h("div", { key: 'a487687345aabcfb55976437ddc85feb464f0cae', class: "login-providers" }, this.providers.map(provider => (h("button", { key: provider.name, class: {
|
|
48
48
|
'provider-button': true,
|
|
49
49
|
'is-loading': this.loadingProvider === provider.name,
|
|
50
50
|
'is-disabled': this.loadingProvider !== null && this.loadingProvider !== provider.name,
|
|
@@ -55,7 +55,7 @@ export class KritzelMoreMenu {
|
|
|
55
55
|
this.closeMenu();
|
|
56
56
|
};
|
|
57
57
|
render() {
|
|
58
|
-
return (h(Host, { key: '
|
|
58
|
+
return (h(Host, { key: '0e12ffc8c72566ec92080e6a19bd1d929795bef9', class: { mobile: this.isTouchDevice } }, h("div", { key: 'cc73b51c5aa39522a7ab7ec23d5c0a2732ed7acc', class: { 'more-menu-wrapper': true, visible: this.visible } }, h("button", { key: 'c35b8c7aa56e5e0e2773fed9fbbbead0b6b01a71', class: "more-menu-button", onClick: this.toggleMenu }, h("kritzel-icon", { key: '8b3261da5a10371a17b2562b71fde48dd0ba8ccd', name: this.icon, size: this.iconSize })), h("kritzel-portal", { key: 'be4a42061f27bbca3d435dec8e4dd25fc78febb0', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, h("kritzel-menu", { key: '763043f4d02819097396ce1baa85f398695e38b5', items: this.visibleItems, onItemSelect: this.handleMenuItemSelect })))));
|
|
59
59
|
}
|
|
60
60
|
static get is() { return "kritzel-more-menu"; }
|
|
61
61
|
static get encapsulation() { return "shadow"; }
|
|
@@ -188,7 +188,7 @@ export class KritzelSettings {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
render() {
|
|
191
|
-
return (h(Host, { key: '
|
|
191
|
+
return (h(Host, { key: '78a4eb80f2a4d9e7ef67d06bb39137dbde3a3301' }, h("kritzel-dialog", { key: '1adf437125186758f75dc085db9a4e0c572fccd9', isOpen: this.isDialogOpen, dialogTitle: "Settings", size: "large", onDialogClose: this.closeDialog }, h("kritzel-master-detail", { key: '68ed27f5c9c03589d0444c02ff0524dfcaa053a3', items: SETTINGS_CATEGORIES, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
|
|
192
192
|
}
|
|
193
193
|
static get is() { return "kritzel-settings"; }
|
|
194
194
|
static get encapsulation() { return "shadow"; }
|
|
@@ -84,9 +84,9 @@ export class KritzelShareDialog {
|
|
|
84
84
|
this.dialogClosed.emit();
|
|
85
85
|
};
|
|
86
86
|
render() {
|
|
87
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: 'bd58f146337b3eca96ca34408a3d30621f01765a' }, h("kritzel-dialog", { key: 'c152f4ec5739a18b265f9a8b161ec8501c1a053b', dialogTitle: "Share Workspace", isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small" }, h("div", { key: '2810061b1c99e4f4644342453de693e1cddf9a27', class: "share-content" }, h("div", { key: 'bc56de53fd6136c6867018af24019383094cab0d', class: "share-section" }, h("div", { key: '43464ffd61e5a19653cc081e823f01c0eb17e454', class: "share-row" }, h("div", { key: 'ed83ea6684695d09dc6af82b3367fbbff6e4c7e2', class: "share-label-group" }, h("label", { key: 'fe2eaf501dd80ad0b8d83f93a2dcdd18bc093d3b', class: "share-label" }, "Link sharing"), h("p", { key: '738f1a6afc0421380164b9d270920631cefdfd78', class: "share-description" }, this.internalIsPublic
|
|
88
88
|
? 'Anyone with the link can access this workspace.'
|
|
89
|
-
: 'Link sharing is disabled. Only you can access this workspace.')), h("kritzel-slide-toggle", { key: '
|
|
89
|
+
: 'Link sharing is disabled. Only you can access this workspace.')), h("kritzel-slide-toggle", { key: '60f0200ea8f9c207cd5ee76f5a86f82707bb724b', checked: this.internalIsPublic, onCheckedChange: this.handleToggleChange, label: "Enable link sharing" }))), this.internalIsPublic && (h("div", { key: '83212a2a996b85996eee119d5535203f77d3c8dd', class: "share-section" }, h("div", { key: '297031b5aef2018f7aa33c32fd0f8c82f1ddb4cb', class: "share-url-container" }, h("input", { key: '467cca4a8c31b75daa82670f64b562730c241f52', type: "text", class: "share-url-input", value: this.getShareUrl(), readOnly: true, onClick: (e) => e.target.select() }), h("button", { key: 'fdc0f490339cb7050fb020cb1e83e51f6374b183', class: { 'copy-button': true, 'copy-success': this.copySuccess }, onClick: this.handleCopyUrl, title: this.copySuccess ? 'Copied!' : 'Copy link' }, h("kritzel-icon", { key: '5ff1a76d7977c75ea7bc8c339bdf515ba102e511', name: this.copySuccess ? 'check' : 'copy', size: 18 })))))))));
|
|
90
90
|
}
|
|
91
91
|
static get is() { return "kritzel-share-dialog"; }
|
|
92
92
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,7 +17,7 @@ export class KritzelUtilityPanel {
|
|
|
17
17
|
this.redo.emit();
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: 'f800ea5843cf73ae132b56396ad05d664043f789' }, h("button", { key: 'd5dd4dc6e91c106eced7551c02d5f12a915b1d22', class: "utility-button", "data-testid": "utility-undo", disabled: !this.undoState?.canUndo, onClick: event => this.handleUndo(event) }, h("kritzel-icon", { key: '64ac3c8f118c991b50dc99e70d4b952fc759c958', name: "undo" })), h("button", { key: '97a8d694fd999eb505fdcdb532d4476ce369e60d', class: "utility-button", "data-testid": "utility-redo", disabled: !this.undoState?.canRedo, onClick: event => this.handleRedo(event) }, h("kritzel-icon", { key: 'ba22d5c6b246967b00112dc2efeb26920187d88f', name: "redo" })), h("div", { key: 'a4aa6a3202640742826d2217f2bbae9ebd2b84da', class: "utility-separator" }), h("button", { key: '1de2a896a6a70c22f9fa16a21af10f07f4b0303a', class: "utility-button", "data-testid": "utility-delete", onClick: () => this.delete.emit() }, h("kritzel-icon", { key: '202612645c1a3e8ee7e4cc01a0305d4e673874e4', name: "delete" }))));
|
|
21
21
|
}
|
|
22
22
|
static get is() { return "kritzel-utility-panel"; }
|
|
23
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -116,6 +116,10 @@ export const darkTheme = {
|
|
|
116
116
|
},
|
|
117
117
|
engine: {
|
|
118
118
|
backgroundColor: '#1a1a1a',
|
|
119
|
+
loadingOverlayBackground: 'rgba(26, 26, 26, 0.85)',
|
|
120
|
+
loadingOverlayColor: '#e0e0e0',
|
|
121
|
+
loadingOverlaySpinnerActiveColor: '#e0e0e0',
|
|
122
|
+
loadingOverlaySpinnerColor: '#555555',
|
|
119
123
|
},
|
|
120
124
|
snap: {
|
|
121
125
|
indicatorFill: 'rgba(10, 132, 255, 0.35)',
|
|
@@ -117,6 +117,10 @@ export const lightTheme = {
|
|
|
117
117
|
},
|
|
118
118
|
engine: {
|
|
119
119
|
backgroundColor: '#ffffff',
|
|
120
|
+
loadingOverlayBackground: 'rgba(255, 255, 255, 0.85)',
|
|
121
|
+
loadingOverlayColor: '#333333',
|
|
122
|
+
loadingOverlaySpinnerActiveColor: '#333333',
|
|
123
|
+
loadingOverlaySpinnerColor: '#cccccc',
|
|
120
124
|
},
|
|
121
125
|
snap: {
|
|
122
126
|
indicatorFill: 'rgba(59, 130, 246, 0.3)',
|