atriusmaps-node-sdk 3.3.453 → 3.3.455

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var name = "web-engine";
6
- var version = "3.3.453";
6
+ var version = "3.3.455";
7
7
  var license = "UNLICENSED";
8
8
  var type = "module";
9
9
  var main = "src/main.js";
@@ -4,11 +4,25 @@ function buildEnv (app) {
4
4
  const desktopViewMinWidth = app.config.desktopViewMinWidth || 0; // default to desktop view for all sizes
5
5
  const isBrowser = typeof window !== 'undefined';
6
6
 
7
+ // supportsTouch doesn't mean user PREFERS touch - touch laptops exist
8
+ const supportsTouch = isBrowser && ('ontouchstart' in window || navigator.maxTouchPoints > 0);
9
+
10
+ // I'd like to move from a single dimension (isMobile vs isDesktop) to a more
11
+ // nuanced approach seperately considering narrow, touch, mobile (meaning moves
12
+ // around), etc. Our UI is generally based on the narrow width of the map
13
+ // container, so lets continue using that for isMobile for now...
14
+ const isNarrow = () => isBrowser && innerWidth < desktopViewMinWidth;
15
+ const isMobile = () => isNarrow();
16
+ const isDesktop = () => isBrowser && !isNarrow();
17
+
18
+ const isLocalhost = () => location.host.startsWith('localhost') || location.host.startsWith('127.0.0.1');
19
+
7
20
  const env = {
8
21
  isBrowser,
9
- isMobile: () => isBrowser && innerWidth < desktopViewMinWidth,
10
- isLocalhost: () => location.host.startsWith('localhost') || location.host.startsWith('127.0.0.1'),
11
- isDesktop: () => isBrowser && !env.isMobile()
22
+ isMobile,
23
+ isLocalhost,
24
+ isDesktop,
25
+ supportsTouch
12
26
  };
13
27
 
14
28
  if (isBrowser)
@@ -1 +1 @@
1
- var e="web-engine",s="3.3.453",o="UNLICENSED",t="module",r="src/main.js",l=["demo","deploy","nodesdk","src/extModules/flexapi","services/*","libraries/*"],a={colors:"cat utils/colors1.txt && node utils/processColors.js | pbcopy && cat utils/colors2.txt","cypress:a11y":"APPLITOOLS_IS_DISABLED=true && cypress open --browser chrome --env INPUT_MODALITY='keyboard'","cypress:comp":"APPLITOOLS_IS_DISABLED=true && cypress open --component --browser chrome","cypress:e2e":"APPLITOOLS_IS_DISABLED=true && cypress open --e2e --browser chrome",demo:"cd demo/ && yarn start","e2e:comp":"cypress run --component","e2e:record":"yarn cypress run --env RECORD_MODE=true",e2eSDKTest:"yarn start-server-and-test 'cd ./deploy && yarn buildDev && yarn serveLocal' 8085 'cd ./cypress/e2e/sdk && npx http-server' 8080 'yarn cypress run --spec cypress/e2e/sdk/**'",goProd:"cd deploy && scripts/goProd.sh",goStaging:"deploy/scripts/goStaging.sh",i18nOverrides:"yarn node utils/i18nOverrideCli src/i18n src/i18n-overrides",lint:"eslint .",mod:"demo/startMod.sh",mol:"demo/startMol.sh","mol:build":"demo/startMolBuild.sh",molProd:"cd deploy && yarn buildAndRunMol",prepare:"husky",test:"jest --no-cache --verbose","test-watch":"jest --verbose --watch","test:vitest":"vitest run"},i=["defaults"],n={react:"^18.3.1"},c={"@azure/event-hubs":"^5.12.2","@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@locus-labs/mod-badge":"^0.1.102","@locus-labs/mod-default-theme":"^0.0.113","@locus-labs/mod-footer":"^0.0.111","@locus-labs/mod-header":"^0.0.105","@locus-labs/mod-location-marker":"^0.0.104","@locus-labs/mod-map-legend":"^0.0.104","@locus-labs/mod-offscreen-indicator":"^0.0.104","@locus-labs/mod-pin":"^0.0.104","@locus-labs/mod-qr-code-card":"^0.0.104","@locus-labs/mod-qr-code-window":"^0.0.105","@locus-labs/mod-walk-time-matrix":"^0.0.103","@locus-labs/mol-desktop-building-level-selector":"^0.1.119","@locus-labs/mol-desktop-compass":"^0.1.120","@locus-labs/mol-desktop-default-theme":"^0.2.105","@locus-labs/mol-desktop-icon":"^0.1.131","@locus-labs/mol-desktop-logo":"^0.1.101","@locus-labs/mol-desktop-map-nav-button":"^0.1.130","@locus-labs/mol-desktop-tooltip":"^0.3.102","@locus-labs/mol-desktop-zoom-control":"^0.1.141","@locus-labs/mol-mobile-box":"^0.1.115","@locus-labs/mol-mobile-floating-action-button":"^0.0.117","@locus-labs/mol-mobile-icon":"^0.1.118","@locus-labs/mol-mobile-text":"^0.1.116","@locus-labs/mol-mobile-toast":"^0.1.102","@mapbox/mapbox-gl-draw":"^1.5.0","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.3.6","@turf/area":"^7.2.0","@turf/bbox-clip":"^7.2.0","@turf/bbox-polygon":"^7.2.0","@turf/circle":"^7.2.0","@turf/helpers":"^7.2.0","@turf/point-to-line-distance":"^7.2.0","@vitejs/plugin-react":"^4.3.4","axe-core":"^4.10.3",browserslist:"^4.24.4","crypto-browserify":"^3.12.1","cypress-axe":"^1.6.0","cypress-multi-reporters":"^2.0.5","cypress-real-events":"^1.14.0","file-loader":"^6.2.0",flexsearch:"^0.7.43","h3-js":"^4.1.0",i18next:"^20.6.1","i18next-browser-languagedetector":"^6.1.1","jest-transform-css":"6.0.2",jsdom:"^25.0.1",jsonschema:"^1.5.0",luxon:"^3.5.0","maplibre-gl":"^4.7.1","mini-css-extract-plugin":"^2.9.2","mocha-junit-reporter":"^2.2.1",mochawesome:"^7.1.3","node-polyfill-webpack-plugin":"^4.1.0","path-browserify":"^1.0.1","prop-types":"^15.8.1",ramda:"^0.30.1",react:"^18.3.1","react-compound-slider":"^3.4.0","react-dom":"^18.3.1","react-json-editor-ajrm":"^2.5.14","react-qr-svg":"^2.4.0","react-svg":"^16.3.0","react-virtualized-auto-sizer":"^1.0.25","react-window":"^1.8.11","smoothscroll-polyfill":"^0.4.4","styled-components":"^6.1.15","styled-normalize":"^8.1.1","throttle-debounce":"^5.0.2",trackjs:"^3.10.4","ua-parser-js":"^0.7.40",uuid:"11.1.0",zousan:"^3.0.1","zousan-plus":"^4.0.1"},p={"@applitools/eyes-cypress":"^3.51.0","@babel/core":"^7.26.10","@babel/eslint-parser":"^7.26.10","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-assertions":"^7.26.0","@babel/plugin-transform-modules-commonjs":"^7.26.3","@babel/plugin-transform-runtime":"^7.26.10","@babel/preset-env":"^7.26.9","@babel/preset-react":"^7.26.3","@testing-library/jest-dom":"^6.6.3","@types/react":"^19.0.10","@types/react-dom":"^19.0.4","@typescript-eslint/eslint-plugin":"^8.26.1","@typescript-eslint/parser":"^8.26.1","babel-jest":"^29.7.0","babel-loader":"^10.0.0","babel-plugin-inline-json-import":"^0.3.2","babel-plugin-module-resolver":"^5.0.2","babel-plugin-styled-components":"^2.1.4","chai-colors":"^1.0.1","css-loader":"^7.1.2",cypress:"^14.2.0","cypress-browser-permissions":"^1.1.0","cypress-wait-until":"^3.0.2",eslint:"^8.57.1","eslint-config-standard":"^17.1.0","eslint-import-resolver-typescript":"^3.9.1","eslint-plugin-cypress":"^2.15.2","eslint-plugin-import":"^2.31.0","eslint-plugin-jest":"^28.11.0","eslint-plugin-n":"^17.16.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.2.0","eslint-plugin-react":"^7.37.4","eslint-plugin-standard":"^5.0.0","fetch-mock-jest":"^1.5.1",glob:"^11.0.1",husky:"^9.1.7",jest:"29.7.0","jest-environment-jsdom":"^29.7.0","lint-staged":"^15.5.0","node-fetch":"^2.7.0","null-loader":"^4.0.1",nx:"19.8.14","nx-remotecache-azure":"^19.0.0","os-browserify":"^0.3.0","start-server-and-test":"^2.0.11",typescript:"^5.8.2",vite:"^4.3.9",vitest:"^2.1.9","webpack-merge":"^6.0.1"},d="yarn@4.7.0",m={node:"22.x"},u={},b={name:e,version:s,private:!0,license:o,type:t,main:r,workspaces:l,scripts:a,"lint-staged":{"*.js":["eslint --fix"]},browserslist:i,resolutions:n,dependencies:c,devDependencies:p,packageManager:d,engines:m,nx:u};export{i as browserslist,b as default,c as dependencies,p as devDependencies,m as engines,o as license,r as main,e as name,u as nx,d as packageManager,n as resolutions,a as scripts,t as type,s as version,l as workspaces};
1
+ var e="web-engine",s="3.3.455",o="UNLICENSED",t="module",r="src/main.js",l=["demo","deploy","nodesdk","src/extModules/flexapi","services/*","libraries/*"],a={colors:"cat utils/colors1.txt && node utils/processColors.js | pbcopy && cat utils/colors2.txt","cypress:a11y":"APPLITOOLS_IS_DISABLED=true && cypress open --browser chrome --env INPUT_MODALITY='keyboard'","cypress:comp":"APPLITOOLS_IS_DISABLED=true && cypress open --component --browser chrome","cypress:e2e":"APPLITOOLS_IS_DISABLED=true && cypress open --e2e --browser chrome",demo:"cd demo/ && yarn start","e2e:comp":"cypress run --component","e2e:record":"yarn cypress run --env RECORD_MODE=true",e2eSDKTest:"yarn start-server-and-test 'cd ./deploy && yarn buildDev && yarn serveLocal' 8085 'cd ./cypress/e2e/sdk && npx http-server' 8080 'yarn cypress run --spec cypress/e2e/sdk/**'",goProd:"cd deploy && scripts/goProd.sh",goStaging:"deploy/scripts/goStaging.sh",i18nOverrides:"yarn node utils/i18nOverrideCli src/i18n src/i18n-overrides",lint:"eslint .",mod:"demo/startMod.sh",mol:"demo/startMol.sh","mol:build":"demo/startMolBuild.sh",molProd:"cd deploy && yarn buildAndRunMol",prepare:"husky",test:"jest --no-cache --verbose","test-watch":"jest --verbose --watch","test:vitest":"vitest run"},i=["defaults"],n={react:"^18.3.1"},c={"@azure/event-hubs":"^5.12.2","@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@locus-labs/mod-badge":"^0.1.102","@locus-labs/mod-default-theme":"^0.0.113","@locus-labs/mod-footer":"^0.0.111","@locus-labs/mod-header":"^0.0.105","@locus-labs/mod-location-marker":"^0.0.104","@locus-labs/mod-map-legend":"^0.0.104","@locus-labs/mod-offscreen-indicator":"^0.0.104","@locus-labs/mod-pin":"^0.0.104","@locus-labs/mod-qr-code-card":"^0.0.104","@locus-labs/mod-qr-code-window":"^0.0.105","@locus-labs/mod-walk-time-matrix":"^0.0.103","@locus-labs/mol-desktop-building-level-selector":"^0.1.119","@locus-labs/mol-desktop-compass":"^0.1.120","@locus-labs/mol-desktop-default-theme":"^0.2.105","@locus-labs/mol-desktop-icon":"^0.1.131","@locus-labs/mol-desktop-logo":"^0.1.101","@locus-labs/mol-desktop-map-nav-button":"^0.1.130","@locus-labs/mol-desktop-tooltip":"^0.3.102","@locus-labs/mol-desktop-zoom-control":"^0.1.141","@locus-labs/mol-mobile-box":"^0.1.115","@locus-labs/mol-mobile-floating-action-button":"^0.0.117","@locus-labs/mol-mobile-icon":"^0.1.118","@locus-labs/mol-mobile-text":"^0.1.116","@locus-labs/mol-mobile-toast":"^0.1.102","@mapbox/mapbox-gl-draw":"^1.5.0","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.3.6","@turf/area":"^7.2.0","@turf/bbox-clip":"^7.2.0","@turf/bbox-polygon":"^7.2.0","@turf/circle":"^7.2.0","@turf/helpers":"^7.2.0","@turf/point-to-line-distance":"^7.2.0","@vitejs/plugin-react":"^4.3.4","axe-core":"^4.10.3",browserslist:"^4.24.4","crypto-browserify":"^3.12.1","cypress-axe":"^1.6.0","cypress-multi-reporters":"^2.0.5","cypress-real-events":"^1.14.0","file-loader":"^6.2.0",flexsearch:"^0.7.43","h3-js":"^4.1.0",i18next:"^20.6.1","i18next-browser-languagedetector":"^6.1.1","jest-transform-css":"6.0.2",jsdom:"^25.0.1",jsonschema:"^1.5.0",luxon:"^3.5.0","maplibre-gl":"^4.7.1","mini-css-extract-plugin":"^2.9.2","mocha-junit-reporter":"^2.2.1",mochawesome:"^7.1.3","node-polyfill-webpack-plugin":"^4.1.0","path-browserify":"^1.0.1","prop-types":"^15.8.1",ramda:"^0.30.1",react:"^18.3.1","react-compound-slider":"^3.4.0","react-dom":"^18.3.1","react-json-editor-ajrm":"^2.5.14","react-qr-svg":"^2.4.0","react-svg":"^16.3.0","react-virtualized-auto-sizer":"^1.0.25","react-window":"^1.8.11","smoothscroll-polyfill":"^0.4.4","styled-components":"^6.1.15","styled-normalize":"^8.1.1","throttle-debounce":"^5.0.2",trackjs:"^3.10.4","ua-parser-js":"^0.7.40",uuid:"11.1.0",zousan:"^3.0.1","zousan-plus":"^4.0.1"},p={"@applitools/eyes-cypress":"^3.51.0","@babel/core":"^7.26.10","@babel/eslint-parser":"^7.26.10","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-assertions":"^7.26.0","@babel/plugin-transform-modules-commonjs":"^7.26.3","@babel/plugin-transform-runtime":"^7.26.10","@babel/preset-env":"^7.26.9","@babel/preset-react":"^7.26.3","@testing-library/jest-dom":"^6.6.3","@types/react":"^19.0.10","@types/react-dom":"^19.0.4","@typescript-eslint/eslint-plugin":"^8.26.1","@typescript-eslint/parser":"^8.26.1","babel-jest":"^29.7.0","babel-loader":"^10.0.0","babel-plugin-inline-json-import":"^0.3.2","babel-plugin-module-resolver":"^5.0.2","babel-plugin-styled-components":"^2.1.4","chai-colors":"^1.0.1","css-loader":"^7.1.2",cypress:"^14.2.0","cypress-browser-permissions":"^1.1.0","cypress-wait-until":"^3.0.2",eslint:"^8.57.1","eslint-config-standard":"^17.1.0","eslint-import-resolver-typescript":"^3.9.1","eslint-plugin-cypress":"^2.15.2","eslint-plugin-import":"^2.31.0","eslint-plugin-jest":"^28.11.0","eslint-plugin-n":"^17.16.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.2.0","eslint-plugin-react":"^7.37.4","eslint-plugin-standard":"^5.0.0","fetch-mock-jest":"^1.5.1",glob:"^11.0.1",husky:"^9.1.7",jest:"29.7.0","jest-environment-jsdom":"^29.7.0","lint-staged":"^15.5.0","node-fetch":"^2.7.0","null-loader":"^4.0.1",nx:"19.8.14","nx-remotecache-azure":"^19.0.0","os-browserify":"^0.3.0","start-server-and-test":"^2.0.11",typescript:"^5.8.2",vite:"^4.3.9",vitest:"^2.1.9","webpack-merge":"^6.0.1"},d="yarn@4.7.0",m={node:"22.x"},u={},b={name:e,version:s,private:!0,license:o,type:t,main:r,workspaces:l,scripts:a,"lint-staged":{"*.js":["eslint --fix"]},browserslist:i,resolutions:n,dependencies:c,devDependencies:p,packageManager:d,engines:m,nx:u};export{i as browserslist,b as default,c as dependencies,p as devDependencies,m as engines,o as license,r as main,e as name,u as nx,d as packageManager,n as resolutions,a as scripts,t as type,s as version,l as workspaces};
package/dist/src/env.js CHANGED
@@ -1 +1 @@
1
- function i(i){const o=i.config.desktopViewMinWidth||0,s="undefined"!=typeof window,e={isBrowser:s,isMobile:()=>s&&innerWidth<o,isLocalhost:()=>location.host.startsWith("localhost")||location.host.startsWith("127.0.0.1"),isDesktop:()=>s&&!e.isMobile()};return s&&window.addEventListener("resize",(()=>i.bus.send("env/resize",{isMobile:e.isMobile()}))),e}export{i as buildEnv};
1
+ function o(o){const i=o.config.desktopViewMinWidth||0,t="undefined"!=typeof window,s=t&&("ontouchstart"in window||navigator.maxTouchPoints>0),n=()=>t&&innerWidth<i,e={isBrowser:t,isMobile:()=>n(),isLocalhost:()=>location.host.startsWith("localhost")||location.host.startsWith("127.0.0.1"),isDesktop:()=>t&&!n(),supportsTouch:s};return t&&window.addEventListener("resize",(()=>o.bus.send("env/resize",{isMobile:e.isMobile()}))),e}export{o as buildEnv};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atriusmaps-node-sdk",
3
- "version": "3.3.453",
3
+ "version": "3.3.455",
4
4
  "description": "This project provides an API to Atrius Personal Wayfinder maps within a Node environment. See the README.md for more information",
5
5
  "keywords": [
6
6
  "map",