Update indentation on mdx files in types to be correct

This commit is contained in:
Madison 2025-07-08 16:29:35 -05:00
parent c42a350daf
commit c2eacd9c36
8 changed files with 84 additions and 84 deletions

View File

@ -180,9 +180,9 @@ function ClickableCodeblock({
if (node.properties.style) {
node.properties.style = (node.properties.style as string).replace(/background[^;]*;?/g, '');
}
// Add line-height CSS for consistent rendering
// Add line-height CSS for consistent rendering and preserve whitespace
const existingStyle = (node.properties.style as string) || '';
node.properties.style = `${existingStyle}; line-height: 1.5; font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;`;
node.properties.style = `${existingStyle}; line-height: 1.5; font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; white-space: pre;`;
}
}]
});

View File

@ -28,27 +28,27 @@ API keys can be obtained through:
### Table of Contents
<ClickableTableOfContents code={`type ApiKey<Type extends "user" | "team" = "user" | "team", IsFirstView extends boolean = false> = {
id: string; //$stack-link-to:#apikeyid
description: string; //$stack-link-to:#apikeydescription
expiresAt?: Date; //$stack-link-to:#apikeyexpiresat
manuallyRevokedAt: Date | null; //$stack-link-to:#apikeymanuallyrevokedat
createdAt: Date; //$stack-link-to:#apikeycreatedat
value: IsFirstView extends true ? string : { lastFour: string }; //$stack-link-to:#apikeyvalue
// User or Team properties based on Type
...(Type extends "user" ? {
type: "user";
userId: string; //$stack-link-to:#apikeyuserid
} : {
type: "team";
teamId: string; //$stack-link-to:#apikeyteamid
})
// Methods
isValid(): boolean; //$stack-link-to:#apikeyisvalid
whyInvalid(): "manually-revoked" | "expired" | null; //$stack-link-to:#apikeywhyinvalid
revoke(): Promise<void>; //$stack-link-to:#apikeyrevoke
update(options): Promise<void>; //$stack-link-to:#apikeyupdateoptions
id: string; //$stack-link-to:#apikeyid
description: string; //$stack-link-to:#apikeydescription
expiresAt?: Date; //$stack-link-to:#apikeyexpiresat
manuallyRevokedAt: Date | null; //$stack-link-to:#apikeymanuallyrevokedat
createdAt: Date; //$stack-link-to:#apikeycreatedat
value: IsFirstView extends true ? string : { lastFour: string }; //$stack-link-to:#apikeyvalue
// User or Team properties based on Type
...(Type extends "user" ? {
type: "user";
userId: string; //$stack-link-to:#apikeyuserid
} : {
type: "team";
teamId: string; //$stack-link-to:#apikeyteamid
})
// Methods
isValid(): boolean; //$stack-link-to:#apikeyisvalid
whyInvalid(): "manually-revoked" | "expired" | null; //$stack-link-to:#apikeywhyinvalid
revoke(): Promise<void>; //$stack-link-to:#apikeyrevoke
update(options): Promise<void>; //$stack-link-to:#apikeyupdateoptions
};`} />
---

View File

