This commit is contained in:
2025-05-09 05:30:08 +02:00
parent 7bb10e7df4
commit 73367bad9e
5322 changed files with 1266973 additions and 313 deletions

View File

@@ -0,0 +1,3 @@
export { Hfs } from "./hfs.js";
export { Path } from "./path.js";
export * from "./errors.js";

View File

@@ -0,0 +1,115 @@
/**
* @fileoverview Virtual file
* @author Nicholas C. Zakas
*/
"use strict";
//-----------------------------------------------------------------------------
// Type Definitions
//-----------------------------------------------------------------------------
/** @typedef {import("@eslint/core").File} File */
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Determines if a given value has a byte order mark (BOM).
* @param {string|Uint8Array} value The value to check.
* @returns {boolean} `true` if the value has a BOM, `false` otherwise.
*/
function hasUnicodeBOM(value) {
return typeof value === "string"
? value.charCodeAt(0) === 0xfeff
: value[0] === 0xef && value[1] === 0xbb && value[2] === 0xbf;
}
/**
* Strips Unicode BOM from the given value.
* @param {string|Uint8Array} value The value to remove the BOM from.
* @returns {string|Uint8Array} The stripped value.
*/
function stripUnicodeBOM(value) {
if (!hasUnicodeBOM(value)) {
return value;
}
if (typeof value === "string") {
/*
* Check Unicode BOM.
* In JavaScript, string data is stored as UTF-16, so BOM is 0xFEFF.
* http://www.ecma-international.org/ecma-262/6.0/#sec-unicode-format-control-characters
*/
return value.slice(1);
}
/*
* In a Uint8Array, the BOM is represented by three bytes: 0xEF, 0xBB, and 0xBF,
* so we can just remove the first three bytes.
*/
return value.slice(3);
}
//------------------------------------------------------------------------------
// Exports
//------------------------------------------------------------------------------
/**
* Represents a virtual file inside of ESLint.
* @implements {File}
*/
class VFile {
/**
* The file path including any processor-created virtual path.
* @type {string}
* @readonly
*/
path;
/**
* The file path on disk.
* @type {string}
* @readonly
*/
physicalPath;
/**
* The file contents.
* @type {string|Uint8Array}
* @readonly
*/
body;
/**
* The raw body of the file, including a BOM if present.
* @type {string|Uint8Array}
* @readonly
*/
rawBody;
/**
* Indicates whether the file has a byte order mark (BOM).
* @type {boolean}
* @readonly
*/
bom;
/**
* Creates a new instance.
* @param {string} path The file path.
* @param {string|Uint8Array} body The file contents.
* @param {Object} [options] Additional options.
* @param {string} [options.physicalPath] The file path on disk.
*/
constructor(path, body, { physicalPath } = {}) {
this.path = path;
this.physicalPath = physicalPath ?? path;
this.bom = hasUnicodeBOM(body);
this.body = stripUnicodeBOM(body);
this.rawBody = body;
}
}
module.exports = { VFile };

View File

@@ -0,0 +1,35 @@
// Note: this is the semver.org version of the spec that it implements
// Not necessarily the package version of this code.
const SEMVER_SPEC_VERSION = '2.0.0'
const MAX_LENGTH = 256
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
/* istanbul ignore next */ 9007199254740991
// Max safe segment length for coercion.
const MAX_SAFE_COMPONENT_LENGTH = 16
// Max safe length for a build identifier. The max length minus 6 characters for
// the shortest version with a build 0.0.0+BUILD.
const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
const RELEASE_TYPES = [
'major',
'premajor',
'minor',
'preminor',
'patch',
'prepatch',
'prerelease',
]
module.exports = {
MAX_LENGTH,
MAX_SAFE_COMPONENT_LENGTH,
MAX_SAFE_BUILD_LENGTH,
MAX_SAFE_INTEGER,
RELEASE_TYPES,
SEMVER_SPEC_VERSION,
FLAG_INCLUDE_PRERELEASE: 0b001,
FLAG_LOOSE: 0b010,
}

