initial vitepress site with basic nav
This commit is contained in:
parent
a7df2e049d
commit
2029f16583
1900 changed files with 1014692 additions and 0 deletions
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/HighlightedHit.d.ts
generated
vendored
Normal file
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/HighlightedHit.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { HighlightResult } from '../types';
|
||||
export declare type HighlightedHit<THit> = THit & {
|
||||
_highlightResult?: HighlightResult<THit>;
|
||||
};
|
1
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/HighlightedHit.js
generated
vendored
Normal file
1
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/HighlightedHit.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export {};
|
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParseAlgoliaHitParams.d.ts
generated
vendored
Normal file
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParseAlgoliaHitParams.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
export declare type ParseAlgoliaHitParams<TItem> = {
|
||||
hit: TItem;
|
||||
attribute: keyof TItem | string[];
|
||||
};
|
1
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParseAlgoliaHitParams.js
generated
vendored
Normal file
1
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParseAlgoliaHitParams.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export {};
|
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParsedAttribute.d.ts
generated
vendored
Normal file
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParsedAttribute.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
export declare type ParsedAttribute = {
|
||||
value: string;
|
||||
isHighlighted: boolean;
|
||||
};
|
1
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParsedAttribute.js
generated
vendored
Normal file
1
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/ParsedAttribute.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export {};
|
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/SnippetedHit.d.ts
generated
vendored
Normal file
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/SnippetedHit.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { SnippetResult } from '../types';
|
||||
export declare type SnippetedHit<THit> = THit & {
|
||||
_snippetResult?: SnippetResult<THit>;
|
||||
};
|
1
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/SnippetedHit.js
generated
vendored
Normal file
1
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/SnippetedHit.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export {};
|
6
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/index.d.ts
generated
vendored
Normal file
6
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
export * from './HighlightedHit';
|
||||
export * from './parseAlgoliaHitHighlight';
|
||||
export * from './parseAlgoliaHitReverseHighlight';
|
||||
export * from './parseAlgoliaHitReverseSnippet';
|
||||
export * from './parseAlgoliaHitSnippet';
|
||||
export * from './SnippetedHit';
|
6
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/index.js
generated
vendored
Normal file
6
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/index.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
export * from './HighlightedHit';
|
||||
export * from './parseAlgoliaHitHighlight';
|
||||
export * from './parseAlgoliaHitReverseHighlight';
|
||||
export * from './parseAlgoliaHitReverseSnippet';
|
||||
export * from './parseAlgoliaHitSnippet';
|
||||
export * from './SnippetedHit';
|
2
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.d.ts
generated
vendored
Normal file
2
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
import { ParsedAttribute } from './ParsedAttribute';
|
||||
export declare function isPartHighlighted(parts: ParsedAttribute[], i: number): boolean;
|
30
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.js
generated
vendored
Normal file
30
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.js
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
var htmlEscapes = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
''': "'"
|
||||
};
|
||||
var hasAlphanumeric = new RegExp(/\w/i);
|
||||
var regexEscapedHtml = /&(amp|quot|lt|gt|#39);/g;
|
||||
var regexHasEscapedHtml = RegExp(regexEscapedHtml.source);
|
||||
|
||||
function unescape(value) {
|
||||
return value && regexHasEscapedHtml.test(value) ? value.replace(regexEscapedHtml, function (character) {
|
||||
return htmlEscapes[character];
|
||||
}) : value;
|
||||
}
|
||||
|
||||
export function isPartHighlighted(parts, i) {
|
||||
var _parts, _parts2;
|
||||
|
||||
var current = parts[i];
|
||||
var isNextHighlighted = ((_parts = parts[i + 1]) === null || _parts === void 0 ? void 0 : _parts.isHighlighted) || true;
|
||||
var isPreviousHighlighted = ((_parts2 = parts[i - 1]) === null || _parts2 === void 0 ? void 0 : _parts2.isHighlighted) || true;
|
||||
|
||||
if (!hasAlphanumeric.test(unescape(current.value)) && isPreviousHighlighted === isNextHighlighted) {
|
||||
return isPreviousHighlighted;
|
||||
}
|
||||
|
||||
return current.isHighlighted;
|
||||
}
|
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitHighlight.d.ts
generated
vendored
Normal file
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitHighlight.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { HighlightedHit } from './HighlightedHit';
|
||||
import { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';
|
||||
import { ParsedAttribute } from './ParsedAttribute';
|
||||
export declare function parseAlgoliaHitHighlight<THit extends HighlightedHit<unknown>>({ hit, attribute, }: ParseAlgoliaHitParams<THit>): ParsedAttribute[];
|
29
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitHighlight.js
generated
vendored
Normal file
29
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitHighlight.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
||||
|
||||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||
|
||||
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
||||
|
||||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
||||
|
||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
||||
|
||||
import { getAttributeValueByPath, warn } from '@algolia/autocomplete-shared';
|
||||
import { parseAttribute } from './parseAttribute';
|
||||
export function parseAlgoliaHitHighlight(_ref) {
|
||||
var hit = _ref.hit,
|
||||
attribute = _ref.attribute;
|
||||
var path = Array.isArray(attribute) ? attribute : [attribute];
|
||||
var highlightedValue = getAttributeValueByPath(hit, ['_highlightResult'].concat(_toConsumableArray(path), ['value']));
|
||||
|
||||
if (typeof highlightedValue !== 'string') {
|
||||
process.env.NODE_ENV !== 'production' ? warn(false, "The attribute \"".concat(path.join('.'), "\" described by the path ").concat(JSON.stringify(path), " does not exist on the hit. Did you set it in `attributesToHighlight`?") + '\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/') : void 0;
|
||||
highlightedValue = getAttributeValueByPath(hit, path) || '';
|
||||
}
|
||||
|
||||
return parseAttribute({
|
||||
highlightedValue: highlightedValue
|
||||
});
|
||||
}
|
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.d.ts
generated
vendored
Normal file
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { HighlightedHit } from './HighlightedHit';
|
||||
import { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';
|
||||
import { ParsedAttribute } from './ParsedAttribute';
|
||||
export declare function parseAlgoliaHitReverseHighlight<THit extends HighlightedHit<unknown>>(props: ParseAlgoliaHitParams<THit>): ParsedAttribute[];
|
5
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.js
generated
vendored
Normal file
5
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { parseAlgoliaHitHighlight } from './parseAlgoliaHitHighlight';
|
||||
import { reverseHighlightedParts } from './reverseHighlightedParts';
|
||||
export function parseAlgoliaHitReverseHighlight(props) {
|
||||
return reverseHighlightedParts(parseAlgoliaHitHighlight(props));
|
||||
}
|
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.d.ts
generated
vendored
Normal file
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';
|
||||
import { ParsedAttribute } from './ParsedAttribute';
|
||||
import { SnippetedHit } from './SnippetedHit';
|
||||
export declare function parseAlgoliaHitReverseSnippet<THit extends SnippetedHit<unknown>>(props: ParseAlgoliaHitParams<THit>): ParsedAttribute[];
|
5
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.js
generated
vendored
Normal file
5
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { parseAlgoliaHitSnippet } from './parseAlgoliaHitSnippet';
|
||||
import { reverseHighlightedParts } from './reverseHighlightedParts';
|
||||
export function parseAlgoliaHitReverseSnippet(props) {
|
||||
return reverseHighlightedParts(parseAlgoliaHitSnippet(props));
|
||||
}
|
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.d.ts
generated
vendored
Normal file
4
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { ParseAlgoliaHitParams } from './ParseAlgoliaHitParams';
|
||||
import { ParsedAttribute } from './ParsedAttribute';
|
||||
import { SnippetedHit } from './SnippetedHit';
|
||||
export declare function parseAlgoliaHitSnippet<THit extends SnippetedHit<unknown>>({ hit, attribute, }: ParseAlgoliaHitParams<THit>): ParsedAttribute[];
|
29
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.js
generated
vendored
Normal file
29
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
||||
|
||||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||
|
||||
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
||||
|
||||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
||||
|
||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
||||
|
||||
import { getAttributeValueByPath, warn } from '@algolia/autocomplete-shared';
|
||||
import { parseAttribute } from './parseAttribute';
|
||||
export function parseAlgoliaHitSnippet(_ref) {
|
||||
var hit = _ref.hit,
|
||||
attribute = _ref.attribute;
|
||||
var path = Array.isArray(attribute) ? attribute : [attribute];
|
||||
var highlightedValue = getAttributeValueByPath(hit, ['_snippetResult'].concat(_toConsumableArray(path), ['value']));
|
||||
|
||||
if (typeof highlightedValue !== 'string') {
|
||||
process.env.NODE_ENV !== 'production' ? warn(false, "The attribute \"".concat(path.join('.'), "\" described by the path ").concat(JSON.stringify(path), " does not exist on the hit. Did you set it in `attributesToSnippet`?") + '\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToSnippet/') : void 0;
|
||||
highlightedValue = getAttributeValueByPath(hit, path) || '';
|
||||
}
|
||||
|
||||
return parseAttribute({
|
||||
highlightedValue: highlightedValue
|
||||
});
|
||||
}
|
6
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.d.ts
generated
vendored
Normal file
6
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
import { ParsedAttribute } from './ParsedAttribute';
|
||||
declare type ParseAttributeParams = {
|
||||
highlightedValue: string;
|
||||
};
|
||||
export declare function parseAttribute({ highlightedValue, }: ParseAttributeParams): ParsedAttribute[];
|
||||
export {};
|
52
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.js
generated
vendored
Normal file
52
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.js
generated
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
import { HIGHLIGHT_PRE_TAG, HIGHLIGHT_POST_TAG } from '../constants';
|
||||
|
||||
/**
|
||||
* Creates a data structure that allows to concatenate similar highlighting
|
||||
* parts in a single value.
|
||||
*/
|
||||
function createAttributeSet() {
|
||||
var initialValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
||||
var value = initialValue;
|
||||
return {
|
||||
get: function get() {
|
||||
return value;
|
||||
},
|
||||
add: function add(part) {
|
||||
var lastPart = value[value.length - 1];
|
||||
|
||||
if ((lastPart === null || lastPart === void 0 ? void 0 : lastPart.isHighlighted) === part.isHighlighted) {
|
||||
value[value.length - 1] = {
|
||||
value: lastPart.value + part.value,
|
||||
isHighlighted: lastPart.isHighlighted
|
||||
};
|
||||
} else {
|
||||
value.push(part);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function parseAttribute(_ref) {
|
||||
var highlightedValue = _ref.highlightedValue;
|
||||
var preTagParts = highlightedValue.split(HIGHLIGHT_PRE_TAG);
|
||||
var firstValue = preTagParts.shift();
|
||||
var parts = createAttributeSet(firstValue ? [{
|
||||
value: firstValue,
|
||||
isHighlighted: false
|
||||
}] : []);
|
||||
preTagParts.forEach(function (part) {
|
||||
var postTagParts = part.split(HIGHLIGHT_POST_TAG);
|
||||
parts.add({
|
||||
value: postTagParts[0],
|
||||
isHighlighted: true
|
||||
});
|
||||
|
||||
if (postTagParts[1] !== '') {
|
||||
parts.add({
|
||||
value: postTagParts[1],
|
||||
isHighlighted: false
|
||||
});
|
||||
}
|
||||
});
|
||||
return parts.get();
|
||||
}
|
5
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.d.ts
generated
vendored
Normal file
5
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { ParsedAttribute } from './ParsedAttribute';
|
||||
export declare function reverseHighlightedParts(parts: ParsedAttribute[]): {
|
||||
isHighlighted: boolean;
|
||||
value: string;
|
||||
}[];
|
25
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.js
generated
vendored
Normal file
25
node_modules/@algolia/autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
import { isPartHighlighted } from './isPartHighlighted';
|
||||
export function reverseHighlightedParts(parts) {
|
||||
// We don't want to highlight the whole word when no parts match.
|
||||
if (!parts.some(function (part) {
|
||||
return part.isHighlighted;
|
||||
})) {
|
||||
return parts.map(function (part) {
|
||||
return _objectSpread(_objectSpread({}, part), {}, {
|
||||
isHighlighted: false
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return parts.map(function (part, i) {
|
||||
return _objectSpread(_objectSpread({}, part), {}, {
|
||||
isHighlighted: !isPartHighlighted(parts, i)
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue