@tamagui/next-theme 1.89.26 → 1.89.27-1708112217600

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/NextTheme.tsx"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAGA,8BAAc,gCAHd;AAIA,8BAAc,kCAJd;AAKA,8BAAc,4BALd;AAMA,8BAAc,sBANd;AAOA,8BAAc,wBAPd;AAQA,8BAAc,uBARd;AASA,8BAAc,oBATd;AAUA,8BAAc,2BAVd;",
3
+ "sources": ["../../src/Users/n8/tamagui/packages/next-theme/src/NextTheme.tsx"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;;AAGA,8BAAc,gCAHd;AAIA,8BAAc,kCAJd;AAKA,8BAAc,4BALd;AAMA,8BAAc,sBANd;AAOA,8BAAc,wBAPd;AAQA,8BAAc,uBARd;AASA,8BAAc,oBATd;AAUA,8BAAc,2BAVd;",
5
5
  "names": []
6
6
  }
@@ -26,169 +26,229 @@ __export(NextThemeProvider_exports, {
26
26
  NextThemeProvider: () => NextThemeProvider
27
27
  });
28
28
  module.exports = __toCommonJS(NextThemeProvider_exports);
29
- var import_constants = require("@tamagui/constants"), import_use_event = require("@tamagui/use-event"), import_head = __toESM(require("next/head")), React = __toESM(require("react")), import_react = require("react"), import_constants2 = require("./constants"), import_helpers = require("./helpers"), import_ThemeSettingContext = require("./ThemeSettingContext"), import_jsx_runtime = require("react/jsx-runtime");
30
- const NextThemeProvider = (0, import_react.memo)(
31
- ({
32
- forcedTheme,
33
- disableTransitionOnChange = !1,
34
- enableSystem = !0,
35
- enableColorScheme = !0,
36
- storageKey = "theme",
37
- themes = import_constants2.colorSchemes,
38
- defaultTheme = enableSystem ? "system" : "light",
39
- attribute = "class",
40
- skipNextHead,
41
- onChangeTheme,
42
- value = {
43
- dark: "t_dark",
44
- light: "t_light"
45
- },
46
- children
47
- }) => {
48
- const [theme, setThemeState] = (0, import_react.useState)(() => (0, import_helpers.getTheme)(storageKey, defaultTheme)), [resolvedTheme, setResolvedTheme] = (0, import_react.useState)(() => (0, import_helpers.getTheme)(storageKey)), attrs = value ? Object.values(value) : themes, handleMediaQuery = (0, import_use_event.useEvent)((e) => {
49
- const _ = (0, import_helpers.getSystemTheme)(e), update = () => setResolvedTheme(_);
50
- disableTransitionOnChange ? update() : React.startTransition(() => update()), theme === "system" && !forcedTheme && handleChangeTheme(_, !1);
51
- }), handleChangeTheme = (0, import_use_event.useEvent)(
52
- (theme2, updateStorage = !0, updateDOM = !0) => {
53
- let name = (value == null ? void 0 : value[theme2]) || theme2;
54
- if (updateStorage)
55
- try {
56
- localStorage.setItem(storageKey, theme2);
57
- } catch {
58
- }
59
- if (theme2 === "system" && enableSystem) {
60
- const resolved = (0, import_helpers.getSystemTheme)();
61
- name = (value == null ? void 0 : value[resolved]) || resolved;
62
- }
63
- if (onChangeTheme == null || onChangeTheme(name.replace("t_", "")), updateDOM) {
64
- const d = document.documentElement;
65
- attribute === "class" ? (d.classList.remove(...attrs), d.classList.add(name)) : d.setAttribute(attribute, name);
66
- }
29
+ var import_constants = require("@tamagui/constants"), import_use_event = require("@tamagui/use-event"), import_head = __toESM(require("next/head")), React = __toESM(require("react")), import_react = require("react"), import_constants2 = require("./constants"), import_helpers = require("./helpers"), import_ThemeSettingContext = require("./ThemeSettingContext");
30
+ function _array_like_to_array(arr, len) {
31
+ (len == null || len > arr.length) && (len = arr.length);
32
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
33
+ arr2[i] = arr[i];
34
+ return arr2;
35
+ }
36
+ function _array_with_holes(arr) {
37
+ if (Array.isArray(arr))
38
+ return arr;
39
+ }
40
+ function _array_without_holes(arr) {
41
+ if (Array.isArray(arr))
42
+ return _array_like_to_array(arr);
43
+ }
44
+ function _iterable_to_array(iter) {
45
+ if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
46
+ return Array.from(iter);
47
+ }
48
+ function _iterable_to_array_limit(arr, i) {
49
+ var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
50
+ if (_i != null) {
51
+ var _arr = [], _n = !0, _d = !1, _s, _e;
52
+ try {
53
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
54
+ ;
55
+ } catch (err) {
56
+ _d = !0, _e = err;
57
+ } finally {
58
+ try {
59
+ !_n && _i.return != null && _i.return();
60
+ } finally {
61
+ if (_d)
62
+ throw _e;
63
+ }
64
+ }
65
+ return _arr;
66
+ }
67
+ }
68
+ function _non_iterable_rest() {
69
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
70
+ }
71
+ function _non_iterable_spread() {
72
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
73
+ }
74
+ function _sliced_to_array(arr, i) {
75
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
76
+ }
77
+ function _to_consumable_array(arr) {
78
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
79
+ }
80
+ function _unsupported_iterable_to_array(o, minLen) {
81
+ if (o) {
82
+ if (typeof o == "string")
83
+ return _array_like_to_array(o, minLen);
84
+ var n = Object.prototype.toString.call(o).slice(8, -1);
85
+ if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
86
+ return Array.from(n);
87
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
88
+ return _array_like_to_array(o, minLen);
89
+ }
90
+ }
91
+ var NextThemeProvider = /* @__PURE__ */ (0, import_react.memo)(function(param) {
92
+ var forcedTheme = param.forcedTheme, _param_disableTransitionOnChange = param.disableTransitionOnChange, disableTransitionOnChange = _param_disableTransitionOnChange === void 0 ? !1 : _param_disableTransitionOnChange, _param_enableSystem = param.enableSystem, enableSystem = _param_enableSystem === void 0 ? !0 : _param_enableSystem, _param_enableColorScheme = param.enableColorScheme, enableColorScheme = _param_enableColorScheme === void 0 ? !0 : _param_enableColorScheme, _param_storageKey = param.storageKey, storageKey = _param_storageKey === void 0 ? "theme" : _param_storageKey, _param_themes = param.themes, themes = _param_themes === void 0 ? import_constants2.colorSchemes : _param_themes, _param_defaultTheme = param.defaultTheme, defaultTheme = _param_defaultTheme === void 0 ? enableSystem ? "system" : "light" : _param_defaultTheme, _param_attribute = param.attribute, attribute = _param_attribute === void 0 ? "class" : _param_attribute, skipNextHead = param.skipNextHead, onChangeTheme = param.onChangeTheme, _param_value = param.value, value = _param_value === void 0 ? {
93
+ dark: "t_dark",
94
+ light: "t_light"
95
+ } : _param_value, children = param.children, _useState = _sliced_to_array((0, import_react.useState)(function() {
96
+ return (0, import_helpers.getTheme)(storageKey, defaultTheme);
97
+ }), 2), theme = _useState[0], setThemeState = _useState[1], _useState1 = _sliced_to_array((0, import_react.useState)(function() {
98
+ return (0, import_helpers.getTheme)(storageKey);
99
+ }), 2), resolvedTheme = _useState1[0], setResolvedTheme = _useState1[1], attrs = value ? Object.values(value) : themes, handleMediaQuery = (0, import_use_event.useEvent)(function(e) {
100
+ var _ = (0, import_helpers.getSystemTheme)(e), update = function() {
101
+ return setResolvedTheme(_);
102
+ };
103
+ disableTransitionOnChange ? update() : React.startTransition(function() {
104
+ return update();
105
+ }), theme === "system" && !forcedTheme && handleChangeTheme(_, !1);
106
+ }), handleChangeTheme = (0, import_use_event.useEvent)(function(theme2) {
107
+ var updateStorage = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, updateDOM = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0, name = (value == null ? void 0 : value[theme2]) || theme2;
108
+ if (updateStorage)
109
+ try {
110
+ localStorage.setItem(storageKey, theme2);
111
+ } catch {
67
112
  }
68
- );
69
- (0, import_constants.useIsomorphicLayoutEffect)(() => {
70
- const media = window.matchMedia(import_constants2.MEDIA);
71
- return media.addListener(handleMediaQuery), handleMediaQuery(media), () => {
72
- media.removeListener(handleMediaQuery);
73
- };
74
- }, []);
75
- const set = (0, import_use_event.useEvent)((newTheme) => {
76
- forcedTheme ? handleChangeTheme(newTheme, !0, !1) : handleChangeTheme(newTheme), setThemeState(newTheme);
77
- });
78
- (0, import_react.useEffect)(() => {
79
- const handleStorage = (e) => {
80
- if (e.key !== storageKey)
81
- return;
82
- const theme2 = e.newValue || defaultTheme;
113
+ if (theme2 === "system" && enableSystem) {
114
+ var resolved = (0, import_helpers.getSystemTheme)();
115
+ name = (value == null ? void 0 : value[resolved]) || resolved;
116
+ }
117
+ if (onChangeTheme == null || onChangeTheme(name.replace("t_", "")), updateDOM) {
118
+ var d = document.documentElement;
119
+ if (attribute === "class") {
120
+ var _d_classList;
121
+ (_d_classList = d.classList).remove.apply(_d_classList, _to_consumable_array(attrs)), d.classList.add(name);
122
+ } else
123
+ d.setAttribute(attribute, name);
124
+ }
125
+ });
126
+ (0, import_constants.useIsomorphicLayoutEffect)(function() {
127
+ var media = window.matchMedia(import_constants2.MEDIA);
128
+ return media.addListener(handleMediaQuery), handleMediaQuery(media), function() {
129
+ media.removeListener(handleMediaQuery);
130
+ };
131
+ }, []);
132
+ var set = (0, import_use_event.useEvent)(function(newTheme) {
133
+ forcedTheme ? handleChangeTheme(newTheme, !0, !1) : handleChangeTheme(newTheme), setThemeState(newTheme);
134
+ });
135
+ (0, import_react.useEffect)(function() {
136
+ var handleStorage = function(e) {
137
+ if (e.key === storageKey) {
138
+ var theme2 = e.newValue || defaultTheme;
83
139
  set(theme2);
84
- };
85
- return window.addEventListener("storage", handleStorage), () => {
86
- window.removeEventListener("storage", handleStorage);
87
- };
88
- }, [defaultTheme, set, storageKey]), (0, import_constants.useIsomorphicLayoutEffect)(() => {
89
- if (!enableColorScheme)
90
- return;
91
- const colorScheme = (
140
+ }
141
+ };
142
+ return window.addEventListener("storage", handleStorage), function() {
143
+ window.removeEventListener("storage", handleStorage);
144
+ };
145
+ }, [
146
+ defaultTheme,
147
+ set,
148
+ storageKey
149
+ ]), (0, import_constants.useIsomorphicLayoutEffect)(function() {
150
+ if (enableColorScheme) {
151
+ var colorScheme = (
92
152
  // If theme is forced to light or dark, use that
93
- forcedTheme && import_constants2.colorSchemes.includes(forcedTheme) ? forcedTheme : (
94
- // If regular theme is light or dark
95
- theme && import_constants2.colorSchemes.includes(theme) ? theme : (
96
- // If theme is system, use the resolved version
97
- theme === "system" && resolvedTheme || null
98
- )
99
- )
100
- );
101
- (typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light") !== (colorScheme || "light") && document.documentElement.style.setProperty("color-scheme", colorScheme);
102
- }, [enableColorScheme, theme, resolvedTheme, forcedTheme]);
103
- const toggle = (0, import_use_event.useEvent)(() => {
104
- const order = resolvedTheme === "dark" ? ["system", "light", "dark"] : ["system", "dark", "light"], next = order[(order.indexOf(theme) + 1) % order.length];
105
- set(next);
106
- }), systemTheme = enableSystem ? resolvedTheme : void 0, contextValue = (0, import_react.useMemo)(() => ({
153
+ forcedTheme && import_constants2.colorSchemes.includes(forcedTheme) ? forcedTheme : theme && import_constants2.colorSchemes.includes(theme) ? theme : theme === "system" && resolvedTheme || null
154
+ ), userPrefers = typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", wePrefer = colorScheme || "light";
155
+ userPrefers !== wePrefer && document.documentElement.style.setProperty("color-scheme", colorScheme);
156
+ }
157
+ }, [
158
+ enableColorScheme,
159
+ theme,
160
+ resolvedTheme,
161
+ forcedTheme
162
+ ]);
163
+ var toggle = (0, import_use_event.useEvent)(function() {
164
+ var order = resolvedTheme === "dark" ? [
165
+ "system",
166
+ "light",
167
+ "dark"
168
+ ] : [
169
+ "system",
170
+ "dark",
171
+ "light"
172
+ ], next = order[(order.indexOf(theme) + 1) % order.length];
173
+ set(next);
174
+ }), systemTheme = enableSystem ? resolvedTheme : void 0, contextValue = (0, import_react.useMemo)(function() {
175
+ var value2 = {
107
176
  theme,
108
177
  current: theme,
109
178
  set,
110
179
  toggle,
111
180
  forcedTheme,
112
181
  resolvedTheme: theme === "system" ? resolvedTheme : theme,
113
- themes: enableSystem ? [...themes, "system"] : themes,
182
+ themes: enableSystem ? _to_consumable_array(themes).concat([
183
+ "system"
184
+ ]) : themes,
114
185
  systemTheme
115
- }), [
116
- theme,
117
- set,
118
- toggle,
119
- forcedTheme,
120
- resolvedTheme,
121
- enableSystem,
122
- themes,
123
- systemTheme
124
- ]);
125
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ThemeSettingContext.ThemeSettingContext.Provider, { value: contextValue, children: [
126
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
127
- ThemeScript,
128
- {
129
- forcedTheme,
130
- storageKey,
131
- systemTheme: resolvedTheme,
132
- attribute,
133
- value,
134
- enableSystem,
135
- defaultTheme,
136
- attrs,
137
- skipNextHead
138
- }
139
- ),
140
- (0, import_react.useMemo)(() => children, [children])
141
- ] });
142
- }
143
- ), ThemeScript = (0, import_react.memo)(
144
- ({
186
+ };
187
+ return value2;
188
+ }, [
189
+ theme,
190
+ set,
191
+ toggle,
192
+ forcedTheme,
193
+ resolvedTheme,
194
+ enableSystem,
195
+ themes,
196
+ systemTheme
197
+ ]);
198
+ return /* @__PURE__ */ React.createElement(import_ThemeSettingContext.ThemeSettingContext.Provider, {
199
+ value: contextValue
200
+ }, /* @__PURE__ */ React.createElement(ThemeScript, {
145
201
  forcedTheme,
146
202
  storageKey,
203
+ systemTheme: resolvedTheme,
147
204
  attribute,
205
+ value,
148
206
  enableSystem,
149
207
  defaultTheme,
150
- value,
151
208
  attrs,
152
209
  skipNextHead
153
- }) => {
154
- const optimization = attribute === "class" ? `var d=document.documentElement.classList;${attrs.map((t) => `d.remove('${t}')`).join(";")};` : "var d=document.documentElement;", updateDOM = (name, literal) => {
155
- name = (value == null ? void 0 : value[name]) || name;
156
- const val = literal ? name : `'${name}'`;
157
- return attribute === "class" ? `d.add(${val})` : `d.setAttribute('${attribute}', ${val})`;
158
- }, defaultSystem = defaultTheme === "system", contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: forcedTheme ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
159
- "script",
160
- {
161
- dangerouslySetInnerHTML: {
162
- // These are minified via Terser and then updated by hand, don't recommend
163
- __html: `!function(){${optimization}${updateDOM(forcedTheme)}}()`
164
- }
165
- },
166
- "next-themes-script"
167
- ) : enableSystem ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
168
- "script",
169
- {
170
- dangerouslySetInnerHTML: {
171
- __html: `!function(){try {${optimization}var e=localStorage.getItem('${storageKey}');${defaultSystem ? "" : updateDOM(defaultTheme) + ";"}if("system"===e||(!e&&${defaultSystem})){var t="${import_constants2.MEDIA}",m=window.matchMedia(t);m.media!==t||m.matches?${updateDOM(
172
- "dark"
173
- )}:${updateDOM("light")}}else if(e) ${value ? `var x=${JSON.stringify(value)};` : ""}${updateDOM(value ? "x[e]" : "e", !0)}}catch(e){}}()`
174
- }
175
- },
176
- "next-themes-script"
177
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
178
- "script",
179
- {
180
- dangerouslySetInnerHTML: {
181
- __html: `!function(){try{${optimization}var e=localStorage.getItem("${storageKey}");if(e){${value ? `var x=${JSON.stringify(value)};` : ""}${updateDOM(value ? "x[e]" : "e", !0)}}else{${updateDOM(
182
- defaultTheme
183
- )};}}catch(t){}}();`
184
- }
185
- },
186
- "next-themes-script"
187
- ) });
188
- return skipNextHead ? contents : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_head.default, { children: contents });
189
- },
190
- (prevProps, nextProps) => prevProps.forcedTheme === nextProps.forcedTheme
191
- );
210
+ }), (0, import_react.useMemo)(function() {
211
+ return children;
212
+ }, [
213
+ children
214
+ ]));
215
+ }), ThemeScript = /* @__PURE__ */ (0, import_react.memo)(function(param) {
216
+ var forcedTheme = param.forcedTheme, storageKey = param.storageKey, attribute = param.attribute, enableSystem = param.enableSystem, defaultTheme = param.defaultTheme, value = param.value, attrs = param.attrs, skipNextHead = param.skipNextHead, optimization = function() {
217
+ if (attribute === "class") {
218
+ var removeClasses = attrs.map(function(t) {
219
+ return "d.remove('".concat(t, "')");
220
+ }).join(";");
221
+ return "var d=document.documentElement.classList;".concat(removeClasses, ";");
222
+ }
223
+ return "var d=document.documentElement;";
224
+ }(), updateDOM = function(name, literal) {
225
+ name = (value == null ? void 0 : value[name]) || name;
226
+ var val = literal ? name : "'".concat(name, "'");
227
+ return attribute === "class" ? "d.add(".concat(val, ")") : "d.setAttribute('".concat(attribute, "', ").concat(val, ")");
228
+ }, defaultSystem = defaultTheme === "system", contents = /* @__PURE__ */ React.createElement(React.Fragment, null, forcedTheme ? /* @__PURE__ */ React.createElement("script", {
229
+ // nonce={nonce}
230
+ key: "next-themes-script",
231
+ dangerouslySetInnerHTML: {
232
+ // These are minified via Terser and then updated by hand, don't recommend
233
+ __html: "!function(){".concat(optimization).concat(updateDOM(forcedTheme), "}()")
234
+ }
235
+ }) : enableSystem ? /* @__PURE__ */ React.createElement("script", {
236
+ // nonce={nonce}
237
+ key: "next-themes-script",
238
+ dangerouslySetInnerHTML: {
239
+ __html: "!function(){try {".concat(optimization, "var e=localStorage.getItem('").concat(storageKey, "');").concat(defaultSystem ? "" : updateDOM(defaultTheme) + ";", 'if("system"===e||(!e&&').concat(defaultSystem, ')){var t="').concat(import_constants2.MEDIA, '",m=window.matchMedia(t);m.media!==t||m.matches?').concat(updateDOM("dark"), ":").concat(updateDOM("light"), "}else if(e) ").concat(value ? "var x=".concat(JSON.stringify(value), ";") : "").concat(updateDOM(value ? "x[e]" : "e", !0), "}catch(e){}}()")
240
+ }
241
+ }) : /* @__PURE__ */ React.createElement("script", {
242
+ // nonce={nonce}
243
+ key: "next-themes-script",
244
+ dangerouslySetInnerHTML: {
245
+ __html: "!function(){try{".concat(optimization, 'var e=localStorage.getItem("').concat(storageKey, '");if(e){').concat(value ? "var x=".concat(JSON.stringify(value), ";") : "").concat(updateDOM(value ? "x[e]" : "e", !0), "}else{").concat(updateDOM(defaultTheme), ";}}catch(t){}}();")
246
+ }
247
+ }));
248
+ return skipNextHead ? contents : /* @__PURE__ */ React.createElement(import_head.default, null, contents);
249
+ }, function(prevProps, nextProps) {
250
+ return prevProps.forcedTheme === nextProps.forcedTheme;
251
+ });
192
252
  // Annotate the CommonJS export names for ESM import in node:
