@limetech/lime-elements 39.34.1 → 39.34.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/{index-BgFEL6FF.js → index-ETPz91V5.js} +10 -0
  3. package/dist/cjs/limel-breadcrumbs_8.cjs.entry.js +36 -4
  4. package/dist/cjs/limel-file-viewer.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-markdown.cjs.entry.js +3 -3
  6. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +222 -127
  7. package/dist/cjs/{markdown-parser-ZtNkFlPt.js → markdown-parser-F3YRMjcy.js} +32 -5
  8. package/dist/collection/components/list/list.js +36 -4
  9. package/dist/collection/components/markdown/markdown-parser.js +31 -4
  10. package/dist/collection/components/markdown/markdown.js +2 -1
  11. package/dist/esm/{index-t4DgGbWS.js → index-CbciMfiU.js} +10 -1
  12. package/dist/esm/limel-breadcrumbs_8.entry.js +36 -4
  13. package/dist/esm/limel-file-viewer.entry.js +1 -1
  14. package/dist/esm/limel-markdown.entry.js +3 -3
  15. package/dist/esm/limel-prosemirror-adapter.entry.js +222 -127
  16. package/dist/esm/{markdown-parser-nW7FzScN.js → markdown-parser-Blt6ZFY0.js} +32 -5
  17. package/dist/lime-elements/lime-elements.esm.js +1 -1
  18. package/dist/lime-elements/{p-f9c8e4d2.entry.js → p-0b9f3cf1.entry.js} +1 -1
  19. package/dist/lime-elements/p-2486f61d.entry.js +1 -0
  20. package/dist/lime-elements/{p-44f4d02e.entry.js → p-5a00f0fb.entry.js} +1 -1
  21. package/dist/lime-elements/p-DMNtoJ8I.js +1 -0
  22. package/dist/lime-elements/{p-csTwzWL7.js → p-DnPeu2SH.js} +2 -2
  23. package/dist/lime-elements/{p-a0720aca.entry.js → p-f5e2f3b4.entry.js} +1 -1
  24. package/dist/types/components/list/list.d.ts +16 -0
  25. package/dist/types/components/markdown/markdown.d.ts +1 -0
  26. package/dist/types/components.d.ts +4 -0
  27. package/package.json +1 -1
  28. package/dist/lime-elements/p-063b8d0a.entry.js +0 -1
  29. package/dist/lime-elements/p-DJvGLFul.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [39.34.3](https://github.com/Lundalogik/lime-elements/compare/v39.34.2...v39.34.3) (2026-06-17)
2
+
3
+ ### Bug Fixes
4
+
5
+
6
+ * **list:** focus pressed row on mousedown to keep clicks on target ([b3bdf28](https://github.com/Lundalogik/lime-elements/commit/b3bdf28fad451cf1b4273a382e792b892c4a0ea6)), closes [Lundalogik/crm-client#795](https://github.com/Lundalogik/crm-client/issues/795)
7
+
8
+ ## [39.34.2](https://github.com/Lundalogik/lime-elements/compare/v39.34.1...v39.34.2) (2026-06-17)
9
+
10
+ ### Bug Fixes
11
+
12
+
13
+ * **markdown:** keep id/name attributes unprefixed in sanitizer ([14a062a](https://github.com/Lundalogik/lime-elements/commit/14a062a12b4a6f21bcd4fd88c25ad5faacae6c84)), closes [#4135](https://github.com/Lundalogik/lime-elements/issues/4135)
14
+
1
15
  ## [39.34.1](https://github.com/Lundalogik/lime-elements/compare/v39.34.0...v39.34.1) (2026-06-16)
2
16
 
3
17
  ### Bug Fixes
@@ -5893,6 +5893,15 @@ const htmlDecoder = getDecoder(htmlDecodeTree);
5893
5893
  function decodeHTML(str, mode = DecodingMode.Legacy) {
5894
5894
  return htmlDecoder(str, mode);
5895
5895
  }
5896
+ /**
5897
+ * Decodes an HTML string, requiring all entities to be terminated by a semicolon.
5898
+ *
5899
+ * @param str The string to decode.
5900
+ * @returns The decoded string.
5901
+ */
5902
+ function decodeHTMLStrict(str) {
5903
+ return htmlDecoder(str, DecodingMode.Strict);
5904
+ }
5896
5905
 
5897
5906
  /** All valid namespaces in HTML. */
5898
5907
  var NS;
@@ -20343,6 +20352,7 @@ exports.EXIT = EXIT;
20343
20352
  exports.ccount = ccount;
20344
20353
  exports.convert = convert;
20345
20354
  exports.decodeHTML = decodeHTML;
20355
+ exports.decodeHTMLStrict = decodeHTMLStrict;
20346
20356
  exports.defaultSchema = defaultSchema;
20347
20357
  exports.determineBranch = determineBranch;
20348
20358
  exports.htmlDecodeTree = htmlDecodeTree;
@@ -2436,9 +2436,40 @@ const List = class {
2436
2436
  if (!element) {
2437
2437
  return;
2438
2438
  }
2439
+ this.listElement = element;
2440
+ this.listElement.removeEventListener('mousedown', this.handleItemMouseDown);
2441
+ this.listElement.addEventListener('mousedown', this.handleItemMouseDown);
2439
2442
  this.mdcList = new MDCList(element);
2440
2443
  this.mdcList.hasTypeahead = true;
2441
2444
  };
2445
+ /**
2446
+ * Focus the pressed list item directly, without scrolling.
2447
+ *
2448
+ * Since the list uses `delegatesFocus`, pressing a non-focusable part of
2449
+ * a list item (e.g. its text) would otherwise delegate focus to the first
2450
+ * focusable row, scrolling it into view. In a scrolled list that moves the
2451
+ * pressed row out from under the pointer before the click completes, so the
2452
+ * click lands on empty space and no item gets selected.
2453
+ *
2454
+ * Bound to `mousedown` only (not `pointerdown`) so a touch-drag to scroll
2455
+ * that starts on a row is not blocked by `preventDefault`.
2456
+ *
2457
+ * @param event - the mousedown event
2458
+ */
2459
+ this.handleItemMouseDown = (event) => {
2460
+ var _a;
2461
+ const target = event.target;
2462
+ const itemElement = (_a = target === null || target === void 0 ? void 0 : target.closest) === null || _a === void 0 ? void 0 : _a.call(target, '.mdc-deprecated-list-item');
2463
+ if (!itemElement) {
2464
+ return;
2465
+ }
2466
+ // Suppress the default focus delegation (and its scroll) for any row,
2467
+ // but only move focus to interactive (non-disabled) rows.
2468
+ event.preventDefault();
2469
+ if (!itemElement.classList.contains('mdc-deprecated-list-item--disabled')) {
2470
+ itemElement.focus({ preventScroll: true });
2471
+ }
2472
+ };
2442
2473
  this.setupListeners = () => {
2443
2474
  if (!this.mdcList) {
2444
2475
  return;
@@ -2453,9 +2484,10 @@ const List = class {
2453
2484
  this.mdcList.singleSelection = !this.multiple;
2454
2485
  };
2455
2486
  this.teardown = () => {
2456
- var _a, _b;
2457
- (_a = this.mdcList) === null || _a === void 0 ? void 0 : _a.unlisten(ACTION_EVENT, this.handleAction);
2458
- (_b = this.mdcList) === null || _b === void 0 ? void 0 : _b.destroy();
2487
+ var _a, _b, _c;
2488
+ (_a = this.listElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('mousedown', this.handleItemMouseDown);
2489
+ (_b = this.mdcList) === null || _b === void 0 ? void 0 : _b.unlisten(ACTION_EVENT, this.handleAction);
2490
+ (_c = this.mdcList) === null || _c === void 0 ? void 0 : _c.destroy();
2459
2491
  };
2460
2492
  this.handleAction = (event) => {
2461
2493
  if (!this.multiple) {
@@ -2533,7 +2565,7 @@ const List = class {
2533
2565
  maxLinesSecondaryText = 1;
2534
2566
  }
2535
2567
  const html = this.listRenderer.render(this.items, this.config);
2536
- return (index.h(index.Host, { key: '02f96dd9abcf8c67ffcac1ee066d5118e94b04f4', style: {
2568
+ return (index.h(index.Host, { key: 'cf75b5469a04c515ea9d11adc88a5db66bb01358', style: {
2537
2569
  '--maxLinesSecondaryText': `${maxLinesSecondaryText}`,
2538
2570
  } }, html));
2539
2571
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index$1 = require('./index-8x93m5oI.js');
4
4
  var translations = require('./translations-VEsa81QY.js');
5
- var index = require('./index-BgFEL6FF.js');
5
+ var index = require('./index-ETPz91V5.js');
6
6
  require('./_commonjsHelpers-CFO10eej.js');
7
7
 
8
8
  /**
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var index$1 = require('./index-8x93m5oI.js');
4
- var markdownParser = require('./markdown-parser-ZtNkFlPt.js');
4
+ var markdownParser = require('./markdown-parser-F3YRMjcy.js');
5
5
  var config = require('./config-dit--4m5.js');
6
- var index = require('./index-BgFEL6FF.js');
6
+ var index = require('./index-ETPz91V5.js');
7
7
  var adaptColorContrast = require('./adapt-color-contrast-Beo1IEl_.js');
8
8
  require('./_commonjsHelpers-CFO10eej.js');
9
9
 
@@ -1167,7 +1167,7 @@ const Markdown = class {
1167
1167
  this.cleanupImageIntersectionObserver();
1168
1168
  }
1169
1169
  render() {
1170
- return (index$1.h(index$1.Host, { key: '9f4f25470aad4f8db1133231f40e7a388f2146bb' }, index$1.h("div", { key: '64378c77ef6c71a3ee3733d430f8d33999c315e0', id: "markdown", ref: (el) => (this.rootElement = el) })));
1170
+ return (index$1.h(index$1.Host, { key: '79583ca7783472254c84899b2709d20e21bb442f' }, index$1.h("div", { key: 'd06c81a4098a25b97a6ed56d2830205228933c6e', id: "markdown", ref: (el) => (this.rootElement = el) })));
1171
1171
  }
1172
1172
  setupImageIntersectionObserver() {
1173
1173
  if (this.lazyLoadImages) {