Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
65f8ceb
bump dependencies to support React 19
seshagiriprabhu Aug 8, 2026
19b7da9
update rollup and tsconfig for new dependency versions
seshagiriprabhu Aug 8, 2026
6d70f69
migrate storybook config to v10 with Vite builder
seshagiriprabhu Aug 8, 2026
373e7d8
update source code for React 19 and Storybook 10 compatibility
seshagiriprabhu Aug 8, 2026
6f5c507
update eslint config and CI workflow
seshagiriprabhu Aug 8, 2026
c9fad42
migrate eslint to flat config (v9+)
seshagiriprabhu Aug 8, 2026
d55fdc3
add prettier with import sorting and format source files
seshagiriprabhu Aug 8, 2026
09517bf
add husky and lint-staged with pre-commit and pre-push hooks
seshagiriprabhu Aug 8, 2026
2c4faff
fix build warnings: silence sass legacy API, update tsconfig lib, add…
seshagiriprabhu Aug 8, 2026
705528f
upgrade all dependencies to latest semver-safe versions
seshagiriprabhu Aug 8, 2026
ab01c95
update CI workflow
seshagiriprabhu Aug 8, 2026
34c10bd
replace storybook-dark-mode with globalTypes theme switcher
seshagiriprabhu Aug 8, 2026
45b0efd
add MDX documentation for MarkdownEditor and MarkdownViewer stories
seshagiriprabhu Aug 8, 2026
5fb6dbd
add dev script and @storybook/addon-docs, remove storybook-dark-mode
seshagiriprabhu Aug 8, 2026
6287f58
fix MarkdownViewer not re-rendering on theme change
seshagiriprabhu Aug 8, 2026
b23c9cf
remove import/order eslint rule and reformat with prettier
seshagiriprabhu Aug 8, 2026
080bed4
Bumped up the version of the react-github-markdown to v1.0.0-beta.5
seshagiriprabhu Aug 8, 2026
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
35 changes: 0 additions & 35 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ about: Create a report to help us improve
title: 'Bug: '
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: 'Feature: '
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
79 changes: 75 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches:
- main
workflow_dispatch:
branches:
- main
push:
branches:
- main
Expand All @@ -15,16 +13,89 @@ jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v7

- name: Setup node
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm

- name: Install modules
run: npm install

- name: Run ESLint
run: npm run lint

prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup node
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm

- name: Install modules
run: npm install

- name: Run Prettier
run: npm run format-check

typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v7

- name: Setup node
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm

- name: Install modules
run: npm install

- name: Run Type checks
run: npm run type-check

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup node
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm

- name: Install modules
run: npm install

- name: Build
run: npm run build

storybook:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup node
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm

- name: Install modules
run: npm install

- name: Build Storybook
run: npm run build-storybook
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
5 changes: 5 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
npm run format-check
npm run lint
npm run type-check
npm run build
npm run build-storybook
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Don't format these folders
node_modules
build
dist
storybook-static
# Don't format these files
package-lock.json
yarn.lock
.env
.env.local
20 changes: 20 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"printWidth": 100,
"trailingComma": "es5",
"plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"],
"importOrder": [
"^react$",
"<THIRD_PARTY_MODULES>",
"^@/(.*)$",
"^\\.\\.(?!/?$)",
"^\\.\\./?$",
"^\\./(?=.*/)(?!/?$)",
"^\\.(?!/?$)",
"^\\./?$"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}
23 changes: 23 additions & 0 deletions .storybook/decorators.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React, { useEffect } from 'react';

import { useGlobals } from 'storybook/preview-api';

const withTheme = () => {
return (story: any, context: any) => {
const [globals] = useGlobals();
const isDarkMode = globals.theme === 'dark';

useEffect(() => {
document.body.style.backgroundColor = isDarkMode ? '#1a1a1a' : '#ffffff';
document.body.style.color = isDarkMode ? '#f0f0f0' : '#1a1a1a';
}, [isDarkMode]);

return (
<div style={{ padding: '1.5rem' }}>
{story({ ...context, args: { ...context.args, isDarkTheme: isDarkMode } })}
</div>
);
};
};

export const decorators = [withTheme()];
29 changes: 0 additions & 29 deletions .storybook/main.cjs

This file was deleted.

16 changes: 16 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-docs', '@storybook/addon-a11y', '@storybook/addon-links'],
framework: '@storybook/react-vite',
viteFinal: (config) => {
config.build = {
...config.build,
chunkSizeWarningLimit: 2000,
};
return config;
},
};

export default config;
23 changes: 0 additions & 23 deletions .storybook/preview.js

This file was deleted.

74 changes: 74 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import React, { useEffect, useState } from 'react';

import { DocsContainer } from '@storybook/addon-docs/blocks';
import type { Preview } from '@storybook/react-vite';
import { GLOBALS_UPDATED } from 'storybook/internal/core-events';
import { themes } from 'storybook/theming';

export { decorators } from './decorators';

const ThemedDocsContainer = ({ children, context, ...rest }: any) => {
const [isDark, setIsDark] = useState(() => {
try {
return (
context?.store?.globals?.globals?.theme === 'dark' ||
context?.store?.userGlobals?.globals?.theme === 'dark' ||
context?.globals?.theme === 'dark'
);
} catch {
return false;
}
});

useEffect(() => {
const channel = context?.channel;
if (!channel) return;

const update = (event: any) => {
setIsDark(event?.globals?.theme === 'dark');
};

channel.on(GLOBALS_UPDATED, update);
return () => channel.off(GLOBALS_UPDATED, update);
}, [context]);

return (
<DocsContainer {...rest} context={context} theme={isDark ? themes.dark : themes.light}>
{children}
</DocsContainer>
);
};

const preview: Preview = {
globalTypes: {
theme: {
description: 'Global theme',
toolbar: {
title: 'Theme',
icon: 'paintbrush',
items: [
{ value: 'light', icon: 'sun', title: 'Light' },
{ value: 'dark', icon: 'moon', title: 'Dark' },
],
dynamicTitle: true,
},
},
},
initialGlobals: {
theme: 'light',
},
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
backgrounds: { disabled: true },
docs: {
container: ThemedDocsContainer,
},
},
};

export default preview;
Loading