@limetech/lime-elements 40.2.0 → 40.2.2

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 (34) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/{3d-tilt-hover-effect-DI8kt0Y0.js → 3d-tilt-hover-effect-Da8Dh_JX.js} +50 -10
  3. package/dist/cjs/limel-card.cjs.entry.js +6 -4
  4. package/dist/cjs/limel-info-tile.cjs.entry.js +9 -4
  5. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +105 -2
  6. package/dist/cjs/limel-shortcut.cjs.entry.js +8 -3
  7. package/dist/collection/components/card/card.js +5 -3
  8. package/dist/collection/components/info-tile/info-tile.js +8 -3
  9. package/dist/collection/components/shortcut/shortcut.js +7 -2
  10. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/table-paste-plugin.js +103 -0
  11. package/dist/collection/components/text-editor/prosemirror-adapter/plugins/table-plugin.js +4 -1
  12. package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.css +11 -0
  13. package/dist/collection/util/3d-tilt-hover-effect.js +50 -10
  14. package/dist/esm/{3d-tilt-hover-effect-5eP2N9QI.js → 3d-tilt-hover-effect-CllX3RLB.js} +50 -10
  15. package/dist/esm/limel-card.entry.js +6 -4
  16. package/dist/esm/limel-info-tile.entry.js +9 -4
  17. package/dist/esm/limel-prosemirror-adapter.entry.js +105 -2
  18. package/dist/esm/limel-shortcut.entry.js +8 -3
  19. package/dist/lime-elements/lime-elements.esm.js +1 -1
  20. package/dist/lime-elements/p-25555311.entry.js +1 -0
  21. package/dist/lime-elements/{p-d3d71a68.entry.js → p-6c826c25.entry.js} +1 -1
  22. package/dist/lime-elements/p-CllX3RLB.js +1 -0
  23. package/dist/lime-elements/p-b03367f0.entry.js +1 -0
  24. package/dist/lime-elements/p-c0a03b7c.entry.js +1 -0
  25. package/dist/types/components/card/card.d.ts +1 -0
  26. package/dist/types/components/info-tile/info-tile.d.ts +2 -0
  27. package/dist/types/components/shortcut/shortcut.d.ts +2 -0
  28. package/dist/types/components/text-editor/prosemirror-adapter/plugins/table-paste-plugin.d.ts +3 -0
  29. package/dist/types/util/3d-tilt-hover-effect.d.ts +34 -4
  30. package/package.json +2 -2
  31. package/dist/lime-elements/p-51cb779f.entry.js +0 -1
  32. package/dist/lime-elements/p-5eP2N9QI.js +0 -1
  33. package/dist/lime-elements/p-7df111bb.entry.js +0 -1
  34. package/dist/lime-elements/p-ad4672b2.entry.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## [40.2.2](https://github.com/Lundalogik/lime-elements/compare/v40.2.1...v40.2.2) (2026-09-09)
