@ssgoi/solid 6.4.0 → 6.5.0

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.
Files changed (2) hide show
  1. package/README.md +219 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,219 @@
1
+ # @ssgoi/solid
2
+
3
+ Solid bindings for SSGOI - Native app-like page transitions for Solid and SolidStart.
4
+
5
+ try this: [ssgoi.dev](https://ssgoi.dev)
6
+
7
+ ![https://ssgoi.dev](https://ssgoi.dev/ssgoi.gif)
8
+
9
+ ## AI-Assisted Setup
10
+
11
+ Using Claude, Cursor, ChatGPT, or another AI assistant? Point it at:
12
+
13
+ ```
14
+ https://ssgoi.dev/llms.txt
15
+ ```
16
+
17
+ It has the full setup guide, every transition, the API, and troubleshooting — everything an agent needs to wire SSGOI into your app.
18
+
19
+ ## What is SSGOI?
20
+
21
+ SSGOI brings native app-like page transitions to the web. Transform your static page navigations into smooth, delightful experiences that users love.
22
+
23
+ ### ✨ Key Features
24
+
25
+ - **🌍 Works Everywhere** - Unlike the browser's View Transition API, SSGOI works in all modern browsers (Chrome, Firefox, Safari)
26
+ - **🚀 SSR Ready** - Perfect compatibility with SolidStart. No hydration issues, SEO-friendly
27
+ - **🎯 Use Your Router** - Keep your existing routing. `@solidjs/router` and SolidStart work seamlessly
28
+ - **💾 State Persistence** - Remembers animation state during navigation, even with browser back/forward
29
+ - **⚡ Solid Native** - Built on Solid's fine-grained reactivity, so change detection stays minimal
30
+
31
+ ## Installation
32
+
33
+ ```bash
34
+ npm install @ssgoi/solid
35
+ # or
36
+ yarn add @ssgoi/solid
37
+ # or
38
+ pnpm add @ssgoi/solid
39
+ ```
40
+
41
+ ## Quick Start
42
+
43
+ ### 1. Wrap your app
44
+
45
+ ```tsx
46
+ import { Ssgoi } from "@ssgoi/solid";
47
+ import { fade } from "@ssgoi/solid/view-transitions";
48
+
49
+ const config = {
50
+ transitions: [fade({ paths: ["/", "/about"] })],
51
+ };
52
+
53
+ export default function App(props) {
54
+ return (
55
+ <Ssgoi config={config}>
56
+ {/* position: relative + z-index: 0 are required (see below) */}
57
+ <div style="position: relative; z-index: 0; min-height: 100vh">
58
+ {props.children}
59
+ </div>
60
+ </Ssgoi>
61
+ );
62
+ }
63
+ ```
64
+
65
+ ### 2. Mark your pages
66
+
67
+ Set `data-ssgoi-transition` on each page boundary element inside `<Ssgoi>`:
68
+
69
+ ```tsx
70
+ export default function Home() {
71
+ return (
72
+ <main data-ssgoi-transition="/">
73
+ <h1>Welcome</h1>
74
+ {/* Page content */}
75
+ </main>
76
+ );
77
+ }
78
+ ```
79
+
80
+ **That's it!** Your pages now transition smoothly with the configured effect.
81
+
82
+ > **Why `position: relative; z-index: 0`?** When a page leaves, SSGOI clones it back into the DOM with `position: absolute` so it can animate out while the new page animates in. The clone needs a positioned, stacking-context ancestor or it jumps / falls behind the background. Add `overflow-x-clip` too if you use horizontal transitions (`slide`, `drill`).
83
+
84
+ ## Advanced Transitions
85
+
86
+ Each transition factory returns a path-transition group. Drop the results straight into `config.transitions` — nested arrays are flattened automatically:
87
+
88
+ ```tsx
89
+ import { Ssgoi } from "@ssgoi/solid";
90
+ import { fade, drill, zoom } from "@ssgoi/solid/view-transitions";
91
+
92
+ const config = {
93
+ transitions: [
94
+ // Calm cross-fade between tabs
95
+ fade({ paths: ["/", "/about"] }),
96
+
97
+ // iOS-style drill-in when entering a detail page
98
+ drill({ enter: "/products/*", exit: "/products" }),
99
+
100
+ // Card-to-detail zoom (needs matching data-zoom-*-key)
101
+ zoom({ paths: ["/gallery", "/photo/*"], type: "expand" }),
102
+ ],
103
+ };
104
+ ```
105
+
106
+ Transitions come in three shapes:
107
+
108
+ - **`{ paths }`** — symmetric: every pair animates with the same physics (`fade`, `hero`, `zoom`, `blind`, `film`, `rotate`, `strip`, `jaemin`)
109
+ - **`{ enter, exit, type? }`** — directional: enter and exit get different physics (`drill`, `sheet`)
110
+ - **`{ paths }`** — ordered: path order decides forward / back direction (`slide`, `scroll`, `axis`)
111
+
112
+ ## SolidStart Example
113
+
114
+ Wrap your root component once, then mark each route:
115
+
116
+ ```tsx
117
+ // src/app.tsx
118
+ import { Router } from "@solidjs/router";
119
+ import { FileRoutes } from "@solidjs/start/router";
120
+ import { Ssgoi } from "@ssgoi/solid";
121
+ import { scroll } from "@ssgoi/solid/view-transitions";
122
+
123
+ const config = {
124
+ transitions: [scroll({ paths: ["/", "/about", "/products"] })],
125
+ };
126
+
127
+ export default function App() {
128
+ return (
129
+ <Router
130
+ root={(props) => (
131
+ <Ssgoi config={config}>
132
+ <div style="position: relative; z-index: 0; min-height: 100vh">
133
+ {props.children}
134
+ </div>
135
+ </Ssgoi>
136
+ )}
137
+ >
138
+ <FileRoutes />
139
+ </Router>
140
+ );
141
+ }
142
+ ```
143
+
144
+ ```tsx
145
+ // src/routes/index.tsx
146
+ export default function Index() {
147
+ return <main data-ssgoi-transition="/">{/* Your page content */}</main>;
148
+ }
149
+ ```
150
+
151
+ ## API Reference
152
+
153
+ ### `<Ssgoi>`
154
+
155
+ The provider component that manages transition context.
156
+
157
+ ```tsx
158
+ <Ssgoi config={ssgoiConfig}>{/* children */}</Ssgoi>
159
+ ```
160
+
161
+ Props:
162
+
163
+ - `config: SsgoiConfig` - transition configuration object
164
+ - `host?: HostAnimation` - optional external playback host for debug tooling
165
+
166
+ ### `data-ssgoi-transition`
167
+
168
+ Attribute for pages that should transition. Set it on the page boundary element inside `<Ssgoi>` — the value (commonly the route path) uniquely identifies the view.
169
+
170
+ ```tsx
171
+ <main data-ssgoi-transition="/page-id">{/* children */}</main>
172
+ ```
173
+
174
+ ## Built-in Transitions
175
+
176
+ Import from `@ssgoi/solid/view-transitions`:
177
+
178
+ - `fade()` - Calm cross-fade. Safe default for unrelated pages
179
+ - `drill()` - iOS-style hierarchical navigation (list → detail)
180
+ - `slide()` - Horizontal push for tabs / sequential flows
181
+ - `scroll()` - Vertical page scroll for onboarding / paginated views
182
+ - `axis()` - Material/Flutter shared-axis swap for sibling/tab routes
183
+ - `sheet()` - Bottom sheet that slides up (modal-like flows)
184
+ - `hero()` - Shared element transition (matching `data-hero-enter-key` / `data-hero-exit-key`)
185
+ - `zoom()` - Card-to-detail expansion (matching `data-zoom-enter-key` / `data-zoom-exit-key`)
186
+ - `strip()` - 3D Y-axis perspective flip
187
+ - `blind()` - Window-blinds wipe reveal
188
+ - `film()` - Cinematic shrink + tile (gallery / lightbox)
189
+ - `rotate()` - Card flip between siblings
190
+ - `jaemin()` - Playful rotated zoom for special moments
191
+
192
+ ## TypeScript Support
193
+
194
+ SSGOI is written in TypeScript and provides full type definitions:
195
+
196
+ ```typescript
197
+ import type { SsgoiConfig } from "@ssgoi/solid";
198
+
199
+ const config: SsgoiConfig = {
200
+ // Full type safety
201
+ };
202
+ ```
203
+
204
+ ## Browser Support
205
+
206
+ - Chrome/Edge 88+
207
+ - Firefox 78+
208
+ - Safari 14+
209
+ - All modern mobile browsers
210
+
211
+ ## License
212
+
213
+ MIT © [MeurSyphus](https://github.com/meursyphus)
214
+
215
+ ## Links
216
+
217
+ - [Documentation](https://ssgoi.dev)
218
+ - [GitHub](https://github.com/meursyphus/ssgoi)
219
+ - [Issues](https://github.com/meursyphus/ssgoi/issues)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssgoi/solid",
3
- "version": "6.4.0",
3
+ "version": "6.5.0",
4
4
  "description": "Solid.js bindings for SSGOI - Native app-like page transitions for Solid applications",
5
5
  "private": false,
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@ssgoi/core": "^6.4.0"
36
+ "@ssgoi/core": "^6.5.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@eslint/js": "^9.30.1",