update
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Node.js releases data
|
||||
|
||||
All data is located in `data` directory.
|
||||
|
||||
`data/processed` contains `envs.json` with node.js releases data preprocessed to be used by [Browserslist](https://github.com/ai/browserslist) and other projects. Each version in this file contains only necessary info: version, release date, LTS flag/name, and security flag.
|
||||
|
||||
`data/release-schedule` contains `release-schedule.json` with node.js releases date and end of life date.
|
||||
|
||||
## Installation
|
||||
```bash
|
||||
npm install node-releases
|
||||
```
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = _isNativeReflectConstruct;
|
||||
function _isNativeReflectConstruct() {
|
||||
try {
|
||||
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
||||
} catch (_) {}
|
||||
return (exports.default = _isNativeReflectConstruct = function () {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
//# sourceMappingURL=isNativeReflectConstruct.js.map
|
||||
@@ -0,0 +1,39 @@
|
||||
export type PDFPageProxy = import("../src/display/api").PDFPageProxy;
|
||||
export type AnnotationStorage = import("../src/display/annotation_storage").AnnotationStorage;
|
||||
export type PageViewport = import("../src/display/display_utils").PageViewport;
|
||||
export type IPDFLinkService = import("./interfaces").IPDFLinkService;
|
||||
export type XfaLayerBuilderOptions = {
|
||||
pdfPage: PDFPageProxy;
|
||||
annotationStorage?: import("../src/display/annotation_storage").AnnotationStorage | undefined;
|
||||
linkService: IPDFLinkService;
|
||||
xfaHtml?: Object | undefined;
|
||||
};
|
||||
/**
|
||||
* @typedef {Object} XfaLayerBuilderOptions
|
||||
* @property {PDFPageProxy} pdfPage
|
||||
* @property {AnnotationStorage} [annotationStorage]
|
||||
* @property {IPDFLinkService} linkService
|
||||
* @property {Object} [xfaHtml]
|
||||
*/
|
||||
export class XfaLayerBuilder {
|
||||
/**
|
||||
* @param {XfaLayerBuilderOptions} options
|
||||
*/
|
||||
constructor({ pdfPage, annotationStorage, linkService, xfaHtml, }: XfaLayerBuilderOptions);
|
||||
pdfPage: import("../src/display/api").PDFPageProxy;
|
||||
annotationStorage: import("../src/display/annotation_storage").AnnotationStorage;
|
||||
linkService: import("./interfaces").IPDFLinkService;
|
||||
xfaHtml: Object;
|
||||
div: HTMLDivElement | null;
|
||||
_cancelled: boolean;
|
||||
/**
|
||||
* @param {PageViewport} viewport
|
||||
* @param {string} intent (default value is 'display')
|
||||
* @returns {Promise<Object | void>} A promise that is resolved when rendering
|
||||
* of the XFA layer is complete. The first rendering will return an object
|
||||
* with a `textDivs` property that can be used with the TextHighlighter.
|
||||
*/
|
||||
render(viewport: PageViewport, intent?: string): Promise<Object | void>;
|
||||
cancel(): void;
|
||||
hide(): void;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"E F A B","2":"K D mC"},B:{"1":"0 9 C L M G N O P 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":"0 1 2 3 4 5 6 7 8 9 nC LC J PB K D E F A B C L M 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 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 qC rC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J PB K D E F A B C L M 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 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":"J PB K D E F A B C L M G sC SC tC uC 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:{"1":"E SC 9C lC 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:{"1":"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:{"1":"A B"},O:{"1":"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:{"1":"oD"},R:{"1":"pD"},S:{"1":"qD rD"}},B:2,C:"CSS Counters",D:true};
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "electron-to-chromium",
|
||||
"version": "1.5.132",
|
||||
"description": "Provides a list of electron-to-chromium version mappings",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"versions.js",
|
||||
"full-versions.js",
|
||||
"chromium-versions.js",
|
||||
"full-chromium-versions.js",
|
||||
"versions.json",
|
||||
"full-versions.json",
|
||||
"chromium-versions.json",
|
||||
"full-chromium-versions.json",
|
||||
"LICENSE"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "node build.mjs",
|
||||
"update": "node automated-update.js",
|
||||
"test": "nyc ava --verbose",
|
||||
"report": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kilian/electron-to-chromium/"
|
||||
},
|
||||
"keywords": [
|
||||
"electron",
|
||||
"chrome",
|
||||
"chromium",
|
||||
"browserslist",
|
||||
"browserlist"
|
||||
],
|
||||
"author": "Kilian Valkhof",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"ava": "^5.1.1",
|
||||
"codecov": "^3.8.2",
|
||||
"compare-versions": "^6.0.0-rc.1",
|
||||
"node-fetch": "^3.3.0",
|
||||
"nyc": "^15.1.0",
|
||||
"shelljs": "^0.8.5"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
name: Run npm Tests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [22, 23]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
Binary file not shown.
@@ -0,0 +1,181 @@
|
||||
/**
|
||||
* @fileoverview Rule to disallow use of Object.prototype builtins on objects
|
||||
* @author Andrew Levine
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Requirements
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
const astUtils = require("./utils/ast-utils");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Helpers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Returns true if the node or any of the objects
|
||||
* to the left of it in the member/call chain is optional.
|
||||
*
|
||||
* e.g. `a?.b`, `a?.b.c`, `a?.()`, `a()?.()`
|
||||
* @param {ASTNode} node The expression to check
|
||||
* @returns {boolean} `true` if there is a short-circuiting optional `?.`
|
||||
* in the same option chain to the left of this call or member expression,
|
||||
* or the node itself is an optional call or member `?.`.
|
||||
*/
|
||||
function isAfterOptional(node) {
|
||||
let leftNode;
|
||||
|
||||
if (node.type === "MemberExpression") {
|
||||
leftNode = node.object;
|
||||
} else if (node.type === "CallExpression") {
|
||||
leftNode = node.callee;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
if (node.optional) {
|
||||
return true;
|
||||
}
|
||||
return isAfterOptional(leftNode);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** @type {import('../shared/types').Rule} */
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: "problem",
|
||||
|
||||
docs: {
|
||||
description:
|
||||
"Disallow calling some `Object.prototype` methods directly on objects",
|
||||
recommended: true,
|
||||
url: "https://eslint.org/docs/latest/rules/no-prototype-builtins",
|
||||
},
|
||||
|
||||
hasSuggestions: true,
|
||||
|
||||
schema: [],
|
||||
|
||||
messages: {
|
||||
prototypeBuildIn:
|
||||
"Do not access Object.prototype method '{{prop}}' from target object.",
|
||||
callObjectPrototype: "Call Object.prototype.{{prop}} explicitly.",
|
||||
},
|
||||
},
|
||||
|
||||
create(context) {
|
||||
const DISALLOWED_PROPS = new Set([
|
||||
"hasOwnProperty",
|
||||
"isPrototypeOf",
|
||||
"propertyIsEnumerable",
|
||||
]);
|
||||
|
||||
/**
|
||||
* Reports if a disallowed property is used in a CallExpression
|
||||
* @param {ASTNode} node The CallExpression node.
|
||||
* @returns {void}
|
||||
*/
|
||||
function disallowBuiltIns(node) {
|
||||
const callee = astUtils.skipChainExpression(node.callee);
|
||||
|
||||
if (callee.type !== "MemberExpression") {
|
||||
return;
|
||||
}
|
||||
|
||||
const propName = astUtils.getStaticPropertyName(callee);
|
||||
|
||||
if (propName !== null && DISALLOWED_PROPS.has(propName)) {
|
||||
context.report({
|
||||
messageId: "prototypeBuildIn",
|
||||
loc: callee.property.loc,
|
||||
data: { prop: propName },
|
||||
node,
|
||||
suggest: [
|
||||
{
|
||||
messageId: "callObjectPrototype",
|
||||
data: { prop: propName },
|
||||
fix(fixer) {
|
||||
const sourceCode = context.sourceCode;
|
||||
|
||||
/*
|
||||
* A call after an optional chain (e.g. a?.b.hasOwnProperty(c))
|
||||
* must be fixed manually because the call can be short-circuited
|
||||
*/
|
||||
if (isAfterOptional(node)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* A call on a ChainExpression (e.g. (a?.hasOwnProperty)(c)) will trigger
|
||||
* no-unsafe-optional-chaining which should be fixed before this suggestion
|
||||
*/
|
||||
if (node.callee.type === "ChainExpression") {
|
||||
return null;
|
||||
}
|
||||
|
||||
const objectVariable =
|
||||
astUtils.getVariableByName(
|
||||
sourceCode.getScope(node),
|
||||
"Object",
|
||||
);
|
||||
|
||||
/*
|
||||
* We can't use Object if the global Object was shadowed,
|
||||
* or Object does not exist in the global scope for some reason
|
||||
*/
|
||||
if (
|
||||
!objectVariable ||
|
||||
objectVariable.scope.type !== "global" ||
|
||||
objectVariable.defs.length > 0
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let objectText = sourceCode.getText(
|
||||
callee.object,
|
||||
);
|
||||
|
||||
if (
|
||||
astUtils.getPrecedence(callee.object) <=
|
||||
astUtils.getPrecedence({
|
||||
type: "SequenceExpression",
|
||||
})
|
||||
) {
|
||||
objectText = `(${objectText})`;
|
||||
}
|
||||
|
||||
const openParenToken = sourceCode.getTokenAfter(
|
||||
node.callee,
|
||||
astUtils.isOpeningParenToken,
|
||||
);
|
||||
const isEmptyParameters =
|
||||
node.arguments.length === 0;
|
||||
const delim = isEmptyParameters ? "" : ", ";
|
||||
const fixes = [
|
||||
fixer.replaceText(
|
||||
callee,
|
||||
`Object.prototype.${propName}.call`,
|
||||
),
|
||||
fixer.insertTextAfter(
|
||||
openParenToken,
|
||||
objectText + delim,
|
||||
),
|
||||
];
|
||||
|
||||
return fixes;
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
CallExpression: disallowBuiltIns,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"K D E F A B mC"},B:{"2":"C L M G N O P 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","194":"q r s t","260":"0 9 u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I"},C:{"2":"0 1 2 3 4 5 6 7 8 9 nC LC J PB K D E F A B C L M 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 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 qC rC"},D:{"2":"1 2 3 4 5 6 7 8 J PB K D E F A B C L M 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 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","194":"q r s t","260":"0 9 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:{"2":"J PB K D E F A B C L M G sC SC tC uC 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","260":"gC hC iC jC 3C","772":"KC"},F:{"2":"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 4C 5C 6C 7C FC kC 8C GC","194":"c d e f g","260":"0 h i j k l m n o p q r s t u v w x y z"},G:{"2":"E SC 9C lC 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","260":"gC hC iC jC","772":"KC"},H:{"2":"WD"},I:{"2":"LC J XD YD ZD aD lC bD cD","260":"I"},J:{"2":"D A"},K:{"2":"A B C FC kC GC","260":"H"},L:{"260":"I"},M:{"2":"EC"},N:{"2":"A B"},O:{"2":"HC"},P:{"2":"1 2 J dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD","260":"3 4 5 6 7 8"},Q:{"2":"oD"},R:{"2":"pD"},S:{"2":"qD rD"}},B:5,C:"CSS Container Style Queries",D:true};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,19 @@
|
||||
# @babel/generator
|
||||
|
||||
> Turns an AST into code.
|
||||
|
||||
See our website [@babel/generator](https://babeljs.io/docs/babel-generator) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen) associated with this package.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/generator
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/generator --dev
|
||||
```
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,58 @@
|
||||
'use strict';
|
||||
const {Transform, PassThrough} = require('stream');
|
||||
const zlib = require('zlib');
|
||||
const mimicResponse = require('mimic-response');
|
||||
|
||||
module.exports = response => {
|
||||
const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase();
|
||||
|
||||
if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) {
|
||||
return response;
|
||||
}
|
||||
|
||||
// TODO: Remove this when targeting Node.js 12.
|
||||
const isBrotli = contentEncoding === 'br';
|
||||
if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') {
|
||||
response.destroy(new Error('Brotli is not supported on Node.js < 12'));
|
||||
return response;
|
||||
}
|
||||
|
||||
let isEmpty = true;
|
||||
|
||||
const checker = new Transform({
|
||||
transform(data, _encoding, callback) {
|
||||
isEmpty = false;
|
||||
|
||||
callback(null, data);
|
||||
},
|
||||
|
||||
flush(callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
const finalStream = new PassThrough({
|
||||
autoDestroy: false,
|
||||
destroy(error, callback) {
|
||||
response.destroy();
|
||||
|
||||
callback(error);
|
||||
}
|
||||
});
|
||||
|
||||
const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip();
|
||||
|
||||
decompressStream.once('error', error => {
|
||||
if (isEmpty && !response.readable) {
|
||||
finalStream.end();
|
||||
return;
|
||||
}
|
||||
|
||||
finalStream.destroy(error);
|
||||
});
|
||||
|
||||
mimicResponse(response, finalStream);
|
||||
response.pipe(checker).pipe(decompressStream).pipe(finalStream);
|
||||
|
||||
return finalStream;
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
'use strict'
|
||||
|
||||
let AtRule = require('./at-rule')
|
||||
let Comment = require('./comment')
|
||||
let Declaration = require('./declaration')
|
||||
let Input = require('./input')
|
||||
let PreviousMap = require('./previous-map')
|
||||
let Root = require('./root')
|
||||
let Rule = require('./rule')
|
||||
|
||||
function fromJSON(json, inputs) {
|
||||
if (Array.isArray(json)) return json.map(n => fromJSON(n))
|
||||
|
||||
let { inputs: ownInputs, ...defaults } = json
|
||||
if (ownInputs) {
|
||||
inputs = []
|
||||
for (let input of ownInputs) {
|
||||
let inputHydrated = { ...input, __proto__: Input.prototype }
|
||||
if (inputHydrated.map) {
|
||||
inputHydrated.map = {
|
||||
...inputHydrated.map,
|
||||
__proto__: PreviousMap.prototype
|
||||
}
|
||||
}
|
||||
inputs.push(inputHydrated)
|
||||
}
|
||||
}
|
||||
if (defaults.nodes) {
|
||||
defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))
|
||||
}
|
||||
if (defaults.source) {
|
||||
let { inputId, ...source } = defaults.source
|
||||
defaults.source = source
|
||||
if (inputId != null) {
|
||||
defaults.source.input = inputs[inputId]
|
||||
}
|
||||
}
|
||||
if (defaults.type === 'root') {
|
||||
return new Root(defaults)
|
||||
} else if (defaults.type === 'decl') {
|
||||
return new Declaration(defaults)
|
||||
} else if (defaults.type === 'rule') {
|
||||
return new Rule(defaults)
|
||||
} else if (defaults.type === 'comment') {
|
||||
return new Comment(defaults)
|
||||
} else if (defaults.type === 'atrule') {
|
||||
return new AtRule(defaults)
|
||||
} else {
|
||||
throw new Error('Unknown node type: ' + json.type)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = fromJSON
|
||||
fromJSON.default = fromJSON
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ScrollRestoration.cjs","sources":["../../src/ScrollRestoration.tsx"],"sourcesContent":["import {\n defaultGetScrollRestorationKey,\n getCssSelector,\n scrollRestorationCache,\n setupScrollRestoration,\n} from '@tanstack/router-core'\nimport { useRouter } from './useRouter'\nimport type {\n ParsedLocation,\n ScrollRestorationEntry,\n ScrollRestorationOptions,\n} from '@tanstack/router-core'\n\nfunction useScrollRestoration() {\n const router = useRouter()\n setupScrollRestoration(router, true)\n}\n\n/**\n * @deprecated use createRouter's `scrollRestoration` option instead\n */\nexport function ScrollRestoration(_props: ScrollRestorationOptions) {\n useScrollRestoration()\n\n if (process.env.NODE_ENV === 'development') {\n console.warn(\n \"The ScrollRestoration component is deprecated. Use createRouter's `scrollRestoration` option instead.\",\n )\n }\n\n return null\n}\n\nexport function useElementScrollRestoration(\n options: (\n | {\n id: string\n getElement?: () => Window | Element | undefined | null\n }\n | {\n id?: string\n getElement: () => Window | Element | undefined | null\n }\n ) & {\n getKey?: (location: ParsedLocation) => string\n },\n): ScrollRestorationEntry | undefined {\n useScrollRestoration()\n\n const router = useRouter()\n const getKey = options.getKey || defaultGetScrollRestorationKey\n\n let elementSelector = ''\n\n if (options.id) {\n elementSelector = `[data-scroll-restoration-id=\"${options.id}\"]`\n } else {\n const element = options.getElement?.()\n if (!element) {\n return\n }\n elementSelector =\n element instanceof Window ? 'window' : getCssSelector(element)\n }\n\n const restoreKey = getKey(router.latestLocation)\n const byKey = scrollRestorationCache.state[restoreKey]\n return byKey?.[elementSelector]\n}\n"],"names":["useRouter","setupScrollRestoration","defaultGetScrollRestorationKey","getCssSelector","scrollRestorationCache"],"mappings":";;;;AAaA,SAAS,uBAAuB;AAC9B,QAAM,SAASA,UAAAA,UAAU;AACzBC,aAAA,uBAAuB,QAAQ,IAAI;AACrC;AAKO,SAAS,kBAAkB,QAAkC;AAC7C,uBAAA;AAEjB,MAAA,QAAQ,IAAI,aAAa,eAAe;AAClC,YAAA;AAAA,MACN;AAAA,IACF;AAAA,EAAA;AAGK,SAAA;AACT;AAEO,SAAS,4BACd,SAYoC;;AACf,uBAAA;AAErB,QAAM,SAASD,UAAAA,UAAU;AACnB,QAAA,SAAS,QAAQ,UAAUE,WAAA;AAEjC,MAAI,kBAAkB;AAEtB,MAAI,QAAQ,IAAI;AACI,sBAAA,gCAAgC,QAAQ,EAAE;AAAA,EAAA,OACvD;AACC,UAAA,WAAU,aAAQ,eAAR;AAChB,QAAI,CAAC,SAAS;AACZ;AAAA,IAAA;AAEF,sBACE,mBAAmB,SAAS,WAAWC,WAAAA,eAAe,OAAO;AAAA,EAAA;AAG3D,QAAA,aAAa,OAAO,OAAO,cAAc;AACzC,QAAA,QAAQC,WAAAA,uBAAuB,MAAM,UAAU;AACrD,SAAO,+BAAQ;AACjB;;;"}
|
||||
@@ -0,0 +1,52 @@
|
||||
{{# def.definitions }}
|
||||
{{# def.errors }}
|
||||
{{# def.setupKeyword }}
|
||||
{{# def.setupNextLevel }}
|
||||
|
||||
var {{=$errs}} = errors;
|
||||
|
||||
{{? {{# def.nonEmptySchema:$schema }} }}
|
||||
{{
|
||||
$it.schema = $schema;
|
||||
$it.schemaPath = $schemaPath;
|
||||
$it.errSchemaPath = $errSchemaPath;
|
||||
}}
|
||||
|
||||
{{
|
||||
var $key = 'key' + $lvl
|
||||
, $idx = 'idx' + $lvl
|
||||
, $i = 'i' + $lvl
|
||||
, $invalidName = '\' + ' + $key + ' + \''
|
||||
, $dataNxt = $it.dataLevel = it.dataLevel + 1
|
||||
, $nextData = 'data' + $dataNxt
|
||||
, $dataProperties = 'dataProperties' + $lvl
|
||||
, $ownProperties = it.opts.ownProperties
|
||||
, $currentBaseId = it.baseId;
|
||||
}}
|
||||
|
||||
{{? $ownProperties }}
|
||||
var {{=$dataProperties}} = undefined;
|
||||
{{?}}
|
||||
{{# def.iterateProperties }}
|
||||
var startErrs{{=$lvl}} = errors;
|
||||
|
||||
{{ var $passData = $key; }}
|
||||
{{# def.setCompositeRule }}
|
||||
{{# def.generateSubschemaCode }}
|
||||
{{# def.optimizeValidate }}
|
||||
{{# def.resetCompositeRule }}
|
||||
|
||||
if (!{{=$nextValid}}) {
|
||||
for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}<errors; {{=$i}}++) {
|
||||
vErrors[{{=$i}}].propertyName = {{=$key}};
|
||||
}
|
||||
{{# def.extraError:'propertyNames' }}
|
||||
{{? $breakOnError }} break; {{?}}
|
||||
}
|
||||
}
|
||||
{{?}}
|
||||
|
||||
{{? $breakOnError }}
|
||||
{{= $closingBraces }}
|
||||
if ({{=$errs}} == errors) {
|
||||
{{?}}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "napi-build-utils",
|
||||
"version": "2.0.0",
|
||||
"description": "A set of utilities to assist developers of tools that build N-API native add-ons",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"doc": "jsdoc2md index.js >index.md",
|
||||
"test": "mocha test/ && npm run lint",
|
||||
"lint": "standard",
|
||||
"prepublishOnly": "npm run test"
|
||||
},
|
||||
"keywords": [
|
||||
"n-api",
|
||||
"prebuild",
|
||||
"prebuild-install"
|
||||
],
|
||||
"author": "Jim Schlight",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/inspiredware/napi-build-utils#readme",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/inspiredware/napi-build-utils.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/inspiredware/napi-build-utils/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^4.1.2",
|
||||
"jsdoc-to-markdown": "^4.0.1",
|
||||
"mocha": "^5.2.0",
|
||||
"standard": "^12.0.1"
|
||||
},
|
||||
"binary": {
|
||||
"note": "napi-build-tools is not an N-API module. This entry is for unit testing.",
|
||||
"napi_versions": [
|
||||
2,
|
||||
2,
|
||||
3,
|
||||
10
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"K D E F A B mC"},B:{"1":"0 9 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","2":"C L M G N O P 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"},C:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC","2":"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 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 qC rC","322":"0 9 m n o p q r s t u v w x y z AB BB"},D:{"1":"0 9 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","2":"1 2 3 4 5 6 7 8 J PB K D E F A B C L M 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 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","194":"k l m n"},E:{"1":"VC HC 0C IC WC XC YC ZC aC 1C JC bC cC dC eC fC 2C KC gC hC iC jC 3C","2":"J PB K D E F A B C L M G sC SC tC uC vC wC TC FC GC xC yC zC UC"},F:{"1":"0 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","2":"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 4C 5C 6C 7C FC kC 8C GC"},G:{"1":"VC HC TD IC WC XC YC ZC aC UD JC bC cC dC eC fC VD KC gC hC iC jC","2":"E SC 9C lC AD BD CD DD ED FD GD HD ID JD KD LD MD ND OD PD QD RD SD UC"},H:{"2":"WD"},I:{"1":"I","2":"LC J XD YD ZD aD lC bD cD"},J:{"2":"D A"},K:{"1":"H","2":"A B C FC kC GC"},L:{"1":"I"},M:{"1":"EC"},N:{"2":"A B"},O:{"2":"HC"},P:{"1":"1 2 3 4 5 6 7 8","2":"J dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD"},Q:{"2":"oD"},R:{"2":"pD"},S:{"2":"qD rD"}},B:5,C:":has() CSS relational pseudo-class",D:true};
|
||||
Reference in New Issue
Block a user