@etsoo/materialui 1.5.32 → 1.5.33

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.
@@ -28,6 +28,22 @@ class HtmlDivElement extends HTMLElement {
28
28
  connectedCallback() {
29
29
  // Create a shadow root
30
30
  const shadow = this.attachShadow({ mode: "open" });
31
+ // Default styles
32
+ // Comply with @etsoo/editor default styles
33
+ const style = document.createElement("style");
34
+ style.textContent = `
35
+ :host {
36
+ box-sizing: border-box;
37
+ }
38
+ img {
39
+ max-width: 100%;
40
+ }
41
+ pre {
42
+ background-color: #f3f3f3;
43
+ padding: 12px;
44
+ }
45
+ `;
46
+ shadow.appendChild(style);
31
47
  // Create a wrapper element to hold the sanitized HTML content
32
48
  const wrapper = document.createElement("div");
33
49
  wrapper.style.cssText = this.displayStyle ?? "";
@@ -25,6 +25,22 @@ class HtmlDivElement extends HTMLElement {
25
25
  connectedCallback() {
26
26
  // Create a shadow root
27
27
  const shadow = this.attachShadow({ mode: "open" });
28
+ // Default styles
29
+ // Comply with @etsoo/editor default styles
30
+ const style = document.createElement("style");
31
+ style.textContent = `
32
+ :host {
33
+ box-sizing: border-box;
34
+ }
35
+ img {
36
+ max-width: 100%;
37
+ }
38
+ pre {
39
+ background-color: #f3f3f3;
40
+ padding: 12px;
41
+ }
42
+ `;
43
+ shadow.appendChild(style);
28
44
  // Create a wrapper element to hold the sanitized HTML content
29
45
  const wrapper = document.createElement("div");
30
46
  wrapper.style.cssText = this.displayStyle ?? "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.5.32",
3
+ "version": "1.5.33",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -84,6 +84,6 @@
84
84
  "@vitejs/plugin-react": "^4.4.1",
85
85
  "jsdom": "^26.1.0",
86
86
  "typescript": "^5.8.3",
87
- "vitest": "^3.1.1"
87
+ "vitest": "^3.1.2"
88
88
  }
89
89
  }
@@ -32,6 +32,23 @@ class HtmlDivElement extends HTMLElement {
32
32
  // Create a shadow root
33
33
  const shadow = this.attachShadow({ mode: "open" });
34
34
 
35
+ // Default styles
36
+ // Comply with @etsoo/editor default styles
37
+ const style = document.createElement("style");
38
+ style.textContent = `
39
+ :host {
40
+ box-sizing: border-box;
41
+ }
42
+ img {
43
+ max-width: 100%;
44
+ }
45
+ pre {
46
+ background-color: #f3f3f3;
47
+ padding: 12px;
48
+ }
49
+ `;
50
+ shadow.appendChild(style);
51
+
35
52
  // Create a wrapper element to hold the sanitized HTML content
36
53
  const wrapper = document.createElement("div");
37
54
  wrapper.style.cssText = this.displayStyle ?? "";