@tamagui/core 1.0.1-beta.56 → 1.0.1-beta.57
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/conf.js +11 -2
- package/dist/cjs/conf.js.map +2 -2
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createTamagui.js +10 -44
- package/dist/cjs/createTamagui.js.map +2 -2
- package/dist/cjs/createVariables.js.map +1 -1
- package/dist/cjs/helpers/registerCSSVariable.js +41 -0
- package/dist/cjs/helpers/registerCSSVariable.js.map +7 -0
- package/dist/cjs/hooks/useFeatures.js.map +2 -2
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/insertFont.js +81 -0
- package/dist/cjs/insertFont.js.map +7 -0
- package/dist/cjs/registerCSSVariable.js +41 -0
- package/dist/cjs/registerCSSVariable.js.map +7 -0
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/conf.js +9 -1
- package/dist/esm/conf.js.map +2 -2
- package/dist/esm/createComponent.js +1 -6
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createTamagui.js +11 -41
- package/dist/esm/createTamagui.js.map +2 -2
- package/dist/esm/createVariables.js.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.js +17 -0
- package/dist/esm/helpers/registerCSSVariable.js.map +7 -0
- package/dist/esm/hooks/useFeatures.js.map +2 -2
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/insertFont.js +57 -0
- package/dist/esm/insertFont.js.map +7 -0
- package/dist/esm/registerCSSVariable.js +17 -0
- package/dist/esm/registerCSSVariable.js.map +7 -0
- package/dist/jsx/conf.js +9 -1
- package/dist/jsx/createComponent.js +1 -6
- package/dist/jsx/createTamagui.js +11 -41
- package/dist/jsx/helpers/registerCSSVariable.js +16 -0
- package/dist/jsx/index.js +1 -0
- package/dist/jsx/insertFont.js +56 -0
- package/dist/jsx/registerCSSVariable.js +16 -0
- package/package.json +5 -5
- package/types/Tamagui.d.ts +1 -3
- package/types/Tamagui.d.ts.map +1 -1
- package/types/conf.d.ts +2 -3
- package/types/conf.d.ts.map +1 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/createVariables.d.ts +1 -1
- package/types/createVariables.d.ts.map +1 -1
- package/types/helpers/getVariantExtras.d.ts +1 -3
- package/types/helpers/getVariantExtras.d.ts.map +1 -1
- package/types/helpers/registerCSSVariable.d.ts +5 -0
- package/types/helpers/registerCSSVariable.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/insertFont.d.ts +6 -0
- package/types/insertFont.d.ts.map +1 -0
- package/types/registerCSSVariable.d.ts +5 -0
- package/types/registerCSSVariable.d.ts.map +1 -0
- package/types/types.d.ts +1 -1
- package/types/types.d.ts.map +1 -1
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './Tamagui'\nexport * from './createComponent'\nexport * from './createShorthands'\nexport * from './createTheme'\nexport * from './createTamagui'\nexport * from './createFont'\nexport * from './createTokens'\nexport * from './createVariable'\nexport * from './createVariables'\nexport * from './styled'\nexport * from './types'\n// for type portability\nexport { RNWTextProps, RNWViewProps } from './types-rnw'\nexport { getHasConfigured, getConfig, getThemes, getTokens, onConfiguredOnce } from './conf'\n\nexport * from './constants/constants'\nexport * from './constants/platform'\nexport * from './constants/rnw'\n\nexport * from './helpers/calc'\nexport * from './helpers/createShallowUpdate'\nexport * from './helpers/getStackSize'\nexport * from './helpers/getVariantExtras'\nexport * from './helpers/getExpandedShorthands'\nexport * from './helpers/getSize'\nexport * from './helpers/getSplitStyles'\nexport * from './helpers/getStylesAtomic'\nexport * from './helpers/getTextSize'\nexport * from './helpers/isObj'\nexport * from './helpers/isTamaguiElement'\nexport * from './helpers/matchMedia'\nexport * from './helpers/themeable'\nexport * from './helpers/withStaticProperties'\n\nexport * from './contexts/ButtonInsideButtonContext'\n\nexport * from './hooks/useConstant'\nexport * from './hooks/useId'\nexport * from './hooks/useIsMounted'\nexport * from './hooks/useIsTouchDevice'\nexport * from './hooks/useMedia'\nexport * from './hooks/usePressable'\nexport * from './hooks/useTheme'\nexport * from './hooks/useUnmountEffect'\n\nexport * from './views/Slot'\nexport * from './views/Stack'\nexport * from './views/Text'\nexport * from './views/TextAncestorContext'\nexport * from './views/Theme'\nexport * from './views/ThemeInverse'\nexport * from './views/ThemeProvider'\nexport * from './views/ThemeReset'\n\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/helpers'\n"],
|
|
5
|
-
"mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;",
|
|
4
|
+
"sourcesContent": ["export * from './Tamagui'\nexport * from './createComponent'\nexport * from './createShorthands'\nexport * from './createTheme'\nexport * from './createTamagui'\nexport * from './createFont'\nexport * from './createTokens'\nexport * from './createVariable'\nexport * from './createVariables'\nexport * from './insertFont'\nexport * from './styled'\nexport * from './types'\n// for type portability\nexport { RNWTextProps, RNWViewProps } from './types-rnw'\nexport { getHasConfigured, getConfig, getThemes, getTokens, onConfiguredOnce } from './conf'\n\nexport * from './constants/constants'\nexport * from './constants/platform'\nexport * from './constants/rnw'\n\nexport * from './helpers/calc'\nexport * from './helpers/createShallowUpdate'\nexport * from './helpers/getStackSize'\nexport * from './helpers/getVariantExtras'\nexport * from './helpers/getExpandedShorthands'\nexport * from './helpers/getSize'\nexport * from './helpers/getSplitStyles'\nexport * from './helpers/getStylesAtomic'\nexport * from './helpers/getTextSize'\nexport * from './helpers/isObj'\nexport * from './helpers/isTamaguiElement'\nexport * from './helpers/matchMedia'\nexport * from './helpers/themeable'\nexport * from './helpers/withStaticProperties'\n\nexport * from './contexts/ButtonInsideButtonContext'\n\nexport * from './hooks/useConstant'\nexport * from './hooks/useId'\nexport * from './hooks/useIsMounted'\nexport * from './hooks/useIsTouchDevice'\nexport * from './hooks/useMedia'\nexport * from './hooks/usePressable'\nexport * from './hooks/useTheme'\nexport * from './hooks/useUnmountEffect'\n\nexport * from './views/Slot'\nexport * from './views/Stack'\nexport * from './views/Text'\nexport * from './views/TextAncestorContext'\nexport * from './views/Theme'\nexport * from './views/ThemeInverse'\nexport * from './views/ThemeProvider'\nexport * from './views/ThemeReset'\n\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/helpers'\n"],
|
|
5
|
+
"mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { setConfigFont } from "./conf";
|
|
4
|
+
import { createFont } from "./createFont";
|
|
5
|
+
import { createVariables } from "./createVariables";
|
|
6
|
+
import { registerCSSVariable } from "./helpers/registerCSSVariable";
|
|
7
|
+
function insertFont(name, fontIn) {
|
|
8
|
+
const font = createFont(fontIn);
|
|
9
|
+
const tokened = createVariables(font, name);
|
|
10
|
+
const parsed = parseFont(tokened);
|
|
11
|
+
registerFontVariables(parsed);
|
|
12
|
+
setConfigFont(name, parsed);
|
|
13
|
+
return parsed;
|
|
14
|
+
}
|
|
15
|
+
__name(insertFont, "insertFont");
|
|
16
|
+
function parseFont(definition) {
|
|
17
|
+
const parsed = {};
|
|
18
|
+
for (const attrKey in definition) {
|
|
19
|
+
const attr = definition[attrKey];
|
|
20
|
+
if (attrKey === "family") {
|
|
21
|
+
parsed[attrKey] = attr;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
parsed[attrKey] = {};
|
|
25
|
+
for (const key in attr) {
|
|
26
|
+
let val = attr[key];
|
|
27
|
+
if (val.val[0] === "$") {
|
|
28
|
+
val = val.val;
|
|
29
|
+
}
|
|
30
|
+
parsed[attrKey][`$${key}`] = val;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return parsed;
|
|
34
|
+
}
|
|
35
|
+
__name(parseFont, "parseFont");
|
|
36
|
+
function registerFontVariables(parsedFont) {
|
|
37
|
+
for (const fkey in parsedFont) {
|
|
38
|
+
if (fkey === "family") {
|
|
39
|
+
registerCSSVariable(parsedFont[fkey]);
|
|
40
|
+
} else {
|
|
41
|
+
for (const fskey in parsedFont[fkey]) {
|
|
42
|
+
const fval = parsedFont[fkey][fskey];
|
|
43
|
+
if (typeof fval === "string") {
|
|
44
|
+
} else {
|
|
45
|
+
registerCSSVariable(parsedFont[fkey][fskey]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
__name(registerFontVariables, "registerFontVariables");
|
|
52
|
+
export {
|
|
53
|
+
insertFont,
|
|
54
|
+
parseFont,
|
|
55
|
+
registerFontVariables
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=insertFont.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/insertFont.ts"],
|
|
4
|
+
"sourcesContent": ["import { setConfigFont } from './conf'\nimport { createFont } from './createFont'\nimport { Variable } from './createVariable'\nimport { DeepVariableObject, createVariables } from './createVariables'\nimport { registerCSSVariable } from './helpers/registerCSSVariable'\nimport { GenericFont } from './types'\n\nexport function insertFont<A extends GenericFont>(name: string, fontIn: A): DeepVariableObject<A> {\n const font = createFont(fontIn)\n const tokened = createVariables(font, name) as GenericFont\n const parsed = parseFont(tokened) as DeepVariableObject<A>\n registerFontVariables(parsed)\n setConfigFont(name, parsed)\n return parsed\n}\n\nexport function parseFont<A extends GenericFont>(definition: A): DeepVariableObject<A> {\n const parsed: any = {}\n for (const attrKey in definition) {\n const attr = definition[attrKey]\n if (attrKey === 'family') {\n parsed[attrKey] = attr\n continue\n }\n parsed[attrKey] = {}\n for (const key in attr) {\n let val = attr[key] as any as Variable\n // is a theme reference\n if (val.val[0] === '$') {\n val = val.val\n }\n parsed[attrKey][`$${key}`] = val\n }\n }\n return parsed\n}\n\nexport function registerFontVariables(parsedFont: any) {\n for (const fkey in parsedFont) {\n if (fkey === 'family') {\n registerCSSVariable(parsedFont[fkey])\n } else {\n for (const fskey in parsedFont[fkey]) {\n const fval = parsedFont[fkey][fskey]\n if (typeof fval === 'string') {\n // no need to add its a theme reference\n // tokenRules.add(`--var()`)\n } else {\n registerCSSVariable(parsedFont[fkey][fskey])\n }\n }\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;AAAA;AACA;AAEA;AACA;AAGO,oBAA2C,MAAc,QAAkC;AAChG,QAAM,OAAO,WAAW,MAAM;AAC9B,QAAM,UAAU,gBAAgB,MAAM,IAAI;AAC1C,QAAM,SAAS,UAAU,OAAO;AAChC,wBAAsB,MAAM;AAC5B,gBAAc,MAAM,MAAM;AAC1B,SAAO;AACT;AAPgB;AAST,mBAA0C,YAAsC;AACrF,QAAM,SAAc,CAAC;AACrB,aAAW,WAAW,YAAY;AAChC,UAAM,OAAO,WAAW;AACxB,QAAI,YAAY,UAAU;AACxB,aAAO,WAAW;AAClB;AAAA,IACF;AACA,WAAO,WAAW,CAAC;AACnB,eAAW,OAAO,MAAM;AACtB,UAAI,MAAM,KAAK;AAEf,UAAI,IAAI,IAAI,OAAO,KAAK;AACtB,cAAM,IAAI;AAAA,MACZ;AACA,aAAO,SAAS,IAAI,SAAS;AAAA,IAC/B;AAAA,EACF;AACA,SAAO;AACT;AAnBgB;AAqBT,+BAA+B,YAAiB;AACrD,aAAW,QAAQ,YAAY;AAC7B,QAAI,SAAS,UAAU;AACrB,0BAAoB,WAAW,KAAK;AAAA,IACtC,OAAO;AACL,iBAAW,SAAS,WAAW,OAAO;AACpC,cAAM,OAAO,WAAW,MAAM;AAC9B,YAAI,OAAO,SAAS,UAAU;AAAA,QAG9B,OAAO;AACL,8BAAoB,WAAW,MAAM,MAAM;AAAA,QAC7C;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAhBgB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { createCSSVariable } from "./createVariable";
|
|
4
|
+
const registerCSSVariable = /* @__PURE__ */ __name((v) => {
|
|
5
|
+
tokensValueToVariable.set(v.val, v);
|
|
6
|
+
const val = `--${createCSSVariable(v.name, false)}:${typeof v.val === "number" ? `${v.val}px` : v.val}`;
|
|
7
|
+
tokenRules.add(val);
|
|
8
|
+
return val;
|
|
9
|
+
}, "registerCSSVariable");
|
|
10
|
+
const tokensValueToVariable = /* @__PURE__ */ new Map();
|
|
11
|
+
const tokenRules = /* @__PURE__ */ new Set();
|
|
12
|
+
export {
|
|
13
|
+
registerCSSVariable,
|
|
14
|
+
tokenRules,
|
|
15
|
+
tokensValueToVariable
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=registerCSSVariable.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/registerCSSVariable.ts"],
|
|
4
|
+
"sourcesContent": ["import { Variable, createCSSVariable } from './createVariable'\n\nexport const registerCSSVariable = (v: Variable) => {\n tokensValueToVariable.set(v.val, v)\n const val = `--${createCSSVariable(v.name, false)}:${\n typeof v.val === 'number' ? `${v.val}px` : v.val\n }`\n tokenRules.add(val)\n return val\n}\n\nexport const tokensValueToVariable = new Map<string, Variable>()\nexport const tokenRules = new Set<string>()\n"],
|
|
5
|
+
"mappings": ";;AAAA;AAEO,MAAM,sBAAsB,wBAAC,MAAgB;AAClD,wBAAsB,IAAI,EAAE,KAAK,CAAC;AAClC,QAAM,MAAM,KAAK,kBAAkB,EAAE,MAAM,KAAK,KAC9C,OAAO,EAAE,QAAQ,WAAW,GAAG,EAAE,UAAU,EAAE;AAE/C,aAAW,IAAI,GAAG;AAClB,SAAO;AACT,GAPmC;AAS5B,MAAM,wBAAwB,oBAAI,IAAsB;AACxD,MAAM,aAAa,oBAAI,IAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/jsx/conf.js
CHANGED
|
@@ -8,6 +8,13 @@ const setConfig = /* @__PURE__ */ __name((next) => {
|
|
|
8
8
|
configListeners.clear();
|
|
9
9
|
}
|
|
10
10
|
}, "setConfig");
|
|
11
|
+
const setConfigFont = /* @__PURE__ */ __name((name, font) => {
|
|
12
|
+
if (process.env.NODE_ENV === "development") {
|
|
13
|
+
if (!conf)
|
|
14
|
+
throw new Error(`Haven't called createTamagui yet`);
|
|
15
|
+
}
|
|
16
|
+
Object.assign(conf.fonts, { [name]: font });
|
|
17
|
+
}, "setConfigFont");
|
|
11
18
|
const getHasConfigured = /* @__PURE__ */ __name(() => !!conf, "getHasConfigured");
|
|
12
19
|
const getConfig = /* @__PURE__ */ __name(() => conf, "getConfig");
|
|
13
20
|
const getTokens = /* @__PURE__ */ __name(() => conf.tokensParsed, "getTokens");
|
|
@@ -27,5 +34,6 @@ export {
|
|
|
27
34
|
getThemes,
|
|
28
35
|
getTokens,
|
|
29
36
|
onConfiguredOnce,
|
|
30
|
-
setConfig
|
|
37
|
+
setConfig,
|
|
38
|
+
setConfigFont
|
|
31
39
|
};
|
|
@@ -13,12 +13,7 @@ import React, {
|
|
|
13
13
|
useRef,
|
|
14
14
|
useState
|
|
15
15
|
} from "react";
|
|
16
|
-
import {
|
|
17
|
-
StyleSheet,
|
|
18
|
-
Text,
|
|
19
|
-
TouchableWithoutFeedback,
|
|
20
|
-
View
|
|
21
|
-
} from "react-native";
|
|
16
|
+
import { StyleSheet, Text, TouchableWithoutFeedback, View } from "react-native";
|
|
22
17
|
import { onConfiguredOnce } from "./conf";
|
|
23
18
|
import { stackDefaultStyles } from "./constants/constants";
|
|
24
19
|
import { isWeb, useIsomorphicLayoutEffect } from "./constants/platform";
|
|
@@ -3,11 +3,17 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3
3
|
import { configListeners, getHasConfigured, setConfig } from "./conf";
|
|
4
4
|
import { THEME_CLASSNAME_PREFIX } from "./constants/constants";
|
|
5
5
|
import { isWeb } from "./constants/platform";
|
|
6
|
-
import {
|
|
6
|
+
import { createVariable, isVariable } from "./createVariable";
|
|
7
7
|
import { createVariables } from "./createVariables";
|
|
8
8
|
import { createTamaguiProvider } from "./helpers/createTamaguiProvider";
|
|
9
9
|
import { getInsertedRules } from "./helpers/insertStyleRule";
|
|
10
|
+
import {
|
|
11
|
+
registerCSSVariable,
|
|
12
|
+
tokenRules,
|
|
13
|
+
tokensValueToVariable
|
|
14
|
+
} from "./helpers/registerCSSVariable";
|
|
10
15
|
import { configureMedia } from "./hooks/useMedia";
|
|
16
|
+
import { parseFont, registerFontVariables } from "./insertFont";
|
|
11
17
|
const createdConfigs = /* @__PURE__ */ new WeakMap();
|
|
12
18
|
function createTamagui(config) {
|
|
13
19
|
if (createdConfigs.has(config)) {
|
|
@@ -21,7 +27,7 @@ function createTamagui(config) {
|
|
|
21
27
|
throw new Error(`No themes provided to Tamagui config`);
|
|
22
28
|
}
|
|
23
29
|
if (!config.fonts) {
|
|
24
|
-
throw new Error(`No fonts
|
|
30
|
+
throw new Error(`No fonts provided to Tamagui config`);
|
|
25
31
|
}
|
|
26
32
|
}
|
|
27
33
|
if (getHasConfigured()) {
|
|
@@ -35,24 +41,7 @@ function createTamagui(config) {
|
|
|
35
41
|
const fontsParsed = (() => {
|
|
36
42
|
const res = {};
|
|
37
43
|
for (const familyName in fontTokens) {
|
|
38
|
-
|
|
39
|
-
const parsed = {};
|
|
40
|
-
for (const attrKey in definition) {
|
|
41
|
-
const attr = definition[attrKey];
|
|
42
|
-
if (attrKey === "family") {
|
|
43
|
-
parsed[attrKey] = attr;
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
parsed[attrKey] = {};
|
|
47
|
-
for (const key in attr) {
|
|
48
|
-
let val = attr[key];
|
|
49
|
-
if (val.val[0] === "$") {
|
|
50
|
-
val = val.val;
|
|
51
|
-
}
|
|
52
|
-
parsed[attrKey][`$${key}`] = val;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
res[`$${familyName}`] = parsed;
|
|
44
|
+
res[`$${familyName}`] = parseFont(fontTokens[familyName]);
|
|
56
45
|
}
|
|
57
46
|
return res;
|
|
58
47
|
})();
|
|
@@ -60,35 +49,16 @@ function createTamagui(config) {
|
|
|
60
49
|
var _a, _b;
|
|
61
50
|
const themes = { ...config.themes };
|
|
62
51
|
let cssRules = [];
|
|
63
|
-
const tokensValueToVariable = /* @__PURE__ */ new Map();
|
|
64
52
|
if (isWeb) {
|
|
65
|
-
const tokenRules = /* @__PURE__ */ new Set();
|
|
66
|
-
const addVar = /* @__PURE__ */ __name((v) => {
|
|
67
|
-
tokensValueToVariable.set(v.val, v);
|
|
68
|
-
const rule = `--${createCSSVariable(v.name, false)}:${typeof v.val === "number" ? `${v.val}px` : v.val}`;
|
|
69
|
-
tokenRules.add(rule);
|
|
70
|
-
}, "addVar");
|
|
71
53
|
for (const key in config.tokens) {
|
|
72
54
|
for (const skey in config.tokens[key]) {
|
|
73
55
|
const val = config.tokens[key][skey];
|
|
74
|
-
|
|
56
|
+
registerCSSVariable(val);
|
|
75
57
|
}
|
|
76
58
|
}
|
|
77
59
|
for (const key in fontsParsed) {
|
|
78
60
|
const val = fontsParsed[key];
|
|
79
|
-
|
|
80
|
-
if (fkey === "family") {
|
|
81
|
-
addVar(val[fkey]);
|
|
82
|
-
} else {
|
|
83
|
-
for (const fskey in val[fkey]) {
|
|
84
|
-
const fval = val[fkey][fskey];
|
|
85
|
-
if (typeof fval === "string") {
|
|
86
|
-
} else {
|
|
87
|
-
addVar(val[fkey][fskey]);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
61
|
+
registerFontVariables(val);
|
|
92
62
|
}
|
|
93
63
|
const sep = process.env.NODE_ENV === "development" ? config.cssStyleSeparator || " " : "";
|
|
94
64
|
cssRules.push(`:root {${sep}${[...tokenRules].join(`;${sep}`)}${sep}}`);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { createCSSVariable } from "../createVariable";
|
|
4
|
+
const registerCSSVariable = /* @__PURE__ */ __name((v) => {
|
|
5
|
+
tokensValueToVariable.set(v.val, v);
|
|
6
|
+
const val = `--${createCSSVariable(v.name, false)}:${typeof v.val === "number" ? `${v.val}px` : v.val}`;
|
|
7
|
+
tokenRules.add(val);
|
|
8
|
+
return val;
|
|
9
|
+
}, "registerCSSVariable");
|
|
10
|
+
const tokensValueToVariable = /* @__PURE__ */ new Map();
|
|
11
|
+
const tokenRules = /* @__PURE__ */ new Set();
|
|
12
|
+
export {
|
|
13
|
+
registerCSSVariable,
|
|
14
|
+
tokenRules,
|
|
15
|
+
tokensValueToVariable
|
|
16
|
+
};
|
package/dist/jsx/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./createFont";
|
|
|
7
7
|
export * from "./createTokens";
|
|
8
8
|
export * from "./createVariable";
|
|
9
9
|
export * from "./createVariables";
|
|
10
|
+
export * from "./insertFont";
|
|
10
11
|
export * from "./styled";
|
|
11
12
|
export * from "./types";
|
|
12
13
|
import { RNWTextProps, RNWViewProps } from "./types-rnw";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { setConfigFont } from "./conf";
|
|
4
|
+
import { createFont } from "./createFont";
|
|
5
|
+
import { createVariables } from "./createVariables";
|
|
6
|
+
import { registerCSSVariable } from "./helpers/registerCSSVariable";
|
|
7
|
+
function insertFont(name, fontIn) {
|
|
8
|
+
const font = createFont(fontIn);
|
|
9
|
+
const tokened = createVariables(font, name);
|
|
10
|
+
const parsed = parseFont(tokened);
|
|
11
|
+
registerFontVariables(parsed);
|
|
12
|
+
setConfigFont(name, parsed);
|
|
13
|
+
return parsed;
|
|
14
|
+
}
|
|
15
|
+
__name(insertFont, "insertFont");
|
|
16
|
+
function parseFont(definition) {
|
|
17
|
+
const parsed = {};
|
|
18
|
+
for (const attrKey in definition) {
|
|
19
|
+
const attr = definition[attrKey];
|
|
20
|
+
if (attrKey === "family") {
|
|
21
|
+
parsed[attrKey] = attr;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
parsed[attrKey] = {};
|
|
25
|
+
for (const key in attr) {
|
|
26
|
+
let val = attr[key];
|
|
27
|
+
if (val.val[0] === "$") {
|
|
28
|
+
val = val.val;
|
|
29
|
+
}
|
|
30
|
+
parsed[attrKey][`$${key}`] = val;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return parsed;
|
|
34
|
+
}
|
|
35
|
+
__name(parseFont, "parseFont");
|
|
36
|
+
function registerFontVariables(parsedFont) {
|
|
37
|
+
for (const fkey in parsedFont) {
|
|
38
|
+
if (fkey === "family") {
|
|
39
|
+
registerCSSVariable(parsedFont[fkey]);
|
|
40
|
+
} else {
|
|
41
|
+
for (const fskey in parsedFont[fkey]) {
|
|
42
|
+
const fval = parsedFont[fkey][fskey];
|
|
43
|
+
if (typeof fval === "string") {
|
|
44
|
+
} else {
|
|
45
|
+
registerCSSVariable(parsedFont[fkey][fskey]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
__name(registerFontVariables, "registerFontVariables");
|
|
52
|
+
export {
|
|
53
|
+
insertFont,
|
|
54
|
+
parseFont,
|
|
55
|
+
registerFontVariables
|
|
56
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { createCSSVariable } from "./createVariable";
|
|
4
|
+
const registerCSSVariable = /* @__PURE__ */ __name((v) => {
|
|
5
|
+
tokensValueToVariable.set(v.val, v);
|
|
6
|
+
const val = `--${createCSSVariable(v.name, false)}:${typeof v.val === "number" ? `${v.val}px` : v.val}`;
|
|
7
|
+
tokenRules.add(val);
|
|
8
|
+
return val;
|
|
9
|
+
}, "registerCSSVariable");
|
|
10
|
+
const tokensValueToVariable = /* @__PURE__ */ new Map();
|
|
11
|
+
const tokenRules = /* @__PURE__ */ new Set();
|
|
12
|
+
export {
|
|
13
|
+
registerCSSVariable,
|
|
14
|
+
tokenRules,
|
|
15
|
+
tokensValueToVariable
|
|
16
|
+
};
|
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.57",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@expo/match-media": "^0.3.0",
|
|
24
|
-
"@tamagui/helpers": "^1.0.1-beta.
|
|
24
|
+
"@tamagui/helpers": "^1.0.1-beta.57",
|
|
25
25
|
"@tamagui/ow": "^0.28.1",
|
|
26
|
-
"@tamagui/use-debounce": "^1.0.1-beta.
|
|
27
|
-
"@tamagui/use-force-update": "^1.0.1-beta.
|
|
26
|
+
"@tamagui/use-debounce": "^1.0.1-beta.57",
|
|
27
|
+
"@tamagui/use-force-update": "^1.0.1-beta.57",
|
|
28
28
|
"expo-screen-orientation": "^4.2.0",
|
|
29
29
|
"hyphenate-style-name": "^1.0.4",
|
|
30
30
|
"inline-style-prefixer": "^6.0.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"react-native-web": "*"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@tamagui/build": "^1.0.1-beta.
|
|
39
|
+
"@tamagui/build": "^1.0.1-beta.57",
|
|
40
40
|
"@types/react": "^17.0.35",
|
|
41
41
|
"csstype": "^3.0.10",
|
|
42
42
|
"esbuild": "^0.14.36",
|
package/types/Tamagui.d.ts
CHANGED
|
@@ -14,9 +14,7 @@ declare class TamaguiManager {
|
|
|
14
14
|
[key: string]: string | {
|
|
15
15
|
[key: string]: any;
|
|
16
16
|
};
|
|
17
|
-
},
|
|
18
|
-
[key: string]: import("./types").GenericFont<string | number>;
|
|
19
|
-
}>;
|
|
17
|
+
}, import("./types").GenericFonts>;
|
|
20
18
|
get insertedRules(): unknown[];
|
|
21
19
|
get allSelectors(): {};
|
|
22
20
|
get allTransforms(): {};
|
package/types/Tamagui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tamagui.d.ts","sourceRoot":"","sources":["../src/Tamagui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAQ3C,cAAM,cAAc;IAClB,GAAG,MAAM;IACT,OAAO,iBAAU;IAEjB,IAAI,MAAM
|
|
1
|
+
{"version":3,"file":"Tamagui.d.ts","sourceRoot":"","sources":["../src/Tamagui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAA;AAQ3C,cAAM,cAAc;IAClB,GAAG,MAAM;IACT,OAAO,iBAAU;IAEjB,IAAI,MAAM;;;;;;;;;;;;uCAET;IAED,IAAI,aAAa,cAEhB;IAED,IAAI,YAAY,OAEf;IAED,IAAI,aAAa,OAEhB;IAED,IAAI,iBAAiB,qBAEpB;CACF;AAED,eAAO,MAAM,OAAO,gBAAuB,CAAA;AAI3C,eAAO,MAAM,sBAAsB,eAAgB,MAAM,QAExD,CAAA;AAED,eAAO,MAAM,kBAAkB,eAAgB,MAAM,SAAS,GAAG,SAEhE,CAAA"}
|
package/types/conf.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConfigListener, TamaguiInternalConfig } from './types';
|
|
2
2
|
export declare const setConfig: (next: TamaguiInternalConfig) => void;
|
|
3
|
+
export declare const setConfigFont: (name: string, font: any) => void;
|
|
3
4
|
export declare const getHasConfigured: () => boolean;
|
|
4
5
|
export declare const getConfig: () => TamaguiInternalConfig<import("./types").CreateTokens<import("./types").VariableVal>, {
|
|
5
6
|
[key: string]: Partial<import("./types").TamaguiBaseTheme> & {
|
|
@@ -13,9 +14,7 @@ export declare const getConfig: () => TamaguiInternalConfig<import("./types").Cr
|
|
|
13
14
|
[key: string]: string | {
|
|
14
15
|
[key: string]: any;
|
|
15
16
|
};
|
|
16
|
-
},
|
|
17
|
-
[key: string]: import("./types").GenericFont<string | number>;
|
|
18
|
-
}>;
|
|
17
|
+
}, import("./types").GenericFonts>;
|
|
19
18
|
export declare const getTokens: () => import("./types").CreateTokens<import("./createVariable").Variable<any>>;
|
|
20
19
|
export declare const getThemes: () => {
|
|
21
20
|
[key: string]: Partial<import("./types").TamaguiBaseTheme> & {
|
package/types/conf.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conf.d.ts","sourceRoot":"","sources":["../src/conf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAI/D,eAAO,MAAM,SAAS,SAAU,qBAAqB,SAMpD,CAAA;AAED,eAAO,MAAM,gBAAgB,eAAe,CAAA;AAC5C,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"conf.d.ts","sourceRoot":"","sources":["../src/conf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAI/D,eAAO,MAAM,SAAS,SAAU,qBAAqB,SAMpD,CAAA;AAED,eAAO,MAAM,aAAa,SAAU,MAAM,QAAQ,GAAG,SAKpD,CAAA;AAED,eAAO,MAAM,gBAAgB,eAAe,CAAA;AAC5C,eAAO,MAAM,SAAS;;;;;;;;;;;;kCAAc,CAAA;AACpC,eAAO,MAAM,SAAS,gFAA2B,CAAA;AACjD,eAAO,MAAM,SAAS;;;;CAAqB,CAAA;AAE3C,eAAO,MAAM,eAAe,qBAA4B,CAAA;AAExD,eAAO,MAAM,gBAAgB,OAAQ,cAAc,SAMlD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAUN,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAUN,MAAM,OAAO,CAAA;AAkBd,OAAO,EACL,kBAAkB,EAClB,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,EACt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GACX,kBAAkB,CAAC,IAAI,CAAC,CA4P1B;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { Variable } from './createVariable';
|
|
|
2
2
|
declare type DeepTokenObject<Val extends string | number = any> = {
|
|
3
3
|
[key: string]: Val | DeepTokenObject<Val>;
|
|
4
4
|
};
|
|
5
|
-
declare type DeepVariableObject<A extends DeepTokenObject> = {
|
|
5
|
+
export declare type DeepVariableObject<A extends DeepTokenObject> = {
|
|
6
6
|
[Key in keyof A]: A[Key] extends string | number ? Variable<A[Key]> : A[Key] extends DeepTokenObject ? DeepVariableObject<A[Key]> : never;
|
|
7
7
|
};
|
|
8
8
|
export declare const createVariables: <A extends DeepTokenObject<any>>(tokens: A, parentPath?: string) => DeepVariableObject<A>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createVariables.d.ts","sourceRoot":"","sources":["../src/createVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA8B,MAAM,kBAAkB,CAAA;AAEvE,aAAK,eAAe,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,GAAG,GAAG,IAAI;IACxD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,eAAe,CAAC,GAAG,CAAC,CAAA;CAC1C,CAAA;AAED,
|
|
1
|
+
{"version":3,"file":"createVariables.d.ts","sourceRoot":"","sources":["../src/createVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA8B,MAAM,kBAAkB,CAAA;AAEvE,aAAK,eAAe,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,GAAG,GAAG,IAAI;IACxD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,eAAe,CAAC,GAAG,CAAC,CAAA;CAC1C,CAAA;AAED,oBAAY,kBAAkB,CAAC,CAAC,SAAS,eAAe,IAAI;KACzD,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,GAAG,MAAM,GAC5C,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAChB,CAAC,CAAC,GAAG,CAAC,SAAS,eAAe,GAC9B,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAC1B,KAAK;CACV,CAAA;AAED,eAAO,MAAM,eAAe,2FA+B3B,CAAA"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export declare function getVariantExtras(props: any, theme?: any, defaultProps?: any, avoidDefaultProps?: boolean): {
|
|
2
|
-
fonts:
|
|
3
|
-
[key: string]: import("..").GenericFont<string | number>;
|
|
4
|
-
};
|
|
2
|
+
fonts: import("..").GenericFonts;
|
|
5
3
|
tokens: import("..").CreateTokens<import("..").Variable<any>>;
|
|
6
4
|
theme: any;
|
|
7
5
|
props: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getVariantExtras.d.ts","sourceRoot":"","sources":["../../src/helpers/getVariantExtras.tsx"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,GAAG,EACV,KAAK,CAAC,EAAE,GAAG,EACX,YAAY,CAAC,EAAE,GAAG,EAClB,iBAAiB,UAAQ
|
|
1
|
+
{"version":3,"file":"getVariantExtras.d.ts","sourceRoot":"","sources":["../../src/helpers/getVariantExtras.tsx"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,GAAG,EACV,KAAK,CAAC,EAAE,GAAG,EACX,YAAY,CAAC,EAAE,GAAG,EAClB,iBAAiB,UAAQ;;;;;EAwB1B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Variable } from '../createVariable';
|
|
2
|
+
export declare const registerCSSVariable: (v: Variable) => string;
|
|
3
|
+
export declare const tokensValueToVariable: Map<string, Variable<any>>;
|
|
4
|
+
export declare const tokenRules: Set<string>;
|
|
5
|
+
//# sourceMappingURL=registerCSSVariable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerCSSVariable.d.ts","sourceRoot":"","sources":["../../src/helpers/registerCSSVariable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,mBAAmB,CAAA;AAE/D,eAAO,MAAM,mBAAmB,MAAO,QAAQ,WAO9C,CAAA;AAED,eAAO,MAAM,qBAAqB,4BAA8B,CAAA;AAChE,eAAO,MAAM,UAAU,aAAoB,CAAA"}
|
package/types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './createFont';
|
|
|
7
7
|
export * from './createTokens';
|
|
8
8
|
export * from './createVariable';
|
|
9
9
|
export * from './createVariables';
|
|
10
|
+
export * from './insertFont';
|
|
10
11
|
export * from './styled';
|
|
11
12
|
export * from './types';
|
|
12
13
|
export { RNWTextProps, RNWViewProps } from './types-rnw';
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAE5F,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAE/B,cAAc,gBAAgB,CAA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
export declare function insertFont<A extends GenericFont>(name: string, fontIn: A): DeepVariableObject<A>;
|
|
4
|
+
export declare function parseFont<A extends GenericFont>(definition: A): DeepVariableObject<A>;
|
|
5
|
+
export declare function registerFontVariables(parsedFont: any): void;
|
|
6
|
+
//# sourceMappingURL=insertFont.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insertFont.d.ts","sourceRoot":"","sources":["../src/insertFont.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAmB,MAAM,mBAAmB,CAAA;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,wBAAgB,UAAU,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAOhG;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,WAAW,EAAE,UAAU,EAAE,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAmBrF;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,GAAG,QAgBpD"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Variable } from './createVariable';
|
|
2
|
+
export declare const registerCSSVariable: (v: Variable) => string;
|
|
3
|
+
export declare const tokensValueToVariable: Map<string, Variable<any>>;
|
|
4
|
+
export declare const tokenRules: Set<string>;
|
|
5
|
+
//# sourceMappingURL=registerCSSVariable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerCSSVariable.d.ts","sourceRoot":"","sources":["../src/registerCSSVariable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,kBAAkB,CAAA;AAE9D,eAAO,MAAM,mBAAmB,MAAO,QAAQ,WAO9C,CAAA;AAED,eAAO,MAAM,qBAAqB,4BAA8B,CAAA;AAChE,eAAO,MAAM,UAAU,aAAoB,CAAA"}
|
package/types/types.d.ts
CHANGED