@ -21,16 +21,16 @@ or [`user.useContactChannels()`](../types/user.mdx#currentuserusecontactchannels
### Table of Contents
<ClickableTableOfContents code={`type ContactChannel = {
id: string; //$stack-link-to:#contactchannelid
value: string; //$stack-link-to:#contactchannelvalue
type: 'email'; //$stack-link-to:#contactchanneltype
isPrimary: boolean; //$stack-link-to:#contactchannelisprimary
isVerified: boolean; //$stack-link-to:#contactchannelisverified
usedForAuth: boolean; //$stack-link-to:#contactchannelusedforauth
id: string; //$stack-link-to:#contactchannelid
value: string; //$stack-link-to:#contactchannelvalue
type: 'email'; //$stack-link-to:#contactchanneltype
isPrimary: boolean; //$stack-link-to:#contactchannelisprimary
isVerified: boolean; //$stack-link-to:#contactchannelisverified
usedForAuth: boolean; //$stack-link-to:#contactchannelusedforauth
sendVerificationEmail(): Promise<void>; //$stack-link-to:#contactchannelsendverificationemail
update(options): Promise<void>; //$stack-link-to:#contactchannelupdateoptions
delete(): Promise<void>; //$stack-link-to:#contactchanneldelete
sendVerificationEmail(): Promise<void>; //$stack-link-to:#contactchannelsendverificationemail
update(options): Promise<void>; //$stack-link-to:#contactchannelupdateoptions
delete(): Promise<void>; //$stack-link-to:#contactchanneldelete
};`} />
<CollapsibleTypesSection type="contactChannel" property="id" defaultOpen={false}>
@ -239,11 +239,11 @@ or [`serverUser.useContactChannels()`](../types/user.mdx#serveruserusecontactcha
### Table of Contents
<ClickableTableOfContents code={`type ServerContactChannel =
// Inherits all properties from ContactChannel
& ContactChannel //$stack-link-to:#contactchannel
& {
update(options): Promise<void>; //$stack-link-to:#servercontactchannelupdateoptions
};`} />
// Inherits all properties from ContactChannel
& ContactChannel //$stack-link-to:#contactchannel
& {
update(options): Promise<void>; //$stack-link-to:#servercontactchannelupdateoptions
};`} />
---

View File

@ -12,9 +12,9 @@ or [`stackApp.useProject()`](../objects/stack-app.mdx#stackappuseproject) {/* TH
### Table of Contents
<ClickableTableOfContents code={`type Project = {
id: string; //$stack-link-to:#projectid
displayName: string; //$stack-link-to:#projectdisplayname
config: { ... }; //$stack-link-to:#projectconfig
id: string; //$stack-link-to:#projectid
displayName: string; //$stack-link-to:#projectdisplayname
config: { ... }; //$stack-link-to:#projectconfig
};`} />
---

View File

@ -10,7 +10,7 @@ You can get `TeamPermission` objects by calling functions such as `user.getPermi
### Table of Contents
<ClickableTableOfContents code={`type TeamPermission = {
id: string; //$stack-link-to:#teampermissionid
id: string; //$stack-link-to:#teampermissionid
};`} />
---

View File

@ -16,8 +16,8 @@ The `TeamProfile` object represents the profile of a user within the context of
### Table of Contents
<ClickableTableOfContents code={`type TeamProfile = {
displayName: string | null; //$stack-link-to:#teamprofiledisplayname
profileImageUrl: string | null; //$stack-link-to:#teamprofileprofileimageurl
displayName: string | null; //$stack-link-to:#teamprofiledisplayname
profileImageUrl: string | null; //$stack-link-to:#teamprofileprofileimageurl
};`} />
---
@ -59,7 +59,7 @@ The `ServerTeamProfile` object is currently the same as `TeamProfile`.
### Table of Contents
<ClickableTableOfContents code={`type ServerTeamProfile =
// Inherits all functionality from TeamProfile
& TeamProfile; //$stack-link-to:#teamprofile`} />
// Inherits all functionality from TeamProfile
& TeamProfile; //$stack-link-to:#teamprofile`} />
---

View File

@ -20,8 +20,8 @@ It is usually obtained by calling
### Table of Contents
<ClickableTableOfContents code={`type TeamUser = {
id: string; //$stack-link-to:#teamuserid
teamProfile: TeamProfile; //$stack-link-to:#teamuserteamprofile
id: string; //$stack-link-to:#teamuserid
teamProfile: TeamProfile; //$stack-link-to:#teamuserteamprofile
};`} />
---
@ -65,13 +65,13 @@ It is usually obtained by calling `serverTeam.listUsers()` on a [`ServerTeam` ob
### Table of Contents
<ClickableTableOfContents code={`type ServerTeamUser =
// Inherits all functionality from TeamUser
& TeamUser //$stack-link-to:#teamuser
// Inherits all functionality from ServerUser
& ServerUser //$stack-link-to:./user#serveruser
& {
teamProfile: ServerTeamProfile; //$stack-link-to:#serverteamuserteamprofile
};`} />
// Inherits all functionality from TeamUser
& TeamUser //$stack-link-to:#teamuser
// Inherits all functionality from ServerUser
& ServerUser //$stack-link-to:./user#serveruser
& {
teamProfile: ServerTeamProfile; //$stack-link-to:#serverteamuserteamprofile
};`} />
---

View File

@ -22,25 +22,25 @@ You can get `Team` objects with the
### Table of Contents
<ClickableTableOfContents code={`type Team = {
id: string; //$stack-link-to:#teamid
displayName: string; //$stack-link-to:#teamdisplayname
profileImageUrl: string | null; //$stack-link-to:#teamprofileimageurl
clientMetadata: Json; //$stack-link-to:#teamclientmetadata
clientReadOnlyMetadata: Json; //$stack-link-to:#teamclientreadonlymetadata
id: string; //$stack-link-to:#teamid
displayName: string; //$stack-link-to:#teamdisplayname
profileImageUrl: string | null; //$stack-link-to:#teamprofileimageurl
clientMetadata: Json; //$stack-link-to:#teamclientmetadata
clientReadOnlyMetadata: Json; //$stack-link-to:#teamclientreadonlymetadata
update(data): Promise<void>; //$stack-link-to:#teamupdatedata
inviteUser(options): Promise<void>; //$stack-link-to:#teaminviteuseroptions
listUsers(): Promise<TeamUser[]>; //$stack-link-to:#teamlistusers
// NEXT_LINE_PLATFORM react-like
⤷ useUsers(): TeamUser[]; //$stack-link-to:#teamuseusers
listInvitations(): Promise<{ ... }[]>; //$stack-link-to:#teamlistinvitations
// NEXT_LINE_PLATFORM react-like
⤷ useInvitations(): { ... }[]; //$stack-link-to:#teamuseinvitations
createApiKey(options): Promise<TeamApiKeyFirstView>; //$stack-link-to:#teamcreateapikeyoptions
listApiKeys(): Promise<TeamApiKey[]>; //$stack-link-to:#teamlistapikeys
// NEXT_LINE_PLATFORM react-like
⤷ useApiKeys(): TeamApiKey[]; //$stack-link-to:#teamuseapikeys
update(data): Promise<void>; //$stack-link-to:#teamupdatedata
inviteUser(options): Promise<void>; //$stack-link-to:#teaminviteuseroptions
listUsers(): Promise<TeamUser[]>; //$stack-link-to:#teamlistusers
// NEXT_LINE_PLATFORM react-like
⤷ useUsers(): TeamUser[]; //$stack-link-to:#teamuseusers
listInvitations(): Promise<{ ... }[]>; //$stack-link-to:#teamlistinvitations
// NEXT_LINE_PLATFORM react-like
⤷ useInvitations(): { ... }[]; //$stack-link-to:#teamuseinvitations
createApiKey(options): Promise<TeamApiKeyFirstView>; //$stack-link-to:#teamcreateapikeyoptions
listApiKeys(): Promise<TeamApiKey[]>; //$stack-link-to:#teamlistapikeys
// NEXT_LINE_PLATFORM react-like
⤷ useApiKeys(): TeamApiKey[]; //$stack-link-to:#teamuseapikeys
};`} />
<CollapsibleTypesSection type="team" property="id" defaultOpen={false}>
@ -489,19 +489,19 @@ Calling `serverUser.getTeam(...)` and `serverUser.listTeams()` will return `Serv
### Table of Contents
<ClickableTableOfContents code={`type ServerTeam =
// Inherits all functionality from Team
& Team //$stack-link-to:#team
& {
createdAt: Date; //$stack-link-to:#serverteamcreatedat
serverMetadata: Json; //$stack-link-to:#serverteamservermetadata
// Inherits all functionality from Team
& Team //$stack-link-to:#team
& {
createdAt: Date; //$stack-link-to:#serverteamcreatedat
serverMetadata: Json; //$stack-link-to:#serverteamservermetadata
listUsers(): Promise<ServerTeamUser[]>; //$stack-link-to:#serverteamlistusers
// NEXT_LINE_PLATFORM react-like
⤷ useUsers(): ServerTeamUser[]; //$stack-link-to:#serverteamuseusers
addUser(userId): Promise<void>; //$stack-link-to:#serverteamadduseruserid
removeUser(userId): Promise<void>; //$stack-link-to:#serverteamremoveuseruserid
delete(): Promise<void>; //$stack-link-to:#serverteamdelete
};`} />
listUsers(): Promise<ServerTeamUser[]>; //$stack-link-to:#serverteamlistusers
// NEXT_LINE_PLATFORM react-like
⤷ useUsers(): ServerTeamUser[]; //$stack-link-to:#serverteamuseusers
addUser(userId): Promise<void>; //$stack-link-to:#serverteamadduseruserid
removeUser(userId): Promise<void>; //$stack-link-to:#serverteamremoveuseruserid
delete(): Promise<void>; //$stack-link-to:#serverteamdelete
};`} />
<CollapsibleTypesSection type="serverTeam" property="createdAt" defaultOpen={false}>
<MethodLayout>