@tomehq/theme 0.2.2 → 0.2.4

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/dist/entry.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  entry_default
3
- } from "./chunk-CTPOZMMK.js";
3
+ } from "./chunk-S47BRMNQ.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-CTPOZMMK.js";
6
+ } from "./chunk-S47BRMNQ.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.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Tome default theme and React app shell",
5
5
  "type": "module",
6
6
  "main": "./src/index.tsx",
@@ -8,9 +8,14 @@
8
8
  ".": "./src/index.tsx",
9
9
  "./entry": "./src/entry.tsx"
10
10
  },
11
+ "scripts": {
12
+ "build": "tsup src/index.tsx src/entry.tsx --format esm --dts --external react --external react-dom --external 'virtual:tome/config' --external 'virtual:tome/routes' --external 'virtual:tome/page-loader' --external 'virtual:tome/doc-context' --external '@tomehq/components'",
13
+ "dev": "tsup src/index.tsx src/entry.tsx --format esm --dts --external react --external react-dom --external 'virtual:tome/config' --external 'virtual:tome/routes' --external 'virtual:tome/page-loader' --external 'virtual:tome/doc-context' --external '@tomehq/components' --watch",
14
+ "clean": "rm -rf dist"
15
+ },
11
16
  "dependencies": {
12
- "@tomehq/components": "0.2.2",
13
- "@tomehq/core": "0.2.2"
17
+ "@tomehq/components": "workspace:*",
18
+ "@tomehq/core": "workspace:*"
14
19
  },
15
20
  "peerDependencies": {
16
21
  "react": "^18.0.0 || ^19.0.0",
@@ -43,10 +48,5 @@
43
48
  "type": "git",
44
49
  "url": "https://github.com/vxcozy/tome.git",
45
50
  "directory": "packages/theme"
46
- },
47
- "scripts": {
48
- "build": "tsup src/index.tsx src/entry.tsx --format esm --dts --external react --external react-dom --external 'virtual:tome/config' --external 'virtual:tome/routes' --external 'virtual:tome/page-loader' --external 'virtual:tome/doc-context' --external '@tomehq/components'",
49
- "dev": "tsup src/index.tsx src/entry.tsx --format esm --dts --external react --external react-dom --external 'virtual:tome/config' --external 'virtual:tome/routes' --external 'virtual:tome/page-loader' --external 'virtual:tome/doc-context' --external '@tomehq/components' --watch",
50
- "clean": "rm -rf dist"
51
51
  }
52
- }
52
+ }
package/src/Shell.tsx CHANGED
@@ -371,6 +371,11 @@ export function Shell({
371
371
  return () => mq.removeEventListener("change", handler);
372
372
  }, [themeMode]);
373
373
 
374
+ // Sync dark mode class on <html> so global CSS selectors (e.g. Shiki dual-theme) work
375
+ useEffect(() => {
376
+ document.documentElement.classList.toggle("dark", isDark);
377
+ }, [isDark]);
378
+
374
379
  useEffect(() => {
375
380
  const c = () => setWide(window.innerWidth > 1100);
376
381
  c(); window.addEventListener("resize", c);
package/src/entry.tsx CHANGED
@@ -77,8 +77,17 @@ const contentStyles = `
77
77
 
78
78
  /* Shiki dual-theme support */
79
79
  .shiki { background: var(--cdBg) !important; }
80
- html.dark .shiki .shiki-light { display: none; }
81
- html.light .shiki .shiki-dark { display: none; }
80
+
81
+ /* Dark mode: switch Shiki tokens from light-theme inline colors to --shiki-dark CSS vars */
82
+ html.dark .shiki,
83
+ html.dark .shiki span {
84
+ color: var(--shiki-dark) !important;
85
+ }
86
+
87
+ /* Brighten dim comment tokens (github-dark #6A737D is too low-contrast on dark backgrounds) */
88
+ html.dark .shiki span[style*="--shiki-dark:#6A737D"] {
89
+ --shiki-dark: #a0aab5 !important;
90
+ }
82
91
  `;
83
92
 
84
93
  // ── PAGE TYPES ────────────────────────────────────────────
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Tome Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.