tanstack 1.0.5 โ 2.0.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/LICENSE +21 -0
- package/README.md +233 -37
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +79 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +71 -18
- package/packages/adapter-videojs/package.json +33 -0
- package/packages/core/package.json +26 -0
- package/packages/plugin-bookmark/package.json +29 -0
- package/packages/react/package.json +40 -0
- package/index.js +0 -33
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present TanStack Player Contributors
|
|
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.
|
package/README.md
CHANGED
|
@@ -1,67 +1,263 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# โถ TanStack Player
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**A developer-first, universal Video Player SDK built on Video.js**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Headless hooks ยท Plugin architecture ยท React-first DX ยท Streaming ready
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/tanstack)
|
|
10
|
+
[](https://www.npmjs.com/package/tanstack)
|
|
11
|
+
[](https://bundlephobia.com/package/tanstack)
|
|
12
|
+
[](LICENSE)
|
|
13
|
+
[](https://github.com/sh20raj/tanstack)
|
|
14
|
+
[](https://github.com/sh20raj/tanstack/issues)
|
|
15
|
+
[](https://github.com/sh20raj/tanstack/pulls)
|
|
16
|
+
[](https://www.typescriptlang.org/)
|
|
17
|
+
[](https://videojs.com/)
|
|
18
|
+
[](https://visitorbadge.io/status?path=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Ftanstack%3FactiveTab%3Dreadme)
|
|
19
|
+
|
|
20
|
+
[Documentation](https://sh20raj.github.io/tanstack) ยท [npm](https://www.npmjs.com/package/tanstack) ยท [Examples](https://github.com/sh20raj/tanstack/tree/main/examples) ยท [Contributing](CONTRIBUTING.md)
|
|
21
|
+
|
|
22
|
+
</div>
|
|
8
23
|
|
|
9
24
|
---
|
|
10
25
|
|
|
11
|
-
##
|
|
26
|
+
## โจ Why TanStack Player?
|
|
12
27
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
|
16
|
-
|
|
17
|
-
| ๐ฌ **
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
| ๐ **[SEO Tools](https://30tools.com/search?category=seo)** | Keyword research, rank tracking, technical SEO & more |
|
|
28
|
+
Building video experiences is hard โ buffering, streaming formats, browser quirks, accessibility, and state management all add complexity. TanStack Player abstracts all of this behind a clean, modern SDK:
|
|
29
|
+
|
|
30
|
+
| Feature | Description |
|
|
31
|
+
|---------|-------------|
|
|
32
|
+
| ๐ฌ **Headless Core** | Framework-agnostic engine with play/pause/seek/volume/speed |
|
|
33
|
+
| ๐ช **React Hooks** | `useTanStackPlayer()`, `useProgress()`, `useBookmarks()` |
|
|
34
|
+
| ๐ **Plugin System** | Lifecycle-aware plugins with event bus access |
|
|
35
|
+
| ๐ก **Streaming** | HLS, DASH, adaptive bitrate via Video.js |
|
|
36
|
+
| โก **Tiny** | ~21KB total SDK (ESM, gzipped much smaller) |
|
|
37
|
+
| ๐ฏ **TypeScript** | Full typed API with JSDoc |
|
|
24
38
|
|
|
25
39
|
---
|
|
26
40
|
|
|
27
|
-
##
|
|
41
|
+
## ๐ฆ Installation
|
|
28
42
|
|
|
29
|
-
|
|
30
|
-
|
|
43
|
+
```bash
|
|
44
|
+
npm install tanstack video.js
|
|
45
|
+
```
|
|
31
46
|
|
|
32
|
-
|
|
33
|
-
|
|
47
|
+
> **Note:** `video.js` is a peer dependency. Load it via CDN or bundle it.
|
|
48
|
+
|
|
49
|
+
---
|
|
34
50
|
|
|
35
|
-
|
|
36
|
-
|
|
51
|
+
## ๐ Quick Start
|
|
52
|
+
|
|
53
|
+
```tsx
|
|
54
|
+
import { TanStackPlayer } from 'tanstack'
|
|
55
|
+
|
|
56
|
+
export default function App() {
|
|
57
|
+
return (
|
|
58
|
+
<TanStackPlayer
|
|
59
|
+
src="https://example.com/video.mp4"
|
|
60
|
+
controls
|
|
61
|
+
autoPlay={false}
|
|
62
|
+
/>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
```
|
|
37
66
|
|
|
38
67
|
---
|
|
39
68
|
|
|
40
|
-
##
|
|
69
|
+
## ๐ช Hooks API
|
|
70
|
+
|
|
71
|
+
Build completely custom UI with headless hooks:
|
|
41
72
|
|
|
42
|
-
|
|
73
|
+
```tsx
|
|
74
|
+
import { useTanStackPlayer, useProgress } from 'tanstack'
|
|
43
75
|
|
|
44
|
-
|
|
76
|
+
function Controls() {
|
|
77
|
+
const { play, pause, isPlaying, seek, setVolume } = useTanStackPlayer()
|
|
78
|
+
const { progress, buffered, currentTime, duration } = useProgress()
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<div>
|
|
82
|
+
<button onClick={() => isPlaying ? pause() : play()}>
|
|
83
|
+
{isPlaying ? 'โธ' : 'โถ'}
|
|
84
|
+
</button>
|
|
85
|
+
<div>Progress: {progress.toFixed(1)}%</div>
|
|
86
|
+
</div>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
```
|
|
45
90
|
|
|
46
91
|
---
|
|
47
92
|
|
|
48
|
-
##
|
|
93
|
+
## ๐ Plugin System
|
|
94
|
+
|
|
95
|
+
Extend player capabilities with plugins:
|
|
96
|
+
|
|
97
|
+
```tsx
|
|
98
|
+
import { TanStackPlayer, createBookmarkPlugin } from 'tanstack'
|
|
99
|
+
|
|
100
|
+
const bookmarks = createBookmarkPlugin()
|
|
101
|
+
|
|
102
|
+
function App() {
|
|
103
|
+
return (
|
|
104
|
+
<TanStackPlayer
|
|
105
|
+
src="/video.mp4"
|
|
106
|
+
plugins={[bookmarks]}
|
|
107
|
+
>
|
|
108
|
+
<BookmarkControls />
|
|
109
|
+
</TanStackPlayer>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Using Bookmark Hooks
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
import { useBookmarks } from 'tanstack'
|
|
118
|
+
|
|
119
|
+
function BookmarkControls() {
|
|
120
|
+
const { bookmarks, addBookmark, seekToBookmark } = useBookmarks()
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<div>
|
|
124
|
+
<button onClick={() => addBookmark('Important moment')}>
|
|
125
|
+
๐ Bookmark
|
|
126
|
+
</button>
|
|
127
|
+
{bookmarks.map(bm => (
|
|
128
|
+
<button key={bm.id} onClick={() => seekToBookmark(bm.id)}>
|
|
129
|
+
{bm.label} ({bm.time}s)
|
|
130
|
+
</button>
|
|
131
|
+
))}
|
|
132
|
+
</div>
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## ๐ฆ Packages
|
|
140
|
+
|
|
141
|
+
| Package | Size | Description |
|
|
142
|
+
|---------|------|-------------|
|
|
143
|
+
| `tanstack` | โ | All-in-one package (re-exports everything) |
|
|
144
|
+
| `@tanstack-player/core` | 8.7KB | Headless event bus, state store, controller, plugin runtime |
|
|
145
|
+
| `@tanstack-player/adapter-videojs` | 4.6KB | Video.js engine adapter |
|
|
146
|
+
| `@tanstack-player/react` | 6.2KB | React component + hooks |
|
|
147
|
+
| `@tanstack-player/plugin-bookmark` | 1.6KB | Bookmark plugin |
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## ๐ Architecture
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
TanStack Player
|
|
155
|
+
โโ Core (headless)
|
|
156
|
+
โ โโโ EventBus โ typed event emitter
|
|
157
|
+
โ โโโ StateStore โ reactive state management
|
|
158
|
+
โ โโโ PlayerController โ unified playback API
|
|
159
|
+
โ โโโ PluginRuntime โ plugin lifecycle manager
|
|
160
|
+
โ
|
|
161
|
+
โโ Adapters
|
|
162
|
+
โ โโโ VideoJsAdapter โ Video.js โ Core bridge
|
|
163
|
+
โ
|
|
164
|
+
โโ React
|
|
165
|
+
โ โโโ <TanStackPlayer /> โ component
|
|
166
|
+
โ โโโ useTanStackPlayer โ control hook
|
|
167
|
+
โ โโโ useProgress โ progress hook
|
|
168
|
+
โ โโโ useBookmarks โ bookmark plugin hook
|
|
169
|
+
โ
|
|
170
|
+
โโ Plugins
|
|
171
|
+
โโโ BookmarkPlugin โ timestamp bookmarks
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## โ๏ธ Video.js Options
|
|
177
|
+
|
|
178
|
+
Pass native Video.js configuration through:
|
|
179
|
+
|
|
180
|
+
```tsx
|
|
181
|
+
<TanStackPlayer
|
|
182
|
+
src="/video.mp4"
|
|
183
|
+
videojsOptions={{
|
|
184
|
+
fluid: true,
|
|
185
|
+
preload: 'auto',
|
|
186
|
+
playbackRates: [0.5, 1, 1.5, 2],
|
|
187
|
+
}}
|
|
188
|
+
/>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## ๐ฏ Events
|
|
194
|
+
|
|
195
|
+
Unified event system across all adapters:
|
|
196
|
+
|
|
197
|
+
```tsx
|
|
198
|
+
<TanStackPlayer
|
|
199
|
+
src="/video.mp4"
|
|
200
|
+
onReady={() => console.log('Ready!')}
|
|
201
|
+
onPlay={() => console.log('Playing')}
|
|
202
|
+
onPause={() => console.log('Paused')}
|
|
203
|
+
onEnded={() => console.log('Ended')}
|
|
204
|
+
onTimeUpdate={(time, duration) => console.log(`${time}/${duration}`)}
|
|
205
|
+
onError={(err) => console.error(err)}
|
|
206
|
+
/>
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## ๐ Development
|
|
49
212
|
|
|
50
213
|
```bash
|
|
51
|
-
|
|
214
|
+
git clone https://github.com/sh20raj/tanstack
|
|
215
|
+
cd tanstack
|
|
216
|
+
npm install
|
|
217
|
+
npm run build
|
|
218
|
+
npm run dev
|
|
52
219
|
```
|
|
53
220
|
|
|
54
|
-
|
|
221
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## ๐ฃ Roadmap
|
|
226
|
+
|
|
227
|
+
- [ ] HLS.js adapter
|
|
228
|
+
- [ ] Plyr lightweight adapter
|
|
229
|
+
- [ ] Analytics plugin
|
|
230
|
+
- [ ] Floating mini-player plugin
|
|
231
|
+
- [ ] Subtitle editor plugin
|
|
232
|
+
- [ ] AI chapter detection plugin
|
|
233
|
+
- [ ] React Native support
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## ๐งฐ Recommended Tools
|
|
55
238
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
239
|
+
Looking for developer utilities to use alongside TanStack Player? Check out **[30tools.com](https://30tools.com)** โ a suite of **194+ free, privacy-first online tools** for developers:
|
|
240
|
+
|
|
241
|
+
- **JSON Formatter & Diff Viewer** โ perfect for debugging API responses
|
|
242
|
+
- **Image Compressor & Converter** โ optimize video thumbnails and posters
|
|
243
|
+
- **JWT Decoder** โ inspect auth tokens for protected video content
|
|
244
|
+
- **CSS Gradient Generator** โ create beautiful player UI gradients
|
|
245
|
+
- **Base64 โ Image** โ handle inline poster images
|
|
246
|
+
|
|
247
|
+
All tools run directly in your browser for maximum privacy. No uploads, no tracking.
|
|
248
|
+
|
|
249
|
+
๐ **[30tools.com](https://30tools.com)** โ One platform, every tool you need.
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## ๐ License
|
|
254
|
+
|
|
255
|
+
[MIT](LICENSE) โ Made with โค๏ธ by [@sh20raj](https://github.com/sh20raj)
|
|
62
256
|
|
|
63
257
|
---
|
|
64
258
|
|
|
65
|
-
|
|
259
|
+
<div align="center">
|
|
260
|
+
|
|
261
|
+
**[โญ Star on GitHub](https://github.com/sh20raj/tanstack)** โ it helps a lot!
|
|
66
262
|
|
|
67
|
-
|
|
263
|
+
</div>
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { EngineAdapter, EngineAdapterOptions, EventBridgeFn, EventBus, EventBusInterface, EventListener, INITIAL_STATE, PlayerContext, PlayerController, PlayerControllerInterface, PlayerControllerOptions, PlayerEvent, PlayerEventMap, PlayerSource, PlayerState, PluginFactory, PluginRuntime, StateListener, StateStore, StateStoreInterface, TanStackPlugin } from '@tanstack-player/core';
|
|
2
|
+
export { VideoJsAdapter, createVideoJsAdapter } from '@tanstack-player/adapter-videojs';
|
|
3
|
+
export { TanStackPlayer, TanStackPlayerContext, TanStackPlayerProps, useBookmarks, usePlayerContext, useProgress, useTanStackPlayer } from '@tanstack-player/react';
|
|
4
|
+
export { Bookmark, BookmarkEvent, BookmarkPlugin, createBookmarkPlugin } from '@tanstack-player/plugin-bookmark';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { EngineAdapter, EngineAdapterOptions, EventBridgeFn, EventBus, EventBusInterface, EventListener, INITIAL_STATE, PlayerContext, PlayerController, PlayerControllerInterface, PlayerControllerOptions, PlayerEvent, PlayerEventMap, PlayerSource, PlayerState, PluginFactory, PluginRuntime, StateListener, StateStore, StateStoreInterface, TanStackPlugin } from '@tanstack-player/core';
|
|
2
|
+
export { VideoJsAdapter, createVideoJsAdapter } from '@tanstack-player/adapter-videojs';
|
|
3
|
+
export { TanStackPlayer, TanStackPlayerContext, TanStackPlayerProps, useBookmarks, usePlayerContext, useProgress, useTanStackPlayer } from '@tanstack-player/react';
|
|
4
|
+
export { Bookmark, BookmarkEvent, BookmarkPlugin, createBookmarkPlugin } from '@tanstack-player/plugin-bookmark';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@tanstack-player/core');
|
|
4
|
+
var adapterVideojs = require('@tanstack-player/adapter-videojs');
|
|
5
|
+
var react = require('@tanstack-player/react');
|
|
6
|
+
var pluginBookmark = require('@tanstack-player/plugin-bookmark');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "EventBus", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return core.EventBus; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "INITIAL_STATE", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return core.INITIAL_STATE; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "PlayerController", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return core.PlayerController; }
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "PlayerEvent", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return core.PlayerEvent; }
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "PluginRuntime", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return core.PluginRuntime; }
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "StateStore", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return core.StateStore; }
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "VideoJsAdapter", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () { return adapterVideojs.VideoJsAdapter; }
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "createVideoJsAdapter", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () { return adapterVideojs.createVideoJsAdapter; }
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "TanStackPlayer", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () { return react.TanStackPlayer; }
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "TanStackPlayerContext", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () { return react.TanStackPlayerContext; }
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "useBookmarks", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () { return react.useBookmarks; }
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "usePlayerContext", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () { return react.usePlayerContext; }
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "useProgress", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () { return react.useProgress; }
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "useTanStackPlayer", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () { return react.useTanStackPlayer; }
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "BookmarkEvent", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return pluginBookmark.BookmarkEvent; }
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, "BookmarkPlugin", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function () { return pluginBookmark.BookmarkPlugin; }
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "createBookmarkPlugin", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function () { return pluginBookmark.createBookmarkPlugin; }
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=index.js.map
|
|
79
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { EventBus, INITIAL_STATE, PlayerController, PlayerEvent, PluginRuntime, StateStore } from '@tanstack-player/core';
|
|
2
|
+
export { VideoJsAdapter, createVideoJsAdapter } from '@tanstack-player/adapter-videojs';
|
|
3
|
+
export { TanStackPlayer, TanStackPlayerContext, useBookmarks, usePlayerContext, useProgress, useTanStackPlayer } from '@tanstack-player/react';
|
|
4
|
+
export { BookmarkEvent, BookmarkPlugin, createBookmarkPlugin } from '@tanstack-player/plugin-bookmark';
|
|
5
|
+
//# sourceMappingURL=index.mjs.map
|
|
6
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs","sourcesContent":[]}
|
package/package.json
CHANGED
|
@@ -1,31 +1,84 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tanstack",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"main": "index.js",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "TanStack Player โ A developer-first, universal Video Player SDK built on Video.js with headless hooks, plugin architecture, and React-first DX",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"packages/*/dist",
|
|
18
|
+
"packages/*/package.json",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"workspaces": [
|
|
23
|
+
"packages/*",
|
|
24
|
+
"examples/*"
|
|
25
|
+
],
|
|
6
26
|
"scripts": {
|
|
7
|
-
"
|
|
27
|
+
"build": "npm run build --workspaces --if-present && tsup",
|
|
28
|
+
"build:packages": "npm run build --workspaces --if-present",
|
|
29
|
+
"build:root": "tsup",
|
|
30
|
+
"dev": "npm run dev --workspace=examples/react-basic",
|
|
31
|
+
"docs:dev": "vitepress dev docs",
|
|
32
|
+
"docs:build": "vitepress build docs",
|
|
33
|
+
"docs:preview": "vitepress preview docs",
|
|
34
|
+
"clean": "rm -rf dist packages/*/dist examples/*/dist",
|
|
35
|
+
"prepublishOnly": "npm run build"
|
|
8
36
|
},
|
|
9
37
|
"keywords": [
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
38
|
+
"tanstack",
|
|
39
|
+
"video",
|
|
40
|
+
"player",
|
|
41
|
+
"video-player",
|
|
42
|
+
"videojs",
|
|
43
|
+
"video.js",
|
|
44
|
+
"react",
|
|
45
|
+
"hooks",
|
|
46
|
+
"headless",
|
|
47
|
+
"plugin",
|
|
48
|
+
"streaming",
|
|
49
|
+
"hls",
|
|
50
|
+
"sdk",
|
|
51
|
+
"media",
|
|
52
|
+
"playback"
|
|
20
53
|
],
|
|
21
|
-
"author": "
|
|
54
|
+
"author": "sh20raj",
|
|
22
55
|
"license": "MIT",
|
|
23
|
-
"homepage": "https://30tools.com",
|
|
24
56
|
"repository": {
|
|
25
57
|
"type": "git",
|
|
26
|
-
"url": "https://
|
|
58
|
+
"url": "https://github.com/sh20raj/tanstack"
|
|
27
59
|
},
|
|
60
|
+
"homepage": "https://sh20raj.github.io/tanstack",
|
|
28
61
|
"bugs": {
|
|
29
|
-
"url": "https://
|
|
62
|
+
"url": "https://github.com/sh20raj/tanstack/issues"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@tanstack-player/core": "*",
|
|
66
|
+
"@tanstack-player/adapter-videojs": "*",
|
|
67
|
+
"@tanstack-player/react": "*",
|
|
68
|
+
"@tanstack-player/plugin-bookmark": "*"
|
|
69
|
+
},
|
|
70
|
+
"peerDependencies": {
|
|
71
|
+
"react": ">=18.0.0",
|
|
72
|
+
"react-dom": ">=18.0.0",
|
|
73
|
+
"video.js": ">=7.0.0"
|
|
74
|
+
},
|
|
75
|
+
"peerDependenciesMeta": {
|
|
76
|
+
"react": { "optional": true },
|
|
77
|
+
"react-dom": { "optional": true }
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"tsup": "^8.0.0",
|
|
81
|
+
"typescript": "^5.4.0",
|
|
82
|
+
"vitepress": "^1.5.0"
|
|
30
83
|
}
|
|
31
84
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tanstack-player/adapter-videojs",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TanStack Player โ Video.js adapter",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": ["dist"],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsup",
|
|
18
|
+
"dev": "tsup --watch"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@tanstack-player/core": "*"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"video.js": ">=7.0.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"tsup": "^8.0.0",
|
|
30
|
+
"typescript": "^5.4.0",
|
|
31
|
+
"video.js": "^8.0.0"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tanstack-player/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TanStack Player โ Headless core engine",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": ["dist"],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsup",
|
|
18
|
+
"dev": "tsup --watch"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"tsup": "^8.0.0",
|
|
24
|
+
"typescript": "^5.4.0"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tanstack-player/plugin-bookmark",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TanStack Player โ Bookmark plugin",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": ["dist"],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsup",
|
|
18
|
+
"dev": "tsup --watch"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@tanstack-player/core": "*"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"tsup": "^8.0.0",
|
|
27
|
+
"typescript": "^5.4.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tanstack-player/react",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TanStack Player โ React component and hooks",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": ["dist"],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsup",
|
|
18
|
+
"dev": "tsup --watch"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@tanstack-player/core": "*",
|
|
24
|
+
"@tanstack-player/adapter-videojs": "*"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": ">=18.0.0",
|
|
28
|
+
"react-dom": ">=18.0.0",
|
|
29
|
+
"video.js": ">=7.0.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/react": "^18.0.0",
|
|
33
|
+
"@types/react-dom": "^18.0.0",
|
|
34
|
+
"react": "^18.0.0",
|
|
35
|
+
"react-dom": "^18.0.0",
|
|
36
|
+
"tsup": "^8.0.0",
|
|
37
|
+
"typescript": "^5.4.0",
|
|
38
|
+
"video.js": "^8.0.0"
|
|
39
|
+
}
|
|
40
|
+
}
|
package/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* thirty-tools
|
|
3
|
-
*
|
|
4
|
-
* 194+ Free Online Tools & Converters
|
|
5
|
-
* https://30tools.com
|
|
6
|
-
*
|
|
7
|
-
* Compress images, edit PDFs, download videos, and more.
|
|
8
|
-
* 100% free, private, and browser-based.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
module.exports = {
|
|
12
|
-
name: "thirty-tools",
|
|
13
|
-
version: "1.0.0",
|
|
14
|
-
url: "https://30tools.com",
|
|
15
|
-
description: "194+ free online tools & converters for image, PDF, video, SEO, and developer workflows.",
|
|
16
|
-
categories: [
|
|
17
|
-
"Image Tools",
|
|
18
|
-
"PDF Tools",
|
|
19
|
-
"Video Tools",
|
|
20
|
-
"Social Media Downloaders",
|
|
21
|
-
"Audio Tools",
|
|
22
|
-
"Utility Tools",
|
|
23
|
-
"Developer Tools",
|
|
24
|
-
"Fun Generators",
|
|
25
|
-
"SEO Tools"
|
|
26
|
-
],
|
|
27
|
-
visit: function () {
|
|
28
|
-
console.log("\n๐ง thirty-tools โ All Your Tools. One Platform.");
|
|
29
|
-
console.log(" https://30tools.com\n");
|
|
30
|
-
console.log(" 194+ free online tools for image, PDF, video, SEO & developer workflows.");
|
|
31
|
-
console.log(" 100% free โข Private by design โข No waiting\n");
|
|
32
|
-
}
|
|
33
|
-
};
|