@canopy-iiif/app 1.9.15 → 1.9.17

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.9.15",
3
+ "version": "1.9.17",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Mat Jordan <mat@northwestern.edu>",
@@ -894,7 +894,7 @@ function useLocaleMessages() {
894
894
  const siteMessages = context && context.site && context.site.localeMessages && typeof context.site.localeMessages === "object" ? context.site.localeMessages : null;
895
895
  return siteMessages || readRuntimeMessages();
896
896
  }
897
- function useLocale2() {
897
+ function useLocale() {
898
898
  const messages = useLocaleMessages();
899
899
  const getString = React11.useCallback(
900
900
  (path, fallback) => {
@@ -1063,7 +1063,7 @@ function Hero({
1063
1063
  homeLabel,
1064
1064
  ...rest
1065
1065
  }) {
1066
- const { getString } = useLocale2();
1066
+ const { getString } = useLocale();
1067
1067
  const normalizedVariant = normalizeVariant(variant);
1068
1068
  const isBreadcrumbVariant = normalizedVariant === "breadcrumb";
1069
1069
  const PageContext2 = navigationHelpers && typeof navigationHelpers.getPageContext === "function" ? navigationHelpers.getPageContext() : null;
@@ -1405,7 +1405,7 @@ function NavigationTree({
1405
1405
  ...rest
1406
1406
  }) {
1407
1407
  if (!root) return null;
1408
- const { formatString, getString } = useLocale2();
1408
+ const { formatString, getString } = useLocale();
1409
1409
  const navFallback = getString("common.nouns.navigation", "navigation");
1410
1410
  const buildNavLabel = React13.useCallback(
1411
1411
  (value) => formatString(
@@ -2413,7 +2413,7 @@ function SearchPanelForm(props = {}) {
2413
2413
  inputId: inputIdProp,
2414
2414
  clearLabel
2415
2415
  } = props || {};
2416
- const { getString, formatString } = useLocale2();
2416
+ const { getString, formatString } = useLocale();
2417
2417
  const searchLabel = getString("common.nouns.search", "Search");
2418
2418
  const placeholderText = placeholder != null ? placeholder : getString("common.phrases.placeholder_search", "Search\u2026");
2419
2419
  const buttonText = buttonLabel != null ? buttonLabel : getString("common.nouns.search", "Search");
@@ -2567,7 +2567,7 @@ function SearchPanel(props = {}) {
2567
2567
  label,
2568
2568
  searchPath = "/search"
2569
2569
  } = props || {};
2570
- const { getString } = useLocale2();
2570
+ const { getString } = useLocale();
2571
2571
  const placeholder = placeholderProp != null ? placeholderProp : getString("common.phrases.placeholder_search", "Search\u2026");
2572
2572
  const resolvedButtonLabel = buttonLabelProp != null ? buttonLabelProp : getString("common.nouns.search", "Search");
2573
2573
  const text = typeof label === "string" && label.trim() ? label.trim() : resolvedButtonLabel;
@@ -2627,7 +2627,7 @@ function CanopyModal(props = {}) {
2627
2627
  if (event.target === event.currentTarget) onBackgroundClick(event);
2628
2628
  };
2629
2629
  }
2630
- const { getString } = useLocale2();
2630
+ const { getString } = useLocale();
2631
2631
  const resolvedCloseLabel = closeLabel || getString("common.actions.close", "Close");
2632
2632
  const closeButtonProps = {
2633
2633
  type: "button",
@@ -3380,7 +3380,7 @@ function CanopyHeader(props = {}) {
3380
3380
  } = props;
3381
3381
  const PageContext2 = getSafePageContext();
3382
3382
  const context = React25.useContext(PageContext2);
3383
- const { getString, formatString } = useLocale2();
3383
+ const { getString, formatString } = useLocale();
3384
3384
  const contextPrimaryNav = context && Array.isArray(context.primaryNavigation) ? context.primaryNavigation : [];
3385
3385
  const navLinks = navLinksProp && navLinksProp.length ? ensureArray(navLinksProp) : ensureArray(contextPrimaryNav);
3386
3386
  const contextNavigation = context && context.navigation ? context.navigation : null;
@@ -3981,7 +3981,7 @@ function References({
3981
3981
  children,
3982
3982
  ...rest
3983
3983
  }) {
3984
- const { getString } = useLocale2();
3984
+ const { getString } = useLocale();
3985
3985
  const resolvedTitle = title != null ? title : getString("common.misc.referenced_by", "Referenced by");
3986
3986
  const PageContext2 = getPageContext();
3987
3987
  const context = PageContext2 ? React32.useContext(PageContext2) : null;
@@ -6489,7 +6489,7 @@ function MdxSearchFormModal(props = {}) {
6489
6489
  label,
6490
6490
  searchPath = "/search"
6491
6491
  } = props || {};
6492
- const { getString } = useLocale2();
6492
+ const { getString } = useLocale();
6493
6493
  const placeholder = placeholderProp != null ? placeholderProp : getString("common.phrases.placeholder_search", "Search\u2026");
6494
6494
  const resolvedButtonLabel = buttonLabelProp != null ? buttonLabelProp : getString("common.nouns.search", "Search");
6495
6495
  const text = typeof label === "string" && label.trim() ? label.trim() : resolvedButtonLabel;