@canopy-iiif/app 1.5.13 → 1.5.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-iiif/app",
3
- "version": "1.5.13",
3
+ "version": "1.5.15",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Mat Jordan <mat@northwestern.edu>",
package/ui/dist/index.mjs CHANGED
@@ -809,7 +809,7 @@ function NavigationTreeItem({ node, depth, nodeKey }) {
809
809
  "data-expanded": allowToggle ? defaultExpanded ? "true" : "false" : void 0,
810
810
  "data-default-expanded": allowToggle && defaultExpanded ? "true" : void 0
811
811
  },
812
- /* @__PURE__ */ React14.createElement("div", { className: "canopy-nav-tree__row" }, /* @__PURE__ */ React14.createElement(
812
+ /* @__PURE__ */ React14.createElement("div", { className: "canopy-nav-tree__row" }, /* @__PURE__ */ React14.createElement("div", { className: "canopy-nav-tree__link-wrapper" }, /* @__PURE__ */ React14.createElement(
813
813
  Tag,
814
814
  {
815
815
  className: classes.join(" "),
@@ -819,7 +819,7 @@ function NavigationTreeItem({ node, depth, nodeKey }) {
819
819
  },
820
820
  node.title || node.slug,
821
821
  isRoadmap ? /* @__PURE__ */ React14.createElement("span", { className: "canopy-nav-tree__badge" }, "Roadmap") : null
822
- ), allowToggle ? /* @__PURE__ */ React14.createElement(
822
+ )), allowToggle ? /* @__PURE__ */ React14.createElement(
823
823
  "button",
824
824
  {
825
825
  type: "button",
@@ -839,7 +839,14 @@ function NavigationTreeItem({ node, depth, nodeKey }) {
839
839
  strokeWidth: "1.5",
840
840
  className: "canopy-nav-tree__toggle-icon"
841
841
  },
842
- /* @__PURE__ */ React14.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 9l7 7 7-7" })
842
+ /* @__PURE__ */ React14.createElement(
843
+ "path",
844
+ {
845
+ strokeLinecap: "round",
846
+ strokeLinejoin: "round",
847
+ d: "M5 9l7 7 7-7"
848
+ }
849
+ )
843
850
  ),
844
851
  /* @__PURE__ */ React14.createElement("span", { className: "sr-only" }, toggleLabel)
845
852
  ) : null),
@@ -884,7 +891,14 @@ function NavigationTree({
884
891
  ...rest
885
892
  },
886
893
  heading ? /* @__PURE__ */ React14.createElement("div", { className: headingClassName }, heading) : null,
887
- /* @__PURE__ */ React14.createElement(NavigationTreeList, { nodes, depth: includeRoot ? -1 : 0, parentKey })
894
+ /* @__PURE__ */ React14.createElement(
895
+ NavigationTreeList,
896
+ {
897
+ nodes,
898
+ depth: includeRoot ? -1 : 0,
899
+ parentKey
900
+ }
901
+ )
888
902
  );
889
903
  }
890
904
 
@@ -3089,6 +3103,9 @@ var DEFAULT_TILE_LAYERS = [
3089
3103
  maxZoom: 19
3090
3104
  }
3091
3105
  ];
3106
+ var CUSTOM_MARKER_SIZE = 40;
3107
+ var CUSTOM_MARKER_RADIUS = CUSTOM_MARKER_SIZE / 2;
3108
+ var CUSTOM_MARKER_POPUP_OFFSET = -CUSTOM_MARKER_RADIUS + 6;
3092
3109
  function resolveGlobalLeaflet() {
3093
3110
  try {
3094
3111
  if (typeof globalThis !== "undefined" && globalThis.L) return globalThis.L;
@@ -3295,8 +3312,8 @@ function buildTileLayers(inputLayers, leaflet) {
3295
3312
  function buildMarkerIcon(marker, leaflet) {
3296
3313
  if (!leaflet) return null;
3297
3314
  const hasThumbnail = Boolean(marker && marker.thumbnail);
3298
- const size = 56;
3299
- const anchor = size / 2;
3315
+ const size = CUSTOM_MARKER_SIZE;
3316
+ const anchor = CUSTOM_MARKER_RADIUS;
3300
3317
  const html = hasThumbnail ? `<div class="canopy-map__marker-thumb"><img src="${escapeHtml(
3301
3318
  marker.thumbnail
3302
3319
  )}" alt="" loading="lazy" /></div>` : '<span class="canopy-map__marker-solid"></span>';
@@ -3305,7 +3322,7 @@ function buildMarkerIcon(marker, leaflet) {
3305
3322
  className: "canopy-map__marker",
3306
3323
  iconSize: [size, size],
3307
3324
  iconAnchor: [anchor, anchor],
3308
- popupAnchor: [0, -anchor + 10],
3325
+ popupAnchor: [0, CUSTOM_MARKER_POPUP_OFFSET],
3309
3326
  html
3310
3327
  });
3311
3328
  } catch (_) {
@@ -3314,8 +3331,8 @@ function buildMarkerIcon(marker, leaflet) {
3314
3331
  }
3315
3332
  function buildClusterOptions(leaflet) {
3316
3333
  if (!leaflet) return null;
3317
- const size = 56;
3318
- const anchor = size / 2;
3334
+ const size = CUSTOM_MARKER_SIZE;
3335
+ const anchor = CUSTOM_MARKER_RADIUS;
3319
3336
  return {
3320
3337
  chunkedLoading: true,
3321
3338
  iconCreateFunction: (cluster) => {