@canopy-iiif/app 1.5.0 → 1.5.2

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/lib/build/iiif.js CHANGED
@@ -711,6 +711,15 @@ const MEMO_ID_TO_SLUG = new Map();
711
711
  // collections/manifests share the same base title but mappings aren't yet saved.
712
712
  const RESERVED_SLUGS = {Manifest: new Set(), Collection: new Set()};
713
713
 
714
+ function resetReservedSlugs() {
715
+ try {
716
+ Object.keys(RESERVED_SLUGS).forEach((key) => {
717
+ const set = RESERVED_SLUGS[key];
718
+ if (set && typeof set.clear === "function") set.clear();
719
+ });
720
+ } catch (_) {}
721
+ }
722
+
714
723
  function computeUniqueSlug(index, baseSlug, id, type) {
715
724
  const byId = Array.isArray(index && index.byId) ? index.byId : [];
716
725
  const normId = normalizeIiifId(String(id || ""));
@@ -2186,6 +2195,38 @@ module.exports = {
2186
2195
  rebuildManifestIndexFromCache,
2187
2196
  };
2188
2197
 
2198
+ // Expose a stable set of pure helper utilities for unit testing.
2199
+ module.exports.__TESTING__ = {
2200
+ resolvePositiveInteger,
2201
+ formatDurationMs,
2202
+ resolveBoolean,
2203
+ normalizeCollectionUris,
2204
+ clampSlugLength,
2205
+ isSlugTooLong,
2206
+ normalizeSlugBase,
2207
+ buildSlugWithSuffix,
2208
+ normalizeStringList,
2209
+ ensureThumbnailValue,
2210
+ extractSummaryValues,
2211
+ truncateSummary,
2212
+ extractMetadataValues,
2213
+ extractAnnotationText,
2214
+ normalizeIiifId,
2215
+ normalizeIiifType,
2216
+ resolveParentFromPartOf,
2217
+ computeUniqueSlug,
2218
+ ensureBaseSlugFor,
2219
+ resetReservedSlugs,
2220
+ resolveThumbnailPreferences,
2221
+ loadManifestIndex,
2222
+ saveManifestIndex,
2223
+ paths: {
2224
+ IIIF_CACHE_INDEX,
2225
+ IIIF_CACHE_INDEX_LEGACY,
2226
+ IIIF_CACHE_INDEX_MANIFESTS,
2227
+ },
2228
+ };
2229
+
2189
2230
  // Debug: list collections cache after traversal
2190
2231
  try {
2191
2232
  if (process.env.CANOPY_IIIF_DEBUG === "1") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-iiif/app",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Mat Jordan <mat@northwestern.edu>",
@@ -9,6 +9,12 @@ hr {
9
9
  margin: 2.618rem 0;
10
10
  }
11
11
 
12
+ blockquote {
13
+ font-size: 1.222em;
14
+ padding: 1.618rem 2.618rem;
15
+ color: var(--color-gray-700);
16
+ }
17
+
12
18
  .markdown-table__frame {
13
19
  width: 100%;
14
20
  margin: 1.618rem 0 2.618rem;
@@ -86,6 +86,12 @@ hr {
86
86
  margin: 2.618rem 0;
87
87
  }
88
88
 
89
+ blockquote {
90
+ font-size: 1.222em;
91
+ padding: 1.618rem 2.618rem;
92
+ color: var(--color-gray-700);
93
+ }
94
+
89
95
  .markdown-table__frame {
90
96
  width: 100%;
91
97
  margin: 1.618rem 0 2.618rem;