app-studio 0.6.57 → 0.6.58

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.
@@ -1375,6 +1375,33 @@ const debounce = (func, wait) => {
1375
1375
  timeout = setTimeout(() => func(...args), wait);
1376
1376
  };
1377
1377
  };
1378
+ // Helper to compute breakpoint from width
1379
+ const getBreakpointFromWidth = (width, breakpoints) => {
1380
+ // console.log('[ResponsiveProvider] Computing breakpoint for width:', width);
1381
+ // console.log('[ResponsiveProvider] Breakpoints config:', breakpoints);
1382
+ const sortedBreakpoints = Object.entries(breakpoints).sort((_ref, _ref2) => {
1383
+ let [, a] = _ref;
1384
+ let [, b] = _ref2;
1385
+ return b - a;
1386
+ }); // Sort descending by min value
1387
+ // console.log('[ResponsiveProvider] Sorted breakpoints:', sortedBreakpoints);
1388
+ for (const [name, minWidth] of sortedBreakpoints) {
1389
+ if (width >= minWidth) {
1390
+ // console.log(
1391
+ // '[ResponsiveProvider] ✓ Match found:',
1392
+ // name,
1393
+ // 'for width',
1394
+ // width,
1395
+ // '>= minWidth',
1396
+ // minWidth
1397
+ // );
1398
+ return name;
1399
+ }
1400
+ }
1401
+ const fallback = sortedBreakpoints[sortedBreakpoints.length - 1]?.[0] || 'xs';
1402
+ // console.log('[ResponsiveProvider] No match, using fallback:', fallback);
1403
+ return fallback;
1404
+ };
1378
1405
  // Create the Context with default values
