Add yet-another-react-lightbox package and update .gitignore to exclude node_modules
This commit is contained in:
5
frontend/node_modules/@svgr/plugin-jsx/dist/index.d.ts
generated
vendored
5
frontend/node_modules/@svgr/plugin-jsx/dist/index.d.ts
generated
vendored
@@ -1,5 +0,0 @@
|
||||
import { Plugin } from '@svgr/core';
|
||||
|
||||
declare const jsxPlugin: Plugin;
|
||||
|
||||
export { jsxPlugin as default };
|
||||
101
frontend/node_modules/@svgr/plugin-jsx/dist/index.js
generated
vendored
101
frontend/node_modules/@svgr/plugin-jsx/dist/index.js
generated
vendored
@@ -1,101 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var svgParser = require('svg-parser');
|
||||
var hastToBabelAst = require('@svgr/hast-util-to-babel-ast');
|
||||
var core = require('@babel/core');
|
||||
var svgrBabelPreset = require('@svgr/babel-preset');
|
||||
|
||||
var __defProp = Object.defineProperty;
|
||||
var __defProps = Object.defineProperties;
|
||||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||||
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __spreadValues = (a, b) => {
|
||||
for (var prop in b || (b = {}))
|
||||
if (__hasOwnProp.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
if (__getOwnPropSymbols)
|
||||
for (var prop of __getOwnPropSymbols(b)) {
|
||||
if (__propIsEnum.call(b, prop))
|
||||
__defNormalProp(a, prop, b[prop]);
|
||||
}
|
||||
return a;
|
||||
};
|
||||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
||||
const getJsxRuntimeOptions = (config) => {
|
||||
if (config.jsxRuntimeImport) {
|
||||
return {
|
||||
importSource: config.jsxRuntimeImport.source,
|
||||
jsxRuntimeImport: config.jsxRuntimeImport
|
||||
};
|
||||
}
|
||||
switch (config.jsxRuntime) {
|
||||
case null:
|
||||
case void 0:
|
||||
case "classic":
|
||||
return {
|
||||
jsxRuntime: "classic",
|
||||
importSource: "react",
|
||||
jsxRuntimeImport: { namespace: "React", source: "react" }
|
||||
};
|
||||
case "classic-preact":
|
||||
return {
|
||||
jsxRuntime: "classic",
|
||||
importSource: "preact/compat",
|
||||
jsxRuntimeImport: { specifiers: ["h"], source: "preact" }
|
||||
};
|
||||
case "automatic":
|
||||
return { jsxRuntime: "automatic" };
|
||||
default:
|
||||
throw new Error(`Unsupported "jsxRuntime" "${config.jsxRuntime}"`);
|
||||
}
|
||||
};
|
||||
const jsxPlugin = (code, config, state) => {
|
||||
const filePath = state.filePath || "unknown";
|
||||
const hastTree = svgParser.parse(code);
|
||||
const babelTree = hastToBabelAst(hastTree);
|
||||
const svgPresetOptions = __spreadProps(__spreadValues({
|
||||
ref: config.ref,
|
||||
titleProp: config.titleProp,
|
||||
descProp: config.descProp,
|
||||
expandProps: config.expandProps,
|
||||
dimensions: config.dimensions,
|
||||
icon: config.icon,
|
||||
native: config.native,
|
||||
svgProps: config.svgProps,
|
||||
replaceAttrValues: config.replaceAttrValues,
|
||||
typescript: config.typescript,
|
||||
template: config.template,
|
||||
memo: config.memo,
|
||||
exportType: config.exportType,
|
||||
namedExport: config.namedExport
|
||||
}, getJsxRuntimeOptions(config)), {
|
||||
state
|
||||
});
|
||||
const result = core.transformFromAstSync(babelTree, code, __spreadValues({
|
||||
caller: {
|
||||
name: "svgr"
|
||||
},
|
||||
presets: [
|
||||
core.createConfigItem([svgrBabelPreset, svgPresetOptions], {
|
||||
type: "preset"
|
||||
})
|
||||
],
|
||||
filename: filePath,
|
||||
babelrc: false,
|
||||
configFile: false,
|
||||
code: true,
|
||||
ast: false,
|
||||
// @ts-ignore
|
||||
inputSourceMap: false
|
||||
}, config.jsx && config.jsx.babelConfig));
|
||||
if (!(result == null ? void 0 : result.code)) {
|
||||
throw new Error(`Unable to generate SVG file`);
|
||||
}
|
||||
return result.code;
|
||||
};
|
||||
|
||||
module.exports = jsxPlugin;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@svgr/plugin-jsx/dist/index.js.map
generated
vendored
1
frontend/node_modules/@svgr/plugin-jsx/dist/index.js.map
generated
vendored
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { parse } from 'svg-parser'\nimport hastToBabelAst from '@svgr/hast-util-to-babel-ast'\nimport { transformFromAstSync, createConfigItem } from '@babel/core'\nimport svgrBabelPreset, {\n Options as SvgrPresetOptions,\n} from '@svgr/babel-preset'\nimport type { Plugin, Config } from '@svgr/core'\n\nconst getJsxRuntimeOptions = (config: Config): Partial<SvgrPresetOptions> => {\n if (config.jsxRuntimeImport) {\n return {\n importSource: config.jsxRuntimeImport.source,\n jsxRuntimeImport: config.jsxRuntimeImport,\n }\n }\n switch (config.jsxRuntime) {\n case null:\n case undefined:\n case 'classic':\n return {\n jsxRuntime: 'classic',\n importSource: 'react',\n jsxRuntimeImport: { namespace: 'React', source: 'react' },\n }\n case 'classic-preact':\n return {\n jsxRuntime: 'classic',\n importSource: 'preact/compat',\n jsxRuntimeImport: { specifiers: ['h'], source: 'preact' },\n }\n case 'automatic':\n return { jsxRuntime: 'automatic' }\n default:\n throw new Error(`Unsupported \"jsxRuntime\" \"${config.jsxRuntime}\"`)\n }\n}\n\nconst jsxPlugin: Plugin = (code, config, state) => {\n const filePath = state.filePath || 'unknown'\n const hastTree = parse(code)\n\n const babelTree = hastToBabelAst(hastTree)\n\n const svgPresetOptions: SvgrPresetOptions = {\n ref: config.ref,\n titleProp: config.titleProp,\n descProp: config.descProp,\n expandProps: config.expandProps,\n dimensions: config.dimensions,\n icon: config.icon,\n native: config.native,\n svgProps: config.svgProps,\n replaceAttrValues: config.replaceAttrValues,\n typescript: config.typescript,\n template: config.template,\n memo: config.memo,\n exportType: config.exportType,\n namedExport: config.namedExport,\n ...getJsxRuntimeOptions(config),\n state,\n }\n\n const result = transformFromAstSync(babelTree, code, {\n caller: {\n name: 'svgr',\n },\n presets: [\n createConfigItem([svgrBabelPreset, svgPresetOptions], {\n type: 'preset',\n }),\n ],\n filename: filePath,\n babelrc: false,\n configFile: false,\n code: true,\n ast: false,\n // @ts-ignore\n inputSourceMap: false,\n ...(config.jsx && config.jsx.babelConfig),\n })\n\n if (!result?.code) {\n throw new Error(`Unable to generate SVG file`)\n }\n\n return result.code\n}\n\nexport default jsxPlugin\n"],"names":["parse","transformFromAstSync","createConfigItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM,oBAAA,GAAuB,CAAC,MAA+C,KAAA;AAC3E,EAAA,IAAI,OAAO,gBAAkB,EAAA;AAC3B,IAAO,OAAA;AAAA,MACL,YAAA,EAAc,OAAO,gBAAiB,CAAA,MAAA;AAAA,MACtC,kBAAkB,MAAO,CAAA,gBAAA;AAAA,KAC3B,CAAA;AAAA,GACF;AACA,EAAA,QAAQ,OAAO,UAAY;AAAA,IACzB,KAAK,IAAA,CAAA;AAAA,IACL,KAAK,KAAA,CAAA,CAAA;AAAA,IACL,KAAK,SAAA;AACH,MAAO,OAAA;AAAA,QACL,UAAY,EAAA,SAAA;AAAA,QACZ,YAAc,EAAA,OAAA;AAAA,QACd,gBAAkB,EAAA,EAAE,SAAW,EAAA,OAAA,EAAS,QAAQ,OAAQ,EAAA;AAAA,OAC1D,CAAA;AAAA,IACF,KAAK,gBAAA;AACH,MAAO,OAAA;AAAA,QACL,UAAY,EAAA,SAAA;AAAA,QACZ,YAAc,EAAA,eAAA;AAAA,QACd,kBAAkB,EAAE,UAAA,EAAY,CAAC,GAAG,CAAA,EAAG,QAAQ,QAAS,EAAA;AAAA,OAC1D,CAAA;AAAA,IACF,KAAK,WAAA;AACH,MAAO,OAAA,EAAE,YAAY,WAAY,EAAA,CAAA;AAAA,IACnC;AACE,MAAA,MAAM,IAAI,KAAA,CAAM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