2
+
3
+ ### Bug Fixes
4
+
5
+
6
+ * **text-editor:** detect table pastes with pastedCells and add them as rows ([9655f0f](https://github.com/Lundalogik/lime-elements/commit/9655f0fa4380613f8d870473761039747e7579de))
7
+ * **text-editor:** extend table paste protection to row slices and cross-table selections ([ae90a00](https://github.com/Lundalogik/lime-elements/commit/ae90a009adabff0531a67eb25b275c648aa24ab4))
8
+ * **text-editor:** give tables visible borders while editing ([bf30f3d](https://github.com/Lundalogik/lime-elements/commit/bf30f3d625c5cbb185cd5f77c2f16bf1d7ca0165))
9
+ * **text-editor:** prevent content loss when pasting tables into cells ([29e0faf](https://github.com/Lundalogik/lime-elements/commit/29e0faf927c1557646d325dec169df3a19d6ccbc))
10
+ * **text-editor:** read pasted table slices without prosemirror-tables internals ([6151c1c](https://github.com/Lundalogik/lime-elements/commit/6151c1c64bab2a3965062d58576b518747ca7c2f))
11
+
12
+ ## [40.2.1](https://github.com/Lundalogik/lime-elements/compare/v40.2.0...v40.2.1) (2026-09-09)
13
+
14
+ ### Bug Fixes
15
+
16
+
17
+ * **card:** remove the 3d tilt listener when the card is disconnected ([cbc77bb](https://github.com/Lundalogik/lime-elements/commit/cbc77bb3872e654a3621bf60cc6485b0c0793f74)), closes [#4282](https://github.com/Lundalogik/lime-elements/issues/4282)
18
+ * **info-tile:** remove the 3d tilt listener when the tile is disconnected ([3c984c1](https://github.com/Lundalogik/lime-elements/commit/3c984c15e55e8482ddbeab6c65fc849775b74caa)), closes [#4282](https://github.com/Lundalogik/lime-elements/issues/4282)
19
+ * **shortcut:** remove the 3d tilt listener when the shortcut is disconnected ([8e38b88](https://github.com/Lundalogik/lime-elements/commit/8e38b88270e0bb7ca387d453af78c54e909155a5)), closes [#4282](https://github.com/Lundalogik/lime-elements/issues/4282)
20
+ * stop the 3d tilt hover effect stranding a mousemove listener ([5165904](https://github.com/Lundalogik/lime-elements/commit/516590401e00995c8b1dec7bbe20018b4c57e1d5)), closes [#4282](https://github.com/Lundalogik/lime-elements/issues/4282)
21
+
1
22
  ## [40.2.0](https://github.com/Lundalogik/lime-elements/compare/v40.1.1...v40.2.0) (2026-09-07)
2
23
 
3
24
  ### Features
@@ -52,7 +52,8 @@
52
52
  * 3. **Initialize in your component**:
53
53
  *
54
54
  * Use `getMouseEventHandlers()` to attach the required mouse event listeners
55
- * to the "interactive element" (`the-3d-element`). For example:
55
+ * to the "interactive element" (`the-3d-element`), and call the `cleanup()` it
56
+ * returns when the component is disconnected. For example:
56
57
  *
57
58
  * ```tsx
58
59
  * @Element()
@@ -60,16 +61,30 @@
60
61
  *
61
62
  * private handleMouseEnter: () => void;
62
63
  * private handleMouseLeave: () => void;
64
+ * private cleanup3dHoverEffect?: () => void;
63
65
  *
64
66
  * public componentWillLoad() {
65
- * const { handleMouseEnter, handleMouseLeave } = getMouseEventHandlers(
66
- * this.host.querySelector('.the-3d-element'),
67
- * );
67
+ * const { handleMouseEnter, handleMouseLeave, cleanup } =
68
+ * getMouseEventHandlers(
69
+ * this.host.querySelector<HTMLElement>('.the-3d-element'),
70
+ * );
68
71
  * this.handleMouseEnter = handleMouseEnter;
69
72
  * this.handleMouseLeave = handleMouseLeave;
73
+ * this.cleanup3dHoverEffect = cleanup;
74
+ * }
75
+ *
76
+ * public disconnectedCallback() {
77
+ * this.cleanup3dHoverEffect?.();
70
78
  * }
71
79
  * ```
72
80
  *
81
+ * Call it optionally: `disconnectedCallback` can run before
82
+ * `componentWillLoad` has assigned the field.
83
+ *
84
+ * Skipping the `disconnectedCallback` leaks a `document` level `mousemove`
85
+ * listener every time the element is removed while it is being hovered, and
86
+ * leaves a moved element stuck at the angle it was last tilted to.
87
+ *
73
88
  * 4. **Attach event handlers in your render method**:
74
89
  *
75
90
  * ```tsx
@@ -135,19 +150,44 @@ const tiltFollowingTheCursor = (the3dElementBounds, element) => (e) => {
135
150
  };
136
151
  const getMouseEventHandlers = (element) => {
137
152
  let tiltCallback;
153
+ /**
154
+ * Stops following the cursor and returns the element to rest.
155
+ *
156
+ * Safe to call when tracking never started, and safe to call on an
157
+ * element that has already been detached.
158
+ */
159
+ const stopTracking = () => {
160
+ document.removeEventListener('mousemove', tiltCallback);
161
+ element.style.removeProperty('--limel-3d-hover-effect-rotate3d');
162
+ element.style.removeProperty('--limel-3d-hover-effect-glow-position');
163
+ };
138
164
  const handleMouseEnter = () => {
165
+ // A second `mouseenter` without an intervening `mouseleave` would
166
+ // otherwise strand the previous callback on `document` with nothing
167
+ // left holding a reference to remove it with.
168
+ stopTracking();
139
169
  const bounds = element.getBoundingClientRect();
140
170
  tiltCallback = tiltFollowingTheCursor(bounds, element);
141
171
  document.addEventListener('mousemove', tiltCallback);
142
172
  };
143
- const handleMouseLeave = () => {
144
- document.removeEventListener('mousemove', tiltCallback);
145
- element.style.removeProperty('--limel-3d-hover-effect-rotate3d');
146
- element.style.removeProperty('--limel-3d-hover-effect-glow-position');
147
- };
148
173
  return {
149
174
  handleMouseEnter: handleMouseEnter,
150
- handleMouseLeave: handleMouseLeave,
175
+ handleMouseLeave: stopTracking,
176
+ /**
177
+ * The same teardown as `handleMouseLeave`, for the case where no
178
+ * `mouseleave` is coming.
179
+ *
180
+ * `mouseleave` never fires for an element that is removed from the
181
+ * DOM while the pointer is still over it, which in a single page
182
+ * application is the ordinary case: a click routes away from the
183
+ * view holding the element. It does not fire when the element is
184
+ * merely moved within the DOM either, and a move disconnects the
185
+ * component just like a removal does. Call this from
186
+ * `disconnectedCallback` so the listener does not outlive the
187
+ * element it tilts, and so a moved element does not stay stuck at
188
+ * the angle it was last tilted to.
189
+ */
190
+ cleanup: stopTracking,
151
191
  };
152
192
  };
153
193
 
@@ -4,7 +4,7 @@ var index = require('./index-DYg_7kkT.js');
4
4
  var image_template = require('./image.template-DZC6_5a4.js');
5
5
  var isItem = require('./is-item-DMELyaao.js');
6
6
  var getIconProps = require('./get-icon-props-CwpDdQDI.js');
7
- var _3dTiltHoverEffect = require('./3d-tilt-hover-effect-DI8kt0Y0.js');
7
+ var _3dTiltHoverEffect = require('./3d-tilt-hover-effect-Da8Dh_JX.js');
8
8
 
9
9
  const cardCss = () => `@charset "UTF-8";*{box-sizing:border-box;min-width:0;min-height:0}:host(limel-card){display:flex;border-radius:var(--card-border-radius, 0.95rem)}section{box-sizing:border-box;display:flex;gap:0.5rem;flex-direction:column}:host(limel-card[orientation=landscape]) section{flex-direction:row}section{width:100%;border-radius:var(--card-border-radius, 0.95rem);border:1px solid rgb(var(--contrast-500));padding:0.25rem;background-color:var(--card-background-color, rgb(var(--contrast-300)))}:host(limel-card[clickable]) section,:host(limel-card[show-3d-effect]) section{position:relative;transition-duration:0.8s;transition-property:transform, box-shadow, background-color;transition-timing-function:ease-out;transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg)}:host(limel-card[clickable]) section:focus,:host(limel-card[show-3d-effect]) section:focus{outline:none}:host(limel-card[clickable]) section:hover,:host(limel-card[clickable]) section:focus,:host(limel-card[clickable]) section:focus-visible,:host(limel-card[clickable]) section:focus-within,:host(limel-card[show-3d-effect]) section:hover,:host(limel-card[show-3d-effect]) section:focus,:host(limel-card[show-3d-effect]) section:focus-visible,:host(limel-card[show-3d-effect]) section:focus-within{will-change:background-color, box-shadow, transform}:host(limel-card[clickable]) section:hover,:host(limel-card[clickable]) section:focus,:host(limel-card[clickable]) section:focus-visible,:host(limel-card[clickable]) section:active,:host(limel-card[show-3d-effect]) section:hover,:host(limel-card[show-3d-effect]) section:focus,:host(limel-card[show-3d-effect]) section:focus-visible,:host(limel-card[show-3d-effect]) section:active{transition-duration:0.2s}:host(limel-card[clickable]) section:hover,:host(limel-card[clickable]) section:focus-visible,:host(limel-card[show-3d-effect]) section:hover,:host(limel-card[show-3d-effect]) section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}:host(limel-card[clickable]) section:hover,:host(limel-card[show-3d-effect]) section:hover{transform:scale3d(1.01, 1.01, 1.01) rotate3d(var(--limel-3d-hover-effect-rotate3d))}:host(limel-card[clickable]) section:focus-visible,:host(limel-card[show-3d-effect]) section:focus-visible{outline:none;transform:scale3d(1.01, 1.01, 1.01)}:host(limel-card[clickable]) section:hover limel-3d-hover-effect-glow,:host(limel-card[show-3d-effect]) section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.5}@media (prefers-reduced-motion){:host(limel-card[clickable]) section:hover limel-3d-hover-effect-glow,:host(limel-card[show-3d-effect]) section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.2}}:host(limel-card[clickable]) section{cursor:pointer;box-shadow:var(--button-shadow-normal)}:host(limel-card[clickable]) section:hover,:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}:host(limel-card[clickable]) section:active{transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);box-shadow:var(--button-shadow-pressed)}:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-hovered)}:host(limel-card[clickable]) section:focus-visible:active{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-pressed)}:host(limel-card[clickable]) section:hover{border-color:transparent;background-color:var(--card-background-color--hovered, var(--card-background-color, rgb(var(--contrast-200))))}.body{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem}.image-wrapper{flex-shrink:0;display:flex;align-items:center;justify-content:center}:host(limel-card[orientation=portrait]) .image-wrapper{width:100%}:host(limel-card[orientation=landscape]) .image-wrapper{flex-shrink:0;max-width:40%;height:100%}:host(limel-card[orientation=landscape]) .image-wrapper img{height:100%}img{transition:filter 0.6s ease;object-fit:cover;border-radius:calc(var(--card-border-radius, 0.95rem) / 1.4);min-width:0.5rem;min-height:0.5rem;max-width:100%;max-height:100%}:host(limel-card[show-3d-effect]) section:hover img,:host(limel-card[show-3d-effect]) section:focus-visible img{transition-duration:0.2s;filter:saturate(1.3)}.markdown-wrapper{position:relative;flex-grow:1;display:flex;flex-direction:column}.markdown-wrapper limel-markdown{overflow-y:auto;flex-grow:1;padding:0.5rem 0.75rem}.markdown-wrapper::before{top:0;background:radial-gradient(farthest-side at 50% 0%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::after{bottom:0;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::before,.markdown-wrapper::after{content:"";pointer-events:none;position:absolute;right:0;left:0;height:0.75rem;opacity:0;transition:opacity 0.6s ease;background-repeat:no-repeat}.markdown-wrapper.can-scroll-up::before,.markdown-wrapper.can-scroll-down::after{opacity:1}header{flex-shrink:0;display:flex;justify-content:center;gap:0.5rem;padding:0.25rem 0.75rem}:host(limel-card[orientation=landscape]) header{padding-top:0.5rem}header:has(limel-icon){padding-left:0.25rem}header .headings{flex-grow:1;display:flex;flex-direction:column;gap:0.125rem}header .title{padding-right:1.25rem}header limel-icon{flex-shrink:0;width:2rem}header h1{font-size:1.125rem;font-weight:500;color:var(--card-heading-color, rgb(var(--contrast-1100)));letter-spacing:-0.03125rem}header h2{font-size:var(--limel-theme-default-font-size);font-weight:400;color:var(--card-subheading-color, rgb(var(--contrast-1000)))}header h1,header h2{word-break:break-word;hyphens:auto;-webkit-hyphens:auto;margin:0}limel-action-bar{flex-shrink:0;--action-bar-background-color:transparent;margin-left:auto}limel-3d-hover-effect-glow{border-radius:var(--card-border-radius, 0.95rem)}:host(limel-card[show-3d-effect]){isolation:isolate;transform-style:preserve-3d;perspective:1000px}@media (prefers-reduced-motion){:host(limel-card[show-3d-effect]){perspective:2000px}}:host(limel-card[selected]) section,:host(limel-card[selected]) section:hover,:host(limel-card[selected]) section:focus-visible,:host(limel-card[selected]) section:active{box-shadow:var(--shadow-focused-state)}`;
10
10
 
@@ -94,20 +94,22 @@ const Card = class {
94
94
  };
95
95
  }
96
96
  componentWillLoad() {
97
- const { handleMouseEnter, handleMouseLeave } = _3dTiltHoverEffect.getMouseEventHandlers(this.host);
97
+ const { handleMouseEnter, handleMouseLeave, cleanup } = _3dTiltHoverEffect.getMouseEventHandlers(this.host);
98
98
  this.handleMouseEnter = handleMouseEnter;
99
99
  this.handleMouseLeave = handleMouseLeave;
100
+ this.cleanup3dHoverEffect = cleanup;
100
101
  }
101
102
  disconnectedCallback() {
102
- var _a, _b;
103
+ var _a, _b, _c;
103
104
  (_a = this.markdownResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
104
105
  (_b = this.markdownElement) === null || _b === void 0 ? void 0 : _b.removeEventListener('scroll', this.checkIfScrollable);
106
+ (_c = this.cleanup3dHoverEffect) === null || _c === void 0 ? void 0 : _c.call(this);
105
107
  }
106
108
  componentDidLoad() {
107
109
  this.setMarkdownElement(this.markdownElement);
108
110
  }
109
111
  render() {
110
- return (index.h(index.Host, { key: 'bd6a187317d0b475747be4fe270452ab8b38ef3c', onMouseEnter: this.show3dEffect ? this.handleMouseEnter : undefined, onMouseLeave: this.show3dEffect ? this.handleMouseLeave : undefined }, index.h("section", { key: '3cd9af303c7c3cc1db1cfc52e80dc05c4ec409de', tabindex: this.clickable ? 0 : undefined, role: this.clickable ? 'button' : undefined, "aria-pressed": this.clickable ? String(this.selected) : undefined, onKeyDown: this.clickable ? this.handleKeyDown : undefined }, this.renderImage(), index.h("div", { key: 'a9c535c05a993af0ef8f515bb1380d36fdf9f3ce', class: "body" }, this.renderHeader(), this.renderSlot(), this.renderValue(), this.renderActionBar()), this.show3dEffect && index.h("limel-3d-hover-effect-glow", { key: '93fc81bc92ff7cf2272f854d3b218651994ae5d8' }))));
112
+ return (index.h(index.Host, { key: '5714b1e5154ed8637c99f71d5a303dfc7ca51a51', onMouseEnter: this.show3dEffect ? this.handleMouseEnter : undefined, onMouseLeave: this.show3dEffect ? this.handleMouseLeave : undefined }, index.h("section", { key: 'f6592febd86d2869a86e7561e3c2136c7862ad17', tabindex: this.clickable ? 0 : undefined, role: this.clickable ? 'button' : undefined, "aria-pressed": this.clickable ? String(this.selected) : undefined, onKeyDown: this.clickable ? this.handleKeyDown : undefined }, this.renderImage(), index.h("div", { key: '2955544b5bb10cec45591189591b6c7c64d844e5', class: "body" }, this.renderHeader(), this.renderSlot(), this.renderValue(), this.renderActionBar()), this.show3dEffect && index.h("limel-3d-hover-effect-glow", { key: '62f1d894a1feceb89cd44963cdb8ae9ba201ff6c' }))));
111
113
  }
112
114
  renderImage() {
113
115
  var _a;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DYg_7kkT.js');
4
- var _3dTiltHoverEffect = require('./3d-tilt-hover-effect-DI8kt0Y0.js');
4
+ var _3dTiltHoverEffect = require('./3d-tilt-hover-effect-Da8Dh_JX.js');
5
5
  var linkHelper = require('./link-helper-DwlfFJVL.js');
6
6
 
7
7
  const infoTileCss = () => `@charset "UTF-8";:host(limel-info-tile){--badge-text-color:var( --info-tile-badge-text-color, rgb(var(--color-white)) );--badge-background-color:var( --info-tile-badge-background-color, rgb(var(--color-red-default)) );--circular-progress-text-color:var( --info-tile-progress-text-color, var(--info-tile-text-color) );--circular-progress-suffix-color:var(--info-tile-progress-suffix-color);--circular-progress-prefix-color:var(--info-tile-progress-prefix-color);--circular-progress-track-color:rgb(var(--contrast-800), 0.3);--circular-progress-fill-color:var(--info-tile-progress-fill-color);--circular-progress-background-color:var( --info-tile-progress-background-color, var(--info-tile-background-color) );--label-min-size:0.75rem;--label-preferred-size:6cqw;--label-max-size:1rem;--value-min-size:1rem;--value-preferred-size:20cqw;--value-max-size:4rem;--suffix-prefix-min-size:0.75rem;--suffix-prefix-preferred-size:8cqw;--suffix-prefix-max-size:1.5rem;--icon-min-size:2rem;--icon-preferred-size:60cqh;--icon-max-size:calc(100cqw - 0.5rem);container-type:size;position:relative;display:flex;width:100%;height:100%;transition:filter 0.4s ease, opacity 0.25s ease}:host(limel-info-tile) *{box-sizing:border-box}:host(limel-info-tile[reduced-presence]){filter:saturate(0.1);opacity:0.4}:host(limel-info-tile[reduced-presence]:hover),:host(limel-info-tile[reduced-presence]:focus-within){filter:none;opacity:1}:host(limel-info-tile[disabled]) a{opacity:0.4;cursor:not-allowed}a{all:unset;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;height:100%;width:100%;flex-grow:1;padding:0.25rem 1rem 0.5rem 1rem;border-radius:var(--info-tile-border-radius, 1rem);background-color:var(--info-tile-background-color, var(--lime-elevated-surface-background-color))}:host ::slotted([slot=primary]){width:100%;height:100%}.icon{z-index:1;position:absolute;top:0.5rem;right:0.75rem;padding:0.25rem;aspect-ratio:1/1;color:var(--info-tile-icon-color, rgb(var(--contrast-1000)));opacity:0.9;border-radius:0;height:clamp(var(--icon-min-size), var(--icon-preferred-size), var(--icon-max-size))}@supports not (container-type: size){.icon{width:max(10%, 3rem)}}:host(.has-primary-slot-content) .icon,a:has(limel-circular-progress) .icon{top:unset;bottom:0.5rem;--icon-min-size:1.5rem;--icon-preferred-size:20cqh}slot[name=primary]{display:block;aspect-ratio:1;width:min(var(--icon-preferred-size), var(--icon-max-size))}.progress,slot[name=primary]{position:absolute;top:0.75rem;right:0.75rem}.progress{--circular-progress-size:min( var(--icon-preferred-size), var(--icon-max-size) )}@supports not (container-type: size){.progress{--circular-progress-size:initial}}.label{z-index:1;color:var(--info-tile-text-color, rgb(var(--contrast-1100)));opacity:0.8;line-height:1.2;font-size:clamp(var(--label-min-size), var(--label-preferred-size), var(--label-max-size))}@supports not (container-type: size){.label{font-size:var(--limel-theme-default-font-size)}}.label{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}limel-badge{position:absolute;top:-0.25rem;right:-0.25rem}limel-linear-progress{--lime-primary-color:var(--info-tile-text-color);position:absolute;inset:auto 0 0 0}.value-group{position:relative;z-index:1;display:flex;flex-direction:column;color:var(--info-tile-text-color, rgb(var(--contrast-1100)))}.value-and-suffix,.label{text-shadow:0 0 0.5rem var(--info-tile-background-color, rgb(var(--contrast-100))), 0 0 0.25rem var(--info-tile-background-color, rgb(var(--contrast-100)))}.value-and-suffix{display:flex}.prefix,.suffix{font-size:clamp(var(--suffix-prefix-min-size), var(--suffix-prefix-preferred-size), var(--suffix-prefix-max-size));opacity:0.7}@supports not (container-type: size){.prefix,.suffix{font-size:0.75rem}}.prefix{align-self:flex-start;line-height:normal;transform:translateY(40%)}.value{transition:opacity 0.2s ease, transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.95);transform-origin:left;transform:translate3d(0, 0, 0) scale(1);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:bold;line-height:normal;font-size:clamp(var(--value-min-size), var(--value-preferred-size), var(--value-max-size))}@supports not (container-type: size){.value{font-size:1.5rem}}:host(limel-info-tile[loading]) .value{opacity:0.3;transform:translate3d(0, 0, 0) scale(0.9)}.suffix{transform:translateY(10%)}@container (width < 8rem){.progress,slot[name=primary]{top:0.25rem;right:0.25rem}a{padding:0.375rem;gap:0.125rem}.icon{opacity:0.7;top:0.125rem;right:0.125rem;padding:0.125rem;--icon-preferred-size:18cqw;--icon-max-size:2rem}.value-group{gap:0.125rem}.value-and-suffix,.label{text-shadow:0 0 1rem var(--info-tile-background-color, rgb(var(--contrast-100))), 0 0 0.5rem var(--info-tile-background-color, rgb(var(--contrast-100)))}.prefix,.suffix{--suffix-prefix-min-size:0.625rem;--suffix-prefix-preferred-size:6cqw;--suffix-prefix-max-size:0.75rem}}@container (width < 18.75rem){.progress,slot[name=primary]{top:0.5rem;right:0.5rem}.icon{top:0.25rem;right:0.5rem}:host(.has-primary-slot-content) .icon,a:has(limel-circular-progress) .icon{right:0.25rem;bottom:0.25rem}}@container (width < 40.5rem){.value.ch-1,.value.ch-2,.value.ch-3,.value.ch-4{--value-preferred-size:20cqw}.value.ch-5{--value-preferred-size:18cqw}.value.ch-6{--value-preferred-size:17cqw}.value.ch-7{--value-preferred-size:16cqw}.value.ch-8{--value-preferred-size:15cqw}.value.ch-9{--value-preferred-size:14cqw}.value{--value-preferred-size:13cqw}}@container (height > 8rem){a{padding-top:0.75rem;padding-bottom:1rem}}@container (height < 8rem) and (width > 8rem){.value{--value-preferred-size:32cqh !important}.suffix,.prefix{--suffix-prefix-preferred-size:16cqh !important}}@container (height > 18.75rem){.progress,slot[name=primary],.icon{position:relative;top:unset;right:unset}a{align-items:center;justify-content:center}.label{text-align:center}:host(.has-primary-slot-content) .icon,a:has(limel-circular-progress) .icon{position:absolute;top:0.5rem;right:0.5rem;--icon-max-size:3rem}}limel-3d-hover-effect-glow{border-radius:var(--info-tile-border-radius, 1rem)}:host(limel-info-tile){isolation:isolate;transform-style:preserve-3d;perspective:1000px}@media (prefers-reduced-motion){:host(limel-info-tile){perspective:2000px}}a{position:relative;transition-duration:0.8s;transition-property:transform, box-shadow, background-color;transition-timing-function:ease-out;transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg)}a:focus{outline:none}a:hover,a:focus,a:focus-visible,a:focus-within{will-change:background-color, box-shadow, transform}a:hover,a:focus,a:focus-visible,a:active{transition-duration:0.2s}a:hover,a:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}a:hover{transform:scale3d(1.01, 1.01, 1.01) rotate3d(var(--limel-3d-hover-effect-rotate3d))}a:focus-visible{outline:none;transform:scale3d(1.01, 1.01, 1.01)}a:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.5}@media (prefers-reduced-motion){a:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.2}}a.is-clickable{cursor:pointer;box-shadow:var(--button-shadow-normal)}a.is-clickable:hover,a.is-clickable:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}a.is-clickable:active{transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);box-shadow:var(--button-shadow-pressed)}a.is-clickable:focus-visible{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-hovered)}a.is-clickable:focus-visible:active{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-pressed)}`;
@@ -92,11 +92,16 @@ const InfoTile = class {
92
92
  };
93
93
  }
94
94
  componentWillLoad() {
95
- const { handleMouseEnter, handleMouseLeave } = _3dTiltHoverEffect.getMouseEventHandlers(this.host);
95
+ const { handleMouseEnter, handleMouseLeave, cleanup } = _3dTiltHoverEffect.getMouseEventHandlers(this.host);
96
96
  this.handleMouseEnter = handleMouseEnter;
97
97
  this.handleMouseLeave = handleMouseLeave;
98
+ this.cleanup3dHoverEffect = cleanup;
98
99
  this.updateHasPrimarySlotContent();
99
100
  }
101
+ disconnectedCallback() {
102
+ var _a;
103
+ (_a = this.cleanup3dHoverEffect) === null || _a === void 0 ? void 0 : _a.call(this);
104
+ }
100
105
  render() {
101
106
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
102
107
  const extendedAriaLabel = this.checkProps(this === null || this === void 0 ? void 0 : this.prefix) +
@@ -111,9 +116,9 @@ const InfoTile = class {
111
116
  this.checkProps((_d = this === null || this === void 0 ? void 0 : this.link) === null || _d === void 0 ? void 0 : _d.title);
112
117
  const link = this.disabled ? '#' : (_e = this.link) === null || _e === void 0 ? void 0 : _e.href;
113
118
  const rel = linkHelper.getRel((_f = this.link) === null || _f === void 0 ? void 0 : _f.target, (_g = this.link) === null || _g === void 0 ? void 0 : _g.rel);
114
- return (index.h(index.Host, { key: '7a2d9a27bdd3940056e89a1852806ac15ecb00d2', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, class: { 'has-primary-slot-content': this.hasPrimarySlot } }, index.h("a", { key: '99a5a942a3ceb22a2892a0757c681b95b81ca6fa', title: (_h = this.link) === null || _h === void 0 ? void 0 : _h.title, href: link, target: (_j = this.link) === null || _j === void 0 ? void 0 : _j.target, rel: rel, tabindex: "0", "aria-label": extendedAriaLabel, "aria-disabled": this.disabled, "aria-busy": this.loading ? 'true' : 'false', "aria-live": "polite", class: {
119
+ return (index.h(index.Host, { key: 'b3415c1b5881c6deb73d4ab9fe86d137037bc60e', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, class: { 'has-primary-slot-content': this.hasPrimarySlot } }, index.h("a", { key: 'de292609a60d7bfe1eef9c4818bd76e59a4669ad', title: (_h = this.link) === null || _h === void 0 ? void 0 : _h.title, href: link, target: (_j = this.link) === null || _j === void 0 ? void 0 : _j.target, rel: rel, tabindex: "0", "aria-label": extendedAriaLabel, "aria-disabled": this.disabled, "aria-busy": this.loading ? 'true' : 'false', "aria-live": "polite", class: {
115
120
  'is-clickable': !!((_k = this.link) === null || _k === void 0 ? void 0 : _k.href) && !this.disabled,
116
- } }, this.renderIcon(), this.renderProgress(), index.h("slot", { key: 'a01a194b2c7718fbe9003ed7a2480d578264389c', name: "primary", onSlotchange: this.updateHasPrimarySlotContent }), index.h("div", { key: '4005660d80f8607d52c8eccd7ff04bb238c21f86', class: "value-group" }, this.renderPrefix(), index.h("div", { key: '884a1b013fe8720783894fb5c99c13d8289d343d', class: "value-and-suffix" }, this.renderValue(), this.renderSuffix()), this.renderSpinner()), this.renderLabel(), index.h("limel-3d-hover-effect-glow", { key: '9567012a0a77a8ad43e73f3872e9bb4cc22afe58' })), this.renderNotification()));
121
+ } }, this.renderIcon(), this.renderProgress(), index.h("slot", { key: '5133aac5b5f86165009946bcfa498a6d7a93d0ac', name: "primary", onSlotchange: this.updateHasPrimarySlotContent }), index.h("div", { key: '53df85a8b3229b3cc25af42f998d4605810546ae', class: "value-group" }, this.renderPrefix(), index.h("div", { key: 'dcf7509dfcd104885036dd0e16c391e1a2e7ff07', class: "value-and-suffix" }, this.renderValue(), this.renderSuffix()), this.renderSpinner()), this.renderLabel(), index.h("limel-3d-hover-effect-glow", { key: '62ae587e9e96f39102f1a00211f3fe9825edea44' })), this.renderNotification()));
117
122
  }
118
123
  checkProps(propValue) {
119
124
  return propValue ? propValue + ' ' : '';
@@ -27812,9 +27812,112 @@ function tableEditing({ allowTableNodeSelection = false } = {}) {
27812
27812
  });
27813
27813
  }
27814
27814
 
27815
+ const createTablePastePlugin = () => {
27816
+ return new Plugin({
27817
+ key: new PluginKey('tablePastePlugin'),
27818
+ props: {
27819
+ handlePaste: (view, _event, slice) => {
27820
+ return handleTablePaste(view, slice);
27821
+ },
27822
+ },
27823
+ });
27824
+ };
27825
+ // prosemirror-tables pastes a cell grid over the existing cells. Unless the
27826
+ // user selected cells explicitly, pasted cells become rows of the table (or
27827
+ // a new table) instead.
27828
+ const handleTablePaste = (view, slice) => {
27829
+ const { state } = view;
27830
+ if (state.selection instanceof CellSelection || !isInTable(state)) {
27831
+ return false;
27832
+ }
27833
+ const rows = pastedRows(slice, state.schema);
27834
+ if (!rows && !containsTableAmongBlocks(slice)) {
27835
+ return false;
27836
+ }
27837
+ const tr = state.tr.deleteSelection();
27838
+ const $cell = cellAround(tr.selection.$head);
27839
+ if (rows) {
27840
+ insertRows(tr, $cell, rows);
27841
+ }
27842
+ else {
27843
+ insertBlocks(tr, $cell, slice.content);
27844
+ }
27845
+ view.dispatch(tr.scrollIntoView());
27846
+ return true;
27847
+ };
27848
+ const insertRows = (tr, $cell, rows) => {
27849
+ const table = tableNodeTypes(tr.doc.type.schema).table.create(null, rows);
27850
+ if ($cell && rowsFitBelow($cell, TableMap.get(table).width)) {
27851
+ insertAt(tr, $cell.after(), rows);
27852
+ return;
27853
+ }
27854
+ insertBlocks(tr, $cell, Fragment.from(table));
27855
+ };
27856
+ const insertBlocks = (tr, $cell, blocks) => {
27857
+ if ($cell) {
27858
+ insertAt(tr, $cell.after(-1), blocks);
27859
+ return;
27860
+ }
27861
+ tr.replaceSelection(new Slice(blocks, 0, 0));
27862
+ };
27863
+ const insertAt = (tr, pos, content) => {
27864
+ const step = tr.steps.length;
27865
+ tr.insert(pos, content);
27866
+ const end = tr.mapping.slice(step).mapResult(pos, 1).pos;
27867
+ tr.setSelection(Selection.near(tr.doc.resolve(end), -1));
27868
+ };
27869
+ // A new row would split any cell spanning the boundary below the caret's row.
27870
+ const rowsFitBelow = ($cell, width) => {
27871
+ const map = TableMap.get($cell.node(-1));
27872
+ if (width !== map.width) {
27873
+ return false;
27874
+ }
27875
+ const boundary = map.findCell($cell.pos - $cell.start(-1)).top + 1;
27876
+ if (boundary >= map.height) {
27877
+ return true;
27878
+ }
27879
+ for (let col = 0; col < map.width; col++) {
27880
+ const above = map.map[(boundary - 1) * map.width + col];
27881
+ const below = map.map[boundary * map.width + col];
27882
+ if (above === below) {
27883
+ return false;
27884
+ }
27885
+ }
27886
+ return true;
27887
+ };
27888
+ // Reads the slice the way prosemirror-tables does: strip the wrappers a copy
27889
+ // from inside a table leaves around the content, then accept rows or cells.
27890
+ const pastedRows = (slice, schema) => {
27891
+ var _a;
27892
+ let { content, openStart, openEnd } = slice;
27893
+ while (content.childCount === 1 &&
27894
+ ((openStart > 0 && openEnd > 0) ||
27895
+ content.firstChild.type.spec.tableRole === 'table')) {
27896
+ openStart--;
27897
+ openEnd--;
27898
+ content = content.firstChild.content;
27899
+ }
27900
+ const role = (_a = content.firstChild) === null || _a === void 0 ? void 0 : _a.type.spec.tableRole;
27901
+ if (role === 'row') {
27902
+ return content;
27903
+ }
27904
+ if (role === 'cell' || role === 'header_cell') {
27905
+ return Fragment.from(tableNodeTypes(schema).row.create(null, content));
27906
+ }
27907
+ return null;
27908
+ };
27909
+ const containsTableAmongBlocks = (slice) => {
27910
+ if (slice.content.childCount < 2) {
27911
+ return false;
27912
+ }
27913
+ return slice.content.content.some((block) => block.type.spec.tableRole === 'table');
27914
+ };
27915
+
27815
27916
  const getTableEditingPlugins = (tablesEnabled) => {
27816
27917
  if (tablesEnabled) {
27817
- return [tableEditing()];
27918
+ // The paste plugin must precede tableEditing(), whose own
27919
+ // handlePaste would otherwise consume table pastes first.
27920
+ return [createTablePastePlugin(), tableEditing()];
27818
27921
  }
27819
27922
  return [];
27820
27923
  };
@@ -28047,7 +28150,7 @@ function areFrequencyMapsEqual(map1, map2) {
28047
28150
  return true;
28048
28151
  }
28049
28152
 
28050
- const prosemirrorAdapterCss = () => `@charset "UTF-8";blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:var(--limel-theme-default-font-size);word-break:break-word}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:last-child{margin-bottom:0}a{transition:color 0.2s ease;color:var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));text-decoration:none}a:hover{color:var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)))}hr{margin:1.75rem 0 2rem 0;border-width:0;border-top:1px solid rgb(var(--contrast-500))}dl{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;margin-bottom:2rem;border:1px solid rgb(var(--contrast-400));border-radius:0.375rem;background-color:rgb(var(--contrast-200))}dl dt,dl dd{padding:0.375rem 0.5rem;font-size:var(--limel-theme-default-font-size);margin:0}dl dt:nth-of-type(even),dl dd:nth-of-type(even){background-color:rgb(var(--contrast-300))}dl dt:first-child{border-top-left-radius:0.375rem}dl dt:last-child{border-bottom-left-radius:0.375rem}dl dd:first-child{border-top-right-radius:0.375rem}dl dd:last-child{border-bottom-right-radius:0.375rem}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:var(--limel-theme-default-font-size)}h6{font-size:0.75rem}h1,h2{margin-top:0.5rem;margin-bottom:0.5rem;letter-spacing:-0.03125rem;font-weight:500}h3,h4{margin-top:0.75rem;margin-bottom:0.25rem;font-weight:600}h5,h6{margin-top:0.5rem;margin-bottom:0.125rem;font-weight:600}h1,h2,h3,h4,h5,h6{word-break:break-word;hyphens:auto;-webkit-hyphens:auto}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:inherit}:not([contenteditable=true]) h1,:not([contenteditable=true]) h2,:not([contenteditable=true]) h3,:not([contenteditable=true]) h4,:not([contenteditable=true]) h5,:not([contenteditable=true]) h6{text-wrap:balance}[contenteditable=true] h1,[contenteditable=true] h2,[contenteditable=true] h3,[contenteditable=true] h4,[contenteditable=true] h5,[contenteditable=true] h6{text-wrap:initial}ul{list-style:none}ul>li{margin-left:0.75rem}ul>li:before{content:"";position:absolute;left:-0.5rem;top:0.5rem;width:0.25rem;height:0.25rem;border-radius:50%;background-color:rgb(var(--contrast-700));display:block}ol{margin-top:0.25rem;padding-left:1rem}ul{margin-top:0.25rem;padding-left:0}ul ul,ul ol,ol ol,ol ul{margin-left:0}li{position:relative;margin-bottom:0.25rem}pre,pre p,code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:0.75rem}pre{max-width:100%;white-space:pre-wrap;word-wrap:break-word}code{letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));tab-size:4;hyphens:none;display:inline;border-radius:0.25rem;padding:0.03125rem 0.25rem;background-color:rgb(var(--contrast-600))}pre>code{display:block;margin:0.5rem 0;padding:0.5rem 0.75rem}:host(limel-markdown:not(.no-table-styles)) table{table-layout:auto;min-width:100%;border-collapse:collapse;border-spacing:0;background:transparent;margin:0.75rem 0}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}:host(limel-markdown:not(.no-table-styles)) th,:host(limel-markdown:not(.no-table-styles)) td{text-align:left;vertical-align:top;transition:background-color 0.2s ease;font-size:var(--limel-theme-default-font-size)}:host(limel-markdown:not(.no-table-styles)) th p,:host(limel-markdown:not(.no-table-styles)) th li,:host(limel-markdown:not(.no-table-styles)) th a,:host(limel-markdown:not(.no-table-styles)) td p,:host(limel-markdown:not(.no-table-styles)) td li,:host(limel-markdown:not(.no-table-styles)) td a{word-break:normal;overflow-wrap:normal}:host(limel-markdown:not(.no-table-styles)) td{padding:0.5rem 0.375rem 0.75rem 0.375rem}:host(limel-markdown:not(.no-table-styles)) tr th{background-color:rgb(var(--contrast-400));padding:0.25rem 0.375rem;font-weight:normal}:host(limel-markdown:not(.no-table-styles)) tr th:only-child{text-align:center}:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td{background-color:rgb(var(--contrast-200))}:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td{background-color:rgb(var(--contrast-300))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}kbd{display:inline-block;font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;border-radius:0.125rem;border-style:solid;border-color:rgb(var(--contrast-500));border-width:0 1px 0.1875rem 1px;padding:0.0625rem 0.375rem;margin:0 0.25rem;background-color:rgb(var(--contrast-200));box-shadow:var(--button-shadow-normal), 0 0.625rem 0.375rem -0.5rem rgb(var(--color-black), 0.02), 0 0.025rem 0.5rem 0 rgb(var(--contrast-100)) inset}img{max-width:100%;border-radius:0.25rem}.image-wrapper{display:inline-flex;position:relative}.image-wrapper limel-linear-progress{position:absolute;inset:0.25rem auto auto 0.25rem;width:calc(100% - 0.5rem)}.image-wrapper img{transition:opacity 0.2s ease, scale 0.6s ease}.image-wrapper.state-failed,.image-wrapper.state-loading{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%208%208'%20style='fill-rule:evenodd;'%3E%3Cpath%20fill='rgba(186,186,192,0.16)'%20d='M0%200h4v4H0zM4%204h4v4H4z'/%3E%3C/svg%3E");background-size:0.5rem}.image-wrapper.state-failed img,.image-wrapper.state-loading img{opacity:0.3;scale:0.98}.image-wrapper::before{pointer-events:none;content:"";display:block;position:absolute;inset:0;border-radius:0.25rem;transition:border-color 0.4s ease, opacity 0.2s ease, box-shadow 0.6s ease;border:1px dashed transparent;opacity:0.2}.image-wrapper.state-failed img{filter:grayscale(0.8)}.image-wrapper.state-failed:before{opacity:0.8;box-shadow:var(--shadow-error-state)}.image-wrapper:hover::before{opacity:0.8;box-shadow:var(--shadow-depth-8)}.image-wrapper:has(.resize-handle[aria-grabbed=true])::before{border-color:var(--lime-primary-color, var(--limel-theme-primary-color));opacity:0.8;box-shadow:var(--shadow-depth-16), var(--shadow-depth-8)}.resize-handle{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:rgb(var(--contrast-900));box-shadow:var(--button-shadow-normal)}.resize-handle:hover,.resize-handle:focus,.resize-handle:focus-visible{will-change:color, background-color, box-shadow, transform}.resize-handle:hover,.resize-handle:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.resize-handle:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.resize-handle:hover,.resize-handle:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.resize-handle:focus{outline:none}.resize-handle:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.resize-handle{cursor:nwse-resize;position:absolute;display:flex;align-items:center;justify-content:center;width:0.5rem;height:0.5rem;border-radius:50%}.resize-handle.top-left{left:-0.25rem;top:-0.25rem;translate:-50%, -50%}.resize-handle.bottom-right{right:-0.25rem;bottom:-0.25rem;translate:50%, 50%}.resize-handle{opacity:0.6}.resize-wrapper:has(.resize-handle[aria-grabbed=true]) .resize-handle,.resize-wrapper:hover .resize-handle,.resize-handle:hover,.resize-handle:focus-visible{opacity:1}.resize-handle[aria-grabbed=true],.resize-handle:hover,.resize-handle:focus-visible{opacity:1;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}.resize-handle:hover,.resize-handle[aria-grabbed=true]{scale:1.4}.resize-handle:hover:before,.resize-handle[aria-grabbed=true]:before{background-color:rgb(var(--color-white))}.resize-handle:before{content:"";display:block;position:absolute;inset:0;margin:auto;border-radius:50%;width:0.25rem;height:0.25rem;background-color:rgb(var(--contrast-100))}:host(limel-prosemirror-adapter){display:flex;flex-direction:column}:host(limel-prosemirror-adapter) .toolbar{order:1}:host(limel-prosemirror-adapter) div#editor{order:2;height:100%;flex-grow:1}:host(limel-prosemirror-adapter) div[contenteditable=true]{height:100%}*{box-sizing:border-box}:host(limel-prosemirror-adapter:hover) .toolbar,:host(limel-prosemirror-adapter:focus-within) .toolbar{will-change:grid-template-rows}:host(limel-prosemirror-adapter:hover) limel-action-bar,:host(limel-prosemirror-adapter:focus-within) limel-action-bar{will-change:opacity, padding}.ProseMirror-menubar-wrapper{display:grid;grid-template-rows:auto 1fr}.ProseMirror-textblock-dropdown{min-width:3em}.ProseMirror-tooltip .ProseMirror-menu{width:-webkit-fit-content;width:fit-content;white-space:pre}.toolbar{--action-bar-border-radius:0.25rem;border-radius:var(--action-bar-border-radius);flex-shrink:0;position:sticky;z-index:1;top:0;width:100%;display:grid;grid-template-rows:var(--limel-prosemirror-adapter-toolbar-grid-template-rows);transition-property:grid-template-rows;transition-duration:var(--limel-prosemirror-adapter-toolbar-grid-template-rows-transition-duration);transition-timing-function:var(--limel-prosemirror-adapter-toolbar-transition-timing-function);background-color:rgba(var(--contrast-200), 0.5);backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}limel-action-bar{min-width:0;transition-property:padding, opacity;transition-duration:var(--limel-prosemirror-adapter-toolbar-grid-template-rows-transition-duration);transition-timing-function:var(--limel-prosemirror-adapter-toolbar-transition-timing-function);opacity:var(--limel-prosemirror-adapter-toolbar-opacity);padding:var(--limel-prosemirror-adapter-action-bar-padding-top-bottom, 0.125rem) 0.25rem;background-color:transparent;overflow:hidden}.ProseMirror{position:relative;word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;-webkit-font-variant-ligatures:none;font-variant-ligatures:none;font-feature-settings:"liga" 0;padding:var(--limel-text-editor-padding)}.ProseMirror [draggable][contenteditable=false]{user-select:text}.ProseMirror:focus-visible{outline:none}.ProseMirror-hideselection *::selection{background:transparent}.ProseMirror-hideselection *::-moz-selection{background:transparent}.ProseMirror-hideselection{caret-color:transparent}.ProseMirror-selectednode{outline:0.125rem solid rgb(var(--color-sky-light))}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:"";position:absolute;left:-2rem;right:-0.125rem;top:-0.125rem;bottom:-0.125rem;border:0.125rem solid rgb(var(--color-sky-light));pointer-events:none}img.ProseMirror-separator{display:inline !important;border:none !important;margin:0 !important}limel-portal{width:25rem}`;
28153
+ const prosemirrorAdapterCss = () => `@charset "UTF-8";blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:var(--limel-theme-default-font-size);word-break:break-word}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:last-child{margin-bottom:0}a{transition:color 0.2s ease;color:var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));text-decoration:none}a:hover{color:var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)))}hr{margin:1.75rem 0 2rem 0;border-width:0;border-top:1px solid rgb(var(--contrast-500))}dl{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;margin-bottom:2rem;border:1px solid rgb(var(--contrast-400));border-radius:0.375rem;background-color:rgb(var(--contrast-200))}dl dt,dl dd{padding:0.375rem 0.5rem;font-size:var(--limel-theme-default-font-size);margin:0}dl dt:nth-of-type(even),dl dd:nth-of-type(even){background-color:rgb(var(--contrast-300))}dl dt:first-child{border-top-left-radius:0.375rem}dl dt:last-child{border-bottom-left-radius:0.375rem}dl dd:first-child{border-top-right-radius:0.375rem}dl dd:last-child{border-bottom-right-radius:0.375rem}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:var(--limel-theme-default-font-size)}h6{font-size:0.75rem}h1,h2{margin-top:0.5rem;margin-bottom:0.5rem;letter-spacing:-0.03125rem;font-weight:500}h3,h4{margin-top:0.75rem;margin-bottom:0.25rem;font-weight:600}h5,h6{margin-top:0.5rem;margin-bottom:0.125rem;font-weight:600}h1,h2,h3,h4,h5,h6{word-break:break-word;hyphens:auto;-webkit-hyphens:auto}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:inherit}:not([contenteditable=true]) h1,:not([contenteditable=true]) h2,:not([contenteditable=true]) h3,:not([contenteditable=true]) h4,:not([contenteditable=true]) h5,:not([contenteditable=true]) h6{text-wrap:balance}[contenteditable=true] h1,[contenteditable=true] h2,[contenteditable=true] h3,[contenteditable=true] h4,[contenteditable=true] h5,[contenteditable=true] h6{text-wrap:initial}ul{list-style:none}ul>li{margin-left:0.75rem}ul>li:before{content:"";position:absolute;left:-0.5rem;top:0.5rem;width:0.25rem;height:0.25rem;border-radius:50%;background-color:rgb(var(--contrast-700));display:block}ol{margin-top:0.25rem;padding-left:1rem}ul{margin-top:0.25rem;padding-left:0}ul ul,ul ol,ol ol,ol ul{margin-left:0}li{position:relative;margin-bottom:0.25rem}pre,pre p,code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:0.75rem}pre{max-width:100%;white-space:pre-wrap;word-wrap:break-word}code{letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));tab-size:4;hyphens:none;display:inline;border-radius:0.25rem;padding:0.03125rem 0.25rem;background-color:rgb(var(--contrast-600))}pre>code{display:block;margin:0.5rem 0;padding:0.5rem 0.75rem}:host(limel-markdown:not(.no-table-styles)) table{table-layout:auto;min-width:100%;border-collapse:collapse;border-spacing:0;background:transparent;margin:0.75rem 0}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}:host(limel-markdown:not(.no-table-styles)) th,:host(limel-markdown:not(.no-table-styles)) td{text-align:left;vertical-align:top;transition:background-color 0.2s ease;font-size:var(--limel-theme-default-font-size)}:host(limel-markdown:not(.no-table-styles)) th p,:host(limel-markdown:not(.no-table-styles)) th li,:host(limel-markdown:not(.no-table-styles)) th a,:host(limel-markdown:not(.no-table-styles)) td p,:host(limel-markdown:not(.no-table-styles)) td li,:host(limel-markdown:not(.no-table-styles)) td a{word-break:normal;overflow-wrap:normal}:host(limel-markdown:not(.no-table-styles)) td{padding:0.5rem 0.375rem 0.75rem 0.375rem}:host(limel-markdown:not(.no-table-styles)) tr th{background-color:rgb(var(--contrast-400));padding:0.25rem 0.375rem;font-weight:normal}:host(limel-markdown:not(.no-table-styles)) tr th:only-child{text-align:center}:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td{background-color:rgb(var(--contrast-200))}:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td{background-color:rgb(var(--contrast-300))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}kbd{display:inline-block;font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;border-radius:0.125rem;border-style:solid;border-color:rgb(var(--contrast-500));border-width:0 1px 0.1875rem 1px;padding:0.0625rem 0.375rem;margin:0 0.25rem;background-color:rgb(var(--contrast-200));box-shadow:var(--button-shadow-normal), 0 0.625rem 0.375rem -0.5rem rgb(var(--color-black), 0.02), 0 0.025rem 0.5rem 0 rgb(var(--contrast-100)) inset}img{max-width:100%;border-radius:0.25rem}.image-wrapper{display:inline-flex;position:relative}.image-wrapper limel-linear-progress{position:absolute;inset:0.25rem auto auto 0.25rem;width:calc(100% - 0.5rem)}.image-wrapper img{transition:opacity 0.2s ease, scale 0.6s ease}.image-wrapper.state-failed,.image-wrapper.state-loading{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%208%208'%20style='fill-rule:evenodd;'%3E%3Cpath%20fill='rgba(186,186,192,0.16)'%20d='M0%200h4v4H0zM4%204h4v4H4z'/%3E%3C/svg%3E");background-size:0.5rem}.image-wrapper.state-failed img,.image-wrapper.state-loading img{opacity:0.3;scale:0.98}.image-wrapper::before{pointer-events:none;content:"";display:block;position:absolute;inset:0;border-radius:0.25rem;transition:border-color 0.4s ease, opacity 0.2s ease, box-shadow 0.6s ease;border:1px dashed transparent;opacity:0.2}.image-wrapper.state-failed img{filter:grayscale(0.8)}.image-wrapper.state-failed:before{opacity:0.8;box-shadow:var(--shadow-error-state)}.image-wrapper:hover::before{opacity:0.8;box-shadow:var(--shadow-depth-8)}.image-wrapper:has(.resize-handle[aria-grabbed=true])::before{border-color:var(--lime-primary-color, var(--limel-theme-primary-color));opacity:0.8;box-shadow:var(--shadow-depth-16), var(--shadow-depth-8)}.resize-handle{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:rgb(var(--contrast-900));box-shadow:var(--button-shadow-normal)}.resize-handle:hover,.resize-handle:focus,.resize-handle:focus-visible{will-change:color, background-color, box-shadow, transform}.resize-handle:hover,.resize-handle:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.resize-handle:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.resize-handle:hover,.resize-handle:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.resize-handle:focus{outline:none}.resize-handle:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.resize-handle{cursor:nwse-resize;position:absolute;display:flex;align-items:center;justify-content:center;width:0.5rem;height:0.5rem;border-radius:50%}.resize-handle.top-left{left:-0.25rem;top:-0.25rem;translate:-50%, -50%}.resize-handle.bottom-right{right:-0.25rem;bottom:-0.25rem;translate:50%, 50%}.resize-handle{opacity:0.6}.resize-wrapper:has(.resize-handle[aria-grabbed=true]) .resize-handle,.resize-wrapper:hover .resize-handle,.resize-handle:hover,.resize-handle:focus-visible{opacity:1}.resize-handle[aria-grabbed=true],.resize-handle:hover,.resize-handle:focus-visible{opacity:1;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}.resize-handle:hover,.resize-handle[aria-grabbed=true]{scale:1.4}.resize-handle:hover:before,.resize-handle[aria-grabbed=true]:before{background-color:rgb(var(--color-white))}.resize-handle:before{content:"";display:block;position:absolute;inset:0;margin:auto;border-radius:50%;width:0.25rem;height:0.25rem;background-color:rgb(var(--contrast-100))}:host(limel-prosemirror-adapter){display:flex;flex-direction:column}:host(limel-prosemirror-adapter) table{border-collapse:collapse;margin:0.75rem 0}:host(limel-prosemirror-adapter) th,:host(limel-prosemirror-adapter) td{border:1px solid rgb(var(--contrast-400));padding:0.25rem 0.375rem;text-align:left;vertical-align:top}:host(limel-prosemirror-adapter) .toolbar{order:1}:host(limel-prosemirror-adapter) div#editor{order:2;height:100%;flex-grow:1}:host(limel-prosemirror-adapter) div[contenteditable=true]{height:100%}*{box-sizing:border-box}:host(limel-prosemirror-adapter:hover) .toolbar,:host(limel-prosemirror-adapter:focus-within) .toolbar{will-change:grid-template-rows}:host(limel-prosemirror-adapter:hover) limel-action-bar,:host(limel-prosemirror-adapter:focus-within) limel-action-bar{will-change:opacity, padding}.ProseMirror-menubar-wrapper{display:grid;grid-template-rows:auto 1fr}.ProseMirror-textblock-dropdown{min-width:3em}.ProseMirror-tooltip .ProseMirror-menu{width:-webkit-fit-content;width:fit-content;white-space:pre}.toolbar{--action-bar-border-radius:0.25rem;border-radius:var(--action-bar-border-radius);flex-shrink:0;position:sticky;z-index:1;top:0;width:100%;display:grid;grid-template-rows:var(--limel-prosemirror-adapter-toolbar-grid-template-rows);transition-property:grid-template-rows;transition-duration:var(--limel-prosemirror-adapter-toolbar-grid-template-rows-transition-duration);transition-timing-function:var(--limel-prosemirror-adapter-toolbar-transition-timing-function);background-color:rgba(var(--contrast-200), 0.5);backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}limel-action-bar{min-width:0;transition-property:padding, opacity;transition-duration:var(--limel-prosemirror-adapter-toolbar-grid-template-rows-transition-duration);transition-timing-function:var(--limel-prosemirror-adapter-toolbar-transition-timing-function);opacity:var(--limel-prosemirror-adapter-toolbar-opacity);padding:var(--limel-prosemirror-adapter-action-bar-padding-top-bottom, 0.125rem) 0.25rem;background-color:transparent;overflow:hidden}.ProseMirror{position:relative;word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;-webkit-font-variant-ligatures:none;font-variant-ligatures:none;font-feature-settings:"liga" 0;padding:var(--limel-text-editor-padding)}.ProseMirror [draggable][contenteditable=false]{user-select:text}.ProseMirror:focus-visible{outline:none}.ProseMirror-hideselection *::selection{background:transparent}.ProseMirror-hideselection *::-moz-selection{background:transparent}.ProseMirror-hideselection{caret-color:transparent}.ProseMirror-selectednode{outline:0.125rem solid rgb(var(--color-sky-light))}li.ProseMirror-selectednode{outline:none}li.ProseMirror-selectednode:after{content:"";position:absolute;left:-2rem;right:-0.125rem;top:-0.125rem;bottom:-0.125rem;border:0.125rem solid rgb(var(--color-sky-light));pointer-events:none}img.ProseMirror-separator{display:inline !important;border:none !important;margin:0 !important}limel-portal{width:25rem}`;
28051
28154
 
28052
28155
  const DEBOUNCE_TIMEOUT = 300;
28053
28156
  const ProsemirrorAdapter = class {
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-DYg_7kkT.js');
4
4
  var linkHelper = require('./link-helper-DwlfFJVL.js');
5
- var _3dTiltHoverEffect = require('./3d-tilt-hover-effect-DI8kt0Y0.js');
5
+ var _3dTiltHoverEffect = require('./3d-tilt-hover-effect-Da8Dh_JX.js');
6
6
 
7
7
  const shortcutCss = () => `@charset "UTF-8";:host(limel-shortcut){--badge-text-color:var( --shortcut-badge-text-color, rgb(var(--color-white)) );--badge-background-color:var( --shortcut-badge-background-color, rgb(var(--color-red-default)) );position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:0.0625rem}:host(limel-shortcut) *{box-sizing:border-box}:host(limel-shortcut[disabled]) a{opacity:0.5;box-shadow:unset;cursor:not-allowed}a{all:unset;text-align:center;height:calc(100% - 1rem);width:calc(100% - 1rem);padding:0.5rem;border-radius:var(--shortcut-border-radius, 1rem);background-color:var(--shortcut-background-color, var(--lime-elevated-surface-background-color))}limel-icon{display:flex;height:100%;width:100%;justify-content:center;color:var(--shortcut-icon-color, rgb(var(--contrast-1000)));border-radius:var(--shortcut-border-radius, 1rem)}span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;color:var(--shortcut-label-color, rgb(var(--contrast-1100)));font-size:0.75rem;text-align:center}limel-badge{position:absolute;top:-0.25rem;right:0.125rem}limel-3d-hover-effect-glow{border-radius:var(--shortcut-border-radius, 1rem)}:host(limel-shortcut){isolation:isolate;transform-style:preserve-3d;perspective:1000px}@media (prefers-reduced-motion){:host(limel-shortcut){perspective:2000px}}a{position:relative;transition-duration:0.8s;transition-property:transform, box-shadow, background-color;transition-timing-function:ease-out;transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg)}a:focus{outline:none}a:hover,a:focus,a:focus-visible,a:focus-within{will-change:background-color, box-shadow, transform}a:hover,a:focus,a:focus-visible,a:active{transition-duration:0.2s}a:hover,a:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}a:hover{transform:scale3d(1.01, 1.01, 1.01) rotate3d(var(--limel-3d-hover-effect-rotate3d))}a:focus-visible{outline:none;transform:scale3d(1.01, 1.01, 1.01)}a:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.5}@media (prefers-reduced-motion){a:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.2}}a{cursor:pointer;box-shadow:var(--button-shadow-normal)}a:hover,a:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}a:active{transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);box-shadow:var(--button-shadow-pressed)}a:focus-visible{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-hovered)}a:focus-visible:active{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-pressed)}`;
8
8
 
@@ -41,14 +41,19 @@ const Shortcut = class {
41
41
  };
42
42
  }
43
43
  componentWillLoad() {
44
- const { handleMouseEnter, handleMouseLeave } = _3dTiltHoverEffect.getMouseEventHandlers(this.host);
44
+ const { handleMouseEnter, handleMouseLeave, cleanup } = _3dTiltHoverEffect.getMouseEventHandlers(this.host);
45
45
  this.handleMouseEnter = handleMouseEnter;
46
46
  this.handleMouseLeave = handleMouseLeave;
47
+ this.cleanup3dHoverEffect = cleanup;
48
+ }
49
+ disconnectedCallback() {
50
+ var _a;
51
+ (_a = this.cleanup3dHoverEffect) === null || _a === void 0 ? void 0 : _a.call(this);
47
52
  }
48
53
  render() {
49
54
  var _a, _b, _c, _d, _e;
50
55
  const rel = linkHelper.getRel((_a = this.link) === null || _a === void 0 ? void 0 : _a.target, (_b = this.link) === null || _b === void 0 ? void 0 : _b.rel);
51
- return (index.h(index.Host, { key: '3abb45f22a424174b48296c760402eaae504dac7', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, index.h("a", { key: 'df8021a9f304de60a78636d6ec762cf0a19e2134', "aria-disabled": this.disabled, href: (_c = this.link) === null || _c === void 0 ? void 0 : _c.href, target: (_d = this.link) === null || _d === void 0 ? void 0 : _d.target, rel: rel, tabindex: "0", "aria-label": this.getAriaLabel(), title: (_e = this.link) === null || _e === void 0 ? void 0 : _e.title }, index.h("limel-icon", { key: '010778f1b12551112f710b72b1697e507e9a6616', name: this.icon }), index.h("limel-3d-hover-effect-glow", { key: 'e781eb20e621624c241ed98dba9f1c3b141e67a7' })), this.renderLabel(), this.renderNotification()));
56
+ return (index.h(index.Host, { key: '5182738d7d2e8c2df2aa019631af021260b6b506', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, index.h("a", { key: 'ed8ae8d341aca2d64376c0b154b41b03d1d08073', "aria-disabled": this.disabled, href: (_c = this.link) === null || _c === void 0 ? void 0 : _c.href, target: (_d = this.link) === null || _d === void 0 ? void 0 : _d.target, rel: rel, tabindex: "0", "aria-label": this.getAriaLabel(), title: (_e = this.link) === null || _e === void 0 ? void 0 : _e.title }, index.h("limel-icon", { key: '0bc411ed33a695dbd2dc25689895ed2fc10d15b7', name: this.icon }), index.h("limel-3d-hover-effect-glow", { key: 'e57726bde3911492fbab47219fd0b36db2d1a122' })), this.renderLabel(), this.renderNotification()));
52
57
  }
53
58
  get host() { return index.getElement(this); }
54
59
  };
@@ -103,20 +103,22 @@ export class Card {
103
103
  };
104
104
  }
105
105
  componentWillLoad() {
106
- const { handleMouseEnter, handleMouseLeave } = getMouseEventHandlers(this.host);
106
+ const { handleMouseEnter, handleMouseLeave, cleanup } = getMouseEventHandlers(this.host);
107
107
  this.handleMouseEnter = handleMouseEnter;
108
108
  this.handleMouseLeave = handleMouseLeave;
109
+ this.cleanup3dHoverEffect = cleanup;
109
110
  }
110
111
  disconnectedCallback() {
111
- var _a, _b;
112
+ var _a, _b, _c;
112
113
  (_a = this.markdownResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
113
114
  (_b = this.markdownElement) === null || _b === void 0 ? void 0 : _b.removeEventListener('scroll', this.checkIfScrollable);
115
+ (_c = this.cleanup3dHoverEffect) === null || _c === void 0 ? void 0 : _c.call(this);
114
116
  }
115
117
  componentDidLoad() {
116
118
  this.setMarkdownElement(this.markdownElement);
117
119
  }
118
120
  render() {
119
- return (h(Host, { key: 'bd6a187317d0b475747be4fe270452ab8b38ef3c', onMouseEnter: this.show3dEffect ? this.handleMouseEnter : undefined, onMouseLeave: this.show3dEffect ? this.handleMouseLeave : undefined }, h("section", { key: '3cd9af303c7c3cc1db1cfc52e80dc05c4ec409de', tabindex: this.clickable ? 0 : undefined, role: this.clickable ? 'button' : undefined, "aria-pressed": this.clickable ? String(this.selected) : undefined, onKeyDown: this.clickable ? this.handleKeyDown : undefined }, this.renderImage(), h("div", { key: 'a9c535c05a993af0ef8f515bb1380d36fdf9f3ce', class: "body" }, this.renderHeader(), this.renderSlot(), this.renderValue(), this.renderActionBar()), this.show3dEffect && h("limel-3d-hover-effect-glow", { key: '93fc81bc92ff7cf2272f854d3b218651994ae5d8' }))));
121
+ return (h(Host, { key: '5714b1e5154ed8637c99f71d5a303dfc7ca51a51', onMouseEnter: this.show3dEffect ? this.handleMouseEnter : undefined, onMouseLeave: this.show3dEffect ? this.handleMouseLeave : undefined }, h("section", { key: 'f6592febd86d2869a86e7561e3c2136c7862ad17', tabindex: this.clickable ? 0 : undefined, role: this.clickable ? 'button' : undefined, "aria-pressed": this.clickable ? String(this.selected) : undefined, onKeyDown: this.clickable ? this.handleKeyDown : undefined }, this.renderImage(), h("div", { key: '2955544b5bb10cec45591189591b6c7c64d844e5', class: "body" }, this.renderHeader(), this.renderSlot(), this.renderValue(), this.renderActionBar()), this.show3dEffect && h("limel-3d-hover-effect-glow", { key: '62f1d894a1feceb89cd44963cdb8ae9ba201ff6c' }))));
120
122
  }
121
123
  renderImage() {
122
124
  var _a;
@@ -103,11 +103,16 @@ export class InfoTile {
103
103
  };
104
104
  }
105
105
  componentWillLoad() {
106
- const { handleMouseEnter, handleMouseLeave } = getMouseEventHandlers(this.host);
106
+ const { handleMouseEnter, handleMouseLeave, cleanup } = getMouseEventHandlers(this.host);
107
107
  this.handleMouseEnter = handleMouseEnter;
108
108
  this.handleMouseLeave = handleMouseLeave;
109
+ this.cleanup3dHoverEffect = cleanup;
109
110
  this.updateHasPrimarySlotContent();
110
111
  }
112
+ disconnectedCallback() {
113
+ var _a;
114
+ (_a = this.cleanup3dHoverEffect) === null || _a === void 0 ? void 0 : _a.call(this);
115
+ }
111
116
  render() {
112
117
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
113
118
  const extendedAriaLabel = this.checkProps(this === null || this === void 0 ? void 0 : this.prefix) +
@@ -122,9 +127,9 @@ export class InfoTile {
122
127
  this.checkProps((_d = this === null || this === void 0 ? void 0 : this.link) === null || _d === void 0 ? void 0 : _d.title);
123
128
  const link = this.disabled ? '#' : (_e = this.link) === null || _e === void 0 ? void 0 : _e.href;
124
129
  const rel = getRel((_f = this.link) === null || _f === void 0 ? void 0 : _f.target, (_g = this.link) === null || _g === void 0 ? void 0 : _g.rel);
125
- return (h(Host, { key: '7a2d9a27bdd3940056e89a1852806ac15ecb00d2', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, class: { 'has-primary-slot-content': this.hasPrimarySlot } }, h("a", { key: '99a5a942a3ceb22a2892a0757c681b95b81ca6fa', title: (_h = this.link) === null || _h === void 0 ? void 0 : _h.title, href: link, target: (_j = this.link) === null || _j === void 0 ? void 0 : _j.target, rel: rel, tabindex: "0", "aria-label": extendedAriaLabel, "aria-disabled": this.disabled, "aria-busy": this.loading ? 'true' : 'false', "aria-live": "polite", class: {
130
+ return (h(Host, { key: 'b3415c1b5881c6deb73d4ab9fe86d137037bc60e', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, class: { 'has-primary-slot-content': this.hasPrimarySlot } }, h("a", { key: 'de292609a60d7bfe1eef9c4818bd76e59a4669ad', title: (_h = this.link) === null || _h === void 0 ? void 0 : _h.title, href: link, target: (_j = this.link) === null || _j === void 0 ? void 0 : _j.target, rel: rel, tabindex: "0", "aria-label": extendedAriaLabel, "aria-disabled": this.disabled, "aria-busy": this.loading ? 'true' : 'false', "aria-live": "polite", class: {
126
131
  'is-clickable': !!((_k = this.link) === null || _k === void 0 ? void 0 : _k.href) && !this.disabled,
127
- } }, this.renderIcon(), this.renderProgress(), h("slot", { key: 'a01a194b2c7718fbe9003ed7a2480d578264389c', name: "primary", onSlotchange: this.updateHasPrimarySlotContent }), h("div", { key: '4005660d80f8607d52c8eccd7ff04bb238c21f86', class: "value-group" }, this.renderPrefix(), h("div", { key: '884a1b013fe8720783894fb5c99c13d8289d343d', class: "value-and-suffix" }, this.renderValue(), this.renderSuffix()), this.renderSpinner()), this.renderLabel(), h("limel-3d-hover-effect-glow", { key: '9567012a0a77a8ad43e73f3872e9bb4cc22afe58' })), this.renderNotification()));
132
+ } }, this.renderIcon(), this.renderProgress(), h("slot", { key: '5133aac5b5f86165009946bcfa498a6d7a93d0ac', name: "primary", onSlotchange: this.updateHasPrimarySlotContent }), h("div", { key: '53df85a8b3229b3cc25af42f998d4605810546ae', class: "value-group" }, this.renderPrefix(), h("div", { key: 'dcf7509dfcd104885036dd0e16c391e1a2e7ff07', class: "value-and-suffix" }, this.renderValue(), this.renderSuffix()), this.renderSpinner()), this.renderLabel(), h("limel-3d-hover-effect-glow", { key: '62ae587e9e96f39102f1a00211f3fe9825edea44' })), this.renderNotification()));
128
133
  }
129
134
  checkProps(propValue) {
130
135
  return propValue ? propValue + ' ' : '';
@@ -49,14 +49,19 @@ export class Shortcut {
49
49
  };
50
50
  }
51
51
  componentWillLoad() {
52
- const { handleMouseEnter, handleMouseLeave } = getMouseEventHandlers(this.host);
52
+ const { handleMouseEnter, handleMouseLeave, cleanup } = getMouseEventHandlers(this.host);
53
53
  this.handleMouseEnter = handleMouseEnter;
54
54
  this.handleMouseLeave = handleMouseLeave;
55
+ this.cleanup3dHoverEffect = cleanup;
56
+ }
57
+ disconnectedCallback() {
58
+ var _a;
59
+ (_a = this.cleanup3dHoverEffect) === null || _a === void 0 ? void 0 : _a.call(this);
55
60
  }
56
61
  render() {
57
62
  var _a, _b, _c, _d, _e;
58
63
  const rel = getRel((_a = this.link) === null || _a === void 0 ? void 0 : _a.target, (_b = this.link) === null || _b === void 0 ? void 0 : _b.rel);
59
- return (h(Host, { key: '3abb45f22a424174b48296c760402eaae504dac7', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("a", { key: 'df8021a9f304de60a78636d6ec762cf0a19e2134', "aria-disabled": this.disabled, href: (_c = this.link) === null || _c === void 0 ? void 0 : _c.href, target: (_d = this.link) === null || _d === void 0 ? void 0 : _d.target, rel: rel, tabindex: "0", "aria-label": this.getAriaLabel(), title: (_e = this.link) === null || _e === void 0 ? void 0 : _e.title }, h("limel-icon", { key: '010778f1b12551112f710b72b1697e507e9a6616', name: this.icon }), h("limel-3d-hover-effect-glow", { key: 'e781eb20e621624c241ed98dba9f1c3b141e67a7' })), this.renderLabel(), this.renderNotification()));
64
+ return (h(Host, { key: '5182738d7d2e8c2df2aa019631af021260b6b506', onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("a", { key: 'ed8ae8d341aca2d64376c0b154b41b03d1d08073', "aria-disabled": this.disabled, href: (_c = this.link) === null || _c === void 0 ? void 0 : _c.href, target: (_d = this.link) === null || _d === void 0 ? void 0 : _d.target, rel: rel, tabindex: "0", "aria-label": this.getAriaLabel(), title: (_e = this.link) === null || _e === void 0 ? void 0 : _e.title }, h("limel-icon", { key: '0bc411ed33a695dbd2dc25689895ed2fc10d15b7', name: this.icon }), h("limel-3d-hover-effect-glow", { key: 'e57726bde3911492fbab47219fd0b36db2d1a122' })), this.renderLabel(), this.renderNotification()));
60
65
  }
61
66
  static get is() { return "limel-shortcut"; }
62
67
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,103 @@
1
+ import { Plugin, PluginKey, Selection } from "prosemirror-state";
2
+ import { Fragment, Slice } from "prosemirror-model";
3
+ import { cellAround, CellSelection, isInTable, TableMap, tableNodeTypes, } from "prosemirror-tables";
4
+ export const createTablePastePlugin = () => {
5
+ return new Plugin({
6
+ key: new PluginKey('tablePastePlugin'),
7
+ props: {
8
+ handlePaste: (view, _event, slice) => {
9
+ return handleTablePaste(view, slice);
10
+ },
11
+ },
12
+ });
13
+ };
14
+ // prosemirror-tables pastes a cell grid over the existing cells. Unless the
15
+ // user selected cells explicitly, pasted cells become rows of the table (or
16
+ // a new table) instead.
17
+ const handleTablePaste = (view, slice) => {
18
+ const { state } = view;
19
+ if (state.selection instanceof CellSelection || !isInTable(state)) {
20
+ return false;
21
+ }
22
+ const rows = pastedRows(slice, state.schema);
23
+ if (!rows && !containsTableAmongBlocks(slice)) {
24
+ return false;
25
+ }
26
+ const tr = state.tr.deleteSelection();
27
+ const $cell = cellAround(tr.selection.$head);
28
+ if (rows) {
29
+ insertRows(tr, $cell, rows);
30
+ }
31
+ else {
32
+ insertBlocks(tr, $cell, slice.content);
33
+ }
34
+ view.dispatch(tr.scrollIntoView());
35
+ return true;
36
+ };
37
+ const insertRows = (tr, $cell, rows) => {
38
+ const table = tableNodeTypes(tr.doc.type.schema).table.create(null, rows);
39
+ if ($cell && rowsFitBelow($cell, TableMap.get(table).width)) {
40
+ insertAt(tr, $cell.after(), rows);
41
+ return;
42
+ }
43
+ insertBlocks(tr, $cell, Fragment.from(table));
44
+ };
45
+ const insertBlocks = (tr, $cell, blocks) => {
46
+ if ($cell) {
47
+ insertAt(tr, $cell.after(-1), blocks);
48
+ return;
49
+ }
50
+ tr.replaceSelection(new Slice(blocks, 0, 0));
51
+ };
52
+ const insertAt = (tr, pos, content) => {
53
+ const step = tr.steps.length;
54
+ tr.insert(pos, content);
55
+ const end = tr.mapping.slice(step).mapResult(pos, 1).pos;
56
+ tr.setSelection(Selection.near(tr.doc.resolve(end), -1));
57
+ };
58
+ // A new row would split any cell spanning the boundary below the caret's row.
59
+ const rowsFitBelow = ($cell, width) => {
60
+ const map = TableMap.get($cell.node(-1));
61
+ if (width !== map.width) {
62
+ return false;
63
+ }
64
+ const boundary = map.findCell($cell.pos - $cell.start(-1)).top + 1;
65
+ if (boundary >= map.height) {
66
+ return true;
67
+ }
68
+ for (let col = 0; col < map.width; col++) {
69
+ const above = map.map[(boundary - 1) * map.width + col];
70
+ const below = map.map[boundary * map.width + col];
71
+ if (above === below) {
72
+ return false;
73
+ }
74
+ }
75
+ return true;
76
+ };
77
+ // Reads the slice the way prosemirror-tables does: strip the wrappers a copy
78
+ // from inside a table leaves around the content, then accept rows or cells.
79
+ const pastedRows = (slice, schema) => {
80
+ var _a;
81
+ let { content, openStart, openEnd } = slice;
82
+ while (content.childCount === 1 &&
83
+ ((openStart > 0 && openEnd > 0) ||
84
+ content.firstChild.type.spec.tableRole === 'table')) {
85
+ openStart--;
86
+ openEnd--;
87
+ content = content.firstChild.content;
88
+ }
89
+ const role = (_a = content.firstChild) === null || _a === void 0 ? void 0 : _a.type.spec.tableRole;
90
+ if (role === 'row') {
91
+ return content;
92
+ }
93
+ if (role === 'cell' || role === 'header_cell') {
94
+ return Fragment.from(tableNodeTypes(schema).row.create(null, content));
95
+ }
96
+ return null;
97
+ };
98
+ const containsTableAmongBlocks = (slice) => {
99
+ if (slice.content.childCount < 2) {
100
+ return false;
101
+ }
102
+ return slice.content.content.some((block) => block.type.spec.tableRole === 'table');
103
+ };