@tamagui/core 1.0.1-beta.73 → 1.0.1-beta.76
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 +25 -20
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createFont.js.map +1 -1
- package/dist/cjs/createTamagui.js +2 -2
- package/dist/cjs/createTamagui.js.map +2 -2
- package/dist/cjs/createVariable.js +9 -1
- package/dist/cjs/createVariable.js.map +2 -2
- package/dist/cjs/helpers/createPropMapper.js +3 -1
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/generateAtomicStyles.js +55 -70
- package/dist/cjs/helpers/generateAtomicStyles.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +15 -10
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.js +4 -2
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/helpers/insertStyleRule.js +12 -10
- package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
- package/dist/cjs/helpers/pseudoDescriptors.js +41 -0
- package/dist/cjs/helpers/pseudoDescriptors.js.map +7 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/insertFont.js +17 -4
- package/dist/cjs/insertFont.js.map +2 -2
- package/dist/cjs/static.js +1 -1
- package/dist/cjs/static.js.map +2 -2
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/ThemeManager.js +6 -22
- package/dist/esm/ThemeManager.js.map +1 -1
- package/dist/esm/constants/constants.js +23 -8
- package/dist/esm/constants/constants.js.map +1 -1
- package/dist/esm/createComponent.js +239 -131
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createFont.js.map +1 -1
- package/dist/esm/createTamagui.js +28 -10
- package/dist/esm/createTamagui.js.map +2 -2
- package/dist/esm/createVariable.js +9 -1
- package/dist/esm/createVariable.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.js +20 -5
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/createShallowUpdate.js +17 -1
- package/dist/esm/helpers/createShallowUpdate.js.map +1 -1
- package/dist/esm/helpers/createTamaguiProvider.js +39 -9
- package/dist/esm/helpers/createTamaguiProvider.js.map +1 -1
- package/dist/esm/helpers/extendStaticConfig.js +28 -27
- package/dist/esm/helpers/extendStaticConfig.js.map +1 -1
- package/dist/esm/helpers/fixNativeShadow.native.js +2 -3
- package/dist/esm/helpers/fixNativeShadow.native.js.map +1 -1
- package/dist/esm/helpers/generateAtomicStyles.js +75 -76
- package/dist/esm/helpers/generateAtomicStyles.js.map +2 -2
- package/dist/esm/helpers/getSize.js +2 -3
- package/dist/esm/helpers/getSize.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.js +47 -30
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getStackSize.js +1 -2
- package/dist/esm/helpers/getStackSize.js.map +1 -1
- package/dist/esm/helpers/getStylesAtomic.js +38 -7
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/helpers/insertStyleRule.js +12 -10
- package/dist/esm/helpers/insertStyleRule.js.map +2 -2
- package/dist/esm/helpers/mergeTransform.js +1 -1
- package/dist/esm/helpers/mergeTransform.js.map +1 -1
- package/dist/esm/helpers/pseudoDescriptors.js +18 -0
- package/dist/esm/helpers/pseudoDescriptors.js.map +7 -0
- package/dist/esm/helpers/themeable.js +33 -2
- package/dist/esm/helpers/themeable.js.map +1 -1
- package/dist/esm/helpers/validate.js +30 -5
- package/dist/esm/helpers/validate.js.map +1 -1
- package/dist/esm/hooks/useFeatures.js +40 -8
- package/dist/esm/hooks/useFeatures.js.map +1 -1
- package/dist/esm/hooks/useId.js +2 -3
- package/dist/esm/hooks/useId.js.map +1 -1
- package/dist/esm/hooks/useMedia.js +18 -6
- package/dist/esm/hooks/useMedia.js.map +1 -1
- package/dist/esm/hooks/usePressable.js +16 -1
- package/dist/esm/hooks/usePressable.js.map +1 -1
- package/dist/esm/hooks/useTheme.js +24 -7
- package/dist/esm/hooks/useTheme.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/insertFont.js +17 -4
- package/dist/esm/insertFont.js.map +2 -2
- package/dist/esm/static.js +1 -1
- package/dist/esm/static.js.map +1 -1
- package/dist/esm/styled.js +38 -9
- package/dist/esm/styled.js.map +1 -1
- package/dist/esm/views/Slot.js +40 -11
- package/dist/esm/views/Slot.js.map +1 -1
- package/dist/esm/views/Stack.js +21 -3
- package/dist/esm/views/Stack.js.map +1 -1
- package/dist/esm/views/Text.js +24 -12
- package/dist/esm/views/Text.js.map +1 -1
- package/dist/esm/views/TextAncestorContext.js +2 -2
- package/dist/esm/views/TextAncestorContext.js.map +1 -1
- package/dist/jsx/createComponent.js +13 -11
- package/dist/jsx/createTamagui.js +2 -2
- package/dist/jsx/insertFont.js +17 -4
- package/package.json +6 -6
- package/reset.css +4 -0
- package/types/createComponent.d.ts +2 -4
- package/types/createComponent.d.ts.map +1 -1
- package/types/createVariable.d.ts.map +1 -1
- package/types/helpers/createTamaguiProvider.d.ts +0 -1
- package/types/helpers/createTamaguiProvider.d.ts.map +1 -1
- package/types/helpers/generateAtomicStyles.d.ts +2 -2
- package/types/helpers/generateAtomicStyles.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getStylesAtomic.d.ts +2 -0
- package/types/helpers/getStylesAtomic.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts +1 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/pseudoDescriptors.d.ts +16 -0
- package/types/helpers/pseudoDescriptors.d.ts.map +1 -0
- package/types/helpers/pseudos.d.ts +2 -2
- package/types/helpers/pseudos.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/insertFont.d.ts +1 -1
- package/types/insertFont.d.ts.map +1 -1
- package/types/static.d.ts +1 -1
- package/types/static.d.ts.map +1 -1
- package/types/types.d.ts +2 -2
- package/types/types.d.ts.map +1 -1
package/dist/esm/insertFont.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isWeb } from "@tamagui/core";
|
|
1
2
|
import { setConfigFont } from "./conf";
|
|
2
3
|
import { createFont } from "./createFont";
|
|
3
4
|
import { createVariables } from "./createVariables";
|
|
@@ -6,7 +7,13 @@ function insertFont(name, fontIn) {
|
|
|
6
7
|
const font = createFont(fontIn);
|
|
7
8
|
const tokened = createVariables(font, name);
|
|
8
9
|
const parsed = parseFont(tokened);
|
|
9
|
-
|
|
10
|
+
if (isWeb && typeof document !== "undefined") {
|
|
11
|
+
const css = registerFontVariables(parsed, true);
|
|
12
|
+
const style = document.createElement("style");
|
|
13
|
+
style.innerText = `:root {${css}}`;
|
|
14
|
+
style.setAttribute("data-tamagui-font", name);
|
|
15
|
+
document.head.appendChild(style);
|
|
16
|
+
}
|
|
10
17
|
setConfigFont(name, tokened, parsed);
|
|
11
18
|
return parsed;
|
|
12
19
|
}
|
|
@@ -29,20 +36,26 @@ function parseFont(definition) {
|
|
|
29
36
|
}
|
|
30
37
|
return parsed;
|
|
31
38
|
}
|
|
32
|
-
function registerFontVariables(parsedFont) {
|
|
39
|
+
function registerFontVariables(parsedFont, collect = false) {
|
|
40
|
+
let vals = "";
|
|
33
41
|
for (const fkey in parsedFont) {
|
|
34
42
|
if (fkey === "family") {
|
|
35
|
-
registerCSSVariable(parsedFont[fkey]);
|
|
43
|
+
const val = registerCSSVariable(parsedFont[fkey]);
|
|
44
|
+
if (collect)
|
|
45
|
+
vals += val + ";";
|
|
36
46
|
} else {
|
|
37
47
|
for (const fskey in parsedFont[fkey]) {
|
|
38
48
|
const fval = parsedFont[fkey][fskey];
|
|
39
49
|
if (typeof fval === "string") {
|
|
40
50
|
} else {
|
|
41
|
-
registerCSSVariable(parsedFont[fkey][fskey]);
|
|
51
|
+
const val = registerCSSVariable(parsedFont[fkey][fskey]);
|
|
52
|
+
if (collect)
|
|
53
|
+
vals += val + ";";
|
|
42
54
|
}
|
|
43
55
|
}
|
|
44
56
|
}
|
|
45
57
|
}
|
|
58
|
+
return vals;
|
|
46
59
|
}
|
|
47
60
|
export {
|
|
48
61
|
insertFont,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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, tokened, 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
|
|
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,
|
|
4
|
+
"sourcesContent": ["import { isWeb } from '@tamagui/core'\nimport { 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 if (isWeb && typeof document !== 'undefined') {\n const css = registerFontVariables(parsed, true)\n const style = document.createElement('style')\n style.innerText = `:root {${css}}`\n style.setAttribute('data-tamagui-font', name)\n document.head.appendChild(style)\n }\n setConfigFont(name, tokened, 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, collect = false) {\n let vals = ''\n for (const fkey in parsedFont) {\n if (fkey === 'family') {\n const val = registerCSSVariable(parsedFont[fkey])\n if (collect) vals += val + ';'\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 like \"$borderColor\"\n } else {\n const val = registerCSSVariable(parsedFont[fkey][fskey])\n if (collect) vals += val + ';'\n }\n }\n }\n }\n return vals\n}\n"],
|
|
5
|
+
"mappings": "AAAA;AACA;AACA;AAEA;AACA;AAGO,oBAA2C,MAAc,QAAkC;AAChG,QAAM,OAAO,WAAW,MAAM;AAC9B,QAAM,UAAU,gBAAgB,MAAM,IAAI;AAC1C,QAAM,SAAS,UAAU,OAAO;AAChC,MAAI,SAAS,OAAO,aAAa,aAAa;AAC5C,UAAM,MAAM,sBAAsB,QAAQ,IAAI;AAC9C,UAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,UAAM,YAAY,UAAU;AAC5B,UAAM,aAAa,qBAAqB,IAAI;AAC5C,aAAS,KAAK,YAAY,KAAK;AAAA,EACjC;AACA,gBAAc,MAAM,SAAS,MAAM;AACnC,SAAO;AACT;AAEO,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;AAEO,+BAA+B,YAAiB,UAAU,OAAO;AACtE,MAAI,OAAO;AACX,aAAW,QAAQ,YAAY;AAC7B,QAAI,SAAS,UAAU;AACrB,YAAM,MAAM,oBAAoB,WAAW,KAAK;AAChD,UAAI;AAAS,gBAAQ,MAAM;AAAA,IAC7B,OAAO;AACL,iBAAW,SAAS,WAAW,OAAO;AACpC,cAAM,OAAO,WAAW,MAAM;AAC9B,YAAI,OAAO,SAAS,UAAU;AAAA,QAE9B,OAAO;AACL,gBAAM,MAAM,oBAAoB,WAAW,MAAM,MAAM;AACvD,cAAI;AAAS,oBAAQ,MAAM;AAAA,QAC7B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/static.js
CHANGED
|
@@ -10,7 +10,7 @@ export * from "./hooks/useTheme";
|
|
|
10
10
|
export * from "./helpers/isObj";
|
|
11
11
|
export * from "./helpers/getStylesAtomic";
|
|
12
12
|
export * from "./helpers/generateAtomicStyles";
|
|
13
|
-
export * from "./helpers/
|
|
13
|
+
export * from "./helpers/pseudoDescriptors";
|
|
14
14
|
export * from "./helpers/proxyThemeVariables";
|
|
15
15
|
export * from "./helpers/getSplitStyles";
|
|
16
16
|
export * from "@tamagui/helpers";
|
package/dist/esm/static.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/static.ts"],
|
|
4
|
-
"sourcesContent": ["// only stuff that gets extracted or needed by tamagui-static\n\nexport * from './styled'\nexport * from './createComponent'\nexport * from './createFont'\nexport * from './createTokens'\nexport * from './createTamagui'\nexport * from './createVariable'\nexport * from './constants/constants'\n\nexport * from './hooks/useMedia'\nexport * from './hooks/useTheme'\n\nexport * from './helpers/isObj'\nexport * from './helpers/getStylesAtomic'\nexport * from './helpers/generateAtomicStyles'\nexport * from './helpers/
|
|
4
|
+
"sourcesContent": ["// only stuff that gets extracted or needed by tamagui-static\n\nexport * from './styled'\nexport * from './createComponent'\nexport * from './createFont'\nexport * from './createTokens'\nexport * from './createTamagui'\nexport * from './createVariable'\nexport * from './constants/constants'\n\nexport * from './hooks/useMedia'\nexport * from './hooks/useTheme'\n\nexport * from './helpers/isObj'\nexport * from './helpers/getStylesAtomic'\nexport * from './helpers/generateAtomicStyles'\nexport * from './helpers/pseudoDescriptors'\nexport * from './helpers/proxyThemeVariables'\nexport * from './helpers/getSplitStyles'\nexport * from '@tamagui/helpers'\n\nexport * from './constants/rnw'\n\nexport * from './types'\n"],
|
|
5
5
|
"mappings": "AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
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
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
1
32
|
import { Image, Text, TextInput } from "react-native";
|
|
2
33
|
import { createComponent } from "./createComponent";
|
|
3
34
|
import { RNComponents } from "./helpers/RNComponents";
|
|
@@ -8,24 +39,22 @@ function styled(Component, options, staticExtractionOptions) {
|
|
|
8
39
|
}
|
|
9
40
|
}
|
|
10
41
|
const staticConfigProps = (() => {
|
|
11
|
-
var
|
|
42
|
+
var _b;
|
|
12
43
|
if (options) {
|
|
13
|
-
const { variants, name, defaultVariants,
|
|
44
|
+
const _a = options, { variants, name, defaultVariants } = _a, defaultProps = __objRest(_a, ["variants", "name", "defaultVariants"]);
|
|
14
45
|
if (defaultVariants) {
|
|
15
46
|
Object.assign(defaultProps, defaultVariants);
|
|
16
47
|
}
|
|
17
48
|
const isReactNativeWeb = "staticConfig" in Component ? Component.staticConfig.isReactNativeWeb : RNComponents.has(Component);
|
|
18
|
-
const reactNativeWebComponent = isReactNativeWeb ? ((
|
|
49
|
+
const reactNativeWebComponent = isReactNativeWeb ? ((_b = Component["staticConfig"]) == null ? void 0 : _b.reactNativeWebComponent) || Component : null;
|
|
19
50
|
const isTamagui = !isReactNativeWeb && "staticConfig" in Component;
|
|
20
51
|
const Comp = reactNativeWebComponent || Component;
|
|
21
52
|
const isImage = !!(defaultProps.isImage || (!isTamagui ? Comp === Image : false));
|
|
22
53
|
const isInput = !!(defaultProps.isInput || (!isTamagui ? Comp === TextInput : false));
|
|
23
54
|
const isText = !!(defaultProps.isText || (!isTamagui ? isInput || Comp === Text : false));
|
|
24
|
-
const conf = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Component: Comp
|
|
28
|
-
},
|
|
55
|
+
const conf = __spreadProps(__spreadValues(__spreadValues({}, staticExtractionOptions), !isTamagui && {
|
|
56
|
+
Component: Comp
|
|
57
|
+
}), {
|
|
29
58
|
isTamagui,
|
|
30
59
|
variants,
|
|
31
60
|
defaultProps,
|
|
@@ -36,7 +65,7 @@ function styled(Component, options, staticExtractionOptions) {
|
|
|
36
65
|
isInput,
|
|
37
66
|
isText,
|
|
38
67
|
isImage
|
|
39
|
-
};
|
|
68
|
+
});
|
|
40
69
|
return conf;
|
|
41
70
|
}
|
|
42
71
|
return {};
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styled.tsx"],
|
|
4
4
|
"sourcesContent": ["import { Image, Text, TextInput } from 'react-native'\n\nimport { createComponent } from './createComponent'\nimport { RNComponents } from './helpers/RNComponents'\nimport {\n GetProps,\n GetVariantValues,\n MediaProps,\n PseudoProps,\n StaticConfig,\n StylableComponent,\n TamaguiComponent,\n VariantDefinitions,\n VariantSpreadFunction,\n} from './types'\n\n// TODO may be able to use this in the options?: arg below directly\nexport type StyledOptions<ParentComponent extends StylableComponent> = GetProps<ParentComponent> & {\n name?: string\n variants?: VariantDefinitions<ParentComponent> | undefined\n defaultVariants?: { [key: string]: any }\n}\n\nexport function styled<\n ParentComponent extends StylableComponent,\n Variants extends VariantDefinitions<ParentComponent> | void = VariantDefinitions<ParentComponent> | void\n>(\n Component: ParentComponent,\n // this should be Partial<GetProps<ParentComponent>> but causes excessively deep type issues\n options?: GetProps<ParentComponent> & {\n name?: string\n variants?: Variants | undefined\n // thought i had this typed, but can't get it linked\n defaultVariants?: { [key: string]: any }\n },\n staticExtractionOptions?: Partial<StaticConfig>\n) {\n // for now wrapping a styled() around an extractable() HOC (like Button) isn't allowed\n if (process.env.NODE_ENV === 'development') {\n if (Component['staticConfig'] && Component['staticConfig'].isExtractable) {\n console.warn(\n `Warning: Wrapping styled() around an extractable HOC component isn't allowed yet. Support for this is on the roadmap, see: https://github.com/tamagui/tamagui/issues/88.`\n )\n // return (props) => {\n // // @ts-ignore\n // return <Component {...options} {...props} />\n // }\n }\n }\n\n const staticConfigProps = (() => {\n if (options) {\n const { variants, name, defaultVariants, ...defaultProps } = options\n if (defaultVariants) {\n Object.assign(defaultProps, defaultVariants)\n }\n const isReactNativeWeb =\n 'staticConfig' in Component\n ? Component.staticConfig.isReactNativeWeb\n : RNComponents.has(Component)\n const reactNativeWebComponent = isReactNativeWeb\n ? Component['staticConfig']?.reactNativeWebComponent || Component\n : null\n const isTamagui = !isReactNativeWeb && 'staticConfig' in Component\n const Comp = reactNativeWebComponent || (Component as any)\n const isImage = !!(defaultProps.isImage || (!isTamagui ? Comp === Image : false))\n const isInput = !!(defaultProps.isInput || (!isTamagui ? Comp === TextInput : false))\n const isText = !!(defaultProps.isText || (!isTamagui ? isInput || Comp === Text : false))\n\n const conf: Partial<StaticConfig> = {\n ...staticExtractionOptions,\n ...(!isTamagui && {\n Component: Comp,\n }),\n isTamagui,\n // this type gets messed up by options?: Partial<GetProps<ParentComponent>> above\n // take away the Partial<> and it's fine\n variants,\n defaultProps,\n defaultVariants,\n componentName: name,\n isReactNativeWeb,\n // for nesting multiple levels of rnw styled() need keep use the OG component\n reactNativeWebComponent,\n isInput,\n isText,\n isImage,\n }\n\n return conf\n }\n return {}\n })()\n\n const component = createComponent(staticConfigProps, Component)\n\n // get parent props without pseudos and medias so we can rebuild both with new variants\n type ParentPropsBase = ParentComponent extends TamaguiComponent<any, any, infer P>\n ? P\n : GetProps<ParentComponent>\n type ParentVariants = ParentComponent extends TamaguiComponent<any, any, any, infer V> ? V : {}\n\n type OurVariants = Variants extends void\n ? {}\n : {\n [Key in keyof Variants]?: Variants[Key] extends VariantSpreadFunction<any, infer Val>\n ? Val\n : GetVariantValues<keyof Variants[Key]>\n }\n\n type VariantProps = Omit<ParentVariants, keyof OurVariants> & OurVariants\n type OurPropsBase = ParentPropsBase & VariantProps\n\n type Props = Variants extends void\n ? GetProps<ParentComponent>\n : // start with base props\n OurPropsBase &\n // add in media (+ pseudos nested)\n MediaProps<Partial<OurPropsBase>> &\n // add in pseudos\n PseudoProps<Partial<OurPropsBase>>\n\n return component as TamaguiComponent<\n Props,\n // TODO infer ref\n any,\n ParentPropsBase,\n ParentVariants & OurVariants\n >\n}\n\n// breaking...\n// TODO see core/types.ts bug\n\n// export const XStack = styled(Stack, {\n// variants: {\n// horizontal: {\n// true: {\n// // flexDirection: 'row',\n// width: 0,\n// },\n// },\n// },\n// })\n\n// const Separator = styled(Stack, {\n// variants: {\n// vertical: {\n// true: {\n// flexDirection: 'row',\n// },\n// },\n// },\n// <--- have to add as const to get working???\n// })\n\n// type props = GetProps<typeof XStack>\n// type variants = typeof XStack extends TamaguiComponent<any, infer Variants> ? Variants : never\n// type variants2 = typeof Separator extends TamaguiComponent<any, infer Variants> ? Variants : never\n\n// const x = <XStack horizontal />\n// const x2 = <Separator vertical />\n"],
|
|
5
|
-
"mappings": "AAAA;AAEA;AACA;AAoBO,gBAIL,WAEA,SAMA,yBACA;AAEA,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,QAAI,UAAU,mBAAmB,UAAU,gBAAgB,eAAe;AACxE,cAAQ,KACN,0KACF;AAAA,IAKF;AAAA,EACF;AAEA,QAAM,oBAAqB,OAAM;AAlDnC;AAmDI,QAAI,SAAS;AACX,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEA;AACA;AAoBO,gBAIL,WAEA,SAMA,yBACA;AAEA,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,QAAI,UAAU,mBAAmB,UAAU,gBAAgB,eAAe;AACxE,cAAQ,KACN,0KACF;AAAA,IAKF;AAAA,EACF;AAEA,QAAM,oBAAqB,OAAM;AAlDnC;AAmDI,QAAI,SAAS;AACX,YAA6D,cAArD,YAAU,MAAM,oBAAqC,IAAjB,yBAAiB,IAAjB,CAApC,YAAU,QAAM;AACxB,UAAI,iBAAiB;AACnB,eAAO,OAAO,cAAc,eAAe;AAAA,MAC7C;AACA,YAAM,mBACJ,kBAAkB,YACd,UAAU,aAAa,mBACvB,aAAa,IAAI,SAAS;AAChC,YAAM,0BAA0B,mBAC5B,iBAAU,oBAAV,mBAA2B,4BAA2B,YACtD;AACJ,YAAM,YAAY,CAAC,oBAAoB,kBAAkB;AACzD,YAAM,OAAO,2BAA4B;AACzC,YAAM,UAAU,CAAC,CAAE,cAAa,WAAY,EAAC,YAAY,SAAS,QAAQ;AAC1E,YAAM,UAAU,CAAC,CAAE,cAAa,WAAY,EAAC,YAAY,SAAS,YAAY;AAC9E,YAAM,SAAS,CAAC,CAAE,cAAa,UAAW,EAAC,YAAY,WAAW,SAAS,OAAO;AAElF,YAAM,OAA8B,gDAC/B,0BACC,CAAC,aAAa;AAAA,QAChB,WAAW;AAAA,MACb,IAJkC;AAAA,QAKlC;AAAA,QAGA;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QAEA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AACA,WAAO,CAAC;AAAA,EACV,GAAG;AAEH,QAAM,YAAY,gBAAgB,mBAAmB,SAAS;AA4B9D,SAAO;AAOT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/views/Slot.js
CHANGED
|
@@ -1,21 +1,50 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
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
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
1
32
|
import { composeRefs } from "@tamagui/compose-refs";
|
|
2
33
|
import * as React from "react";
|
|
3
34
|
import { isWeb } from "../constants/platform";
|
|
4
35
|
const Slot = React.forwardRef((props, forwardedRef) => {
|
|
5
|
-
const { children,
|
|
6
|
-
return /* @__PURE__ */ React.createElement(SlotClone, {
|
|
7
|
-
...slotProps,
|
|
36
|
+
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
37
|
+
return /* @__PURE__ */ React.createElement(SlotClone, __spreadProps(__spreadValues({}, slotProps), {
|
|
8
38
|
ref: forwardedRef
|
|
9
|
-
}, children);
|
|
39
|
+
}), children);
|
|
10
40
|
});
|
|
11
41
|
Slot.displayName = "Slot";
|
|
12
42
|
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
13
|
-
const { children,
|
|
43
|
+
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
14
44
|
if (React.isValidElement(children)) {
|
|
15
|
-
const childProps = {
|
|
16
|
-
...mergeProps(children, slotProps),
|
|
45
|
+
const childProps = __spreadProps(__spreadValues({}, mergeProps(children, slotProps)), {
|
|
17
46
|
ref: composeRefs(forwardedRef, children.ref)
|
|
18
|
-
};
|
|
47
|
+
});
|
|
19
48
|
return React.cloneElement(children, childProps);
|
|
20
49
|
}
|
|
21
50
|
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
@@ -31,7 +60,7 @@ const pressMap = isWeb ? {
|
|
|
31
60
|
} : {};
|
|
32
61
|
function mergeProps(child, slotProps) {
|
|
33
62
|
const childProps = child.props;
|
|
34
|
-
const overrideProps = {
|
|
63
|
+
const overrideProps = __spreadValues({}, childProps);
|
|
35
64
|
const isHTMLChild = typeof child.type === "string";
|
|
36
65
|
if (isHTMLChild) {
|
|
37
66
|
for (const key in pressMap) {
|
|
@@ -52,12 +81,12 @@ function mergeProps(child, slotProps) {
|
|
|
52
81
|
if (isHandler) {
|
|
53
82
|
overrideProps[propName] = mergeEvent(childPropValue, slotPropValue);
|
|
54
83
|
} else if (propName === "style") {
|
|
55
|
-
overrideProps[propName] = {
|
|
84
|
+
overrideProps[propName] = __spreadValues(__spreadValues({}, slotPropValue), childPropValue);
|
|
56
85
|
} else if (propName === "className") {
|
|
57
86
|
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
58
87
|
}
|
|
59
88
|
}
|
|
60
|
-
return {
|
|
89
|
+
return __spreadValues(__spreadValues({}, slotProps), overrideProps);
|
|
61
90
|
}
|
|
62
91
|
const handleRegex = /^on[A-Z]/;
|
|
63
92
|
function mergeEvent(a, b) {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Slot.tsx"],
|
|
4
4
|
"sourcesContent": ["// via radix\n\nimport { composeRefs } from '@tamagui/compose-refs'\nimport * as React from 'react'\n\nimport { isWeb } from '../constants/platform'\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\nexport type SlotProps = {\n children?: React.ReactNode\n}\n\nexport const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n )\n})\n\nSlot.displayName = 'Slot'\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode\n}\n\nconst SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props\n\n if (React.isValidElement(children)) {\n const childProps = {\n ...mergeProps(children, slotProps),\n ref: composeRefs(forwardedRef, (children as any).ref),\n }\n return React.cloneElement(children, childProps)\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null\n})\n\nSlotClone.displayName = 'SlotClone'\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nexport const Slottable = ({ children }: { children: React.ReactNode }) => {\n return <>{children}</>\n}\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>\n\n// function isSlottable(child: React.ReactNode): child is React.ReactElement {\n// return React.isValidElement(child)\n// }\n\nconst pressMap = isWeb\n ? {\n onPress: 'onClick',\n onPressOut: 'onMouseUp',\n onPressIn: 'onMouseDown',\n }\n : {}\n\nfunction mergeProps(child: any, slotProps: AnyProps) {\n const childProps = child.props\n\n // all child props should override\n const overrideProps = { ...childProps }\n const isHTMLChild = typeof child.type === 'string'\n\n if (isHTMLChild) {\n for (const key in pressMap) {\n if (key in slotProps) {\n slotProps[pressMap[key]] = slotProps[key]\n delete slotProps[key]\n }\n }\n }\n\n for (let propName in childProps) {\n const slotPropValue = slotProps[propName]\n const childPropValue = childProps[propName]\n\n if (isHTMLChild && pressMap[propName]) {\n propName = pressMap[propName]\n delete overrideProps[propName]\n }\n\n const isHandler = handleRegex.test(propName)\n // if it's a handler, modify the override by composing the base handler\n if (isHandler) {\n overrideProps[propName] = mergeEvent(childPropValue, slotPropValue)\n }\n // if it's `style`, we merge them\n else if (propName === 'style') {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue }\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ')\n }\n }\n\n return { ...slotProps, ...overrideProps }\n}\n\nconst handleRegex = /^on[A-Z]/\n\nexport function mergeEvent(a?: Function, b?: Function) {\n return (...args: unknown[]) => {\n a?.(...args)\n b?.(...args)\n }\n}\n"],
|
|
5
|
-
"mappings": "AAEA;AACA;AAEA;AAUO,MAAM,OAAO,MAAM,WAAmC,CAAC,OAAO,iBAAiB;AACpF,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AAEA;AAUO,MAAM,OAAO,MAAM,WAAmC,CAAC,OAAO,iBAAiB;AACpF,QAAmC,YAA3B,eAA2B,IAAd,sBAAc,IAAd,CAAb;AACR,SACE,oCAAC,4CAAc,YAAd;AAAA,IAAyB,KAAK;AAAA,MAC5B,QACH;AAEJ,CAAC;AAED,KAAK,cAAc;AAUnB,MAAM,YAAY,MAAM,WAAgC,CAAC,OAAO,iBAAiB;AAC/E,QAAmC,YAA3B,eAA2B,IAAd,sBAAc,IAAd,CAAb;AAER,MAAI,MAAM,eAAe,QAAQ,GAAG;AAClC,UAAM,aAAa,iCACd,WAAW,UAAU,SAAS,IADhB;AAAA,MAEjB,KAAK,YAAY,cAAe,SAAiB,GAAG;AAAA,IACtD;AACA,WAAO,MAAM,aAAa,UAAU,UAAU;AAAA,EAChD;AAEA,SAAO,MAAM,SAAS,MAAM,QAAQ,IAAI,IAAI,MAAM,SAAS,KAAK,IAAI,IAAI;AAC1E,CAAC;AAED,UAAU,cAAc;AAMjB,MAAM,YAAY,CAAC,EAAE,eAA8C;AACxE,SAAO,0DAAG,QAAS;AACrB;AAUA,MAAM,WAAW,QACb;AAAA,EACE,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AACb,IACA,CAAC;AAEL,oBAAoB,OAAY,WAAqB;AACnD,QAAM,aAAa,MAAM;AAGzB,QAAM,gBAAgB,mBAAK;AAC3B,QAAM,cAAc,OAAO,MAAM,SAAS;AAE1C,MAAI,aAAa;AACf,eAAW,OAAO,UAAU;AAC1B,UAAI,OAAO,WAAW;AACpB,kBAAU,SAAS,QAAQ,UAAU;AACrC,eAAO,UAAU;AAAA,MACnB;AAAA,IACF;AAAA,EACF;AAEA,WAAS,YAAY,YAAY;AAC/B,UAAM,gBAAgB,UAAU;AAChC,UAAM,iBAAiB,WAAW;AAElC,QAAI,eAAe,SAAS,WAAW;AACrC,iBAAW,SAAS;AACpB,aAAO,cAAc;AAAA,IACvB;AAEA,UAAM,YAAY,YAAY,KAAK,QAAQ;AAE3C,QAAI,WAAW;AACb,oBAAc,YAAY,WAAW,gBAAgB,aAAa;AAAA,IACpE,WAES,aAAa,SAAS;AAC7B,oBAAc,YAAY,kCAAK,gBAAkB;AAAA,IACnD,WAAW,aAAa,aAAa;AACnC,oBAAc,YAAY,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,kCAAK,YAAc;AAC5B;AAEA,MAAM,cAAc;AAEb,oBAAoB,GAAc,GAAc;AACrD,SAAO,IAAI,SAAoB;AAC7B,2BAAI,GAAG;AACP,2BAAI,GAAG;AAAA,EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/views/Stack.js
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
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));
|
|
1
20
|
import { stackDefaultStyles } from "../constants/constants";
|
|
2
21
|
import { createComponent } from "../createComponent";
|
|
3
22
|
const Stack = createComponent({
|
|
4
23
|
componentName: "Stack",
|
|
5
|
-
defaultProps: {
|
|
6
|
-
...stackDefaultStyles,
|
|
24
|
+
defaultProps: __spreadProps(__spreadValues({}, stackDefaultStyles), {
|
|
7
25
|
flexDirection: "column"
|
|
8
|
-
}
|
|
26
|
+
})
|
|
9
27
|
});
|
|
10
28
|
export {
|
|
11
29
|
Stack
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Stack.tsx"],
|
|
4
4
|
"sourcesContent": ["import { View } from 'react-native'\n\nimport { stackDefaultStyles } from '../constants/constants'\nimport { createComponent } from '../createComponent'\nimport { StackProps, StackPropsBase } from '../types'\n\nexport const Stack = createComponent<StackProps, View, StackPropsBase>({\n componentName: 'Stack',\n defaultProps: {\n ...stackDefaultStyles,\n flexDirection: 'column',\n },\n})\n\n// test types\n// export const YStack = styled(Stack, {\n// flexDirection: 'column',\n// })\n// // test types\n// const x00 = <Stack missing={0} /> // should err\n// const x0 = <YStack missing={0} /> // should err\n// const x1 = (props: StackProps) => <YStack {...props} />\n// type ys = typeof YStack\n// type ysv = ys extends StaticComponent<any, infer V> ? V : unknown\n"],
|
|
5
|
-
"mappings": "AAEA;AACA;AAGO,MAAM,QAAQ,gBAAkD;AAAA,EACrE,eAAe;AAAA,EACf,cAAc
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAEA;AACA;AAGO,MAAM,QAAQ,gBAAkD;AAAA,EACrE,eAAe;AAAA,EACf,cAAc,iCACT,qBADS;AAAA,IAEZ,eAAe;AAAA,EACjB;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/views/Text.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
import { stylePropsTextOnly, validStyles } from "@tamagui/helpers";
|
|
2
18
|
import { isWeb } from "../constants/platform";
|
|
3
19
|
import { createComponent } from "../createComponent";
|
|
@@ -10,15 +26,14 @@ const ellipseStyle = {
|
|
|
10
26
|
const Text = createComponent({
|
|
11
27
|
componentName: "Text",
|
|
12
28
|
isText: true,
|
|
13
|
-
defaultProps: {
|
|
29
|
+
defaultProps: __spreadValues({
|
|
14
30
|
display: "flex",
|
|
15
|
-
fontFamily: "System"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
31
|
+
fontFamily: "System"
|
|
32
|
+
}, isWeb && {
|
|
33
|
+
display: "inline",
|
|
34
|
+
boxSizing: "border-box",
|
|
35
|
+
wordWrap: "break-word"
|
|
36
|
+
}),
|
|
22
37
|
variants: {
|
|
23
38
|
numberOfLines: {
|
|
24
39
|
1: isWeb ? ellipseStyle : { numberOfLines: 1 },
|
|
@@ -47,10 +62,7 @@ const Text = createComponent({
|
|
|
47
62
|
}
|
|
48
63
|
},
|
|
49
64
|
deoptProps: new Set(isWeb ? [] : ["ellipse"]),
|
|
50
|
-
validStyles: {
|
|
51
|
-
...validStyles,
|
|
52
|
-
...stylePropsTextOnly
|
|
53
|
-
}
|
|
65
|
+
validStyles: __spreadValues(__spreadValues({}, validStyles), stylePropsTextOnly)
|
|
54
66
|
});
|
|
55
67
|
export {
|
|
56
68
|
Text
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Text.tsx"],
|
|
4
4
|
"sourcesContent": ["import { stylePropsTextOnly, validStyles } from '@tamagui/helpers'\nimport { Text as TextView } from 'react-native'\n\nimport { isWeb } from '../constants/platform'\nimport { createComponent } from '../createComponent'\nimport { TextProps, TextPropsBase } from '../types'\n\nconst ellipseStyle = {\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n}\n\nexport const Text = createComponent<TextProps, TextView, TextPropsBase>({\n componentName: 'Text',\n isText: true,\n\n defaultProps: {\n display: 'flex',\n fontFamily: 'System',\n ...(isWeb && {\n display: 'inline',\n boxSizing: 'border-box',\n wordWrap: 'break-word',\n }),\n },\n\n variants: {\n numberOfLines: {\n 1: isWeb ? ellipseStyle : { numberOfLines: 1 },\n\n ':number': (numberOfLines) =>\n isWeb\n ? numberOfLines >= 1\n ? { WebkitLineClamp: numberOfLines }\n : null\n : { numberOfLines },\n },\n\n selectable: {\n true: {\n userSelect: 'text',\n cursor: 'text',\n },\n false: {\n userSelect: 'none',\n cursor: 'inherit',\n },\n },\n\n pressable: {\n true: {\n cursor: 'pointer',\n },\n },\n\n ellipse: {\n true: isWeb\n ? ellipseStyle\n : {\n numberOfLines: 1,\n lineBreakMode: 'clip',\n },\n },\n },\n\n deoptProps: new Set(isWeb ? [] : ['ellipse']),\n\n validStyles: {\n ...validStyles,\n ...stylePropsTextOnly,\n },\n})\n"],
|
|
5
|
-
"mappings": "AAAA;AAGA;AACA;AAGA,MAAM,eAAe;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,YAAY;AACd;AAEO,MAAM,OAAO,gBAAoD;AAAA,EACtE,eAAe;AAAA,EACf,QAAQ;AAAA,EAER,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,YAAY;AAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAGA;AACA;AAGA,MAAM,eAAe;AAAA,EACnB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,cAAc;AAAA,EACd,YAAY;AACd;AAEO,MAAM,OAAO,gBAAoD;AAAA,EACtE,eAAe;AAAA,EACf,QAAQ;AAAA,EAER,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,YAAY;AAAA,KACR,SAAS;AAAA,IACX,SAAS;AAAA,IACT,WAAW;AAAA,IACX,UAAU;AAAA,EACZ;AAAA,EAGF,UAAU;AAAA,IACR,eAAe;AAAA,MACb,GAAG,QAAQ,eAAe,EAAE,eAAe,EAAE;AAAA,MAE7C,WAAW,CAAC,kBACV,QACI,iBAAiB,IACf,EAAE,iBAAiB,cAAc,IACjC,OACF,EAAE,cAAc;AAAA,IACxB;AAAA,IAEA,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,QAAQ;AAAA,MACV;AAAA,MACA,OAAO;AAAA,QACL,YAAY;AAAA,QACZ,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IAEA,WAAW;AAAA,MACT,MAAM;AAAA,QACJ,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IAEA,SAAS;AAAA,MACP,MAAM,QACF,eACA;AAAA,QACE,eAAe;AAAA,QACf,eAAe;AAAA,MACjB;AAAA,IACN;AAAA,EACF;AAAA,EAEA,YAAY,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;AAAA,EAE5C,aAAa,kCACR,cACA;AAEP,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var _a
|
|
1
|
+
var _a;
|
|
2
2
|
import React, { createContext } from "react";
|
|
3
3
|
import { rnw } from "../constants/rnw";
|
|
4
4
|
const FallbackNativeContext = createContext(false);
|
|
5
|
-
const TextAncestorContext = (
|
|
5
|
+
const TextAncestorContext = ((_a = rnw) == null ? void 0 : _a.TextAncestorContext) ?? FallbackNativeContext;
|
|
6
6
|
const TextAncestorProvider = (props) => {
|
|
7
7
|
return /* @__PURE__ */ React.createElement(TextAncestorContext.Provider, {
|
|
8
8
|
value: false
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/TextAncestorContext.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { createContext } from 'react'\n\nimport { rnw } from '../constants/rnw'\n\nexport const FallbackNativeContext = createContext(false)\n\nexport const TextAncestorContext = rnw?.TextAncestorContext ?? FallbackNativeContext\n\nexport const TextAncestorProvider = (props) => {\n return <TextAncestorContext.Provider value={false}>{props.children}</TextAncestorContext.Provider>\n}\n"],
|
|
5
|
-
"mappings": "AAAA;AAAA;AAEA;AAEO,MAAM,wBAAwB,cAAc,KAAK;AAEjD,MAAM,sBAAsB,
|
|
5
|
+
"mappings": "AAAA;AAAA;AAEA;AAEO,MAAM,wBAAwB,cAAc,KAAK;AAEjD,MAAM,sBAAsB,kCAAK,wBAAuB;AAExD,MAAM,uBAAuB,CAAC,UAAU;AAC7C,SAAO,oCAAC,oBAAoB,UAApB;AAAA,IAA6B,OAAO;AAAA,KAAQ,MAAM,QAAS;AACrE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -161,6 +161,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
161
161
|
space: spaceProp,
|
|
162
162
|
spaceDirection: _spaceDirection,
|
|
163
163
|
disabled: disabledProp,
|
|
164
|
+
onMouseUp,
|
|
164
165
|
onMouseDown,
|
|
165
166
|
onMouseEnter,
|
|
166
167
|
onMouseLeave,
|
|
@@ -439,6 +440,7 @@ function createComponent(configIn, ParentComponent) {
|
|
|
439
440
|
[pressOutKey]: attachPress ? (e) => {
|
|
440
441
|
unPress();
|
|
441
442
|
onPressOut == null ? void 0 : onPressOut(e);
|
|
443
|
+
onMouseUp == null ? void 0 : onMouseUp(e);
|
|
442
444
|
} : void 0,
|
|
443
445
|
...isHoverable && {
|
|
444
446
|
onMouseEnter: attachHover ? (e) => {
|
|
@@ -557,18 +559,18 @@ function createComponent(configIn, ParentComponent) {
|
|
|
557
559
|
});
|
|
558
560
|
}
|
|
559
561
|
}
|
|
560
|
-
const pressability = isWeb ? null : useMemo(() => {
|
|
561
|
-
if (attachPress && events) {
|
|
562
|
-
const pressability2 = new Pressability(events);
|
|
563
|
-
internal.current.unmountEffects = [
|
|
564
|
-
() => {
|
|
565
|
-
pressability2.reset();
|
|
566
|
-
}
|
|
567
|
-
];
|
|
568
|
-
return pressability2;
|
|
569
|
-
}
|
|
570
|
-
}, []);
|
|
571
562
|
if (process.env.TAMAGUI_TARGET === "native") {
|
|
563
|
+
const pressability = useMemo(() => {
|
|
564
|
+
if (attachPress && events) {
|
|
565
|
+
const pressability2 = new Pressability(events);
|
|
566
|
+
internal.current.unmountEffects = [
|
|
567
|
+
() => {
|
|
568
|
+
pressability2.reset();
|
|
569
|
+
}
|
|
570
|
+
];
|
|
571
|
+
return pressability2;
|
|
572
|
+
}
|
|
573
|
+
}, []);
|
|
572
574
|
if (attachPress && events) {
|
|
573
575
|
pressability.configure(events);
|
|
574
576
|
const eventHandlers = pressability.getEventHandlers();
|
|
@@ -56,8 +56,8 @@ function createTamagui(config) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
for (const key in fontsParsed) {
|
|
59
|
-
const
|
|
60
|
-
registerFontVariables(
|
|
59
|
+
const fontParsed = fontsParsed[key];
|
|
60
|
+
registerFontVariables(fontParsed);
|
|
61
61
|
}
|
|
62
62
|
const sep = process.env.NODE_ENV === "development" ? config.cssStyleSeparator || " " : "";
|
|
63
63
|
cssRules.push(`:root {${sep}${[...tokenRules].join(`;${sep}`)}${sep}}`);
|
package/dist/jsx/insertFont.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isWeb } from "@tamagui/core";
|
|
1
2
|
import { setConfigFont } from "./conf";
|
|
2
3
|
import { createFont } from "./createFont";
|
|
3
4
|
import { createVariables } from "./createVariables";
|
|
@@ -6,7 +7,13 @@ function insertFont(name, fontIn) {
|
|
|
6
7
|
const font = createFont(fontIn);
|
|
7
8
|
const tokened = createVariables(font, name);
|
|
8
9
|
const parsed = parseFont(tokened);
|
|
9
|
-
|
|
10
|
+
if (isWeb && typeof document !== "undefined") {
|
|
11
|
+
const css = registerFontVariables(parsed, true);
|
|
12
|
+
const style = document.createElement("style");
|
|
13
|
+
style.innerText = `:root {${css}}`;
|
|
14
|
+
style.setAttribute("data-tamagui-font", name);
|
|
15
|
+
document.head.appendChild(style);
|
|
16
|
+
}
|
|
10
17
|
setConfigFont(name, tokened, parsed);
|
|
11
18
|
return parsed;
|
|
12
19
|
}
|
|
@@ -29,20 +36,26 @@ function parseFont(definition) {
|
|
|
29
36
|
}
|
|
30
37
|
return parsed;
|
|
31
38
|
}
|
|
32
|
-
function registerFontVariables(parsedFont) {
|
|
39
|
+
function registerFontVariables(parsedFont, collect = false) {
|
|
40
|
+
let vals = "";
|
|
33
41
|
for (const fkey in parsedFont) {
|
|
34
42
|
if (fkey === "family") {
|
|
35
|
-
registerCSSVariable(parsedFont[fkey]);
|
|
43
|
+
const val = registerCSSVariable(parsedFont[fkey]);
|
|
44
|
+
if (collect)
|
|
45
|
+
vals += val + ";";
|
|
36
46
|
} else {
|
|
37
47
|
for (const fskey in parsedFont[fkey]) {
|
|
38
48
|
const fval = parsedFont[fkey][fskey];
|
|
39
49
|
if (typeof fval === "string") {
|
|
40
50
|
} else {
|
|
41
|
-
registerCSSVariable(parsedFont[fkey][fskey]);
|
|
51
|
+
const val = registerCSSVariable(parsedFont[fkey][fskey]);
|
|
52
|
+
if (collect)
|
|
53
|
+
vals += val + ";";
|
|
42
54
|
}
|
|
43
55
|
}
|
|
44
56
|
}
|
|
45
57
|
}
|
|
58
|
+
return vals;
|
|
46
59
|
}
|
|
47
60
|
export {
|
|
48
61
|
insertFont,
|
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.76",
|
|
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.76",
|
|
25
|
+
"@tamagui/helpers": "^1.0.1-beta.76",
|
|
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.76",
|
|
28
|
+
"@tamagui/use-force-update": "^1.0.1-beta.76",
|
|
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,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.76",
|
|
40
40
|
"@types/react": "^17.0.35",
|
|
41
41
|
"csstype": "^3.0.10",
|
|
42
42
|
"esbuild": "^0.14.36",
|
package/reset.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SpaceDirection, SpaceTokens, StackProps, StaticConfig, StaticConfigParsed, StylableComponent, TamaguiComponent, TamaguiElement } from './types';
|
|
3
3
|
export declare const mouseUps: Set<Function>;
|
|
4
4
|
export declare function createComponent<ComponentPropTypes extends Object = {}, Ref = TamaguiElement, BaseProps = never>(configIn: Partial<StaticConfig> | StaticConfigParsed, ParentComponent?: StylableComponent): TamaguiComponent<ComponentPropTypes, Ref, BaseProps, {}>;
|
|
5
5
|
export declare const Unspaced: {
|
|
@@ -8,7 +8,6 @@ export declare const Unspaced: {
|
|
|
8
8
|
}): any;
|
|
9
9
|
isUnspaced: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare type SpaceDirection = 'vertical' | 'horizontal';
|
|
12
11
|
export declare type SpacerProps = Omit<StackProps, 'flex' | 'direction'> & {
|
|
13
12
|
size?: number | SpaceTokens;
|
|
14
13
|
flex?: boolean | number;
|
|
@@ -20,7 +19,7 @@ export declare type SpacedChildrenProps = {
|
|
|
20
19
|
children?: any;
|
|
21
20
|
space?: any;
|
|
22
21
|
spaceFlex?: boolean | number;
|
|
23
|
-
direction?:
|
|
22
|
+
direction?: SpaceDirection;
|
|
24
23
|
separator?: React.ReactNode;
|
|
25
24
|
};
|
|
26
25
|
export declare function spacedChildren({ isZStack, children, space, direction, spaceFlex, separator, }: SpacedChildrenProps): any;
|
|
@@ -28,5 +27,4 @@ export declare function AbsoluteFill(props: {
|
|
|
28
27
|
children?: React.ReactNode;
|
|
29
28
|
}): JSX.Element;
|
|
30
29
|
export declare function assignNativePropsToWeb(elementType: string, viewProps: any, nativeProps: any): void;
|
|
31
|
-
export {};
|
|
32
30
|
//# sourceMappingURL=createComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAWN,MAAM,OAAO,CAAA;AAqBd,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAWN,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,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,kBAAkB,EAAE,eAAe,CAAC,EAAE,iBAAiB,4DA47B1F;AAKD,eAAO,MAAM,QAAQ;YAAW;QAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;KAAE;;CAEjD,CAAA;AAMD,oBAAY,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAAC,GAAG;IACjE,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;IAC3B,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,cAAc,CAAA;CAC3B,CAAA;AACD,eAAO,MAAM,MAAM,0DA2CjB,CAAA;AAEF,oBAAY,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC5B,CAAA;AAED,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAS,EACT,SAAS,GACV,EAAE,mBAAmB,OAgFrB;AAqBD,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAMjE;AA6BD,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,QA6K3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createVariable.d.ts","sourceRoot":"","sources":["../src/createVariable.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,kBAAkB,mBAAmB,CAAA;AAE3C,aAAK,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,GAAG,IAAI;IACjD,GAAG,EAAE,CAAC,CAAA;IACN,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,qBAAa,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,GAAG;IAInD,CAAC,kBAAkB,CAAC,UAAO;IAG3B,GAAG,EAAE,MAAM,CAAA;IAGX,IAAI,EAAE,MAAM,CAAA;IAGZ,GAAG,EAAE,CAAC,CAAA;IAGN,QAAQ,EAAE,MAAM,CAAA;IAEhB,UAAU,UAAQ;gBAEN,KAAK,EAAE,UAAU;IAY7B,QAAQ;CAGT;AAED,eAAO,MAAM,cAAc,0EAK1B,CAAA;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,GAAG,CAAC,IAAI,QAAQ,CAE3D;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,OAGjD;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,OAGhD;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,OAGpD;AAGD,eAAO,MAAM,iBAAiB,aAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"createVariable.d.ts","sourceRoot":"","sources":["../src/createVariable.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,kBAAkB,mBAAmB,CAAA;AAE3C,aAAK,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,GAAG,IAAI;IACjD,GAAG,EAAE,CAAC,CAAA;IACN,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,qBAAa,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,GAAG;IAInD,CAAC,kBAAkB,CAAC,UAAO;IAG3B,GAAG,EAAE,MAAM,CAAA;IAGX,IAAI,EAAE,MAAM,CAAA;IAGZ,GAAG,EAAE,CAAC,CAAA;IAGN,QAAQ,EAAE,MAAM,CAAA;IAEhB,UAAU,UAAQ;gBAEN,KAAK,EAAE,UAAU;IAY7B,QAAQ;CAGT;AAED,eAAO,MAAM,cAAc,0EAK1B,CAAA;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,GAAG,CAAC,IAAI,QAAQ,CAE3D;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,OAGjD;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,OAGhD;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,QAAQ,GAAG,GAAG,OAGpD;AAGD,eAAO,MAAM,iBAAiB,aAAc,MAAM,iCA6BjD,CAAA"}
|