aidos-ui 3.0.19 → 3.0.20

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.
@@ -4,7 +4,6 @@ import { InteractableColor } from "./Interactable";
4
4
  interface ListLinkItemProps extends BaseListItemProps {
5
5
  color?: InteractableColor;
6
6
  children?: void;
7
- onClick?: () => void;
8
7
  href: string;
9
8
  headline: string;
10
9
  body?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ListLinkItem.js","sourceRoot":"","sources":["../src/ListLinkItem.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAEL,aAAa,EACb,+BAA+B,GAChC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAexC,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAC1C,CACE,EACE,OAAO,EACP,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,QAAQ,EAClB,OAAO,EACP,GAAG,EACH,QAAQ,EACR,KAAK,GAAG,SAAS,EACjB,MAAM,EACN,GAAG,UAAU,EACK,EACpB,GAAkC,EAClC,EAAE;IACF,MAAM,EAAE,IAAI,EAAE,GAAG,cAAc,EAAE,CAAC;IAElC,OAAO,CACL,KAAC,YAAY,IACX,WAAW,EAAE,CAAC,IAAI,EAClB,QAAQ,EAAE,QAAQ,mBACH,QAAQ,EACvB,OAAO,EAAC,MAAM,EACd,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,EACnD,SAAS,EAAE,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,EAC/C,QAAQ,EAAE,QAAQ,KACd,UA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ACH,QAAQ,EACvB,OAAO,EAAC,MAAM,EACd,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,EACnD,SAAS,EAAE,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,EAC/C,QAAQ,EAAE,QAAQ,KACd,UAAU,EACd,OAAO,EAAE,OAAO,YAEf,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAChB,KAAC,QAAQ,IACP,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,kBACF,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC3C,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,KAAK,EACzB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,+BAA+B,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAC5D,OAAO,EAAE,OAAO,YAEf,OAAO,GACC,CACZ,GACY,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidos-ui",
3
- "version": "3.0.19",
3
+ "version": "3.0.20",
4
4
  "description": "A simple UI framework",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -31,7 +31,6 @@
31
31
  "install": "^0.13.0",
32
32
  "next": "latest",
33
33
  "npm": "^9.8.0",
34
- "openai": "^3.3.0",
35
34
  "prismjs": "^1.29.0",
36
35
  "process": "^0.11.10",
37
36
  "react-dom": "latest",
@@ -13,7 +13,6 @@ import { useListContext } from "./List";
13
13
  interface ListLinkItemProps extends BaseListItemProps {
14
14
  color?: InteractableColor;
15
15
  children?: void;
16
- onClick?: () => void;
17
16
  href: string;
18
17
  headline: string;
19
18
  body?: string;
@@ -36,7 +35,7 @@ export const ListLinkItem = React.forwardRef(
36
35
  target,
37
36
  ...otherProps
38
37
  }: ListLinkItemProps,
39
- ref?: React.Ref<HTMLAnchorElement>
38
+ ref?: React.Ref<HTMLAnchorElement>,
40
39
  ) => {
41
40
  const { bare } = useListContext();
42
41
 
@@ -72,5 +71,5 @@ export const ListLinkItem = React.forwardRef(
72
71
  )}
73
72
  </BaseListItem>
74
73
  );
75
- }
74
+ },
76
75
  );
@@ -36,6 +36,10 @@ import { DocsMDXProvider, labelToID } from "../docs/mdx";
36
36
  import { Pipeline, dot, pipeline } from "@xenova/transformers";
37
37
  import { pages } from "../docs/pages";
38
38
 
39
+ import { Inter } from "next/font/google";
40
+
41
+ const inter = Inter({ subsets: ["latin"] });
42
+
39
43
  const transformers = import("@xenova/transformers");
40
44
  const searchIndex = import("../docs/searchIndex").then(
41
45
  (module) => module.index
@@ -227,6 +231,13 @@ export default function App({ Component, pageProps }: AppProps) {
227
231
  <meta name="viewport" content="width=device-width, initial-scale=1" />
228
232
  </Head>
229
233
  <BaseLinkComponentOverrideContext.Provider value={link}>
234
+ {/* @ts-ignore */}
235
+ <style jsx global>{`
236
+ html {
237
+ font-family: ${inter.style.fontFamily};
238
+ }
239
+ `}</style>
240
+
230
241
  <Providers themes={{ light: lightTheme, dark: darkTheme }}>
231
242
  <DocsMDXProvider>
232
243
  <BaseView
@@ -1,100 +0,0 @@
1
- import fs from "fs/promises";
2
- import path from "path";
3
- import { fileURLToPath } from "url";
4
- import { unified } from "unified";
5
- import remarkParse from "remark-parse";
6
- import remarkMdx from "remark-mdx";
7
- import { Configuration, OpenAIApi } from "openai";
8
- import dotenv from "dotenv";
9
-
10
- dotenv.config();
11
-
12
- const __filename = fileURLToPath(import.meta.url);
13
- const __dirname = path.dirname(__filename);
14
- const __rootdir = path.join(__dirname, "..");
15
- const __pages = path.join(__rootdir, "src", "pages");
16
- const __target = path.join(__rootdir, "src", "docs");
17
-
18
- const configuration = new Configuration({
19
- organization: "org-Q89d8tyY2MChQVFEbhp27pB3",
20
- apiKey: process.env.OPENAI_API_KEY,
21
- });
22
- const openai = new OpenAIApi(configuration);
23
-
24
- const files = await fs.readdir(__pages);
25
-
26
- const index = [];
27
-
28
- for (const file of files) {
29
- if (path.extname(file) !== ".mdx") {
30
- continue;
31
- }
32
-
33
- const filepath = path.join(__pages, file);
34
- const filename = path.parse(file).name;
35
- const content = await fs.readFile(filepath, "utf-8");
36
- const sections = parseContent(content);
37
-
38
- const embeddings = await Promise.all(
39
- sections.map(async ({ text, heading, headingDepth }) => {
40
- const embedding = await openai
41
- .createEmbedding({
42
- model: "text-embedding-ada-002",
43
- input: text,
44
- })
45
- .then((response) => response.data[0].embedding);
46
-
47
- return {
48
- heading,
49
- headingDepth,
50
- filename,
51
- embedding: Array.from(embedding.data),
52
- };
53
- })
54
- );
55
-
56
- index.push(...embeddings);
57
- }
58
-
59
- await fs.writeFile(
60
- path.join(__target, "searchIndex.ts"),
61
- `export const index = ${JSON.stringify({ index })}`
62
- );
63
-
64
- function parseChildren(children) {
65
- const result = [];
66
-
67
- for (const node of children) {
68
- if (node.type === "text") {
69
- result.push(node.value);
70
- } else if (node.type === "inlineCode") {
71
- result.push(node.value);
72
- } else if (node.type === "link") {
73
- result.push(parseChildren(node.children));
74
- }
75
- }
76
-
77
- return result.join(" ");
78
- }
79
-
80
- function parseContent(content) {
81
- const ast = unified().use(remarkParse).use(remarkMdx).parse(content);
82
- const result = [];
83
- let headingDepth = 1;
84
- let heading = "";
85
-
86
- for (const node of ast.children) {
87
- if (node.type === "paragraph") {
88
- result.push({
89
- text: heading + ": " + parseChildren(node.children),
90
- heading,
91
- headingDepth,
92
- });
93
- } else if (node.type === "heading") {
94
- headingDepth = node.depth;
95
- heading = parseChildren(node.children);
96
- }
97
- }
98
-
99
- return result;
100
- }