diff --git a/.github/actions/cache-rust-deps/action.yaml b/.github/actions/cache-rust-deps/action.yaml index 36ab07b8a..af740ea8a 100644 --- a/.github/actions/cache-rust-deps/action.yaml +++ b/.github/actions/cache-rust-deps/action.yaml @@ -1,4 +1,3 @@ - name: Cache Rust Dependencies description: Caches Rust dependencies runs: diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 000000000..59c8ccb43 --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,3 @@ +{ + "*.{js,jsx,ts,tsx,html,json,yml,yaml,css,scss,md}": ["prettier --write"] +} diff --git a/.npmrc b/.npmrc index 728956208..89f147e1d 100644 --- a/.npmrc +++ b/.npmrc @@ -1,5 +1,7 @@ ; make all engine requirements (e.g. node version) strictly kept engine-strict=true +; tempfix for pnpm#5909: https://github.com/pnpm/pnpm/issues/5909#issuecomment-1397758156 +prefer-symlinked-executables=false ; necessary for metro + mobile strict-peer-dependencies=false node-linker=hoisted diff --git a/.prettierignore b/.prettierignore index 69a352b81..c578c60eb 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,13 @@ -/target -.build \ No newline at end of file +# built product/cache +target/ +dist/ +# macOS/iOS product/cache +.build/ +Pods/ +# just in case it tries to parse for some reason +*.rs +# prettier sometimes can't parse these +*.d.ts +packages/interface/scripts/generateSvgImports.mjs +# we plainly don't need a lockfile to look nice +pnpm-lock.yaml diff --git a/.prettierrc.js b/.prettierrc.js index a522c7ba5..d441b6004 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -7,8 +7,16 @@ module.exports = { bracketSameLine: false, semi: true, quoteProps: 'consistent', - importOrder: ['^[./]', '^@sd/interface/(.*)$', '^@sd/client/(.*)$', '^@sd/ui/(.*)$'], - importOrderSeparation: true, + importOrder: [ + // external packages + '^([A-Za-z]|@[^s/])', + // spacedrive packages + '^@sd/(interface|client|ui)(/.*)?$', + // this package + '^~/', + // relative + '^\\.' + ], importOrderSortSpecifiers: true, plugins: ['@trivago/prettier-plugin-sort-imports'] }; diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index 89a516fa0..879c976ec 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -1,12 +1,11 @@ import { loggerLink } from '@rspc/client'; import { tauriLink } from '@rspc/tauri'; -import { getDebugState, hooks, queryClient } from '@sd/client'; -import SpacedriveInterface, { OperatingSystem, Platform, PlatformProvider } from '@sd/interface'; -import { KeybindEvent } from '@sd/interface'; import { dialog, invoke, os, shell } from '@tauri-apps/api'; import { listen } from '@tauri-apps/api/event'; import { useEffect } from 'react'; - +import { getDebugState, hooks, queryClient } from '@sd/client'; +import SpacedriveInterface, { OperatingSystem, Platform, PlatformProvider } from '@sd/interface'; +import { KeybindEvent } from '@sd/interface'; import '@sd/ui/style'; const client = hooks.createClient({ diff --git a/apps/desktop/src/index.tsx b/apps/desktop/src/index.tsx index 77649c6f0..d965b4ff7 100644 --- a/apps/desktop/src/index.tsx +++ b/apps/desktop/src/index.tsx @@ -1,13 +1,11 @@ // WARNING: BE CAREFUL SAVING THIS FILE WITH A FORMATTER ENABLED. The import order is important and goes against prettier's recommendations. import React, { Suspense } from 'react'; import ReactDOM from 'react-dom/client'; +import '@sd/ui/style'; // THIS MUST GO BEFORE importing the App import '~/patches'; - import App from './App'; -import '@sd/ui/style'; - const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement); root.render( diff --git a/apps/desktop/tsconfig.json b/apps/desktop/tsconfig.json index c5d171eb4..fb1b3f986 100644 --- a/apps/desktop/tsconfig.json +++ b/apps/desktop/tsconfig.json @@ -4,14 +4,10 @@ "rootDir": "src", "declarationDir": "dist", "paths": { - "~/*": [ - "./src/*" - ] + "~/*": ["./src/*"] } }, - "include": [ - "src" - ], + "include": ["src"], "references": [ { "path": "../../packages/interface" diff --git a/apps/desktop/vite.config.ts b/apps/desktop/vite.config.ts index 73956d8da..14438007d 100644 --- a/apps/desktop/vite.config.ts +++ b/apps/desktop/vite.config.ts @@ -3,7 +3,6 @@ import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite'; import svgr from 'vite-plugin-svgr'; import tsconfigPaths from 'vite-tsconfig-paths'; - import { name, version } from './package.json'; // https://vitejs.dev/config/ diff --git a/apps/landing/public/site.webmanifest b/apps/landing/public/site.webmanifest index 4536bfc15..a1a17d753 100644 --- a/apps/landing/public/site.webmanifest +++ b/apps/landing/public/site.webmanifest @@ -1,11 +1,11 @@ { - "name": "Spacedrive", - "short_name": "", - "icons": [ - { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, - { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" + "name": "Spacedrive", + "short_name": "", + "icons": [ + { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, + { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" } diff --git a/apps/landing/src/App.tsx b/apps/landing/src/App.tsx index dcfe8d8db..d8209d17b 100644 --- a/apps/landing/src/App.tsx +++ b/apps/landing/src/App.tsx @@ -1,13 +1,11 @@ import React, { PropsWithChildren } from 'react'; import { PageContextBuiltIn } from 'vite-plugin-ssr'; - +import '@sd/ui/style'; import { Footer } from './components/Footer'; import NavBar from './components/NavBar'; import { PageContextProvider } from './renderer/usePageContext'; import './style.scss'; -import '@sd/ui/style'; - export default function App({ children, pageContext diff --git a/apps/landing/src/components/AppEmbed.tsx b/apps/landing/src/components/AppEmbed.tsx index 359474db2..0ec9f674e 100644 --- a/apps/landing/src/components/AppEmbed.tsx +++ b/apps/landing/src/components/AppEmbed.tsx @@ -1,7 +1,6 @@ /* eslint-disable react-hooks/exhaustive-deps */ import clsx from 'clsx'; import { useEffect, useRef, useState } from 'react'; - import { getWindow } from '../utils'; const AppEmbed = () => { diff --git a/apps/landing/src/components/DocsLayout.tsx b/apps/landing/src/components/DocsLayout.tsx index e285e10b6..6f5758a6d 100644 --- a/apps/landing/src/components/DocsLayout.tsx +++ b/apps/landing/src/components/DocsLayout.tsx @@ -1,8 +1,7 @@ -import { Button } from '@sd/ui'; import { CaretRight, List, X } from 'phosphor-react'; import { PropsWithChildren, useState } from 'react'; import pkg from 'react-burger-menu'; - +import { Button } from '@sd/ui'; import { Doc, DocsNavigation, toTitleCase } from '../pages/docs/api'; import DocsSidebar from './DocsSidebar'; diff --git a/apps/landing/src/components/DocsSidebar.tsx b/apps/landing/src/components/DocsSidebar.tsx index 1c76d8bbd..33ea5676b 100644 --- a/apps/landing/src/components/DocsSidebar.tsx +++ b/apps/landing/src/components/DocsSidebar.tsx @@ -1,7 +1,6 @@ -import { Input } from '@sd/ui'; import clsx from 'clsx'; import { MagnifyingGlass } from 'phosphor-react'; - +import { Input } from '@sd/ui'; import { DocsNavigation } from '../pages/docs/api'; import config from '../pages/docs/docs'; diff --git a/apps/landing/src/components/Footer.tsx b/apps/landing/src/components/Footer.tsx index 74f3ac2f7..8c01ee31a 100644 --- a/apps/landing/src/components/Footer.tsx +++ b/apps/landing/src/components/Footer.tsx @@ -1,3 +1,4 @@ +import AppLogo from '@sd/assets/images/logo.png'; import { Discord, Github, @@ -6,7 +7,6 @@ import { Twitch, Twitter } from '@icons-pack/react-simple-icons'; -import AppLogo from '@sd/assets/images/logo.png'; import { PropsWithChildren } from 'react'; function FooterLink(props: PropsWithChildren<{ link: string; blank?: boolean }>) { diff --git a/apps/landing/src/components/HomeCTA.tsx b/apps/landing/src/components/HomeCTA.tsx index 701b3b6df..0f63d7f94 100644 --- a/apps/landing/src/components/HomeCTA.tsx +++ b/apps/landing/src/components/HomeCTA.tsx @@ -1,11 +1,11 @@ -import { Github } from '@icons-pack/react-simple-icons'; import { ReactComponent as Alert } from '@sd/assets/svgs/alert.svg'; import { ReactComponent as Info } from '@sd/assets/svgs/info.svg'; import { ReactComponent as Spinner } from '@sd/assets/svgs/spinner.svg'; -import { Button, Input } from '@sd/ui'; +import { Github } from '@icons-pack/react-simple-icons'; import clsx from 'clsx'; import { useState } from 'react'; import { useForm } from 'react-hook-form'; +import { Button, Input } from '@sd/ui'; interface WaitlistInputs { email: string; diff --git a/apps/landing/src/components/Markdown.tsx b/apps/landing/src/components/Markdown.tsx index cc130e616..7641cc971 100644 --- a/apps/landing/src/components/Markdown.tsx +++ b/apps/landing/src/components/Markdown.tsx @@ -3,7 +3,6 @@ import Prism from 'prismjs'; import 'prismjs/components/prism-rust'; import 'prismjs/components/prism-typescript'; import { PropsWithChildren, useEffect } from 'react'; - import '../atom-one.css'; interface MarkdownPageProps { diff --git a/apps/landing/src/components/NavBar.tsx b/apps/landing/src/components/NavBar.tsx index 3efb58821..2cdae2412 100644 --- a/apps/landing/src/components/NavBar.tsx +++ b/apps/landing/src/components/NavBar.tsx @@ -1,11 +1,10 @@ -import { Academia, Discord, Github } from '@icons-pack/react-simple-icons'; import AppLogo from '@sd/assets/images/logo.png'; -import { Button, Dropdown } from '@sd/ui'; +import { Academia, Discord, Github } from '@icons-pack/react-simple-icons'; import clsx from 'clsx'; import { Book, Chat, DotsThreeVertical, MapPin, User } from 'phosphor-react'; import { PropsWithChildren, useEffect, useState } from 'react'; import * as router from 'vite-plugin-ssr/client/router'; - +import { Button, Dropdown } from '@sd/ui'; import { positions } from '../pages/careers.page'; import { getWindow } from '../utils'; diff --git a/apps/landing/src/pages/blog/index.page.tsx b/apps/landing/src/pages/blog/index.page.tsx index 7a5c699da..316f71208 100644 --- a/apps/landing/src/pages/blog/index.page.tsx +++ b/apps/landing/src/pages/blog/index.page.tsx @@ -1,6 +1,5 @@ import { PostOrPage, Tag } from '@tryghost/content-api'; import { Helmet } from 'react-helmet'; - import { BlogTag } from '../../components/BlogTag'; import { getWindow } from '../../utils'; import { blogEnabled } from './blog'; diff --git a/apps/landing/src/pages/blog/post.page.server.ts b/apps/landing/src/pages/blog/post.page.server.ts index 39f4f9e34..bcb4aff8a 100644 --- a/apps/landing/src/pages/blog/post.page.server.ts +++ b/apps/landing/src/pages/blog/post.page.server.ts @@ -1,5 +1,4 @@ import { PageContextBuiltIn } from 'vite-plugin-ssr'; - import { getPost } from './blog'; export async function onBeforeRender(pageContext: PageContextBuiltIn) { diff --git a/apps/landing/src/pages/blog/post.page.tsx b/apps/landing/src/pages/blog/post.page.tsx index 1253eb72c..4eb4be801 100644 --- a/apps/landing/src/pages/blog/post.page.tsx +++ b/apps/landing/src/pages/blog/post.page.tsx @@ -3,7 +3,6 @@ import Prism from 'prismjs'; import 'prismjs/components/prism-rust'; import { useEffect } from 'react'; import { Helmet } from 'react-helmet'; - import '../../atom-one.css'; import { BlogTag } from '../../components/BlogTag'; diff --git a/apps/landing/src/pages/careers.page.tsx b/apps/landing/src/pages/careers.page.tsx index 3613a5f19..8e5210d5e 100644 --- a/apps/landing/src/pages/careers.page.tsx +++ b/apps/landing/src/pages/careers.page.tsx @@ -1,4 +1,3 @@ -import { Button } from '@sd/ui'; import { Clock, CurrencyDollar, @@ -12,6 +11,7 @@ import { } from 'phosphor-react'; import { useRef } from 'react'; import { Helmet } from 'react-helmet'; +import { Button } from '@sd/ui'; interface PositionPosting { name: string; diff --git a/apps/landing/src/pages/docs/api.ts b/apps/landing/src/pages/docs/api.ts index ceebb3844..cec5c52cd 100644 --- a/apps/landing/src/pages/docs/api.ts +++ b/apps/landing/src/pages/docs/api.ts @@ -1,5 +1,4 @@ import { Component } from 'react'; - import { parseMarkdown } from '../../utils/markdownParse'; export interface Doc { diff --git a/apps/landing/src/pages/docs/doc.page.server.ts b/apps/landing/src/pages/docs/doc.page.server.ts index a3bc6d9a2..5a1b245a4 100644 --- a/apps/landing/src/pages/docs/doc.page.server.ts +++ b/apps/landing/src/pages/docs/doc.page.server.ts @@ -1,5 +1,4 @@ import { PageContextBuiltIn } from 'vite-plugin-ssr'; - import { getDoc } from './api'; import config from './docs'; diff --git a/apps/landing/src/pages/docs/doc.page.tsx b/apps/landing/src/pages/docs/doc.page.tsx index 876be0fb7..ee6ed4b0b 100644 --- a/apps/landing/src/pages/docs/doc.page.tsx +++ b/apps/landing/src/pages/docs/doc.page.tsx @@ -2,7 +2,6 @@ import { Github } from '@icons-pack/react-simple-icons'; import { CaretRight } from 'phosphor-react'; import { PropsWithChildren } from 'react'; import { Helmet } from 'react-helmet'; - import '../../atom-one.css'; import DocsLayout from '../../components/DocsLayout'; import Markdown from '../../components/Markdown'; diff --git a/apps/landing/src/pages/docs/docs.ts b/apps/landing/src/pages/docs/docs.ts index 57135be5c..f4a864739 100644 --- a/apps/landing/src/pages/docs/docs.ts +++ b/apps/landing/src/pages/docs/docs.ts @@ -1,5 +1,4 @@ import { Circle, Cube, Sparkle, Star } from 'phosphor-react'; - import { DocsConfig } from './api'; export function loadDocs() { diff --git a/apps/landing/src/pages/docs/index.page.tsx b/apps/landing/src/pages/docs/index.page.tsx index 789abaf70..80ac2fb16 100644 --- a/apps/landing/src/pages/docs/index.page.tsx +++ b/apps/landing/src/pages/docs/index.page.tsx @@ -1,5 +1,4 @@ import { Helmet } from 'react-helmet'; - import DocsLayout from '../../components/DocsLayout'; import Markdown from '../../components/Markdown'; import { DocsNavigation } from './api'; diff --git a/apps/landing/src/pages/index.page.tsx b/apps/landing/src/pages/index.page.tsx index 20c3b606d..cc52d3299 100644 --- a/apps/landing/src/pages/index.page.tsx +++ b/apps/landing/src/pages/index.page.tsx @@ -2,7 +2,6 @@ import { ReactComponent as Info } from '@sd/assets/svgs/info.svg'; import clsx from 'clsx'; import { useEffect, useState } from 'react'; import { Helmet } from 'react-helmet'; - import AppEmbed, { AppEmbedPlaceholder } from '../components/AppEmbed'; import { Bubbles } from '../components/Bubbles'; // import { Bubbles } from '../components/Bubbles'; diff --git a/apps/landing/src/pages/team.page.tsx b/apps/landing/src/pages/team.page.tsx index ecdd97cc8..28a7296e1 100644 --- a/apps/landing/src/pages/team.page.tsx +++ b/apps/landing/src/pages/team.page.tsx @@ -1,6 +1,5 @@ import { ReactComponent as ArrowRight } from '@sd/assets/svgs/arrow-right.svg'; import { Helmet } from 'react-helmet'; - import Markdown from '../components/Markdown'; import { TeamMember, TeamMemberProps } from '../components/TeamMember'; import { resolveFilesGlob } from '../utils'; diff --git a/apps/landing/src/renderer/_default.page.client.tsx b/apps/landing/src/renderer/_default.page.client.tsx index 7a1b736b5..f430feb4b 100644 --- a/apps/landing/src/renderer/_default.page.client.tsx +++ b/apps/landing/src/renderer/_default.page.client.tsx @@ -1,6 +1,5 @@ import { hydrateRoot } from 'react-dom/client'; import type { PageContextBuiltInClient } from 'vite-plugin-ssr/client'; - import App from '../App'; import type { PageContext } from './types'; diff --git a/apps/landing/src/renderer/_default.page.server.tsx b/apps/landing/src/renderer/_default.page.server.tsx index 5517578f8..9cb529cd5 100644 --- a/apps/landing/src/renderer/_default.page.server.tsx +++ b/apps/landing/src/renderer/_default.page.server.tsx @@ -2,7 +2,6 @@ import ReactDOMServer from 'react-dom/server'; import { Helmet } from 'react-helmet'; import { dangerouslySkipEscape, escapeInject } from 'vite-plugin-ssr'; import type { PageContextBuiltIn } from 'vite-plugin-ssr'; - import App from '../App'; import type { PageContext } from './types'; diff --git a/apps/landing/src/renderer/_error.page.tsx b/apps/landing/src/renderer/_error.page.tsx index cc1ba5e93..96d375d55 100644 --- a/apps/landing/src/renderer/_error.page.tsx +++ b/apps/landing/src/renderer/_error.page.tsx @@ -1,7 +1,6 @@ -import { Button } from '@sd/ui'; import { SmileyXEyes } from 'phosphor-react'; import { Helmet } from 'react-helmet'; - +import { Button } from '@sd/ui'; import Markdown from '../components/Markdown'; import { getWindow } from '../utils'; diff --git a/apps/landing/src/renderer/usePageContext.tsx b/apps/landing/src/renderer/usePageContext.tsx index 92558a969..1ef048c01 100644 --- a/apps/landing/src/renderer/usePageContext.tsx +++ b/apps/landing/src/renderer/usePageContext.tsx @@ -2,7 +2,6 @@ // More infos: https://vite-plugin-ssr.com/pageContext-anywhere import { PropsWithChildren, ReactNode, createContext, useContext } from 'react'; import { PageContextBuiltIn } from 'vite-plugin-ssr'; - import type { PageContext } from './types'; export { PageContextProvider }; diff --git a/apps/landing/src/style.scss b/apps/landing/src/style.scss index 63a5656f5..429889cab 100644 --- a/apps/landing/src/style.scss +++ b/apps/landing/src/style.scss @@ -237,6 +237,6 @@ html { @apply bg-[#00000006] dark:bg-[#00000030] my-[10px] rounded-[6px]; } &::-webkit-scrollbar-thumb { - @apply rounded-[6px] bg-app-selected + @apply rounded-[6px] bg-app-selected; } } diff --git a/apps/landing/tsconfig.json b/apps/landing/tsconfig.json index 81aff2726..59b27623a 100644 --- a/apps/landing/tsconfig.json +++ b/apps/landing/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../packages/config/app.tsconfig.json", - "include": [ - "src" - ], + "include": ["src"], "ts-node": { "transpileOnly": true, "compilerOptions": {} diff --git a/apps/landing/vite.config.ts b/apps/landing/vite.config.ts index c6db53bed..c833a4f9d 100644 --- a/apps/landing/vite.config.ts +++ b/apps/landing/vite.config.ts @@ -8,6 +8,8 @@ import ssr from 'vite-plugin-ssr/plugin'; import svg from 'vite-plugin-svgr'; export default defineConfig({ + // prettier-ignore + // Prettier reeeally wants to one-line this -- I AM PUTTING MY FOOT DOWN AND SAYING NO! plugins: [ react(), ssr({ prerender: true }), diff --git a/apps/mobile/eas.json b/apps/mobile/eas.json index 05122d5ba..db9ce9aca 100644 --- a/apps/mobile/eas.json +++ b/apps/mobile/eas.json @@ -1,23 +1,23 @@ { - "cli": { - "version": ">= 0.56.0" - }, - "build": { - "development": { - "distribution": "internal", - "android": { - "gradleCommand": ":app:assembleDebug" - }, - "ios": { - "buildConfiguration": "Debug" - } - }, - "preview": { - "distribution": "internal" - }, - "production": {} - }, - "submit": { - "production": {} - } + "cli": { + "version": ">= 0.56.0" + }, + "build": { + "development": { + "distribution": "internal", + "android": { + "gradleCommand": ":app:assembleDebug" + }, + "ios": { + "buildConfiguration": "Debug" + } + }, + "preview": { + "distribution": "internal" + }, + "production": {} + }, + "submit": { + "production": {} + } } diff --git a/apps/mobile/index.js b/apps/mobile/index.js index 24dcab9df..fc44ce41d 100644 --- a/apps/mobile/index.js +++ b/apps/mobile/index.js @@ -1,5 +1,4 @@ import { registerRootComponent } from 'expo'; - import { AppWrapper } from './src/main'; // registerRootComponent calls AppRegistry.registerComponent('main', () => App); diff --git a/apps/mobile/src/App.tsx b/apps/mobile/src/App.tsx index f08972ab4..0f464cbd2 100644 --- a/apps/mobile/src/App.tsx +++ b/apps/mobile/src/App.tsx @@ -1,6 +1,13 @@ import { BottomSheetModalProvider } from '@gorhom/bottom-sheet'; import { DefaultTheme, NavigationContainer, Theme } from '@react-navigation/native'; import { loggerLink } from '@rspc/client'; +import * as SplashScreen from 'expo-splash-screen'; +import { StatusBar } from 'expo-status-bar'; +import { useEffect } from 'react'; +import { GestureHandlerRootView } from 'react-native-gesture-handler'; +import { MenuProvider } from 'react-native-popup-menu'; +import { SafeAreaProvider } from 'react-native-safe-area-context'; +import { useDeviceContext } from 'twrnc'; import { LibraryContextProvider, getDebugState, @@ -9,14 +16,6 @@ import { useCurrentLibrary, useInvalidateQuery } from '@sd/client'; -import * as SplashScreen from 'expo-splash-screen'; -import { StatusBar } from 'expo-status-bar'; -import { useEffect } from 'react'; -import { GestureHandlerRootView } from 'react-native-gesture-handler'; -import { MenuProvider } from 'react-native-popup-menu'; -import { SafeAreaProvider } from 'react-native-safe-area-context'; -import { useDeviceContext } from 'twrnc'; - import { GlobalModals } from './containers/modal/GlobalModals'; import { reactNativeLink } from './lib/rspcReactNativeTransport'; import tw from './lib/tailwind'; diff --git a/apps/mobile/src/components/device/Device.tsx b/apps/mobile/src/components/device/Device.tsx index bc6fae92c..afd59e784 100644 --- a/apps/mobile/src/components/device/Device.tsx +++ b/apps/mobile/src/components/device/Device.tsx @@ -1,8 +1,7 @@ -import { ExplorerItem } from '@sd/client'; import { Cloud, Desktop, DeviceMobileCamera, Laptop, Lock } from 'phosphor-react-native'; import { FlatList, Text, View } from 'react-native'; +import { ExplorerItem } from '@sd/client'; import tw from '~/lib/tailwind'; - import FileItem from '../explorer/FileItem'; const placeholderFileItems: ExplorerItem[] = [ diff --git a/apps/mobile/src/components/explorer/Explorer.tsx b/apps/mobile/src/components/explorer/Explorer.tsx index 0d581bf27..115f488f8 100644 --- a/apps/mobile/src/components/explorer/Explorer.tsx +++ b/apps/mobile/src/components/explorer/Explorer.tsx @@ -1,9 +1,9 @@ -import { useNavigation } from '@react-navigation/native'; -import { ExplorerData, ExplorerItem } from '@sd/client'; import { FlashList } from '@shopify/flash-list'; +import { useNavigation } from '@react-navigation/native'; import { Rows, SquaresFour } from 'phosphor-react-native'; import { useEffect, useState } from 'react'; import { Pressable, View } from 'react-native'; +import { ExplorerData, ExplorerItem } from '@sd/client'; import Layout from '~/constants/Layout'; import SortByMenu from '~/containers/menu/SortByMenu'; import tw from '~/lib/tailwind'; @@ -11,7 +11,6 @@ import { SharedScreenProps } from '~/navigation/SharedScreens'; import { getExplorerStore } from '~/stores/explorerStore'; import { useFileModalStore } from '~/stores/modalStore'; import { isPath } from '~/types/helper'; - import FileItem from './FileItem'; import FileRow from './FileRow'; diff --git a/apps/mobile/src/components/explorer/FileItem.tsx b/apps/mobile/src/components/explorer/FileItem.tsx index 389e5d597..c8a281025 100644 --- a/apps/mobile/src/components/explorer/FileItem.tsx +++ b/apps/mobile/src/components/explorer/FileItem.tsx @@ -1,8 +1,7 @@ -import { ExplorerItem, isVideoExt } from '@sd/client'; import { Text, View } from 'react-native'; +import { ExplorerItem, isVideoExt } from '@sd/client'; import Layout from '~/constants/Layout'; import { getExplorerStore } from '~/stores/explorerStore'; - import tw from '../../lib/tailwind'; import FileThumb from './FileThumb'; diff --git a/apps/mobile/src/components/explorer/FileRow.tsx b/apps/mobile/src/components/explorer/FileRow.tsx index 6ac068c45..f77c05527 100644 --- a/apps/mobile/src/components/explorer/FileRow.tsx +++ b/apps/mobile/src/components/explorer/FileRow.tsx @@ -1,9 +1,8 @@ -import { ExplorerItem, isVideoExt } from '@sd/client'; import React from 'react'; import { Text, View } from 'react-native'; +import { ExplorerItem, isVideoExt } from '@sd/client'; import tw from '~/lib/tailwind'; import { getExplorerStore } from '~/stores/explorerStore'; - import FileThumb from './FileThumb'; type FileRowProps = { diff --git a/apps/mobile/src/components/explorer/FileThumb.tsx b/apps/mobile/src/components/explorer/FileThumb.tsx index 5f2bab84d..e6e8d694b 100644 --- a/apps/mobile/src/components/explorer/FileThumb.tsx +++ b/apps/mobile/src/components/explorer/FileThumb.tsx @@ -1,9 +1,8 @@ -import { ExplorerItem } from '@sd/client'; import { Image, View } from 'react-native'; import { DocumentDirectoryPath } from 'react-native-fs'; +import { ExplorerItem } from '@sd/client'; import { useExplorerStore } from '~/stores/explorerStore'; import { isObject, isPath } from '~/types/helper'; - // import icons from '../../assets/icons/file'; import tw from '../../lib/tailwind'; import FolderIcon from '../icons/FolderIcon'; diff --git a/apps/mobile/src/components/layout/CollapsibleView.tsx b/apps/mobile/src/components/layout/CollapsibleView.tsx index 43814f6e4..0356b3997 100644 --- a/apps/mobile/src/components/layout/CollapsibleView.tsx +++ b/apps/mobile/src/components/layout/CollapsibleView.tsx @@ -3,7 +3,6 @@ import { CaretRight } from 'phosphor-react-native'; import { PropsWithChildren, useReducer } from 'react'; import { Pressable, StyleProp, Text, TextStyle, View, ViewStyle } from 'react-native'; import tw from '~/lib/tailwind'; - import { AnimatedHeight } from '../animation/layout'; type CollapsibleViewProps = PropsWithChildren<{ diff --git a/apps/mobile/src/components/layout/Dialog.tsx b/apps/mobile/src/components/layout/Dialog.tsx index de7a8c9e5..04f437df3 100644 --- a/apps/mobile/src/components/layout/Dialog.tsx +++ b/apps/mobile/src/components/layout/Dialog.tsx @@ -2,7 +2,6 @@ import { MotiView } from 'moti'; import { ReactNode, useState } from 'react'; import { KeyboardAvoidingView, Modal, Platform, Pressable, Text, View } from 'react-native'; import tw from '~/lib/tailwind'; - import { PulseAnimation } from '../animation/lottie'; import { Button } from '../primitive/Button'; diff --git a/apps/mobile/src/containers/OverviewStats.tsx b/apps/mobile/src/containers/OverviewStats.tsx index 49d880d0a..0362837af 100644 --- a/apps/mobile/src/containers/OverviewStats.tsx +++ b/apps/mobile/src/containers/OverviewStats.tsx @@ -1,9 +1,8 @@ -import { Statistics, useLibraryQuery } from '@sd/client'; import byteSize from 'byte-size'; import { FC, useEffect, useState } from 'react'; import { ScrollView, Text, View } from 'react-native'; import RNFS from 'react-native-fs'; - +import { Statistics, useLibraryQuery } from '@sd/client'; import useCounter from '../hooks/useCounter'; import tw from '../lib/tailwind'; diff --git a/apps/mobile/src/containers/dialog/CreateLibraryDialog.tsx b/apps/mobile/src/containers/dialog/CreateLibraryDialog.tsx index 4350d51f3..cc3a08098 100644 --- a/apps/mobile/src/containers/dialog/CreateLibraryDialog.tsx +++ b/apps/mobile/src/containers/dialog/CreateLibraryDialog.tsx @@ -1,5 +1,5 @@ -import { queryClient, useBridgeMutation, useCurrentLibrary } from '@sd/client'; import { useState } from 'react'; +import { queryClient, useBridgeMutation, useCurrentLibrary } from '@sd/client'; import Dialog from '~/components/layout/Dialog'; import { Input } from '~/components/primitive/Input'; diff --git a/apps/mobile/src/containers/dialog/DeleteLibraryDialog.tsx b/apps/mobile/src/containers/dialog/DeleteLibraryDialog.tsx index 48992e6c8..bdcb2c2b0 100644 --- a/apps/mobile/src/containers/dialog/DeleteLibraryDialog.tsx +++ b/apps/mobile/src/containers/dialog/DeleteLibraryDialog.tsx @@ -1,5 +1,5 @@ -import { queryClient, useBridgeMutation } from '@sd/client'; import { useState } from 'react'; +import { queryClient, useBridgeMutation } from '@sd/client'; import Dialog from '~/components/layout/Dialog'; type Props = { diff --git a/apps/mobile/src/containers/dialog/DeleteLocationDialog.tsx b/apps/mobile/src/containers/dialog/DeleteLocationDialog.tsx index e4b4d1155..c2363b182 100644 --- a/apps/mobile/src/containers/dialog/DeleteLocationDialog.tsx +++ b/apps/mobile/src/containers/dialog/DeleteLocationDialog.tsx @@ -1,5 +1,5 @@ -import { useLibraryMutation } from '@sd/client'; import { useState } from 'react'; +import { useLibraryMutation } from '@sd/client'; import Dialog from '~/components/layout/Dialog'; type Props = { diff --git a/apps/mobile/src/containers/dialog/tag/CreateTagDialog.tsx b/apps/mobile/src/containers/dialog/tag/CreateTagDialog.tsx index 9194fb194..d3301a807 100644 --- a/apps/mobile/src/containers/dialog/tag/CreateTagDialog.tsx +++ b/apps/mobile/src/containers/dialog/tag/CreateTagDialog.tsx @@ -1,7 +1,7 @@ -import { queryClient, useLibraryMutation } from '@sd/client'; import React, { useState } from 'react'; import { Pressable, View } from 'react-native'; import ColorPicker from 'react-native-wheel-color-picker'; +import { queryClient, useLibraryMutation } from '@sd/client'; import Dialog from '~/components/layout/Dialog'; import { Input } from '~/components/primitive/Input'; import tw from '~/lib/tailwind'; diff --git a/apps/mobile/src/containers/dialog/tag/DeleteTagDialog.tsx b/apps/mobile/src/containers/dialog/tag/DeleteTagDialog.tsx index 71a30c04c..72f3e863e 100644 --- a/apps/mobile/src/containers/dialog/tag/DeleteTagDialog.tsx +++ b/apps/mobile/src/containers/dialog/tag/DeleteTagDialog.tsx @@ -1,5 +1,5 @@ -import { useLibraryMutation } from '@sd/client'; import { useState } from 'react'; +import { useLibraryMutation } from '@sd/client'; import Dialog from '~/components/layout/Dialog'; type Props = { diff --git a/apps/mobile/src/containers/dialog/tag/UpdateTagDialog.tsx b/apps/mobile/src/containers/dialog/tag/UpdateTagDialog.tsx index 1228d0a91..25ec22531 100644 --- a/apps/mobile/src/containers/dialog/tag/UpdateTagDialog.tsx +++ b/apps/mobile/src/containers/dialog/tag/UpdateTagDialog.tsx @@ -1,7 +1,7 @@ -import { Tag, queryClient, useLibraryMutation } from '@sd/client'; import React, { useState } from 'react'; import { Pressable, Text, View } from 'react-native'; import ColorPicker from 'react-native-wheel-color-picker'; +import { Tag, queryClient, useLibraryMutation } from '@sd/client'; import Dialog from '~/components/layout/Dialog'; import { Input } from '~/components/primitive/Input'; import tw from '~/lib/tailwind'; diff --git a/apps/mobile/src/containers/drawer/DrawerContent.tsx b/apps/mobile/src/containers/drawer/DrawerContent.tsx index 0b88252a9..46c61ce06 100644 --- a/apps/mobile/src/containers/drawer/DrawerContent.tsx +++ b/apps/mobile/src/containers/drawer/DrawerContent.tsx @@ -5,7 +5,6 @@ import { Image, Platform, Pressable, Text, View } from 'react-native'; import Layout from '~/constants/Layout'; import tw from '~/lib/tailwind'; import { getStackNameFromState } from '~/utils/nav'; - import Divider from '../../components/primitive/Divider'; import DrawerLibraryManager from './DrawerLibraryManager'; import DrawerLocations from './DrawerLocations'; diff --git a/apps/mobile/src/containers/drawer/DrawerLibraryManager.tsx b/apps/mobile/src/containers/drawer/DrawerLibraryManager.tsx index 21eaa4533..539074e7f 100644 --- a/apps/mobile/src/containers/drawer/DrawerLibraryManager.tsx +++ b/apps/mobile/src/containers/drawer/DrawerLibraryManager.tsx @@ -6,7 +6,6 @@ import { useEffect, useState } from 'react'; import { Pressable, Text, View } from 'react-native'; import { useCurrentLibrary } from '~/../../../packages/client/src'; import tw from '~/lib/tailwind'; - import { AnimatedHeight } from '../../components/animation/layout'; import Divider from '../../components/primitive/Divider'; import CreateLibraryDialog from '../dialog/CreateLibraryDialog'; diff --git a/apps/mobile/src/containers/drawer/DrawerLocations.tsx b/apps/mobile/src/containers/drawer/DrawerLocations.tsx index 5db6a1c40..e5239073d 100644 --- a/apps/mobile/src/containers/drawer/DrawerLocations.tsx +++ b/apps/mobile/src/containers/drawer/DrawerLocations.tsx @@ -1,11 +1,10 @@ import { BottomSheetModal } from '@gorhom/bottom-sheet'; import { DrawerNavigationHelpers } from '@react-navigation/drawer/lib/typescript/src/types'; import { useNavigation } from '@react-navigation/native'; -import { useLibraryQuery } from '@sd/client'; import { useRef } from 'react'; import { Pressable, Text, View } from 'react-native'; +import { useLibraryQuery } from '@sd/client'; import tw from '~/lib/tailwind'; - import FolderIcon from '../../components/icons/FolderIcon'; import CollapsibleView from '../../components/layout/CollapsibleView'; import ImportModal from '../modal/ImportModal'; diff --git a/apps/mobile/src/containers/drawer/DrawerTags.tsx b/apps/mobile/src/containers/drawer/DrawerTags.tsx index 1ee8e803f..f4817b53f 100644 --- a/apps/mobile/src/containers/drawer/DrawerTags.tsx +++ b/apps/mobile/src/containers/drawer/DrawerTags.tsx @@ -1,9 +1,8 @@ import { DrawerNavigationHelpers } from '@react-navigation/drawer/lib/typescript/src/types'; import { useNavigation } from '@react-navigation/native'; -import { useLibraryQuery } from '@sd/client'; import { ColorValue, Pressable, Text, View } from 'react-native'; +import { useLibraryQuery } from '@sd/client'; import tw from '~/lib/tailwind'; - import CollapsibleView from '../../components/layout/CollapsibleView'; import CreateTagDialog from '../dialog/tag/CreateTagDialog'; diff --git a/apps/mobile/src/containers/modal/FileModal.tsx b/apps/mobile/src/containers/modal/FileModal.tsx index e7384b589..936513de4 100644 --- a/apps/mobile/src/containers/modal/FileModal.tsx +++ b/apps/mobile/src/containers/modal/FileModal.tsx @@ -3,7 +3,6 @@ import dayjs from 'dayjs'; import { CaretLeft } from 'phosphor-react-native'; import { useRef } from 'react'; import { Button, Pressable, Text, View } from 'react-native'; - import { default as FileIcon, default as FileThumb } from '../../components/explorer/FileThumb'; import { Modal } from '../../components/layout/Modal'; import Divider from '../../components/primitive/Divider'; diff --git a/apps/mobile/src/containers/modal/ImportModal.tsx b/apps/mobile/src/containers/modal/ImportModal.tsx index 5e5d7e725..5a8ca9590 100644 --- a/apps/mobile/src/containers/modal/ImportModal.tsx +++ b/apps/mobile/src/containers/modal/ImportModal.tsx @@ -1,9 +1,9 @@ import { BottomSheetModal } from '@gorhom/bottom-sheet'; -import { useLibraryMutation } from '@sd/client'; import * as ML from 'expo-media-library'; import { forwardRef, useCallback } from 'react'; import { Alert, Platform, Text, View } from 'react-native'; import DocumentPicker from 'react-native-document-picker'; +import { useLibraryMutation } from '@sd/client'; // import RFS from 'react-native-fs'; import { Modal } from '~/components/layout/Modal'; import { Button } from '~/components/primitive/Button'; diff --git a/apps/mobile/src/navigation/DrawerNavigator.tsx b/apps/mobile/src/navigation/DrawerNavigator.tsx index 5ef3792f0..2525532ae 100644 --- a/apps/mobile/src/navigation/DrawerNavigator.tsx +++ b/apps/mobile/src/navigation/DrawerNavigator.tsx @@ -3,7 +3,6 @@ import { CompositeScreenProps, NavigatorScreenParams } from '@react-navigation/n import { StackScreenProps } from '@react-navigation/stack'; import DrawerContent from '~/containers/drawer/DrawerContent'; import tw from '~/lib/tailwind'; - import type { RootStackParamList } from '.'; import type { TabParamList } from './TabNavigator'; import TabNavigator from './TabNavigator'; diff --git a/apps/mobile/src/navigation/LinkingConfiguration.ts b/apps/mobile/src/navigation/LinkingConfiguration.ts index 215e73003..68fd12cd1 100644 --- a/apps/mobile/src/navigation/LinkingConfiguration.ts +++ b/apps/mobile/src/navigation/LinkingConfiguration.ts @@ -1,6 +1,5 @@ import { LinkingOptions } from '@react-navigation/native'; import * as Linking from 'expo-linking'; - import { RootStackParamList } from '.'; /** diff --git a/apps/mobile/src/navigation/TabNavigator.tsx b/apps/mobile/src/navigation/TabNavigator.tsx index b978c97d9..076f33f6c 100644 --- a/apps/mobile/src/navigation/TabNavigator.tsx +++ b/apps/mobile/src/navigation/TabNavigator.tsx @@ -3,7 +3,6 @@ import { CompositeScreenProps, NavigatorScreenParams } from '@react-navigation/n import { CirclesFour, Planet, ShareNetwork } from 'phosphor-react-native'; import React from 'react'; import tw from '~/lib/tailwind'; - import type { HomeDrawerScreenProps } from './DrawerNavigator'; import NodesStack, { NodesStackParamList } from './tabs/NodesStack'; import OverviewStack, { OverviewStackParamList } from './tabs/OverviewStack'; diff --git a/apps/mobile/src/navigation/index.tsx b/apps/mobile/src/navigation/index.tsx index 9e323a754..5df36ac98 100644 --- a/apps/mobile/src/navigation/index.tsx +++ b/apps/mobile/src/navigation/index.tsx @@ -3,7 +3,6 @@ import { StackScreenProps, createStackNavigator } from '@react-navigation/stack' import tw from '~/lib/tailwind'; import NotFoundScreen from '~/screens/NotFound'; import SearchScreen from '~/screens/Search'; - import type { DrawerNavParamList } from './DrawerNavigator'; import DrawerNavigator from './DrawerNavigator'; import SettingsNavigator, { SettingsStackParamList } from './SettingsNavigator'; diff --git a/apps/mobile/src/navigation/tabs/NodesStack.tsx b/apps/mobile/src/navigation/tabs/NodesStack.tsx index 46c21f109..c1ee75d13 100644 --- a/apps/mobile/src/navigation/tabs/NodesStack.tsx +++ b/apps/mobile/src/navigation/tabs/NodesStack.tsx @@ -3,7 +3,6 @@ import { StackScreenProps, createStackNavigator } from '@react-navigation/stack' import Header from '~/components/header/Header'; import tw from '~/lib/tailwind'; import NodesScreen from '~/screens/Nodes'; - import { SharedScreens, SharedScreensParamList } from '../SharedScreens'; import { TabScreenProps } from '../TabNavigator'; diff --git a/apps/mobile/src/navigation/tabs/OverviewStack.tsx b/apps/mobile/src/navigation/tabs/OverviewStack.tsx index a52fa4ea0..1614ec7aa 100644 --- a/apps/mobile/src/navigation/tabs/OverviewStack.tsx +++ b/apps/mobile/src/navigation/tabs/OverviewStack.tsx @@ -1,7 +1,6 @@ import { CompositeScreenProps } from '@react-navigation/native'; import { StackScreenProps, TransitionPresets, createStackNavigator } from '@react-navigation/stack'; import tw from '~/lib/tailwind'; - import Header from '../../components/header/Header'; import OverviewScreen from '../../screens/Overview'; import { SharedScreens, SharedScreensParamList } from '../SharedScreens'; diff --git a/apps/mobile/src/navigation/tabs/SpacesStack.tsx b/apps/mobile/src/navigation/tabs/SpacesStack.tsx index 9b056f952..7f3a9f724 100644 --- a/apps/mobile/src/navigation/tabs/SpacesStack.tsx +++ b/apps/mobile/src/navigation/tabs/SpacesStack.tsx @@ -1,7 +1,6 @@ import { CompositeScreenProps } from '@react-navigation/native'; import { StackScreenProps, TransitionPresets, createStackNavigator } from '@react-navigation/stack'; import tw from '~/lib/tailwind'; - import Header from '../../components/header/Header'; import SpacesScreen from '../../screens/Spaces'; import { SharedScreens, SharedScreensParamList } from '../SharedScreens'; diff --git a/apps/mobile/src/screens/Location.tsx b/apps/mobile/src/screens/Location.tsx index d55160610..6c82b04c2 100644 --- a/apps/mobile/src/screens/Location.tsx +++ b/apps/mobile/src/screens/Location.tsx @@ -1,5 +1,5 @@ -import { useLibraryQuery } from '@sd/client'; import { useEffect } from 'react'; +import { useLibraryQuery } from '@sd/client'; import Explorer from '~/components/explorer/Explorer'; import { SharedScreenProps } from '~/navigation/SharedScreens'; import { getExplorerStore } from '~/stores/explorerStore'; diff --git a/apps/mobile/src/screens/Tag.tsx b/apps/mobile/src/screens/Tag.tsx index 1a5cf56c7..f2004ed3b 100644 --- a/apps/mobile/src/screens/Tag.tsx +++ b/apps/mobile/src/screens/Tag.tsx @@ -1,5 +1,5 @@ -import { useLibraryQuery } from '@sd/client'; import { Text, View } from 'react-native'; +import { useLibraryQuery } from '@sd/client'; import Explorer from '~/components/explorer/Explorer'; import tw from '~/lib/tailwind'; import { SharedScreenProps } from '~/navigation/SharedScreens'; diff --git a/apps/mobile/src/screens/settings/client/GeneralSettings.tsx b/apps/mobile/src/screens/settings/client/GeneralSettings.tsx index 52da53636..56b1f711f 100644 --- a/apps/mobile/src/screens/settings/client/GeneralSettings.tsx +++ b/apps/mobile/src/screens/settings/client/GeneralSettings.tsx @@ -1,6 +1,6 @@ -import { useBridgeQuery } from '@sd/client'; import React from 'react'; import { Text, View } from 'react-native'; +import { useBridgeQuery } from '@sd/client'; import Card from '~/components/layout/Card'; import Divider from '~/components/primitive/Divider'; import { Input } from '~/components/primitive/Input'; diff --git a/apps/mobile/src/screens/settings/client/LibrarySettings.tsx b/apps/mobile/src/screens/settings/client/LibrarySettings.tsx index e2819fab9..96af43d0e 100644 --- a/apps/mobile/src/screens/settings/client/LibrarySettings.tsx +++ b/apps/mobile/src/screens/settings/client/LibrarySettings.tsx @@ -1,8 +1,8 @@ -import { LibraryConfigWrapped, useBridgeQuery } from '@sd/client'; import { CaretRight, Pen, Trash } from 'phosphor-react-native'; import React from 'react'; import { Animated, FlatList, Text, View } from 'react-native'; import { Swipeable } from 'react-native-gesture-handler'; +import { LibraryConfigWrapped, useBridgeQuery } from '@sd/client'; import { AnimatedButton } from '~/components/primitive/Button'; import DeleteLibraryDialog from '~/containers/dialog/DeleteLibraryDialog'; import tw from '~/lib/tailwind'; diff --git a/apps/mobile/src/screens/settings/library/LibraryGeneralSettings.tsx b/apps/mobile/src/screens/settings/library/LibraryGeneralSettings.tsx index c3d095d2a..6360d6f7e 100644 --- a/apps/mobile/src/screens/settings/library/LibraryGeneralSettings.tsx +++ b/apps/mobile/src/screens/settings/library/LibraryGeneralSettings.tsx @@ -1,8 +1,8 @@ -import { useBridgeMutation, useCurrentLibrary } from '@sd/client'; import { Trash } from 'phosphor-react-native'; import React from 'react'; import { Controller, useForm } from 'react-hook-form'; import { Alert, Text, View } from 'react-native'; +import { useBridgeMutation, useCurrentLibrary } from '@sd/client'; import { Button } from '~/components/primitive/Button'; import { Input } from '~/components/primitive/Input'; import { Switch } from '~/components/primitive/Switch'; diff --git a/apps/mobile/src/screens/settings/library/LocationSettings.tsx b/apps/mobile/src/screens/settings/library/LocationSettings.tsx index 6013cff96..b6440b1e3 100644 --- a/apps/mobile/src/screens/settings/library/LocationSettings.tsx +++ b/apps/mobile/src/screens/settings/library/LocationSettings.tsx @@ -1,7 +1,7 @@ -import { Location, Node, useLibraryMutation, useLibraryQuery } from '@sd/client'; import { CaretRight, Repeat, Trash } from 'phosphor-react-native'; import { Animated, FlatList, Pressable, Text, View } from 'react-native'; import { Swipeable } from 'react-native-gesture-handler'; +import { Location, Node, useLibraryMutation, useLibraryQuery } from '@sd/client'; import FolderIcon from '~/components/icons/FolderIcon'; import DeleteLocationDialog from '~/containers/dialog/DeleteLocationDialog'; import tw from '~/lib/tailwind'; diff --git a/apps/mobile/src/screens/settings/library/TagsSettings.tsx b/apps/mobile/src/screens/settings/library/TagsSettings.tsx index a50272002..49db704ce 100644 --- a/apps/mobile/src/screens/settings/library/TagsSettings.tsx +++ b/apps/mobile/src/screens/settings/library/TagsSettings.tsx @@ -1,7 +1,7 @@ -import { Tag, useLibraryQuery } from '@sd/client'; import { CaretRight, Pen, Trash } from 'phosphor-react-native'; import { Animated, FlatList, Text, View } from 'react-native'; import { Swipeable } from 'react-native-gesture-handler'; +import { Tag, useLibraryQuery } from '@sd/client'; import { AnimatedButton } from '~/components/primitive/Button'; import DeleteTagDialog from '~/containers/dialog/tag/DeleteTagDialog'; import UpdateTagDialog from '~/containers/dialog/tag/UpdateTagDialog'; diff --git a/apps/mobile/src/stores/explorerStore.ts b/apps/mobile/src/stores/explorerStore.ts index e71743f44..d2edb639c 100644 --- a/apps/mobile/src/stores/explorerStore.ts +++ b/apps/mobile/src/stores/explorerStore.ts @@ -1,5 +1,5 @@ -import { resetStore } from '@sd/client'; import { proxy, useSnapshot } from 'valtio'; +import { resetStore } from '@sd/client'; // TODO: Add "media" export type ExplorerLayoutMode = 'list' | 'grid'; diff --git a/apps/mobile/src/stores/modalStore.ts b/apps/mobile/src/stores/modalStore.ts index 113a91aef..501759804 100644 --- a/apps/mobile/src/stores/modalStore.ts +++ b/apps/mobile/src/stores/modalStore.ts @@ -1,7 +1,7 @@ import { BottomSheetModal } from '@gorhom/bottom-sheet'; -import { ExplorerItem } from '@sd/client'; import { createRef } from 'react'; import { proxy, ref, useSnapshot } from 'valtio'; +import { ExplorerItem } from '@sd/client'; export const fileModalStore = proxy({ fileRef: ref(createRef()), diff --git a/apps/mobile/tsconfig.json b/apps/mobile/tsconfig.json index 56e6f7f3c..7d8e6d327 100644 --- a/apps/mobile/tsconfig.json +++ b/apps/mobile/tsconfig.json @@ -5,9 +5,7 @@ "module": "ESNext", "noEmit": true, "paths": { - "~/*": [ - "./src/*" - ] + "~/*": ["./src/*"] }, "jsx": "react-native" }, diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index a4a534684..ca30c9482 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -1,7 +1,7 @@ import { createWSClient, loggerLink, wsLink } from '@rspc/client'; +import { useEffect } from 'react'; import { getDebugState, hooks, queryClient } from '@sd/client'; import SpacedriveInterface, { Platform, PlatformProvider } from '@sd/interface'; -import { useEffect } from 'react'; globalThis.isDev = import.meta.env.DEV; diff --git a/apps/web/src/index.html b/apps/web/src/index.html index ce6f82f41..21964564d 100644 --- a/apps/web/src/index.html +++ b/apps/web/src/index.html @@ -3,7 +3,7 @@ Spacedrive - + diff --git a/apps/web/src/index.tsx b/apps/web/src/index.tsx index 78f120dd6..907828be7 100644 --- a/apps/web/src/index.tsx +++ b/apps/web/src/index.tsx @@ -1,12 +1,10 @@ // WARNING: BE CAREFUL SAVING THIS FILE WITH A FORMATTER ENABLED. The import order is important and goes against prettier's recommendations. - import React, { Suspense } from 'react'; import ReactDOM from 'react-dom/client'; - -import './patches'; // THIS MUST GO BEFORE importing the App -import App from './App'; - import '@sd/ui/style'; +// THIS MUST GO BEFORE importing the App +import App from './App'; +import './patches'; const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement); root.render( diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 38bb99819..3f7f1295b 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -4,9 +4,7 @@ "rootDir": "src", "declarationDir": "dist" }, - "include": [ - "src" - ], + "include": ["src"], "references": [ { "path": "../../packages/interface" diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 92fd8f948..1e046b1f3 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -1,11 +1,10 @@ +import { relativeAliasResolver } from '@sd/config/vite'; import react from '@vitejs/plugin-react'; // import { visualizer } from 'rollup-plugin-visualizer'; import { defineConfig } from 'vite'; import { createHtmlPlugin } from 'vite-plugin-html'; import svg from 'vite-plugin-svgr'; import tsconfigPaths from 'vite-tsconfig-paths'; -import { relativeAliasResolver } from "@sd/config/vite" - import { name, version } from './package.json'; // https://vitejs.dev/config/ @@ -19,7 +18,7 @@ export default defineConfig({ svg({ svgrOptions: { icon: true } }), createHtmlPlugin({ minify: true - }), + }) // visualizer({ // gzipSize: true, // brotliSize: true diff --git a/crates/sync/example/README.md b/crates/sync/example/README.md index 59296dd69..c3adc9cab 100644 --- a/crates/sync/example/README.md +++ b/crates/sync/example/README.md @@ -15,4 +15,4 @@ cd api/ cargo prisma generate cargo prisma db push cargo run -``` \ No newline at end of file +``` diff --git a/crates/sync/example/web/index.html b/crates/sync/example/web/index.html index 1905a0429..0afc97f47 100644 --- a/crates/sync/example/web/index.html +++ b/crates/sync/example/web/index.html @@ -1,15 +1,15 @@ - - - - - Solid App - - - -
+ + + + + Solid App + + + +
- - + + diff --git a/crates/sync/example/web/package.json b/crates/sync/example/web/package.json index 15cece3d6..32617cec0 100644 --- a/crates/sync/example/web/package.json +++ b/crates/sync/example/web/package.json @@ -1,27 +1,27 @@ { - "name": "example-2", - "version": "0.0.0", - "description": "", - "scripts": { - "dev": "vite", - "build": "vite build", - "serve": "vite preview", - "typecheck": "tsc --noEmit" - }, - "license": "MIT", - "devDependencies": { - "@rspc/client": "^0.0.0-main-7c0a67c1", - "@rspc/react": "^0.0.0-main-7c0a67c1", - "@tanstack/react-query": "^4.10.1", - "@vitejs/plugin-react": "^2.1.0", - "typescript": "^4.8.2", - "vite": "^3.0.9" - }, - "dependencies": { - "clsx": "^1.2.1", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "solid-js": "^1.5.1", - "tailwindcss": "^3.1.8" - } + "name": "example-2", + "version": "0.0.0", + "description": "", + "scripts": { + "dev": "vite", + "build": "vite build", + "serve": "vite preview", + "typecheck": "tsc --noEmit" + }, + "license": "MIT", + "devDependencies": { + "@rspc/client": "^0.0.0-main-7c0a67c1", + "@rspc/react": "^0.0.0-main-7c0a67c1", + "@tanstack/react-query": "^4.10.1", + "@vitejs/plugin-react": "^2.1.0", + "typescript": "^4.8.2", + "vite": "^3.0.9" + }, + "dependencies": { + "clsx": "^1.2.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "solid-js": "^1.5.1", + "tailwindcss": "^3.1.8" + } } diff --git a/crates/sync/example/web/postcss.config.js b/crates/sync/example/web/postcss.config.js index 33ad091d2..054c147cb 100644 --- a/crates/sync/example/web/postcss.config.js +++ b/crates/sync/example/web/postcss.config.js @@ -1,6 +1,6 @@ module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +}; diff --git a/crates/sync/example/web/src/App.tsx b/crates/sync/example/web/src/App.tsx index 2ea420bc2..13c4e5d1c 100644 --- a/crates/sync/example/web/src/App.tsx +++ b/crates/sync/example/web/src/App.tsx @@ -1,6 +1,5 @@ import clsx from 'clsx'; import { Suspense, useState } from 'react'; - import { tests } from './test'; import { CRDTOperationType, rspc } from './utils/rspc'; diff --git a/crates/sync/example/web/src/index.tsx b/crates/sync/example/web/src/index.tsx index a44849e5a..e5c505c26 100644 --- a/crates/sync/example/web/src/index.tsx +++ b/crates/sync/example/web/src/index.tsx @@ -1,15 +1,14 @@ /* @refresh reload */ import { Suspense } from 'react'; import { createRoot } from 'react-dom/client'; - import { App } from './App'; import './index.css'; import { queryClient, rspc, rspcClient } from './utils/rspc'; createRoot(document.getElementById('root') as HTMLElement).render( - - - - - + + + + + ); diff --git a/crates/sync/example/web/src/test.ts b/crates/sync/example/web/src/test.ts index b042a5d37..49c369eba 100644 --- a/crates/sync/example/web/src/test.ts +++ b/crates/sync/example/web/src/test.ts @@ -1,45 +1,45 @@ import { queryClient, rspcClient } from './utils/rspc'; function test(fn: () => Promise) { - return async () => { - await fn(); - queryClient.invalidateQueries(); - }; + return async () => { + await fn(); + queryClient.invalidateQueries(); + }; } const wait = (ms: number) => new Promise((res) => setTimeout(res, ms)); export const tests = { - three: { - name: 'Three', - run: test(async () => { - const [db1, db2, db3] = await Promise.all([ - rspcClient.mutation(['createDatabase', ' ']), - rspcClient.mutation(['createDatabase', ' ']), - rspcClient.mutation(['createDatabase', ' ']) - ]); + three: { + name: 'Three', + run: test(async () => { + const [db1, db2, db3] = await Promise.all([ + rspcClient.mutation(['createDatabase', ' ']), + rspcClient.mutation(['createDatabase', ' ']), + rspcClient.mutation(['createDatabase', ' ']) + ]); - const dbs = await rspcClient.query(['dbs', 'cringe']); + const dbs = await rspcClient.query(['dbs', 'cringe']); - for (const db of dbs) { - await rspcClient.mutation(['file_path.create', db]); - } + for (const db of dbs) { + await rspcClient.mutation(['file_path.create', db]); + } - for (const db of dbs) { - await rspcClient.mutation(['pullOperations', db]); - } + for (const db of dbs) { + await rspcClient.mutation(['pullOperations', db]); + } - await rspcClient.mutation(['file_path.create', dbs[0]]); - await rspcClient.mutation(['file_path.create', dbs[0]]); + await rspcClient.mutation(['file_path.create', dbs[0]]); + await rspcClient.mutation(['file_path.create', dbs[0]]); - for (const db of dbs) { - await rspcClient.mutation(['pullOperations', db]); - } + for (const db of dbs) { + await rspcClient.mutation(['pullOperations', db]); + } - await rspcClient.mutation(['pullOperations', dbs[1]]); - await rspcClient.mutation(['pullOperations', dbs[1]]); - await rspcClient.mutation(['pullOperations', dbs[1]]); - await rspcClient.mutation(['pullOperations', dbs[1]]); - }) - } + await rspcClient.mutation(['pullOperations', dbs[1]]); + await rspcClient.mutation(['pullOperations', dbs[1]]); + await rspcClient.mutation(['pullOperations', dbs[1]]); + await rspcClient.mutation(['pullOperations', dbs[1]]); + }) + } }; diff --git a/crates/sync/example/web/src/utils/bindings.ts b/crates/sync/example/web/src/utils/bindings.ts index 6e5d28620..3d31e95bb 100644 --- a/crates/sync/example/web/src/utils/bindings.ts +++ b/crates/sync/example/web/src/utils/bindings.ts @@ -1,43 +1,80 @@ // This file was generated by [rspc](https://github.com/oscartbeaumont/rspc). Do not edit this file manually. export type Procedures = { - queries: - { key: "db.tags", input: string, result: Record } | - { key: "dbs", input: string, result: Array } | - { key: "file_path.list", input: string, result: Array } | - { key: "message.list", input: string, result: Array } | - { key: "operations", input: string, result: Array }, - mutations: - { key: "createDatabase", input: string, result: string } | - { key: "file_path.create", input: string, result: FilePath } | - { key: "pullOperations", input: string, result: null } | - { key: "removeDatabases", input: string, result: null } | - { key: "testCreate", input: string, result: null }, - subscriptions: never + queries: + | { key: 'db.tags'; input: string; result: Record } + | { key: 'dbs'; input: string; result: Array } + | { key: 'file_path.list'; input: string; result: Array } + | { key: 'message.list'; input: string; result: Array } + | { key: 'operations'; input: string; result: Array }; + mutations: + | { key: 'createDatabase'; input: string; result: string } + | { key: 'file_path.create'; input: string; result: FilePath } + | { key: 'pullOperations'; input: string; result: null } + | { key: 'removeDatabases'; input: string; result: null } + | { key: 'testCreate'; input: string; result: null }; + subscriptions: never; }; -export interface CRDTOperation { node: string, timestamp: bigint, id: string, typ: CRDTOperationType } +export interface CRDTOperation { + node: string; + timestamp: bigint; + id: string; + typ: CRDTOperationType; +} -export type CRDTOperationType = SharedOperation | RelationOperation | OwnedOperation +export type CRDTOperationType = SharedOperation | RelationOperation | OwnedOperation; -export interface Color { red: number, green: number, blue: number } +export interface Color { + red: number; + green: number; + blue: number; +} -export interface FilePath { id: string, path: string, file: string | null } +export interface FilePath { + id: string; + path: string; + file: string | null; +} -export interface OwnedOperation { model: string, items: Array } +export interface OwnedOperation { + model: string; + items: Array; +} -export type OwnedOperationData = { Create: Record } | { Update: Record } | "Delete" +export type OwnedOperationData = + | { Create: Record } + | { Update: Record } + | 'Delete'; -export interface OwnedOperationItem { id: any, data: OwnedOperationData } +export interface OwnedOperationItem { + id: any; + data: OwnedOperationData; +} -export interface RelationOperation { relation_item: string, relation_group: string, relation: string, data: RelationOperationData } +export interface RelationOperation { + relation_item: string; + relation_group: string; + relation: string; + data: RelationOperationData; +} -export type RelationOperationData = "Create" | { Update: { field: string, value: any } } | "Delete" +export type RelationOperationData = 'Create' | { Update: { field: string; value: any } } | 'Delete'; -export interface SharedOperation { record_id: string, model: string, data: SharedOperationData } +export interface SharedOperation { + record_id: string; + model: string; + data: SharedOperationData; +} -export type SharedOperationCreateData = { Unique: Record } | "Atomic" +export type SharedOperationCreateData = { Unique: Record } | 'Atomic'; -export type SharedOperationData = { Create: SharedOperationCreateData } | { Update: { field: string, value: any } } | "Delete" +export type SharedOperationData = + | { Create: SharedOperationCreateData } + | { Update: { field: string; value: any } } + | 'Delete'; -export interface Tag { color: Color, name: string } +export interface Tag { + color: Color; + name: string; +} diff --git a/crates/sync/example/web/src/utils/rspc.ts b/crates/sync/example/web/src/utils/rspc.ts index 1e1ae004a..519ea9f52 100644 --- a/crates/sync/example/web/src/utils/rspc.ts +++ b/crates/sync/example/web/src/utils/rspc.ts @@ -1,7 +1,6 @@ import { createClient, httpLink } from '@rspc/client'; import { createReactHooks } from '@rspc/react'; import { QueryClient } from '@tanstack/react-query'; - import type { Procedures } from './bindings'; export * from './bindings'; @@ -11,18 +10,18 @@ export * from './bindings'; const rspc = createReactHooks(); const rspcClient = rspc.createClient({ - links: [httpLink({ url: 'http://localhost:9000/rspc' })] + links: [httpLink({ url: 'http://localhost:9000/rspc' })] }); const queryClient = new QueryClient({ - defaultOptions: { - queries: { - suspense: true - }, - mutations: { - onSuccess: () => queryClient.invalidateQueries() - } - } + defaultOptions: { + queries: { + suspense: true + }, + mutations: { + onSuccess: () => queryClient.invalidateQueries() + } + } }); export { rspc, rspcClient, queryClient }; diff --git a/crates/sync/example/web/tailwind.config.js b/crates/sync/example/web/tailwind.config.js index 1c3b7e1b3..7cf6cc57b 100644 --- a/crates/sync/example/web/tailwind.config.js +++ b/crates/sync/example/web/tailwind.config.js @@ -1,11 +1,8 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: [ - "./index.html", - "./src/**/*.{js,ts,jsx,tsx}", - ], - theme: { - extend: {}, - }, - plugins: [], -} + content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], + theme: { + extend: {} + }, + plugins: [] +}; diff --git a/crates/sync/example/web/tsconfig.json b/crates/sync/example/web/tsconfig.json index 2c19fda6d..1d5d18140 100644 --- a/crates/sync/example/web/tsconfig.json +++ b/crates/sync/example/web/tsconfig.json @@ -1,15 +1,13 @@ { - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "jsx": "react-jsx", - "types": [ - "vite/client" - ], - "noEmit": true, - "isolatedModules": true - } + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "node", + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "jsx": "react-jsx", + "types": ["vite/client"], + "noEmit": true, + "isolatedModules": true + } } diff --git a/crates/sync/example/web/vite.config.ts b/crates/sync/example/web/vite.config.ts index aa9c9e3ca..29f022f92 100644 --- a/crates/sync/example/web/vite.config.ts +++ b/crates/sync/example/web/vite.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; export default defineConfig({ plugins: [react()], diff --git a/cspell.config.yaml b/cspell.config.yaml index ae63422ac..a70b5f525 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -17,4 +17,4 @@ dictionaries: ignorePaths: - 'node_modules' - '.cspell' - - 'target' \ No newline at end of file + - 'target' diff --git a/docs/company/legal/privacy.md b/docs/company/legal/privacy.md index 7c150af3f..da833ae4c 100644 --- a/docs/company/legal/privacy.md +++ b/docs/company/legal/privacy.md @@ -1,3 +1,3 @@ -# Privacy Policy - -*This page has yet to be written out in full. Please check back later!* +# Privacy Policy + +_This page has yet to be written out in full. Please check back later!_ diff --git a/docs/developers/architecture/sync.md b/docs/developers/architecture/sync.md index edac531e3..587f6db7d 100644 --- a/docs/developers/architecture/sync.md +++ b/docs/developers/architecture/sync.md @@ -41,6 +41,7 @@ and that node can inform all other nodes about the correct state of the paths. Used for Locations, Paths, and Volumes. `@owned(owner: String, id?: String)` + - `owner` - Field that identifies the owner of this model. If a scalar, will directly use that value in sync operations. If a relation, the Sync ID of the related model will be resolved for sync operations. @@ -54,15 +55,16 @@ Updates are applied per-field using a last-write-wins strategy. Used for Objects, Tags, Spaces, and Jobs. `@shared(create: SharedCreateType, id?: String)` + - `id` - Scalar field to override the default Sync ID. - `create` - How the model should be created. - `Unique` (default): Model can be created with many required arguemnts, - but ID provided _must_ be unique across all nodes. - Useful for Tags since their IDs are non-deterministic. + but ID provided _must_ be unique across all nodes. + Useful for Tags since their IDs are non-deterministic. - `Atomic`: Require the model to have no required arguments apart from ID and apply all create arguments as atomic updates. - Necessary for models with the same ID that can be created on multiple nodes. - Useful for Objects since their ID is dependent on their content, - and could be the same across nodes. + Necessary for models with the same ID that can be created on multiple nodes. + Useful for Objects since their ID is dependent on their content, + and could be the same across nodes. ### Relation Records @@ -72,12 +74,12 @@ Sync ID is the combination of `item` and `group` Sync IDs. Used for TagOnFile and FileInSpace. `@relation(item: String, group: String)` + - `item` - Field that identifies the item that the relation is connecting. Similar to the `owner` argument of `@owned`. - `group` - Field that identifies the group that the item should be connected to. Similar to the `owner` argument of `@owned`. - ## Other Prisma Attributes `@node` @@ -85,4 +87,4 @@ Used for TagOnFile and FileInSpace. Indicates that a relation field should be set to the current node. This could be done manually, but `@node` allows `node_id` fields to be resolved from the `node_id` field of a `CRDTOperation`, -saving on bandwidth \ No newline at end of file +saving on bandwidth diff --git a/lefthook.yml b/lefthook.yml index fd196e7db..1769cc630 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -3,12 +3,8 @@ # https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md # ######################################################################################################################## -pre-push: - parallel: true +pre-commit: commands: - lint: - glob: '*.{ts,tsx}' - run: pnpm eslint {staged_files} - markdown-link-check: - glob: '*.md' - run: pnpm markdown-link-check {staged_files} + # automatically format files, ✨magically✨ + lint-staged: + run: pnpm lint-staged diff --git a/package.json b/package.json index c6ab4f0c4..591e220b6 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,13 @@ "version": "0.0.0", "private": true, "scripts": { + "postinstall": "lefthook install", "prep": "pnpm gen:prisma && cargo test -p sd-core api::tests::test_and_export_rspc_bindings -- --exact", "build": "turbo run build", "landing-web": "turbo run dev --parallel --filter=@sd/landing --filter=@sd/web", "gen:migrations": "cd core && cargo prisma migrate dev", "gen:prisma": "cd core && cargo prisma generate", - "format": "prettier --config .prettierrc.js --write \"**/*.{ts,tsx,html,scss,json,yml,md}\"", + "format": "prettier --write .", "desktop": "pnpm --filter @sd/desktop --", "web": "pnpm --filter @sd/web -- ", "mobile": "pnpm --filter @sd/mobile --", @@ -33,6 +34,7 @@ "@evilmartians/lefthook": "^1.1.1", "@trivago/prettier-plugin-sort-imports": "^3.3.0", "cspell": "^6.12.0", + "lint-staged": "^13.1.0", "markdown-link-check": "^3.10.3", "prettier": "^2.7.1", "turbo": "^1.5.5", diff --git a/packages/assets/lottie/loading-pulse.json b/packages/assets/lottie/loading-pulse.json index 4ce72c311..6220538fd 100644 --- a/packages/assets/lottie/loading-pulse.json +++ b/packages/assets/lottie/loading-pulse.json @@ -1 +1,738 @@ -{"v":"5.6.10","fr":30,"ip":0,"op":137,"w":1000,"h":1000,"nm":"Composizione 11","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 8","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":120,"s":[100]},{"t":209,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0]},"t":120,"s":[1,1,100]},{"t":210,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1000,1000],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1450980392156863,0.6,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":120,"op":120.302734375,"st":120,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 7","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":90,"s":[100]},{"t":179,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0]},"t":90,"s":[1,1,100]},{"t":180,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1000,1000],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1450980392156863,0.6,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":90,"op":120,"st":90,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 6","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":60,"s":[100]},{"t":149,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0]},"t":60,"s":[1,1,100]},{"t":150,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1000,1000],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1450980392156863,0.6,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":60,"op":120,"st":60,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Shape Layer 5","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":30,"s":[100]},{"t":119,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0]},"t":30,"s":[1,1,100]},{"t":120,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1000,1000],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1450980392156863,0.6,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":30,"op":120,"st":30,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Shape Layer 4","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[100]},{"t":89,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0]},"t":0,"s":[1,1,100]},{"t":90,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1000,1000],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1450980392156863,0.6,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":120,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":-30,"s":[100]},{"t":59,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0]},"t":-30,"s":[1,1,100]},{"t":60,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1000,1000],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1450980392156863,0.6,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":120,"st":-30,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":-60,"s":[100]},{"t":29,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0]},"t":-60,"s":[1,1,100]},{"t":30,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1000,1000],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1450980392156863,0.6,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":120,"st":-60,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":-90,"s":[100]},{"t":-1,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0]},"t":-90,"s":[1,1,100]},{"t":0,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1000,1000],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.1450980392156863,0.6,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Trasformazione"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":120,"st":-90,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"pulse","refId":"comp_0","sr":1.15,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[502,496,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":0,"op":138,"st":0,"bm":0}],"markers":[]} \ No newline at end of file +{ + "v": "5.6.10", + "fr": 30, + "ip": 0, + "op": 137, + "w": 1000, + "h": 1000, + "nm": "Composizione 11", + "ddd": 0, + "assets": [ + { + "id": "comp_0", + "layers": [ + { + "ddd": 0, + "ind": 2, + "ty": 4, + "nm": "Shape Layer 8", + "sr": 1, + "ks": { + "o": { + "a": 1, + "k": [ + { + "i": { "x": [0.833], "y": [0.833] }, + "o": { "x": [0.167], "y": [0.167] }, + "t": 120, + "s": [100] + }, + { "t": 209, "s": [0] } + ], + "ix": 11 + }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { "a": 0, "k": [500, 500, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { + "a": 1, + "k": [ + { + "i": { "x": [0.833, 0.833, 0.833], "y": [0.833, 0.833, 1] }, + "o": { "x": [0.167, 0.167, 0.167], "y": [0.167, 0.167, 0] }, + "t": 120, + "s": [1, 1, 100] + }, + { "t": 210, "s": [100, 100, 100] } + ], + "ix": 6 + } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [1000, 1000], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.1450980392156863, 0.6, 1, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [0, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Trasformazione" + } + ], + "nm": "Ellipse 1", + "np": 2, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 120, + "op": 120.302734375, + "st": 120, + "bm": 0 + }, + { + "ddd": 0, + "ind": 3, + "ty": 4, + "nm": "Shape Layer 7", + "sr": 1, + "ks": { + "o": { + "a": 1, + "k": [ + { + "i": { "x": [0.833], "y": [0.833] }, + "o": { "x": [0.167], "y": [0.167] }, + "t": 90, + "s": [100] + }, + { "t": 179, "s": [0] } + ], + "ix": 11 + }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { "a": 0, "k": [500, 500, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { + "a": 1, + "k": [ + { + "i": { "x": [0.833, 0.833, 0.833], "y": [0.833, 0.833, 1] }, + "o": { "x": [0.167, 0.167, 0.167], "y": [0.167, 0.167, 0] }, + "t": 90, + "s": [1, 1, 100] + }, + { "t": 180, "s": [100, 100, 100] } + ], + "ix": 6 + } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [1000, 1000], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.1450980392156863, 0.6, 1, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [0, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Trasformazione" + } + ], + "nm": "Ellipse 1", + "np": 2, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 90, + "op": 120, + "st": 90, + "bm": 0 + }, + { + "ddd": 0, + "ind": 4, + "ty": 4, + "nm": "Shape Layer 6", + "sr": 1, + "ks": { + "o": { + "a": 1, + "k": [ + { + "i": { "x": [0.833], "y": [0.833] }, + "o": { "x": [0.167], "y": [0.167] }, + "t": 60, + "s": [100] + }, + { "t": 149, "s": [0] } + ], + "ix": 11 + }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { "a": 0, "k": [500, 500, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { + "a": 1, + "k": [ + { + "i": { "x": [0.833, 0.833, 0.833], "y": [0.833, 0.833, 1] }, + "o": { "x": [0.167, 0.167, 0.167], "y": [0.167, 0.167, 0] }, + "t": 60, + "s": [1, 1, 100] + }, + { "t": 150, "s": [100, 100, 100] } + ], + "ix": 6 + } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [1000, 1000], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.1450980392156863, 0.6, 1, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [0, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Trasformazione" + } + ], + "nm": "Ellipse 1", + "np": 2, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 60, + "op": 120, + "st": 60, + "bm": 0 + }, + { + "ddd": 0, + "ind": 5, + "ty": 4, + "nm": "Shape Layer 5", + "sr": 1, + "ks": { + "o": { + "a": 1, + "k": [ + { + "i": { "x": [0.833], "y": [0.833] }, + "o": { "x": [0.167], "y": [0.167] }, + "t": 30, + "s": [100] + }, + { "t": 119, "s": [0] } + ], + "ix": 11 + }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { "a": 0, "k": [500, 500, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { + "a": 1, + "k": [ + { + "i": { "x": [0.833, 0.833, 0.833], "y": [0.833, 0.833, 1] }, + "o": { "x": [0.167, 0.167, 0.167], "y": [0.167, 0.167, 0] }, + "t": 30, + "s": [1, 1, 100] + }, + { "t": 120, "s": [100, 100, 100] } + ], + "ix": 6 + } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [1000, 1000], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.1450980392156863, 0.6, 1, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [0, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Trasformazione" + } + ], + "nm": "Ellipse 1", + "np": 2, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 30, + "op": 120, + "st": 30, + "bm": 0 + }, + { + "ddd": 0, + "ind": 6, + "ty": 4, + "nm": "Shape Layer 4", + "sr": 1, + "ks": { + "o": { + "a": 1, + "k": [ + { + "i": { "x": [0.833], "y": [0.833] }, + "o": { "x": [0.167], "y": [0.167] }, + "t": 0, + "s": [100] + }, + { "t": 89, "s": [0] } + ], + "ix": 11 + }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { "a": 0, "k": [500, 500, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { + "a": 1, + "k": [ + { + "i": { "x": [0.833, 0.833, 0.833], "y": [0.833, 0.833, 1] }, + "o": { "x": [0.167, 0.167, 0.167], "y": [0.167, 0.167, 0] }, + "t": 0, + "s": [1, 1, 100] + }, + { "t": 90, "s": [100, 100, 100] } + ], + "ix": 6 + } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [1000, 1000], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.1450980392156863, 0.6, 1, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [0, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Trasformazione" + } + ], + "nm": "Ellipse 1", + "np": 2, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 0, + "op": 120, + "st": 0, + "bm": 0 + }, + { + "ddd": 0, + "ind": 7, + "ty": 4, + "nm": "Shape Layer 3", + "sr": 1, + "ks": { + "o": { + "a": 1, + "k": [ + { + "i": { "x": [0.833], "y": [0.833] }, + "o": { "x": [0.167], "y": [0.167] }, + "t": -30, + "s": [100] + }, + { "t": 59, "s": [0] } + ], + "ix": 11 + }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { "a": 0, "k": [500, 500, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { + "a": 1, + "k": [ + { + "i": { "x": [0.833, 0.833, 0.833], "y": [0.833, 0.833, 1] }, + "o": { "x": [0.167, 0.167, 0.167], "y": [0.167, 0.167, 0] }, + "t": -30, + "s": [1, 1, 100] + }, + { "t": 60, "s": [100, 100, 100] } + ], + "ix": 6 + } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [1000, 1000], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.1450980392156863, 0.6, 1, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [0, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Trasformazione" + } + ], + "nm": "Ellipse 1", + "np": 2, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 0, + "op": 120, + "st": -30, + "bm": 0 + }, + { + "ddd": 0, + "ind": 8, + "ty": 4, + "nm": "Shape Layer 2", + "sr": 1, + "ks": { + "o": { + "a": 1, + "k": [ + { + "i": { "x": [0.833], "y": [0.833] }, + "o": { "x": [0.167], "y": [0.167] }, + "t": -60, + "s": [100] + }, + { "t": 29, "s": [0] } + ], + "ix": 11 + }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { "a": 0, "k": [500, 500, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { + "a": 1, + "k": [ + { + "i": { "x": [0.833, 0.833, 0.833], "y": [0.833, 0.833, 1] }, + "o": { "x": [0.167, 0.167, 0.167], "y": [0.167, 0.167, 0] }, + "t": -60, + "s": [1, 1, 100] + }, + { "t": 30, "s": [100, 100, 100] } + ], + "ix": 6 + } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [1000, 1000], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.1450980392156863, 0.6, 1, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [0, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Trasformazione" + } + ], + "nm": "Ellipse 1", + "np": 2, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 0, + "op": 120, + "st": -60, + "bm": 0 + }, + { + "ddd": 0, + "ind": 9, + "ty": 4, + "nm": "Shape Layer 1", + "sr": 1, + "ks": { + "o": { + "a": 1, + "k": [ + { + "i": { "x": [0.833], "y": [0.833] }, + "o": { "x": [0.167], "y": [0.167] }, + "t": -90, + "s": [100] + }, + { "t": -1, "s": [0] } + ], + "ix": 11 + }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { "a": 0, "k": [500, 500, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { + "a": 1, + "k": [ + { + "i": { "x": [0.833, 0.833, 0.833], "y": [0.833, 0.833, 1] }, + "o": { "x": [0.167, 0.167, 0.167], "y": [0.167, 0.167, 0] }, + "t": -90, + "s": [1, 1, 100] + }, + { "t": 0, "s": [100, 100, 100] } + ], + "ix": 6 + } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [1000, 1000], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.1450980392156863, 0.6, 1, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [0, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Trasformazione" + } + ], + "nm": "Ellipse 1", + "np": 2, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 0, + "op": 120, + "st": -90, + "bm": 0 + } + ] + } + ], + "layers": [ + { + "ddd": 0, + "ind": 1, + "ty": 0, + "nm": "pulse", + "refId": "comp_0", + "sr": 1.15, + "ks": { + "o": { "a": 0, "k": 100, "ix": 11 }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { "a": 0, "k": [502, 496, 0], "ix": 2 }, + "a": { "a": 0, "k": [500, 500, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100, 100], "ix": 6 } + }, + "ao": 0, + "w": 1000, + "h": 1000, + "ip": 0, + "op": 138, + "st": 0, + "bm": 0 + } + ], + "markers": [] +} diff --git a/packages/client/src/core.ts b/packages/client/src/core.ts index ad754226f..cdb2b6b0c 100644 --- a/packages/client/src/core.ts +++ b/packages/client/src/core.ts @@ -2,194 +2,576 @@ // This file was generated by [rspc](https://github.com/oscartbeaumont/rspc). Do not edit this file manually. export type Procedures = { - queries: - { key: "buildInfo", input: never, result: BuildInfo } | - { key: "files.get", input: LibraryArgs, result: { id: number, cas_id: string, integrity_checksum: string | null, name: string | null, extension: string | null, kind: number, size_in_bytes: string, key_id: number | null, hidden: boolean, favorite: boolean, important: boolean, has_thumbnail: boolean, has_thumbstrip: boolean, has_video_preview: boolean, ipfs_id: string | null, note: string | null, date_created: string, date_modified: string, date_indexed: string, file_paths: Array, media_data: MediaData | null } | null } | - { key: "jobs.getHistory", input: LibraryArgs, result: Array } | - { key: "jobs.getRunning", input: LibraryArgs, result: Array } | - { key: "jobs.isRunning", input: LibraryArgs, result: boolean } | - { key: "keys.getDefault", input: LibraryArgs, result: string | null } | - { key: "keys.getKey", input: LibraryArgs, result: string } | - { key: "keys.hasMasterPassword", input: LibraryArgs, result: boolean } | - { key: "keys.isKeyManagerUnlocking", input: LibraryArgs, result: boolean } | - { key: "keys.list", input: LibraryArgs, result: Array } | - { key: "keys.listMounted", input: LibraryArgs, result: Array } | - { key: "library.getStatistics", input: LibraryArgs, result: Statistics } | - { key: "library.list", input: never, result: Array } | - { key: "locations.getById", input: LibraryArgs, result: Location | null } | - { key: "locations.getExplorerData", input: LibraryArgs, result: ExplorerData } | - { key: "locations.indexer_rules.get", input: LibraryArgs, result: IndexerRule } | - { key: "locations.indexer_rules.list", input: LibraryArgs, result: Array } | - { key: "locations.list", input: LibraryArgs, result: Array<{ id: number, pub_id: Array, node_id: number, name: string | null, local_path: string | null, total_capacity: number | null, available_capacity: number | null, filesystem: string | null, disk_type: number | null, is_removable: boolean | null, is_online: boolean, is_archived: boolean, date_created: string, node: Node }> } | - { key: "nodeState", input: never, result: NodeState } | - { key: "normi.composite", input: never, result: NormalisedCompositeId } | - { key: "normi.org", input: never, result: NormalisedOrganisation } | - { key: "normi.user", input: never, result: NormalisedUser } | - { key: "normi.userSync", input: never, result: NormalisedUser } | - { key: "normi.version", input: never, result: string } | - { key: "tags.get", input: LibraryArgs, result: Tag | null } | - { key: "tags.getExplorerData", input: LibraryArgs, result: ExplorerData } | - { key: "tags.getForObject", input: LibraryArgs, result: Array } | - { key: "tags.list", input: LibraryArgs, result: Array } | - { key: "volumes.list", input: never, result: Array }, - mutations: - { key: "files.decryptFiles", input: LibraryArgs, result: null } | - { key: "files.delete", input: LibraryArgs, result: null } | - { key: "files.deleteFiles", input: LibraryArgs, result: null } | - { key: "files.encryptFiles", input: LibraryArgs, result: null } | - { key: "files.eraseFiles", input: LibraryArgs, result: null } | - { key: "files.setFavorite", input: LibraryArgs, result: null } | - { key: "files.setNote", input: LibraryArgs, result: null } | - { key: "jobs.clearAll", input: LibraryArgs, result: null } | - { key: "jobs.generateThumbsForLocation", input: LibraryArgs, result: null } | - { key: "jobs.identifyUniqueFiles", input: LibraryArgs, result: null } | - { key: "jobs.objectValidator", input: LibraryArgs, result: null } | - { key: "keys.add", input: LibraryArgs, result: null } | - { key: "keys.backupKeystore", input: LibraryArgs, result: null } | - { key: "keys.changeMasterPassword", input: LibraryArgs, result: null } | - { key: "keys.clearMasterPassword", input: LibraryArgs, result: null } | - { key: "keys.deleteFromLibrary", input: LibraryArgs, result: null } | - { key: "keys.mount", input: LibraryArgs, result: null } | - { key: "keys.restoreKeystore", input: LibraryArgs, result: number } | - { key: "keys.setDefault", input: LibraryArgs, result: null } | - { key: "keys.setMasterPassword", input: LibraryArgs, result: null } | - { key: "keys.syncKeyToLibrary", input: LibraryArgs, result: null } | - { key: "keys.unmount", input: LibraryArgs, result: null } | - { key: "keys.unmountAll", input: LibraryArgs, result: null } | - { key: "keys.updateAutomountStatus", input: LibraryArgs, result: null } | - { key: "library.create", input: CreateLibraryArgs, result: LibraryConfigWrapped } | - { key: "library.delete", input: string, result: null } | - { key: "library.edit", input: EditLibraryArgs, result: null } | - { key: "locations.addLibrary", input: LibraryArgs, result: null } | - { key: "locations.create", input: LibraryArgs, result: null } | - { key: "locations.delete", input: LibraryArgs, result: null } | - { key: "locations.fullRescan", input: LibraryArgs, result: null } | - { key: "locations.indexer_rules.create", input: LibraryArgs, result: IndexerRule } | - { key: "locations.indexer_rules.delete", input: LibraryArgs, result: null } | - { key: "locations.quickRescan", input: LibraryArgs, result: null } | - { key: "locations.relink", input: LibraryArgs, result: null } | - { key: "locations.update", input: LibraryArgs, result: null } | - { key: "tags.assign", input: LibraryArgs, result: null } | - { key: "tags.create", input: LibraryArgs, result: Tag } | - { key: "tags.delete", input: LibraryArgs, result: null } | - { key: "tags.update", input: LibraryArgs, result: null }, - subscriptions: - { key: "invalidateQuery", input: never, result: InvalidateOperationEvent } | - { key: "jobs.newThumbnail", input: LibraryArgs, result: string } + queries: + | { key: 'buildInfo'; input: never; result: BuildInfo } + | { + key: 'files.get'; + input: LibraryArgs; + result: { + id: number; + cas_id: string; + integrity_checksum: string | null; + name: string | null; + extension: string | null; + kind: number; + size_in_bytes: string; + key_id: number | null; + hidden: boolean; + favorite: boolean; + important: boolean; + has_thumbnail: boolean; + has_thumbstrip: boolean; + has_video_preview: boolean; + ipfs_id: string | null; + note: string | null; + date_created: string; + date_modified: string; + date_indexed: string; + file_paths: Array; + media_data: MediaData | null; + } | null; + } + | { key: 'jobs.getHistory'; input: LibraryArgs; result: Array } + | { key: 'jobs.getRunning'; input: LibraryArgs; result: Array } + | { key: 'jobs.isRunning'; input: LibraryArgs; result: boolean } + | { key: 'keys.getDefault'; input: LibraryArgs; result: string | null } + | { key: 'keys.getKey'; input: LibraryArgs; result: string } + | { key: 'keys.hasMasterPassword'; input: LibraryArgs; result: boolean } + | { key: 'keys.isKeyManagerUnlocking'; input: LibraryArgs; result: boolean } + | { key: 'keys.list'; input: LibraryArgs; result: Array } + | { key: 'keys.listMounted'; input: LibraryArgs; result: Array } + | { key: 'library.getStatistics'; input: LibraryArgs; result: Statistics } + | { key: 'library.list'; input: never; result: Array } + | { key: 'locations.getById'; input: LibraryArgs; result: Location | null } + | { + key: 'locations.getExplorerData'; + input: LibraryArgs; + result: ExplorerData; + } + | { key: 'locations.indexer_rules.get'; input: LibraryArgs; result: IndexerRule } + | { key: 'locations.indexer_rules.list'; input: LibraryArgs; result: Array } + | { + key: 'locations.list'; + input: LibraryArgs; + result: Array<{ + id: number; + pub_id: Array; + node_id: number; + name: string | null; + local_path: string | null; + total_capacity: number | null; + available_capacity: number | null; + filesystem: string | null; + disk_type: number | null; + is_removable: boolean | null; + is_online: boolean; + is_archived: boolean; + date_created: string; + node: Node; + }>; + } + | { key: 'nodeState'; input: never; result: NodeState } + | { key: 'normi.composite'; input: never; result: NormalisedCompositeId } + | { key: 'normi.org'; input: never; result: NormalisedOrganisation } + | { key: 'normi.user'; input: never; result: NormalisedUser } + | { key: 'normi.userSync'; input: never; result: NormalisedUser } + | { key: 'normi.version'; input: never; result: string } + | { key: 'tags.get'; input: LibraryArgs; result: Tag | null } + | { key: 'tags.getExplorerData'; input: LibraryArgs; result: ExplorerData } + | { key: 'tags.getForObject'; input: LibraryArgs; result: Array } + | { key: 'tags.list'; input: LibraryArgs; result: Array } + | { key: 'volumes.list'; input: never; result: Array }; + mutations: + | { key: 'files.decryptFiles'; input: LibraryArgs; result: null } + | { key: 'files.delete'; input: LibraryArgs; result: null } + | { key: 'files.deleteFiles'; input: LibraryArgs; result: null } + | { key: 'files.encryptFiles'; input: LibraryArgs; result: null } + | { key: 'files.eraseFiles'; input: LibraryArgs; result: null } + | { key: 'files.setFavorite'; input: LibraryArgs; result: null } + | { key: 'files.setNote'; input: LibraryArgs; result: null } + | { key: 'jobs.clearAll'; input: LibraryArgs; result: null } + | { + key: 'jobs.generateThumbsForLocation'; + input: LibraryArgs; + result: null; + } + | { key: 'jobs.identifyUniqueFiles'; input: LibraryArgs; result: null } + | { key: 'jobs.objectValidator'; input: LibraryArgs; result: null } + | { key: 'keys.add'; input: LibraryArgs; result: null } + | { key: 'keys.backupKeystore'; input: LibraryArgs; result: null } + | { + key: 'keys.changeMasterPassword'; + input: LibraryArgs; + result: null; + } + | { key: 'keys.clearMasterPassword'; input: LibraryArgs; result: null } + | { key: 'keys.deleteFromLibrary'; input: LibraryArgs; result: null } + | { key: 'keys.mount'; input: LibraryArgs; result: null } + | { key: 'keys.restoreKeystore'; input: LibraryArgs; result: number } + | { key: 'keys.setDefault'; input: LibraryArgs; result: null } + | { key: 'keys.setMasterPassword'; input: LibraryArgs; result: null } + | { key: 'keys.syncKeyToLibrary'; input: LibraryArgs; result: null } + | { key: 'keys.unmount'; input: LibraryArgs; result: null } + | { key: 'keys.unmountAll'; input: LibraryArgs; result: null } + | { key: 'keys.updateAutomountStatus'; input: LibraryArgs; result: null } + | { key: 'library.create'; input: CreateLibraryArgs; result: LibraryConfigWrapped } + | { key: 'library.delete'; input: string; result: null } + | { key: 'library.edit'; input: EditLibraryArgs; result: null } + | { key: 'locations.addLibrary'; input: LibraryArgs; result: null } + | { key: 'locations.create'; input: LibraryArgs; result: null } + | { key: 'locations.delete'; input: LibraryArgs; result: null } + | { key: 'locations.fullRescan'; input: LibraryArgs; result: null } + | { + key: 'locations.indexer_rules.create'; + input: LibraryArgs; + result: IndexerRule; + } + | { key: 'locations.indexer_rules.delete'; input: LibraryArgs; result: null } + | { key: 'locations.quickRescan'; input: LibraryArgs; result: null } + | { key: 'locations.relink'; input: LibraryArgs; result: null } + | { key: 'locations.update'; input: LibraryArgs; result: null } + | { key: 'tags.assign'; input: LibraryArgs; result: null } + | { key: 'tags.create'; input: LibraryArgs; result: Tag } + | { key: 'tags.delete'; input: LibraryArgs; result: null } + | { key: 'tags.update'; input: LibraryArgs; result: null }; + subscriptions: + | { key: 'invalidateQuery'; input: never; result: InvalidateOperationEvent } + | { key: 'jobs.newThumbnail'; input: LibraryArgs; result: string }; }; -export type Algorithm = "XChaCha20Poly1305" | "Aes256Gcm" +export type Algorithm = 'XChaCha20Poly1305' | 'Aes256Gcm'; -export interface AutomountUpdateArgs { uuid: string, status: boolean } +export interface AutomountUpdateArgs { + uuid: string; + status: boolean; +} -export interface BuildInfo { version: string, commit: string } +export interface BuildInfo { + version: string; + commit: string; +} -export interface ConfigMetadata { version: string | null } +export interface ConfigMetadata { + version: string | null; +} -export interface CreateLibraryArgs { name: string, password: string, secret_key: string | null, algorithm: Algorithm, hashing_algorithm: HashingAlgorithm } +export interface CreateLibraryArgs { + name: string; + password: string; + secret_key: string | null; + algorithm: Algorithm; + hashing_algorithm: HashingAlgorithm; +} -export interface EditLibraryArgs { id: string, name: string | null, description: string | null } +export interface EditLibraryArgs { + id: string; + name: string | null; + description: string | null; +} -export type ExplorerContext = { type: "Location" } & Location | { type: "Tag" } & Tag +export type ExplorerContext = ({ type: 'Location' } & Location) | ({ type: 'Tag' } & Tag); -export interface ExplorerData { context: ExplorerContext, items: Array } +export interface ExplorerData { + context: ExplorerContext; + items: Array; +} -export type ExplorerItem = { type: "Path" } & FilePathWithObject | { type: "Object" } & ObjectWithFilePaths +export type ExplorerItem = + | ({ type: 'Path' } & FilePathWithObject) + | ({ type: 'Object' } & ObjectWithFilePaths); -export interface FileDecryptorJobInit { location_id: number, path_id: number, output_path: string | null, password: string | null, save_to_library: boolean | null } +export interface FileDecryptorJobInit { + location_id: number; + path_id: number; + output_path: string | null; + password: string | null; + save_to_library: boolean | null; +} -export interface FileDeleterJobInit { location_id: number, path_id: number } +export interface FileDeleterJobInit { + location_id: number; + path_id: number; +} -export interface FileEncryptorJobInit { location_id: number, path_id: number, key_uuid: string, algorithm: Algorithm, metadata: boolean, preview_media: boolean, output_path: string | null } +export interface FileEncryptorJobInit { + location_id: number; + path_id: number; + key_uuid: string; + algorithm: Algorithm; + metadata: boolean; + preview_media: boolean; + output_path: string | null; +} -export interface FileEraserJobInit { location_id: number, path_id: number, passes: number } +export interface FileEraserJobInit { + location_id: number; + path_id: number; + passes: number; +} -export interface FilePath { id: number, is_dir: boolean, location_id: number, materialized_path: string, name: string, extension: string | null, object_id: number | null, parent_id: number | null, key_id: number | null, date_created: string, date_modified: string, date_indexed: string } +export interface FilePath { + id: number; + is_dir: boolean; + location_id: number; + materialized_path: string; + name: string; + extension: string | null; + object_id: number | null; + parent_id: number | null; + key_id: number | null; + date_created: string; + date_modified: string; + date_indexed: string; +} -export interface GenerateThumbsForLocationArgs { id: number, path: string } +export interface GenerateThumbsForLocationArgs { + id: number; + path: string; +} -export interface GetArgs { id: number } +export interface GetArgs { + id: number; +} -export type HashingAlgorithm = { name: "Argon2id", params: Params } | { name: "BalloonBlake3", params: Params } +export type HashingAlgorithm = + | { name: 'Argon2id'; params: Params } + | { name: 'BalloonBlake3'; params: Params }; -export interface IdentifyUniqueFilesArgs { id: number, path: string } +export interface IdentifyUniqueFilesArgs { + id: number; + path: string; +} -export interface IndexerRule { id: number, kind: number, name: string, parameters: Array, date_created: string, date_modified: string } +export interface IndexerRule { + id: number; + kind: number; + name: string; + parameters: Array; + date_created: string; + date_modified: string; +} -export interface IndexerRuleCreateArgs { kind: RuleKind, name: string, parameters: Array } +export interface IndexerRuleCreateArgs { + kind: RuleKind; + name: string; + parameters: Array; +} -export interface InvalidateOperationEvent { key: string, arg: any } +export interface InvalidateOperationEvent { + key: string; + arg: any; +} -export interface JobReport { id: string, name: string, data: Array | null, metadata: any | null, date_created: string, date_modified: string, status: JobStatus, task_count: number, completed_task_count: number, message: string, seconds_elapsed: number } +export interface JobReport { + id: string; + name: string; + data: Array | null; + metadata: any | null; + date_created: string; + date_modified: string; + status: JobStatus; + task_count: number; + completed_task_count: number; + message: string; + seconds_elapsed: number; +} -export type JobStatus = "Queued" | "Running" | "Completed" | "Canceled" | "Failed" | "Paused" +export type JobStatus = 'Queued' | 'Running' | 'Completed' | 'Canceled' | 'Failed' | 'Paused'; -export interface KeyAddArgs { algorithm: Algorithm, hashing_algorithm: HashingAlgorithm, key: string, library_sync: boolean, automount: boolean } +export interface KeyAddArgs { + algorithm: Algorithm; + hashing_algorithm: HashingAlgorithm; + key: string; + library_sync: boolean; + automount: boolean; +} -export interface LibraryArgs { library_id: string, arg: T } +export interface LibraryArgs { + library_id: string; + arg: T; +} -export interface LibraryConfig { version: string | null, name: string, description: string } +export interface LibraryConfig { + version: string | null; + name: string; + description: string; +} -export interface LibraryConfigWrapped { uuid: string, config: LibraryConfig } +export interface LibraryConfigWrapped { + uuid: string; + config: LibraryConfig; +} -export interface Location { id: number, pub_id: Array, node_id: number, name: string | null, local_path: string | null, total_capacity: number | null, available_capacity: number | null, filesystem: string | null, disk_type: number | null, is_removable: boolean | null, is_online: boolean, is_archived: boolean, date_created: string } +export interface Location { + id: number; + pub_id: Array; + node_id: number; + name: string | null; + local_path: string | null; + total_capacity: number | null; + available_capacity: number | null; + filesystem: string | null; + disk_type: number | null; + is_removable: boolean | null; + is_online: boolean; + is_archived: boolean; + date_created: string; +} -export interface LocationCreateArgs { path: string, indexer_rules_ids: Array } +export interface LocationCreateArgs { + path: string; + indexer_rules_ids: Array; +} -export interface LocationExplorerArgs { location_id: number, path: string, limit: number, cursor: string | null } +export interface LocationExplorerArgs { + location_id: number; + path: string; + limit: number; + cursor: string | null; +} -export interface LocationUpdateArgs { id: number, name: string | null, indexer_rules_ids: Array } +export interface LocationUpdateArgs { + id: number; + name: string | null; + indexer_rules_ids: Array; +} -export interface MasterPasswordChangeArgs { password: string, secret_key: string | null, algorithm: Algorithm, hashing_algorithm: HashingAlgorithm } +export interface MasterPasswordChangeArgs { + password: string; + secret_key: string | null; + algorithm: Algorithm; + hashing_algorithm: HashingAlgorithm; +} -export interface MediaData { id: number, pixel_width: number | null, pixel_height: number | null, longitude: number | null, latitude: number | null, fps: number | null, capture_device_make: string | null, capture_device_model: string | null, capture_device_software: string | null, duration_seconds: number | null, codecs: string | null, streams: number | null } +export interface MediaData { + id: number; + pixel_width: number | null; + pixel_height: number | null; + longitude: number | null; + latitude: number | null; + fps: number | null; + capture_device_make: string | null; + capture_device_model: string | null; + capture_device_software: string | null; + duration_seconds: number | null; + codecs: string | null; + streams: number | null; +} -export interface Node { id: number, pub_id: Array, name: string, platform: number, version: string | null, last_seen: string, timezone: string | null, date_created: string } +export interface Node { + id: number; + pub_id: Array; + name: string; + platform: number; + version: string | null; + last_seen: string; + timezone: string | null; + date_created: string; +} -export interface NodeConfig { version: string | null, id: string, name: string, p2p_port: number | null } +export interface NodeConfig { + version: string | null; + id: string; + name: string; + p2p_port: number | null; +} -export interface NodeState { version: string | null, id: string, name: string, p2p_port: number | null, data_path: string } +export interface NodeState { + version: string | null; + id: string; + name: string; + p2p_port: number | null; + data_path: string; +} -export interface NormalisedCompositeId { $type: string, $id: any, org_id: string, user_id: string } +export interface NormalisedCompositeId { + $type: string; + $id: any; + org_id: string; + user_id: string; +} -export interface NormalisedOrganisation { $type: string, $id: any, id: string, name: string, users: NormalizedVec, owner: NormalisedUser, non_normalised_data: Array } +export interface NormalisedOrganisation { + $type: string; + $id: any; + id: string; + name: string; + users: NormalizedVec; + owner: NormalisedUser; + non_normalised_data: Array; +} -export interface NormalisedUser { $type: string, $id: any, id: string, name: string } +export interface NormalisedUser { + $type: string; + $id: any; + id: string; + name: string; +} -export interface NormalizedVec { $type: string, edges: Array } +export interface NormalizedVec { + $type: string; + edges: Array; +} -export interface Object { id: number, cas_id: string, integrity_checksum: string | null, name: string | null, extension: string | null, kind: number, size_in_bytes: string, key_id: number | null, hidden: boolean, favorite: boolean, important: boolean, has_thumbnail: boolean, has_thumbstrip: boolean, has_video_preview: boolean, ipfs_id: string | null, note: string | null, date_created: string, date_modified: string, date_indexed: string } +export interface Object { + id: number; + cas_id: string; + integrity_checksum: string | null; + name: string | null; + extension: string | null; + kind: number; + size_in_bytes: string; + key_id: number | null; + hidden: boolean; + favorite: boolean; + important: boolean; + has_thumbnail: boolean; + has_thumbstrip: boolean; + has_video_preview: boolean; + ipfs_id: string | null; + note: string | null; + date_created: string; + date_modified: string; + date_indexed: string; +} -export interface ObjectValidatorArgs { id: number, path: string } +export interface ObjectValidatorArgs { + id: number; + path: string; +} -export type Params = "Standard" | "Hardened" | "Paranoid" +export type Params = 'Standard' | 'Hardened' | 'Paranoid'; -export interface RestoreBackupArgs { password: string, secret_key: string | null, path: string } +export interface RestoreBackupArgs { + password: string; + secret_key: string | null; + path: string; +} -export type RuleKind = "AcceptFilesByGlob" | "RejectFilesByGlob" | "AcceptIfChildrenDirectoriesArePresent" | "RejectIfChildrenDirectoriesArePresent" +export type RuleKind = + | 'AcceptFilesByGlob' + | 'RejectFilesByGlob' + | 'AcceptIfChildrenDirectoriesArePresent' + | 'RejectIfChildrenDirectoriesArePresent'; -export interface SetFavoriteArgs { id: number, favorite: boolean } +export interface SetFavoriteArgs { + id: number; + favorite: boolean; +} -export interface SetMasterPasswordArgs { password: string, secret_key: string | null } +export interface SetMasterPasswordArgs { + password: string; + secret_key: string | null; +} -export interface SetNoteArgs { id: number, note: string | null } +export interface SetNoteArgs { + id: number; + note: string | null; +} -export interface Statistics { id: number, date_captured: string, total_object_count: number, library_db_size: string, total_bytes_used: string, total_bytes_capacity: string, total_unique_bytes: string, total_bytes_free: string, preview_media_bytes: string } +export interface Statistics { + id: number; + date_captured: string; + total_object_count: number; + library_db_size: string; + total_bytes_used: string; + total_bytes_capacity: string; + total_unique_bytes: string; + total_bytes_free: string; + preview_media_bytes: string; +} -export interface StoredKey { uuid: string, version: StoredKeyVersion, algorithm: Algorithm, hashing_algorithm: HashingAlgorithm, content_salt: Array, master_key: Array, master_key_nonce: Array, key_nonce: Array, key: Array, salt: Array, memory_only: boolean, automount: boolean } +export interface StoredKey { + uuid: string; + version: StoredKeyVersion; + algorithm: Algorithm; + hashing_algorithm: HashingAlgorithm; + content_salt: Array; + master_key: Array; + master_key_nonce: Array; + key_nonce: Array; + key: Array; + salt: Array; + memory_only: boolean; + automount: boolean; +} -export type StoredKeyVersion = "V1" +export type StoredKeyVersion = 'V1'; -export interface Tag { id: number, pub_id: Array, name: string | null, color: string | null, total_objects: number | null, redundancy_goal: number | null, date_created: string, date_modified: string } +export interface Tag { + id: number; + pub_id: Array; + name: string | null; + color: string | null; + total_objects: number | null; + redundancy_goal: number | null; + date_created: string; + date_modified: string; +} -export interface TagAssignArgs { object_id: number, tag_id: number, unassign: boolean } +export interface TagAssignArgs { + object_id: number; + tag_id: number; + unassign: boolean; +} -export interface TagCreateArgs { name: string, color: string } +export interface TagCreateArgs { + name: string; + color: string; +} -export interface TagUpdateArgs { id: number, name: string | null, color: string | null } +export interface TagUpdateArgs { + id: number; + name: string | null; + color: string | null; +} -export interface Volume { name: string, mount_point: string, total_capacity: bigint, available_capacity: bigint, is_removable: boolean, disk_type: string | null, file_system: string | null, is_root_filesystem: boolean } +export interface Volume { + name: string; + mount_point: string; + total_capacity: bigint; + available_capacity: bigint; + is_removable: boolean; + disk_type: string | null; + file_system: string | null; + is_root_filesystem: boolean; +} -export interface FilePathWithObject { id: number, is_dir: boolean, location_id: number, materialized_path: string, name: string, extension: string | null, object_id: number | null, parent_id: number | null, key_id: number | null, date_created: string, date_modified: string, date_indexed: string, object: Object | null } +export interface FilePathWithObject { + id: number; + is_dir: boolean; + location_id: number; + materialized_path: string; + name: string; + extension: string | null; + object_id: number | null; + parent_id: number | null; + key_id: number | null; + date_created: string; + date_modified: string; + date_indexed: string; + object: Object | null; +} -export interface ObjectWithFilePaths { id: number, cas_id: string, integrity_checksum: string | null, name: string | null, extension: string | null, kind: number, size_in_bytes: string, key_id: number | null, hidden: boolean, favorite: boolean, important: boolean, has_thumbnail: boolean, has_thumbstrip: boolean, has_video_preview: boolean, ipfs_id: string | null, note: string | null, date_created: string, date_modified: string, date_indexed: string, file_paths: Array } +export interface ObjectWithFilePaths { + id: number; + cas_id: string; + integrity_checksum: string | null; + name: string | null; + extension: string | null; + kind: number; + size_in_bytes: string; + key_id: number | null; + hidden: boolean; + favorite: boolean; + important: boolean; + has_thumbnail: boolean; + has_thumbstrip: boolean; + has_video_preview: boolean; + ipfs_id: string | null; + note: string | null; + date_created: string; + date_modified: string; + date_indexed: string; + file_paths: Array; +} diff --git a/packages/client/src/hooks/useCurrentLibrary.tsx b/packages/client/src/hooks/useCurrentLibrary.tsx index be13e387a..d20a6679e 100644 --- a/packages/client/src/hooks/useCurrentLibrary.tsx +++ b/packages/client/src/hooks/useCurrentLibrary.tsx @@ -1,6 +1,5 @@ import { PropsWithChildren, createContext, useCallback, useContext, useMemo } from 'react'; import { subscribe, useSnapshot } from 'valtio'; - import { useBridgeQuery } from '../rspc'; import { valtioPersist } from '../stores'; diff --git a/packages/client/src/normi/index.ts b/packages/client/src/normi/index.ts index 515af3039..0ec6324ee 100644 --- a/packages/client/src/normi/index.ts +++ b/packages/client/src/normi/index.ts @@ -3,7 +3,6 @@ import { CustomHooks } from '@rspc/client'; // @ts-expect-error: // TODO(@Oscar): Fix types import { __useMutation, __useQuery } from '@rspc/react/internal'; import { useMemo } from 'react'; - import { NormiOptions, getNormiCache, loadDataFromCache } from './utils'; export function normiCustomHooks( diff --git a/packages/client/src/rspc.ts b/packages/client/src/rspc.ts index 9211518f2..38948c622 100644 --- a/packages/client/src/rspc.ts +++ b/packages/client/src/rspc.ts @@ -1,7 +1,6 @@ import { ProcedureDef } from '@rspc/client'; import { internal_createReactHooksFactory } from '@rspc/react'; import { QueryClient } from '@tanstack/react-query'; - import { LibraryArgs, Procedures } from './core'; import { getLibraryIdRaw } from './index'; import { normiCustomHooks } from './normi'; diff --git a/packages/client/src/stores/debugState.ts b/packages/client/src/stores/debugState.ts index 7778e553f..4bffee19a 100644 --- a/packages/client/src/stores/debugState.ts +++ b/packages/client/src/stores/debugState.ts @@ -1,5 +1,4 @@ import { useSnapshot } from 'valtio'; - import { valtioPersist } from './util'; export const debugState = valtioPersist('sd-debugState', { diff --git a/packages/client/src/stores/themeStore.ts b/packages/client/src/stores/themeStore.ts index 37dfb42a4..fdeb349f0 100644 --- a/packages/client/src/stores/themeStore.ts +++ b/packages/client/src/stores/themeStore.ts @@ -1,5 +1,4 @@ import { useSnapshot } from 'valtio'; - import { valtioPersist } from './util'; const appThemeStore = valtioPersist('appTheme', { diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index 4677b60a1..8e080d56b 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -4,7 +4,5 @@ "rootDir": "src", "declarationDir": "dist" }, - "include": [ - "src" - ] + "include": ["src"] } diff --git a/packages/config/app.tsconfig.json b/packages/config/app.tsconfig.json index e89847c31..e17622d5a 100644 --- a/packages/config/app.tsconfig.json +++ b/packages/config/app.tsconfig.json @@ -2,6 +2,6 @@ "extends": "./base.tsconfig.json", "compilerOptions": { "noEmit": true, - "emitDeclarationOnly": false, + "emitDeclarationOnly": false } } diff --git a/packages/config/base.tsconfig.json b/packages/config/base.tsconfig.json index 565c83610..cd0eefbe6 100644 --- a/packages/config/base.tsconfig.json +++ b/packages/config/base.tsconfig.json @@ -21,9 +21,6 @@ "module": "ESNext", "target": "ESNext", // Extra types - "types": [ - "vite-plugin-svgr/client", - "vite/client" - ] - }, + "types": ["vite-plugin-svgr/client", "vite/client"] + } } diff --git a/packages/interface/src/App.tsx b/packages/interface/src/App.tsx index 4fbb5cf31..776ba8c16 100644 --- a/packages/interface/src/App.tsx +++ b/packages/interface/src/App.tsx @@ -1,11 +1,9 @@ -import '@fontsource/inter/variable.css'; -import { LibraryContextProvider, queryClient, useDebugState } from '@sd/client'; -import { Dialogs } from '@sd/ui'; import { Dedupe as DedupeIntegration, HttpContext as HttpContextIntegration, init } from '@sentry/browser'; +import '@fontsource/inter/variable.css'; import { QueryClientProvider, defaultContext } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import dayjs from 'dayjs'; @@ -14,7 +12,8 @@ import duration from 'dayjs/plugin/duration'; import relativeTime from 'dayjs/plugin/relativeTime'; import { ErrorBoundary } from 'react-error-boundary'; import { MemoryRouter, useNavigate } from 'react-router-dom'; - +import { LibraryContextProvider, queryClient, useDebugState } from '@sd/client'; +import { Dialogs } from '@sd/ui'; import { AppRouter } from './AppRouter'; import { ErrorFallback } from './ErrorFallback'; import './style.scss'; diff --git a/packages/interface/src/AppLayout.tsx b/packages/interface/src/AppLayout.tsx index 881d9c1c9..f9de5823c 100644 --- a/packages/interface/src/AppLayout.tsx +++ b/packages/interface/src/AppLayout.tsx @@ -1,8 +1,8 @@ -import { useCurrentLibrary } from '@sd/client'; -import { Dialogs } from '@sd/ui'; import clsx from 'clsx'; import { Suspense } from 'react'; import { Outlet } from 'react-router-dom'; +import { useCurrentLibrary } from '@sd/client'; +import { Dialogs } from '@sd/ui'; import { Sidebar } from '~/components/layout/Sidebar'; import { Toasts } from '~/components/primitive/Toasts'; import { useOperatingSystem } from '~/hooks/useOperatingSystem'; diff --git a/packages/interface/src/AppRouter.tsx b/packages/interface/src/AppRouter.tsx index f31e8dbf0..777478bce 100644 --- a/packages/interface/src/AppRouter.tsx +++ b/packages/interface/src/AppRouter.tsx @@ -1,9 +1,8 @@ import { lazy } from '@loadable/component'; -import { useCurrentLibrary, useInvalidateQuery } from '@sd/client'; import { Navigate, Route, Routes } from 'react-router-dom'; - -import { AppLayout } from './AppLayout'; +import { useCurrentLibrary, useInvalidateQuery } from '@sd/client'; import { useKeybindHandler } from '~/hooks/useKeyboardHandler'; +import { AppLayout } from './AppLayout'; // Using React.lazy breaks hot reload so we don't use it. const DebugScreen = lazy(() => import('./screens/Debug')); diff --git a/packages/interface/src/ErrorFallback.tsx b/packages/interface/src/ErrorFallback.tsx index 2cb9bf350..bbeb8ff2f 100644 --- a/packages/interface/src/ErrorFallback.tsx +++ b/packages/interface/src/ErrorFallback.tsx @@ -1,6 +1,6 @@ -import { Button } from '@sd/ui'; import { captureException } from '@sentry/browser'; import { FallbackProps } from 'react-error-boundary'; +import { Button } from '@sd/ui'; export function ErrorFallback({ error, resetErrorBoundary }: FallbackProps) { const onClick = () => { diff --git a/packages/interface/src/NotFound.tsx b/packages/interface/src/NotFound.tsx index 662d48361..fae7a7b93 100644 --- a/packages/interface/src/NotFound.tsx +++ b/packages/interface/src/NotFound.tsx @@ -1,5 +1,5 @@ -import { Button } from '@sd/ui'; import { useNavigate } from 'react-router'; +import { Button } from '@sd/ui'; export default function NotFound() { const navigate = useNavigate(); diff --git a/packages/interface/src/components/device/Device.tsx b/packages/interface/src/components/device/Device.tsx index 408f81195..350cfab40 100644 --- a/packages/interface/src/components/device/Device.tsx +++ b/packages/interface/src/components/device/Device.tsx @@ -1,5 +1,3 @@ -import { Button } from '@sd/ui'; -import { Loader } from '@sd/ui'; import { Cloud, Desktop, @@ -11,7 +9,8 @@ import { Lock } from 'phosphor-react'; import { useState } from 'react'; - +import { Button } from '@sd/ui'; +import { Loader } from '@sd/ui'; import FileItem from '../explorer/FileItem'; import ProgressBar from '../primitive/ProgressBar'; import { Tooltip } from '../tooltip/Tooltip'; diff --git a/packages/interface/src/components/dialog/AddLocationDialog.tsx b/packages/interface/src/components/dialog/AddLocationDialog.tsx index c10802aea..ad02c59a5 100644 --- a/packages/interface/src/components/dialog/AddLocationDialog.tsx +++ b/packages/interface/src/components/dialog/AddLocationDialog.tsx @@ -1,6 +1,5 @@ import { useLibraryMutation } from '@sd/client'; import { Dialog, UseDialogProps, useDialog } from '@sd/ui'; - import { Input, useZodForm, z } from '@sd/ui/src/forms'; const schema = z.object({ path: z.string() }); diff --git a/packages/interface/src/components/dialog/AlertDialog.tsx b/packages/interface/src/components/dialog/AlertDialog.tsx index 0781a6544..7706e868e 100644 --- a/packages/interface/src/components/dialog/AlertDialog.tsx +++ b/packages/interface/src/components/dialog/AlertDialog.tsx @@ -1,6 +1,5 @@ -import { Button, Dialog, Input, UseDialogProps, useDialog } from '@sd/ui'; import { Clipboard } from 'phosphor-react'; - +import { Button, Dialog, Input, UseDialogProps, useDialog } from '@sd/ui'; import { useZodForm, z } from '@sd/ui/src/forms'; export interface AlertDialogProps extends UseDialogProps { diff --git a/packages/interface/src/components/dialog/BackupRestoreDialog.tsx b/packages/interface/src/components/dialog/BackupRestoreDialog.tsx index 4bc5fd42b..a39defc3e 100644 --- a/packages/interface/src/components/dialog/BackupRestoreDialog.tsx +++ b/packages/interface/src/components/dialog/BackupRestoreDialog.tsx @@ -1,8 +1,8 @@ +import { Eye, EyeSlash } from 'phosphor-react'; +import { useState } from 'react'; import { useLibraryMutation } from '@sd/client'; import { Button, Dialog, UseDialogProps, useDialog } from '@sd/ui'; import { forms } from '@sd/ui'; -import { Eye, EyeSlash } from 'phosphor-react'; -import { useState } from 'react'; import { usePlatform } from '~/util/Platform'; import { showAlertDialog } from '~/util/dialog'; diff --git a/packages/interface/src/components/dialog/CreateLibraryDialog.tsx b/packages/interface/src/components/dialog/CreateLibraryDialog.tsx index b2356203b..e07eecb50 100644 --- a/packages/interface/src/components/dialog/CreateLibraryDialog.tsx +++ b/packages/interface/src/components/dialog/CreateLibraryDialog.tsx @@ -1,12 +1,11 @@ -import { Algorithm, useBridgeMutation } from '@sd/client'; -import { Button, Dialog, Select, SelectOption, UseDialogProps, useDialog } from '@sd/ui'; -import { forms } from '@sd/ui'; import { useQueryClient } from '@tanstack/react-query'; import cryptoRandomString from 'crypto-random-string'; import { ArrowsClockwise, Clipboard, Eye, EyeSlash } from 'phosphor-react'; import { useState } from 'react'; +import { Algorithm, useBridgeMutation } from '@sd/client'; +import { Button, Dialog, Select, SelectOption, UseDialogProps, useDialog } from '@sd/ui'; +import { forms } from '@sd/ui'; import { getHashingAlgorithmSettings } from '~/screens/settings/library/KeysSetting'; - import { generatePassword } from '../key/KeyMounter'; import { PasswordMeter } from '../key/PasswordMeter'; diff --git a/packages/interface/src/components/dialog/DecryptFileDialog.tsx b/packages/interface/src/components/dialog/DecryptFileDialog.tsx index 90162cea1..040dea257 100644 --- a/packages/interface/src/components/dialog/DecryptFileDialog.tsx +++ b/packages/interface/src/components/dialog/DecryptFileDialog.tsx @@ -1,15 +1,13 @@ import { RadioGroup } from '@headlessui/react'; -import { useLibraryMutation, useLibraryQuery } from '@sd/client'; -import { Button, Dialog, UseDialogProps, useDialog } from '@sd/ui'; import { Eye, EyeSlash, Info } from 'phosphor-react'; import { useState } from 'react'; +import { useLibraryMutation, useLibraryQuery } from '@sd/client'; +import { Button, Dialog, UseDialogProps, useDialog } from '@sd/ui'; +import { Input, Switch, useZodForm, z } from '@sd/ui/src/forms'; import { showAlertDialog } from '~/util/dialog'; - import { usePlatform } from '../../util/Platform'; import { Tooltip } from '../tooltip/Tooltip'; -import { Input, Switch, useZodForm, z } from '@sd/ui/src/forms'; - interface DecryptDialogProps extends UseDialogProps { location_id: number; path_id: number; diff --git a/packages/interface/src/components/dialog/DeleteFileDialog.tsx b/packages/interface/src/components/dialog/DeleteFileDialog.tsx index ab46cd058..0599c0b8d 100644 --- a/packages/interface/src/components/dialog/DeleteFileDialog.tsx +++ b/packages/interface/src/components/dialog/DeleteFileDialog.tsx @@ -1,6 +1,5 @@ import { useLibraryMutation } from '@sd/client'; import { Dialog, UseDialogProps, useDialog } from '@sd/ui'; - import { useZodForm, z } from '@sd/ui/src/forms'; interface DeleteDialogProps extends UseDialogProps { diff --git a/packages/interface/src/components/dialog/DeleteLibraryDialog.tsx b/packages/interface/src/components/dialog/DeleteLibraryDialog.tsx index a417f83fa..ae5454f1a 100644 --- a/packages/interface/src/components/dialog/DeleteLibraryDialog.tsx +++ b/packages/interface/src/components/dialog/DeleteLibraryDialog.tsx @@ -1,7 +1,7 @@ +import { useQueryClient } from '@tanstack/react-query'; import { useBridgeMutation } from '@sd/client'; import { Dialog, UseDialogProps, useDialog } from '@sd/ui'; import { forms } from '@sd/ui'; -import { useQueryClient } from '@tanstack/react-query'; const { useZodForm, z } = forms; diff --git a/packages/interface/src/components/dialog/EncryptFileDialog.tsx b/packages/interface/src/components/dialog/EncryptFileDialog.tsx index 1ebe20728..b92558540 100644 --- a/packages/interface/src/components/dialog/EncryptFileDialog.tsx +++ b/packages/interface/src/components/dialog/EncryptFileDialog.tsx @@ -1,13 +1,11 @@ import { Algorithm, useLibraryMutation, useLibraryQuery } from '@sd/client'; import { Button, Dialog, Select, SelectOption, UseDialogProps, useDialog } from '@sd/ui'; +import { CheckBox, useZodForm, z } from '@sd/ui/src/forms'; import { getHashingAlgorithmString } from '~/screens/settings/library/KeysSetting'; import { usePlatform } from '~/util/Platform'; import { showAlertDialog } from '~/util/dialog'; - import { SelectOptionKeyList } from '../key/KeyList'; -import { CheckBox, useZodForm, z } from '@sd/ui/src/forms'; - interface EncryptDialogProps extends UseDialogProps { location_id: number; path_id: number; diff --git a/packages/interface/src/components/dialog/EraseFileDialog.tsx b/packages/interface/src/components/dialog/EraseFileDialog.tsx index d10f161e5..da377fa6b 100644 --- a/packages/interface/src/components/dialog/EraseFileDialog.tsx +++ b/packages/interface/src/components/dialog/EraseFileDialog.tsx @@ -1,10 +1,8 @@ +import { useState } from 'react'; import { useLibraryMutation } from '@sd/client'; import { Dialog, UseDialogProps, useDialog } from '@sd/ui'; -import { useState } from 'react'; - -import Slider from '../primitive/Slider'; - import { useZodForm, z } from '@sd/ui/src/forms'; +import Slider from '../primitive/Slider'; interface EraseDialogProps extends UseDialogProps { location_id: number; diff --git a/packages/interface/src/components/dialog/KeyViewerDialog.tsx b/packages/interface/src/components/dialog/KeyViewerDialog.tsx index 1e7d4f452..e5b8615bd 100644 --- a/packages/interface/src/components/dialog/KeyViewerDialog.tsx +++ b/packages/interface/src/components/dialog/KeyViewerDialog.tsx @@ -1,13 +1,11 @@ -import { useLibraryQuery } from '@sd/client'; -import { Button, Dialog, Input, Select, SelectOption, UseDialogProps, useDialog } from '@sd/ui'; import { Buffer } from 'buffer'; import { Clipboard } from 'phosphor-react'; import { useState } from 'react'; -import { getHashingAlgorithmString } from '~/screens/settings/library/KeysSetting'; - -import { SelectOptionKeyList } from '../key/KeyList'; - +import { useLibraryQuery } from '@sd/client'; +import { Button, Dialog, Input, Select, SelectOption, UseDialogProps, useDialog } from '@sd/ui'; import { useZodForm, z } from '@sd/ui/src/forms'; +import { getHashingAlgorithmString } from '~/screens/settings/library/KeysSetting'; +import { SelectOptionKeyList } from '../key/KeyList'; interface KeyViewerDialogProps extends UseDialogProps {} diff --git a/packages/interface/src/components/dialog/MasterPasswordChangeDialog.tsx b/packages/interface/src/components/dialog/MasterPasswordChangeDialog.tsx index ced27ec72..17c1b102f 100644 --- a/packages/interface/src/components/dialog/MasterPasswordChangeDialog.tsx +++ b/packages/interface/src/components/dialog/MasterPasswordChangeDialog.tsx @@ -1,16 +1,14 @@ -import { Algorithm, useLibraryMutation } from '@sd/client'; -import { Button, Dialog, Input, Select, SelectOption, UseDialogProps, useDialog } from '@sd/ui'; import cryptoRandomString from 'crypto-random-string'; import { ArrowsClockwise, Clipboard, Eye, EyeSlash } from 'phosphor-react'; import { useState } from 'react'; +import { Algorithm, useLibraryMutation } from '@sd/client'; +import { Button, Dialog, Input, Select, SelectOption, UseDialogProps, useDialog } from '@sd/ui'; +import { useZodForm, z } from '@sd/ui/src/forms'; import { getHashingAlgorithmSettings } from '~/screens/settings/library/KeysSetting'; import { showAlertDialog } from '~/util/dialog'; - import { generatePassword } from '../key/KeyMounter'; import { PasswordMeter } from '../key/PasswordMeter'; -import { useZodForm, z } from '@sd/ui/src/forms'; - export interface MasterPasswordChangeDialogProps extends UseDialogProps {} const schema = z.object({ diff --git a/packages/interface/src/components/explorer/Explorer.tsx b/packages/interface/src/components/explorer/Explorer.tsx index a18308da0..2b476e791 100644 --- a/packages/interface/src/components/explorer/Explorer.tsx +++ b/packages/interface/src/components/explorer/Explorer.tsx @@ -1,7 +1,6 @@ -import { ExplorerData, rspc, useCurrentLibrary } from '@sd/client'; import { useEffect, useState } from 'react'; +import { ExplorerData, rspc, useCurrentLibrary } from '@sd/client'; import { useExplorerStore } from '~/hooks/useExplorerStore'; - import { Inspector } from '../explorer/Inspector'; import { ExplorerContextMenu } from './ExplorerContextMenu'; import { TopBar } from './ExplorerTopBar'; diff --git a/packages/interface/src/components/explorer/ExplorerContextMenu.tsx b/packages/interface/src/components/explorer/ExplorerContextMenu.tsx index 0937a27d6..5fa4272b0 100644 --- a/packages/interface/src/components/explorer/ExplorerContextMenu.tsx +++ b/packages/interface/src/components/explorer/ExplorerContextMenu.tsx @@ -1,6 +1,3 @@ -import { ExplorerItem, useLibraryMutation, useLibraryQuery } from '@sd/client'; -import { ContextMenu as CM } from '@sd/ui'; -import { dialogManager } from '@sd/ui'; import { ArrowBendUpRight, Image, @@ -16,11 +13,13 @@ import { TrashSimple } from 'phosphor-react'; import { PropsWithChildren, useMemo } from 'react'; +import { ExplorerItem, useLibraryMutation, useLibraryQuery } from '@sd/client'; +import { ContextMenu as CM } from '@sd/ui'; +import { dialogManager } from '@sd/ui'; import { getExplorerStore, useExplorerStore } from '~/hooks/useExplorerStore'; import { useOperatingSystem } from '~/hooks/useOperatingSystem'; import { usePlatform } from '~/util/Platform'; import { showAlertDialog } from '~/util/dialog'; - import { DecryptFileDialog } from '../dialog/DecryptFileDialog'; import { DeleteFileDialog } from '../dialog/DeleteFileDialog'; import { EncryptFileDialog } from '../dialog/EncryptFileDialog'; diff --git a/packages/interface/src/components/explorer/ExplorerOptionsPanel.tsx b/packages/interface/src/components/explorer/ExplorerOptionsPanel.tsx index 63e965703..e334e4fda 100644 --- a/packages/interface/src/components/explorer/ExplorerOptionsPanel.tsx +++ b/packages/interface/src/components/explorer/ExplorerOptionsPanel.tsx @@ -1,6 +1,5 @@ -import { Select, SelectOption } from '@sd/ui'; import { PropsWithChildren, useState } from 'react'; - +import { Select, SelectOption } from '@sd/ui'; import Slider from '../primitive/Slider'; function Heading({ children }: PropsWithChildren) { diff --git a/packages/interface/src/components/explorer/ExplorerTopBar.tsx b/packages/interface/src/components/explorer/ExplorerTopBar.tsx index acc12291a..52b55c630 100644 --- a/packages/interface/src/components/explorer/ExplorerTopBar.tsx +++ b/packages/interface/src/components/explorer/ExplorerTopBar.tsx @@ -1,4 +1,3 @@ -import { Button, Input, OverlayPanel, cva } from '@sd/ui'; import clsx from 'clsx'; import { ArrowsClockwise, @@ -16,7 +15,7 @@ import { import { forwardRef, useEffect, useRef } from 'react'; import { useForm } from 'react-hook-form'; import { useNavigate } from 'react-router-dom'; - +import { Button, Input, OverlayPanel, cva } from '@sd/ui'; import { getExplorerStore, useExplorerStore } from '../../hooks/useExplorerStore'; import { useOperatingSystem } from '../../hooks/useOperatingSystem'; import { KeybindEvent } from '../../util/keybind'; diff --git a/packages/interface/src/components/explorer/FileItem.tsx b/packages/interface/src/components/explorer/FileItem.tsx index 1becf3dda..fdd6478ea 100644 --- a/packages/interface/src/components/explorer/FileItem.tsx +++ b/packages/interface/src/components/explorer/FileItem.tsx @@ -1,9 +1,8 @@ -import { ExplorerItem, isVideoExt } from '@sd/client'; -import { cva, tw } from '@sd/ui'; import clsx from 'clsx'; import { HTMLAttributes } from 'react'; +import { ExplorerItem, isVideoExt } from '@sd/client'; +import { cva, tw } from '@sd/ui'; import { getExplorerStore } from '~/hooks/useExplorerStore'; - import { FileItemContextMenu } from './ExplorerContextMenu'; import FileThumb from './FileThumb'; import { isObject } from './utils'; diff --git a/packages/interface/src/components/explorer/FileRow.tsx b/packages/interface/src/components/explorer/FileRow.tsx index 5f1832559..d4f15750e 100644 --- a/packages/interface/src/components/explorer/FileRow.tsx +++ b/packages/interface/src/components/explorer/FileRow.tsx @@ -1,7 +1,6 @@ -import { ExplorerItem } from '@sd/client'; import clsx from 'clsx'; import { HTMLAttributes } from 'react'; - +import { ExplorerItem } from '@sd/client'; import FileThumb from './FileThumb'; interface Props extends HTMLAttributes { diff --git a/packages/interface/src/components/explorer/FileThumb.tsx b/packages/interface/src/components/explorer/FileThumb.tsx index 653133261..60fff105b 100644 --- a/packages/interface/src/components/explorer/FileThumb.tsx +++ b/packages/interface/src/components/explorer/FileThumb.tsx @@ -3,12 +3,11 @@ import documentPdf from '@sd/assets/images/Document_pdf.png'; import executable from '@sd/assets/images/Executable.png'; import file from '@sd/assets/images/File.png'; import video from '@sd/assets/images/Video.png'; -import { ExplorerItem } from '@sd/client'; import clsx from 'clsx'; import { Suspense, lazy, useMemo } from 'react'; +import { ExplorerItem } from '@sd/client'; import { useExplorerStore } from '~/hooks/useExplorerStore'; import { usePlatform } from '~/util/Platform'; - import { Folder } from '../icons/Folder'; import { isObject, isPath } from './utils'; diff --git a/packages/interface/src/components/explorer/Inspector.tsx b/packages/interface/src/components/explorer/Inspector.tsx index 18a4e6bd4..393947b8a 100644 --- a/packages/interface/src/components/explorer/Inspector.tsx +++ b/packages/interface/src/components/explorer/Inspector.tsx @@ -1,11 +1,10 @@ // import types from '../../constants/file-types.json'; -import { ExplorerContext, ExplorerItem, useLibraryQuery } from '@sd/client'; -import { Button, tw } from '@sd/ui'; import clsx from 'clsx'; import dayjs from 'dayjs'; import { Barcode, CircleWavyCheck, Clock, Cube, Link, Lock, Snowflake } from 'phosphor-react'; import { useEffect, useState } from 'react'; - +import { ExplorerContext, ExplorerItem, useLibraryQuery } from '@sd/client'; +import { Button, tw } from '@sd/ui'; import { ObjectKind } from '../../util/kind'; import { DefaultProps } from '../primitive/types'; import { Tooltip } from '../tooltip/Tooltip'; diff --git a/packages/interface/src/components/explorer/VirtualizedList.tsx b/packages/interface/src/components/explorer/VirtualizedList.tsx index 96baf328e..4bab217d9 100644 --- a/packages/interface/src/components/explorer/VirtualizedList.tsx +++ b/packages/interface/src/components/explorer/VirtualizedList.tsx @@ -1,10 +1,9 @@ -import { ExplorerContext, ExplorerItem } from '@sd/client'; import { useVirtualizer } from '@tanstack/react-virtual'; import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'; import { useSearchParams } from 'react-router-dom'; import { useKey, useOnWindowResize } from 'rooks'; +import { ExplorerContext, ExplorerItem } from '@sd/client'; import { ExplorerLayoutMode, getExplorerStore, useExplorerStore } from '~/hooks/useExplorerStore'; - import FileItem from './FileItem'; import FileRow from './FileRow'; import { isPath } from './utils'; diff --git a/packages/interface/src/components/explorer/inspector/FavoriteButton.tsx b/packages/interface/src/components/explorer/inspector/FavoriteButton.tsx index a0227545c..a420fdaa6 100644 --- a/packages/interface/src/components/explorer/inspector/FavoriteButton.tsx +++ b/packages/interface/src/components/explorer/inspector/FavoriteButton.tsx @@ -1,8 +1,8 @@ +import { Heart } from 'phosphor-react'; +import { useEffect, useState } from 'react'; import { useLibraryMutation } from '@sd/client'; import { Object as SDObject } from '@sd/client'; import { Button } from '@sd/ui'; -import { Heart } from 'phosphor-react'; -import { useEffect, useState } from 'react'; interface Props { data: SDObject; diff --git a/packages/interface/src/components/explorer/inspector/Note.tsx b/packages/interface/src/components/explorer/inspector/Note.tsx index 339d36e45..514a7ded7 100644 --- a/packages/interface/src/components/explorer/inspector/Note.tsx +++ b/packages/interface/src/components/explorer/inspector/Note.tsx @@ -1,9 +1,8 @@ +import { useCallback, useState } from 'react'; +import { useDebouncedCallback } from 'use-debounce'; import { useLibraryMutation } from '@sd/client'; import { Object as SDObject } from '@sd/client'; import { TextArea } from '@sd/ui'; -import { useCallback, useState } from 'react'; -import { useDebouncedCallback } from 'use-debounce'; - import { MetaContainer, MetaTitle } from '../Inspector'; import { Divider } from './Divider'; diff --git a/packages/interface/src/components/items/DriveListItem.tsx b/packages/interface/src/components/items/DriveListItem.tsx index 3f7036ae9..26463757a 100644 --- a/packages/interface/src/components/items/DriveListItem.tsx +++ b/packages/interface/src/components/items/DriveListItem.tsx @@ -1,5 +1,4 @@ import clsx from 'clsx'; - import { DefaultProps } from '../primitive/types'; export interface DriveListItemProps extends DefaultProps { diff --git a/packages/interface/src/components/jobs/JobManager.tsx b/packages/interface/src/components/jobs/JobManager.tsx index 2b7b01639..e84105f69 100644 --- a/packages/interface/src/components/jobs/JobManager.tsx +++ b/packages/interface/src/components/jobs/JobManager.tsx @@ -1,6 +1,3 @@ -import { useLibraryMutation, useLibraryQuery } from '@sd/client'; -import { JobReport } from '@sd/client'; -import { Button, CategoryHeading, tw } from '@sd/ui'; import clsx from 'clsx'; import dayjs from 'dayjs'; import { @@ -19,7 +16,9 @@ import { TrashSimple, X } from 'phosphor-react'; - +import { useLibraryMutation, useLibraryQuery } from '@sd/client'; +import { JobReport } from '@sd/client'; +import { Button, CategoryHeading, tw } from '@sd/ui'; import ProgressBar from '../primitive/ProgressBar'; import { Tooltip } from '../tooltip/Tooltip'; diff --git a/packages/interface/src/components/key/Key.tsx b/packages/interface/src/components/key/Key.tsx index 58cb522d6..1d189d365 100644 --- a/packages/interface/src/components/key/Key.tsx +++ b/packages/interface/src/components/key/Key.tsx @@ -1,11 +1,10 @@ import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; -import { useLibraryMutation } from '@sd/client'; -import { Button } from '@sd/ui'; import clsx from 'clsx'; import { DotsThree, Eye, Key as KeyIcon } from 'phosphor-react'; import { MutableRefObject, PropsWithChildren, useState } from 'react'; import { animated, useTransition } from 'react-spring'; - +import { useLibraryMutation } from '@sd/client'; +import { Button } from '@sd/ui'; import { DefaultProps } from '../primitive/types'; import { Tooltip } from '../tooltip/Tooltip'; diff --git a/packages/interface/src/components/key/KeyList.tsx b/packages/interface/src/components/key/KeyList.tsx index e58564598..e78de4e85 100644 --- a/packages/interface/src/components/key/KeyList.tsx +++ b/packages/interface/src/components/key/KeyList.tsx @@ -1,7 +1,6 @@ +import { useMemo, useRef } from 'react'; import { useLibraryMutation, useLibraryQuery } from '@sd/client'; import { Button, SelectOption } from '@sd/ui'; -import { useMemo, useRef } from 'react'; - import { DefaultProps } from '../primitive/types'; import { DummyKey, Key } from './Key'; diff --git a/packages/interface/src/components/key/KeyManager.tsx b/packages/interface/src/components/key/KeyManager.tsx index 682e30362..e9d594b8b 100644 --- a/packages/interface/src/components/key/KeyManager.tsx +++ b/packages/interface/src/components/key/KeyManager.tsx @@ -1,8 +1,7 @@ -import { useLibraryMutation, useLibraryQuery } from '@sd/client'; -import { Button, ButtonLink, Input, Tabs } from '@sd/ui'; import { Eye, EyeSlash, Gear, Lock } from 'phosphor-react'; import { useState } from 'react'; - +import { useLibraryMutation, useLibraryQuery } from '@sd/client'; +import { Button, ButtonLink, Input, Tabs } from '@sd/ui'; import { DefaultProps } from '../primitive/types'; import { KeyList } from './KeyList'; import { KeyMounter } from './KeyMounter'; diff --git a/packages/interface/src/components/key/KeyMounter.tsx b/packages/interface/src/components/key/KeyMounter.tsx index 95b397f6d..c3c82d445 100644 --- a/packages/interface/src/components/key/KeyMounter.tsx +++ b/packages/interface/src/components/key/KeyMounter.tsx @@ -1,9 +1,8 @@ -import { Algorithm, useLibraryMutation, useLibraryQuery } from '@sd/client'; -import { Button, CategoryHeading, Input, Select, SelectOption, Switch, cva, tw } from '@sd/ui'; import cryptoRandomString from 'crypto-random-string'; import { Eye, EyeSlash, Info } from 'phosphor-react'; import { useEffect, useRef, useState } from 'react'; - +import { Algorithm, useLibraryMutation, useLibraryQuery } from '@sd/client'; +import { Button, CategoryHeading, Input, Select, SelectOption, Switch, cva, tw } from '@sd/ui'; import { getHashingAlgorithmSettings } from '../../screens/settings/library/KeysSetting'; import Slider from '../primitive/Slider'; import { Tooltip } from '../tooltip/Tooltip'; diff --git a/packages/interface/src/components/layout/Modal.tsx b/packages/interface/src/components/layout/Modal.tsx index 42c39efc9..95f7c50f6 100644 --- a/packages/interface/src/components/layout/Modal.tsx +++ b/packages/interface/src/components/layout/Modal.tsx @@ -1,8 +1,8 @@ import { Transition } from '@headlessui/react'; -import { ButtonLink } from '@sd/ui'; import clsx from 'clsx'; import { X } from 'phosphor-react'; import { PropsWithChildren } from 'react'; +import { ButtonLink } from '@sd/ui'; export function Model( props: PropsWithChildren<{ diff --git a/packages/interface/src/components/layout/Sidebar.tsx b/packages/interface/src/components/layout/Sidebar.tsx index aca50d83d..611294dbc 100644 --- a/packages/interface/src/components/layout/Sidebar.tsx +++ b/packages/interface/src/components/layout/Sidebar.tsx @@ -1,4 +1,8 @@ import { ReactComponent as Ellipsis } from '@sd/assets/svgs/ellipsis.svg'; +import clsx from 'clsx'; +import { CheckCircle, CirclesFour, Gear, Lock, Planet, Plus } from 'phosphor-react'; +import React, { PropsWithChildren } from 'react'; +import { NavLink, NavLinkProps } from 'react-router-dom'; import { LocationCreateArgs, getDebugState, @@ -22,13 +26,8 @@ import { dialogManager, tw } from '@sd/ui'; -import clsx from 'clsx'; -import { CheckCircle, CirclesFour, Gear, Lock, Planet, Plus } from 'phosphor-react'; -import React, { PropsWithChildren } from 'react'; -import { NavLink, NavLinkProps } from 'react-router-dom'; import { useOperatingSystem } from '~/hooks/useOperatingSystem'; import { usePlatform } from '~/util/Platform'; - import AddLocationDialog from '../dialog/AddLocationDialog'; import CreateLibraryDialog from '../dialog/CreateLibraryDialog'; import { Folder } from '../icons/Folder'; diff --git a/packages/interface/src/components/location/LocationListItem.tsx b/packages/interface/src/components/location/LocationListItem.tsx index 8afb50f94..8c62a56ad 100644 --- a/packages/interface/src/components/location/LocationListItem.tsx +++ b/packages/interface/src/components/location/LocationListItem.tsx @@ -1,15 +1,13 @@ -import { useLibraryMutation } from '@sd/client'; -import { Location, Node } from '@sd/client'; -import { Button, Card, Dialog, UseDialogProps, dialogManager, useDialog } from '@sd/ui'; import clsx from 'clsx'; import { Repeat, Trash } from 'phosphor-react'; import { useState } from 'react'; - +import { useLibraryMutation } from '@sd/client'; +import { Location, Node } from '@sd/client'; +import { Button, Card, Dialog, UseDialogProps, dialogManager, useDialog } from '@sd/ui'; +import { useZodForm, z } from '@sd/ui/src/forms'; import { Folder } from '../icons/Folder'; import { Tooltip } from '../tooltip/Tooltip'; -import { useZodForm, z } from '@sd/ui/src/forms'; - interface LocationListItemProps { location: Location & { node: Node }; } diff --git a/packages/interface/src/components/onboarding/Onboarding.tsx b/packages/interface/src/components/onboarding/Onboarding.tsx index 993e1738d..724d07db6 100644 --- a/packages/interface/src/components/onboarding/Onboarding.tsx +++ b/packages/interface/src/components/onboarding/Onboarding.tsx @@ -1,6 +1,5 @@ -import { Button, dialogManager } from '@sd/ui'; import { useNavigate } from 'react-router'; - +import { Button, dialogManager } from '@sd/ui'; import CreateLibraryDialog from '../dialog/CreateLibraryDialog'; // TODO: This page requires styling for now it is just a placeholder. diff --git a/packages/interface/src/components/os/TrafficLights.tsx b/packages/interface/src/components/os/TrafficLights.tsx index 6a9265424..60981bdb1 100644 --- a/packages/interface/src/components/os/TrafficLights.tsx +++ b/packages/interface/src/components/os/TrafficLights.tsx @@ -3,7 +3,6 @@ import fullscreenIconPath from '@sd/assets/svgs/macos_fullscreen.svg'; import minimizeIconPath from '@sd/assets/svgs/macos_minimize.svg'; import clsx from 'clsx'; import { HTMLAttributes, useEffect, useRef } from 'react'; - import { useFocusState } from '~/hooks/useFocusState'; import { DefaultProps } from '../primitive/types'; @@ -18,10 +17,7 @@ export function MacTrafficLights(props: TrafficLightsProps) { const [focused] = useFocusState(); return ( -
+
diff --git a/packages/interface/src/components/primitive/InputContainer.tsx b/packages/interface/src/components/primitive/InputContainer.tsx index 0876ff562..82b1c63d5 100644 --- a/packages/interface/src/components/primitive/InputContainer.tsx +++ b/packages/interface/src/components/primitive/InputContainer.tsx @@ -1,6 +1,5 @@ import clsx from 'clsx'; import { PropsWithChildren } from 'react'; - import { DefaultProps } from './types'; interface InputContainerProps extends DefaultProps { diff --git a/packages/interface/src/components/primitive/PopoverPicker.tsx b/packages/interface/src/components/primitive/PopoverPicker.tsx index a6e6719fd..dfa8bfcd9 100644 --- a/packages/interface/src/components/primitive/PopoverPicker.tsx +++ b/packages/interface/src/components/primitive/PopoverPicker.tsx @@ -2,7 +2,6 @@ import clsx from 'clsx'; import { useCallback, useRef, useState } from 'react'; import { HexColorPicker } from 'react-colorful'; import { UseControllerProps, useController } from 'react-hook-form'; - import useClickOutside from '../../hooks/useClickOutside'; interface PopoverPickerProps extends UseControllerProps { diff --git a/packages/interface/src/components/primitive/Shortcut.tsx b/packages/interface/src/components/primitive/Shortcut.tsx index c0edfd6ec..7bc0cbe16 100644 --- a/packages/interface/src/components/primitive/Shortcut.tsx +++ b/packages/interface/src/components/primitive/Shortcut.tsx @@ -1,5 +1,4 @@ import clsx from 'clsx'; - import { DefaultProps } from './types'; export interface ShortcutProps extends DefaultProps { diff --git a/packages/interface/src/components/primitive/Tag.tsx b/packages/interface/src/components/primitive/Tag.tsx index 6e5c1d674..d1972b7fd 100644 --- a/packages/interface/src/components/primitive/Tag.tsx +++ b/packages/interface/src/components/primitive/Tag.tsx @@ -1,6 +1,5 @@ import clsx from 'clsx'; import { PropsWithChildren, ReactNode } from 'react'; - import { DefaultProps } from './types'; export interface TagProps extends DefaultProps { diff --git a/packages/interface/src/components/primitive/Toasts.tsx b/packages/interface/src/components/primitive/Toasts.tsx index 9f81018a4..d7cbcbf1f 100644 --- a/packages/interface/src/components/primitive/Toasts.tsx +++ b/packages/interface/src/components/primitive/Toasts.tsx @@ -1,6 +1,5 @@ import * as ToastPrimitive from '@radix-ui/react-toast'; import clsx from 'clsx'; - import { useToasts } from '../../hooks/useToasts'; export function Toasts() { diff --git a/packages/interface/src/components/settings/SettingsContainer.tsx b/packages/interface/src/components/settings/SettingsContainer.tsx index 302881c39..03ea8433c 100644 --- a/packages/interface/src/components/settings/SettingsContainer.tsx +++ b/packages/interface/src/components/settings/SettingsContainer.tsx @@ -1,6 +1,5 @@ import clsx from 'clsx'; import { PropsWithChildren } from 'react'; - import { useOperatingSystem } from '../../hooks/useOperatingSystem'; export const SettingsContainer = ({ children }: PropsWithChildren) => { diff --git a/packages/interface/src/components/settings/SettingsSidebar.tsx b/packages/interface/src/components/settings/SettingsSidebar.tsx index 8cb1d81dd..90f060d30 100644 --- a/packages/interface/src/components/settings/SettingsSidebar.tsx +++ b/packages/interface/src/components/settings/SettingsSidebar.tsx @@ -13,7 +13,6 @@ import { ShieldCheck, TagSimple } from 'phosphor-react'; - import { useOperatingSystem } from '../../hooks/useOperatingSystem'; import { SidebarLink } from '../layout/Sidebar'; import { SettingsHeading, SettingsIcon } from './SettingsHeader'; diff --git a/packages/interface/src/hooks/useDebouncedForm.ts b/packages/interface/src/hooks/useDebouncedForm.ts index 39cbf9549..5189e8ebe 100644 --- a/packages/interface/src/hooks/useDebouncedForm.ts +++ b/packages/interface/src/hooks/useDebouncedForm.ts @@ -1,7 +1,7 @@ -import { useCurrentLibrary } from '@sd/client'; import { useEffect } from 'react'; import { FieldValues, UseFormReturn } from 'react-hook-form'; import { useDebouncedCallback } from 'use-debounce'; +import { useCurrentLibrary } from '@sd/client'; export function useDebouncedForm( form: UseFormReturn<{ id: string } & object, TContext>, diff --git a/packages/interface/src/hooks/useExplorerStore.tsx b/packages/interface/src/hooks/useExplorerStore.tsx index 77019de9c..15e957cf3 100644 --- a/packages/interface/src/hooks/useExplorerStore.tsx +++ b/packages/interface/src/hooks/useExplorerStore.tsx @@ -1,6 +1,5 @@ -import { onLibraryChange } from '@sd/client'; import { proxy, useSnapshot } from 'valtio'; - +import { onLibraryChange } from '@sd/client'; import { resetStore } from '@sd/client/src/stores/util'; export type ExplorerLayoutMode = 'list' | 'grid' | 'columns' | 'media'; diff --git a/packages/interface/src/hooks/useKeyboardHandler.ts b/packages/interface/src/hooks/useKeyboardHandler.ts index 82e848636..852bb2773 100644 --- a/packages/interface/src/hooks/useKeyboardHandler.ts +++ b/packages/interface/src/hooks/useKeyboardHandler.ts @@ -1,6 +1,5 @@ import { useEffect } from 'react'; import { useNavigate } from 'react-router'; - import { KeybindEvent } from '../util/keybind'; export function useKeybindHandler() { diff --git a/packages/interface/src/hooks/useOperatingSystem.ts b/packages/interface/src/hooks/useOperatingSystem.ts index b09da3921..907954800 100644 --- a/packages/interface/src/hooks/useOperatingSystem.ts +++ b/packages/interface/src/hooks/useOperatingSystem.ts @@ -1,5 +1,4 @@ import { useQuery } from '@tanstack/react-query'; - import { OperatingSystem, usePlatform } from '../util/Platform'; export function guessOperatingSystem(): OperatingSystem { diff --git a/packages/interface/src/screens/Debug.tsx b/packages/interface/src/screens/Debug.tsx index 88014d464..befab2ed7 100644 --- a/packages/interface/src/screens/Debug.tsx +++ b/packages/interface/src/screens/Debug.tsx @@ -1,5 +1,4 @@ import { useBridgeQuery, useLibraryMutation, useLibraryQuery } from '@sd/client'; - import CodeBlock from '~/components/primitive/Codeblock'; import { usePlatform } from '~/util/Platform'; diff --git a/packages/interface/src/screens/LocationExplorer.tsx b/packages/interface/src/screens/LocationExplorer.tsx index 951887c0b..941d8f6a4 100644 --- a/packages/interface/src/screens/LocationExplorer.tsx +++ b/packages/interface/src/screens/LocationExplorer.tsx @@ -1,7 +1,6 @@ -import { useCurrentLibrary, useLibraryQuery } from '@sd/client'; import { useEffect } from 'react'; import { useParams, useSearchParams } from 'react-router-dom'; - +import { useCurrentLibrary, useLibraryQuery } from '@sd/client'; import Explorer from '~/components/explorer/Explorer'; import { getExplorerStore } from '~/hooks/useExplorerStore'; diff --git a/packages/interface/src/screens/Overview.tsx b/packages/interface/src/screens/Overview.tsx index 27a68c149..a597babc0 100644 --- a/packages/interface/src/screens/Overview.tsx +++ b/packages/interface/src/screens/Overview.tsx @@ -1,12 +1,11 @@ -import { onLibraryChange, queryClient, useCurrentLibrary, useLibraryQuery } from '@sd/client'; -import { Statistics } from '@sd/client'; import byteSize from 'byte-size'; import clsx from 'clsx'; import { useEffect } from 'react'; import Skeleton from 'react-loading-skeleton'; import 'react-loading-skeleton/dist/skeleton.css'; import { proxy } from 'valtio'; - +import { onLibraryChange, queryClient, useCurrentLibrary, useLibraryQuery } from '@sd/client'; +import { Statistics } from '@sd/client'; import useCounter from '~/hooks/useCounter'; import { usePlatform } from '~/util/Platform'; diff --git a/packages/interface/src/screens/TagExplorer.tsx b/packages/interface/src/screens/TagExplorer.tsx index 674bcfb0b..ed88e8bed 100644 --- a/packages/interface/src/screens/TagExplorer.tsx +++ b/packages/interface/src/screens/TagExplorer.tsx @@ -1,6 +1,5 @@ -import { useCurrentLibrary, useLibraryQuery } from '@sd/client'; import { useParams } from 'react-router-dom'; - +import { useCurrentLibrary, useLibraryQuery } from '@sd/client'; import Explorer from '~/components/explorer/Explorer'; export default function TagExplorer() { diff --git a/packages/interface/src/screens/settings/Settings.tsx b/packages/interface/src/screens/settings/Settings.tsx index 223b89e70..eef0cb955 100644 --- a/packages/interface/src/screens/settings/Settings.tsx +++ b/packages/interface/src/screens/settings/Settings.tsx @@ -1,6 +1,5 @@ import { Suspense } from 'react'; import { Outlet } from 'react-router'; - import { SettingsSidebar } from '~/components/settings/SettingsSidebar'; export default function SettingsScreen() { diff --git a/packages/interface/src/screens/settings/client/AppearanceSettings.tsx b/packages/interface/src/screens/settings/client/AppearanceSettings.tsx index a13853e7f..1b80d3c76 100644 --- a/packages/interface/src/screens/settings/client/AppearanceSettings.tsx +++ b/packages/interface/src/screens/settings/client/AppearanceSettings.tsx @@ -1,6 +1,5 @@ -import { Switch } from '@sd/ui'; import { useState } from 'react'; - +import { Switch } from '@sd/ui'; import { InputContainer } from '~/components/primitive/InputContainer'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; import { SettingsHeader } from '~/components/settings/SettingsHeader'; diff --git a/packages/interface/src/screens/settings/client/ExtensionsSettings.tsx b/packages/interface/src/screens/settings/client/ExtensionsSettings.tsx index 83e13010e..637d2f43f 100644 --- a/packages/interface/src/screens/settings/client/ExtensionsSettings.tsx +++ b/packages/interface/src/screens/settings/client/ExtensionsSettings.tsx @@ -1,6 +1,5 @@ -import { Button, Card, GridLayout, Input } from '@sd/ui'; import { MagnifyingGlass } from 'phosphor-react'; - +import { Button, Card, GridLayout, Input } from '@sd/ui'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; import { SettingsHeader } from '~/components/settings/SettingsHeader'; diff --git a/packages/interface/src/screens/settings/client/GeneralSettings.tsx b/packages/interface/src/screens/settings/client/GeneralSettings.tsx index 55641550c..adad66ca8 100644 --- a/packages/interface/src/screens/settings/client/GeneralSettings.tsx +++ b/packages/interface/src/screens/settings/client/GeneralSettings.tsx @@ -1,7 +1,6 @@ +import { Database } from 'phosphor-react'; import { getDebugState, useBridgeQuery, useDebugState } from '@sd/client'; import { Card, Input, Switch, tw } from '@sd/ui'; -import { Database } from 'phosphor-react'; - import { InputContainer } from '~/components/primitive/InputContainer'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; import { SettingsHeader } from '~/components/settings/SettingsHeader'; diff --git a/packages/interface/src/screens/settings/client/KeybindingSettings.tsx b/packages/interface/src/screens/settings/client/KeybindingSettings.tsx index 7394c1874..cbf33b32c 100644 --- a/packages/interface/src/screens/settings/client/KeybindingSettings.tsx +++ b/packages/interface/src/screens/settings/client/KeybindingSettings.tsx @@ -1,6 +1,5 @@ -import { Switch } from '@sd/ui'; import { useState } from 'react'; - +import { Switch } from '@sd/ui'; import { InputContainer } from '~/components/primitive/InputContainer'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; import { SettingsHeader } from '~/components/settings/SettingsHeader'; diff --git a/packages/interface/src/screens/settings/client/PrivacySettings.tsx b/packages/interface/src/screens/settings/client/PrivacySettings.tsx index b31f82cc6..33714ac36 100644 --- a/packages/interface/src/screens/settings/client/PrivacySettings.tsx +++ b/packages/interface/src/screens/settings/client/PrivacySettings.tsx @@ -1,6 +1,5 @@ -import { Switch } from '@sd/ui'; import { useState } from 'react'; - +import { Switch } from '@sd/ui'; import { InputContainer } from '~/components/primitive/InputContainer'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; import { SettingsHeader } from '~/components/settings/SettingsHeader'; diff --git a/packages/interface/src/screens/settings/info/AboutSpacedrive.tsx b/packages/interface/src/screens/settings/info/AboutSpacedrive.tsx index 446432f07..f11f77056 100644 --- a/packages/interface/src/screens/settings/info/AboutSpacedrive.tsx +++ b/packages/interface/src/screens/settings/info/AboutSpacedrive.tsx @@ -1,6 +1,5 @@ import Logo from '@sd/assets/images/logo.png'; import { useBridgeQuery } from '@sd/client'; - import { SettingsContainer } from '../../../components/settings/SettingsContainer'; import { SettingsHeader } from '../../../components/settings/SettingsHeader'; diff --git a/packages/interface/src/screens/settings/library/KeysSetting.tsx b/packages/interface/src/screens/settings/library/KeysSetting.tsx index d5e91679f..c4c828c49 100644 --- a/packages/interface/src/screens/settings/library/KeysSetting.tsx +++ b/packages/interface/src/screens/settings/library/KeysSetting.tsx @@ -1,10 +1,10 @@ import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; -import { HashingAlgorithm, useLibraryMutation, useLibraryQuery } from '@sd/client'; -import { Button, Input, dialogManager } from '@sd/ui'; import clsx from 'clsx'; import { Eye, EyeSlash, Lock, Plus } from 'phosphor-react'; import { PropsWithChildren, useState } from 'react'; import { animated, useTransition } from 'react-spring'; +import { HashingAlgorithm, useLibraryMutation, useLibraryQuery } from '@sd/client'; +import { Button, Input, dialogManager } from '@sd/ui'; import { BackupRestoreDialog } from '~/components/dialog/BackupRestoreDialog'; import { KeyViewerDialog } from '~/components/dialog/KeyViewerDialog'; import { MasterPasswordChangeDialog } from '~/components/dialog/MasterPasswordChangeDialog'; diff --git a/packages/interface/src/screens/settings/library/LibraryGeneralSettings.tsx b/packages/interface/src/screens/settings/library/LibraryGeneralSettings.tsx index 00d4e6b99..e8e12facc 100644 --- a/packages/interface/src/screens/settings/library/LibraryGeneralSettings.tsx +++ b/packages/interface/src/screens/settings/library/LibraryGeneralSettings.tsx @@ -1,8 +1,7 @@ +import { useForm } from 'react-hook-form'; import { useBridgeMutation } from '@sd/client'; import { useCurrentLibrary } from '@sd/client'; import { Button, Input, Switch } from '@sd/ui'; -import { useForm } from 'react-hook-form'; - import { InputContainer } from '~/components/primitive/InputContainer'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; import { SettingsHeader } from '~/components/settings/SettingsHeader'; diff --git a/packages/interface/src/screens/settings/library/LocationSettings.tsx b/packages/interface/src/screens/settings/library/LocationSettings.tsx index 3d4e2cd56..263502c4e 100644 --- a/packages/interface/src/screens/settings/library/LocationSettings.tsx +++ b/packages/interface/src/screens/settings/library/LocationSettings.tsx @@ -1,7 +1,7 @@ +import { MagnifyingGlass } from 'phosphor-react'; import { useLibraryMutation, useLibraryQuery } from '@sd/client'; import { LocationCreateArgs } from '@sd/client'; import { Button, Input, dialogManager } from '@sd/ui'; -import { MagnifyingGlass } from 'phosphor-react'; import AddLocationDialog from '~/components/dialog/AddLocationDialog'; import LocationListItem from '~/components/location/LocationListItem'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; diff --git a/packages/interface/src/screens/settings/library/TagsSettings.tsx b/packages/interface/src/screens/settings/library/TagsSettings.tsx index 4b627a439..deeb7c9f0 100644 --- a/packages/interface/src/screens/settings/library/TagsSettings.tsx +++ b/packages/interface/src/screens/settings/library/TagsSettings.tsx @@ -1,17 +1,16 @@ -import { Tag, useLibraryMutation, useLibraryQuery } from '@sd/client'; -import { Button, Card, Dialog, Switch, UseDialogProps, dialogManager, useDialog } from '@sd/ui'; import clsx from 'clsx'; import { Trash } from 'phosphor-react'; import { useCallback, useEffect, useState } from 'react'; import { useDebounce } from 'rooks'; +import { Tag, useLibraryMutation, useLibraryQuery } from '@sd/client'; +import { Button, Card, Dialog, Switch, UseDialogProps, dialogManager, useDialog } from '@sd/ui'; +import { Form, Input, useZodForm, z } from '@sd/ui/src/forms'; import { InputContainer } from '~/components/primitive/InputContainer'; import { PopoverPicker } from '~/components/primitive/PopoverPicker'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; import { SettingsHeader } from '~/components/settings/SettingsHeader'; import { Tooltip } from '~/components/tooltip/Tooltip'; -import { Form, Input, useZodForm, z } from '@sd/ui/src/forms'; - export default function TagsSettings() { const tags = useLibraryQuery(['tags.list']); diff --git a/packages/interface/src/screens/settings/node/ExperimentalSettings.tsx b/packages/interface/src/screens/settings/node/ExperimentalSettings.tsx index a1b718fa0..76405906f 100644 --- a/packages/interface/src/screens/settings/node/ExperimentalSettings.tsx +++ b/packages/interface/src/screens/settings/node/ExperimentalSettings.tsx @@ -1,5 +1,4 @@ import { Switch } from '@sd/ui'; - import { useNodeStore } from '~/components/device/Stores'; import { InputContainer } from '~/components/primitive/InputContainer'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; diff --git a/packages/interface/src/screens/settings/node/LibrariesSettings.tsx b/packages/interface/src/screens/settings/node/LibrariesSettings.tsx index 2e433573c..3378b3340 100644 --- a/packages/interface/src/screens/settings/node/LibrariesSettings.tsx +++ b/packages/interface/src/screens/settings/node/LibrariesSettings.tsx @@ -1,7 +1,7 @@ +import { Database, DotsSixVertical, Pencil, Trash } from 'phosphor-react'; import { useBridgeQuery, useCurrentLibrary } from '@sd/client'; import { LibraryConfigWrapped } from '@sd/client'; import { Button, ButtonLink, Card, dialogManager, tw } from '@sd/ui'; -import { Database, DotsSixVertical, Pencil, Trash } from 'phosphor-react'; import CreateLibraryDialog from '~/components/dialog/CreateLibraryDialog'; import DeleteLibraryDialog from '~/components/dialog/DeleteLibraryDialog'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; diff --git a/packages/interface/src/screens/settings/node/P2PSettings.tsx b/packages/interface/src/screens/settings/node/P2PSettings.tsx index b90308693..d4ba32f03 100644 --- a/packages/interface/src/screens/settings/node/P2PSettings.tsx +++ b/packages/interface/src/screens/settings/node/P2PSettings.tsx @@ -1,5 +1,4 @@ import { Input, Switch } from '@sd/ui'; - import { InputContainer } from '~/components/primitive/InputContainer'; import { SettingsContainer } from '~/components/settings/SettingsContainer'; import { SettingsHeader } from '~/components/settings/SettingsHeader'; diff --git a/packages/interface/src/style.scss b/packages/interface/src/style.scss index 1d042278d..f5d78a984 100644 --- a/packages/interface/src/style.scss +++ b/packages/interface/src/style.scss @@ -45,7 +45,6 @@ body { } &::-webkit-scrollbar-thumb { @apply rounded-[6px] bg-transparent; - } &:hover { &::-webkit-scrollbar-thumb { diff --git a/packages/interface/tsconfig.json b/packages/interface/tsconfig.json index e5764d9f4..924e7526d 100644 --- a/packages/interface/tsconfig.json +++ b/packages/interface/tsconfig.json @@ -4,18 +4,11 @@ "rootDir": "src", "declarationDir": "dist", "paths": { - "~/*": [ - "./src/*" - ] + "~/*": ["./src/*"] }, - "types": [ - "vite-plugin-svgr/client", - "vite/client" - ] + "types": ["vite-plugin-svgr/client", "vite/client"] }, - "include": [ - "src" - ], + "include": ["src"], "references": [ { "path": "../ui" diff --git a/packages/ui/src/Button.stories.tsx b/packages/ui/src/Button.stories.tsx index d5518c370..077f11080 100644 --- a/packages/ui/src/Button.stories.tsx +++ b/packages/ui/src/Button.stories.tsx @@ -1,5 +1,4 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; - import { Button } from './Button'; export default { diff --git a/packages/ui/src/Dialog.tsx b/packages/ui/src/Dialog.tsx index 58dc9dc69..c4f2505f1 100644 --- a/packages/ui/src/Dialog.tsx +++ b/packages/ui/src/Dialog.tsx @@ -4,7 +4,6 @@ import { ReactElement, ReactNode, useEffect } from 'react'; import { FieldValues } from 'react-hook-form'; import { animated, useTransition } from 'react-spring'; import { proxy, ref, subscribe, useSnapshot } from 'valtio'; - import { Button, Loader } from '../'; import { Form, FormProps } from './forms/Form'; diff --git a/packages/ui/src/Dropdown.stories.tsx b/packages/ui/src/Dropdown.stories.tsx index 94f4a6915..c262d6a77 100644 --- a/packages/ui/src/Dropdown.stories.tsx +++ b/packages/ui/src/Dropdown.stories.tsx @@ -1,5 +1,4 @@ import { ComponentMeta, ComponentStory } from '@storybook/react'; - import { Root } from './Dropdown'; export default { diff --git a/packages/ui/src/Dropdown.tsx b/packages/ui/src/Dropdown.tsx index 16fc5ee9b..285ede473 100644 --- a/packages/ui/src/Dropdown.tsx +++ b/packages/ui/src/Dropdown.tsx @@ -1,10 +1,9 @@ -import { Menu, Transition } from '@headlessui/react'; import { ReactComponent as CaretDown } from '@sd/assets/svgs/caret.svg'; +import { Menu, Transition } from '@headlessui/react'; import { VariantProps, cva } from 'class-variance-authority'; import clsx from 'clsx'; import { Fragment, PropsWithChildren } from 'react'; import { Link } from 'react-router-dom'; - import * as UI from '.'; import { tw } from './utils'; diff --git a/packages/ui/src/Select.tsx b/packages/ui/src/Select.tsx index 3469db813..3a4c1806e 100644 --- a/packages/ui/src/Select.tsx +++ b/packages/ui/src/Select.tsx @@ -1,5 +1,5 @@ -import * as SelectPrimitive from '@radix-ui/react-select'; import { ReactComponent as ChevronDouble } from '@sd/assets/svgs/chevron-double.svg'; +import * as SelectPrimitive from '@radix-ui/react-select'; import clsx from 'clsx'; import { CaretDown, Check } from 'phosphor-react'; import { PropsWithChildren } from 'react'; diff --git a/packages/ui/src/Tabs.tsx b/packages/ui/src/Tabs.tsx index 4b5503c55..cf56f7cf3 100644 --- a/packages/ui/src/Tabs.tsx +++ b/packages/ui/src/Tabs.tsx @@ -1,5 +1,4 @@ import * as TabsPrimitive from '@radix-ui/react-tabs'; - import { tw } from './utils'; export const Root = tw(TabsPrimitive.Root)` diff --git a/packages/ui/src/forms/CheckBox.tsx b/packages/ui/src/forms/CheckBox.tsx index c2274a2c3..af5fb0ed4 100644 --- a/packages/ui/src/forms/CheckBox.tsx +++ b/packages/ui/src/forms/CheckBox.tsx @@ -1,5 +1,4 @@ import { forwardRef } from 'react'; - import { CheckBox as Root } from '../CheckBox'; import { FormField, UseFormFieldProps, useFormField } from './FormField'; diff --git a/packages/ui/src/forms/Input.tsx b/packages/ui/src/forms/Input.tsx index bb8638d9f..adb3485e0 100644 --- a/packages/ui/src/forms/Input.tsx +++ b/packages/ui/src/forms/Input.tsx @@ -1,5 +1,4 @@ import { forwardRef } from 'react'; - import * as Root from '../Input'; import { FormField, UseFormFieldProps, useFormField } from './FormField'; diff --git a/packages/ui/src/forms/Switch.tsx b/packages/ui/src/forms/Switch.tsx index 67d6e7eaa..0c9b3bd6f 100644 --- a/packages/ui/src/forms/Switch.tsx +++ b/packages/ui/src/forms/Switch.tsx @@ -1,6 +1,5 @@ import { forwardRef } from 'react'; import { useController } from 'react-hook-form'; - import * as Root from '../Switch'; import { FormField, UseFormFieldProps, useFormField } from './FormField'; diff --git a/packages/ui/style/colors.scss b/packages/ui/style/colors.scss index a77397e5e..5c83a35de 100644 --- a/packages/ui/style/colors.scss +++ b/packages/ui/style/colors.scss @@ -1,100 +1,100 @@ :root { - --dark-hue: 235; //300, 295 - --light-hue: 235; + --dark-hue: 235; //300, 295 + --light-hue: 235; - // global - --color-black: 0, 0%, 0%; - --color-white: 0, 0%, 100%; - // accent theme colors - --color-accent: 208, 100%, 57%; - --color-accent-faint: 208, 100%, 64%; - --color-accent-deep: 208, 100%, 47%; - // text - --color-ink: var(--dark-hue), 0%, 100%; - --color-ink-dull: var(--dark-hue), 10%, 70%; - --color-ink-faint: var(--dark-hue), 10%, 55%; - // sidebar - --color-sidebar: var(--dark-hue), 15%, 7%; - --color-sidebar-box: var(--dark-hue), 15%, 16%; - --color-sidebar-line: var(--dark-hue), 15%, 23%; - --color-sidebar-divider: var(--dark-hue), 15%, 17%; - --color-sidebar-button: var(--dark-hue), 15%, 18%; - --color-sidebar-selected: var(--dark-hue), 15%, 24%; - --color-sidebar-shade: var(--dark-hue), 15%, 23%; - // main - --color-app: var(--dark-hue), 15%, 13%; - --color-app-box: var(--dark-hue), 15%, 18%; - --color-app-overlay: var(--dark-hue), 15%, 17%; - --color-app-input: var(--dark-hue), 15%, 20%; - --color-app-focus: var(--dark-hue), 15%, 10%; - --color-app-line: var(--dark-hue), 15%, 23%; - --color-app-divider: var(--dark-hue), 15%, 5%; - --color-app-button: var(--dark-hue), 15%, 23%; - --color-app-hover: var(--dark-hue), 15%, 25%; - --color-app-selected: var(--dark-hue), 15%, 26%; - --color-app-active: var(--dark-hue), 15%, 30%; - --color-app-shade: var(--dark-hue), 15%, 0%; - --color-app-frame: var(--dark-hue), 15%, 25%; - // menu - --color-menu: var(--dark-hue), 25%, 5%; - --color-menu-line: var(--dark-hue), 15%, 7%; - --color-menu-ink: var(--dark-hue), 5%, 100%; - --color-menu-faint: var(--dark-hue), 5%, 80%; - --color-menu-hover: var(--dark-hue), 15%, 30%; - --color-menu-selected: var(--dark-hue), 5%, 30%; - --color-menu-shade: var(--dark-hue), 5%, 0%; + // global + --color-black: 0, 0%, 0%; + --color-white: 0, 0%, 100%; + // accent theme colors + --color-accent: 208, 100%, 57%; + --color-accent-faint: 208, 100%, 64%; + --color-accent-deep: 208, 100%, 47%; + // text + --color-ink: var(--dark-hue), 0%, 100%; + --color-ink-dull: var(--dark-hue), 10%, 70%; + --color-ink-faint: var(--dark-hue), 10%, 55%; + // sidebar + --color-sidebar: var(--dark-hue), 15%, 7%; + --color-sidebar-box: var(--dark-hue), 15%, 16%; + --color-sidebar-line: var(--dark-hue), 15%, 23%; + --color-sidebar-divider: var(--dark-hue), 15%, 17%; + --color-sidebar-button: var(--dark-hue), 15%, 18%; + --color-sidebar-selected: var(--dark-hue), 15%, 24%; + --color-sidebar-shade: var(--dark-hue), 15%, 23%; + // main + --color-app: var(--dark-hue), 15%, 13%; + --color-app-box: var(--dark-hue), 15%, 18%; + --color-app-overlay: var(--dark-hue), 15%, 17%; + --color-app-input: var(--dark-hue), 15%, 20%; + --color-app-focus: var(--dark-hue), 15%, 10%; + --color-app-line: var(--dark-hue), 15%, 23%; + --color-app-divider: var(--dark-hue), 15%, 5%; + --color-app-button: var(--dark-hue), 15%, 23%; + --color-app-hover: var(--dark-hue), 15%, 25%; + --color-app-selected: var(--dark-hue), 15%, 26%; + --color-app-active: var(--dark-hue), 15%, 30%; + --color-app-shade: var(--dark-hue), 15%, 0%; + --color-app-frame: var(--dark-hue), 15%, 25%; + // menu + --color-menu: var(--dark-hue), 25%, 5%; + --color-menu-line: var(--dark-hue), 15%, 7%; + --color-menu-ink: var(--dark-hue), 5%, 100%; + --color-menu-faint: var(--dark-hue), 5%, 80%; + --color-menu-hover: var(--dark-hue), 15%, 30%; + --color-menu-selected: var(--dark-hue), 5%, 30%; + --color-menu-shade: var(--dark-hue), 5%, 0%; } @media (prefers-color-scheme: light) { -.vanilla-theme { - // global - --color-black: 0, 0%, 0%; - --color-white: 0, 0%, 100%; - // accent theme colors - --color-accent: 208, 100%, 57%; - --color-accent-faint: 208, 100%, 67%; - --color-accent-deep: 208, 100%, 47%; - // text - --color-ink: var(--light-hue), 5%, 20%; - --color-ink-dull: var(--light-hue), 5%, 30%; - --color-ink-faint: var(--light-hue), 5%, 40%; - // sidebar - --color-sidebar: var(--light-hue), 5%, 96%; - --color-sidebar-box: var(--light-hue), 5%, 100%; - --color-sidebar-line: var(--light-hue), 10%, 85%; - --color-sidebar-divider: var(--light-hue), 15%, 93%; - --color-sidebar-button: var(--light-hue), 15%, 100%; - --color-sidebar-selected: var(--light-hue), 10%, 80%; - --color-sidebar-shade: var(--light-hue), 15%, 100%; - // main - --color-app: var(--light-hue), 5%, 100%; - --color-app-box: var(--light-hue), 5%, 98%; - --color-app-overlay: var(--light-hue), 5%, 100%; - --color-app-input: var(--light-hue), 5%, 100%; - --color-app-focus: var(--light-hue), 5%, 98%; - --color-app-line: var(--light-hue), 5%, 90%; - --color-app-button: var(--light-hue), 5%, 100%; - --color-app-divider: var(--light-hue), 5%, 80%; - --color-app-selected: var(--light-hue), 5%, 93%; - --color-app-hover: var(--light-hue), 5%, 97%; - --color-app-active: var(--light-hue), 5%, 87%; - --color-app-shade: var(--light-hue), 15%, 50%; - --color-app-frame: 0, 0%, 100%; - // menu - --color-menu: var(--light-hue), 16%, 0%; - --color-menu-line: var(--light-hue), 5%, 18%; - --color-menu-ink: var(--light-hue), 5%, 100%; - --color-menu-faint: var(--light-hue), 5%, 80%; - --color-menu-hover: var(--light-hue), 15%, 20%; - --color-menu-selected: var(--light-hue), 5%, 30%; - --color-menu-shade: var(--light-hue), 5%, 0%; + .vanilla-theme { + // global + --color-black: 0, 0%, 0%; + --color-white: 0, 0%, 100%; + // accent theme colors + --color-accent: 208, 100%, 57%; + --color-accent-faint: 208, 100%, 67%; + --color-accent-deep: 208, 100%, 47%; + // text + --color-ink: var(--light-hue), 5%, 20%; + --color-ink-dull: var(--light-hue), 5%, 30%; + --color-ink-faint: var(--light-hue), 5%, 40%; + // sidebar + --color-sidebar: var(--light-hue), 5%, 96%; + --color-sidebar-box: var(--light-hue), 5%, 100%; + --color-sidebar-line: var(--light-hue), 10%, 85%; + --color-sidebar-divider: var(--light-hue), 15%, 93%; + --color-sidebar-button: var(--light-hue), 15%, 100%; + --color-sidebar-selected: var(--light-hue), 10%, 80%; + --color-sidebar-shade: var(--light-hue), 15%, 100%; + // main + --color-app: var(--light-hue), 5%, 100%; + --color-app-box: var(--light-hue), 5%, 98%; + --color-app-overlay: var(--light-hue), 5%, 100%; + --color-app-input: var(--light-hue), 5%, 100%; + --color-app-focus: var(--light-hue), 5%, 98%; + --color-app-line: var(--light-hue), 5%, 90%; + --color-app-button: var(--light-hue), 5%, 100%; + --color-app-divider: var(--light-hue), 5%, 80%; + --color-app-selected: var(--light-hue), 5%, 93%; + --color-app-hover: var(--light-hue), 5%, 97%; + --color-app-active: var(--light-hue), 5%, 87%; + --color-app-shade: var(--light-hue), 15%, 50%; + --color-app-frame: 0, 0%, 100%; + // menu + --color-menu: var(--light-hue), 16%, 0%; + --color-menu-line: var(--light-hue), 5%, 18%; + --color-menu-ink: var(--light-hue), 5%, 100%; + --color-menu-faint: var(--light-hue), 5%, 80%; + --color-menu-hover: var(--light-hue), 15%, 20%; + --color-menu-selected: var(--light-hue), 5%, 30%; + --color-menu-shade: var(--light-hue), 5%, 0%; - // --color-menu: var(--light-hue), 16%, 99%; - // --color-menu-line: var(--light-hue), 5%, 90%; - // --color-menu-ink: var(--light-hue), 5%, 30%; - // --color-menu-faint: var(--light-hue), 5%, 80%; - // --color-menu-hover: var(--light-hue), 15%, 20%; - // --color-menu-selected: var(--light-hue), 5%, 30%; - // --color-menu-shade: var(--light-hue), 5%, 0%; -} + // --color-menu: var(--light-hue), 16%, 99%; + // --color-menu-line: var(--light-hue), 5%, 90%; + // --color-menu-ink: var(--light-hue), 5%, 30%; + // --color-menu-faint: var(--light-hue), 5%, 80%; + // --color-menu-hover: var(--light-hue), 15%, 20%; + // --color-menu-selected: var(--light-hue), 5%, 30%; + // --color-menu-shade: var(--light-hue), 5%, 0%; + } } diff --git a/packages/ui/style/style.scss b/packages/ui/style/style.scss index 37371d807..f0ccf48d0 100644 --- a/packages/ui/style/style.scss +++ b/packages/ui/style/style.scss @@ -1,4 +1,4 @@ -@import "./colors.scss"; +@import './colors.scss'; @tailwind base; @tailwind components; @@ -27,16 +27,15 @@ } .mask-fade-out { - // -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1)); - mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100px); + // -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1)); + mask-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100px); } - .cool-shadow { box-shadow: rgb(0 0 0 / 9%) 0px 3px 12px; } // Without this Tauri displays button differently to web -[type="button"] { +[type='button'] { -webkit-appearance: none; -} \ No newline at end of file +} diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index 4677b60a1..8e080d56b 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -4,7 +4,5 @@ "rootDir": "src", "declarationDir": "dist" }, - "include": [ - "src" - ] + "include": ["src"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 81f100297..4296912a8 100644 Binary files a/pnpm-lock.yaml and b/pnpm-lock.yaml differ diff --git a/turbo.json b/turbo.json index 2d6866d22..1d8239406 100644 --- a/turbo.json +++ b/turbo.json @@ -2,12 +2,8 @@ "$schema": "https://turborepo.org/schema.json", "pipeline": { "build": { - "dependsOn": [ - "^build" - ], - "outputs": [ - "dist/**" - ] + "dependsOn": ["^build"], + "outputs": ["dist/**"] }, "lint": { "outputs": []