@limetech/lime-elements 37.63.6 → 37.63.8

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 (31) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/limel-markdown.cjs.entry.js +1 -1
  3. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +4 -5
  4. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
  5. package/dist/cjs/{markdown-parser-4b5e23e2.js → markdown-parser-d1887ec8.js} +12473 -423
  6. package/dist/cjs/markdown-parser-d1887ec8.js.map +1 -0
  7. package/dist/collection/components/markdown/markdown-parser.js +30 -2
  8. package/dist/collection/components/markdown/markdown-parser.js.map +1 -1
  9. package/dist/collection/components/text-editor/utils/html-converter.js +4 -4
  10. package/dist/collection/components/text-editor/utils/html-converter.js.map +1 -1
  11. package/dist/esm/limel-markdown.entry.js +1 -1
  12. package/dist/esm/limel-prosemirror-adapter.entry.js +4 -5
  13. package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
  14. package/dist/esm/{markdown-parser-18863266.js → markdown-parser-90f72b15.js} +12473 -424
  15. package/dist/esm/markdown-parser-90f72b15.js.map +1 -0
  16. package/dist/lime-elements/lime-elements.esm.js +1 -1
  17. package/dist/lime-elements/p-19a23481.entry.js +2 -0
  18. package/dist/lime-elements/p-19a23481.entry.js.map +1 -0
  19. package/dist/lime-elements/p-3e8afa19.js +8 -0
  20. package/dist/lime-elements/p-3e8afa19.js.map +1 -0
  21. package/dist/lime-elements/{p-6b5743be.entry.js → p-4bfcb8c7.entry.js} +2 -2
  22. package/dist/types/components/markdown/markdown-parser.d.ts +8 -0
  23. package/dist/types/components/text-editor/utils/html-converter.d.ts +3 -0
  24. package/package.json +2 -1
  25. package/dist/cjs/markdown-parser-4b5e23e2.js.map +0 -1
  26. package/dist/esm/markdown-parser-18863266.js.map +0 -1
  27. package/dist/lime-elements/p-ca3ddffb.js +0 -8
  28. package/dist/lime-elements/p-ca3ddffb.js.map +0 -1
  29. package/dist/lime-elements/p-d0fb7554.entry.js +0 -2
  30. package/dist/lime-elements/p-d0fb7554.entry.js.map +0 -1
  31. /package/dist/lime-elements/{p-6b5743be.entry.js.map → p-4bfcb8c7.entry.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## [37.63.8](https://github.com/Lundalogik/lime-elements/compare/v37.63.7...v37.63.8) (2024-12-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+ * **text-editor:** close XSS vulnerability ([8f55a5d](https://github.com/Lundalogik/lime-elements/commit/8f55a5d249f6177724b63989b1a691f1740a79ea)), closes [Lundalogik/crm-feature#4490](https://github.com/Lundalogik/crm-feature/issues/4490)
8
+
9
+ ## [37.63.7](https://github.com/Lundalogik/lime-elements/compare/v37.63.6...v37.63.7) (2024-11-26)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+
15
+ * **markdown:** better image resizing ([3e8cc17](https://github.com/Lundalogik/lime-elements/commit/3e8cc172eacd31ece3848919c44e953452eb77f4)), closes [Lundalogik/crm-feature#4422](https://github.com/Lundalogik/crm-feature/issues/4422)
16
+
1
17
  ## [37.63.6](https://github.com/Lundalogik/lime-elements/compare/v37.63.5...v37.63.6) (2024-10-22)
2
18
 
3
19
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-d1052409.js');
6
- const markdownParser = require('./markdown-parser-4b5e23e2.js');
6
+ const markdownParser = require('./markdown-parser-d1887ec8.js');
7
7
  require('./_commonjsHelpers-0c557e26.js');
8
8
 
9
9
  const markdownCss = "@charset \"UTF-8\";code{font-family:ui-monospace, \"Cascadia Code\", \"Source Code Pro\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace;font-size:0.8125rem;letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;display:inline-block;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;overflow:auto;white-space:pre-wrap}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:0.875rem}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}: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}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:0.875rem;word-break:break-word;hyphens:auto;-webkit-hyphens:auto}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:only-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))}ul{list-style:none}ul li{position:relative;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{margin-bottom:0.25rem}: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;border:1px solid rgb(var(--contrast-400))}: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:0.875rem}: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))}blockquote{position:relative;font-weight:100;font-size:0.875rem;max-width:100%;line-height:1.4;margin:0;padding:0.5rem 1.25rem;border-radius:0.05rem 0.75rem;background-color:rgb(var(--contrast-300))}blockquote:before,blockquote:after{position:absolute;font-size:2.75rem;opacity:0.4}blockquote:before{content:\"“\";left:0;top:-0.75rem}blockquote:after{content:\"”\";right:0;bottom:-2rem}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:0.875rem;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}hr{border-top:1px solid rgb(var(--contrast-700))}img{max-width:100%}.MsoNormal{margin:0}";
@@ -9,7 +9,7 @@ const _getAllKeysIn = require('./_getAllKeysIn-bcf08d3b.js');
9
9
  const isObject$1 = require('./isObject-e28b7997.js');
10
10
  const isArray = require('./isArray-d188a04f.js');
11
11
  const isObjectLike = require('./isObjectLike-3e3f0cba.js');
12
- const markdownParser = require('./markdown-parser-4b5e23e2.js');
12
+ const markdownParser = require('./markdown-parser-d1887ec8.js');
13
13
  const translations = require('./translations-6c4447f4.js');
14
14
  const randomString = require('./random-string-c8445652.js');
15
15
  const isItem = require('./isItem-3f8ad629.js');
@@ -25695,11 +25695,9 @@ class MarkdownConverter {
25695
25695
  * @private
25696
25696
  */
25697
25697
  class HTMLConverter {
25698
- constructor() {
25698
+ constructor(plugins) {
25699
25699
  this.parseAsHTML = (text) => {
25700
- return new Promise((resolve) => {
25701
- resolve(text);
25702
- });
25700
+ return markdownParser.sanitizeHTML(text, this.customNodes);
25703
25701
  };
25704
25702
  this.serialize = (view) => {
25705
25703
  if (view.dom.textContent === '') {
@@ -25709,6 +25707,7 @@ class HTMLConverter {
25709
25707
  return view.dom.innerHTML;
25710
25708
  }
25711
25709
  };
25710
+ this.customNodes = plugins;
25712
25711
  }
25713
25712
  }
25714
25713