@tamagui/core 1.0.1-beta.82 → 1.0.1-beta.86
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/createComponent.js +5 -3
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +15 -15
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.js +2 -43
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/helpers/insertStyleRule.js +40 -22
- package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
- package/dist/cjs/helpers/wrapThemeManagerContext.js.map +2 -2
- package/dist/cjs/hooks/useFeatures.js +4 -2
- package/dist/cjs/hooks/useFeatures.js.map +2 -2
- package/dist/cjs/hooks/useId.js +1 -1
- package/dist/cjs/hooks/useId.js.map +2 -2
- package/dist/cjs/views/Theme.js.map +2 -2
- package/dist/esm/createComponent.js +6 -3
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +16 -17
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.js +2 -44
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/helpers/insertStyleRule.js +40 -22
- package/dist/esm/helpers/insertStyleRule.js.map +2 -2
- package/dist/esm/helpers/wrapThemeManagerContext.js.map +1 -1
- package/dist/esm/hooks/useFeatures.js +5 -3
- package/dist/esm/hooks/useFeatures.js.map +2 -2
- package/dist/esm/hooks/useId.js +1 -1
- package/dist/esm/hooks/useId.js.map +2 -2
- package/dist/esm/views/Theme.js.map +1 -1
- package/package.json +7 -7
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +1 -0
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getStylesAtomic.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/hooks/useFeatures.d.ts.map +1 -1
- package/types/hooks/useId.d.ts.map +1 -1
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeInverse.d.ts +0 -1
- package/types/views/ThemeInverse.d.ts.map +1 -1
- package/types/views/ThemeProvider.d.ts +0 -1
- package/types/views/ThemeProvider.d.ts.map +1 -1
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
1
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
2
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
3
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
4
|
var __objRest = (source, exclude) => {
|
|
21
5
|
var target = {};
|
|
22
6
|
for (var prop in source)
|
|
@@ -29,33 +13,20 @@ var __objRest = (source, exclude) => {
|
|
|
29
13
|
}
|
|
30
14
|
return target;
|
|
31
15
|
};
|
|
32
|
-
import { stylePropsTransform } from "@tamagui/helpers";
|
|
33
|
-
import { isVariable } from "../createVariable";
|
|
34
16
|
import { generateAtomicStyles } from "./generateAtomicStyles";
|
|
35
|
-
import { invertMapTransformKeys, mergeTransform } from "./mergeTransform";
|
|
36
17
|
import { pseudoDescriptors } from "./pseudoDescriptors";
|
|
37
18
|
const pseudosOrdered = Object.values(pseudoDescriptors);
|
|
38
19
|
function getStylesAtomic(stylesIn, options) {
|
|
39
20
|
if (!stylesIn.hoverStyle && !stylesIn.pressStyle && !stylesIn.focusStyle) {
|
|
40
21
|
return getAtomicStyle(stylesIn, void 0, options);
|
|
41
22
|
}
|
|
23
|
+
console.log("go");
|
|
42
24
|
const _a = stylesIn, { hoverStyle, pressStyle, focusStyle } = _a, base = __objRest(_a, ["hoverStyle", "pressStyle", "focusStyle"]);
|
|
43
25
|
let res = [];
|
|
44
26
|
for (const [index, style] of [hoverStyle, pressStyle, focusStyle, base].entries()) {
|
|
45
|
-
if (!style
|
|
27
|
+
if (!style)
|
|
46
28
|
continue;
|
|
47
|
-
}
|
|
48
29
|
const pseudo = pseudosOrdered[index];
|
|
49
|
-
for (const skey in style) {
|
|
50
|
-
const val = style[skey];
|
|
51
|
-
if (isVariable(val)) {
|
|
52
|
-
style[skey] = val.toString();
|
|
53
|
-
}
|
|
54
|
-
if (stylePropsTransform[skey]) {
|
|
55
|
-
delete style[skey];
|
|
56
|
-
mergeTransform(style, skey, val);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
30
|
res = [...res, ...getAtomicStyle(style, pseudo, options)];
|
|
60
31
|
}
|
|
61
32
|
return res;
|
|
@@ -71,19 +42,6 @@ function getAtomicStyle(style, pseudo, options) {
|
|
|
71
42
|
return [];
|
|
72
43
|
}
|
|
73
44
|
}
|
|
74
|
-
if (options && options.splitTransforms && style.transform) {
|
|
75
|
-
let atomicStyles = [];
|
|
76
|
-
let _a = style, { transform } = _a, rest = __objRest(_a, ["transform"]);
|
|
77
|
-
for (const t of transform) {
|
|
78
|
-
const tKey = Object.keys(t)[0];
|
|
79
|
-
const transformProperty = invertMapTransformKeys[tKey] || tKey;
|
|
80
|
-
const out = generateAtomicStyles({ transform: [t] }, pseudo)[0];
|
|
81
|
-
atomicStyles.push(__spreadProps(__spreadValues({}, out), {
|
|
82
|
-
property: transformProperty
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
return [...atomicStyles, ...generateAtomicStyles(rest, pseudo)];
|
|
86
|
-
}
|
|
87
45
|
return generateAtomicStyles(style, pseudo);
|
|
88
46
|
}
|
|
89
47
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/getStylesAtomic.ts"],
|
|
4
|
-
"sourcesContent": ["import { StyleObject, stylePropsTransform } from '@tamagui/helpers'\nimport { ViewStyle } from 'react-native'\n\nimport { isVariable } from '../createVariable'\nimport { generateAtomicStyles } from './generateAtomicStyles'\nimport { invertMapTransformKeys, mergeTransform } from './mergeTransform'\nimport { PseudoDescriptor, pseudoDescriptors } from './pseudoDescriptors'\n\n// refactor this file away next...\n\nexport type ViewStyleWithPseudos = ViewStyle & {\n hoverStyle?: ViewStyle\n pressStyle?: ViewStyle\n focusStyle?: ViewStyle\n}\n\ntype AtomicStyleOptions = {\n // StyleObject.propererty will be original transform key, so extractor can keep prop/spread logic\n splitTransforms?: boolean\n}\n\nconst pseudosOrdered = Object.values(pseudoDescriptors)\n\nexport function getStylesAtomic(stylesIn: ViewStyleWithPseudos, options?: AtomicStyleOptions) {\n // performance optimization\n if (!stylesIn.hoverStyle && !stylesIn.pressStyle && !stylesIn.focusStyle) {\n return getAtomicStyle(stylesIn, undefined, options)\n }\n\n // only for pseudos\n const { hoverStyle, pressStyle, focusStyle, ...base } = stylesIn\n let res: StyleObject[] = []\n // *1 order matched to *0\n for (const [index, style] of [hoverStyle, pressStyle, focusStyle, base].entries()) {\n if (!style
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { StyleObject, stylePropsTransform } from '@tamagui/helpers'\nimport { ViewStyle } from 'react-native'\n\nimport { isVariable } from '../createVariable'\nimport { generateAtomicStyles } from './generateAtomicStyles'\nimport { PROP_SPLIT } from './getSplitStyles'\nimport { invertMapTransformKeys, mergeTransform } from './mergeTransform'\nimport { PseudoDescriptor, pseudoDescriptors } from './pseudoDescriptors'\n\n// refactor this file away next...\n\nexport type ViewStyleWithPseudos = ViewStyle & {\n hoverStyle?: ViewStyle\n pressStyle?: ViewStyle\n focusStyle?: ViewStyle\n}\n\ntype AtomicStyleOptions = {\n // StyleObject.propererty will be original transform key, so extractor can keep prop/spread logic\n splitTransforms?: boolean\n}\n\nconst pseudosOrdered = Object.values(pseudoDescriptors)\n\nexport function getStylesAtomic(stylesIn: ViewStyleWithPseudos, options?: AtomicStyleOptions) {\n // performance optimization\n if (!stylesIn.hoverStyle && !stylesIn.pressStyle && !stylesIn.focusStyle) {\n return getAtomicStyle(stylesIn, undefined, options)\n }\n\n console.log('go')\n\n // only for pseudos\n const { hoverStyle, pressStyle, focusStyle, ...base } = stylesIn\n let res: StyleObject[] = []\n // *1 order matched to *0\n for (const [index, style] of [hoverStyle, pressStyle, focusStyle, base].entries()) {\n if (!style) continue\n const pseudo = pseudosOrdered[index]\n res = [...res, ...getAtomicStyle(style, pseudo, options)]\n }\n return res\n}\n\nexport function getAtomicStyle(\n style: ViewStyle,\n pseudo?: PseudoDescriptor,\n options?: AtomicStyleOptions\n): StyleObject[] {\n if (process.env.NODE_ENV === 'development') {\n if (!style || typeof style !== 'object') {\n throw new Error(`Wrong style type: \"${typeof style}\": ${style}`)\n }\n } else {\n if (!style) {\n console.warn(`Invalid style`)\n return []\n }\n }\n\n // if (options && options.splitTransforms && style.transform) {\n // let atomicStyles: StyleObject[] = []\n // let { transform, ...rest } = style\n // // for (const t of transform) {\n // // const tKey = Object.keys(t)[0]\n // // const transformProperty = invertMapTransformKeys[tKey] || tKey\n // // const out = generateAtomicStyles({ transform: [t] }, pseudo)[0]\n // // atomicStyles.push({\n // // ...out,\n // // property: transformProperty + (out.pseudo ? `${PROP_SPLIT}${out.pseudo}` : ''),\n // // })\n // // }\n // console.log('rest', rest)\n // return [...atomicStyles, ...generateAtomicStyles(rest, pseudo)]\n // }\n\n return generateAtomicStyles(style, pseudo)\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;AAIA;AAGA;AAeA,MAAM,iBAAiB,OAAO,OAAO,iBAAiB;AAE/C,yBAAyB,UAAgC,SAA8B;AAE5F,MAAI,CAAC,SAAS,cAAc,CAAC,SAAS,cAAc,CAAC,SAAS,YAAY;AACxE,WAAO,eAAe,UAAU,QAAW,OAAO;AAAA,EACpD;AAEA,UAAQ,IAAI,IAAI;AAGhB,QAAwD,eAAhD,cAAY,YAAY,eAAwB,IAAT,iBAAS,IAAT,CAAvC,cAAY,cAAY;AAChC,MAAI,MAAqB,CAAC;AAE1B,aAAW,CAAC,OAAO,UAAU,CAAC,YAAY,YAAY,YAAY,IAAI,EAAE,QAAQ,GAAG;AACjF,QAAI,CAAC;AAAO;AACZ,UAAM,SAAS,eAAe;AAC9B,UAAM,CAAC,GAAG,KAAK,GAAG,eAAe,OAAO,QAAQ,OAAO,CAAC;AAAA,EAC1D;AACA,SAAO;AACT;AAEO,wBACL,OACA,QACA,SACe;AACf,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,QAAI,CAAC,SAAS,OAAO,UAAU,UAAU;AACvC,YAAM,IAAI,MAAM,sBAAsB,OAAO,WAAW,OAAO;AAAA,IACjE;AAAA,EACF,OAAO;AACL,QAAI,CAAC,OAAO;AACV,cAAQ,KAAK,eAAe;AAC5B,aAAO,CAAC;AAAA,IACV;AAAA,EACF;AAkBA,SAAO,qBAAqB,OAAO,MAAM;AAC3C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -8,6 +8,10 @@ function addTransform(identifier, css, rule) {
|
|
|
8
8
|
const s = css.indexOf("transform:");
|
|
9
9
|
if (s === -1) {
|
|
10
10
|
if (process.env.NODE_ENV === "development") {
|
|
11
|
+
if (css.indexOf("{ }")) {
|
|
12
|
+
console.log("wah wah");
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
11
15
|
console.groupCollapsed(`\u274C Invalid transform, likely used deg/% improperly ${identifier}`);
|
|
12
16
|
console.log("rule:", rule);
|
|
13
17
|
console.trace();
|
|
@@ -27,42 +31,57 @@ function addTransform(identifier, css, rule) {
|
|
|
27
31
|
return false;
|
|
28
32
|
}
|
|
29
33
|
const isClient = typeof document !== "undefined";
|
|
30
|
-
|
|
34
|
+
const scannedNum = /* @__PURE__ */ new WeakMap();
|
|
31
35
|
function updateInserted() {
|
|
32
36
|
if (process.env.NODE_ENV === "test")
|
|
33
37
|
return;
|
|
34
38
|
if (!isClient)
|
|
35
39
|
return;
|
|
36
|
-
if (!hasInsertedSinceUpdate)
|
|
37
|
-
return;
|
|
38
40
|
const sheets = document.styleSheets;
|
|
39
41
|
if (!sheets)
|
|
40
42
|
return;
|
|
41
43
|
for (let i = 0; i < sheets.length; i++) {
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (!firstSelector)
|
|
44
|
+
const sheet2 = sheets[i];
|
|
45
|
+
const rules = sheet2.cssRules;
|
|
46
|
+
const len = rules.length;
|
|
47
|
+
const lastScanned = scannedNum.get(sheet2) ?? 0;
|
|
48
|
+
if (lastScanned === len) {
|
|
48
49
|
continue;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
}
|
|
51
|
+
for (let i2 = lastScanned; i2 < len; i2++) {
|
|
52
|
+
const rule = rules[i2];
|
|
53
|
+
const response = getTamaguiSelector(rule);
|
|
54
|
+
if (!response) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const [identifier, cssRule] = response;
|
|
58
|
+
if (!allSelectors[identifier]) {
|
|
59
|
+
const isTransform = identifier.startsWith("_transform");
|
|
60
|
+
const shouldInsert = isTransform ? addTransform(identifier, cssRule.cssText, cssRule) : true;
|
|
61
|
+
if (shouldInsert) {
|
|
62
|
+
allSelectors[identifier] = process.env.NODE_ENV === "development" ? cssRule.cssText : true;
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
65
|
}
|
|
66
|
+
scannedNum.set(sheet2, i);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function getTamaguiSelector(rule) {
|
|
70
|
+
if (rule instanceof CSSStyleRule) {
|
|
71
|
+
if (rule.selectorText.startsWith("._")) {
|
|
72
|
+
return [rule.selectorText.slice(1), rule];
|
|
73
|
+
}
|
|
74
|
+
if (rule.selectorText.startsWith(":root") && rule.selectorText.includes("._")) {
|
|
75
|
+
return [getIdentifierFromTamaguiSelector(rule.selectorText), rule];
|
|
76
|
+
}
|
|
77
|
+
} else if (rule instanceof CSSMediaRule) {
|
|
78
|
+
if (rule.cssRules.length > 1)
|
|
79
|
+
return null;
|
|
80
|
+
return getTamaguiSelector(rule.cssRules[0]);
|
|
63
81
|
}
|
|
64
|
-
|
|
82
|
+
return null;
|
|
65
83
|
}
|
|
84
|
+
const getIdentifierFromTamaguiSelector = (selector) => selector.replace(/(:root)+\s+/, "").replace(/:[a-z]+$/, "").slice(1);
|
|
66
85
|
updateInserted();
|
|
67
86
|
const sheet = isClient ? document.head.appendChild(document.createElement("style")).sheet : null;
|
|
68
87
|
function updateInsertedCache(identifier, rule) {
|
|
@@ -77,7 +96,6 @@ function updateInsertedCache(identifier, rule) {
|
|
|
77
96
|
function insertStyleRule(identifier, rule) {
|
|
78
97
|
if (allSelectors[identifier])
|
|
79
98
|
return;
|
|
80
|
-
hasInsertedSinceUpdate = true;
|
|
81
99
|
updateInsertedCache(identifier, rule);
|
|
82
100
|
allSelectors[identifier] = process.env.NODE_ENV === "development" ? rule : true;
|
|
83
101
|
sheet == null ? void 0 : sheet.insertRule(rule, sheet.cssRules.length);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/insertStyleRule.tsx"],
|
|
4
|
-
"sourcesContent": ["// this needs to check if its inserted already? 99% of the time it is\n// this should avoid re-inserts, but need to test the perf trade-offs\n// i tested with the site itself and the initial insert was trivial\n\nconst allSelectors = {}\nconst insertedSelectors = {}\nexport const insertedTransforms = {}\n\nexport const getAllSelectors = () => allSelectors\nexport const getInsertedRules = () => Object.values(insertedSelectors)\nexport const getAllTransforms = () => insertedTransforms\n\n// keep transforms in map for merging later\nfunction addTransform(identifier: string, css: string, rule?: CSSRule) {\n const s = css.indexOf('transform:')\n if (s === -1) {\n if (process.env.NODE_ENV === 'development') {\n console.groupCollapsed(`\u274C Invalid transform, likely used deg/% improperly ${identifier}`)\n console.log('rule:', rule)\n console.trace()\n console.groupEnd()\n } else {\n console.warn(`Missing transform`, identifier, css, rule)\n }\n return false\n }\n const startI = s + 'transform:'.length\n const endI = css.indexOf(';')\n const value = css.slice(startI, endI)\n if (!insertedTransforms[identifier]) {\n insertedTransforms[identifier] = value\n return true\n }\n return false\n}\n\nconst isClient = typeof document !== 'undefined'\n\n// gets existing ones (client side)\n// takes ~0.1ms for a fairly large page\n// used now for three things:\n// 1. debugging at dev time\n// 2. avoid duplicate insert styles at runtime\n// 3. used now for merging transforms atomically\
|
|
5
|
-
"mappings": "AAIA,MAAM,eAAe,CAAC;AACtB,MAAM,oBAAoB,CAAC;AACpB,MAAM,qBAAqB,CAAC;AAE5B,MAAM,kBAAkB,MAAM;AAC9B,MAAM,mBAAmB,MAAM,OAAO,OAAO,iBAAiB;AAC9D,MAAM,mBAAmB,MAAM;AAGtC,sBAAsB,YAAoB,KAAa,MAAgB;AACrE,QAAM,IAAI,IAAI,QAAQ,YAAY;AAClC,MAAI,MAAM,IAAI;AACZ,QAAI,QAAQ,IAAI,aAAa,eAAe;
|
|
4
|
+
"sourcesContent": ["// this needs to check if its inserted already? 99% of the time it is\n// this should avoid re-inserts, but need to test the perf trade-offs\n// i tested with the site itself and the initial insert was trivial\n\nconst allSelectors = {}\nconst insertedSelectors = {}\nexport const insertedTransforms = {}\n\nexport const getAllSelectors = () => allSelectors\nexport const getInsertedRules = () => Object.values(insertedSelectors)\nexport const getAllTransforms = () => insertedTransforms\n\n// keep transforms in map for merging later\nfunction addTransform(identifier: string, css: string, rule?: CSSRule) {\n const s = css.indexOf('transform:')\n if (s === -1) {\n if (process.env.NODE_ENV === 'development') {\n // sometimes getting empty style rules from webpack... :/ only in dev\n if (css.indexOf('{ }')) {\n console.log('wah wah')\n return false\n }\n console.groupCollapsed(`\u274C Invalid transform, likely used deg/% improperly ${identifier}`)\n console.log('rule:', rule)\n console.trace()\n console.groupEnd()\n } else {\n console.warn(`Missing transform`, identifier, css, rule)\n }\n return false\n }\n const startI = s + 'transform:'.length\n const endI = css.indexOf(';')\n const value = css.slice(startI, endI)\n if (!insertedTransforms[identifier]) {\n insertedTransforms[identifier] = value\n return true\n }\n return false\n}\n\nconst isClient = typeof document !== 'undefined'\n\n// gets existing ones (client side)\n// takes ~0.1ms for a fairly large page\n// used now for three things:\n// 1. debugging at dev time\n// 2. avoid duplicate insert styles at runtime\n// 3. used now for merging transforms atomically\nconst scannedNum = new WeakMap<CSSStyleSheet, number>()\n\nexport function updateInserted() {\n if (process.env.NODE_ENV === 'test') return\n if (!isClient) return\n const sheets = document.styleSheets\n if (!sheets) return\n for (let i = 0; i < sheets.length; i++) {\n const sheet = sheets[i]\n const rules = sheet.cssRules\n const len = rules.length\n const lastScanned = scannedNum.get(sheet) ?? 0\n if (lastScanned === len) {\n continue\n }\n for (let i = lastScanned; i < len; i++) {\n const rule = rules[i]\n const response = getTamaguiSelector(rule)\n if (!response) {\n continue\n }\n const [identifier, cssRule] = response\n if (!allSelectors[identifier]) {\n const isTransform = identifier.startsWith('_transform')\n const shouldInsert = isTransform ? addTransform(identifier, cssRule.cssText, cssRule) : true\n if (shouldInsert) {\n allSelectors[identifier] = process.env.NODE_ENV === 'development' ? cssRule.cssText : true\n }\n }\n }\n scannedNum.set(sheet, i)\n }\n}\n\nfunction getTamaguiSelector(rule: CSSRule | null): readonly [string, CSSStyleRule] | null {\n if (rule instanceof CSSStyleRule) {\n if (rule.selectorText.startsWith('._')) {\n return [rule.selectorText.slice(1), rule]\n }\n if (rule.selectorText.startsWith(':root') && rule.selectorText.includes('._')) {\n return [getIdentifierFromTamaguiSelector(rule.selectorText), rule]\n }\n } else if (rule instanceof CSSMediaRule) {\n // tamagui only ever inserts 1 rule per media\n if (rule.cssRules.length > 1) return null\n return getTamaguiSelector(rule.cssRules[0])\n }\n return null\n}\n\nconst getIdentifierFromTamaguiSelector = (selector: string) =>\n selector\n .replace(/(:root)+\\s+/, '')\n .replace(/:[a-z]+$/, '')\n .slice(1)\n\nupdateInserted()\n\nconst sheet = isClient ? document.head.appendChild(document.createElement('style')).sheet : null\n\nexport function updateInsertedCache(identifier: string, rule: string) {\n if (insertedSelectors[identifier]) return false\n insertedSelectors[identifier] = rule\n if (identifier.startsWith('_transform')) {\n return addTransform(identifier, rule)\n }\n return true\n}\n\nexport function insertStyleRule(identifier: string, rule: string) {\n if (allSelectors[identifier]) return\n updateInsertedCache(identifier, rule)\n allSelectors[identifier] = process.env.NODE_ENV === 'development' ? rule : true\n sheet?.insertRule(rule, sheet.cssRules.length)\n}\n"],
|
|
5
|
+
"mappings": "AAIA,MAAM,eAAe,CAAC;AACtB,MAAM,oBAAoB,CAAC;AACpB,MAAM,qBAAqB,CAAC;AAE5B,MAAM,kBAAkB,MAAM;AAC9B,MAAM,mBAAmB,MAAM,OAAO,OAAO,iBAAiB;AAC9D,MAAM,mBAAmB,MAAM;AAGtC,sBAAsB,YAAoB,KAAa,MAAgB;AACrE,QAAM,IAAI,IAAI,QAAQ,YAAY;AAClC,MAAI,MAAM,IAAI;AACZ,QAAI,QAAQ,IAAI,aAAa,eAAe;AAE1C,UAAI,IAAI,QAAQ,KAAK,GAAG;AACtB,gBAAQ,IAAI,SAAS;AACrB,eAAO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IAAI,QAAO,CAAC;AAAA,EACzB;AACF;AAEA,4BAA4B,MAA8D;AACxF,MAAI,gBAAgB,cAAc;AAChC,QAAI,KAAK,aAAa,WAAW,IAAI,GAAG;AACtC,aAAO,CAAC,KAAK,aAAa,MAAM,CAAC,GAAG,IAAI;AAAA,IAC1C;AACA,QAAI,KAAK,aAAa,WAAW,OAAO,KAAK,KAAK,aAAa,SAAS,IAAI,GAAG;AAC7E,aAAO,CAAC,iCAAiC,KAAK,YAAY,GAAG,IAAI;AAAA,IACnE;AAAA,EACF,WAAW,gBAAgB,cAAc;AAEvC,QAAI,KAAK,SAAS,SAAS;AAAG,aAAO;AACrC,WAAO,mBAAmB,KAAK,SAAS,EAAE;AAAA,EAC5C;AACA,SAAO;AACT;AAEA,MAAM,mCAAmC,CAAC,aACxC,SACG,QAAQ,eAAe,EAAE,EACzB,QAAQ,YAAY,EAAE,EACtB,MAAM,CAAC;AAEZ,eAAe;AAEf,MAAM,QAAQ,WAAW,SAAS,KAAK,YAAY,SAAS,cAAc,OAAO,CAAC,EAAE,QAAQ;AAErF,6BAA6B,YAAoB,MAAc;AACpE,MAAI,kBAAkB;AAAa,WAAO;AAC1C,oBAAkB,cAAc;AAChC,MAAI,WAAW,WAAW,YAAY,GAAG;AACvC,WAAO,aAAa,YAAY,IAAI;AAAA,EACtC;AACA,SAAO;AACT;AAEO,yBAAyB,YAAoB,MAAc;AAChE,MAAI,aAAa;AAAa;AAC9B,sBAAoB,YAAY,IAAI;AACpC,eAAa,cAAc,QAAQ,IAAI,aAAa,gBAAgB,OAAO;AAC3E,iCAAO,WAAW,MAAM,MAAM,SAAS;AACzC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/wrapThemeManagerContext.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\n\nimport { ThemeManager, ThemeManagerContext } from '../ThemeManager'\n\nexport function wrapThemeManagerContext(children: any, themeManager?: ThemeManager | null) {\n return themeManager ? (\n <ThemeManagerContext.Provider value={themeManager}>{children}</ThemeManagerContext.Provider>\n ) : (\n children\n )\n}\n"],
|
|
4
|
+
"sourcesContent": ["import React, { useEffect } from 'react'\n\nimport { ThemeManager, ThemeManagerContext } from '../ThemeManager'\n\nexport function wrapThemeManagerContext(children: any, themeManager?: ThemeManager | null) {\n return themeManager ? (\n <ThemeManagerContext.Provider value={themeManager}>{children}</ThemeManagerContext.Provider>\n ) : (\n children\n )\n}\n"],
|
|
5
5
|
"mappings": "AAAA;AAEA;AAEO,iCAAiC,UAAe,cAAoC;AACzF,SAAO,eACL,oCAAC,oBAAoB,UAApB;AAAA,IAA6B,OAAO;AAAA,KAAe,QAAS,IAE7D;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import React from "react";
|
|
32
|
+
import React, { startTransition } from "react";
|
|
33
33
|
import { useIsomorphicLayoutEffect } from "../constants/platform";
|
|
34
34
|
import { getSubStyle } from "../helpers/getSplitStyles";
|
|
35
35
|
import { addMediaQueryListener, mediaState, removeMediaQueryListener } from "./useMedia";
|
|
@@ -108,8 +108,10 @@ function loadAnimationFeature() {
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
useIsomorphicLayoutEffect(() => {
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
startTransition(() => {
|
|
112
|
+
setStateShallow({
|
|
113
|
+
animation: res
|
|
114
|
+
});
|
|
113
115
|
});
|
|
114
116
|
}, [res]);
|
|
115
117
|
return null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useFeatures.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { RefObject } from 'react'\nimport { View, ViewStyle } from 'react-native'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { getSubStyle } from '../helpers/getSplitStyles'\nimport {\n PseudoStyles,\n SplitStyleState,\n StaticConfigParsed,\n TamaguiComponentState,\n UseAnimationHook,\n UseAnimationProps,\n} from '../types'\nimport { addMediaQueryListener, mediaState, removeMediaQueryListener } from './useMedia'\n\ntype FeatureDefinition = {\n isEnabled: (props: any) => boolean\n Component: any\n}\n\ntype FeatureUtils = {\n forceUpdate: Function\n state: SplitStyleState\n setStateShallow: (next: Partial<TamaguiComponentState>) => void\n useAnimations?: UseAnimationHook\n pseudos: PseudoStyles\n style: ViewStyle | null | undefined\n staticConfig: StaticConfigParsed\n theme: any\n onDidAnimate?: () => void\n hostRef: RefObject<HTMLElement | View>\n}\n\nconst createDefinition = ({\n Component,\n propNames,\n}: {\n Component: (props: { _utils: FeatureUtils; [key: string]: any }) => void\n propNames: string[]\n}): FeatureDefinition => ({\n isEnabled: (props: any) => propNames.some((name) => !!props[name]),\n Component,\n})\n\nlet featureDefinitions: Record<string, FeatureDefinition> | null = null\n\ntype FeatureKeys = keyof ReturnType<typeof loadFeatures>\n\nexport const useFeatures = (props: any, utils?: FeatureUtils) => {\n if (!featureDefinitions) {\n featureDefinitions = loadFeatures()\n }\n const elements: JSX.Element[] = []\n const enabled: { [key in FeatureKeys]?: boolean } = {}\n for (const name in featureDefinitions) {\n const { isEnabled, Component } = featureDefinitions[name]\n if (isEnabled(props) && Component) {\n enabled[name] = true\n elements.push(<Component key={name} {...props} _utils={utils} />)\n }\n }\n return {\n elements,\n enabled,\n }\n}\n\nfunction loadFeatures() {\n return {\n // loads animations and sets state with the results\n animation: loadAnimationFeature(),\n\n // will update the parent whenever media query changes\n // no need on web, media queries are inserted and run in css\n mediaQuery: loadMediaQueryFeature(),\n } as const\n}\n\nfunction loadAnimationFeature() {\n return createDefinition({\n Component: ({ _utils, ...props }) => {\n const {\n state,\n useAnimations,\n pseudos,\n style: inStyle,\n setStateShallow,\n staticConfig,\n theme,\n onDidAnimate,\n } = _utils\n\n if (!useAnimations) {\n console.error('no useAnimations hook provided')\n return null\n }\n\n // we always have .animation set\n const propsWithAnimation = props as UseAnimationProps\n\n const res = useAnimations(propsWithAnimation, {\n state,\n pseudos,\n onDidAnimate,\n staticConfig,\n getStyle({ isExiting, isEntering, exitVariant, enterVariant } = {}) {\n // we have to merge such that transforms keys all exist\n const style = inStyle || {}\n\n const enterStyle = isEntering\n ? enterVariant && staticConfig.variants?.[enterVariant]['true']\n ? getSubStyle(\n staticConfig.variants?.[enterVariant]['true'],\n staticConfig,\n theme,\n props,\n state\n ) || pseudos.enterStyle\n : null || pseudos.enterStyle\n : null\n\n const exitStyle = isExiting\n ? exitVariant && staticConfig.variants?.[exitVariant]['true']\n ? getSubStyle(\n staticConfig.variants?.[exitVariant]['true'],\n staticConfig,\n theme,\n props,\n state\n ) || pseudos.exitStyle\n : null || pseudos.exitStyle\n : null\n\n // if you have hoverStyle={{ scale: 1.1 }} and don't have scale set on the base style\n // no animation will run! this is really confusing. this will look at all variants,\n // and fill in base styles if they don't exist. eg:\n // input:\n // base: {}\n // hoverStyle: { scale: 2 }\n // enterStyle: { x: 100 }\n // output:\n // base: { x: 0, scale: 1 }\n ensureBaseHasDefaults(\n style,\n enterStyle,\n pseudos.hoverStyle,\n pseudos.focusStyle,\n pseudos.pressStyle,\n pseudos.pressStyle\n )\n\n enterStyle && merge(style, enterStyle)\n state.hover && pseudos.hoverStyle && merge(style, pseudos.hoverStyle)\n state.focus && pseudos.focusStyle && merge(style, pseudos.focusStyle)\n state.press && pseudos.pressStyle && merge(style, pseudos.pressStyle)\n exitStyle && merge(style, exitStyle)\n\n return style\n },\n //, delay\n })\n\n useIsomorphicLayoutEffect(() => {\n setStateShallow({\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA;AACA;AASA;AAoBA,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA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AwB,cAAc,WACpD,YACE,oBAAa,aAAb,oBAAwB,cAAc,SACtC,cACA,OACA,OACA,KACF,KAAK,QAAQ,aACL,QAAQ,aAClB;AAEJ,gBAAM,YAAY,YACd,eAAe,oBAAa,aAAb,mBAAwB,aAAa,WAClD,YACE,mBAAa,aAAb,mBAAwB,aAAa,SACrC,cACA,OACA,OACA,KACF,KAAK,QAAQ,YACL,QAAQ,YAClB;AAWJ,gCACE,OACA,YACA,QAAQ,YACR,QAAQ,YACR,QAAQ,YACR,QAAQ,UACV;AAEA,wBAAc,MAAM,OAAO,UAAU;AACrC,gBAAM,SAAS,QAAQ,cAAc,MAAM,OAAO,QAAQ,UAAU;AACpE,gBAAM,SAAS,QAAQ,cAAc,MAAM,OAAO,QAAQ,UAAU;AACpE,gBAAM,SAAS,QAAQ,cAAc,MAAM,OAAO,QAAQ,UAAU;AACpE,uBAAa,MAAM,OAAO,SAAS;AAEnC,iBAAO;AAAA,QACT;AAAA,MAEF,CAAC;AAED,gCAA0B,MAAM;AAC9B,wBAAgB;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { RefObject, startTransition } from 'react'\nimport { View, ViewStyle } from 'react-native'\n\nimport { useIsomorphicLayoutEffect } from '../constants/platform'\nimport { getSubStyle } from '../helpers/getSplitStyles'\nimport {\n PseudoStyles,\n SplitStyleState,\n StaticConfigParsed,\n TamaguiComponentState,\n UseAnimationHook,\n UseAnimationProps,\n} from '../types'\nimport { addMediaQueryListener, mediaState, removeMediaQueryListener } from './useMedia'\n\ntype FeatureDefinition = {\n isEnabled: (props: any) => boolean\n Component: any\n}\n\ntype FeatureUtils = {\n forceUpdate: Function\n state: SplitStyleState\n setStateShallow: (next: Partial<TamaguiComponentState>) => void\n useAnimations?: UseAnimationHook\n pseudos: PseudoStyles\n style: ViewStyle | null | undefined\n staticConfig: StaticConfigParsed\n theme: any\n onDidAnimate?: () => void\n hostRef: RefObject<HTMLElement | View>\n}\n\nconst createDefinition = ({\n Component,\n propNames,\n}: {\n Component: (props: { _utils: FeatureUtils; [key: string]: any }) => void\n propNames: string[]\n}): FeatureDefinition => ({\n isEnabled: (props: any) => propNames.some((name) => !!props[name]),\n Component,\n})\n\nlet featureDefinitions: Record<string, FeatureDefinition> | null = null\n\ntype FeatureKeys = keyof ReturnType<typeof loadFeatures>\n\nexport const useFeatures = (props: any, utils?: FeatureUtils) => {\n if (!featureDefinitions) {\n featureDefinitions = loadFeatures()\n }\n const elements: JSX.Element[] = []\n const enabled: { [key in FeatureKeys]?: boolean } = {}\n for (const name in featureDefinitions) {\n const { isEnabled, Component } = featureDefinitions[name]\n if (isEnabled(props) && Component) {\n enabled[name] = true\n elements.push(<Component key={name} {...props} _utils={utils} />)\n }\n }\n return {\n elements,\n enabled,\n }\n}\n\nfunction loadFeatures() {\n return {\n // loads animations and sets state with the results\n animation: loadAnimationFeature(),\n\n // will update the parent whenever media query changes\n // no need on web, media queries are inserted and run in css\n mediaQuery: loadMediaQueryFeature(),\n } as const\n}\n\nfunction loadAnimationFeature() {\n return createDefinition({\n Component: ({ _utils, ...props }) => {\n const {\n state,\n useAnimations,\n pseudos,\n style: inStyle,\n setStateShallow,\n staticConfig,\n theme,\n onDidAnimate,\n } = _utils\n\n if (!useAnimations) {\n console.error('no useAnimations hook provided')\n return null\n }\n\n // we always have .animation set\n const propsWithAnimation = props as UseAnimationProps\n\n const res = useAnimations(propsWithAnimation, {\n state,\n pseudos,\n onDidAnimate,\n staticConfig,\n getStyle({ isExiting, isEntering, exitVariant, enterVariant } = {}) {\n // we have to merge such that transforms keys all exist\n const style = inStyle || {}\n\n const enterStyle = isEntering\n ? enterVariant && staticConfig.variants?.[enterVariant]['true']\n ? getSubStyle(\n staticConfig.variants?.[enterVariant]['true'],\n staticConfig,\n theme,\n props,\n state\n ) || pseudos.enterStyle\n : null || pseudos.enterStyle\n : null\n\n const exitStyle = isExiting\n ? exitVariant && staticConfig.variants?.[exitVariant]['true']\n ? getSubStyle(\n staticConfig.variants?.[exitVariant]['true'],\n staticConfig,\n theme,\n props,\n state\n ) || pseudos.exitStyle\n : null || pseudos.exitStyle\n : null\n\n // if you have hoverStyle={{ scale: 1.1 }} and don't have scale set on the base style\n // no animation will run! this is really confusing. this will look at all variants,\n // and fill in base styles if they don't exist. eg:\n // input:\n // base: {}\n // hoverStyle: { scale: 2 }\n // enterStyle: { x: 100 }\n // output:\n // base: { x: 0, scale: 1 }\n ensureBaseHasDefaults(\n style,\n enterStyle,\n pseudos.hoverStyle,\n pseudos.focusStyle,\n pseudos.pressStyle,\n pseudos.pressStyle\n )\n\n enterStyle && merge(style, enterStyle)\n state.hover && pseudos.hoverStyle && merge(style, pseudos.hoverStyle)\n state.focus && pseudos.focusStyle && merge(style, pseudos.focusStyle)\n state.press && pseudos.pressStyle && merge(style, pseudos.pressStyle)\n exitStyle && merge(style, exitStyle)\n\n return style\n },\n //, delay\n })\n\n useIsomorphicLayoutEffect(() => {\n startTransition(() => {\n setStateShallow({\n animation: res,\n })\n })\n }, [res])\n\n return null\n },\n propNames: ['animation'],\n })\n}\n\nconst defaults = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n opacity: 1,\n translateX: 0,\n translateY: 0,\n skew: 0,\n skewX: 0,\n skewY: 0,\n scale: 1,\n rotate: '0deg',\n rotateY: '0deg',\n rotateX: '0deg',\n}\n\nfunction ensureBaseHasDefaults(base: ViewStyle, ...pseudos: (ViewStyle | null | undefined)[]) {\n for (const pseudo of pseudos) {\n if (!pseudo) continue\n for (const key in pseudo) {\n const val = pseudo[key]\n if (key === 'transform') {\n for (const t of val) {\n const tkey = Object.keys(t)[0]\n const defaultVal = defaults[tkey]\n const tDefaultVal = { [tkey]: defaultVal } as any\n if (!base.transform) {\n base.transform = [tDefaultVal]\n } else {\n if (!base.transform.find((x) => x[tkey])) {\n base.transform.push(tDefaultVal)\n }\n }\n }\n } else {\n if (!(key in base)) {\n base[key] = defaults[key]\n }\n }\n }\n }\n}\n\nfunction merge(base: ViewStyle, next: ViewStyle) {\n if (!next.transform || !base.transform) {\n Object.assign(base, next)\n return\n }\n const { transform, ...rest } = next\n Object.assign(base, rest)\n for (const t of transform) {\n const key = Object.keys(t)[0]\n const existing = base.transform.find((x) => key in x)\n if (existing) {\n existing[key] = t[key]\n } else {\n base.transform.push(t)\n }\n }\n}\n\nfunction loadMediaQueryFeature() {\n const mediaPropNames = Object.keys(mediaState)\n\n return createDefinition({\n Component: (props: any) => {\n const mediaKeys = mediaPropNames.filter((x) => x in props)\n\n useIsomorphicLayoutEffect(() => {\n for (const key of mediaKeys) {\n addMediaQueryListener(key, props._utils.forceUpdate)\n }\n return () => {\n for (const key of mediaKeys) {\n removeMediaQueryListener(key, props._utils.forceUpdate)\n }\n }\n }, [mediaKeys.join(',')])\n\n return null\n },\n propNames: mediaPropNames,\n })\n}\n\n// TODO\n// measureLayout: createDefinition({\n// Component: (props) => {\n// console.log('measure', props)\n// return null\n// },\n// propNames: ['onLayout'],\n// }),\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA;AACA;AASA;AAoBA,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,MAIwB;AAAA,EACxB,WAAW,CAAC,UAAe,UAAU,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK;AAAA,EACjE;AACF;AAEA,IAAI,qBAA+D;AAI5D,MAAM,cAAc,CAAC,OAAY,UAAyB;AAC/D,MAAI,CAAC,oBAAoB;AACvB,yBAAqB,aAAa;AAAA,EACpC;AACA,QAAM,WAA0B,CAAC;AACjC,QAAM,UAA8C,CAAC;AACrD,aAAW,QAAQ,oBAAoB;AACrC,UAAM,EAAE,WAAW,cAAc,mBAAmB;AACpD,QAAI,UAAU,KAAK,KAAK,WAAW;AACjC,cAAQ,QAAQ;AAChB,eAAS,KAAK,oCAAC;AAAA,QAAU,KAAK;AAAA,SAAU,QAAzB;AAAA,QAAgC,QAAQ;AAAA,QAAO,CAAE;AAAA,IAClE;AAA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I,CAAC,KAAK,aAAa,CAAC,KAAK,WAAW;AACtC,WAAO,OAAO,MAAM,IAAI;AACxB;AAAA,EACF;AACA,QAA+B,WAAvB,gBAAuB,IAAT,iBAAS,IAAT,CAAd;AACR,SAAO,OAAO,MAAM,IAAI;AACxB,aAAW,KAAK,WAAW;AACzB,UAAM,MAAM,OAAO,KAAK,CAAC,EAAE;AAC3B,UAAM,WAAW,KAAK,UAAU,KAAK,CAAC,MAAM,OAAO,CAAC;AACpD,QAAI,UAAU;AACZ,eAAS,OAAO,EAAE;AAAA,IACpB,OAAO;AACL,WAAK,UAAU,KAAK,CAAC;AAAA,IACvB;AAAA,EACF;AACF;AAEA,iCAAiC;AAC/B,QAAM,iBAAiB,OAAO,KAAK,UAAU;AAE7C,SAAO,iBAAiB;AAAA,IACtB,WAAW,CAAC,UAAe;AACzB,YAAM,YAAY,eAAe,OAAO,CAAC,MAAM,KAAK,KAAK;AAEzD,gCAA0B,MAAM;AAC9B,mBAAW,OAAO,WAAW;AAC3B,gCAAsB,KAAK,MAAM,OAAO,WAAW;AAAA,QACrD;AACA,eAAO,MAAM;AACX,qBAAW,OAAO,WAAW;AAC3B,qCAAyB,KAAK,MAAM,OAAO,WAAW;AAAA,UACxD;AAAA,QACF;AAAA,MACF,GAAG,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC;AAExB,aAAO;AAAA,IACT;AAAA,IACA,WAAW;AAAA,EACb,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/hooks/useId.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/useId.tsx"],
|
|
4
|
-
"sourcesContent": ["/*\n * Welcome to @reach/auto-id!\n\n * Let's see if we can make sense of why this hook exists and its\n * implementation.\n *\n * Some background:\n * 1. Accessibility APIs rely heavily on element IDs\n * 2. Requiring developers to put IDs on every element in Reach UI is both\n * cumbersome and error-prone\n * 3. With a component model, we can generate IDs for them!\n *\n * Solution 1: Generate random IDs.\n *\n * This works great as long as you don't server render your app. When React (in\n * the client) tries to reuse the markup from the server, the IDs won't match\n * and React will then recreate the entire DOM tree.\n *\n * Solution 2: Increment an integer\n *\n * This sounds great. Since we're rendering the exact same tree on the server\n * and client, we can increment a counter and get a deterministic result between\n * client and server. Also, JS integers can go up to nine-quadrillion. I'm\n * pretty sure the tab will be closed before an app never needs\n * 10 quadrillion IDs!\n *\n * Problem solved, right?\n *\n * Ah, but there's a catch! React's concurrent rendering makes this approach\n * non-deterministic. While the client and server will end up with the same\n * elements in the end, depending on suspense boundaries (and possibly some user\n * input during the initial render) the incrementing integers won't always match\n * up.\n *\n * Solution 3: Don't use IDs at all on the server; patch after first render.\n *\n * What we've done here is solution 2 with some tricks. With this approach, the\n * ID returned is an empty string on the first render. This way the server and\n * client have the same markup no matter how wild the concurrent rendering may\n * have gotten.\n *\n * After the render, we patch up the components with an incremented ID. This\n * causes a double render on any components with `useId`. Shouldn't be a problem\n * since the components using this hook should be small, and we're only updating\n * the ID attribute on the DOM, nothing big is happening.\n *\n * It doesn't have to be an incremented number, though--we could do generate\n * random strings instead, but incrementing a number is probably the cheapest\n * thing we can do.\n *\n * Additionally, we only do this patchup on the very first client render ever.\n * Any calls to `useId` that happen dynamically in the client will be\n * populated immediately with a value. So, we only get the double render after\n * server hydration and never again, SO BACK OFF ALRIGHT?\n */\n\nimport * as React from 'react'\n\nimport { isWeb, useIsomorphicLayoutEffect } from '../constants/platform'\n\nlet serverHandoffComplete = false\nlet id = 0\nfunction genId() {\n return ++id\n}\n\n/* eslint-disable react-hooks/rules-of-hooks */\n\n/**\n * useId\n *\n * Autogenerate IDs to facilitate WAI-ARIA and server rendering.\n *\n * Note: The returned ID will initially be `null` and will update after a\n * component mounts. Users may need to supply their own ID if they need\n * consistent values for SSR.\n *\n * @see Docs https://reach.tech/auto-id\n */\nfunction useId(idFromProps: string): string\nfunction useId(idFromProps: number): number\nfunction useId(idFromProps: string | number): string | number\nfunction useId(idFromProps: string | undefined | null): string | undefined\nfunction useId(idFromProps: number | undefined | null): number | undefined\nfunction useId(idFromProps: string | number | undefined | null): string | number | undefined\nfunction useId(): string | undefined\n\nfunction useId(providedId?: number | string | undefined | null) {\n // TODO: Remove error flag when updating internal deps to React 18. None of\n // our tricks will play well with concurrent rendering anyway.\n\n // native doesn't support until next react-native version, need to remove eventually\n if (isWeb) {\n
|
|
5
|
-
"mappings": "AAwDA;AAEA;AAEA,IAAI,wBAAwB;AAC5B,IAAI,KAAK;AACT,iBAAiB;AACf,SAAO,EAAE;AACX;AAuBA,eAAe,YAAiD;AAK9D,MAAI,OAAO;
|
|
4
|
+
"sourcesContent": ["/*\n * Welcome to @reach/auto-id!\n\n * Let's see if we can make sense of why this hook exists and its\n * implementation.\n *\n * Some background:\n * 1. Accessibility APIs rely heavily on element IDs\n * 2. Requiring developers to put IDs on every element in Reach UI is both\n * cumbersome and error-prone\n * 3. With a component model, we can generate IDs for them!\n *\n * Solution 1: Generate random IDs.\n *\n * This works great as long as you don't server render your app. When React (in\n * the client) tries to reuse the markup from the server, the IDs won't match\n * and React will then recreate the entire DOM tree.\n *\n * Solution 2: Increment an integer\n *\n * This sounds great. Since we're rendering the exact same tree on the server\n * and client, we can increment a counter and get a deterministic result between\n * client and server. Also, JS integers can go up to nine-quadrillion. I'm\n * pretty sure the tab will be closed before an app never needs\n * 10 quadrillion IDs!\n *\n * Problem solved, right?\n *\n * Ah, but there's a catch! React's concurrent rendering makes this approach\n * non-deterministic. While the client and server will end up with the same\n * elements in the end, depending on suspense boundaries (and possibly some user\n * input during the initial render) the incrementing integers won't always match\n * up.\n *\n * Solution 3: Don't use IDs at all on the server; patch after first render.\n *\n * What we've done here is solution 2 with some tricks. With this approach, the\n * ID returned is an empty string on the first render. This way the server and\n * client have the same markup no matter how wild the concurrent rendering may\n * have gotten.\n *\n * After the render, we patch up the components with an incremented ID. This\n * causes a double render on any components with `useId`. Shouldn't be a problem\n * since the components using this hook should be small, and we're only updating\n * the ID attribute on the DOM, nothing big is happening.\n *\n * It doesn't have to be an incremented number, though--we could do generate\n * random strings instead, but incrementing a number is probably the cheapest\n * thing we can do.\n *\n * Additionally, we only do this patchup on the very first client render ever.\n * Any calls to `useId` that happen dynamically in the client will be\n * populated immediately with a value. So, we only get the double render after\n * server hydration and never again, SO BACK OFF ALRIGHT?\n */\n\nimport * as React from 'react'\n\nimport { isWeb, useIsomorphicLayoutEffect } from '../constants/platform'\n\nlet serverHandoffComplete = false\nlet id = 0\nfunction genId() {\n return ++id\n}\n\n/* eslint-disable react-hooks/rules-of-hooks */\n\n/**\n * useId\n *\n * Autogenerate IDs to facilitate WAI-ARIA and server rendering.\n *\n * Note: The returned ID will initially be `null` and will update after a\n * component mounts. Users may need to supply their own ID if they need\n * consistent values for SSR.\n *\n * @see Docs https://reach.tech/auto-id\n */\nfunction useId(idFromProps: string): string\nfunction useId(idFromProps: number): number\nfunction useId(idFromProps: string | number): string | number\nfunction useId(idFromProps: string | undefined | null): string | undefined\nfunction useId(idFromProps: number | undefined | null): number | undefined\nfunction useId(idFromProps: string | number | undefined | null): string | number | undefined\nfunction useId(): string | undefined\n\nfunction useId(providedId?: number | string | undefined | null) {\n // TODO: Remove error flag when updating internal deps to React 18. None of\n // our tricks will play well with concurrent rendering anyway.\n\n // native doesn't support until next react-native version, need to remove eventually\n if (isWeb) {\n if (typeof React.useId === 'function') {\n let id = React.useId()\n return providedId != null ? providedId : id\n }\n }\n\n // If this instance isn't part of the initial render, we don't have to do the\n // double render/patch-up dance. We can just generate the ID and return it.\n let initialId = providedId ?? (serverHandoffComplete ? genId() : null)\n let [id, setId] = React.useState(initialId)\n\n useIsomorphicLayoutEffect(() => {\n if (id === null) {\n // Patch the ID after render. We do this in `useLayoutEffect` to avoid any\n // rendering flicker, though it'll make the first render slower (unlikely\n // to matter, but you're welcome to measure your app and let us know if\n // it's a problem).\n setId(genId())\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n React.useEffect(() => {\n if (serverHandoffComplete === false) {\n // Flag all future uses of `useId` to skip the update dance. This is in\n // `useEffect` because it goes after `useLayoutEffect`, ensuring we don't\n // accidentally bail out of the patch-up dance prematurely.\n serverHandoffComplete = true\n }\n }, [])\n\n return providedId ?? id ?? undefined\n}\n\nexport { useId }\n"],
|
|
5
|
+
"mappings": "AAwDA;AAEA;AAEA,IAAI,wBAAwB;AAC5B,IAAI,KAAK;AACT,iBAAiB;AACf,SAAO,EAAE;AACX;AAuBA,eAAe,YAAiD;AAK9D,MAAI,OAAO;AACT,QAAI,OAAO,MAAM,UAAU,YAAY;AACrC,UAAI,MAAK,MAAM,MAAM;AACrB,aAAO,cAAc,OAAO,aAAa;AAAA,IAC3C;AAAA,EACF;AAIA,MAAI,YAAY,cAAe,yBAAwB,MAAM,IAAI;AACjE,MAAI,CAAC,KAAI,SAAS,MAAM,SAAS,SAAS;AAE1C,4BAA0B,MAAM;AAC9B,QAAI,QAAO,MAAM;AAKf,YAAM,MAAM,CAAC;AAAA,IACf;AAAA,EAEF,GAAG,CAAC,CAAC;AAEL,QAAM,UAAU,MAAM;AACpB,QAAI,0BAA0B,OAAO;AAInC,8BAAwB;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO,cAAc,OAAM;AAC7B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Theme.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { memo, useMemo } from 'react'\n\nimport { isWeb } from '../constants/platform'\nimport { wrapThemeManagerContext } from '../helpers/wrapThemeManagerContext'\nimport { useChangeThemeEffect } from '../hooks/useTheme'\nimport { ThemeProps } from '../hooks/useTheme'\n\n// bugfix esbuild strips react jsx: 'preserve'\nReact['createElement']\n\nexport const Theme = memo(function Theme(props: ThemeProps) {\n const { name, theme, themeManager, themes, className } = useChangeThemeEffect(\n props.name,\n props.componentName,\n props\n )\n\n const missingTheme = !themes || !name || !theme\n\n // memo here, changing theme without re-rendering all children is a critical optimization\n // may require some effort of end user to memoize but without this memo they'd have no option\n const contents = useMemo(\n () => (missingTheme ? null : wrapThemeManagerContext(props.children, themeManager)),\n [props.children, themeManager]\n )\n\n if (missingTheme) {\n if (name && !theme && process.env.NODE_ENV === 'development') {\n console.warn(`No theme found by name ${name}`)\n }\n return props.children\n }\n\n if (isWeb) {\n return (\n <span\n className={(!props.disableThemeClass\n ? [props.className, className].filter(Boolean)\n : []\n ).join(' ')}\n style={{\n display: 'contents',\n // in order to provide currentColor, set color by default\n color: themes[name]?.color?.toString(),\n }}\n >\n {contents}\n </span>\n )\n }\n\n return contents\n})\n"],
|
|
4
|
+
"sourcesContent": ["import React, { memo, useEffect, useMemo, useRef } from 'react'\n\nimport { isWeb } from '../constants/platform'\nimport { wrapThemeManagerContext } from '../helpers/wrapThemeManagerContext'\nimport { useChangeThemeEffect } from '../hooks/useTheme'\nimport { ThemeProps } from '../hooks/useTheme'\n\n// bugfix esbuild strips react jsx: 'preserve'\nReact['createElement']\n\nexport const Theme = memo(function Theme(props: ThemeProps) {\n const { name, theme, themeManager, themes, className } = useChangeThemeEffect(\n props.name,\n props.componentName,\n props\n )\n\n const missingTheme = !themes || !name || !theme\n\n // memo here, changing theme without re-rendering all children is a critical optimization\n // may require some effort of end user to memoize but without this memo they'd have no option\n const contents = useMemo(\n () => (missingTheme ? null : wrapThemeManagerContext(props.children, themeManager)),\n [props.children, themeManager]\n )\n\n if (missingTheme) {\n if (name && !theme && process.env.NODE_ENV === 'development') {\n console.warn(`No theme found by name ${name}`)\n }\n return props.children\n }\n\n if (isWeb) {\n return (\n <span\n className={(!props.disableThemeClass\n ? [props.className, className].filter(Boolean)\n : []\n ).join(' ')}\n style={{\n display: 'contents',\n // in order to provide currentColor, set color by default\n color: themes[name]?.color?.toString(),\n }}\n >\n {contents}\n </span>\n )\n }\n\n return contents\n})\n"],
|
|
5
5
|
"mappings": "AAAA;AAEA;AACA;AACA;AAIA,MAAM;AAEC,MAAM,QAAQ,KAAK,gBAAe,OAAmB;AAV5D;AAWE,QAAM,EAAE,MAAM,OAAO,cAAc,QAAQ,cAAc,qBACvD,MAAM,MACN,MAAM,eACN,KACF;AAEA,QAAM,eAAe,CAAC,UAAU,CAAC,QAAQ,CAAC;AAI1C,QAAM,WAAW,QACf,MAAO,eAAe,OAAO,wBAAwB,MAAM,UAAU,YAAY,GACjF,CAAC,MAAM,UAAU,YAAY,CAC/B;AAEA,MAAI,cAAc;AAChB,QAAI,QAAQ,CAAC,SAAS,QAAQ,IAAI,aAAa,eAAe;AAC5D,cAAQ,KAAK,0BAA0B,MAAM;AAAA,IAC/C;AACA,WAAO,MAAM;AAAA,EACf;AAEA,MAAI,OAAO;AACT,WACE,oCAAC;AAAA,MACC,WAAY,EAAC,MAAM,oBACf,CAAC,MAAM,WAAW,SAAS,EAAE,OAAO,OAAO,IAC3C,CAAC,GACH,KAAK,GAAG;AAAA,MACV,OAAO;AAAA,QACL,SAAS;AAAA,QAET,OAAO,mBAAO,UAAP,mBAAc,UAAd,mBAAqB;AAAA,MAC9B;AAAA,OAEC,QACH;AAAA,EAEJ;AAEA,SAAO;AACT,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.86",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@expo/match-media": "^0.3.0",
|
|
24
|
-
"@tamagui/compose-refs": "^1.0.1-beta.
|
|
25
|
-
"@tamagui/helpers": "^1.0.1-beta.
|
|
24
|
+
"@tamagui/compose-refs": "^1.0.1-beta.86",
|
|
25
|
+
"@tamagui/helpers": "^1.0.1-beta.86",
|
|
26
26
|
"@tamagui/ow": "^0.28.1",
|
|
27
|
-
"@tamagui/use-debounce": "^1.0.1-beta.
|
|
28
|
-
"@tamagui/use-force-update": "^1.0.1-beta.
|
|
27
|
+
"@tamagui/use-debounce": "^1.0.1-beta.86",
|
|
28
|
+
"@tamagui/use-force-update": "^1.0.1-beta.86",
|
|
29
29
|
"expo-screen-orientation": "^4.2.0",
|
|
30
30
|
"hyphenate-style-name": "^1.0.4",
|
|
31
31
|
"normalize-css-color": "^1.0.2",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"react-native-web": "*"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@tamagui/build": "^1.0.1-beta.
|
|
40
|
-
"@types/react": "^
|
|
39
|
+
"@tamagui/build": "^1.0.1-beta.86",
|
|
40
|
+
"@types/react": "^18.0.14",
|
|
41
41
|
"csstype": "^3.0.10",
|
|
42
42
|
"esbuild": "^0.14.36",
|
|
43
43
|
"react-native-web": "^0.17.5",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAYN,MAAM,OAAO,CAAA;AAqBd,OAAO,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAGhB,cAAc,EAGf,MAAM,SAAS,CAAA;AAgBhB,eAAO,MAAM,QAAQ,eAAsB,CAAA;AA0B3C,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,MAAM,GAAG,EAAE,EACtC,GAAG,GAAG,cAAc,EACpB,SAAS,GAAG,KAAK,EACjB,QAA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EAAE,WAAW,EAAuB,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"getStylesAtomic.d.ts","sourceRoot":"","sources":["../../src/helpers/getStylesAtomic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAuB,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAMxC,OAAO,EAAE,gBAAgB,EAAqB,MAAM,qBAAqB,CAAA;AAIzE,oBAAY,oBAAoB,GAAG,SAAS,GAAG;IAC7C,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,SAAS,CAAA;CACvB,CAAA;AAED,aAAK,kBAAkB,GAAG;IAExB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAID,wBAAgB,eAAe,CAAC,QAAQ,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,kBAAkB,iBAkB3F;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,EAChB,MAAM,CAAC,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,WAAW,EAAE,CA6Bf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertStyleRule.d.ts","sourceRoot":"","sources":["../../src/helpers/insertStyleRule.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB,IAAK,CAAA;AAEpC,eAAO,MAAM,eAAe,UAAqB,CAAA;AACjD,eAAO,MAAM,gBAAgB,iBAAyC,CAAA;AACtE,eAAO,MAAM,gBAAgB,UAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"insertStyleRule.d.ts","sourceRoot":"","sources":["../../src/helpers/insertStyleRule.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB,IAAK,CAAA;AAEpC,eAAO,MAAM,eAAe,UAAqB,CAAA;AACjD,eAAO,MAAM,gBAAgB,iBAAyC,CAAA;AACtE,eAAO,MAAM,gBAAgB,UAA2B,CAAA;AAyCxD,wBAAgB,cAAc,SA8B7B;AA4BD,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,WAOnE;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAK/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatures.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeatures.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"useFeatures.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeatures.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAmB,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAI9C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAEjB,MAAM,UAAU,CAAA;AAQjB,aAAK,YAAY,GAAG;IAClB,WAAW,EAAE,QAAQ,CAAA;IACrB,KAAK,EAAE,eAAe,CAAA;IACtB,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAA;IAC/D,aAAa,CAAC,EAAE,gBAAgB,CAAA;IAChC,OAAO,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAA;IACnC,YAAY,EAAE,kBAAkB,CAAA;IAChC,KAAK,EAAE,GAAG,CAAA;IACV,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CACvC,CAAA;AAiBD,eAAO,MAAM,WAAW,UAAW,GAAG,UAAU,YAAY;;;;;;CAiB3D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useId.d.ts","sourceRoot":"","sources":["../../src/hooks/useId.tsx"],"names":[],"mappings":"AA+EA,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;AAC3C,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;AAC3C,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAC7D,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAA;AAC1E,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAA;AAC1E,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;AAC5F,iBAAS,KAAK,IAAI,MAAM,GAAG,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"useId.d.ts","sourceRoot":"","sources":["../../src/hooks/useId.tsx"],"names":[],"mappings":"AA+EA,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;AAC3C,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;AAC3C,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAC7D,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAA;AAC1E,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAA;AAC1E,iBAAS,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;AAC5F,iBAAS,KAAK,IAAI,MAAM,GAAG,SAAS,CAAA;AA0CpC,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../src/views/Theme.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../src/views/Theme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAK/D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAK9C,eAAO,MAAM,KAAK,wCA0ChB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeInverse.d.ts","sourceRoot":"","sources":["../../src/views/ThemeInverse.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThemeInverse.d.ts","sourceRoot":"","sources":["../../src/views/ThemeInverse.tsx"],"names":[],"mappings":"AAMA,aAAK,YAAY,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAA;AAO7C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,QAEpD;AAED,eAAO,MAAM,YAAY,UAAW;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,gBAWpD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/views/ThemeProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/views/ThemeProvider.tsx"],"names":[],"mappings":"AAUA,oBAAY,kBAAkB,GAAG;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,GAAG,CAAA;IACX,YAAY,EAAE,MAAM,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,aAAa,UAAW,kBAAkB,gBAsCtD,CAAA"}
|