refactor: rename to single package 'newspaperui' for simpler install
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "newspaperui-components",
|
"name": "newspaperui",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Production-grade newspaper layout React components",
|
"description": "Production-grade newspaper layout React components with built-in theme and utilities",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -11,7 +11,8 @@
|
|||||||
"import": "./dist/index.js",
|
"import": "./dist/index.js",
|
||||||
"require": "./dist/index.cjs",
|
"require": "./dist/index.cjs",
|
||||||
"types": "./dist/index.d.ts"
|
"types": "./dist/index.d.ts"
|
||||||
}
|
},
|
||||||
|
"./style.css": "./dist/style.css"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
@@ -22,16 +23,13 @@
|
|||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"test:watch": "vitest",
|
"test:watch": "vitest",
|
||||||
"lint": "tsc --noEmit",
|
"lint": "tsc --noEmit",
|
||||||
"clean": "rm -rf dist"
|
"clean": "rm -rf dist",
|
||||||
|
"prepublishOnly": "pnpm build"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1"
|
"react-dom": "^18.3.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"newspaperui-theme": "workspace:*",
|
|
||||||
"newspaperui-utils": "workspace:*"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@testing-library/react": "^16.1.0",
|
"@testing-library/react": "^16.1.0",
|
||||||
"@testing-library/jest-dom": "^6.6.3",
|
"@testing-library/jest-dom": "^6.6.3",
|
||||||
@@ -59,9 +57,16 @@
|
|||||||
"layout",
|
"layout",
|
||||||
"typography",
|
"typography",
|
||||||
"css-grid",
|
"css-grid",
|
||||||
"multi-column"
|
"multi-column",
|
||||||
|
"indesign",
|
||||||
|
"editorial"
|
||||||
],
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public",
|
||||||
|
"dependencies": {}
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"newspaperui-theme": "workspace:*",
|
||||||
|
"newspaperui-utils": "workspace:*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
Headline,
|
Headline,
|
||||||
Subhead,
|
Subhead,
|
||||||
BodyText,
|
BodyText,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
import { Demo } from '@/components/Demo';
|
import { Demo } from '@/components/Demo';
|
||||||
import { PropsTable } from '@/components/PropsTable';
|
import { PropsTable } from '@/components/PropsTable';
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
Subhead,
|
Subhead,
|
||||||
BodyText,
|
BodyText,
|
||||||
Masthead,
|
Masthead,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
import { Demo } from '@/components/Demo';
|
import { Demo } from '@/components/Demo';
|
||||||
import { PropsTable } from '@/components/PropsTable';
|
import { PropsTable } from '@/components/PropsTable';
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
BodyText,
|
BodyText,
|
||||||
Figure,
|
Figure,
|
||||||
PullQuote,
|
PullQuote,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
import { Demo } from '@/components/Demo';
|
import { Demo } from '@/components/Demo';
|
||||||
import { PropsTable } from '@/components/PropsTable';
|
import { PropsTable } from '@/components/PropsTable';
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
Subhead,
|
Subhead,
|
||||||
BodyText,
|
BodyText,
|
||||||
Rule,
|
Rule,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
import { Demo } from '@/components/Demo';
|
import { Demo } from '@/components/Demo';
|
||||||
import { PropsTable } from '@/components/PropsTable';
|
import { PropsTable } from '@/components/PropsTable';
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
Subhead,
|
Subhead,
|
||||||
BodyText,
|
BodyText,
|
||||||
Rule,
|
Rule,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
import { CodeBlock } from '@/components/CodeBlock';
|
import { CodeBlock } from '@/components/CodeBlock';
|
||||||
|
|
||||||
export default function ResponsivePage() {
|
export default function ResponsivePage() {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
Subhead,
|
Subhead,
|
||||||
BodyText,
|
BodyText,
|
||||||
Rule,
|
Rule,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
import { Demo } from '@/components/Demo';
|
import { Demo } from '@/components/Demo';
|
||||||
|
|
||||||
export default function SpanningPage() {
|
export default function SpanningPage() {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
Headline,
|
Headline,
|
||||||
Subhead,
|
Subhead,
|
||||||
BodyText,
|
BodyText,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
import { Demo } from '@/components/Demo';
|
import { Demo } from '@/components/Demo';
|
||||||
import { PropsTable } from '@/components/PropsTable';
|
import { PropsTable } from '@/components/PropsTable';
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
Byline,
|
Byline,
|
||||||
Dateline,
|
Dateline,
|
||||||
Caption,
|
Caption,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
import { visualWeights, resolveFontSize } from 'newspaperui-theme';
|
import { visualWeights, resolveFontSize } from 'newspaperui-theme';
|
||||||
import { Demo } from '@/components/Demo';
|
import { Demo } from '@/components/Demo';
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
Headline,
|
Headline,
|
||||||
Subhead,
|
Subhead,
|
||||||
BodyText,
|
BodyText,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
import { ThemeToggle } from '@/components/ThemeToggle';
|
import { ThemeToggle } from '@/components/ThemeToggle';
|
||||||
|
|
||||||
interface Swatch {
|
interface Swatch {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
'use client';
|
'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() {
|
export default function EnFeature() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
'use client';
|
'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 jp = { fontFamily: 'var(--font-family-cjk-jp)' };
|
||||||
const jpAccent = { color: 'var(--nui-accent-ink-blue)' };
|
const jpAccent = { color: 'var(--nui-accent-ink-blue)' };
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
import Link from 'next/link';
|
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 = [
|
const blocks = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
'use client';
|
'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 cn = { fontFamily: 'var(--font-family-cjk-serif)' };
|
||||||
const cnRed = { color: 'var(--nui-accent-cjk-red)' };
|
const cnRed = { color: 'var(--nui-accent-cjk-red)' };
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
'use client';
|
'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 cn = { fontFamily: 'var(--font-family-cjk-serif)' };
|
||||||
const cnRed = { color: 'var(--nui-accent-cjk-red)' };
|
const cnRed = { color: 'var(--nui-accent-cjk-red)' };
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
'use client';
|
'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 cn = { fontFamily: 'var(--font-family-cjk-serif)' };
|
||||||
const cnRed = { color: 'var(--nui-accent-cjk-red)' };
|
const cnRed = { color: 'var(--nui-accent-cjk-red)' };
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
Layout, Section, Article, Masthead, Rule,
|
Layout, Section, Article, Masthead, Rule,
|
||||||
Headline, Subhead, Kicker, BodyText, Byline, Dateline, Caption,
|
Headline, Subhead, Kicker, BodyText, Byline, Dateline, Caption,
|
||||||
PullQuote, Footer,
|
PullQuote, Footer,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
|
|
||||||
// ─── Presets ────────────────────────────────────────────────────────────────
|
// ─── Presets ────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
Layout, Section, Article, Masthead,
|
Layout, Section, Article, Masthead,
|
||||||
Headline, Subhead, Kicker, BodyText, Byline, Dateline,
|
Headline, Subhead, Kicker, BodyText, Byline, Dateline,
|
||||||
Figure, PullQuote,
|
Figure, PullQuote,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
|
|
||||||
export default function BlackletterFrontPage() {
|
export default function BlackletterFrontPage() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
Layout, Section, Article, Masthead, Rule,
|
Layout, Section, Article, Masthead, Rule,
|
||||||
Headline, Subhead, Kicker, BodyText, Byline, Dateline,
|
Headline, Subhead, Kicker, BodyText, Byline, Dateline,
|
||||||
Figure, PullQuote,
|
Figure, PullQuote,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
|
|
||||||
export default function FrontPage() {
|
export default function FrontPage() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
Layout, Section, Article, Masthead, Rule, Folio, IndexBox, Factbox,
|
Layout, Section, Article, Masthead, Rule, Folio, IndexBox, Factbox,
|
||||||
Headline, Subhead, Kicker, BodyText, Byline, Dateline,
|
Headline, Subhead, Kicker, BodyText, Byline, Dateline,
|
||||||
Figure, PullQuote, Footer, BreakingNewsBanner,
|
Figure, PullQuote, Footer, BreakingNewsBanner,
|
||||||
} from 'newspaperui-components';
|
} from 'newspaperui';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
export default function LandingPage() {
|
export default function LandingPage() {
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
'use client';
|
'use client';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { usePathname } from 'next/navigation';
|
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 {
|
interface NavItem {
|
||||||
label: string;
|
label: string;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const nextConfig = {
|
|||||||
basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',
|
basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',
|
||||||
images: { unoptimized: true },
|
images: { unoptimized: true },
|
||||||
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
|
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
|
||||||
transpilePackages: ['newspaperui-components', 'newspaperui-theme', 'newspaperui-utils'],
|
transpilePackages: ['newspaperui'],
|
||||||
};
|
};
|
||||||
|
|
||||||
const withMDX = createMDX({
|
const withMDX = createMDX({
|
||||||
|
|||||||
@@ -20,9 +20,8 @@
|
|||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"rehype-pretty-code": "^0.14.3",
|
"rehype-pretty-code": "^0.14.3",
|
||||||
"shiki": "^4.1.0",
|
"shiki": "^4.1.0",
|
||||||
"newspaperui-components": "workspace:*",
|
"newspaperui": "workspace:*",
|
||||||
"newspaperui-theme": "workspace:*",
|
"newspaperui-theme": "workspace:*"
|
||||||
"newspaperui-utils": "workspace:*"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.10.5",
|
"@types/node": "^22.10.5",
|
||||||
|
|||||||
Generated
+1
-4
@@ -96,15 +96,12 @@ importers:
|
|||||||
'@types/mdx':
|
'@types/mdx':
|
||||||
specifier: ^2.0.13
|
specifier: ^2.0.13
|
||||||
version: 2.0.13
|
version: 2.0.13
|
||||||
newspaperui-components:
|
newspaperui:
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../components
|
version: link:../components
|
||||||
newspaperui-theme:
|
newspaperui-theme:
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../theme
|
version: link:../theme
|
||||||
newspaperui-utils:
|
|
||||||
specifier: workspace:*
|
|
||||||
version: link:../utils
|
|
||||||
next:
|
next:
|
||||||
specifier: ^15.1.6
|
specifier: ^15.1.6
|
||||||
version: 15.5.18(@babel/core@7.29.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
version: 15.5.18(@babel/core@7.29.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||||
|
|||||||
Reference in New Issue
Block a user