Enable Lunr search bar
Summary: ^ Reviewed By: jknoxville Differential Revision: D47548867 fbshipit-source-id: 462496da3d2668f9991e66381ca5ca0dd9c45ea9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
532f6ff1ee
commit
336c8c3159
@@ -205,6 +205,7 @@ const siteConfig = {
|
|||||||
// end_config_example
|
// end_config_example
|
||||||
plugins: [
|
plugins: [
|
||||||
'./src/plugins/support-symlinks',
|
'./src/plugins/support-symlinks',
|
||||||
|
...fbContent({internal: [], external: [require.resolve('docusaurus-lunr-search')]}),
|
||||||
[
|
[
|
||||||
require.resolve('@docusaurus/plugin-content-pages'),
|
require.resolve('@docusaurus/plugin-content-pages'),
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
"start": "yarn copy-schema && yarn generate-plugin-docs && yarn build:style-guide && docusaurus start --port 3001",
|
"start": "yarn copy-schema && yarn generate-plugin-docs && yarn build:style-guide && docusaurus start --port 3001",
|
||||||
"build": "yarn copy-schema && yarn generate-plugin-docs && yarn build:style-guide && docusaurus build",
|
"build": "yarn copy-schema && yarn generate-plugin-docs && yarn build:style-guide && docusaurus build",
|
||||||
"publish-gh-pages": "docusaurus deploy",
|
"publish-gh-pages": "docusaurus deploy",
|
||||||
|
"clear": "docusaurus clear",
|
||||||
|
"clean": "docusaurus clear",
|
||||||
|
"swizzle": "docusaurus swizzle",
|
||||||
"write-translations": "docusaurus write-translations",
|
"write-translations": "docusaurus write-translations",
|
||||||
"version": "docusaurus version",
|
"version": "docusaurus version",
|
||||||
"rename-version": "docusaurus rename-version",
|
"rename-version": "docusaurus rename-version",
|
||||||
@@ -19,7 +22,8 @@
|
|||||||
"@emotion/styled": "^11.10.6",
|
"@emotion/styled": "^11.10.6",
|
||||||
"@types/fs-extra": "^11.0.1",
|
"@types/fs-extra": "^11.0.1",
|
||||||
"antd": "^4.23.4",
|
"antd": "^4.23.4",
|
||||||
"docusaurus-plugin-internaldocs-fb": "1.9.1",
|
"docusaurus-plugin-internaldocs-fb": "1.13.0",
|
||||||
|
"docusaurus-lunr-search": "^2.3.2",
|
||||||
"file-cli": "^1.2.0",
|
"file-cli": "^1.2.0",
|
||||||
"flipper-plugin": "^0.183.0",
|
"flipper-plugin": "^0.183.0",
|
||||||
"fs-extra": "^11.1.0",
|
"fs-extra": "^11.1.0",
|
||||||
@@ -32,7 +36,6 @@
|
|||||||
"typescript": "^4.9.5",
|
"typescript": "^4.9.5",
|
||||||
"yarn-audit-fix": "^9.3.9"
|
"yarn-audit-fix": "^9.3.9"
|
||||||
},
|
},
|
||||||
"dependencies": {},
|
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"kind-of": "6.0.3",
|
"kind-of": "6.0.3",
|
||||||
"chokidar": "^3.1.5",
|
"chokidar": "^3.1.5",
|
||||||
|
|||||||
304
website/src/theme/SearchBar/DocSearch.js
Normal file
304
website/src/theme/SearchBar/DocSearch.js
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import Hogan from "hogan.js";
|
||||||
|
import LunrSearchAdapter from "./lunar-search";
|
||||||
|
import autocomplete from "autocomplete.js";
|
||||||
|
import templates from "./templates";
|
||||||
|
import utils from "./utils";
|
||||||
|
import $ from "autocomplete.js/zepto";
|
||||||
|
|
||||||
|
class DocSearch {
|
||||||
|
constructor({
|
||||||
|
searchDocs,
|
||||||
|
searchIndex,
|
||||||
|
inputSelector,
|
||||||
|
debug = false,
|
||||||
|
baseUrl = '/',
|
||||||
|
queryDataCallback = null,
|
||||||
|
autocompleteOptions = {
|
||||||
|
debug: false,
|
||||||
|
hint: false,
|
||||||
|
autoselect: true
|
||||||
|
},
|
||||||
|
transformData = false,
|
||||||
|
queryHook = false,
|
||||||
|
handleSelected = false,
|
||||||
|
enhancedSearchInput = false,
|
||||||
|
layout = "collumns"
|
||||||
|
}) {
|
||||||
|
this.input = DocSearch.getInputFromSelector(inputSelector);
|
||||||
|
this.queryDataCallback = queryDataCallback || null;
|
||||||
|
const autocompleteOptionsDebug =
|
||||||
|
autocompleteOptions && autocompleteOptions.debug
|
||||||
|
? autocompleteOptions.debug
|
||||||
|
: false;
|
||||||
|
// eslint-disable-next-line no-param-reassign
|
||||||
|
autocompleteOptions.debug = debug || autocompleteOptionsDebug;
|
||||||
|
this.autocompleteOptions = autocompleteOptions;
|
||||||
|
this.autocompleteOptions.cssClasses =
|
||||||
|
this.autocompleteOptions.cssClasses || {};
|
||||||
|
this.autocompleteOptions.cssClasses.prefix =
|
||||||
|
this.autocompleteOptions.cssClasses.prefix || "ds";
|
||||||
|
const inputAriaLabel =
|
||||||
|
this.input &&
|
||||||
|
typeof this.input.attr === "function" &&
|
||||||
|
this.input.attr("aria-label");
|
||||||
|
this.autocompleteOptions.ariaLabel =
|
||||||
|
this.autocompleteOptions.ariaLabel || inputAriaLabel || "search input";
|
||||||
|
|
||||||
|
this.isSimpleLayout = layout === "simple";
|
||||||
|
|
||||||
|
this.client = new LunrSearchAdapter(searchDocs, searchIndex, baseUrl);
|
||||||
|
|
||||||
|
if (enhancedSearchInput) {
|
||||||
|
this.input = DocSearch.injectSearchBox(this.input);
|
||||||
|
}
|
||||||
|
this.autocomplete = autocomplete(this.input, autocompleteOptions, [
|
||||||
|
{
|
||||||
|
source: this.getAutocompleteSource(transformData, queryHook),
|
||||||
|
templates: {
|
||||||
|
suggestion: DocSearch.getSuggestionTemplate(this.isSimpleLayout),
|
||||||
|
footer: templates.footer,
|
||||||
|
empty: DocSearch.getEmptyTemplate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
const customHandleSelected = handleSelected;
|
||||||
|
this.handleSelected = customHandleSelected || this.handleSelected;
|
||||||
|
|
||||||
|
// We prevent default link clicking if a custom handleSelected is defined
|
||||||
|
if (customHandleSelected) {
|
||||||
|
$(".algolia-autocomplete").on("click", ".ds-suggestions a", event => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.autocomplete.on(
|
||||||
|
"autocomplete:selected",
|
||||||
|
this.handleSelected.bind(null, this.autocomplete.autocomplete)
|
||||||
|
);
|
||||||
|
|
||||||
|
this.autocomplete.on(
|
||||||
|
"autocomplete:shown",
|
||||||
|
this.handleShown.bind(null, this.input)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (enhancedSearchInput) {
|
||||||
|
DocSearch.bindSearchBoxEvent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static injectSearchBox(input) {
|
||||||
|
input.before(templates.searchBox);
|
||||||
|
const newInput = input
|
||||||
|
.prev()
|
||||||
|
.prev()
|
||||||
|
.find("input");
|
||||||
|
input.remove();
|
||||||
|
return newInput;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bindSearchBoxEvent() {
|
||||||
|
$('.searchbox [type="reset"]').on("click", function () {
|
||||||
|
$("input#docsearch").focus();
|
||||||
|
$(this).addClass("hide");
|
||||||
|
autocomplete.autocomplete.setVal("");
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input#docsearch").on("keyup", () => {
|
||||||
|
const searchbox = document.querySelector("input#docsearch");
|
||||||
|
const reset = document.querySelector('.searchbox [type="reset"]');
|
||||||
|
reset.className = "searchbox__reset";
|
||||||
|
if (searchbox.value.length === 0) {
|
||||||
|
reset.className += " hide";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the matching input from a CSS selector, null if none matches
|
||||||
|
* @function getInputFromSelector
|
||||||
|
* @param {string} selector CSS selector that matches the search
|
||||||
|
* input of the page
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
static getInputFromSelector(selector) {
|
||||||
|
const input = $(selector).filter("input");
|
||||||
|
return input.length ? $(input[0]) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the `source` method to be passed to autocomplete.js. It will query
|
||||||
|
* the Algolia index and call the callbacks with the formatted hits.
|
||||||
|
* @function getAutocompleteSource
|
||||||
|
* @param {function} transformData An optional function to transform the hits
|
||||||
|
* @param {function} queryHook An optional function to transform the query
|
||||||
|
* @returns {function} Method to be passed as the `source` option of
|
||||||
|
* autocomplete
|
||||||
|
*/
|
||||||
|
getAutocompleteSource(transformData, queryHook) {
|
||||||
|
return (query, callback) => {
|
||||||
|
if (queryHook) {
|
||||||
|
// eslint-disable-next-line no-param-reassign
|
||||||
|
query = queryHook(query) || query;
|
||||||
|
}
|
||||||
|
this.client.search(query).then(hits => {
|
||||||
|
if (
|
||||||
|
this.queryDataCallback &&
|
||||||
|
typeof this.queryDataCallback == "function"
|
||||||
|
) {
|
||||||
|
this.queryDataCallback(hits);
|
||||||
|
}
|
||||||
|
if (transformData) {
|
||||||
|
hits = transformData(hits) || hits;
|
||||||
|
}
|
||||||
|
callback(DocSearch.formatHits(hits));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Given a list of hits returned by the API, will reformat them to be used in
|
||||||
|
// a Hogan template
|
||||||
|
static formatHits(receivedHits) {
|
||||||
|
const clonedHits = utils.deepClone(receivedHits);
|
||||||
|
const hits = clonedHits.map(hit => {
|
||||||
|
if (hit._highlightResult) {
|
||||||
|
// eslint-disable-next-line no-param-reassign
|
||||||
|
hit._highlightResult = utils.mergeKeyWithParent(
|
||||||
|
hit._highlightResult,
|
||||||
|
"hierarchy"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return utils.mergeKeyWithParent(hit, "hierarchy");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Group hits by category / subcategory
|
||||||
|
let groupedHits = utils.groupBy(hits, "lvl0");
|
||||||
|
$.each(groupedHits, (level, collection) => {
|
||||||
|
const groupedHitsByLvl1 = utils.groupBy(collection, "lvl1");
|
||||||
|
const flattenedHits = utils.flattenAndFlagFirst(
|
||||||
|
groupedHitsByLvl1,
|
||||||
|
"isSubCategoryHeader"
|
||||||
|
);
|
||||||
|
groupedHits[level] = flattenedHits;
|
||||||
|
});
|
||||||
|
groupedHits = utils.flattenAndFlagFirst(groupedHits, "isCategoryHeader");
|
||||||
|
|
||||||
|
// Translate hits into smaller objects to be send to the template
|
||||||
|
return groupedHits.map(hit => {
|
||||||
|
const url = DocSearch.formatURL(hit);
|
||||||
|
const category = utils.getHighlightedValue(hit, "lvl0");
|
||||||
|
const subcategory = utils.getHighlightedValue(hit, "lvl1") || category;
|
||||||
|
const displayTitle = utils
|
||||||
|
.compact([
|
||||||
|
utils.getHighlightedValue(hit, "lvl2") || subcategory,
|
||||||
|
utils.getHighlightedValue(hit, "lvl3"),
|
||||||
|
utils.getHighlightedValue(hit, "lvl4"),
|
||||||
|
utils.getHighlightedValue(hit, "lvl5"),
|
||||||
|
utils.getHighlightedValue(hit, "lvl6")
|
||||||
|
])
|
||||||
|
.join(
|
||||||
|
'<span class="aa-suggestion-title-separator" aria-hidden="true"> › </span>'
|
||||||
|
);
|
||||||
|
const text = utils.getSnippetedValue(hit, "content");
|
||||||
|
const isTextOrSubcategoryNonEmpty =
|
||||||
|
(subcategory && subcategory !== "") ||
|
||||||
|
(displayTitle && displayTitle !== "");
|
||||||
|
const isLvl1EmptyOrDuplicate =
|
||||||
|
!subcategory || subcategory === "" || subcategory === category;
|
||||||
|
const isLvl2 =
|
||||||
|
displayTitle && displayTitle !== "" && displayTitle !== subcategory;
|
||||||
|
const isLvl1 =
|
||||||
|
!isLvl2 &&
|
||||||
|
(subcategory && subcategory !== "" && subcategory !== category);
|
||||||
|
const isLvl0 = !isLvl1 && !isLvl2;
|
||||||
|
|
||||||
|
return {
|
||||||
|
isLvl0,
|
||||||
|
isLvl1,
|
||||||
|
isLvl2,
|
||||||
|
isLvl1EmptyOrDuplicate,
|
||||||
|
isCategoryHeader: hit.isCategoryHeader,
|
||||||
|
isSubCategoryHeader: hit.isSubCategoryHeader,
|
||||||
|
isTextOrSubcategoryNonEmpty,
|
||||||
|
category,
|
||||||
|
subcategory,
|
||||||
|
title: displayTitle,
|
||||||
|
text,
|
||||||
|
url
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
static formatURL(hit) {
|
||||||
|
const { url, anchor } = hit;
|
||||||
|
if (url) {
|
||||||
|
const containsAnchor = url.indexOf("#") !== -1;
|
||||||
|
if (containsAnchor) return url;
|
||||||
|
else if (anchor) return `${hit.url}#${hit.anchor}`;
|
||||||
|
return url;
|
||||||
|
} else if (anchor) return `#${hit.anchor}`;
|
||||||
|
/* eslint-disable */
|
||||||
|
console.warn("no anchor nor url for : ", JSON.stringify(hit));
|
||||||
|
/* eslint-enable */
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getEmptyTemplate() {
|
||||||
|
return args => Hogan.compile(templates.empty).render(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSuggestionTemplate(isSimpleLayout) {
|
||||||
|
const stringTemplate = isSimpleLayout
|
||||||
|
? templates.suggestionSimple
|
||||||
|
: templates.suggestion;
|
||||||
|
const template = Hogan.compile(stringTemplate);
|
||||||
|
return suggestion => template.render(suggestion);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleSelected(input, event, suggestion, datasetNumber, context = {}) {
|
||||||
|
// Do nothing if click on the suggestion, as it's already a <a href>, the
|
||||||
|
// browser will take care of it. This allow Ctrl-Clicking on results and not
|
||||||
|
// having the main window being redirected as well
|
||||||
|
if (context.selectionMethod === "click") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.setVal("");
|
||||||
|
window.location.assign(suggestion.url);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleShown(input) {
|
||||||
|
const middleOfInput = input.offset().left + input.width() / 2;
|
||||||
|
let middleOfWindow = $(document).width() / 2;
|
||||||
|
|
||||||
|
if (isNaN(middleOfWindow)) {
|
||||||
|
middleOfWindow = 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
const alignClass =
|
||||||
|
middleOfInput - middleOfWindow >= 0
|
||||||
|
? "algolia-autocomplete-right"
|
||||||
|
: "algolia-autocomplete-left";
|
||||||
|
const otherAlignClass =
|
||||||
|
middleOfInput - middleOfWindow < 0
|
||||||
|
? "algolia-autocomplete-right"
|
||||||
|
: "algolia-autocomplete-left";
|
||||||
|
const autocompleteWrapper = $(".algolia-autocomplete");
|
||||||
|
if (!autocompleteWrapper.hasClass(alignClass)) {
|
||||||
|
autocompleteWrapper.addClass(alignClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (autocompleteWrapper.hasClass(otherAlignClass)) {
|
||||||
|
autocompleteWrapper.removeClass(otherAlignClass);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DocSearch;
|
||||||
533
website/src/theme/SearchBar/algolia.css
Normal file
533
website/src/theme/SearchBar/algolia.css
Normal file
File diff suppressed because one or more lines are too long
121
website/src/theme/SearchBar/index.js
Normal file
121
website/src/theme/SearchBar/index.js
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React, { useRef, useCallback, useState } from "react";
|
||||||
|
import classnames from "classnames";
|
||||||
|
import { useHistory } from "@docusaurus/router";
|
||||||
|
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
||||||
|
import { usePluginData } from '@docusaurus/useGlobalData';
|
||||||
|
import useIsBrowser from "@docusaurus/useIsBrowser";
|
||||||
|
const Search = props => {
|
||||||
|
const initialized = useRef(false);
|
||||||
|
const searchBarRef = useRef(null);
|
||||||
|
const [indexReady, setIndexReady] = useState(false);
|
||||||
|
const history = useHistory();
|
||||||
|
const { siteConfig = {} } = useDocusaurusContext();
|
||||||
|
const isBrowser = useIsBrowser();
|
||||||
|
const { baseUrl } = siteConfig;
|
||||||
|
const initAlgolia = (searchDocs, searchIndex, DocSearch) => {
|
||||||
|
new DocSearch({
|
||||||
|
searchDocs,
|
||||||
|
searchIndex,
|
||||||
|
baseUrl,
|
||||||
|
inputSelector: "#search_input_react",
|
||||||
|
// Override algolia's default selection event, allowing us to do client-side
|
||||||
|
// navigation and avoiding a full page refresh.
|
||||||
|
handleSelected: (_input, _event, suggestion) => {
|
||||||
|
const url = suggestion.url || "/";
|
||||||
|
// Use an anchor tag to parse the absolute url into a relative url
|
||||||
|
// Alternatively, we can use new URL(suggestion.url) but its not supported in IE
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = url;
|
||||||
|
// Algolia use closest parent element id #__docusaurus when a h1 page title does not have an id
|
||||||
|
// So, we can safely remove it. See https://github.com/facebook/docusaurus/issues/1828 for more details.
|
||||||
|
|
||||||
|
history.push(url);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const pluginData = usePluginData('docusaurus-lunr-search');
|
||||||
|
const getSearchDoc = () =>
|
||||||
|
process.env.NODE_ENV === "production"
|
||||||
|
? fetch(`${baseUrl}${pluginData.fileNames.searchDoc}`).then((content) => content.json())
|
||||||
|
: Promise.resolve([]);
|
||||||
|
|
||||||
|
const getLunrIndex = () =>
|
||||||
|
process.env.NODE_ENV === "production"
|
||||||
|
? fetch(`${baseUrl}${pluginData.fileNames.lunrIndex}`).then((content) => content.json())
|
||||||
|
: Promise.resolve([]);
|
||||||
|
|
||||||
|
const loadAlgolia = () => {
|
||||||
|
if (!initialized.current) {
|
||||||
|
Promise.all([
|
||||||
|
getSearchDoc(),
|
||||||
|
getLunrIndex(),
|
||||||
|
import("./DocSearch"),
|
||||||
|
import("./algolia.css")
|
||||||
|
]).then(([searchDocs, searchIndex, { default: DocSearch }]) => {
|
||||||
|
if (searchDocs.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initAlgolia(searchDocs, searchIndex, DocSearch);
|
||||||
|
setIndexReady(true);
|
||||||
|
});
|
||||||
|
initialized.current = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const toggleSearchIconClick = useCallback(
|
||||||
|
e => {
|
||||||
|
if (!searchBarRef.current.contains(e.target)) {
|
||||||
|
searchBarRef.current.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
props.handleSearchBarToggle && props.handleSearchBarToggle(!props.isSearchBarExpanded);
|
||||||
|
},
|
||||||
|
[props.isSearchBarExpanded]
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isBrowser) {
|
||||||
|
loadAlgolia();
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="navbar__search" key="search-box">
|
||||||
|
<span
|
||||||
|
aria-label="expand searchbar"
|
||||||
|
role="button"
|
||||||
|
className={classnames("search-icon", {
|
||||||
|
"search-icon-hidden": props.isSearchBarExpanded
|
||||||
|
})}
|
||||||
|
onClick={toggleSearchIconClick}
|
||||||
|
onKeyDown={toggleSearchIconClick}
|
||||||
|
tabIndex={0}
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
id="search_input_react"
|
||||||
|
type="search"
|
||||||
|
placeholder={indexReady ? 'Search' : 'Loading...'}
|
||||||
|
aria-label="Search"
|
||||||
|
className={classnames(
|
||||||
|
"navbar__search-input",
|
||||||
|
{ "search-bar-expanded": props.isSearchBarExpanded },
|
||||||
|
{ "search-bar": !props.isSearchBarExpanded }
|
||||||
|
)}
|
||||||
|
onClick={loadAlgolia}
|
||||||
|
onMouseOver={loadAlgolia}
|
||||||
|
onFocus={toggleSearchIconClick}
|
||||||
|
onBlur={toggleSearchIconClick}
|
||||||
|
ref={searchBarRef}
|
||||||
|
disabled={!indexReady}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Search;
|
||||||
147
website/src/theme/SearchBar/lunar-search.js
Normal file
147
website/src/theme/SearchBar/lunar-search.js
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
import lunr from "@generated/lunr.client";
|
||||||
|
lunr.tokenizer.separator = /[\s\-/]+/;
|
||||||
|
|
||||||
|
class LunrSearchAdapter {
|
||||||
|
constructor(searchDocs, searchIndex, baseUrl = '/') {
|
||||||
|
this.searchDocs = searchDocs;
|
||||||
|
this.lunrIndex = lunr.Index.load(searchIndex);
|
||||||
|
this.baseUrl = baseUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
getLunrResult(input) {
|
||||||
|
return this.lunrIndex.query(function (query) {
|
||||||
|
const tokens = lunr.tokenizer(input);
|
||||||
|
query.term(tokens, {
|
||||||
|
boost: 10
|
||||||
|
});
|
||||||
|
query.term(tokens, {
|
||||||
|
wildcard: lunr.Query.wildcard.TRAILING
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getHit(doc, formattedTitle, formattedContent) {
|
||||||
|
return {
|
||||||
|
hierarchy: {
|
||||||
|
lvl0: doc.pageTitle || doc.title,
|
||||||
|
lvl1: doc.type === 0 ? null : doc.title
|
||||||
|
},
|
||||||
|
url: doc.url,
|
||||||
|
_snippetResult: formattedContent ? {
|
||||||
|
content: {
|
||||||
|
value: formattedContent,
|
||||||
|
matchLevel: "full"
|
||||||
|
}
|
||||||
|
} : null,
|
||||||
|
_highlightResult: {
|
||||||
|
hierarchy: {
|
||||||
|
lvl0: {
|
||||||
|
value: doc.type === 0 ? formattedTitle || doc.title : doc.pageTitle,
|
||||||
|
},
|
||||||
|
lvl1:
|
||||||
|
doc.type === 0
|
||||||
|
? null
|
||||||
|
: {
|
||||||
|
value: formattedTitle || doc.title
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
getTitleHit(doc, position, length) {
|
||||||
|
const start = position[0];
|
||||||
|
const end = position[0] + length;
|
||||||
|
let formattedTitle = doc.title.substring(0, start) + '<span class="algolia-docsearch-suggestion--highlight">' + doc.title.substring(start, end) + '</span>' + doc.title.substring(end, doc.title.length);
|
||||||
|
return this.getHit(doc, formattedTitle)
|
||||||
|
}
|
||||||
|
|
||||||
|
getKeywordHit(doc, position, length) {
|
||||||
|
const start = position[0];
|
||||||
|
const end = position[0] + length;
|
||||||
|
let formattedTitle = doc.title + '<br /><i>Keywords: ' + doc.keywords.substring(0, start) + '<span class="algolia-docsearch-suggestion--highlight">' + doc.keywords.substring(start, end) + '</span>' + doc.keywords.substring(end, doc.keywords.length) + '</i>'
|
||||||
|
return this.getHit(doc, formattedTitle)
|
||||||
|
}
|
||||||
|
|
||||||
|
getContentHit(doc, position) {
|
||||||
|
const start = position[0];
|
||||||
|
const end = position[0] + position[1];
|
||||||
|
let previewStart = start;
|
||||||
|
let previewEnd = end;
|
||||||
|
let ellipsesBefore = true;
|
||||||
|
let ellipsesAfter = true;
|
||||||
|
for (let k = 0; k < 3; k++) {
|
||||||
|
const nextSpace = doc.content.lastIndexOf(' ', previewStart - 2);
|
||||||
|
const nextDot = doc.content.lastIndexOf('.', previewStart - 2);
|
||||||
|
if ((nextDot > 0) && (nextDot > nextSpace)) {
|
||||||
|
previewStart = nextDot + 1;
|
||||||
|
ellipsesBefore = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (nextSpace < 0) {
|
||||||
|
previewStart = 0;
|
||||||
|
ellipsesBefore = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
previewStart = nextSpace + 1;
|
||||||
|
}
|
||||||
|
for (let k = 0; k < 10; k++) {
|
||||||
|
const nextSpace = doc.content.indexOf(' ', previewEnd + 1);
|
||||||
|
const nextDot = doc.content.indexOf('.', previewEnd + 1);
|
||||||
|
if ((nextDot > 0) && (nextDot < nextSpace)) {
|
||||||
|
previewEnd = nextDot;
|
||||||
|
ellipsesAfter = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (nextSpace < 0) {
|
||||||
|
previewEnd = doc.content.length;
|
||||||
|
ellipsesAfter = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
previewEnd = nextSpace;
|
||||||
|
}
|
||||||
|
let preview = doc.content.substring(previewStart, start);
|
||||||
|
if (ellipsesBefore) {
|
||||||
|
preview = '... ' + preview;
|
||||||
|
}
|
||||||
|
preview += '<span class="algolia-docsearch-suggestion--highlight">' + doc.content.substring(start, end) + '</span>';
|
||||||
|
preview += doc.content.substring(end, previewEnd);
|
||||||
|
if (ellipsesAfter) {
|
||||||
|
preview += ' ...';
|
||||||
|
}
|
||||||
|
return this.getHit(doc, null, preview);
|
||||||
|
|
||||||
|
}
|
||||||
|
search(input) {
|
||||||
|
return new Promise((resolve, rej) => {
|
||||||
|
const results = this.getLunrResult(input);
|
||||||
|
const hits = [];
|
||||||
|
results.length > 5 && (results.length = 5);
|
||||||
|
this.titleHitsRes = []
|
||||||
|
this.contentHitsRes = []
|
||||||
|
results.forEach(result => {
|
||||||
|
const doc = this.searchDocs[result.ref];
|
||||||
|
const { metadata } = result.matchData;
|
||||||
|
for (let i in metadata) {
|
||||||
|
if (metadata[i].title) {
|
||||||
|
if (!this.titleHitsRes.includes(result.ref)) {
|
||||||
|
const position = metadata[i].title.position[0]
|
||||||
|
hits.push(this.getTitleHit(doc, position, input.length));
|
||||||
|
this.titleHitsRes.push(result.ref);
|
||||||
|
}
|
||||||
|
} else if (metadata[i].content) {
|
||||||
|
const position = metadata[i].content.position[0]
|
||||||
|
hits.push(this.getContentHit(doc, position))
|
||||||
|
} else if (metadata[i].keywords) {
|
||||||
|
const position = metadata[i].keywords.position[0]
|
||||||
|
hits.push(this.getKeywordHit(doc, position, input.length));
|
||||||
|
this.titleHitsRes.push(result.ref);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
hits.length > 5 && (hits.length = 5);
|
||||||
|
resolve(hits);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default LunrSearchAdapter;
|
||||||
40
website/src/theme/SearchBar/styles.css
Normal file
40
website/src/theme/SearchBar/styles.css
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.search-icon {
|
||||||
|
background-image: var(--ifm-navbar-search-input-icon);
|
||||||
|
height: auto;
|
||||||
|
width: 24px;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 8px;
|
||||||
|
line-height: 32px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-icon-hidden {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 360px) {
|
||||||
|
.search-bar {
|
||||||
|
width: 0 !important;
|
||||||
|
background: none !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
transition: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar-expanded {
|
||||||
|
width: 9rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-icon {
|
||||||
|
display: inline;
|
||||||
|
vertical-align: sub;
|
||||||
|
}
|
||||||
|
}
|
||||||
119
website/src/theme/SearchBar/templates.js
Normal file
119
website/src/theme/SearchBar/templates.js
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const prefix = 'algolia-docsearch';
|
||||||
|
const suggestionPrefix = `${prefix}-suggestion`;
|
||||||
|
const footerPrefix = `${prefix}-footer`;
|
||||||
|
|
||||||
|
const templates = {
|
||||||
|
suggestion: `
|
||||||
|
<a class="${suggestionPrefix}
|
||||||
|
{{#isCategoryHeader}}${suggestionPrefix}__main{{/isCategoryHeader}}
|
||||||
|
{{#isSubCategoryHeader}}${suggestionPrefix}__secondary{{/isSubCategoryHeader}}
|
||||||
|
"
|
||||||
|
aria-label="Link to the result"
|
||||||
|
href="{{{url}}}"
|
||||||
|
>
|
||||||
|
<div class="${suggestionPrefix}--category-header">
|
||||||
|
<span class="${suggestionPrefix}--category-header-lvl0">{{{category}}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="${suggestionPrefix}--wrapper">
|
||||||
|
<div class="${suggestionPrefix}--subcategory-column">
|
||||||
|
<span class="${suggestionPrefix}--subcategory-column-text">{{{subcategory}}}</span>
|
||||||
|
</div>
|
||||||
|
{{#isTextOrSubcategoryNonEmpty}}
|
||||||
|
<div class="${suggestionPrefix}--content">
|
||||||
|
<div class="${suggestionPrefix}--subcategory-inline">{{{subcategory}}}</div>
|
||||||
|
<div class="${suggestionPrefix}--title">{{{title}}}</div>
|
||||||
|
{{#text}}<div class="${suggestionPrefix}--text">{{{text}}}</div>{{/text}}
|
||||||
|
</div>
|
||||||
|
{{/isTextOrSubcategoryNonEmpty}}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
`,
|
||||||
|
suggestionSimple: `
|
||||||
|
<div class="${suggestionPrefix}
|
||||||
|
{{#isCategoryHeader}}${suggestionPrefix}__main{{/isCategoryHeader}}
|
||||||
|
{{#isSubCategoryHeader}}${suggestionPrefix}__secondary{{/isSubCategoryHeader}}
|
||||||
|
suggestion-layout-simple
|
||||||
|
">
|
||||||
|
<div class="${suggestionPrefix}--category-header">
|
||||||
|
{{^isLvl0}}
|
||||||
|
<span class="${suggestionPrefix}--category-header-lvl0 ${suggestionPrefix}--category-header-item">{{{category}}}</span>
|
||||||
|
{{^isLvl1}}
|
||||||
|
{{^isLvl1EmptyOrDuplicate}}
|
||||||
|
<span class="${suggestionPrefix}--category-header-lvl1 ${suggestionPrefix}--category-header-item">
|
||||||
|
{{{subcategory}}}
|
||||||
|
</span>
|
||||||
|
{{/isLvl1EmptyOrDuplicate}}
|
||||||
|
{{/isLvl1}}
|
||||||
|
{{/isLvl0}}
|
||||||
|
<div class="${suggestionPrefix}--title ${suggestionPrefix}--category-header-item">
|
||||||
|
{{#isLvl2}}
|
||||||
|
{{{title}}}
|
||||||
|
{{/isLvl2}}
|
||||||
|
{{#isLvl1}}
|
||||||
|
{{{subcategory}}}
|
||||||
|
{{/isLvl1}}
|
||||||
|
{{#isLvl0}}
|
||||||
|
{{{category}}}
|
||||||
|
{{/isLvl0}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="${suggestionPrefix}--wrapper">
|
||||||
|
{{#text}}
|
||||||
|
<div class="${suggestionPrefix}--content">
|
||||||
|
<div class="${suggestionPrefix}--text">{{{text}}}</div>
|
||||||
|
</div>
|
||||||
|
{{/text}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
footer: `
|
||||||
|
<div class="${footerPrefix}">
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
empty: `
|
||||||
|
<div class="${suggestionPrefix}">
|
||||||
|
<div class="${suggestionPrefix}--wrapper">
|
||||||
|
<div class="${suggestionPrefix}--content ${suggestionPrefix}--no-results">
|
||||||
|
<div class="${suggestionPrefix}--title">
|
||||||
|
<div class="${suggestionPrefix}--text">
|
||||||
|
No results found for query <b>"{{query}}"</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
searchBox: `
|
||||||
|
<form novalidate="novalidate" onsubmit="return false;" class="searchbox">
|
||||||
|
<div role="search" class="searchbox__wrapper">
|
||||||
|
<input id="docsearch" type="search" name="search" placeholder="Search the docs" autocomplete="off" required="required" class="searchbox__input"/>
|
||||||
|
<button type="submit" title="Submit your search query." class="searchbox__submit" >
|
||||||
|
<svg width=12 height=12 role="img" aria-label="Search">
|
||||||
|
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#sbx-icon-search-13"></use>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<button type="reset" title="Clear the search query." class="searchbox__reset hide">
|
||||||
|
<svg width=12 height=12 role="img" aria-label="Reset">
|
||||||
|
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#sbx-icon-clear-3"></use>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="svg-icons" style="height: 0; width: 0; position: absolute; visibility: hidden">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<symbol id="sbx-icon-clear-3" viewBox="0 0 40 40"><path d="M16.228 20L1.886 5.657 0 3.772 3.772 0l1.885 1.886L20 16.228 34.343 1.886 36.228 0 40 3.772l-1.886 1.885L23.772 20l14.342 14.343L40 36.228 36.228 40l-1.885-1.886L20 23.772 5.657 38.114 3.772 40 0 36.228l1.886-1.885L16.228 20z" fill-rule="evenodd"></symbol>
|
||||||
|
<symbol id="sbx-icon-search-13" viewBox="0 0 40 40"><path d="M26.806 29.012a16.312 16.312 0 0 1-10.427 3.746C7.332 32.758 0 25.425 0 16.378 0 7.334 7.333 0 16.38 0c9.045 0 16.378 7.333 16.378 16.38 0 3.96-1.406 7.593-3.746 10.426L39.547 37.34c.607.608.61 1.59-.004 2.203a1.56 1.56 0 0 1-2.202.004L26.807 29.012zm-10.427.627c7.322 0 13.26-5.938 13.26-13.26 0-7.324-5.938-13.26-13.26-13.26-7.324 0-13.26 5.936-13.26 13.26 0 7.322 5.936 13.26 13.26 13.26z" fill-rule="evenodd"></symbol>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default templates;
|
||||||
277
website/src/theme/SearchBar/utils.js
Normal file
277
website/src/theme/SearchBar/utils.js
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import $ from "autocomplete.js/zepto";
|
||||||
|
|
||||||
|
const utils = {
|
||||||
|
/*
|
||||||
|
* Move the content of an object key one level higher.
|
||||||
|
* eg.
|
||||||
|
* {
|
||||||
|
* name: 'My name',
|
||||||
|
* hierarchy: {
|
||||||
|
* lvl0: 'Foo',
|
||||||
|
* lvl1: 'Bar'
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* Will be converted to
|
||||||
|
* {
|
||||||
|
* name: 'My name',
|
||||||
|
* lvl0: 'Foo',
|
||||||
|
* lvl1: 'Bar'
|
||||||
|
* }
|
||||||
|
* @param {Object} object Main object
|
||||||
|
* @param {String} property Main object key to move up
|
||||||
|
* @return {Object}
|
||||||
|
* @throws Error when key is not an attribute of Object or is not an object itself
|
||||||
|
*/
|
||||||
|
mergeKeyWithParent(object, property) {
|
||||||
|
if (object[property] === undefined) {
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
if (typeof object[property] !== 'object') {
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
const newObject = $.extend({}, object, object[property]);
|
||||||
|
delete newObject[property];
|
||||||
|
return newObject;
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* Group all objects of a collection by the value of the specified attribute
|
||||||
|
* If the attribute is a string, use the lowercase form.
|
||||||
|
*
|
||||||
|
* eg.
|
||||||
|
* groupBy([
|
||||||
|
* {name: 'Tim', category: 'dev'},
|
||||||
|
* {name: 'Vincent', category: 'dev'},
|
||||||
|
* {name: 'Ben', category: 'sales'},
|
||||||
|
* {name: 'Jeremy', category: 'sales'},
|
||||||
|
* {name: 'AlexS', category: 'dev'},
|
||||||
|
* {name: 'AlexK', category: 'sales'}
|
||||||
|
* ], 'category');
|
||||||
|
* =>
|
||||||
|
* {
|
||||||
|
* 'devs': [
|
||||||
|
* {name: 'Tim', category: 'dev'},
|
||||||
|
* {name: 'Vincent', category: 'dev'},
|
||||||
|
* {name: 'AlexS', category: 'dev'}
|
||||||
|
* ],
|
||||||
|
* 'sales': [
|
||||||
|
* {name: 'Ben', category: 'sales'},
|
||||||
|
* {name: 'Jeremy', category: 'sales'},
|
||||||
|
* {name: 'AlexK', category: 'sales'}
|
||||||
|
* ]
|
||||||
|
* }
|
||||||
|
* @param {array} collection Array of objects to group
|
||||||
|
* @param {String} property The attribute on which apply the grouping
|
||||||
|
* @return {array}
|
||||||
|
* @throws Error when one of the element does not have the specified property
|
||||||
|
*/
|
||||||
|
groupBy(collection, property) {
|
||||||
|
const newCollection = {};
|
||||||
|
$.each(collection, (index, item) => {
|
||||||
|
if (item[property] === undefined) {
|
||||||
|
throw new Error(`[groupBy]: Object has no key ${property}`);
|
||||||
|
}
|
||||||
|
let key = item[property];
|
||||||
|
if (typeof key === 'string') {
|
||||||
|
key = key.toLowerCase();
|
||||||
|
}
|
||||||
|
// fix #171 the given data type of docsearch hits might be conflict with the properties of the native Object,
|
||||||
|
// such as the constructor, so we need to do this check.
|
||||||
|
if (!Object.prototype.hasOwnProperty.call(newCollection, key)) {
|
||||||
|
newCollection[key] = [];
|
||||||
|
}
|
||||||
|
newCollection[key].push(item);
|
||||||
|
});
|
||||||
|
return newCollection;
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* Return an array of all the values of the specified object
|
||||||
|
* eg.
|
||||||
|
* values({
|
||||||
|
* foo: 42,
|
||||||
|
* bar: true,
|
||||||
|
* baz: 'yep'
|
||||||
|
* })
|
||||||
|
* =>
|
||||||
|
* [42, true, yep]
|
||||||
|
* @param {object} object Object to extract values from
|
||||||
|
* @return {array}
|
||||||
|
*/
|
||||||
|
values(object) {
|
||||||
|
return Object.keys(object).map(key => object[key]);
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* Flattens an array
|
||||||
|
* eg.
|
||||||
|
* flatten([1, 2, [3, 4], [5, 6]])
|
||||||
|
* =>
|
||||||
|
* [1, 2, 3, 4, 5, 6]
|
||||||
|
* @param {array} array Array to flatten
|
||||||
|
* @return {array}
|
||||||
|
*/
|
||||||
|
flatten(array) {
|
||||||
|
const results = [];
|
||||||
|
array.forEach(value => {
|
||||||
|
if (!Array.isArray(value)) {
|
||||||
|
results.push(value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
value.forEach(subvalue => {
|
||||||
|
results.push(subvalue);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return results;
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* Flatten all values of an object into an array, marking each first element of
|
||||||
|
* each group with a specific flag
|
||||||
|
* eg.
|
||||||
|
* flattenAndFlagFirst({
|
||||||
|
* 'devs': [
|
||||||
|
* {name: 'Tim', category: 'dev'},
|
||||||
|
* {name: 'Vincent', category: 'dev'},
|
||||||
|
* {name: 'AlexS', category: 'dev'}
|
||||||
|
* ],
|
||||||
|
* 'sales': [
|
||||||
|
* {name: 'Ben', category: 'sales'},
|
||||||
|
* {name: 'Jeremy', category: 'sales'},
|
||||||
|
* {name: 'AlexK', category: 'sales'}
|
||||||
|
* ]
|
||||||
|
* , 'isTop');
|
||||||
|
* =>
|
||||||
|
* [
|
||||||
|
* {name: 'Tim', category: 'dev', isTop: true},
|
||||||
|
* {name: 'Vincent', category: 'dev', isTop: false},
|
||||||
|
* {name: 'AlexS', category: 'dev', isTop: false},
|
||||||
|
* {name: 'Ben', category: 'sales', isTop: true},
|
||||||
|
* {name: 'Jeremy', category: 'sales', isTop: false},
|
||||||
|
* {name: 'AlexK', category: 'sales', isTop: false}
|
||||||
|
* ]
|
||||||
|
* @param {object} object Object to flatten
|
||||||
|
* @param {string} flag Flag to set to true on first element of each group
|
||||||
|
* @return {array}
|
||||||
|
*/
|
||||||
|
flattenAndFlagFirst(object, flag) {
|
||||||
|
const values = this.values(object).map(collection =>
|
||||||
|
collection.map((item, index) => {
|
||||||
|
// eslint-disable-next-line no-param-reassign
|
||||||
|
item[flag] = index === 0;
|
||||||
|
return item;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
return this.flatten(values);
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* Removes all empty strings, null, false and undefined elements array
|
||||||
|
* eg.
|
||||||
|
* compact([42, false, null, undefined, '', [], 'foo']);
|
||||||
|
* =>
|
||||||
|
* [42, [], 'foo']
|
||||||
|
* @param {array} array Array to compact
|
||||||
|
* @return {array}
|
||||||
|
*/
|
||||||
|
compact(array) {
|
||||||
|
const results = [];
|
||||||
|
array.forEach(value => {
|
||||||
|
if (!value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
results.push(value);
|
||||||
|
});
|
||||||
|
return results;
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* Returns the highlighted value of the specified key in the specified object.
|
||||||
|
* If no highlighted value is available, will return the key value directly
|
||||||
|
* eg.
|
||||||
|
* getHighlightedValue({
|
||||||
|
* _highlightResult: {
|
||||||
|
* text: {
|
||||||
|
* value: '<mark>foo</mark>'
|
||||||
|
* }
|
||||||
|
* },
|
||||||
|
* text: 'foo'
|
||||||
|
* }, 'text');
|
||||||
|
* =>
|
||||||
|
* '<mark>foo</mark>'
|
||||||
|
* @param {object} object Hit object returned by the Algolia API
|
||||||
|
* @param {string} property Object key to look for
|
||||||
|
* @return {string}
|
||||||
|
**/
|
||||||
|
getHighlightedValue(object, property) {
|
||||||
|
if (
|
||||||
|
object._highlightResult &&
|
||||||
|
object._highlightResult.hierarchy_camel &&
|
||||||
|
object._highlightResult.hierarchy_camel[property] &&
|
||||||
|
object._highlightResult.hierarchy_camel[property].matchLevel &&
|
||||||
|
object._highlightResult.hierarchy_camel[property].matchLevel !== 'none' &&
|
||||||
|
object._highlightResult.hierarchy_camel[property].value
|
||||||
|
) {
|
||||||
|
return object._highlightResult.hierarchy_camel[property].value;
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
object._highlightResult &&
|
||||||
|
object._highlightResult &&
|
||||||
|
object._highlightResult[property] &&
|
||||||
|
object._highlightResult[property].value
|
||||||
|
) {
|
||||||
|
return object._highlightResult[property].value;
|
||||||
|
}
|
||||||
|
return object[property];
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* Returns the snippeted value of the specified key in the specified object.
|
||||||
|
* If no highlighted value is available, will return the key value directly.
|
||||||
|
* Will add starting and ending ellipsis (…) if we detect that a sentence is
|
||||||
|
* incomplete
|
||||||
|
* eg.
|
||||||
|
* getSnippetedValue({
|
||||||
|
* _snippetResult: {
|
||||||
|
* text: {
|
||||||
|
* value: '<mark>This is an unfinished sentence</mark>'
|
||||||
|
* }
|
||||||
|
* },
|
||||||
|
* text: 'This is an unfinished sentence'
|
||||||
|
* }, 'text');
|
||||||
|
* =>
|
||||||
|
* '<mark>This is an unfinished sentence</mark>…'
|
||||||
|
* @param {object} object Hit object returned by the Algolia API
|
||||||
|
* @param {string} property Object key to look for
|
||||||
|
* @return {string}
|
||||||
|
**/
|
||||||
|
getSnippetedValue(object, property) {
|
||||||
|
if (
|
||||||
|
!object._snippetResult ||
|
||||||
|
!object._snippetResult[property] ||
|
||||||
|
!object._snippetResult[property].value
|
||||||
|
) {
|
||||||
|
return object[property];
|
||||||
|
}
|
||||||
|
let snippet = object._snippetResult[property].value;
|
||||||
|
|
||||||
|
if (snippet[0] !== snippet[0].toUpperCase()) {
|
||||||
|
snippet = `…${snippet}`;
|
||||||
|
}
|
||||||
|
if (['.', '!', '?'].indexOf(snippet[snippet.length - 1]) === -1) {
|
||||||
|
snippet = `${snippet}…`;
|
||||||
|
}
|
||||||
|
return snippet;
|
||||||
|
},
|
||||||
|
/*
|
||||||
|
* Deep clone an object.
|
||||||
|
* Note: This will not clone functions and dates
|
||||||
|
* @param {object} object Object to clone
|
||||||
|
* @return {object}
|
||||||
|
*/
|
||||||
|
deepClone(object) {
|
||||||
|
return JSON.parse(JSON.stringify(object));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default utils;
|
||||||
@@ -4163,6 +4163,11 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
|
resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
|
||||||
integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==
|
integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==
|
||||||
|
|
||||||
|
abbrev@1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
||||||
|
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
|
||||||
|
|
||||||
accepts@~1.3.4, accepts@~1.3.5:
|
accepts@~1.3.4, accepts@~1.3.5:
|
||||||
version "1.3.7"
|
version "1.3.7"
|
||||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
|
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
|
||||||
@@ -4419,6 +4424,11 @@ anymatch@~3.1.2:
|
|||||||
normalize-path "^3.0.0"
|
normalize-path "^3.0.0"
|
||||||
picomatch "^2.0.4"
|
picomatch "^2.0.4"
|
||||||
|
|
||||||
|
"aproba@^1.0.3 || ^2.0.0":
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc"
|
||||||
|
integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==
|
||||||
|
|
||||||
arg@^4.1.0:
|
arg@^4.1.0:
|
||||||
version "4.1.3"
|
version "4.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
|
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
|
||||||
@@ -4496,6 +4506,13 @@ at-least-node@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
|
resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
|
||||||
integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==
|
integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==
|
||||||
|
|
||||||
|
autocomplete.js@^0.37.0:
|
||||||
|
version "0.37.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/autocomplete.js/-/autocomplete.js-0.37.1.tgz#a29a048d827e7d2bf8f7df8b831766e5cc97df01"
|
||||||
|
integrity sha512-PgSe9fHYhZEsm/9jggbjtVsGXJkPLvd+9mC7gZJ662vVL5CRWEtm/mIrrzCx0MrNxHVwxD5d00UOn6NsmL2LUQ==
|
||||||
|
dependencies:
|
||||||
|
immediate "^3.2.3"
|
||||||
|
|
||||||
autoprefixer@^10.3.7, autoprefixer@^10.4.7:
|
autoprefixer@^10.3.7, autoprefixer@^10.4.7:
|
||||||
version "10.4.7"
|
version "10.4.7"
|
||||||
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.7.tgz#1db8d195f41a52ca5069b7593be167618edbbedf"
|
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.7.tgz#1db8d195f41a52ca5069b7593be167618edbbedf"
|
||||||
@@ -4669,6 +4686,11 @@ batch@0.6.1:
|
|||||||
resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16"
|
resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16"
|
||||||
integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=
|
integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=
|
||||||
|
|
||||||
|
bcp-47-match@^1.0.0:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/bcp-47-match/-/bcp-47-match-1.0.3.tgz#cb8d03071389a10aff2062b862d6575ffd7cd7ef"
|
||||||
|
integrity sha512-LggQ4YTdjWQSKELZF5JwchnBa1u0pIQSZf5lSdOHEdbVP55h0qICA/FUp3+W99q0xqxYa1ZQizTUH87gecII5w==
|
||||||
|
|
||||||
big.js@^5.2.2:
|
big.js@^5.2.2:
|
||||||
version "5.2.2"
|
version "5.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
|
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
|
||||||
@@ -5089,6 +5111,11 @@ color-name@~1.1.4:
|
|||||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
||||||
|
|
||||||
|
color-support@^1.1.2:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
|
||||||
|
integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
|
||||||
|
|
||||||
colord@^2.9.1:
|
colord@^2.9.1:
|
||||||
version "2.9.2"
|
version "2.9.2"
|
||||||
resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.2.tgz#25e2bacbbaa65991422c07ea209e2089428effb1"
|
resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.2.tgz#25e2bacbbaa65991422c07ea209e2089428effb1"
|
||||||
@@ -5226,6 +5253,11 @@ consola@^2.15.3:
|
|||||||
resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.3.tgz#2e11f98d6a4be71ff72e0bdf07bd23e12cb61550"
|
resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.3.tgz#2e11f98d6a4be71ff72e0bdf07bd23e12cb61550"
|
||||||
integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==
|
integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==
|
||||||
|
|
||||||
|
console-control-strings@^1.0.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
|
||||||
|
integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==
|
||||||
|
|
||||||
content-disposition@0.5.2:
|
content-disposition@0.5.2:
|
||||||
version "0.5.2"
|
version "0.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4"
|
resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4"
|
||||||
@@ -5456,6 +5488,11 @@ css-select@^5.1.0:
|
|||||||
domutils "^3.0.1"
|
domutils "^3.0.1"
|
||||||
nth-check "^2.0.1"
|
nth-check "^2.0.1"
|
||||||
|
|
||||||
|
css-selector-parser@^1.0.0:
|
||||||
|
version "1.4.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/css-selector-parser/-/css-selector-parser-1.4.1.tgz#03f9cb8a81c3e5ab2c51684557d5aaf6d2569759"
|
||||||
|
integrity sha512-HYPSb7y/Z7BNDCOrakL4raGO2zltZkbeXyAd6Tg9obzix6QhzxCotdBl6VT0Dv4vZfJGVz3WL/xaEI9Ly3ul0g==
|
||||||
|
|
||||||
css-tree@^1.1.2, css-tree@^1.1.3:
|
css-tree@^1.1.2, css-tree@^1.1.3:
|
||||||
version "1.1.3"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d"
|
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d"
|
||||||
@@ -6241,6 +6278,11 @@ dir-glob@^3.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
path-type "^4.0.0"
|
path-type "^4.0.0"
|
||||||
|
|
||||||
|
direction@^1.0.0:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/direction/-/direction-1.0.4.tgz#2b86fb686967e987088caf8b89059370d4837442"
|
||||||
|
integrity sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ==
|
||||||
|
|
||||||
dns-equal@^1.0.0:
|
dns-equal@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d"
|
resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d"
|
||||||
@@ -6253,10 +6295,30 @@ dns-packet@^5.2.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@leichtgewicht/ip-codec" "^2.0.1"
|
"@leichtgewicht/ip-codec" "^2.0.1"
|
||||||
|
|
||||||
docusaurus-plugin-internaldocs-fb@1.9.1:
|
docusaurus-lunr-search@^2.3.2:
|
||||||
version "1.9.1"
|
version "2.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/docusaurus-plugin-internaldocs-fb/-/docusaurus-plugin-internaldocs-fb-1.9.1.tgz#5701d732a03269ad31b2892dfdec8432c8e2b4ad"
|
resolved "https://registry.yarnpkg.com/docusaurus-lunr-search/-/docusaurus-lunr-search-2.3.2.tgz#9991ef51addb0bf09ac80a06cb5729f28939332d"
|
||||||
integrity sha512-RsfUg5JINiz8K1BNSc0UI4pyLMB8h3c0CG+DgwS9hJWugs5zoaAn5am0gRKjH2lcD/SIL8ToNtG7oe1iLrkB3g==
|
integrity sha512-Ngvm2kXwliWThqAThXI1912rOKHlFL7BjIc+OVNUfzkjpk5ar4TFEh+EUaaMOLw4V0BBko3CW0Ym7prqqm3jLQ==
|
||||||
|
dependencies:
|
||||||
|
autocomplete.js "^0.37.0"
|
||||||
|
classnames "^2.2.6"
|
||||||
|
gauge "^3.0.0"
|
||||||
|
hast-util-select "^4.0.0"
|
||||||
|
hast-util-to-text "^2.0.0"
|
||||||
|
hogan.js "^3.0.2"
|
||||||
|
lunr "^2.3.8"
|
||||||
|
lunr-languages "^1.4.0"
|
||||||
|
minimatch "^3.0.4"
|
||||||
|
object-assign "^4.1.1"
|
||||||
|
rehype-parse "^7.0.1"
|
||||||
|
to-vfile "^6.1.0"
|
||||||
|
unified "^9.0.0"
|
||||||
|
unist-util-is "^4.0.2"
|
||||||
|
|
||||||
|
docusaurus-plugin-internaldocs-fb@1.13.0:
|
||||||
|
version "1.13.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/docusaurus-plugin-internaldocs-fb/-/docusaurus-plugin-internaldocs-fb-1.13.0.tgz#f87b9e84d364e04fdd5b4999a17d83d0d9c78c06"
|
||||||
|
integrity sha512-LVSd6UAXQEUVELggltXJcaCZNs0E3sIVL1wKAsILgYrLCdOU7A7P37guwYzvcwsBw4ykVuAQDY4+mq1QkDd4wQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@mdx-js/mdx" "^2.1.1"
|
"@mdx-js/mdx" "^2.1.1"
|
||||||
"@mdx-js/react" "^1.6.22"
|
"@mdx-js/react" "^1.6.22"
|
||||||
@@ -6266,6 +6328,7 @@ docusaurus-plugin-internaldocs-fb@1.9.1:
|
|||||||
assert "^2.0.0"
|
assert "^2.0.0"
|
||||||
buffer "^6.0.3"
|
buffer "^6.0.3"
|
||||||
clsx "^1.2.1"
|
clsx "^1.2.1"
|
||||||
|
docusaurus-lunr-search "^2.3.2"
|
||||||
fs-extra "^10.1.0"
|
fs-extra "^10.1.0"
|
||||||
lodash.debounce "^4.0.8"
|
lodash.debounce "^4.0.8"
|
||||||
mermaid "^9.1.3"
|
mermaid "^9.1.3"
|
||||||
@@ -7067,6 +7130,21 @@ function-bind@^1.1.1:
|
|||||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||||
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
|
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
|
||||||
|
|
||||||
|
gauge@^3.0.0:
|
||||||
|
version "3.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/gauge/-/gauge-3.0.2.tgz#03bf4441c044383908bcfa0656ad91803259b395"
|
||||||
|
integrity sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==
|
||||||
|
dependencies:
|
||||||
|
aproba "^1.0.3 || ^2.0.0"
|
||||||
|
color-support "^1.1.2"
|
||||||
|
console-control-strings "^1.0.0"
|
||||||
|
has-unicode "^2.0.1"
|
||||||
|
object-assign "^4.1.1"
|
||||||
|
signal-exit "^3.0.0"
|
||||||
|
string-width "^4.2.3"
|
||||||
|
strip-ansi "^6.0.1"
|
||||||
|
wide-align "^1.1.2"
|
||||||
|
|
||||||
gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2:
|
gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2:
|
||||||
version "1.0.0-beta.2"
|
version "1.0.0-beta.2"
|
||||||
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
|
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
|
||||||
@@ -7315,6 +7393,11 @@ has-tostringtag@^1.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
has-symbols "^1.0.2"
|
has-symbols "^1.0.2"
|
||||||
|
|
||||||
|
has-unicode@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
|
||||||
|
integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==
|
||||||
|
|
||||||
has-yarn@^2.1.0:
|
has-yarn@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77"
|
resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77"
|
||||||
@@ -7352,6 +7435,16 @@ hast-util-from-parse5@^6.0.0:
|
|||||||
vfile-location "^3.2.0"
|
vfile-location "^3.2.0"
|
||||||
web-namespaces "^1.0.0"
|
web-namespaces "^1.0.0"
|
||||||
|
|
||||||
|
hast-util-has-property@^1.0.0:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/hast-util-has-property/-/hast-util-has-property-1.0.4.tgz#9f137565fad6082524b382c1e7d7d33ca5059f36"
|
||||||
|
integrity sha512-ghHup2voGfgFoHMGnaLHOjbYFACKrRh9KFttdCzMCbFoBMJXiNi2+XTrPP8+q6cDJM/RSqlCfVWrjp1H201rZg==
|
||||||
|
|
||||||
|
hast-util-is-element@^1.0.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz#3b3ed5159a2707c6137b48637fbfe068e175a425"
|
||||||
|
integrity sha512-oUmNua0bFbdrD/ELDSSEadRVtWZOf3iF6Lbv81naqsIV99RnSCieTbWuWCY8BAeEfKJTKl0gRdokv+dELutHGQ==
|
||||||
|
|
||||||
hast-util-parse-selector@^2.0.0:
|
hast-util-parse-selector@^2.0.0:
|
||||||
version "2.2.5"
|
version "2.2.5"
|
||||||
resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz#d57c23f4da16ae3c63b3b6ca4616683313499c3a"
|
resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz#d57c23f4da16ae3c63b3b6ca4616683313499c3a"
|
||||||
@@ -7373,6 +7466,26 @@ hast-util-raw@6.0.1:
|
|||||||
xtend "^4.0.0"
|
xtend "^4.0.0"
|
||||||
zwitch "^1.0.0"
|
zwitch "^1.0.0"
|
||||||
|
|
||||||
|
hast-util-select@^4.0.0:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/hast-util-select/-/hast-util-select-4.0.2.tgz#ae3ef2860e02cda2ad3a2e72b47c1f5e8f44e9e7"
|
||||||
|
integrity sha512-8EEG2//bN5rrzboPWD2HdS3ugLijNioS1pqOTIolXNf67xxShYw4SQEmVXd3imiBG+U2bC2nVTySr/iRAA7Cjg==
|
||||||
|
dependencies:
|
||||||
|
bcp-47-match "^1.0.0"
|
||||||
|
comma-separated-tokens "^1.0.0"
|
||||||
|
css-selector-parser "^1.0.0"
|
||||||
|
direction "^1.0.0"
|
||||||
|
hast-util-has-property "^1.0.0"
|
||||||
|
hast-util-is-element "^1.0.0"
|
||||||
|
hast-util-to-string "^1.0.0"
|
||||||
|
hast-util-whitespace "^1.0.0"
|
||||||
|
not "^0.1.0"
|
||||||
|
nth-check "^2.0.0"
|
||||||
|
property-information "^5.0.0"
|
||||||
|
space-separated-tokens "^1.0.0"
|
||||||
|
unist-util-visit "^2.0.0"
|
||||||
|
zwitch "^1.0.0"
|
||||||
|
|
||||||
hast-util-to-estree@^2.0.0:
|
hast-util-to-estree@^2.0.0:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/hast-util-to-estree/-/hast-util-to-estree-2.0.2.tgz#79c5bf588915610b3f0d47ca83a74dc0269c7dc2"
|
resolved "https://registry.yarnpkg.com/hast-util-to-estree/-/hast-util-to-estree-2.0.2.tgz#79c5bf588915610b3f0d47ca83a74dc0269c7dc2"
|
||||||
@@ -7404,6 +7517,25 @@ hast-util-to-parse5@^6.0.0:
|
|||||||
xtend "^4.0.0"
|
xtend "^4.0.0"
|
||||||
zwitch "^1.0.0"
|
zwitch "^1.0.0"
|
||||||
|
|
||||||
|
hast-util-to-string@^1.0.0:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/hast-util-to-string/-/hast-util-to-string-1.0.4.tgz#9b24c114866bdb9478927d7e9c36a485ac728378"
|
||||||
|
integrity sha512-eK0MxRX47AV2eZ+Lyr18DCpQgodvaS3fAQO2+b9Two9F5HEoRPhiUMNzoXArMJfZi2yieFzUBMRl3HNJ3Jus3w==
|
||||||
|
|
||||||
|
hast-util-to-text@^2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/hast-util-to-text/-/hast-util-to-text-2.0.1.tgz#04f2e065642a0edb08341976084aa217624a0f8b"
|
||||||
|
integrity sha512-8nsgCARfs6VkwH2jJU9b8LNTuR4700na+0h3PqCaEk4MAnMDeu5P0tP8mjk9LLNGxIeQRLbiDbZVw6rku+pYsQ==
|
||||||
|
dependencies:
|
||||||
|
hast-util-is-element "^1.0.0"
|
||||||
|
repeat-string "^1.0.0"
|
||||||
|
unist-util-find-after "^3.0.0"
|
||||||
|
|
||||||
|
hast-util-whitespace@^1.0.0:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-1.0.4.tgz#e4fe77c4a9ae1cb2e6c25e02df0043d0164f6e41"
|
||||||
|
integrity sha512-I5GTdSfhYfAPNztx2xJRQpG8cuDSNt599/7YUn7Gx/WxNMsG+a835k97TDkFgk123cwjfwINaZknkKkphx/f2A==
|
||||||
|
|
||||||
hast-util-whitespace@^2.0.0:
|
hast-util-whitespace@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-2.0.0.tgz#4fc1086467cc1ef5ba20673cb6b03cec3a970f1c"
|
resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-2.0.0.tgz#4fc1086467cc1ef5ba20673cb6b03cec3a970f1c"
|
||||||
@@ -7437,6 +7569,14 @@ history@^4.9.0:
|
|||||||
tiny-warning "^1.0.0"
|
tiny-warning "^1.0.0"
|
||||||
value-equal "^1.0.1"
|
value-equal "^1.0.1"
|
||||||
|
|
||||||
|
hogan.js@^3.0.2:
|
||||||
|
version "3.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/hogan.js/-/hogan.js-3.0.2.tgz#4cd9e1abd4294146e7679e41d7898732b02c7bfd"
|
||||||
|
integrity sha512-RqGs4wavGYJWE07t35JQccByczmNUXQT0E12ZYV1VKYu5UiAU9lsos/yBAcf840+zrUQQxgVduCR5/B8nNtibg==
|
||||||
|
dependencies:
|
||||||
|
mkdirp "0.3.0"
|
||||||
|
nopt "1.0.10"
|
||||||
|
|
||||||
hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.1:
|
hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.1:
|
||||||
version "3.3.2"
|
version "3.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
|
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
|
||||||
@@ -7633,6 +7773,11 @@ image-size@~0.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
|
resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
|
||||||
integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=
|
integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=
|
||||||
|
|
||||||
|
immediate@^3.2.3:
|
||||||
|
version "3.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266"
|
||||||
|
integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==
|
||||||
|
|
||||||
immer@^9.0.18, immer@^9.0.6, immer@^9.0.7:
|
immer@^9.0.18, immer@^9.0.6, immer@^9.0.7:
|
||||||
version "9.0.6"
|
version "9.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.6.tgz#7a96bf2674d06c8143e327cbf73539388ddf1a73"
|
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.6.tgz#7a96bf2674d06c8143e327cbf73539388ddf1a73"
|
||||||
@@ -8419,6 +8564,16 @@ lru-cache@^6.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
yallist "^4.0.0"
|
yallist "^4.0.0"
|
||||||
|
|
||||||
|
lunr-languages@^1.4.0:
|
||||||
|
version "1.12.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lunr-languages/-/lunr-languages-1.12.0.tgz#c44d8f2127054a55c62e1aebe0b1eaea6dfc1d91"
|
||||||
|
integrity sha512-C2z02jt74ymrDocBwxYB4Cr1LNZj9rHGLTH/00+JuoT6eJOSSuPBzeqQG8kjnlPUQe+/PAWv1/KHbDT+YYYRnA==
|
||||||
|
|
||||||
|
lunr@^2.3.8:
|
||||||
|
version "2.3.9"
|
||||||
|
resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1"
|
||||||
|
integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==
|
||||||
|
|
||||||
magic-string@^0.25.0, magic-string@^0.25.1:
|
magic-string@^0.25.0, magic-string@^0.25.1:
|
||||||
version "0.25.7"
|
version "0.25.7"
|
||||||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051"
|
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051"
|
||||||
@@ -9240,6 +9395,11 @@ minimist@^1.2.0, minimist@^1.2.5:
|
|||||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
|
||||||
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
|
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
|
||||||
|
|
||||||
|
mkdirp@0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e"
|
||||||
|
integrity sha512-OHsdUcVAQ6pOtg5JYWpCBo9W/GySVuwvP9hueRMW7UqshC0tbfzLv8wjySTPm3tfUZ/21CE9E1pJagOA91Pxew==
|
||||||
|
|
||||||
moment-mini@2.24.0, moment-mini@^2.24.0:
|
moment-mini@2.24.0, moment-mini@^2.24.0:
|
||||||
version "2.24.0"
|
version "2.24.0"
|
||||||
resolved "https://registry.yarnpkg.com/moment-mini/-/moment-mini-2.24.0.tgz#fa68d98f7fe93ae65bf1262f6abb5fb6983d8d18"
|
resolved "https://registry.yarnpkg.com/moment-mini/-/moment-mini-2.24.0.tgz#fa68d98f7fe93ae65bf1262f6abb5fb6983d8d18"
|
||||||
@@ -9346,6 +9506,13 @@ node-releases@^1.1.75:
|
|||||||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe"
|
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe"
|
||||||
integrity sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==
|
integrity sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==
|
||||||
|
|
||||||
|
nopt@1.0.10:
|
||||||
|
version "1.0.10"
|
||||||
|
resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee"
|
||||||
|
integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==
|
||||||
|
dependencies:
|
||||||
|
abbrev "1"
|
||||||
|
|
||||||
normalize-path@^3.0.0, normalize-path@~3.0.0:
|
normalize-path@^3.0.0, normalize-path@~3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
|
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
|
||||||
@@ -9366,6 +9533,11 @@ normalize-url@^6.0.1:
|
|||||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a"
|
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a"
|
||||||
integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==
|
integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==
|
||||||
|
|
||||||
|
not@^0.1.0:
|
||||||
|
version "0.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/not/-/not-0.1.0.tgz#c9691c1746c55dcfbe54cbd8bd4ff041bc2b519d"
|
||||||
|
integrity sha512-5PDmaAsVfnWUgTUbJ3ERwn7u79Z0dYxN9ErxCpVJJqe2RK0PJ3z+iFUxuqjwtlDDegXvtWoxD/3Fzxox7tFGWA==
|
||||||
|
|
||||||
npm-run-path@^4.0.1:
|
npm-run-path@^4.0.1:
|
||||||
version "4.0.1"
|
version "4.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
|
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
|
||||||
@@ -11034,6 +11206,14 @@ regjsparser@^0.8.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
jsesc "~0.5.0"
|
jsesc "~0.5.0"
|
||||||
|
|
||||||
|
rehype-parse@^7.0.1:
|
||||||
|
version "7.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-7.0.1.tgz#58900f6702b56767814afc2a9efa2d42b1c90c57"
|
||||||
|
integrity sha512-fOiR9a9xH+Le19i4fGzIEowAbwG7idy2Jzs4mOrFWBSJ0sNUgy0ev871dwWnbOo371SjgjG4pwzrbgSVrKxecw==
|
||||||
|
dependencies:
|
||||||
|
hast-util-from-parse5 "^6.0.0"
|
||||||
|
parse5 "^6.0.0"
|
||||||
|
|
||||||
relateurl@^0.2.7:
|
relateurl@^0.2.7:
|
||||||
version "0.2.7"
|
version "0.2.7"
|
||||||
resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
|
resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
|
||||||
@@ -11149,7 +11329,7 @@ renderkid@^3.0.0:
|
|||||||
lodash "^4.17.21"
|
lodash "^4.17.21"
|
||||||
strip-ansi "^6.0.1"
|
strip-ansi "^6.0.1"
|
||||||
|
|
||||||
repeat-string@^1.5.4:
|
repeat-string@^1.0.0, repeat-string@^1.5.4:
|
||||||
version "1.6.1"
|
version "1.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
|
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
|
||||||
integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
|
integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
|
||||||
@@ -11567,6 +11747,11 @@ side-channel@^1.0.4:
|
|||||||
get-intrinsic "^1.0.2"
|
get-intrinsic "^1.0.2"
|
||||||
object-inspect "^1.9.0"
|
object-inspect "^1.9.0"
|
||||||
|
|
||||||
|
signal-exit@^3.0.0:
|
||||||
|
version "3.0.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
|
||||||
|
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
|
||||||
|
|
||||||
signal-exit@^3.0.2, signal-exit@^3.0.3:
|
signal-exit@^3.0.2, signal-exit@^3.0.3:
|
||||||
version "3.0.3"
|
version "3.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
|
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
|
||||||
@@ -11726,6 +11911,15 @@ string-natural-compare@^3.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4"
|
resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4"
|
||||||
integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==
|
integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==
|
||||||
|
|
||||||
|
"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.2.3:
|
||||||
|
version "4.2.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||||
|
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||||
|
dependencies:
|
||||||
|
emoji-regex "^8.0.0"
|
||||||
|
is-fullwidth-code-point "^3.0.0"
|
||||||
|
strip-ansi "^6.0.1"
|
||||||
|
|
||||||
string-width@^3.0.0:
|
string-width@^3.0.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
|
resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
|
||||||
@@ -12032,6 +12226,14 @@ to-regex-range@^5.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-number "^7.0.0"
|
is-number "^7.0.0"
|
||||||
|
|
||||||
|
to-vfile@^6.1.0:
|
||||||
|
version "6.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/to-vfile/-/to-vfile-6.1.0.tgz#5f7a3f65813c2c4e34ee1f7643a5646344627699"
|
||||||
|
integrity sha512-BxX8EkCxOAZe+D/ToHdDsJcVI4HqQfmw0tCkp31zf3dNP/XWIAjU4CmeuSwsSoOzOTqHPOL0KUzyZqJplkD0Qw==
|
||||||
|
dependencies:
|
||||||
|
is-buffer "^2.0.0"
|
||||||
|
vfile "^4.0.0"
|
||||||
|
|
||||||
toggle-selection@^1.0.6:
|
toggle-selection@^1.0.6:
|
||||||
version "1.0.6"
|
version "1.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32"
|
resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32"
|
||||||
@@ -12237,7 +12439,7 @@ unified@^10.0.0:
|
|||||||
trough "^2.0.0"
|
trough "^2.0.0"
|
||||||
vfile "^5.0.0"
|
vfile "^5.0.0"
|
||||||
|
|
||||||
unified@^9.2.1, unified@^9.2.2:
|
unified@^9.0.0, unified@^9.2.1, unified@^9.2.2:
|
||||||
version "9.2.2"
|
version "9.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.2.tgz#67649a1abfc3ab85d2969502902775eb03146975"
|
resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.2.tgz#67649a1abfc3ab85d2969502902775eb03146975"
|
||||||
integrity sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==
|
integrity sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==
|
||||||
@@ -12268,6 +12470,13 @@ unist-builder@^3.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/unist" "^2.0.0"
|
"@types/unist" "^2.0.0"
|
||||||
|
|
||||||
|
unist-util-find-after@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/unist-util-find-after/-/unist-util-find-after-3.0.0.tgz#5c65fcebf64d4f8f496db46fa8fd0fbf354b43e6"
|
||||||
|
integrity sha512-ojlBqfsBftYXExNu3+hHLfJQ/X1jYY/9vdm4yZWjIbf0VuWF6CRufci1ZyoD/wV2TYMKxXUoNuoqwy+CkgzAiQ==
|
||||||
|
dependencies:
|
||||||
|
unist-util-is "^4.0.0"
|
||||||
|
|
||||||
unist-util-generated@^1.0.0:
|
unist-util-generated@^1.0.0:
|
||||||
version "1.1.6"
|
version "1.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.6.tgz#5ab51f689e2992a472beb1b35f2ce7ff2f324d4b"
|
resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.6.tgz#5ab51f689e2992a472beb1b35f2ce7ff2f324d4b"
|
||||||
@@ -12278,7 +12487,7 @@ unist-util-generated@^2.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-2.0.0.tgz#86fafb77eb6ce9bfa6b663c3f5ad4f8e56a60113"
|
resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-2.0.0.tgz#86fafb77eb6ce9bfa6b663c3f5ad4f8e56a60113"
|
||||||
integrity sha512-TiWE6DVtVe7Ye2QxOVW9kqybs6cZexNwTwSMVgkfjEReqy/xwGpAXb99OxktoWwmL+Z+Epb0Dn8/GNDYP1wnUw==
|
integrity sha512-TiWE6DVtVe7Ye2QxOVW9kqybs6cZexNwTwSMVgkfjEReqy/xwGpAXb99OxktoWwmL+Z+Epb0Dn8/GNDYP1wnUw==
|
||||||
|
|
||||||
unist-util-is@^4.0.0:
|
unist-util-is@^4.0.0, unist-util-is@^4.0.2:
|
||||||
version "4.1.0"
|
version "4.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-4.1.0.tgz#976e5f462a7a5de73d94b706bac1b90671b57797"
|
resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-4.1.0.tgz#976e5f462a7a5de73d94b706bac1b90671b57797"
|
||||||
integrity sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==
|
integrity sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==
|
||||||
@@ -12825,6 +13034,13 @@ which@^2.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
isexe "^2.0.0"
|
isexe "^2.0.0"
|
||||||
|
|
||||||
|
wide-align@^1.1.2:
|
||||||
|
version "1.1.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3"
|
||||||
|
integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==
|
||||||
|
dependencies:
|
||||||
|
string-width "^1.0.2 || 2 || 3 || 4"
|
||||||
|
|
||||||
widest-line@^3.1.0:
|
widest-line@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca"
|
resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca"
|
||||||
|
|||||||
Reference in New Issue
Block a user