@ssgoi/vue 6.3.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.
package/README.md CHANGED
@@ -6,6 +6,16 @@ try this: [ssgoi.dev](https://ssgoi.dev)
6
6
 
7
7
  ![https://ssgoi.dev](https://ssgoi.dev/ssgoi.gif)
8
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
+
9
19
  ## What is SSGOI?
10
20
 
11
21
  SSGOI brings native app-like page transitions to the web. Transform your static page navigations into smooth, delightful experiences that users love.
@@ -35,7 +45,8 @@ pnpm add @ssgoi/vue
35
45
  ```vue
36
46
  <template>
37
47
  <Ssgoi :config="config">
38
- <div style="position: relative">
48
+ <!-- position: relative + z-index: 0 are required (the outgoing page is cloned with position:absolute) -->
49
+ <div style="position: relative; z-index: 0">
39
50
  <!-- Your app -->
40
51
  <RouterView />
41
52
  </div>
@@ -52,19 +63,15 @@ const config = {
52
63
  </script>
53
64
  ```
54
65
 
55
- ### 2. Wrap your pages
66
+ ### 2. Mark your pages
56
67
 
57
68
  ```vue
58
69
  <template>
59
- <SsgoiTransition id="/">
70
+ <main data-ssgoi-transition="/">
60
71
  <h1>Welcome</h1>
61
72
  <!-- Page content -->
62
- </SsgoiTransition>
73
+ </main>
63
74
  </template>
64
-
65
- <script setup>
66
- import { SsgoiTransition } from "@ssgoi/vue";
67
- </script>
68
75
  ```
69
76
 
70
77
  **That's it!** Your pages now transition smoothly with the configured effect.
@@ -98,7 +105,7 @@ The route helpers return path transition groups, so nested arrays are accepted i
98
105
  <!-- app.vue -->
99
106
  <template>
100
107
  <Ssgoi :config="config">
101
- <div style="position: relative; min-height: 100vh">
108
+ <div style="position: relative; z-index: 0; min-height: 100vh">
102
109
  <NuxtPage />
103
110
  </div>
104
111
  </Ssgoi>
@@ -115,14 +122,10 @@ const config = {
115
122
 
116
123
  <!-- pages/index.vue -->
117
124
  <template>
118
- <SsgoiTransition id="/">
125
+ <main data-ssgoi-transition="/">
119
126
  <!-- Your page content -->
120
- </SsgoiTransition>
127
+ </main>
121
128
  </template>
122
-
123
- <script setup>
124
- import { SsgoiTransition } from "@ssgoi/vue";
125
- </script>
126
129
  ```
127
130
 
128
131
  ## API Reference
@@ -144,30 +147,34 @@ Props:
144
147
  - `config` - Transition configuration object
145
148
  - `host` - Optional external playback host for debug tooling
146
149
 
147
- #### `<SsgoiTransition>`
150
+ #### `data-ssgoi-transition`
148
151
 
149
- Wrapper component for pages that should transition.
152
+ Attribute for pages that should transition. Set it on the page boundary element
153
+ inside `<Ssgoi>`.
150
154
 
151
155
  ```vue
152
- <SsgoiTransition id="/page-id">
156
+ <main data-ssgoi-transition="/page-id">
153
157
  <!-- children -->
154
- </SsgoiTransition>
158
+ </main>
155
159
  ```
156
160
 
157
- Props:
158
-
159
- - `id` - Unique identifier for the page (required)
160
-
161
161
  ## Built-in Transitions
162
162
 
163
163
  ### Page Transitions (`@ssgoi/vue/view-transitions`)
164
164
 
165
- - `fade()` - Smooth opacity transition
166
- - `scroll()` - Vertical scrolling (up/down)
167
- - `drill()` - Drill in/out effect (enter/exit)
168
- - `hero()` - Shared element transitions
169
- - `slide()` - Ordered horizontal page transitions
170
- - `zoom()` - Shared element zoom transitions
165
+ - `fade()` - Calm cross-fade. Safe default for unrelated pages
166
+ - `drill()` - iOS-style hierarchical navigation (list → detail)
167
+ - `slide()` - Horizontal push for tabs / sequential flows
168
+ - `scroll()` - Vertical page scroll for onboarding / paginated views
169
+ - `axis()` - Material/Flutter shared-axis swap for sibling/tab routes
170
+ - `sheet()` - Bottom sheet that slides up (modal-like flows)
171
+ - `hero()` - Shared element transition (matching `data-hero-enter-key` / `data-hero-exit-key`)
172
+ - `zoom()` - Card-to-detail expansion (matching `data-zoom-enter-key` / `data-zoom-exit-key`)
173
+ - `strip()` - 3D Y-axis perspective flip
174
+ - `blind()` - Window-blinds wipe reveal
175
+ - `film()` - Cinematic shrink + tile (gallery / lightbox)
176
+ - `rotate()` - Card flip between siblings
177
+ - `jaemin()` - Playful rotated zoom for special moments
171
178
 
172
179
  ## Typed Preset Configuration
173
180
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './types';
2
2
  export { default as Ssgoi } from './ssgoi.vue';
3
+ /** @deprecated Set `data-ssgoi-transition` directly on an element inside `<Ssgoi>` instead. */
3
4
  export { default as SsgoiTransition } from './ssgoi-transition.vue';
4
5
  export * from '@ssgoi/core';
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @deprecated Set `data-ssgoi-transition` directly on the page boundary
3
+ * element inside `<Ssgoi>` instead.
4
+ */
1
5
  interface Props {
2
6
  id: string;
3
7
  as?: keyof HTMLElementTagNameMap;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("./context.cjs"),i=require("@ssgoi/core/internal"),c=e.defineComponent({__name:"ssgoi",props:{config:{},host:{}},setup(o){const t=o,n=e.computed(()=>i.createSggoiTransitionContext(t.config,{host:t.host}));return s.provideSsgoi(n),(r,u)=>e.renderSlot(r.$slots,"default")}});exports.default=c;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("./context.cjs"),i=require("@ssgoi/core/internal"),l=e.defineComponent({__name:"ssgoi",props:{config:{},host:{}},setup(c){const s=c,t=e.computed(()=>i.createSggoiTransitionContext(s.config,{host:s.host}));a.provideSsgoi(t);const n=e.ref(null);let o;const r=()=>{o?.(),o=void 0,n.value&&(o=i.observeSsgoiTransitions(n.value,t.value))};return e.onMounted(r),e.watch(t,r),e.onBeforeUnmount(()=>o?.()),(u,d)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"root",ref:n,"data-ssgoi-root":"",style:{display:"contents"}},[e.renderSlot(u.$slots,"default")],512))}});exports.default=l;
@@ -9,11 +9,15 @@ declare function __VLS_template(): {
9
9
  slots: {
10
10
  default?(_: {}): any;
11
11
  };
12
- refs: {};
13
- rootEl: any;
12
+ refs: {
13
+ root: HTMLDivElement;
14
+ };
15
+ rootEl: HTMLDivElement;
14
16
  };
15
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
19
+ root: HTMLDivElement;
20
+ }, HTMLDivElement>;
17
21
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
22
  export default _default;
19
23
  type __VLS_WithTemplateSlots<T, S> = T & {
package/dist/ssgoi.vue.js CHANGED
@@ -1,19 +1,32 @@
1
- import { defineComponent as n, computed as s, renderSlot as i } from "vue";
2
- import { provideSsgoi as p } from "./context.js";
3
- import { createSggoiTransitionContext as c } from "@ssgoi/core/internal";
4
- const d = /* @__PURE__ */ n({
1
+ import { defineComponent as a, computed as c, ref as l, onMounted as p, watch as f, onBeforeUnmount as u, createElementBlock as m, openBlock as d, renderSlot as g } from "vue";
2
+ import { provideSsgoi as v } from "./context.js";
3
+ import { createSggoiTransitionContext as _, observeSsgoiTransitions as h } from "@ssgoi/core/internal";
4
+ const y = /* @__PURE__ */ a({
5
5
  __name: "ssgoi",
6
6
  props: {
7
7
  config: {},
8
8
  host: {}
9
9
  },
10
- setup(t) {
11
- const o = t, e = s(
12
- () => c(o.config, { host: o.host })
10
+ setup(r) {
11
+ const n = r, t = c(
12
+ () => _(n.config, { host: n.host })
13
13
  );
14
- return p(e), (r, m) => i(r.$slots, "default");
14
+ v(t);
15
+ const e = l(null);
16
+ let o;
17
+ const s = () => {
18
+ o?.(), o = void 0, e.value && (o = h(e.value, t.value));
19
+ };
20
+ return p(s), f(t, s), u(() => o?.()), (i, S) => (d(), m("div", {
21
+ ref_key: "root",
22
+ ref: e,
23
+ "data-ssgoi-root": "",
24
+ style: { display: "contents" }
25
+ }, [
26
+ g(i.$slots, "default")
27
+ ], 512));
15
28
  }
16
29
  });
17
30
  export {
18
- d as default
31
+ y as default
19
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssgoi/vue",
3
- "version": "6.3.0",
3
+ "version": "6.5.0",
4
4
  "description": "Vue bindings for SSGOI - Native app-like page transitions for Vue applications",
5
5
  "private": false,
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@ssgoi/core": "^6.3.0"
36
+ "@ssgoi/core": "^6.5.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "vue": "^3.5.0"