@rubixstudios/payload-typesense 1.2.0 → 1.2.2
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 +1 -1
- package/README.md +24 -9
- package/package.json +8 -8
package/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2024 Front Tribe <https://fronttribe.com>
|
|
4
|
-
Copyright (c) 2025 Rubix Studios Pty. Ltd. <https://rubixstudios.com.au>
|
|
4
|
+
Copyright (c) 2025-2026 Rubix Studios Pty. Ltd. <https://rubixstudios.com.au>
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# PayloadCMS + Typesense Plugin
|
|
2
2
|
|
|
3
|
-
This plugin is a fork of FrontTribe
|
|
3
|
+
This plugin is a fork of FrontTribe’s Typesense Search Plugin for Payload CMS.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It provides a production-ready integration between Payload CMS and Typesense, delivering fast, typo-tolerant search with real-time synchronization.
|
|
6
|
+
|
|
7
|
+
The Rubix Studios fork introduces targeted enhancements that improve stability, TypeScript precision, and deployment reliability (including full Vercel compatibility) while reducing overall code size by 67% for a lighter, more maintainable build.
|
|
6
8
|
|
|
7
9
|
[](https://packagephobia.com/result?p=@rubixstudios/payload-typesense)
|
|
8
10
|
**PayloadCMS + Typesense Plugin**
|
|
@@ -10,8 +12,6 @@ A production-ready search plugin that integrates Typesense with Payload CMS, off
|
|
|
10
12
|
[](https://packagephobia.com/result?p=typesense-search-plugin)
|
|
11
13
|
**FrontTribe's Typesense Search Plugin**
|
|
12
14
|
|
|
13
|
-
This fork offers the same functionality as the original plugin but with fewer bugs, improved TypeScript type safety, no Vercel errors, additional usability features, and a smaller footprint.
|
|
14
|
-
|
|
15
15
|
[](https://www.npmjs.com/package/@rubixstudios/payload-typesense)
|
|
16
16
|

|
|
17
17
|
|
|
@@ -40,6 +40,7 @@ export default buildConfig({
|
|
|
40
40
|
facetFields: ['category', 'status'],
|
|
41
41
|
displayName: 'Blog Posts',
|
|
42
42
|
icon: '📝',
|
|
43
|
+
syncLimit: 500, // overrides default 1000 per page (optional)
|
|
43
44
|
},
|
|
44
45
|
},
|
|
45
46
|
}),
|
|
@@ -54,7 +55,7 @@ function SearchPage() {
|
|
|
54
55
|
return (
|
|
55
56
|
<HeadlessSearchInput
|
|
56
57
|
baseUrl="http://localhost:3000"
|
|
57
|
-
theme="modern" //
|
|
58
|
+
theme="modern" // choose from either modern or dark
|
|
58
59
|
placeholder="Search everything..."
|
|
59
60
|
onResultClick={(result) => {
|
|
60
61
|
console.log('Selected:', result.document)
|
|
@@ -87,8 +88,9 @@ function CollectionSearch() {
|
|
|
87
88
|
- **Caching**: In-memory cache with configurable time-to-live settings
|
|
88
89
|
- **Production Ready**: Robust error handling and performance optimization
|
|
89
90
|
- **Responsive**: Mobile-first architecture ensuring compatibility across devices
|
|
91
|
+
- **Tree Shakable**: Modular structure for lightweight builds
|
|
90
92
|
|
|
91
|
-
##
|
|
93
|
+
## Endpoints
|
|
92
94
|
|
|
93
95
|
- `GET /api/search` - Universal search across all collections
|
|
94
96
|
- `GET /api/search/{collection}` - Search specific collection
|
|
@@ -104,11 +106,11 @@ function CollectionSearch() {
|
|
|
104
106
|
- **Universal Search**: No collection props - Search across all collections
|
|
105
107
|
- **Complete UI Control**: Customizable rendering with comprehensive theme system
|
|
106
108
|
|
|
107
|
-
##
|
|
109
|
+
## Themes
|
|
108
110
|
|
|
109
111
|
The plugin includes a powerful theme system with 2 pre-built themes and unlimited customization:
|
|
110
112
|
|
|
111
|
-
### Pre-built
|
|
113
|
+
### Pre-built
|
|
112
114
|
|
|
113
115
|
```tsx
|
|
114
116
|
// Modern theme (default)
|
|
@@ -118,7 +120,7 @@ The plugin includes a powerful theme system with 2 pre-built themes and unlimite
|
|
|
118
120
|
<HeadlessSearchInput theme="dark" />
|
|
119
121
|
```
|
|
120
122
|
|
|
121
|
-
### Custom
|
|
123
|
+
### Custom
|
|
122
124
|
|
|
123
125
|
```tsx
|
|
124
126
|
const customTheme = {
|
|
@@ -148,6 +150,19 @@ const customTheme = {
|
|
|
148
150
|
- **CSS Variables**: Advanced styling with CSS custom properties
|
|
149
151
|
- **TypeScript Support**: Full type safety for all theme configurations
|
|
150
152
|
|
|
153
|
+
## Production
|
|
154
|
+
|
|
155
|
+
- **Race Condition Protection**: `ensureCollection` prevents startup crashes
|
|
156
|
+
- **Type Safety**: Proper Payload CMS types prevent runtime errors
|
|
157
|
+
- **Document Validation**: Filters malformed data before sync
|
|
158
|
+
- **Graceful Degradation**: Silent failures don't break Payload operations
|
|
159
|
+
|
|
160
|
+
## Developer
|
|
161
|
+
|
|
162
|
+
- **Smaller Components**: Easier to understand and maintain
|
|
163
|
+
- **Maintainable**: Single Responsibility Principle enforced
|
|
164
|
+
- **Well-Documented**: Clear separation of concerns
|
|
165
|
+
|
|
151
166
|
## License
|
|
152
167
|
|
|
153
168
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rubixstudios/payload-typesense",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "A production-ready search plugin that integrates Typesense with Payload CMS, offering fast, typo-tolerant search with real-time synchronization. This fork by Rubix Studios reduces bloat and introduces targeted changes for improved performance, maintainability, and flexibility.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Rubix Studios <hello@rubixstudios.com.au> (https://rubixstudios.com.au)",
|
|
@@ -62,17 +62,17 @@
|
|
|
62
62
|
"@semantic-release/changelog": "^6.0.3",
|
|
63
63
|
"@semantic-release/git": "^10.0.1",
|
|
64
64
|
"@swc/cli": "^0.7.9",
|
|
65
|
-
"@swc/core": "^1.15.
|
|
65
|
+
"@swc/core": "^1.15.8",
|
|
66
66
|
"@types/react": "19.2.7",
|
|
67
|
-
"eslint": "^9.39.
|
|
68
|
-
"payload": "^3.
|
|
69
|
-
"prettier": "^3.7.
|
|
67
|
+
"eslint": "^9.39.2",
|
|
68
|
+
"payload": "^3.69.0",
|
|
69
|
+
"prettier": "^3.7.4",
|
|
70
70
|
"rimraf": "^6.1.2",
|
|
71
71
|
"semantic-release": "^25.0.2",
|
|
72
72
|
"typescript": "^5.9.3"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"payload": "^3.
|
|
75
|
+
"payload": "^3.66.0"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": ">=22 <24",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
95
|
"typesense": "^2.1.0",
|
|
96
|
-
"zod": "^4.
|
|
96
|
+
"zod": "^4.3.5"
|
|
97
97
|
},
|
|
98
|
-
"packageManager": "pnpm@10.
|
|
98
|
+
"packageManager": "pnpm@10.27.0"
|
|
99
99
|
}
|