stepsnap 0.1.4 → 0.2.1

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
@@ -153,6 +153,26 @@ StepSnap.unmount('#my-guide')
153
153
 
154
154
  ---
155
155
 
156
+ ## Web Component (framework-agnostic)
157
+
158
+ Use `<stepsnap-viewer>` on any webpage or framework:
159
+
160
+ ```html
161
+ <stepsnap-viewer
162
+ accent-color="#6366f1"
163
+ data='{"title":"My guide","steps":[{"id":"1","imageUrl":"https://...","caption":"Step 1"}]}'
164
+ ></stepsnap-viewer>
165
+ <script src="stepsnap-viewer-wc.iife.js"></script>
166
+ ```
167
+
168
+ Build the web component bundle:
169
+ ```bash
170
+ npm run build:wc
171
+ # outputs dist-wc/stepsnap-viewer-wc.iife.js
172
+ ```
173
+
174
+ ---
175
+
156
176
  ## API
157
177
 
158
178
  ### `<WalkthroughViewer />`
@@ -204,7 +224,7 @@ interface Annotation {
204
224
  ## Development
205
225
 
206
226
  ```bash
207
- git clone https://github.com/your-username/stepsnap
227
+ git clone https://github.com/m0rnlngstar/stepsnap
208
228
  cd stepsnap
209
229
  npm install
210
230
  npm run dev # demo app at http://localhost:5173
@@ -216,14 +236,22 @@ npm run build:embed # build standalone bundle → dist-embed/
216
236
 
217
237
  ## Roadmap
218
238
 
219
- - [ ] Publish to npm
239
+ - [x] Publish to npm
220
240
  - [ ] Keyboard navigation (← →)
221
241
  - [ ] Fullscreen mode
222
242
  - [ ] Export walkthrough as PDF / GIF
223
- - [ ] Web Component (`<stepsnap-viewer>`) for non-JS frameworks
243
+ - [x] Web Component (`<stepsnap-viewer>`) for non-JS frameworks
244
+
245
+ ---
246
+
247
+ ## Contributing
248
+
249
+ Contributions are welcome. Fork the repo, make your changes, and open a pull request — improvements get merged back into the project so everyone benefits.
224
250
 
225
251
  ---
226
252
 
227
253
  ## License
228
254
 
229
- MIT
255
+ [AGPL-3.0-only](./LICENSE)
256
+
257
+ Free to use in your apps and websites. If you distribute or offer this software as a service, you must publish your source code under the same license.
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), s = (e, i, o, s) => {
3
+ if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
4
+ get: ((e) => i[e]).bind(null, d),
5
+ enumerable: !(s = n(i, d)) || s.enumerable
6
+ });
7
+ return e;
8
+ }, c = (n, r, a) => (a = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule ? t(a, "default", {
9
+ value: n,
10
+ enumerable: !0
11
+ }) : a, n));
12
+ //#endregion
13
+ export { c as n, o as t };
@@ -2,6 +2,7 @@ import type { WalkthroughData } from '../types';
2
2
  interface Props {
3
3
  data: WalkthroughData;
4
4
  accentColor?: string;
5
+ maxHeight?: number;
5
6
  }
6
- export declare function WalkthroughViewer({ data, accentColor }: Props): import("react/jsx-runtime").JSX.Element | null;
7
+ export declare function WalkthroughViewer({ data, accentColor, maxHeight }: Props): import("react/jsx-runtime").JSX.Element | null;
7
8
  export {};