@tanstack/cta-ui-base 0.32.3 → 0.33.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.
|
@@ -19,7 +19,12 @@ export default function SelectedAddOns() {
|
|
|
19
19
|
const addOnOptions = useProjectOptions((state) => state.addOnOptions);
|
|
20
20
|
const sortedAddOns = useMemo(() => {
|
|
21
21
|
return availableAddOns.sort((a, b) => {
|
|
22
|
-
|
|
22
|
+
const aPriority = a.priority ?? 0;
|
|
23
|
+
const bPriority = b.priority ?? 0;
|
|
24
|
+
if (bPriority !== aPriority) {
|
|
25
|
+
return bPriority - aPriority; // Higher priority first
|
|
26
|
+
}
|
|
27
|
+
return a.name.localeCompare(b.name); // Fallback to alphabetical
|
|
23
28
|
});
|
|
24
29
|
}, [availableAddOns]);
|
|
25
30
|
const [infoAddOn, setInfoAddOn] = useState();
|
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"sonner": "^2.0.3",
|
|
38
38
|
"tailwind-merge": "^3.0.2",
|
|
39
39
|
"zustand": "^5.0.3",
|
|
40
|
-
"@tanstack/cta-engine": "0.
|
|
40
|
+
"@tanstack/cta-engine": "0.33.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/react": "^19.0.8",
|
|
@@ -46,6 +46,6 @@
|
|
|
46
46
|
"vite-tsconfig-paths": "^5.1.4",
|
|
47
47
|
"vitest": "^3.1.4"
|
|
48
48
|
},
|
|
49
|
-
"version": "0.
|
|
49
|
+
"version": "0.33.0",
|
|
50
50
|
"scripts": {}
|
|
51
51
|
}
|
|
@@ -27,7 +27,12 @@ export default function SelectedAddOns() {
|
|
|
27
27
|
|
|
28
28
|
const sortedAddOns = useMemo(() => {
|
|
29
29
|
return availableAddOns.sort((a, b) => {
|
|
30
|
-
|
|
30
|
+
const aPriority = a.priority ?? 0
|
|
31
|
+
const bPriority = b.priority ?? 0
|
|
32
|
+
if (bPriority !== aPriority) {
|
|
33
|
+
return bPriority - aPriority // Higher priority first
|
|
34
|
+
}
|
|
35
|
+
return a.name.localeCompare(b.name) // Fallback to alphabetical
|
|
31
36
|
})
|
|
32
37
|
}, [availableAddOns])
|
|
33
38
|
|
package/src/types.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
StatusStepType,
|
|
3
|
+
AddOnOption,
|
|
4
|
+
AddOnOptions,
|
|
5
|
+
} from '@tanstack/cta-engine'
|
|
2
6
|
|
|
3
7
|
export type ApplicationMode = 'add' | 'setup' | 'none'
|
|
4
8
|
|
|
@@ -35,6 +39,7 @@ export type AddOnInfo = {
|
|
|
35
39
|
type: 'add-on' | 'example' | 'starter' | 'toolchain' | 'host'
|
|
36
40
|
modes: Array<string>
|
|
37
41
|
smallLogo?: string
|
|
42
|
+
priority?: number
|
|
38
43
|
logo?: string
|
|
39
44
|
link: string
|
|
40
45
|
dependsOn?: Array<string>
|