kritzel-stencil 0.3.18 → 0.3.20

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.
Files changed (159) hide show
  1. package/dist/cjs/index-Xav9JFHg.js +2 -2
  2. package/dist/cjs/index.cjs.js +1 -1
  3. package/dist/cjs/{kritzel-active-users_44.cjs.entry.js → kritzel-active-users_45.cjs.entry.js} +739 -310
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{schema.constants-DrHO_CYF.js → schema.constants-IBG5VW_J.js} +116 -59
  6. package/dist/cjs/stencil.cjs.js +1 -1
  7. package/dist/collection/classes/core/core.class.js +22 -210
  8. package/dist/collection/classes/handlers/key.handler.js +1 -22
  9. package/dist/collection/classes/managers/browser-permission.manager.js +64 -0
  10. package/dist/collection/classes/managers/clipboard.manager.js +401 -0
  11. package/dist/collection/classes/objects/image.class.js +42 -0
  12. package/dist/collection/classes/tools/image-tool.class.js +1 -59
  13. package/dist/collection/collection-manifest.json +1 -0
  14. package/dist/collection/components/core/kritzel-editor/kritzel-editor.css +53 -0
  15. package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +133 -53
  16. package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +101 -43
  17. package/dist/collection/components/core/kritzel-watermark/kritzel-watermark.js +1 -1
  18. package/dist/collection/components/shared/kritzel-avatar/kritzel-avatar.js +3 -3
  19. package/dist/collection/components/shared/kritzel-button/kritzel-button.js +2 -2
  20. package/dist/collection/components/shared/kritzel-color/kritzel-color.js +2 -2
  21. package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js +1 -1
  22. package/dist/collection/components/shared/kritzel-font/kritzel-font.js +1 -1
  23. package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js +1 -1
  24. package/dist/collection/components/shared/kritzel-input/kritzel-input.js +1 -1
  25. package/dist/collection/components/shared/kritzel-master-detail/kritzel-master-detail.js +3 -3
  26. package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js +1 -1
  27. package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js +2 -2
  28. package/dist/collection/components/shared/kritzel-numeric-input/kritzel-numeric-input.js +1 -1
  29. package/dist/collection/components/shared/kritzel-opacity-slider/kritzel-opacity-slider.js +1 -1
  30. package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +1 -1
  31. package/dist/collection/components/shared/kritzel-slide-toggle/kritzel-slide-toggle.js +1 -1
  32. package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.js +1 -1
  33. package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js +1 -1
  34. package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +2 -2
  35. package/dist/collection/components/ui/kritzel-back-to-content/kritzel-back-to-content.js +1 -1
  36. package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +6 -6
  37. package/dist/collection/components/ui/kritzel-current-user/kritzel-current-user.js +1 -1
  38. package/dist/collection/components/ui/kritzel-current-user-dialog/kritzel-current-user-dialog.js +1 -1
  39. package/dist/collection/components/ui/kritzel-export/kritzel-export.js +1 -1
  40. package/dist/collection/components/ui/kritzel-login-dialog/kritzel-login-dialog.js +1 -1
  41. package/dist/collection/components/ui/kritzel-more-menu/kritzel-more-menu.js +1 -1
  42. package/dist/collection/components/ui/kritzel-notification-card/kritzel-notification-card.css +101 -0
  43. package/dist/collection/components/ui/kritzel-notification-card/kritzel-notification-card.js +173 -0
  44. package/dist/collection/components/ui/kritzel-settings/kritzel-settings.js +1 -1
  45. package/dist/collection/components/ui/kritzel-share-dialog/kritzel-share-dialog.js +2 -2
  46. package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +1 -1
  47. package/dist/collection/components/ui/kritzel-zoom-panel/kritzel-zoom-panel.js +1 -1
  48. package/dist/collection/configs/default-engine-config.js +0 -1
  49. package/dist/collection/constants/version.js +1 -1
  50. package/dist/collection/interfaces/notification.interface.js +1 -0
  51. package/dist/collection/themes/dark-theme.js +36 -0
  52. package/dist/collection/themes/light-theme.js +36 -0
  53. package/dist/components/index.d.ts +2 -0
  54. package/dist/components/index.js +1 -1
  55. package/dist/components/kritzel-active-users.js +1 -1
  56. package/dist/components/kritzel-avatar.js +1 -1
  57. package/dist/components/kritzel-awareness-cursors.js +1 -1
  58. package/dist/components/kritzel-back-to-content.js +1 -1
  59. package/dist/components/kritzel-button.js +1 -1
  60. package/dist/components/kritzel-color-palette.js +1 -1
  61. package/dist/components/kritzel-color.js +1 -1
  62. package/dist/components/kritzel-controls.js +1 -1
  63. package/dist/components/kritzel-current-user-dialog.js +1 -1
  64. package/dist/components/kritzel-current-user.js +1 -1
  65. package/dist/components/kritzel-editor.js +1 -1
  66. package/dist/components/kritzel-engine.js +1 -1
  67. package/dist/components/kritzel-export.js +1 -1
  68. package/dist/components/kritzel-font-size.js +1 -1
  69. package/dist/components/kritzel-font.js +1 -1
  70. package/dist/components/kritzel-input.js +1 -1
  71. package/dist/components/kritzel-login-dialog.js +1 -1
  72. package/dist/components/kritzel-master-detail.js +1 -1
  73. package/dist/components/kritzel-menu-item.js +1 -1
  74. package/dist/components/kritzel-menu.js +1 -1
  75. package/dist/components/kritzel-more-menu.js +1 -1
  76. package/dist/components/kritzel-notification-card.d.ts +11 -0
  77. package/dist/components/kritzel-notification-card.js +1 -0
  78. package/dist/components/kritzel-numeric-input.js +1 -1
  79. package/dist/components/kritzel-opacity-slider.js +1 -1
  80. package/dist/components/kritzel-portal.js +1 -1
  81. package/dist/components/kritzel-settings.js +1 -1
  82. package/dist/components/kritzel-share-dialog.js +1 -1
  83. package/dist/components/kritzel-slide-toggle.js +1 -1
  84. package/dist/components/kritzel-split-button.js +1 -1
  85. package/dist/components/kritzel-stroke-size.js +1 -1
  86. package/dist/components/kritzel-tool-config.js +1 -1
  87. package/dist/components/kritzel-tooltip.js +1 -1
  88. package/dist/components/kritzel-utility-panel.js +1 -1
  89. package/dist/components/kritzel-watermark.js +1 -1
  90. package/dist/components/kritzel-workspace-manager.js +1 -1
  91. package/dist/components/kritzel-zoom-panel.js +1 -1
  92. package/dist/components/{p-BvRrA4hN.js → p-6Ca7Eolf.js} +1 -1
  93. package/dist/components/{p-BpnIvNvq.js → p-BO1CnEOT.js} +1 -1
  94. package/dist/components/{p-CyqRcqsO.js → p-BPoDE87Q.js} +1 -1
  95. package/dist/components/p-BX-nQAyH.js +1 -0
  96. package/dist/components/{p-DNdXJp8F.js → p-Bg0xIZiR.js} +1 -1
  97. package/dist/components/{p-DmWSRsjK.js → p-BhODnvMO.js} +1 -1
  98. package/dist/components/{p-mz3pUWW4.js → p-Bm0aKWPw.js} +1 -1
  99. package/dist/components/{p-3HxnBrCM.js → p-BrAeYciD.js} +1 -1
  100. package/dist/components/{p-f8aW1ye7.js → p-BwuemYET.js} +1 -1
  101. package/dist/components/{p-U4oawa1x.js → p-C-RiEw9X.js} +1 -1
  102. package/dist/components/{p-DdH1cKED.js → p-C1jg5IQi.js} +1 -1
  103. package/dist/components/{p-SDZNC8GF.js → p-C4-Som48.js} +1 -1
  104. package/dist/components/{p-C9HGoDHE.js → p-C5TZjIE1.js} +1 -1
  105. package/dist/components/{p-7NsK0uHu.js → p-CC0J_kEP.js} +1 -1
  106. package/dist/components/{p-CIcLzcfA.js → p-CJEIUs0x.js} +1 -1
  107. package/dist/components/{p-Bzv9Px8v.js → p-CO0eEzos.js} +1 -1
  108. package/dist/components/{p-DDkmsPpV.js → p-COdwK_mi.js} +1 -1
  109. package/dist/components/{p-CPtDfadX.js → p-COj8EVzL.js} +1 -1
  110. package/dist/components/{p-CEnEDaix.js → p-CVV-HzFR.js} +1 -1
  111. package/dist/components/{p-6RjeGuvH.js → p-Cb5YwXbC.js} +1 -1
  112. package/dist/components/{p-DX5K8xnh.js → p-CbMLbDou.js} +1 -1
  113. package/dist/components/{p-DZdgXCAx.js → p-CdkNxxut.js} +1 -1
  114. package/dist/components/{p-BKJSh8qQ.js → p-CpR9lc-o.js} +1 -1
  115. package/dist/components/p-CpzicliK.js +1 -0
  116. package/dist/components/{p-IpoC5EEY.js → p-D0RYktBV.js} +1 -1
  117. package/dist/components/{p-DI4vQRE3.js → p-D0v9WP5w.js} +1 -1
  118. package/dist/components/{p-DgmtCdnL.js → p-D28ZylHn.js} +1 -1
  119. package/dist/components/{p-F5_X4dZG.js → p-DEpnJBA3.js} +1 -1
  120. package/dist/components/{p-BCNyR5Sw.js → p-DRsD38Nl.js} +1 -1
  121. package/dist/components/p-DWhWFDcC.js +9 -0
  122. package/dist/components/{p-Dz-Ti24X.js → p-DeqALrzV.js} +1 -1
  123. package/dist/components/{p-BKvHg9cv.js → p-Ndib1Jb3.js} +1 -1
  124. package/dist/components/{p-vAeiXe6c.js → p-NwN6r0N0.js} +1 -1
  125. package/dist/components/{p-NuLP1xHe.js → p-W1ZwImdd.js} +1 -1
  126. package/dist/components/{p-Jn6TNdfe.js → p-YFR180v-.js} +1 -1
  127. package/dist/components/p-pagW8YF7.js +1 -0
  128. package/dist/components/{p-v7dxxrL5.js → p-vf28uSsc.js} +1 -1
  129. package/dist/esm/index-Dhio9uis.js +2 -2
  130. package/dist/esm/index.js +2 -2
  131. package/dist/esm/{kritzel-active-users_44.entry.js → kritzel-active-users_45.entry.js} +739 -311
  132. package/dist/esm/loader.js +1 -1
  133. package/dist/esm/{schema.constants-DchTXG3V.js → schema.constants-D35cwCYd.js} +116 -60
  134. package/dist/esm/stencil.js +1 -1
  135. package/dist/stencil/index.esm.js +1 -1
  136. package/dist/stencil/p-D35cwCYd.js +1 -0
  137. package/dist/stencil/p-e8e69a16.entry.js +9 -0
  138. package/dist/stencil/stencil.esm.js +1 -1
  139. package/dist/types/classes/core/core.class.d.ts +16 -19
  140. package/dist/types/classes/handlers/key.handler.d.ts +1 -1
  141. package/dist/types/classes/managers/browser-permission.manager.d.ts +41 -0
  142. package/dist/types/classes/managers/clipboard.manager.d.ts +86 -0
  143. package/dist/types/classes/objects/image.class.d.ts +10 -0
  144. package/dist/types/classes/tools/image-tool.class.d.ts +0 -14
  145. package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +20 -1
  146. package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +8 -4
  147. package/dist/types/components/ui/kritzel-notification-card/kritzel-notification-card.d.ts +22 -0
  148. package/dist/types/components.d.ts +83 -9
  149. package/dist/types/constants/version.d.ts +1 -1
  150. package/dist/types/interfaces/engine-state.interface.d.ts +0 -3
  151. package/dist/types/interfaces/notification.interface.d.ts +10 -0
  152. package/dist/types/interfaces/theme.interface.d.ts +43 -0
  153. package/package.json +8 -2
  154. package/readme.md +7 -111
  155. package/dist/components/p-Bc55X65h.js +0 -1
  156. package/dist/components/p-C_fKgKHu.js +0 -9
  157. package/dist/components/p-Cu9KYyoq.js +0 -1
  158. package/dist/stencil/p-86348986.entry.js +0 -9
  159. package/dist/stencil/p-DchTXG3V.js +0 -1
