@acorex/core 6.5.20 → 6.5.22

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.
@@ -826,6 +826,7 @@ const isTablet = (win) => {
826
826
  (largest > 780 && largest < 1400)));
827
827
  };
828
828
  const isMobile = (win) => matchMedia(win, '(any-pointer:coarse)');
829
+ const isTouch = (win) => matchMedia(win, '(any-pointer:coarse)');
829
830
  const isDesktop = (win) => !isMobile(win);
830
831
  const isHybrid = (win) => isCordova(win) || isCapacitorNative(win);
831
832
  const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
@@ -837,11 +838,17 @@ const isElectron = (win) => testUserAgent(win, /electron/i);
837
838
  const isPWA = (win) => !!(win.matchMedia('(display-mode: standalone)').matches || win.navigator.standalone);
838
839
  const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
839
840
  const matchMedia = (win, query) => win.matchMedia(query).matches;
841
+ const isSMScreen = (win) => matchMedia(win, '(max-width: 640px)');
842
+ const isMDScreen = (win) => matchMedia(win, '(max-width: 768px)');
843
+ const isLGScreen = (win) => matchMedia(win, '(max-width: 1024px)');
844
+ const isXLScreen = (win) => matchMedia(win, '(max-width: 1280px)');
845
+ const is2XLScreen = (win) => matchMedia(win, '(max-width: 1536px)');
840
846
  const PLATFORMS_MAP = {
841
847
  'Android': isAndroid,
842
848
  'iOS': isIOS,
843
849
  'Desktop': isDesktop,
844
850
  'Mobile': isMobile,
851
+ 'Touch': isTouch,
845
852
  'Chrome': isChrome,
846
853
  'Firefox': isFirefox,
847
854
  'Safari': isSafari,
@@ -850,6 +857,11 @@ const PLATFORMS_MAP = {
850
857
  'Hybrid': isHybrid,
851
858
  'PWA': isPWA,
852
859
  'Electron': isElectron,
860
+ SM: isSMScreen,
861
+ MD: isMDScreen,
862
+ LG: isLGScreen,
863
+ XL: isXLScreen,
864
+ "2XL": is2XLScreen,
853
865
  };
854
866
  class AXPlatformEvent {
855
867
  }