@mjpvs/agentic-component-library-test 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/components/ArticleCard/ArticleCard.d.ts +18 -0
- package/dist/components/ArticleCard/ArticleCard.stories.d.ts +8 -0
- package/dist/components/ArticleCard/index.d.ts +2 -0
- package/dist/components/ArticleList/ArticleList.d.ts +7 -0
- package/dist/components/ArticleList/ArticleList.stories.d.ts +8 -0
- package/dist/components/ArticleList/index.d.ts +2 -0
- package/dist/components/Blockquote/Blockquote.d.ts +6 -0
- package/dist/components/Blockquote/Blockquote.stories.d.ts +7 -0
- package/dist/components/Blockquote/index.d.ts +2 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +7 -0
- package/dist/components/CodeBlock/CodeBlock.stories.d.ts +9 -0
- package/dist/components/CodeBlock/index.d.ts +2 -0
- package/dist/components/Footer/Footer.d.ts +6 -0
- package/dist/components/Footer/Footer.stories.d.ts +8 -0
- package/dist/components/Footer/index.d.ts +2 -0
- package/dist/components/Header/Header.d.ts +6 -0
- package/dist/components/Header/Header.stories.d.ts +8 -0
- package/dist/components/Header/index.d.ts +2 -0
- package/dist/components/Image/Image.d.ts +11 -0
- package/dist/components/Image/Image.stories.d.ts +9 -0
- package/dist/components/Image/index.d.ts +2 -0
- package/dist/components/Link/Link.d.ts +7 -0
- package/dist/components/Link/Link.stories.d.ts +8 -0
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/Main/Main.d.ts +5 -0
- package/dist/components/Main/Main.stories.d.ts +7 -0
- package/dist/components/Main/index.d.ts +2 -0
- package/dist/components/Meta/Meta.d.ts +7 -0
- package/dist/components/Meta/Meta.stories.d.ts +9 -0
- package/dist/components/Meta/index.d.ts +3 -0
- package/dist/components/Meta/utils.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +7 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +9 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/RichText/RichText.d.ts +5 -0
- package/dist/components/RichText/RichText.stories.d.ts +12 -0
- package/dist/components/RichText/index.d.ts +2 -0
- package/dist/components/Tag/Tag.d.ts +6 -0
- package/dist/components/Tag/Tag.stories.d.ts +7 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/TagList/TagList.d.ts +6 -0
- package/dist/components/TagList/TagList.stories.d.ts +7 -0
- package/dist/components/TagList/index.d.ts +2 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +2834 -586
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# React Component Library
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@mjpvs/agentic-component-library-test)
|
|
3
4
|
[](https://github.com/your-org/your-repo/actions)
|
|
4
5
|
|
|
5
6
|
A modern React component library built with TypeScript, Storybook, and Vitest. Generated entirely agentically as a learning experiment to explore automated component library creation.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ArticleCardProps {
|
|
2
|
+
title: string;
|
|
3
|
+
excerpt?: string;
|
|
4
|
+
href: string;
|
|
5
|
+
image?: {
|
|
6
|
+
src: string;
|
|
7
|
+
alt: string;
|
|
8
|
+
};
|
|
9
|
+
date?: string | Date;
|
|
10
|
+
author?: string;
|
|
11
|
+
readingTime?: number;
|
|
12
|
+
tags?: Array<{
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
href?: string;
|
|
15
|
+
}>;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function ArticleCard({ title, excerpt, href, image, date, author, readingTime, tags, className, }: ArticleCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ArticleCard } from './ArticleCard';
|
|
3
|
+
declare const meta: Meta<typeof ArticleCard>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ArticleCard>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Full: Story;
|
|
8
|
+
export declare const NoImage: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ArticleCardProps } from '../ArticleCard/ArticleCard';
|
|
2
|
+
export interface ArticleListProps {
|
|
3
|
+
articles: ArticleCardProps[];
|
|
4
|
+
columns?: 1 | 2 | 3 | 4;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function ArticleList({ articles, columns, className, }: ArticleListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { ArticleList } from './ArticleList';
|
|
3
|
+
declare const meta: Meta<typeof ArticleList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ArticleList>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const TwoColumns: Story;
|
|
8
|
+
export declare const SingleColumn: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Blockquote } from './Blockquote';
|
|
3
|
+
declare const meta: Meta<typeof Blockquote>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Blockquote>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithCite: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface CodeBlockProps {
|
|
2
|
+
code: string;
|
|
3
|
+
language?: string;
|
|
4
|
+
showLineNumbers?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function CodeBlock({ code, language, showLineNumbers, className, }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { CodeBlock } from './CodeBlock';
|
|
3
|
+
declare const meta: Meta<typeof CodeBlock>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof CodeBlock>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLanguage: Story;
|
|
8
|
+
export declare const WithLineNumbers: Story;
|
|
9
|
+
export declare const Python: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Footer } from './Footer';
|
|
3
|
+
declare const meta: Meta<typeof Footer>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Footer>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithCustomCopyright: Story;
|
|
8
|
+
export declare const WithNavigation: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Header } from './Header';
|
|
3
|
+
declare const meta: Meta<typeof Header>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Header>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithNavigation: Story;
|
|
8
|
+
export declare const LogoOnly: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ImageProps {
|
|
2
|
+
src: string;
|
|
3
|
+
alt: string;
|
|
4
|
+
caption?: string;
|
|
5
|
+
width?: number | string;
|
|
6
|
+
height?: number | string;
|
|
7
|
+
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
8
|
+
loading?: 'lazy' | 'eager';
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function Image({ src, alt, caption, width, height, objectFit, loading, className, }: ImageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Image } from './Image';
|
|
3
|
+
declare const meta: Meta<typeof Image>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Image>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithCaption: Story;
|
|
8
|
+
export declare const LazyLoading: Story;
|
|
9
|
+
export declare const CustomSize: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Link } from './Link';
|
|
3
|
+
declare const meta: Meta<typeof Link>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Link>;
|
|
6
|
+
export declare const Internal: Story;
|
|
7
|
+
export declare const External: Story;
|
|
8
|
+
export declare const WithoutIcon: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta as StorybookMeta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Meta } from './Meta';
|
|
3
|
+
declare const meta: StorybookMeta<typeof Meta>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Meta>;
|
|
6
|
+
export declare const DateOnly: Story;
|
|
7
|
+
export declare const DateAndAuthor: Story;
|
|
8
|
+
export declare const Full: Story;
|
|
9
|
+
export declare const ReadingTimeOnly: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface PaginationProps {
|
|
2
|
+
currentPage: number;
|
|
3
|
+
totalPages: number;
|
|
4
|
+
getPageUrl: (page: number) => string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function Pagination({ currentPage, totalPages, getPageUrl, className, }: PaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Pagination } from './Pagination';
|
|
3
|
+
declare const meta: Meta<typeof Pagination>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Pagination>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const MiddlePage: Story;
|
|
8
|
+
export declare const LastPage: Story;
|
|
9
|
+
export declare const ManyPages: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { RichText } from './RichText';
|
|
3
|
+
declare const meta: Meta<typeof RichText>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof RichText>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLink: Story;
|
|
8
|
+
export declare const WithImage: Story;
|
|
9
|
+
export declare const WithVideo: Story;
|
|
10
|
+
export declare const WithCode: Story;
|
|
11
|
+
export declare const WithBlockquote: Story;
|
|
12
|
+
export declare const Complex: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { TagList } from './TagList';
|
|
3
|
+
declare const meta: Meta<typeof TagList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof TagList>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLinks: Story;
|
package/dist/index.d.ts
CHANGED
|
@@ -14,3 +14,31 @@ export { Container } from './components/Container';
|
|
|
14
14
|
export type { ContainerProps } from './components/Container';
|
|
15
15
|
export { Video } from './components/Video';
|
|
16
16
|
export type { VideoProps } from './components/Video';
|
|
17
|
+
export { Link } from './components/Link';
|
|
18
|
+
export type { LinkProps } from './components/Link';
|
|
19
|
+
export { Header } from './components/Header';
|
|
20
|
+
export type { HeaderProps } from './components/Header';
|
|
21
|
+
export { Pagination } from './components/Pagination';
|
|
22
|
+
export type { PaginationProps } from './components/Pagination';
|
|
23
|
+
export { Tag } from './components/Tag';
|
|
24
|
+
export type { TagProps } from './components/Tag';
|
|
25
|
+
export { TagList } from './components/TagList';
|
|
26
|
+
export type { TagListProps } from './components/TagList';
|
|
27
|
+
export { Image } from './components/Image';
|
|
28
|
+
export type { ImageProps } from './components/Image';
|
|
29
|
+
export { RichText } from './components/RichText';
|
|
30
|
+
export type { RichTextProps } from './components/RichText';
|
|
31
|
+
export { Main } from './components/Main';
|
|
32
|
+
export type { MainProps } from './components/Main';
|
|
33
|
+
export { Footer } from './components/Footer';
|
|
34
|
+
export type { FooterProps } from './components/Footer';
|
|
35
|
+
export { Blockquote } from './components/Blockquote';
|
|
36
|
+
export type { BlockquoteProps } from './components/Blockquote';
|
|
37
|
+
export { CodeBlock } from './components/CodeBlock';
|
|
38
|
+
export type { CodeBlockProps } from './components/CodeBlock';
|
|
39
|
+
export { Meta, calculateReadingTimeFromHtml } from './components/Meta';
|
|
40
|
+
export type { MetaProps } from './components/Meta';
|
|
41
|
+
export { ArticleCard } from './components/ArticleCard';
|
|
42
|
+
export type { ArticleCardProps } from './components/ArticleCard';
|
|
43
|
+
export { ArticleList } from './components/ArticleList';
|
|
44
|
+
export type { ArticleListProps } from './components/ArticleList';
|