@excalidraw/common 0.18.0-b16b6f8fd → 0.18.0-b9d27d3

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/dist/dev/index.js CHANGED
@@ -647,9 +647,12 @@ var isAndroid = /\b(android)\b/i.test(navigator.userAgent);
647
647
  var isFirefox = typeof window !== "undefined" && "netscape" in window && navigator.userAgent.indexOf("rv:") > 1 && navigator.userAgent.indexOf("Gecko") > 1;
648
648
  var isChrome = navigator.userAgent.indexOf("Chrome") !== -1;
649
649
  var isSafari = !isChrome && navigator.userAgent.indexOf("Safari") !== -1;
650
- var isIOS = /iPad|iPhone/.test(navigator.platform) || // iPadOS 13+
650
+ var isIOS = /iPad|iPhone/i.test(navigator.platform) || // iPadOS 13+
651
651
  navigator.userAgent.includes("Mac") && "ontouchend" in document;
652
652
  var isBrave = () => navigator.brave?.isBrave?.name === "isBrave";
653
+ var isMobile = isIOS || /android|webos|ipod|blackberry|iemobile|opera mini/i.test(
654
+ navigator.userAgent
655
+ ) || /android|ios|ipod|blackberry|windows phone/i.test(navigator.platform);
653
656
  var supportsResizeObserver = typeof window !== "undefined" && "ResizeObserver" in window;
654
657
  var APP_NAME = "Excalidraw";
655
658
  var TEXT_AUTOWRAP_THRESHOLD = 36;
@@ -829,13 +832,16 @@ var IMAGE_MIME_TYPES = {
829
832
  avif: "image/avif",
830
833
  jfif: "image/jfif"
831
834
  };
832
- var MIME_TYPES = {
835
+ var STRING_MIME_TYPES = {
833
836
  text: "text/plain",
834
837
  html: "text/html",
835
838
  json: "application/json",
836
839
  // excalidraw data
837
840
  excalidraw: "application/vnd.excalidraw+json",
838
- excalidrawlib: "application/vnd.excalidrawlib+json",
841
+ excalidrawlib: "application/vnd.excalidrawlib+json"
842
+ };
843
+ var MIME_TYPES = {
844
+ ...STRING_MIME_TYPES,
839
845
  // image-encoded excalidraw data
840
846
  "excalidraw.svg": "image/svg+xml",
841
847
  "excalidraw.png": "image/png",
@@ -1017,6 +1023,7 @@ var UserIdleState = /* @__PURE__ */ ((UserIdleState2) => {
1017
1023
  return UserIdleState2;
1018
1024
  })(UserIdleState || {});
1019
1025
  var LINE_POLYGON_POINT_MERGE_DISTANCE = 20;
1026
+ var DOUBLE_TAP_POSITION_THRESHOLD = 35;
1020
1027
 
1021
1028
  // src/font-metadata.ts
1022
1029
  init_define_import_meta_env();
@@ -2189,6 +2196,7 @@ export {
2189
2196
  DEFAULT_UI_OPTIONS,
2190
2197
  DEFAULT_VERSION,
2191
2198
  DEFAULT_VERTICAL_ALIGN,
2199
+ DOUBLE_TAP_POSITION_THRESHOLD,
2192
2200
  DRAGGING_THRESHOLD,
2193
2201
  EDITOR_LS_KEYS,
2194
2202
  ELEMENTS_PALETTE_SHADE_INDEXES,
@@ -2247,6 +2255,7 @@ export {
2247
2255
  SHIFT_LOCKING_ANGLE,
2248
2256
  SIDE_RESIZING_THRESHOLD,
2249
2257
  STATS_PANELS,
2258
+ STRING_MIME_TYPES,
2250
2259
  STROKE_WIDTH,
2251
2260
  SVG_DOCUMENT_PREAMBLE,
2252
2261
  SVG_NS,
@@ -2326,6 +2335,7 @@ export {
2326
2335
  isLatinChar,
2327
2336
  isLocalLink,
2328
2337
  isMemberOf,
2338
+ isMobile,
2329
2339
  isPrimitive,
2330
2340
  isProdEnv,
2331
2341
  isPromiseLike,