@the-portland-company/shell 0.67.0 → 0.68.0
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 +26 -0
- package/dist/app-chrome.cjs +577 -430
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.d.cts +39 -11
- package/dist/app-chrome.d.ts +39 -11
- package/dist/app-chrome.js +33 -15
- package/dist/app-chrome.js.map +1 -1
- package/dist/chrome.css +96 -16
- package/dist/{chunk-JHIFJZ73.js → chunk-NHBNM5P3.js} +17 -8
- package/dist/chunk-NHBNM5P3.js.map +1 -0
- package/dist/{chunk-T5ERHFNT.js → chunk-ZKYREVCK.js} +528 -376
- package/dist/chunk-ZKYREVCK.js.map +1 -0
- package/dist/index.cjs +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/native.cjs +546 -385
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +62 -3
- package/dist/native.d.ts +62 -3
- package/dist/native.js +2 -2
- package/dist/theme-preference.cjs +15 -6
- package/dist/theme-preference.cjs.map +1 -1
- package/dist/theme-preference.d.cts +3 -3
- package/dist/theme-preference.d.ts +3 -3
- package/dist/theme-preference.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-JHIFJZ73.js.map +0 -1
- package/dist/chunk-T5ERHFNT.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1194,6 +1194,15 @@ function readThemeCookie() {
|
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
1196
|
function resolveTheme(pref) {
|
|
1197
|
+
if (pref === "dark") return "dark";
|
|
1198
|
+
if (pref === "system") {
|
|
1199
|
+
try {
|
|
1200
|
+
if (typeof window !== "undefined" && typeof window.matchMedia === "function") {
|
|
1201
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
1202
|
+
}
|
|
1203
|
+
} catch {
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1197
1206
|
return "light";
|
|
1198
1207
|
}
|
|
1199
1208
|
function readStoredThemePreference() {
|
|
@@ -1218,11 +1227,10 @@ var ls=null;try{ls=localStorage.getItem(KEY);}catch(e){}
|
|
|
1218
1227
|
var pref=cookie||ls||"system";
|
|
1219
1228
|
if(VALID.indexOf(pref)===-1)pref="system";
|
|
1220
1229
|
if(cookie&&cookie!==ls){try{localStorage.setItem(KEY,cookie);}catch(e){}}
|
|
1221
|
-
|
|
1222
|
-
// stale dark class a pre-retirement cookie/localStorage value left behind.
|
|
1230
|
+
var dark=pref==="dark"||(pref==="system"&&!!(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches));
|
|
1223
1231
|
var d=document.documentElement;
|
|
1224
|
-
d.classList.remove("dark");
|
|
1225
|
-
try{d.style.colorScheme="light";}catch(e){}
|
|
1232
|
+
if(dark)d.classList.add("dark");else d.classList.remove("dark");
|
|
1233
|
+
try{d.setAttribute("data-theme",dark?"dark":"light");d.style.colorScheme=dark?"dark":"light";}catch(e){}
|
|
1226
1234
|
}catch(e){}})();`;
|
|
1227
1235
|
|
|
1228
1236
|
// src/theme/colorMode.tsx
|