diff --git a/.github/scripts/env.ts b/.github/scripts/env.ts index 61e17fb4b..f5b4029c2 100644 --- a/.github/scripts/env.ts +++ b/.github/scripts/env.ts @@ -10,7 +10,7 @@ if (isCI) { console.log('🔥 Generating .env.local files'); const autogeneratedComment = - '# This file is autogenerated. To make changes, modify the root level .env.local file and run bun install\n\n'; + '# This file is autogenerated. To make changes, modify the root level .env.local file and run bun install. You might need to directly run bun postinstall to trigger the env shim script. \n\n'; const outputName = '.env.local'; // Read the .env file @@ -35,9 +35,12 @@ const expoOutputPath = path.join( const expoFileContent = envFileContent .split('\n') .map((line) => { - if (line.startsWith('PUBLIC_')) { + if (line.startsWith('PUBLIC_APP=')) { + return 'EXPO_PUBLIC_APP=expo'; + } else if (line.startsWith('PUBLIC_')) { return line.replace(/^PUBLIC_/, 'EXPO_PUBLIC_'); } + return line; }) .join('\n'); const expoNoTelemetry = 'EXPO_NO_TELEMETRY=true'; @@ -60,7 +63,9 @@ const nextOutputPath = path.join( const nextFileContent = envFileContent .split('\n') .map((line) => { - if (line.startsWith('PUBLIC_')) { + if (line.startsWith('PUBLIC_APP=')) { + return 'NEXT_PUBLIC_APP=next'; + } else if (line.startsWith('PUBLIC_')) { return line.replace(/^PUBLIC_/, 'NEXT_PUBLIC_'); } }) @@ -81,8 +86,10 @@ const viteOutputPath = path.join( const viteFileContent = envFileContent .split('\n') .map((line) => { - if (line.startsWith('PUBLIC_')) { - return line.replace(/^PUBLIC_/, 'VITE_'); + if (line.startsWith('PUBLIC_APP=')) { + return 'VITE_PUBLIC_APP=vite'; + } else if (line.startsWith('PUBLIC_')) { + return line.replace(/^PUBLIC_/, 'VITE_PUBLIC_'); } }) .join('\n'); @@ -103,14 +110,18 @@ const tauriOutputPath = path.join( const tauriFileContent = envFileContent .split('\n') .map((line) => { - if (line.startsWith('PUBLIC_')) { + if (line.startsWith('PUBLIC_APP=')) { + return 'VITE_PUBLIC_APP=tauri'; + } else if (line.startsWith('PUBLIC_')) { // We use Vite's env variables in Tauri - return line.replace(/^PUBLIC_/, 'VITE_'); + return line.replace(/^PUBLIC_/, 'VITE_PUBLIC_'); } }) .join('\n'); -fs.writeFileSync(tauriOutputPath, `${autogeneratedComment}\n${tauriFileContent}`); - +fs.writeFileSync( + tauriOutputPath, + `${autogeneratedComment}\n${tauriFileContent}`, +); // TODO: Add wrangler env generation /** @@ -131,4 +142,4 @@ fs.writeFileSync(tauriOutputPath, `${autogeneratedComment}\n${tauriFileContent}` // fs.writeFileSync( // wranglerOutputPath, // `${autogeneratedComment}\n${wranglerFileContent}\n${noD1Warning}` -// ) \ No newline at end of file +// ) diff --git a/.gitignore b/.gitignore index bd14b96fc..e846469a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ mongodb-data *.env .env.local +.env.production +.env.old node_modules # yarn.lock # dist diff --git a/.prettierignore b/.prettierignore index f2aa750cd..12473340e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -9,6 +9,13 @@ node_modules/ package-lock.json package.json +# Next.js build directory +.next/ +.vercel/ + +# Vite build directory +dist/ + # README and other markdowns might be formatted, but if you're facing errors, you can ignore them README.md diff --git a/apps/expo/app.config.js b/apps/expo/app.config.js index 20b11ea8e..cb7e75895 100644 --- a/apps/expo/app.config.js +++ b/apps/expo/app.config.js @@ -1,8 +1,6 @@ -import "dotenv/config"; - +import 'dotenv/config'; module.exports = ({ config }) => { - config.extra.NODE_ENV = process.env.NODE_ENV; config.extra.CLIENT_URL = process.env.CLIENT_URL; config.extra.MAPBOX_ACCESS_TOKEN = process.env.MAPBOX_ACCESS_TOKEN; @@ -10,22 +8,23 @@ module.exports = ({ config }) => { config.extra.EXPO_PUBLIC_NODE_ENV = process.env.EXPO_PUBLIC_NODE_ENV; config.extra.EXPO_PUBLIC_CLIENT_URL = process.env.EXPO_PUBLIC_CLIENT_URL; - config.extra.EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN = process.env.EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN; + config.extra.EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN = + process.env.EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN; config.extra.EXPO_PUBLIC_API_URL = process.env.EXPO_PUBLIC_API_URL; return { ...config, - plugins: config.plugins.map(i => { - if (i[0] === "@rnmapbox/maps") { + plugins: config.plugins.map((i) => { + if (i[0] === '@rnmapbox/maps') { return [ - "@rnmapbox/maps", + '@rnmapbox/maps', { - "RNMapboxMapsImpl": "mapbox", - "RNMapboxMapsDownloadToken": process.env.MAPBOX_DOWNLOADS_TOKEN - } - ] + RNMapboxMapsImpl: 'mapbox', + RNMapboxMapsDownloadToken: process.env.MAPBOX_DOWNLOADS_TOKEN, + }, + ]; } return i; - }) + }), }; }; diff --git a/apps/expo/app/_layout.tsx b/apps/expo/app/_layout.tsx index aeaffa7ac..15d3b3b82 100644 --- a/apps/expo/app/_layout.tsx +++ b/apps/expo/app/_layout.tsx @@ -11,4 +11,4 @@ export default function HomeLayout() { /> ); -} \ No newline at end of file +} diff --git a/apps/vite/src/routeTree.gen.ts b/apps/vite/src/routeTree.gen.ts index ef5c834bf..f22c6e0c2 100644 --- a/apps/vite/src/routeTree.gen.ts +++ b/apps/vite/src/routeTree.gen.ts @@ -162,86 +162,149 @@ const ProfileSettingsIndexLazyRoute = ProfileSettingsIndexLazyImport.update({ declare module '@tanstack/react-router' { interface FileRoutesByPath { '/': { + id: '/' + path: '/' + fullPath: '/' preLoaderRoute: typeof IndexImport parentRoute: typeof rootRoute } '/destination/query': { + id: '/destination/query' + path: '/destination/query' + fullPath: '/destination/query' preLoaderRoute: typeof DestinationQueryLazyImport parentRoute: typeof rootRoute } '/pack/$id': { + id: '/pack/$id' + path: '/pack/$id' + fullPath: '/pack/$id' preLoaderRoute: typeof PackIdLazyImport parentRoute: typeof rootRoute } '/pack/create': { + id: '/pack/create' + path: '/pack/create' + fullPath: '/pack/create' preLoaderRoute: typeof PackCreateLazyImport parentRoute: typeof rootRoute } '/profile/$id': { + id: '/profile/$id' + path: '/profile/$id' + fullPath: '/profile/$id' preLoaderRoute: typeof ProfileIdLazyImport parentRoute: typeof rootRoute } '/trip/$tripId': { + id: '/trip/$tripId' + path: '/trip/$tripId' + fullPath: '/trip/$tripId' preLoaderRoute: typeof TripTripIdLazyImport parentRoute: typeof rootRoute } '/trip/create': { + id: '/trip/create' + path: '/trip/create' + fullPath: '/trip/create' preLoaderRoute: typeof TripCreateLazyImport parentRoute: typeof rootRoute } '/about/': { + id: '/about/' + path: '/about/' + fullPath: '/about/' preLoaderRoute: typeof AboutIndexLazyImport parentRoute: typeof rootRoute } '/appearance/': { + id: '/appearance/' + path: '/appearance/' + fullPath: '/appearance/' preLoaderRoute: typeof AppearanceIndexLazyImport parentRoute: typeof rootRoute } '/dashboard/': { + id: '/dashboard/' + path: '/dashboard/' + fullPath: '/dashboard/' preLoaderRoute: typeof DashboardIndexLazyImport parentRoute: typeof rootRoute } '/feed/': { + id: '/feed/' + path: '/feed/' + fullPath: '/feed/' preLoaderRoute: typeof FeedIndexLazyImport parentRoute: typeof rootRoute } '/items/': { + id: '/items/' + path: '/items/' + fullPath: '/items/' preLoaderRoute: typeof ItemsIndexLazyImport parentRoute: typeof rootRoute } '/map/': { + id: '/map/' + path: '/map/' + fullPath: '/map/' preLoaderRoute: typeof MapIndexLazyImport parentRoute: typeof rootRoute } '/maps/': { + id: '/maps/' + path: '/maps/' + fullPath: '/maps/' preLoaderRoute: typeof MapsIndexLazyImport parentRoute: typeof rootRoute } '/packs/': { + id: '/packs/' + path: '/packs/' + fullPath: '/packs/' preLoaderRoute: typeof PacksIndexLazyImport parentRoute: typeof rootRoute } '/password-reset/': { + id: '/password-reset/' + path: '/password-reset/' + fullPath: '/password-reset/' preLoaderRoute: typeof PasswordResetIndexLazyImport parentRoute: typeof rootRoute } '/profile/': { + id: '/profile/' + path: '/profile/' + fullPath: '/profile/' preLoaderRoute: typeof ProfileIndexLazyImport parentRoute: typeof rootRoute } '/register/': { + id: '/register/' + path: '/register/' + fullPath: '/register/' preLoaderRoute: typeof RegisterIndexLazyImport parentRoute: typeof rootRoute } '/sign-in/': { + id: '/sign-in/' + path: '/sign-in/' + fullPath: '/sign-in/' preLoaderRoute: typeof SignInIndexLazyImport parentRoute: typeof rootRoute } '/trips/': { + id: '/trips/' + path: '/trips/' + fullPath: '/trips/' preLoaderRoute: typeof TripsIndexLazyImport parentRoute: typeof rootRoute } '/profile/settings/': { + id: '/profile/settings/' + path: '/profile/settings/' + fullPath: '/profile/settings/' preLoaderRoute: typeof ProfileSettingsIndexLazyImport parentRoute: typeof rootRoute } @@ -250,7 +313,7 @@ declare module '@tanstack/react-router' { // Create and export the route tree -export const routeTree = rootRoute.addChildren([ +export const routeTree = rootRoute.addChildren({ IndexRoute, DestinationQueryLazyRoute, PackIdLazyRoute, @@ -272,6 +335,6 @@ export const routeTree = rootRoute.addChildren([ SignInIndexLazyRoute, TripsIndexLazyRoute, ProfileSettingsIndexLazyRoute, -]) +}) /* prettier-ignore-end */ diff --git a/packages/app/components/card/CustomCardHeader.tsx b/packages/app/components/card/CustomCardHeader.tsx index 2ded650bc..4764b1456 100644 --- a/packages/app/components/card/CustomCardHeader.tsx +++ b/packages/app/components/card/CustomCardHeader.tsx @@ -15,10 +15,7 @@ export const CustomCardHeader = ({ data, title, link, actionsComponent }) => { return ( <> - {typeof title === "string" ? - {title} - : title - } + {typeof title === 'string' ? {title} : title} diff --git a/packages/app/components/carousel/ScrollButton.tsx b/packages/app/components/carousel/ScrollButton.tsx index f8a576ce3..a8ff689c3 100644 --- a/packages/app/components/carousel/ScrollButton.tsx +++ b/packages/app/components/carousel/ScrollButton.tsx @@ -28,8 +28,16 @@ const ScrollButton = ({ direction, onPress, disabled }: ScrollButtonProps) => { style={styles.scrollButton} disabled={disabled} > - {direction === 'left' && } - {direction != 'left' && } + {direction === 'left' && ( + + ⟨ + + )} + {direction != 'left' && ( + + ⟩ + + )} ); }; diff --git a/packages/app/components/carousel/index.tsx b/packages/app/components/carousel/index.tsx index 4c79fd617..9225414fb 100644 --- a/packages/app/components/carousel/index.tsx +++ b/packages/app/components/carousel/index.tsx @@ -30,7 +30,7 @@ const Carousel: React.FC = ({ children = [], itemWidth }) => { const scrollToIndex = (index: number) => { if (index >= 0 && index < children.length && scrollViewRef.current) { scrollViewRef.current.scrollTo({ - x: index * (itemWidth + 20), + x: index * 220, y: 0, animated: true, }); diff --git a/packages/app/components/itemtable/itemTable.tsx b/packages/app/components/itemtable/itemTable.tsx index ceb30136b..4c59ff20d 100644 --- a/packages/app/components/itemtable/itemTable.tsx +++ b/packages/app/components/itemtable/itemTable.tsx @@ -148,7 +148,7 @@ export const ItemsTable = ({ * @return {undefined} This function doesn't return anything. */ const handleNextPage = () => { - setPage(page + 1) + setPage(page + 1); }; /** * Handles the action of going to the previous page. @@ -236,11 +236,7 @@ export const ItemsTable = ({ disabled={page < 2} onPress={handlePreviousPage} > - + - + diff --git a/packages/app/components/map/NativeMap.native.tsx b/packages/app/components/map/NativeMap.native.tsx index aca7ad9b0..322a11cb6 100644 --- a/packages/app/components/map/NativeMap.native.tsx +++ b/packages/app/components/map/NativeMap.native.tsx @@ -118,8 +118,8 @@ function NativeMap({ shape: shapeProp }) { isPoint(shape) ? pointLatLong : isPolygonOrMultiPolygon(shape) - ? multiPolygonBounds(shape.features[0]) - : trailCenterPoint + ? multiPolygonBounds(shape.features[0]) + : trailCenterPoint } animationMode={'flyTo'} animationDuration={2000} diff --git a/packages/app/components/pack/AddPack.tsx b/packages/app/components/pack/AddPack.tsx index a8b69f703..dd0e06c6d 100644 --- a/packages/app/components/pack/AddPack.tsx +++ b/packages/app/components/pack/AddPack.tsx @@ -39,8 +39,7 @@ export const AddPack = ({ isCreatingTrip = false, onSuccess }) => { */ const handleAddPack = async (data) => { try { - - const response = await addNewPackAsync(data); + const response = await addNewPackAsync(data); onSuccess?.(); @@ -51,9 +50,8 @@ export const AddPack = ({ isCreatingTrip = false, onSuccess }) => { router.push(`/pack/${response.id}`); return; } - - setPackIdParam(response.id); + setPackIdParam(response.id); } catch {} }; @@ -85,7 +83,7 @@ export const AddPack = ({ isCreatingTrip = false, onSuccess }) => { placeholder={'Is Public'} /> diff --git a/packages/app/components/pack_table/TableItem.tsx b/packages/app/components/pack_table/TableItem.tsx index ee18ff74d..c303ed49b 100644 --- a/packages/app/components/pack_table/TableItem.tsx +++ b/packages/app/components/pack_table/TableItem.tsx @@ -99,7 +99,6 @@ const TableItem = ({ showTrigger={false} isOpen={activeModal === 'edit'} onClose={closeModal} - > diff --git a/packages/app/components/trip/createTripModal.tsx b/packages/app/components/trip/createTripModal.tsx index f747a11a0..f2a381ffa 100644 --- a/packages/app/components/trip/createTripModal.tsx +++ b/packages/app/components/trip/createTripModal.tsx @@ -56,6 +56,7 @@ export const SaveTripContainer = ({ tripStore }: SaveTripContainerProps) => { footerButtons={[ { label: 'Save', + color: '#6F9CDE', onClick: (_, closeModal) => submitTrigger(closeModal), }, ]} diff --git a/packages/app/context/FontLoader.tsx b/packages/app/context/FontLoader.tsx index 49e99d36e..cb10c5f18 100644 --- a/packages/app/context/FontLoader.tsx +++ b/packages/app/context/FontLoader.tsx @@ -1,7 +1,7 @@ import { useEffect } from 'react'; import { useFonts } from 'expo-font'; // import { SplashScreen } from 'expo-router'; -import { APP } from '@env'; +import { APP } from '@packrat/config'; // Expo vector icons import { diff --git a/packages/app/hooks/common/useCopyClipboard.ts b/packages/app/hooks/common/useCopyClipboard.ts index b21edb361..e1790a08d 100644 --- a/packages/app/hooks/common/useCopyClipboard.ts +++ b/packages/app/hooks/common/useCopyClipboard.ts @@ -18,11 +18,13 @@ export const useCopyClipboard = (link: string) => { console.error('Failed to copy text to clipboard', err); }); } else { - Clipboard.setStringAsync(copyLink).then(() => { - console.log('Text copied to clipboard'); - }).catch((err) => { - console.error('Failed to copy text to clipboard', err); - }); + Clipboard.setStringAsync(copyLink) + .then(() => { + console.log('Text copied to clipboard'); + }) + .catch((err) => { + console.error('Failed to copy text to clipboard', err); + }); } setIsCopied(true); diff --git a/packages/app/screens/about/AboutContent.tsx b/packages/app/screens/about/AboutContent.tsx index 6fe73a80d..04a5f8a38 100644 --- a/packages/app/screens/about/AboutContent.tsx +++ b/packages/app/screens/about/AboutContent.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { View, Text , ScrollView} from 'react-native'; +import { View, Text, ScrollView } from 'react-native'; import { FontAwesome, MaterialCommunityIcons } from '@expo/vector-icons'; import { RButton, RStack } from '@packrat/ui'; import useTheme from '../../hooks/useTheme'; diff --git a/packages/app/screens/trip/steps.tsx b/packages/app/screens/trip/steps.tsx index 0a5b12129..ae836651b 100644 --- a/packages/app/screens/trip/steps.tsx +++ b/packages/app/screens/trip/steps.tsx @@ -4,7 +4,7 @@ import { TripCard } from 'app/components/trip/TripCard'; import WeatherCard from 'app/components/weather/WeatherCard'; import { GearList } from 'app/components/GearList/GearList'; import { SaveTripContainer } from 'app/components/trip/createTripModal'; -import TripDateRange from 'app/components/trip/TripDateRange'; +import TripDateRange from 'app/components/trip/TripDateRange'; import useTheme from 'app/hooks/useTheme'; import useCustomStyles from 'app/hooks/useCustomStyles'; import { useFetchWeather, useFetchWeatherWeak } from 'app/hooks/weather'; diff --git a/packages/cli/src/doctor.js b/packages/cli/src/doctor.js index 178e94cc4..eda293aba 100644 --- a/packages/cli/src/doctor.js +++ b/packages/cli/src/doctor.js @@ -41,16 +41,16 @@ async function runDiagnostics() { name: 'appName', message: 'Select an app to diagnose:', choices: ['bun-server', 'expo', 'next', 'tauri', 'vite'], - } + }, ]); const configFileNames = { - 'expo': ['app.json'], - 'next': ['next.config.js'], - 'vite': ['vite.config.js'], + expo: ['app.json'], + next: ['next.config.js'], + vite: ['vite.config.js'], // Assuming generic checks for Bun and Tauri, adjust based on real config files 'bun-server': ['package.json'], - 'tauri': ['package.json'], + tauri: ['package.json'], }; await checkConfigFiles(response.appName, configFileNames[response.appName]); diff --git a/packages/config/src/index.js b/packages/config/src/index.js index 4c3e1ad1d..2f6119d51 100644 --- a/packages/config/src/index.js +++ b/packages/config/src/index.js @@ -2,71 +2,42 @@ import { Platform } from 'react-native'; import { viteSource } from './sources/vite'; /** - * @typedef {Object} EnvSource - * @property {string} prefix - The prefix used for environment variables in this source. - * @property {Object} source - The environment object (e.g., process.env or import.meta.env). + * Retrieves environment variables based on the platform and variable names. + * Ensures compatibility with Expo's static analysis for environment variables. */ -/** - * Array of environment sources with their prefixes and corresponding environment objects. - * @type {EnvSource[]} - */ -const envSources = [ - { - prefix: 'NEXT_PUBLIC_', - source: process.env, - }, - { - prefix: 'EXPO_PUBLIC_', - source: process.env, - }, - // Hacky way to prevent expo from crashing when running build due to import.meta.env not being supported - Platform.OS === 'web' ? viteSource : null, -]; - -/** - * Array of base names for the environment variables to retrieve. - * @type {string[]} - */ -const envMappings = [ - 'API_URL', - 'GOOGLE_ID', - 'IOS_CLIENT_ID', - 'ANDROID_CLIENT_ID', - 'MAPBOX_ACCESS_TOKEN', - 'APP', - 'CLIENT_URL', -]; - -/** - * Retrieves the value of an environment variable based on the provided key and environment sources. - * @param {string} key - The base name of the environment variable. - * @returns {string|undefined} - The value of the environment variable, or undefined if not found. - */ -function getEnvValue(key) { - for (const { prefix, source } of envSources) { - if (source) { - const envKey = prefix + key; - if (source[envKey]) { - return source[envKey]; - } - } - } - return undefined; -} - -/** - * Object containing the retrieved environment variable values. - * @type {Object} - */ -const envConfig = envMappings.reduce((config, key) => { - config[key] = getEnvValue(key); - return config; -}, {}); - -envConfig.NODE_ENV = process.env.NODE_ENV; - -export const { +// Simplifying environment variable access using logical OR +const API_URL = + viteSource?.VITE_PUBLIC_API_URL || + process.env.NEXT_PUBLIC_API_URL || + process.env.EXPO_PUBLIC_API_URL; +const GOOGLE_ID = + viteSource?.VITE_PUBLIC_GOOGLE_ID || + process.env.NEXT_PUBLIC_GOOGLE_ID || + process.env.EXPO_PUBLIC_GOOGLE_ID; +const IOS_CLIENT_ID = + viteSource?.VITE_PUBLIC_IOS_CLIENT_ID || + process.env.NEXT_PUBLIC_IOS_CLIENT_ID || + process.env.EXPO_PUBLIC_IOS_CLIENT_ID; +const ANDROID_CLIENT_ID = + viteSource?.VITE_PUBLIC_ANDROID_CLIENT_ID || + process.env.NEXT_PUBLIC_ANDROID_CLIENT_ID || + process.env.EXPO_PUBLIC_ANDROID_CLIENT_ID; +const MAPBOX_ACCESS_TOKEN = + viteSource?.VITE_PUBLIC_MAPBOX_ACCESS_TOKEN || + process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN || + process.env.EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN; +const APP = + viteSource?.VITE_PUBLIC_APP || + process.env.NEXT_PUBLIC_APP || + process.env.EXPO_PUBLIC_APP; +const CLIENT_URL = + viteSource?.VITE_PUBLIC_CLIENT_URL || + process.env.NEXT_PUBLIC_CLIENT_URL || + process.env.EXPO_PUBLIC_CLIENT_URL; +const NODE_ENV = process.env.NODE_ENV; + +export { API_URL, GOOGLE_ID, IOS_CLIENT_ID, @@ -75,18 +46,4 @@ export const { APP, CLIENT_URL, NODE_ENV, -} = envConfig; - -/** - * Example output: - * { - * API_URL: 'https://api.example.com', - * GOOGLE_ID: 'abc123', - * IOS_CLIENT_ID: 'def456', - * ANDROID_CLIENT_ID: 'ghi789', - * MAPBOX_ACCESS_TOKEN: 'xyz123', - * APP: 'my-app', - * CLIENT_URL: 'https://example.com', - * NODE_ENV: 'production' - * } - */ +}; diff --git a/packages/config/src/sources/vite/index.js b/packages/config/src/sources/vite/index.js index 393be8135..94c097945 100644 --- a/packages/config/src/sources/vite/index.js +++ b/packages/config/src/sources/vite/index.js @@ -1 +1 @@ -export * from './viteSource'; \ No newline at end of file +export * from './viteSource'; diff --git a/packages/config/src/sources/vite/viteSource.js b/packages/config/src/sources/vite/viteSource.js index d08d6bce2..77178efb1 100644 --- a/packages/config/src/sources/vite/viteSource.js +++ b/packages/config/src/sources/vite/viteSource.js @@ -1,4 +1 @@ -export const viteSource = { - prefix: 'VITE_', - source: import.meta.env, -}; +export const viteSource = import.meta.env; diff --git a/packages/config/src/sources/vite/viteSource.native.js b/packages/config/src/sources/vite/viteSource.native.js index 62d059dbf..54c8ceef6 100644 --- a/packages/config/src/sources/vite/viteSource.native.js +++ b/packages/config/src/sources/vite/viteSource.native.js @@ -1,6 +1,4 @@ -// DUMMY FILE +// DUMMY FILE. This is not actually used in the project. It is to fix Expo's build process. + +export const viteSource = process.env, -export const viteSource = { - prefix: 'VITE_', - source: process.env, -}; diff --git a/packages/crosspath/types/lib-interface.d.ts b/packages/crosspath/types/lib-interface.d.ts index 524b24431..acf8c94d3 100644 --- a/packages/crosspath/types/lib-interface.d.ts +++ b/packages/crosspath/types/lib-interface.d.ts @@ -1,4 +1,6 @@ import { LinkComponent, Router, CreateParam } from './model'; -export declare function Link(props: Parameters): ReturnType; +export declare function Link( + props: Parameters, +): ReturnType; export declare const createParam: CreateParam; export declare function useRouter(): Router; diff --git a/packages/crosspath/types/model/types.d.ts b/packages/crosspath/types/model/types.d.ts index 9c3ee437d..5e7b7414e 100644 --- a/packages/crosspath/types/model/types.d.ts +++ b/packages/crosspath/types/model/types.d.ts @@ -1,27 +1,32 @@ import { FC } from 'react'; import { LinkProps } from 'solito/link'; export interface CreateParamOptions { - initial?: string; - parse?: (param: string) => unknown; - stringify?: (param: unknown) => string; + initial?: string; + parse?: (param: string) => unknown; + stringify?: (param: unknown) => string; } export interface Router { - push: (url: URL) => void; - replace: (url: URL) => void; - back: () => void; + push: (url: URL) => void; + replace: (url: URL) => void; + back: () => void; } export type LinkComponent = FC; -export type URL = string | { - pathname?: string; - query?: Record; - state?: Record; - hash?: string; - as?: string | object; -}; -export type CreateParam = () => { - useParam: (key: keyof T, options?: CreateParamOptions) => [value: any, setValue: (value: any) => void]; - useParams: (key: keyof T) => { - params: T; - setParams: (value: any) => void; +export type URL = + | string + | { + pathname?: string; + query?: Record; + state?: Record; + hash?: string; + as?: string | object; }; +export type CreateParam = () => { + useParam: ( + key: keyof T, + options?: CreateParamOptions, + ) => [value: any, setValue: (value: any) => void]; + useParams: (key: keyof T) => { + params: T; + setParams: (value: any) => void; + }; }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/LmAlert.tsx b/packages/ui/src/extras/lib/core/src/core/content/LmAlert.tsx index d1fcd80e5..31c80d8ea 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/LmAlert.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/LmAlert.tsx @@ -8,25 +8,25 @@ import { useThemeName, XStack, XStackProps, -} from 'tamagui' +} from 'tamagui'; import { CheckCircleRegular, IconProps, InfoRegular, WarningCircleRegular, WarningRegular, -} from './icons' +} from './icons'; -type Severity = 'default' | 'error' | 'info' | 'warning' | 'success' +type Severity = 'default' | 'error' | 'info' | 'warning' | 'success'; export type LmAlertProps = CardProps & { - severity?: Severity - text?: string - outlined?: boolean - hideIcon?: boolean - paragraphProps?: ParagraphProps - xStackProps?: XStackProps - iconProps?: IconProps -} + severity?: Severity; + text?: string; + outlined?: boolean; + hideIcon?: boolean; + paragraphProps?: ParagraphProps; + xStackProps?: XStackProps; + iconProps?: IconProps; +}; const severityColor: { [k in Severity]: ColorProp } = { default: '$gray3', @@ -34,20 +34,24 @@ const severityColor: { [k in Severity]: ColorProp } = { info: '$blue10', warning: '$orange10', success: '$green10', -} +}; type AlertIconProps = { - severity?: Severity - outlined?: boolean - shouldInvert?: boolean -} + severity?: Severity; + outlined?: boolean; + shouldInvert?: boolean; +}; -function AlertIcon({ severity = 'default', outlined, shouldInvert }: AlertIconProps) { - const props: { color?: ColorTokens } = {} +function AlertIcon({ + severity = 'default', + outlined, + shouldInvert, +}: AlertIconProps) { + const props: { color?: ColorTokens } = {}; if (outlined) { - props.color = severityColor[severity] as ColorTokens + props.color = severityColor[severity] as ColorTokens; } else if (shouldInvert) { - props.color = 'white' + props.color = 'white'; } return { default: , @@ -55,7 +59,7 @@ function AlertIcon({ severity = 'default', outlined, shouldInvert }: AlertIconPr info: , warning: , success: , - }[severity] + }[severity]; } export function LmAlert({ @@ -69,8 +73,8 @@ export function LmAlert({ iconProps, ...rest }: LmAlertProps) { - const theme = useThemeName() - let shouldInverse = theme === 'light' && severity !== 'default' && !outlined + const theme = useThemeName(); + let shouldInverse = theme === 'light' && severity !== 'default' && !outlined; return ( {text && ( {text} @@ -103,5 +113,5 @@ export function LmAlert({ {children} - ) + ); } diff --git a/packages/ui/src/extras/lib/core/src/core/content/LmAspectRatio.tsx b/packages/ui/src/extras/lib/core/src/core/content/LmAspectRatio.tsx index b5830c763..77d9c40c1 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/LmAspectRatio.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/LmAspectRatio.tsx @@ -1,3 +1,3 @@ -import {styled, ThemeableStack} from "tamagui"; +import { styled, ThemeableStack } from 'tamagui'; -export const LmAspectRatio = styled(ThemeableStack, {}) \ No newline at end of file +export const LmAspectRatio = styled(ThemeableStack, {}); diff --git a/packages/ui/src/extras/lib/core/src/core/content/LmAvatar.tsx b/packages/ui/src/extras/lib/core/src/core/content/LmAvatar.tsx index de063ed67..8d2b1aeab 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/LmAvatar.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/LmAvatar.tsx @@ -1,14 +1,28 @@ -import { Avatar, AvatarProps, FontSizeTokens, ImageProps, Paragraph, ParagraphProps } from 'tamagui' +import { + Avatar, + AvatarProps, + FontSizeTokens, + ImageProps, + Paragraph, + ParagraphProps, +} from 'tamagui'; export type LmAvatarProps = AvatarProps & { - color?: AvatarProps['backgroundColor'] - src?: string - letter?: string - letterProps?: ParagraphProps - imageProps?: ImageProps -} + color?: AvatarProps['backgroundColor']; + src?: string; + letter?: string; + letterProps?: ParagraphProps; + imageProps?: ImageProps; +}; -export function LmAvatar({ color, src, letter, letterProps, imageProps, ...rest }: LmAvatarProps) { +export function LmAvatar({ + color, + src, + letter, + letterProps, + imageProps, + ...rest +}: LmAvatarProps) { return ( )} - ) + ); } diff --git a/packages/ui/src/extras/lib/core/src/core/content/LmCard.tsx b/packages/ui/src/extras/lib/core/src/core/content/LmCard.tsx index ce7f87ca0..726b449fd 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/LmCard.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/LmCard.tsx @@ -1,20 +1,20 @@ -import { Card, CardProps, H2, Paragraph, ThemeName } from 'tamagui' -import { PropsWithChildren, ReactNode } from 'react' -import { LmImage } from './LmImage' +import { Card, CardProps, H2, Paragraph, ThemeName } from 'tamagui'; +import { PropsWithChildren, ReactNode } from 'react'; +import { LmImage } from './LmImage'; export type LmCardProps = PropsWithChildren< CardProps & { - bouncy?: boolean - title?: string - subTitle?: string - footer?: ReactNode + bouncy?: boolean; + title?: string; + subTitle?: string; + footer?: ReactNode; image?: { - width: number - height: number - src: string - } + width: number; + height: number; + src: string; + }; } -> +>; export const LmCard = ({ bouncy, @@ -65,5 +65,5 @@ export const LmCard = ({ )} - ) -} + ); +}; diff --git a/packages/ui/src/extras/lib/core/src/core/content/LmGrid.tsx b/packages/ui/src/extras/lib/core/src/core/content/LmGrid.tsx index 69a3cc235..8fa1bb445 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/LmGrid.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/LmGrid.tsx @@ -1,4 +1,4 @@ -import { styled, ThemeableStack } from 'tamagui' +import { styled, ThemeableStack } from 'tamagui'; export const LmGrid = styled(ThemeableStack, { variants: { @@ -60,7 +60,7 @@ export const LmGrid = styled(ThemeableStack, { return { alignItems: 'center', justifyContent: 'center', - } + }; } }, }, @@ -143,4 +143,4 @@ export const LmGrid = styled(ThemeableStack, { }), }, } as const, -}) +}); diff --git a/packages/ui/src/extras/lib/core/src/core/content/LmImage.tsx b/packages/ui/src/extras/lib/core/src/core/content/LmImage.tsx index 45a9cb17c..a36fd92c3 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/LmImage.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/LmImage.tsx @@ -1,6 +1,6 @@ -import { Image, ImageProps, Stack } from 'tamagui' +import { Image, ImageProps, Stack } from 'tamagui'; -export type LmImageProps = ImageProps +export type LmImageProps = ImageProps; export function LmImage({ aspectRatio, ...props }: LmImageProps) { if (aspectRatio) { @@ -14,7 +14,7 @@ export function LmImage({ aspectRatio, ...props }: LmImageProps) { resizeMode={'contain'} /> - ) + ); } - return + return ; } diff --git a/packages/ui/src/extras/lib/core/src/core/content/LmSkeleton.tsx b/packages/ui/src/extras/lib/core/src/core/content/LmSkeleton.tsx index 4f8135124..8b5285e2b 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/LmSkeleton.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/LmSkeleton.tsx @@ -1,10 +1,19 @@ -import {Spinner, Stack} from "tamagui"; +import { Spinner, Stack } from 'tamagui'; export function LmSkeleton() { - return ( - - - - ) -} \ No newline at end of file + return ( + + + + ); +} diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowClockwise.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowClockwise.tsx index 621c05350..c8f11b053 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowClockwise.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowClockwise.tsx @@ -1,9 +1,14 @@ -import { memo } from 'react' -import { Path as _Path, Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Path as _Path, + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -24,8 +29,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'ArrowClockwiseRegular' -const ArrowClockwiseRegular = memo(themed(Icon)) -export { ArrowClockwiseRegular } + ); +}; +Icon.displayName = 'ArrowClockwiseRegular'; +const ArrowClockwiseRegular = memo(themed(Icon)); +export { ArrowClockwiseRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowCounterClockwise.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowCounterClockwise.tsx index 0c20d47f8..0c4a31dcf 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowCounterClockwise.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowCounterClockwise.tsx @@ -1,9 +1,14 @@ -import { memo } from 'react' -import { Path as _Path, Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Path as _Path, + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -24,8 +29,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'ArrowCounterClockwiseRegular' -const ArrowCounterClockwiseRegular = memo(themed(Icon)) -export { ArrowCounterClockwiseRegular } + ); +}; +Icon.displayName = 'ArrowCounterClockwiseRegular'; +const ArrowCounterClockwiseRegular = memo(themed(Icon)); +export { ArrowCounterClockwiseRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowLeft.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowLeft.tsx index f4a5b209e..99fba788e 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowLeft.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowLeft.tsx @@ -1,9 +1,14 @@ -import { memo } from 'react' -import { Line as _Line, Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Line as _Line, + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -27,8 +32,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'ArrowLeftRegular' -const ArrowLeftRegular = memo(themed(Icon)) -export { ArrowLeftRegular } + ); +}; +Icon.displayName = 'ArrowLeftRegular'; +const ArrowLeftRegular = memo(themed(Icon)); +export { ArrowLeftRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowRight.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowRight.tsx index b4c76b6b6..f0fdfc56d 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowRight.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/ArrowRight.tsx @@ -1,9 +1,14 @@ -import { memo } from 'react' -import { Line as _Line, Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Line as _Line, + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -27,8 +32,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'ArrowRightRegular' -const ArrowRightRegular = memo(themed(Icon)) -export { ArrowRightRegular } + ); +}; +Icon.displayName = 'ArrowRightRegular'; +const ArrowRightRegular = memo(themed(Icon)); +export { ArrowRightRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/Calendar.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/Calendar.tsx index cc543c76a..8b0eb0224 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/Calendar.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/Calendar.tsx @@ -1,15 +1,15 @@ -import { memo } from 'react' +import { memo } from 'react'; import { Line as _Line, Path as _Path, Polyline as _Polyline, Rect as _Rect, Svg as _Svg, -} from 'react-native-svg' -import { themed } from './themed' +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -75,8 +75,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'CalendarRegular' -const CalendarRegular = memo(themed(Icon)) -export { CalendarRegular } + ); +}; +Icon.displayName = 'CalendarRegular'; +const CalendarRegular = memo(themed(Icon)); +export { CalendarRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDoubleLeft.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDoubleLeft.tsx index fa1722299..c070593b7 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDoubleLeft.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDoubleLeft.tsx @@ -1,9 +1,13 @@ -import { memo } from 'react' -import { Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -24,8 +28,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'CaretDoubleLeftRegular' -const CaretDoubleLeftRegular = memo(themed(Icon)) -export { CaretDoubleLeftRegular } + ); +}; +Icon.displayName = 'CaretDoubleLeftRegular'; +const CaretDoubleLeftRegular = memo(themed(Icon)); +export { CaretDoubleLeftRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDoubleRight.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDoubleRight.tsx index 43b8fa270..a96e1aac2 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDoubleRight.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDoubleRight.tsx @@ -1,9 +1,13 @@ -import { memo } from 'react' -import { Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -24,8 +28,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'CaretDoubleRightRegular' -const CaretDoubleRightRegular = memo(themed(Icon)) -export { CaretDoubleRightRegular } + ); +}; +Icon.displayName = 'CaretDoubleRightRegular'; +const CaretDoubleRightRegular = memo(themed(Icon)); +export { CaretDoubleRightRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDown.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDown.tsx index d6267c6bf..d21b170c8 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDown.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretDown.tsx @@ -1,9 +1,13 @@ -import { memo } from 'react' -import { Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -16,8 +20,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'CaretDownRegular' -const CaretDownRegular = memo(themed(Icon)) -export { CaretDownRegular } + ); +}; +Icon.displayName = 'CaretDownRegular'; +const CaretDownRegular = memo(themed(Icon)); +export { CaretDownRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretLeft.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretLeft.tsx index 24d68acc0..41294b684 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretLeft.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretLeft.tsx @@ -1,9 +1,13 @@ -import { memo } from 'react' -import { Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -16,8 +20,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'CaretLeftRegular' -const CaretLeftRegular = memo(themed(Icon)) -export { CaretLeftRegular } + ); +}; +Icon.displayName = 'CaretLeftRegular'; +const CaretLeftRegular = memo(themed(Icon)); +export { CaretLeftRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretRight.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretRight.tsx index 5633ef7cb..ed185b202 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretRight.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretRight.tsx @@ -1,9 +1,13 @@ -import { memo } from 'react' -import { Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -16,8 +20,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'CaretRightRegular' -const CaretRightRegular = memo(themed(Icon)) -export { CaretRightRegular } + ); +}; +Icon.displayName = 'CaretRightRegular'; +const CaretRightRegular = memo(themed(Icon)); +export { CaretRightRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretUp.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretUp.tsx index 428b0c766..7628d8526 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/CaretUp.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/CaretUp.tsx @@ -1,9 +1,13 @@ -import { memo } from 'react' -import { Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -16,8 +20,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'CaretUpRegular' -const CaretUpRegular = memo(themed(Icon)) -export { CaretUpRegular } + ); +}; +Icon.displayName = 'CaretUpRegular'; +const CaretUpRegular = memo(themed(Icon)); +export { CaretUpRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/Check.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/Check.tsx index b345875c7..048618d9d 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/Check.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/Check.tsx @@ -1,9 +1,13 @@ -import { memo } from 'react' -import { Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -16,8 +20,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'CheckRegular' -const CheckRegular = memo(themed(Icon)) -export { CheckRegular } + ); +}; +Icon.displayName = 'CheckRegular'; +const CheckRegular = memo(themed(Icon)); +export { CheckRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/CheckCircle.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/CheckCircle.tsx index d63acd920..d394fdb2a 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/CheckCircle.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/CheckCircle.tsx @@ -1,14 +1,14 @@ -import { memo } from 'react' +import { memo } from 'react'; import { Circle as _Circle, Polyline as _Polyline, Rect as _Rect, Svg as _Svg, -} from 'react-native-svg' -import { themed } from './themed' +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -31,8 +31,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'CheckCircleRegular' -const CheckCircleRegular = memo(themed(Icon)) -export { CheckCircleRegular } + ); +}; +Icon.displayName = 'CheckCircleRegular'; +const CheckCircleRegular = memo(themed(Icon)); +export { CheckCircleRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/CheckSquare.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/CheckSquare.tsx index c166c7605..a6a56e78a 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/CheckSquare.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/CheckSquare.tsx @@ -1,9 +1,13 @@ -import { memo } from 'react' -import { Polyline as _Polyline, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Polyline as _Polyline, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -28,8 +32,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'CheckSquareRegular' -const CheckSquareRegular = memo(themed(Icon)) -export { CheckSquareRegular } + ); +}; +Icon.displayName = 'CheckSquareRegular'; +const CheckSquareRegular = memo(themed(Icon)); +export { CheckSquareRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/Eye.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/Eye.tsx index c80016b5c..e225ad21d 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/Eye.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/Eye.tsx @@ -1,9 +1,14 @@ -import { memo } from 'react' -import { Circle as _Circle, Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Circle as _Circle, + Path as _Path, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -26,8 +31,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'EyeRegular' -const EyeRegular = memo(themed(Icon)) -export { EyeRegular } + ); +}; +Icon.displayName = 'EyeRegular'; +const EyeRegular = memo(themed(Icon)); +export { EyeRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/EyeSlash.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/EyeSlash.tsx index 115d1efb2..9671ff2dc 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/EyeSlash.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/EyeSlash.tsx @@ -1,58 +1,63 @@ -import { memo } from 'react' - import { Line as _Line, Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg' - import { themed } from './themed' +import { memo } from 'react'; +import { + Line as _Line, + Path as _Path, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; - const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props - return ( - <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> - <_Rect width="256" height="256" fill="none" /> - <_Line - x1="48" - y1="40" - x2="208" - y2="216" - fill="none" - stroke={`${color}`} - strokeLinecap="round" - strokeLinejoin="round" - strokeWidth="16" - /> - <_Path - d="M154.9,157.6A39.6,39.6,0,0,1,128,168a40,40,0,0,1-26.9-69.6" - fill="none" - stroke={`${color}`} - strokeLinecap="round" - strokeLinejoin="round" - strokeWidth="16" - /> - <_Path - d="M74,68.6C33.2,89.2,16,128,16,128s32,72,112,72a117.9,117.9,0,0,0,54-12.6" - fill="none" - stroke={`${color}`} - strokeLinecap="round" - strokeLinejoin="round" - strokeWidth="16" - /> - <_Path - d="M208.6,169.1C230.4,149.6,240,128,240,128S208,56,128,56a123.9,123.9,0,0,0-20.7,1.7" - fill="none" - stroke={`${color}`} - strokeLinecap="round" - strokeLinejoin="round" - strokeWidth="16" - /> - <_Path - d="M135.5,88.7a39.9,39.9,0,0,1,32.3,35.5" - fill="none" - stroke={`${color}`} - strokeLinecap="round" - strokeLinejoin="round" - strokeWidth="16" - /> - - ) - } - Icon.displayName = 'EyeSlashRegular' - const EyeSlashRegular = memo(themed(Icon)) - export { EyeSlashRegular } \ No newline at end of file +const Icon = (props) => { + const { color = 'black', size = 24, ...otherProps } = props; + return ( + <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> + <_Rect width="256" height="256" fill="none" /> + <_Line + x1="48" + y1="40" + x2="208" + y2="216" + fill="none" + stroke={`${color}`} + strokeLinecap="round" + strokeLinejoin="round" + strokeWidth="16" + /> + <_Path + d="M154.9,157.6A39.6,39.6,0,0,1,128,168a40,40,0,0,1-26.9-69.6" + fill="none" + stroke={`${color}`} + strokeLinecap="round" + strokeLinejoin="round" + strokeWidth="16" + /> + <_Path + d="M74,68.6C33.2,89.2,16,128,16,128s32,72,112,72a117.9,117.9,0,0,0,54-12.6" + fill="none" + stroke={`${color}`} + strokeLinecap="round" + strokeLinejoin="round" + strokeWidth="16" + /> + <_Path + d="M208.6,169.1C230.4,149.6,240,128,240,128S208,56,128,56a123.9,123.9,0,0,0-20.7,1.7" + fill="none" + stroke={`${color}`} + strokeLinecap="round" + strokeLinejoin="round" + strokeWidth="16" + /> + <_Path + d="M135.5,88.7a39.9,39.9,0,0,1,32.3,35.5" + fill="none" + stroke={`${color}`} + strokeLinecap="round" + strokeLinejoin="round" + strokeWidth="16" + /> + + ); +}; +Icon.displayName = 'EyeSlashRegular'; +const EyeSlashRegular = memo(themed(Icon)); +export { EyeSlashRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/IconProps.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/IconProps.tsx index 377a4eab1..892dd98c4 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/IconProps.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/IconProps.tsx @@ -1,11 +1,11 @@ -import { ColorTokens, SizeTokens, ThemeTokens } from '@tamagui/core' -import { SvgProps } from 'react-native-svg' +import { ColorTokens, SizeTokens, ThemeTokens } from '@tamagui/core'; +import { SvgProps } from 'react-native-svg'; export type IconContextProps = { - size?: number | SizeTokens - color?: (ColorTokens | ThemeTokens) | null - style?: any - weight?: 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone' -} + size?: number | SizeTokens; + color?: (ColorTokens | ThemeTokens) | null; + style?: any; + weight?: 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone'; +}; -export type IconProps = SvgProps & IconContextProps +export type IconProps = SvgProps & IconContextProps; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/Info.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/Info.tsx index 0e4d3fbe8..e99b75314 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/Info.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/Info.tsx @@ -1,14 +1,14 @@ -import { memo } from 'react' +import { memo } from 'react'; import { Circle as _Circle, Polyline as _Polyline, Rect as _Rect, Svg as _Svg, -} from 'react-native-svg' -import { themed } from './themed' +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -32,8 +32,8 @@ const Icon = (props) => { /> <_Circle cx="126" cy="84" r="12" fill={`${color}`} /> - ) -} -Icon.displayName = 'InfoRegular' -const InfoRegular = memo(themed(Icon)) -export { InfoRegular } + ); +}; +Icon.displayName = 'InfoRegular'; +const InfoRegular = memo(themed(Icon)); +export { InfoRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/List.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/List.tsx index b6cf425a0..cc9999054 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/List.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/List.tsx @@ -1,9 +1,9 @@ -import { memo } from 'react' -import { Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -38,8 +38,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'ListRegular' -const ListRegular = memo(themed(Icon)) -export { ListRegular } + ); +}; +Icon.displayName = 'ListRegular'; +const ListRegular = memo(themed(Icon)); +export { ListRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/ListNumbers.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/ListNumbers.tsx index 13474c63c..646f9c660 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/ListNumbers.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/ListNumbers.tsx @@ -1,15 +1,15 @@ -import { memo } from 'react' +import { memo } from 'react'; import { Line as _Line, Path as _Path, Polyline as _Polyline, Rect as _Rect, Svg as _Svg, -} from 'react-native-svg' -import { themed } from './themed' +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -60,8 +60,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'ListNumbersRegular' -const ListNumbersRegular = memo(themed(Icon)) -export { ListNumbersRegular } + ); +}; +Icon.displayName = 'ListNumbersRegular'; +const ListNumbersRegular = memo(themed(Icon)); +export { ListNumbersRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/ListPlus.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/ListPlus.tsx index deff3d0ab..fec5d542d 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/ListPlus.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/ListPlus.tsx @@ -1,9 +1,9 @@ -import { memo } from 'react' -import { Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -63,8 +63,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'ListPlusRegular' -const ListPlusRegular = memo(themed(Icon)) -export { ListPlusRegular } + ); +}; +Icon.displayName = 'ListPlusRegular'; +const ListPlusRegular = memo(themed(Icon)); +export { ListPlusRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/Minus.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/Minus.tsx index 51c580594..00a69979d 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/Minus.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/Minus.tsx @@ -1,11 +1,11 @@ -import React, { memo } from 'react' -import { Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg' +import React, { memo } from 'react'; +import { Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg'; -import { themed } from './themed' -import { IconProps } from './IconProps' +import { themed } from './themed'; +import { IconProps } from './IconProps'; const Icon = (props: IconProps) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -21,9 +21,9 @@ const Icon = (props: IconProps) => { strokeWidth="16" /> - ) -} + ); +}; -Icon.displayName = 'MinusRegular' +Icon.displayName = 'MinusRegular'; -export const MinusRegular = memo(themed(Icon)) +export const MinusRegular = memo(themed(Icon)); diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/Quotes.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/Quotes.tsx index b6e2258ea..443247106 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/Quotes.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/Quotes.tsx @@ -1,9 +1,9 @@ -import { memo } from 'react' -import { Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -24,8 +24,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'QuotesRegular' -const QuotesRegular = memo(themed(Icon)) -export { QuotesRegular } + ); +}; +Icon.displayName = 'QuotesRegular'; +const QuotesRegular = memo(themed(Icon)); +export { QuotesRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/Square.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/Square.tsx index 5ffee2bbe..fcfd9bd84 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/Square.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/Square.tsx @@ -1,9 +1,9 @@ -import { memo } from 'react' -import { Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { Rect as _Rect, Svg as _Svg } from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -20,8 +20,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'SquareRegular' -const SquareRegular = memo(themed(Icon)) -export { SquareRegular } + ); +}; +Icon.displayName = 'SquareRegular'; +const SquareRegular = memo(themed(Icon)); +export { SquareRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/Star.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/Star.tsx index 29002a055..8c67e8959 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/Star.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/Star.tsx @@ -1,9 +1,9 @@ -import { memo } from 'react' -import { Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -16,8 +16,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'StarRegular' -const StarRegular = memo(themed(Icon)) -export { StarRegular } + ); +}; +Icon.displayName = 'StarRegular'; +const StarRegular = memo(themed(Icon)); +export { StarRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/StarFill.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/StarFill.tsx index 66b3455ba..3454e3efc 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/StarFill.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/StarFill.tsx @@ -1,16 +1,22 @@ -import { memo } from 'react' -import { Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( - <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size} fill={`${color}`}> + <_Svg + viewBox="0 0 256 256" + {...otherProps} + height={size} + width={size} + fill={`${color}`} + > <_Rect width="256" height="256" fill="none" /> <_Path d="M239.2,97.4A16.4,16.4,0,0,0,224.6,86l-59.4-4.1-22-55.5A16.4,16.4,0,0,0,128,16h0a16.4,16.4,0,0,0-15.2,10.4L90.4,82.2,31.4,86A16.5,16.5,0,0,0,16.8,97.4,16.8,16.8,0,0,0,22,115.5l45.4,38.4L53.9,207a18.5,18.5,0,0,0,7,19.6,18,18,0,0,0,20.1.6l46.9-29.7h.2l50.5,31.9a16.1,16.1,0,0,0,8.7,2.6,16.5,16.5,0,0,0,15.8-20.8l-14.3-58.1L234,115.5A16.8,16.8,0,0,0,239.2,97.4Z" /> - ) -} -Icon.displayName = 'StarFill' -const StarFill = memo(themed(Icon)) -export { StarFill } + ); +}; +Icon.displayName = 'StarFill'; +const StarFill = memo(themed(Icon)); +export { StarFill }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/Sun.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/Sun.tsx index e2f9f5327..d4ef793b7 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/Sun.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/Sun.tsx @@ -1,11 +1,16 @@ -import React, { memo } from 'react' -import { Circle as _Circle, Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg' +import React, { memo } from 'react'; +import { + Circle as _Circle, + Line as _Line, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; -import { themed } from './themed' -import { IconProps } from './IconProps' +import { themed } from './themed'; +import { IconProps } from './IconProps'; const Icon = (props: IconProps) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -108,9 +113,9 @@ const Icon = (props: IconProps) => { strokeWidth="16" /> - ) -} + ); +}; -Icon.displayName = 'SunRegular' +Icon.displayName = 'SunRegular'; -export const SunRegular = memo(themed(Icon)) +export const SunRegular = memo(themed(Icon)); diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/TextBolder.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/TextBolder.tsx index e2f754a55..ea5910a96 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/TextBolder.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/TextBolder.tsx @@ -1,9 +1,9 @@ -import { memo } from 'react' -import { Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -16,8 +16,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'TextBolderRegular' -const TextBolderRegular = memo(themed(Icon)) -export { TextBolderRegular } + ); +}; +Icon.displayName = 'TextBolderRegular'; +const TextBolderRegular = memo(themed(Icon)); +export { TextBolderRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/TextItalic.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/TextItalic.tsx index 661aabffa..3bea4274d 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/TextItalic.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/TextItalic.tsx @@ -1,9 +1,9 @@ -import { memo } from 'react' -import { Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -41,8 +41,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'TextItalicRegular' -const TextItalicRegular = memo(themed(Icon)) -export { TextItalicRegular } + ); +}; +Icon.displayName = 'TextItalicRegular'; +const TextItalicRegular = memo(themed(Icon)); +export { TextItalicRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/TextStrikethrough.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/TextStrikethrough.tsx index e60ae0285..03595fc1e 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/TextStrikethrough.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/TextStrikethrough.tsx @@ -1,9 +1,14 @@ -import { memo } from 'react' -import { Line as _Line, Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Line as _Line, + Path as _Path, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -35,8 +40,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'TextStrikethroughRegular' -const TextStrikethroughRegular = memo(themed(Icon)) -export { TextStrikethroughRegular } + ); +}; +Icon.displayName = 'TextStrikethroughRegular'; +const TextStrikethroughRegular = memo(themed(Icon)); +export { TextStrikethroughRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/TextUnderline.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/TextUnderline.tsx index fac0150c8..f6fc42c0c 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/TextUnderline.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/TextUnderline.tsx @@ -1,9 +1,14 @@ -import { memo } from 'react' -import { Line as _Line, Path as _Path, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Line as _Line, + Path as _Path, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -27,8 +32,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'TextUnderlineRegular' -const TextUnderlineRegular = memo(themed(Icon)) -export { TextUnderlineRegular } + ); +}; +Icon.displayName = 'TextUnderlineRegular'; +const TextUnderlineRegular = memo(themed(Icon)); +export { TextUnderlineRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/Warning.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/Warning.tsx index 2bdcd29d8..19f74749c 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/Warning.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/Warning.tsx @@ -1,15 +1,15 @@ -import { memo } from 'react' +import { memo } from 'react'; import { Circle as _Circle, Line as _Line, Path as _Path, Rect as _Rect, Svg as _Svg, -} from 'react-native-svg' -import { themed } from './themed' +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -34,8 +34,8 @@ const Icon = (props) => { /> <_Circle cx="128" cy="180" r="12" fill={`${color}`} /> - ) -} -Icon.displayName = 'WarningRegular' -const WarningRegular = memo(themed(Icon)) -export { WarningRegular } + ); +}; +Icon.displayName = 'WarningRegular'; +const WarningRegular = memo(themed(Icon)); +export { WarningRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/WarningCircle.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/WarningCircle.tsx index 395c49dd0..705150eaf 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/WarningCircle.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/WarningCircle.tsx @@ -1,9 +1,14 @@ -import { memo } from 'react' -import { Circle as _Circle, Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { + Circle as _Circle, + Line as _Line, + Rect as _Rect, + Svg as _Svg, +} from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -29,8 +34,8 @@ const Icon = (props) => { /> <_Circle cx="128" cy="172" r="12" fill={`${color}`} /> - ) -} -Icon.displayName = 'WarningCircleRegular' -const WarningCircleRegular = memo(themed(Icon)) -export { WarningCircleRegular } + ); +}; +Icon.displayName = 'WarningCircleRegular'; +const WarningCircleRegular = memo(themed(Icon)); +export { WarningCircleRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/X.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/X.tsx index d65ae4355..06c7d71fd 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/X.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/X.tsx @@ -1,9 +1,9 @@ -import { memo } from 'react' -import { Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg' -import { themed } from './themed' +import { memo } from 'react'; +import { Line as _Line, Rect as _Rect, Svg as _Svg } from 'react-native-svg'; +import { themed } from './themed'; const Icon = (props) => { - const { color = 'black', size = 24, ...otherProps } = props + const { color = 'black', size = 24, ...otherProps } = props; return ( <_Svg viewBox="0 0 256 256" {...otherProps} height={size} width={size}> <_Rect width="256" height="256" fill="none" /> @@ -28,8 +28,8 @@ const Icon = (props) => { strokeWidth="16" /> - ) -} -Icon.displayName = 'XRegular' -const XRegular = memo(themed(Icon)) -export { XRegular } + ); +}; +Icon.displayName = 'XRegular'; +const XRegular = memo(themed(Icon)); +export { XRegular }; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/index.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/index.tsx index d13c20bc1..da5147cb0 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/index.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/index.tsx @@ -1,34 +1,34 @@ -export * from './CaretDown' -export * from './CaretDoubleRight' -export * from './CaretDoubleLeft' -export * from './CaretLeft' -export * from './CaretRight' -export * from './ArrowLeft' -export * from './ArrowRight' -export * from './Calendar' -export * from './X' -export * from './WarningCircle' -export * from './Warning' -export * from './CheckCircle' -export * from './Info' -export * from './ListPlus' -export * from './Square' -export * from './CheckSquare' -export * from './Check' -export * from './CaretUp' -export * from './Star' -export * from './StarFill' -export * from './Eye' -export * from './EyeSlash' -export * from './IconProps' -export * from './ArrowClockwise' -export * from './ArrowCounterClockwise' -export * from './List' -export * from './ListNumbers' -export * from './Quotes' -export * from './TextBolder' -export * from './TextItalic' -export * from './TextStrikethrough' -export * from './TextUnderline' -export * from './Sun' -export * from './Minus' +export * from './CaretDown'; +export * from './CaretDoubleRight'; +export * from './CaretDoubleLeft'; +export * from './CaretLeft'; +export * from './CaretRight'; +export * from './ArrowLeft'; +export * from './ArrowRight'; +export * from './Calendar'; +export * from './X'; +export * from './WarningCircle'; +export * from './Warning'; +export * from './CheckCircle'; +export * from './Info'; +export * from './ListPlus'; +export * from './Square'; +export * from './CheckSquare'; +export * from './Check'; +export * from './CaretUp'; +export * from './Star'; +export * from './StarFill'; +export * from './Eye'; +export * from './EyeSlash'; +export * from './IconProps'; +export * from './ArrowClockwise'; +export * from './ArrowCounterClockwise'; +export * from './List'; +export * from './ListNumbers'; +export * from './Quotes'; +export * from './TextBolder'; +export * from './TextItalic'; +export * from './TextStrikethrough'; +export * from './TextUnderline'; +export * from './Sun'; +export * from './Minus'; diff --git a/packages/ui/src/extras/lib/core/src/core/content/icons/themed.tsx b/packages/ui/src/extras/lib/core/src/core/content/icons/themed.tsx index 77b01b8ac..7acc8291f 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/icons/themed.tsx +++ b/packages/ui/src/extras/lib/core/src/core/content/icons/themed.tsx @@ -1,23 +1,29 @@ -import { getTokens, getVariable, getVariableValue, useProps, useTheme } from 'tamagui' -import React from 'react' +import { + getTokens, + getVariable, + getVariableValue, + useProps, + useTheme, +} from 'tamagui'; +import React from 'react'; export function themed(Component: A) { const wrapped = (propsIn: any) => { - const props = useProps(propsIn) - const theme = useTheme() + const props = useProps(propsIn); + const theme = useTheme(); const color = getVariable( (props.color in theme ? theme[props.color] : undefined) || props.color || (!props.disableTheme ? theme.color : null) || - '#000' - ) + '#000', + ); const size = typeof props.size === 'string' ? getVariableValue(getTokens().size[props.size] || props.size) - : props.size + : props.size; // @ts-ignore - return - } - return wrapped as unknown as A + return ; + }; + return wrapped as unknown as A; } diff --git a/packages/ui/src/extras/lib/core/src/core/content/index.ts b/packages/ui/src/extras/lib/core/src/core/content/index.ts index 1162359e7..7f625daf6 100644 --- a/packages/ui/src/extras/lib/core/src/core/content/index.ts +++ b/packages/ui/src/extras/lib/core/src/core/content/index.ts @@ -1,6 +1,6 @@ -export * from './LmAlert' -export * from './LmAvatar' -export * from './LmCard' -export * from './LmImage' -export * from './LmSkeleton' -export * from './LmGrid' +export * from './LmAlert'; +export * from './LmAvatar'; +export * from './LmCard'; +export * from './LmImage'; +export * from './LmSkeleton'; +export * from './LmGrid'; diff --git a/packages/ui/src/extras/lib/core/src/core/form/LmButton.tsx b/packages/ui/src/extras/lib/core/src/core/form/LmButton.tsx index 878982489..14991a7cf 100644 --- a/packages/ui/src/extras/lib/core/src/core/form/LmButton.tsx +++ b/packages/ui/src/extras/lib/core/src/core/form/LmButton.tsx @@ -1,17 +1,17 @@ -import { Button, ButtonProps, Spinner, TamaguiComponent } from 'tamagui' -import { colormap, ThemeColors } from '../themeMappings' -import { forwardRef } from 'react' +import { Button, ButtonProps, Spinner, TamaguiComponent } from 'tamagui'; +import { colormap, ThemeColors } from '../themeMappings'; +import { forwardRef } from 'react'; export type LmButtonProps = ButtonProps & { - colorVariant?: ThemeColors - loading?: boolean -} + colorVariant?: ThemeColors; + loading?: boolean; +}; export const LmButton = forwardRef(function LmButtonFunc( { loading, colorVariant, ...props }: LmButtonProps, - ref + ref, ) { - const { theme } = props + const { theme } = props; return (