Skip to content

Commit

Permalink
Format js in v4 branch (#6016)
Browse files Browse the repository at this point in the history
* Format v4 branch js

* add changeset

* lint

---------

Co-authored-by: gradio-pr-bot <[email protected]>
  • Loading branch information
freddyaboulton and gradio-pr-bot authored Oct 19, 2023
1 parent cad537a commit 83e9476
Show file tree
Hide file tree
Showing 94 changed files with 2,173 additions and 2,144 deletions.
48 changes: 48 additions & 0 deletions .changeset/five-islands-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
"@gradio/accordion": minor
"@gradio/annotatedimage": minor
"@gradio/app": minor
"@gradio/audio": minor
"@gradio/box": minor
"@gradio/chatbot": minor
"@gradio/checkbox": minor
"@gradio/checkboxgroup": minor
"@gradio/client": minor
"@gradio/code": minor
"@gradio/colorpicker": minor
"@gradio/column": minor
"@gradio/dataframe": minor
"@gradio/dataset": minor
"@gradio/dropdown": minor
"@gradio/fallback": minor
"@gradio/file": minor
"@gradio/fileexplorer": minor
"@gradio/form": minor
"@gradio/gallery": minor
"@gradio/group": minor
"@gradio/highlightedtext": minor
"@gradio/html": minor
"@gradio/image": minor
"@gradio/json": minor
"@gradio/label": minor
"@gradio/markdown": minor
"@gradio/model3d": minor
"@gradio/number": minor
"@gradio/plot": minor
"@gradio/preview": minor
"@gradio/radio": minor
"@gradio/row": minor
"@gradio/slider": minor
"@gradio/state": minor
"@gradio/tabitem": minor
"@gradio/tabs": minor
"@gradio/textbox": minor
"@gradio/uploadbutton": minor
"@gradio/video": minor
"gradio": minor
"imageslider": minor
"newtext": minor
"website": minor
---

feat:Format js in v4 branch
250 changes: 125 additions & 125 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -1,127 +1,127 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@gradio/client": "0.3.1",
"gradio_client": "0.5.0",
"gradio": "3.43.2",
"@gradio/cdn-test": "0.0.1",
"@gradio/spaces-test": "0.0.1",
"website": "0.4.0",
"@gradio/accordion": "0.0.4",
"@gradio/annotatedimage": "0.1.2",
"@gradio/app": "1.4.3",
"@gradio/atoms": "0.1.2",
"@gradio/audio": "0.3.2",
"@gradio/box": "0.0.4",
"@gradio/button": "0.1.3",
"@gradio/chatbot": "0.3.1",
"@gradio/checkbox": "0.1.3",
"@gradio/checkboxgroup": "0.1.2",
"@gradio/code": "0.1.2",
"@gradio/colorpicker": "0.1.2",
"@gradio/column": "0.0.1",
"@gradio/dataframe": "0.2.2",
"@gradio/dropdown": "0.1.3",
"@gradio/file": "0.1.2",
"@gradio/form": "0.0.5",
"@gradio/gallery": "0.3.2",
"@gradio/group": "0.0.1",
"@gradio/highlightedtext": "0.2.3",
"@gradio/html": "0.0.4",
"@gradio/icons": "0.1.0",
"@gradio/image": "0.2.2",
"@gradio/json": "0.0.5",
"@gradio/label": "0.1.2",
"@gradio/lite": "0.3.1",
"@gradio/markdown": "0.2.0",
"@gradio/model3d": "0.2.1",
"@gradio/number": "0.2.2",
"@gradio/plot": "0.1.2",
"@gradio/radio": "0.1.2",
"@gradio/row": "0.0.1",
"@gradio/slider": "0.1.2",
"@gradio/state": "0.0.1",
"@gradio/statustracker": "0.2.0",
"@gradio/tabitem": "0.0.4",
"@gradio/tabs": "0.0.5",
"@gradio/textbox": "0.2.0",
"@gradio/theme": "0.1.0",
"@gradio/tooltip": "0.0.1",
"@gradio/tootils": "0.0.2",
"@gradio/upload": "0.2.1",
"@gradio/uploadbutton": "0.0.5",
"@gradio/utils": "0.1.1",
"@gradio/video": "0.0.6",
"@gradio/wasm": "0.0.1",
"@gradio/fallback": "0.1.1",
"@gradio/preview": "0.0.2",
"@gradio/dataset": "0.0.1",
"@gradio/fileexplorer": "0.2.2",
"imageslider": "0.2.0",
"newnewtext": "0.1.2",
"newtext": "0.0.1",
"@gradio/storybook": "0.0.1"
},
"changesets": [
"afraid-cougars-rescue",
"bright-planes-divide",
"bright-yaks-wink",
"cold-hoops-heal",
"cold-lemons-roll",
"crazy-dancers-allow",
"cute-crabs-know",
"dark-cups-see",
"dirty-ghosts-tickle",
"dry-points-join",
"easy-mirrors-retire",
"eleven-steaks-tan",
"empty-bobcats-judge",
"flat-experts-wink",
"fresh-ears-pump",
"gentle-parks-fry",
"great-rice-grab",
"green-tips-read",
"heavy-animals-think",
"hip-drinks-bow",
"hot-icons-film",
"hungry-melons-pump",
"icy-cars-boil",
"large-banks-push",
"lazy-aliens-drive",
"lovely-news-speak",
"modern-forks-march",
"nasty-dryers-show",
"nice-actors-write",
"old-heads-give",
"plain-groups-win",
"plenty-teeth-clap",
"public-chairs-chew",
"purple-jokes-shake",
"real-spoons-pick",
"sad-ears-sink",
"sad-eels-sink",
"sad-icons-relax",
"short-clouds-see",
"silver-beers-refuse",
"slick-bats-study",
"slick-pants-stand",
"smart-groups-study",
"some-shoes-relate",
"strange-lizards-boil",
"strong-peas-tell",
"tame-chairs-tan",
"tasty-candies-type",
"three-trams-sniff",
"tough-parrots-relate",
"true-bugs-shine",
"twenty-dryers-wave",
"twenty-gifts-tickle",
"two-games-dress",
"two-mirrors-nail",
"upset-crews-learn",
"vast-terms-rhyme",
"wet-places-hunt",
"wise-beans-itch"
]
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@gradio/client": "0.3.1",
"gradio_client": "0.5.0",
"gradio": "3.43.2",
"@gradio/cdn-test": "0.0.1",
"@gradio/spaces-test": "0.0.1",
"website": "0.4.0",
"@gradio/accordion": "0.0.4",
"@gradio/annotatedimage": "0.1.2",
"@gradio/app": "1.4.3",
"@gradio/atoms": "0.1.2",
"@gradio/audio": "0.3.2",
"@gradio/box": "0.0.4",
"@gradio/button": "0.1.3",
"@gradio/chatbot": "0.3.1",
"@gradio/checkbox": "0.1.3",
"@gradio/checkboxgroup": "0.1.2",
"@gradio/code": "0.1.2",
"@gradio/colorpicker": "0.1.2",
"@gradio/column": "0.0.1",
"@gradio/dataframe": "0.2.2",
"@gradio/dropdown": "0.1.3",
"@gradio/file": "0.1.2",
"@gradio/form": "0.0.5",
"@gradio/gallery": "0.3.2",
"@gradio/group": "0.0.1",
"@gradio/highlightedtext": "0.2.3",
"@gradio/html": "0.0.4",
"@gradio/icons": "0.1.0",
"@gradio/image": "0.2.2",
"@gradio/json": "0.0.5",
"@gradio/label": "0.1.2",
"@gradio/lite": "0.3.1",
"@gradio/markdown": "0.2.0",
"@gradio/model3d": "0.2.1",
"@gradio/number": "0.2.2",
"@gradio/plot": "0.1.2",
"@gradio/radio": "0.1.2",
"@gradio/row": "0.0.1",
"@gradio/slider": "0.1.2",
"@gradio/state": "0.0.1",
"@gradio/statustracker": "0.2.0",
"@gradio/tabitem": "0.0.4",
"@gradio/tabs": "0.0.5",
"@gradio/textbox": "0.2.0",
"@gradio/theme": "0.1.0",
"@gradio/tooltip": "0.0.1",
"@gradio/tootils": "0.0.2",
"@gradio/upload": "0.2.1",
"@gradio/uploadbutton": "0.0.5",
"@gradio/utils": "0.1.1",
"@gradio/video": "0.0.6",
"@gradio/wasm": "0.0.1",
"@gradio/fallback": "0.1.1",
"@gradio/preview": "0.0.2",
"@gradio/dataset": "0.0.1",
"@gradio/fileexplorer": "0.2.2",
"imageslider": "0.2.0",
"newnewtext": "0.1.2",
"newtext": "0.0.1",
"@gradio/storybook": "0.0.1"
},
"changesets": [
"afraid-cougars-rescue",
"bright-planes-divide",
"bright-yaks-wink",
"cold-hoops-heal",
"cold-lemons-roll",
"crazy-dancers-allow",
"cute-crabs-know",
"dark-cups-see",
"dirty-ghosts-tickle",
"dry-points-join",
"easy-mirrors-retire",
"eleven-steaks-tan",
"empty-bobcats-judge",
"flat-experts-wink",
"fresh-ears-pump",
"gentle-parks-fry",
"great-rice-grab",
"green-tips-read",
"heavy-animals-think",
"hip-drinks-bow",
"hot-icons-film",
"hungry-melons-pump",
"icy-cars-boil",
"large-banks-push",
"lazy-aliens-drive",
"lovely-news-speak",
"modern-forks-march",
"nasty-dryers-show",
"nice-actors-write",
"old-heads-give",
"plain-groups-win",
"plenty-teeth-clap",
"public-chairs-chew",
"purple-jokes-shake",
"real-spoons-pick",
"sad-ears-sink",
"sad-eels-sink",
"sad-icons-relax",
"short-clouds-see",
"silver-beers-refuse",
"slick-bats-study",
"slick-pants-stand",
"smart-groups-study",
"some-shoes-relate",
"strange-lizards-boil",
"strong-peas-tell",
"tame-chairs-tan",
"tasty-candies-type",
"three-trams-sniff",
"tough-parrots-relate",
"true-bugs-shine",
"twenty-dryers-wave",
"twenty-gifts-tickle",
"two-games-dress",
"two-mirrors-nail",
"upset-crews-learn",
"vast-terms-rhyme",
"wet-places-hunt",
"wise-beans-itch"
]
}
4 changes: 3 additions & 1 deletion .config/basevite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const theme_token_path = join(
"tokens.css"
);