View File

@@ -0,0 +1,25 @@
'use strict'
let Container = require('./container')
class AtRule extends Container {
constructor(defaults) {
super(defaults)
this.type = 'atrule'
}
append(...children) {
if (!this.proxyOf.nodes) this.nodes = []
return super.append(...children)
}
prepend(...children) {
if (!this.proxyOf.nodes) this.nodes = []
return super.prepend(...children)
}
}
module.exports = AtRule
AtRule.default = AtRule
Container.registerAtRule(AtRule)

View File

@@ -0,0 +1,515 @@
export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;
export type PDFPageProxy = import("../src/display/api").PDFPageProxy;
export type PageViewport = import("../src/display/display_utils").PageViewport;
export type OptionalContentConfig = import("../src/display/optional_content_config").OptionalContentConfig;
export type EventBus = import("./event_utils").EventBus;
export type IDownloadManager = import("./interfaces").IDownloadManager;
export type IL10n = import("./interfaces").IL10n;
export type IPDFLinkService = import("./interfaces").IPDFLinkService;
export type PDFFindController = import("./pdf_find_controller").PDFFindController;
export type PDFScriptingManager = import("./pdf_scripting_manager").PDFScriptingManager;
export type PDFViewerOptions = {
/**
* - The container for the viewer element.
*/
container: HTMLDivElement;
/**
* - The viewer element.
*/
viewer?: HTMLDivElement | undefined;
/**
* - The application event bus.
*/
eventBus: EventBus;
/**
* - The navigation/linking service.
*/
linkService?: import("./interfaces").IPDFLinkService | undefined;
/**
* - The download manager
* component.
*/
downloadManager?: import("./interfaces").IDownloadManager | undefined;
/**
* - The find controller
* component.
*/
findController?: import("./pdf_find_controller").PDFFindController | undefined;
/**
* - The scripting manager
* component.
*/
scriptingManager?: import("./pdf_scripting_manager").PDFScriptingManager | undefined;
/**
* - The rendering queue object.
*/
renderingQueue?: PDFRenderingQueue | undefined;
/**
* - Removes the border shadow around
* the pages. The default value is `false`.
*/
removePageBorders?: boolean | undefined;
/**
* - Controls if the text layer used for
* selection and searching is created. The constants from {TextLayerMode}
* should be used. The default value is `TextLayerMode.ENABLE`.
*/
textLayerMode?: number | undefined;
/**
* - Controls if the annotation layer is
* created, and if interactive form elements or `AnnotationStorage`-data are
* being rendered. The constants from {@link AnnotationMode} should be used;
* see also {@link RenderParameters} and {@link GetOperatorListParameters}.
* The default value is `AnnotationMode.ENABLE_FORMS`.
*/
annotationMode?: number | undefined;
/**
* - Enables the creation and editing
* of new Annotations. The constants from {@link AnnotationEditorType} should
* be used. The default value is `AnnotationEditorType.NONE`.
*/
annotationEditorMode?: number | undefined;
/**
* - A comma separated list
* of colors to propose to highlight some text in the pdf.
*/
annotationEditorHighlightColors?: string | undefined;
/**
* - Path for image resources, mainly
* mainly for annotation icons. Include trailing slash.
*/
imageResourcesPath?: string | undefined;
/**
* - Enables automatic rotation of
* landscape pages upon printing. The default is `false`.
*/
enablePrintAutoRotate?: boolean | undefined;
/**
* - The maximum supported canvas size in
* total pixels, i.e. width * height. Use `-1` for no limit, or `0` for
* CSS-only zooming. The default value is 4096 * 8192 (32 mega-pixels).
*/
maxCanvasPixels?: number | undefined;
/**
* - Localization service.
*/
l10n?: import("./interfaces").IL10n | undefined;
/**
* - Enables PDF document permissions,
* when they exist. The default value is `false`.
*/
enablePermissions?: boolean | undefined;
/**
* - Overwrites background and foreground colors
* with user defined ones in order to improve readability in high contrast
* mode.
*/
pageColors?: Object | undefined;
/**
* - Enables hardware acceleration for
* rendering. The default value is `false`.
*/
enableHWA?: boolean | undefined;
};
export namespace PagesCountLimit {
let FORCE_SCROLL_MODE_PAGE: number;
let FORCE_LAZY_PAGE_INIT: number;
let PAUSE_EAGER_PAGE_INIT: number;
}
/**
* @typedef {Object} PDFViewerOptions
* @property {HTMLDivElement} container - The container for the viewer element.
* @property {HTMLDivElement} [viewer] - The viewer element.
* @property {EventBus} eventBus - The application event bus.
* @property {IPDFLinkService} [linkService] - The navigation/linking service.
* @property {IDownloadManager} [downloadManager] - The download manager
* component.
* @property {PDFFindController} [findController] - The find controller
* component.
* @property {PDFScriptingManager} [scriptingManager] - The scripting manager
* component.
* @property {PDFRenderingQueue} [renderingQueue] - The rendering queue object.
* @property {boolean} [removePageBorders] - Removes the border shadow around
* the pages. The default value is `false`.
* @property {number} [textLayerMode] - Controls if the text layer used for
* selection and searching is created. The constants from {TextLayerMode}
* should be used. The default value is `TextLayerMode.ENABLE`.
* @property {number} [annotationMode] - Controls if the annotation layer is
* created, and if interactive form elements or `AnnotationStorage`-data are
* being rendered. The constants from {@link AnnotationMode} should be used;
* see also {@link RenderParameters} and {@link GetOperatorListParameters}.
* The default value is `AnnotationMode.ENABLE_FORMS`.
* @property {number} [annotationEditorMode] - Enables the creation and editing
* of new Annotations. The constants from {@link AnnotationEditorType} should
* be used. The default value is `AnnotationEditorType.NONE`.
* @property {string} [annotationEditorHighlightColors] - A comma separated list
* of colors to propose to highlight some text in the pdf.
* @property {string} [imageResourcesPath] - Path for image resources, mainly
* mainly for annotation icons. Include trailing slash.
* @property {boolean} [enablePrintAutoRotate] - Enables automatic rotation of
* landscape pages upon printing. The default is `false`.
* @property {number} [maxCanvasPixels] - The maximum supported canvas size in
* total pixels, i.e. width * height. Use `-1` for no limit, or `0` for
* CSS-only zooming. The default value is 4096 * 8192 (32 mega-pixels).
* @property {IL10n} [l10n] - Localization service.
* @property {boolean} [enablePermissions] - Enables PDF document permissions,
* when they exist. The default value is `false`.
* @property {Object} [pageColors] - Overwrites background and foreground colors
* with user defined ones in order to improve readability in high contrast
* mode.
* @property {boolean} [enableHWA] - Enables hardware acceleration for
* rendering. The default value is `false`.
*/
export class PDFPageViewBuffer {
constructor(size: any);
push(view: any): void;
/**
* After calling resize, the size of the buffer will be `newSize`.
* The optional parameter `idsToKeep` is, if present, a Set of page-ids to
* push to the back of the buffer, delaying their destruction. The size of
* `idsToKeep` has no impact on the final size of the buffer; if `idsToKeep`
* is larger than `newSize`, some of those pages will be destroyed anyway.
*/
resize(newSize: any, idsToKeep?: null): void;
has(view: any): boolean;
[Symbol.iterator](): SetIterator<any>;
#private;
}
/**
* Simple viewer control to display PDF content/pages.
*/
export class PDFViewer {
/**
* @param {PDFViewerOptions} options
*/
constructor(options: PDFViewerOptions);
container: HTMLDivElement;
viewer: Element | null;
eventBus: import("./event_utils").EventBus;
linkService: import("./interfaces").IPDFLinkService | SimpleLinkService;
downloadManager: import("./interfaces").IDownloadManager | null;
findController: import("./pdf_find_controller").PDFFindController | null;
_scriptingManager: import("./pdf_scripting_manager").PDFScriptingManager | null;
imageResourcesPath: string;
enablePrintAutoRotate: boolean;
removePageBorders: boolean | undefined;
maxCanvasPixels: number | undefined;
l10n: import("./interfaces").IL10n | GenericL10n | undefined;
pageColors: Object | null;
defaultRenderingQueue: boolean;
renderingQueue: PDFRenderingQueue | undefined;
scroll: {
right: boolean;
down: boolean;
lastX: any;
lastY: any;
_eventHandler: (evt: any) => void;
};
presentationModeState: number;
get pagesCount(): number;
getPageView(index: any): any;
getCachedPageViews(): Set<any>;
/**
* @type {boolean} - True if all {PDFPageView} objects are initialized.
*/
get pageViewsReady(): boolean;
/**
* @type {boolean}
*/
get renderForms(): boolean;
/**
* @type {boolean}
*/
get enableScripting(): boolean;
/**
* @param {number} val - The page number.
*/
set currentPageNumber(val: number);
/**
* @type {number}
*/
get currentPageNumber(): number;
/**
* @returns {boolean} Whether the pageNumber is valid (within bounds).
* @private
*/
private _setCurrentPageNumber;
_currentPageNumber: any;
/**
* @param {string} val - The page label.
*/
set currentPageLabel(val: string);
/**
* @type {string|null} Returns the current page label, or `null` if no page
* labels exist.
*/
get currentPageLabel(): string | null;
/**
* @param {number} val - Scale of the pages in percents.
*/
set currentScale(val: number);
/**
* @type {number}
*/
get currentScale(): number;
/**
* @param val - The scale of the pages (in percent or predefined value).
*/
set currentScaleValue(val: string);
/**
* @type {string}
*/
get currentScaleValue(): string;
/**
* @param {number} rotation - The rotation of the pages (0, 90, 180, 270).
*/
set pagesRotation(rotation: number);
/**
* @type {number}
*/
get pagesRotation(): number;
_pagesRotation: any;
get firstPagePromise(): any;
get onePageRendered(): any;
get pagesPromise(): any;
get _layerProperties(): any;
getAllText(): Promise<string | null>;
/**
* @param {PDFDocumentProxy} pdfDocument
*/
setDocument(pdfDocument: PDFDocumentProxy): void;
pdfDocument: import("../src/display/api").PDFDocumentProxy | undefined;
_scrollMode: any;
_optionalContentConfigPromise: Promise<import("../src/display/optional_content_config").OptionalContentConfig> | null | undefined;
/**
* @param {Array|null} labels
*/
setPageLabels(labels: any[] | null): void;
_pageLabels: any[] | null | undefined;
_resetView(): void;
_pages: any[] | undefined;
_currentScale: any;
_currentScaleValue: any;
_location: {
pageNumber: any;
scale: any;
top: number;
left: number;
rotation: any;
pdfOpenParams: string;
} | null | undefined;
_firstPageCapability: any;
_onePageRenderedCapability: any;
_pagesCapability: any;
_previousScrollMode: any;
_spreadMode: any;
_scrollUpdate(): void;
/**
* @param {string} label - The page label.
* @returns {number|null} The page number corresponding to the page label,
* or `null` when no page labels exist and/or the input is invalid.
*/
pageLabelToPageNumber(label: string): number | null;
/**
* @typedef {Object} ScrollPageIntoViewParameters
* @property {number} pageNumber - The page number.
* @property {Array} [destArray] - The original PDF destination array, in the
* format: <page-ref> </XYZ|/FitXXX> <args..>
* @property {boolean} [allowNegativeOffset] - Allow negative page offsets.
* The default value is `false`.
* @property {boolean} [ignoreDestinationZoom] - Ignore the zoom argument in
* the destination array. The default value is `false`.
*/
/**
* Scrolls page into view.
* @param {ScrollPageIntoViewParameters} params
*/
scrollPageIntoView({ pageNumber, destArray, allowNegativeOffset, ignoreDestinationZoom, }: {
/**
* - The page number.
*/
pageNumber: number;
/**
* - The original PDF destination array, in the
* format: <page-ref> </XYZ|/FitXXX> <args..>
*/
destArray?: any[] | undefined;
/**
* - Allow negative page offsets.
* The default value is `false`.
*/
allowNegativeOffset?: boolean | undefined;
/**
* - Ignore the zoom argument in
* the destination array. The default value is `false`.
*/
ignoreDestinationZoom?: boolean | undefined;
}): void;
_updateLocation(firstPage: any): void;
update(): void;
containsElement(element: any): boolean;
focus(): void;
get _isContainerRtl(): boolean;
get isInPresentationMode(): boolean;
get isChangingPresentationMode(): boolean;
get isHorizontalScrollbarEnabled(): boolean;
get isVerticalScrollbarEnabled(): boolean;
_getVisiblePages(): Object;
cleanup(): void;
/**
* @private
*/
private _cancelRendering;
forceRendering(currentlyVisiblePages: any): boolean;
/**
* @type {boolean} Whether all pages of the PDF document have identical
* widths and heights.
*/
get hasEqualPageSizes(): boolean;
/**
* Returns sizes of the pages.
* @returns {Array} Array of objects with width/height/rotation fields.
*/
getPagesOverview(): any[];
/**
* @param {Promise<OptionalContentConfig>} promise - A promise that is
* resolved with an {@link OptionalContentConfig} instance.
*/
set optionalContentConfigPromise(promise: Promise<import("../src/display/optional_content_config").OptionalContentConfig>);
/**
* @type {Promise<OptionalContentConfig | null>}
*/
get optionalContentConfigPromise(): Promise<import("../src/display/optional_content_config").OptionalContentConfig | null>;
/**
* @param {number} mode - The direction in which the document pages should be
* laid out within the scrolling container.
* The constants from {ScrollMode} should be used.
*/
set scrollMode(mode: number);
/**
* @type {number} One of the values in {ScrollMode}.
*/
get scrollMode(): number;
_updateScrollMode(pageNumber?: null): void;
/**
* @param {number} mode - Group the pages in spreads, starting with odd- or
* even-number pages (unless `SpreadMode.NONE` is used).
* The constants from {SpreadMode} should be used.
*/
set spreadMode(mode: number);
/**
* @type {number} One of the values in {SpreadMode}.
*/
get spreadMode(): number;
_updateSpreadMode(pageNumber?: null): void;
/**
* @private
*/
private _getPageAdvance;
/**
* Go to the next page, taking scroll/spread-modes into account.
* @returns {boolean} Whether navigation occurred.
*/
nextPage(): boolean;
/**
* Go to the previous page, taking scroll/spread-modes into account.
* @returns {boolean} Whether navigation occurred.
*/
previousPage(): boolean;
/**
* @typedef {Object} ChangeScaleOptions
* @property {number} [drawingDelay]
* @property {number} [scaleFactor]
* @property {number} [steps]
* @property {Array} [origin] x and y coordinates of the scale
* transformation origin.
*/
/**
* Changes the current zoom level by the specified amount.
* @param {ChangeScaleOptions} [options]
*/
updateScale({ drawingDelay, scaleFactor, steps, origin }?: {
drawingDelay?: number | undefined;
scaleFactor?: number | undefined;
steps?: number | undefined;
/**
* x and y coordinates of the scale
* transformation origin.
*/
origin?: any[] | undefined;
} | undefined): void;
/**
* Increase the current zoom level one, or more, times.
* @param {ChangeScaleOptions} [options]
*/
increaseScale(options?: {
drawingDelay?: number | undefined;
scaleFactor?: number | undefined;
steps?: number | undefined;
/**
* x and y coordinates of the scale
* transformation origin.
*/
origin?: any[] | undefined;
} | undefined): void;
/**
* Decrease the current zoom level one, or more, times.
* @param {ChangeScaleOptions} [options]
*/
decreaseScale(options?: {
drawingDelay?: number | undefined;
scaleFactor?: number | undefined;
steps?: number | undefined;
/**
* x and y coordinates of the scale
* transformation origin.
*/
origin?: any[] | undefined;
} | undefined): void;
get containerTopLeft(): number[];
/**
* @typedef {Object} AnnotationEditorModeOptions
* @property {number} mode - The editor mode (none, FreeText, ink, ...).
* @property {string|null} [editId] - ID of the existing annotation to edit.
* @property {boolean} [isFromKeyboard] - True if the mode change is due to a
* keyboard action.
*/
/**
* @param {AnnotationEditorModeOptions} options
*/
set annotationEditorMode({ mode, editId, isFromKeyboard }: {
/**
* - The editor mode (none, FreeText, ink, ...).
*/
mode: number;
/**
* - ID of the existing annotation to edit.
*/
editId?: string | null | undefined;
/**
* - True if the mode change is due to a
* keyboard action.
*/
isFromKeyboard?: boolean | undefined;
});
get annotationEditorMode(): {
/**
* - The editor mode (none, FreeText, ink, ...).
*/
mode: number;
/**
* - ID of the existing annotation to edit.
*/
editId?: string | null | undefined;
/**
* - True if the mode change is due to a
* keyboard action.
*/
isFromKeyboard?: boolean | undefined;
};
refresh(noUpdate?: boolean, updateArgs?: any): void;
#private;
}
import { PDFRenderingQueue } from "./pdf_rendering_queue.js";
import { SimpleLinkService } from "./pdf_link_service.js";
import { GenericL10n } from "./genericl10n";

