Skip to content

Commit

Permalink
Merge pull request #36 from mattjennings/svelte-5
Browse files Browse the repository at this point in the history
Svelte 5
  • Loading branch information
mattjennings authored Nov 3, 2024
2 parents f3d2535 + 20b21f6 commit 9186c5e
Show file tree
Hide file tree
Showing 86 changed files with 14,307 additions and 5,512 deletions.
23 changes: 0 additions & 23 deletions .eslintrc.cjs

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.DS_Store
node_modules
/.svelte-kit
/dist
/dist-docs
/package

.astro/
.vercel
.vercel_build_output
13 changes: 8 additions & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"useTabs": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"semi": false
"useTabs": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"semi": false,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ Add `Modals` somewhere in your app. This is where the modals will render.
</script>
<Modals>
<div
slot="backdrop"
class="backdrop"
on:click={closeModal}
/>
<div slot="backdrop" class="backdrop" on:click={closeModal} />
</Modals>
<style>
Expand All @@ -32,7 +28,7 @@ Add `Modals` somewhere in your app. This is where the modals will render.
bottom: 0;
right: 0;
left: 0;
background: rgba(0,0,0,0.50)
background: rgba(0, 0, 0, 0.5);
}
</style>
```
Expand Down Expand Up @@ -110,7 +106,7 @@ Open it

```html
<script>
import { openModal } from 'svelte-modals'
import { openModal } from 'svelte-modals/legacy'
import Modal from './Modal.svelte'
function handleClick() {
Expand Down
70 changes: 70 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// @ts-check
import { defineConfig } from 'astro/config'
import starlight from '@astrojs/starlight'
import liveCode from 'astro-live-code'

import svelte from '@astrojs/svelte'

// https://astro.build/config
export default defineConfig({
srcDir: 'docs',
outDir: 'dist-docs',
vite: {
resolve: {
alias: {
'svelte-modals/legacy': '/src/lib/legacy.svelte.ts',
'svelte-modals': '/src/lib/index.ts',
$lib: '/docs/lib'
},
dedupe: ['svelte-modals']
}
},
integrations: [
starlight({
title: 'Svelte Modals',
social: {
github: 'https://github.com/mattjennings/svelte-modals'
},
sidebar: [
{
label: 'Overview',
items: [
{ label: 'Getting Started', slug: 'overview/getting-started' },
{ label: 'How it works', slug: 'overview/how-it-works' }
]
},
{
label: 'Modal Components',
items: [
{ label: 'Props', slug: 'modal-components/props' },
{ label: 'Transitions', slug: 'modal-components/transitions' },
{ label: 'Snippets', slug: 'modal-components/snippets' },
{ label: 'Lazy loading', slug: 'modal-components/lazy-loading' },
{ label: 'Preventing close', slug: 'modal-components/preventing-close' }
]
},
{
label: 'API',
items: [
{ label: 'modals', slug: 'api/modals' },
{ label: '<Modals />', slug: 'api/modals-component' }
]
},
{
label: 'Migrations',
items: [{ label: 'v2', slug: 'migrations/v2' }]
}
],
customCss: ['./docs/styles.css']
}),
svelte({
preprocess: []
}),
liveCode({
layout: '/docs/lib/layouts/code/Code.astro',
defaultProps: {
'client:load': true
}
})
]
})
51 changes: 0 additions & 51 deletions dist/Modals.svelte

This file was deleted.

31 changes: 0 additions & 31 deletions dist/Modals.svelte.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions dist/index.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions dist/index.js

This file was deleted.

58 changes: 0 additions & 58 deletions dist/store.d.ts

This file was deleted.

Loading

0 comments on commit 9186c5e

Please sign in to comment.