@xyd-js/host 0.0.0-build-eb01699-20250820104451 → 0.0.0-build-98ffa49-20250820144609

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,24 +1,24 @@
1
1
  # @xyd-js/host
2
2
 
3
- ## 0.0.0-build-eb01699-20250820104451
3
+ ## 0.0.0-build-98ffa49-20250820144609
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - update all packages
8
8
  - Updated dependencies
9
- - @xyd-js/analytics@0.0.0-build-eb01699-20250820104451
10
- - @xyd-js/atlas@0.0.0-build-eb01699-20250820104451
11
- - @xyd-js/components@0.0.0-build-eb01699-20250820104451
12
- - @xyd-js/composer@0.0.0-build-eb01699-20250820104451
13
- - @xyd-js/content@0.0.0-build-eb01699-20250820104451
14
- - @xyd-js/core@0.0.0-build-eb01699-20250820104451
15
- - @xyd-js/framework@0.0.0-build-eb01699-20250820104451
16
- - @xyd-js/plugin-algolia@0.0.0-build-eb01699-20250820104451
17
- - @xyd-js/plugin-orama@0.0.0-build-eb01699-20250820104451
18
- - @xyd-js/theme-cosmo@0.0.0-build-eb01699-20250820104451
19
- - @xyd-js/theme-gusto@0.0.0-build-eb01699-20250820104451
20
- - @xyd-js/theme-opener@0.0.0-build-eb01699-20250820104451
21
- - @xyd-js/theme-picasso@0.0.0-build-eb01699-20250820104451
22
- - @xyd-js/theme-poetry@0.0.0-build-eb01699-20250820104451
23
- - @xyd-js/theme-solar@0.0.0-build-eb01699-20250820104451
24
- - @xyd-js/themes@0.0.0-build-eb01699-20250820104451
9
+ - @xyd-js/analytics@0.0.0-build-98ffa49-20250820144609
10
+ - @xyd-js/atlas@0.0.0-build-98ffa49-20250820144609
11
+ - @xyd-js/components@0.0.0-build-98ffa49-20250820144609
12
+ - @xyd-js/composer@0.0.0-build-98ffa49-20250820144609
13
+ - @xyd-js/content@0.0.0-build-98ffa49-20250820144609
14
+ - @xyd-js/core@0.0.0-build-98ffa49-20250820144609
15
+ - @xyd-js/framework@0.0.0-build-98ffa49-20250820144609
16
+ - @xyd-js/plugin-algolia@0.0.0-build-98ffa49-20250820144609
17
+ - @xyd-js/plugin-orama@0.0.0-build-98ffa49-20250820144609
18
+ - @xyd-js/theme-cosmo@0.0.0-build-98ffa49-20250820144609
19
+ - @xyd-js/theme-gusto@0.0.0-build-98ffa49-20250820144609
20
+ - @xyd-js/theme-opener@0.0.0-build-98ffa49-20250820144609
21
+ - @xyd-js/theme-picasso@0.0.0-build-98ffa49-20250820144609
22
+ - @xyd-js/theme-poetry@0.0.0-build-98ffa49-20250820144609
23
+ - @xyd-js/theme-solar@0.0.0-build-98ffa49-20250820144609
24
+ - @xyd-js/themes@0.0.0-build-98ffa49-20250820144609
package/app/root.tsx CHANGED
@@ -135,9 +135,17 @@ function DefaultMetas() {
135
135
  }
136
136
 
137
137
  function ColorSchemeScript() {
138
+ const defaultColorScheme = settings?.theme?.appearance?.colorScheme || 'os'
139
+
140
+ // Inject settings into the script
141
+ const scriptWithSettings = `
142
+ window.__xydColorSchemeSettings = ${JSON.stringify({ defaultColorScheme })};
143
+ ${colorSchemeScript}
144
+ `;
145
+
138
146
  return <script
139
147
  dangerouslySetInnerHTML={{
140
- __html: colorSchemeScript
148
+ __html: scriptWithSettings
141
149
  }}
142
150
  />
143
151
  }
