app-studio 0.7.14 → 0.7.16
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/README.md +1 -1
- package/dist/app-studio.cjs.development.js +46 -6
- package/dist/app-studio.cjs.development.js.map +1 -1
- package/dist/app-studio.cjs.production.min.js +1 -1
- package/dist/app-studio.esm.js +46 -6
- package/dist/app-studio.esm.js.map +1 -1
- package/dist/app-studio.umd.development.js +46 -6
- package/dist/app-studio.umd.development.js.map +1 -1
- package/dist/app-studio.umd.production.min.js +1 -1
- package/dist/element/Element.types.d.ts +8 -0
- package/package.json +1 -1
package/dist/app-studio.esm.js
CHANGED
|
@@ -1363,7 +1363,8 @@ const ThemeProvider = _ref => {
|
|
|
1363
1363
|
}, !targetWindow && /*#__PURE__*/React.createElement("style", null, cssVariables), /*#__PURE__*/React.createElement("div", {
|
|
1364
1364
|
"data-theme": themeMode,
|
|
1365
1365
|
style: {
|
|
1366
|
-
backgroundColor: 'white',
|
|
1366
|
+
backgroundColor: 'var(--color-white)',
|
|
1367
|
+
color: 'var(--color-black)',
|
|
1367
1368
|
width: '100%',
|
|
1368
1369
|
height: '100%',
|
|
1369
1370
|
transition: 'background-color 0.2s, color 0.2s'
|
|
@@ -1695,7 +1696,7 @@ const NumberProps = /*#__PURE__*/new Set(['numberOfLines', 'fontWeight', 'timeSt
|
|
|
1695
1696
|
// Keys to exclude when passing props to the component
|
|
1696
1697
|
const excludedKeys = /*#__PURE__*/new Set([
|
|
1697
1698
|
// Standard styling props
|
|
1698
|
-
'on', 'shadow', 'only', 'media', 'css', 'widthHeight', 'paddingHorizontal', 'paddingVertical', 'marginHorizontal', 'marginVertical', 'animate', 'animateIn', 'animateOut',
|
|
1699
|
+
'on', 'shadow', 'only', 'media', 'css', 'widthHeight', 'paddingHorizontal', 'paddingVertical', 'marginHorizontal', 'marginVertical', 'animate', 'animateIn', 'animateOut', 'theme',
|
|
1699
1700
|
// Underscore-prefixed event props
|
|
1700
1701
|
'_hover', '_active', '_focus', '_visited', '_disabled', '_enabled', '_checked', '_unchecked', '_invalid', '_valid', '_required', '_optional', '_selected', '_target', '_firstChild', '_lastChild', '_onlyChild', '_firstOfType', '_lastOfType', '_empty', '_focusVisible', '_focusWithin', '_placeholder',
|
|
1701
1702
|
// Pseudo-element props
|
|
@@ -3083,6 +3084,28 @@ function useStableStyleMemo(propsToProcess, getColor, mediaQueries, devices, man
|
|
|
3083
3084
|
}
|
|
3084
3085
|
return cacheRef.current.classes;
|
|
3085
3086
|
}
|
|
3087
|
+
const THEME_PREFIX$1 = 'theme-';
|
|
3088
|
+
// Build a getColor that resolves `theme-*` tokens against a component-scoped
|
|
3089
|
+
// theme override before falling back to the global getColor. Tokens not
|
|
3090
|
+
// covered by the override (color-*, light-*, dark-*, theme-* keys not in the
|
|
3091
|
+
// override) pass straight through.
|
|
3092
|
+
function makeScopedGetColor(componentTheme, baseGetColor) {
|
|
3093
|
+
return name => {
|
|
3094
|
+
if (!name || typeof name !== 'string') return String(name);
|
|
3095
|
+
if (!name.startsWith(THEME_PREFIX$1)) return baseGetColor(name);
|
|
3096
|
+
const parts = name.substring(THEME_PREFIX$1.length).split('-');
|
|
3097
|
+
const lastPart = parts[parts.length - 1];
|
|
3098
|
+
const maybeAlpha = parseInt(lastPart, 10);
|
|
3099
|
+
const hasAlpha = parts.length >= 2 && !isNaN(maybeAlpha) && maybeAlpha >= 0 && maybeAlpha <= 1000;
|
|
3100
|
+
const themeKey = hasAlpha ? parts.slice(0, -1).join('-') : parts.join('-');
|
|
3101
|
+
const overrideValue = componentTheme[themeKey];
|
|
3102
|
+
if (typeof overrideValue !== 'string') return baseGetColor(name);
|
|
3103
|
+
const resolved = baseGetColor(overrideValue);
|
|
3104
|
+
if (!hasAlpha) return resolved;
|
|
3105
|
+
const percentage = Math.round(maybeAlpha / 1000 * 100);
|
|
3106
|
+
return `color-mix(in srgb, ${resolved} ${percentage}%, transparent)`;
|
|
3107
|
+
};
|
|
3108
|
+
}
|
|
3086
3109
|
const Element = /*#__PURE__*/React.memo(/*#__PURE__*/forwardRef((_ref, ref) => {
|
|
3087
3110
|
let {
|
|
3088
3111
|
as = 'div',
|
|
@@ -3097,6 +3120,7 @@ const Element = /*#__PURE__*/React.memo(/*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3097
3120
|
onPress,
|
|
3098
3121
|
blend,
|
|
3099
3122
|
animateOn = 'Both',
|
|
3123
|
+
theme: componentTheme,
|
|
3100
3124
|
...rest
|
|
3101
3125
|
} = props;
|
|
3102
3126
|
const elementRef = useRef(null);
|
|
@@ -3112,6 +3136,17 @@ const Element = /*#__PURE__*/React.memo(/*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3112
3136
|
getColor,
|
|
3113
3137
|
theme
|
|
3114
3138
|
} = useTheme();
|
|
3139
|
+
// When a component-level `theme` prop is supplied, wrap getColor so
|
|
3140
|
+
// `theme-*` tokens resolve against the override first. Memoize on a
|
|
3141
|
+
// serialized signature so the function identity stays stable across
|
|
3142
|
+
// renders that don't change the override.
|
|
3143
|
+
const componentThemeKey = componentTheme ? Object.entries(componentTheme).map(_ref2 => {
|
|
3144
|
+
let [k, v] = _ref2;
|
|
3145
|
+
return `${k}=${v}`;
|
|
3146
|
+
}).join('|') : '';
|
|
3147
|
+
const scopedGetColor = useMemo(() => componentTheme ? makeScopedGetColor(componentTheme, getColor) : getColor,
|
|
3148
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3149
|
+
[componentThemeKey, getColor]);
|
|
3115
3150
|
const {
|
|
3116
3151
|
trackEvent
|
|
3117
3152
|
} = useAnalytics();
|
|
@@ -3132,8 +3167,8 @@ const Element = /*#__PURE__*/React.memo(/*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3132
3167
|
setIsVisible(true);
|
|
3133
3168
|
return;
|
|
3134
3169
|
}
|
|
3135
|
-
const observer = new IntersectionObserver(
|
|
3136
|
-
let [entry] =
|
|
3170
|
+
const observer = new IntersectionObserver(_ref3 => {
|
|
3171
|
+
let [entry] = _ref3;
|
|
3137
3172
|
if (entry.isIntersecting) {
|
|
3138
3173
|
setIsVisible(true);
|
|
3139
3174
|
observer.disconnect();
|
|
@@ -3202,8 +3237,13 @@ const Element = /*#__PURE__*/React.memo(/*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3202
3237
|
return anim;
|
|
3203
3238
|
});
|
|
3204
3239
|
}
|
|
3205
|
-
// Use hash-based memoization for style extraction
|
|
3206
|
-
|
|
3240
|
+
// Use hash-based memoization for style extraction. Mix the component
|
|
3241
|
+
// theme signature into the `theme` argument so the cache invalidates
|
|
3242
|
+
// when an override changes between renders.
|
|
3243
|
+
const utilityClasses = useStableStyleMemo(propsToProcess, scopedGetColor, mediaQueries, devices, manager, componentTheme ? {
|
|
3244
|
+
...theme,
|
|
3245
|
+
__scope: componentThemeKey
|
|
3246
|
+
} : theme);
|
|
3207
3247
|
const newProps = {
|
|
3208
3248
|
ref: setRef
|
|
3209
3249
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-studio.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-studio.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1369,7 +1369,8 @@
|
|
|
1369
1369
|
}, !targetWindow && /*#__PURE__*/React__default.createElement("style", null, cssVariables), /*#__PURE__*/React__default.createElement("div", {
|
|
1370
1370
|
"data-theme": themeMode,
|
|
1371
1371
|
style: {
|
|
1372
|
-
backgroundColor: 'white',
|
|
1372
|
+
backgroundColor: 'var(--color-white)',
|
|
1373
|
+
color: 'var(--color-black)',
|
|
1373
1374
|
width: '100%',
|
|
1374
1375
|
height: '100%',
|
|
1375
1376
|
transition: 'background-color 0.2s, color 0.2s'
|
|
@@ -1701,7 +1702,7 @@
|
|
|
1701
1702
|
// Keys to exclude when passing props to the component
|
|
1702
1703
|
const excludedKeys = /*#__PURE__*/new Set([
|
|
1703
1704
|
// Standard styling props
|
|
1704
|
-
'on', 'shadow', 'only', 'media', 'css', 'widthHeight', 'paddingHorizontal', 'paddingVertical', 'marginHorizontal', 'marginVertical', 'animate', 'animateIn', 'animateOut',
|
|
1705
|
+
'on', 'shadow', 'only', 'media', 'css', 'widthHeight', 'paddingHorizontal', 'paddingVertical', 'marginHorizontal', 'marginVertical', 'animate', 'animateIn', 'animateOut', 'theme',
|
|
1705
1706
|
// Underscore-prefixed event props
|
|
1706
1707
|
'_hover', '_active', '_focus', '_visited', '_disabled', '_enabled', '_checked', '_unchecked', '_invalid', '_valid', '_required', '_optional', '_selected', '_target', '_firstChild', '_lastChild', '_onlyChild', '_firstOfType', '_lastOfType', '_empty', '_focusVisible', '_focusWithin', '_placeholder',
|
|
1707
1708
|
// Pseudo-element props
|
|
@@ -3089,6 +3090,28 @@
|
|
|
3089
3090
|
}
|
|
3090
3091
|
return cacheRef.current.classes;
|
|
3091
3092
|
}
|
|
3093
|
+
const THEME_PREFIX$1 = 'theme-';
|
|
3094
|
+
// Build a getColor that resolves `theme-*` tokens against a component-scoped
|
|
3095
|
+
// theme override before falling back to the global getColor. Tokens not
|
|
3096
|
+
// covered by the override (color-*, light-*, dark-*, theme-* keys not in the
|
|
3097
|
+
// override) pass straight through.
|
|
3098
|
+
function makeScopedGetColor(componentTheme, baseGetColor) {
|
|
3099
|
+
return name => {
|
|
3100
|
+
if (!name || typeof name !== 'string') return String(name);
|
|
3101
|
+
if (!name.startsWith(THEME_PREFIX$1)) return baseGetColor(name);
|
|
3102
|
+
const parts = name.substring(THEME_PREFIX$1.length).split('-');
|
|
3103
|
+
const lastPart = parts[parts.length - 1];
|
|
3104
|
+
const maybeAlpha = parseInt(lastPart, 10);
|
|
3105
|
+
const hasAlpha = parts.length >= 2 && !isNaN(maybeAlpha) && maybeAlpha >= 0 && maybeAlpha <= 1000;
|
|
3106
|
+
const themeKey = hasAlpha ? parts.slice(0, -1).join('-') : parts.join('-');
|
|
3107
|
+
const overrideValue = componentTheme[themeKey];
|
|
3108
|
+
if (typeof overrideValue !== 'string') return baseGetColor(name);
|
|
3109
|
+
const resolved = baseGetColor(overrideValue);
|
|
3110
|
+
if (!hasAlpha) return resolved;
|
|
3111
|
+
const percentage = Math.round(maybeAlpha / 1000 * 100);
|
|
3112
|
+
return `color-mix(in srgb, ${resolved} ${percentage}%, transparent)`;
|
|
3113
|
+
};
|
|
3114
|
+
}
|
|
3092
3115
|
const Element = /*#__PURE__*/React__default.memo(/*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
3093
3116
|
let {
|
|
3094
3117
|
as = 'div',
|
|
@@ -3103,6 +3126,7 @@
|
|
|
3103
3126
|
onPress,
|
|
3104
3127
|
blend,
|
|
3105
3128
|
animateOn = 'Both',
|
|
3129
|
+
theme: componentTheme,
|
|
3106
3130
|
...rest
|
|
3107
3131
|
} = props;
|
|
3108
3132
|
const elementRef = React.useRef(null);
|
|
@@ -3118,6 +3142,17 @@
|
|
|
3118
3142
|
getColor,
|
|
3119
3143
|
theme
|
|
3120
3144
|
} = useTheme();
|
|
3145
|
+
// When a component-level `theme` prop is supplied, wrap getColor so
|
|
3146
|
+
// `theme-*` tokens resolve against the override first. Memoize on a
|
|
3147
|
+
// serialized signature so the function identity stays stable across
|
|
3148
|
+
// renders that don't change the override.
|
|
3149
|
+
const componentThemeKey = componentTheme ? Object.entries(componentTheme).map(_ref2 => {
|
|
3150
|
+
let [k, v] = _ref2;
|
|
3151
|
+
return `${k}=${v}`;
|
|
3152
|
+
}).join('|') : '';
|
|
3153
|
+
const scopedGetColor = React.useMemo(() => componentTheme ? makeScopedGetColor(componentTheme, getColor) : getColor,
|
|
3154
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3155
|
+
[componentThemeKey, getColor]);
|
|
3121
3156
|
const {
|
|
3122
3157
|
trackEvent
|
|
3123
3158
|
} = useAnalytics();
|
|
@@ -3138,8 +3173,8 @@
|
|
|
3138
3173
|
setIsVisible(true);
|
|
3139
3174
|
return;
|
|
3140
3175
|
}
|
|
3141
|
-
const observer = new IntersectionObserver(
|
|
3142
|
-
let [entry] =
|
|
3176
|
+
const observer = new IntersectionObserver(_ref3 => {
|
|
3177
|
+
let [entry] = _ref3;
|
|
3143
3178
|
if (entry.isIntersecting) {
|
|
3144
3179
|
setIsVisible(true);
|
|
3145
3180
|
observer.disconnect();
|
|
@@ -3208,8 +3243,13 @@
|
|
|
3208
3243
|
return anim;
|
|
3209
3244
|
});
|
|
3210
3245
|
}
|
|
3211
|
-
// Use hash-based memoization for style extraction
|
|
3212
|
-
|
|
3246
|
+
// Use hash-based memoization for style extraction. Mix the component
|
|
3247
|
+
// theme signature into the `theme` argument so the cache invalidates
|
|
3248
|
+
// when an override changes between renders.
|
|
3249
|
+
const utilityClasses = useStableStyleMemo(propsToProcess, scopedGetColor, mediaQueries, devices, manager, componentTheme ? {
|
|
3250
|
+
...theme,
|
|
3251
|
+
__scope: componentThemeKey
|
|
3252
|
+
} : theme);
|
|
3213
3253
|
const newProps = {
|
|
3214
3254
|
ref: setRef
|
|
3215
3255
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-studio.umd.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-studio.umd.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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