react-iiif-vault 0.9.13 → 0.9.14

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.
@@ -30,18 +30,19 @@ var __objRest = (source, exclude) => {
30
30
  return target;
31
31
  };
32
32
  import * as React from "react";
33
- import React__default, { useContext, useMemo, useState, useEffect, createContext, useRef, useLayoutEffect, useCallback, Fragment as Fragment$1, useReducer } from "react";
33
+ import React__default, { useContext, useMemo, useState, useEffect, createContext, useRef, useLayoutEffect, useCallback, Fragment, useReducer } from "react";
34
34
  import { AtlasAuto, mergeStyles, RegionHighlight, TileSet } from "@atlas-viewer/atlas";
35
+ import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
35
36
  import { globalVault, Vault } from "@iiif/vault";
36
37
  import { createAction } from "typesafe-actions";
37
38
  import require$$0 from "react-dom";
38
39
  import { ImageServiceLoader, getImageServices, getFixedSizeFromImage } from "@atlas-viewer/iiif-image-api";
39
- function _setPrototypeOf(o, p2) {
40
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p3) {
41
- o2.__proto__ = p3;
40
+ function _setPrototypeOf(o, p) {
41
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
42
+ o2.__proto__ = p2;
42
43
  return o2;
43
44
  };
44
- return _setPrototypeOf(o, p2);
45
+ return _setPrototypeOf(o, p);
45
46
  }
46
47
  function _inheritsLoose(subClass, superClass) {
47
48
  subClass.prototype = Object.create(superClass.prototype);
@@ -125,39 +126,6 @@ var ErrorBoundary = /* @__PURE__ */ function(_React$Component) {
125
126
  };
126
127
  return ErrorBoundary2;
127
128
  }(React.Component);
