@tamagui/core 1.0.0-beta.230 → 1.0.0-beta.3
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/Tamagui.js +18 -1
- package/dist/cjs/Tamagui.js.map +2 -2
- package/dist/cjs/ThemeContext.js +4 -0
- package/dist/cjs/ThemeManager.js +30 -14
- package/dist/cjs/ThemeManager.js.map +2 -2
- package/dist/cjs/conf.js +10 -1
- package/dist/cjs/conf.js.map +2 -2
- package/dist/cjs/constants/constants.js +6 -0
- package/dist/cjs/constants/platform.js +15 -0
- package/dist/cjs/constants/platform.js.map +2 -2
- package/dist/cjs/constants/rnw.js +4 -0
- package/dist/cjs/contexts/ButtonInsideButtonContext.js +4 -0
- package/dist/cjs/createComponent.js +112 -63
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/createFont.js +4 -0
- package/dist/cjs/createShorthands.js +4 -0
- package/dist/cjs/createTamagui.js +56 -27
- package/dist/cjs/createTamagui.js.map +2 -2
- package/dist/cjs/createTheme.js +4 -0
- package/dist/cjs/createTokens.js +7 -6
- package/dist/cjs/createTokens.js.map +2 -2
- package/dist/cjs/createVariable.js +18 -2
- package/dist/cjs/createVariable.js.map +2 -2
- package/dist/cjs/helpers/RNComponents.js +4 -0
- package/dist/cjs/helpers/RNComponents.js.map +0 -0
- package/dist/cjs/helpers/addStylesUsingClassname.js +19 -16
- package/dist/cjs/helpers/addStylesUsingClassname.js.map +2 -2
- package/dist/cjs/helpers/areEqualSets.js +4 -0
- package/dist/cjs/helpers/createMediaStyle.js +5 -2
- package/dist/cjs/helpers/createMediaStyle.js.map +2 -2
- package/dist/cjs/helpers/createPropMapper.js +44 -41
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/createShallowUpdate.js +4 -0
- package/dist/cjs/helpers/createShallowUpdate.js.map +0 -0
- package/dist/cjs/helpers/createTamaguiProvider.js +4 -0
- package/dist/cjs/helpers/extendStaticConfig.js +9 -6
- package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
- package/dist/cjs/helpers/fixNativeShadow.js +4 -0
- package/dist/cjs/helpers/fixNativeShadow.native.js +6 -2
- package/dist/cjs/helpers/fixNativeShadow.native.js.map +2 -2
- package/dist/cjs/helpers/getExpandedShorthands.js +4 -0
- package/dist/cjs/{constants/pseudos.js → helpers/getSize.js} +17 -19
- package/dist/cjs/helpers/getSize.js.map +7 -0
- package/dist/cjs/helpers/getSplitStyles.js +166 -60
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.js +20 -3
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.native.js +4 -0
- package/dist/cjs/helpers/insertStyleRule.js +41 -26
- package/dist/cjs/helpers/insertStyleRule.js.map +2 -2
- package/dist/cjs/helpers/isObj.js +4 -0
- package/dist/cjs/helpers/isTamaguiElement.js +4 -0
- package/dist/cjs/helpers/matchMedia.js +4 -0
- package/dist/cjs/helpers/matchMedia.native.js +4 -0
- package/dist/cjs/helpers/proxyThemeVariables.js +40 -0
- package/dist/cjs/helpers/proxyThemeVariables.js.map +7 -0
- package/dist/cjs/helpers/themeable.js +7 -2
- package/dist/cjs/helpers/themeable.js.map +2 -2
- package/dist/cjs/helpers/validate.js +53 -11
- package/dist/cjs/helpers/validate.js.map +2 -2
- package/dist/cjs/helpers/withStaticProperties.js +4 -0
- package/dist/cjs/helpers/wrapThemeManagerContext.js +4 -0
- package/dist/cjs/hooks/useConstant.js +4 -0
- package/dist/cjs/hooks/useFeatures.js +8 -5
- package/dist/cjs/hooks/useFeatures.js.map +2 -2
- package/dist/cjs/hooks/useIsMounted.js +4 -0
- package/dist/cjs/hooks/useIsTouchDevice.js +8 -4
- package/dist/cjs/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/cjs/hooks/useMedia.js +30 -12
- package/dist/cjs/hooks/useMedia.js.map +2 -2
- package/dist/cjs/hooks/usePressable.js +4 -0
- package/dist/cjs/hooks/useTheme.js +30 -17
- package/dist/cjs/hooks/useTheme.js.map +2 -2
- package/dist/cjs/hooks/useUnmountEffect.js +4 -0
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/static.js +3 -0
- package/dist/cjs/static.js.map +2 -2
- package/dist/cjs/styled.js +7 -4
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/views/Stack.js +4 -0
- package/dist/cjs/views/Text.js +4 -0
- package/dist/cjs/views/TextAncestorContext.js +6 -0
- package/dist/cjs/views/Theme.js +7 -3
- package/dist/cjs/views/Theme.js.map +2 -2
- package/dist/cjs/views/ThemeInverse.js +5 -0
- package/dist/cjs/views/ThemeProvider.js +6 -1
- package/dist/cjs/views/ThemeProvider.js.map +2 -2
- package/dist/cjs/views/ThemeReset.js +4 -0
- package/dist/esm/Tamagui.js +10 -2
- package/dist/esm/Tamagui.js.map +2 -2
- package/dist/esm/ThemeManager.js +21 -11
- package/dist/esm/ThemeManager.js.map +2 -2
- package/dist/esm/conf.js +0 -1
- package/dist/esm/conf.js.map +2 -2
- package/dist/esm/constants/platform.js +2 -0
- package/dist/esm/constants/platform.js.map +2 -2
- package/dist/esm/createComponent.js +104 -65
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/createTamagui.js +53 -28
- package/dist/esm/createTamagui.js.map +2 -2
- package/dist/esm/createTokens.js +2 -6
- package/dist/esm/createTokens.js.map +2 -2
- package/dist/esm/createVariable.js +8 -2
- package/dist/esm/createVariable.js.map +2 -2
- package/dist/esm/helpers/RNComponents.js +0 -0
- package/dist/esm/helpers/RNComponents.js.map +0 -0
- package/dist/esm/helpers/addStylesUsingClassname.js +16 -18
- package/dist/esm/helpers/addStylesUsingClassname.js.map +2 -2
- package/dist/esm/helpers/createMediaStyle.js +0 -2
- package/dist/esm/helpers/createMediaStyle.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.js +40 -41
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/createShallowUpdate.js +0 -0
- package/dist/esm/helpers/createShallowUpdate.js.map +0 -0
- package/dist/esm/helpers/extendStaticConfig.js +9 -6
- package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
- package/dist/esm/helpers/fixNativeShadow.native.js +2 -2
- package/dist/esm/helpers/fixNativeShadow.native.js.map +2 -2
- package/dist/esm/helpers/getSize.js +13 -0
- package/dist/esm/helpers/getSize.js.map +7 -0
- package/dist/esm/helpers/getSplitStyles.js +166 -63
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.js +15 -3
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/helpers/insertStyleRule.js +31 -26
- package/dist/esm/helpers/insertStyleRule.js.map +2 -2
- package/dist/esm/helpers/proxyThemeVariables.js +18 -0
- package/dist/esm/helpers/proxyThemeVariables.js.map +7 -0
- package/dist/esm/helpers/themeable.js +3 -2
- package/dist/esm/helpers/themeable.js.map +2 -2
- package/dist/esm/helpers/validate.js +24 -11
- package/dist/esm/helpers/validate.js.map +2 -2
- package/dist/esm/hooks/useFeatures.js +3 -5
- package/dist/esm/hooks/useFeatures.js.map +2 -2
- package/dist/esm/hooks/useIsTouchDevice.js +6 -6
- package/dist/esm/hooks/useIsTouchDevice.js.map +2 -2
- package/dist/esm/hooks/useMedia.js +19 -12
- package/dist/esm/hooks/useMedia.js.map +2 -2
- package/dist/esm/hooks/useTheme.js +22 -17
- package/dist/esm/hooks/useTheme.js.map +2 -2
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/static.js +3 -0
- package/dist/esm/static.js.map +2 -2
- package/dist/esm/styled.js +3 -4
- package/dist/esm/styled.js.map +2 -2
- package/dist/esm/views/Theme.js +3 -3
- package/dist/esm/views/Theme.js.map +2 -2
- package/dist/esm/views/ThemeProvider.js +2 -1
- package/dist/esm/views/ThemeProvider.js.map +2 -2
- package/dist/jsx/Tamagui.js +10 -2
- package/dist/jsx/ThemeManager.js +21 -11
- package/dist/jsx/conf.js +0 -1
- package/dist/jsx/constants/platform.js +2 -0
- package/dist/jsx/createComponent.js +100 -61
- package/dist/jsx/createTamagui.js +53 -28
- package/dist/jsx/createTokens.js +2 -6
- package/dist/jsx/createVariable.js +8 -2
- package/dist/jsx/helpers/RNComponents.js +0 -0
- package/dist/jsx/helpers/addStylesUsingClassname.js +16 -18
- package/dist/jsx/helpers/createMediaStyle.js +0 -2
- package/dist/jsx/helpers/createPropMapper.js +40 -41
- package/dist/jsx/helpers/createShallowUpdate.js +0 -0
- package/dist/jsx/helpers/extendStaticConfig.js +9 -6
- package/dist/jsx/helpers/fixNativeShadow.native.js +2 -2
- package/dist/jsx/helpers/getSize.js +12 -0
- package/dist/jsx/helpers/getSplitStyles.js +166 -63
- package/dist/jsx/helpers/getStylesAtomic.js +15 -3
- package/dist/jsx/helpers/insertStyleRule.js +31 -26
- package/dist/jsx/helpers/proxyThemeVariables.js +17 -0
- package/dist/jsx/helpers/themeable.js +3 -3
- package/dist/jsx/helpers/validate.js +24 -11
- package/dist/jsx/hooks/useFeatures.js +3 -5
- package/dist/jsx/hooks/useIsTouchDevice.js +6 -6
- package/dist/jsx/hooks/useMedia.js +19 -12
- package/dist/jsx/hooks/useTheme.js +22 -17
- package/dist/jsx/index.js +4 -0
- package/dist/jsx/static.js +3 -0
- package/dist/jsx/styled.js +3 -4
- package/dist/jsx/views/Theme.js +4 -4
- package/dist/jsx/views/ThemeProvider.js +2 -2
- package/package.json +6 -6
- package/types/Tamagui.d.ts +18 -1
- package/types/Tamagui.d.ts.map +1 -1
- package/types/ThemeManager.d.ts +3 -3
- package/types/ThemeManager.d.ts.map +1 -1
- package/types/conf.d.ts +2 -0
- package/types/conf.d.ts.map +1 -1
- package/types/constants/platform.d.ts +1 -0
- package/types/constants/platform.d.ts.map +1 -1
- package/types/createComponent.d.ts +3 -4
- package/types/createComponent.d.ts.map +1 -1
- package/types/createFont.d.ts +1 -1
- package/types/createFont.d.ts.map +1 -1
- package/types/createTamagui.d.ts +3 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/createTokens.d.ts +0 -26
- package/types/createTokens.d.ts.map +1 -1
- package/types/createVariable.d.ts +1 -0
- package/types/createVariable.d.ts.map +1 -1
- package/types/helpers/addStylesUsingClassname.d.ts.map +1 -1
- package/types/helpers/createMediaStyle.d.ts.map +1 -1
- package/types/helpers/createPropMapper.d.ts +1 -1
- package/types/helpers/createPropMapper.d.ts.map +1 -1
- package/types/helpers/extendStaticConfig.d.ts +2 -2
- package/types/helpers/extendStaticConfig.d.ts.map +1 -1
- package/types/helpers/getSize.d.ts +3 -0
- package/types/helpers/getSize.d.ts.map +1 -0
- package/types/helpers/getSplitStyles.d.ts +14 -6
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getStylesAtomic.d.ts.map +1 -1
- package/types/helpers/insertStyleRule.d.ts +2 -1
- package/types/helpers/insertStyleRule.d.ts.map +1 -1
- package/types/helpers/proxyThemeVariables.d.ts +2 -0
- package/types/helpers/proxyThemeVariables.d.ts.map +1 -0
- package/types/helpers/themeable.d.ts +3 -1
- package/types/helpers/themeable.d.ts.map +1 -1
- package/types/helpers/validate.d.ts.map +1 -1
- package/types/hooks/useMedia.d.ts +2 -6
- package/types/hooks/useMedia.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts +1 -1
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -1
- package/types/static.d.ts +3 -0
- package/types/static.d.ts.map +1 -1
- package/types/styled.d.ts +12 -3
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +76 -48
- package/types/types.d.ts.map +1 -1
- package/types/views/Theme.d.ts +1 -0
- package/types/views/Theme.d.ts.map +1 -1
- package/types/views/ThemeProvider.d.ts +1 -0
- package/types/views/ThemeProvider.d.ts.map +1 -1
- package/LICENSE +0 -21
- package/dist/cjs/constants/pseudos.js.map +0 -7
- package/dist/cjs/createShallowUpdate.js +0 -1
- package/dist/cjs/createShallowUpdate.js.map +0 -7
- package/dist/cjs/devtools.js +0 -32
- package/dist/cjs/devtools.js.map +0 -7
- package/dist/cjs/spacedChildren.js +0 -86
- package/dist/cjs/spacedChildren.js.map +0 -7
- package/dist/cjs/tamagui-base.css +0 -8
- package/dist/cjs/tamagui-base.css.map +0 -7
- package/dist/esm/constants/pseudos.js +0 -18
- package/dist/esm/constants/pseudos.js.map +0 -7
- package/dist/esm/createShallowUpdate.js +0 -1
- package/dist/esm/createShallowUpdate.js.map +0 -7
- package/dist/esm/devtools.js +0 -14
- package/dist/esm/devtools.js.map +0 -7
- package/dist/esm/spacedChildren.js +0 -52
- package/dist/esm/spacedChildren.js.map +0 -7
- package/dist/esm/tamagui-base.css +0 -8
- package/dist/esm/tamagui-base.css.map +0 -7
- package/dist/jsx/constants/pseudos.js +0 -17
- package/dist/jsx/createShallowUpdate.js +0 -0
- package/dist/jsx/devtools.js +0 -13
- package/dist/jsx/spacedChildren.js +0 -44
- package/dist/jsx/tamagui-base.css +0 -7
- package/types/spacedChildren.d.ts +0 -9
- package/types/spacedChildren.d.ts.map +0 -1
package/dist/esm/devtools.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { onConfiguredOnce } from "./conf";
|
|
2
|
-
import { insertedSelectors } from "./helpers/insertStyleRule";
|
|
3
|
-
onConfiguredOnce((conf) => {
|
|
4
|
-
if (globalThis["Tamagui"]) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
globalThis["Tamagui"] = {
|
|
8
|
-
...conf,
|
|
9
|
-
get insertedCSS() {
|
|
10
|
-
return insertedSelectors;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
});
|
|
14
|
-
//# sourceMappingURL=devtools.js.map
|
package/dist/esm/devtools.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/devtools.ts"],
|
|
4
|
-
"sourcesContent": ["import { onConfiguredOnce } from './conf'\nimport { insertedSelectors } from './helpers/insertStyleRule'\n\nonConfiguredOnce((conf) => {\n if (globalThis['Tamagui']) {\n return\n }\n globalThis['Tamagui'] = {\n ...conf,\n get insertedCSS() {\n return insertedSelectors\n },\n }\n})\n"],
|
|
5
|
-
"mappings": "AAAA;AACA;AAEA,iBAAiB,CAAC,SAAS;AACzB,MAAI,WAAW,YAAY;AACzB;AAAA,EACF;AACA,aAAW,aAAa;AAAA,OACnB;AAAA,QACC,cAAc;AAChB,aAAO;AAAA,IACT;AAAA,EACF;AACF,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
import React, { Children, Fragment } from "react";
|
|
4
|
-
import { AbsoluteFill, Spacer } from "./createComponent";
|
|
5
|
-
function spacedChildren({
|
|
6
|
-
isZStack,
|
|
7
|
-
children,
|
|
8
|
-
space,
|
|
9
|
-
flexDirection,
|
|
10
|
-
spaceFlex
|
|
11
|
-
}) {
|
|
12
|
-
var _a, _b;
|
|
13
|
-
if (!space && !isZStack) {
|
|
14
|
-
return children;
|
|
15
|
-
}
|
|
16
|
-
const childrenList = Children.toArray(children);
|
|
17
|
-
const len = childrenList.length;
|
|
18
|
-
if (len === 1) {
|
|
19
|
-
return children;
|
|
20
|
-
}
|
|
21
|
-
const next = [];
|
|
22
|
-
for (const [index, child] of childrenList.entries()) {
|
|
23
|
-
if (child === null || child === void 0) {
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
const key = `${(_a = child == null ? void 0 : child["key"]) != null ? _a : index}`;
|
|
27
|
-
next.push(/* @__PURE__ */ React.createElement(Fragment, {
|
|
28
|
-
key
|
|
29
|
-
}, isZStack ? /* @__PURE__ */ React.createElement(AbsoluteFill, null, child) : child));
|
|
30
|
-
if ((_b = child == null ? void 0 : child["type"]) == null ? void 0 : _b["isVisuallyHidden"]) {
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
if (index !== len - 1) {
|
|
34
|
-
if (space) {
|
|
35
|
-
next.push(/* @__PURE__ */ React.createElement(Spacer, {
|
|
36
|
-
key: `${key}_spacer`,
|
|
37
|
-
direction: flexDirection === "row" || flexDirection === "row-reverse" ? "horizontal" : "vertical",
|
|
38
|
-
size: space,
|
|
39
|
-
...spaceFlex && {
|
|
40
|
-
flex: spaceFlex
|
|
41
|
-
}
|
|
42
|
-
}));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return next;
|
|
47
|
-
}
|
|
48
|
-
__name(spacedChildren, "spacedChildren");
|
|
49
|
-
export {
|
|
50
|
-
spacedChildren
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=spacedChildren.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/spacedChildren.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { Children, Fragment } from 'react'\nimport { ViewStyle } from 'react-native'\n\nimport { AbsoluteFill, Spacer } from './createComponent'\n\nexport function spacedChildren({\n isZStack,\n children,\n space,\n flexDirection,\n spaceFlex,\n}: {\n isZStack?: boolean\n children: any\n space?: any\n spaceFlex?: boolean | number\n flexDirection?: ViewStyle['flexDirection']\n}) {\n if (!space && !isZStack) {\n return children\n }\n const childrenList = Children.toArray(children)\n const len = childrenList.length\n if (len === 1) {\n return children\n }\n const next: any[] = []\n for (const [index, child] of childrenList.entries()) {\n if (child === null || child === undefined) {\n continue\n }\n\n const key = `${child?.['key'] ?? index}`\n\n next.push(\n <Fragment key={key}>{isZStack ? <AbsoluteFill>{child}</AbsoluteFill> : child}</Fragment>\n )\n\n // allows for custom visually hidden components that dont insert spacing\n if (child?.['type']?.['isVisuallyHidden']) {\n continue\n }\n\n if (index !== len - 1) {\n if (space) {\n next.push(\n <Spacer\n key={`${key}_spacer`}\n direction={\n flexDirection === 'row' || flexDirection === 'row-reverse' ? 'horizontal' : 'vertical'\n }\n size={space}\n {...(spaceFlex && {\n flex: spaceFlex,\n })}\n />\n )\n }\n }\n }\n return next\n}\n"],
|
|
5
|
-
"mappings": ";;AAAA;AAGA;AAEO,wBAAwB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,GAOC;AAjBH;AAkBE,MAAI,CAAC,SAAS,CAAC,UAAU;AACvB,WAAO;AAAA,EACT;AACA,QAAM,eAAe,SAAS,QAAQ,QAAQ;AAC9C,QAAM,MAAM,aAAa;AACzB,MAAI,QAAQ,GAAG;AACb,WAAO;AAAA,EACT;AACA,QAAM,OAAc,CAAC;AACrB,aAAW,CAAC,OAAO,UAAU,aAAa,QAAQ,GAAG;AACnD,QAAI,UAAU,QAAQ,UAAU,QAAW;AACzC;AAAA,IACF;AAEA,UAAM,MAAM,GAAG,qCAAQ,WAAR,YAAkB;AAEjC,SAAK,KACH,oCAAC;AAAA,MAAS;AAAA,OAAW,WAAW,oCAAC,oBAAc,KAAM,IAAkB,KAAM,CAC/E;AAGA,QAAI,qCAAQ,YAAR,mBAAkB,qBAAqB;AACzC;AAAA,IACF;AAEA,QAAI,UAAU,MAAM,GAAG;AACrB,UAAI,OAAO;AACT,aAAK,KACH,oCAAC;AAAA,UACC,KAAK,GAAG;AAAA,UACR,WACE,kBAAkB,SAAS,kBAAkB,gBAAgB,eAAe;AAAA,UAE9E,MAAM;AAAA,aACD,aAAa;AAAA,YAChB,MAAM;AAAA,UACR;AAAA,SACF,CACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAxDgB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
File without changes
|
package/dist/jsx/devtools.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { onConfiguredOnce } from "./conf";
|
|
2
|
-
import { insertedSelectors } from "./helpers/insertStyleRule";
|
|
3
|
-
onConfiguredOnce((conf) => {
|
|
4
|
-
if (globalThis["Tamagui"]) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
globalThis["Tamagui"] = {
|
|
8
|
-
...conf,
|
|
9
|
-
get insertedCSS() {
|
|
10
|
-
return insertedSelectors;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
import { Children, Fragment } from "react";
|
|
4
|
-
import { AbsoluteFill, Spacer } from "./createComponent";
|
|
5
|
-
function spacedChildren({
|
|
6
|
-
isZStack,
|
|
7
|
-
children,
|
|
8
|
-
space,
|
|
9
|
-
flexDirection,
|
|
10
|
-
spaceFlex
|
|
11
|
-
}) {
|
|
12
|
-
var _a, _b;
|
|
13
|
-
if (!space && !isZStack) {
|
|
14
|
-
return children;
|
|
15
|
-
}
|
|
16
|
-
const childrenList = Children.toArray(children);
|
|
17
|
-
const len = childrenList.length;
|
|
18
|
-
if (len === 1) {
|
|
19
|
-
return children;
|
|
20
|
-
}
|
|
21
|
-
const next = [];
|
|
22
|
-
for (const [index, child] of childrenList.entries()) {
|
|
23
|
-
if (child === null || child === void 0) {
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
const key = `${(_a = child == null ? void 0 : child["key"]) != null ? _a : index}`;
|
|
27
|
-
next.push(<Fragment key={key}>{isZStack ? <AbsoluteFill>{child}</AbsoluteFill> : child}</Fragment>);
|
|
28
|
-
if ((_b = child == null ? void 0 : child["type"]) == null ? void 0 : _b["isVisuallyHidden"]) {
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
if (index !== len - 1) {
|
|
32
|
-
if (space) {
|
|
33
|
-
next.push(<Spacer key={`${key}_spacer`} direction={flexDirection === "row" || flexDirection === "row-reverse" ? "horizontal" : "vertical"} size={space} {...spaceFlex && {
|
|
34
|
-
flex: spaceFlex
|
|
35
|
-
}} />);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return next;
|
|
40
|
-
}
|
|
41
|
-
__name(spacedChildren, "spacedChildren");
|
|
42
|
-
export {
|
|
43
|
-
spacedChildren
|
|
44
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ViewStyle } from 'react-native';
|
|
2
|
-
export declare function spacedChildren({ isZStack, children, space, flexDirection, spaceFlex, }: {
|
|
3
|
-
isZStack?: boolean;
|
|
4
|
-
children: any;
|
|
5
|
-
space?: any;
|
|
6
|
-
spaceFlex?: boolean | number;
|
|
7
|
-
flexDirection?: ViewStyle['flexDirection'];
|
|
8
|
-
}): any;
|
|
9
|
-
//# sourceMappingURL=spacedChildren.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spacedChildren.d.ts","sourceRoot":"","sources":["../src/spacedChildren.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAIxC,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,aAAa,EACb,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,GAAG,CAAA;IACb,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;CAC3C,OA4CA"}
|