@xyd-js/host 0.0.0-build-0016109-20250820105436 → 0.0.0-build-31e77be-20250820145657

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-0016109-20250820105436
3
+ ## 0.0.0-build-31e77be-20250820145657
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-0016109-20250820105436
10
- - @xyd-js/atlas@0.0.0-build-0016109-20250820105436
11
- - @xyd-js/components@0.0.0-build-0016109-20250820105436
12
- - @xyd-js/composer@0.0.0-build-0016109-20250820105436
13
- - @xyd-js/content@0.0.0-build-0016109-20250820105436
14
- - @xyd-js/core@0.0.0-build-0016109-20250820105436
15
- - @xyd-js/framework@0.0.0-build-0016109-20250820105436
16
- - @xyd-js/plugin-algolia@0.0.0-build-0016109-20250820105436
17
- - @xyd-js/plugin-orama@0.0.0-build-0016109-20250820105436
18
- - @xyd-js/theme-cosmo@0.0.0-build-0016109-20250820105436
19
- - @xyd-js/theme-gusto@0.0.0-build-0016109-20250820105436
20
- - @xyd-js/theme-opener@0.0.0-build-0016109-20250820105436
21
- - @xyd-js/theme-picasso@0.0.0-build-0016109-20250820105436
22
- - @xyd-js/theme-poetry@0.0.0-build-0016109-20250820105436
23
- - @xyd-js/theme-solar@0.0.0-build-0016109-20250820105436
24
- - @xyd-js/themes@0.0.0-build-0016109-20250820105436
9
+ - @xyd-js/analytics@0.0.0-build-31e77be-20250820145657
10
+ - @xyd-js/atlas@0.0.0-build-31e77be-20250820145657
11
+ - @xyd-js/components@0.0.0-build-31e77be-20250820145657
12
+ - @xyd-js/composer@0.0.0-build-31e77be-20250820145657
13
+ - @xyd-js/content@0.0.0-build-31e77be-20250820145657
14
+ - @xyd-js/core@0.0.0-build-31e77be-20250820145657
15
+ - @xyd-js/framework@0.0.0-build-31e77be-20250820145657
16
+ - @xyd-js/plugin-algolia@0.0.0-build-31e77be-20250820145657
17
+ - @xyd-js/plugin-orama@0.0.0-build-31e77be-20250820145657
18
+ - @xyd-js/theme-cosmo@0.0.0-build-31e77be-20250820145657
19
+ - @xyd-js/theme-gusto@0.0.0-build-31e77be-20250820145657
20
+ - @xyd-js/theme-opener@0.0.0-build-31e77be-20250820145657
21
+ - @xyd-js/theme-picasso@0.0.0-build-31e77be-20250820145657
22
+ - @xyd-js/theme-poetry@0.0.0-build-31e77be-20250820145657
23
+ - @xyd-js/theme-solar@0.0.0-build-31e77be-20250820145657
24
+ - @xyd-js/themes@0.0.0-build-31e77be-20250820145657
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-0016109-20250820105436",
3
+ "version": "0.0.0-build-31e77be-20250820145657",
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-0016109-20250820105436",
17
- "@xyd-js/core": "0.0.0-build-0016109-20250820105436",
18
- "@xyd-js/components": "0.0.0-build-0016109-20250820105436",
19
- "@xyd-js/content": "0.0.0-build-0016109-20250820105436",
20
- "@xyd-js/framework": "0.0.0-build-0016109-20250820105436",
21
- "@xyd-js/composer": "0.0.0-build-0016109-20250820105436",
22
- "@xyd-js/themes": "0.0.0-build-0016109-20250820105436",
23
- "@xyd-js/atlas": "0.0.0-build-0016109-20250820105436",
24
- "@xyd-js/theme-poetry": "0.0.0-build-0016109-20250820105436",
25
- "@xyd-js/theme-cosmo": "0.0.0-build-0016109-20250820105436",
26
- "@xyd-js/theme-opener": "0.0.0-build-0016109-20250820105436",
27
- "@xyd-js/theme-picasso": "0.0.0-build-0016109-20250820105436",
28
- "@xyd-js/theme-gusto": "0.0.0-build-0016109-20250820105436",
29
- "@xyd-js/theme-solar": "0.0.0-build-0016109-20250820105436",
30
- "@xyd-js/plugin-orama": "0.0.0-build-0016109-20250820105436",
31
- "@xyd-js/plugin-algolia": "0.0.0-build-0016109-20250820105436"
16
+ "@xyd-js/analytics": "0.0.0-build-31e77be-20250820145657",
17
+ "@xyd-js/core": "0.0.0-build-31e77be-20250820145657",
18
+ "@xyd-js/components": "0.0.0-build-31e77be-20250820145657",
19
+ "@xyd-js/content": "0.0.0-build-31e77be-20250820145657",
20
+ "@xyd-js/framework": "0.0.0-build-31e77be-20250820145657",
21
+ "@xyd-js/composer": "0.0.0-build-31e77be-20250820145657",
22
+ "@xyd-js/themes": "0.0.0-build-31e77be-20250820145657",
23
+ "@xyd-js/atlas": "0.0.0-build-31e77be-20250820145657",
24
+ "@xyd-js/theme-poetry": "0.0.0-build-31e77be-20250820145657",
25
+ "@xyd-js/theme-cosmo": "0.0.0-build-31e77be-20250820145657",
26
+ "@xyd-js/theme-opener": "0.0.0-build-31e77be-20250820145657",
27
+ "@xyd-js/theme-picasso": "0.0.0-build-31e77be-20250820145657",
28
+ "@xyd-js/theme-gusto": "0.0.0-build-31e77be-20250820145657",
29
+ "@xyd-js/theme-solar": "0.0.0-build-31e77be-20250820145657",
30
+ "@xyd-js/plugin-orama": "0.0.0-build-31e77be-20250820145657",
31
+ "@xyd-js/plugin-algolia": "0.0.0-build-31e77be-20250820145657"
32
32
  },
33
33
  "devDependencies": {
34
34
  "autoprefixer": "^10.4.20",