UNPKG

@tldraw/editor

Version:

tldraw infinite canvas SDK (editor).

44 lines (43 loc) 1.78 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var environment_exports = {}; __export(environment_exports, { tlenv: () => tlenv }); module.exports = __toCommonJS(environment_exports); const tlenv = { isSafari: false, isIos: false, isChromeForIos: false, isFirefox: false, isAndroid: false, isWebview: false, isDarwin: false, hasCanvasSupport: false }; if (typeof window !== "undefined" && "navigator" in window) { tlenv.isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); tlenv.isIos = !!navigator.userAgent.match(/iPad/i) || !!navigator.userAgent.match(/iPhone/i); tlenv.isChromeForIos = /crios.*safari/i.test(navigator.userAgent); tlenv.isFirefox = /firefox/i.test(navigator.userAgent); tlenv.isAndroid = /android/i.test(navigator.userAgent); tlenv.isDarwin = window.navigator.userAgent.toLowerCase().indexOf("mac") > -1; tlenv.hasCanvasSupport = typeof window !== "undefined" && "Promise" in window && "HTMLCanvasElement" in window; } //# sourceMappingURL=environment.js.map