@nypl/web-reader 3.0.0 → 3.1.0

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/esm/index.js CHANGED
@@ -13648,38 +13648,6 @@ var require_regenerator = __commonJS({
13648
13648
  }
13649
13649
  });
13650
13650
 
13651
- // node_modules/make-event-props/dist/entry.js
13652
- var require_entry = __commonJS({
13653
- "node_modules/make-event-props/dist/entry.js"(exports2) {
13654
- "use strict";
13655
- Object.defineProperty(exports2, "__esModule", {
13656
- value: true
13657
- });
13658
- exports2.default = exports2.focusEvents = exports2.keyboardEvents = exports2.touchEvents = exports2.mouseEvents = void 0;
13659
- var mouseEvents2 = ["onClick", "onContextMenu", "onDoubleClick", "onDrag", "onDragEnd", "onDragEnter", "onDragExit", "onDragLeave", "onDragOver", "onDragStart", "onDrop", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseMove", "onMouseOut", "onMouseOver", "onMouseUp"];
13660
- exports2.mouseEvents = mouseEvents2;
13661
- var touchEvents2 = ["onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart"];
13662
- exports2.touchEvents = touchEvents2;
13663
- var keyboardEvents2 = ["onKeyDown", "onKeyPress", "onKeyUp"];
13664
- exports2.keyboardEvents = keyboardEvents2;
13665
- var focusEvents = ["onFocus", "onBlur"];
13666
- exports2.focusEvents = focusEvents;
13667
- var makeEventProps4 = function makeEventProps5(props, getArgs) {
13668
- var eventProps2 = {};
13669
- [].concat(mouseEvents2, touchEvents2, keyboardEvents2, focusEvents).forEach(function(eventName) {
13670
- if (props[eventName]) {
13671
- eventProps2[eventName] = function(event) {
13672
- return getArgs ? props[eventName](event, getArgs(eventName)) : props[eventName](event);
13673
- };
13674
- }
13675
- });
13676
- return eventProps2;
13677
- };
13678
- var _default = makeEventProps4;
13679
- exports2.default = _default;
13680
- }
13681
- });
13682
-
13683
13651
  // node_modules/debounce/index.js
13684
13652
  var require_debounce = __commonJS({
13685
13653
  "node_modules/debounce/index.js"(exports2, module2) {
@@ -14689,7 +14657,7 @@ var processStyleValue = function processStyleValue2(key, value) {
14689
14657
  return value;
14690
14658
  };
14691
14659
  if (false) {
14692
- contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
14660
+ contentValuePattern = /(var|attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
14693
14661
  contentValues = ["normal", "none", "initial", "inherit", "unset"];
14694
14662
  oldProcessStyleValue = processStyleValue;
14695
14663
  msPattern = /^-ms-/;
@@ -16307,9 +16275,9 @@ import * as React7 from "react";
16307
16275
 
16308
16276
  // node_modules/@chakra-ui/hooks/dist/chakra-ui-hooks.esm.js
16309
16277
  import * as React6 from "react";
16310
- import React__default, { useState as useState3, useCallback as useCallback3, useEffect as useEffect4, useRef as useRef4 } from "react";
16278
+ import React__default, { useState as useState3, useMemo as useMemo2, useCallback as useCallback3, useEffect as useEffect4, useRef as useRef4 } from "react";
16311
16279
 
16312
- // node_modules/@chakra-ui/hooks/dist/use-animation-state-35233362.esm.js
16280
+ // node_modules/@chakra-ui/hooks/dist/use-animation-state-5054a9f7.esm.js
16313
16281
  import * as React5 from "react";
16314
16282
  import { useState, useEffect as useEffect2 } from "react";
16315
16283
  var useSafeLayoutEffect = isBrowser2 ? React5.useLayoutEffect : React5.useEffect;
@@ -16383,22 +16351,22 @@ function useBoolean(initialState2) {
16383
16351
  initialState2 = false;
16384
16352
  }
16385
16353
  var _useState = useState3(initialState2), value = _useState[0], setValue = _useState[1];
16386
- var on = useCallback3(function() {
16387
- setValue(true);
16388
- }, []);
16389
- var off = useCallback3(function() {
16390
- setValue(false);
16391
- }, []);
16392
- var toggle = useCallback3(function() {
16393
- setValue(function(prev2) {
16394
- return !prev2;
16395
- });
16354
+ var callbacks = useMemo2(function() {
16355
+ return {
16356
+ on: function on() {
16357
+ return setValue(true);
16358
+ },
16359
+ off: function off() {
16360
+ return setValue(false);
16361
+ },
16362
+ toggle: function toggle() {
16363
+ return setValue(function(prev2) {
16364
+ return !prev2;
16365
+ });
16366
+ }
16367
+ };
16396
16368
  }, []);
16397
- return [value, {
16398
- on,
16399
- off,
16400
- toggle
16401
- }];
16369
+ return [value, callbacks];
16402
16370
  }
16403
16371
  function useControllableProp(prop2, state2) {
16404
16372
  var isControlled = prop2 !== void 0;
@@ -16947,7 +16915,7 @@ if (__DEV__) {
16947
16915
  }
16948
16916
 
16949
16917
  // node_modules/@chakra-ui/react-env/dist/chakra-ui-react-env.esm.js
16950
- import React8, { useContext as useContext5, useState as useState4, useMemo as useMemo3, createContext as createContext5 } from "react";
16918
+ import React8, { useContext as useContext5, useState as useState4, useMemo as useMemo4, createContext as createContext5 } from "react";
16951
16919
  var doc = {
16952
16920
  body: {
16953
16921
  classList: {
@@ -17061,7 +17029,7 @@ function useEnvironment() {
17061
17029
  function EnvironmentProvider(props) {
17062
17030
  var children = props.children, environmentProp = props.environment;
17063
17031
  var _useState = useState4(null), node2 = _useState[0], setNode = _useState[1];
17064
- var context = useMemo3(function() {
17032
+ var context = useMemo4(function() {
17065
17033
  var _ref;
17066
17034
  var doc3 = node2 == null ? void 0 : node2.ownerDocument;
17067
17035
  var win2 = node2 == null ? void 0 : node2.ownerDocument.defaultView;
@@ -18812,7 +18780,7 @@ function toCSSVar(rawTheme) {
18812
18780
  // node_modules/@chakra-ui/system/dist/chakra-ui-system.esm.js
18813
18781
  var import_react_fast_compare = __toESM(require_react_fast_compare());
18814
18782
  import * as React11 from "react";
18815
- import { useRef as useRef6, useMemo as useMemo6 } from "react";
18783
+ import { useRef as useRef6, useMemo as useMemo7 } from "react";
18816
18784
 
18817
18785
  // node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js
18818
18786
  import "react";
@@ -19424,7 +19392,7 @@ function boundAlpha(a2) {
19424
19392
  }
19425
19393
  function convertToPercentage(n) {
19426
19394
  if (n <= 1) {
19427
- return Number(n) * 100 + "%";
19395
+ return "".concat(Number(n) * 100, "%");
19428
19396
  }
19429
19397
  return n;
19430
19398
  }
@@ -19793,9 +19761,9 @@ function inputToRGB(color3) {
19793
19761
  }
19794
19762
  var CSS_INTEGER = "[-\\+]?\\d+%?";
19795
19763
  var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
19796
- var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
19797
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
19798
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
19764
+ var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
19765
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
19766
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
19799
19767
  var matchers = {
19800
19768
  CSS_UNIT: new RegExp(CSS_UNIT),
19801
19769
  rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
@@ -19978,7 +19946,7 @@ var TinyColor = function() {
19978
19946
  var h = Math.round(hsv.h * 360);
19979
19947
  var s = Math.round(hsv.s * 100);
19980
19948
  var v = Math.round(hsv.v * 100);
19981
- return this.a === 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this.roundA + ")";
19949
+ return this.a === 1 ? "hsv(".concat(h, ", ").concat(s, "%, ").concat(v, "%)") : "hsva(".concat(h, ", ").concat(s, "%, ").concat(v, "%, ").concat(this.roundA, ")");
19982
19950
  };
19983
19951
  TinyColor2.prototype.toHsl = function() {
19984
19952
  var hsl = rgbToHsl(this.r, this.g, this.b);
@@ -19989,7 +19957,7 @@ var TinyColor = function() {
19989
19957
  var h = Math.round(hsl.h * 360);
19990
19958
  var s = Math.round(hsl.s * 100);
19991
19959
  var l = Math.round(hsl.l * 100);
19992
- return this.a === 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this.roundA + ")";
19960
+ return this.a === 1 ? "hsl(".concat(h, ", ").concat(s, "%, ").concat(l, "%)") : "hsla(".concat(h, ", ").concat(s, "%, ").concat(l, "%, ").concat(this.roundA, ")");
19993
19961
  };
19994
19962
  TinyColor2.prototype.toHex = function(allow3Char) {
19995
19963
  if (allow3Char === void 0) {
@@ -20027,11 +19995,11 @@ var TinyColor = function() {
20027
19995
  var r = Math.round(this.r);
20028
19996
  var g = Math.round(this.g);
20029
19997
  var b2 = Math.round(this.b);
20030
- return this.a === 1 ? "rgb(" + r + ", " + g + ", " + b2 + ")" : "rgba(" + r + ", " + g + ", " + b2 + ", " + this.roundA + ")";
19998
+ return this.a === 1 ? "rgb(".concat(r, ", ").concat(g, ", ").concat(b2, ")") : "rgba(".concat(r, ", ").concat(g, ", ").concat(b2, ", ").concat(this.roundA, ")");
20031
19999
  };
20032
20000
  TinyColor2.prototype.toPercentageRgb = function() {
20033
20001
  var fmt = function(x) {
20034
- return Math.round(bound01(x, 255) * 100) + "%";
20002
+ return "".concat(Math.round(bound01(x, 255) * 100), "%");
20035
20003
  };
20036
20004
  return {
20037
20005
  r: fmt(this.r),
@@ -20044,7 +20012,7 @@ var TinyColor = function() {
20044
20012
  var rnd = function(x) {
20045
20013
  return Math.round(bound01(x, 255) * 100);
20046
20014
  };
20047
- return this.a === 1 ? "rgb(" + rnd(this.r) + "%, " + rnd(this.g) + "%, " + rnd(this.b) + "%)" : "rgba(" + rnd(this.r) + "%, " + rnd(this.g) + "%, " + rnd(this.b) + "%, " + this.roundA + ")";
20015
+ return this.a === 1 ? "rgb(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%)") : "rgba(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%, ").concat(this.roundA, ")");
20048
20016
  };
20049
20017
  TinyColor2.prototype.toName = function() {
20050
20018
  if (this.a === 0) {
@@ -20958,8 +20926,8 @@ var typography2 = {
20958
20926
  }
20959
20927
  };
20960
20928
 
20961
- // node_modules/@chakra-ui/theme/dist/index-7ef32ef8.esm.js
20962
- var baseStyleContainer$3 = {
20929
+ // node_modules/@chakra-ui/theme/dist/index-895c67e0.esm.js
20930
+ var baseStyleContainer$4 = {
20963
20931
  borderTopWidth: "1px",
20964
20932
  borderColor: "inherit",
20965
20933
  _last: {
@@ -20993,7 +20961,7 @@ var baseStyleIcon$5 = {
20993
20961
  };
20994
20962
  var baseStyle$D = {
20995
20963
  root: {},
20996
- container: baseStyleContainer$3,
20964
+ container: baseStyleContainer$4,
20997
20965
  button: baseStyleButton$1,
20998
20966
  panel: baseStylePanel,
20999
20967
  icon: baseStyleIcon$5
@@ -21105,7 +21073,7 @@ var baseStyleExcessLabel = function baseStyleExcessLabel2(props) {
21105
21073
  bg: mode("gray.200", "whiteAlpha.400")(props)
21106
21074
  };
21107
21075
  };
21108
- var baseStyleContainer$2 = function baseStyleContainer(props) {
21076
+ var baseStyleContainer$3 = function baseStyleContainer(props) {
21109
21077
  var name = props.name, theme3 = props.theme;
21110
21078
  var bg = name ? randomColor({
21111
21079
  string: name
@@ -21126,7 +21094,7 @@ var baseStyle$B = function baseStyle(props) {
21126
21094
  return {
21127
21095
  badge: baseStyleBadge(props),
21128
21096
  excessLabel: baseStyleExcessLabel(props),
21129
- container: baseStyleContainer$2(props)
21097
+ container: baseStyleContainer$3(props)
21130
21098
  };
21131
21099
  };
21132
21100
  function getSize$3(size3) {
@@ -21449,6 +21417,11 @@ var baseStyleControl$1 = function baseStyleControl(props) {
21449
21417
  }
21450
21418
  };
21451
21419
  };
21420
+ var baseStyleContainer$2 = {
21421
+ _disabled: {
21422
+ cursor: "not-allowed"
21423
+ }
21424
+ };
21452
21425
  var baseStyleLabel$3 = {
21453
21426
  userSelect: "none",
21454
21427
  _disabled: {
@@ -21462,6 +21435,7 @@ var baseStyleIcon$4 = {
21462
21435
  var baseStyle$x = function baseStyle2(props) {
21463
21436
  return {
21464
21437
  icon: baseStyleIcon$4,
21438
+ container: baseStyleContainer$2,
21465
21439
  control: baseStyleControl$1(props),
21466
21440
  label: baseStyleLabel$3
21467
21441
  };
@@ -22518,6 +22492,7 @@ var baseStyleControl2 = function baseStyleControl3(props) {
22518
22492
  var baseStyle$c = function baseStyle13(props) {
22519
22493
  return {
22520
22494
  label: Checkbox.baseStyle(props).label,
22495
+ container: Checkbox.baseStyle(props).container,
22521
22496
  control: baseStyleControl2(props)
22522
22497
  };
22523
22498
  };
@@ -24252,7 +24227,7 @@ function useMotionRef(visualState, visualElement2, externalRef) {
24252
24227
  }
24253
24228
 
24254
24229
  // node_modules/framer-motion/dist/es/context/MotionContext/create.js
24255
- import { useMemo as useMemo7, useContext as useContext13 } from "react";
24230
+ import { useMemo as useMemo8, useContext as useContext13 } from "react";
24256
24231
 
24257
24232
  // node_modules/framer-motion/dist/es/render/utils/variants.js
24258
24233
  function isVariantLabels(v) {
@@ -24315,7 +24290,7 @@ function getCurrentTreeVariants(props, context) {
24315
24290
  // node_modules/framer-motion/dist/es/context/MotionContext/create.js
24316
24291
  function useCreateMotionContext(props, isStatic) {
24317
24292
  var _a = getCurrentTreeVariants(props, useContext13(MotionContext)), initial = _a.initial, animate2 = _a.animate;
24318
- return useMemo7(function() {
24293
+ return useMemo8(function() {
24319
24294
  return { initial, animate: animate2 };
24320
24295
  }, isStatic ? [
24321
24296
  variantLabelsAsDependency(initial),
@@ -24406,7 +24381,7 @@ function isSVGComponent(Component4) {
24406
24381
  import { createElement as createElement14 } from "react";
24407
24382
 
24408
24383
  // node_modules/framer-motion/dist/es/render/html/use-props.js
24409
- import { useMemo as useMemo8 } from "react";
24384
+ import { useMemo as useMemo9 } from "react";
24410
24385
 
24411
24386
  // node_modules/framer-motion/dist/es/render/dom/projection/scale-correction.js
24412
24387
  var valueScaleCorrection = {};
@@ -24854,7 +24829,7 @@ function copyRawValuesOnly(target, source, props) {
24854
24829
  }
24855
24830
  function useInitialMotionValues(_a, visualState, isStatic) {
24856
24831
  var transformTemplate2 = _a.transformTemplate;
24857
- return useMemo8(function() {
24832
+ return useMemo9(function() {
24858
24833
  var state2 = createHtmlRenderState();
24859
24834
  buildHTMLStyles(state2, visualState, void 0, void 0, { enableHardwareAcceleration: !isStatic }, transformTemplate2);
24860
24835
  var vars = state2.vars, style = state2.style;
@@ -24967,7 +24942,7 @@ function filterProps(props, isDom, forwardMotionProps) {
24967
24942
  }
24968
24943
 
24969
24944
  // node_modules/framer-motion/dist/es/render/svg/use-props.js
24970
- import { useMemo as useMemo9 } from "react";
24945
+ import { useMemo as useMemo10 } from "react";
24971
24946
 
24972
24947
  // node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.js
24973
24948
  function calcOrigin(origin, offset2, size3) {
@@ -25039,7 +25014,7 @@ var createSvgRenderState = function() {
25039
25014
 
25040
25015
  // node_modules/framer-motion/dist/es/render/svg/use-props.js
25041
25016
  function useSVGProps(props, visualState) {
25042
- var visualProps = useMemo9(function() {
25017
+ var visualProps = useMemo10(function() {
25043
25018
  var state2 = createSvgRenderState();
25044
25019
  buildSVGAttrs(state2, visualState, void 0, void 0, { enableHardwareAcceleration: false }, props.transformTemplate);
25045
25020
  return __assign(__assign({}, state2.attrs), { style: __assign({}, state2.style) });
@@ -30533,13 +30508,13 @@ var FormErrorIcon = /* @__PURE__ */ forwardRef3(function(props, ref) {
30533
30508
  if (__DEV__) {
30534
30509
  FormErrorIcon.displayName = "FormErrorIcon";
30535
30510
  }
30536
- var _excluded8 = ["className", "children", "requiredIndicator"];
30511
+ var _excluded8 = ["className", "children", "requiredIndicator", "optionalIndicator"];
30537
30512
  var FormLabel = /* @__PURE__ */ forwardRef3(function(passedProps, ref) {
30538
30513
  var _field$getLabelProps;
30539
30514
  var styles2 = useStyleConfig("FormLabel", passedProps);
30540
30515
  var props = omitThemingProps(passedProps);
30541
30516
  props.className;
30542
- var children = props.children, _props$requiredIndica = props.requiredIndicator, requiredIndicator = _props$requiredIndica === void 0 ? /* @__PURE__ */ React20.createElement(RequiredIndicator, null) : _props$requiredIndica, rest = _objectWithoutPropertiesLoose8(props, _excluded8);
30517
+ var children = props.children, _props$requiredIndica = props.requiredIndicator, requiredIndicator = _props$requiredIndica === void 0 ? /* @__PURE__ */ React20.createElement(RequiredIndicator, null) : _props$requiredIndica, _props$optionalIndica = props.optionalIndicator, optionalIndicator = _props$optionalIndica === void 0 ? null : _props$optionalIndica, rest = _objectWithoutPropertiesLoose8(props, _excluded8);
30543
30518
  var field = useFormControlContext();
30544
30519
  var ownProps = (_field$getLabelProps = field == null ? void 0 : field.getLabelProps(rest, ref)) != null ? _field$getLabelProps : _extends14({
30545
30520
  ref
@@ -30550,7 +30525,7 @@ var FormLabel = /* @__PURE__ */ forwardRef3(function(passedProps, ref) {
30550
30525
  display: "block",
30551
30526
  textAlign: "start"
30552
30527
  }, styles2)
30553
- }), children, field != null && field.isRequired ? requiredIndicator : null);
30528
+ }), children, field != null && field.isRequired ? requiredIndicator : optionalIndicator);
30554
30529
  });
30555
30530
  if (__DEV__) {
30556
30531
  FormLabel.displayName = "FormLabel";
@@ -31229,18 +31204,28 @@ var Text = /* @__PURE__ */ forwardRef3(function(props, ref) {
31229
31204
  if (__DEV__) {
31230
31205
  Text.displayName = "Text";
31231
31206
  }
31232
- var _excluded$13 = ["spacing", "children", "justify", "direction", "align", "className", "shouldWrapChildren"];
31207
+ var _excluded$13 = ["spacing", "spacingX", "spacingY", "children", "justify", "direction", "align", "className", "shouldWrapChildren"];
31233
31208
  var _excluded2$12 = ["className"];
31234
31209
  var Wrap = /* @__PURE__ */ forwardRef3(function(props, ref) {
31235
- var _props$spacing = props.spacing, spacing3 = _props$spacing === void 0 ? "0.5rem" : _props$spacing, children = props.children, justify = props.justify, direction2 = props.direction, align = props.align, className = props.className, shouldWrapChildren = props.shouldWrapChildren, rest = _objectWithoutPropertiesLoose10(props, _excluded$13);
31210
+ var _props$spacing = props.spacing, spacing3 = _props$spacing === void 0 ? "0.5rem" : _props$spacing, spacingX = props.spacingX, spacingY = props.spacingY, children = props.children, justify = props.justify, direction2 = props.direction, align = props.align, className = props.className, shouldWrapChildren = props.shouldWrapChildren, rest = _objectWithoutPropertiesLoose10(props, _excluded$13);
31236
31211
  var styles2 = React22.useMemo(function() {
31212
+ var _spacingX$spacingY = {
31213
+ spacingX,
31214
+ spacingY
31215
+ }, _spacingX$spacingY$sp = _spacingX$spacingY.spacingX, x = _spacingX$spacingY$sp === void 0 ? spacing3 : _spacingX$spacingY$sp, _spacingX$spacingY$sp2 = _spacingX$spacingY.spacingY, y = _spacingX$spacingY$sp2 === void 0 ? spacing3 : _spacingX$spacingY$sp2;
31237
31216
  return {
31238
- "--chakra-wrap-spacing": function chakraWrapSpacing(theme3) {
31239
- return mapResponsive(spacing3, function(value) {
31217
+ "--chakra-wrap-x-spacing": function chakraWrapXSpacing(theme3) {
31218
+ return mapResponsive(x, function(value) {
31219
+ return tokenToCSSVar("space", value)(theme3);
31220
+ });
31221
+ },
31222
+ "--chakra-wrap-y-spacing": function chakraWrapYSpacing(theme3) {
31223
+ return mapResponsive(y, function(value) {
31240
31224
  return tokenToCSSVar("space", value)(theme3);
31241
31225
  });
31242
31226
  },
31243
- "--wrap-spacing": "calc(var(--chakra-wrap-spacing) / 2)",
31227
+ "--wrap-x-spacing": "calc(var(--chakra-wrap-x-spacing) / 2)",
31228
+ "--wrap-y-spacing": "calc(var(--chakra-wrap-y-spacing) / 2)",
31244
31229
  display: "flex",
31245
31230
  flexWrap: "wrap",
31246
31231
  justifyContent: justify,
@@ -31248,12 +31233,12 @@ var Wrap = /* @__PURE__ */ forwardRef3(function(props, ref) {
31248
31233
  flexDirection: direction2,
31249
31234
  listStyleType: "none",
31250
31235
  padding: "0",
31251
- margin: "calc(var(--wrap-spacing) * -1)",
31236
+ margin: "calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)",
31252
31237
  "& > *:not(style)": {
31253
- margin: "var(--wrap-spacing)"
31238
+ margin: "var(--wrap-y-spacing) var(--wrap-x-spacing)"
31254
31239
  }
31255
31240
  };
31256
- }, [spacing3, justify, align, direction2]);
31241
+ }, [spacing3, spacingX, spacingY, justify, align, direction2]);
31257
31242
  var childrenToRender = shouldWrapChildren ? React22.Children.map(children, function(child, index) {
31258
31243
  return /* @__PURE__ */ React22.createElement(WrapItem, {
31259
31244
  key: index
@@ -36874,9 +36859,45 @@ function _getPrototypeOf(o) {
36874
36859
 
36875
36860
  // node_modules/react-pdf/dist/esm/Document.js
36876
36861
  var import_prop_types3 = __toESM(require_prop_types());
36877
- var import_make_event_props2 = __toESM(require_entry());
36878
36862
  import React44, { PureComponent } from "react";
36879
36863
 
36864
+ // node_modules/make-event-props/dist/esm/index.js
36865
+ var clipboardEvents = ["onCopy", "onCut", "onPaste"];
36866
+ var compositionEvents = ["onCompositionEnd", "onCompositionStart", "onCompositionUpdate"];
36867
+ var keyboardEvents = ["onKeyDown", "onKeyPress", "onKeyUp"];
36868
+ var focusEvents = ["onFocus", "onBlur"];
36869
+ var formEvents = ["onChange", "onInput", "onInvalid", "onReset", "onSubmit"];
36870
+ var genericEvents = ["onError", "onLoad"];
36871
+ var mouseEvents = ["onClick", "onContextMenu", "onDoubleClick", "onDrag", "onDragEnd", "onDragEnter", "onDragExit", "onDragLeave", "onDragOver", "onDragStart", "onDrop", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseMove", "onMouseOut", "onMouseOver", "onMouseUp"];
36872
+ var pointerEvents = ["onPointerDown", "onPointerMove", "onPointerUp", "onPointerCancel", "onGotPointerCapture", "onLostPointerCapture", "onPointerEnter", "onPointerLeave", "onPointerOver", "onPointerOut"];
36873
+ var selectionEvents = ["onSelect"];
36874
+ var touchEvents = ["onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart"];
36875
+ var uiEvents = ["onScroll"];
36876
+ var wheelEvents = ["onWheel"];
36877
+ var mediaEvents = ["onAbort", "onCanPlay", "onCanPlayThrough", "onDurationChange", "onEmptied", "onEncrypted", "onEnded", "onError", "onLoadedData", "onLoadedMetadata", "onLoadStart", "onPause", "onPlay", "onPlaying", "onProgress", "onRateChange", "onSeeked", "onSeeking", "onStalled", "onSuspend", "onTimeUpdate", "onVolumeChange", "onWaiting"];
36878
+ var imageEvents = ["onLoad", "onError"];
36879
+ var animationEvents = ["onAnimationStart", "onAnimationEnd", "onAnimationIteration"];
36880
+ var transitionEvents = ["onTransitionEnd"];
36881
+ var otherEvents = ["onToggle"];
36882
+ var allEvents = [].concat(clipboardEvents, compositionEvents, keyboardEvents, focusEvents, formEvents, genericEvents, mouseEvents, pointerEvents, selectionEvents, touchEvents, uiEvents, wheelEvents, mediaEvents, imageEvents, animationEvents, transitionEvents, otherEvents);
36883
+ var makeEventProps = function makeEventProps2(props, getArgs) {
36884
+ var eventProps2 = {};
36885
+ allEvents.forEach(function(eventName) {
36886
+ if (!(eventName in props)) {
36887
+ return;
36888
+ }
36889
+ if (!getArgs) {
36890
+ eventProps2[eventName] = props[eventName];
36891
+ return;
36892
+ }
36893
+ eventProps2[eventName] = function(event) {
36894
+ return props[eventName](event, getArgs(eventName));
36895
+ };
36896
+ });
36897
+ return eventProps2;
36898
+ };
36899
+ var esm_default = makeEventProps;
36900
+
36880
36901
  // node_modules/make-cancellable-promise/dist/esm/index.js
36881
36902
  function makeCancellablePromise(promise) {
36882
36903
  var isCancelled = false;
@@ -37306,10 +37327,9 @@ function _toConsumableArray(arr) {
37306
37327
 
37307
37328
  // node_modules/react-pdf/dist/esm/shared/propTypes.js
37308
37329
  var import_prop_types2 = __toESM(require_prop_types());
37309
- var import_make_event_props = __toESM(require_entry());
37310
37330
  var eventProps = function() {
37311
37331
  var result = {};
37312
- [].concat(_toConsumableArray(import_make_event_props.mouseEvents), _toConsumableArray(import_make_event_props.touchEvents), _toConsumableArray(import_make_event_props.keyboardEvents)).forEach(function(eventName) {
37332
+ [].concat(_toConsumableArray(mouseEvents), _toConsumableArray(touchEvents), _toConsumableArray(keyboardEvents)).forEach(function(eventName) {
37313
37333
  result[eventName] = import_prop_types2.default.func;
37314
37334
  });
37315
37335
  return result;
@@ -37798,7 +37818,7 @@ var Document = /* @__PURE__ */ function(_PureComponent) {
37798
37818
  key: "eventProps",
37799
37819
  get: function get4() {
37800
37820
  var _this2 = this;
37801
- return (0, import_make_event_props2.default)(this.props, function() {
37821
+ return esm_default(this.props, function() {
37802
37822
  return _this2.state.pdf;
37803
37823
  });
37804
37824
  }
@@ -37849,7 +37869,6 @@ Document.propTypes = _objectSpread(_objectSpread({}, eventProps), {}, {
37849
37869
  var import_regenerator4 = __toESM(require_regenerator());
37850
37870
  var import_prop_types5 = __toESM(require_prop_types());
37851
37871
  import React46, { PureComponent as PureComponent3 } from "react";
37852
- var import_make_event_props3 = __toESM(require_entry());
37853
37872
 
37854
37873
  // node_modules/react-pdf/dist/esm/OutlineContext.js
37855
37874
  import { createContext as createContext14 } from "react";
@@ -38289,7 +38308,7 @@ var OutlineInternal = /* @__PURE__ */ function(_PureComponent) {
38289
38308
  key: "eventProps",
38290
38309
  get: function get4() {
38291
38310
  var _this2 = this;
38292
- return (0, import_make_event_props3.default)(this.props, function() {
38311
+ return esm_default(this.props, function() {
38293
38312
  return _this2.state.outline;
38294
38313
  });
38295
38314
  }
@@ -38309,7 +38328,6 @@ OutlineInternal.propTypes = _objectSpread2({
38309
38328
  var import_regenerator8 = __toESM(require_regenerator());
38310
38329
  var import_prop_types11 = __toESM(require_prop_types());
38311
38330
  import React52, { PureComponent as PureComponent9 } from "react";
38312
- var import_make_event_props4 = __toESM(require_entry());
38313
38331
 
38314
38332
  // node_modules/merge-refs/dist/esm/index.js
38315
38333
  function mergeRefs2() {
@@ -39591,7 +39609,7 @@ var PageInternal = /* @__PURE__ */ function(_PureComponent) {
39591
39609
  key: "eventProps",
39592
39610
  get: function get4() {
39593
39611
  var _this2 = this;
39594
- return (0, import_make_event_props4.default)(this.props, function() {
39612
+ return esm_default(this.props, function() {
39595
39613
  var page = _this2.state.page;
39596
39614
  if (!page) {
39597
39615
  return page;
@@ -40059,6 +40077,7 @@ function LoadingSkeleton({
40059
40077
  // src/PdfReader/index.tsx
40060
40078
  var IFRAME_WRAPPER_ID = "iframe-wrapper";
40061
40079
  var SCALE_STEP = 0.1;
40080
+ var START_QUERY = "start";
40062
40081
  function pdfReducer(state2, action) {
40063
40082
  switch (action.type) {
40064
40083
  case "ARGS_CHANGED": {
@@ -40146,6 +40165,11 @@ var loadResource = (resourceUrl, proxyUrl) => __async(void 0, null, function* ()
40146
40165
  }
40147
40166
  return array;
40148
40167
  });
40168
+ var getStartPage = (resourceUrl) => {
40169
+ const params = new URL(resourceUrl).searchParams;
40170
+ const startPage = params.get(START_QUERY);
40171
+ return startPage ? parseInt(startPage) : 1;
40172
+ };
40149
40173
  function usePdfReader(args) {
40150
40174
  var _a;
40151
40175
  if (args == null ? void 0 : args.pdfWorkerSrc) {
@@ -40278,6 +40302,13 @@ function usePdfReader(args) {
40278
40302
  index: nextIndex,
40279
40303
  shouldNavigateToEnd: false
40280
40304
  });
40305
+ if (manifest == null ? void 0 : manifest.readingOrder[nextIndex]) {
40306
+ const pageNum = getStartPage(manifest == null ? void 0 : manifest.readingOrder[nextIndex].href);
40307
+ dispatch({
40308
+ type: "NAVIGATE_PAGE",
40309
+ pageNum
40310
+ });
40311
+ }
40281
40312
  }
40282
40313
  }), [
40283
40314
  state2.state,
@@ -40292,7 +40323,8 @@ function usePdfReader(args) {
40292
40323
  return;
40293
40324
  if (state2.state !== "ACTIVE")
40294
40325
  return;
40295
- if (state2.pageNumber > 1 && !state2.settings.isScrolling) {
40326
+ const startPage = (manifest == null ? void 0 : manifest.readingOrder) && (manifest == null ? void 0 : manifest.readingOrder[state2.resourceIndex]) ? getStartPage(manifest == null ? void 0 : manifest.readingOrder[state2.resourceIndex].href) : 1;
40327
+ if (state2.pageNumber > startPage && !state2.settings.isScrolling) {
40296
40328
  dispatch({
40297
40329
  type: "NAVIGATE_PAGE",
40298
40330
  pageNum: state2.pageNumber - 1
@@ -40335,16 +40367,24 @@ function usePdfReader(args) {
40335
40367
  const index = (_a2 = manifest == null ? void 0 : manifest.readingOrder) == null ? void 0 : _a2.findIndex((link2) => {
40336
40368
  return link2.href === href2;
40337
40369
  });
40338
- if (!index) {
40370
+ if (index < 0) {
40339
40371
  throw new Error("Cannot find resource in readingOrder");
40340
40372
  }
40341
40373
  return index;
40342
40374
  };
40375
+ const resourceIndex = getIndexFromHref(href);
40343
40376
  dispatch({
40344
40377
  type: "SET_CURRENT_RESOURCE",
40345
- index: getIndexFromHref(href),
40378
+ index: resourceIndex,
40346
40379
  shouldNavigateToEnd: false
40347
40380
  });
40381
+ if ((manifest == null ? void 0 : manifest.readingOrder) && (manifest == null ? void 0 : manifest.readingOrder[resourceIndex])) {
40382
+ const startPage = getStartPage(manifest == null ? void 0 : manifest.readingOrder[resourceIndex].href);
40383
+ dispatch({
40384
+ type: "NAVIGATE_PAGE",
40385
+ pageNum: startPage
40386
+ });
40387
+ }
40348
40388
  }), [manifest == null ? void 0 : manifest.readingOrder]);
40349
40389
  if (!webpubManifestUrl || !manifest)
40350
40390
  return null;