Skip to content

Commit

Permalink
package.json add "types": "./dist/index.d.ts" and default `--toc-…
Browse files Browse the repository at this point in the history
…overflow to auto` (#49)

* update deps

* package.json add field "types": "./dist/index.d.ts"

* change default --toc-overflow: auto scroll -> auto

* fix AssertionError: readme documents CSS variable 'overflow: var(--toc-overflow, auto scroll)' on line 253 which is not in Toc.svelte: expected '<script lang="ts">\n  import { onMoun…' to include 'overflow: var(--toc-overflow, auto sc…'

---------

Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>
  • Loading branch information
pre-commit-ci[bot] and janosh committed Oct 10, 2023
1 parent cc7f3d8 commit 532acf0
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_install_hook_types: [pre-commit, commit-msg]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-symlinks
Expand All @@ -28,14 +28,14 @@ repos:
- svelte

- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
stages: [commit, commit-msg]
args: [--ignore-words-list, falsy]

- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.49.0
rev: v8.51.0
hooks:
- id: eslint
types: [file]
Expand Down
47 changes: 24 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,33 @@
"update-coverage": "vitest tests/unit --run --coverage && npx istanbul-badges-readme"
},
"dependencies": {
"svelte": "^3.59.1"
"svelte": "^4.2.1"
},
"devDependencies": {
"@playwright/test": "1.35.1",
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/kit": "^1.20.4",
"@sveltejs/package": "^2.0.2",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"@vitest/coverage-v8": "^0.32.2",
"eslint": "^8.43.0",
"eslint-plugin-svelte": "^2.33.1",
"hastscript": "^7.2.0",
"@playwright/test": "1.38.1",
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/kit": "^1.25.2",
"@sveltejs/package": "^2.2.2",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
"@vitest/coverage-v8": "^0.34.6",
"eslint": "^8.51.0",
"eslint-plugin-svelte": "^2.34.0",
"hastscript": "^8.0.0",
"jsdom": "^22.1.0",
"mdsvex": "^0.10.6",
"mdsvexamples": "^0.3.3",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.1.0",
"svelte-check": "^3.4.3",
"mdsvex": "^0.11.0",
"mdsvexamples": "^0.4.1",
"prettier": "^3.0.3",
"prettier-plugin-svelte": "^3.0.3",
"rehype-autolink-headings": "^7.0.0",
"rehype-slug": "^6.0.0",
"svelte-check": "^3.5.2",
"svelte-preprocess": "^5.0.4",
"svelte-zoo": "^0.4.8",
"svelte2tsx": "^0.6.15",
"typescript": "5.1.3",
"vite": "^4.3.9",
"vitest": "^0.32.2"
"svelte-zoo": "^0.4.9",
"svelte2tsx": "^0.6.23",
"typescript": "5.2.2",
"vite": "^4.4.11",
"vitest": "^0.34.6"
},
"keywords": [
"svelte",
Expand All @@ -72,6 +72,7 @@
"default": "./dist/index.js"
}
},
"types": "./dist/index.d.ts",
"files": [
"dist"
]
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ The HTML structure of this component is
- `aside.toc`
- `z-index: var(--toc-z-index, 1)`: Applies on both mobile and desktop.
- `aside.toc > nav`
- `overflow: var(--toc-overflow, auto scroll)`
- `overflow: var(--toc-overflow, auto)`
- `min-width: var(--toc-min-width)`
- `max-width: var(--toc-desktop-max-width)`
- `width: var(--toc-width)`
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Toc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
z-index: var(--toc-z-index, 1);
}
:where(aside.toc > nav) {
overflow: var(--toc-overflow, auto scroll);
overflow: var(--toc-overflow, auto);
overscroll-behavior: contain;
max-height: var(--toc-max-height, 90vh);
padding: var(--toc-padding, 1em 1em 0);
Expand Down

0 comments on commit 532acf0

Please sign in to comment.