const version = JSON.parse(readFileSync(version_path, { encoding: 'utf-8' })).version.trim().replace(/\./g, '-');
const version = JSON.parse(readFileSync(version_path, { encoding: "utf-8" }))
.version.trim()
.replace(/\./g, "-");

//@ts-ignore
export default defineConfig(({ mode }) => {
Expand Down
8 changes: 3 additions & 5 deletions client/js/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,9 @@ export function api_factory(
let payload: Payload;
let complete: false | Record<string, any> = false;
const listener_map: ListenerMap<EventType> = {};
let url_params = ""
if (typeof(window) !== "undefined") {
url_params = new URLSearchParams(
window.location.search
).toString();
let url_params = "";
if (typeof window !== "undefined") {
url_params = new URLSearchParams(window.location.search).toString();
}

handle_blob(
Expand Down
5 changes: 4 additions & 1 deletion js/_website/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
%sveltekit.head%
</head>

<body data-sveltekit-preload-data="hover" style="min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto;">
<body
data-sveltekit-preload-data="hover"
style="min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto"
>
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
31 changes: 15 additions & 16 deletions js/_website/src/lib/components/CopyButton.svelte
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<script lang="ts">
import { svgCopy, svgCheck } from "$lib/assets/copy.js";
import { svgCopy, svgCheck } from "$lib/assets/copy.js";
export let content: string = ""
let copied = false;
async function copy() {
await navigator.clipboard.writeText(content)
copied = true;
setTimeout(() => (copied = false), 2000);
}
export let content: string = "";
let copied = false;
async function copy() {
await navigator.clipboard.writeText(content);
copied = true;
setTimeout(() => (copied = false), 2000);
}
</script>

<button on:click={copy} class="clipboard-button m-2" role="button" tabindex={0}>
{#if !copied}
{@html svgCopy}
{:else}
{@html svgCheck}
{/if}
</button>
<button on:click={copy} class="clipboard-button m-2" role="button" tabindex={0}>
{#if !copied}
{@html svgCopy}
{:else}
{@html svgCheck}
{/if}
</button>
5 changes: 2 additions & 3 deletions js/_website/src/lib/components/DocsNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,9 @@
<a
class:current-nav-link={current_nav_link == "tabbedinterface"}
class="thin-link px-4 block"
href="./tabbedinterface/"
>TabbedInterface</a
href="./tabbedinterface/">TabbedInterface</a
>

<a
class:current-nav-link={current_nav_link == "blocks"}
class="thin-link px-4 block"
Expand Down
1 change: 0 additions & 1 deletion js/_website/src/lib/components/FunctionDoc.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
export let fn: any;
import anchor from "../assets/img/anchor.svg";
function handleAnchorClick(event: MouseEvent) {
event.preventDefault();
const link = event.currentTarget as HTMLAnchorElement;
Expand Down
Loading

0 comments on commit 83e9476

Please sign in to comment.