Skip to content

Commit 7433ee2

Browse files
Update tsdoc references
1 parent 07af647 commit 7433ee2

File tree

51 files changed

+416
-334
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+416
-334
lines changed

apps/portal/src/app/react-native/v5/getting-started/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ We recommend starting a new thirdweb React Native project using our CLI, which s
99
In your CLI, run:
1010

1111
```bash
12-
npx thirdweb create --legacy-peer-deps --react-native
12+
npx thirdweb create app --react-native
1313
```
1414

1515
or clone the [expo-starter](https://github.com/thirdweb-dev/expo-starter) repo using git.

apps/portal/src/app/react-native/v5/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Many of the components and hooks in the React Native SDK use a [`client`](/types
6060
If you want to get started quickly run:
6161

6262
```bash
63-
npx thirdweb create --legacy-peer-deps --react-native
63+
npx thirdweb create app --react-native
6464
```
6565

6666
or clone the [expo-starter](https://github.com/thirdweb-dev/expo-starter) repo using git.

apps/portal/src/app/react/v5/getting-started/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can get started by creating a new project or adding thirdweb to an existing
99
You can quickly create a new project with the thirdweb CLI
1010

1111
```bash
12-
npx thirdweb create app --legacy-peer-deps
12+
npx thirdweb create app
1313
```
1414

1515
or clone the the Next.js or Vite starter repo:

apps/portal/src/app/react/v5/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Follow this [guide](/react/v5/getting-started) to get started with the React SDK
5252
You can quickly create a new project with the thirdweb CLI
5353

5454
```bash
55-
npx thirdweb create app --legacy-peer-deps
55+
npx thirdweb create app
5656
```
5757

5858
or clone the the Next.js or Vite starter repo:

apps/portal/src/app/references/components/TDoc/utils/getSidebarLinkgroups.ts

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const tagsToGroup = {
2626
"@connectWallet": "Connect Wallet",
2727
"@appURI": "App URI",
2828
"@storage": "Storage",
29-
"@others": "Others",
29+
"@others": "Misc",
3030
"@wallet": "Wallets",
3131
"@walletConfig": "WalletConfig",
3232
"@theme": "Theme",
@@ -40,20 +40,25 @@ const tagsToGroup = {
4040
"@chain": "Chain",
4141
"@social": "Social API",
4242
"@modules": "Modules",
43+
"@client": "Client",
4344
} as const;
4445

4546
type TagKey = keyof typeof tagsToGroup;
4647

4748
const sidebarGroupOrder: TagKey[] = [
49+
"@client",
4850
"@wallet",
4951
"@abstractWallet",
5052
"@locale",
51-
"@chain",
52-
"@contract",
5353
"@networkConnection",
5454
"@walletConfig",
5555
"@walletConnection",
5656
"@walletUtils",
57+
"@chain",
58+
"@contract",
59+
"@transaction",
60+
"@social",
61+
"@auth",
5762
"@nft",
5863
"@buyCrypto",
5964
"@nftDrop",
@@ -64,18 +69,15 @@ const sidebarGroupOrder: TagKey[] = [
6469
"@metadata",
6570
"@permissionControl",
6671
"@platformFees",
67-
"@auth",
6872
"@storage",
6973
"@smartWallet",
7074
"@connectWallet",
7175
"@appURI",
7276
"@extension",
73-
"@transaction",
7477
"@rpc",
75-
"@utils",
76-
"@social",
7778
"@modules",
7879
"@theme",
80+
"@utils",
7981
"@others",
8082
];
8183

@@ -191,6 +193,7 @@ export function getSidebarLinkGroups(doc: TransformedDoc, path: string) {
191193
name: name,
192194
href: getLink(`${path}/${key}`),
193195
links: [{ name: "Extensions", links: extensionLinkGroups }],
196+
isCollapsible: false,
194197
});
195198
} else {
196199
linkGroups
@@ -245,7 +248,12 @@ export function getSidebarLinkGroups(doc: TransformedDoc, path: string) {
245248

246249
// sort into groups
247250
for (const d of nonExtensions) {
248-
const [tag] = getCustomTag(d) || [];
251+
let [tag] = getCustomTag(d) || [];
252+
// for ungrouped functions - put it in utils
253+
// useful for re-exports that we can't tag
254+
if (!tag) {
255+
tag = "@others";
256+
}
249257

250258
if (tag) {
251259
if (!groups[tag]) {
@@ -257,16 +265,6 @@ export function getSidebarLinkGroups(doc: TransformedDoc, path: string) {
257265
}
258266
}
259267

260-
// If a group only has one item, do not create a group for it and add it to noGroups
261-
for (const _tag in groups) {
262-
const tag = _tag as TagKey;
263-
const links = groups[tag];
264-
if (links && links.length === 1 && links[0]) {
265-
ungroupedLinks.push(links[0]);
266-
delete groups[tag];
267-
}
268-
}
269-
270268
// throw error if we don't know where to put the group in sidebar ( because this leads to it not being added in sidebar at all )
271269
for (const tag of Object.keys(groups)) {
272270
if (!sidebarGroupOrder.includes(tag as TagKey)) {
@@ -314,6 +312,7 @@ export function getSidebarLinkGroups(doc: TransformedDoc, path: string) {
314312
name: name,
315313
links: links,
316314
href: getLink(`${path}/${key}`),
315+
isCollapsible: false,
317316
});
318317
}
319318
}
@@ -326,26 +325,10 @@ export function getSidebarLinkGroups(doc: TransformedDoc, path: string) {
326325
createSubGroups("hooks", doc.hooks);
327326
}
328327

329-
if (doc.classes) {
330-
createSubGroups("classes", doc.classes);
331-
}
332-
333328
if (doc.functions) {
334329
createSubGroups("functions", doc.functions);
335330
}
336331

337-
if (doc.variables) {
338-
createSubGroups("variables", doc.variables);
339-
}
340-
341-
if (doc.types) {
342-
createSubGroups("types", doc.types);
343-
}
344-
345-
if (doc.enums) {
346-
createSubGroups("enums", doc.enums);
347-
}
348-
349332
return linkGroups;
350333
}
351334

apps/portal/src/app/references/components/TDoc/utils/subgroups.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export const subgroups = {
2-
components: "Components",
3-
hooks: "Hooks",
2+
components: "UI Components",
3+
hooks: "React Hooks",
44
classes: "Classes",
5-
functions: "Functions",
5+
functions: "Core Functions",
66
variables: "Variables",
77
types: "Types",
88
enums: "Enums",

apps/portal/src/app/references/typescript/[version]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createMetadata } from "@doc";
55
export default getTDocLayout({
66
getDoc: fetchTypeScriptDoc,
77
packageSlug: "typescript",
8-
sdkTitle: "TypeScript SDK",
8+
sdkTitle: "Connect SDK",
99
});
1010

1111
export const metadata = createMetadata({

apps/portal/src/components/others/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function DocSidebarNonCollapsible(props: {
151151
{href ? (
152152
<Link
153153
className={cn(
154-
"block font-medium text-base text-f-100 hover:text-accent-500",
154+
"block font-semibold text-base text-f-100 hover:text-accent-500",
155155
isCategoryActive && "!text-accent-500",
156156
)}
157157
href={href}

packages/thirdweb/scripts/typedoc.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import TypeDoc from "typedoc";
44
const jsonOut = "typedoc/documentation.json";
55

66
const app = await TypeDoc.Application.bootstrapWithPlugins({
7-
entryPoints: ["src/exports/**/*.ts", "src/extensions/modules/**/index.ts"],
7+
entryPoints: [
8+
"src/exports/**/*.ts",
9+
"src/extensions/modules/**/index.ts",
10+
"src/react/web/ui/prebuilt/NFT/index.ts",
11+
],
812
exclude: [
913
"src/exports/*.native.ts",
1014
"src/exports/**/*.native.ts",

packages/thirdweb/src/client/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export type ThirdwebClient = {
9898
*
9999
* const client = createThirdwebClient({ secretKey: "..." });
100100
* ```
101+
* @client
101102
*/
102103
export function createThirdwebClient(
103104
options: CreateThirdwebClientOptions,

0 commit comments

Comments
 (0)