@limetech/lime-elements 37.45.0 → 37.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [37.45.1](https://github.com/Lundalogik/lime-elements/compare/v37.45.0...v37.45.1) (2024-05-31)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+ * **text-editor:** throw error if the content type is not supported ([b5183e6](https://github.com/Lundalogik/lime-elements/commit/b5183e62202be3127146ced823e02daec3884ff8))
8
+
9
+ ### Performance Improvements
10
+
11
+
12
+ * **text-editor:** destroy view on disconnect ([2acbf8c](https://github.com/Lundalogik/lime-elements/commit/2acbf8cc59396079aa7c99a64620955385e7fffa))
13
+
1
14
  ## [37.45.0](https://github.com/Lundalogik/lime-elements/compare/v37.44.3...v37.45.0) (2024-05-29)
2
15
 
3
16
 
@@ -25646,13 +25646,19 @@ const ProsemirrorAdapter = class {
25646
25646
  index.h("limel-action-bar", { accessibleLabel: "Toolbar", actions: this.actionBarItems, onItemSelected: this.handleActionBarItem }),
25647
25647
  ];
25648
25648
  }
25649
+ disconnectedCallback() {
25650
+ this.view.destroy();
25651
+ }
25649
25652
  setupContentConverter() {
25650
- /* eslint-disable multiline-ternary */
25651
- this.contentConverter =
25652
- this.contentType === 'markdown'
25653
- ? new markdownConverter()
25654
- : new HTMLConverter();
25655
- /* eslint-enable multiline-ternary */
25653
+ if (this.contentType === 'markdown') {
25654
+ this.contentConverter = new markdownConverter();
25655
+ }
25656
+ else if (this.contentType === 'html') {
25657
+ this.contentConverter = new HTMLConverter();
25658
+ }
25659
+ else {
25660
+ throw new Error(`Unsupported content type: ${this.contentType}. Only 'markdown' and 'html' are supported.`);
25661
+ }
25656
25662
  }
25657
25663
  async initializeTextEditor() {
25658
25664
  this.schema = this.initializeSchema();