@devilsdev/rag-pipeline-utils 2.0.1 → 2.1.1

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.
Files changed (71) hide show
  1. package/.eslintrc.json +24 -18
  2. package/.github/workflows/docs-deploy.yml +20 -10
  3. package/.github/workflows/publish-release-blog.yml +8 -6
  4. package/.github/workflows/storybook-deploy.yml +33 -0
  5. package/.storybook/main.js +20 -0
  6. package/.storybook/preview.js +13 -0
  7. package/CHANGELOG.md +15 -0
  8. package/README.md +1 -1
  9. package/docs-site/.plaiceholder-cache/img_hero.jpg.json +1 -0
  10. package/docs-site/.plaiceholder-cache/img_logo.png.json +1 -0
  11. package/docs-site/.storybook/preview.js +8 -0
  12. package/docs-site/blog/2025-04-17-release-v2.0.2.md +13 -0
  13. package/docs-site/blog/2025-04-18-architecture-overview.md +34 -0
  14. package/docs-site/blog/2025-04-18-release-v2.1.0.md +13 -0
  15. package/docs-site/blog/2025-04-19-prompt-engineering-best-practices.md +31 -0
  16. package/docs-site/blog/2025-04-20-image-showcase.md +23 -0
  17. package/docs-site/blog/authors.yml +2 -2
  18. package/docs-site/blog/tags.yml +22 -19
  19. package/docs-site/docs/Architecture.md +4 -4
  20. package/docs-site/docs/CLI.md +3 -3
  21. package/docs-site/docs/Evaluation.md +7 -7
  22. package/docs-site/docs/FAQ.md +6 -6
  23. package/docs-site/docs/Introduction.md +9 -9
  24. package/docs-site/docs/Plugins.md +3 -3
  25. package/docs-site/docs/Tutorials.md +106 -0
  26. package/docs-site/docs/Usage.md +5 -5
  27. package/docs-site/docs/Use-Cases.md +77 -0
  28. package/docs-site/docs/components/BlogCardExample.mdx +7 -0
  29. package/docs-site/docusaurus.config.js +3 -2
  30. package/docs-site/package-lock.json +487 -2
  31. package/docs-site/package.json +7 -3
  32. package/docs-site/scripts/generate-placeholders.js +17 -0
  33. package/docs-site/scripts/watch-images.js +40 -0
  34. package/docs-site/sidebar-snippet.txt +5 -0
  35. package/docs-site/sidebars.js +6 -1
  36. package/docs-site/src/components/BlogCard.jsx +31 -0
  37. package/docs-site/src/components/BlogCard.stories.jsx +34 -0
  38. package/docs-site/src/components/BlogImage.jsx +58 -0
  39. package/docs-site/src/components/BlogImage.stories.jsx +20 -0
  40. package/docs-site/static/img/authors/ali.jpg +0 -0
  41. package/docs-site/static/img/hero.jpg +0 -0
  42. package/docs-site/utils/image.js +19 -0
  43. package/package.json +19 -3
  44. package/src/stories/Button.jsx +39 -0
  45. package/src/stories/Button.stories.js +49 -0
  46. package/src/stories/Configure.mdx +364 -0
  47. package/src/stories/Header.jsx +56 -0
  48. package/src/stories/Header.stories.js +29 -0
  49. package/src/stories/Page.jsx +69 -0
  50. package/src/stories/Page.stories.js +28 -0
  51. package/src/stories/assets/accessibility.png +0 -0
  52. package/src/stories/assets/accessibility.svg +1 -0
  53. package/src/stories/assets/addon-library.png +0 -0
  54. package/src/stories/assets/assets.png +0 -0
  55. package/src/stories/assets/avif-test-image.avif +0 -0
  56. package/src/stories/assets/context.png +0 -0
  57. package/src/stories/assets/discord.svg +1 -0
  58. package/src/stories/assets/docs.png +0 -0
  59. package/src/stories/assets/figma-plugin.png +0 -0
  60. package/src/stories/assets/github.svg +1 -0
  61. package/src/stories/assets/share.png +0 -0
  62. package/src/stories/assets/styling.png +0 -0
  63. package/src/stories/assets/testing.png +0 -0
  64. package/src/stories/assets/theming.png +0 -0
  65. package/src/stories/assets/tutorials.svg +1 -0
  66. package/src/stories/assets/youtube.svg +1 -0
  67. package/src/stories/button.css +30 -0
  68. package/src/stories/header.css +32 -0
  69. package/src/stories/page.css +68 -0
  70. package/docs-site/docs/USE_CASES.md +0 -0
  71. /package/{USE_CASES.md → Use-Cases.md} +0 -0
