@riboseinc/anafero-cli 0.0.57 → 0.0.59
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/CLI.tsx +4 -1
- package/bootstrap.css +32 -9
- package/bootstrap.css.map +3 -3
- package/bootstrap.js +33 -8
- package/bootstrap.js.map +4 -4
- package/build-site.css +32 -9
- package/build-site.mjs +120 -85
- package/package.json +1 -1
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",
|
|
@@ -109569,6 +109592,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
109569
109592
|
navListView: "style_navListView",
|
|
109570
109593
|
navListViewItemWithLink: "style_navListViewItemWithLink",
|
|
109571
109594
|
browserBar: "style_browserBar",
|
|
109595
|
+
browserBarExpanded: "style_browserBarExpanded",
|
|
109572
109596
|
browserBarTitle: "style_browserBarTitle",
|
|
109573
109597
|
browserBarTitleLink: "style_browserBarTitleLink",
|
|
109574
109598
|
browserBarToolbar: "style_browserBarToolbar",
|
|
@@ -109610,14 +109634,11 @@ schema (${ast._tag}): ${ast}`;
|
|
|
109610
109634
|
const [showMore, setShowMore] = (0, import_react204.useState)(false);
|
|
109611
109635
|
const [matches2, error] = (0, import_react204.useMemo)(() => {
|
|
109612
109636
|
if (index && debouncedQuery.trim() !== "") {
|
|
109613
|
-
const normalizedQuery =
|
|
109637
|
+
const normalizedQuery = preprocessStringForIndexing(
|
|
109638
|
+
debouncedQuery.replace(/:/g, " ").replace(/\*/g, " ")
|
|
109639
|
+
);
|
|
109614
109640
|
const tokens = import_lunr.default.tokenizer(normalizedQuery);
|
|
109615
109641
|
console.debug("Search: tokens", tokens);
|
|
109616
|
-
const escapedQuery = normalizedQuery.replaceAll(" ", "*");
|
|
109617
|
-
const pipelineOut = index.pipeline.run(tokens);
|
|
109618
|
-
console.debug("Search: pipeline result for", normalizedQuery, "is", pipelineOut);
|
|
109619
|
-
console.debug("pip", index?.pipeline?._stack);
|
|
109620
|
-
console.debug("searchpip", index?.searchPipeline);
|
|
109621
109642
|
try {
|
|
109622
109643
|
let exact;
|
|
109623
109644
|
try {
|
|
@@ -110008,7 +110029,10 @@ schema (${ast._tag}): ${ast}`;
|
|
|
110008
110029
|
}
|
|
110009
110030
|
return;
|
|
110010
110031
|
}, [!!loadProgress]);
|
|
110011
|
-
return /* @__PURE__ */ import_react209.default.createElement($7167f8da3cce35e4$export$2881499e37b75b9a, { theme: $bf24a13e98395dd3$export$bca14c5b3b88a9c9, ...providerProps }, /* @__PURE__ */ import_react209.default.createElement("div", { className:
|
|
110032
|
+
return /* @__PURE__ */ import_react209.default.createElement($7167f8da3cce35e4$export$2881499e37b75b9a, { theme: $bf24a13e98395dd3$export$bca14c5b3b88a9c9, ...providerProps }, /* @__PURE__ */ import_react209.default.createElement("div", { className: `
|
|
110033
|
+
${style_default.browserBar}
|
|
110034
|
+
${activeBrowsingMode ? style_default.browserBarExpanded : ""}
|
|
110035
|
+
` }, /* @__PURE__ */ import_react209.default.createElement("header", { className: style_default.browserBarTitle }, /* @__PURE__ */ import_react209.default.createElement("h1", null, /* @__PURE__ */ import_react209.default.createElement("a", { href: rootURL, className: style_default.browserBarTitleLink }, title))), showToolbar ? /* @__PURE__ */ import_react209.default.createElement(
|
|
110012
110036
|
$13c3c67164f4d5be$export$4c260019440d418f,
|
|
110013
110037
|
{
|
|
110014
110038
|
"aria-label": "Tools",
|
|
@@ -110103,6 +110127,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
110103
110127
|
className,
|
|
110104
110128
|
requestedResourceURI,
|
|
110105
110129
|
searchQueryText,
|
|
110130
|
+
hideBreadcrumbs,
|
|
110106
110131
|
useDependency,
|
|
110107
110132
|
locateResource,
|
|
110108
110133
|
document: document2,
|
|
@@ -110254,7 +110279,7 @@ schema (${ast._tag}): ${ast}`;
|
|
|
110254
110279
|
className: `${style_default.resource} ${className ?? ""}`,
|
|
110255
110280
|
"aria-selected": ariaSelected
|
|
110256
110281
|
},
|
|
110257
|
-
/* @__PURE__ */ import_react211.default.createElement(ResourceBreadcrumbs, { parents: resourceNav.breadcrumbs }),
|
|
110282
|
+
!hideBreadcrumbs && resourceNav.breadcrumbs.length > 0 ? /* @__PURE__ */ import_react211.default.createElement(ResourceBreadcrumbs, { parents: resourceNav.breadcrumbs }) : null,
|
|
110258
110283
|
content.content ? /* @__PURE__ */ import_react211.default.createElement(ResourceHelmet, { ...content.content }) : null,
|
|
110259
110284
|
/* @__PURE__ */ import_react211.default.createElement(
|
|
110260
110285
|
Layout,
|