aidos-ui 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseListItem.d.ts +0 -1
- package/dist/BaseListItem.js +3 -1
- package/dist/BaseListItem.js.map +1 -1
- package/dist/List.d.ts +3 -0
- package/dist/List.js +21 -17
- package/dist/List.js.map +1 -1
- package/dist/ListButtonItem.d.ts +0 -1
- package/dist/ListButtonItem.js +4 -2
- package/dist/ListButtonItem.js.map +1 -1
- package/dist/ListHeaderItem.d.ts +1 -2
- package/dist/ListHeaderItem.js +4 -2
- package/dist/ListHeaderItem.js.map +1 -1
- package/dist/ListItem.d.ts +0 -1
- package/dist/ListItem.js +3 -1
- package/dist/ListItem.js.map +1 -1
- package/dist/ListLinkItem.d.ts +0 -1
- package/dist/ListLinkItem.js +4 -2
- package/dist/ListLinkItem.js.map +1 -1
- package/dist/Sublist.d.ts +1 -2
- package/dist/Sublist.js +2 -2
- package/dist/Sublist.js.map +1 -1
- package/package.json +3 -1
- package/scripts/embeddings.js +3 -3
- package/scripts/openai_embeddings.js +100 -0
- package/src/BaseListItem.tsx +3 -2
- package/src/List.tsx +30 -23
- package/src/ListButtonItem.tsx +3 -3
- package/src/ListHeaderItem.tsx +3 -3
- package/src/ListItem.tsx +4 -2
- package/src/ListLinkItem.tsx +3 -3
- package/src/Sublist.tsx +1 -4
- package/src/docs/searchIndex.ts +1 -0
- package/src/pages/List.mdx +8 -20
- package/src/pages/ListHeader.mdx +12 -16
- package/src/pages/_app.tsx +8 -16
- package/public/index.json +0 -1
package/src/pages/List.mdx
CHANGED
|
@@ -209,14 +209,12 @@ The bare list, like other components that support the `bare` style, is much more
|
|
|
209
209
|
|
|
210
210
|
<List bare ariaLabel="example">
|
|
211
211
|
<ListItem
|
|
212
|
-
bare
|
|
213
212
|
headline="Headline"
|
|
214
213
|
body="Body"
|
|
215
214
|
addOn={<Icon color="primary" icon="fa-bell" size="medium" />}
|
|
216
215
|
addOnPosition="start"
|
|
217
216
|
/>
|
|
218
217
|
<ListButtonItem
|
|
219
|
-
bare
|
|
220
218
|
color="positive"
|
|
221
219
|
headline="Positive button"
|
|
222
220
|
addOn={<Icon color="highlight" icon="fa-plus" size="medium" />}
|
|
@@ -224,7 +222,6 @@ The bare list, like other components that support the `bare` style, is much more
|
|
|
224
222
|
onClick={() => {}}
|
|
225
223
|
/>
|
|
226
224
|
<ListButtonItem
|
|
227
|
-
bare
|
|
228
225
|
color="secondary"
|
|
229
226
|
headline="Secondary button"
|
|
230
227
|
addOn={<Icon color="primary" icon="fa-bicycle" size="medium" />}
|
|
@@ -232,7 +229,6 @@ The bare list, like other components that support the `bare` style, is much more
|
|
|
232
229
|
onClick={() => {}}
|
|
233
230
|
/>
|
|
234
231
|
<ListButtonItem
|
|
235
|
-
bare
|
|
236
232
|
color="negative"
|
|
237
233
|
headline="Negative button"
|
|
238
234
|
addOn={<Icon color="negative" icon="fa-ban" size="medium" />}
|
|
@@ -241,7 +237,6 @@ The bare list, like other components that support the `bare` style, is much more
|
|
|
241
237
|
/>
|
|
242
238
|
<ListLinkItem
|
|
243
239
|
href="/"
|
|
244
|
-
bare
|
|
245
240
|
color="secondary"
|
|
246
241
|
headline="Selected link"
|
|
247
242
|
selected
|
|
@@ -250,7 +245,6 @@ The bare list, like other components that support the `bare` style, is much more
|
|
|
250
245
|
/>
|
|
251
246
|
<ListLinkItem
|
|
252
247
|
href="/"
|
|
253
|
-
bare
|
|
254
248
|
headline="Link"
|
|
255
249
|
addOn={<Icon color="primary" icon="fa-renren" size="medium" />}
|
|
256
250
|
addOnPosition="start"
|
|
@@ -261,14 +255,12 @@ The bare list, like other components that support the `bare` style, is much more
|
|
|
261
255
|
```js
|
|
262
256
|
<List bare ariaLabel="example">
|
|
263
257
|
<ListItem
|
|
264
|
-
bare
|
|
265
258
|
headline="Headline"
|
|
266
259
|
body="Body"
|
|
267
260
|
addOn={<Icon color="primary" icon="fa-bell" size="medium" />}
|
|
268
261
|
addOnPosition="start"
|
|
269
262
|
/>
|
|
270
263
|
<ListButtonItem
|
|
271
|
-
bare
|
|
272
264
|
color="positive"
|
|
273
265
|
headline="Positive button"
|
|
274
266
|
addOn={<Icon color="highlight" icon="fa-plus" size="medium" />}
|
|
@@ -276,7 +268,6 @@ The bare list, like other components that support the `bare` style, is much more
|
|
|
276
268
|
onClick={() => {}}
|
|
277
269
|
/>
|
|
278
270
|
<ListButtonItem
|
|
279
|
-
bare
|
|
280
271
|
color="secondary"
|
|
281
272
|
headline="Secondary button"
|
|
282
273
|
addOn={<Icon color="primary" icon="fa-bicycle" size="medium" />}
|
|
@@ -284,7 +275,6 @@ The bare list, like other components that support the `bare` style, is much more
|
|
|
284
275
|
onClick={() => {}}
|
|
285
276
|
/>
|
|
286
277
|
<ListButtonItem
|
|
287
|
-
bare
|
|
288
278
|
color="negative"
|
|
289
279
|
headline="Negative button"
|
|
290
280
|
addOn={<Icon color="negative" icon="fa-ban" size="medium" />}
|
|
@@ -293,7 +283,6 @@ The bare list, like other components that support the `bare` style, is much more
|
|
|
293
283
|
/>
|
|
294
284
|
<ListLinkItem
|
|
295
285
|
href="/"
|
|
296
|
-
bare
|
|
297
286
|
color="secondary"
|
|
298
287
|
headline="Selected link"
|
|
299
288
|
selected
|
|
@@ -302,7 +291,6 @@ The bare list, like other components that support the `bare` style, is much more
|
|
|
302
291
|
/>
|
|
303
292
|
<ListLinkItem
|
|
304
293
|
href="/"
|
|
305
|
-
bare
|
|
306
294
|
headline="Link"
|
|
307
295
|
addOn={<Icon color="primary" icon="fa-renren" size="medium" />}
|
|
308
296
|
addOnPosition="start"
|
|
@@ -316,19 +304,19 @@ The bare list, like other components that support the `bare` style, is much more
|
|
|
316
304
|
## Sublist
|
|
317
305
|
|
|
318
306
|
<List bare ariaLabel="example">
|
|
319
|
-
<Sublist
|
|
320
|
-
<ListItem
|
|
321
|
-
<ListItem
|
|
322
|
-
<ListItem
|
|
307
|
+
<Sublist label="Sublist">
|
|
308
|
+
<ListItem headline="Headline 1" body="Body 1" />
|
|
309
|
+
<ListItem headline="Headline 2" body="Body 2" />
|
|
310
|
+
<ListItem headline="Headline 3" body="Body 3" />
|
|
323
311
|
</Sublist>
|
|
324
312
|
</List>
|
|
325
313
|
|
|
326
314
|
```js
|
|
327
315
|
<List bare ariaLabel="example">
|
|
328
|
-
<Sublist
|
|
329
|
-
<ListItem
|
|
330
|
-
<ListItem
|
|
331
|
-
<ListItem
|
|
316
|
+
<Sublist label="Sublist">
|
|
317
|
+
<ListItem headline="Headline 1" body="Body 1" />
|
|
318
|
+
<ListItem headline="Headline 2" body="Body 2" />
|
|
319
|
+
<ListItem headline="Headline 3" body="Body 3" />
|
|
332
320
|
</Sublist>
|
|
333
321
|
</List>
|
|
334
322
|
```
|
package/src/pages/ListHeader.mdx
CHANGED
|
@@ -50,44 +50,40 @@ import { ListHeaderItem } from "../ListHeaderItem";
|
|
|
50
50
|
## Bare list headers
|
|
51
51
|
|
|
52
52
|
<List bare ariaLabel="example">
|
|
53
|
-
<ListHeaderItem
|
|
54
|
-
<ListItem
|
|
53
|
+
<ListHeaderItem headline="Header" />
|
|
54
|
+
<ListItem headline="Headline 1" body="Body 1" />
|
|
55
55
|
<ListHeaderItem
|
|
56
|
-
bare
|
|
57
56
|
headline="Header"
|
|
58
57
|
addOn={<Icon icon="fa-chain-broken" size="medium" color="primary" />}
|
|
59
58
|
/>
|
|
60
|
-
<ListItem
|
|
61
|
-
<ListHeaderItem
|
|
62
|
-
<ListItem
|
|
59
|
+
<ListItem headline="Headline 2" body="Body 2" />
|
|
60
|
+
<ListHeaderItem highlight headline="Header" />
|
|
61
|
+
<ListItem headline="Headline 3" body="Body 3" />
|
|
63
62
|
<ListHeaderItem
|
|
64
|
-
bare
|
|
65
63
|
highlight
|
|
66
64
|
headline="Header"
|
|
67
65
|
addOn={<Icon icon="fa-chain-broken" size="medium" color="highlight" />}
|
|
68
66
|
/>
|
|
69
|
-
<ListItem
|
|
67
|
+
<ListItem withDivider={false} headline="Headline 4" body="Body 3" />
|
|
70
68
|
</List>
|
|
71
69
|
|
|
72
70
|
```js
|
|
73
71
|
<List bare ariaLabel="example">
|
|
74
|
-
<ListHeaderItem
|
|
75
|
-
<ListItem
|
|
72
|
+
<ListHeaderItem headline="Header" />
|
|
73
|
+
<ListItem headline="Headline 1" body="Body 1" />
|
|
76
74
|
<ListHeaderItem
|
|
77
|
-
bare
|
|
78
75
|
headline="Header"
|
|
79
76
|
addOn={<Icon icon="fa-chain-broken" size="medium" color="primary" />}
|
|
80
77
|
/>
|
|
81
|
-
<ListItem
|
|
82
|
-
<ListHeaderItem
|
|
83
|
-
<ListItem
|
|
78
|
+
<ListItem headline="Headline 2" body="Body 2" />
|
|
79
|
+
<ListHeaderItem highlight headline="Header" />
|
|
80
|
+
<ListItem headline="Headline 3" body="Body 3" />
|
|
84
81
|
<ListHeaderItem
|
|
85
|
-
bare
|
|
86
82
|
highlight
|
|
87
83
|
headline="Header"
|
|
88
84
|
addOn={<Icon icon="fa-chain-broken" size="medium" color="light" />}
|
|
89
85
|
/>
|
|
90
|
-
<ListItem
|
|
86
|
+
<ListItem withDivider={false} headline="Headline 4" body="Body 3" />
|
|
91
87
|
</List>
|
|
92
88
|
```
|
|
93
89
|
|
package/src/pages/_app.tsx
CHANGED
|
@@ -36,16 +36,13 @@ import { DocsMDXProvider, labelToID } from "../docs/mdx";
|
|
|
36
36
|
import { dot } from "@xenova/transformers";
|
|
37
37
|
import { pages } from "../docs/pages";
|
|
38
38
|
|
|
39
|
+
const transformers = import("@xenova/transformers");
|
|
40
|
+
const searchIndex = import("../docs/searchIndex").then(
|
|
41
|
+
(module) => module.index
|
|
42
|
+
);
|
|
43
|
+
|
|
39
44
|
export default function App({ Component, pageProps }: AppProps) {
|
|
40
45
|
const router = useRouter();
|
|
41
|
-
const searchIndex = useRef<Promise<{
|
|
42
|
-
index: Array<{
|
|
43
|
-
embedding: Array<number>;
|
|
44
|
-
filename: string;
|
|
45
|
-
heading: string;
|
|
46
|
-
headingDepth: number;
|
|
47
|
-
}>;
|
|
48
|
-
}> | null>(null);
|
|
49
46
|
const [pathname, setPathname] = useState(router.pathname);
|
|
50
47
|
const [showList, setShowList] = useState(false);
|
|
51
48
|
const [query, setQuery] = useState("");
|
|
@@ -152,17 +149,12 @@ export default function App({ Component, pageProps }: AppProps) {
|
|
|
152
149
|
let state = { cancel: false };
|
|
153
150
|
|
|
154
151
|
async function run() {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
if (state.cancel) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
const data = await searchIndex.current;
|
|
152
|
+
const data = await searchIndex;
|
|
153
|
+
|
|
162
154
|
if (state.cancel) {
|
|
163
155
|
return;
|
|
164
156
|
}
|
|
165
|
-
const { pipeline } = await
|
|
157
|
+
const { pipeline } = await transformers;
|
|
166
158
|
if (state.cancel) {
|
|
167
159
|
return;
|
|
168
160
|
}
|