Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions website/src/app/browser-extension/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Metadata } from 'next';
import { DocSearch } from '../../DocSearch';
import { SideBar } from '../../Sidebar';
import { Sidebar } from '../../sidebar';

export async function generateMetadata(): Promise<Metadata> {
return {
Expand All @@ -13,7 +13,7 @@ export default async function BrowserExtensionPage() {

return (
<>
<SideBar />
<Sidebar />
<div key="Overview" className="docContents">
<DocSearch />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function CallSigDef({
);
}

export function TypeDef({ type, prefix }: { type: Type; prefix?: number }) {
function TypeDef({ type, prefix }: { type: Type; prefix?: number }) {
switch (type.k) {
case TypeKind.Never:
return wrap('primitive', 'never');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Link from 'next/link';
import { MarkdownContent } from './MarkdownContent';
import { MarkdownContent } from '../../../MarkdownContent';
import type { TypeDefs, TypeDoc } from './TypeDefs';

export type OverviewData = {
type OverviewData = {
doc: TypeDoc | null;
api: Array<APIMember>;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Link from 'next/link';
import { Fragment } from 'react';
import { CallSigDef, MemberDef } from './Defs';
import { MarkdownContent } from './MarkdownContent';
import { MarkdownContent } from '../../../MarkdownContent';
import type { MemberDefinition } from './TypeDefs';

export function MemberDoc({ member }: { member: MemberDefinition }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import Link from 'next/link';
import { Fragment, useEffect, useState } from 'react';
import type { TypeDefinition } from './TypeDefs';
import { collectMemberGroups } from './collectMemberGroups';
import { ArrowDown } from './ArrowDown';
import { SIDEBAR_LINKS } from './app/docs/currentVersion';

export type SidebarLinks = Array<{ label: string; url: string }>;
import { ArrowDown } from '../../../ArrowDown';
import { SIDEBAR_LINKS } from '../currentVersion';
import { SidebarLinks } from '../../../sidebar';

function Links({
links,
Expand Down Expand Up @@ -130,7 +129,7 @@ function Focus({
);
}

export function SideBar({
export function SideBarV4({
links = SIDEBAR_LINKS,
focus,
toggleShowInherited,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import { Fragment, useReducer } from 'react';

import { InterfaceDef, CallSigDef } from './Defs';
import { SideBar, SidebarLinks } from './Sidebar';
import { MemberDoc } from './MemberDoc';
import { MarkdownContent } from './MarkdownContent';
import { collectMemberGroups } from './collectMemberGroups';
import type { TypeDefinition, MemberDefinition } from './TypeDefs';
import { DocSearch } from './DocSearch';
import { InterfaceDef, CallSigDef } from '../Defs';
import { SidebarLinks } from '../../../../sidebar';
import { SideBarV4 } from '../SidebarV4';
import { MemberDoc } from '../MemberDoc';
import { MarkdownContent } from '../../../../MarkdownContent';
import { collectMemberGroups } from '../collectMemberGroups';
import type { TypeDefinition, MemberDefinition } from '../TypeDefs';
import { DocSearch } from '../../../../DocSearch';

const typeDefURL =
'https://github.com/immutable-js/immutable-js/blob/main/type-definitions/immutable.d.ts';
Expand Down Expand Up @@ -46,7 +47,7 @@ export function TypeDocumentation({

return (
<>
<SideBar
<SideBarV4
links={sidebarLinks}
focus={def}
toggleShowInherited={toggleShowInherited}
Expand Down
8 changes: 4 additions & 4 deletions website/src/app/docs/[version]/[type]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getSidebarLinks } from '../../../../getSidebarLinks';
import { getTypeDefs } from '../../../../static/getTypeDefs';
import { getSidebarLinks } from '../getSidebarLinks';
import { getTypeDefs } from '../getTypeDefs';
import { getVersionFromGitTag } from '../../../../static/getVersions';
import { TypeDocumentation } from '../../../../TypeDocumentation';
import { getVersionFromParams } from '../../../getVersionFromParams';
import { TypeDocumentation } from './TypeDocumentation';
import { getVersionFromParams } from '../getVersionFromParams';
import { VERSION } from '../../currentVersion';

export async function generateStaticParams() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { TypeDefs } from './TypeDefs';
import { SidebarLinks } from './Sidebar';
import { SidebarLinks } from '../../../sidebar';

export function getSidebarLinks(defs: TypeDefs): SidebarLinks {
return Object.values(defs.types).map(({ label, url }) => ({ label, url }));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {
TypeDoc,
TypeKind,
MemberDefinition,
} from '../TypeDefs';
import { markdown, MarkdownContext } from './markdown';
import { stripUndefineds } from './stripUndefineds';
} from './TypeDefs';
import { markdown, MarkdownContext } from '../../../static/markdown';
import { stripUndefineds } from '../../../static/stripUndefineds';

const generatedTypeDefs = new Map<string, TypeDefs>();
export function getTypeDefs(version: string) {
Expand Down
2 changes: 1 addition & 1 deletion website/src/app/docs/[version]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DocHeader } from '../../../DocHeader';
import { ImmutableConsole } from '../../../ImmutableConsole';
import { getVersions } from '../../../static/getVersions';
import { getVersionFromParams } from '../../getVersionFromParams';
import { getVersionFromParams } from './getVersionFromParams';

export default async function VersionLayout(props: {
children: React.ReactNode;
Expand Down
12 changes: 6 additions & 6 deletions website/src/app/docs/[version]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Metadata } from 'next';
import { getVersionFromGitTag } from '../../../static/getVersions';
import { getTypeDefs } from '../../../static/getTypeDefs';
import { DocOverview, getOverviewData } from '../../../DocOverview';
import { getTypeDefs } from './getTypeDefs';
import { DocOverview, getOverviewData } from './DocOverview';
import { DocSearch } from '../../../DocSearch';
import { SideBar } from '../../../Sidebar';
import { getSidebarLinks } from '../../../getSidebarLinks';
import { getVersionFromParams } from '../../getVersionFromParams';
import { SideBarV4 } from './SidebarV4';
import { getSidebarLinks } from './getSidebarLinks';
import { getVersionFromParams } from './getVersionFromParams';
import { VERSION } from '../currentVersion';

export async function generateStaticParams() {
Expand Down Expand Up @@ -45,7 +45,7 @@ export default async function OverviewDocPage(props: Props) {

return (
<>
<SideBar links={sidebarLinks} />
<SideBarV4 links={sidebarLinks} />
<div key="Overview" className="docContents">
<DocSearch />
<h1 className="mainTitle">Immutable.js ({version})</h1>
Expand Down
Loading