@tamagui/core 1.0.5 → 1.0.7
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/dist/cjs/helpers/ThemeManager.js +4 -24
- package/dist/cjs/helpers/ThemeManager.js.map +2 -2
- package/dist/esm/helpers/ThemeManager.js +4 -5
- package/dist/esm/helpers/ThemeManager.js.map +2 -2
- package/package.json +10 -10
- package/src/helpers/ThemeManager.tsx +4 -4
- package/types/helpers/ThemeManager.d.ts +1 -1
- package/dist/cjs/Pressability.js +0 -32
- package/dist/cjs/Pressability.js.map +0 -7
- package/dist/cjs/Pressability.native.js +0 -32
- package/dist/cjs/Pressability.native.js.map +0 -7
- package/dist/cjs/ThemeContext.js +0 -30
- package/dist/cjs/ThemeContext.js.map +0 -7
- package/dist/cjs/ThemeManager.js +0 -211
- package/dist/cjs/ThemeManager.js.map +0 -7
- package/dist/cjs/conf.js +0 -70
- package/dist/cjs/conf.js.map +0 -7
- package/dist/cjs/constants/platform.js +0 -59
- package/dist/cjs/constants/platform.js.map +0 -7
- package/dist/cjs/constants/platform.native.js +0 -62
- package/dist/cjs/constants/platform.native.js.map +0 -7
- package/dist/cjs/constants/rnw.native.js +0 -28
- package/dist/cjs/constants/rnw.native.js.map +0 -7
- package/dist/cjs/contexts/ButtonInsideButtonContext.js +0 -30
- package/dist/cjs/contexts/ButtonInsideButtonContext.js.map +0 -7
- package/dist/cjs/contexts/ThemeContext.js +0 -30
- package/dist/cjs/contexts/ThemeContext.js.map +0 -7
- package/dist/cjs/defaultComponentState.js +0 -2
- package/dist/cjs/defaultComponentState.js.map +0 -7
- package/dist/cjs/helpers/Unwrap.js +0 -29
- package/dist/cjs/helpers/Unwrap.js.map +0 -7
- package/dist/cjs/helpers/areEqualSets.js +0 -38
- package/dist/cjs/helpers/areEqualSets.js.map +0 -7
- package/dist/cjs/helpers/assignNativePropsToWeb.js +0 -188
- package/dist/cjs/helpers/assignNativePropsToWeb.js.map +0 -7
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js +0 -30
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js.map +0 -7
- package/dist/cjs/helpers/cache.js +0 -39
- package/dist/cjs/helpers/cache.js.map +0 -7
- package/dist/cjs/helpers/calc.js +0 -71
- package/dist/cjs/helpers/calc.js.map +0 -7
- package/dist/cjs/helpers/createShallowUpdate.js +0 -41
- package/dist/cjs/helpers/createShallowUpdate.js.map +0 -7
- package/dist/cjs/helpers/createTamaguiProvider.js +0 -65
- package/dist/cjs/helpers/createTamaguiProvider.js.map +0 -7
- package/dist/cjs/helpers/cssHash.js +0 -51
- package/dist/cjs/helpers/cssHash.js.map +0 -7
- package/dist/cjs/helpers/expandStyle.test.js +0 -10
- package/dist/cjs/helpers/expandStyle.test.js.map +0 -7
- package/dist/cjs/helpers/getFont.js +0 -62
- package/dist/cjs/helpers/getFont.js.map +0 -7
- package/dist/cjs/helpers/getSize.js +0 -48
- package/dist/cjs/helpers/getSize.js.map +0 -7
- package/dist/cjs/helpers/getStackSize.js +0 -46
- package/dist/cjs/helpers/getStackSize.js.map +0 -7
- package/dist/cjs/helpers/nativeGestureHandler.native.js +0 -19
- package/dist/cjs/helpers/nativeGestureHandler.native.js.map +0 -7
- package/dist/cjs/helpers/startTransition.js +0 -33
- package/dist/cjs/helpers/startTransition.js.map +0 -7
- package/dist/cjs/helpers/validate.js +0 -2
- package/dist/cjs/helpers/validate.js.map +0 -7
- package/dist/cjs/helpers/wrapThemeManagerContext.js +0 -37
- package/dist/cjs/helpers/wrapThemeManagerContext.js.map +0 -7
- package/dist/cjs/hooks/useConstant.js +0 -36
- package/dist/cjs/hooks/useConstant.js.map +0 -7
- package/dist/cjs/hooks/useFeatures.js +0 -201
- package/dist/cjs/hooks/useFeatures.js.map +0 -7
- package/dist/cjs/hooks/useIsMounted.js +0 -40
- package/dist/cjs/hooks/useIsMounted.js.map +0 -7
- package/dist/cjs/hooks/useIsSSR.js +0 -42
- package/dist/cjs/hooks/useIsSSR.js.map +0 -7
- package/dist/cjs/hooks/usePressable.js +0 -36
- package/dist/cjs/hooks/usePressable.js.map +0 -7
- package/dist/cjs/hooks/usePrevious.js +0 -1
- package/dist/cjs/hooks/usePrevious.js.map +0 -7
- package/dist/cjs/hooks/useUnmountEffect.js +0 -32
- package/dist/cjs/hooks/useUnmountEffect.js.map +0 -7
- package/dist/cjs/injectStyles.js +0 -40
- package/dist/cjs/injectStyles.js.map +0 -7
- package/dist/cjs/views/TextAncestorContext.js +0 -44
- package/dist/cjs/views/TextAncestorContext.js.map +0 -7
- package/dist/cjs/views/ThemeInverse.js +0 -55
- package/dist/cjs/views/ThemeInverse.js.map +0 -7
- package/dist/cjs/views/ThemeReset.js +0 -64
- package/dist/cjs/views/ThemeReset.js.map +0 -7
- package/dist/esm/Pressability.js +0 -7
- package/dist/esm/Pressability.js.map +0 -7
- package/dist/esm/Pressability.native.js +0 -7
- package/dist/esm/Pressability.native.js.map +0 -7
- package/dist/esm/ThemeContext.js +0 -6
- package/dist/esm/ThemeContext.js.map +0 -7
- package/dist/esm/ThemeManager.js +0 -185
- package/dist/esm/ThemeManager.js.map +0 -7
- package/dist/esm/conf.js +0 -39
- package/dist/esm/conf.js.map +0 -7
- package/dist/esm/constants/platform.js +0 -26
- package/dist/esm/constants/platform.js.map +0 -7
- package/dist/esm/constants/platform.native.js +0 -28
- package/dist/esm/constants/platform.native.js.map +0 -7
- package/dist/esm/constants/rnw.native.js +0 -5
- package/dist/esm/constants/rnw.native.js.map +0 -7
- package/dist/esm/contexts/ButtonInsideButtonContext.js +0 -6
- package/dist/esm/contexts/ButtonInsideButtonContext.js.map +0 -7
- package/dist/esm/contexts/ThemeContext.js +0 -6
- package/dist/esm/contexts/ThemeContext.js.map +0 -7
- package/dist/esm/defaultComponentState.js +0 -1
- package/dist/esm/defaultComponentState.js.map +0 -7
- package/dist/esm/helpers/Unwrap.js +0 -5
- package/dist/esm/helpers/Unwrap.js.map +0 -7
- package/dist/esm/helpers/areEqualSets.js +0 -14
- package/dist/esm/helpers/areEqualSets.js.map +0 -7
- package/dist/esm/helpers/assignNativePropsToWeb.js +0 -164
- package/dist/esm/helpers/assignNativePropsToWeb.js.map +0 -7
- package/dist/esm/helpers/assignNativePropsToWeb.native.js +0 -6
- package/dist/esm/helpers/assignNativePropsToWeb.native.js.map +0 -7
- package/dist/esm/helpers/cache.js +0 -15
- package/dist/esm/helpers/cache.js.map +0 -7
- package/dist/esm/helpers/calc.js +0 -47
- package/dist/esm/helpers/calc.js.map +0 -7
- package/dist/esm/helpers/createShallowUpdate.js +0 -17
- package/dist/esm/helpers/createShallowUpdate.js.map +0 -7
- package/dist/esm/helpers/createTamaguiProvider.js +0 -38
- package/dist/esm/helpers/createTamaguiProvider.js.map +0 -7
- package/dist/esm/helpers/cssHash.js +0 -27
- package/dist/esm/helpers/cssHash.js.map +0 -7
- package/dist/esm/helpers/expandStyle.test.js +0 -9
- package/dist/esm/helpers/expandStyle.test.js.map +0 -7
- package/dist/esm/helpers/getFont.js +0 -38
- package/dist/esm/helpers/getFont.js.map +0 -7
- package/dist/esm/helpers/getSize.js +0 -23
- package/dist/esm/helpers/getSize.js.map +0 -7
- package/dist/esm/helpers/getStackSize.js +0 -22
- package/dist/esm/helpers/getStackSize.js.map +0 -7
- package/dist/esm/helpers/nativeGestureHandler.native.js +0 -2
- package/dist/esm/helpers/nativeGestureHandler.native.js.map +0 -7
- package/dist/esm/helpers/startTransition.js +0 -6
- package/dist/esm/helpers/startTransition.js.map +0 -7
- package/dist/esm/helpers/validate.js +0 -1
- package/dist/esm/helpers/validate.js.map +0 -7
- package/dist/esm/helpers/wrapThemeManagerContext.js +0 -11
- package/dist/esm/helpers/wrapThemeManagerContext.js.map +0 -7
- package/dist/esm/hooks/useConstant.js +0 -12
- package/dist/esm/hooks/useConstant.js.map +0 -7
- package/dist/esm/hooks/useFeatures.js +0 -174
- package/dist/esm/hooks/useFeatures.js.map +0 -7
- package/dist/esm/hooks/useIsMounted.js +0 -16
- package/dist/esm/hooks/useIsMounted.js.map +0 -7
- package/dist/esm/hooks/useIsSSR.js +0 -18
- package/dist/esm/hooks/useIsSSR.js.map +0 -7
- package/dist/esm/hooks/usePressable.js +0 -12
- package/dist/esm/hooks/usePressable.js.map +0 -7
- package/dist/esm/hooks/usePrevious.js +0 -1
- package/dist/esm/hooks/usePrevious.js.map +0 -7
- package/dist/esm/hooks/useUnmountEffect.js +0 -8
- package/dist/esm/hooks/useUnmountEffect.js.map +0 -7
- package/dist/esm/injectStyles.js +0 -16
- package/dist/esm/injectStyles.js.map +0 -7
- package/dist/esm/views/TextAncestorContext.js +0 -15
- package/dist/esm/views/TextAncestorContext.js.map +0 -7
- package/dist/esm/views/ThemeInverse.js +0 -27
- package/dist/esm/views/ThemeInverse.js.map +0 -7
- package/dist/esm/views/ThemeReset.js +0 -37
- package/dist/esm/views/ThemeReset.js.map +0 -7
package/dist/cjs/ThemeManager.js
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var ThemeManager_exports = {};
|
|
20
|
-
__export(ThemeManager_exports, {
|
|
21
|
-
ThemeManager: () => ThemeManager,
|
|
22
|
-
ThemeManagerContext: () => ThemeManagerContext,
|
|
23
|
-
emptyManager: () => emptyManager
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(ThemeManager_exports);
|
|
26
|
-
var import_react = require("react");
|
|
27
|
-
var import_conf = require("./conf");
|
|
28
|
-
var import_constants = require("./constants/constants");
|
|
29
|
-
var import_getThemeUnwrapped = require("./hooks/getThemeUnwrapped");
|
|
30
|
-
class ThemeManager {
|
|
31
|
-
constructor(name = "", theme = null, parentManager = null, reset = false) {
|
|
32
|
-
this.name = name;
|
|
33
|
-
this.theme = theme;
|
|
34
|
-
this.parentManager = parentManager;
|
|
35
|
-
this.reset = reset;
|
|
36
|
-
this.keys = /* @__PURE__ */ new Map();
|
|
37
|
-
this.listeners = /* @__PURE__ */ new Map();
|
|
38
|
-
this.themeListeners = /* @__PURE__ */ new Set();
|
|
39
|
-
this.className = null;
|
|
40
|
-
let parent = parentManager;
|
|
41
|
-
let tries = 0;
|
|
42
|
-
while (true) {
|
|
43
|
-
tries++;
|
|
44
|
-
if (tries > 10) {
|
|
45
|
-
throw new Error(`Nested 10 of the same theme in a row, likely error`);
|
|
46
|
-
}
|
|
47
|
-
if (!parent)
|
|
48
|
-
break;
|
|
49
|
-
if (parent.name === name) {
|
|
50
|
-
parent = parent.parentManager;
|
|
51
|
-
} else {
|
|
52
|
-
this.parentManager = parent;
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
get didChangeTheme() {
|
|
58
|
-
return this.parentManager && this.name !== this.parentManager.fullName;
|
|
59
|
-
}
|
|
60
|
-
get parentName() {
|
|
61
|
-
var _a;
|
|
62
|
-
return ((_a = this.parentManager) == null ? void 0 : _a.name) || null;
|
|
63
|
-
}
|
|
64
|
-
get fullName() {
|
|
65
|
-
return this.getNextTheme().name || this.name || "";
|
|
66
|
-
}
|
|
67
|
-
getValue(key) {
|
|
68
|
-
let theme = this.theme;
|
|
69
|
-
let manager = this;
|
|
70
|
-
while (true) {
|
|
71
|
-
if (!theme)
|
|
72
|
-
return;
|
|
73
|
-
if (key in theme) {
|
|
74
|
-
return theme[key];
|
|
75
|
-
}
|
|
76
|
-
manager = this.parentManager;
|
|
77
|
-
if (!manager) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (manager.theme === theme) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
theme = manager.theme;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
update({ name, theme, className } = {}) {
|
|
87
|
-
const nameChanged = name !== this.name;
|
|
88
|
-
if (!nameChanged) {
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
this.className = className || null;
|
|
92
|
-
this.name = name || "";
|
|
93
|
-
this.theme = theme;
|
|
94
|
-
this.notifyListeners();
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
getNextTheme(props = {}, debug) {
|
|
98
|
-
var _a;
|
|
99
|
-
const { themes = (0, import_conf.getThemes)(), name, componentName } = props;
|
|
100
|
-
if (props.reset && name) {
|
|
101
|
-
return {
|
|
102
|
-
name,
|
|
103
|
-
theme: themes[name],
|
|
104
|
-
className: this.getClassName(name)
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
const parentIsReset = (_a = this.parentManager) == null ? void 0 : _a.reset;
|
|
108
|
-
if (!name) {
|
|
109
|
-
if (componentName) {
|
|
110
|
-
const names = [
|
|
111
|
-
`${this.name}_${componentName}`,
|
|
112
|
-
`${withoutComponentName(this.name)}_${componentName}`
|
|
113
|
-
];
|
|
114
|
-
for (const name2 of names) {
|
|
115
|
-
if (name2 in themes) {
|
|
116
|
-
const className = this.getClassName(name2);
|
|
117
|
-
return { name: name2, theme: themes[name2], className };
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
name: this.name,
|
|
123
|
-
theme: this.theme
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
let nextName = name || this.name || "";
|
|
127
|
-
let parentName = parentIsReset ? this.parentName || this.fullName : this.fullName;
|
|
128
|
-
while (true) {
|
|
129
|
-
if (nextName in themes) {
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
nextName = `${parentName}_${name}`;
|
|
133
|
-
if (nextName in themes) {
|
|
134
|
-
break;
|
|
135
|
-
}
|
|
136
|
-
if (!parentName.includes(import_constants.THEME_NAME_SEPARATOR)) {
|
|
137
|
-
console.warn("theme not found", name);
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
parentName = parentName.slice(0, parentName.lastIndexOf(import_constants.THEME_NAME_SEPARATOR));
|
|
141
|
-
}
|
|
142
|
-
if (componentName) {
|
|
143
|
-
const names = [
|
|
144
|
-
`${nextName}_${componentName}`,
|
|
145
|
-
`${withoutComponentName(nextName)}_${componentName}`
|
|
146
|
-
];
|
|
147
|
-
for (const name2 of names) {
|
|
148
|
-
if (name2 in themes) {
|
|
149
|
-
nextName = name2;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
let theme = themes[nextName];
|
|
154
|
-
if (!theme) {
|
|
155
|
-
theme = themes[`light_${nextName}`];
|
|
156
|
-
}
|
|
157
|
-
if (process.env.NODE_ENV === "development") {
|
|
158
|
-
if (debug) {
|
|
159
|
-
console.log("getNextTheme", this.getClassName(nextName), { props, nextName, parentName });
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return {
|
|
163
|
-
name: nextName,
|
|
164
|
-
theme: (0, import_getThemeUnwrapped.getThemeUnwrapped)(theme),
|
|
165
|
-
className: this.getClassName(nextName)
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
getClassName(name) {
|
|
169
|
-
return `${import_constants.THEME_CLASSNAME_PREFIX}${name} t_Theme`.replace("light_", "").replace("dark_", "");
|
|
170
|
-
}
|
|
171
|
-
track(uuid, keys) {
|
|
172
|
-
if (!this.name)
|
|
173
|
-
return;
|
|
174
|
-
this.keys.set(uuid, keys);
|
|
175
|
-
}
|
|
176
|
-
notifyListeners() {
|
|
177
|
-
var _a;
|
|
178
|
-
if (!this.name) {
|
|
179
|
-
this.keys.clear();
|
|
180
|
-
}
|
|
181
|
-
for (const [uuid, keys] of this.keys.entries()) {
|
|
182
|
-
if (keys.size) {
|
|
183
|
-
(_a = this.listeners.get(uuid)) == null ? void 0 : _a();
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
this.themeListeners.forEach((cb) => cb(this.name, this));
|
|
187
|
-
}
|
|
188
|
-
onChangeTheme(cb) {
|
|
189
|
-
this.themeListeners.add(cb);
|
|
190
|
-
return () => {
|
|
191
|
-
this.themeListeners.delete(cb);
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
onUpdate(uuid, cb) {
|
|
195
|
-
this.listeners.set(uuid, cb);
|
|
196
|
-
return () => {
|
|
197
|
-
this.listeners.delete(uuid);
|
|
198
|
-
this.keys.delete(uuid);
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
const ThemeManagerContext = (0, import_react.createContext)(null);
|
|
203
|
-
const emptyManager = new ThemeManager();
|
|
204
|
-
const withoutComponentName = (name) => name.replace(/(\_[A-Z][a-zA-Z]+)+$/g, "");
|
|
205
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
206
|
-
0 && (module.exports = {
|
|
207
|
-
ThemeManager,
|
|
208
|
-
ThemeManagerContext,
|
|
209
|
-
emptyManager
|
|
210
|
-
});
|
|
211
|
-
//# sourceMappingURL=ThemeManager.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/ThemeManager.tsx"],
|
|
4
|
-
"sourcesContent": ["import { createContext } from 'react'\n\nimport { getThemes } from './conf'\nimport { THEME_CLASSNAME_PREFIX, THEME_NAME_SEPARATOR } from './constants/constants'\nimport { getThemeUnwrapped } from './hooks/getThemeUnwrapped'\nimport { ThemeObject, Themes } from './types'\n\ntype ThemeListener = (name: string | null, themeManager: ThemeManager) => void\n\nexport type SetActiveThemeProps = {\n className?: string\n parentManager?: ThemeManager | null\n name?: string | null\n theme?: any\n}\n\nexport type GetNextThemeProps = {\n themes?: Themes\n name?: string | null\n componentName?: string | null\n reset?: boolean\n}\n\nexport class ThemeManager {\n keys = new Map<any, Set<string>>()\n listeners = new Map<any, Function>()\n themeListeners = new Set<ThemeListener>()\n className: string | null = null\n\n constructor(\n public name: string = '',\n public theme: ThemeObject | null = null,\n public parentManager: ThemeManager | null = null,\n public reset: boolean = false\n ) {\n // find the nearest different parentManager\n let parent = parentManager\n let tries = 0\n while (true) {\n tries++\n if (tries > 10) {\n throw new Error(`Nested 10 of the same theme in a row, likely error`)\n }\n if (!parent) break\n if (parent.name === name) {\n // go up if same\n parent = parent.parentManager\n } else {\n this.parentManager = parent\n break\n }\n }\n }\n\n get didChangeTheme() {\n return this.parentManager && this.name !== this.parentManager.fullName\n }\n\n get parentName() {\n return this.parentManager?.name || null\n }\n\n get fullName(): string {\n return this.getNextTheme().name || this.name || ''\n // const parentName = this.parentManager?.fullName || ''\n // const name = this.name || ''\n // const parts = [...new Set([...`${parentName}_${name}`.split('_')])].filter(Boolean)\n // return parts.join('_')\n }\n\n // gets value going up to parents\n getValue(key: string) {\n let theme = this.theme\n let manager = this as ThemeManager | null\n while (true) {\n if (!theme) return\n if (key in theme) {\n return theme[key]\n }\n manager = this.parentManager\n if (!manager) {\n return\n }\n if (manager.theme === theme) {\n return\n }\n theme = manager.theme\n }\n }\n\n update({ name, theme, className }: SetActiveThemeProps = {}) {\n // className compare on web, avoids light/dark re-renders\n const nameChanged = name !== this.name\n if (!nameChanged) {\n return false\n }\n this.className = className || null\n this.name = name || ''\n this.theme = theme\n this.notifyListeners()\n return true\n }\n\n getNextTheme(props: GetNextThemeProps = {}, debug?: any) {\n const { themes = getThemes(), name, componentName } = props\n\n if (props.reset && name) {\n return {\n name: name,\n theme: themes[name],\n className: this.getClassName(name),\n }\n }\n\n const parentIsReset = this.parentManager?.reset\n\n if (!name) {\n if (componentName) {\n // allow for _Card_Button or just _Button\n const names = [\n `${this.name}_${componentName}`,\n `${withoutComponentName(this.name)}_${componentName}`,\n ]\n for (const name of names) {\n if (name in themes) {\n const className = this.getClassName(name)\n return { name, theme: themes[name], className }\n }\n }\n }\n return {\n name: this.name,\n theme: this.theme,\n }\n }\n\n let nextName = name || this.name || ''\n let parentName = parentIsReset ? this.parentName || this.fullName : this.fullName\n\n while (true) {\n if (nextName in themes) {\n break\n }\n nextName = `${parentName}_${name}`\n if (nextName in themes) {\n break\n }\n if (!parentName.includes(THEME_NAME_SEPARATOR)) {\n // not found!\n console.warn('theme not found', name)\n // this happens in next during _document.getInitialProps and has a terrible/non-existent stack trace\n // throw new Error(`Theme not found: ${name}`)\n break\n }\n // go up one\n parentName = parentName.slice(0, parentName.lastIndexOf(THEME_NAME_SEPARATOR))\n }\n\n if (componentName) {\n // allow for _Card_Button or just _Button\n const names = [\n `${nextName}_${componentName}`,\n `${withoutComponentName(nextName)}_${componentName}`,\n ]\n for (const name of names) {\n if (name in themes) {\n nextName = name\n }\n }\n }\n\n let theme = themes[nextName]\n if (!theme) {\n theme = themes[`light_${nextName}`]\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (debug) {\n console.log('getNextTheme', this.getClassName(nextName), { props, nextName, parentName })\n }\n }\n\n return {\n name: nextName,\n theme: getThemeUnwrapped(theme),\n className: this.getClassName(nextName),\n }\n }\n\n getClassName(name: string) {\n return `${THEME_CLASSNAME_PREFIX}${name} t_Theme`.replace('light_', '').replace('dark_', '')\n }\n\n track(uuid: any, keys: Set<string>) {\n if (!this.name) return\n this.keys.set(uuid, keys)\n }\n\n notifyListeners() {\n if (!this.name) {\n this.keys.clear()\n }\n for (const [uuid, keys] of this.keys.entries()) {\n if (keys.size) {\n this.listeners.get(uuid)?.()\n }\n }\n this.themeListeners.forEach((cb) => cb(this.name, this))\n }\n\n onChangeTheme(cb: ThemeListener) {\n this.themeListeners.add(cb)\n return () => {\n this.themeListeners.delete(cb)\n }\n }\n\n onUpdate(uuid: any, cb: Function) {\n this.listeners.set(uuid, cb)\n return () => {\n this.listeners.delete(uuid)\n this.keys.delete(uuid)\n }\n }\n}\n\nexport const ThemeManagerContext = createContext<ThemeManager | null>(null)\nexport const emptyManager = new ThemeManager()\n\nconst withoutComponentName = (name: string) => name.replace(/(\\_[A-Z][a-zA-Z]+)+$/g, '')\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/conf.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var conf_exports = {};
|
|
20
|
-
__export(conf_exports, {
|
|
21
|
-
configListeners: () => configListeners,
|
|
22
|
-
getConfig: () => getConfig,
|
|
23
|
-
getHasConfigured: () => getHasConfigured,
|
|
24
|
-
getThemes: () => getThemes,
|
|
25
|
-
getTokens: () => getTokens,
|
|
26
|
-
onConfiguredOnce: () => onConfiguredOnce,
|
|
27
|
-
setConfig: () => setConfig,
|
|
28
|
-
setConfigFont: () => setConfigFont
|
|
29
|
-
});
|
|
30
|
-
module.exports = __toCommonJS(conf_exports);
|
|
31
|
-
let conf;
|
|
32
|
-
const setConfig = (next) => {
|
|
33
|
-
conf = next;
|
|
34
|
-
if (configListeners.size) {
|
|
35
|
-
configListeners.forEach((cb) => cb(conf));
|
|
36
|
-
configListeners.clear();
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const setConfigFont = (name, font, fontParsed) => {
|
|
40
|
-
if (process.env.NODE_ENV === "development") {
|
|
41
|
-
if (!conf)
|
|
42
|
-
throw new Error(`Haven't called createTamagui yet`);
|
|
43
|
-
}
|
|
44
|
-
Object.assign(conf.fonts, { [name]: font });
|
|
45
|
-
Object.assign(conf.fontsParsed, { [`$${name}`]: fontParsed });
|
|
46
|
-
};
|
|
47
|
-
const getHasConfigured = () => !!conf;
|
|
48
|
-
const getConfig = () => conf;
|
|
49
|
-
const getTokens = () => conf.tokensParsed;
|
|
50
|
-
const getThemes = () => conf.themes;
|
|
51
|
-
const configListeners = /* @__PURE__ */ new Set();
|
|
52
|
-
const onConfiguredOnce = (cb) => {
|
|
53
|
-
if (conf) {
|
|
54
|
-
cb(conf);
|
|
55
|
-
} else {
|
|
56
|
-
configListeners.add(cb);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
-
0 && (module.exports = {
|
|
61
|
-
configListeners,
|
|
62
|
-
getConfig,
|
|
63
|
-
getHasConfigured,
|
|
64
|
-
getThemes,
|
|
65
|
-
getTokens,
|
|
66
|
-
onConfiguredOnce,
|
|
67
|
-
setConfig,
|
|
68
|
-
setConfigFont
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=conf.js.map
|
package/dist/cjs/conf.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/conf.ts"],
|
|
4
|
-
"sourcesContent": ["import { ConfigListener, TamaguiInternalConfig } from './types'\n\nlet conf: TamaguiInternalConfig | null\n\nexport const setConfig = (next: TamaguiInternalConfig) => {\n conf = next\n if (configListeners.size) {\n configListeners.forEach((cb) => cb(conf!))\n configListeners.clear()\n }\n}\n\nexport const setConfigFont = (name: string, font: any, fontParsed: any) => {\n if (process.env.NODE_ENV === 'development') {\n if (!conf) throw new Error(`Haven't called createTamagui yet`)\n }\n Object.assign(conf!.fonts, { [name]: font })\n Object.assign(conf!.fontsParsed, { [`$${name}`]: fontParsed })\n}\n\nexport const getHasConfigured = () => !!conf\nexport const getConfig = () => conf!\nexport const getTokens = () => conf!.tokensParsed\nexport const getThemes = () => conf!.themes\n\nexport const configListeners = new Set<ConfigListener>()\n\nexport const onConfiguredOnce = (cb: ConfigListener) => {\n if (conf) {\n cb(conf!)\n } else {\n configListeners.add(cb)\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAI;AAEG,MAAM,YAAY,CAAC,SAAgC;AACxD,SAAO;AACP,MAAI,gBAAgB,MAAM;AACxB,oBAAgB,QAAQ,CAAC,OAAO,GAAG,IAAK,CAAC;AACzC,oBAAgB,MAAM;AAAA,EACxB;AACF;AAEO,MAAM,gBAAgB,CAAC,MAAc,MAAW,eAAoB;AACzE,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,QAAI,CAAC;AAAM,YAAM,IAAI,MAAM,kCAAkC;AAAA,EAC/D;AACA,SAAO,OAAO,KAAM,OAAO,EAAE,CAAC,OAAO,KAAK,CAAC;AAC3C,SAAO,OAAO,KAAM,aAAa,EAAE,CAAC,IAAI,SAAS,WAAW,CAAC;AAC/D;AAEO,MAAM,mBAAmB,MAAM,CAAC,CAAC;AACjC,MAAM,YAAY,MAAM;AACxB,MAAM,YAAY,MAAM,KAAM;AAC9B,MAAM,YAAY,MAAM,KAAM;AAE9B,MAAM,kBAAkB,oBAAI,IAAoB;AAEhD,MAAM,mBAAmB,CAAC,OAAuB;AACtD,MAAI,MAAM;AACR,OAAG,IAAK;AAAA,EACV,OAAO;AACL,oBAAgB,IAAI,EAAE;AAAA,EACxB;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var platform_exports = {};
|
|
20
|
-
__export(platform_exports, {
|
|
21
|
-
isAndroid: () => isAndroid,
|
|
22
|
-
isChrome: () => isChrome,
|
|
23
|
-
isClient: () => isClient,
|
|
24
|
-
isIOS: () => isIOS,
|
|
25
|
-
isSSR: () => isSSR,
|
|
26
|
-
isTouchable: () => isTouchable,
|
|
27
|
-
isWeb: () => isWeb,
|
|
28
|
-
isWebTouchable: () => isWebTouchable,
|
|
29
|
-
isWindowDefined: () => isWindowDefined,
|
|
30
|
-
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(platform_exports);
|
|
33
|
-
var import_react = require("react");
|
|
34
|
-
var import_react_native = require("react-native");
|
|
35
|
-
var _a, _b;
|
|
36
|
-
const isAndroid = ((_a = import_react_native.Platform) == null ? void 0 : _a.OS) === "android";
|
|
37
|
-
const isIOS = ((_b = import_react_native.Platform) == null ? void 0 : _b.OS) === "ios";
|
|
38
|
-
const isWeb = process.env.TAMAGUI_TARGET === "web";
|
|
39
|
-
const isWindowDefined = typeof window !== "undefined";
|
|
40
|
-
const isSSR = isWeb && !isWindowDefined;
|
|
41
|
-
const isClient = isWeb && isWindowDefined;
|
|
42
|
-
const useIsomorphicLayoutEffect = isSSR ? import_react.useEffect : import_react.useLayoutEffect;
|
|
43
|
-
const isChrome = typeof navigator !== "undefined" && /Chrome/.test(navigator.userAgent || "");
|
|
44
|
-
const isWebTouchable = isClient && "ontouchstart" in window;
|
|
45
|
-
const isTouchable = !isWeb || isWebTouchable;
|
|
46
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
isAndroid,
|
|
49
|
-
isChrome,
|
|
50
|
-
isClient,
|
|
51
|
-
isIOS,
|
|
52
|
-
isSSR,
|
|
53
|
-
isTouchable,
|
|
54
|
-
isWeb,
|
|
55
|
-
isWebTouchable,
|
|
56
|
-
isWindowDefined,
|
|
57
|
-
useIsomorphicLayoutEffect
|
|
58
|
-
});
|
|
59
|
-
//# sourceMappingURL=platform.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/constants/platform.ts"],
|
|
4
|
-
"sourcesContent": ["import { useEffect, useLayoutEffect } from 'react'\nimport { Platform } from 'react-native'\n\nexport const isAndroid = Platform?.OS === 'android'\nexport const isIOS = Platform?.OS === 'ios'\nexport const isWeb = process.env.TAMAGUI_TARGET === 'web'\nexport const isWindowDefined = typeof window !== 'undefined'\nexport const isSSR = isWeb && !isWindowDefined\nexport const isClient = isWeb && isWindowDefined\nexport const useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect\nexport const isChrome = typeof navigator !== 'undefined' && /Chrome/.test(navigator.userAgent || '')\nexport const isWebTouchable = isClient && 'ontouchstart' in window\nexport const isTouchable = !isWeb || isWebTouchable\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2C;AAC3C,0BAAyB;AADzB;AAGO,MAAM,YAAY,2DAAU,QAAO;AACnC,MAAM,QAAQ,2DAAU,QAAO;AAC/B,MAAM,QAAQ,QAAQ,IAAI,mBAAmB;AAC7C,MAAM,kBAAkB,OAAO,WAAW;AAC1C,MAAM,QAAQ,SAAS,CAAC;AACxB,MAAM,WAAW,SAAS;AAC1B,MAAM,4BAA4B,QAAQ,yBAAY;AACtD,MAAM,WAAW,OAAO,cAAc,eAAe,SAAS,KAAK,UAAU,aAAa,EAAE;AAC5F,MAAM,iBAAiB,YAAY,kBAAkB;AACrD,MAAM,cAAc,CAAC,SAAS;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var platform_native_exports = {};
|
|
20
|
-
__export(platform_native_exports, {
|
|
21
|
-
isAndroid: () => isAndroid,
|
|
22
|
-
isChrome: () => isChrome,
|
|
23
|
-
isClient: () => isClient,
|
|
24
|
-
isIOS: () => isIOS,
|
|
25
|
-
isRSC: () => isRSC,
|
|
26
|
-
isSSR: () => isSSR,
|
|
27
|
-
isTouchable: () => isTouchable,
|
|
28
|
-
isWeb: () => isWeb,
|
|
29
|
-
isWebTouchable: () => isWebTouchable,
|
|
30
|
-
isWindowDefined: () => isWindowDefined,
|
|
31
|
-
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(platform_native_exports);
|
|
34
|
-
var import_react = require("react");
|
|
35
|
-
var import_react_native = require("react-native");
|
|
36
|
-
var _a, _b;
|
|
37
|
-
const isAndroid = ((_a = import_react_native.Platform) == null ? void 0 : _a.OS) === "android";
|
|
38
|
-
const isIOS = ((_b = import_react_native.Platform) == null ? void 0 : _b.OS) === "ios";
|
|
39
|
-
const isWeb = false;
|
|
40
|
-
const isWindowDefined = false;
|
|
41
|
-
const isSSR = false;
|
|
42
|
-
const isClient = false;
|
|
43
|
-
const isRSC = false;
|
|
44
|
-
const useIsomorphicLayoutEffect = import_react.useLayoutEffect;
|
|
45
|
-
const isChrome = false;
|
|
46
|
-
const isWebTouchable = false;
|
|
47
|
-
const isTouchable = true;
|
|
48
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
-
0 && (module.exports = {
|
|
50
|
-
isAndroid,
|
|
51
|
-
isChrome,
|
|
52
|
-
isClient,
|
|
53
|
-
isIOS,
|
|
54
|
-
isRSC,
|
|
55
|
-
isSSR,
|
|
56
|
-
isTouchable,
|
|
57
|
-
isWeb,
|
|
58
|
-
isWebTouchable,
|
|
59
|
-
isWindowDefined,
|
|
60
|
-
useIsomorphicLayoutEffect
|
|
61
|
-
});
|
|
62
|
-
//# sourceMappingURL=platform.native.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/constants/platform.native.ts"],
|
|
4
|
-
"sourcesContent": ["import { useLayoutEffect } from 'react'\nimport { Platform } from 'react-native'\n\nexport const isAndroid = Platform?.OS === 'android'\nexport const isIOS = Platform?.OS === 'ios'\nexport const isWeb = false\nexport const isWindowDefined = false\nexport const isSSR = false\nexport const isClient = false\nexport const isRSC = false\nexport const useIsomorphicLayoutEffect = useLayoutEffect\nexport const isChrome = false\nexport const isWebTouchable = false\nexport const isTouchable = true\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgC;AAChC,0BAAyB;AADzB;AAGO,MAAM,cAAY,yDAAU,QAAO;AACnC,MAAM,UAAQ,yDAAU,QAAO;AAC/B,MAAM,QAAQ;AACd,MAAM,kBAAkB;AACxB,MAAM,QAAQ;AACd,MAAM,WAAW;AACjB,MAAM,QAAQ;AACd,MAAM,4BAA4B;AAClC,MAAM,WAAW;AACjB,MAAM,iBAAiB;AACvB,MAAM,cAAc;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var rnw_native_exports = {};
|
|
19
|
-
__export(rnw_native_exports, {
|
|
20
|
-
rnw: () => rnw
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(rnw_native_exports);
|
|
23
|
-
const rnw = {};
|
|
24
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
25
|
-
0 && (module.exports = {
|
|
26
|
-
rnw
|
|
27
|
-
});
|
|
28
|
-
//# sourceMappingURL=rnw.native.js.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var ButtonInsideButtonContext_exports = {};
|
|
20
|
-
__export(ButtonInsideButtonContext_exports, {
|
|
21
|
-
ButtonInsideButtonContext: () => ButtonInsideButtonContext
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(ButtonInsideButtonContext_exports);
|
|
24
|
-
var import_react = require("react");
|
|
25
|
-
const ButtonInsideButtonContext = (0, import_react.createContext)(false);
|
|
26
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
-
0 && (module.exports = {
|
|
28
|
-
ButtonInsideButtonContext
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=ButtonInsideButtonContext.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/contexts/ButtonInsideButtonContext.tsx"],
|
|
4
|
-
"sourcesContent": ["import { createContext } from 'react'\n\nexport const ButtonInsideButtonContext = createContext(false)\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA8B;AAEvB,MAAM,4BAA4B,gCAAc,KAAK;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var ThemeContext_exports = {};
|
|
20
|
-
__export(ThemeContext_exports, {
|
|
21
|
-
ThemeContext: () => ThemeContext
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(ThemeContext_exports);
|
|
24
|
-
var import_react = require("react");
|
|
25
|
-
const ThemeContext = (0, import_react.createContext)(null);
|
|
26
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
-
0 && (module.exports = {
|
|
28
|
-
ThemeContext
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=ThemeContext.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/contexts/ThemeContext.tsx"],
|
|
4
|
-
"sourcesContent": ["import { createContext } from 'react'\n\nimport { ThemeName, Themes } from '../types'\n\nexport const ThemeContext = createContext<{ themes: Themes; defaultTheme: ThemeName } | null>(null)\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA8B;AAIvB,MAAM,mBAAe,4BAAkE,IAAI;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var Unwrap_exports = {};
|
|
20
|
-
__export(Unwrap_exports, {
|
|
21
|
-
Unwrap: () => Unwrap
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(Unwrap_exports);
|
|
24
|
-
const Unwrap = Symbol();
|
|
25
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
-
0 && (module.exports = {
|
|
27
|
-
Unwrap
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=Unwrap.js.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var areEqualSets_exports = {};
|
|
20
|
-
__export(areEqualSets_exports, {
|
|
21
|
-
areEqualSets: () => areEqualSets
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(areEqualSets_exports);
|
|
24
|
-
const areEqualSets = (a, b) => {
|
|
25
|
-
if (a.size !== b.size)
|
|
26
|
-
return false;
|
|
27
|
-
for (const val in a) {
|
|
28
|
-
if (!b.has(val)) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return true;
|
|
33
|
-
};
|
|
34
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
-
0 && (module.exports = {
|
|
36
|
-
areEqualSets
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=areEqualSets.js.map
|