Skip to content

Commit

Permalink
Start to remove workspace & move theme to root package
Browse files Browse the repository at this point in the history
  • Loading branch information
zoriya committed Feb 1, 2025
1 parent 6cc0c90 commit f15ac3a
Show file tree
Hide file tree
Showing 9 changed files with 314 additions and 314 deletions.
86 changes: 42 additions & 44 deletions front/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,57 +1,55 @@
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { Slot } from "one";
// import { WebTooltip } from "@kyoo/primitives/src/tooltip.web";
// import { HiddenIfNoJs, SkeletonCss, TouchOnlyCss } from "@kyoo/primitives";
import { useServerHeadInsertion } from "one";
import { StyleRegistryProvider, createStyleRegistry, useTheme } from "yoshiki/web";
import { Providers } from "~/providers";

const GlobalCssTheme = () => {
const theme = useTheme();
// const theme = useTheme();
// TODO: add fonts here
// body {font-family: ${font.style.fontFamily};}
// background-color: ${theme.background};
return (
<>
{/* <style jsx global>{` */}
{/* body { */}
{/* margin: 0px; */}
{/* padding: 0px; */}
{/* overflow: "hidden"; */}
{/* background-color: ${theme.background}; */}
{/* } */}
{/**/}
{/* *::-webkit-scrollbar { */}
{/* height: 6px; */}
{/* width: 6px; */}
{/* background: transparent; */}
{/* } */}
{/**/}
{/* *::-webkit-scrollbar-thumb { */}
{/* background-color: #999; */}
{/* border-radius: 90px; */}
{/* } */}
{/* *:hover::-webkit-scrollbar-thumb { */}
{/* background-color: rgb(134, 127, 127); */}
{/* } */}
{/**/}
{/* #__next { */}
{/* height: 100vh; */}
{/* } */}
{/**/}
{/* .infinite-scroll-component__outerdiv { */}
{/* width: 100%; */}
{/* height: 100%; */}
{/* } */}
{/**/}
{/* ::cue { */}
{/* background-color: transparent; */}
{/* text-shadow: */}
{/* -1px -1px 0 #000, */}
{/* 1px -1px 0 #000, */}
{/* -1px 1px 0 #000, */}
{/* 1px 1px 0 #000; */}
{/* } */}
{/* `}</style> */}
<style>{`
body {
margin: 0px;
padding: 0px;
overflow: "hidden";
}
*::-webkit-scrollbar {
height: 6px;
width: 6px;
background: transparent;
}
*::-webkit-scrollbar-thumb {
background-color: #999;
border-radius: 90px;
}
*:hover::-webkit-scrollbar-thumb {
background-color: rgb(134, 127, 127);
}
#__next {
height: 100vh;
}
.infinite-scroll-component__outerdiv {
width: 100%;
height: 100%;
}
::cue {
background-color: transparent;
text-shadow:
-1px -1px 0 #000,
1px -1px 0 #000,
-1px 1px 0 #000,
1px 1px 0 #000;
}
`}</style>
{/* <WebTooltip theme={theme} /> */}
{/* <SkeletonCss /> */}
{/* <TouchOnlyCss /> */}
Expand All @@ -76,7 +74,7 @@ export default function Layout() {
<link rel="icon" type="image/png" sizes="64x64" href="/icon-64x64.png" />
<link rel="icon" type="image/png" sizes="128x128" href="/icon-128x128.png" />
<link rel="icon" type="image/png" sizes="256x256" href="/icon-256x256.png" />
{/* <GlobalCssTheme /> */}
<GlobalCssTheme />
</head>

<body className="hoverEnabled">
Expand Down
9 changes: 6 additions & 3 deletions front/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { View, Text } from "react-native";
import { Text, View } from "react-native";
import { useYoshiki } from "yoshiki/native";

export default function MyApp() {
const { css } = useYoshiki();

return (
<View
style={{
{...css({
flex: 1,
justifyContent: "center",
alignItems: "center",
minHeight: "100%",
}}
})}
>
<Text>Hello from One</Text>
</View>
Expand Down
3 changes: 0 additions & 3 deletions front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
"format": "biome format .",
"format:fix": "biome format . --write"
},
"workspaces": ["packages/*"],
"dependencies": {
"@kyoo/models": "workspace:*",
"@kyoo/primitives": "workspace:*",
"@tanstack/react-query": "^5.66.0",
"caniuse-api": "^3.0.0",
"expo": "~52.0.28",
Expand Down
70 changes: 0 additions & 70 deletions front/packages/primitives/src/themes/catppuccin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,73 +17,3 @@
* You should have received a copy of the GNU General Public License
* along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
*/

import type { ThemeBuilder } from "./theme";

// Ref: https://github.com/catppuccin/catppuccin
export const catppuccin: ThemeBuilder = {
light: {
// Catppuccin latte
overlay0: "#9ca0b0",
overlay1: "#7c7f93",
lightOverlay: "#eff1f599",
darkOverlay: "#4c4f6999",
link: "#1e66f5",
default: {
background: "#eff1f5",
accent: "#e64553",
divider: "#8c8fa1",
heading: "#4c4f69",
paragraph: "#5c5f77",
subtext: "#6c6f85",
},
variant: {
background: "#e6e9ef",
accent: "#d20f39",
divider: "#dd7878",
heading: "#4c4f69",
paragraph: "#5c5f77",
subtext: "#6c6f85",
},
colors: {
red: "#d20f39",
green: "#40a02b",
blue: "#1e66f5",
yellow: "#df8e1d",
black: "#4c4f69",
white: "#eff1f5",
},
},
dark: {
// Catppuccin mocha
overlay0: "#6c7086",
overlay1: "#9399b2",
lightOverlay: "#f5f0f899",
darkOverlay: "#11111b99",
link: "#89b4fa",
default: {
background: "#1e1e2e",
accent: "#89b4fa",
divider: "#7f849c",
heading: "#cdd6f4",
paragraph: "#bac2de",
subtext: "#a6adc8",
},
variant: {
background: "#181825",
accent: "#74c7ec",
divider: "#1e1e2e",
heading: "#cdd6f4",
paragraph: "#bac2de",
subtext: "#a6adc8",
},
colors: {
red: "#f38ba8",
green: "#a6e3a1",
blue: "#89b4fa",
yellow: "#f9e2af",
black: "#11111b",
white: "#f5f0f8",
},
},
};
Loading

0 comments on commit f15ac3a

Please sign in to comment.