Skip to content

Commit 8998f5d

Browse files
committed
feat: add vegaos platform
1 parent fcd6b1a commit 8998f5d

10 files changed

Lines changed: 61 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"macos": false,
5757
"tvos": false,
5858
"visionos": false,
59+
"vegaos": false,
5960
"expoGo": false,
6061
"fireos": false,
6162
"unmaintained": false,
@@ -119,6 +120,8 @@
119120
**(boolean)** - can be used with [`react-native-tvos`](https://github.com/react-native-tvos/react-native-tvos).
120121
- #### `visionos`
121122
**(boolean)** - can be used with [`react-native-visionos`](https://github.com/callstack/react-native-visionos).
123+
- #### `vegaos`
124+
**(boolean)** - can be used with [`Vega OS`](https://developer.amazon.com/docs/react-native-vega/0.72/react_overview.html) platform.
122125

123126
#### ✅ Compatibility
124127

components/CompatibilityTags.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export function CompatibilityTags({ library }: Props) {
2323
library.macos ? 'macOS' : null,
2424
library.tvos ? 'tvOS' : null,
2525
library.visionos ? 'visionOS' : null,
26+
library.vegaos ? 'Vega OS' : null,
2627
library.web ? 'Web' : null,
2728
library.windows ? 'Windows' : null,
2829
]

components/Filters/helpers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ export const FILTER_PLATFORMS: FilterParamsType[] = [
2626
param: 'visionos',
2727
title: 'visionOS',
2828
},
29+
{
30+
param: 'vegaos',
31+
title: 'Vega OS',
32+
},
2933
{
3034
param: 'web',
3135
title: 'Web',

components/Footer.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
PlatformIOS,
1313
PlatformMacOS,
1414
PlatformTvOS,
15+
PlatformVegaOS,
1516
PlatformVisionOS,
1617
PlatformWeb,
1718
PlatformWindows,
@@ -94,6 +95,12 @@ const Footer = () => {
9495
Icon={PlatformVisionOS}
9596
url="https://github.com/callstack/react-native-visionos#readme"
9697
/>
98+
<Platform
99+
name="Vega OS"
100+
pkgName="react-native for Vega"
101+
Icon={PlatformVegaOS}
102+
url="https://developer.amazon.com/docs/react-native-vega/0.72/react_overview.html"
103+
/>
97104
<Platform
98105
name="Web"
99106
pkgName="react-native-web"

components/Icons/index.tsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Circle, Path, Rect, Svg } from 'react-native-svg';
1+
import { Circle, Path, Rect, Svg, Text } from 'react-native-svg';
22

33
import { colors } from '~/common/styleguide';
44

@@ -402,6 +402,29 @@ export function PlatformExpo({ width = 18, height = 18, fill = colors.black }: I
402402
);
403403
}
404404

405+
export function PlatformVegaOS({ width = 18, height = 18, fill = colors.black }: IconProps) {
406+
return (
407+
<Svg width={width} height={height} viewBox="0 0 24 24" fill="none">
408+
<Path d="M3 5h18v12H3z" opacity=".3" fill={fill} />
409+
<Path
410+
fill={fill}
411+
d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z"
412+
/>
413+
<Text
414+
x="12"
415+
y="10"
416+
textAnchor="middle"
417+
fontSize="4"
418+
fontFamily="Arial, sans-serif"
419+
fontWeight="bold"
420+
fill={fill}
421+
opacity="0.8">
422+
VEGA
423+
</Text>
424+
</Svg>
425+
);
426+
}
427+
405428
export function PlatformVisionOS({ width = 18, height = 18, fill = colors.black }: IconProps) {
406429
return (
407430
<Svg width={width} height={height} viewBox="0 0 392 222" fill="none">

pages/api/libraries/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) {
7474
fireos: parsedQuery.fireos,
7575
tvos: parsedQuery.tvos,
7676
visionos: parsedQuery.visionos,
77+
vegaos: parsedQuery.vegaos,
7778
},
7879
hasExample: parsedQuery.hasExample,
7980
hasImage: parsedQuery.hasImage,

pages/popular.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
PlatformIOS,
1010
PlatformMacOS,
1111
PlatformTvOS,
12+
PlatformVegaOS,
1213
PlatformVisionOS,
1314
PlatformWeb,
1415
PlatformWindows,
@@ -81,6 +82,12 @@ const Popular = ({ data }: Props) => {
8182
data={data}
8283
filter={lib => lib.visionos === true}
8384
/>
85+
<ExploreSection
86+
title="Vega OS"
87+
icon={PlatformVegaOS}
88+
data={data}
89+
filter={lib => lib.vegaos === true}
90+
/>
8491
<ExploreSection
8592
title="Windows"
8693
icon={PlatformWindows}

react-native-libraries.schema.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,14 @@
6363
"type": "boolean",
6464
"title": "Package supports tvOS (react-native-tvos)",
6565
"default": false,
66-
"examples": [
67-
true
68-
]
66+
"examples": [true]
67+
},
68+
"vegaos": {
69+
"$id": "#/items/properties/vegaos",
70+
"type": "boolean",
71+
"title": "Package supports Vega OS",
72+
"default": false,
73+
"examples": [true]
6974
},
7075
"fireos": {
7176
"$id": "#/items/properties/fireos",

types/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export type Query = {
2222
fireos?: string;
2323
tvos?: string;
2424
visionos?: string;
25+
vegaos?: string;
2526
web?: string;
2627
windows?: string;
2728
order?: QueryOrder;
@@ -129,6 +130,7 @@ export type LibraryDataEntryType = {
129130
fireos?: boolean;
130131
tvos?: boolean;
131132
visionos?: boolean;
133+
vegaos?: boolean;
132134
unmaintained?: boolean;
133135
dev?: boolean;
134136
template?: boolean;

util/search.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ export function handleFilterLibraries({
148148
return false;
149149
}
150150

151+
if (support.vegaos && !library.vegaos) {
152+
return false;
153+
}
154+
151155
if (support.fireos && !library.fireos) {
152156
return false;
153157
}

0 commit comments

Comments
 (0)