julien-c HF staff commited on
Commit
4446d89
1 Parent(s): 480d09a

Upload folder using huggingface_hub

Browse files
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ FROM python:3.9
3
+
4
+ WORKDIR /code
5
+
6
+ COPY --link --chown=1000 . .
7
+
8
+ RUN mkdir -p /tmp/cache/
9
+ RUN chmod a+rwx -R /tmp/cache/
10
+ ENV TRANSFORMERS_CACHE=/tmp/cache/
11
+
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ ENV PYTHONUNBUFFERED=1 GRADIO_ALLOW_FLAGGING=never GRADIO_NUM_PORTS=1 GRADIO_SERVER_NAME=0.0.0.0 GRADIO_SERVER_PORT=7860 SYSTEM=spaces
15
+
16
+ CMD ["python", "space.py"]
README.md CHANGED
@@ -1,10 +1,17 @@
 
1
  ---
2
- title: Gradio Hubquicksearch
3
- emoji: 😻
4
  colorFrom: pink
5
- colorTo: purple
6
  sdk: docker
7
  pinned: false
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
1
+
2
  ---
3
+ tags: [gradio-custom-component,gradio-template-SimpleTextbox,huggingface hub,hub,huggingface]
4
+ title: gradio_hubquicksearch V0.0.1
5
  colorFrom: pink
6
+ colorTo: gray
7
  sdk: docker
8
  pinned: false
9
+ license: apache-2.0
10
  ---
11
 
12
+
13
+ # Name: gradio_hubquicksearch
14
+
15
+ Description: Quick search HF Hub repos or users
16
+
17
+ Install with: pip install gradio_hubquicksearch
__init__.py ADDED
File without changes
__pycache__/__init__.cpython-311.pyc ADDED
Binary file (185 Bytes). View file
 
