@swipefindercom/finder-sdk 1.0.0 → 1.0.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/LICENSE +22 -0
- package/README.md +108 -0
- package/dist/finder-sdk-react.cjs.js +1 -0
- package/dist/finder-sdk-react.esm.js +11569 -0
- package/dist/finder-sdk.esm.js +31715 -410
- package/dist/finder-sdk.umd.js +1 -1
- package/dist/types/components/CardList/CardList.d.ts +1 -0
- package/dist/types/components/CardList/CardList.d.ts.map +1 -0
- package/dist/types/components/CardWrapper/CardWrapper.d.ts +1 -0
- package/dist/types/components/CardWrapper/CardWrapper.d.ts.map +1 -0
- package/dist/types/components/CardWrapper/ImageWrapper/ImageWrapper.d.ts +1 -0
- package/dist/types/components/CardWrapper/ImageWrapper/ImageWrapper.d.ts.map +1 -0
- package/dist/types/components/CardWrapper/VideoWrapper/VideoWrapper.d.ts +1 -0
- package/dist/types/components/CardWrapper/VideoWrapper/VideoWrapper.d.ts.map +1 -0
- package/dist/types/components/CardsCounter/CardsCounter.d.ts +1 -0
- package/dist/types/components/CardsCounter/CardsCounter.d.ts.map +1 -0
- package/dist/types/components/Drawer/Drawer.d.ts +1 -0
- package/dist/types/components/Drawer/Drawer.d.ts.map +1 -0
- package/dist/types/components/FiltersButton/FiltersButton.d.ts +1 -0
- package/dist/types/components/FiltersButton/FiltersButton.d.ts.map +1 -0
- package/dist/types/components/FiltersDrawer/FiltersDrawer.d.ts +1 -0
- package/dist/types/components/FiltersDrawer/FiltersDrawer.d.ts.map +1 -0
- package/dist/types/components/HistoryButton/HistoryButton.d.ts +1 -0
- package/dist/types/components/HistoryButton/HistoryButton.d.ts.map +1 -0
- package/dist/types/components/HistoryDrawer/HistoryDrawer.d.ts +1 -0
- package/dist/types/components/HistoryDrawer/HistoryDrawer.d.ts.map +1 -0
- package/dist/types/components/HorizontalCtaTooltip/HorizontalCtaTooltip.d.ts +1 -0
- package/dist/types/components/HorizontalCtaTooltip/HorizontalCtaTooltip.d.ts.map +1 -0
- package/dist/types/components/Logo/Logo.d.ts +1 -0
- package/dist/types/components/Logo/Logo.d.ts.map +1 -0
- package/dist/types/components/Positioned/Positioned.d.ts +1 -0
- package/dist/types/components/Positioned/Positioned.d.ts.map +1 -0
- package/dist/types/components/SideArrowsButtons/SideArrowsButtons.d.ts +1 -0
- package/dist/types/components/SideArrowsButtons/SideArrowsButtons.d.ts.map +1 -0
- package/dist/types/components/SideEmojisButtons/SideEmojisButtons.d.ts +1 -0
- package/dist/types/components/SideEmojisButtons/SideEmojisButtons.d.ts.map +1 -0
- package/dist/types/components/Summary/Summary.d.ts +1 -0
- package/dist/types/components/Summary/Summary.d.ts.map +1 -0
- package/dist/types/components/SwipeTutorialOverlay/SwipeTutorialOverlay.d.ts +1 -0
- package/dist/types/components/SwipeTutorialOverlay/SwipeTutorialOverlay.d.ts.map +1 -0
- package/dist/types/components/SwipeableCard/SwipeableCard.d.ts +1 -0
- package/dist/types/components/SwipeableCard/SwipeableCard.d.ts.map +1 -0
- package/dist/types/components/SwipeableFeed/SwipeableFeed.d.ts +1 -0
- package/dist/types/components/SwipeableFeed/SwipeableFeed.d.ts.map +1 -0
- package/dist/types/components/VerticalCtaTooltip/VerticalCtaTooltip.d.ts +1 -0
- package/dist/types/components/VerticalCtaTooltip/VerticalCtaTooltip.d.ts.map +1 -0
- package/dist/types/components/VerticalEmojisButtons/VerticalEmojisButtons.d.ts +1 -0
- package/dist/types/components/VerticalEmojisButtons/VerticalEmojisButtons.d.ts.map +1 -0
- package/dist/types/components/VolumeControl/VolumeControl.d.ts +1 -0
- package/dist/types/components/VolumeControl/VolumeControl.d.ts.map +1 -0
- package/dist/types/containers/InteractiveFeed/InteractiveFeed.d.ts +2 -1
- package/dist/types/containers/InteractiveFeed/InteractiveFeed.d.ts.map +1 -0
- package/dist/types/containers/MainBootstrap/MainBootstrap.d.ts +1 -0
- package/dist/types/containers/MainBootstrap/MainBootstrap.d.ts.map +1 -0
- package/dist/types/containers/SwippingJourney/SwippingJourney.d.ts +1 -0
- package/dist/types/containers/SwippingJourney/SwippingJourney.d.ts.map +1 -0
- package/dist/types/contexts/AppStateContext.d.ts +1 -0
- package/dist/types/contexts/AppStateContext.d.ts.map +1 -0
- package/dist/types/contexts/DataContext.d.ts +1 -0
- package/dist/types/contexts/DataContext.d.ts.map +1 -0
- package/dist/types/contexts/MonitoringContext.d.ts +1 -0
- package/dist/types/contexts/MonitoringContext.d.ts.map +1 -0
- package/dist/types/contexts/UIContext.d.ts +1 -0
- package/dist/types/contexts/UIContext.d.ts.map +1 -0
- package/dist/types/contexts/index.d.ts +1 -0
- package/dist/types/contexts/index.d.ts.map +1 -0
- package/dist/types/guards/cardType.guard.d.ts +1 -0
- package/dist/types/guards/cardType.guard.d.ts.map +1 -0
- package/dist/types/sdk/index.d.ts +1 -2
- package/dist/types/sdk/index.d.ts.map +1 -0
- package/dist/types/sdk/react.d.ts +34 -0
- package/dist/types/sdk/react.d.ts.map +1 -0
- package/dist/types/services/DataService.d.ts +1 -0
- package/dist/types/services/DataService.d.ts.map +1 -0
- package/dist/types/services/MonitorService.d.ts +1 -0
- package/dist/types/services/MonitorService.d.ts.map +1 -0
- package/dist/types/types/FeedUIConfig.d.ts +1 -0
- package/dist/types/types/FeedUIConfig.d.ts.map +1 -0
- package/dist/types/types/api.d.ts +1 -0
- package/dist/types/types/api.d.ts.map +1 -0
- package/dist/types/types/card.d.ts +1 -0
- package/dist/types/types/card.d.ts.map +1 -0
- package/dist/types/types/category.d.ts +1 -0
- package/dist/types/types/category.d.ts.map +1 -0
- package/dist/types/types/swipe.d.ts +1 -0
- package/dist/types/types/swipe.d.ts.map +1 -0
- package/package.json +59 -17
- package/dist/style.css +0 -1
- package/dist/types/sdk/SwipeFinderSDK.d.ts +0 -28
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SwipeFinder
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# @swipefindercom/finder-sdk
|
|
2
|
+
|
|
3
|
+
Embed interactive swipeable card feeds on any website or React app.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @swipefindercom/finder-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Vanilla JS / Any framework (SDK)
|
|
14
|
+
|
|
15
|
+
The SDK build bundles everything (including React) so it works anywhere — plain HTML, Vue, Angular, etc.
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<div id="swipefinder"></div>
|
|
19
|
+
|
|
20
|
+
<script type="module">
|
|
21
|
+
import { initSwipeFinder } from '@swipefindercom/finder-sdk';
|
|
22
|
+
|
|
23
|
+
const cleanup = initSwipeFinder({
|
|
24
|
+
backendUrl: 'https://api.swipefinder.com',
|
|
25
|
+
finderId: 'your-finder-id',
|
|
26
|
+
element: document.getElementById('swipefinder'),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// Call cleanup() to unmount
|
|
30
|
+
</script>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### UMD (script tag)
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<div id="swipefinder"></div>
|
|
37
|
+
|
|
38
|
+
<script src="https://unpkg.com/@swipefindercom/finder-sdk"></script>
|
|
39
|
+
<script>
|
|
40
|
+
const cleanup = SwipeFinderSDK.initSwipeFinder({
|
|
41
|
+
backendUrl: 'https://api.swipefinder.com',
|
|
42
|
+
finderId: 'your-finder-id',
|
|
43
|
+
element: document.getElementById('swipefinder'),
|
|
44
|
+
});
|
|
45
|
+
</script>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### React Component
|
|
49
|
+
|
|
50
|
+
For React apps — uses your app's React instance (no duplicate React bundle).
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm install @swipefindercom/finder-sdk react react-dom
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
import { SwipeFinder } from '@swipefindercom/finder-sdk/react';
|
|
58
|
+
|
|
59
|
+
function App() {
|
|
60
|
+
return (
|
|
61
|
+
<SwipeFinder
|
|
62
|
+
backendUrl="https://api.swipefinder.com"
|
|
63
|
+
finderId="your-finder-id"
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## API
|
|
70
|
+
|
|
71
|
+
### `initSwipeFinder(options)`
|
|
72
|
+
|
|
73
|
+
| Option | Type | Required | Description |
|
|
74
|
+
| ------------ | ------------- | -------- | ---------------------------------- |
|
|
75
|
+
| `backendUrl` | `string` | ✅ | Backend API URL |
|
|
76
|
+
| `finderId` | `string` | ✅ | Finder identifier |
|
|
77
|
+
| `element` | `HTMLElement` | ✅ | DOM element to mount into |
|
|
78
|
+
|
|
79
|
+
Returns a `() => void` cleanup function that unmounts the widget.
|
|
80
|
+
|
|
81
|
+
### `<SwipeFinder />` (React)
|
|
82
|
+
|
|
83
|
+
| Prop | Type | Required | Description |
|
|
84
|
+
| ------------ | -------- | -------- | ---------------------------------- |
|
|
85
|
+
| `backendUrl` | `string` | ✅ | Backend API URL |
|
|
86
|
+
| `finderId` | `string` | ✅ | Finder identifier |
|
|
87
|
+
| `className` | `string` | ❌ | Additional CSS class |
|
|
88
|
+
|
|
89
|
+
## Builds
|
|
90
|
+
|
|
91
|
+
| Entry | Format | React bundled? | Use case |
|
|
92
|
+
| ----------------------- | --------- | -------------- | ------------------------------- |
|
|
93
|
+
| `@swipefindercom/finder-sdk` | ESM / UMD | ✅ Yes | Vanilla JS, Vue, Angular, etc. |
|
|
94
|
+
| `@swipefindercom/finder-sdk/react` | ESM / CJS | ❌ Peer dep | React apps |
|
|
95
|
+
|
|
96
|
+
## Development
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npm run dev # Dev server on :3010
|
|
100
|
+
npm run storybook # Storybook on :6006
|
|
101
|
+
npm run build:all # Build SDK + React + types
|
|
102
|
+
npm run test:e2e # Playwright E2E tests
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
MIT © [SwipeFinder](https://swipefinder.com)
|
|
108
|
+
|