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 +32 -4
- package/dist/chunk-efA98nb6.js +13 -0
- package/dist/components/WalkthroughViewer.d.ts +2 -1
- package/dist/html2canvas-UhSSH8Fo.js +4025 -0
- package/dist/index.es-RGorbUvo.js +5751 -0
- package/dist/jspdf.es.min-CjXCOyq2.js +18215 -0
- package/dist/purify.es-tFSw9bty.js +549 -0
- package/dist/stepsnap.js +378 -213
- package/dist/stepsnap.umd.cjs +88 -2
- package/dist/typeof-C-m3jXVA.js +11 -0
- package/dist/types.d.ts +1 -0
- package/package.json +62 -57
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/
|
|
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
|
-
- [
|
|
239
|
+
- [x] Publish to npm
|
|
220
240
|
- [ ] Keyboard navigation (← →)
|
|
221
241
|
- [ ] Fullscreen mode
|
|
222
242
|
- [ ] Export walkthrough as PDF / GIF
|
|
223
|
-
- [
|
|
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
|
-
|
|
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 {};
|