@@ -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: '9910a765816f45d420ad27c8fc7b02811380783b' }, h("div", { key: '91f3dae04338f55ab21831e4cac65f9d855c58c6', class: {
36
+ return (h(Host, { key: '6d003ec5b92f586532782144c25ca5a733741f20' }, h("div", { key: '031838b45da4916aa91d87c066ac950cfe3a1ddc', class: {
37
37
  'color-grid': true,
38
38
  'expanded': this.isExpanded,
39
39
  }, style: {
@@ -4,7 +4,7 @@ export class KritzelFont {
4
4
  size = 24;
5
5
  color = '#000000';
6
6
  render() {
7
- return (h(Host, { key: '49c44f7fef61bd7116e63bbe9522b0a0e22de116' }, h("div", { key: '4d130682f67e9c0d758cb6194e6a95f15bceb2ee', class: "font-preview", style: {
7
+ return (h(Host, { key: 'e37350dd092fb7c81a5624bfdc39c3b9af66b894' }, h("div", { key: 'a962ccc23a48f62b86d49ae41b1c9c27bdc9a5b9', class: "font-preview", style: {
8
8
  fontFamily: this.fontFamily,
9
9
  fontSize: `${this.size}px`,
10
10
  color: this.color
@@ -17,7 +17,7 @@ export class KritzelFontSize {
17
17
  render() {
18
18
  const color = 'var(--kritzel-global-text-primary)';
19
19
  const sizes = this.sizes ?? [];
20
- return (h(Host, { key: '2083b05b3fdc9940c26dd90dbf9e097564ee976d' }, sizes.map(size => (h("div", { tabIndex: 0, class: {
20
+ return (h(Host, { key: 'a314e990b56cb4e819c4d83a139016b1658606b8' }, sizes.map(size => (h("div", { tabIndex: 0, class: {
21
21
  'size-container': true,
22
22
  'selected': this.selectedSize === size,
23
23
  }, 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: '8584ea0fa1a2cf0b9518ea978303837da5bfaf31' }, h("div", { key: 'e9f3ac340f17580221d1a86c8eb913fce2acdf49', class: "input-container" }, this.label && h("label", { key: 'b0d4c0250b07d83a3cd99e0ab18ed672a29de5f0', class: "input-label" }, this.label), h("div", { key: '5044bcff621d6c6850ef3d225608427401b75ebd', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, h("input", { key: 'f8d057840e975d900c37a891268f39edb5128d49', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && h("span", { key: '4ae299b88798767b13e7126f88d3bd4703c91938', class: "input-suffix" }, this.suffix)))));
31
+ return (h(Host, { key: '7e16272802a5485207721f4f01ddf8e956b56dac' }, h("div", { key: 'ab60dacd08c6199db507d896c00cd0c788ecf7fa', class: "input-container" }, this.label && h("label", { key: 'e2e5769ca2954442da5a0f2a2abb07847986eac8', class: "input-label" }, this.label), h("div", { key: 'e7131f6d1a770cf71de9f7086e3a8a092296b80e', class: { 'input-wrapper': true, 'has-suffix': !!this.suffix } }, h("input", { key: '565cb30ed36818badc148475c596b468cdd2a65b', type: this.type, class: "text-input", value: this.inputValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput }), this.suffix && h("span", { key: 'ec4afb63443b6c89a829e515df7d33066f0f8def', 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: '6429c72aaf47f08ba0bdf5e64829b133339dafab' }, h("div", { key: '02e4616c67843632d2291abe347ee6ef7a660b12', class: {
93
+ return (h(Host, { key: 'e094bc3df0e0d1598e84c9a17a033079b1db33f6' }, h("div", { key: '79509ba5d63703fe36650b07b5172f77bd6eafde', class: {
94
94
  'master-detail-container': true,
95
95
  'is-mobile-detail-visible': this.showMobileDetail,
96
- } }, h("nav", { key: '35cf3e8f97819a313fa6c57cde0faf05677997eb', 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: {
96
+ } }, h("nav", { key: '79d200d8c2e54789a33fc88b07c48f034de140ad', 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: 'cc7c69eb7ef02096fb76dbce310740d21019e72f', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, h("button", { key: 'd10898c7eb8ec6d993024c7833e1f765a7b93079', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, h("kritzel-icon", { key: '5395af1bce2b91ade970ad68b1bb87b59e771dff', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), h("slot", { key: '7a5a1ef33081c117f1b16f1da887577bd97d3681' })))));
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: '642b65781509d192330bb2602dd081585d16f76d', id: panelId, class: "detail-panel", role: "tabpanel", "aria-labelledby": selectedTabId }, h("button", { key: '18a922dbaad63f05bc3ca7de176de4996b5d7fcb', class: "mobile-back-button", onClick: this.handleBackClick, "aria-label": "Back to menu" }, h("kritzel-icon", { key: 'b31732cef2ffdb78e67be7ab793aaaf60e373763', name: "chevron-left", size: 20, class: "mobile-back-icon" }), "Back"), h("slot", { key: '48fe4ae631a8c0b2db9e4a232edb6300d603562c' })))));
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: '4e4e510d2b1b5834ba12739d95e7c33268c005a6', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && h("div", { key: 'ee60d7f4ceefda5fcdcfb64956b20d42b703c231', class: "has-open-child-overlay", onClick: this.onOverlayClick }), this.items.map(item => (h("kritzel-menu-item", { key: item.id, "data-testid": `menu-item-${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 })))));
54
+ return (h(Host, { key: '6dfdc7928ae69aa191b2c64f9db79801e6978e92', tabIndex: 0, onClick: e => e.stopPropagation() }, this.openChildMenuItem && h("div", { key: 'ab8fa25f1b6ee0b7960cb0df84c40b1a7648c4e9', class: "has-open-child-overlay", onClick: this.onOverlayClick }), this.items.map(item => (h("kritzel-menu-item", { key: item.id, "data-testid": `menu-item-${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: 'ac91e3534c71074634ba053adc02f924e3fb5e14', tabIndex: this.item.isDisabled ? -1 : 0, class: {
93
+ return (h(Host, { key: 'dbdcfcee7fd36fe0b9c405dd3d1641aa62465e53', 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: 'f49cf8a96f7394e244ce53d3933137325221d578', class: "menu-item-overlay" }), this.item.isEditing ? this.renderEditMode() : this.renderViewMode()));
98
+ }, onClick: this.handleItemSelect }, h("div", { key: 'ef97c7cf48190c1bbdde0dd9011cc1d5674b7c94', 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: '3679786121f22a0aacb1b57701764b0bd0bf02f5' }, h("div", { key: 'e88251c356332f29d93f6a3d82f5154188243e4c', class: "input-container" }, this.label && h("label", { key: 'cb4d64a5acf94794a5876bc61dc13dd8159ad055', class: "input-label" }, this.label), h("div", { key: '9faad300f263e871322b68635feefb08172bd15c', class: "input-wrapper" }, h("input", { key: 'dd58ade6fe8454a3e4f67fddbb135d279f1147a8', 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: 'a959beb441fe2143dc9c1c69347194e024362927', class: "spinner-buttons" }, h("button", { key: '6e2129f36080317e68b6fe1c05e69ea4e655fd20', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, h("svg", { key: '47b5e178f82ef4eb6f2c5d888496ed95683c2f6d', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: '6d5eb31ac5829b1e024822786beaafd347081c7e', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { key: '5a897f0b29ce89d5bd94327d2055753d06148c89', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, h("svg", { key: '19ff176c07e1c2a18f708debc7c7f3953f2219cb', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: '0c1289eb009b62ea36f7397811f553a4e7e669f6', d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))))))));
89
+ return (h(Host, { key: '008f18fc5ab81adcd82364706ca7d4c39ea39d77' }, h("div", { key: '5d91b2ec6e0458d186d923c422e8f6461ac7c51a', class: "input-container" }, this.label && h("label", { key: '45c911f1e11ff8289ab876192511f506eb65c940', class: "input-label" }, this.label), h("div", { key: 'f5e0bd1610a4085a291cc1d32787b68066757c69', class: "input-wrapper" }, h("input", { key: '897b1af7725f59df86a530836dda802e8cb04038', 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: '1acab70c82ff7431f916685084a6e5dd827cdca3', class: "spinner-buttons" }, h("button", { key: 'd93c4bec338d49ead87897baf61d2e036999a035', type: "button", class: "spinner-button spinner-up", onClick: this.handleIncrement, tabIndex: -1, "aria-label": "Increase value" }, h("svg", { key: '1e52d43c1eb1e9a43025302a7cd1f3d74c038c36', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: '2a96516390bd9caf5b6a3617d07f7b10e2b42451', d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.5", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { key: '038cf61f4b8982a17bf5c279d78556872a03efea', type: "button", class: "spinner-button spinner-down", onClick: this.handleDecrement, tabIndex: -1, "aria-label": "Decrease value" }, h("svg", { key: '30110c2ad975b51049a902953c52be66c1b7b0af', viewBox: "0 0 10 6", class: "spinner-icon" }, h("path", { key: '5abe735234debfa80a983d2fb60eeeaedb1dbf9b', 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: '9b580f61b9113950b7dff5339879374f7882e1bd' }, h("div", { key: '80fb336580c49d4d7026993499b9c008ac2a4594', class: "opacity-container" }, h("div", { key: 'fcdd8e523d5f2ff4758a4839f2f43cbdabba4c5a', class: "slider-wrapper" }, h("input", { key: '914473676adc7cb8974c55b82ba1abf5b2787288', type: "range", class: "opacity-slider", min: this.min, max: this.max, step: this.step, value: this.value, onInput: (e) => this.handleInput(e), style: {
25
+ return (h(Host, { key: 'e3a18981e5193ecd1ffaae5c807bdf6fa67e9695' }, h("div", { key: 'ee5ff0bb1355ca4f7e5d727ab8861933259c1a82', class: "opacity-container" }, h("div", { key: '6362fb3dba6910c55f5fe3b2a4245bcbb33dcdbb', class: "slider-wrapper" }, h("input", { key: 'f435f00fff7cc17ccdc181f39b29e032f6c5bf8d', 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
  '--kritzel-opacity-slider-thumb-border-color': this.previewColor,
28
28
  } })))));
@@ -277,7 +277,7 @@ export class KritzelPortal {
277
277
  this.portal.style.visibility = 'visible';
278
278
  }
279
279
  render() {
280
- return (h(Host, { key: 'f4ee3156b094ff1126db417f8396ca6cd0eb9aa4', style: { display: this.anchor ? 'block' : 'none' } }, h("slot", { key: '87812f4ddd50a29c8a76938e8778500a4873a30c' })));
280
+ return (h(Host, { key: '95fbfde070f33a7f1b59026de7c687a2f6d0119c', style: { display: this.anchor ? 'block' : 'none' } }, h("slot", { key: '14af59a35c5caf71079f7afb5ea6f4c5f13b05f8' })));
281
281
  }
282
282
  static get is() { return "kritzel-portal"; }
283
283
  static get encapsulation() { return "shadow"; }
@@ -21,7 +21,7 @@ export class KritzelSlideToggle {
21
21
  }
22
22
  };
23
23
  render() {
24
- return (h(Host, { key: '92aefb30139abd512c02c99f5c532cb69daab8c3', 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: '53fc90f3a11055e0b16358be0e3beed2ed25bc48', class: "toggle-track" }, h("div", { key: 'e0a0cecb9ede9c8e932cbb6fa7cdc359c07be8db', class: "toggle-thumb" }))));
24
+ return (h(Host, { key: '5850c758ccf3263b21c397219bf2301fa088087d', 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: 'df0adeca0447a13d5499219ac9d27b526252fdbe', class: "toggle-track" }, h("div", { key: '3938239bbdca29e62ed72229dfcf1904fcbaa983', class: "toggle-thumb" }))));
25
25
  }
26
26
  static get is() { return "kritzel-slide-toggle"; }
27
27
  static get encapsulation() { return "shadow"; }
@@ -82,7 +82,7 @@ export class KritzelSplitButton {
82
82
  this.menuScrollTop = event.target.scrollTop;
83
83
  };
84
84
  render() {
85
- return (h(Host, { key: '39516b2486a27534273b6bf4def6b11790aa0ed5', class: { mobile: this.isTouchDevice } }, h("button", { key: '19c4a58deb3992857b0e42e4a035a15d0980da22', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && h("kritzel-icon", { key: '4c8e7e09e60717b1653251468c2a25d41c4b1921', name: this.buttonIcon })), h("div", { key: '53617db6b630dfb5320e7309dcbc9f7288ff8974', class: "split-divider" }), h("button", { key: '5134f88ed43558ff0cb11b8ef29cf2b370aad4ee', ref: el => (this.splitMenuButtonRef = el), class: "split-menu-button", tabIndex: 0, onClick: this.toggleMenu, disabled: this.menuButtonDisabled, "aria-label": "Open menu" }, h("kritzel-icon", { key: '41f39a601ae91d4faaf54c1ca39c90e27e084d31', name: this.dropdownIcon })), h("kritzel-portal", { key: 'dcfe82f72a53e9346b48d2ff6da236c1f1344f3f', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, h("kritzel-menu", { key: '1208990bff47de642eafa6ca8cfaa76de46ca87c', ref: el => (this.menuRef = el), items: this.items, onItemSelect: this.handleItemSelect, onItemSave: this.handleItemSave, onItemCancel: this.handleItemCancel, onItemToggleChildMenu: this.handleItemToggleChildMenu, onItemCloseChildMenu: this.handleItemCloseChildMenu, onClose: this.closeMenu, onScroll: this.handleScroll }))));
85
+ return (h(Host, { key: 'd6856a86b3be4d9a22c5e78df1bda19113cb988b', class: { mobile: this.isTouchDevice } }, h("button", { key: 'd26026af275a8bd5717254223d5829e3d7f02bcb', class: "split-main-button", tabIndex: 0, onClick: this.handleButtonClick, disabled: this.mainButtonDisabled, "aria-label": "Main action" }, this.buttonIcon && h("kritzel-icon", { key: '1b3e2f4c2f8245b281d0f85458fd6bcc0cc73c59', name: this.buttonIcon })), h("div", { key: 'b002b904e168d62075fa086c88df72e36cc8e8c2', class: "split-divider" }), h("button", { key: 'd39084da6775613f2c896f3fa1ae4e216505bacc', ref: el => (this.splitMenuButtonRef = el), class: "split-menu-button", tabIndex: 0, onClick: this.toggleMenu, disabled: this.menuButtonDisabled, "aria-label": "Open menu" }, h("kritzel-icon", { key: 'b1bc427b0d7cd26a283dbeb772dee0a6d2ca172c', name: this.dropdownIcon })), h("kritzel-portal", { key: 'e76300f48a23772a5923ea2cbd0824590302e7e7', anchor: this.anchorElement, offsetY: 4, onClose: this.closeMenu }, h("kritzel-menu", { key: 'f110b9315ec63dca9bb1b615136b2d3e284567ba', ref: el => (this.menuRef = el), items: this.items, onItemSelect: this.handleItemSelect, onItemSave: this.handleItemSave, onItemCancel: this.handleItemCancel, onItemToggleChildMenu: this.handleItemToggleChildMenu, onItemCloseChildMenu: this.handleItemCloseChildMenu, onClose: this.closeMenu, onScroll: this.handleScroll }))));
86
86
  }
87
87
  static get is() { return "kritzel-split-button"; }
88
88
  static get encapsulation() { return "shadow"; }
@@ -9,7 +9,7 @@ export class KritzelStrokeSize {
9
9
  }
10
10
  render() {
11
11
  const sizes = this.sizes ?? [];
12
- return (h(Host, { key: '20c11daaf60055262706b8177b1090bddd2d522c' }, h("div", { key: '1729e29d836f85fe3be984a5ee78a0debc0e6218', class: "size-grid" }, sizes.map(size => (h("div", { tabIndex: 0, class: {
12
+ return (h(Host, { key: 'bde2cc986aebbe869a3eea026654229dee0d3e0e' }, h("div", { key: 'f84c4b844b865080f4e0e245bbccc6d77ac3f049', class: "size-grid" }, sizes.map(size => (h("div", { tabIndex: 0, class: {
13
13
  'size-container': true,
14
14
  'selected': this.selectedSize === size,
15
15
  }, onClick: () => this.handleSizeClick(size) }, h("kritzel-color", { value: 'var(--kritzel-global-text-primary)', size: size })))))));
@@ -128,14 +128,14 @@ export class KritzelTooltip {
128
128
  }
129
129
  }
130
130
  render() {
131
- return (h(Host, { key: '57c0c2ddbe3f88815b975b7cf5b02c7da389b7f9', style: {
131
+ return (h(Host, { key: 'ba4d13171aa25acac6c615ee12f35eab96d0aad6', style: {
132
132
  position: 'fixed',
133
133
  zIndex: '9999',
134
134
  transition: 'opacity 0.3s ease-in-out, transform 0.3s ease-in-out',
135
135
  visibility: this.isVisible ? 'visible' : 'hidden',
136
136
  left: `${this.positionX}px`,
137
137
  bottom: `${this.positionY}px`,
138
- } }, h("div", { key: '3ab17ef4ba55ed39458814685574b0c00504a07d', class: "tooltip-content", onClick: event => event.stopPropagation(), onPointerDown: event => event.stopPropagation(), onMouseDown: event => event.stopPropagation() }, h("slot", { key: 'b0aa1eb2c9363644939bcc59a80d0294787f0946' }))));
138
+ } }, h("div", { key: '923168164a018b08eac4246d88c7f8648b71d078', class: "tooltip-content", onClick: event => event.stopPropagation(), onPointerDown: event => event.stopPropagation(), onMouseDown: event => event.stopPropagation() }, h("slot", { key: 'aafad8ab026d591ebb9e2aeffa15d07718eba261' }))));
139
139
  }
140
140
  static get is() { return "kritzel-tooltip"; }
141
141
  static get encapsulation() { return "shadow"; }
@@ -16,7 +16,7 @@ export class KritzelBackToContent {
16
16
  this.backToContent.emit();
17
17
  };
18
18
  render() {
19
- return (h(Host, { key: '5ef034156f28bdd1861d99343d51a237498db46b' }, h("button", { key: 'caa1c08d04f1a3a84d694b7df5d318a686d3a1fb', class: { 'back-to-content-button': true, visible: this.visible }, onClick: this.handleClick, "aria-label": this.text }, h("kritzel-icon", { key: '0c7cf5e18294ade600be3052ca7c57c8d933a736', name: "chevrons-left" }))));
19
+ return (h(Host, { key: 'a7d52616642f45a0c0e7b76deb3cc5994184b968' }, h("button", { key: '9e7acae2b62f7f66ee0127545ee8ab115f9d340e', class: { 'back-to-content-button': true, visible: this.visible }, onClick: this.handleClick, "aria-label": this.text }, h("kritzel-icon", { key: '6c404376643554cdb86c33957c066dd4580f19f1', name: "chevrons-left" }))));
20
20
  }
21
21
  static get is() { return "kritzel-back-to-content"; }
22
22
  static get encapsulation() { return "shadow"; }
@@ -233,13 +233,13 @@ export class KritzelControls {
233
233
  // Separate tool controls from config control
234
234
  const toolControls = this.internalControls.filter(c => c.type === 'tool' || c.type === 'separator');
235
235
  const configControl = this.internalControls.find(c => c.type === 'config' && c.name === this.firstConfig?.name);
236
- return (h(Host, { key: '7247a377d1cb75153e35f5308e81b2bd00d98578', style: { display: this.visible ? '' : 'none' }, class: {
236
+ return (h(Host, { key: '266e38cdeffb8c22a7f778e865e5fab6b461f5b6', style: { display: this.visible ? '' : 'none' }, class: {
237
237
  mobile: this.isTouchDevice,
238
- } }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: '075577cd15f3e577a1a216b5b1f1874e82e0d123', style: {
238
+ } }, this.isUtilityPanelVisible && (h("kritzel-utility-panel", { key: '5e75ece000ac02675d3d226461b7f522dcf5ead9', style: {
239
239
  position: 'absolute',
240
240
  bottom: '56px',
241
241
  left: '12px',
242
- }, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), h("div", { key: '7fb1041763c7b64917e337d68bbb29b36ed86b9a', class: "kritzel-controls" }, h("div", { key: '8577ed9c6f43a667aaba7dce1da519456c8ad210', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), h("div", { key: '42f8f2b85055705674f9e319056bd48856dbd197', class: "kritzel-tools-scroll", ref: el => (this.toolsScrollRef = el), onScroll: this.handleToolsScroll }, toolControls.map(control => {
242
+ }, undoState: this.undoState, terms: this.terms, onUndo: () => this.kritzelEngine?.undo(), onRedo: () => this.kritzelEngine?.redo(), onDelete: () => this.kritzelEngine?.delete() })), h("div", { key: 'fc98b1675afe1abb6a8d391c4ace34c7f0e46677', class: "kritzel-controls" }, h("div", { key: 'b17bc9e9a65646735c56f78a326a281229fa9790', class: { 'scroll-indicator-left': true, 'visible': this.canScrollLeft } }), h("div", { key: '9ab9d5c44e515551d75f27c31875de72e9d3407c', class: "kritzel-tools-scroll", ref: el => (this.toolsScrollRef = el), onScroll: this.handleToolsScroll }, toolControls.map(control => {
243
243
  // Check if this control has sub-options (split-button)
244
244
  if (control.subOptions?.length) {
245
245
  const selectedSubOption = this.getSelectedSubOption(control);
@@ -269,10 +269,10 @@ export class KritzelControls {
269
269
  'kritzel-control': true,
270
270
  'selected': this.activeControl?.name === control?.name,
271
271
  }, key: control.name, "data-testid": `tool-${control.name}`, onClick: _event => this.handleControlClick?.(control), "aria-label": control.name.charAt(0).toUpperCase() + control.name.slice(1) }, h("kritzel-icon", { name: control.icon })));
272
- })), h("div", { key: '20007273e0f701193502320cf58099cbaedb834e', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (h("div", { class: {
272
+ })), h("div", { key: 'fad7512f5d1aa68905a56b8f22d498380f166f9f', class: { 'scroll-indicator-right': true, 'visible': this.canScrollRight && !(configControl && this.activeControl && hasConfigUI) } }), configControl && this.activeControl && (h("div", { class: {
273
273
  'kritzel-config-container': true,
274
274
  'visible': hasConfigUI,
275
- }, key: configControl.name }, h("div", { key: '2901fc2507e5b02fbd603bd2d2a4e2b07e35c970', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), h("kritzel-tooltip", { key: '653e6a9b49146a2f297dbb5b9debe8709efd59ad', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, h("kritzel-tool-config", { key: '6fae38444dff1978647e111643ee6e29c9cc1653', tool: this.activeControl.tool, theme: this.theme, engine: this.kritzelEngine, terms: this.terms, onToolChange: event => this.handleToolChange?.(event), onDisplayValuesChange: this.handleDisplayValuesChange, style: { width: '100%', height: '100%' } })), h("div", { key: '951a52f625c929634de5102b83a14ad0cf1abc8d', tabIndex: hasConfigUI ? 0 : -1, class: "kritzel-config", "data-testid": "tool-config", ref: el => {
275
+ }, key: configControl.name }, h("div", { key: '2ff7cb3ad18608102f3d8188b5936cf00b00451f', class: { 'config-gradient-left': true, 'visible': this.needsScrolling } }), h("kritzel-tooltip", { key: '10f15f717c8573cbad6ea53b412ad56254099ad1', anchorElement: this.host.shadowRoot?.querySelector('.kritzel-config-container'), triggerElement: this.configTriggerRef }, h("kritzel-tool-config", { key: 'a1b0ed8ecc2696a591e32add642a3d5cb2bf7f4a', tool: this.activeControl.tool, theme: this.theme, engine: this.kritzelEngine, terms: this.terms, onToolChange: event => this.handleToolChange?.(event), onDisplayValuesChange: this.handleDisplayValuesChange, style: { width: '100%', height: '100%' } })), h("div", { key: '7ac8214a3dbad5323a38cad3ff7324b57f9dbfb5', tabIndex: hasConfigUI ? 0 : -1, class: "kritzel-config", "data-testid": "tool-config", ref: el => {
276
276
  if (el)
277
277
  this.configTriggerRef = el;
278
278
  }, onKeyDown: event => {
@@ -281,7 +281,7 @@ export class KritzelControls {
281
281
  }
282
282
  }, style: {
283
283
  cursor: 'pointer',
284
- } }, this.displayValues && (h("div", { key: 'b8fff73b9055e86b312a9f0798fff4177cf85970', class: "color-container" }, h("kritzel-color", { key: 'fcd474e557d887f94383b7e583ab1c95a675ce23', value: this.displayValues.color, theme: this.theme, size: 18, style: {
284
+ } }, this.displayValues && (h("div", { key: '7e64f79859f7f2b03d72bb7a93fb295e7d2b2ac0', class: "color-container" }, h("kritzel-color", { key: 'b87d9861949379d84954ef1ecb554e13317b3287', value: this.displayValues.color, theme: this.theme, size: 18, style: {
285
285
  borderRadius: '50%',
286
286
  border: 'none',
287
287
  } })))))))));
@@ -17,7 +17,7 @@ export class KritzelCurrentUser {
17
17
  this.dialogRef?.open();
18
18
  };
19
19
  render() {
20
- return (h(Host, { key: '7e45048e532db84347e2531de2df19f5537d62ca' }, h("kritzel-avatar", { key: '5a67d1dbae041e16cdaeaf4bc678b6b00c56f442', user: this.user, size: this.avatarSize, onClick: this.handleAvatarClick }), h("kritzel-current-user-dialog", { key: '8e35219e282811b8bbafb058c02c8c0474574009', ref: el => (this.dialogRef = el), user: this.user, terms: this.terms })));
20
+ return (h(Host, { key: 'bdee6b71c08d6ea22aec40e88ba56077882b301d' }, h("kritzel-avatar", { key: '97bcaaa6b683c0d26d547ac5cbd9df7814f0cd80', user: this.user, size: this.avatarSize, onClick: this.handleAvatarClick }), h("kritzel-current-user-dialog", { key: 'c984ea1803bcf2b06569fd66d12e4e7054235225', ref: el => (this.dialogRef = el), user: this.user, terms: this.terms })));
21
21
  }
22
22
  static get is() { return "kritzel-current-user"; }
23
23
  static get encapsulation() { return "shadow"; }
@@ -23,7 +23,7 @@ export class KritzelCurrentUserDialog {
23
23
  }
24
24
  render() {
25
25
  const displayName = this.getDisplayName();
26
- return (h(Host, { key: '7c9e5c19249d400e2d670c60f5d6716c742adc62' }, h("kritzel-dialog", { key: '811da6bff0ce03914f545dd289878ba04924e85c', dialogTitle: this.terms['currentUser.dialogTitle'] ?? 'Account', isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, h("div", { key: '03a101b04d61882732547d91e81a2bacb3aa4df8', class: "user-info" }, h("kritzel-avatar", { key: '4033d0e2322d7a25231f01115ec33f20e4fb0d4c', user: this.user, size: 80 }), displayName && h("div", { key: 'cf3a3aecb84152736c9de119f82a79f1b2b32f6f', class: "user-name" }, displayName), this.user?.email && h("div", { key: '5725d71dd80468c64a2b0bb1d9d967232513fb63', class: "user-email" }, this.user.email)))));
26
+ return (h(Host, { key: '042455d68a432e0e218d5b8750fb1d22b0d202fc' }, h("kritzel-dialog", { key: '058abbc8e1c38c647cc02e85c272e89693cab22a', dialogTitle: this.terms['currentUser.dialogTitle'] ?? 'Account', isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, h("div", { key: 'ee141b2e91f093527e2d8f6649bade8e1a14f130', class: "user-info" }, h("kritzel-avatar", { key: '2734bb0d3c69df14d26c204eeaf726174afaabc0', user: this.user, size: 80 }), displayName && h("div", { key: '56cbad7a51264ebada0cb029e6455aabb9cb4ae9', class: "user-name" }, displayName), this.user?.email && h("div", { key: 'ef9075dfdeb52ce6f90bb41d1348fbdf7dbb93ee', class: "user-email" }, this.user.email)))));
27
27
  }
28
28
  static get is() { return "kritzel-current-user-dialog"; }
29
29
  static get encapsulation() { return "shadow"; }
@@ -69,7 +69,7 @@ export class KritzelExport {
69
69
  return (h("div", { class: "export-tab-content" }, h("kritzel-input", { label: this.terms['export.filename.label'] ?? 'Filename', value: this.exportFilename, placeholder: this.terms['export.filename.placeholder'] ?? 'Enter filename', suffix: ".json", onValueChange: this.handleFilenameChange })));
70
70
  }
71
71
  render() {
72
- return (h(Host, { key: 'ff6ce7e5d3a0a7a024148529f86bf3ec7ffb0333' }, h("kritzel-dialog", { key: '9051d262450af5fbe98959092f6bb0ac25ab43ce', isOpen: this.isDialogOpen, dialogTitle: this.terms['export.dialogTitle'] ?? 'Export', closable: true, contained: true, onDialogClose: this.closeDialog }, h("div", { key: '21f404a2101d5cf1d24aeeee663d8fb1854b9574', class: "export-content" }, h("kritzel-pill-tabs", { key: '80db6cda288d1b7019387a2f1ade278475ad6e24', tabs: this.tabs, value: this.activeTab, onValueChange: this.handleTabChange }), this.activeTab === 'viewport' && this.renderViewportExport(), this.activeTab === 'workspace' && this.renderWorkspaceExport(), h("button", { key: '45809f91ddd63c74f5a4b3a2e266919f244c6109', class: "export-primary-button", onClick: this.handleExport }, this.terms['export.exportButton'] ?? 'Export')))));
72
+ return (h(Host, { key: 'fd219fffd4d8bb528e6a90055c2b43a5f5a73060' }, h("kritzel-dialog", { key: '9f4ba5b05f5ad31084aab457386a86cbc6d4f2bc', isOpen: this.isDialogOpen, dialogTitle: this.terms['export.dialogTitle'] ?? 'Export', closable: true, contained: true, onDialogClose: this.closeDialog }, h("div", { key: '920bb8f20b42897680084bde47270b3812e2f3e4', class: "export-content" }, h("kritzel-pill-tabs", { key: '7090bd0a371457adceaa4bd7461a616839a66349', tabs: this.tabs, value: this.activeTab, onValueChange: this.handleTabChange }), this.activeTab === 'viewport' && this.renderViewportExport(), this.activeTab === 'workspace' && this.renderWorkspaceExport(), h("button", { key: 'ddf36c1e7cb81409c2cecfa6585e0f1dd7aca2c3', class: "export-primary-button", onClick: this.handleExport }, this.terms['export.exportButton'] ?? 'Export')))));
73
73
  }
74
74
  static get is() { return "kritzel-export"; }
75
75
  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: '443d817d6eba7b9fcd31cab652293d7c01fc5ffa' }, h("kritzel-dialog", { key: '55214d78abb10f7e2ba789e10d98bf7f3287ff6a', dialogTitle: this.dialogTitle, isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, h("div", { key: '31806a7a7c98c2210b7f60d2e0816a8ebc14aff3', class: "login-content" }, this.subtitle && (h("p", { key: '7edb2bc7d25cb3c8589594791822e62d035cd3a6', class: "login-subtitle" }, this.subtitle)), h("div", { key: '3b7731d9cfb98915ebe07b54a07991e03716ce5c', class: "login-providers" }, this.providers.map(provider => (h("button", { key: provider.name, class: {
47
+ return (h(Host, { key: '6ef65077c95d32fee8da4b70ad2e832ad1bb78f7' }, h("kritzel-dialog", { key: '04f3d3350393475c7267d8ca90c0b3f0fce10c38', dialogTitle: this.dialogTitle, isOpen: this.isDialogOpen, onDialogClose: this.closeDialog, size: "small", contained: true }, h("div", { key: 'c2ed4e339d86dcea23b4a0778b8966a6ae36107a', class: "login-content" }, this.subtitle && (h("p", { key: 'ae46baa70526d057b3427459903287489e645e08', class: "login-subtitle" }, this.subtitle)), h("div", { key: '1055d5861e5281be234094a3c5c86a6aaf58935f', 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,
@@ -57,7 +57,7 @@ export class KritzelMoreMenu {
57
57
  this.closeMenu();
58
58
  };
59
59
  render() {
60
- return (h(Host, { key: '1fe90a065ac35d1c8d2e9159d006b09e104750a3', class: { mobile: this.isTouchDevice }, style: { display: this.visible ? '' : 'none' } }, h("div", { key: '734234df7d24f712fa80c3871209142fed2b5ac2', class: { 'more-menu-wrapper': true, visible: this.visible } }, h("button", { key: 'a6a56bd5714a8780339390904f0469b395748ba9', class: "more-menu-button", "data-testid": "more-menu-button", onClick: this.toggleMenu, "aria-label": this.terms['moreMenu.ariaLabel'] ?? 'More options' }, h("kritzel-icon", { key: 'a4405ef4b8219f28fec095d4a56ac0aa027a9564', name: this.icon, size: this.iconSize })), h("kritzel-portal", { key: '99aa8a87844232ec079b48f95afab54cbfe51a0b', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, h("kritzel-menu", { key: 'b6861ae2d553ebf5f5af7448c2b053576a380e8c', items: this.visibleItems, onItemSelect: this.handleMenuItemSelect })))));
60
+ return (h(Host, { key: '3e7179c87713cb0087d2d2053f97db8f603f7321', class: { mobile: this.isTouchDevice }, style: { display: this.visible ? '' : 'none' } }, h("div", { key: '23d6be1ec2c25cd0335c1134f18aad7d5be25c85', class: { 'more-menu-wrapper': true, visible: this.visible } }, h("button", { key: 'e3064ba3f7b4c20e8447e16327b73d0f47f3842b', class: "more-menu-button", "data-testid": "more-menu-button", onClick: this.toggleMenu, "aria-label": this.terms['moreMenu.ariaLabel'] ?? 'More options' }, h("kritzel-icon", { key: 'feed090efe4f80c62a29c8146c2d7d8041624381', name: this.icon, size: this.iconSize })), h("kritzel-portal", { key: '7b1a5db932c7bfb5ea8f4d666571c4f7fbbcd238', anchor: this.menuAnchor, offsetY: this.offsetY, onClose: this.closeMenu }, h("kritzel-menu", { key: '65b1225b15a494d49712ad1d2d108e90f09507e9', items: this.visibleItems, onItemSelect: this.handleMenuItemSelect })))));
61
61
  }
62
62
  static get is() { return "kritzel-more-menu"; }
63
63
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,101 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .card {
6
+ box-sizing: border-box;
7
+ width: 100%;
8
+ max-width: var(--kritzel-notification-card-max-width, 360px);
9
+ margin-inline: auto;
10
+ font-family: var(--kritzel-font-family, sans-serif);
11
+ padding: var(--kritzel-notification-card-padding, 12px 14px);
12
+ border: var(--kritzel-notification-card-border, 1px solid #e5e7eb);
13
+ border-radius: var(--kritzel-notification-card-border-radius, 12px);
14
+ background-color: var(--kritzel-notification-card-background-color, #ffffff);
15
+ color: var(--kritzel-notification-card-color, #111827);
16
+ box-shadow: var(--kritzel-notification-card-box-shadow, 0 8px 20px rgba(15, 23, 42, 0.08));
17
+ }
18
+
19
+ .card-header {
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: space-between;
23
+ gap: var(--kritzel-notification-card-header-gap, 8px);
24
+ margin-bottom: var(--kritzel-notification-card-header-margin-bottom, 8px);
25
+ }
26
+
27
+ .header-right {
28
+ display: inline-flex;
29
+ align-items: center;
30
+ gap: var(--kritzel-notification-card-header-right-gap, 6px);
31
+ }
32
+
33
+ .type-pill {
34
+ display: inline-flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ min-height: var(--kritzel-notification-card-pill-height, 22px);
38
+ padding: var(--kritzel-notification-card-pill-padding, 0 8px);
39
+ border-radius: var(--kritzel-notification-card-pill-border-radius, 999px);
40
+ background-color: var(--kritzel-notification-card-pill-background-color, #eff6ff);
41
+ color: var(--kritzel-notification-card-pill-color, #1d4ed8);
42
+ font-size: var(--kritzel-notification-card-pill-font-size, 12px);
43
+ font-weight: var(--kritzel-notification-card-pill-font-weight, 600);
44
+ line-height: 1;
45
+ }
46
+
47
+ .card.type-info .type-pill {
48
+ background-color: var(--kritzel-notification-card-info-pill-background-color, #eff6ff);
49
+ color: var(--kritzel-notification-card-info-pill-color, #1d4ed8);
50
+ }
51
+
52
+ .card.type-warning .type-pill {
53
+ background-color: var(--kritzel-notification-card-warning-pill-background-color, #fff7ed);
54
+ color: var(--kritzel-notification-card-warning-pill-color, #b45309);
55
+ }
56
+
57
+ .card.type-error .type-pill {
58
+ background-color: var(--kritzel-notification-card-error-pill-background-color, #fef2f2);
59
+ color: var(--kritzel-notification-card-error-pill-color, #b91c1c);
60
+ }
61
+
62
+ .timestamp {
63
+ color: var(--kritzel-notification-card-timestamp-color, #6b7280);
64
+ font-size: var(--kritzel-notification-card-timestamp-font-size, 12px);
65
+ white-space: nowrap;
66
+ }
67
+
68
+ .dismiss-button {
69
+ display: inline-flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ width: var(--kritzel-notification-card-dismiss-button-size, 24px);
73
+ height: var(--kritzel-notification-card-dismiss-button-size, 24px);
74
+ padding: 0;
75
+ border: none;
76
+ border-radius: var(--kritzel-notification-card-dismiss-button-border-radius, 6px);
77
+ background: var(--kritzel-notification-card-dismiss-button-background-color, transparent);
78
+ color: var(--kritzel-notification-card-dismiss-button-color, #4b5563);
79
+ cursor: var(--kritzel-global-pointer-cursor, pointer);
80
+ -webkit-tap-highlight-color: transparent;
81
+ }
82
+
83
+ .dismiss-button:hover {
84
+ background: var(--kritzel-notification-card-dismiss-button-hover-background-color, #f3f4f6);
85
+ }
86
+
87
+ .dismiss-button:active {
88
+ background: var(--kritzel-notification-card-dismiss-button-active-background-color, #e5e7eb);
89
+ }
90
+
91
+ .dismiss-button:focus-visible {
92
+ outline: revert;
93
+ }
94
+
95
+ .message {
96
+ margin: 0;
97
+ color: var(--kritzel-notification-card-message-color, inherit);
98
+ font-size: var(--kritzel-notification-card-message-font-size, 14px);
99
+ line-height: var(--kritzel-notification-card-message-line-height, 1.45);
100
+ word-break: break-word;
101
+ }
@@ -0,0 +1,173 @@
1
+ import { Host, h } from "@stencil/core";
2
+ export class KritzelNotificationCard {
3
+ /** Notification data rendered by this card. */
4
+ notification;
5
+ /** Whether a formatted timestamp should be displayed when available. */
6
+ showTimestamp = true;
7
+ /** Locale used for formatting the timestamp. */
8
+ locale;
9
+ /** Emitted when the notification should be dismissed manually. */
10
+ dismiss;
11
+ /** Emitted when pointer hover state changes. */
12
+ hoverChange;
13
+ handleDismissClick = (event) => {
14
+ event.stopPropagation();
15
+ this.dismiss.emit();
16
+ };
17
+ handleMouseEnter = () => {
18
+ this.hoverChange.emit(true);
19
+ };
20
+ handleMouseLeave = () => {
21
+ this.hoverChange.emit(false);
22
+ };
23
+ get type() {
24
+ return this.notification?.type ?? 'info';
25
+ }
26
+ get role() {
27
+ return this.type === 'error' ? 'alert' : 'status';
28
+ }
29
+ getTypeLabel(type) {
30
+ switch (type) {
31
+ case 'warning':
32
+ return 'Warning';
33
+ case 'error':
34
+ return 'Error';
35
+ default:
36
+ return 'Info';
37
+ }
38
+ }
39
+ formatTimestamp(timestamp) {
40
+ if (!timestamp || !this.showTimestamp) {
41
+ return null;
42
+ }
43
+ const date = timestamp instanceof Date ? timestamp : new Date(timestamp);
44
+ if (Number.isNaN(date.getTime())) {
45
+ return null;
46
+ }
47
+ return new Intl.DateTimeFormat(this.locale, {
48
+ dateStyle: 'medium',
49
+ timeStyle: 'short',
50
+ }).format(date);
51
+ }
52
+ render() {
53
+ const notification = this.notification;
54
+ if (!notification) {
55
+ return h(Host, null);
56
+ }
57
+ const type = this.type;
58
+ const timestamp = this.formatTimestamp(notification.timestamp);
59
+ return (h(Host, null, h("article", { class: { card: true, [`type-${type}`]: true }, role: this.role, "aria-live": "polite", onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("header", { class: "card-header" }, h("span", { class: "type-pill" }, this.getTypeLabel(type)), h("div", { class: "header-right" }, timestamp && (h("time", { class: "timestamp", dateTime: notification.timestamp?.toISOString() }, timestamp)), h("button", { class: "dismiss-button", type: "button", "aria-label": "Dismiss notification", onClick: this.handleDismissClick }, h("kritzel-icon", { name: "x", size: 16 })))), h("p", { class: "message" }, notification.message))));
60
+ }
61
+ static get is() { return "kritzel-notification-card"; }
62
+ static get encapsulation() { return "shadow"; }
63
+ static get originalStyleUrls() {
64
+ return {
65
+ "$": ["kritzel-notification-card.css"]
66
+ };
67
+ }
68
+ static get styleUrls() {
69
+ return {
70
+ "$": ["kritzel-notification-card.css"]
71
+ };
72
+ }
73
+ static get properties() {
74
+ return {
75
+ "notification": {
76
+ "type": "unknown",
77
+ "mutable": false,
78
+ "complexType": {
79
+ "original": "KritzelNotification",
80
+ "resolved": "KritzelNotification",
81
+ "references": {
82
+ "KritzelNotification": {
83
+ "location": "import",
84
+ "path": "../../../interfaces/notification.interface",
85
+ "id": "src/interfaces/notification.interface.ts::KritzelNotification",
86
+ "referenceLocation": "KritzelNotification"
87
+ }
88
+ }
89
+ },
90
+ "required": false,
91
+ "optional": true,
92
+ "docs": {
93
+ "tags": [],
94
+ "text": "Notification data rendered by this card."
95
+ },
96
+ "getter": false,
97
+ "setter": false
98
+ },
99
+ "showTimestamp": {
100
+ "type": "boolean",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "boolean",
104
+ "resolved": "boolean",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": "Whether a formatted timestamp should be displayed when available."
112
+ },
113
+ "getter": false,
114
+ "setter": false,
115
+ "reflect": false,
116
+ "attribute": "show-timestamp",
117
+ "defaultValue": "true"
118
+ },
119
+ "locale": {
120
+ "type": "string",
121
+ "mutable": false,
122
+ "complexType": {
123
+ "original": "string",
124
+ "resolved": "string",
125
+ "references": {}
126
+ },
127
+ "required": false,
128
+ "optional": true,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": "Locale used for formatting the timestamp."
132
+ },
133
+ "getter": false,
134
+ "setter": false,
135
+ "reflect": false,
136
+ "attribute": "locale"
137
+ }
138
+ };
139
+ }
140
+ static get events() {
141
+ return [{
142
+ "method": "dismiss",
143
+ "name": "dismiss",
144
+ "bubbles": true,
145
+ "cancelable": true,
146
+ "composed": true,
147
+ "docs": {
148
+ "tags": [],
149
+ "text": "Emitted when the notification should be dismissed manually."
150
+ },
151
+ "complexType": {
152
+ "original": "void",
153
+ "resolved": "void",
154
+ "references": {}
155
+ }
156
+ }, {
157
+ "method": "hoverChange",
158
+ "name": "hoverChange",
159
+ "bubbles": true,
160
+ "cancelable": true,
161
+ "composed": true,
162
+ "docs": {
163
+ "tags": [],
164
+ "text": "Emitted when pointer hover state changes."
165
+ },
166
+ "complexType": {
167
+ "original": "boolean",
168
+ "resolved": "boolean",
169
+ "references": {}
170
+ }
171
+ }];
172
+ }
173
+ }
@@ -217,7 +217,7 @@ export class KritzelSettings {
217
217
  }
218
218
  }
219
219
  render() {
220
- return (h(Host, { key: '8dc22abaa2a19a14f3bbef10e34d133b16510498' }, h("kritzel-dialog", { key: '54072bf290e2d86bb7ec40d8d3e630be46fa3e1e', isOpen: this.isDialogOpen, dialogTitle: this.t('settings.dialogTitle', 'Settings'), size: "large", contained: true, onDialogClose: this.closeDialog }, h("kritzel-master-detail", { key: '5be80411c943ab4b7b90129527c8a0d147306a5f', items: this.categories, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
220
+ return (h(Host, { key: '6f26bd23bf7bb51653f09b96bafef221c51c2bfa' }, h("kritzel-dialog", { key: '49ffda0a422ae1c2c9c8e6e608bce532e7d4099e', isOpen: this.isDialogOpen, dialogTitle: this.t('settings.dialogTitle', 'Settings'), size: "large", contained: true, onDialogClose: this.closeDialog }, h("kritzel-master-detail", { key: 'ab5dc7952e555cae6f841ef4de2ab50d7039279b', items: this.categories, selectedItemId: this.selectedCategoryId, onItemSelect: this.handleCategorySelect }, this.renderCategoryContent()))));
221
221
  }
222
222
  static get is() { return "kritzel-settings"; }
223
223
  static get encapsulation() { return "shadow"; }