128
- var jsxRuntime = { exports: {} };
129
- var reactJsxRuntime_production_min = {};
130
- /**
131
- * @license React
132
- * react-jsx-runtime.production.min.js
133
- *
134
- * Copyright (c) Facebook, Inc. and its affiliates.
135
- *
136
- * This source code is licensed under the MIT license found in the
137
- * LICENSE file in the root directory of this source tree.
138
- */
139
- var f = React__default, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m$1 = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
140
- function q(c, a, g) {
141
- var b, d = {}, e = null, h = null;
142
- g !== void 0 && (e = "" + g);
143
- a.key !== void 0 && (e = "" + a.key);
144
- a.ref !== void 0 && (h = a.ref);
145
- for (b in a)
146
- m$1.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
147
- if (c && c.defaultProps)
148
- for (b in a = c.defaultProps, a)
149
- d[b] === void 0 && (d[b] = a[b]);
150
- return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
151
- }
152
- reactJsxRuntime_production_min.Fragment = l;
153
- reactJsxRuntime_production_min.jsx = q;
154
- reactJsxRuntime_production_min.jsxs = q;
155
- {
156
- jsxRuntime.exports = reactJsxRuntime_production_min;
157
- }
158
- const jsx = jsxRuntime.exports.jsx;
159
- const jsxs = jsxRuntime.exports.jsxs;
160
- const Fragment = jsxRuntime.exports.Fragment;
161
129
  const defaultResourceContext = {
162
130
  collection: void 0,
163
131
  manifest: void 0,
@@ -913,7 +881,7 @@ const RenderAnnotationPage = ({
913
881
  const style = useStyles(page, "atlas");
914
882
  const html = useStyles(page, "html");
915
883
  useVaultSelector((state) => page.id ? state.iiif.entities.AnnotationPage[page.id] : null, []);
916
- return /* @__PURE__ */ jsx(Fragment$1, {
884
+ return /* @__PURE__ */ jsx(Fragment, {
917
885
  children: (_a = page.items) == null ? void 0 : _a.map((annotation) => {
918
886
  return /* @__PURE__ */ jsx(RenderAnnotation, {
919
887
  id: annotation.id,
@@ -934,8 +902,8 @@ function RenderImage({
934
902
  children
935
903
  }) {
936
904
  var _a, _b, _c, _d;
937
- return /* @__PURE__ */ jsx(Fragment$1, {
938
- children: !image.service ? /* @__PURE__ */ jsxs(Fragment$1, {
905
+ return /* @__PURE__ */ jsx(Fragment, {
906
+ children: !image.service ? /* @__PURE__ */ jsxs(Fragment, {
939
907
  children: [/* @__PURE__ */ jsx("world-image", {
940
908
  uri: image.id,
941
909
  target: image.target.spatial,
@@ -944,7 +912,7 @@ function RenderImage({
944
912
  height: image.height
945
913
  } : void 0
946
914
  }), annotations, children]
947
- }, "no-service") : /* @__PURE__ */ jsxs(Fragment$1, {
915
+ }, "no-service") : /* @__PURE__ */ jsxs(Fragment, {
948
916
  children: [/* @__PURE__ */ jsx(TileSet, {
949
917
  tiles: {
950
918
  id: image.service.id || image.service["@id"] || "unknown",
@@ -1798,7 +1766,7 @@ function Audio({
1798
1766
  }, state, actions] = useSimpleMediaPlayer({
1799
1767
  duration: media.duration
1800
1768
  });
1801
- return /* @__PURE__ */ jsx(Fragment, {
1769
+ return /* @__PURE__ */ jsx(Fragment$1, {
1802
1770
  children: /* @__PURE__ */ jsx(CanvasPortal, {
1803
1771
  children: /* @__PURE__ */ jsxs(MediaPlayerProvider, {
1804
1772
  state,
@@ -1826,7 +1794,7 @@ function Video({
1826
1794
  duration: media.duration
1827
1795
  });
1828
1796
  const Component = "div";
1829
- return /* @__PURE__ */ jsxs(Fragment, {
1797
+ return /* @__PURE__ */ jsxs(Fragment$1, {
1830
1798
  children: [/* @__PURE__ */ jsxs(CanvasPortal, {
1831
1799
  overlay: true,
1832
1800
  children: [/* @__PURE__ */ jsx("style", {
@@ -1984,7 +1952,7 @@ function RenderCanvas({
1984
1952
  }
1985
1953
  throw new Error(strategy.reason || "Unknown image strategy");
1986
1954
  }
1987
- const annotations = /* @__PURE__ */ jsxs(Fragment$1, {
1955
+ const annotations = /* @__PURE__ */ jsxs(Fragment, {
1988
1956
  children: [virtualPage ? /* @__PURE__ */ jsx(RenderAnnotationPage, {
1989
1957
  page: virtualPage
1990
1958
  }) : null, strategy.annotations && strategy.annotations.pages ? strategy.annotations.pages.map((page) => {
@@ -1993,14 +1961,14 @@ function RenderCanvas({
1993
1961
  }, page.id);
1994
1962
  }) : null, children]
1995
1963
  });
1996
- return /* @__PURE__ */ jsxs(Fragment, {
1964
+ return /* @__PURE__ */ jsxs(Fragment$1, {
1997
1965
  children: [/* @__PURE__ */ jsxs("world-object", __spreadProps(__spreadValues({
1998
1966
  height: canvas.height,
1999
1967
  width: canvas.width,
2000
1968
  x,
2001
1969
  y
2002
1970
  }, elementProps), {
2003
- children: [strategy.type === "images" ? /* @__PURE__ */ jsxs(Fragment, {
1971
+ children: [strategy.type === "images" ? /* @__PURE__ */ jsxs(Fragment$1, {
2004
1972
  children: [strategy.images.map((image, idx) => {
2005
1973
  return /* @__PURE__ */ jsx(RenderImage, {
2006
1974
  isStatic,
@@ -2015,7 +1983,7 @@ function RenderCanvas({
2015
1983
  }) : null]
2016
1984
  }) : null, strategy.type === "3d-model" ? /* @__PURE__ */ jsx(Model, {
2017
1985
  model: strategy.model
2018
- }) : null, strategy.type === "media" ? /* @__PURE__ */ jsx(Fragment, {
1986
+ }) : null, strategy.type === "media" ? /* @__PURE__ */ jsx(Fragment$1, {
2019
1987
  children: strategy.media.type === "Sound" ? /* @__PURE__ */ jsxs(Audio, {
2020
1988
  media: strategy.media,
2021
1989
  children: [thumbnailFallbackImage, renderMediaControls ? renderMediaControls(strategy) : null]