@tomehq/theme 0.6.2 → 0.6.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.
@@ -1069,7 +1069,7 @@ function Shell({
1069
1069
  }, [currentPageId]);
1070
1070
  useLayoutEffect(() => {
1071
1071
  if (!htmlContentRef.current || !pageHtml) return;
1072
- const stripped = pageHtml.replace(/<h1[^>]*>[\s\S]*?<\/h1>\s*/, "");
1072
+ const stripped = pageHtml.replace(/<h1\b[^>]*>(?:[^<]|<(?!\/h1>))*<\/h1>\s*/, "");
1073
1073
  htmlContentRef.current.innerHTML = stripped;
1074
1074
  lastHtmlRef.current = stripped;
1075
1075
  }, [pageHtml, currentPageId]);
package/dist/entry.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  entry_default
3
- } from "./chunk-NIWVZJLG.js";
3
+ } from "./chunk-26CZLWVW.js";
4
4
  export {
5
5
  entry_default as default
6
6
  };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Shell,
4
4
  THEME_PRESETS,
5
5
  entry_default
6
- } from "./chunk-NIWVZJLG.js";
6
+ } from "./chunk-26CZLWVW.js";
7
7
  export {
8
8
  AiChat,
9
9
  entry_default as App,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomehq/theme",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Tome default theme and React app shell",
5
5
  "type": "module",
6
6
  "main": "./src/index.tsx",
@@ -9,8 +9,8 @@
9
9
  "./entry": "./src/entry.tsx"
10
10
  },
11
11
  "dependencies": {
12
- "@tomehq/components": "0.6.2",
13
- "@tomehq/core": "0.6.2"
12
+ "@tomehq/components": "0.6.3",
13
+ "@tomehq/core": "0.6.3"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "react": "^18.0.0 || ^19.0.0",
@@ -32,11 +32,11 @@
32
32
  "@testing-library/user-event": "^14.6.1",
33
33
  "@types/react": "^19.0.0",
34
34
  "@types/react-dom": "^19.0.0",
35
- "jsdom": "^28.1.0",
35
+ "jsdom": "^29.0.0",
36
36
  "react": "^19.0.0",
37
37
  "react-dom": "^19.0.0",
38
38
  "tsup": "^8.0.0",
39
- "typescript": "^5.5.0"
39
+ "typescript": "^6.0.0"
40
40
  },
41
41
  "license": "MIT",
42
42
  "repository": {
package/src/Shell.tsx CHANGED
@@ -614,7 +614,7 @@ export function Shell({
614
614
  // useLayoutEffect ensures innerHTML is set synchronously before paint — no flash
615
615
  useLayoutEffect(() => {
616
616
  if (!htmlContentRef.current || !pageHtml) return;
617
- const stripped = pageHtml.replace(/<h1[^>]*>[\s\S]*?<\/h1>\s*/, "");
617
+ const stripped = pageHtml.replace(/<h1\b[^>]*>(?:[^<]|<(?!\/h1>))*<\/h1>\s*/, "");
618
618
  htmlContentRef.current.innerHTML = stripped;
619
619
  lastHtmlRef.current = stripped;
620
620
  }, [pageHtml, currentPageId]);