@@ -0,0 +1,31 @@
1
+ // Version: 1.0.0
2
+ // Description: Blog card with image placeholder using Plaiceholder LQIP
3
+ // Author: Ali Kahwaji
4
+
5
+ import React from 'react';
6
+ import styles from './BlogCard.module.css';
7
+ import placeholder from '../../.plaiceholder-cache/img_hero.jpg.json'; // ✅ Cached placeholder
8
+
9
+ export default function BlogCard({ title }) {
10
+ const { base64, img } = placeholder;
11
+
12
+ return (
13
+ <div className={styles.card}>
14
+ <img
15
+ src={img.src}
16
+ width={img.width}
17
+ height={img.height}
18
+ alt={title}
19
+ loading="lazy"
20
+ style={{
21
+ objectFit: 'cover',
22
+ borderRadius: 12,
23
+ background: `url(${base64})`,
24
+ backgroundSize: 'cover',
25
+ backgroundPosition: 'center',
26
+ }}
27
+ />
28
+ <h3>{title}</h3>
29
+ </div>
30
+ );
31
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Version: 1.0.0
3
+ * File: BlogCard.stories.jsx
4
+ * Description: Storybook entry for BlogCard with image placeholder integration
5
+ * Author: Ali Kahwaji
6
+ */
7
+
8
+ import React from 'react';
9
+ import BlogCard from './BlogCard';
10
+
11
+ export default {
12
+ title: 'Components/BlogCard',
13
+ component: BlogCard,
14
+ tags: ['autodocs'],
15
+ args: {
16
+ title: 'Composable Pipelines',
17
+ image: 'img/hero.jpg', // Path relative to /static
18
+ },
19
+ };
20
+
21
+ const Template = (args) => <BlogCard {...args} />;
22
+
23
+ export const Default = Template.bind({});
24
+
25
+ export const CustomTitle = Template.bind({});
26
+ CustomTitle.args = {
27
+ title: 'Flexible RAG Components',
28
+ };
29
+
30
+ export const WithAnotherImage = Template.bind({});
31
+ WithAnotherImage.args = {
32
+ title: 'LLM Plugin Architecture',
33
+ image: 'img/social-card.jpg',
34
+ };
@@ -0,0 +1,58 @@
1
+ // docs-site/src/components/BlogImage.jsx
2
+ // Version: 2.0.0
3
+ // Description: Resilient image renderer with LQIP blur fallback from Plaiceholder cache
4
+ // Author: Ali Kahwaji
5
+
6
+ import React from 'react';
7
+ import PropTypes from 'prop-types';
8
+ import defaultPlaceholder from '../../.plaiceholder-cache/img_hero.jpg.json'; // Default fallback image
9
+
10
+ /**
11
+ * BlogImage
12
+ * Renders an image using precomputed LQIP placeholders
13
+ *
14
+ * @param {string} srcKey - Cache key (e.g., 'img_logo') without .json
15
+ * @param {string} alt - Image alt text
16
+ * @param {string} [className] - Optional className for custom styling
17
+ * @param {object} [style] - Optional inline styles
18
+ * @returns {JSX.Element}
19
+ */
20
+ export default function BlogImage({ srcKey, alt, className = '', style = {} }) {
21
+ let imageData;
22
+
23
+ try {
24
+ imageData = require(`../../.plaiceholder-cache/${srcKey}.json`);
25
+ } catch (e) {
26
+ console.warn(`⚠️ LQIP not found for ${srcKey}, using fallback.`);
27
+ imageData = defaultPlaceholder;
28
+ }
29
+
30
+ const { base64, img } = imageData;
31
+
32
+ return (
33
+ <img
34
+ src={img.src}
35
+ width={img.width}
36
+ height={img.height}
37
+ alt={alt}
38
+ loading="lazy"
39
+ className={className}
40
+ style={{
41
+ objectFit: 'cover',
42
+ background: `url(${base64})`,
43
+ backgroundSize: 'cover',
44
+ backgroundPosition: 'center',
45
+ borderRadius: '12px',
46
+ transition: 'opacity 0.3s ease',
47
+ ...style,
48
+ }}
49
+ />
50
+ );
51
+ }
52
+
53
+ BlogImage.propTypes = {
54
+ srcKey: PropTypes.string.isRequired,
55
+ alt: PropTypes.string.isRequired,
56
+ className: PropTypes.string,
57
+ style: PropTypes.object,
58
+ };
@@ -0,0 +1,20 @@
1
+ // Version: 1.0.0
2
+ // Description: Storybook story for BlogImage component
3
+ // Author: Ali Kahwaji
4
+
5
+ import React from 'react';
6
+ import BlogImage from '../BlogImage';
7
+
8
+ export default {
9
+ title: 'Components/BlogImage',
10
+ component: BlogImage,
11
+ };
12
+
13
+ const Template = (args) => <BlogImage {...args} />;
14
+
15
+ export const Default = Template.bind({});
16
+ Default.args = {
17
+ srcKey: 'img_hero',
18
+ alt: 'Default placeholder image',
19
+ className: '',
20
+ };
Binary file
@@ -0,0 +1,19 @@
1
+ // docs-site/utils/image.js
2
+ import { getPlaiceholder } from 'plaiceholder';
3
+ import fs from 'fs/promises';
4
+ import path from 'path';
5
+
6
+ /**
7
+ * Generates base64 placeholder and img props from local image file
8
+ * @param {string} imagePath - Relative path to image in /static/img
9
+ */
10
+ export async function generatePlaceholder(imagePath) {
11
+ const fullPath = path.join(process.cwd(), 'docs-site', 'static', imagePath);
12
+ const buffer = await fs.readFile(fullPath);
13
+ const { base64, img } = await getPlaiceholder(buffer);
14
+
15
+ return {
16
+ ...img,
17
+ blurDataURL: base64,
18
+ };
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devilsdev/rag-pipeline-utils",
3
- "version": "2.0.1",
3
+ "version": "2.1.1",
4
4
  "description": "A modular toolkit for building RAG (Retrieval-Augmented Generation) pipelines in Node.js",
5
5
  "main": "src/core/create-pipeline.js",
6
6
  "bin": {
@@ -22,7 +22,10 @@
22
22
  "docs:dev": "npx docusaurus start docs-site",
23
23
  "docs:build": "npx docusaurus build docs-site",
24
24
  "docs:deploy": "npx docusaurus deploy docs-site",
25
- "docs:version": "npx docusaurus docs:version"
25
+ "docs:version": "npx docusaurus docs:version",
26
+ "docs:serve": "npx docusaurus serve docs-site",
27
+ "storybook": "storybook dev -p 6006",
28
+ "build-storybook": "storybook build"
26
29
  },
27
30
  "lint-staged": {
28
31
  "**/*.{js,ts}": [
@@ -61,18 +64,29 @@
61
64
  "@semantic-release/github": "^9.2.6",
62
65
  "@semantic-release/npm": "^11.0.3",
63
66
  "@semantic-release/release-notes-generator": "^14.0.3",
67
+ "@storybook/addon-essentials": "^8.6.12",
68
+ "@storybook/addon-interactions": "^8.6.12",
69
+ "@storybook/addon-onboarding": "^8.6.12",
70
+ "@storybook/addon-webpack5-compiler-swc": "^3.0.0",
71
+ "@storybook/blocks": "^8.6.12",
72
+ "@storybook/react": "^8.6.12",
73
+ "@storybook/react-webpack5": "^8.6.12",
74
+ "@storybook/test": "^8.6.12",
64
75
  "@types/jest": "^29.5.14",
65
76
  "codecov": "^3.8.2",
66
77
  "cross-env": "^7.0.3",
67
78
  "docusaurus": "^1.14.7",
68
79
  "esbuild": "^0.25.2",
69
80
  "eslint": "^8.57.1",
81
+ "eslint-plugin-storybook": "^0.12.0",
70
82
  "husky": "^8.0.3",
71
83
  "jest": "^29.7.0",
72
84
  "lint-staged": "^15.5.1",
73
85
  "prettier": "^3.5.3",
86
+ "prop-types": "^15.8.1",
74
87
  "rimraf": "^6.0.1",
75
88
  "semantic-release": "^21.1.2",
89
+ "storybook": "^8.6.12",
76
90
  "ts-jest": "^29.3.2"
77
91
  },
78
92
  "dependencies": {
@@ -85,6 +99,8 @@
85
99
  "fast-glob": "^3.3.3",
86
100
  "jsdom": "^26.1.0",
87
101
  "openai": "^4.93.0",
88
- "pino": "^9.6.0"
102
+ "pino": "^9.6.0",
103
+ "plaiceholder": "^3.0.0",
104
+ "sharp": "^0.34.1"
89
105
  }
90
106
  }
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+
3
+ import PropTypes from 'prop-types';
4
+
5
+ import './button.css';
6
+
7
+ /** Primary UI component for user interaction */
8
+ export const Button = ({
9
+ primary = false,
10
+ backgroundColor = null,
11
+ size = 'medium',
12
+ label,
13
+ ...props
14
+ }) => {
15
+ const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
16
+ return (
17
+ <button
18
+ type="button"
19
+ className={['storybook-button', `storybook-button--${size}`, mode].join(' ')}
20
+ style={backgroundColor && { backgroundColor }}
21
+ {...props}
22
+ >
23
+ {label}
24
+ </button>
25
+ );
26
+ };
27
+
28
+ Button.propTypes = {
29
+ /** Is this the principal call to action on the page? */
30
+ primary: PropTypes.bool,
31
+ /** What background color to use */
32
+ backgroundColor: PropTypes.string,
33
+ /** How large should the button be? */
34
+ size: PropTypes.oneOf(['small', 'medium', 'large']),
35
+ /** Button contents */
36
+ label: PropTypes.string.isRequired,
37
+ /** Optional click handler */
38
+ onClick: PropTypes.func,
39
+ };
@@ -0,0 +1,49 @@
1
+ import { fn } from '@storybook/test';
2
+
3
+ import { Button } from './Button';
4
+
5
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
6
+ export default {
7
+ title: 'Example/Button',
8
+ component: Button,
9
+ parameters: {
10
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
11
+ layout: 'centered',
12
+ },
13
+ // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
14
+ tags: ['autodocs'],
15
+ // More on argTypes: https://storybook.js.org/docs/api/argtypes
16
+ argTypes: {
17
+ backgroundColor: { control: 'color' },
18
+ },
19
+ // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
20
+ args: { onClick: fn() },
21
+ };
22
+
23
+ // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
24
+ export const Primary = {
25
+ args: {
26
+ primary: true,
27
+ label: 'Button',
28
+ },
29
+ };
30
+
31
+ export const Secondary = {
32
+ args: {
33
+ label: 'Button',
34
+ },
35
+ };
36
+
37
+ export const Large = {
38
+ args: {
39
+ size: 'large',
40
+ label: 'Button',
41
+ },
42
+ };
43
+
44
+ export const Small = {
45
+ args: {
46
+ size: 'small',
47
+ label: 'Button',
48
+ },
49
+ };
@@ -0,0 +1,364 @@
1
+ import { Meta } from "@storybook/blocks";
2
+
3
+ import Github from "./assets/github.svg";
4
+ import Discord from "./assets/discord.svg";
5
+ import Youtube from "./assets/youtube.svg";
6
+ import Tutorials from "./assets/tutorials.svg";
7
+ import Styling from "./assets/styling.png";
8
+ import Context from "./assets/context.png";
9
+ import Assets from "./assets/assets.png";
10
+ import Docs from "./assets/docs.png";
11
+ import Share from "./assets/share.png";
12
+ import FigmaPlugin from "./assets/figma-plugin.png";
13
+ import Testing from "./assets/testing.png";
14
+ import Accessibility from "./assets/accessibility.png";
15
+ import Theming from "./assets/theming.png";
16
+ import AddonLibrary from "./assets/addon-library.png";
17
+
18
+ export const RightArrow = () => <svg
19
+ viewBox="0 0 14 14"
20
+ width="8px"
21
+ height="14px"
22
+ style={{
23
+ marginLeft: '4px',
24
+ display: 'inline-block',
25
+ shapeRendering: 'inherit',
26
+ verticalAlign: 'middle',
27
+ fill: 'currentColor',
28
+ 'path fill': 'currentColor'
29
+ }}
30
+ >
31
+ <path d="m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z" />
32
+ </svg>
33
+
34
+ <Meta title="Configure your project" />
35
+
36
+ <div className="sb-container">
37
+ <div className='sb-section-title'>
38
+ # Configure your project
39
+
40
+ Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community.
41
+ </div>
42
+ <div className="sb-section">
43
+ <div className="sb-section-item">
44
+ <img
45
+ src={Styling}
46
+ alt="A wall of logos representing different styling technologies"
47
+ />
48
+ <h4 className="sb-section-item-heading">Add styling and CSS</h4>
49
+ <p className="sb-section-item-paragraph">Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook.</p>
50
+ <a
51
+ href="https://storybook.js.org/docs/configure/styling-and-css/?renderer=react"
52
+ target="_blank"
53
+ >Learn more<RightArrow /></a>
54
+ </div>
55
+ <div className="sb-section-item">
56
+ <img
57
+ src={Context}
58
+ alt="An abstraction representing the composition of data for a component"
59
+ />
60
+ <h4 className="sb-section-item-heading">Provide context and mocking</h4>
61
+ <p className="sb-section-item-paragraph">Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available.</p>
62
+ <a
63
+ href="https://storybook.js.org/docs/writing-stories/decorators/?renderer=react#context-for-mocking"
64
+ target="_blank"
65
+ >Learn more<RightArrow /></a>
66
+ </div>
67
+ <div className="sb-section-item">
68
+ <img src={Assets} alt="A representation of typography and image assets" />
69
+ <div>
70
+ <h4 className="sb-section-item-heading">Load assets and resources</h4>
71
+ <p className="sb-section-item-paragraph">To link static files (like fonts) to your projects and stories, use the
72
+ `staticDirs` configuration option to specify folders to load when
73
+ starting Storybook.</p>
74
+ <a
75
+ href="https://storybook.js.org/docs/configure/images-and-assets/?renderer=react"
76
+ target="_blank"
77
+ >Learn more<RightArrow /></a>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ <div className="sb-container">
83
+ <div className='sb-section-title'>
84
+ # Do more with Storybook
85
+
86
+ Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs.
87
+ </div>
88
+
89
+ <div className="sb-section">
90
+ <div className="sb-features-grid">
91
+ <div className="sb-grid-item">
92
+ <img src={Docs} alt="A screenshot showing the autodocs tag being set, pointing a docs page being generated" />
93
+ <h4 className="sb-section-item-heading">Autodocs</h4>
94
+ <p className="sb-section-item-paragraph">Auto-generate living,
95
+ interactive reference documentation from your components and stories.</p>
96
+ <a
97
+ href="https://storybook.js.org/docs/writing-docs/autodocs/?renderer=react"
98
+ target="_blank"
99
+ >Learn more<RightArrow /></a>
100
+ </div>
101
+ <div className="sb-grid-item">
102
+ <img src={Share} alt="A browser window showing a Storybook being published to a chromatic.com URL" />
103
+ <h4 className="sb-section-item-heading">Publish to Chromatic</h4>
104
+ <p className="sb-section-item-paragraph">Publish your Storybook to review and collaborate with your entire team.</p>
105
+ <a
106
+ href="https://storybook.js.org/docs/sharing/publish-storybook/?renderer=react#publish-storybook-with-chromatic"
107
+ target="_blank"
108
+ >Learn more<RightArrow /></a>
109
+ </div>
110
+ <div className="sb-grid-item">
111
+ <img src={FigmaPlugin} alt="Windows showing the Storybook plugin in Figma" />
112
+ <h4 className="sb-section-item-heading">Figma Plugin</h4>
113
+ <p className="sb-section-item-paragraph">Embed your stories into Figma to cross-reference the design and live
114
+ implementation in one place.</p>
115
+ <a
116
+ href="https://storybook.js.org/docs/sharing/design-integrations/?renderer=react#embed-storybook-in-figma-with-the-plugin"
117
+ target="_blank"
118
+ >Learn more<RightArrow /></a>
119
+ </div>
120
+ <div className="sb-grid-item">
121
+ <img src={Testing} alt="Screenshot of tests passing and failing" />
122
+ <h4 className="sb-section-item-heading">Testing</h4>
123
+ <p className="sb-section-item-paragraph">Use stories to test a component in all its variations, no matter how
124
+ complex.</p>
125
+ <a
126
+ href="https://storybook.js.org/docs/writing-tests/?renderer=react"
127
+ target="_blank"
128
+ >Learn more<RightArrow /></a>
129
+ </div>
130
+ <div className="sb-grid-item">
131
+ <img src={Accessibility} alt="Screenshot of accessibility tests passing and failing" />
132
+ <h4 className="sb-section-item-heading">Accessibility</h4>
133
+ <p className="sb-section-item-paragraph">Automatically test your components for a11y issues as you develop.</p>
134
+ <a
135
+ href="https://storybook.js.org/docs/writing-tests/accessibility-testing/?renderer=react"
136
+ target="_blank"
137
+ >Learn more<RightArrow /></a>
138
+ </div>
139
+ <div className="sb-grid-item">
140
+ <img src={Theming} alt="Screenshot of Storybook in light and dark mode" />
141
+ <h4 className="sb-section-item-heading">Theming</h4>
142
+ <p className="sb-section-item-paragraph">Theme Storybook's UI to personalize it to your project.</p>
143
+ <a
144
+ href="https://storybook.js.org/docs/configure/theming/?renderer=react"
145
+ target="_blank"
146
+ >Learn more<RightArrow /></a>
147
+ </div>
148
+ </div>
149
+ </div>
150
+ </div>
151
+ <div className='sb-addon'>
152
+ <div className='sb-addon-text'>
153
+ <h4>Addons</h4>
154
+ <p className="sb-section-item-paragraph">Integrate your tools with Storybook to connect workflows.</p>
155
+ <a
156
+ href="https://storybook.js.org/addons/"
157
+ target="_blank"
158
+ >Discover all addons<RightArrow /></a>
159
+ </div>
160
+ <div className='sb-addon-img'>
161
+ <img src={AddonLibrary} alt="Integrate your tools with Storybook to connect workflows." />
162
+ </div>
163
+ </div>
164
+
165
+ <div className="sb-section sb-socials">
166
+ <div className="sb-section-item">
167
+ <img src={Github} alt="Github logo" className="sb-explore-image"/>
168
+ Join our contributors building the future of UI development.
169
+
170
+ <a
171
+ href="https://github.com/storybookjs/storybook"
172
+ target="_blank"
173
+ >Star on GitHub<RightArrow /></a>
174
+ </div>
175
+ <div className="sb-section-item">
176
+ <img src={Discord} alt="Discord logo" className="sb-explore-image"/>
177
+ <div>
178
+ Get support and chat with frontend developers.
179
+
180
+ <a
181
+ href="https://discord.gg/storybook"
182
+ target="_blank"
183
+ >Join Discord server<RightArrow /></a>
184
+ </div>
185
+ </div>
186
+ <div className="sb-section-item">
187
+ <img src={Youtube} alt="Youtube logo" className="sb-explore-image"/>
188
+ <div>
189
+ Watch tutorials, feature previews and interviews.
190
+
191
+ <a
192
+ href="https://www.youtube.com/@chromaticui"
193
+ target="_blank"
194
+ >Watch on YouTube<RightArrow /></a>
195
+ </div>
196
+ </div>
197
+ <div className="sb-section-item">
198
+ <img src={Tutorials} alt="A book" className="sb-explore-image"/>
199
+ <p>Follow guided walkthroughs on for key workflows.</p>
200
+
201
+ <a
202
+ href="https://storybook.js.org/tutorials/"
203
+ target="_blank"
204
+ >Discover tutorials<RightArrow /></a>
205
+ </div>
206
+ </div>
207
+
208
+ <style>
209
+ {`
210
+ .sb-container {
211
+ margin-bottom: 48px;
212
+ }
213
+
214
+ .sb-section {
215
+ width: 100%;
216
+ display: flex;
217
+ flex-direction: row;
218
+ gap: 20px;
219
+ }
220
+
221
+ img {
222
+ object-fit: cover;
223
+ }
224
+
225
+ .sb-section-title {
226
+ margin-bottom: 32px;
227
+ }
228
+
229
+ .sb-section a:not(h1 a, h2 a, h3 a) {
230
+ font-size: 14px;
231
+ }
232
+
233
+ .sb-section-item, .sb-grid-item {
234
+ flex: 1;
235
+ display: flex;
236
+ flex-direction: column;
237
+ }
238
+
239
+ .sb-section-item-heading {
240
+ padding-top: 20px !important;
241
+ padding-bottom: 5px !important;
242
+ margin: 0 !important;
243
+ }
244
+ .sb-section-item-paragraph {
245
+ margin: 0;
246
+ padding-bottom: 10px;
247
+ }
248
+
249
+ .sb-chevron {
250
+ margin-left: 5px;
251
+ }
252
+
253
+ .sb-features-grid {
254
+ display: grid;
255
+ grid-template-columns: repeat(2, 1fr);
256
+ grid-gap: 32px 20px;
257
+ }
258
+
259
+ .sb-socials {
260
+ display: grid;
261
+ grid-template-columns: repeat(4, 1fr);
262
+ }
263
+
264
+ .sb-socials p {
265
+ margin-bottom: 10px;
266
+ }
267
+
268
+ .sb-explore-image {
269
+ max-height: 32px;
270
+ align-self: flex-start;
271
+ }
272
+
273
+ .sb-addon {
274
+ width: 100%;
275
+ display: flex;
276
+ align-items: center;
277
+ position: relative;
278
+ background-color: #EEF3F8;
279
+ border-radius: 5px;
280
+ border: 1px solid rgba(0, 0, 0, 0.05);
281
+ background: #EEF3F8;
282
+ height: 180px;
283
+ margin-bottom: 48px;
284
+ overflow: hidden;
285
+ }
286
+
287
+ .sb-addon-text {
288
+ padding-left: 48px;
289
+ max-width: 240px;
290
+ }
291
+
292
+ .sb-addon-text h4 {
293
+ padding-top: 0px;
294
+ }
295
+
296
+ .sb-addon-img {
297
+ position: absolute;
298
+ left: 345px;
299
+ top: 0;
300
+ height: 100%;
301
+ width: 200%;
302
+ overflow: hidden;
303
+ }
304
+
305
+ .sb-addon-img img {
306
+ width: 650px;
307
+ transform: rotate(-15deg);
308
+ margin-left: 40px;
309
+ margin-top: -72px;
310
+ box-shadow: 0 0 1px rgba(255, 255, 255, 0);
311
+ backface-visibility: hidden;
312
+ }
313
+
314
+ @media screen and (max-width: 800px) {
315
+ .sb-addon-img {
316
+ left: 300px;
317
+ }
318
+ }
319
+
320
+ @media screen and (max-width: 600px) {
321
+ .sb-section {
322
+ flex-direction: column;
323
+ }
324
+
325
+ .sb-features-grid {
326
+ grid-template-columns: repeat(1, 1fr);
327
+ }
328
+
329
+ .sb-socials {
330
+ grid-template-columns: repeat(2, 1fr);
331
+ }
332
+
333
+ .sb-addon {
334
+ height: 280px;
335
+ align-items: flex-start;
336
+ padding-top: 32px;
337
+ overflow: hidden;
338
+ }
339
+
340
+ .sb-addon-text {
341
+ padding-left: 24px;
342
+ }
343
+
344
+ .sb-addon-img {
345
+ right: 0;
346
+ left: 0;
347
+ top: 130px;
348
+ bottom: 0;
349
+ overflow: hidden;
350
+ height: auto;
351
+ width: 124%;
352
+ }
353
+
354
+ .sb-addon-img img {
355
+ width: 1200px;
356
+ transform: rotate(-12deg);
357
+ margin-left: 0;
358
+ margin-top: 48px;
359
+ margin-bottom: -40px;
360
+ margin-left: -24px;
361
+ }
362
+ }
363
+ `}
364
+ </style>