Skip to content

Commit

Permalink
Merge pull request #522 from davidjerleke/feature/#504
Browse files Browse the repository at this point in the history
🤫 Secret project
  • Loading branch information
davidjerleke authored Jul 8, 2023
2 parents 444199e + a375c68 commit 33a7e51
Show file tree
Hide file tree
Showing 472 changed files with 7,508 additions and 3,653 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ assignees: ''
- [ ] embla-carousel-autoplay
- [ ] embla-carousel-auto-height
- [ ] embla-carousel-class-names
- [ ] embla-carousel-docs (documentation website)
- [ ] embla-carousel-docs (documentation)
- [ ] embla-carousel-docs (generator)

### Embla Carousel version

Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ assignees: ''
- [ ] embla-carousel-autoplay
- [ ] embla-carousel-auto-height
- [ ] embla-carousel-class-names
- [ ] embla-carousel-docs (documentation website)
- [ ] embla-carousel-docs (documentation)
- [ ] embla-carousel-docs (generator)

### Is your feature request related to an issue?

Expand Down
4 changes: 2 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
printWidth: 80,
semi: false,
singleQuote: true,
trailingComma: 'all',
trailingComma: 'none',
tabWidth: 2,
useTabs: false,
useTabs: false
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"prettier.configPath": ""
}
14 changes: 7 additions & 7 deletions packages/embla-carousel-auto-height/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
sourceType: 'module'
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended'
],
rules: {
'no-debugger': 2,
Expand All @@ -19,10 +19,10 @@ module.exports = {
'error',
{
types: {
'{}': false,
'{}': false
},
extendDefaults: true,
},
],
},
extendDefaults: true
}
]
}
}
4 changes: 2 additions & 2 deletions packages/embla-carousel-auto-height/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
transform: {
'^.+\\.(t|j)sx?$': 'ts-jest',
'^.+\\.(t|j)sx?$': 'ts-jest'
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testEnvironment: 'jsdom',
testEnvironment: 'jsdom'
}
14 changes: 7 additions & 7 deletions packages/embla-carousel-auto-height/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
typescript,
resolve,
terser,
kebabToPascalCase,
kebabToPascalCase
} from '../../rollup.config'

export default [
Expand All @@ -20,14 +20,14 @@ export default [
globals: CONFIG_GLOBALS,
strict: true,
sourcemap: true,
exports: 'auto',
exports: 'auto'
},
{
file: `${packageJson.name}.esm.js`,
format: 'esm',
globals: CONFIG_GLOBALS,
strict: true,
sourcemap: true,
sourcemap: true
},
{
file: `${packageJson.name}.umd.js`,
Expand All @@ -36,10 +36,10 @@ export default [
strict: true,
sourcemap: false,
name: kebabToPascalCase(packageJson.name),
plugins: [terser()],
},
plugins: [terser()]
}
],
external: Object.keys(CONFIG_GLOBALS),
plugins: [resolve(), typescript(CONFIG_TYPESCRIPT), babel(CONFIG_BABEL)],
},
plugins: [resolve(), typescript(CONFIG_TYPESCRIPT), babel(CONFIG_BABEL)]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function AutoHeight(userOptions: AutoHeightOptionsType = {}): AutoHeightType {

function init(
emblaApiInstance: EmblaCarouselType,
optionsHandler: OptionsHandlerType,
optionsHandler: OptionsHandlerType
): void {
emblaApi = emblaApiInstance

Expand All @@ -36,7 +36,7 @@ function AutoHeight(userOptions: AutoHeightOptionsType = {}): AutoHeightType {
const {
options: { axis },
slidesInView,
slideRects,
slideRects
} = emblaApi.internalEngine()
if (axis === 'y') return

Expand All @@ -61,7 +61,7 @@ function AutoHeight(userOptions: AutoHeightOptionsType = {}): AutoHeightType {

function setContainerHeight(
_?: EmblaCarouselType,
evt?: EmblaEventType,
evt?: EmblaEventType
): void {
const height =
evt === 'destroy' ? options.destroyHeight : `${highestInView()}px`
Expand All @@ -72,7 +72,7 @@ function AutoHeight(userOptions: AutoHeightOptionsType = {}): AutoHeightType {
name: 'autoHeight',
options: userOptions,
init,
destroy,
destroy
}
return self
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export type OptionsType = CreateOptionsType<{
export const defaultOptions: OptionsType = {
active: true,
breakpoints: {},
destroyHeight: 'auto',
destroyHeight: 'auto'
}
14 changes: 7 additions & 7 deletions packages/embla-carousel-autoplay/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
sourceType: 'module'
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended'
],
rules: {
'no-debugger': 2,
Expand All @@ -19,10 +19,10 @@ module.exports = {
'error',
{
types: {
'{}': false,
'{}': false
},
extendDefaults: true,
},
],
},
extendDefaults: true
}
]
}
}
4 changes: 2 additions & 2 deletions packages/embla-carousel-autoplay/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
transform: {
'^.+\\.(t|j)sx?$': 'ts-jest',
'^.+\\.(t|j)sx?$': 'ts-jest'
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testEnvironment: 'jsdom',
testEnvironment: 'jsdom'
}
14 changes: 7 additions & 7 deletions packages/embla-carousel-autoplay/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
typescript,
resolve,
terser,
kebabToPascalCase,
kebabToPascalCase
} from '../../rollup.config'