__pycache__/app.cpython-311.pyc ADDED
Binary file (774 Bytes). View file
 
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ from gradio_hubquicksearch import HubQuicksearch
4
+
5
+
6
+ example = HubQuicksearch().example_value()
7
+
8
+ demo = gr.Interface(
9
+ lambda x:x,
10
+ HubQuicksearch(label="repo id from the hub"), # interactive version of your component
11
+ HubQuicksearch(), # static version of your component
12
+ # examples=[[example]], # uncomment this line to view the "example version" of your component
13
+ )
14
+
15
+
16
+ if __name__ == "__main__":
17
+ demo.launch()
css.css ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ font-family: Inter;
3
+ font-size: 16px;
4
+ font-weight: 400;
5
+ line-height: 1.5;
6
+ -webkit-text-size-adjust: 100%;
7
+ background: #fff;
8
+ color: #323232;
9
+ -webkit-font-smoothing: antialiased;
10
+ -moz-osx-font-smoothing: grayscale;
11
+ text-rendering: optimizeLegibility;
12
+ }
13
+
14
+ :root {
15
+ --space: 1;
16
+ --vspace: calc(var(--space) * 1rem);
17
+ --vspace-0: calc(3 * var(--space) * 1rem);
18
+ --vspace-1: calc(2 * var(--space) * 1rem);
19
+ --vspace-2: calc(1.5 * var(--space) * 1rem);
20
+ --vspace-3: calc(0.5 * var(--space) * 1rem);
21
+ }
22
+
23
+ .app {
24
+ max-width: 748px !important;
25
+ }
26
+
27
+ .prose p {
28
+ margin: var(--vspace) 0;
29
+ line-height: var(--vspace * 2);
30
+ font-size: 1rem;
31
+ }
32
+
33
+ code {
34
+ font-family: "Inconsolata", sans-serif;
35
+ font-size: 16px;
36
+ }
37
+
38
+ h1,
39
+ h1 code {
40
+ font-weight: 400;
41
+ line-height: calc(2.5 / var(--space) * var(--vspace));
42
+ }
43
+
44
+ h1 code {
45
+ background: none;
46
+ border: none;
47
+ letter-spacing: 0.05em;
48
+ padding-bottom: 5px;
49
+ position: relative;
50
+ padding: 0;
51
+ }
52
+
53
+ h2 {
54
+ margin: var(--vspace-1) 0 var(--vspace-2) 0;
55
+ line-height: 1em;
56
+ }
57
+
58
+ h3,
59
+ h3 code {
60
+ margin: var(--vspace-1) 0 var(--vspace-2) 0;
61
+ line-height: 1em;
62
+ }
63
+
64
+ h4,
65
+ h5,
66
+ h6 {
67
+ margin: var(--vspace-3) 0 var(--vspace-3) 0;
68
+ line-height: var(--vspace);
69
+ }
70
+
71
+ .bigtitle,
72
+ h1,
73
+ h1 code {
74
+ font-size: calc(8px * 4.5);
75
+ word-break: break-word;
76
+ }
77
+
78
+ .title,
79
+ h2,
80
+ h2 code {
81
+ font-size: calc(8px * 3.375);
82
+ font-weight: lighter;
83
+ word-break: break-word;
84
+ border: none;
85
+ background: none;
86
+ }
87
+
88
+ .subheading1,
89
+ h3,
90
+ h3 code {
91
+ font-size: calc(8px * 1.8);
92
+ font-weight: 600;
93
+ border: none;
94
+ background: none;
95
+ letter-spacing: 0.1em;
96
+ text-transform: uppercase;
97
+ }
98
+
99
+ h2 code {
100
+ padding: 0;
101
+ position: relative;
102
+ letter-spacing: 0.05em;
103
+ }
104
+
105
+ blockquote {
106
+ font-size: calc(8px * 1.1667);
107
+ font-style: italic;
108
+ line-height: calc(1.1667 * var(--vspace));
109
+ margin: var(--vspace-2) var(--vspace-2);
110
+ }
111
+
112
+ .subheading2,
113
+ h4 {
114
+ font-size: calc(8px * 1.4292);
115
+ text-transform: uppercase;
116
+ font-weight: 600;
117
+ }
118
+
119
+ .subheading3,
120
+ h5 {
121
+ font-size: calc(8px * 1.2917);
122
+ line-height: calc(1.2917 * var(--vspace));
123
+
124
+ font-weight: lighter;
125
+ text-transform: uppercase;
126
+ letter-spacing: 0.15em;
127
+ }
128
+
129
+ h6 {
130
+ font-size: calc(8px * 1.1667);
131
+ font-size: 1.1667em;
132
+ font-weight: normal;
133
+ font-style: italic;
134
+ font-family: "le-monde-livre-classic-byol", serif !important;
135
+ letter-spacing: 0px !important;
136
+ }
137
+
138
+ #start .md > *:first-child {
139
+ margin-top: 0;
140
+ }
141
+
142
+ h2 + h3 {
143
+ margin-top: 0;
144
+ }
145
+
146
+ .md hr {
147
+ border: none;
148
+ border-top: 1px solid var(--block-border-color);
149
+ margin: var(--vspace-2) 0 var(--vspace-2) 0;
150
+ }
151
+ .prose ul {
152
+ margin: var(--vspace-2) 0 var(--vspace-1) 0;
153
+ }
154
+
155
+ .gap {
156
+ gap: 0;
157
+ }
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio_hubquicksearch-0.0.1-py3-none-any.whl
space.py ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ from app import demo as app
4
+ import os
5
+
6
+ _docs = {'HubQuicksearch': {'description': 'Creates a very simple textbox for user to enter string input or display string output.', 'members': {'__init__': {'value': {'type': 'str | Callable | None', 'default': 'None', 'description': 'default text to provide in textbox. If callable, the function will be called whenever the app loads to set the initial value of the component.'}, 'placeholder': {'type': 'str | None', 'default': 'None', 'description': 'placeholder hint to provide behind textbox.'}, 'label': {'type': 'str | None', 'default': 'None', 'description': 'component name in interface.'}, 'every': {'type': 'float | None', 'default': 'None', 'description': "If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute."}, 'show_label': {'type': 'bool | None', 'default': 'None', 'description': 'if True, will display label.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.'}, 'min_width': {'type': 'int', 'default': '160', 'description': 'minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.'}, 'interactive': {'type': 'bool | None', 'default': 'None', 'description': 'if True, will be rendered as an editable textbox; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'If False, component will be hidden.'}, 'rtl': {'type': 'bool', 'default': 'False', 'description': 'If True and `type` is "text", sets the direction of the text to right-to-left (cursor appears on the left of the text). Default is False, which renders cursor on the right.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': 'An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'render': {'type': 'bool', 'default': 'True', 'description': 'If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.'}}, 'postprocess': {'value': {'type': 'str | None', 'description': 'Expects a {str} returned from function and sets textarea value to it.'}}, 'preprocess': {'return': {'type': 'str | None', 'description': 'Passes text value as a {str} into the function.'}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': 'Triggered when the value of the HubQuicksearch changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input.'}, 'input': {'type': None, 'default': None, 'description': 'This listener is triggered when the user changes the value of the HubQuicksearch.'}, 'submit': {'type': None, 'default': None, 'description': 'This listener is triggered when the user presses the Enter key while the HubQuicksearch is focused.'}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'HubQuicksearch': []}}}
7
+
8
+ abs_path = os.path.join(os.path.dirname(__file__), "css.css")
9
+
10
+ with gr.Blocks(
11
+ css=abs_path,
12
+ theme=gr.themes.Default(
13
+ font_mono=[
14
+ gr.themes.GoogleFont("Inconsolata"),
15
+ "monospace",
16
+ ],
17
+ ),
18
+ ) as demo:
19
+ gr.Markdown(
20
+ """
21
+ # `gradio_hubquicksearch`
22
+
23
+ <div style="display: flex; gap: 7px;">
24
+ <img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.1%20-%20orange">
25
+ </div>
26
+
27
+ Quick search HF Hub repos or users
28
+ """, elem_classes=["md-custom"], header_links=True)
29
+ app.render()
30
+ gr.Markdown(
31
+ """
32
+ ## Installation
33
+
34
+ ```bash
35
+ pip install gradio_hubquicksearch
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ```python
41
+
42
+ import gradio as gr
43
+ from gradio_hubquicksearch import HubQuicksearch
44
+
45
+
46
+ example = HubQuicksearch().example_value()
47
+
48
+ demo = gr.Interface(
49
+ lambda x:x,
50
+ HubQuicksearch(label="repo id from the hub"), # interactive version of your component
51
+ HubQuicksearch(), # static version of your component
52
+ # examples=[[example]], # uncomment this line to view the "example version" of your component
53
+ )
54
+
55
+
56
+ if __name__ == "__main__":
57
+ demo.launch()
58
+
59
+ ```
60
+ """, elem_classes=["md-custom"], header_links=True)
61
+
62
+
63
+ gr.Markdown("""
64
+ ## `HubQuicksearch`
65
+
66
+ ### Initialization
67
+ """, elem_classes=["md-custom"], header_links=True)
68
+
69
+ gr.ParamViewer(value=_docs["HubQuicksearch"]["members"]["__init__"], linkify=[])
70
+
71
+
72
+ gr.Markdown("### Events")
73
+ gr.ParamViewer(value=_docs["HubQuicksearch"]["events"], linkify=['Event'])
74
+
75
+
76
+
77
+
78
+ gr.Markdown("""
79
+
80
+ ### User function
81
+
82
+ The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).
83
+
84
+ - When used as an Input, the component only impacts the input signature of the user function.
85
+ - When used as an output, the component only impacts the return signature of the user function.
86
+
87
+ The code snippet below is accurate in cases where the component is used as both an input and an output.
88
+
89
+ - **As input:** Is passed, passes text value as a {str} into the function.
90
+ - **As output:** Should return, expects a {str} returned from function and sets textarea value to it.
91
+
92
+ ```python
93
+ def predict(
94
+ value: str | None
95
+ ) -> str | None:
96
+ return value
97
+ ```
98
+ """, elem_classes=["md-custom", "HubQuicksearch-user-fn"], header_links=True)
99
+
100
+
101
+
102
+
103
+ demo.load(None, js=r"""function() {
104
+ const refs = {};
105
+ const user_fn_refs = {
106
+ HubQuicksearch: [], };
107
+ requestAnimationFrame(() => {
108
+
109
+ Object.entries(user_fn_refs).forEach(([key, refs]) => {
110
+ if (refs.length > 0) {
111
+ const el = document.querySelector(`.${key}-user-fn`);
112
+ if (!el) return;
113
+ refs.forEach(ref => {
114
+ el.innerHTML = el.innerHTML.replace(
115
+ new RegExp("\\b"+ref+"\\b", "g"),
116
+ `<a href="#h-${ref.toLowerCase()}">${ref}</a>`
117
+ );
118
+ })
119
+ }
120
+ })
121
+
122
+ Object.entries(refs).forEach(([key, refs]) => {
123
+ if (refs.length > 0) {
124
+ const el = document.querySelector(`.${key}`);
125
+ if (!el) return;
126
+ refs.forEach(ref => {
127
+ el.innerHTML = el.innerHTML.replace(
128
+ new RegExp("\\b"+ref+"\\b", "g"),
129
+ `<a href="#h-${ref.toLowerCase()}">${ref}</a>`
130
+ );
131
+ })
132
+ }
133
+ })
134
+ })
135
+ }
136
+
137
+ """)
138
+
139
+ demo.launch()
src/.gitignore ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ .eggs/
2
+ dist/
3
+ *.pyc
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+ __tmp/*
8
+ *.pyi
9
+ node_modules
src/README.md ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # `gradio_hubquicksearch`
3
+ <img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.1%20-%20orange">
4
+
5
+ Quick search HF Hub repos or users
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install gradio_hubquicksearch
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```python
16
+
17
+ import gradio as gr
18
+ from gradio_hubquicksearch import HubQuicksearch
19
+
20
+
21
+ example = HubQuicksearch().example_value()
22
+
23
+ demo = gr.Interface(
24
+ lambda x:x,
25
+ HubQuicksearch(label="repo id from the hub"), # interactive version of your component
26
+ HubQuicksearch(), # static version of your component
27
+ # examples=[[example]], # uncomment this line to view the "example version" of your component
28
+ )
29
+
30
+
31
+ if __name__ == "__main__":
32
+ demo.launch()
33
+
34
+ ```
35
+
36
+ ## `HubQuicksearch`
37
+
38
+ ### Initialization
39
+
40
+ <table>
41
+ <thead>
42
+ <tr>
43
+ <th align="left">name</th>
44
+ <th align="left" style="width: 25%;">type</th>
45
+ <th align="left">default</th>
46
+ <th align="left">description</th>
47
+ </tr>
48
+ </thead>
49
+ <tbody>
50
+ <tr>
51
+ <td align="left"><code>value</code></td>
52
+ <td align="left" style="width: 25%;">
53
+
54
+ ```python
55
+ str | Callable | None
56
+ ```
57
+
58
+ </td>
59
+ <td align="left"><code>None</code></td>
60
+ <td align="left">default text to provide in textbox. If callable, the function will be called whenever the app loads to set the initial value of the component.</td>
61
+ </tr>
62
+
63
+ <tr>
64
+ <td align="left"><code>placeholder</code></td>
65
+ <td align="left" style="width: 25%;">
66
+
67
+ ```python
68
+ str | None
69
+ ```
70
+
71
+ </td>
72
+ <td align="left"><code>None</code></td>
73
+ <td align="left">placeholder hint to provide behind textbox.</td>
74
+ </tr>
75
+
76
+ <tr>
77
+ <td align="left"><code>label</code></td>
78
+ <td align="left" style="width: 25%;">
79
+
80
+ ```python
81
+ str | None
82
+ ```
83
+
84
+ </td>
85
+ <td align="left"><code>None</code></td>
86
+ <td align="left">component name in interface.</td>
87
+ </tr>
88
+
89
+ <tr>
90
+ <td align="left"><code>every</code></td>
91
+ <td align="left" style="width: 25%;">
92
+
93
+ ```python
94
+ float | None
95
+ ```
96
+
97
+ </td>
98
+ <td align="left"><code>None</code></td>
99
+ <td align="left">If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.</td>
100
+ </tr>
101
+
102
+ <tr>
103
+ <td align="left"><code>show_label</code></td>
104
+ <td align="left" style="width: 25%;">
105
+
106
+ ```python
107
+ bool | None
108
+ ```
109
+
110
+ </td>
111
+ <td align="left"><code>None</code></td>
112
+ <td align="left">if True, will display label.</td>
113
+ </tr>
114
+
115
+ <tr>
116
+ <td align="left"><code>scale</code></td>
117
+ <td align="left" style="width: 25%;">
118
+
119
+ ```python
120
+ int | None
121
+ ```
122
+
123
+ </td>
124
+ <td align="left"><code>None</code></td>
125
+ <td align="left">relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.</td>
126
+ </tr>
127
+
128
+ <tr>
129
+ <td align="left"><code>min_width</code></td>
130
+ <td align="left" style="width: 25%;">
131
+
132
+ ```python
133
+ int
134
+ ```
135
+
136
+ </td>
137
+ <td align="left"><code>160</code></td>
138
+ <td align="left">minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.</td>
139
+ </tr>
140
+
141
+ <tr>
142
+ <td align="left"><code>interactive</code></td>
143
+ <td align="left" style="width: 25%;">
144
+
145
+ ```python
146
+ bool | None
147
+ ```
148
+
149
+ </td>
150
+ <td align="left"><code>None</code></td>
151
+ <td align="left">if True, will be rendered as an editable textbox; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.</td>
152
+ </tr>
153
+
154
+ <tr>
155
+ <td align="left"><code>visible</code></td>
156
+ <td align="left" style="width: 25%;">
157
+
158
+ ```python
159
+ bool
160
+ ```
161
+
162
+ </td>
163
+ <td align="left"><code>True</code></td>
164
+ <td align="left">If False, component will be hidden.</td>
165
+ </tr>
166
+
167
+ <tr>
168
+ <td align="left"><code>rtl</code></td>
169
+ <td align="left" style="width: 25%;">
170
+
171
+ ```python
172
+ bool
173
+ ```
174
+
175
+ </td>
176
+ <td align="left"><code>False</code></td>
177
+ <td align="left">If True and `type` is "text", sets the direction of the text to right-to-left (cursor appears on the left of the text). Default is False, which renders cursor on the right.</td>
178
+ </tr>
179
+
180
+ <tr>
181
+ <td align="left"><code>elem_id</code></td>
182
+ <td align="left" style="width: 25%;">
183
+
184
+ ```python
185
+ str | None
186
+ ```
187
+
188
+ </td>
189
+ <td align="left"><code>None</code></td>
190
+ <td align="left">An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.</td>
191
+ </tr>
192
+
193
+ <tr>
194
+ <td align="left"><code>elem_classes</code></td>
195
+ <td align="left" style="width: 25%;">
196
+
197
+ ```python
198
+ list[str] | str | None
199
+ ```
200
+
201
+ </td>
202
+ <td align="left"><code>None</code></td>
203
+ <td align="left">An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.</td>
204
+ </tr>
205
+
206
+ <tr>
207
+ <td align="left"><code>render</code></td>
208
+ <td align="left" style="width: 25%;">
209
+
210
+ ```python
211
+ bool
212
+ ```
213
+
214
+ </td>
215
+ <td align="left"><code>True</code></td>
216
+ <td align="left">If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.</td>
217
+ </tr>
218
+ </tbody></table>
219
+
220
+
221
+ ### Events
222
+
223
+ | name | description |
224
+ |:-----|:------------|
225
+ | `change` | Triggered when the value of the HubQuicksearch changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input. |
226
+ | `input` | This listener is triggered when the user changes the value of the HubQuicksearch. |
227
+ | `submit` | This listener is triggered when the user presses the Enter key while the HubQuicksearch is focused. |
228
+
229
+
230
+
231
+ ### User function
232
+
233
+ The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).
234
+
235
+ - When used as an Input, the component only impacts the input signature of the user function.
236
+ - When used as an output, the component only impacts the return signature of the user function.
237
+
238
+ The code snippet below is accurate in cases where the component is used as both an input and an output.
239
+
240
+ - **As output:** Is passed, passes text value as a {str} into the function.
241
+ - **As input:** Should return, expects a {str} returned from function and sets textarea value to it.
242
+
243
+ ```python
244
+ def predict(
245
+ value: str | None
246
+ ) -> str | None:
247
+ return value
248
+ ```
249
+
src/backend/gradio_hubquicksearch/__init__.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+
2
+ from .hubquicksearch import HubQuicksearch
3
+
4
+ __all__ = ['HubQuicksearch']
src/backend/gradio_hubquicksearch/hubquicksearch.py ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ from typing import Any, Callable
4
+
5
+ from gradio.components.base import FormComponent
6
+ from gradio.events import Events
7
+
8
+
9
+ class HubQuicksearch(FormComponent):
10
+ """
11
+ Creates a very simple textbox for user to enter string input or display string output.
12
+ """
13
+
14
+ EVENTS = [
15
+ Events.change,
16
+ Events.input,
17
+ Events.submit,
18
+ ]
19
+
20
+ def __init__(
21
+ self,
22
+ value: str | Callable | None = None,
23
+ *,
24
+ placeholder: str | None = None,
25
+ label: str | None = None,
26
+ every: float | None = None,
27
+ show_label: bool | None = None,
28
+ scale: int | None = None,
29
+ min_width: int = 160,
30
+ interactive: bool | None = None,
31
+ visible: bool = True,
32
+ rtl: bool = False,
33
+ elem_id: str | None = None,
34
+ elem_classes: list[str] | str | None = None,
35
+ render: bool = True,
36
+ ):
37
+ """
38
+ Parameters:
39
+ value: default text to provide in textbox. If callable, the function will be called whenever the app loads to set the initial value of the component.
40
+ placeholder: placeholder hint to provide behind textbox.
41
+ label: component name in interface.
42
+ every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
43
+ show_label: if True, will display label.
44
+ scale: relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.
45
+ min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
46
+ interactive: if True, will be rendered as an editable textbox; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.
47
+ visible: If False, component will be hidden.
48
+ rtl: If True and `type` is "text", sets the direction of the text to right-to-left (cursor appears on the left of the text). Default is False, which renders cursor on the right.
49
+ elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
50
+ elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
51
+ render: If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
52
+ """
53
+ self.placeholder = placeholder
54
+ self.rtl = rtl
55
+ super().__init__(
56
+ label=label,
57
+ every=every,
58
+ show_label=show_label,
59
+ scale=scale,
60
+ min_width=min_width,
61
+ interactive=interactive,
62
+ visible=visible,
63
+ elem_id=elem_id,
64
+ elem_classes=elem_classes,
65
+ value=value,
66
+ render=render,
67
+ )
68
+
69
+ def preprocess(self, payload: str | None) -> str | None:
70
+ """
71
+ Parameters:
72
+ payload: the text entered in the textarea.
73
+ Returns:
74
+ Passes text value as a {str} into the function.
75
+ """
76
+ return None if payload is None else str(payload)
77
+
78
+ def postprocess(self, value: str | None) -> str | None:
79
+ """
80
+ Parameters:
81
+ value: Expects a {str} returned from function and sets textarea value to it.
82
+ Returns:
83
+ The value to display in the textarea.
84
+ """
85
+ return None if value is None else str(value)
86
+
87
+ def api_info(self) -> dict[str, Any]:
88
+ return {"type": "string"}
89
+
90
+ def example_payload(self) -> Any:
91
+ return "Hello!!"
92
+
93
+ def example_value(self) -> Any:
94
+ return "Hello!!"
src/backend/gradio_hubquicksearch/hubquicksearch.pyi ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ from typing import Any, Callable
4
+
5
+ from gradio.components.base import FormComponent
6
+ from gradio.events import Events
7
+
8
+
9
+ class HubQuicksearch(FormComponent):
10
+ """
11
+ Creates a very simple textbox for user to enter string input or display string output.
12
+ """
13
+
14
+ EVENTS = [
15
+ Events.change,
16
+ Events.input,
17
+ Events.submit,
18
+ ]
19
+
20
+ def __init__(
21
+ self,
22
+ value: str | Callable | None = None,
23
+ *,
24
+ placeholder: str | None = None,
25
+ label: str | None = None,
26
+ every: float | None = None,
27
+ show_label: bool | None = None,
28
+ scale: int | None = None,
29
+ min_width: int = 160,
30
+ interactive: bool | None = None,
31
+ visible: bool = True,
32
+ rtl: bool = False,
33
+ elem_id: str | None = None,
34
+ elem_classes: list[str] | str | None = None,
35
+ render: bool = True,
36
+ ):
37
+ """
38
+ Parameters:
39
+ value: default text to provide in textbox. If callable, the function will be called whenever the app loads to set the initial value of the component.
40
+ placeholder: placeholder hint to provide behind textbox.
41
+ label: component name in interface.
42
+ every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.
43
+ show_label: if True, will display label.
44
+ scale: relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.
45
+ min_width: minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.
46
+ interactive: if True, will be rendered as an editable textbox; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.
47
+ visible: If False, component will be hidden.
48
+ rtl: If True and `type` is "text", sets the direction of the text to right-to-left (cursor appears on the left of the text). Default is False, which renders cursor on the right.
49
+ elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
50
+ elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
51
+ render: If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
52
+ """
53
+ self.placeholder = placeholder
54
+ self.rtl = rtl
55
+ super().__init__(
56
+ label=label,
57
+ every=every,
58
+ show_label=show_label,
59
+ scale=scale,
60
+ min_width=min_width,
61
+ interactive=interactive,
62
+ visible=visible,
63
+ elem_id=elem_id,
64
+ elem_classes=elem_classes,
65
+ value=value,
66
+ render=render,
67
+ )
68
+
69
+ def preprocess(self, payload: str | None) -> str | None:
70
+ """
71
+ Parameters:
72
+ payload: the text entered in the textarea.
73
+ Returns:
74
+ Passes text value as a {str} into the function.
75
+ """
76
+ return None if payload is None else str(payload)
77
+
78
+ def postprocess(self, value: str | None) -> str | None:
79
+ """
80
+ Parameters:
81
+ value: Expects a {str} returned from function and sets textarea value to it.
82
+ Returns:
83
+ The value to display in the textarea.
84
+ """
85
+ return None if value is None else str(value)
86
+
87
+ def api_info(self) -> dict[str, Any]:
88
+ return {"type": "string"}
89
+
90
+ def example_payload(self) -> Any:
91
+ return "Hello!!"
92
+
93
+ def example_value(self) -> Any:
94
+ return "Hello!!"
95
+
96
+
97
+ def change(self,
98
+ fn: Callable | None,
99
+ inputs: Component | Sequence[Component] | set[Component] | None = None,
100
+ outputs: Component | Sequence[Component] | None = None,
101
+ api_name: str | None | Literal[False] = None,
102
+ scroll_to_output: bool = False,
103
+ show_progress: Literal["full", "minimal", "hidden"] = "full",
104
+ queue: bool | None = None,
105
+ batch: bool = False,
106
+ max_batch_size: int = 4,
107
+ preprocess: bool = True,
108
+ postprocess: bool = True,
109
+ cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
110
+ every: float | None = None,
111
+ trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
112
+ js: str | None = None,
113
+ concurrency_limit: int | None | Literal["default"] = "default",
114
+ concurrency_id: str | None = None,
115
+ show_api: bool = True) -> Dependency:
116
+ """
117
+ Parameters:
118
+ fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
119
+ inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
120
+ outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
121
+ api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
122
+ scroll_to_output: If True, will scroll to output component on completion
123
+ show_progress: If True, will show progress animation while pending
124
+ queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
125
+ batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
126
+ max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
127
+ preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
128
+ postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
129
+ cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
130
+ every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds.
131
+ trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` and `.key_up()` events) would allow a second submission after the pending event is complete.
132
+ js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
133
+ concurrency_limit: If set, this is the maximum number of this event that can be running simultaneously. Can be set to None to mean no concurrency_limit (any number of this event can be running simultaneously). Set to "default" to use the default concurrency limit (defined by the `default_concurrency_limit` parameter in `Blocks.queue()`, which itself is 1 by default).
134
+ concurrency_id: If set, this is the id of the concurrency group. Events with the same concurrency_id will be limited by the lowest set concurrency_limit.
135
+ show_api: whether to show this event in the "view API" page of the Gradio app, or in the ".view_api()" method of the Gradio clients. Unlike setting api_name to False, setting show_api to False will still allow downstream apps to use this event. If fn is None, show_api will automatically be set to False.
136
+ """
137
+ ...
138
+
139
+ def input(self,
140
+ fn: Callable | None,
141
+ inputs: Component | Sequence[Component] | set[Component] | None = None,
142
+ outputs: Component | Sequence[Component] | None = None,
143
+ api_name: str | None | Literal[False] = None,
144
+ scroll_to_output: bool = False,
145
+ show_progress: Literal["full", "minimal", "hidden"] = "full",
146
+ queue: bool | None = None,
147
+ batch: bool = False,
148
+ max_batch_size: int = 4,
149
+ preprocess: bool = True,
150
+ postprocess: bool = True,
151
+ cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
152
+ every: float | None = None,
153
+ trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
154
+ js: str | None = None,
155
+ concurrency_limit: int | None | Literal["default"] = "default",
156
+ concurrency_id: str | None = None,
157
+ show_api: bool = True) -> Dependency:
158
+ """
159
+ Parameters:
160
+ fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
161
+ inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
162
+ outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
163
+ api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
164
+ scroll_to_output: If True, will scroll to output component on completion
165
+ show_progress: If True, will show progress animation while pending
166
+ queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
167
+ batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
168
+ max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
169
+ preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
170
+ postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
171
+ cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
172
+ every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds.
173
+ trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` and `.key_up()` events) would allow a second submission after the pending event is complete.
174
+ js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
175
+ concurrency_limit: If set, this is the maximum number of this event that can be running simultaneously. Can be set to None to mean no concurrency_limit (any number of this event can be running simultaneously). Set to "default" to use the default concurrency limit (defined by the `default_concurrency_limit` parameter in `Blocks.queue()`, which itself is 1 by default).
176
+ concurrency_id: If set, this is the id of the concurrency group. Events with the same concurrency_id will be limited by the lowest set concurrency_limit.
177
+ show_api: whether to show this event in the "view API" page of the Gradio app, or in the ".view_api()" method of the Gradio clients. Unlike setting api_name to False, setting show_api to False will still allow downstream apps to use this event. If fn is None, show_api will automatically be set to False.
178
+ """
179
+ ...
180
+
181
+ def submit(self,
182
+ fn: Callable | None,
183
+ inputs: Component | Sequence[Component] | set[Component] | None = None,
184
+ outputs: Component | Sequence[Component] | None = None,
185
+ api_name: str | None | Literal[False] = None,
186
+ scroll_to_output: bool = False,
187
+ show_progress: Literal["full", "minimal", "hidden"] = "full",
188
+ queue: bool | None = None,
189
+ batch: bool = False,
190
+ max_batch_size: int = 4,
191
+ preprocess: bool = True,
192
+ postprocess: bool = True,
193
+ cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
194
+ every: float | None = None,
195
+ trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
196
+ js: str | None = None,
197
+ concurrency_limit: int | None | Literal["default"] = "default",
198
+ concurrency_id: str | None = None,
199
+ show_api: bool = True) -> Dependency:
200
+ """
201
+ Parameters:
202
+ fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
203
+ inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
204
+ outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
205
+ api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
206
+ scroll_to_output: If True, will scroll to output component on completion
207
+ show_progress: If True, will show progress animation while pending
208
+ queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
209
+ batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
210
+ max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
211
+ preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
212
+ postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
213
+ cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
214
+ every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds.
215
+ trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` and `.key_up()` events) would allow a second submission after the pending event is complete.
216
+ js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
217
+ concurrency_limit: If set, this is the maximum number of this event that can be running simultaneously. Can be set to None to mean no concurrency_limit (any number of this event can be running simultaneously). Set to "default" to use the default concurrency limit (defined by the `default_concurrency_limit` parameter in `Blocks.queue()`, which itself is 1 by default).
218
+ concurrency_id: If set, this is the id of the concurrency group. Events with the same concurrency_id will be limited by the lowest set concurrency_limit.
219
+ show_api: whether to show this event in the "view API" page of the Gradio app, or in the ".view_api()" method of the Gradio clients. Unlike setting api_name to False, setting show_api to False will still allow downstream apps to use this event. If fn is None, show_api will automatically be set to False.
220
+ """
221
+ ...
src/backend/gradio_hubquicksearch/templates/component/index.js ADDED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_hubquicksearch/templates/component/style.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .block.s-gHri1EnE1tNu{position:relative;margin:0;box-shadow:var(--block-shadow);border-width:var(--block-border-width);border-color:var(--block-border-color);border-radius:var(--block-radius);background:var(--block-background-fill);width:100%;line-height:var(--line-sm)}.block.border_focus.s-gHri1EnE1tNu{border-color:var(--color-accent)}.block.border_contrast.s-gHri1EnE1tNu{border-color:var(--body-text-color)}.padded.s-gHri1EnE1tNu{padding:var(--block-padding)}.hidden.s-gHri1EnE1tNu{display:none}.hide-container.s-gHri1EnE1tNu{margin:0;box-shadow:none;--block-border-width:0;background:transparent;padding:0;overflow:visible}div.s-rHFnjjZU_ewn{margin-bottom:var(--spacing-lg);color:var(--block-info-text-color);font-weight:var(--block-info-text-weight);font-size:var(--block-info-text-size);line-height:var(--line-sm)}span.has-info.s-vxmmg1Wn3NRx{margin-bottom:var(--spacing-xs)}span.s-vxmmg1Wn3NRx:not(.has-info){margin-bottom:var(--spacing-lg)}span.s-vxmmg1Wn3NRx{display:inline-block;position:relative;z-index:var(--layer-4);border:solid var(--block-title-border-width) var(--block-title-border-color);border-radius:var(--block-title-radius);background:var(--block-title-background-fill);padding:var(--block-title-padding);color:var(--block-title-text-color);font-weight:var(--block-title-text-weight);font-size:var(--block-title-text-size);line-height:var(--line-sm)}.hide.s-vxmmg1Wn3NRx{margin:0;height:0}label.s-YFSLr2mO2iu3{display:inline-flex;align-items:center;z-index:var(--layer-2);box-shadow:var(--block-label-shadow);border:var(--block-label-border-width) solid var(--border-color-primary);border-top:none;border-left:none;border-radius:var(--block-label-radius);background:var(--block-label-background-fill);padding:var(--block-label-padding);pointer-events:none;color:var(--block-label-text-color);font-weight:var(--block-label-text-weight);font-size:var(--block-label-text-size);line-height:var(--line-sm)}.gr-group label.s-YFSLr2mO2iu3{border-top-left-radius:0}label.float.s-YFSLr2mO2iu3{position:absolute;top:var(--block-label-margin);left:var(--block-label-margin)}label.s-YFSLr2mO2iu3:not(.float){position:static;margin-top:var(--block-label-margin);margin-left:var(--block-label-margin)}.hide.s-YFSLr2mO2iu3{height:0}span.s-YFSLr2mO2iu3{opacity:.8;margin-right:var(--size-2);width:calc(var(--block-label-text-size) - 1px);height:calc(var(--block-label-text-size) - 1px)}.hide-label.s-YFSLr2mO2iu3{box-shadow:none;border-width:0;background:transparent;overflow:visible}button.s-tZhY8bE_S0Lo{display:flex;justify-content:center;align-items:center;gap:1px;z-index:var(--layer-2);border-radius:var(--radius-sm);color:var(--block-label-text-color);border:1px solid transparent}button[disabled].s-tZhY8bE_S0Lo{opacity:.5;box-shadow:none}button[disabled].s-tZhY8bE_S0Lo:hover{cursor:not-allowed}.padded.s-tZhY8bE_S0Lo{padding:2px;background:var(--bg-color);box-shadow:var(--shadow-drop);border:1px solid var(--button-secondary-border-color)}button.s-tZhY8bE_S0Lo:hover,button.highlight.s-tZhY8bE_S0Lo{cursor:pointer;color:var(--color-accent)}.padded.s-tZhY8bE_S0Lo:hover{border:2px solid var(--button-secondary-border-color-hover);padding:1px;color:var(--block-label-text-color)}span.s-tZhY8bE_S0Lo{padding:0 1px;font-size:10px}div.s-tZhY8bE_S0Lo{padding:2px;display:flex;align-items:flex-end}.small.s-tZhY8bE_S0Lo{width:14px;height:14px}.large.s-tZhY8bE_S0Lo{width:22px;height:22px}.pending.s-tZhY8bE_S0Lo{animation:s-tZhY8bE_S0Lo-flash .5s infinite}@keyframes s-tZhY8bE_S0Lo-flash{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.transparent.s-tZhY8bE_S0Lo{background:transparent;border:none;box-shadow:none}.empty.s-fRBJGk-2PVNQ{display:flex;justify-content:center;align-items:center;margin-top:calc(0px - var(--size-6));height:var(--size-full)}.icon.s-fRBJGk-2PVNQ{opacity:.5;height:var(--size-5);color:var(--body-text-color)}.small.s-fRBJGk-2PVNQ{min-height:calc(var(--size-32) - 20px)}.large.s-fRBJGk-2PVNQ{min-height:calc(var(--size-64) - 20px)}.unpadded_box.s-fRBJGk-2PVNQ{margin-top:0}.small_parent.s-fRBJGk-2PVNQ{min-height:100%!important}.dropdown-arrow.s-0io8AhgIAqJY{fill:currentColor}.wrap.s-lRugb-BnxWrO{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:var(--size-60);color:var(--block-label-text-color);line-height:var(--line-md);height:100%;padding-top:var(--size-3)}.or.s-lRugb-BnxWrO{color:var(--body-text-color-subdued);display:flex}.icon-wrap.s-lRugb-BnxWrO{width:30px;margin-bottom:var(--spacing-lg)}@media (--screen-md){.wrap.s-lRugb-BnxWrO{font-size:var(--text-lg)}}.hovered.s-lRugb-BnxWrO{color:var(--color-accent)}div.s-MZ5ZsjQ0AH1_{border-top:1px solid transparent;display:flex;max-height:100%;justify-content:center;gap:var(--spacing-sm);height:auto;align-items:flex-end;padding-bottom:var(--spacing-xl);color:var(--block-label-text-color);flex-shrink:0;width:95%}.show_border.s-MZ5ZsjQ0AH1_{border-top:1px solid var(--block-border-color);margin-top:var(--spacing-xxl);box-shadow:var(--shadow-drop)}.source-selection.s-pt0FE9rrnuTV{display:flex;align-items:center;justify-content:center;border-top:1px solid var(--border-color-primary);width:95%;bottom:0;left:0;right:0;margin-left:auto;margin-right:auto}.icon.s-pt0FE9rrnuTV{width:22px;height:22px;margin:var(--spacing-lg) var(--spacing-xs);padding:var(--spacing-xs);color:var(--neutral-400);border-radius:var(--radius-md)}.selected.s-pt0FE9rrnuTV{color:var(--color-accent)}.icon.s-pt0FE9rrnuTV:hover,.icon.s-pt0FE9rrnuTV:focus{color:var(--color-accent)}svg.s-kL3wNG5vn6RW.s-kL3wNG5vn6RW{width:var(--size-20);height:var(--size-20)}svg.s-kL3wNG5vn6RW path.s-kL3wNG5vn6RW{fill:var(--loader-color)}div.s-kL3wNG5vn6RW.s-kL3wNG5vn6RW{z-index:var(--layer-2)}.margin.s-kL3wNG5vn6RW.s-kL3wNG5vn6RW{margin:var(--size-4)}.wrap.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-top);transition:opacity .1s ease-in-out;border-radius:var(--block-radius);background:var(--block-background-fill);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden;pointer-events:none}.wrap.center.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{top:0;right:0;left:0}.wrap.default.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{top:0;right:0;bottom:0;left:0}.hide.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{opacity:0;pointer-events:none}.generating.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{animation:s-vXtJ1y9FKh0U-pulse 2s cubic-bezier(.4,0,.6,1) infinite;border:2px solid var(--color-accent);background:transparent;z-index:var(--layer-1)}.translucent.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{background:none}@keyframes s-vXtJ1y9FKh0U-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{position:absolute;top:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.minimal.s-vXtJ1y9FKh0U .progress-text.s-vXtJ1y9FKh0U{background:var(--block-background-fill)}.border.s-vXtJ1y9FKh0U.s-vXtJ1y9FKh0U{border:1px solid var(--border-color-primary)}.toast-body.s-gDA3u_NUMyi8{display:flex;position:relative;right:0;left:0;align-items:center;margin:var(--size-6) var(--size-4);margin:auto;border-radius:var(--container-radius);overflow:hidden;pointer-events:auto}.toast-body.error.s-gDA3u_NUMyi8{border:1px solid var(--color-red-700);background:var(--color-red-50)}.dark .toast-body.error.s-gDA3u_NUMyi8{border:1px solid var(--color-red-500);background-color:var(--color-grey-950)}.toast-body.warning.s-gDA3u_NUMyi8{border:1px solid var(--color-yellow-700);background:var(--color-yellow-50)}.dark .toast-body.warning.s-gDA3u_NUMyi8{border:1px solid var(--color-yellow-500);background-color:var(--color-grey-950)}.toast-body.info.s-gDA3u_NUMyi8{border:1px solid var(--color-grey-700);background:var(--color-grey-50)}.dark .toast-body.info.s-gDA3u_NUMyi8{border:1px solid var(--color-grey-500);background-color:var(--color-grey-950)}.toast-title.s-gDA3u_NUMyi8{display:flex;align-items:center;font-weight:var(--weight-bold);font-size:var(--text-lg);line-height:var(--line-sm);text-transform:capitalize}.toast-title.error.s-gDA3u_NUMyi8{color:var(--color-red-700)}.dark .toast-title.error.s-gDA3u_NUMyi8{color:var(--color-red-50)}.toast-title.warning.s-gDA3u_NUMyi8{color:var(--color-yellow-700)}.dark .toast-title.warning.s-gDA3u_NUMyi8{color:var(--color-yellow-50)}.toast-title.info.s-gDA3u_NUMyi8{color:var(--color-grey-700)}.dark .toast-title.info.s-gDA3u_NUMyi8{color:var(--color-grey-50)}.toast-close.s-gDA3u_NUMyi8{margin:0 var(--size-3);border-radius:var(--size-3);padding:0px var(--size-1-5);font-size:var(--size-5);line-height:var(--size-5)}.toast-close.error.s-gDA3u_NUMyi8{color:var(--color-red-700)}.dark .toast-close.error.s-gDA3u_NUMyi8{color:var(--color-red-500)}.toast-close.warning.s-gDA3u_NUMyi8{color:var(--color-yellow-700)}.dark .toast-close.warning.s-gDA3u_NUMyi8{color:var(--color-yellow-500)}.toast-close.info.s-gDA3u_NUMyi8{color:var(--color-grey-700)}.dark .toast-close.info.s-gDA3u_NUMyi8{color:var(--color-grey-500)}.toast-text.s-gDA3u_NUMyi8{font-size:var(--text-lg)}.toast-text.error.s-gDA3u_NUMyi8{color:var(--color-red-700)}.dark .toast-text.error.s-gDA3u_NUMyi8{color:var(--color-red-50)}.toast-text.warning.s-gDA3u_NUMyi8{color:var(--color-yellow-700)}.dark .toast-text.warning.s-gDA3u_NUMyi8{color:var(--color-yellow-50)}.toast-text.info.s-gDA3u_NUMyi8{color:var(--color-grey-700)}.dark .toast-text.info.s-gDA3u_NUMyi8{color:var(--color-grey-50)}.toast-details.s-gDA3u_NUMyi8{margin:var(--size-3) var(--size-3) var(--size-3) 0;width:100%}.toast-icon.s-gDA3u_NUMyi8{display:flex;position:absolute;position:relative;flex-shrink:0;justify-content:center;align-items:center;margin:var(--size-2);border-radius:var(--radius-full);padding:var(--size-1);padding-left:calc(var(--size-1) - 1px);width:35px;height:35px}.toast-icon.error.s-gDA3u_NUMyi8{color:var(--color-red-700)}.dark .toast-icon.error.s-gDA3u_NUMyi8{color:var(--color-red-500)}.toast-icon.warning.s-gDA3u_NUMyi8{color:var(--color-yellow-700)}.dark .toast-icon.warning.s-gDA3u_NUMyi8{color:var(--color-yellow-500)}.toast-icon.info.s-gDA3u_NUMyi8{color:var(--color-grey-700)}.dark .toast-icon.info.s-gDA3u_NUMyi8{color:var(--color-grey-500)}@keyframes s-gDA3u_NUMyi8-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.timer.s-gDA3u_NUMyi8{position:absolute;bottom:0;left:0;transform-origin:0 0;animation:s-gDA3u_NUMyi8-countdown 10s linear forwards;width:100%;height:var(--size-1)}.timer.error.s-gDA3u_NUMyi8{background:var(--color-red-700)}.dark .timer.error.s-gDA3u_NUMyi8{background:var(--color-red-500)}.timer.warning.s-gDA3u_NUMyi8{background:var(--color-yellow-700)}.dark .timer.warning.s-gDA3u_NUMyi8{background:var(--color-yellow-500)}.timer.info.s-gDA3u_NUMyi8{background:var(--color-grey-700)}.dark .timer.info.s-gDA3u_NUMyi8{background:var(--color-grey-500)}.toast-wrap.s-HjnDZjX7wTpT{display:flex;position:fixed;top:var(--size-4);right:var(--size-4);flex-direction:column;align-items:end;gap:var(--size-2);z-index:var(--layer-top);width:calc(100% - var(--size-8))}@media (--screen-sm){.toast-wrap.s-HjnDZjX7wTpT{width:calc(var(--size-96) + var(--size-10))}}label.s-8RhEEAzdBY_I.s-8RhEEAzdBY_I{display:block;width:100%}input.s-8RhEEAzdBY_I.s-8RhEEAzdBY_I{display:block;position:relative;outline:none!important;box-shadow:var(--input-shadow);background:var(--input-background-fill);padding:var(--input-padding);width:100%;color:var(--body-text-color);font-weight:var(--input-text-weight);font-size:var(--input-text-size);line-height:var(--line-sm);border:none}.container.s-8RhEEAzdBY_I>input.s-8RhEEAzdBY_I{border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-radius)}input.s-8RhEEAzdBY_I.s-8RhEEAzdBY_I:disabled{-webkit-text-fill-color:var(--body-text-color);-webkit-opacity:1;opacity:1}input.s-8RhEEAzdBY_I.s-8RhEEAzdBY_I:focus{box-shadow:var(--input-shadow-focus);border-color:var(--input-border-color-focus)}input.s-8RhEEAzdBY_I.s-8RhEEAzdBY_I::placeholder{color:var(--input-placeholder-color)}
src/backend/gradio_hubquicksearch/templates/example/index.js ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const {
2
+ SvelteComponentDev: E,
3
+ add_iframe_resize_listener: b,
4
+ add_location: x,
5
+ add_render_callback: P,
6
+ append_dev: z,
7
+ attr_dev: j,
8
+ binding_callbacks: k,
9
+ detach_dev: S,
10
+ dispatch_dev: f,
11
+ element: q,
12
+ init: C,
13
+ insert_dev: O,
14
+ noop: h,
15
+ safe_not_equal: R,
16
+ set_data_dev: B,
17
+ text: D,
18
+ toggle_class: r,
19
+ validate_slots: G
20
+ } = window.__gradio__svelte__internal, { onMount: w } = window.__gradio__svelte__internal, M = "frontend/Example.svelte";
21
+ function _(n) {
22
+ let e, o = (
23
+ /*value*/
24
+ (n[0] ? (
25
+ /*value*/
26
+ n[0]
27
+ ) : "") + ""
28
+ ), u, d;
29
+ const a = {
30
+ c: function() {
31
+ e = q("div"), u = D(o), j(e, "class", "s-nq2TxZ5oGq93"), P(() => (
32
+ /*div_elementresize_handler*/
33
+ n[5].call(e)
34
+ )), r(
35
+ e,
36
+ "table",
37
+ /*type*/
38
+ n[1] === "table"
39
+ ), r(
40
+ e,
41
+ "gallery",
42
+ /*type*/
43
+ n[1] === "gallery"
44
+ ), r(
45
+ e,
46
+ "selected",
47
+ /*selected*/
48
+ n[2]
49
+ ), x(e, M, 24, 0, 413);
50
+ },
51
+ l: function(s) {
52
+ throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
53
+ },
54
+ m: function(s, l) {
55
+ O(s, e, l), z(e, u), d = b(
56
+ e,
57
+ /*div_elementresize_handler*/
58
+ n[5].bind(e)
59
+ ), n[6](e);
60
+ },
61
+ p: function(s, [l]) {
62
+ l & /*value*/
63
+ 1 && o !== (o = /*value*/
64
+ (s[0] ? (
65
+ /*value*/
66
+ s[0]
67
+ ) : "") + "") && B(u, o), l & /*type*/
68
+ 2 && r(
69
+ e,
70
+ "table",
71
+ /*type*/
72
+ s[1] === "table"
73
+ ), l & /*type*/
74
+ 2 && r(
75
+ e,
76
+ "gallery",
77
+ /*type*/
78
+ s[1] === "gallery"
79
+ ), l & /*selected*/
80
+ 4 && r(
81
+ e,
82
+ "selected",
83
+ /*selected*/
84
+ s[2]
85
+ );
86
+ },
87
+ i: h,
88
+ o: h,
89
+ d: function(s) {
90
+ s && S(e), d(), n[6](null);
91
+ }
92
+ };
93
+ return f("SvelteRegisterBlock", {
94
+ block: a,
95
+ id: _.name,
96
+ type: "component",
97
+ source: "",
98
+ ctx: n
99
+ }), a;
100
+ }
101
+ function N(n, e, o) {
102
+ let { $$slots: u = {}, $$scope: d } = e;
103
+ G("Example", u, []);
104
+ let { value: a } = e, { type: c } = e, { selected: s = !1 } = e, l, i;
105
+ function p(t, m) {
106
+ !t || !m || (i.style.setProperty("--local-text-width", `${m < 150 ? m : 200}px`), o(4, i.style.whiteSpace = "unset", i));
107
+ }
108
+ w(() => {
109
+ p(i, l);
110
+ }), n.$$.on_mount.push(function() {
111
+ a === void 0 && !("value" in e || n.$$.bound[n.$$.props.value]) && console.warn("<Example> was created without expected prop 'value'"), c === void 0 && !("type" in e || n.$$.bound[n.$$.props.type]) && console.warn("<Example> was created without expected prop 'type'");
112
+ });
113
+ const v = ["value", "type", "selected"];
114
+ Object.keys(e).forEach((t) => {
115
+ !~v.indexOf(t) && t.slice(0, 2) !== "$$" && t !== "slot" && console.warn(`<Example> was created with unknown prop '${t}'`);
116
+ });
117
+ function y() {
118
+ l = this.clientWidth, o(3, l);
119
+ }
120
+ function g(t) {
121
+ k[t ? "unshift" : "push"](() => {
122
+ i = t, o(4, i);
123
+ });
124
+ }
125
+ return n.$$set = (t) => {
126
+ "value" in t && o(0, a = t.value), "type" in t && o(1, c = t.type), "selected" in t && o(2, s = t.selected);
127
+ }, n.$capture_state = () => ({
128
+ onMount: w,
129
+ value: a,
130
+ type: c,
131
+ selected: s,
132
+ size: l,
133
+ el: i,
134
+ set_styles: p
135
+ }), n.$inject_state = (t) => {
136
+ "value" in t && o(0, a = t.value), "type" in t && o(1, c = t.type), "selected" in t && o(2, s = t.selected), "size" in t && o(3, l = t.size), "el" in t && o(4, i = t.el);
137
+ }, e && "$$inject" in e && n.$inject_state(e.$$inject), [a, c, s, l, i, y, g];
138
+ }
139
+ class T extends E {
140
+ constructor(e) {
141
+ super(e), C(this, e, N, _, R, { value: 0, type: 1, selected: 2 }), f("SvelteRegisterComponent", {
142
+ component: this,
143
+ tagName: "Example",
144
+ options: e,
145
+ id: _.name
146
+ });
147
+ }
148
+ get value() {
149
+ throw new Error("<Example>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
150
+ }
151
+ set value(e) {
152
+ throw new Error("<Example>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
153
+ }
154
+ get type() {
155
+ throw new Error("<Example>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
156
+ }
157
+ set type(e) {
158
+ throw new Error("<Example>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
159
+ }
160
+ get selected() {
161
+ throw new Error("<Example>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
162
+ }
163
+ set selected(e) {
164
+ throw new Error("<Example>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
165
+ }
166
+ }
167
+ export {
168
+ T as default
169
+ };
src/backend/gradio_hubquicksearch/templates/example/style.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .gallery.s-nq2TxZ5oGq93{padding:var(--size-1) var(--size-2)}div.s-nq2TxZ5oGq93{overflow:hidden;min-width:var(--local-text-width);white-space:nowrap}
src/demo/__init__.py ADDED
File without changes
src/demo/app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ from gradio_hubquicksearch import HubQuicksearch
4
+
5
+
6
+ example = HubQuicksearch().example_value()
7
+
8
+ demo = gr.Interface(
9
+ lambda x:x,
10
+ HubQuicksearch(label="repo id from the hub"), # interactive version of your component
11
+ HubQuicksearch(), # static version of your component
12
+ # examples=[[example]], # uncomment this line to view the "example version" of your component
13
+ )
14
+
15
+
16
+ if __name__ == "__main__":
17
+ demo.launch()
src/demo/css.css ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html {
2
+ font-family: Inter;
3
+ font-size: 16px;
4
+ font-weight: 400;
5
+ line-height: 1.5;
6
+ -webkit-text-size-adjust: 100%;
7
+ background: #fff;
8
+ color: #323232;
9
+ -webkit-font-smoothing: antialiased;
10
+ -moz-osx-font-smoothing: grayscale;
11
+ text-rendering: optimizeLegibility;
12
+ }
13
+
14
+ :root {
15
+ --space: 1;
16
+ --vspace: calc(var(--space) * 1rem);
17
+ --vspace-0: calc(3 * var(--space) * 1rem);
18
+ --vspace-1: calc(2 * var(--space) * 1rem);
19
+ --vspace-2: calc(1.5 * var(--space) * 1rem);
20
+ --vspace-3: calc(0.5 * var(--space) * 1rem);
21
+ }
22
+
23
+ .app {
24
+ max-width: 748px !important;
25
+ }
26
+
27
+ .prose p {
28
+ margin: var(--vspace) 0;
29
+ line-height: var(--vspace * 2);
30
+ font-size: 1rem;
31
+ }
32
+
33
+ code {
34
+ font-family: "Inconsolata", sans-serif;
35
+ font-size: 16px;
36
+ }
37
+
38
+ h1,
39
+ h1 code {
40
+ font-weight: 400;
41
+ line-height: calc(2.5 / var(--space) * var(--vspace));
42
+ }
43
+
44
+ h1 code {
45
+ background: none;
46
+ border: none;
47
+ letter-spacing: 0.05em;
48
+ padding-bottom: 5px;
49
+ position: relative;
50
+ padding: 0;
51
+ }
52
+
53
+ h2 {
54
+ margin: var(--vspace-1) 0 var(--vspace-2) 0;
55
+ line-height: 1em;
56
+ }
57
+
58
+ h3,
59
+ h3 code {
60
+ margin: var(--vspace-1) 0 var(--vspace-2) 0;
61
+ line-height: 1em;
62
+ }
63
+
64
+ h4,
65
+ h5,
66
+ h6 {
67
+ margin: var(--vspace-3) 0 var(--vspace-3) 0;
68
+ line-height: var(--vspace);
69
+ }
70
+
71
+ .bigtitle,
72
+ h1,
73
+ h1 code {
74
+ font-size: calc(8px * 4.5);
75
+ word-break: break-word;
76
+ }
77
+
78
+ .title,
79
+ h2,
80
+ h2 code {
81
+ font-size: calc(8px * 3.375);
82
+ font-weight: lighter;
83
+ word-break: break-word;
84
+ border: none;
85
+ background: none;
86
+ }
87
+
88
+ .subheading1,
89
+ h3,
90
+ h3 code {
91
+ font-size: calc(8px * 1.8);
92
+ font-weight: 600;
93
+ border: none;
94
+ background: none;
95
+ letter-spacing: 0.1em;
96
+ text-transform: uppercase;
97
+ }
98
+
99
+ h2 code {
100
+ padding: 0;
101
+ position: relative;
102
+ letter-spacing: 0.05em;
103
+ }
104
+
105
+ blockquote {
106
+ font-size: calc(8px * 1.1667);
107
+ font-style: italic;
108
+ line-height: calc(1.1667 * var(--vspace));
109
+ margin: var(--vspace-2) var(--vspace-2);
110
+ }
111
+
112
+ .subheading2,
113
+ h4 {
114
+ font-size: calc(8px * 1.4292);
115
+ text-transform: uppercase;
116
+ font-weight: 600;
117
+ }
118
+
119
+ .subheading3,
120
+ h5 {
121
+ font-size: calc(8px * 1.2917);
122
+ line-height: calc(1.2917 * var(--vspace));
123
+
124
+ font-weight: lighter;
125
+ text-transform: uppercase;
126
+ letter-spacing: 0.15em;
127
+ }
128
+
129
+ h6 {
130
+ font-size: calc(8px * 1.1667);
131
+ font-size: 1.1667em;
132
+ font-weight: normal;
133
+ font-style: italic;
134
+ font-family: "le-monde-livre-classic-byol", serif !important;
135
+ letter-spacing: 0px !important;
136
+ }
137
+
138
+ #start .md > *:first-child {
139
+ margin-top: 0;
140
+ }
141
+
142
+ h2 + h3 {
143
+ margin-top: 0;
144
+ }
145
+
146
+ .md hr {
147
+ border: none;
148
+ border-top: 1px solid var(--block-border-color);
149
+ margin: var(--vspace-2) 0 var(--vspace-2) 0;
150
+ }
151
+ .prose ul {
152
+ margin: var(--vspace-2) 0 var(--vspace-1) 0;
153
+ }
154
+
155
+ .gap {
156
+ gap: 0;
157
+ }
src/demo/space.py ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ from app import demo as app
4
+ import os
5
+
6
+ _docs = {'HubQuicksearch': {'description': 'Creates a very simple textbox for user to enter string input or display string output.', 'members': {'__init__': {'value': {'type': 'str | Callable | None', 'default': 'None', 'description': 'default text to provide in textbox. If callable, the function will be called whenever the app loads to set the initial value of the component.'}, 'placeholder': {'type': 'str | None', 'default': 'None', 'description': 'placeholder hint to provide behind textbox.'}, 'label': {'type': 'str | None', 'default': 'None', 'description': 'component name in interface.'}, 'every': {'type': 'float | None', 'default': 'None', 'description': "If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute."}, 'show_label': {'type': 'bool | None', 'default': 'None', 'description': 'if True, will display label.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.'}, 'min_width': {'type': 'int', 'default': '160', 'description': 'minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.'}, 'interactive': {'type': 'bool | None', 'default': 'None', 'description': 'if True, will be rendered as an editable textbox; if False, editing will be disabled. If not provided, this is inferred based on whether the component is used as an input or output.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'If False, component will be hidden.'}, 'rtl': {'type': 'bool', 'default': 'False', 'description': 'If True and `type` is "text", sets the direction of the text to right-to-left (cursor appears on the left of the text). Default is False, which renders cursor on the right.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': 'An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.'}, 'render': {'type': 'bool', 'default': 'True', 'description': 'If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.'}}, 'postprocess': {'value': {'type': 'str | None', 'description': 'Expects a {str} returned from function and sets textarea value to it.'}}, 'preprocess': {'return': {'type': 'str | None', 'description': 'Passes text value as a {str} into the function.'}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': 'Triggered when the value of the HubQuicksearch changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input.'}, 'input': {'type': None, 'default': None, 'description': 'This listener is triggered when the user changes the value of the HubQuicksearch.'}, 'submit': {'type': None, 'default': None, 'description': 'This listener is triggered when the user presses the Enter key while the HubQuicksearch is focused.'}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'HubQuicksearch': []}}}
7
+
8
+ abs_path = os.path.join(os.path.dirname(__file__), "css.css")
9
+
10
+ with gr.Blocks(
11
+ css=abs_path,
12
+ theme=gr.themes.Default(
13
+ font_mono=[
14
+ gr.themes.GoogleFont("Inconsolata"),
15
+ "monospace",
16
+ ],
17
+ ),
18
+ ) as demo:
19
+ gr.Markdown(
20
+ """
21
+ # `gradio_hubquicksearch`
22
+
23
+ <div style="display: flex; gap: 7px;">
24
+ <img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.1%20-%20orange">
25
+ </div>
26
+
27
+ Quick search HF Hub repos or users
28
+ """, elem_classes=["md-custom"], header_links=True)
29
+ app.render()
30
+ gr.Markdown(
31
+ """
32
+ ## Installation
33
+
34
+ ```bash
35
+ pip install gradio_hubquicksearch
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ```python
41
+
42
+ import gradio as gr
43
+ from gradio_hubquicksearch import HubQuicksearch
44
+
45
+
46
+ example = HubQuicksearch().example_value()
47
+
48
+ demo = gr.Interface(
49
+ lambda x:x,
50
+ HubQuicksearch(label="repo id from the hub"), # interactive version of your component
51
+ HubQuicksearch(), # static version of your component
52
+ # examples=[[example]], # uncomment this line to view the "example version" of your component
53
+ )
54
+
55
+
56
+ if __name__ == "__main__":
57
+ demo.launch()
58
+
59
+ ```
60
+ """, elem_classes=["md-custom"], header_links=True)
61
+
62
+
63
+ gr.Markdown("""
64
+ ## `HubQuicksearch`
65
+
66
+ ### Initialization
67
+ """, elem_classes=["md-custom"], header_links=True)
68
+
69
+ gr.ParamViewer(value=_docs["HubQuicksearch"]["members"]["__init__"], linkify=[])
70
+
71
+
72
+ gr.Markdown("### Events")
73
+ gr.ParamViewer(value=_docs["HubQuicksearch"]["events"], linkify=['Event'])
74
+
75
+
76
+
77
+
78
+ gr.Markdown("""
79
+
80
+ ### User function
81
+
82
+ The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).
83
+
84
+ - When used as an Input, the component only impacts the input signature of the user function.
85
+ - When used as an output, the component only impacts the return signature of the user function.
86
+
87
+ The code snippet below is accurate in cases where the component is used as both an input and an output.
88
+
89
+ - **As input:** Is passed, passes text value as a {str} into the function.
90
+ - **As output:** Should return, expects a {str} returned from function and sets textarea value to it.
91
+
92
+ ```python
93
+ def predict(
94
+ value: str | None
95
+ ) -> str | None:
96
+ return value
97
+ ```
98
+ """, elem_classes=["md-custom", "HubQuicksearch-user-fn"], header_links=True)
99
+
100
+
101
+
102
+
103
+ demo.load(None, js=r"""function() {
104
+ const refs = {};
105
+ const user_fn_refs = {
106
+ HubQuicksearch: [], };
107
+ requestAnimationFrame(() => {
108
+
109
+ Object.entries(user_fn_refs).forEach(([key, refs]) => {
110
+ if (refs.length > 0) {
111
+ const el = document.querySelector(`.${key}-user-fn`);
112
+ if (!el) return;
113
+ refs.forEach(ref => {
114
+ el.innerHTML = el.innerHTML.replace(
115
+ new RegExp("\\b"+ref+"\\b", "g"),
116
+ `<a href="#h-${ref.toLowerCase()}">${ref}</a>`
117
+ );
118
+ })
119
+ }
120
+ })
121
+
122
+ Object.entries(refs).forEach(([key, refs]) => {
123
+ if (refs.length > 0) {
124
+ const el = document.querySelector(`.${key}`);
125
+ if (!el) return;
126
+ refs.forEach(ref => {
127
+ el.innerHTML = el.innerHTML.replace(
128
+ new RegExp("\\b"+ref+"\\b", "g"),
129
+ `<a href="#h-${ref.toLowerCase()}">${ref}</a>`
130
+ );
131
+ })
132
+ }
133
+ })
134
+ })
135
+ }
136
+
137
+ """)
138
+
139
+ demo.launch()
src/frontend/AuthorAvatar/AuthorAvatar.svelte ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ type Size = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
3
+
4
+ export let author: {
5
+ avatarUrl: string;
6
+ type: string;
7
+ };
8
+ export let classNames = "";
9
+ export let size: Size = "md";
10
+
11
+ const SIZE_CLASS: Record<Size, string> = {
12
+ xs: "w-2.5 h-2.5",
13
+ sm: "w-3 h-3",
14
+ md: "w-3.5 h-3.5",
15
+ lg: "w-5 h-5",
16
+ xl: "w-9 h-9",
17
+ xxl: "w-24 h-24",
18
+ };
19
+ </script>
20
+
21
+ <img
22
+ alt=""
23
+ class="{SIZE_CLASS[size]} {author.type === 'user' ? 'rounded-full' : 'rounded'} {classNames} flex-none"
24
+ src={author.avatarUrl}
25
+ crossorigin="anonymous"
26
+ />
src/frontend/Example.svelte ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ import { onMount } from "svelte";
3
+
4
+ export let value: string | null;
5
+ export let type: "gallery" | "table";
6
+ export let selected = false;
7
+
8
+ let size: number;
9
+ let el: HTMLDivElement;
10
+
11
+ function set_styles(element: HTMLElement, el_width: number): void {
12
+ if (!element || !el_width) return;
13
+ el.style.setProperty(
14
+ "--local-text-width",
15
+ `${el_width < 150 ? el_width : 200}px`
16
+ );
17
+ el.style.whiteSpace = "unset";
18
+ }
19
+
20
+ onMount(() => {
21
+ set_styles(el, size);
22
+ });
23
+ </script>
24
+
25
+ <div
26
+ bind:clientWidth={size}
27
+ bind:this={el}
28
+ class:table={type === "table"}
29
+ class:gallery={type === "gallery"}
30
+ class:selected
31
+ >
32
+ {value ? value : ""}
33
+ </div>
34
+
35
+ <style>
36
+ .gallery {
37
+ padding: var(--size-1) var(--size-2);
38
+ }
39
+
40
+ div {
41
+ overflow: hidden;
42
+ min-width: var(--local-text-width);
43
+
44
+ white-space: nowrap;
45
+ }
46
+ </style>
src/frontend/Icons/IconArrowRight.svelte ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ export let classNames = "";
3
+ </script>
4
+
5
+ <svg
6
+ class={classNames}
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:xlink="http://www.w3.org/1999/xlink"
9
+ aria-hidden="true"
10
+ focusable="false"
11
+ role="img"
12
+ width="1em"
13
+ height="1em"
14
+ preserveAspectRatio="xMidYMid meet"
15
+ viewBox="0 0 32 32"
16
+ >
17
+ <path d="M18 6l-1.4 1.4l7.5 7.6H3v2h21.1l-7.5 7.6L18 26l10-10z" fill="currentColor" />
18
+ </svg>
src/frontend/Index.svelte ADDED
@@ -0,0 +1,282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svelte:options accessors={true} />
2
+
3
+ <script lang="ts">
4
+ import type { Gradio } from "@gradio/utils";
5
+ import { BlockTitle } from "@gradio/atoms";
6
+ import { Block } from "@gradio/atoms";
7
+ import { StatusTracker } from "@gradio/statustracker";
8
+ import type { LoadingStatus } from "@gradio/statustracker";
9
+ import { tick } from "svelte";
10
+ import type { Entry } from "./QuickSearchEntry/Types";
11
+ import QuickSearchEntry from "./QuickSearchEntry/QuickSearchEntry.svelte";
12
+ import type { QuickSearchResults } from "./Types";
13
+ import { queryString, httpGet, throttle } from "./lib/ViewUtils";
14
+
15
+ export let gradio: Gradio<{
16
+ change: never;
17
+ submit: never;
18
+ input: never;
19
+ }>;
20
+ export let label = "Textbox";
21
+ export let elem_id = "";
22
+ export let elem_classes: string[] = [];
23
+ export let visible = true;
24
+ export let value = "";
25
+ export let placeholder = "";
26
+ export let show_label: boolean;
27
+ export let scale: number | null = null;
28
+ export let min_width: number | undefined = undefined;
29
+ export let loading_status: LoadingStatus | undefined = undefined;
30
+ export let value_is_output = false;
31
+ export let interactive: boolean;
32
+ export let rtl = false;
33
+
34
+ export let url: string = "https://huggingface.co/api/quicksearch";
35
+ export let position: "absolute" | "fixed" = "absolute";
36
+
37
+ let entries: Entry[] = [];
38
+ let isOpen = false;
39
+ let lastQuery: string | null = null;
40
+ let numResults = 0;
41
+ let selectedEntryIdx = -1;
42
+ let searchController = new AbortController();
43
+
44
+ const THROTTLE_DELAY = 300;
45
+
46
+ let el: HTMLTextAreaElement | HTMLInputElement;
47
+ const container = true;
48
+
49
+ function handle_change(): void {
50
+ gradio.dispatch("change");
51
+ if (!value_is_output) {
52
+ gradio.dispatch("input");
53
+ }
54
+ }
55
+
56
+ async function handle_keypress(e: KeyboardEvent): Promise<void> {
57
+ await tick();
58
+ if (e.key === "Enter") {
59
+ e.preventDefault();
60
+ gradio.dispatch("submit");
61
+ }
62
+ }
63
+
64
+ async function handleFocus() {
65
+ if (lastQuery === null) {
66
+ await performSearch();
67
+ }
68
+ isOpen = true;
69
+ }
70
+
71
+ const handleInput = throttle(async () => {
72
+ isOpen = true;
73
+ await tick(); // Let parent component change searchParams such as orgFilters first
74
+ await performSearch();
75
+ }, THROTTLE_DELAY);
76
+
77
+ function isSelected(selectedEntryIdx: number, entry: Entry) {
78
+ return entries[selectedEntryIdx]?.id === entry.id && entries[selectedEntryIdx]?.type === entry.type;
79
+ }
80
+
81
+ function handleClickEntry(entry: Entry) {
82
+ selectedEntryIdx = entries.findIndex(e => e.id === entry.id && e.type === entry.type);
83
+ console.log(entry);
84
+ }
85
+
86
+ $: if (value === null) value = "";
87
+
88
+ // When the value changes, dispatch the change event via handle_change()
89
+ // See the docs for an explanation: https://svelte.dev/docs/svelte-components#script-3-$-marks-a-statement-as-reactive
90
+ $: value, handle_change();
91
+
92
+ async function performSearch() {
93
+ const input = value.trim();
94
+ if (input !== lastQuery) {
95
+ const res = await fetchResults(input);
96
+ if (res.isError) {
97
+ if (!res.aborted) {
98
+ console.error(`QuickSearch Error: ${res.error}`);
99
+ }
100
+ return;
101
+ }
102
+
103
+ const resEntries = getResultEntries(res.payload as QuickSearchResults);
104
+ entries = [
105
+ ...resEntries,
106
+ ];
107
+ console.log(entries);
108
+ numResults = resEntries.length;
109
+ lastQuery = input;
110
+ }
111
+ }
112
+
113
+ async function fetchResults(input: string = "") {
114
+ searchController.abort(); /// Cancel previous function call if exists
115
+ searchController = new AbortController();
116
+
117
+ const res = await httpGet<QuickSearchResults>(
118
+ url +
119
+ queryString({
120
+ q: input,
121
+ type: ["model", "org", "user"],
122
+ }),
123
+ { signal: searchController.signal }
124
+ );
125
+
126
+ return res;
127
+ }
128
+
129
+ function getResultEntries(results: QuickSearchResults | null): Entry[] {
130
+ const modelEntries: Entry[] = results.models.map(m => ({
131
+ href: undefined,
132
+ id: m.id,
133
+ _id: m._id,
134
+ label: m.id,
135
+ type: "model",
136
+ }));
137
+
138
+ const orgEntries: Entry[] = results.orgs.map(o => ({
139
+ href: undefined,
140
+ id: o.name,
141
+ _id: o._id,
142
+ imgUrl: o.avatarUrl,
143
+ label: o.fullname,
144
+ type: "org",
145
+ }));
146
+
147
+ const userEntries: Entry[] = results.users.map(u => ({
148
+ href: undefined,
149
+ id: u.user,
150
+ _id: u._id,
151
+ imgUrl: u.avatarUrl.startsWith("/") ? `https://huggingface.co${u.avatarUrl}` : u.avatarUrl,
152
+ label: u.user,
153
+ type: "user",
154
+ description: u.fullname,
155
+ }));
156
+
157
+ return [
158
+ ...modelEntries,
159
+ ...orgEntries,
160
+ ...userEntries,
161
+ ];
162
+ }
163
+ </script>
164
+
165
+ <Block
166
+ {visible}
167
+ {elem_id}
168
+ {elem_classes}
169
+ {scale}
170
+ {min_width}
171
+ allow_overflow={false}
172
+ padding={true}
173
+ >
174
+ {#if loading_status}
175
+ <StatusTracker
176
+ autoscroll={gradio.autoscroll}
177
+ i18n={gradio.i18n}
178
+ {...loading_status}
179
+ />
180
+ {/if}
181
+
182
+ <label class:container>
183
+ <BlockTitle {show_label} info={undefined}>{label}</BlockTitle>
184
+
185
+ <input
186
+ data-testid="textbox"
187
+ type="text"
188
+ class="scroll-hide"
189
+ bind:value
190
+ bind:this={el}
191
+ {placeholder}
192
+ disabled={!interactive}
193
+ dir={rtl ? "rtl" : "ltr"}
194
+ on:focus={handleFocus}
195
+ on:keypress={handle_keypress}
196
+ on:input={handleInput}
197
+ />
198
+ {#if isOpen}
199
+ <div class="{position} z-40 w-full md:min-w-[24rem]">
200
+ <ul
201
+ class="mt-1 max-h-[calc(100vh-100px)] w-full divide-y divide-gray-100 overflow-hidden overflow-y-auto rounded-lg border border-gray-100 bg-white text-sm shadow-lg dark:divide-gray-900"
202
+ >
203
+ {#if !numResults}
204
+ <QuickSearchEntry
205
+ entry={{
206
+ id: "no-result",
207
+ label: "No results found :(",
208
+ type: "no-results",
209
+ }}
210
+ isSelected={false}
211
+ onClick={() => {}}
212
+ />
213
+ {/if}
214
+
215
+ {#if entries.some(x => x.type === "model")}
216
+ {#each entries.filter(x => ["model", "all-models"].includes(x.type)) as entry}
217
+ <li>
218
+ <QuickSearchEntry {entry} isSelected={isSelected(selectedEntryIdx, entry)} onClick={handleClickEntry} />
219
+ </li>
220
+ {/each}
221
+ {/if}
222
+
223
+ {#if entries.some(x => x.type === "org")}
224
+ {#each entries.filter(x => x.type === "org") as entry}
225
+ <li>
226
+ <QuickSearchEntry {entry} isSelected={isSelected(selectedEntryIdx, entry)} onClick={handleClickEntry} />
227
+ </li>
228
+ {/each}
229
+ {/if}
230
+
231
+ {#if entries.some(x => x.type === "user")}
232
+ {#each entries.filter(x => x.type === "user") as entry}
233
+ <li>
234
+ <QuickSearchEntry {entry} isSelected={isSelected(selectedEntryIdx, entry)} onClick={handleClickEntry} />
235
+ </li>
236
+ {/each}
237
+ {/if}
238
+ </ul>
239
+ </div>
240
+ {/if}
241
+ </label>
242
+ </Block>
243
+
244
+ <style>
245
+ label {
246
+ display: block;
247
+ width: 100%;
248
+ }
249
+
250
+ input {
251
+ display: block;
252
+ position: relative;
253
+ outline: none !important;
254
+ box-shadow: var(--input-shadow);
255
+ background: var(--input-background-fill);
256
+ padding: var(--input-padding);
257
+ width: 100%;
258
+ color: var(--body-text-color);
259
+ font-weight: var(--input-text-weight);
260
+ font-size: var(--input-text-size);
261
+ line-height: var(--line-sm);
262
+ border: none;
263
+ }
264
+ .container > input {
265
+ border: var(--input-border-width) solid var(--input-border-color);
266
+ border-radius: var(--input-radius);
267
+ }
268
+ input:disabled {
269
+ -webkit-text-fill-color: var(--body-text-color);
270
+ -webkit-opacity: 1;
271
+ opacity: 1;
272
+ }
273
+
274
+ input:focus {
275
+ box-shadow: var(--input-shadow-focus);
276
+ border-color: var(--input-border-color-focus);
277
+ }
278
+
279
+ input::placeholder {
280
+ color: var(--input-placeholder-color);
281
+ }
282
+ </style>
src/frontend/QuickSearchEntry/QuickSearchEntry.svelte ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ import type { Entry } from "./Types";
3
+
4
+ import AuthorAvatar from "../AuthorAvatar/AuthorAvatar.svelte";
5
+ import IconArrowRight from "../Icons/IconArrowRight.svelte";
6
+
7
+ export let entry: Entry;
8
+ export let isSelected: boolean;
9
+ export let onClick: (entry: Entry) => void;
10
+ </script>
11
+
12
+ <a
13
+ class="flex h-8 cursor-pointer items-center px-2
14
+ {['dataset', 'model', 'no-results', 'space'].includes(entry.type) ? 'font-mono text-xs' : ''}
15
+ {['all-datasets', 'all-models', 'all-spaces'].includes(entry.type) && !isSelected ? 'text-gray-400' : ''}
16
+ {isSelected ? 'bg-blue-500 text-white dark:bg-blue-700' : 'hover:bg-gray-50 dark:hover:bg-gray-900'}"
17
+ href={entry.href}
18
+ on:click|stopPropagation={() => onClick(entry)}
19
+ >
20
+ {#if ["all-datasets", "all-models", "all-spaces"].includes(entry.type)}
21
+ <IconArrowRight classNames="flex-none mr-1 h-3 w-3" />
22
+ {:else if ["org", "user"].includes(entry.type) && entry.imgUrl}
23
+ <AuthorAvatar
24
+ author={{
25
+ avatarUrl: entry.imgUrl,
26
+ type: entry.type === "user" ? "user" : "org",
27
+ }}
28
+ classNames="mr-1.5"
29
+ />
30
+ {:else if entry.type === "full-text-search"}
31
+ <span
32
+ class="mr-1.5 rounded px-1 text-xs leading-tight {isSelected
33
+ ? 'bg-white/10 text-white'
34
+ : 'bg-blue-500/10 text-blue-700 dark:text-blue-200'}">new</span
35
+ >
36
+ {/if}
37
+ <span
38
+ class="flex-shrink-0 truncate
39
+ {entry.type === 'model' && !isSelected
40
+ ? 'rounded bg-gradient-to-b from-gray-50 to-gray-100 px-1 dark:from-gray-925 dark:to-gray-950'
41
+ : 'px-1'}"
42
+ >
43
+ {entry.label}
44
+ </span>
45
+ {#if entry.description}
46
+ <span class="pl-0.5 pr-1.5 text-gray-300">·</span>
47
+ <span class="mr-2 truncate {isSelected ? 'text-white' : 'text-gray-400'}">{entry.description}</span>
48
+ {/if}
49
+ {#if entry.type === "full-text-search"}
50
+ <IconArrowRight classNames="flex-none ml-auto h-3.5 w-3.5" />
51
+ {/if}
52
+ </a>
src/frontend/QuickSearchEntry/Types.ts ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export type EntryType =
2
+ | "dataset"
3
+ | "all-datasets"
4
+ | "model"
5
+ | "all-models"
6
+ | "space"
7
+ | "all-spaces"
8
+ | "org"
9
+ | "user"
10
+ | "no-results"
11
+ | "paper"
12
+ | "collection"
13
+ | "full-text-search";
14
+
15
+ export interface Entry {
16
+ href?: string;
17
+ id: string;
18
+ _id?: string;
19
+ imgUrl?: string;
20
+ label: string;
21
+ description?: string;
22
+ type: EntryType;
23
+ }
src/frontend/Types.ts ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export type QuickSearchType = "model" | "dataset" | "space" | "org" | "user" | "paper" | "collection";
2
+
3
+ export type OrgFilter = "own" | "unwatched";
4
+ export type RepoFilter = "skip_disabled" | "skip_gated" | "own" | "own_orgs";
5
+
6
+ export interface QuickSearchRepoResult {
7
+ _id: string;
8
+ id: string;
9
+ }
10
+ export type QuickSearchDatasetResult = QuickSearchRepoResult;
11
+ export type QuickSearchModelResult = QuickSearchRepoResult;
12
+ export type QuickSearchSpaceResult = QuickSearchRepoResult;
13
+ export type QuickSearchPaperResult = QuickSearchRepoResult;
14
+
15
+ export interface QuickSearchOrgResult {
16
+ _id: string;
17
+ avatarUrl: string;
18
+ fullname: string;
19
+ name: string;
20
+ }
21
+
22
+ export interface QuickSearchUserResult {
23
+ _id: string;
24
+ avatarUrl: string;
25
+ fullname: string;
26
+ user: string;
27
+ }
28
+
29
+ export interface QuickSearchCollectionResult {
30
+ _id: string;
31
+ title: string;
32
+ description?: string;
33
+ }
34
+
35
+ export interface QuickSearchResults {
36
+ datasets: QuickSearchDatasetResult[];
37
+ datasetsCount: number;
38
+ models: QuickSearchModelResult[];
39
+ modelsCount: number;
40
+ orgs: QuickSearchOrgResult[];
41
+ q: string;
42
+ spaces: QuickSearchSpaceResult[];
43
+ spacesCount: number;
44
+ users: QuickSearchUserResult[];
45
+ papers: QuickSearchPaperResult[];
46
+ papersCount: number;
47
+ collections: QuickSearchCollectionResult[];
48
+ collectionsCount: number;
49
+ }
src/frontend/lib/ViewUtils.ts ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import type { JsonValue } from "type-fest";
2
+
3
+
4
+ export type QueryParams = Record<string, string | number | boolean | undefined | string[]>;
5
+
6
+ /**
7
+ * Create a query string ("?param=value") from an object {[key]: value}.
8
+ * Undefined valued are ignored, and an empty string is returned if all values are undefined.
9
+ */
10
+ export function queryString(params: QueryParams): string {
11
+ const searchParams = new URLSearchParams();
12
+ for (const [key, value] of Object.entries(params)) {
13
+ if (value !== undefined) {
14
+ if (Array.isArray(value)) {
15
+ for (const val of value) {
16
+ searchParams.append(key, String(val));
17
+ }
18
+ } else {
19
+ searchParams.set(key, String(value));
20
+ }
21
+ }
22
+ }
23
+
24
+ const searchParamsStr = searchParams.toString();
25
+ return searchParamsStr ? `?${searchParamsStr}` : "";
26
+ }
27
+
28
+ interface HttpResponseBase<T> {
29
+ /** set to true if the call was aborted by the User */
30
+ aborted?: boolean;
31
+ /** set to true if the call resulted in an error */
32
+ isError: boolean;
33
+ /** the parsed server response, whether the call ended up in an error or not */
34
+ payload: T;
35
+ /** a clone of the raw Response object returned by fetch, in case it is needed for some edge cases */
36
+ rawResponse: Response | undefined;
37
+ /** the request status code */
38
+ statusCode: number;
39
+ /** Parsed links in Link header */
40
+ links?: Record<string, string>;
41
+ }
42
+
43
+ interface HttpResponseError<T> extends HttpResponseBase<T> {
44
+ aborted: boolean;
45
+ error: string;
46
+ isError: true;
47
+ }
48
+ interface HttpResponseSuccess<T> extends HttpResponseBase<T> {
49
+ isError: false;
50
+ payload: T;
51
+ }
52
+
53
+ export type HttpResponse<SuccessType, ErrorType = unknown> =
54
+ | HttpResponseSuccess<SuccessType>
55
+ | HttpResponseError<ErrorType>;
56
+
57
+
58
+ export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
59
+ type ResponseType = "blob" | "json" | "text";
60
+
61
+ interface SendOptions<D> {
62
+ /** the data sent to the server */
63
+ data?: D;
64
+ /** the request headers */
65
+ headers?: Record<string, string>;
66
+ /**
67
+ * determines how the server response will be parsed (as JSON, text, or a blob)
68
+ * @default "json"
69
+ */
70
+ responseType?: ResponseType;
71
+ /**
72
+ * The AbortSignal interface represents a signal object that allows you to communicate with a
73
+ * DOM request (such as a fetch request) and abort it if required via an AbortController object.
74
+ * read more at: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
75
+ */
76
+ signal?: AbortSignal;
77
+ credentials?: RequestCredentials;
78
+ }
79
+
80
+
81
+ async function getResponseContent(res: Response, type?: ResponseType): Promise<Blob | JsonValue | undefined> {
82
+ try {
83
+ if (res.headers.get("content-type")?.includes("json")) {
84
+ return (await res.json()) as JsonValue;
85
+ }
86
+ if (type === "blob") {
87
+ return await res.blob();
88
+ }
89
+ return await res.text();
90
+ } catch (err) {
91
+ return undefined;
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Handle fetch calls, parse the server response, capture every possible error,
97
+ * and returns standardized {@link HttpResponse} objects in every scenario
98
+ */
99
+ export async function httpSend<T, D = Record<string, unknown> | File>(
100
+ method: HttpMethod,
101
+ path: string,
102
+ sendOptions: SendOptions<D> = {}
103
+ ): Promise<HttpResponse<T>> {
104
+ try {
105
+ const headers = {
106
+ ...sendOptions.headers,
107
+ ...(sendOptions.responseType === "json"
108
+ ? { Accept: "application/json" }
109
+ : sendOptions.responseType === "text"
110
+ ? { Accept: "text/plain" }
111
+ : {}),
112
+ };
113
+ const res = await fetch(path, {
114
+ body:
115
+ sendOptions.data instanceof File
116
+ ? sendOptions.data
117
+ : sendOptions.data
118
+ ? JSON.stringify(sendOptions.data)
119
+ : undefined,
120
+ headers,
121
+ method,
122
+ ...(sendOptions.signal ? { signal: sendOptions.signal } : {}),
123
+ ...(sendOptions.credentials ? { credentials: sendOptions.credentials } : {}),
124
+ });
125
+
126
+ const rawResponse = res.clone();
127
+
128
+ if (!res.ok) {
129
+ let error = `${res.status} ${res.statusText}`;
130
+
131
+ const payload = await getResponseContent(res);
132
+ // In case we get a detailed JSON error message from the backend - which we should in any of the following cases:
133
+ // - When hitting /api/... endpoints
134
+ // - When using header X-Requested-With: XMLHttpRequest
135
+ // - When using header Content-Type: application/json
136
+ if (typeof payload === "object" && payload) {
137
+ if ("message" in payload && typeof payload.message === "string") {
138
+ error = payload.message;
139
+ } else if ("error" in payload && typeof payload.error === "string") {
140
+ error = payload.error;
141
+ }
142
+ }
143
+
144
+ return {
145
+ aborted: false,
146
+ error,
147
+ isError: true,
148
+ payload,
149
+ rawResponse,
150
+ statusCode: res.status,
151
+ };
152
+ }
153
+
154
+ const payload = await getResponseContent(res, sendOptions.responseType);
155
+ const links = res.headers.get("Link") ? parseLinkHeader(res.headers.get("Link")!) : undefined;
156
+ return payload !== undefined
157
+ ? {
158
+ isError: false,
159
+ payload: payload as T,
160
+ rawResponse,
161
+ statusCode: res.status,
162
+ links,
163
+ }
164
+ : {
165
+ aborted: false,
166
+ error: sendOptions.responseType === "json" ? "Error parsing JSON" : "Error parsing server response",
167
+ isError: true,
168
+ payload,
169
+ rawResponse,
170
+ statusCode: res.status,
171
+ links,
172
+ };
173
+ } catch (e) {
174
+ return {
175
+ aborted: e instanceof DOMException && e.name === "AbortError",
176
+ error: (e instanceof TypeError || e instanceof DOMException) && e.message ? e.message : "Failed to fetch",
177
+ isError: true,
178
+ payload: undefined,
179
+ rawResponse: undefined,
180
+ statusCode: 0,
181
+ };
182
+ }
183
+ }
184
+
185
+ type GetOptions = Omit<SendOptions<unknown>, "data">;
186
+
187
+ /**
188
+ * Helper function to easily and safely make GET calls
189
+ */
190
+ export function httpGet<T>(path: string, opts: GetOptions = {}): Promise<HttpResponse<T>> {
191
+ return httpSend<T>("GET", path, { ...opts });
192
+ }
193
+
194
+ export function parseLinkHeader(header: string): Record<string, string> {
195
+ const regex = /<(https?:[/][/][^>]+)>;\s+rel="([^"]+)"/g;
196
+
197
+ return Object.fromEntries([...header.matchAll(regex)].map(([_, url, rel]) => [rel, url]));
198
+ }
199
+
200
+
201
+ /// A not-that-great throttling function
202
+ export function throttle<T extends unknown[]>(callback: (...rest: T) => unknown, limit: number): (...rest: T) => void {
203
+ let last: number;
204
+ /// setTimeout can return different types on browser or node
205
+ let deferTimer: ReturnType<typeof setTimeout>;
206
+
207
+ return function (...rest) {
208
+ const now = Date.now();
209
+ if (last && now < last + limit) {
210
+ clearTimeout(deferTimer);
211
+ deferTimer = setTimeout(function () {
212
+ last = now;
213
+ callback(...rest);
214
+ }, limit);
215
+ } else {
216
+ last = now;
217
+ callback(...rest);
218
+ }
219
+ };
220
+ }
src/frontend/package-lock.json ADDED
@@ -0,0 +1,966 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "gradio_hubquicksearch",
3
+ "version": "0.1.13",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "gradio_hubquicksearch",
9
+ "version": "0.1.13",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "@gradio/atoms": "0.6.1",
13
+ "@gradio/icons": "0.3.4",
14
+ "@gradio/statustracker": "0.4.10",
15
+ "@gradio/utils": "0.3.0"
16
+ },
17
+ "devDependencies": {
18
+ "type-fest": "^4.15.0"
19
+ }
20
+ },
21
+ "node_modules/@ampproject/remapping": {
22
+ "version": "2.3.0",
23
+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",
24
+ "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==",
25
+ "peer": true,
26
+ "dependencies": {
27
+ "@jridgewell/gen-mapping": "^0.3.5",
28
+ "@jridgewell/trace-mapping": "^0.3.24"
29
+ },
30
+ "engines": {
31
+ "node": ">=6.0.0"
32
+ }
33
+ },
34
+ "node_modules/@esbuild/aix-ppc64": {
35
+ "version": "0.19.12",
36
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz",
37
+ "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==",
38
+ "cpu": [
39
+ "ppc64"
40
+ ],
41
+ "optional": true,
42
+ "os": [
43
+ "aix"
44
+ ],
45
+ "engines": {
46
+ "node": ">=12"
47
+ }
48
+ },
49
+ "node_modules/@esbuild/android-arm": {
50
+ "version": "0.19.12",
51
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz",
52
+ "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==",
53
+ "cpu": [
54
+ "arm"
55
+ ],
56
+ "optional": true,
57
+ "os": [
58
+ "android"
59
+ ],
60
+ "engines": {
61
+ "node": ">=12"
62
+ }
63
+ },
64
+ "node_modules/@esbuild/android-arm64": {
65
+ "version": "0.19.12",
66
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz",
67
+ "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==",
68
+ "cpu": [
69
+ "arm64"
70
+ ],
71
+ "optional": true,
72
+ "os": [
73
+ "android"
74
+ ],
75
+ "engines": {
76
+ "node": ">=12"
77
+ }
78
+ },
79
+ "node_modules/@esbuild/android-x64": {
80
+ "version": "0.19.12",
81
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz",
82
+ "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==",
83
+ "cpu": [
84
+ "x64"
85
+ ],
86
+ "optional": true,
87
+ "os": [
88
+ "android"
89
+ ],
90
+ "engines": {
91
+ "node": ">=12"
92
+ }
93
+ },
94
+ "node_modules/@esbuild/darwin-arm64": {
95
+ "version": "0.19.12",
96
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz",
97
+ "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==",
98
+ "cpu": [
99
+ "arm64"
100
+ ],
101
+ "optional": true,
102
+ "os": [
103
+ "darwin"
104
+ ],
105
+ "engines": {
106
+ "node": ">=12"
107
+ }
108
+ },
109
+ "node_modules/@esbuild/darwin-x64": {
110
+ "version": "0.19.12",
111
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz",
112
+ "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==",
113
+ "cpu": [
114
+ "x64"
115
+ ],
116
+ "optional": true,
117
+ "os": [
118
+ "darwin"
119
+ ],
120
+ "engines": {
121
+ "node": ">=12"
122
+ }
123
+ },
124
+ "node_modules/@esbuild/freebsd-arm64": {
125
+ "version": "0.19.12",
126
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz",
127
+ "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==",
128
+ "cpu": [
129
+ "arm64"
130
+ ],
131
+ "optional": true,
132
+ "os": [
133
+ "freebsd"
134
+ ],
135
+ "engines": {
136
+ "node": ">=12"
137
+ }
138
+ },
139
+ "node_modules/@esbuild/freebsd-x64": {
140
+ "version": "0.19.12",
141
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz",
142
+ "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==",
143
+ "cpu": [
144
+ "x64"
145
+ ],
146
+ "optional": true,
147
+ "os": [
148
+ "freebsd"
149
+ ],
150
+ "engines": {
151
+ "node": ">=12"
152
+ }
153
+ },
154
+ "node_modules/@esbuild/linux-arm": {
155
+ "version": "0.19.12",
156
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz",
157
+ "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==",
158
+ "cpu": [
159
+ "arm"
160
+ ],
161
+ "optional": true,
162
+ "os": [
163
+ "linux"
164
+ ],
165
+ "engines": {
166
+ "node": ">=12"
167
+ }
168
+ },
169
+ "node_modules/@esbuild/linux-arm64": {
170
+ "version": "0.19.12",
171
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz",
172
+ "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==",
173
+ "cpu": [
174
+ "arm64"
175
+ ],
176
+ "optional": true,
177
+ "os": [
178
+ "linux"
179
+ ],
180
+ "engines": {
181
+ "node": ">=12"
182
+ }
183
+ },
184
+ "node_modules/@esbuild/linux-ia32": {
185
+ "version": "0.19.12",
186
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz",
187
+ "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==",
188
+ "cpu": [
189
+ "ia32"
190
+ ],
191
+ "optional": true,
192
+ "os": [
193
+ "linux"
194
+ ],
195
+ "engines": {
196
+ "node": ">=12"
197
+ }
198
+ },
199
+ "node_modules/@esbuild/linux-loong64": {
200
+ "version": "0.19.12",
201
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz",
202
+ "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==",
203
+ "cpu": [
204
+ "loong64"
205
+ ],
206
+ "optional": true,
207
+ "os": [
208
+ "linux"
209
+ ],
210
+ "engines": {
211
+ "node": ">=12"
212
+ }
213
+ },
214
+ "node_modules/@esbuild/linux-mips64el": {
215
+ "version": "0.19.12",
216
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz",
217
+ "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==",
218
+ "cpu": [
219
+ "mips64el"
220
+ ],
221
+ "optional": true,
222
+ "os": [
223
+ "linux"
224
+ ],
225
+ "engines": {
226
+ "node": ">=12"
227
+ }
228
+ },
229
+ "node_modules/@esbuild/linux-ppc64": {
230
+ "version": "0.19.12",
231
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz",
232
+ "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==",
233
+ "cpu": [
234
+ "ppc64"
235
+ ],
236
+ "optional": true,
237
+ "os": [
238
+ "linux"
239
+ ],
240
+ "engines": {
241
+ "node": ">=12"
242
+ }
243
+ },
244
+ "node_modules/@esbuild/linux-riscv64": {
245
+ "version": "0.19.12",
246
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz",
247
+ "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==",
248
+ "cpu": [
249
+ "riscv64"
250
+ ],
251
+ "optional": true,
252
+ "os": [
253
+ "linux"
254
+ ],
255
+ "engines": {
256
+ "node": ">=12"
257
+ }
258
+ },
259
+ "node_modules/@esbuild/linux-s390x": {
260
+ "version": "0.19.12",
261
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz",
262
+ "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==",
263
+ "cpu": [
264
+ "s390x"
265
+ ],
266
+ "optional": true,
267
+ "os": [
268
+ "linux"
269
+ ],
270
+ "engines": {
271
+ "node": ">=12"
272
+ }
273
+ },
274
+ "node_modules/@esbuild/linux-x64": {
275
+ "version": "0.19.12",
276
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz",
277
+ "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==",
278
+ "cpu": [
279
+ "x64"
280
+ ],
281
+ "optional": true,
282
+ "os": [
283
+ "linux"
284
+ ],
285
+ "engines": {
286
+ "node": ">=12"
287
+ }
288
+ },
289
+ "node_modules/@esbuild/netbsd-x64": {
290
+ "version": "0.19.12",
291
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz",
292
+ "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==",
293
+ "cpu": [
294
+ "x64"
295
+ ],
296
+ "optional": true,
297
+ "os": [
298
+ "netbsd"
299
+ ],
300
+ "engines": {
301
+ "node": ">=12"
302
+ }
303
+ },
304
+ "node_modules/@esbuild/openbsd-x64": {
305
+ "version": "0.19.12",
306
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz",
307
+ "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==",
308
+ "cpu": [
309
+ "x64"
310
+ ],
311
+ "optional": true,
312
+ "os": [
313
+ "openbsd"
314
+ ],
315
+ "engines": {
316
+ "node": ">=12"
317
+ }
318
+ },
319
+ "node_modules/@esbuild/sunos-x64": {
320
+ "version": "0.19.12",
321
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz",
322
+ "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==",
323
+ "cpu": [
324
+ "x64"
325
+ ],
326
+ "optional": true,
327
+ "os": [
328
+ "sunos"
329
+ ],
330
+ "engines": {
331
+ "node": ">=12"
332
+ }
333
+ },
334
+ "node_modules/@esbuild/win32-arm64": {
335
+ "version": "0.19.12",
336
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz",
337
+ "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==",
338
+ "cpu": [
339
+ "arm64"
340
+ ],
341
+ "optional": true,
342
+ "os": [
343
+ "win32"
344
+ ],
345
+ "engines": {
346
+ "node": ">=12"
347
+ }
348
+ },
349
+ "node_modules/@esbuild/win32-ia32": {
350
+ "version": "0.19.12",
351
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz",
352
+ "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==",
353
+ "cpu": [
354
+ "ia32"
355
+ ],
356
+ "optional": true,
357
+ "os": [
358
+ "win32"
359
+ ],
360
+ "engines": {
361
+ "node": ">=12"
362
+ }
363
+ },
364
+ "node_modules/@esbuild/win32-x64": {
365
+ "version": "0.19.12",
366
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz",
367
+ "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==",
368
+ "cpu": [
369
+ "x64"
370
+ ],
371
+ "optional": true,
372
+ "os": [
373
+ "win32"
374
+ ],
375
+ "engines": {
376
+ "node": ">=12"
377
+ }
378
+ },
379
+ "node_modules/@formatjs/ecma402-abstract": {
380
+ "version": "1.11.4",
381
+ "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz",
382
+ "integrity": "sha512-EBikYFp2JCdIfGEb5G9dyCkTGDmC57KSHhRQOC3aYxoPWVZvfWCDjZwkGYHN7Lis/fmuWl906bnNTJifDQ3sXw==",
383
+ "dependencies": {
384
+ "@formatjs/intl-localematcher": "0.2.25",
385
+ "tslib": "^2.1.0"
386
+ }
387
+ },
388
+ "node_modules/@formatjs/fast-memoize": {
389
+ "version": "1.2.1",
390
+ "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-1.2.1.tgz",
391
+ "integrity": "sha512-Rg0e76nomkz3vF9IPlKeV+Qynok0r7YZjL6syLz4/urSg0IbjPZCB/iYUMNsYA643gh4mgrX3T7KEIFIxJBQeg==",
392
+ "dependencies": {
393
+ "tslib": "^2.1.0"
394
+ }
395
+ },
396
+ "node_modules/@formatjs/icu-messageformat-parser": {
397
+ "version": "2.1.0",
398
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.0.tgz",
399
+ "integrity": "sha512-Qxv/lmCN6hKpBSss2uQ8IROVnta2r9jd3ymUEIjm2UyIkUCHVcbUVRGL/KS/wv7876edvsPe+hjHVJ4z8YuVaw==",
400
+ "dependencies": {
401
+ "@formatjs/ecma402-abstract": "1.11.4",
402
+ "@formatjs/icu-skeleton-parser": "1.3.6",
403
+ "tslib": "^2.1.0"
404
+ }
405
+ },
406
+ "node_modules/@formatjs/icu-skeleton-parser": {
407
+ "version": "1.3.6",
408
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.6.tgz",
409
+ "integrity": "sha512-I96mOxvml/YLrwU2Txnd4klA7V8fRhb6JG/4hm3VMNmeJo1F03IpV2L3wWt7EweqNLES59SZ4d6hVOPCSf80Bg==",
410
+ "dependencies": {
411
+ "@formatjs/ecma402-abstract": "1.11.4",
412
+ "tslib": "^2.1.0"
413
+ }
414
+ },
415
+ "node_modules/@formatjs/intl-localematcher": {
416
+ "version": "0.2.25",
417
+ "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.25.tgz",
418
+ "integrity": "sha512-YmLcX70BxoSopLFdLr1Ds99NdlTI2oWoLbaUW2M406lxOIPzE1KQhRz2fPUkq34xVZQaihCoU29h0KK7An3bhA==",
419
+ "dependencies": {
420
+ "tslib": "^2.1.0"
421
+ }
422
+ },
423
+ "node_modules/@gradio/atoms": {
424
+ "version": "0.6.1",
425
+ "resolved": "https://registry.npmjs.org/@gradio/atoms/-/atoms-0.6.1.tgz",
426
+ "integrity": "sha512-u7+cleKA0Et6AhEq5xTiaGIAYPR2He7/JSYcM3Sg+vkFOXhbJTPUnHLub+y9HiseheEmnZDGddFBr+RL5Jaxbg==",
427
+ "dependencies": {
428
+ "@gradio/icons": "^0.3.4",
429
+ "@gradio/utils": "^0.3.0"
430
+ }
431
+ },
432
+ "node_modules/@gradio/column": {
433
+ "version": "0.1.0",
434
+ "resolved": "https://registry.npmjs.org/@gradio/column/-/column-0.1.0.tgz",
435
+ "integrity": "sha512-P24nqqVnMXBaDA1f/zSN5HZRho4PxP8Dq+7VltPHlmxIEiZYik2AJ4J0LeuIha34FDO0guu/16evdrpvGIUAfw=="
436
+ },
437
+ "node_modules/@gradio/icons": {
438
+ "version": "0.3.4",
439
+ "resolved": "https://registry.npmjs.org/@gradio/icons/-/icons-0.3.4.tgz",
440
+ "integrity": "sha512-rtH7u3OiYy9UuO1bnebXkTXgc+D62H6BILrMtM4EfsKGgQQICD0n7NPvbPtS0zpi/fz0ppCdlfFIKKIOeVaeFg=="
441
+ },
442
+ "node_modules/@gradio/statustracker": {
443
+ "version": "0.4.10",
444
+ "resolved": "https://registry.npmjs.org/@gradio/statustracker/-/statustracker-0.4.10.tgz",
445
+ "integrity": "sha512-1uM30C6L/E26czWZE+a8w1Y5g4FuVkfR59ZxhfL6KfWyERJmhlA8iFWrCCrS4uPZ6wFDXDsY6Im8jqL15uqPzg==",
446
+ "dependencies": {
447
+ "@gradio/atoms": "^0.6.1",
448
+ "@gradio/column": "^0.1.0",
449
+ "@gradio/icons": "^0.3.4",
450
+ "@gradio/utils": "^0.3.0"
451
+ }
452
+ },
453
+ "node_modules/@gradio/theme": {
454
+ "version": "0.2.0",
455
+ "resolved": "https://registry.npmjs.org/@gradio/theme/-/theme-0.2.0.tgz",
456
+ "integrity": "sha512-33c68Nk7oRXLn08OxPfjcPm7S4tXGOUV1I1bVgzdM2YV5o1QBOS1GEnXPZPu/CEYPePLMB6bsDwffrLEyLGWVQ=="
457
+ },
458
+ "node_modules/@gradio/utils": {
459
+ "version": "0.3.0",
460
+ "resolved": "https://registry.npmjs.org/@gradio/utils/-/utils-0.3.0.tgz",
461
+ "integrity": "sha512-VxP0h7UoWazkdSB875ChvTXWamBwMguuRc+8OyQFZjdj14lcqLEQuj54es3FDBpXOp5GMLFh48Q5FLLjYxMgSg==",
462
+ "dependencies": {
463
+ "@gradio/theme": "^0.2.0",
464
+ "svelte-i18n": "^3.6.0"
465
+ }
466
+ },
467
+ "node_modules/@jridgewell/gen-mapping": {
468
+ "version": "0.3.5",
469
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
470
+ "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
471
+ "peer": true,
472
+ "dependencies": {
473
+ "@jridgewell/set-array": "^1.2.1",
474
+ "@jridgewell/sourcemap-codec": "^1.4.10",
475
+ "@jridgewell/trace-mapping": "^0.3.24"
476
+ },
477
+ "engines": {
478
+ "node": ">=6.0.0"
479
+ }
480
+ },
481
+ "node_modules/@jridgewell/resolve-uri": {
482
+ "version": "3.1.2",
483
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
484
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
485
+ "peer": true,
486
+ "engines": {
487
+ "node": ">=6.0.0"
488
+ }
489
+ },
490
+ "node_modules/@jridgewell/set-array": {
491
+ "version": "1.2.1",
492
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
493
+ "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
494
+ "peer": true,
495
+ "engines": {
496
+ "node": ">=6.0.0"
497
+ }
498
+ },
499
+ "node_modules/@jridgewell/sourcemap-codec": {
500
+ "version": "1.4.15",
501
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
502
+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
503
+ "peer": true
504
+ },
505
+ "node_modules/@jridgewell/trace-mapping": {
506
+ "version": "0.3.25",
507
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
508
+ "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
509
+ "peer": true,
510
+ "dependencies": {
511
+ "@jridgewell/resolve-uri": "^3.1.0",
512
+ "@jridgewell/sourcemap-codec": "^1.4.14"
513
+ }
514
+ },
515
+ "node_modules/@types/estree": {
516
+ "version": "1.0.5",
517
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
518
+ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
519
+ "peer": true
520
+ },
521
+ "node_modules/acorn": {
522
+ "version": "8.11.3",
523
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
524
+ "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
525
+ "peer": true,
526
+ "bin": {
527
+ "acorn": "bin/acorn"
528
+ },
529
+ "engines": {
530
+ "node": ">=0.4.0"
531
+ }
532
+ },
533
+ "node_modules/aria-query": {
534
+ "version": "5.3.0",
535
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
536
+ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
537
+ "peer": true,
538
+ "dependencies": {
539
+ "dequal": "^2.0.3"
540
+ }
541
+ },
542
+ "node_modules/axobject-query": {
543
+ "version": "4.0.0",
544
+ "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.0.0.tgz",
545
+ "integrity": "sha512-+60uv1hiVFhHZeO+Lz0RYzsVHy5Wr1ayX0mwda9KPDVLNJgZ1T9Ny7VmFbLDzxsH0D87I86vgj3gFrjTJUYznw==",
546
+ "peer": true,
547
+ "dependencies": {
548
+ "dequal": "^2.0.3"
549
+ }
550
+ },
551
+ "node_modules/cli-color": {
552
+ "version": "2.0.4",
553
+ "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.4.tgz",
554
+ "integrity": "sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==",
555
+ "dependencies": {
556
+ "d": "^1.0.1",
557
+ "es5-ext": "^0.10.64",
558
+ "es6-iterator": "^2.0.3",
559
+ "memoizee": "^0.4.15",
560
+ "timers-ext": "^0.1.7"
561
+ },
562
+ "engines": {
563
+ "node": ">=0.10"
564
+ }
565
+ },
566
+ "node_modules/code-red": {
567
+ "version": "1.0.4",
568
+ "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz",
569
+ "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==",
570
+ "peer": true,
571
+ "dependencies": {
572
+ "@jridgewell/sourcemap-codec": "^1.4.15",
573
+ "@types/estree": "^1.0.1",
574
+ "acorn": "^8.10.0",
575
+ "estree-walker": "^3.0.3",
576
+ "periscopic": "^3.1.0"
577
+ }
578
+ },
579
+ "node_modules/css-tree": {
580
+ "version": "2.3.1",
581
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
582
+ "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
583
+ "peer": true,
584
+ "dependencies": {
585
+ "mdn-data": "2.0.30",
586
+ "source-map-js": "^1.0.1"
587
+ },
588
+ "engines": {
589
+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
590
+ }
591
+ },
592
+ "node_modules/d": {
593
+ "version": "1.0.2",
594
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz",
595
+ "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==",
596
+ "dependencies": {
597
+ "es5-ext": "^0.10.64",
598
+ "type": "^2.7.2"
599
+ },
600
+ "engines": {
601
+ "node": ">=0.12"
602
+ }
603
+ },
604
+ "node_modules/deepmerge": {
605
+ "version": "4.3.1",
606
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
607
+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
608
+ "engines": {
609
+ "node": ">=0.10.0"
610
+ }
611
+ },
612
+ "node_modules/dequal": {
613
+ "version": "2.0.3",
614
+ "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
615
+ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
616
+ "peer": true,
617
+ "engines": {
618
+ "node": ">=6"
619
+ }
620
+ },
621
+ "node_modules/es5-ext": {
622
+ "version": "0.10.64",
623
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz",
624
+ "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==",
625
+ "hasInstallScript": true,
626
+ "dependencies": {
627
+ "es6-iterator": "^2.0.3",
628
+ "es6-symbol": "^3.1.3",
629
+ "esniff": "^2.0.1",
630
+ "next-tick": "^1.1.0"
631
+ },
632
+ "engines": {
633
+ "node": ">=0.10"
634
+ }
635
+ },
636
+ "node_modules/es6-iterator": {
637
+ "version": "2.0.3",
638
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
639
+ "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==",
640
+ "dependencies": {
641
+ "d": "1",
642
+ "es5-ext": "^0.10.35",
643
+ "es6-symbol": "^3.1.1"
644
+ }
645
+ },
646
+ "node_modules/es6-symbol": {
647
+ "version": "3.1.4",
648
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz",
649
+ "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==",
650
+ "dependencies": {
651
+ "d": "^1.0.2",
652
+ "ext": "^1.7.0"
653
+ },
654
+ "engines": {
655
+ "node": ">=0.12"
656
+ }
657
+ },
658
+ "node_modules/es6-weak-map": {
659
+ "version": "2.0.3",
660
+ "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
661
+ "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
662
+ "dependencies": {
663
+ "d": "1",
664
+ "es5-ext": "^0.10.46",
665
+ "es6-iterator": "^2.0.3",
666
+ "es6-symbol": "^3.1.1"
667
+ }
668
+ },
669
+ "node_modules/esbuild": {
670
+ "version": "0.19.12",
671
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz",
672
+ "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==",
673
+ "hasInstallScript": true,
674
+ "bin": {
675
+ "esbuild": "bin/esbuild"
676
+ },
677
+ "engines": {
678
+ "node": ">=12"
679
+ },
680
+ "optionalDependencies": {
681
+ "@esbuild/aix-ppc64": "0.19.12",
682
+ "@esbuild/android-arm": "0.19.12",
683
+ "@esbuild/android-arm64": "0.19.12",
684
+ "@esbuild/android-x64": "0.19.12",
685
+ "@esbuild/darwin-arm64": "0.19.12",
686
+ "@esbuild/darwin-x64": "0.19.12",
687
+ "@esbuild/freebsd-arm64": "0.19.12",
688
+ "@esbuild/freebsd-x64": "0.19.12",
689
+ "@esbuild/linux-arm": "0.19.12",
690
+ "@esbuild/linux-arm64": "0.19.12",
691
+ "@esbuild/linux-ia32": "0.19.12",
692
+ "@esbuild/linux-loong64": "0.19.12",
693
+ "@esbuild/linux-mips64el": "0.19.12",
694
+ "@esbuild/linux-ppc64": "0.19.12",
695
+ "@esbuild/linux-riscv64": "0.19.12",
696
+ "@esbuild/linux-s390x": "0.19.12",
697
+ "@esbuild/linux-x64": "0.19.12",
698
+ "@esbuild/netbsd-x64": "0.19.12",
699
+ "@esbuild/openbsd-x64": "0.19.12",
700
+ "@esbuild/sunos-x64": "0.19.12",
701
+ "@esbuild/win32-arm64": "0.19.12",
702
+ "@esbuild/win32-ia32": "0.19.12",
703
+ "@esbuild/win32-x64": "0.19.12"
704
+ }
705
+ },
706
+ "node_modules/esniff": {
707
+ "version": "2.0.1",
708
+ "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz",
709
+ "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==",
710
+ "dependencies": {
711
+ "d": "^1.0.1",
712
+ "es5-ext": "^0.10.62",
713
+ "event-emitter": "^0.3.5",
714
+ "type": "^2.7.2"
715
+ },
716
+ "engines": {
717
+ "node": ">=0.10"
718
+ }
719
+ },
720
+ "node_modules/estree-walker": {
721
+ "version": "3.0.3",
722
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
723
+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
724
+ "peer": true,
725
+ "dependencies": {
726
+ "@types/estree": "^1.0.0"
727
+ }
728
+ },
729
+ "node_modules/event-emitter": {
730
+ "version": "0.3.5",
731
+ "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
732
+ "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==",
733
+ "dependencies": {
734
+ "d": "1",
735
+ "es5-ext": "~0.10.14"
736
+ }
737
+ },
738
+ "node_modules/ext": {
739
+ "version": "1.7.0",
740
+ "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz",
741
+ "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==",
742
+ "dependencies": {
743
+ "type": "^2.7.2"
744
+ }
745
+ },
746
+ "node_modules/globalyzer": {
747
+ "version": "0.1.0",
748
+ "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz",
749
+ "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q=="
750
+ },
751
+ "node_modules/globrex": {
752
+ "version": "0.1.2",
753
+ "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
754
+ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg=="
755
+ },
756
+ "node_modules/intl-messageformat": {
757
+ "version": "9.13.0",
758
+ "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-9.13.0.tgz",
759
+ "integrity": "sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw==",
760
+ "dependencies": {
761
+ "@formatjs/ecma402-abstract": "1.11.4",
762
+ "@formatjs/fast-memoize": "1.2.1",
763
+ "@formatjs/icu-messageformat-parser": "2.1.0",
764
+ "tslib": "^2.1.0"
765
+ }
766
+ },
767
+ "node_modules/is-promise": {
768
+ "version": "2.2.2",
769
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
770
+ "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
771
+ },
772
+ "node_modules/is-reference": {
773
+ "version": "3.0.2",
774
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
775
+ "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
776
+ "peer": true,
777
+ "dependencies": {
778
+ "@types/estree": "*"
779
+ }
780
+ },
781
+ "node_modules/locate-character": {
782
+ "version": "3.0.0",
783
+ "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz",
784
+ "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==",
785
+ "peer": true
786
+ },
787
+ "node_modules/lru-queue": {
788
+ "version": "0.1.0",
789
+ "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz",
790
+ "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==",
791
+ "dependencies": {
792
+ "es5-ext": "~0.10.2"
793
+ }
794
+ },
795
+ "node_modules/magic-string": {
796
+ "version": "0.30.8",
797
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz",
798
+ "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==",
799
+ "peer": true,
800
+ "dependencies": {
801
+ "@jridgewell/sourcemap-codec": "^1.4.15"
802
+ },
803
+ "engines": {
804
+ "node": ">=12"
805
+ }
806
+ },
807
+ "node_modules/mdn-data": {
808
+ "version": "2.0.30",
809
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
810
+ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
811
+ "peer": true
812
+ },
813
+ "node_modules/memoizee": {
814
+ "version": "0.4.15",
815
+ "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz",
816
+ "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==",
817
+ "dependencies": {
818
+ "d": "^1.0.1",
819
+ "es5-ext": "^0.10.53",
820
+ "es6-weak-map": "^2.0.3",
821
+ "event-emitter": "^0.3.5",
822
+ "is-promise": "^2.2.2",
823
+ "lru-queue": "^0.1.0",
824
+ "next-tick": "^1.1.0",
825
+ "timers-ext": "^0.1.7"
826
+ }
827
+ },
828
+ "node_modules/mri": {
829
+ "version": "1.2.0",
830
+ "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
831
+ "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
832
+ "engines": {
833
+ "node": ">=4"
834
+ }
835
+ },
836
+ "node_modules/next-tick": {
837
+ "version": "1.1.0",
838
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
839
+ "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
840
+ },
841
+ "node_modules/periscopic": {
842
+ "version": "3.1.0",
843
+ "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz",
844
+ "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==",
845
+ "peer": true,
846
+ "dependencies": {
847
+ "@types/estree": "^1.0.0",
848
+ "estree-walker": "^3.0.0",
849
+ "is-reference": "^3.0.0"
850
+ }
851
+ },
852
+ "node_modules/sade": {
853
+ "version": "1.8.1",
854
+ "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz",
855
+ "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
856
+ "dependencies": {
857
+ "mri": "^1.1.0"
858
+ },
859
+ "engines": {
860
+ "node": ">=6"
861
+ }
862
+ },
863
+ "node_modules/source-map-js": {
864
+ "version": "1.2.0",
865
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
866
+ "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
867
+ "peer": true,
868
+ "engines": {
869
+ "node": ">=0.10.0"
870
+ }
871
+ },
872
+ "node_modules/svelte": {
873
+ "version": "4.2.12",
874
+ "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.12.tgz",
875
+ "integrity": "sha512-d8+wsh5TfPwqVzbm4/HCXC783/KPHV60NvwitJnyTA5lWn1elhXMNWhXGCJ7PwPa8qFUnyJNIyuIRt2mT0WMug==",
876
+ "peer": true,
877
+ "dependencies": {
878
+ "@ampproject/remapping": "^2.2.1",
879
+ "@jridgewell/sourcemap-codec": "^1.4.15",
880
+ "@jridgewell/trace-mapping": "^0.3.18",
881
+ "@types/estree": "^1.0.1",
882
+ "acorn": "^8.9.0",
883
+ "aria-query": "^5.3.0",
884
+ "axobject-query": "^4.0.0",
885
+ "code-red": "^1.0.3",
886
+ "css-tree": "^2.3.1",
887
+ "estree-walker": "^3.0.3",
888
+ "is-reference": "^3.0.1",
889
+ "locate-character": "^3.0.0",
890
+ "magic-string": "^0.30.4",
891
+ "periscopic": "^3.1.0"
892
+ },
893
+ "engines": {
894
+ "node": ">=16"
895
+ }
896
+ },
897
+ "node_modules/svelte-i18n": {
898
+ "version": "3.7.4",
899
+ "resolved": "https://registry.npmjs.org/svelte-i18n/-/svelte-i18n-3.7.4.tgz",
900
+ "integrity": "sha512-yGRCNo+eBT4cPuU7IVsYTYjxB7I2V8qgUZPlHnNctJj5IgbJgV78flsRzpjZ/8iUYZrS49oCt7uxlU3AZv/N5Q==",
901
+ "dependencies": {
902
+ "cli-color": "^2.0.3",
903
+ "deepmerge": "^4.2.2",
904
+ "esbuild": "^0.19.2",
905
+ "estree-walker": "^2",
906
+ "intl-messageformat": "^9.13.0",
907
+ "sade": "^1.8.1",
908
+ "tiny-glob": "^0.2.9"
909
+ },
910
+ "bin": {
911
+ "svelte-i18n": "dist/cli.js"
912
+ },
913
+ "engines": {
914
+ "node": ">= 16"
915
+ },
916
+ "peerDependencies": {
917
+ "svelte": "^3 || ^4"
918
+ }
919
+ },
920
+ "node_modules/svelte-i18n/node_modules/estree-walker": {
921
+ "version": "2.0.2",
922
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
923
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
924
+ },
925
+ "node_modules/timers-ext": {
926
+ "version": "0.1.7",
927
+ "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz",
928
+ "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==",
929
+ "dependencies": {
930
+ "es5-ext": "~0.10.46",
931
+ "next-tick": "1"
932
+ }
933
+ },
934
+ "node_modules/tiny-glob": {
935
+ "version": "0.2.9",
936
+ "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz",
937
+ "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==",
938
+ "dependencies": {
939
+ "globalyzer": "0.1.0",
940
+ "globrex": "^0.1.2"
941
+ }
942
+ },
943
+ "node_modules/tslib": {
944
+ "version": "2.6.2",
945
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
946
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
947
+ },
948
+ "node_modules/type": {
949
+ "version": "2.7.2",
950
+ "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz",
951
+ "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw=="
952
+ },
953
+ "node_modules/type-fest": {
954
+ "version": "4.15.0",
955
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.15.0.tgz",
956
+ "integrity": "sha512-tB9lu0pQpX5KJq54g+oHOLumOx+pMep4RaM6liXh2PKmVRFF+/vAtUP0ZaJ0kOySfVNjF6doBWPHhBhISKdlIA==",
957
+ "dev": true,
958
+ "engines": {
959
+ "node": ">=16"
960
+ },
961
+ "funding": {
962
+ "url": "https://github.com/sponsors/sindresorhus"
963
+ }
964
+ }
965
+ }
966
+ }
src/frontend/package.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "gradio_hubquicksearch",
3
+ "version": "0.1.13",
4
+ "description": "Gradio UI packages",
5
+ "type": "module",
6
+ "author": "",
7
+ "license": "ISC",
8
+ "private": false,
9
+ "main_changeset": true,
10
+ "exports": {
11
+ ".": "./Index.svelte",
12
+ "./example": "./Example.svelte",
13
+ "./package.json": "./package.json"
14
+ },
15
+ "dependencies": {
16
+ "@gradio/atoms": "0.6.1",
17
+ "@gradio/icons": "0.3.4",
18
+ "@gradio/statustracker": "0.4.10",
19
+ "@gradio/utils": "0.3.0"
20
+ },
21
+ "devDependencies": {
22
+ "type-fest": "^4.15.0"
23
+ }
24
+ }
src/pyproject.toml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [build-system]
2
+ requires = [
3
+ "hatchling",
4
+ "hatch-requirements-txt",
5
+ "hatch-fancy-pypi-readme>=22.5.0",
6
+ ]
7
+ build-backend = "hatchling.build"
8
+
9
+ [project]
10
+ name = "gradio_hubquicksearch"
11
+ version = "0.0.1"
12
+ description = "Quick search HF Hub repos or users"
13
+ readme = "README.md"
14
+ license = "MIT"
15
+ requires-python = ">=3.8"
16
+ authors = [{ name = "YOUR NAME", email = "YOUREMAIL@domain.com" }]
17
+ keywords = ["gradio-custom-component", "gradio-template-SimpleTextbox", "huggingface hub", "hub", "huggingface"]
18
+ # Add dependencies here
19
+ dependencies = ["gradio>=4.0,<5.0"]
20
+ classifiers = [
21
+ 'Development Status :: 3 - Alpha',
22
+ 'License :: OSI Approved :: Apache Software License',
23
+ 'Operating System :: OS Independent',
24
+ 'Programming Language :: Python :: 3',
25
+ 'Programming Language :: Python :: 3 :: Only',
26
+ 'Programming Language :: Python :: 3.8',
27
+ 'Programming Language :: Python :: 3.9',
28
+ 'Programming Language :: Python :: 3.10',
29
+ 'Programming Language :: Python :: 3.11',
30
+ 'Topic :: Scientific/Engineering',
31
+ 'Topic :: Scientific/Engineering :: Artificial Intelligence',
32
+ 'Topic :: Scientific/Engineering :: Visualization',
33
+ ]
34
+
35
+ [project.optional-dependencies]
36
+ dev = ["build", "twine"]
37
+
38
+ [tool.hatch.build]
39
+ artifacts = ["/backend/gradio_hubquicksearch/templates", "*.pyi", "backend/gradio_hubquicksearch/templates"]
40
+
41
+ [tool.hatch.build.targets.wheel]
42
+ packages = ["/backend/gradio_hubquicksearch"]