@winkintel/bootstrap-svelte 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -8
- package/dist/Carousel/carousel.svelte.js +3 -4
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,17 +1,41 @@
|
|
|
1
1
|
# Bootstrap Svelte
|
|
2
2
|
|
|
3
|
-
> Bootstrap components for Svelte 5 with TypeScript support.
|
|
3
|
+
> Bootstrap 5 components for Svelte 5 with TypeScript support.
|
|
4
4
|
|
|
5
|
-
Bootstrap Svelte provides ready-to-use, type-safe Bootstrap components
|
|
5
|
+
Bootstrap Svelte provides ready-to-use, type-safe Bootstrap components for Svelte 5 applications. It follows Bootstrap's design language and class conventions while exposing Svelte-native component APIs.
|
|
6
|
+
|
|
7
|
+
Use it when you want Bootstrap's familiar grid, utilities, and UI patterns in a Svelte app without copying Bootstrap markup by hand.
|
|
8
|
+
|
|
9
|
+
## Links
|
|
10
|
+
|
|
11
|
+
- npm: [`@winkintel/bootstrap-svelte`](https://www.npmjs.com/package/@winkintel/bootstrap-svelte)
|
|
12
|
+
- Repository: [`WinkIntel/bootstrap-svelte`](https://github.com/WinkIntel/bootstrap-svelte)
|
|
13
|
+
- Bootstrap: <https://getbootstrap.com/>
|
|
14
|
+
- Svelte: <https://svelte.dev/>
|
|
15
|
+
|
|
16
|
+
## Why this exists
|
|
17
|
+
|
|
18
|
+
Bootstrap is still a practical choice for many product, enterprise, and internal applications: it is familiar, well documented, stable, and easy for mixed frontend/backend teams to work with.
|
|
19
|
+
|
|
20
|
+
This package is for teams that specifically want Bootstrap in a Svelte 5 app, but would rather use maintained Svelte components than hand-roll Bootstrap's required markup and interactive behavior for every project.
|
|
21
|
+
|
|
22
|
+
It is not trying to replace Tailwind, shadcn-style workflows, or fully custom design systems.
|
|
6
23
|
|
|
7
24
|
## Features
|
|
8
25
|
|
|
9
26
|
- **Svelte 5 compatible** — built for current Svelte syntax and reactivity.
|
|
10
|
-
- **Bootstrap-oriented components** — implements common Bootstrap UI patterns.
|
|
11
27
|
- **TypeScript support** — component props and public utilities are typed.
|
|
28
|
+
- **Bootstrap-oriented APIs** — keeps components close to Bootstrap's naming and mental model.
|
|
12
29
|
- **Modular exports** — import only the components/utilities you need.
|
|
13
|
-
- **Responsive by default** —
|
|
14
|
-
- **
|
|
30
|
+
- **Responsive by default** — designed to work with Bootstrap's responsive CSS.
|
|
31
|
+
- **SvelteKit-friendly project structure** — the package-local showcase/docs app lives in `src/routes`.
|
|
32
|
+
- **No bundled Bootstrap CSS** — consumers control their own Bootstrap CSS/SCSS pipeline.
|
|
33
|
+
|
|
34
|
+
## Requirements
|
|
35
|
+
|
|
36
|
+
- Svelte 5
|
|
37
|
+
- Bootstrap 5 CSS supplied by the consuming application
|
|
38
|
+
- A modern Svelte/Vite/SvelteKit-style build pipeline
|
|
15
39
|
|
|
16
40
|
## Installation
|
|
17
41
|
|
|
@@ -21,6 +45,7 @@ pnpm add @winkintel/bootstrap-svelte bootstrap
|
|
|
21
45
|
# or
|
|
22
46
|
npm install @winkintel/bootstrap-svelte bootstrap
|
|
23
47
|
|
|
48
|
+
# or
|
|
24
49
|
yarn add @winkintel/bootstrap-svelte bootstrap
|
|
25
50
|
```
|
|
26
51
|
|
|
@@ -32,11 +57,11 @@ This package requires Svelte 5:
|
|
|
32
57
|
pnpm add svelte@^5.0.0
|
|
33
58
|
```
|
|
34
59
|
|
|
35
|
-
Bootstrap CSS is expected to be provided by the consuming application.
|
|
36
|
-
|
|
37
60
|
## Bootstrap CSS
|
|
38
61
|
|
|
39
|
-
|
|
62
|
+
Bootstrap CSS is expected to be provided by your application.
|
|
63
|
+
|
|
64
|
+
Import Bootstrap CSS in your app entry point or root layout:
|
|
40
65
|
|
|
41
66
|
```javascript
|
|
42
67
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
@@ -109,6 +134,7 @@ Or use Bootstrap SCSS from your app stylesheet/build pipeline:
|
|
|
109
134
|
- `Placeholder`
|
|
110
135
|
- `Progress`
|
|
111
136
|
- `Spinner`
|
|
137
|
+
- `Table`
|
|
112
138
|
|
|
113
139
|
### Navigation
|
|
114
140
|
|
|
@@ -116,6 +142,7 @@ Or use Bootstrap SCSS from your app stylesheet/build pipeline:
|
|
|
116
142
|
- `Nav`
|
|
117
143
|
- `Navbar`
|
|
118
144
|
- `Pagination`
|
|
145
|
+
- `Scrollspy`
|
|
119
146
|
- `Tab`
|
|
120
147
|
|
|
121
148
|
### Interactive
|
|
@@ -123,6 +150,7 @@ Or use Bootstrap SCSS from your app stylesheet/build pipeline:
|
|
|
123
150
|
- `Button`
|
|
124
151
|
- `ButtonGroup`
|
|
125
152
|
- `Carousel`
|
|
153
|
+
- `CloseButton`
|
|
126
154
|
- `Dropdown`
|
|
127
155
|
- `Modal`
|
|
128
156
|
- `Offcanvas`
|
|
@@ -138,6 +166,25 @@ Or use Bootstrap SCSS from your app stylesheet/build pipeline:
|
|
|
138
166
|
- `BreakpointListener`
|
|
139
167
|
- CSS/class/style utilities
|
|
140
168
|
|
|
169
|
+
## Notes for SvelteKit and SSR
|
|
170
|
+
|
|
171
|
+
Bootstrap Svelte is designed for Svelte 5 projects, including SvelteKit applications. Bootstrap CSS should be imported through the consuming app's normal CSS pipeline.
|
|
172
|
+
|
|
173
|
+
Interactive components are implemented as Svelte components rather than requiring consumers to wire Bootstrap's JavaScript snippets manually. If you find an SSR or hydration edge case, please open an issue with a minimal reproduction.
|
|
174
|
+
|
|
175
|
+
## Status and feedback
|
|
176
|
+
|
|
177
|
+
This package is published as `1.0.1`, but feedback from Svelte developers is still very welcome. Useful feedback includes:
|
|
178
|
+
|
|
179
|
+
- Component API ergonomics
|
|
180
|
+
- Svelte 5 idioms and runes compatibility
|
|
181
|
+
- Accessibility issues
|
|
182
|
+
- SvelteKit/SSR edge cases
|
|
183
|
+
- Missing Bootstrap components or variants
|
|
184
|
+
- README/docs gaps
|
|
185
|
+
|
|
186
|
+
Please use [GitHub Issues](https://github.com/WinkIntel/bootstrap-svelte/issues) for bugs, feature requests, and design/API feedback.
|
|
187
|
+
|
|
141
188
|
## Local development
|
|
142
189
|
|
|
143
190
|
```bash
|
|
@@ -66,8 +66,9 @@ export class CarouselRootState {
|
|
|
66
66
|
};
|
|
67
67
|
document.addEventListener('visibilitychange', this.#visibilityListener);
|
|
68
68
|
}
|
|
69
|
-
// Start autoplay immediately if ride='carousel', otherwise wait for user interaction
|
|
70
|
-
|
|
69
|
+
// Start autoplay immediately in the browser if ride='carousel', otherwise wait for user interaction.
|
|
70
|
+
// During static prerendering there is no browser timer API, so autoplay starts during hydration instead.
|
|
71
|
+
if (typeof window !== 'undefined' && this.#ride === 'carousel' && !this.#timeoutId) {
|
|
71
72
|
this.cycle();
|
|
72
73
|
}
|
|
73
74
|
}
|
|
@@ -277,7 +278,6 @@ export class CarouselRootState {
|
|
|
277
278
|
*/
|
|
278
279
|
cycle() {
|
|
279
280
|
if (typeof window === 'undefined') {
|
|
280
|
-
console.warn('[Carousel] Cycle called in non-browser environment, ignoring.');
|
|
281
281
|
return;
|
|
282
282
|
}
|
|
283
283
|
// Don't start cycling if we're hovered and pause='hover'
|
|
@@ -306,7 +306,6 @@ export class CarouselRootState {
|
|
|
306
306
|
}
|
|
307
307
|
pause() {
|
|
308
308
|
if (typeof window === 'undefined') {
|
|
309
|
-
console.warn('[Carousel] Pause called in non-browser environment, ignoring.');
|
|
310
309
|
return;
|
|
311
310
|
}
|
|
312
311
|
if (this.#timeoutId) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Wink, Inc.",
|
|
3
3
|
"name": "@winkintel/bootstrap-svelte",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"description": "Bootstrap components for Svelte 5 with TypeScript support.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"bnd": "pnpm build && pnpm dev",
|
|
19
19
|
"bnp": "pnpm build && pnpm preview",
|
|
20
20
|
"build": "vite build && pnpm prepack",
|
|
21
|
+
"build:site": "vite build",
|
|
21
22
|
"check-types": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
22
23
|
"check-types:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
23
24
|
"clean": "rimraf --glob --max-retries=10 --retry-delay=250 '{.svelte-kit,.turbo,.vercel,build,dist,node_modules,playwright-mcp,test-results}'",
|
|
@@ -25,8 +26,8 @@
|
|
|
25
26
|
"format": "prettier --write --ignore-path=.prettierignore $(git diff --name-only --diff-filter d --relative . && git ls-files --others --exclude-standard | sed \"s|^$(git rev-parse --show-prefix)||\")",
|
|
26
27
|
"format-all": "prettier --write --ignore-path=.prettierignore ./src",
|
|
27
28
|
"lint": "prettier --check ./src && eslint ./src",
|
|
28
|
-
"ncu:check": "ncu --target minor && ncu --target minor --cooldown 0d --filter \"@sveltejs/adapter-
|
|
29
|
-
"ncu:upgrade": "ncu --target minor -u && ncu --target minor --cooldown 0d -u --filter \"@sveltejs/adapter-
|
|
29
|
+
"ncu:check": "ncu --target minor && ncu --target minor --cooldown 0d --filter \"@sveltejs/adapter-static,@sveltejs/kit,@sveltejs/vite-plugin-svelte,svelte,svelte-check,svelte-preprocess\"",
|
|
30
|
+
"ncu:upgrade": "ncu --target minor -u && ncu --target minor --cooldown 0d -u --filter \"@sveltejs/adapter-static,@sveltejs/kit,@sveltejs/vite-plugin-svelte,svelte,svelte-check,svelte-preprocess\" && pnpm install",
|
|
30
31
|
"prepare": "svelte-kit sync || echo ''",
|
|
31
32
|
"prepack": "svelte-kit sync && svelte-package && publint",
|
|
32
33
|
"preview": "vite preview --port 4176",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@eslint/compat": "~2.1.0",
|
|
65
66
|
"@eslint/js": "~10.0.1",
|
|
66
|
-
"@sveltejs/adapter-
|
|
67
|
+
"@sveltejs/adapter-static": "^3.0.10",
|
|
67
68
|
"@sveltejs/kit": "~2.61.1",
|
|
68
69
|
"@sveltejs/package": "~2.5.7",
|
|
69
70
|
"@sveltejs/vite-plugin-svelte": "~7.1.2",
|