kritzel-stencil 0.1.72 → 0.1.74
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 +2 -2
- package/dist/cjs/index.cjs.js +58 -18
- package/dist/cjs/{kritzel-active-users_41.cjs.entry.js → kritzel-active-users_42.cjs.entry.js} +586 -172
- 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 +1 -1
- package/dist/cjs/{workspace.migrations-DcwqsqPC.js → workspace.migrations-Dyt35LBC.js} +58 -5
- package/dist/collection/classes/core/core.class.js +9 -3
- package/dist/collection/classes/core/store.class.js +20 -6
- package/dist/collection/classes/handlers/selection.handler.js +15 -2
- package/dist/collection/classes/objects/base-object.class.js +2 -0
- package/dist/collection/classes/objects/custom-element.class.js +1 -0
- package/dist/collection/classes/objects/group.class.js +1 -0
- package/dist/collection/classes/objects/image.class.js +1 -0
- package/dist/collection/classes/objects/line.class.js +1 -0
- package/dist/collection/classes/objects/path.class.js +1 -0
- package/dist/collection/classes/objects/selection-box.class.js +1 -0
- package/dist/collection/classes/objects/selection-group.class.js +13 -1
- package/dist/collection/classes/objects/shape.class.js +1 -0
- package/dist/collection/classes/objects/text.class.js +1 -0
- package/dist/collection/classes/providers/hocuspocus-sync-provider.class.js +57 -17
- package/dist/collection/classes/structures/object-map.structure.js +102 -7
- package/dist/collection/classes/tools/brush-tool.class.js +4 -0
- package/dist/collection/classes/tools/line-tool.class.js +4 -0
- package/dist/collection/classes/tools/shape-tool.class.js +2 -0
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.css +110 -0
- package/dist/collection/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.js +347 -0
- package/dist/collection/components/core/kritzel-cursor-trail/kritzel-cursor-trail.js +1 -1
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +3 -3
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +150 -109
- package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.js +3 -3
- package/dist/collection/components/shared/kritzel-brush-style/kritzel-brush-style.js +1 -1
- package/dist/collection/components/shared/kritzel-button/kritzel-button.js +2 -2
- package/dist/collection/components/shared/kritzel-color/kritzel-color.js +2 -2
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js +1 -1
- package/dist/collection/components/shared/kritzel-dropdown/kritzel-dropdown.js +1 -1
- package/dist/collection/components/shared/kritzel-font/kritzel-font.js +1 -1
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js +1 -1
- package/dist/collection/components/shared/kritzel-input/kritzel-input.js +1 -1
- package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.js +3 -3
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js +1 -1
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js +2 -2
- package/dist/collection/components/shared/kritzel-numeric-input/kritzel-numeric-input.js +1 -1
- package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.js +1 -1
- package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +1 -1
- package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.js +1 -1
- package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.js +1 -1
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js +1 -1
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +2 -2
- package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.js +1 -1
- package/dist/collection/components/ui/kritzel-context-menu/kritzel-context-menu.js +1 -1
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +5 -5
- 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/schema.constants.js +1 -1
- package/dist/collection/constants/version.js +1 -1
- package/dist/collection/interfaces/remote-cursor.interface.js +1 -0
- package/dist/collection/migrations/workspace.migrations.js +10 -1
- package/dist/components/index.d.ts +2 -0
- 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.d.ts +11 -0
- package/dist/components/kritzel-awareness-cursors.js +1 -0
- 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-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-input.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-portal.js +1 -1
- package/dist/components/kritzel-settings.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-Dp8idtVD.js → p-0kShCfeb.js} +1 -1
- package/dist/components/{p-B47JuZiD.js → p-2OYw6GJ7.js} +1 -1
- package/dist/components/p-7o2FWtFx.js +1 -0
- package/dist/components/{p-dR_q96Q3.js → p-B4Oqnl55.js} +1 -1
- package/dist/components/{p-C5KuV1pK.js → p-BA0ayKqO.js} +1 -1
- package/dist/components/{p-NbNVTRk6.js → p-BEJQ2kP7.js} +1 -1
- package/dist/components/p-BSipRoFx.js +1 -0
- package/dist/components/{p-CDadAOMw.js → p-BeFUNGEI.js} +1 -1
- package/dist/components/{p-35nrk8s0.js → p-BiByyU2C.js} +1 -1
- package/dist/components/{p-CCAWSyDD.js → p-BiouZo1q.js} +1 -1
- package/dist/components/{p-CSExtYKI.js → p-ByR0VXeU.js} +1 -1
- package/dist/components/{p-1MGcXTLv.js → p-C1uR_ZNW.js} +1 -1
- package/dist/components/{p-x8PzaMuD.js → p-C69Stayh.js} +1 -1
- package/dist/components/{p-Ch0UlFwq.js → p-C7SBI_0T.js} +1 -1
- package/dist/components/{p-DEzfXrGX.js → p-CAIGuV2J.js} +1 -1
- package/dist/components/p-CJ2eHeoV.js +1 -0
- package/dist/components/p-CW-VyJgK.js +1 -0
- package/dist/components/{p-DW4ADV9w.js → p-CZhyKp-f.js} +1 -1
- package/dist/components/p-CsR4owzk.js +1 -0
- package/dist/components/{p-BG1IxseV.js → p-CsoDfhD5.js} +1 -1
- package/dist/components/{p-DpFu5yAt.js → p-D1O7DxL4.js} +1 -1
- package/dist/components/{p-B5ouV8EQ.js → p-DRbG92F9.js} +1 -1
- package/dist/components/{p-C3eaM9TB.js → p-DS0xx1eT.js} +1 -1
- package/dist/components/{p-jx8VOz7S.js → p-DSzQ6H2j.js} +1 -1
- package/dist/components/{p-DsIlDGDO.js → p-DXjuuVq9.js} +1 -1
- package/dist/components/p-DXpYcAnT.js +1 -0
- package/dist/components/{p-DiFVw6IQ.js → p-Da46jw3N.js} +1 -1
- package/dist/components/{p-C6kZf91d.js → p-Dj_Qjga5.js} +1 -1
- package/dist/components/{p-Do0Q5-iC.js → p-DvIEvoZu.js} +1 -1
- package/dist/components/{p-CnVzLD5e.js → p-GYI7sDxr.js} +1 -1
- package/dist/components/{p-CcBM_ClD.js → p-HLbqRJGs.js} +1 -1
- package/dist/components/{p-VHyNcODZ.js → p-KQzWumjB.js} +1 -1
- package/dist/components/p-RJWe82kG.js +9 -0
- package/dist/components/{p-VAkeZOZL.js → p-TyR-YTXm.js} +1 -1
- package/dist/components/{p-CHtn5xr6.js → p-b4gyXoju.js} +1 -1
- package/dist/components/p-iRL0wQHQ.js +1 -0
- package/dist/components/{p-CqLaHE27.js → p-kj9wbLY8.js} +1 -1
- package/dist/components/{p-DaHq4iG1.js → p-xM-_OeRO.js} +1 -1
- package/dist/esm/index-MV-81ybv.js +2 -2
- package/dist/esm/index.js +59 -19
- package/dist/esm/{kritzel-active-users_41.entry.js → kritzel-active-users_42.entry.js} +586 -173
- package/dist/esm/kritzel-brush-style.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/stencil.js +1 -1
- package/dist/esm/{workspace.migrations-BGixvB76.js → workspace.migrations-B99F1MdT.js} +58 -5
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/p-2a60e1bc.entry.js +9 -0
- package/dist/stencil/p-B99F1MdT.js +1 -0
- package/dist/stencil/{p-016ad76a.entry.js → p-fc21e29c.entry.js} +1 -1
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/classes/core/store.class.d.ts +10 -2
- package/dist/types/classes/objects/base-object.class.d.ts +1 -0
- package/dist/types/classes/objects/selection-group.class.d.ts +5 -0
- package/dist/types/classes/providers/hocuspocus-sync-provider.class.d.ts +3 -0
- package/dist/types/classes/structures/object-map.structure.d.ts +41 -0
- package/dist/types/components/core/kritzel-awareness-cursors/kritzel-awareness-cursors.d.ts +26 -0
- package/dist/types/components.d.ts +39 -4
- package/dist/types/constants/schema.constants.d.ts +1 -1
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/interfaces/object.interface.d.ts +1 -0
- package/dist/types/interfaces/remote-cursor.interface.d.ts +17 -0
- package/dist/types/interfaces/theme.interface.d.ts +7 -0
- package/package.json +1 -1
- package/dist/components/p-B2vjbWy-.js +0 -9
- package/dist/components/p-BvToKcu1.js +0 -1
- package/dist/components/p-CNro30tB.js +0 -1
- package/dist/components/p-Duv3EM3w.js +0 -1
- package/dist/components/p-KFsLHwYm.js +0 -1
- package/dist/components/p-hCORwbZh.js +0 -1
- package/dist/stencil/p-BGixvB76.js +0 -1
- package/dist/stencil/p-a0f5c4ad.entry.js +0 -9
|
@@ -430,6 +430,7 @@ export class KritzelEngine {
|
|
|
430
430
|
this.core.store.state.isContextMenuVisible = false;
|
|
431
431
|
this.core.store.state.objects.remove(o => o instanceof KritzelSelectionBox);
|
|
432
432
|
this.core.store.setSelectionBox(null);
|
|
433
|
+
this.core.store.state.objects.clearLocalSelectionBox();
|
|
433
434
|
this.core.store.state.isSelecting = false;
|
|
434
435
|
this.core.store.state.isEnabled = true;
|
|
435
436
|
this.core.rerender();
|
|
@@ -1362,6 +1363,7 @@ export class KritzelEngine {
|
|
|
1362
1363
|
this.core.clearSelection();
|
|
1363
1364
|
this.core.store.state.objects.remove(o => o instanceof KritzelSelectionBox);
|
|
1364
1365
|
this.core.store.setSelectionBox(null);
|
|
1366
|
+
this.core.store.state.objects.clearLocalSelectionBox();
|
|
1365
1367
|
this.core.store.state.isSelecting = false;
|
|
1366
1368
|
this.core.store.state.isResizeHandleSelected = false;
|
|
1367
1369
|
this.core.store.state.isRotationHandleSelected = false;
|
|
@@ -1538,114 +1540,153 @@ export class KritzelEngine {
|
|
|
1538
1540
|
left: `${object.totalWidth}px`,
|
|
1539
1541
|
top: '0',
|
|
1540
1542
|
zIndex: (object.zIndex + 2).toString(),
|
|
1541
|
-
} }, h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "Id: ", object.id), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "width: ", object.width), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "height: ", object.height), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "translateX: ", object.translateX), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "translateY: ", object.translateY), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "rotationDegrees: ", object.rotationDegrees), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "zIndex: ", object.zIndex))), (this.core.displaySelectionGroupUI(object) || this.core.displaySelectionLineUI(object)) &&
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1543
|
+
} }, h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "Id: ", object.id), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "userId: ", object.userId), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "width: ", object.width), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "height: ", object.height), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "translateX: ", object.translateX), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "translateY: ", object.translateY), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "rotationDegrees: ", object.rotationDegrees), h("div", { style: { whiteSpace: 'nowrap', fontSize: '10px' } }, "zIndex: ", object.zIndex))), (this.core.displaySelectionGroupUI(object) || this.core.displaySelectionLineUI(object)) &&
|
|
1544
|
+
(() => {
|
|
1545
|
+
const isRemoteSelection = KritzelClassHelper.isInstanceOf(object, 'KritzelSelectionGroup') &&
|
|
1546
|
+
object.userId != null &&
|
|
1547
|
+
this.core.user?.id != null &&
|
|
1548
|
+
object.userId !== this.core.user.id;
|
|
1549
|
+
let remoteUserColor;
|
|
1550
|
+
if (isRemoteSelection) {
|
|
1551
|
+
const awarenessStates = this.core.store.state.objects?.awareness?.getStates();
|
|
1552
|
+
if (awarenessStates) {
|
|
1553
|
+
for (const state of awarenessStates.values()) {
|
|
1554
|
+
if (state.user?.id === object.userId) {
|
|
1555
|
+
remoteUserColor = state.user.color;
|
|
1556
|
+
break;
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
const selectionBorderColor = remoteUserColor
|
|
1562
|
+
?? (KritzelColorHelper.resolveThemeColor(object.borderColor, currentTheme) || 'var(--kritzel-selection-border-color, #007AFF)');
|
|
1563
|
+
const selectionHandleStrokeColor = remoteUserColor
|
|
1564
|
+
?? 'var(--kritzel-selection-handle-stroke-color, #007AFF)';
|
|
1565
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", style: {
|
|
1566
|
+
zIndex: (object.zIndex + 1).toString(),
|
|
1567
|
+
height: object?.totalHeight.toString(),
|
|
1568
|
+
width: object?.totalWidth.toString(),
|
|
1569
|
+
left: '0',
|
|
1570
|
+
top: '0',
|
|
1571
|
+
position: 'absolute',
|
|
1572
|
+
transform: `rotate(${object.rotationDegrees}deg)`,
|
|
1573
|
+
transformOrigin: `${object.totalWidth / 2}px ${object.totalHeight / 2}px`,
|
|
1574
|
+
overflow: 'visible',
|
|
1575
|
+
pointerEvents: 'none',
|
|
1576
|
+
} }, this.core.displaySelectionGroupUI(object) && (h("g", { class: "selection-group-ui", style: { pointerEvents: 'none' } }, (() => {
|
|
1577
|
+
const remoteLineObject = isRemoteSelection &&
|
|
1578
|
+
KritzelClassHelper.isInstanceOf(object, 'KritzelSelectionGroup') &&
|
|
1579
|
+
object.objects.length === 1 &&
|
|
1580
|
+
KritzelClassHelper.isInstanceOf(object.objects[0], 'KritzelLine')
|
|
1581
|
+
? object.objects[0]
|
|
1582
|
+
: null;
|
|
1583
|
+
if (remoteLineObject) {
|
|
1584
|
+
return (h("g", { class: "selection-line-borders" }, h("path", { class: "selection-line-border", d: this.core.anchorManager.computeClippedLinePath(remoteLineObject, true), style: {
|
|
1585
|
+
stroke: selectionBorderColor,
|
|
1586
|
+
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1587
|
+
strokeLinecap: 'round',
|
|
1588
|
+
fill: 'none',
|
|
1589
|
+
} })));
|
|
1590
|
+
}
|
|
1591
|
+
return (h("g", { class: "selection-group-borders" }, h("line", { x1: "0", y1: "0", x2: object.totalWidth, y2: "0", style: {
|
|
1592
|
+
stroke: selectionBorderColor,
|
|
1593
|
+
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1594
|
+
strokeLinecap: 'square',
|
|
1595
|
+
} }), h("line", { x1: "0", y1: "0", x2: "0", y2: object.totalHeight, style: {
|
|
1596
|
+
stroke: selectionBorderColor,
|
|
1597
|
+
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1598
|
+
strokeLinecap: 'square',
|
|
1599
|
+
} }), h("line", { x1: "0", y1: object.totalHeight, x2: object.totalWidth, y2: object.totalHeight, style: {
|
|
1600
|
+
stroke: selectionBorderColor,
|
|
1601
|
+
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1602
|
+
strokeLinecap: 'square',
|
|
1603
|
+
} }), h("line", { x1: object.totalWidth, y1: "0", x2: object.totalWidth, y2: object.totalHeight, style: {
|
|
1604
|
+
stroke: selectionBorderColor,
|
|
1605
|
+
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1606
|
+
strokeLinecap: 'square',
|
|
1607
|
+
} })));
|
|
1608
|
+
})(), !this.isSelecting && !isRemoteSelection && (h("g", { class: "selection-group-handles", style: { pointerEvents: 'auto' } }, h("rect", { class: "resize-handle top-left", x: `${(-(baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, y: `${(-(baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, width: `${((baseHandleSize - 1) * 2 * object.scale) / this.core.store.state?.scale}`, height: `${((baseHandleSize - 1) * 2 * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1609
|
+
fill: 'var(--kritzel-selection-handle-color, #ffffff)',
|
|
1610
|
+
stroke: selectionHandleStrokeColor,
|
|
1611
|
+
strokeWidth: `calc(2px * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1612
|
+
paintOrder: 'fill',
|
|
1613
|
+
} }), h("rect", { class: "resize-handle-overlay top-left", x: `${(-baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, y: `${(-baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, width: `${(baseHandleTouchSize * 2 * object.scale) / this.core.store.state?.scale}`, height: `${(baseHandleTouchSize * 2 * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1614
|
+
fill: 'transparent',
|
|
1615
|
+
paintOrder: 'fill',
|
|
1616
|
+
} }), h("rect", { class: "resize-handle top-right", x: `${object.totalWidth - ((baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, y: `${(-(baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, width: `${((baseHandleSize - 1) * 2 * object.scale) / this.core.store.state?.scale}`, height: `${((baseHandleSize - 1) * 2 * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1617
|
+
fill: 'var(--kritzel-selection-handle-color, #ffffff)',
|
|
1618
|
+
stroke: selectionHandleStrokeColor,
|
|
1619
|
+
strokeWidth: `calc(2px * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1620
|
+
paintOrder: 'fill',
|
|
1621
|
+
} }), h("rect", { class: "resize-handle-overlay top-right", x: `${object.totalWidth - (baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, y: `${(-baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, width: `${(baseHandleTouchSize * 2 * object.scale) / this.core.store.state?.scale}`, height: `${(baseHandleTouchSize * 2 * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1622
|
+
fill: 'transparent',
|
|
1623
|
+
paintOrder: 'fill',
|
|
1624
|
+
} }), h("rect", { class: "resize-handle bottom-left", x: `${(-(baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, y: `${object.totalHeight - ((baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, width: `${((baseHandleSize - 1) * 2 * object.scale) / this.core.store.state?.scale}`, height: `${((baseHandleSize - 1) * 2 * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1625
|
+
fill: 'var(--kritzel-selection-handle-color, #ffffff)',
|
|
1626
|
+
stroke: selectionHandleStrokeColor,
|
|
1627
|
+
strokeWidth: `calc(2px * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1628
|
+
paintOrder: 'fill',
|
|
1629
|
+
} }), h("rect", { class: "resize-handle-overlay bottom-left", x: `${(-baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, y: `${object.totalHeight - (baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, width: `${(baseHandleTouchSize * 2 * object.scale) / this.core.store.state?.scale}`, height: `${(baseHandleTouchSize * 2 * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1630
|
+
fill: 'transparent',
|
|
1631
|
+
paintOrder: 'fill',
|
|
1632
|
+
} }), h("rect", { class: "resize-handle bottom-right", x: `${object.totalWidth - ((baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, y: `${object.totalHeight - ((baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, width: `${((baseHandleSize - 1) * 2 * object.scale) / this.core.store.state?.scale}`, height: `${((baseHandleSize - 1) * 2 * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1633
|
+
fill: 'var(--kritzel-selection-handle-color, #ffffff)',
|
|
1634
|
+
stroke: selectionHandleStrokeColor,
|
|
1635
|
+
strokeWidth: `calc(2px * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1636
|
+
paintOrder: 'fill',
|
|
1637
|
+
} }), h("rect", { class: "resize-handle-overlay bottom-right", x: `${object.totalWidth - (baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, y: `${object.totalHeight - (baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, width: `${(baseHandleTouchSize * 2 * object.scale) / this.core.store.state?.scale}`, height: `${(baseHandleTouchSize * 2 * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1638
|
+
fill: 'transparent',
|
|
1639
|
+
paintOrder: 'fill',
|
|
1640
|
+
} }), h("line", { x1: object.totalWidth / 2, y1: "0", x2: object.totalWidth / 2, y2: -((15 * object.scale) / this.core.store.state?.scale), style: {
|
|
1641
|
+
stroke: selectionBorderColor,
|
|
1642
|
+
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1643
|
+
} }), h("circle", { class: "rotation-handle", cx: object.totalWidth / 2, cy: -((15 * object.scale) / this.core.store.state?.scale), r: `${((baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1644
|
+
fill: 'var(--kritzel-selection-handle-color, #ffffff)',
|
|
1645
|
+
stroke: selectionHandleStrokeColor,
|
|
1646
|
+
strokeWidth: `calc(2px * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1647
|
+
paintOrder: 'fill',
|
|
1648
|
+
} }), h("circle", { class: "rotation-handle-overlay", cx: object.totalWidth / 2, cy: -((15 * object.scale) / this.core.store.state?.scale), r: `${(baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1649
|
+
fill: 'transparent',
|
|
1650
|
+
paintOrder: 'fill',
|
|
1651
|
+
} }))))), this.core.displaySelectionLineUI(object) && KritzelClassHelper.isInstanceOf(object, 'KritzelLine') && (h("g", { class: "selection-line-ui", style: { pointerEvents: 'none' } }, h("g", { class: "selection-line-borders" }, h("path", { class: "selection-line-border", d: this.core.anchorManager.computeClippedLinePath(object, true), style: {
|
|
1652
|
+
stroke: selectionBorderColor,
|
|
1653
|
+
strokeWidth: `calc(var(--kritzel-selection-border-width, 2px) * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1654
|
+
strokeLinecap: 'round',
|
|
1655
|
+
fill: 'none',
|
|
1656
|
+
} })), !this.isSelecting && !isRemoteSelection && (h("g", { class: "selection-line-handles", style: { pointerEvents: 'auto' } }, h("circle", { class: "selection-line-handle start", cx: object.startX - object.x, cy: object.startY - object.y, r: `${((baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1657
|
+
fill: 'var(--kritzel-selection-handle-color, #000000)',
|
|
1658
|
+
stroke: selectionHandleStrokeColor,
|
|
1659
|
+
strokeWidth: `calc(2px * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1660
|
+
paintOrder: 'fill',
|
|
1661
|
+
} }), h("circle", { class: "selection-line-handle-overlay start", "data-testid": "line-handle-start", cx: object.startX - object.x, cy: object.startY - object.y, r: `${(baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1662
|
+
fill: 'transparent',
|
|
1663
|
+
paintOrder: 'fill',
|
|
1664
|
+
} }), h("circle", { class: "selection-line-handle center", cx: object.controlX !== undefined
|
|
1665
|
+
? (object.startX + 2 * object.controlX + object.endX) / 4 - object.x
|
|
1666
|
+
: (object.startX - object.x + object.endX - object.x) / 2, cy: object.controlY !== undefined
|
|
1667
|
+
? (object.startY + 2 * object.controlY + object.endY) / 4 - object.y
|
|
1668
|
+
: (object.startY - object.y + object.endY - object.y) / 2, r: `${((baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1669
|
+
fill: 'var(--kritzel-selection-handle-color, #000000)',
|
|
1670
|
+
stroke: selectionHandleStrokeColor,
|
|
1671
|
+
strokeWidth: `calc(2px * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1672
|
+
paintOrder: 'fill',
|
|
1673
|
+
} }), h("circle", { class: "selection-line-handle-overlay center", "data-testid": "line-handle-center", cx: object.controlX !== undefined
|
|
1674
|
+
? (object.startX + 2 * object.controlX + object.endX) / 4 - object.x
|
|
1675
|
+
: (object.startX - object.x + object.endX - object.x) / 2, cy: object.controlY !== undefined
|
|
1676
|
+
? (object.startY + 2 * object.controlY + object.endY) / 4 - object.y
|
|
1677
|
+
: (object.startY - object.y + object.endY - object.y) / 2, r: `${(baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1678
|
+
fill: 'transparent',
|
|
1679
|
+
paintOrder: 'fill',
|
|
1680
|
+
} }), h("circle", { class: "selection-line-handle end", cx: object.endX - object.x, cy: object.endY - object.y, r: `${((baseHandleSize - 1) * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1681
|
+
fill: 'var(--kritzel-selection-handle-color, #000000)',
|
|
1682
|
+
stroke: selectionHandleStrokeColor,
|
|
1683
|
+
strokeWidth: `calc(2px * ${object.scale} / ${this.core.store.state?.scale})`,
|
|
1684
|
+
paintOrder: 'fill',
|
|
1685
|
+
} }), h("circle", { class: "selection-line-handle-overlay end", "data-testid": "line-handle-end", cx: object.endX - object.x, cy: object.endY - object.y, r: `${(baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, style: {
|
|
1686
|
+
fill: 'transparent',
|
|
1687
|
+
paintOrder: 'fill',
|
|
1688
|
+
} })))))));
|
|
1689
|
+
})()));
|
|
1649
1690
|
}), (() => {
|
|
1650
1691
|
const data = this.core.anchorManager.getAnchorLinesRenderData();
|
|
1651
1692
|
if (!data)
|
|
@@ -1730,7 +1771,7 @@ export class KritzelEngine {
|
|
|
1730
1771
|
y: (-this.core.store.state.translateY + this.core.store.state.contextMenuY) / this.core.store.state.scale,
|
|
1731
1772
|
}, this.core.store.selectionGroup?.objects);
|
|
1732
1773
|
this.hideContextMenu();
|
|
1733
|
-
}, onClose: () => this.hideContextMenu() })), this.core.store.state?.activeTool instanceof KritzelEraserTool && !this.core.store.state.isScaling && h("kritzel-cursor-trail", { core: this.core })));
|
|
1774
|
+
}, onClose: () => this.hideContextMenu() })), this.core.store.state.objects?.hasAwareness && h("kritzel-awareness-cursors", { core: this.core }), this.core.store.state?.activeTool instanceof KritzelEraserTool && !this.core.store.state.isScaling && h("kritzel-cursor-trail", { core: this.core })));
|
|
1734
1775
|
}
|
|
1735
1776
|
static get is() { return "kritzel-engine"; }
|
|
1736
1777
|
static get encapsulation() { return "shadow"; }
|
|
@@ -81,16 +81,16 @@ export class KritzelAvatar {
|
|
|
81
81
|
height: `${this.size}px`,
|
|
82
82
|
fontSize: `${Math.round(this.size * 0.4)}px`,
|
|
83
83
|
};
|
|
84
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '67c0c1f944b9c835d1685d2b743114a1b5a1f061', style: containerStyles, class: {
|
|
85
85
|
'has-image': !!showImage,
|
|
86
86
|
'has-initials': !!showInitials,
|
|
87
87
|
'has-default': !!showDefaultIcon,
|
|
88
|
-
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: '
|
|
88
|
+
}, role: "img", "aria-label": this.getDisplayName() || 'User avatar' }, showImage && (h("img", { key: 'd71ccd7449a27133bcf8cc01f3cd654cc9b00142', src: imageUrl, alt: "", class: "avatar-image", ref: (el) => {
|
|
89
89
|
if (el) {
|
|
90
90
|
el.referrerPolicy = 'no-referrer';
|
|
91
91
|
el.crossOrigin = 'anonymous';
|
|
92
92
|
}
|
|
93
|
-
}, onError: this.handleImageError })), showInitials && (h("span", { key: '
|
|
93
|
+
}, onError: this.handleImageError })), showInitials && (h("span", { key: '818ad4a24d6489565dffc8c64b3d4e76b701444c', class: "avatar-initials", style: { backgroundColor: this.getBackgroundColor() } }, initials)), showDefaultIcon && (h("span", { key: '87af93fd968f3bf5b1f86295de6bd4b71c94120c', class: "avatar-default" }, h("svg", { key: '3267317fe99fb8d90432e207516bb48f603c08ed', viewBox: "0 0 24 24", fill: "currentColor" }, h("path", { key: '9e4e225f9a058a24f63b508f36969c8c429fccd6', d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }))))));
|
|
94
94
|
}
|
|
95
95
|
static get is() { return "kritzel-avatar"; }
|
|
96
96
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,7 +14,7 @@ export class KritzelBrushStyle {
|
|
|
14
14
|
value: option.value,
|
|
15
15
|
label: option.label,
|
|
16
16
|
}));
|
|
17
|
-
return (h(Host, { key: '
|
|
17
|
+
return (h(Host, { key: '66ecc7850e816be6f0c38e2a53d96493e8141a7c' }, h("kritzel-dropdown", { key: '792caa0c4ff4c8ee3c5dfd404ba5456e6a4c16e4', options: dropdownOptions, value: this.type, onValueChanged: event => this.handleDropdownValueChange(event) }, h("button", { key: '7c82f747c86846c19635be47c797371300855f5e', class: "brush-style-button", slot: "prefix" }, h("kritzel-icon", { key: '59d4863c0660d0c6281031321e11518c57d8ae71', name: this.type, size: 16 })))));
|
|
18
18
|
}
|
|
19
19
|
static get is() { return "kritzel-brush-style"; }
|
|
20
20
|
static get encapsulation() { return "shadow"; }
|
|
@@ -15,11 +15,11 @@ export class KritzelButton {
|
|
|
15
15
|
this.buttonClick.emit();
|
|
16
16
|
};
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: '3a285bfdc1b336fb450304856aa81c1bd9c4e5e3' }, h("button", { key: 'f3119bfe9cf8ca1b6e031cdcc8bee9549c18e620', type: this.type, class: {
|
|
19
19
|
'kritzel-button': true,
|
|
20
20
|
[this.variant]: true,
|
|
21
21
|
'disabled': this.disabled,
|
|
22
|
-
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '
|
|
22
|
+
}, disabled: this.disabled, onClick: this.handleClick }, h("slot", { key: '5a26eee0781c5fafc7a41260364b2a2c11f192a6' }))));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "kritzel-button"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -38,13 +38,13 @@ export class KritzelColorComponent {
|
|
|
38
38
|
render() {
|
|
39
39
|
const resolvedColor = this.resolveColor();
|
|
40
40
|
const isColorVeryLight = this.isLightColor(resolvedColor);
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '7e36e97c383cff73b3146279e971526dd5c7f0f7' }, h("div", { key: 'e8ad3ca5e9771c51a96a846627ea20c75212ceeb', class: "checkerboard-bg", style: {
|
|
42
42
|
width: `${this.size}px`,
|
|
43
43
|
height: `${this.size}px`,
|
|
44
44
|
borderRadius: '50%',
|
|
45
45
|
display: 'inline-block',
|
|
46
46
|
position: 'relative',
|
|
47
|
-
} }, h("div", { key: '
|
|
47
|
+
} }, h("div", { key: '9269087c7694604d70d50d846cedb6ce022373cd', class: {
|
|
48
48
|
'color-circle': true,
|
|
49
49
|
'white': isColorVeryLight,
|
|
50
50
|
}, style: {
|
|
@@ -33,7 +33,7 @@ export class KritzelColorPalette {
|
|
|
33
33
|
render() {
|
|
34
34
|
const displayedColors = this.isExpanded ? this.colors : this.colors.slice(0, 6);
|
|
35
35
|
const expandedHeight = this.isExpanded ? this.calculateHeight() : '32px';
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: '22b6f0362933848cd40ad44c73a48fd4d8330884' }, h("div", { key: '38adb9abc39d78ae9528341212acf2de425b4eb8', class: {
|
|
37
37
|
'color-grid': true,
|
|
38
38
|
'expanded': this.isExpanded,
|
|
39
39
|
}, style: {
|
|
@@ -231,7 +231,7 @@ export class KritzelDropdown {
|
|
|
231
231
|
'open-up': this.openDirection === 'up',
|
|
232
232
|
'open-down': this.openDirection === 'down',
|
|
233
233
|
};
|
|
234
|
-
return (h(Host, { key: '
|
|
234
|
+
return (h(Host, { key: 'b753a3cf28a0f21625c213c9ec5337b922023206' }, h("div", { key: 'dffe30b1d6968ad612c94718eea72f118c43f378', class: "dropdown-wrapper", ref: el => (this.wrapperElement = el) }, h("slot", { key: '0a08fa5aa5a2040e85ac80643d11ec778ed89b31', name: "prefix", ref: el => (this.prefixSlotElement = el), onSlotchange: this.evaluatePrefixContent }), h("div", { key: '8a8b4519787863d53fa7c72928e7632de6daa848', class: "dropdown-container", style: { width: this.width } }, h("button", { key: '803fe1e4ef138a58cde8941771875dd5eadfe944', type: "button", class: triggerClasses, style: { ...this.selectStyles, ...this.getSelectedStyle() }, onClick: this.toggleMenu, onKeyDown: this.handleTriggerKeyDown, "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', ref: el => (this.triggerElement = el) }, h("span", { key: '05d9dfe94e62134c91316f33cf64f2a9efb57fbb', class: "dropdown-trigger-label" }, this.getSelectedLabel()), h("span", { key: '332d5206a67ae8ef4ce0982d62c108210bca6252', class: "dropdown-trigger-arrow", "aria-hidden": "true" }, h("svg", { key: 'f73539b0decf59fd59d075618dc5028ac82d11b5', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polyline", { key: '7b45a14ab898233a68845a40363ee37c9922098c', points: "6 9 12 15 18 9" }))))), h("slot", { key: '8936739a53b5dca8debdce27c4bead487a5bf803', name: "suffix", ref: el => (this.suffixSlotElement = el), onSlotchange: this.evaluateSuffixContent }), h("ul", { key: 'f20417649f8988e46db5992100d93fd7bd827b96', class: menuClasses, role: "listbox", tabindex: "-1", onKeyDown: this.handleMenuKeyDown, ref: el => (this.menuElement = el) }, this.options.map((option, index) => {
|
|
235
235
|
const isSelected = option.value === this.internalValue;
|
|
236
236
|
const isFocused = index === this.focusedIndex;
|
|
237
237
|
const optionClasses = {
|
|
@@ -4,7 +4,7 @@ export class KritzelFont {
|
|
|
4
4
|
size = 24;
|
|
5
5
|
color = '#000000';
|
|
6
6
|
render() {
|
|
7
|
-
return (h(Host, { key: '
|
|
7
|
+
return (h(Host, { key: '3d5fd9aecf7abc96c438b890f5831281d6194922' }, h("div", { key: '2b3df82e475177e803f172f440ffcee97dbe5aa5', class: "font-preview", style: {
|
|
8
8
|
fontFamily: this.fontFamily,
|
|
9
9
|
fontSize: `${this.size}px`,
|
|
10
10
|
color: this.color
|
|
@@ -16,7 +16,7 @@ export class KritzelFontSize {
|
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
18
|
const color = 'var(--kritzel-global-text-primary)';
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '32615ac4756efd047219b93642f7b5cc7d80669b' }, this.sizes.map(size => (h("div", { tabIndex: 0, class: {
|
|
20
20
|
'size-container': true,
|
|
21
21
|
'selected': this.selectedSize === size,
|
|
22
22
|
}, onClick: () => this.handleSizeClick(size), onKeyDown: event => this.handleKeyDown(event, size) }, h("kritzel-font", { fontFamily: this.fontFamily, size: size, color: color }))))));
|
|
@@ -28,7 +28,7 @@ export class KritzelInput {
|
|
|
28
28
|
this.valueChange.emit(input.value);
|
|
29
29
|
};
|
|
30
30
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: '5cfc93853afd27dd24ff9709dcd277571ae4d0a1' }, h("div", { key: 'fa0a43610b98ffbc30bf9485a4f8730b80f74ab7', class: "input-container" }, this.label && h("label", { key: '151346732ef4a00a1ea78bbc19ac56a94488dfc4', class: "input-label" }, this.label), h("div", { key: '79b28f6f45cdacf7d122988bb4c844c929544cce', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, h("input", { key: 'e22abd0e10ee231b2e66f50085693769584a1254', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && h("span", { key: '5c96287d24dc28f4ac321f108a356527194f4e81', class: "input-suffix" }, this.suffix)))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "kritzel-input"; }
|
|
34
34
|
static get encapsulation() { return "shadow"; }
|
|
@@ -90,15 +90,15 @@ export class KritzelMasterDetail {
|
|
|
90
90
|
const selectedItem = this.items.find(item => item.id === this.selectedItemId);
|
|
91
91
|
const panelId = 'master-detail-panel';
|
|
92
92
|
const selectedTabId = selectedItem ? `tab-${selectedItem.id}` : undefined;
|
|
93
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: '25913464ef131f1332146a5372c0caf9f7050f24' }, h("div", { key: '206346f9bee671f1b283ebfaca4c4401706a074f', class: {
|
|
94
94
|
'master-detail-container': true,
|
|
95
95
|
'is-mobile-detail-visible': this.showMobileDetail,
|
|
96
|
-
} }, h("nav", { key: '
|
|
96
|
+
} }, h("nav", { key: 'f4cf41f060d1d25887d2b11a264de040e878d25c', class: "master-menu", role: "tablist", "aria-orientation": "vertical", "aria-label": "Settings categories" }, this.items.map((item, index) => (h("button", { key: item.id, id: `tab-${item.id}`, ref: el => this.setTabRef(el, index), class: {
|
|
97
97
|
'menu-item': true,
|
|
98
98
|
'is-selected': item.id === this.selectedItemId,
|
|
99
99
|
'is-disabled': !!item.disabled,
|
|
100
100
|
'is-focused': index === this.focusedIndex,
|
|
101
|
-
}, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index), onFocus: () => this.handleFocus(index), onBlur: this.handleBlur }, item.icon && (h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), h("span", { class: "menu-item-label" }, item.label), h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m9 18 6-6-6-6" }))))))), h("div", { key: '
|
|
101
|
+
}, role: "tab", "aria-selected": item.id === this.selectedItemId ? 'true' : 'false', "aria-controls": panelId, "aria-disabled": item.disabled ? 'true' : undefined, tabIndex: this.getTabIndex(item, index), disabled: item.disabled, onClick: () => this.handleItemClick(item), onKeyDown: e => this.handleKeyDown(e, item, index), onFocus: () => this.handleFocus(index), onBlur: this.handleBlur }, item.icon && (h("kritzel-icon", { name: item.icon, size: 20, class: "menu-item-icon" })), h("span", { class: "menu-item-label" }, item.label), h("span", { class: "menu-item-chevron", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m9 18 6-6-6-6" }))))))), h("div", { key: 'efb20b2c1c6dfcf03bee2c1ef06c2c7a6de27e7a', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, h("button", { key: '13b97670c0c0b7f8fe493438d26179cd5039cd9c', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, h("kritzel-icon", { key: '6a52e00dd7fc61bcacce71127bf78637bbff7e30', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), h("slot", { key: '99bd31682d0e8accc6c2eacfcbaf6778f3b92d05' })))));
|
|
102
102
|
}
|
|
103
103
|
static get is() { return "kritzel-master-detail"; }
|
|
104
104
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,7 +51,7 @@ export class KritzelMenu {
|
|
|
51
51
|
this.itemCloseChildMenu.emit(event.detail);
|
|
52
52
|
};
|
|
53
53
|
render() {
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: '9a14983012bb0c286a17811d3e3c41743799c560', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && h("div", { key: '0540a587c117a09857e9d87b65e019c8fa85c694', class: "has-open-child-overlay", onClick: this.onOverlayClick }), this.items.map(item => (h("kritzel-menu-item", { key: item.id, item: item, parent: this.parent, style: { pointerEvents: this.editingMenuItem && !item.isEditing ? 'none' : 'auto' }, onItemSelect: this.handleItemSelect, onItemSave: this.handleSave, onItemCancel: this.handleCancel, onItemToggleChildMenu: this.handleToggleChildMenu, onItemCloseChildMenu: this.handleCloseChildMenu })))));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "kritzel-menu"; }
|
|
57
57
|
static get encapsulation() { return "shadow"; }
|
|
@@ -90,12 +90,12 @@ export class KritzelMenuItem {
|
|
|
90
90
|
];
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: '5a0d685c83cb3f82e64e74feef124ae0c9bca162', tabIndex: this.item.isDisabled ? -1 : 0, class: {
|
|
94
94
|
'selected': this.item.isSelected,
|
|
95
95
|
'editing': this.item.isEditing,
|
|
96
96
|
'disabled': this.item.isDisabled,
|
|
97
97
|
'child-open': this.item.isChildMenuOpen,
|
|
98
|
-
}, onClick: this.handleItemSelect }, h("div", { key: '
|
|
98
|
+
}, onClick: this.handleItemSelect }, h("div", { key: '02415ff1e0abf326ae284ed5b31b2a0241d4c7e2', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
|
|
99
99
|
}
|
|
100
100
|
static get is() { return "kritzel-menu-item"; }
|
|
101
101
|
static get encapsulation() { return "shadow"; }
|
|
@@ -86,7 +86,7 @@ export class KritzelNumericInput {
|
|
|
86
86
|
this.valueChange.emit(newValue);
|
|
87
87
|
};
|
|
88
88
|
render() {
|
|
89
|
-
return (h(Host, { key: '
|
|
89
|
+
return (h(Host, { key: '9f5b165e9c4db1cc6724020e12d18beb0a70ad11' }, h("div", { key: 'e5e3d790f9d9bd7bb2d25367bb7d7d86c731091f', class: "input-container" }, this.label && h("label", { key: '0ee62b45cbfe34405a888d0d61af472936b0a453', class: "input-label" }, this.label), h("div", { key: '49bbdca156346c1e0dd7b08d6790ae5829fa6d1f', class: "input-wrapper" }, h("input", { key: '986e05275c90bee119ff3c803d90ba16a0005f8d', type: "number", class: "numeric-input", title: "", min: this.min === Number.MIN_SAFE_INTEGER ? undefined : this.min, max: this.max === Number.MAX_SAFE_INTEGER ? undefined : this.max, step: this.step, value: this.inputValue, placeholder: this.placeholder, onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, onInvalid: this.handleInvalid }), h("div", { key: '4c468fdca0018390bdc57f1b2fd7fa2e68b09f98', class: "spinner-buttons" }, h("button", { key: '7b433424c6817049b6229e249d715ebd43dfe350', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, h("svg", { key: '666b0c184d00d000a1fa97d4bdda3a9a6b0d299d', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: '223f829a0b808e9fdde656294729121e2c8ae0d3', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { key: '40f72b01e59b98c7bca4952c94eeb631fe3d17a1', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, h("svg", { key: '5f304877010fc9fa1c7559270b5105659b2f4863', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: 'e31b6f1edb583eebbf608fc5360c53d49d4d2d5c', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
|
|
90
90
|
}
|
|
91
91
|
static get is() { return "kritzel-numeric-input"; }
|
|
92
92
|
static get encapsulation() { return "shadow"; }
|
|
@@ -22,7 +22,7 @@ export class KritzelOpacitySlider {
|
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
24
|
const percentage = this.getPercentage();
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: 'a0307b2fc97221881f0e2a21035427fcf0c5fdb3' }, h("div", { key: 'a77c6e973f92671daa3a8299b51d70b2d2fd98db', class: "opacity-container" }, h("div", { key: 'c5df7c6fe6db3aa9a8430ea7580d6cc7a23666b8', class: "slider-wrapper" }, h("input", { key: '6d3cae027e5a9b391f36ede911dedb201630d525', type: "range", class: "opacity-slider", min: this.min, max: this.max, step: this.step, value: this.value, onInput: (e) => this.handleInput(e), style: {
|
|
26
26
|
'--slider-progress': `${percentage}%`,
|
|
27
27
|
} })))));
|
|
28
28
|
}
|
|
@@ -261,7 +261,7 @@ export class KritzelPortal {
|
|
|
261
261
|
this.portal.style.visibility = 'visible';
|
|
262
262
|
}
|
|
263
263
|
render() {
|
|
264
|
-
return (h(Host, { key: '
|
|
264
|
+
return (h(Host, { key: '70a29385ee7f1bef37f903e1e6821b46fc9a147f', style: { display: this.anchor ? 'block' : 'none' } }, h("slot", { key: '8f50bce48c3aa82abbfc34331f8e80f205a45f03' })));
|
|
265
265
|
}
|
|
266
266
|
static get is() { return "kritzel-portal"; }
|
|
267
267
|
static get encapsulation() { return "shadow"; }
|
|
@@ -21,7 +21,7 @@ export class KritzelSlideToggle {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'fa4a31e3978f5a7187c8e011d58278829f60f912', class: { checked: this.checked, disabled: this.disabled }, tabIndex: this.disabled ? -1 : 0, role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": this.label, onClick: this.handleToggle, onKeyDown: this.handleKeyDown }, h("div", { key: '1ae5a58c6cedf19626cba1e04abe566669582081', class: "toggle-track" }, h("div", { key: 'e11d42017fd624837f9e44f2671b74d38e4d015f', class: "toggle-thumb" }))));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "kritzel-slide-toggle"; }
|
|
27
27
|
static get encapsulation() { return "shadow"; }
|