@seekora-ai/ui-sdk-react 0.2.16 → 0.2.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/dist/docsearch/components/Footer.d.ts.map +1 -1
- package/dist/docsearch/components/Footer.js +11 -1
- package/dist/docsearch/hooks/useDocSearch.d.ts.map +1 -1
- package/dist/docsearch/hooks/useDocSearch.js +25 -12
- package/dist/index.umd.js +1 -1
- package/dist/src/index.esm.js +36 -13
- package/dist/src/index.esm.js.map +1 -1
- package/dist/src/index.js +36 -13
- package/dist/src/index.js.map +1 -1
- package/package.json +5 -5
package/dist/src/index.js
CHANGED
|
@@ -16642,6 +16642,15 @@ function Results({ hits, groupedHits, selectedIndex, onSelect, onHover, scrollSe
|
|
|
16642
16642
|
}))))))));
|
|
16643
16643
|
}
|
|
16644
16644
|
|
|
16645
|
+
function SeekoraLogo() {
|
|
16646
|
+
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 563 636", width: "20", height: "22", "aria-hidden": "true" },
|
|
16647
|
+
React.createElement("path", { fill: "#03d1ff", d: "M243.44,231.23l-99.23,98.52-9.41,9.41c-14.83,14.83-38.57,13.17-51.4-1.5-2.39-2.73-4.39-5.89-5.89-9.49-.05-.16-.13-.32-.18-.47-1.55-3.68-2.95-7.41-4.29-11.2-7.39-21.24-11.33-44.04-11.25-67.81h.24c-.05-.6-.05-1.24-.08-1.87-.08-2.13-.11-4.29-.11-6.44,0-126.81,102.78-229.59,229.6-229.59,30.84,0,60.29,6.07,87.16,17.14-10.18,10.36-15.22,25.4-12.23,40.7,1.42,7.05,4.39,13.41,8.55,18.75,1.26,1.68,2.68,3.26,4.18,4.73-.58-.34-1.16-.68-1.76-1-25.29-14.62-54.64-22.95-85.9-22.95-95.13,0-172.22,77.12-172.22,172.22,0,1.95.03,3.87.11,5.78v.05c.39,11.94,2,23.59,4.73,34.79l.82-.82,23.14-23.16,47.14-47.14,20.09-20.06c11.31-11.31,27.69-15.57,42.99-11.2.05.03.13.03.18.05.24.05.45.11.68.18,9.47,2.87,17.46,8.73,22.95,16.49,3.6,5.02,6.15,10.83,7.39,17.06l5.94,30.21,1.5,7.57.11.63,1.97-2.05,69.62-72.57,15.28-15.93,33.68-35.15,5.47-5.68,11.31-11.78,23.32-24.32,4.23-4.39,7.94-8.28-6.07,1.18-12.46,2.45-2.18.42-16.36,3.23-.03.03-18.64,3.68c-11.86,2.34-23.4-5.39-25.77-17.25-2.08-10.52,3.73-20.75,13.33-24.64,1.26-.5,2.58-.89,3.97-1.16l45.54-8.99,34.44-6.81,14.99-2.92,23.06-4.58c.58-.11,1.16-.21,1.71-.26.5-.05,1-.11,1.5-.13,1-.05,2-.03,3,.05,4.47.39,8.78,2.18,12.3,5.18,3.76,3.21,6.28,7.52,7.26,12.25.13.68.24,1.37.31,2.05.11,1.05.13,2.1.11,3.16l-1.05,28.08-.66,18.64-.24,6.68-2.26,62.63-.03,1.1c-.39,11.83-10.12,21.14-21.9,21.14-.26,0-.53-.03-.79-.03-5.13-.18-9.75-2.1-13.36-5.15-4.97-4.18-8.05-10.54-7.76-17.54l.11-2.76.42-11.86.58-16.33.58-16.3-235.99,252.7-24.03-127.37Z" }),
|
|
16648
|
+
React.createElement("path", { fill: "#4d66fe", d: "M11.11,572.49c-1.27-6.46.68-13.13,5.22-17.89l105.47-110.63,15.28-15.93,33.68-35.15,5.47-5.68,34.63-36.1,8.23-8.57,11.91,57.94.63,1.42h0c10.78,4,22.09,6.94,33.76,8.73v57.87c-27.58-3.1-53.69-11.12-77.43-23.14L21.34,623.95l-10.23-51.46Z" }),
|
|
16649
|
+
React.createElement("path", { fill: "#4d66fe", d: "M325.32,330.56v136.38c-10.31,1.44-20.85,2.17-31.56,2.17-1.56,0-3.13,0-4.69-.08v-101.86l36.25-36.61Z" }),
|
|
16650
|
+
React.createElement("polygon", { fill: "#4d66fe", points: "381.47 451.71 381.47 385.94 381.55 270.05 345.17 308.07 345.17 463.34 381.47 451.71" }),
|
|
16651
|
+
React.createElement("polygon", { fill: "#4d66fe", points: "437.61 418.26 437.65 321.78 437.69 213.67 401.32 251.68 401.32 442.32 437.61 418.26" }),
|
|
16652
|
+
React.createElement("path", { fill: "#4d66fe", d: "M493.87,157.13l-.08,108.11v86.38c-9.91,17.8-22.14,34.13-36.29,48.56v-205l36.37-38.05Z" })));
|
|
16653
|
+
}
|
|
16645
16654
|
function Footer({ translations = {} }) {
|
|
16646
16655
|
return (React.createElement("footer", { className: "seekora-docsearch-footer" },
|
|
16647
16656
|
React.createElement("div", { className: "seekora-docsearch-footer-commands" },
|
|
@@ -16662,7 +16671,8 @@ function Footer({ translations = {} }) {
|
|
|
16662
16671
|
React.createElement("div", { className: "seekora-docsearch-footer-logo" },
|
|
16663
16672
|
React.createElement("span", { className: "seekora-docsearch-footer-logo-text" }, translations.searchByText || 'Search by'),
|
|
16664
16673
|
React.createElement("a", { href: "https://seekora.ai", target: "_blank", rel: "noopener noreferrer", className: "seekora-docsearch-footer-logo-link" },
|
|
16665
|
-
React.createElement(
|
|
16674
|
+
React.createElement(SeekoraLogo, null),
|
|
16675
|
+
React.createElement("span", { className: "seekora-docsearch-logo", style: { fontWeight: 600 } }, "Seekora")))));
|
|
16666
16676
|
}
|
|
16667
16677
|
|
|
16668
16678
|
function useKeyboard(options) {
|
|
@@ -16806,18 +16816,31 @@ function useDocSearch(options) {
|
|
|
16806
16816
|
const abortControllersRef = React.useRef(new Map());
|
|
16807
16817
|
const debounceTimerRef = React.useRef(null);
|
|
16808
16818
|
const defaultTransform = (data, sourceId) => {
|
|
16809
|
-
const items = data.data?.suggestions || data.data?.results || data.suggestions || data.results || data.hits || [];
|
|
16810
|
-
return items.map((item) =>
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
|
|
16819
|
+
const items = data.data?.suggestions || data.data?.results || data.data?.hits || data.suggestions || data.results || data.hits || [];
|
|
16820
|
+
return items.map((item) => {
|
|
16821
|
+
const doc = item.document || item;
|
|
16822
|
+
// Build hierarchy from nested object or flat dot-notation keys
|
|
16823
|
+
const hierarchy = doc.hierarchy || {
|
|
16824
|
+
lvl0: doc['hierarchy.lvl0'],
|
|
16825
|
+
lvl1: doc['hierarchy.lvl1'],
|
|
16826
|
+
lvl2: doc['hierarchy.lvl2'],
|
|
16827
|
+
lvl3: doc['hierarchy.lvl3'],
|
|
16828
|
+
lvl4: doc['hierarchy.lvl4'],
|
|
16829
|
+
lvl5: doc['hierarchy.lvl5'],
|
|
16830
|
+
};
|
|
16831
|
+
return {
|
|
16832
|
+
url: doc.url || doc.route || item.url || '',
|
|
16833
|
+
title: (doc.title || '').replace?.(/<\/?mark>/g, '') || '',
|
|
16834
|
+
content: (doc.content || doc.description || '').replace?.(/<\/?mark>/g, '')?.substring?.(0, 100) || '',
|
|
16835
|
+
description: doc.description || doc.content?.substring?.(0, 100) || '',
|
|
16836
|
+
category: doc.category || hierarchy?.lvl0 || '',
|
|
16837
|
+
hierarchy,
|
|
16838
|
+
route: doc.route,
|
|
16839
|
+
parentTitle: doc.parent_title || doc.parentTitle,
|
|
16840
|
+
anchor: doc.anchor || item.anchor,
|
|
16841
|
+
_source: sourceId,
|
|
16842
|
+
};
|
|
16843
|
+
});
|
|
16821
16844
|
};
|
|
16822
16845
|
const transformPublicSearchResults = React.useCallback((data, sourceId) => {
|
|
16823
16846
|
const results = data?.data?.results || [];
|