init 3
This commit is contained in:
44
node_modules/embla-carousel-reactive-utils/cjs/embla-carousel-reactive-utils.cjs.js
generated
vendored
Normal file
44
node_modules/embla-carousel-reactive-utils/cjs/embla-carousel-reactive-utils.cjs.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
'use strict';
|
||||
|
||||
function isObject(subject) {
|
||||
return Object.prototype.toString.call(subject) === '[object Object]';
|
||||
}
|
||||
function isRecord(subject) {
|
||||
return isObject(subject) || Array.isArray(subject);
|
||||
}
|
||||
function canUseDOM() {
|
||||
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
||||
}
|
||||
function areOptionsEqual(optionsA, optionsB) {
|
||||
const optionsAKeys = Object.keys(optionsA);
|
||||
const optionsBKeys = Object.keys(optionsB);
|
||||
if (optionsAKeys.length !== optionsBKeys.length) return false;
|
||||
const breakpointsA = JSON.stringify(Object.keys(optionsA.breakpoints || {}));
|
||||
const breakpointsB = JSON.stringify(Object.keys(optionsB.breakpoints || {}));
|
||||
if (breakpointsA !== breakpointsB) return false;
|
||||
return optionsAKeys.every(key => {
|
||||
const valueA = optionsA[key];
|
||||
const valueB = optionsB[key];
|
||||
if (typeof valueA === 'function') return `${valueA}` === `${valueB}`;
|
||||
if (!isRecord(valueA) || !isRecord(valueB)) return valueA === valueB;
|
||||
return areOptionsEqual(valueA, valueB);
|
||||
});
|
||||
}
|
||||
function sortAndMapPluginToOptions(plugins) {
|
||||
return plugins.concat().sort((a, b) => a.name > b.name ? 1 : -1).map(plugin => plugin.options);
|
||||
}
|
||||
function arePluginsEqual(pluginsA, pluginsB) {
|
||||
if (pluginsA.length !== pluginsB.length) return false;
|
||||
const optionsA = sortAndMapPluginToOptions(pluginsA);
|
||||
const optionsB = sortAndMapPluginToOptions(pluginsB);
|
||||
return optionsA.every((optionA, index) => {
|
||||
const optionB = optionsB[index];
|
||||
return areOptionsEqual(optionA, optionB);
|
||||
});
|
||||
}
|
||||
|
||||
exports.areOptionsEqual = areOptionsEqual;
|
||||
exports.arePluginsEqual = arePluginsEqual;
|
||||
exports.canUseDOM = canUseDOM;
|
||||
exports.sortAndMapPluginToOptions = sortAndMapPluginToOptions;
|
||||
//# sourceMappingURL=embla-carousel-reactive-utils.cjs.js.map
|
||||
77
node_modules/embla-carousel-reactive-utils/package.json
generated
vendored
Normal file
77
node_modules/embla-carousel-reactive-utils/package.json
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"name": "embla-carousel-reactive-utils",
|
||||
"version": "8.6.0",
|
||||
"author": "David Jerleke",
|
||||
"description": "Reactive utilities for Embla Carousel",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/davidjerleke/embla-carousel"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/davidjerleke/embla-carousel/issues"
|
||||
},
|
||||
"homepage": "https://www.embla-carousel.com",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"slider",
|
||||
"carousel",
|
||||
"slideshow",
|
||||
"gallery",
|
||||
"lightweight",
|
||||
"touch",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"react",
|
||||
"vue",
|
||||
"svelte",
|
||||
"solid"
|
||||
],
|
||||
"main": "embla-carousel-reactive-utils.umd.js",
|
||||
"unpkg": "embla-carousel-reactive-utils.umd.js",
|
||||
"module": "./esm/embla-carousel-reactive-utils.esm.js",
|
||||
"types": "index.d.ts",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"embla-carousel-reactive-utils*",
|
||||
"components/**/*",
|
||||
"index.d.ts",
|
||||
"esm/**/*",
|
||||
"cjs/**/*"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "jest --config jest.config.js",
|
||||
"build": "rollup --bundleConfigAsCjs -c",
|
||||
"start": "rollup --bundleConfigAsCjs -c --watch --environment BUILD:development",
|
||||
"eslint:report": "eslint \"src/**/*.{js,tsx,ts}\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.6",
|
||||
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
||||
"@typescript-eslint/parser": "^6.9.0",
|
||||
"eslint": "^8.52.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"jest": "^29.5.0",
|
||||
"jest-environment-jsdom": "^29.5.0",
|
||||
"prettier": "2.8.8",
|
||||
"rollup": "^4.22.4",
|
||||
"ts-jest": "^29.1.1",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"embla-carousel": "8.6.0"
|
||||
},
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./esm/index.d.ts",
|
||||
"default": "./esm/embla-carousel-reactive-utils.esm.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./cjs/index.d.ts",
|
||||
"default": "./cjs/embla-carousel-reactive-utils.cjs.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user