1379
1406
  const ResponsiveContext = /*#__PURE__*/React.createContext({
1380
1407
  breakpoints: defaultBreakpointsConfig,
@@ -1388,41 +1415,83 @@ const ResponsiveContext = /*#__PURE__*/React.createContext({
1388
1415
  });
1389
1416
  // Custom Hook to Access the Responsive Context
1390
1417
  const useResponsiveContext = () => React.useContext(ResponsiveContext);
1391
- const ResponsiveProvider = _ref => {
1418
+ const ResponsiveProvider = _ref3 => {
1392
1419
  let {
1393
1420
  breakpoints = defaultBreakpointsConfig,
1394
1421
  devices = defaultDeviceConfig,
1395
1422
  children
1396
- } = _ref;
1397
- const [screen, setScreen] = React.useState('xs');
1423
+ } = _ref3;
1424
+ const [screen, setScreen] = React.useState(() => {
1425
+ // Initialize with correct breakpoint instead of hardcoded 'xs'
1426
+ if (typeof window !== 'undefined') {
1427
+ return getBreakpointFromWidth(window.innerWidth, breakpoints);
1428
+ }
1429
+ return 'xs';
1430
+ });
1398
1431
  const [orientation, setOrientation] = React.useState('portrait');
1432
+ const [size, setSize] = React.useState({
1433
+ width: typeof window !== 'undefined' ? window.innerWidth : 0,
1434
+ height: typeof window !== 'undefined' ? window.innerHeight : 0
1435
+ });
1399
1436
  const mediaQueries = React.useMemo(() => getMediaQueries(breakpoints), [breakpoints]);
1400
1437
  React.useEffect(() => {
1401
- const listeners = [];
1402
- for (const screenSize in mediaQueries) {
1403
- const mql = window.matchMedia(mediaQueries[screenSize]);
1404
- const onChange = () => mql.matches && setScreen(screenSize);
1405
- mql.addListener(onChange);
1406
- if (mql.matches) setScreen(screenSize);
1407
- listeners.push(() => mql.removeListener(onChange));
1408
- }
1438
+ // console.log('[ResponsiveProvider] useEffect running - initial setup');
1439
+ // Set initial screen size immediately based on window width
1440
+ const initialScreen = getBreakpointFromWidth(window.innerWidth, breakpoints);
1441
+ // console.log(
1442
+ // '[ResponsiveProvider] Setting initial screen to:',
1443
+ // initialScreen
1444
+ // );
1445
+ setScreen(initialScreen);
1446
+ const handleResize = () => {
1447
+ const newWidth = window.innerWidth;
1448
+ const newHeight = window.innerHeight;
1449
+ // console.log('[ResponsiveProvider] Resize event - new dimensions:', {
1450
+ // width: newWidth,
1451
+ // height: newHeight,
1452
+ // });
1453
+ setSize({
1454
+ width: newWidth,
1455
+ height: newHeight
1456
+ });
1457
+ // Update screen on resize
1458
+ const newScreen = getBreakpointFromWidth(newWidth, breakpoints);
1459
+ // console.log('[ResponsiveProvider] Setting screen to:', newScreen);
1460
+ setScreen(newScreen);
1461
+ };
1462
+ const debouncedResize = debounce(handleResize, 100);
1463
+ window.addEventListener('resize', debouncedResize);
1464
+ // Set up orientation listener
1409
1465
  const orientationMql = window.matchMedia('(orientation: landscape)');
1410
1466
  const onOrientationChange = () => setOrientation(orientationMql.matches ? 'landscape' : 'portrait');
1411
- orientationMql.addListener(onOrientationChange);
1467
+ if (orientationMql.addEventListener) {
1468
+ orientationMql.addEventListener('change', onOrientationChange);
1469
+ } else {
1470
+ orientationMql.addListener(onOrientationChange);
1471
+ }
1412
1472
  onOrientationChange();
1413
- listeners.push(() => orientationMql.removeListener(onOrientationChange));
1414
- return () => listeners.forEach(cleanup => cleanup());
1415
- }, [breakpoints]);
1416
- const value = React.useMemo(() => ({
1417
- breakpoints,
1418
- devices,
1419
- mediaQueries,
1420
- currentWidth: window.innerWidth,
1421
- currentHeight: window.innerHeight,
1422
- currentBreakpoint: screen,
1423
- currentDevice: determineCurrentDevice(screen, devices),
1424
- orientation
1425
- }), [breakpoints, devices, screen, orientation]);
1473
+ return () => {
1474
+ window.removeEventListener('resize', debouncedResize);
1475
+ if (orientationMql.removeEventListener) {
1476
+ orientationMql.removeEventListener('change', onOrientationChange);
1477
+ } else {
1478
+ orientationMql.removeListener(onOrientationChange);
1479
+ }
1480
+ };
1481
+ }, [breakpoints]); // Removed mediaQueries dep since we now use direct width comparison
1482
+ const value = React.useMemo(() => {
1483
+ const contextValue = {
1484
+ breakpoints,
1485
+ devices,
1486
+ mediaQueries,
1487
+ currentWidth: size.width,
1488
+ currentHeight: size.height,
1489
+ currentBreakpoint: screen,
1490
+ currentDevice: determineCurrentDevice(screen, devices),
1491
+ orientation
1492
+ };
1493
+ return contextValue;
1494
+ }, [breakpoints, devices, mediaQueries, size, screen, orientation]);
1426
1495
  return /*#__PURE__*/React__default.createElement(ResponsiveContext.Provider, {
1427
1496
  value: value
1428
1497
  }, children);
@@ -2598,7 +2667,7 @@ const extractUtilityClasses = (props, getColor, mediaQueries, devices, manager)
2598
2667
  if (props.blend === true) {
2599
2668
  setBlend(props, computedStyles);
2600
2669
  Object.keys(props).forEach(property => {
2601
- if (props[property]?.color === undefined && property.startsWith('_') && property.length > 1) {
2670
+ if (props[property]?.color === undefined && (property.startsWith('_') || property === 'on' || property === 'media')) {
2602
2671
  setBlend(props[property], props[property]);
2603
2672
  }
2604
2673
  });
@@ -2737,7 +2806,13 @@ const Element = /*#__PURE__*/React__default.memo(/*#__PURE__*/React.forwardRef((
2737
2806
  } = props;
2738
2807
  let blend = initialBlend;
2739
2808
  if (blend !== false && props.color === undefined && typeof props.children === 'string' && (as === 'span' || as === 'div' || as === 'sub' || as === 'sup')) {
2740
- blend = true;
2809
+ const otherMediaProps = {
2810
+ ...(props.on || {}),
2811
+ ...(props.media || {})
2812
+ };
2813
+ if (otherMediaProps.color === undefined) {
2814
+ blend = true;
2815
+ }
2741
2816
  }
2742
2817
  const elementRef = React.useRef(null);
2743
2818
  const setRef = React.useCallback(node => {
@@ -2763,6 +2838,10 @@ const Element = /*#__PURE__*/React__default.memo(/*#__PURE__*/React.forwardRef((
2763
2838
  manager
2764
2839
  } = useStyleRegistry();
2765
2840
  const [isVisible, setIsVisible] = React.useState(false);
2841
+ console.log({
2842
+ mediaQueries,
2843
+ devices
2844
+ });
2766
2845
  React.useEffect(() => {
2767
2846
  if (!animateIn) {
2768
2847
  setIsVisible(true);
@@ -5024,13 +5103,15 @@ const useResponsive = () => {
5024
5103
  devices
5025
5104
  } = context;
5026
5105
  const on = s => devices[s] ? devices[s].includes(screen) : s === screen;
5027
- return {
5106
+ const result = {
5028
5107
  ...context,
5029
5108
  screen,
5030
5109
  orientation,
5031
5110
  on,
5032
5111
  is: on
5033
5112
  };
5113
+ // console.log('[useResponsive] Hook called, returning:', { screen, orientation, 'on(mobile)': on('mobile') });
5114
+ return result;
5034
5115
  };
5035
5116
 
5036
5117
  // Helper to check if element is a Window object (works across iframes)
@@ -1 +1 @@
1
- {"version":3,"file":"app-studio.cjs.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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