@riboseinc/anafero-cli 0.0.57 → 0.0.58

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/bootstrap.js CHANGED
@@ -72212,6 +72212,23 @@ schema (${ast._tag}): ${ast}`;
72212
72212
  }
72213
72213
  });
72214
72214
 
72215
+ // ../anafero/search.mts
72216
+ function preprocessStringForIndexing(text) {
72217
+ return text.normalize("NFKD").replace(/\p{Diacritic}/gu, "").trim();
72218
+ }
72219
+ function extractRelationsForIndexing(uri, graph, isDefinedSubject) {
72220
+ return graph.filter(
72221
+ ([s, p, o2]) => p === "hasPart" && (s === uri || s === ROOT_SUBJECT) && !o2.startsWith("data:") && (!isURIString(o2) || !isDefinedSubject(o2))
72222
+ );
72223
+ }
72224
+ var init_search = __esm({
72225
+ "../anafero/search.mts"() {
72226
+ "use strict";
72227
+ init_relations();
72228
+ init_URI();
72229
+ }
72230
+ });
72231
+
72215
72232
  // ../anafero/index.mts
72216
72233
  var anafero_exports = {};
72217
72234
  __export(anafero_exports, {
@@ -72230,6 +72247,7 @@ schema (${ast._tag}): ${ast}`;
72230
72247
  VersioningSchema: () => VersioningSchema,
72231
72248
  dedupeGraph: () => dedupeGraph,
72232
72249
  dedupeResourceRelationList: () => dedupeResourceRelationList,
72250
+ extractRelationsForIndexing: () => extractRelationsForIndexing,
72233
72251
  fillInLocale: () => fillInLocale,
72234
72252
  gatherDescribedResourcesFromJsonifiedProseMirrorNode: () => gatherDescribedResourcesFromJsonifiedProseMirrorNode,
72235
72253
  gatherTextFromJsonifiedProseMirrorNode: () => gatherTextFromJsonifiedProseMirrorNode,
@@ -72238,6 +72256,7 @@ schema (${ast._tag}): ${ast}`;
72238
72256
  isURIString: () => isURIString,
72239
72257
  makeDummyInMemoryCache: () => makeDummyInMemoryCache,
72240
72258
  parseModuleRef: () => parseModuleRef,
72259
+ preprocessStringForIndexing: () => preprocessStringForIndexing,
72241
72260
  resolveChain: () => resolveChain,
72242
72261
  stripLeadingSlash: () => stripLeadingSlash,
72243
72262
  stripTrailingSlash: () => stripTrailingSlash,
@@ -72259,6 +72278,7 @@ schema (${ast._tag}): ${ast}`;
72259
72278
  init_path_utils();
72260
72279
  init_graph_query();
72261
72280
  init_URI();
72281
+ init_search();
72262
72282
  }
72263
72283
  });
72264
72284
 
@@ -109555,6 +109575,9 @@ schema (${ast._tag}): ${ast}`;
109555
109575
  }
109556
109576
  }
109557
109577
 
109578
+ // Nav.tsx
109579
+ init_anafero();
109580
+
109558
109581
  // style.module.css
109559
109582
  var style_default = {
109560
109583
  floatingSubresourceLink: "style_floatingSubresourceLink",
@@ -109610,7 +109633,9 @@ schema (${ast._tag}): ${ast}`;
109610
109633
  const [showMore, setShowMore] = (0, import_react204.useState)(false);
109611
109634
  const [matches2, error] = (0, import_react204.useMemo)(() => {
109612
109635
  if (index && debouncedQuery.trim() !== "") {
109613
- const normalizedQuery = debouncedQuery.replace(/:/g, " ").replace(/\*/g, " ").normalize("NFKD").replace(/\p{Diacritic}/gu, "").trim();
109636
+ const normalizedQuery = preprocessStringForIndexing(
109637
+ debouncedQuery.replace(/:/g, " ").replace(/\*/g, " ")
109638
+ );
109614
109639
  const tokens = import_lunr.default.tokenizer(normalizedQuery);
109615
109640
  console.debug("Search: tokens", tokens);
109616
109641
  const escapedQuery = normalizedQuery.replaceAll(" ", "*");
@@ -110103,6 +110128,7 @@ schema (${ast._tag}): ${ast}`;
110103
110128
  className,
110104
110129
  requestedResourceURI,
110105
110130
  searchQueryText,
110131
+ hideBreadcrumbs,
110106
110132
  useDependency,
110107
110133
  locateResource,
110108
110134
  document: document2,
@@ -110254,7 +110280,7 @@ schema (${ast._tag}): ${ast}`;
110254
110280
  className: `${style_default.resource} ${className ?? ""}`,
110255
110281
  "aria-selected": ariaSelected
110256
110282
  },
110257
- /* @__PURE__ */ import_react211.default.createElement(ResourceBreadcrumbs, { parents: resourceNav.breadcrumbs }),
110283
+ !hideBreadcrumbs ? /* @__PURE__ */ import_react211.default.createElement(ResourceBreadcrumbs, { parents: resourceNav.breadcrumbs }) : null,
110258
110284
  content.content ? /* @__PURE__ */ import_react211.default.createElement(ResourceHelmet, { ...content.content }) : null,
110259
110285
  /* @__PURE__ */ import_react211.default.createElement(
110260
110286
  Layout,