refactor: rename to single package 'newspaperui' for simpler install
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
Headline,
|
||||
Subhead,
|
||||
BodyText,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
import { Demo } from '@/components/Demo';
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Subhead,
|
||||
BodyText,
|
||||
Masthead,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
import { Demo } from '@/components/Demo';
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
BodyText,
|
||||
Figure,
|
||||
PullQuote,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
import { Demo } from '@/components/Demo';
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Subhead,
|
||||
BodyText,
|
||||
Rule,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
import { Demo } from '@/components/Demo';
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Subhead,
|
||||
BodyText,
|
||||
Rule,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
import { CodeBlock } from '@/components/CodeBlock';
|
||||
|
||||
export default function ResponsivePage() {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Subhead,
|
||||
BodyText,
|
||||
Rule,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
import { Demo } from '@/components/Demo';
|
||||
|
||||
export default function SpanningPage() {
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
Headline,
|
||||
Subhead,
|
||||
BodyText,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
import { Demo } from '@/components/Demo';
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
Byline,
|
||||
Dateline,
|
||||
Caption,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
import { visualWeights, resolveFontSize } from 'newspaperui-theme';
|
||||
import { Demo } from '@/components/Demo';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
Headline,
|
||||
Subhead,
|
||||
BodyText,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
import { ThemeToggle } from '@/components/ThemeToggle';
|
||||
|
||||
interface Swatch {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import { Layout, Section, Article, Rule, Headline, Subhead, Kicker, BodyText, Byline, Dateline, Figure, PullQuote } from 'newspaperui-components';
|
||||
import { Layout, Section, Article, Rule, Headline, Subhead, Kicker, BodyText, Byline, Dateline, Figure, PullQuote } from 'newspaperui';
|
||||
|
||||
export default function EnFeature() {
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import { Layout, Section, Article, Rule, BodyText, Figure } from 'newspaperui-components';
|
||||
import { Layout, Section, Article, Rule, BodyText, Figure } from 'newspaperui';
|
||||
|
||||
const jp = { fontFamily: 'var(--font-family-cjk-jp)' };
|
||||
const jpAccent = { color: 'var(--nui-accent-ink-blue)' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
import Link from 'next/link';
|
||||
import { Layout, Section, Article, Headline, Subhead, Kicker } from 'newspaperui-components';
|
||||
import { Layout, Section, Article, Headline, Subhead, Kicker } from 'newspaperui';
|
||||
|
||||
const blocks = [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import { Layout, Section, Article, Rule, BodyText, Quote } from 'newspaperui-components';
|
||||
import { Layout, Section, Article, Rule, BodyText, Quote } from 'newspaperui';
|
||||
|
||||
const cn = { fontFamily: 'var(--font-family-cjk-serif)' };
|
||||
const cnRed = { color: 'var(--nui-accent-cjk-red)' };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import { Layout, Section, Article, BodyText, Quote, Figure, PullQuote } from 'newspaperui-components';
|
||||
import { Layout, Section, Article, BodyText, Quote, Figure, PullQuote } from 'newspaperui';
|
||||
|
||||
const cn = { fontFamily: 'var(--font-family-cjk-serif)' };
|
||||
const cnRed = { color: 'var(--nui-accent-cjk-red)' };
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client';
|
||||
import { Layout, Section, Article, Rule, BodyText, Figure } from 'newspaperui-components';
|
||||
import { Layout, Section, Article, Rule, BodyText, Figure } from 'newspaperui';
|
||||
|
||||
const cn = { fontFamily: 'var(--font-family-cjk-serif)' };
|
||||
const cnRed = { color: 'var(--nui-accent-cjk-red)' };
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
Layout, Section, Article, Masthead, Rule,
|
||||
Headline, Subhead, Kicker, BodyText, Byline, Dateline, Caption,
|
||||
PullQuote, Footer,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
|
||||
// ─── Presets ────────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
Layout, Section, Article, Masthead,
|
||||
Headline, Subhead, Kicker, BodyText, Byline, Dateline,
|
||||
Figure, PullQuote,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
|
||||
export default function BlackletterFrontPage() {
|
||||
return (
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
Layout, Section, Article, Masthead, Rule,
|
||||
Headline, Subhead, Kicker, BodyText, Byline, Dateline,
|
||||
Figure, PullQuote,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
|
||||
export default function FrontPage() {
|
||||
return (
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
Layout, Section, Article, Masthead, Rule, Folio, IndexBox, Factbox,
|
||||
Headline, Subhead, Kicker, BodyText, Byline, Dateline,
|
||||
Figure, PullQuote, Footer, BreakingNewsBanner,
|
||||
} from 'newspaperui-components';
|
||||
} from 'newspaperui';
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function LandingPage() {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
'use client';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { cx } from 'newspaperui-utils';
|
||||
|
||||
function cx(...args: (string | false | null | undefined)[]): string {
|
||||
return args.filter(Boolean).join(' ');
|
||||
}
|
||||
|
||||
interface NavItem {
|
||||
label: string;
|
||||
|
||||
@@ -7,7 +7,7 @@ const nextConfig = {
|
||||
basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',
|
||||
images: { unoptimized: true },
|
||||
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
|
||||
transpilePackages: ['newspaperui-components', 'newspaperui-theme', 'newspaperui-utils'],
|
||||
transpilePackages: ['newspaperui'],
|
||||
};
|
||||
|
||||
const withMDX = createMDX({
|
||||
|
||||
@@ -20,9 +20,8 @@
|
||||
"react-dom": "^18.3.1",
|
||||
"rehype-pretty-code": "^0.14.3",
|
||||
"shiki": "^4.1.0",
|
||||
"newspaperui-components": "workspace:*",
|
||||
"newspaperui-theme": "workspace:*",
|
||||
"newspaperui-utils": "workspace:*"
|
||||
"newspaperui": "workspace:*",
|
||||
"newspaperui-theme": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.10.5",
|
||||
|
||||
Reference in New Issue
Block a user