@tamagui/web 1.5.22 → 1.5.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helpers/expandStyles.js +6 -4
- package/dist/cjs/helpers/expandStyles.js.map +2 -2
- package/dist/cjs/views/Theme.js +4 -3
- package/dist/cjs/views/Theme.js.map +2 -2
- package/dist/esm/helpers/expandStyles.js +6 -4
- package/dist/esm/helpers/expandStyles.js.map +2 -2
- package/dist/esm/helpers/expandStyles.mjs +6 -4
- package/dist/esm/helpers/expandStyles.mjs.map +2 -2
- package/dist/esm/views/Theme.js +4 -3
- package/dist/esm/views/Theme.js.map +2 -2
- package/dist/esm/views/Theme.mjs +4 -3
- package/dist/esm/views/Theme.mjs.map +2 -2
- package/package.json +9 -9
- package/src/helpers/expandStyles.ts +8 -4
- package/src/views/Theme.tsx +6 -3
- package/types/helpers/expandStyles.d.ts.map +1 -1
- package/types/views/Theme.d.ts +1 -1
- package/types/views/Theme.d.ts.map +1 -1
|
@@ -22,6 +22,7 @@ __export(expandStyles_exports, {
|
|
|
22
22
|
fixStyles: () => fixStyles
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(expandStyles_exports);
|
|
25
|
+
var import_constants = require("@tamagui/constants");
|
|
25
26
|
var import_config = require("../config.js");
|
|
26
27
|
var import_expandStyle = require("./expandStyle.js");
|
|
27
28
|
var import_normalizeShadow = require("./normalizeShadow");
|
|
@@ -60,12 +61,13 @@ function fixStyles(style) {
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
}
|
|
64
|
+
const nativeStyle = import_constants.isWeb ? null : "borderStyle";
|
|
63
65
|
const borderDefaults = {
|
|
64
66
|
borderWidth: "borderStyle",
|
|
65
|
-
borderBottomWidth: "borderBottomStyle",
|
|
66
|
-
borderTopWidth: "borderTopStyle",
|
|
67
|
-
borderLeftWidth: "borderLeftStyle",
|
|
68
|
-
borderRightWidth: "borderRightStyle"
|
|
67
|
+
borderBottomWidth: nativeStyle || "borderBottomStyle",
|
|
68
|
+
borderTopWidth: nativeStyle || "borderTopStyle",
|
|
69
|
+
borderLeftWidth: nativeStyle || "borderLeftStyle",
|
|
70
|
+
borderRightWidth: nativeStyle || "borderRightStyle"
|
|
69
71
|
};
|
|
70
72
|
// Annotate the CommonJS export names for ESM import in node:
|
|
71
73
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/expandStyles.ts"],
|
|
4
|
-
"sourcesContent": ["import { getConfig } from '../config.js'\nimport { expandStyle } from './expandStyle.js'\nimport { normalizeShadow } from './normalizeShadow'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\nimport { pseudoDescriptors } from './pseudoDescriptors.js'\n\nlet shorthands: Record<string, string> | null = null\n\n/**\n * This is what you want to run before Object.assign() a style onto another.\n * It does the following:\n * 1. Turns user shorthands into longhands, ie px = paddingHorizontal\n * 2. Normalizes various inconsistent styles to be more consistent\n * 3. Expands react-native shorthands, ie paddingHorizontal => paddingLeft, paddingRight\n */\n\nexport function expandStyles(style: Record<string, any>, config = getConfig()) {\n const res: Record<string, any> = {}\n\n for (let key in style) {\n shorthands = shorthands || (config ? config.shorthands : null)\n if (shorthands) {\n key = shorthands[key] || key\n }\n if (key in pseudoDescriptors) {\n res[key] = expandStyles(style[key])\n continue\n }\n const val = normalizeValueWithProperty(style[key], key)\n // expand react-native shorthands\n const out = expandStyle(key, val)\n if (out) {\n Object.assign(res, Object.fromEntries(out))\n } else {\n res[key] = val\n }\n }\n\n fixStyles(res)\n\n return res\n}\n\nexport function fixStyles(style: Record<string, any>) {\n if (\n style.shadowRadius ||\n style.shadowColor ||\n style.shadowOpacity ||\n style.shadowOffset\n ) {\n Object.assign(style, normalizeShadow(style))\n }\n\n // TODO could be native-only\n // ensure border style set by default to solid\n for (const key in borderDefaults) {\n if (key in style && !style[borderDefaults[key]]) {\n style[borderDefaults[key]] = 'solid'\n }\n }\n}\n\nconst borderDefaults = {\n borderWidth: 'borderStyle',\n borderBottomWidth: 'borderBottomStyle',\n borderTopWidth: 'borderTopStyle',\n borderLeftWidth: 'borderLeftStyle',\n borderRightWidth: 'borderRightStyle',\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0B;AAC1B,yBAA4B;AAC5B,6BAAgC;AAChC,wCAA2C;AAC3C,+BAAkC;AAElC,IAAI,aAA4C;AAUzC,SAAS,aAAa,OAA4B,aAAS,yBAAU,GAAG;AAC7E,QAAM,MAA2B,CAAC;AAElC,WAAS,OAAO,OAAO;AACrB,iBAAa,eAAe,SAAS,OAAO,aAAa;AACzD,QAAI,YAAY;AACd,YAAM,WAAW,GAAG,KAAK;AAAA,IAC3B;AACA,QAAI,OAAO,4CAAmB;AAC5B,UAAI,GAAG,IAAI,aAAa,MAAM,GAAG,CAAC;AAClC;AAAA,IACF;AACA,UAAM,UAAM,8DAA2B,MAAM,GAAG,GAAG,GAAG;AAEtD,UAAM,UAAM,gCAAY,KAAK,GAAG;AAChC,QAAI,KAAK;AACP,aAAO,OAAO,KAAK,OAAO,YAAY,GAAG,CAAC;AAAA,IAC5C,OAAO;AACL,UAAI,GAAG,IAAI;AAAA,IACb;AAAA,EACF;AAEA,YAAU,GAAG;AAEb,SAAO;AACT;AAEO,SAAS,UAAU,OAA4B;AACpD,MACE,MAAM,gBACN,MAAM,eACN,MAAM,iBACN,MAAM,cACN;AACA,WAAO,OAAO,WAAO,wCAAgB,KAAK,CAAC;AAAA,EAC7C;AAIA,aAAW,OAAO,gBAAgB;AAChC,QAAI,OAAO,SAAS,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG;AAC/C,YAAM,eAAe,GAAG,CAAC,IAAI;AAAA,IAC/B;AAAA,EACF;AACF;
|
|
4
|
+
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\n\nimport { getConfig } from '../config.js'\nimport { expandStyle } from './expandStyle.js'\nimport { normalizeShadow } from './normalizeShadow'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\nimport { pseudoDescriptors } from './pseudoDescriptors.js'\n\nlet shorthands: Record<string, string> | null = null\n\n/**\n * This is what you want to run before Object.assign() a style onto another.\n * It does the following:\n * 1. Turns user shorthands into longhands, ie px = paddingHorizontal\n * 2. Normalizes various inconsistent styles to be more consistent\n * 3. Expands react-native shorthands, ie paddingHorizontal => paddingLeft, paddingRight\n */\n\nexport function expandStyles(style: Record<string, any>, config = getConfig()) {\n const res: Record<string, any> = {}\n\n for (let key in style) {\n shorthands = shorthands || (config ? config.shorthands : null)\n if (shorthands) {\n key = shorthands[key] || key\n }\n if (key in pseudoDescriptors) {\n res[key] = expandStyles(style[key])\n continue\n }\n const val = normalizeValueWithProperty(style[key], key)\n // expand react-native shorthands\n const out = expandStyle(key, val)\n if (out) {\n Object.assign(res, Object.fromEntries(out))\n } else {\n res[key] = val\n }\n }\n\n fixStyles(res)\n\n return res\n}\n\nexport function fixStyles(style: Record<string, any>) {\n if (\n style.shadowRadius ||\n style.shadowColor ||\n style.shadowOpacity ||\n style.shadowOffset\n ) {\n Object.assign(style, normalizeShadow(style))\n }\n\n // TODO could be native-only\n // ensure border style set by default to solid\n for (const key in borderDefaults) {\n if (key in style && !style[borderDefaults[key]]) {\n style[borderDefaults[key]] = 'solid'\n }\n }\n}\n\n// native doesn't support specific border edge style\nconst nativeStyle = isWeb ? null : 'borderStyle'\nconst borderDefaults = {\n borderWidth: 'borderStyle',\n borderBottomWidth: nativeStyle || 'borderBottomStyle',\n borderTopWidth: nativeStyle || 'borderTopStyle',\n borderLeftWidth: nativeStyle || 'borderLeftStyle',\n borderRightWidth: nativeStyle || 'borderRightStyle',\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAsB;AAEtB,oBAA0B;AAC1B,yBAA4B;AAC5B,6BAAgC;AAChC,wCAA2C;AAC3C,+BAAkC;AAElC,IAAI,aAA4C;AAUzC,SAAS,aAAa,OAA4B,aAAS,yBAAU,GAAG;AAC7E,QAAM,MAA2B,CAAC;AAElC,WAAS,OAAO,OAAO;AACrB,iBAAa,eAAe,SAAS,OAAO,aAAa;AACzD,QAAI,YAAY;AACd,YAAM,WAAW,GAAG,KAAK;AAAA,IAC3B;AACA,QAAI,OAAO,4CAAmB;AAC5B,UAAI,GAAG,IAAI,aAAa,MAAM,GAAG,CAAC;AAClC;AAAA,IACF;AACA,UAAM,UAAM,8DAA2B,MAAM,GAAG,GAAG,GAAG;AAEtD,UAAM,UAAM,gCAAY,KAAK,GAAG;AAChC,QAAI,KAAK;AACP,aAAO,OAAO,KAAK,OAAO,YAAY,GAAG,CAAC;AAAA,IAC5C,OAAO;AACL,UAAI,GAAG,IAAI;AAAA,IACb;AAAA,EACF;AAEA,YAAU,GAAG;AAEb,SAAO;AACT;AAEO,SAAS,UAAU,OAA4B;AACpD,MACE,MAAM,gBACN,MAAM,eACN,MAAM,iBACN,MAAM,cACN;AACA,WAAO,OAAO,WAAO,wCAAgB,KAAK,CAAC;AAAA,EAC7C;AAIA,aAAW,OAAO,gBAAgB;AAChC,QAAI,OAAO,SAAS,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG;AAC/C,YAAM,eAAe,GAAG,CAAC,IAAI;AAAA,IAC/B;AAAA,EACF;AACF;AAGA,MAAM,cAAc,yBAAQ,OAAO;AACnC,MAAM,iBAAiB;AAAA,EACrB,aAAa;AAAA,EACb,mBAAmB,eAAe;AAAA,EAClC,gBAAgB,eAAe;AAAA,EAC/B,iBAAiB,eAAe;AAAA,EAChC,kBAAkB,eAAe;AACnC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/views/Theme.js
CHANGED
|
@@ -38,16 +38,16 @@ function Theme(props) {
|
|
|
38
38
|
props.children,
|
|
39
39
|
(child) => (0, import_react.cloneElement)(child, { ["data-themeable"]: true })
|
|
40
40
|
) : props.children;
|
|
41
|
-
return useThemedChildren(themeState, children, props);
|
|
41
|
+
return useThemedChildren(themeState, children, props, isRoot);
|
|
42
42
|
}
|
|
43
|
-
function useThemedChildren(themeState, children, options) {
|
|
43
|
+
function useThemedChildren(themeState, children, options, isRoot = false) {
|
|
44
44
|
const { themeManager, isNewTheme, className, theme } = themeState;
|
|
45
45
|
const { shallow, forceClassName } = options;
|
|
46
46
|
const hasEverThemed = (0, import_useServerHooks.useServerRef)(false);
|
|
47
47
|
if (isNewTheme) {
|
|
48
48
|
hasEverThemed.current = true;
|
|
49
49
|
}
|
|
50
|
-
if (isNewTheme || hasEverThemed.current || forceClassName) {
|
|
50
|
+
if (isNewTheme || hasEverThemed.current || forceClassName || isRoot) {
|
|
51
51
|
let next = import_react.Children.toArray(children);
|
|
52
52
|
if (shallow && themeManager) {
|
|
53
53
|
next = next.map((child) => {
|
|
@@ -69,6 +69,7 @@ function useThemedChildren(themeState, children, options) {
|
|
|
69
69
|
};
|
|
70
70
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${className || ""} _dsp_contents`, style: colorStyle, children: wrapped });
|
|
71
71
|
}
|
|
72
|
+
return wrapped;
|
|
72
73
|
}
|
|
73
74
|
return children;
|
|
74
75
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Theme.tsx"],
|
|
4
|
-
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\nimport { Children, cloneElement, isValidElement } from 'react'\n\nimport { variableToString } from '../createVariable.js'\nimport { ThemeManagerContext } from '../helpers/ThemeManagerContext.js'\nimport { useServerRef } from '../hooks/useServerHooks.js'\nimport { ChangedThemeResponse, useChangeThemeEffect } from '../hooks/useTheme.js'\nimport type { ThemeProps } from '../types.js'\n\nexport function Theme(props: ThemeProps) {\n // @ts-expect-error only for internal views\n if (props.disable) return props.children\n const isRoot = !!props['_isRoot']\n const themeState = useChangeThemeEffect(props, isRoot)\n const children = props['data-themeable']\n ? Children.map(props.children, (child) =>\n cloneElement(child, { ['data-themeable']: true })\n )\n : props.children\n\n return useThemedChildren(themeState, children, props)\n}\n\nexport function useThemedChildren(\n themeState: ChangedThemeResponse,\n children: any,\n options: {\n forceClassName?: boolean\n shallow?: boolean\n passPropsToChildren?: boolean\n }\n) {\n const { themeManager, isNewTheme, className, theme } = themeState\n const { shallow, forceClassName } = options\n const hasEverThemed = useServerRef(false)\n if (isNewTheme) {\n hasEverThemed.current = true\n }\n\n if (isNewTheme || hasEverThemed.current || forceClassName) {\n // be sure to memoize shouldReset to avoid reparenting\n let next = Children.toArray(children)\n\n // each children of these children wont get the theme\n if (shallow && themeManager) {\n next = next.map((child) => {\n return isValidElement(child)\n ? cloneElement(\n child,\n undefined,\n <Theme name={themeManager.state.parentName}>\n {(child as any).props.children}\n </Theme>\n )\n : child\n })\n }\n\n // tried this but themes css doesn't fully like it\n // if (shouldAttachClassName && options.passPropsToChildren) {\n // next = next.map((child: any) => {\n // const childStyle = child.props?.style\n // console.log('pass it down', className, child.props.className || '')\n // const newProps = {\n // className: (child.props.className || '') + ' ' + className,\n // style: Array.isArray(childStyle)\n // ? [colorStyle, ...childStyle]\n // : {\n // ...colorStyle,\n // ...childStyle,\n // },\n // }\n // return isValidElement(child) ? cloneElement(child as any, newProps) : child\n // })\n // }\n\n const wrapped = (\n <ThemeManagerContext.Provider value={themeManager}>\n {next}\n </ThemeManagerContext.Provider>\n )\n\n if (forceClassName === false) {\n return wrapped\n }\n\n if (isWeb && !options.passPropsToChildren) {\n // in order to provide currentColor, set color by default\n const themeColor = theme && isNewTheme ? variableToString(theme.color) : ''\n const colorStyle = {\n color: themeColor,\n }\n\n return (\n <span className={`${className || ''} _dsp_contents`} style={colorStyle}>\n {wrapped}\n </span>\n )\n }\n }\n\n return children\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\nimport { Children, cloneElement, isValidElement } from 'react'\n\nimport { variableToString } from '../createVariable.js'\nimport { ThemeManagerContext } from '../helpers/ThemeManagerContext.js'\nimport { useServerRef } from '../hooks/useServerHooks.js'\nimport { ChangedThemeResponse, useChangeThemeEffect } from '../hooks/useTheme.js'\nimport type { ThemeProps } from '../types.js'\n\nexport function Theme(props: ThemeProps) {\n // @ts-expect-error only for internal views\n if (props.disable) return props.children\n const isRoot = !!props['_isRoot']\n const themeState = useChangeThemeEffect(props, isRoot)\n const children = props['data-themeable']\n ? Children.map(props.children, (child) =>\n cloneElement(child, { ['data-themeable']: true })\n )\n : props.children\n\n return useThemedChildren(themeState, children, props, isRoot)\n}\n\nexport function useThemedChildren(\n themeState: ChangedThemeResponse,\n children: any,\n options: {\n forceClassName?: boolean\n shallow?: boolean\n passPropsToChildren?: boolean\n },\n isRoot = false\n) {\n const { themeManager, isNewTheme, className, theme } = themeState\n const { shallow, forceClassName } = options\n const hasEverThemed = useServerRef(false)\n if (isNewTheme) {\n hasEverThemed.current = true\n }\n\n if (isNewTheme || hasEverThemed.current || forceClassName || isRoot) {\n // be sure to memoize shouldReset to avoid reparenting\n let next = Children.toArray(children)\n\n // each children of these children wont get the theme\n if (shallow && themeManager) {\n next = next.map((child) => {\n return isValidElement(child)\n ? cloneElement(\n child,\n undefined,\n <Theme name={themeManager.state.parentName}>\n {(child as any).props.children}\n </Theme>\n )\n : child\n })\n }\n\n // tried this but themes css doesn't fully like it\n // if (shouldAttachClassName && options.passPropsToChildren) {\n // next = next.map((child: any) => {\n // const childStyle = child.props?.style\n // console.log('pass it down', className, child.props.className || '')\n // const newProps = {\n // className: (child.props.className || '') + ' ' + className,\n // style: Array.isArray(childStyle)\n // ? [colorStyle, ...childStyle]\n // : {\n // ...colorStyle,\n // ...childStyle,\n // },\n // }\n // return isValidElement(child) ? cloneElement(child as any, newProps) : child\n // })\n // }\n\n const wrapped = (\n <ThemeManagerContext.Provider value={themeManager}>\n {next}\n </ThemeManagerContext.Provider>\n )\n\n if (forceClassName === false) {\n return wrapped\n }\n\n if (isWeb && !options.passPropsToChildren) {\n // in order to provide currentColor, set color by default\n const themeColor = theme && isNewTheme ? variableToString(theme.color) : ''\n const colorStyle = {\n color: themeColor,\n }\n\n return (\n <span className={`${className || ''} _dsp_contents`} style={colorStyle}>\n {wrapped}\n </span>\n )\n }\n\n return wrapped\n }\n\n return children\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmDc;AAnDd,uBAAsB;AACtB,mBAAuD;AAEvD,4BAAiC;AACjC,iCAAoC;AACpC,4BAA6B;AAC7B,sBAA2D;AAGpD,SAAS,MAAM,OAAmB;AAEvC,MAAI,MAAM;AAAS,WAAO,MAAM;AAChC,QAAM,SAAS,CAAC,CAAC,MAAM,SAAS;AAChC,QAAM,iBAAa,sCAAqB,OAAO,MAAM;AACrD,QAAM,WAAW,MAAM,gBAAgB,IACnC,sBAAS;AAAA,IAAI,MAAM;AAAA,IAAU,CAAC,cAC5B,2BAAa,OAAO,EAAE,CAAC,gBAAgB,GAAG,KAAK,CAAC;AAAA,EAClD,IACA,MAAM;AAEV,SAAO,kBAAkB,YAAY,UAAU,OAAO,MAAM;AAC9D;AAEO,SAAS,kBACd,YACA,UACA,SAKA,SAAS,OACT;AACA,QAAM,EAAE,cAAc,YAAY,WAAW,MAAM,IAAI;AACvD,QAAM,EAAE,SAAS,eAAe,IAAI;AACpC,QAAM,oBAAgB,oCAAa,KAAK;AACxC,MAAI,YAAY;AACd,kBAAc,UAAU;AAAA,EAC1B;AAEA,MAAI,cAAc,cAAc,WAAW,kBAAkB,QAAQ;AAEnE,QAAI,OAAO,sBAAS,QAAQ,QAAQ;AAGpC,QAAI,WAAW,cAAc;AAC3B,aAAO,KAAK,IAAI,CAAC,UAAU;AACzB,mBAAO,6BAAe,KAAK,QACvB;AAAA,UACE;AAAA,UACA;AAAA,UACA,4CAAC,SAAM,MAAM,aAAa,MAAM,YAC5B,gBAAc,MAAM,UACxB;AAAA,QACF,IACA;AAAA,MACN,CAAC;AAAA,IACH;AAoBA,UAAM,UACJ,4CAAC,+CAAoB,UAApB,EAA6B,OAAO,cAClC,gBACH;AAGF,QAAI,mBAAmB,OAAO;AAC5B,aAAO;AAAA,IACT;AAEA,QAAI,0BAAS,CAAC,QAAQ,qBAAqB;AAEzC,YAAM,aAAa,SAAS,iBAAa,wCAAiB,MAAM,KAAK,IAAI;AACzE,YAAM,aAAa;AAAA,QACjB,OAAO;AAAA,MACT;AAEA,aACE,4CAAC,UAAK,WAAW,GAAG,aAAa,oBAAoB,OAAO,YACzD,mBACH;AAAA,IAEJ;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isWeb } from "@tamagui/constants";
|
|
1
2
|
import { getConfig } from "../config.js";
|
|
2
3
|
import { expandStyle } from "./expandStyle.js";
|
|
3
4
|
import { normalizeShadow } from "./normalizeShadow";
|
|
@@ -36,12 +37,13 @@ function fixStyles(style) {
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
}
|
|
40
|
+
const nativeStyle = isWeb ? null : "borderStyle";
|
|
39
41
|
const borderDefaults = {
|
|
40
42
|
borderWidth: "borderStyle",
|
|
41
|
-
borderBottomWidth: "borderBottomStyle",
|
|
42
|
-
borderTopWidth: "borderTopStyle",
|
|
43
|
-
borderLeftWidth: "borderLeftStyle",
|
|
44
|
-
borderRightWidth: "borderRightStyle"
|
|
43
|
+
borderBottomWidth: nativeStyle || "borderBottomStyle",
|
|
44
|
+
borderTopWidth: nativeStyle || "borderTopStyle",
|
|
45
|
+
borderLeftWidth: nativeStyle || "borderLeftStyle",
|
|
46
|
+
borderRightWidth: nativeStyle || "borderRightStyle"
|
|
45
47
|
};
|
|
46
48
|
export {
|
|
47
49
|
expandStyles,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/expandStyles.ts"],
|
|
4
|
-
"sourcesContent": ["import { getConfig } from '../config.js'\nimport { expandStyle } from './expandStyle.js'\nimport { normalizeShadow } from './normalizeShadow'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\nimport { pseudoDescriptors } from './pseudoDescriptors.js'\n\nlet shorthands: Record<string, string> | null = null\n\n/**\n * This is what you want to run before Object.assign() a style onto another.\n * It does the following:\n * 1. Turns user shorthands into longhands, ie px = paddingHorizontal\n * 2. Normalizes various inconsistent styles to be more consistent\n * 3. Expands react-native shorthands, ie paddingHorizontal => paddingLeft, paddingRight\n */\n\nexport function expandStyles(style: Record<string, any>, config = getConfig()) {\n const res: Record<string, any> = {}\n\n for (let key in style) {\n shorthands = shorthands || (config ? config.shorthands : null)\n if (shorthands) {\n key = shorthands[key] || key\n }\n if (key in pseudoDescriptors) {\n res[key] = expandStyles(style[key])\n continue\n }\n const val = normalizeValueWithProperty(style[key], key)\n // expand react-native shorthands\n const out = expandStyle(key, val)\n if (out) {\n Object.assign(res, Object.fromEntries(out))\n } else {\n res[key] = val\n }\n }\n\n fixStyles(res)\n\n return res\n}\n\nexport function fixStyles(style: Record<string, any>) {\n if (\n style.shadowRadius ||\n style.shadowColor ||\n style.shadowOpacity ||\n style.shadowOffset\n ) {\n Object.assign(style, normalizeShadow(style))\n }\n\n // TODO could be native-only\n // ensure border style set by default to solid\n for (const key in borderDefaults) {\n if (key in style && !style[borderDefaults[key]]) {\n style[borderDefaults[key]] = 'solid'\n }\n }\n}\n\nconst borderDefaults = {\n borderWidth: 'borderStyle',\n borderBottomWidth: 'borderBottomStyle',\n borderTopWidth: 'borderTopStyle',\n borderLeftWidth: 'borderLeftStyle',\n borderRightWidth: 'borderRightStyle',\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;AAC3C,SAAS,yBAAyB;AAElC,IAAI,aAA4C;AAUzC,SAAS,aAAa,OAA4B,SAAS,UAAU,GAAG;AAC7E,QAAM,MAA2B,CAAC;AAElC,WAAS,OAAO,OAAO;AACrB,iBAAa,eAAe,SAAS,OAAO,aAAa;AACzD,QAAI,YAAY;AACd,YAAM,WAAW,GAAG,KAAK;AAAA,IAC3B;AACA,QAAI,OAAO,mBAAmB;AAC5B,UAAI,GAAG,IAAI,aAAa,MAAM,GAAG,CAAC;AAClC;AAAA,IACF;AACA,UAAM,MAAM,2BAA2B,MAAM,GAAG,GAAG,GAAG;AAEtD,UAAM,MAAM,YAAY,KAAK,GAAG;AAChC,QAAI,KAAK;AACP,aAAO,OAAO,KAAK,OAAO,YAAY,GAAG,CAAC;AAAA,IAC5C,OAAO;AACL,UAAI,GAAG,IAAI;AAAA,IACb;AAAA,EACF;AAEA,YAAU,GAAG;AAEb,SAAO;AACT;AAEO,SAAS,UAAU,OAA4B;AACpD,MACE,MAAM,gBACN,MAAM,eACN,MAAM,iBACN,MAAM,cACN;AACA,WAAO,OAAO,OAAO,gBAAgB,KAAK,CAAC;AAAA,EAC7C;AAIA,aAAW,OAAO,gBAAgB;AAChC,QAAI,OAAO,SAAS,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG;AAC/C,YAAM,eAAe,GAAG,CAAC,IAAI;AAAA,IAC/B;AAAA,EACF;AACF;
|
|
4
|
+
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\n\nimport { getConfig } from '../config.js'\nimport { expandStyle } from './expandStyle.js'\nimport { normalizeShadow } from './normalizeShadow'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\nimport { pseudoDescriptors } from './pseudoDescriptors.js'\n\nlet shorthands: Record<string, string> | null = null\n\n/**\n * This is what you want to run before Object.assign() a style onto another.\n * It does the following:\n * 1. Turns user shorthands into longhands, ie px = paddingHorizontal\n * 2. Normalizes various inconsistent styles to be more consistent\n * 3. Expands react-native shorthands, ie paddingHorizontal => paddingLeft, paddingRight\n */\n\nexport function expandStyles(style: Record<string, any>, config = getConfig()) {\n const res: Record<string, any> = {}\n\n for (let key in style) {\n shorthands = shorthands || (config ? config.shorthands : null)\n if (shorthands) {\n key = shorthands[key] || key\n }\n if (key in pseudoDescriptors) {\n res[key] = expandStyles(style[key])\n continue\n }\n const val = normalizeValueWithProperty(style[key], key)\n // expand react-native shorthands\n const out = expandStyle(key, val)\n if (out) {\n Object.assign(res, Object.fromEntries(out))\n } else {\n res[key] = val\n }\n }\n\n fixStyles(res)\n\n return res\n}\n\nexport function fixStyles(style: Record<string, any>) {\n if (\n style.shadowRadius ||\n style.shadowColor ||\n style.shadowOpacity ||\n style.shadowOffset\n ) {\n Object.assign(style, normalizeShadow(style))\n }\n\n // TODO could be native-only\n // ensure border style set by default to solid\n for (const key in borderDefaults) {\n if (key in style && !style[borderDefaults[key]]) {\n style[borderDefaults[key]] = 'solid'\n }\n }\n}\n\n// native doesn't support specific border edge style\nconst nativeStyle = isWeb ? null : 'borderStyle'\nconst borderDefaults = {\n borderWidth: 'borderStyle',\n borderBottomWidth: nativeStyle || 'borderBottomStyle',\n borderTopWidth: nativeStyle || 'borderTopStyle',\n borderLeftWidth: nativeStyle || 'borderLeftStyle',\n borderRightWidth: nativeStyle || 'borderRightStyle',\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,aAAa;AAEtB,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;AAC3C,SAAS,yBAAyB;AAElC,IAAI,aAA4C;AAUzC,SAAS,aAAa,OAA4B,SAAS,UAAU,GAAG;AAC7E,QAAM,MAA2B,CAAC;AAElC,WAAS,OAAO,OAAO;AACrB,iBAAa,eAAe,SAAS,OAAO,aAAa;AACzD,QAAI,YAAY;AACd,YAAM,WAAW,GAAG,KAAK;AAAA,IAC3B;AACA,QAAI,OAAO,mBAAmB;AAC5B,UAAI,GAAG,IAAI,aAAa,MAAM,GAAG,CAAC;AAClC;AAAA,IACF;AACA,UAAM,MAAM,2BAA2B,MAAM,GAAG,GAAG,GAAG;AAEtD,UAAM,MAAM,YAAY,KAAK,GAAG;AAChC,QAAI,KAAK;AACP,aAAO,OAAO,KAAK,OAAO,YAAY,GAAG,CAAC;AAAA,IAC5C,OAAO;AACL,UAAI,GAAG,IAAI;AAAA,IACb;AAAA,EACF;AAEA,YAAU,GAAG;AAEb,SAAO;AACT;AAEO,SAAS,UAAU,OAA4B;AACpD,MACE,MAAM,gBACN,MAAM,eACN,MAAM,iBACN,MAAM,cACN;AACA,WAAO,OAAO,OAAO,gBAAgB,KAAK,CAAC;AAAA,EAC7C;AAIA,aAAW,OAAO,gBAAgB;AAChC,QAAI,OAAO,SAAS,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG;AAC/C,YAAM,eAAe,GAAG,CAAC,IAAI;AAAA,IAC/B;AAAA,EACF;AACF;AAGA,MAAM,cAAc,QAAQ,OAAO;AACnC,MAAM,iBAAiB;AAAA,EACrB,aAAa;AAAA,EACb,mBAAmB,eAAe;AAAA,EAClC,gBAAgB,eAAe;AAAA,EAC/B,iBAAiB,eAAe;AAAA,EAChC,kBAAkB,eAAe;AACnC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isWeb } from "@tamagui/constants";
|
|
1
2
|
import { getConfig } from "../config.js";
|
|
2
3
|
import { expandStyle } from "./expandStyle.js";
|
|
3
4
|
import { normalizeShadow } from "./normalizeShadow";
|
|
@@ -36,12 +37,13 @@ function fixStyles(style) {
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
}
|
|
40
|
+
const nativeStyle = isWeb ? null : "borderStyle";
|
|
39
41
|
const borderDefaults = {
|
|
40
42
|
borderWidth: "borderStyle",
|
|
41
|
-
borderBottomWidth: "borderBottomStyle",
|
|
42
|
-
borderTopWidth: "borderTopStyle",
|
|
43
|
-
borderLeftWidth: "borderLeftStyle",
|
|
44
|
-
borderRightWidth: "borderRightStyle"
|
|
43
|
+
borderBottomWidth: nativeStyle || "borderBottomStyle",
|
|
44
|
+
borderTopWidth: nativeStyle || "borderTopStyle",
|
|
45
|
+
borderLeftWidth: nativeStyle || "borderLeftStyle",
|
|
46
|
+
borderRightWidth: nativeStyle || "borderRightStyle"
|
|
45
47
|
};
|
|
46
48
|
export {
|
|
47
49
|
expandStyles,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/expandStyles.ts"],
|
|
4
|
-
"sourcesContent": ["import { getConfig } from '../config.js'\nimport { expandStyle } from './expandStyle.js'\nimport { normalizeShadow } from './normalizeShadow'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\nimport { pseudoDescriptors } from './pseudoDescriptors.js'\n\nlet shorthands: Record<string, string> | null = null\n\n/**\n * This is what you want to run before Object.assign() a style onto another.\n * It does the following:\n * 1. Turns user shorthands into longhands, ie px = paddingHorizontal\n * 2. Normalizes various inconsistent styles to be more consistent\n * 3. Expands react-native shorthands, ie paddingHorizontal => paddingLeft, paddingRight\n */\n\nexport function expandStyles(style: Record<string, any>, config = getConfig()) {\n const res: Record<string, any> = {}\n\n for (let key in style) {\n shorthands = shorthands || (config ? config.shorthands : null)\n if (shorthands) {\n key = shorthands[key] || key\n }\n if (key in pseudoDescriptors) {\n res[key] = expandStyles(style[key])\n continue\n }\n const val = normalizeValueWithProperty(style[key], key)\n // expand react-native shorthands\n const out = expandStyle(key, val)\n if (out) {\n Object.assign(res, Object.fromEntries(out))\n } else {\n res[key] = val\n }\n }\n\n fixStyles(res)\n\n return res\n}\n\nexport function fixStyles(style: Record<string, any>) {\n if (\n style.shadowRadius ||\n style.shadowColor ||\n style.shadowOpacity ||\n style.shadowOffset\n ) {\n Object.assign(style, normalizeShadow(style))\n }\n\n // TODO could be native-only\n // ensure border style set by default to solid\n for (const key in borderDefaults) {\n if (key in style && !style[borderDefaults[key]]) {\n style[borderDefaults[key]] = 'solid'\n }\n }\n}\n\nconst borderDefaults = {\n borderWidth: 'borderStyle',\n borderBottomWidth: 'borderBottomStyle',\n borderTopWidth: 'borderTopStyle',\n borderLeftWidth: 'borderLeftStyle',\n borderRightWidth: 'borderRightStyle',\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;AAC3C,SAAS,yBAAyB;AAElC,IAAI,aAA4C;AAUzC,SAAS,aAAa,OAA4B,SAAS,UAAU,GAAG;AAC7E,QAAM,MAA2B,CAAC;AAElC,WAAS,OAAO,OAAO;AACrB,iBAAa,eAAe,SAAS,OAAO,aAAa;AACzD,QAAI,YAAY;AACd,YAAM,WAAW,GAAG,KAAK;AAAA,IAC3B;AACA,QAAI,OAAO,mBAAmB;AAC5B,UAAI,GAAG,IAAI,aAAa,MAAM,GAAG,CAAC;AAClC;AAAA,IACF;AACA,UAAM,MAAM,2BAA2B,MAAM,GAAG,GAAG,GAAG;AAEtD,UAAM,MAAM,YAAY,KAAK,GAAG;AAChC,QAAI,KAAK;AACP,aAAO,OAAO,KAAK,OAAO,YAAY,GAAG,CAAC;AAAA,IAC5C,OAAO;AACL,UAAI,GAAG,IAAI;AAAA,IACb;AAAA,EACF;AAEA,YAAU,GAAG;AAEb,SAAO;AACT;AAEO,SAAS,UAAU,OAA4B;AACpD,MACE,MAAM,gBACN,MAAM,eACN,MAAM,iBACN,MAAM,cACN;AACA,WAAO,OAAO,OAAO,gBAAgB,KAAK,CAAC;AAAA,EAC7C;AAIA,aAAW,OAAO,gBAAgB;AAChC,QAAI,OAAO,SAAS,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG;AAC/C,YAAM,eAAe,GAAG,CAAC,IAAI;AAAA,IAC/B;AAAA,EACF;AACF;
|
|
4
|
+
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\n\nimport { getConfig } from '../config.js'\nimport { expandStyle } from './expandStyle.js'\nimport { normalizeShadow } from './normalizeShadow'\nimport { normalizeValueWithProperty } from './normalizeValueWithProperty.js'\nimport { pseudoDescriptors } from './pseudoDescriptors.js'\n\nlet shorthands: Record<string, string> | null = null\n\n/**\n * This is what you want to run before Object.assign() a style onto another.\n * It does the following:\n * 1. Turns user shorthands into longhands, ie px = paddingHorizontal\n * 2. Normalizes various inconsistent styles to be more consistent\n * 3. Expands react-native shorthands, ie paddingHorizontal => paddingLeft, paddingRight\n */\n\nexport function expandStyles(style: Record<string, any>, config = getConfig()) {\n const res: Record<string, any> = {}\n\n for (let key in style) {\n shorthands = shorthands || (config ? config.shorthands : null)\n if (shorthands) {\n key = shorthands[key] || key\n }\n if (key in pseudoDescriptors) {\n res[key] = expandStyles(style[key])\n continue\n }\n const val = normalizeValueWithProperty(style[key], key)\n // expand react-native shorthands\n const out = expandStyle(key, val)\n if (out) {\n Object.assign(res, Object.fromEntries(out))\n } else {\n res[key] = val\n }\n }\n\n fixStyles(res)\n\n return res\n}\n\nexport function fixStyles(style: Record<string, any>) {\n if (\n style.shadowRadius ||\n style.shadowColor ||\n style.shadowOpacity ||\n style.shadowOffset\n ) {\n Object.assign(style, normalizeShadow(style))\n }\n\n // TODO could be native-only\n // ensure border style set by default to solid\n for (const key in borderDefaults) {\n if (key in style && !style[borderDefaults[key]]) {\n style[borderDefaults[key]] = 'solid'\n }\n }\n}\n\n// native doesn't support specific border edge style\nconst nativeStyle = isWeb ? null : 'borderStyle'\nconst borderDefaults = {\n borderWidth: 'borderStyle',\n borderBottomWidth: nativeStyle || 'borderBottomStyle',\n borderTopWidth: nativeStyle || 'borderTopStyle',\n borderLeftWidth: nativeStyle || 'borderLeftStyle',\n borderRightWidth: nativeStyle || 'borderRightStyle',\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,aAAa;AAEtB,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,kCAAkC;AAC3C,SAAS,yBAAyB;AAElC,IAAI,aAA4C;AAUzC,SAAS,aAAa,OAA4B,SAAS,UAAU,GAAG;AAC7E,QAAM,MAA2B,CAAC;AAElC,WAAS,OAAO,OAAO;AACrB,iBAAa,eAAe,SAAS,OAAO,aAAa;AACzD,QAAI,YAAY;AACd,YAAM,WAAW,GAAG,KAAK;AAAA,IAC3B;AACA,QAAI,OAAO,mBAAmB;AAC5B,UAAI,GAAG,IAAI,aAAa,MAAM,GAAG,CAAC;AAClC;AAAA,IACF;AACA,UAAM,MAAM,2BAA2B,MAAM,GAAG,GAAG,GAAG;AAEtD,UAAM,MAAM,YAAY,KAAK,GAAG;AAChC,QAAI,KAAK;AACP,aAAO,OAAO,KAAK,OAAO,YAAY,GAAG,CAAC;AAAA,IAC5C,OAAO;AACL,UAAI,GAAG,IAAI;AAAA,IACb;AAAA,EACF;AAEA,YAAU,GAAG;AAEb,SAAO;AACT;AAEO,SAAS,UAAU,OAA4B;AACpD,MACE,MAAM,gBACN,MAAM,eACN,MAAM,iBACN,MAAM,cACN;AACA,WAAO,OAAO,OAAO,gBAAgB,KAAK,CAAC;AAAA,EAC7C;AAIA,aAAW,OAAO,gBAAgB;AAChC,QAAI,OAAO,SAAS,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG;AAC/C,YAAM,eAAe,GAAG,CAAC,IAAI;AAAA,IAC/B;AAAA,EACF;AACF;AAGA,MAAM,cAAc,QAAQ,OAAO;AACnC,MAAM,iBAAiB;AAAA,EACrB,aAAa;AAAA,EACb,mBAAmB,eAAe;AAAA,EAClC,gBAAgB,eAAe;AAAA,EAC/B,iBAAiB,eAAe;AAAA,EAChC,kBAAkB,eAAe;AACnC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/views/Theme.js
CHANGED
|
@@ -14,16 +14,16 @@ function Theme(props) {
|
|
|
14
14
|
props.children,
|
|
15
15
|
(child) => cloneElement(child, { ["data-themeable"]: true })
|
|
16
16
|
) : props.children;
|
|
17
|
-
return useThemedChildren(themeState, children, props);
|
|
17
|
+
return useThemedChildren(themeState, children, props, isRoot);
|
|
18
18
|
}
|
|
19
|
-
function useThemedChildren(themeState, children, options) {
|
|
19
|
+
function useThemedChildren(themeState, children, options, isRoot = false) {
|
|
20
20
|
const { themeManager, isNewTheme, className, theme } = themeState;
|
|
21
21
|
const { shallow, forceClassName } = options;
|
|
22
22
|
const hasEverThemed = useServerRef(false);
|
|
23
23
|
if (isNewTheme) {
|
|
24
24
|
hasEverThemed.current = true;
|
|
25
25
|
}
|
|
26
|
-
if (isNewTheme || hasEverThemed.current || forceClassName) {
|
|
26
|
+
if (isNewTheme || hasEverThemed.current || forceClassName || isRoot) {
|
|
27
27
|
let next = Children.toArray(children);
|
|
28
28
|
if (shallow && themeManager) {
|
|
29
29
|
next = next.map((child) => {
|
|
@@ -45,6 +45,7 @@ function useThemedChildren(themeState, children, options) {
|
|
|
45
45
|
};
|
|
46
46
|
return /* @__PURE__ */ jsx("span", { className: `${className || ""} _dsp_contents`, style: colorStyle, children: wrapped });
|
|
47
47
|
}
|
|
48
|
+
return wrapped;
|
|
48
49
|
}
|
|
49
50
|
return children;
|
|
50
51
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Theme.tsx"],
|
|
4
|
-
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\nimport { Children, cloneElement, isValidElement } from 'react'\n\nimport { variableToString } from '../createVariable.js'\nimport { ThemeManagerContext } from '../helpers/ThemeManagerContext.js'\nimport { useServerRef } from '../hooks/useServerHooks.js'\nimport { ChangedThemeResponse, useChangeThemeEffect } from '../hooks/useTheme.js'\nimport type { ThemeProps } from '../types.js'\n\nexport function Theme(props: ThemeProps) {\n // @ts-expect-error only for internal views\n if (props.disable) return props.children\n const isRoot = !!props['_isRoot']\n const themeState = useChangeThemeEffect(props, isRoot)\n const children = props['data-themeable']\n ? Children.map(props.children, (child) =>\n cloneElement(child, { ['data-themeable']: true })\n )\n : props.children\n\n return useThemedChildren(themeState, children, props)\n}\n\nexport function useThemedChildren(\n themeState: ChangedThemeResponse,\n children: any,\n options: {\n forceClassName?: boolean\n shallow?: boolean\n passPropsToChildren?: boolean\n }\n) {\n const { themeManager, isNewTheme, className, theme } = themeState\n const { shallow, forceClassName } = options\n const hasEverThemed = useServerRef(false)\n if (isNewTheme) {\n hasEverThemed.current = true\n }\n\n if (isNewTheme || hasEverThemed.current || forceClassName) {\n // be sure to memoize shouldReset to avoid reparenting\n let next = Children.toArray(children)\n\n // each children of these children wont get the theme\n if (shallow && themeManager) {\n next = next.map((child) => {\n return isValidElement(child)\n ? cloneElement(\n child,\n undefined,\n <Theme name={themeManager.state.parentName}>\n {(child as any).props.children}\n </Theme>\n )\n : child\n })\n }\n\n // tried this but themes css doesn't fully like it\n // if (shouldAttachClassName && options.passPropsToChildren) {\n // next = next.map((child: any) => {\n // const childStyle = child.props?.style\n // console.log('pass it down', className, child.props.className || '')\n // const newProps = {\n // className: (child.props.className || '') + ' ' + className,\n // style: Array.isArray(childStyle)\n // ? [colorStyle, ...childStyle]\n // : {\n // ...colorStyle,\n // ...childStyle,\n // },\n // }\n // return isValidElement(child) ? cloneElement(child as any, newProps) : child\n // })\n // }\n\n const wrapped = (\n <ThemeManagerContext.Provider value={themeManager}>\n {next}\n </ThemeManagerContext.Provider>\n )\n\n if (forceClassName === false) {\n return wrapped\n }\n\n if (isWeb && !options.passPropsToChildren) {\n // in order to provide currentColor, set color by default\n const themeColor = theme && isNewTheme ? variableToString(theme.color) : ''\n const colorStyle = {\n color: themeColor,\n }\n\n return (\n <span className={`${className || ''} _dsp_contents`} style={colorStyle}>\n {wrapped}\n </span>\n )\n }\n }\n\n return children\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\nimport { Children, cloneElement, isValidElement } from 'react'\n\nimport { variableToString } from '../createVariable.js'\nimport { ThemeManagerContext } from '../helpers/ThemeManagerContext.js'\nimport { useServerRef } from '../hooks/useServerHooks.js'\nimport { ChangedThemeResponse, useChangeThemeEffect } from '../hooks/useTheme.js'\nimport type { ThemeProps } from '../types.js'\n\nexport function Theme(props: ThemeProps) {\n // @ts-expect-error only for internal views\n if (props.disable) return props.children\n const isRoot = !!props['_isRoot']\n const themeState = useChangeThemeEffect(props, isRoot)\n const children = props['data-themeable']\n ? Children.map(props.children, (child) =>\n cloneElement(child, { ['data-themeable']: true })\n )\n : props.children\n\n return useThemedChildren(themeState, children, props, isRoot)\n}\n\nexport function useThemedChildren(\n themeState: ChangedThemeResponse,\n children: any,\n options: {\n forceClassName?: boolean\n shallow?: boolean\n passPropsToChildren?: boolean\n },\n isRoot = false\n) {\n const { themeManager, isNewTheme, className, theme } = themeState\n const { shallow, forceClassName } = options\n const hasEverThemed = useServerRef(false)\n if (isNewTheme) {\n hasEverThemed.current = true\n }\n\n if (isNewTheme || hasEverThemed.current || forceClassName || isRoot) {\n // be sure to memoize shouldReset to avoid reparenting\n let next = Children.toArray(children)\n\n // each children of these children wont get the theme\n if (shallow && themeManager) {\n next = next.map((child) => {\n return isValidElement(child)\n ? cloneElement(\n child,\n undefined,\n <Theme name={themeManager.state.parentName}>\n {(child as any).props.children}\n </Theme>\n )\n : child\n })\n }\n\n // tried this but themes css doesn't fully like it\n // if (shouldAttachClassName && options.passPropsToChildren) {\n // next = next.map((child: any) => {\n // const childStyle = child.props?.style\n // console.log('pass it down', className, child.props.className || '')\n // const newProps = {\n // className: (child.props.className || '') + ' ' + className,\n // style: Array.isArray(childStyle)\n // ? [colorStyle, ...childStyle]\n // : {\n // ...colorStyle,\n // ...childStyle,\n // },\n // }\n // return isValidElement(child) ? cloneElement(child as any, newProps) : child\n // })\n // }\n\n const wrapped = (\n <ThemeManagerContext.Provider value={themeManager}>\n {next}\n </ThemeManagerContext.Provider>\n )\n\n if (forceClassName === false) {\n return wrapped\n }\n\n if (isWeb && !options.passPropsToChildren) {\n // in order to provide currentColor, set color by default\n const themeColor = theme && isNewTheme ? variableToString(theme.color) : ''\n const colorStyle = {\n color: themeColor,\n }\n\n return (\n <span className={`${className || ''} _dsp_contents`} style={colorStyle}>\n {wrapped}\n </span>\n )\n }\n\n return wrapped\n }\n\n return children\n}\n"],
|
|
5
|
+
"mappings": "AAmDc;AAnDd,SAAS,aAAa;AACtB,SAAS,UAAU,cAAc,sBAAsB;AAEvD,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAC7B,SAA+B,4BAA4B;AAGpD,SAAS,MAAM,OAAmB;AAEvC,MAAI,MAAM;AAAS,WAAO,MAAM;AAChC,QAAM,SAAS,CAAC,CAAC,MAAM,SAAS;AAChC,QAAM,aAAa,qBAAqB,OAAO,MAAM;AACrD,QAAM,WAAW,MAAM,gBAAgB,IACnC,SAAS;AAAA,IAAI,MAAM;AAAA,IAAU,CAAC,UAC5B,aAAa,OAAO,EAAE,CAAC,gBAAgB,GAAG,KAAK,CAAC;AAAA,EAClD,IACA,MAAM;AAEV,SAAO,kBAAkB,YAAY,UAAU,OAAO,MAAM;AAC9D;AAEO,SAAS,kBACd,YACA,UACA,SAKA,SAAS,OACT;AACA,QAAM,EAAE,cAAc,YAAY,WAAW,MAAM,IAAI;AACvD,QAAM,EAAE,SAAS,eAAe,IAAI;AACpC,QAAM,gBAAgB,aAAa,KAAK;AACxC,MAAI,YAAY;AACd,kBAAc,UAAU;AAAA,EAC1B;AAEA,MAAI,cAAc,cAAc,WAAW,kBAAkB,QAAQ;AAEnE,QAAI,OAAO,SAAS,QAAQ,QAAQ;AAGpC,QAAI,WAAW,cAAc;AAC3B,aAAO,KAAK,IAAI,CAAC,UAAU;AACzB,eAAO,eAAe,KAAK,IACvB;AAAA,UACE;AAAA,UACA;AAAA,UACA,oBAAC,SAAM,MAAM,aAAa,MAAM,YAC5B,gBAAc,MAAM,UACxB;AAAA,QACF,IACA;AAAA,MACN,CAAC;AAAA,IACH;AAoBA,UAAM,UACJ,oBAAC,oBAAoB,UAApB,EAA6B,OAAO,cAClC,gBACH;AAGF,QAAI,mBAAmB,OAAO;AAC5B,aAAO;AAAA,IACT;AAEA,QAAI,SAAS,CAAC,QAAQ,qBAAqB;AAEzC,YAAM,aAAa,SAAS,aAAa,iBAAiB,MAAM,KAAK,IAAI;AACzE,YAAM,aAAa;AAAA,QACjB,OAAO;AAAA,MACT;AAEA,aACE,oBAAC,UAAK,WAAW,GAAG,aAAa,oBAAoB,OAAO,YACzD,mBACH;AAAA,IAEJ;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/views/Theme.mjs
CHANGED
|
@@ -14,16 +14,16 @@ function Theme(props) {
|
|
|
14
14
|
props.children,
|
|
15
15
|
(child) => cloneElement(child, { ["data-themeable"]: true })
|
|
16
16
|
) : props.children;
|
|
17
|
-
return useThemedChildren(themeState, children, props);
|
|
17
|
+
return useThemedChildren(themeState, children, props, isRoot);
|
|
18
18
|
}
|
|
19
|
-
function useThemedChildren(themeState, children, options) {
|
|
19
|
+
function useThemedChildren(themeState, children, options, isRoot = false) {
|
|
20
20
|
const { themeManager, isNewTheme, className, theme } = themeState;
|
|
21
21
|
const { shallow, forceClassName } = options;
|
|
22
22
|
const hasEverThemed = useServerRef(false);
|
|
23
23
|
if (isNewTheme) {
|
|
24
24
|
hasEverThemed.current = true;
|
|
25
25
|
}
|
|
26
|
-
if (isNewTheme || hasEverThemed.current || forceClassName) {
|
|
26
|
+
if (isNewTheme || hasEverThemed.current || forceClassName || isRoot) {
|
|
27
27
|
let next = Children.toArray(children);
|
|
28
28
|
if (shallow && themeManager) {
|
|
29
29
|
next = next.map((child) => {
|
|
@@ -45,6 +45,7 @@ function useThemedChildren(themeState, children, options) {
|
|
|
45
45
|
};
|
|
46
46
|
return /* @__PURE__ */ jsx("span", { className: `${className || ""} _dsp_contents`, style: colorStyle, children: wrapped });
|
|
47
47
|
}
|
|
48
|
+
return wrapped;
|
|
48
49
|
}
|
|
49
50
|
return children;
|
|
50
51
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Theme.tsx"],
|
|
4
|
-
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\nimport { Children, cloneElement, isValidElement } from 'react'\n\nimport { variableToString } from '../createVariable.js'\nimport { ThemeManagerContext } from '../helpers/ThemeManagerContext.js'\nimport { useServerRef } from '../hooks/useServerHooks.js'\nimport { ChangedThemeResponse, useChangeThemeEffect } from '../hooks/useTheme.js'\nimport type { ThemeProps } from '../types.js'\n\nexport function Theme(props: ThemeProps) {\n // @ts-expect-error only for internal views\n if (props.disable) return props.children\n const isRoot = !!props['_isRoot']\n const themeState = useChangeThemeEffect(props, isRoot)\n const children = props['data-themeable']\n ? Children.map(props.children, (child) =>\n cloneElement(child, { ['data-themeable']: true })\n )\n : props.children\n\n return useThemedChildren(themeState, children, props)\n}\n\nexport function useThemedChildren(\n themeState: ChangedThemeResponse,\n children: any,\n options: {\n forceClassName?: boolean\n shallow?: boolean\n passPropsToChildren?: boolean\n }\n) {\n const { themeManager, isNewTheme, className, theme } = themeState\n const { shallow, forceClassName } = options\n const hasEverThemed = useServerRef(false)\n if (isNewTheme) {\n hasEverThemed.current = true\n }\n\n if (isNewTheme || hasEverThemed.current || forceClassName) {\n // be sure to memoize shouldReset to avoid reparenting\n let next = Children.toArray(children)\n\n // each children of these children wont get the theme\n if (shallow && themeManager) {\n next = next.map((child) => {\n return isValidElement(child)\n ? cloneElement(\n child,\n undefined,\n <Theme name={themeManager.state.parentName}>\n {(child as any).props.children}\n </Theme>\n )\n : child\n })\n }\n\n // tried this but themes css doesn't fully like it\n // if (shouldAttachClassName && options.passPropsToChildren) {\n // next = next.map((child: any) => {\n // const childStyle = child.props?.style\n // console.log('pass it down', className, child.props.className || '')\n // const newProps = {\n // className: (child.props.className || '') + ' ' + className,\n // style: Array.isArray(childStyle)\n // ? [colorStyle, ...childStyle]\n // : {\n // ...colorStyle,\n // ...childStyle,\n // },\n // }\n // return isValidElement(child) ? cloneElement(child as any, newProps) : child\n // })\n // }\n\n const wrapped = (\n <ThemeManagerContext.Provider value={themeManager}>\n {next}\n </ThemeManagerContext.Provider>\n )\n\n if (forceClassName === false) {\n return wrapped\n }\n\n if (isWeb && !options.passPropsToChildren) {\n // in order to provide currentColor, set color by default\n const themeColor = theme && isNewTheme ? variableToString(theme.color) : ''\n const colorStyle = {\n color: themeColor,\n }\n\n return (\n <span className={`${className || ''} _dsp_contents`} style={colorStyle}>\n {wrapped}\n </span>\n )\n }\n }\n\n return children\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\nimport { Children, cloneElement, isValidElement } from 'react'\n\nimport { variableToString } from '../createVariable.js'\nimport { ThemeManagerContext } from '../helpers/ThemeManagerContext.js'\nimport { useServerRef } from '../hooks/useServerHooks.js'\nimport { ChangedThemeResponse, useChangeThemeEffect } from '../hooks/useTheme.js'\nimport type { ThemeProps } from '../types.js'\n\nexport function Theme(props: ThemeProps) {\n // @ts-expect-error only for internal views\n if (props.disable) return props.children\n const isRoot = !!props['_isRoot']\n const themeState = useChangeThemeEffect(props, isRoot)\n const children = props['data-themeable']\n ? Children.map(props.children, (child) =>\n cloneElement(child, { ['data-themeable']: true })\n )\n : props.children\n\n return useThemedChildren(themeState, children, props, isRoot)\n}\n\nexport function useThemedChildren(\n themeState: ChangedThemeResponse,\n children: any,\n options: {\n forceClassName?: boolean\n shallow?: boolean\n passPropsToChildren?: boolean\n },\n isRoot = false\n) {\n const { themeManager, isNewTheme, className, theme } = themeState\n const { shallow, forceClassName } = options\n const hasEverThemed = useServerRef(false)\n if (isNewTheme) {\n hasEverThemed.current = true\n }\n\n if (isNewTheme || hasEverThemed.current || forceClassName || isRoot) {\n // be sure to memoize shouldReset to avoid reparenting\n let next = Children.toArray(children)\n\n // each children of these children wont get the theme\n if (shallow && themeManager) {\n next = next.map((child) => {\n return isValidElement(child)\n ? cloneElement(\n child,\n undefined,\n <Theme name={themeManager.state.parentName}>\n {(child as any).props.children}\n </Theme>\n )\n : child\n })\n }\n\n // tried this but themes css doesn't fully like it\n // if (shouldAttachClassName && options.passPropsToChildren) {\n // next = next.map((child: any) => {\n // const childStyle = child.props?.style\n // console.log('pass it down', className, child.props.className || '')\n // const newProps = {\n // className: (child.props.className || '') + ' ' + className,\n // style: Array.isArray(childStyle)\n // ? [colorStyle, ...childStyle]\n // : {\n // ...colorStyle,\n // ...childStyle,\n // },\n // }\n // return isValidElement(child) ? cloneElement(child as any, newProps) : child\n // })\n // }\n\n const wrapped = (\n <ThemeManagerContext.Provider value={themeManager}>\n {next}\n </ThemeManagerContext.Provider>\n )\n\n if (forceClassName === false) {\n return wrapped\n }\n\n if (isWeb && !options.passPropsToChildren) {\n // in order to provide currentColor, set color by default\n const themeColor = theme && isNewTheme ? variableToString(theme.color) : ''\n const colorStyle = {\n color: themeColor,\n }\n\n return (\n <span className={`${className || ''} _dsp_contents`} style={colorStyle}>\n {wrapped}\n </span>\n )\n }\n\n return wrapped\n }\n\n return children\n}\n"],
|
|
5
|
+
"mappings": "AAmDc;AAnDd,SAAS,aAAa;AACtB,SAAS,UAAU,cAAc,sBAAsB;AAEvD,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAC7B,SAA+B,4BAA4B;AAGpD,SAAS,MAAM,OAAmB;AAEvC,MAAI,MAAM;AAAS,WAAO,MAAM;AAChC,QAAM,SAAS,CAAC,CAAC,MAAM,SAAS;AAChC,QAAM,aAAa,qBAAqB,OAAO,MAAM;AACrD,QAAM,WAAW,MAAM,gBAAgB,IACnC,SAAS;AAAA,IAAI,MAAM;AAAA,IAAU,CAAC,UAC5B,aAAa,OAAO,EAAE,CAAC,gBAAgB,GAAG,KAAK,CAAC;AAAA,EAClD,IACA,MAAM;AAEV,SAAO,kBAAkB,YAAY,UAAU,OAAO,MAAM;AAC9D;AAEO,SAAS,kBACd,YACA,UACA,SAKA,SAAS,OACT;AACA,QAAM,EAAE,cAAc,YAAY,WAAW,MAAM,IAAI;AACvD,QAAM,EAAE,SAAS,eAAe,IAAI;AACpC,QAAM,gBAAgB,aAAa,KAAK;AACxC,MAAI,YAAY;AACd,kBAAc,UAAU;AAAA,EAC1B;AAEA,MAAI,cAAc,cAAc,WAAW,kBAAkB,QAAQ;AAEnE,QAAI,OAAO,SAAS,QAAQ,QAAQ;AAGpC,QAAI,WAAW,cAAc;AAC3B,aAAO,KAAK,IAAI,CAAC,UAAU;AACzB,eAAO,eAAe,KAAK,IACvB;AAAA,UACE;AAAA,UACA;AAAA,UACA,oBAAC,SAAM,MAAM,aAAa,MAAM,YAC5B,gBAAc,MAAM,UACxB;AAAA,QACF,IACA;AAAA,MACN,CAAC;AAAA,IACH;AAoBA,UAAM,UACJ,oBAAC,oBAAoB,UAApB,EAA6B,OAAO,cAClC,gBACH;AAGF,QAAI,mBAAmB,OAAO;AAC5B,aAAO;AAAA,IACT;AAEA,QAAI,SAAS,CAAC,QAAQ,qBAAqB;AAEzC,YAAM,aAAa,SAAS,aAAa,iBAAiB,MAAM,KAAK,IAAI;AACzE,YAAM,aAAa;AAAA,QACjB,OAAO;AAAA,MACT;AAEA,aACE,oBAAC,UAAK,WAAW,GAAG,aAAa,oBAAoB,OAAO,YACzD,mBACH;AAAA,IAEJ;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/web",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.24",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
"reset.css"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tamagui/compose-refs": "^1.5.
|
|
31
|
-
"@tamagui/constants": "^1.5.
|
|
32
|
-
"@tamagui/helpers": "^1.5.
|
|
33
|
-
"@tamagui/normalize-css-color": "^1.5.
|
|
34
|
-
"@tamagui/use-did-finish-ssr": "^1.5.
|
|
35
|
-
"@tamagui/use-event": "^1.5.
|
|
36
|
-
"@tamagui/use-force-update": "^1.5.
|
|
30
|
+
"@tamagui/compose-refs": "^1.5.24",
|
|
31
|
+
"@tamagui/constants": "^1.5.24",
|
|
32
|
+
"@tamagui/helpers": "^1.5.24",
|
|
33
|
+
"@tamagui/normalize-css-color": "^1.5.24",
|
|
34
|
+
"@tamagui/use-did-finish-ssr": "^1.5.24",
|
|
35
|
+
"@tamagui/use-event": "^1.5.24",
|
|
36
|
+
"@tamagui/use-force-update": "^1.5.24"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": "*"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tamagui/build": "^1.5.
|
|
42
|
+
"@tamagui/build": "^1.5.24",
|
|
43
43
|
"@testing-library/react": "^13.4.0",
|
|
44
44
|
"csstype": "^3.0.10",
|
|
45
45
|
"react": "^18.2.0",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { isWeb } from '@tamagui/constants'
|
|
2
|
+
|
|
1
3
|
import { getConfig } from '../config.js'
|
|
2
4
|
import { expandStyle } from './expandStyle.js'
|
|
3
5
|
import { normalizeShadow } from './normalizeShadow'
|
|
@@ -60,10 +62,12 @@ export function fixStyles(style: Record<string, any>) {
|
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
64
|
|
|
65
|
+
// native doesn't support specific border edge style
|
|
66
|
+
const nativeStyle = isWeb ? null : 'borderStyle'
|
|
63
67
|
const borderDefaults = {
|
|
64
68
|
borderWidth: 'borderStyle',
|
|
65
|
-
borderBottomWidth: 'borderBottomStyle',
|
|
66
|
-
borderTopWidth: 'borderTopStyle',
|
|
67
|
-
borderLeftWidth: 'borderLeftStyle',
|
|
68
|
-
borderRightWidth: 'borderRightStyle',
|
|
69
|
+
borderBottomWidth: nativeStyle || 'borderBottomStyle',
|
|
70
|
+
borderTopWidth: nativeStyle || 'borderTopStyle',
|
|
71
|
+
borderLeftWidth: nativeStyle || 'borderLeftStyle',
|
|
72
|
+
borderRightWidth: nativeStyle || 'borderRightStyle',
|
|
69
73
|
}
|
package/src/views/Theme.tsx
CHANGED
|
@@ -18,7 +18,7 @@ export function Theme(props: ThemeProps) {
|
|
|
18
18
|
)
|
|
19
19
|
: props.children
|
|
20
20
|
|
|
21
|
-
return useThemedChildren(themeState, children, props)
|
|
21
|
+
return useThemedChildren(themeState, children, props, isRoot)
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export function useThemedChildren(
|
|
@@ -28,7 +28,8 @@ export function useThemedChildren(
|
|
|
28
28
|
forceClassName?: boolean
|
|
29
29
|
shallow?: boolean
|
|
30
30
|
passPropsToChildren?: boolean
|
|
31
|
-
}
|
|
31
|
+
},
|
|
32
|
+
isRoot = false
|
|
32
33
|
) {
|
|
33
34
|
const { themeManager, isNewTheme, className, theme } = themeState
|
|
34
35
|
const { shallow, forceClassName } = options
|
|
@@ -37,7 +38,7 @@ export function useThemedChildren(
|
|
|
37
38
|
hasEverThemed.current = true
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
if (isNewTheme || hasEverThemed.current || forceClassName) {
|
|
41
|
+
if (isNewTheme || hasEverThemed.current || forceClassName || isRoot) {
|
|
41
42
|
// be sure to memoize shouldReset to avoid reparenting
|
|
42
43
|
let next = Children.toArray(children)
|
|
43
44
|
|
|
@@ -97,6 +98,8 @@ export function useThemedChildren(
|
|
|
97
98
|
</span>
|
|
98
99
|
)
|
|
99
100
|
}
|
|
101
|
+
|
|
102
|
+
return wrapped
|
|
100
103
|
}
|
|
101
104
|
|
|
102
105
|
return children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expandStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/expandStyles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expandStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/expandStyles.ts"],"names":[],"mappings":"AAUA;;;;;;GAMG;AAEH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;;;;;;;;;;;;sCAAc,uBAyB5E;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAiBnD"}
|
package/types/views/Theme.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../src/views/Theme.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAwB,MAAM,sBAAsB,CAAA;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,OAYtC;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,oBAAoB,EAChC,QAAQ,EAAE,GAAG,EACb,OAAO,EAAE;IACP,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,
|
|
1
|
+
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../src/views/Theme.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,oBAAoB,EAAwB,MAAM,sBAAsB,CAAA;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,OAYtC;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,oBAAoB,EAChC,QAAQ,EAAE,GAAG,EACb,OAAO,EAAE;IACP,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,EACD,MAAM,UAAQ,OA0Ef"}
|