@rubixstudios/payload-media 1.1.1 → 1.1.3

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
@@ -2,7 +2,9 @@
2
2
 
3
3
  PayloadCMS plugin for stock image and video search across Unsplash, Pexels, and Pixabay, with filterable results and instant import.
4
4
 
5
- <img width="1899" height="907" alt="image" src="https://github.com/user-attachments/assets/1c19f977-d075-4dfc-9f52-8d9426bc1500" />
5
+ <img width="1912" height="914" alt="Image stock selection" src="https://github.com/user-attachments/assets/80ecb11f-65eb-4f58-a422-df9b170ac5d2" />
6
+
7
+ <img width="1912" height="914" alt="Video stock selection" src="https://github.com/user-attachments/assets/28044aaa-7144-4b66-9d5f-afc58d7939d5" />
6
8
 
7
9
  This project is an independent implementation derived [PayloadBites' Image Search](https://github.com/rilrom/payload-bites/tree/main/packages/image-search) extended with provider-specific image filtering and improved Windows OS compatibility.
8
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/search-drawer/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAe/D,OAAO,aAAa,CAAA;AAIpB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,sBA4TpD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/search-drawer/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAe/D,OAAO,aAAa,CAAA;AAIpB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,sBA8TpD,CAAA"}
@@ -188,7 +188,7 @@ export const SearchDrawer = (props)=>{
188
188
  onSelect(url);
189
189
  if (!download) return;
190
190
  try {
191
- await fetch(`${serverURL}${api}/providers/${selectedProvider?.value}/track-download?url=${download}`);
191
+ await fetch(`${serverURL}${api}/providers/${selectedProvider?.value}/track-download?url=${encodeURIComponent(download)}`);
192
192
  } catch {
193
193
  return null;
194
194
  }
@@ -67,7 +67,7 @@ export class Pexels extends Provider {
67
67
  return data.map((video)=>{
68
68
  const file = video.video_files.find((f)=>f.quality === 'hd' && f.file_type === 'video/mp4') ?? video.video_files.find((f)=>f.file_type === 'video/mp4');
69
69
  return {
70
- id: video.id,
70
+ id: String(video.id),
71
71
  alt: video.url || '',
72
72
  width: file?.width || video.width || 0,
73
73
  height: file?.height || video.height || 0,
@@ -70,7 +70,7 @@ export class Pixabay extends Provider {
70
70
  const videos = video.videos || {};
71
71
  const videoFormat = videos.large || videos.medium || videos.small || {};
72
72
  return {
73
- id: video.id,
73
+ id: String(video.id),
74
74
  alt: video.tags || '',
75
75
  width: videoFormat.width || 0,
76
76
  height: videoFormat.height || 0,
@@ -1,5 +1,5 @@
1
1
  import { Provider } from './Provider.js';
2
- const UTMParams = 'utm_source=rubixstudios-payload-images&utm_medium=referral';
2
+ const UTMParams = 'utm_source=rubixstudios-payload-media&utm_medium=referral';
3
3
  export class Unsplash extends Provider {
4
4
  constructor(apiKey){
5
5
  super('unsplash', 'Unsplash', 'https://unsplash.com', apiKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubixstudios/payload-media",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "A Payload CMS plugin that integrates with stock image and video providers including Unsplash, Pexels and Pixabay.",
5
5
  "license": "MIT",
6
6
  "author": "Rubix Studios <hello@rubixstudios.com.au> (https://rubixstudios.com.au)",