193
253
  0 && (module.exports = {
194
254
  NextThemeProvider
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/NextThemeProvider.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0C,+BAC1C,mBAAyB,+BACzB,cAAqB,+BACrB,QAAuB,2BACvB,eAAmD,kBAEnDA,oBAAoC,wBACpC,iBAAyC,sBACzC,6BAAoC,kCAiL9B;AA7KC,MAAM,wBAAoB;AAAA,EAC/B,CAAC;AAAA,IACC;AAAA,IACA,4BAA4B;AAAA,IAC5B,eAAe;AAAA,IACf,oBAAoB;AAAA,IACpB,aAAa;AAAA,IACb,SAAS;AAAA,IACT,eAAe,eAAe,WAAW;AAAA,IACzC,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA;AAAA,EACF,MAA0B;AACxB,UAAM,CAAC,OAAO,aAAa,QAAI,uBAAS,UAAM,yBAAS,YAAY,YAAY,CAAC,GAC1E,CAAC,eAAe,gBAAgB,QAAI,uBAAS,UAAM,yBAAS,UAAU,CAAC,GACvE,QAAS,QAAiB,OAAO,OAAO,KAAK,IAA5B,QAEjB,uBAAmB,2BAAS,C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,UAAUvB,QAAQ,SAAS,KAAK,EAAA,GAAM,QAAA,EAEvC,OAF+CuB,UAC/C3B,YAAAA,GACA,mBAAA;IACJ;;AAMR,SAAIE,eAAqBiF,WAElB,sBAAA,cAACM,YAAAA,SAAAA,MAAUN,QAAAA;AACpB,GACA,SAACO,WAAWC,WAAAA;AAGV,SAAID,UAAUjG,gBAAgBkG,UAAUlG;AAE1C,CAAA;",
5
+ "names": ["import_constants", "NextThemeProvider", "memo", "forcedTheme", "disableTransitionOnChange", "enableSystem", "enableColorScheme", "storageKey", "themes", "colorSchemes", "defaultTheme", "attribute", "skipNextHead", "onChangeTheme", "value", "dark", "light", "children", "useState", "getTheme", "theme", "setThemeState", "resolvedTheme", "setResolvedTheme", "attrs", "Object", "values", "handleMediaQuery", "useEvent", "e", "_", "getSystemTheme", "update", "React", "startTransition", "handleChangeTheme", "updateStorage", "updateDOM", "name", "localStorage", "setItem", "resolved", "replace", "d", "document", "documentElement", "classList", "remove", "add", "setAttribute", "useIsomorphicLayoutEffect", "media", "window", "matchMedia", "MEDIA", "addListener", "removeListener", "set", "newTheme", "useEffect", "handleStorage", "key", "newValue", "addEventListener", "removeEventListener", "colorScheme", "includes", "userPrefers", "matches", "wePrefer", "style", "setProperty", "toggle", "order", "next", "indexOf", "length", "systemTheme", "undefined", "contextValue", "useMemo", "current", "ThemeSettingContext", "Provider", "ThemeScript", "optimization", "removeClasses", "map", "t", "join", "literal", "val", "defaultSystem", "contents", "script", "dangerouslySetInnerHTML", "__html", "JSON", "stringify", "NextHead", "prevProps", "nextProps"]
6
6
  }
@@ -18,11 +18,10 @@ __export(ThemeSettingContext_exports, {
18
18
  ThemeSettingContext: () => ThemeSettingContext
19
19
  });
20
20
  module.exports = __toCommonJS(ThemeSettingContext_exports);
21
- var import_react = require("react");
22
- const ThemeSettingContext = (0, import_react.createContext)({
23
- toggle: () => {
21
+ var import_react = require("react"), ThemeSettingContext = /* @__PURE__ */ (0, import_react.createContext)({
22
+ toggle: function() {
24
23
  },
25
- set: (_) => {
24
+ set: function(_) {
26
25
  },
27
26
  themes: []
28
27
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/ThemeSettingContext.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA8B;AAIvB,MAAM,0BAAsB,4BAA6B;AAAA,EAC9D,QAAQ,MAAM;AAAA,EAAC;AAAA,EACf,KAAK,CAAC,MAAM;AAAA,EAAC;AAAA,EACb,QAAQ,CAAC;AACX,CAAC;",
5
- "names": []
3
+ "sources": ["../../src/Users/n8/tamagui/packages/next-theme/src/ThemeSettingContext.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;mBAA8B,kBAIjBA,sBAAsBC,gDAA6B;EAC9DC,QAAQ,WAAA;EAAO;EACfC,KAAK,SAACC,GAAAA;EAAO;EACbC,QAAQ,CAAA;AACV,CAAA;",
5
+ "names": ["ThemeSettingContext", "createContext", "toggle", "set", "_", "themes"]
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/UseThemeProps.tsx"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;",
3
+ "sources": ["../../src/Users/n8/tamagui/packages/next-theme/src/UseThemeProps.tsx"],
4
+ "mappings": ";;;;;;;;;;;;AAoBA;;",
5
5
  "names": []
6
6
  }
@@ -20,7 +20,10 @@ __export(constants_exports, {
20
20
  constants: () => constants
21
21
  });
22
22
  module.exports = __toCommonJS(constants_exports);
23
- const constants = {}, colorSchemes = ["light", "dark"], MEDIA = "(prefers-color-scheme: dark)";
23
+ var constants = {}, colorSchemes = [
24
+ "light",
25
+ "dark"
26
+ ], MEDIA = "(prefers-color-scheme: dark)";
24
27
  // Annotate the CommonJS export names for ESM import in node:
25
28
  0 && (module.exports = {
26
29
  MEDIA,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/constants.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,YAAY,CAAC,GACb,eAAe,CAAC,SAAS,MAAM,GAC/B,QAAQ;",
5
- "names": []
3
+ "sources": ["../../src/Users/n8/tamagui/packages/next-theme/src/constants.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;;AAAO,IAAMA,YAAY,CAAC,GACbC,eAAe;EAAC;EAAS;GACzBC,QAAQ;",
5
+ "names": ["constants", "colorSchemes", "MEDIA"]
6
6
  }
@@ -20,17 +20,20 @@ __export(helpers_exports, {
20
20
  helpers: () => helpers
21
21
  });
22
22
  module.exports = __toCommonJS(helpers_exports);
23
- var import_constants = require("./constants");
24
- const helpers = {}, getTheme = (key, fallback) => {
25
- if (typeof window > "u")
26
- return;
27
- let theme;
28
- try {
29
- theme = localStorage.getItem(key) || void 0;
30
- } catch {
23
+ var import_constants = require("./constants"), helpers = {}, getTheme = function(key, fallback) {
24
+ if (!(typeof window > "u")) {
25
+ var theme;
26
+ try {
27
+ theme = localStorage.getItem(key) || void 0;
28
+ } catch {
29
+ }
30
+ return theme || fallback;
31
31
  }
32
- return theme || fallback;
33
- }, getSystemTheme = (e) => (e || (e = window.matchMedia(import_constants.MEDIA)), e.matches ? "dark" : "light");
32
+ }, getSystemTheme = function(e) {
33
+ e || (e = window.matchMedia(import_constants.MEDIA));
34
+ var isDark = e.matches, systemTheme = isDark ? "dark" : "light";
35
+ return systemTheme;
36
+ };
34
37
  // Annotate the CommonJS export names for ESM import in node:
35
38
  0 && (module.exports = {
36
39
  getSystemTheme,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/helpers.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAsB;AAEf,MAAM,UAAU,CAAC,GAGX,WAAW,CAAC,KAAa,aAAsB;AAC1D,MAAI,OAAO,SAAW;AAAa;AACnC,MAAI;AACJ,MAAI;AACF,YAAQ,aAAa,QAAQ,GAAG,KAAK;AAAA,EACvC,QAAY;AAAA,EAEZ;AACA,SAAO,SAAS;AAClB,GAEa,iBAAiB,CAAC,OACxB,MACH,IAAI,OAAO,WAAW,sBAAK,IAGd,EAAE,UACY,SAAS;",
5
- "names": []
3
+ "sources": ["../../src/Users/n8/tamagui/packages/next-theme/src/helpers.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;;uBAAsB,wBAETA,UAAU,CAAC,GAGXC,WAAW,SAACC,KAAaC,UAAAA;AACpC,MAAI,SAAOC,SAAW,MACtB;QAAIC;AACJ,QAAI;AACFA,cAAQC,aAAaC,QAAQL,GAAAA,KAAQM;IACvC,QAAY;IAEZ;AACA,WAAOH,SAASF;;AAClB,GAEaM,iBAAiB,SAACC,GAAAA;AAC7B,EAAKA,MACHA,IAAIN,OAAOO,WAAWC,sBAAAA;AAGxB,MAAMC,SAASH,EAAEI,SACXC,cAAcF,SAAS,SAAS;AACtC,SAAOE;AACT;",
5
+ "names": ["helpers", "getTheme", "key", "fallback", "window", "theme", "localStorage", "getItem", "undefined", "getSystemTheme", "e", "matchMedia", "MEDIA", "isDark", "matches", "systemTheme"]
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,wBAAd;AACA,wBAAc,oBADd;",
3
+ "sources": ["../../src/Users/n8/tamagui/packages/next-theme/src/index.ts"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;;wBAAc,wBAAd;AACA,wBAAc,oBADd;",
5
5
  "names": []
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/types.tsx"],
4
- "mappings": ";;;;;;;;;;;;AAAA;AAAA;",
3
+ "sources": ["../../src/Users/n8/tamagui/packages/next-theme/src/types.tsx"],
4
+ "mappings": ";;;;;;;;;;;;AAEA;;",
5
5
  "names": []
6
6
  }