export default [
Expand All @@ -20,14 +20,14 @@ export default [
globals: CONFIG_GLOBALS,
strict: true,
sourcemap: true,
exports: 'auto',
exports: 'auto'
},
{
file: `${packageJson.name}.esm.js`,
format: 'esm',
globals: CONFIG_GLOBALS,
strict: true,
sourcemap: true,
sourcemap: true
},
{
file: `${packageJson.name}.umd.js`,
Expand All @@ -36,10 +36,10 @@ export default [
strict: true,
sourcemap: false,
name: kebabToPascalCase(packageJson.name),
plugins: [terser()],
},
plugins: [terser()]
}
],
external: Object.keys(CONFIG_GLOBALS),
plugins: [resolve(), typescript(CONFIG_TYPESCRIPT), babel(CONFIG_BABEL)],
},
plugins: [resolve(), typescript(CONFIG_TYPESCRIPT), babel(CONFIG_BABEL)]
}
]
4 changes: 2 additions & 2 deletions packages/embla-carousel-autoplay/src/components/Autoplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function Autoplay(userOptions: AutoplayOptionsType = {}): AutoplayType {

function init(
emblaApiInstance: EmblaCarouselType,
optionsHandler: OptionsHandlerType,
optionsHandler: OptionsHandlerType
): void {
emblaApi = emblaApiInstance

Expand Down Expand Up @@ -110,7 +110,7 @@ function Autoplay(userOptions: AutoplayOptionsType = {}): AutoplayType {
destroy,
play,
stop,
reset,
reset
}
return self
}
Expand Down
2 changes: 1 addition & 1 deletion packages/embla-carousel-autoplay/src/components/Options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export const defaultOptions: OptionsType = {
stopOnInteraction: true,
stopOnMouseEnter: false,
stopOnLastSnap: false,
rootNode: null,
rootNode: null
}
14 changes: 7 additions & 7 deletions packages/embla-carousel-class-names/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
sourceType: 'module'
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended'
],
rules: {
'no-debugger': 2,
Expand All @@ -19,10 +19,10 @@ module.exports = {
'error',
{
types: {
'{}': false,
'{}': false
},
extendDefaults: true,
},
],
},
extendDefaults: true
}
]
}
}
4 changes: 2 additions & 2 deletions packages/embla-carousel-class-names/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
transform: {
'^.+\\.(t|j)sx?$': 'ts-jest',
'^.+\\.(t|j)sx?$': 'ts-jest'
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testEnvironment: 'jsdom',
testEnvironment: 'jsdom'
}
14 changes: 7 additions & 7 deletions packages/embla-carousel-class-names/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
typescript,
resolve,
terser,
kebabToPascalCase,
kebabToPascalCase
} from '../../rollup.config'

export default [
Expand All @@ -20,14 +20,14 @@ export default [
globals: CONFIG_GLOBALS,
strict: true,
sourcemap: true,
exports: 'auto',
exports: 'auto'
},
{
file: `${packageJson.name}.esm.js`,
format: 'esm',
globals: CONFIG_GLOBALS,
strict: true,
sourcemap: true,
sourcemap: true
},
{
file: `${packageJson.name}.umd.js`,
Expand All @@ -36,10 +36,10 @@ export default [
strict: true,
sourcemap: false,
name: kebabToPascalCase(packageJson.name),
plugins: [terser()],
},
plugins: [terser()]
}
],
external: Object.keys(CONFIG_GLOBALS),
plugins: [resolve(), typescript(CONFIG_TYPESCRIPT), babel(CONFIG_BABEL)],
},
plugins: [resolve(), typescript(CONFIG_TYPESCRIPT), babel(CONFIG_BABEL)]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function ClassNames(userOptions: ClassNamesOptionsType = {}): ClassNamesType {

function init(
emblaApiInstance: EmblaCarouselType,
optionsHandler: OptionsHandlerType,
optionsHandler: OptionsHandlerType
): void {
emblaApi = emblaApiInstance

Expand Down Expand Up @@ -58,7 +58,7 @@ function ClassNames(userOptions: ClassNamesOptionsType = {}): ClassNamesType {

function toggleDraggingClass(
_: EmblaCarouselType,
evt: EmblaEventType,
evt: EmblaEventType
): void {
if (evt === 'pointerDown') addClass(root, options.dragging)
else removeClass(root, options.dragging)
Expand All @@ -75,7 +75,7 @@ function ClassNames(userOptions: ClassNamesOptionsType = {}): ClassNamesType {
name: 'classNames',
options: userOptions,
init,
destroy,
destroy
}
return self
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export const defaultOptions: OptionsType = {
breakpoints: {},
selected: 'is-selected',
draggable: 'is-draggable',
dragging: 'is-dragging',
dragging: 'is-dragging'
}
Loading

0 comments on commit 33a7e51

Please sign in to comment.