Upload folder using huggingface_hub
Browse files- 5.49.1/navbar/Example.svelte +11 -0
- 5.49.1/navbar/Index.svelte +27 -0
- 5.49.1/navbar/package.json +45 -0
5.49.1/navbar/Example.svelte
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<script>
|
| 2 |
+
export let value = {
|
| 3 |
+
visible: true,
|
| 4 |
+
home_page_title: "Home"
|
| 5 |
+
};
|
| 6 |
+
</script>
|
| 7 |
+
|
| 8 |
+
<!-- Navbar component examples are not displayed as it's a configuration component -->
|
| 9 |
+
<div style="display: none;">
|
| 10 |
+
Navbar config: visible={value.visible}, home_page_title="{value.home_page_title}"
|
| 11 |
+
</div>
|
5.49.1/navbar/Index.svelte
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!-- Configuration-only component that stores navbar props in a global store. The actual navbar UI is in Embed.svelte -->
|
| 2 |
+
<script lang="ts">
|
| 3 |
+
import { navbar_config } from "@gradio/core/navbar_store";
|
| 4 |
+
import { onMount } from "svelte";
|
| 5 |
+
import { get } from "svelte/store";
|
| 6 |
+
|
| 7 |
+
export let elem_id = "";
|
| 8 |
+
export let elem_classes: string[] = [];
|
| 9 |
+
export let visible = true;
|
| 10 |
+
export let main_page_name: string | false = "Home";
|
| 11 |
+
export let value: [string, string][] | null = null;
|
| 12 |
+
|
| 13 |
+
$: navbar_props = { visible, main_page_name, value };
|
| 14 |
+
|
| 15 |
+
onMount(() => {
|
| 16 |
+
const current_store = get(navbar_config);
|
| 17 |
+
if (!current_store) {
|
| 18 |
+
navbar_config.set(navbar_props);
|
| 19 |
+
}
|
| 20 |
+
});
|
| 21 |
+
|
| 22 |
+
$: {
|
| 23 |
+
navbar_config.set(navbar_props);
|
| 24 |
+
}
|
| 25 |
+
</script>
|
| 26 |
+
|
| 27 |
+
<div style="display: none;" id={elem_id} class={elem_classes.join(" ")}></div>
|
5.49.1/navbar/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@gradio/navbar",
|
| 3 |
+
"version": "0.2.1",
|
| 4 |
+
"description": "Gradio UI packages",
|
| 5 |
+
"type": "module",
|
| 6 |
+
"author": "",
|
| 7 |
+
"license": "ISC",
|
| 8 |
+
"private": false,
|
| 9 |
+
"main_changeset": true,
|
| 10 |
+
"dependencies": {
|
| 11 |
+
"@gradio/atoms": "workspace:^",
|
| 12 |
+
"@gradio/core": "workspace:^",
|
| 13 |
+
"@gradio/statustracker": "workspace:^",
|
| 14 |
+
"@gradio/utils": "workspace:^"
|
| 15 |
+
},
|
| 16 |
+
"devDependencies": {
|
| 17 |
+
"@gradio/preview": "workspace:^"
|
| 18 |
+
},
|
| 19 |
+
"exports": {
|
| 20 |
+
"./package.json": "./package.json",
|
| 21 |
+
".": {
|
| 22 |
+
"gradio": "./Index.svelte",
|
| 23 |
+
"svelte": "./dist/Index.svelte",
|
| 24 |
+
"types": "./dist/Index.svelte.d.ts"
|
| 25 |
+
},
|
| 26 |
+
"./example": {
|
| 27 |
+
"gradio": "./Example.svelte",
|
| 28 |
+
"svelte": "./dist/Example.svelte",
|
| 29 |
+
"types": "./dist/Example.svelte.d.ts"
|
| 30 |
+
},
|
| 31 |
+
"./base": {
|
| 32 |
+
"gradio": "./Index.svelte",
|
| 33 |
+
"svelte": "./dist/Index.svelte",
|
| 34 |
+
"types": "./dist/Index.svelte.d.ts"
|
| 35 |
+
}
|
| 36 |
+
},
|
| 37 |
+
"peerDependencies": {
|
| 38 |
+
"svelte": "^4.0.0"
|
| 39 |
+
},
|
| 40 |
+
"repository": {
|
| 41 |
+
"type": "git",
|
| 42 |
+
"url": "git+https://github.com/gradio-app/gradio.git",
|
| 43 |
+
"directory": "js/navbar"
|
| 44 |
+
}
|
| 45 |
+
}
|