-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Integrate Joy UI and Jotai (#2059)
- Loading branch information
Showing
88 changed files
with
4,491 additions
and
5,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require eslint/use-at-your-own-risk | ||
require(absPnpApiPath).setup(); | ||
} | ||
} | ||
|
||
// Defer to the real eslint/use-at-your-own-risk your application uses | ||
module.exports = absRequire(`eslint/use-at-your-own-risk`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
{ | ||
"name": "eslint", | ||
"version": "8.48.0-sdk", | ||
"version": "8.55.0-sdk", | ||
"main": "./lib/api.js", | ||
"type": "commonjs" | ||
"type": "commonjs", | ||
"bin": { | ||
"eslint": "./bin/eslint.js" | ||
}, | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": "./lib/api.js", | ||
"./use-at-your-own-risk": "./lib/unsupported-api.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require prettier/bin/prettier.cjs | ||
require(absPnpApiPath).setup(); | ||
} | ||
} | ||
|
||
// Defer to the real prettier/bin/prettier.cjs your application uses | ||
module.exports = absRequire(`prettier/bin/prettier.cjs`); |
0
.yarn/sdks/prettier/index.js → .yarn/sdks/prettier/index.cjs
100755 → 100644
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"name": "prettier", | ||
"version": "3.0.3-sdk", | ||
"main": "./index.js", | ||
"type": "commonjs" | ||
"version": "3.1.0-sdk", | ||
"main": "./index.cjs", | ||
"type": "commonjs", | ||
"bin": "./bin/prettier.cjs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
{ | ||
"name": "typescript", | ||
"version": "5.2.2-sdk", | ||
"version": "5.3.2-sdk", | ||
"main": "./lib/typescript.js", | ||
"type": "commonjs" | ||
"type": "commonjs", | ||
"bin": { | ||
"tsc": "./bin/tsc", | ||
"tsserver": "./bin/tsserver" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* SPDX-FileCopyrightText: 2014-present Kriasoft */ | ||
/* SPDX-License-Identifier: MIT */ | ||
|
||
import { DarkModeRounded, LightModeRounded } from "@mui/icons-material"; | ||
import { | ||
Dropdown, | ||
IconButton, | ||
IconButtonProps, | ||
ListItemContent, | ||
ListItemDecorator, | ||
Menu, | ||
MenuButton, | ||
MenuItem, | ||
useColorScheme, | ||
} from "@mui/joy"; | ||
import { memo } from "react"; | ||
|
||
export function ColorSchemeButton(props: ColorSchemeButtonProps): JSX.Element { | ||
const { mode, systemMode } = useColorScheme(); | ||
|
||
return ( | ||
<Dropdown> | ||
<MenuButton slots={{ root: IconButton }} slotProps={{ root: props }}> | ||
{mode === "light" || (mode === "system" && systemMode === "light") ? ( | ||
<DarkModeRounded /> | ||
) : ( | ||
<LightModeRounded /> | ||
)} | ||
</MenuButton> | ||
|
||
<Menu size="sm"> | ||
<ModeMenuItem mode="light" /> | ||
<ModeMenuItem mode="dark" /> | ||
<ModeMenuItem mode="system" /> | ||
</Menu> | ||
</Dropdown> | ||
); | ||
} | ||
|
||
const ModeMenuItem = memo(function ModeMenuItem({ | ||
mode, | ||
}: ModeMenuItemProps): JSX.Element { | ||
const scheme = useColorScheme(); | ||
|
||
return ( | ||
<MenuItem | ||
onClick={() => { | ||
scheme.setMode(mode); | ||
}} | ||
selected={scheme.mode === mode} | ||
> | ||
<ListItemDecorator sx={{ ml: 0.5 }}> | ||
{mode === "light" || | ||
(mode !== "dark" && scheme.systemMode === "light") ? ( | ||
<LightModeRounded /> | ||
) : ( | ||
<DarkModeRounded /> | ||
)} | ||
</ListItemDecorator> | ||
<ListItemContent sx={{ pr: 2 }}> | ||
{mode === "light" | ||
? "Light theme" | ||
: mode === "dark" | ||
? "Dark theme" | ||
: "Device default"} | ||
</ListItemContent> | ||
</MenuItem> | ||
); | ||
}); | ||
|
||
type ColorSchemeButtonProps = Omit<IconButtonProps, "children">; | ||
type ModeMenuItemProps = { mode: "dark" | "light" | "system" }; |
Oops, something went wrong.