View File

@@ -0,0 +1,34 @@
/**
* @license React
* react-jsx-runtime.production.js
*
* 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.
*/
"use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxs = jsxProd;

View File

@@ -0,0 +1,50 @@
/**
* Wrap words to a specified length.
*/
export = wrap;
declare function wrap(str: string, options?: wrap.IOptions): string;
declare namespace wrap {
export interface IOptions {
/**
* The width of the text before wrapping to a new line.
* @default ´50´
*/
width?: number;
/**
* The string to use at the beginning of each line.
* @default ´ ´ (two spaces)
*/
indent?: string;
/**
* The string to use at the end of each line.
* @default ´\n´
*/
newline?: string;
/**
* An escape function to run on each line after splitting them.
* @default (str: string) => string;
*/
escape?: (str: string) => string;
/**
* Trim trailing whitespace from the returned string.
* This option is included since .trim() would also strip
* the leading indentation from the first line.
* @default true
*/
trim?: boolean;
/**
* Break a word between any two letters when the word is longer
* than the specified width.
* @default false
*/
cut?: boolean;
}
}

View File

@@ -0,0 +1,78 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.declare = declare;
exports.declarePreset = void 0;
const apiPolyfills = {
assertVersion: api => range => {
throwVersionError(range, api.version);
}
};
{
Object.assign(apiPolyfills, {
targets: () => () => {
return {};
},
assumption: () => () => {
return undefined;
},
addExternalDependency: () => () => {}
});
}
function declare(builder) {
return (api, options, dirname) => {
var _clonedApi2;
let clonedApi;
for (const name of Object.keys(apiPolyfills)) {
var _clonedApi;
if (api[name]) continue;
(_clonedApi = clonedApi) != null ? _clonedApi : clonedApi = copyApiObject(api);
clonedApi[name] = apiPolyfills[name](clonedApi);
}
return builder((_clonedApi2 = clonedApi) != null ? _clonedApi2 : api, options || {}, dirname);
};
}
const declarePreset = exports.declarePreset = declare;
function copyApiObject(api) {
let proto = null;
if (typeof api.version === "string" && /^7\./.test(api.version)) {
proto = Object.getPrototypeOf(api);
if (proto && (!hasOwnProperty.call(proto, "version") || !hasOwnProperty.call(proto, "transform") || !hasOwnProperty.call(proto, "template") || !hasOwnProperty.call(proto, "types"))) {
proto = null;
}
}
return Object.assign({}, proto, api);
}
function throwVersionError(range, version) {
if (typeof range === "number") {
if (!Number.isInteger(range)) {
throw new Error("Expected string or integer value.");
}
range = `^${range}.0.0-0`;
}
if (typeof range !== "string") {
throw new Error("Expected string or integer value.");
}
const limit = Error.stackTraceLimit;
if (typeof limit === "number" && limit < 25) {
Error.stackTraceLimit = 25;
}
let err;
if (version.slice(0, 2) === "7.") {
err = new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${version}". ` + `You'll need to update your @babel/core version.`);
} else {
err = new Error(`Requires Babel "${range}", but was loaded with "${version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`);
}
if (typeof limit === "number") {
Error.stackTraceLimit = limit;
}
throw Object.assign(err, {
code: "BABEL_VERSION_UNSUPPORTED",
version,
range
});
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"K D E F A mC","132":"B"},B:{"132":"C L M G N O P","260":"0 9 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I"},C:{"1":"1 2 3 4 5 6 7 8 nC LC J PB K D E F A B C L M G N O P QB RB SB qC rC","516":"0 9 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC"},D:{"1":"1 2 3 4 5 6 7 O P QB","2":"J PB K D E F A B C L M G N","132":"8 RB SB TB UB VB WB XB YB ZB aB bB cB dB","260":"0 9 eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC"},E:{"1":"K tC uC","2":"J PB sC SC","2052":"D E F A B C L M G vC wC TC FC GC xC yC zC UC VC HC 0C IC WC XC YC ZC aC 1C JC bC cC dC eC fC 2C KC gC hC iC jC 3C"},F:{"1":"0 1 2 3 4 5 6 7 8 F B C G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 4C 5C 6C 7C FC kC 8C GC"},G:{"2":"SC 9C lC","1025":"E AD BD CD DD ED FD GD HD ID JD KD LD MD ND OD PD QD RD SD UC VC HC TD IC WC XC YC ZC aC UD JC bC cC dC eC fC VD KC gC hC iC jC"},H:{"1025":"WD"},I:{"1":"LC J I XD YD ZD aD lC bD cD"},J:{"1":"D A"},K:{"1":"A B C H FC kC GC"},L:{"1":"I"},M:{"1":"EC"},N:{"2052":"A B"},O:{"1025":"HC"},P:{"1":"1 2 3 4 5 6 7 8 J dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD"},Q:{"260":"oD"},R:{"1":"pD"},S:{"516":"qD rD"}},B:1,C:"autocomplete attribute: on & off values",D:true};

View File

@@ -0,0 +1,7 @@
import { StructuralSharingOption, ValidateSelected } from './structuralSharing.cjs';
import { AnyRouter, RegisteredRouter, RouterState } from '@tanstack/router-core';
export interface UseLocationBaseOptions<TRouter extends AnyRouter, TSelected, TStructuralSharing extends boolean = boolean> {
select?: (state: RouterState<TRouter['routeTree']>['location']) => ValidateSelected<TRouter, TSelected, TStructuralSharing>;
}
export type UseLocationResult<TRouter extends AnyRouter, TSelected> = unknown extends TSelected ? RouterState<TRouter['routeTree']>['location'] : TSelected;
export declare function useLocation<TRouter extends AnyRouter = RegisteredRouter, TSelected = unknown, TStructuralSharing extends boolean = boolean>(opts?: UseLocationBaseOptions<TRouter, TSelected, TStructuralSharing> & StructuralSharingOption<TRouter, TSelected, TStructuralSharing>): UseLocationResult<TRouter, TSelected>;