@scalemule/news-publication 0.0.9 → 0.0.11
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/cookie-consent.css +131 -0
- package/dist/{chunk-PYCU2T5O.js → chunk-5QHNNRVQ.js} +1 -1
- package/dist/{chunk-R33MJWND.js → chunk-AYSBXLOT.js} +1 -1
- package/dist/chunk-NQD3M7ZY.js +283 -0
- package/dist/{chunk-TJ7RL3PV.js → chunk-RNXTBN5Z.js} +7 -0
- package/dist/cookie-consent-banner.js +2 -2
- package/dist/cookie-settings-view.cjs +7 -0
- package/dist/cookie-settings-view.js +2 -2
- package/dist/index.cjs +296 -0
- package/dist/index.d.cts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +4 -3
- package/dist/theme-toggle.cjs +258 -0
- package/dist/theme-toggle.d.cts +22 -0
- package/dist/theme-toggle.d.ts +22 -0
- package/dist/theme-toggle.js +2 -0
- package/marketplace.css +79 -19
- package/package.json +7 -2
- package/tokens/broadsheet.css +205 -1
package/cookie-consent.css
CHANGED
|
@@ -417,3 +417,134 @@
|
|
|
417
417
|
align-items: center;
|
|
418
418
|
gap: 0.75rem;
|
|
419
419
|
}
|
|
420
|
+
|
|
421
|
+
/* ==========================================================================
|
|
422
|
+
Dark Theme (Evening Edition) support
|
|
423
|
+
========================================================================== */
|
|
424
|
+
:root[data-theme="dark"] .sm-cookie-banner-card,
|
|
425
|
+
[data-theme="dark"] .sm-cookie-banner-card,
|
|
426
|
+
.publication[data-theme="dark"] .sm-cookie-banner-card {
|
|
427
|
+
background: rgba(22, 26, 23, 0.96);
|
|
428
|
+
border-color: rgba(255, 255, 255, 0.12);
|
|
429
|
+
color: #eaece8;
|
|
430
|
+
box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
:root[data-theme="dark"] .sm-cookie-banner-title,
|
|
434
|
+
[data-theme="dark"] .sm-cookie-banner-title,
|
|
435
|
+
.publication[data-theme="dark"] .sm-cookie-banner-title {
|
|
436
|
+
color: #ffffff;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
:root[data-theme="dark"] .sm-cookie-banner-text,
|
|
440
|
+
[data-theme="dark"] .sm-cookie-banner-text,
|
|
441
|
+
.publication[data-theme="dark"] .sm-cookie-banner-text {
|
|
442
|
+
color: #c5cbc6;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
:root[data-theme="dark"] .sm-cookie-banner-link,
|
|
446
|
+
[data-theme="dark"] .sm-cookie-banner-link,
|
|
447
|
+
.publication[data-theme="dark"] .sm-cookie-banner-link {
|
|
448
|
+
color: #ffffff;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
:root[data-theme="dark"] .sm-cookie-btn-secondary,
|
|
452
|
+
[data-theme="dark"] .sm-cookie-btn-secondary,
|
|
453
|
+
.publication[data-theme="dark"] .sm-cookie-btn-secondary {
|
|
454
|
+
background: rgba(255, 255, 255, 0.1);
|
|
455
|
+
color: #ffffff;
|
|
456
|
+
border-color: rgba(255, 255, 255, 0.18);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
:root[data-theme="dark"] .sm-cookie-btn-secondary:hover,
|
|
460
|
+
[data-theme="dark"] .sm-cookie-btn-secondary:hover,
|
|
461
|
+
.publication[data-theme="dark"] .sm-cookie-btn-secondary:hover {
|
|
462
|
+
background: rgba(255, 255, 255, 0.18);
|
|
463
|
+
border-color: rgba(255, 255, 255, 0.3);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
:root[data-theme="dark"] .sm-cookie-details-modal,
|
|
467
|
+
[data-theme="dark"] .sm-cookie-details-modal,
|
|
468
|
+
.publication[data-theme="dark"] .sm-cookie-details-modal {
|
|
469
|
+
background: #161a17;
|
|
470
|
+
color: #eaece8;
|
|
471
|
+
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
:root[data-theme="dark"] .sm-cookie-details-header,
|
|
475
|
+
[data-theme="dark"] .sm-cookie-details-header,
|
|
476
|
+
.publication[data-theme="dark"] .sm-cookie-details-header {
|
|
477
|
+
border-bottom-color: #29302a;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
:root[data-theme="dark"] .sm-cookie-details-title,
|
|
481
|
+
[data-theme="dark"] .sm-cookie-details-title,
|
|
482
|
+
.publication[data-theme="dark"] .sm-cookie-details-title {
|
|
483
|
+
color: #ffffff;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
:root[data-theme="dark"] .sm-cookie-details-close,
|
|
487
|
+
[data-theme="dark"] .sm-cookie-details-close,
|
|
488
|
+
.publication[data-theme="dark"] .sm-cookie-details-close {
|
|
489
|
+
color: #959e96;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
:root[data-theme="dark"] .sm-cookie-details-close:hover,
|
|
493
|
+
[data-theme="dark"] .sm-cookie-details-close:hover,
|
|
494
|
+
.publication[data-theme="dark"] .sm-cookie-details-close:hover {
|
|
495
|
+
background: rgba(255, 255, 255, 0.08);
|
|
496
|
+
color: #ffffff;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
:root[data-theme="dark"] .sm-cookie-category,
|
|
500
|
+
[data-theme="dark"] .sm-cookie-category,
|
|
501
|
+
.publication[data-theme="dark"] .sm-cookie-category {
|
|
502
|
+
background: #1a1e1b;
|
|
503
|
+
border-color: #29302a;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
:root[data-theme="dark"] .sm-cookie-cat-title,
|
|
507
|
+
[data-theme="dark"] .sm-cookie-cat-title,
|
|
508
|
+
.publication[data-theme="dark"] .sm-cookie-cat-title {
|
|
509
|
+
color: #ffffff;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
:root[data-theme="dark"] .sm-cookie-cat-desc,
|
|
513
|
+
[data-theme="dark"] .sm-cookie-cat-desc,
|
|
514
|
+
.publication[data-theme="dark"] .sm-cookie-cat-desc {
|
|
515
|
+
color: #959e96;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
:root[data-theme="dark"] .sm-cookie-table-wrapper,
|
|
519
|
+
[data-theme="dark"] .sm-cookie-table-wrapper,
|
|
520
|
+
.publication[data-theme="dark"] .sm-cookie-table-wrapper {
|
|
521
|
+
border-color: #29302a;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
:root[data-theme="dark"] .sm-cookie-table th,
|
|
525
|
+
[data-theme="dark"] .sm-cookie-table th,
|
|
526
|
+
.publication[data-theme="dark"] .sm-cookie-table th {
|
|
527
|
+
background: #131514;
|
|
528
|
+
color: #959e96;
|
|
529
|
+
border-bottom-color: #29302a;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
:root[data-theme="dark"] .sm-cookie-table td,
|
|
533
|
+
[data-theme="dark"] .sm-cookie-table td,
|
|
534
|
+
.publication[data-theme="dark"] .sm-cookie-table td {
|
|
535
|
+
color: #eaece8;
|
|
536
|
+
border-bottom-color: #29302a;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
:root[data-theme="dark"] .sm-cookie-code,
|
|
540
|
+
[data-theme="dark"] .sm-cookie-code,
|
|
541
|
+
.publication[data-theme="dark"] .sm-cookie-code {
|
|
542
|
+
background: #252b27;
|
|
543
|
+
color: #ffffff;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
:root[data-theme="dark"] .sm-cookie-save-bar,
|
|
547
|
+
[data-theme="dark"] .sm-cookie-save-bar,
|
|
548
|
+
.publication[data-theme="dark"] .sm-cookie-save-bar {
|
|
549
|
+
border-top-color: #29302a;
|
|
550
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { hasConsented, COOKIE_CONSENT_EVENT, acceptAllCookies, recordConsentToCompliance, rejectOptionalCookies } from './chunk-
|
|
2
|
+
import { hasConsented, COOKIE_CONSENT_EVENT, acceptAllCookies, recordConsentToCompliance, rejectOptionalCookies } from './chunk-RNXTBN5Z.js';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getCookieConsent, DEFAULT_PREFERENCES_ACCEPTED, COOKIE_CATEGORIES, setCookieConsent, recordConsentToCompliance, DEFAULT_PREFERENCES_REJECTED } from './chunk-
|
|
2
|
+
import { getCookieConsent, DEFAULT_PREFERENCES_ACCEPTED, COOKIE_CATEGORIES, setCookieConsent, recordConsentToCompliance, DEFAULT_PREFERENCES_REJECTED } from './chunk-RNXTBN5Z.js';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSyncExternalStore, useState, useEffect } from 'react';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// src/theme-toggle.tsx
|
|
6
|
+
|
|
7
|
+
// src/theme.ts
|
|
8
|
+
var THEME_COOKIE = "news_publication_theme";
|
|
9
|
+
var THEME_STORAGE_KEY = "news_publication_theme";
|
|
10
|
+
var THEME_EVENT = "news_publication_theme_change";
|
|
11
|
+
var THEME_MAX_AGE_SECONDS = 365 * 24 * 60 * 60;
|
|
12
|
+
var memoryTheme = "system";
|
|
13
|
+
function getSystemTheme() {
|
|
14
|
+
if (typeof window === "undefined" || !window.matchMedia) return "light";
|
|
15
|
+
try {
|
|
16
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
17
|
+
} catch {
|
|
18
|
+
return "light";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function resolveEffectiveTheme(mode) {
|
|
22
|
+
if (mode === "system") return getSystemTheme();
|
|
23
|
+
return mode;
|
|
24
|
+
}
|
|
25
|
+
function getStoredTheme() {
|
|
26
|
+
if (typeof window === "undefined") return memoryTheme;
|
|
27
|
+
try {
|
|
28
|
+
const stored = window.localStorage?.getItem?.(THEME_STORAGE_KEY);
|
|
29
|
+
if (stored === "light" || stored === "dark" || stored === "system") {
|
|
30
|
+
memoryTheme = stored;
|
|
31
|
+
return stored;
|
|
32
|
+
}
|
|
33
|
+
} catch {
|
|
34
|
+
}
|
|
35
|
+
if (typeof document !== "undefined" && document.cookie) {
|
|
36
|
+
try {
|
|
37
|
+
const match = document.cookie.match(new RegExp(`(?:^|; )${THEME_COOKIE}=([^;]*)`));
|
|
38
|
+
if (match) {
|
|
39
|
+
const decoded = decodeURIComponent(match[1]);
|
|
40
|
+
if (decoded === "light" || decoded === "dark" || decoded === "system") {
|
|
41
|
+
memoryTheme = decoded;
|
|
42
|
+
return decoded;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
} catch {
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return memoryTheme;
|
|
49
|
+
}
|
|
50
|
+
function applyTheme(mode) {
|
|
51
|
+
if (typeof document === "undefined") return;
|
|
52
|
+
try {
|
|
53
|
+
document.documentElement.setAttribute("data-theme", mode);
|
|
54
|
+
const elements = document.querySelectorAll(".publication");
|
|
55
|
+
elements.forEach((el) => el.setAttribute("data-theme", mode));
|
|
56
|
+
} catch {
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
var memoryListeners = /* @__PURE__ */ new Set();
|
|
60
|
+
function setTheme(mode) {
|
|
61
|
+
memoryTheme = mode;
|
|
62
|
+
if (typeof window !== "undefined") {
|
|
63
|
+
try {
|
|
64
|
+
window.localStorage?.setItem?.(THEME_STORAGE_KEY, mode);
|
|
65
|
+
} catch {
|
|
66
|
+
}
|
|
67
|
+
if (typeof document !== "undefined") {
|
|
68
|
+
try {
|
|
69
|
+
document.cookie = `${THEME_COOKIE}=${encodeURIComponent(mode)}; path=/; max-age=${THEME_MAX_AGE_SECONDS}; SameSite=Lax`;
|
|
70
|
+
} catch {
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
applyTheme(mode);
|
|
74
|
+
const effective = resolveEffectiveTheme(mode);
|
|
75
|
+
try {
|
|
76
|
+
window.dispatchEvent(
|
|
77
|
+
new CustomEvent(THEME_EVENT, {
|
|
78
|
+
detail: { mode, effective }
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
} catch {
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
memoryListeners.forEach((listener) => {
|
|
85
|
+
try {
|
|
86
|
+
listener();
|
|
87
|
+
} catch {
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function clearTheme() {
|
|
92
|
+
memoryTheme = "system";
|
|
93
|
+
if (typeof document !== "undefined") {
|
|
94
|
+
try {
|
|
95
|
+
document.cookie = `${THEME_COOKIE}=; path=/; max-age=0; SameSite=Lax`;
|
|
96
|
+
document.documentElement.removeAttribute("data-theme");
|
|
97
|
+
} catch {
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (typeof window !== "undefined") {
|
|
101
|
+
try {
|
|
102
|
+
window.localStorage?.removeItem?.(THEME_STORAGE_KEY);
|
|
103
|
+
} catch {
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
memoryListeners.forEach((listener) => {
|
|
107
|
+
try {
|
|
108
|
+
listener();
|
|
109
|
+
} catch {
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function subscribeTheme(listener) {
|
|
114
|
+
memoryListeners.add(listener);
|
|
115
|
+
if (typeof window === "undefined") {
|
|
116
|
+
return () => {
|
|
117
|
+
memoryListeners.delete(listener);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
const onStorage = (e) => {
|
|
121
|
+
if (e.key === THEME_STORAGE_KEY) {
|
|
122
|
+
applyTheme(getStoredTheme());
|
|
123
|
+
listener();
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
const onCustom = () => {
|
|
127
|
+
listener();
|
|
128
|
+
};
|
|
129
|
+
window.addEventListener("storage", onStorage);
|
|
130
|
+
window.addEventListener(THEME_EVENT, onCustom);
|
|
131
|
+
let mediaQuery;
|
|
132
|
+
let onMediaChange;
|
|
133
|
+
if (window.matchMedia) {
|
|
134
|
+
try {
|
|
135
|
+
mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
136
|
+
onMediaChange = () => {
|
|
137
|
+
if (getStoredTheme() === "system") {
|
|
138
|
+
applyTheme("system");
|
|
139
|
+
listener();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
if (mediaQuery.addEventListener) {
|
|
143
|
+
mediaQuery.addEventListener("change", onMediaChange);
|
|
144
|
+
} else if (mediaQuery.addListener) {
|
|
145
|
+
mediaQuery.addListener(onMediaChange);
|
|
146
|
+
}
|
|
147
|
+
} catch {
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return () => {
|
|
151
|
+
window.removeEventListener("storage", onStorage);
|
|
152
|
+
window.removeEventListener(THEME_EVENT, onCustom);
|
|
153
|
+
if (mediaQuery && onMediaChange) {
|
|
154
|
+
if (mediaQuery.removeEventListener) {
|
|
155
|
+
mediaQuery.removeEventListener("change", onMediaChange);
|
|
156
|
+
} else if (mediaQuery.removeListener) {
|
|
157
|
+
mediaQuery.removeListener(onMediaChange);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function themeInitScript() {
|
|
163
|
+
return `(function(){try{var k='${THEME_STORAGE_KEY}',m=localStorage.getItem(k);if(!m){var c=document.cookie.match(/(?:^|; )news_publication_theme=([^;]*)/);m=c?decodeURIComponent(c[1]):'system';}if(m==='light'||m==='dark'||m==='system'){document.documentElement.setAttribute('data-theme',m);}}catch(e){}})();`;
|
|
164
|
+
}
|
|
165
|
+
function SunIcon() {
|
|
166
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
167
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "4" }),
|
|
168
|
+
/* @__PURE__ */ jsx("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41" })
|
|
169
|
+
] });
|
|
170
|
+
}
|
|
171
|
+
function MoonIcon() {
|
|
172
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" }) });
|
|
173
|
+
}
|
|
174
|
+
function SystemIcon() {
|
|
175
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
176
|
+
/* @__PURE__ */ jsx("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
177
|
+
/* @__PURE__ */ jsx("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
|
|
178
|
+
/* @__PURE__ */ jsx("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
|
|
179
|
+
] });
|
|
180
|
+
}
|
|
181
|
+
function ThemeToggle({
|
|
182
|
+
variant = "compact",
|
|
183
|
+
className = "",
|
|
184
|
+
showPromotion = false,
|
|
185
|
+
accountUrl = "/account"
|
|
186
|
+
}) {
|
|
187
|
+
const currentTheme = useSyncExternalStore(subscribeTheme, getStoredTheme, () => "system");
|
|
188
|
+
const [mounted, setMounted] = useState(false);
|
|
189
|
+
const [promoVisible, setPromoVisible] = useState(false);
|
|
190
|
+
useEffect(() => {
|
|
191
|
+
setMounted(true);
|
|
192
|
+
}, []);
|
|
193
|
+
const handleSelect = (mode) => {
|
|
194
|
+
setTheme(mode);
|
|
195
|
+
if (showPromotion) {
|
|
196
|
+
setPromoVisible(true);
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
const active = mounted ? currentTheme : "system";
|
|
200
|
+
return /* @__PURE__ */ jsxs("div", { className: `pub-theme-toggle-container ${className}`.trim(), children: [
|
|
201
|
+
/* @__PURE__ */ jsxs(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
className: "pub-theme-toggle",
|
|
205
|
+
"data-variant": variant,
|
|
206
|
+
role: "group",
|
|
207
|
+
"aria-label": "Display theme selection",
|
|
208
|
+
children: [
|
|
209
|
+
/* @__PURE__ */ jsxs(
|
|
210
|
+
"button",
|
|
211
|
+
{
|
|
212
|
+
type: "button",
|
|
213
|
+
onClick: () => handleSelect("light"),
|
|
214
|
+
"aria-pressed": active === "light",
|
|
215
|
+
"data-active": active === "light",
|
|
216
|
+
title: "Light theme (broadsheet day edition)",
|
|
217
|
+
"aria-label": "Light theme",
|
|
218
|
+
children: [
|
|
219
|
+
/* @__PURE__ */ jsx(SunIcon, {}),
|
|
220
|
+
variant !== "compact" && /* @__PURE__ */ jsx("span", { children: "Light" })
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
),
|
|
224
|
+
/* @__PURE__ */ jsxs(
|
|
225
|
+
"button",
|
|
226
|
+
{
|
|
227
|
+
type: "button",
|
|
228
|
+
onClick: () => handleSelect("dark"),
|
|
229
|
+
"aria-pressed": active === "dark",
|
|
230
|
+
"data-active": active === "dark",
|
|
231
|
+
title: "Dark theme (broadsheet evening edition)",
|
|
232
|
+
"aria-label": "Dark theme",
|
|
233
|
+
children: [
|
|
234
|
+
/* @__PURE__ */ jsx(MoonIcon, {}),
|
|
235
|
+
variant !== "compact" && /* @__PURE__ */ jsx("span", { children: "Dark" })
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
),
|
|
239
|
+
/* @__PURE__ */ jsxs(
|
|
240
|
+
"button",
|
|
241
|
+
{
|
|
242
|
+
type: "button",
|
|
243
|
+
onClick: () => handleSelect("system"),
|
|
244
|
+
"aria-pressed": active === "system",
|
|
245
|
+
"data-active": active === "system",
|
|
246
|
+
title: "System preference (matches device setting)",
|
|
247
|
+
"aria-label": "System theme",
|
|
248
|
+
children: [
|
|
249
|
+
/* @__PURE__ */ jsx(SystemIcon, {}),
|
|
250
|
+
variant !== "compact" && /* @__PURE__ */ jsx("span", { children: "System" })
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
)
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
),
|
|
257
|
+
promoVisible && /* @__PURE__ */ jsxs("div", { className: "pub-theme-promo", role: "status", children: [
|
|
258
|
+
/* @__PURE__ */ jsx("span", { children: "Theme saved for this browser. " }),
|
|
259
|
+
/* @__PURE__ */ jsx("a", { href: accountUrl, children: "Create a free reader account" }),
|
|
260
|
+
/* @__PURE__ */ jsx("span", { children: " to sync preferences across all your devices." }),
|
|
261
|
+
/* @__PURE__ */ jsx(
|
|
262
|
+
"button",
|
|
263
|
+
{
|
|
264
|
+
type: "button",
|
|
265
|
+
onClick: () => setPromoVisible(false),
|
|
266
|
+
"aria-label": "Dismiss note",
|
|
267
|
+
style: {
|
|
268
|
+
marginLeft: "8px",
|
|
269
|
+
background: "none",
|
|
270
|
+
border: "none",
|
|
271
|
+
cursor: "pointer",
|
|
272
|
+
color: "var(--pub-muted)",
|
|
273
|
+
fontSize: "12px",
|
|
274
|
+
padding: "0 4px"
|
|
275
|
+
},
|
|
276
|
+
children: "\xD7"
|
|
277
|
+
}
|
|
278
|
+
)
|
|
279
|
+
] })
|
|
280
|
+
] });
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export { THEME_COOKIE, THEME_EVENT, THEME_MAX_AGE_SECONDS, THEME_STORAGE_KEY, ThemeToggle, applyTheme, clearTheme, getStoredTheme, getSystemTheme, resolveEffectiveTheme, setTheme, subscribeTheme, themeInitScript };
|
|
@@ -83,6 +83,13 @@ var COOKIE_CATEGORIES = [
|
|
|
83
83
|
duration: "1 year",
|
|
84
84
|
type: "Local Storage"
|
|
85
85
|
},
|
|
86
|
+
{
|
|
87
|
+
name: "news_publication_theme",
|
|
88
|
+
provider: "First-Party",
|
|
89
|
+
purpose: "Remembers your reading theme preference (light, dark, or system).",
|
|
90
|
+
duration: "1 year",
|
|
91
|
+
type: "HTTP Cookie"
|
|
92
|
+
},
|
|
86
93
|
{
|
|
87
94
|
name: "audio_narration_speed",
|
|
88
95
|
provider: "First-Party",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { CookieConsentBanner } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
export { CookieConsentBanner } from './chunk-5QHNNRVQ.js';
|
|
3
|
+
import './chunk-RNXTBN5Z.js';
|
|
@@ -89,6 +89,13 @@ var COOKIE_CATEGORIES = [
|
|
|
89
89
|
duration: "1 year",
|
|
90
90
|
type: "Local Storage"
|
|
91
91
|
},
|
|
92
|
+
{
|
|
93
|
+
name: "news_publication_theme",
|
|
94
|
+
provider: "First-Party",
|
|
95
|
+
purpose: "Remembers your reading theme preference (light, dark, or system).",
|
|
96
|
+
duration: "1 year",
|
|
97
|
+
type: "HTTP Cookie"
|
|
98
|
+
},
|
|
92
99
|
{
|
|
93
100
|
name: "audio_narration_speed",
|
|
94
101
|
provider: "First-Party",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { CookieSettingsView } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
export { CookieSettingsView } from './chunk-AYSBXLOT.js';
|
|
3
|
+
import './chunk-RNXTBN5Z.js';
|