@@ -1,12 +1,18 @@
1
1
  (function () {
2
2
  try {
3
- var theme = localStorage.getItem('xyd-color-scheme') || 'auto';
3
+ // Get settings from window object (injected by the server)
4
+ const settings = (window).__xydColorSchemeSettings;
5
+ const defaultColorScheme = settings.defaultColorScheme;
6
+
7
+ var theme = localStorage.getItem('xyd-color-scheme') || defaultColorScheme || 'auto';
4
8
 
5
9
  if (theme === 'auto') {
6
10
  const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
7
11
 
8
12
  if (isDark) {
9
13
  document.documentElement.setAttribute('data-color-scheme', 'dark');
14
+ } else {
15
+ document.documentElement.setAttribute('data-color-scheme', 'light');
10
16
  }
11
17
  } else if (theme === 'light') {
12
18
  document.documentElement.setAttribute('data-color-scheme', 'light');
@@ -17,6 +23,8 @@
17
23
  // Fallback to system preference if localStorage fails
18
24
  if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
19
25
  document.documentElement.setAttribute('data-color-scheme', 'dark');
26
+ } else {
27
+ document.documentElement.setAttribute('data-color-scheme', 'light');
20
28
  }
21
29
  }
22
30
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyd-js/host",
3
- "version": "0.0.0-build-eb01699-20250820104451",
3
+ "version": "0.0.0-build-98ffa49-20250820144609",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "katex": "^0.16.22",
@@ -13,22 +13,22 @@
13
13
  "@react-router/serve": "^7.7.1",
14
14
  "openux-js": "0.0.0-pre.1",
15
15
  "pluganalytics": "0.0.0-pre.3",
16
- "@xyd-js/analytics": "0.0.0-build-eb01699-20250820104451",
17
- "@xyd-js/core": "0.0.0-build-eb01699-20250820104451",
18
- "@xyd-js/components": "0.0.0-build-eb01699-20250820104451",
19
- "@xyd-js/content": "0.0.0-build-eb01699-20250820104451",
20
- "@xyd-js/framework": "0.0.0-build-eb01699-20250820104451",
21
- "@xyd-js/composer": "0.0.0-build-eb01699-20250820104451",
22
- "@xyd-js/themes": "0.0.0-build-eb01699-20250820104451",
23
- "@xyd-js/atlas": "0.0.0-build-eb01699-20250820104451",
24
- "@xyd-js/theme-poetry": "0.0.0-build-eb01699-20250820104451",
25
- "@xyd-js/theme-cosmo": "0.0.0-build-eb01699-20250820104451",
26
- "@xyd-js/theme-opener": "0.0.0-build-eb01699-20250820104451",
27
- "@xyd-js/theme-picasso": "0.0.0-build-eb01699-20250820104451",
28
- "@xyd-js/theme-gusto": "0.0.0-build-eb01699-20250820104451",
29
- "@xyd-js/theme-solar": "0.0.0-build-eb01699-20250820104451",
30
- "@xyd-js/plugin-orama": "0.0.0-build-eb01699-20250820104451",
31
- "@xyd-js/plugin-algolia": "0.0.0-build-eb01699-20250820104451"
16
+ "@xyd-js/analytics": "0.0.0-build-98ffa49-20250820144609",
17
+ "@xyd-js/core": "0.0.0-build-98ffa49-20250820144609",
18
+ "@xyd-js/components": "0.0.0-build-98ffa49-20250820144609",
19
+ "@xyd-js/content": "0.0.0-build-98ffa49-20250820144609",
20
+ "@xyd-js/framework": "0.0.0-build-98ffa49-20250820144609",
21
+ "@xyd-js/composer": "0.0.0-build-98ffa49-20250820144609",
22
+ "@xyd-js/themes": "0.0.0-build-98ffa49-20250820144609",
23
+ "@xyd-js/atlas": "0.0.0-build-98ffa49-20250820144609",
24
+ "@xyd-js/theme-poetry": "0.0.0-build-98ffa49-20250820144609",
25
+ "@xyd-js/theme-cosmo": "0.0.0-build-98ffa49-20250820144609",
26
+ "@xyd-js/theme-opener": "0.0.0-build-98ffa49-20250820144609",
27
+ "@xyd-js/theme-picasso": "0.0.0-build-98ffa49-20250820144609",
28
+ "@xyd-js/theme-gusto": "0.0.0-build-98ffa49-20250820144609",
29
+ "@xyd-js/theme-solar": "0.0.0-build-98ffa49-20250820144609",
30
+ "@xyd-js/plugin-orama": "0.0.0-build-98ffa49-20250820144609",
31
+ "@xyd-js/plugin-algolia": "0.0.0-build-98ffa49-20250820144609"
32
32
  },
33
33
  "devDependencies": {
34
34
  "autoprefixer": "^10.4.20",