Обновлены зависимости
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
.vscode
|
||||
.yarn
|
||||
.editorconfig
|
||||
.pnp.cjs
|
||||
.pnp.loader.mjs
|
||||
.prettierrc
|
||||
.yarnrc.yml
|
||||
prettier.config.js
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"printWidth": 120,
|
||||
"tabWidth": 4,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": false
|
||||
}
|
||||
6
.vscode/extensions.json
vendored
Normal file
6
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"arcanis.vscode-zipfs",
|
||||
"esbenp.prettier-vscode"
|
||||
]
|
||||
}
|
||||
7
.vscode/settings.json
vendored
Normal file
7
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"search.exclude": {
|
||||
"**/.yarn": true,
|
||||
"**/.pnp.*": true
|
||||
},
|
||||
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs"
|
||||
}
|
||||
942
.yarn/releases/yarn-4.11.0.cjs
vendored
Executable file
942
.yarn/releases/yarn-4.11.0.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
934
.yarn/releases/yarn-4.6.0.cjs
vendored
934
.yarn/releases/yarn-4.6.0.cjs
vendored
File diff suppressed because one or more lines are too long
5
.yarn/sdks/integrations.yml
vendored
Normal file
5
.yarn/sdks/integrations.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# This file is automatically generated by @yarnpkg/sdks.
|
||||
# Manual changes might be lost!
|
||||
|
||||
integrations:
|
||||
- vscode
|
||||
32
.yarn/sdks/prettier/bin/prettier.cjs
vendored
Executable file
32
.yarn/sdks/prettier/bin/prettier.cjs
vendored
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const {existsSync} = require(`fs`);
|
||||
const {createRequire, register} = require(`module`);
|
||||
const {resolve} = require(`path`);
|
||||
const {pathToFileURL} = require(`url`);
|
||||
|
||||
const relPnpApiPath = "../../../../.pnp.cjs";
|
||||
|
||||
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
||||
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);
|
||||
const absRequire = createRequire(absPnpApiPath);
|
||||
|
||||
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
||||
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
||||
|
||||
if (existsSync(absPnpApiPath)) {
|
||||
if (!process.versions.pnp) {
|
||||
// Setup the environment to be able to require prettier/bin/prettier.cjs
|
||||
require(absPnpApiPath).setup();
|
||||
if (isPnpLoaderEnabled && register) {
|
||||
register(pathToFileURL(absPnpLoaderPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const wrapWithUserWrapper = existsSync(absUserWrapperPath)
|
||||
? exports => absRequire(absUserWrapperPath)(exports)
|
||||
: exports => exports;
|
||||
|
||||
// Defer to the real prettier/bin/prettier.cjs your application uses
|
||||
module.exports = wrapWithUserWrapper(absRequire(`prettier/bin/prettier.cjs`));
|
||||
32
.yarn/sdks/prettier/index.cjs
vendored
Normal file
32
.yarn/sdks/prettier/index.cjs
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const {existsSync} = require(`fs`);
|
||||
const {createRequire, register} = require(`module`);
|
||||
const {resolve} = require(`path`);
|
||||
const {pathToFileURL} = require(`url`);
|
||||
|
||||
const relPnpApiPath = "../../../.pnp.cjs";
|
||||
|
||||
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
||||
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);
|
||||
const absRequire = createRequire(absPnpApiPath);
|
||||
|
||||
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
|
||||
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
|
||||
|
||||
if (existsSync(absPnpApiPath)) {
|
||||
if (!process.versions.pnp) {
|
||||
// Setup the environment to be able to require prettier
|
||||
require(absPnpApiPath).setup();
|
||||
if (isPnpLoaderEnabled && register) {
|
||||
register(pathToFileURL(absPnpLoaderPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const wrapWithUserWrapper = existsSync(absUserWrapperPath)
|
||||
? exports => absRequire(absUserWrapperPath)(exports)
|
||||
: exports => exports;
|
||||
|
||||
// Defer to the real prettier your application uses
|
||||
module.exports = wrapWithUserWrapper(absRequire(`prettier`));
|
||||
7
.yarn/sdks/prettier/package.json
vendored
Normal file
7
.yarn/sdks/prettier/package.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "prettier",
|
||||
"version": "3.6.2-sdk",
|
||||
"main": "./index.cjs",
|
||||
"type": "commonjs",
|
||||
"bin": "./bin/prettier.cjs"
|
||||
}
|
||||
@@ -2,4 +2,4 @@ compressionLevel: mixed
|
||||
|
||||
enableGlobalCache: false
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.6.0.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.11.0.cjs
|
||||
|
||||
37
index.js
37
index.js
@@ -195,7 +195,7 @@ const init = async (items = [], options = {}, index = 0) => {
|
||||
Загрузка YouTube-плеера...
|
||||
</div>
|
||||
</div>
|
||||
${ caption ? `<div class="advdominion-lg__caption">${caption}</div>` : '' }
|
||||
${caption ? `<div class="advdominion-lg__caption">${caption}</div>` : ''}
|
||||
</div>
|
||||
`;
|
||||
} else if (/(?:vkvideo\.ru|vk\.com)\/video/.test(item)) {
|
||||
@@ -209,16 +209,20 @@ const init = async (items = [], options = {}, index = 0) => {
|
||||
Ошибка при загрузке VK-плеера
|
||||
</div>
|
||||
</div>
|
||||
${ caption ? `<div class="advdominion-lg__caption">${caption}</div>` : '' }
|
||||
${caption ? `<div class="advdominion-lg__caption">${caption}</div>` : ''}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
return `
|
||||
<div class="advdominion-lg__item advdominion-lg__item_video swiper-slide">
|
||||
<div class="advdominion-lg__video-wrapper">
|
||||
<iframe class="advdominion-lg__video advdominion-lg__video_vk" src="https://vkvideo.ru/video_ext.php?oid=${videoId[1]}&id=${videoId[2]}&hd=4&js_api=1" allow="autoplay; encrypted-media; fullscreen; picture-in-picture; screen-wake-lock;"></iframe>
|
||||
<iframe
|
||||
class="advdominion-lg__video advdominion-lg__video_vk"
|
||||
src="https://vkvideo.ru/video_ext.php?oid=${videoId[1]}&id=${videoId[2]}&hd=4&js_api=1"
|
||||
allow="autoplay; encrypted-media; fullscreen; picture-in-picture; screen-wake-lock;">
|
||||
</iframe>
|
||||
</div>
|
||||
${ caption ? `<div class="advdominion-lg__caption">${caption}</div>` : '' }
|
||||
${caption ? `<div class="advdominion-lg__caption">${caption}</div>` : ''}
|
||||
</div>
|
||||
`;
|
||||
} else if (/rutube\.ru/.test(item)) {
|
||||
@@ -232,23 +236,27 @@ const init = async (items = [], options = {}, index = 0) => {
|
||||
Ошибка при загрузке RuTube-плеера
|
||||
</div>
|
||||
</div>
|
||||
${ caption ? `<div class="advdominion-lg__caption">${caption}</div>` : '' }
|
||||
${caption ? `<div class="advdominion-lg__caption">${caption}</div>` : ''}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
return `
|
||||
<div class="advdominion-lg__item advdominion-lg__item_video swiper-slide">
|
||||
<div class="advdominion-lg__video-wrapper">
|
||||
<iframe class="advdominion-lg__video advdominion-lg__video_rt" src="https://rutube.ru/play/embed/${videoId[1]}" allow="autoplay; encrypted-media; fullscreen; picture-in-picture; screen-wake-lock;"></iframe>
|
||||
<iframe
|
||||
class="advdominion-lg__video advdominion-lg__video_rt"
|
||||
src="https://rutube.ru/play/embed/${videoId[1]}"
|
||||
allow="autoplay; encrypted-media; fullscreen; picture-in-picture; screen-wake-lock;">
|
||||
</iframe>
|
||||
</div>
|
||||
${ caption ? `<div class="advdominion-lg__caption">${caption}</div>` : '' }
|
||||
${caption ? `<div class="advdominion-lg__caption">${caption}</div>` : ''}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
return `
|
||||
<div class="advdominion-lg__item swiper-slide">
|
||||
<img class="advdominion-lg__image" src="${item}" alt="" loading="lazy">
|
||||
${ caption ? `<div class="advdominion-lg__caption">${caption}</div>` : '' }
|
||||
${caption ? `<div class="advdominion-lg__caption">${caption}</div>` : ''}
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
@@ -342,11 +350,14 @@ const init = async (items = [], options = {}, index = 0) => {
|
||||
|
||||
const swiper = new Swiper(
|
||||
gallery.querySelector('.advdominion-lg__container'),
|
||||
Object.assign({
|
||||
modules: [...new Set([Navigation, Pagination, ...(options.swiper?.modules || [])])],
|
||||
init: false,
|
||||
initialSlide: index
|
||||
}, options.swiper),
|
||||
Object.assign(
|
||||
{
|
||||
modules: [...new Set([Navigation, Pagination, ...(options.swiper?.modules || [])])],
|
||||
init: false,
|
||||
initialSlide: index,
|
||||
},
|
||||
options.swiper,
|
||||
),
|
||||
);
|
||||
|
||||
swiper.on('init', function () {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "@advdominion/lightbox-gallery",
|
||||
"version": "3.2.0",
|
||||
"type": "module",
|
||||
"packageManager": "yarn@4.6.0",
|
||||
"packageManager": "yarn@4.11.0",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -13,6 +13,9 @@
|
||||
"@advdominion/get-scrollbar-width": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"swiper": "^11.0.0"
|
||||
"swiper": "^12.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.6.2"
|
||||
}
|
||||
}
|
||||
|
||||
5
prettier.config.js
Normal file
5
prettier.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
printWidth: 120,
|
||||
tabWidth: 4,
|
||||
singleQuote: true,
|
||||
};
|
||||
10
yarn.lock
10
yarn.lock
@@ -17,7 +17,17 @@ __metadata:
|
||||
resolution: "@advdominion/lightbox-gallery@workspace:."
|
||||
dependencies:
|
||||
"@advdominion/get-scrollbar-width": "npm:^2.0.0"
|
||||
prettier: "npm:^3.6.2"
|
||||
peerDependencies:
|
||||
swiper: ^11.0.0
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"prettier@npm:^3.6.2":
|
||||
version: 3.6.2
|
||||
resolution: "prettier@npm:3.6.2"
|
||||
bin:
|
||||
prettier: bin/prettier.cjs
|
||||
checksum: 10/1213691706bcef1371d16ef72773c8111106c3533b660b1cc8ec158bd109cdf1462804125f87f981f23c4a3dba053b6efafda30ab0114cc5b4a725606bb9ff26
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
Reference in New Issue
Block a user