├── .gitattributes
├── .github
├── CODEOWNERS
├── CODE_OF_CONDUCT.md
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── actions
│ ├── check-quality
│ │ └── action.yml
│ └── setup-project
│ │ └── action.yml
└── workflows
│ ├── deploy-pages.yml
│ ├── quality.yml
│ └── update-deps.yml
├── .gitignore
├── .vscode
├── extensions.json
└── settings.json
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── biome.json
├── examples
└── react
│ ├── .storylite
│ ├── canvas.tsx
│ ├── config.tsx
│ └── index.tsx
│ ├── README.md
│ ├── canvas.html
│ ├── index.html
│ ├── package.json
│ ├── public
│ └── logo.svg
│ ├── src
│ ├── components
│ │ ├── ForwardRefButton.tsx
│ │ └── LinkableBtn.tsx
│ └── styles
│ │ ├── components.css
│ │ ├── storylite-iframe.css
│ │ └── storylite-ui.css
│ ├── stories
│ ├── buttons.stories.tsx
│ ├── forwardref.stories.tsx
│ └── index.stories.tsx
│ ├── tsconfig.json
│ └── vite.config.ts
├── jest.config.js
├── jest.env-browser.js
├── lerna.json
├── nx.json
├── package.json
├── packages
├── docs
│ ├── .storylite
│ │ ├── canvas.tsx
│ │ ├── config.tsx
│ │ └── index.tsx
│ ├── README.md
│ ├── canvas.html
│ ├── index.html
│ ├── package.json
│ ├── public
│ │ └── logo.svg
│ ├── src
│ │ ├── components
│ │ │ └── LinkableBtn.tsx
│ │ └── styles
│ │ │ ├── components.css
│ │ │ ├── storylite-iframe.css
│ │ │ └── storylite-ui.css
│ ├── stories
│ │ ├── buttons.stories.tsx
│ │ └── index.stories.mdx
│ ├── tsconfig.json
│ └── vite.config.ts
├── storylite
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── assets
│ │ ├── logo.svg
│ │ └── lucide
│ │ │ ├── LICENSE
│ │ │ └── svg
│ │ │ ├── bookmark.svg
│ │ │ ├── box-select.svg
│ │ │ ├── box.svg
│ │ │ ├── contrast.svg
│ │ │ ├── expand.svg
│ │ │ ├── external-link.svg
│ │ │ ├── github.svg
│ │ │ ├── grid-3x3.svg
│ │ │ ├── minus-square.svg
│ │ │ ├── monitor-smartphone.svg
│ │ │ ├── moon.svg
│ │ │ ├── plus-square.svg
│ │ │ ├── sun.svg
│ │ │ ├── x-circle.svg
│ │ │ └── zap.svg
│ ├── declaration.d.ts
│ ├── package.json
│ ├── screenshot.png
│ ├── src
│ │ ├── app
│ │ │ ├── index.test.tsx
│ │ │ ├── index.tsx
│ │ │ ├── renderApp.tsx
│ │ │ ├── routes.ts
│ │ │ └── stores
│ │ │ │ ├── DefaultTitle.tsx
│ │ │ │ ├── global.ts
│ │ │ │ └── global.types.ts
│ │ ├── components
│ │ │ ├── Btn.tsx
│ │ │ ├── InlineHtml.tsx
│ │ │ ├── Story.tsx
│ │ │ ├── addons
│ │ │ │ └── getToolbarAddons.tsx
│ │ │ ├── canvas
│ │ │ │ ├── CanvasIframe.tsx
│ │ │ │ ├── CanvasIframeBody.tsx
│ │ │ │ └── CanvasRoot.tsx
│ │ │ ├── layouts
│ │ │ │ ├── ErrorLayout.tsx
│ │ │ │ ├── IframeLayout.tsx
│ │ │ │ └── TopFrameLayout.tsx
│ │ │ ├── sidebar
│ │ │ │ ├── Sidebar.tsx
│ │ │ │ └── SidebarTitle.tsx
│ │ │ └── toolbar
│ │ │ │ ├── Toolbar.tsx
│ │ │ │ └── ToolbarAddon.tsx
│ │ ├── hooks
│ │ │ └── useDetectTheme.ts
│ │ ├── index.ts
│ │ ├── pages
│ │ │ ├── 404.tsx
│ │ │ ├── index.tsx
│ │ │ ├── preview
│ │ │ │ ├── index.tsx
│ │ │ │ └── story.tsx
│ │ │ └── stories
│ │ │ │ └── story.tsx
│ │ ├── services
│ │ │ ├── csf-api
│ │ │ │ └── navigation.tsx
│ │ │ ├── messenger
│ │ │ │ ├── index.ts
│ │ │ │ ├── useWindowMessenger.ts
│ │ │ │ ├── windowMessaging.ts
│ │ │ │ └── windowMessaging.types.ts
│ │ │ ├── renderer
│ │ │ │ └── react.tsx
│ │ │ ├── router
│ │ │ │ ├── createStoryLiteRouter.tsx
│ │ │ │ ├── getStoryLiteBasePath.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── router.class.ts
│ │ │ │ ├── router.component.tsx
│ │ │ │ ├── router.parser.test.tsx
│ │ │ │ ├── router.parser.ts
│ │ │ │ ├── router.store.tsx
│ │ │ │ └── router.types.ts
│ │ │ └── storage
│ │ │ │ └── localStorage.ts
│ │ ├── styles
│ │ │ ├── addons
│ │ │ │ ├── grid.css
│ │ │ │ ├── maximize.css
│ │ │ │ ├── outline.css
│ │ │ │ └── responsive.css
│ │ │ ├── base.css
│ │ │ ├── components
│ │ │ │ ├── btn.css
│ │ │ │ ├── sidebar.css
│ │ │ │ ├── stories.css
│ │ │ │ └── toolbar.css
│ │ │ ├── dark.css
│ │ │ ├── iframe.css
│ │ │ ├── index.css
│ │ │ ├── layouts.css
│ │ │ ├── mobile.css
│ │ │ └── variables.css
│ │ ├── types
│ │ │ ├── components.ts
│ │ │ ├── config.ts
│ │ │ ├── core.ts
│ │ │ ├── index.ts
│ │ │ ├── parameters.ts
│ │ │ ├── story.ts
│ │ │ └── ui.ts
│ │ └── utility
│ │ │ ├── index.ts
│ │ │ └── parametersToDataProps.ts
│ ├── tsconfig.json
│ └── tsup.config.ts
└── vite-plugin
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── package.json
│ ├── src
│ ├── index.ts
│ ├── plugin.ts
│ ├── story-collector.ts
│ ├── types.ts
│ └── virtual-modules.d.ts
│ ├── tsconfig.json
│ └── tsup.config.ts
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
└── tsconfig.json
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto eol=lf
2 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @itsjavi
2 |
--------------------------------------------------------------------------------
/.github/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our community a
6 | harassment-free experience for everyone, regardless of age, body size, visible or invisible
7 | disability, ethnicity, sex characteristics, gender identity and expression, level of experience,
8 | education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or
9 | sexual identity and orientation.
10 |
11 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and
12 | healthy community.
13 |
14 | ## Our Standards
15 |
16 | Examples of behavior that contributes to a positive environment for our community include:
17 |
18 | - Demonstrating empathy and kindness toward other people
19 | - Being respectful of differing opinions, viewpoints, and experiences
20 | - Giving and gracefully accepting constructive feedback
21 | - Accepting responsibility and apologizing to those affected by our mistakes, and learning from the
22 | experience
23 | - Focusing on what is best not just for us as individuals, but for the overall community
24 |
25 | Examples of unacceptable behavior include:
26 |
27 | - The use of sexualized language or imagery, and sexual attention or advances of any kind
28 | - Trolling, insulting or derogatory comments, and personal or political attacks
29 | - Public or private harassment
30 | - Publishing others' private information, such as a physical or email address, without their
31 | explicit permission
32 | - Other conduct which could reasonably be considered inappropriate in a professional setting
33 |
34 | ## Enforcement Responsibilities
35 |
36 | Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior
37 | and will take appropriate and fair corrective action in response to any behavior that they deem
38 | inappropriate, threatening, offensive, or harmful.
39 |
40 | Community leaders have the right and responsibility to remove, edit, or reject comments, commits,
41 | code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and
42 | will communicate reasons for moderation decisions when appropriate.
43 |
44 | ## Scope
45 |
46 | This Code of Conduct applies within all community spaces, and also applies when an individual is
47 | officially representing the community in public spaces. Examples of representing our community
48 | include using an official e-mail address, posting via an official social media account, or acting as
49 | an appointed representative at an online or offline event.
50 |
51 | ## Enforcement
52 |
53 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community
54 | leaders responsible for enforcement via private message on Twitter/X to @itsjavidotcom.
55 |
56 | All complaints will be reviewed and investigated promptly and fairly.
57 |
58 | All community leaders are obligated to respect the privacy and security of the reporter of any
59 | incident.
60 |
61 | ## Enforcement Guidelines
62 |
63 | Community leaders will follow these Community Impact Guidelines in determining the consequences for
64 | any action they deem in violation of this Code of Conduct:
65 |
66 | ### 1. Correction
67 |
68 | **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or
69 | unwelcome in the community.
70 |
71 | **Consequence**: A private, written warning from community leaders, providing clarity around the
72 | nature of the violation and an explanation of why the behavior was inappropriate. A public apology
73 | may be requested.
74 |
75 | ### 2. Warning
76 |
77 | **Community Impact**: A violation through a single incident or series of actions.
78 |
79 | **Consequence**: A warning with consequences for continued behavior. No interaction with the people
80 | involved, including unsolicited interaction with those enforcing the Code of Conduct, for a
81 | specified period of time. This includes avoiding interactions in community spaces as well as
82 | external channels like social media. Violating these terms may lead to a temporary or permanent ban.
83 |
84 | ### 3. Temporary Ban
85 |
86 | **Community Impact**: A serious violation of community standards, including sustained inappropriate
87 | behavior.
88 |
89 | **Consequence**: A temporary ban from any sort of interaction or public communication with the
90 | community for a specified period of time. No public or private interaction with the people involved,
91 | including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this
92 | period. Violating these terms may lead to a permanent ban.
93 |
94 | ### 4. Permanent Ban
95 |
96 | **Community Impact**: Demonstrating a pattern of violation of community standards, including
97 | sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement
98 | of classes of individuals.
99 |
100 | **Consequence**: A permanent ban from any sort of public interaction within the community.
101 |
102 | ## Attribution
103 |
104 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at
105 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
106 |
107 | Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement
108 | ladder][Mozilla CoC].
109 |
110 | For answers to common questions about this code of conduct, see the FAQ at
111 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
112 | [https://www.contributor-covenant.org/translations][translations].
113 |
114 | [homepage]: https://www.contributor-covenant.org
115 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
116 | [Mozilla CoC]: https://github.com/mozilla/diversity
117 | [FAQ]: https://www.contributor-covenant.org/faq
118 | [translations]: https://www.contributor-covenant.org/translations
119 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [itsjavi]
4 | ko_fi: itsjavi
5 | custom: ['https://paypal.me/itsjavidotcom/5', 'https://paypal.me/itsjavidotcom/10']
6 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve this project
4 | title: ''
5 | labels: needs triage
6 | assignees: ''
7 | ---
8 |
9 | **Describe the bug**
10 |
11 | A clear and concise description of what the bug is.
12 |
13 | **Reproduction**
14 |
15 | Please, try to reproduce your issue with [Stackblitz](https://stackblitz.com/) or similar. Your
16 | issue will get much higher priority since it can be triaged efficiently.
17 |
18 | Alternatively, create a repository reproducing the issue.
19 |
20 | **Environment**
21 |
22 | - OS with version: [e.g. iOS 15.2]
23 | - Browser with version [e.g. Chrome 101]
24 | - JS Runtime with version: [e.g. NodeJS 18.5]
25 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: needs triage
6 | assignees: ''
7 | ---
8 |
9 | **Description**
10 |
11 | **Is your feature request related to a problem with an existing feature? Please describe.** A clear
12 | and concise description of what the problem is, e.g.: I'd like that feature X allows me to [...]"
13 |
14 | **Is your feature request related to an improvement? Please describe.** A clear and concise
15 | description of the new feature, e.g. "I'd like to be able to [...]"
16 |
17 | **Desired Behaviour**
18 |
19 | Describe the solution you'd like. A clear and concise description of what you want to happen, and
20 | how you would like the feature to work.
21 |
22 | **Considered Alternatives**
23 |
24 | Describe alternatives you've considered. A clear and concise description of any alternative
25 | solutions or features you've considered.
26 |
27 | **Additional context**
28 |
29 | Add any other context or screenshots about the feature request here.
30 |
--------------------------------------------------------------------------------
/.github/actions/check-quality/action.yml:
--------------------------------------------------------------------------------
1 | name: 'Check code quality'
2 | description: 'Checks code quality: formatter, linters, build and test'
3 | runs:
4 | using: 'composite'
5 | steps:
6 | - shell: bash
7 | run: pnpm type-check
8 |
9 | - shell: bash
10 | run: pnpm lint
11 |
12 | - shell: bash
13 | run: pnpm build
14 |
15 | - shell: bash
16 | run: pnpm publint
17 |
18 | - shell: bash
19 | run: pnpm test:ci
20 |
--------------------------------------------------------------------------------
/.github/actions/setup-project/action.yml:
--------------------------------------------------------------------------------
1 | name: 'Setup project'
2 | description: 'Sets up project and its dependencies'
3 | runs:
4 | using: 'composite'
5 | steps:
6 | - uses: pnpm/action-setup@v3
7 | with:
8 | version: ${{ env.PNPM_VERSION }}
9 | run_install: false
10 |
11 | - uses: actions/setup-node@v4
12 | with:
13 | node-version: ${{ env.NODE_VERSION }}
14 | # registry-url: https://npm.pkg.github.com
15 | cache: 'pnpm'
16 | cache-dependency-path: './pnpm-lock.yaml'
17 |
18 | - shell: bash
19 | run: pnpm install --frozen-lockfile
20 |
--------------------------------------------------------------------------------
/.github/workflows/deploy-pages.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to Github Pages
2 |
3 | env:
4 | NODE_VERSION: '>=20.5.0'
5 | PNPM_VERSION: 8.8
6 |
7 | on:
8 | workflow_dispatch:
9 | push:
10 | branches: ['main']
11 |
12 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13 | permissions:
14 | contents: read
15 | pages: write
16 | id-token: write
17 |
18 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20 | concurrency:
21 | group: 'pages'
22 | cancel-in-progress: false
23 |
24 | jobs:
25 | # Build job
26 | build:
27 | runs-on: ubuntu-latest
28 | steps:
29 | - uses: actions/checkout@v4
30 |
31 | - name: 'Setup project'
32 | uses: ./.github/actions/setup-project
33 |
34 | - name: 'Check code quality'
35 | uses: ./.github/actions/check-quality
36 |
37 | - name: Setup Pages
38 | uses: actions/configure-pages@v4
39 |
40 | - name: Build with Vite
41 | run: |
42 | pnpm -r run build
43 | ls -la ./packages/docs/dist
44 | echo "Moving dist to _site"
45 | rm -rf _site && mv ./packages/docs/dist ./_site
46 | ls -la ./_site
47 |
48 | - name: Upload artifact
49 | uses: actions/upload-pages-artifact@v2
50 |
51 | # Deployment job
52 | deploy:
53 | environment:
54 | name: github-pages
55 | url: ${{ steps.deployment.outputs.page_url }}
56 | runs-on: ubuntu-latest
57 | needs: build
58 | steps:
59 | - name: Deploy to GitHub Pages
60 | id: deployment
61 | uses: actions/deploy-pages@v2
62 |
--------------------------------------------------------------------------------
/.github/workflows/quality.yml:
--------------------------------------------------------------------------------
1 | name: Quality Checks
2 |
3 | env:
4 | NODE_VERSION: '>=20.5.0'
5 | PNPM_VERSION: 8.8
6 |
7 | on:
8 | push:
9 | branches:
10 | - 'main'
11 | pull_request:
12 | branches:
13 | - main
14 |
15 | concurrency:
16 | group: checkCodeQuality-${{ github.ref }}
17 | cancel-in-progress: true
18 |
19 | jobs:
20 | checkCodeQuality:
21 | name: 'Lint, Build & Test'
22 | runs-on: ubuntu-latest
23 | steps:
24 | - uses: actions/checkout@v4
25 |
26 | - name: 'Setup project'
27 | uses: ./.github/actions/setup-project
28 |
29 | - name: 'Check code quality'
30 | uses: ./.github/actions/check-quality
31 |
32 | - name: Upload coverage reports to Codecov
33 | uses: codecov/codecov-action@v4
34 | with:
35 | directory: ./
36 | token: ${{ secrets.CODECOV_TOKEN }}
37 |
--------------------------------------------------------------------------------
/.github/workflows/update-deps.yml:
--------------------------------------------------------------------------------
1 | name: Update dependencies
2 |
3 | env:
4 | NODE_VERSION: '>=20.5.0'
5 | PNPM_VERSION: 8.8
6 |
7 | on:
8 | schedule:
9 | - cron: 0 16 * * * # every day at 16pm
10 | workflow_dispatch:
11 |
12 | concurrency:
13 | group: updateDependencies-${{ github.ref }}
14 | cancel-in-progress: true
15 |
16 | jobs:
17 | updateDependencies:
18 | name: 'Update dependencies'
19 | runs-on: ubuntu-latest
20 | outputs:
21 | has_changes: ${{ steps.git_diff.outputs.has_changes }}
22 | steps:
23 | - uses: actions/checkout@v4
24 | with:
25 | fetch-depth: 0 # fetch all history so that git diff can compare against HEAD~1
26 |
27 | - name: 'Setup project'
28 | uses: ./.github/actions/setup-project
29 |
30 | - name: 'Update all dependencies'
31 | run: pnpm -r update --latest
32 |
33 | - name: 'Check code quality'
34 | uses: ./.github/actions/check-quality
35 |
36 | - name: Compare Changes
37 | id: git_diff
38 | run: |
39 | git status
40 | changes=$(git diff --name-only HEAD~0)
41 | echo "Changed Files: $changes"
42 | if [[ -n "$changes" ]]; then
43 | echo "has_changes=yes" >> "$GITHUB_OUTPUT"
44 | else
45 | echo "has_changes=" >> "$GITHUB_OUTPUT"
46 | fi
47 |
48 | - name: Install jq
49 | if: ${{ steps.git_diff.outputs.has_changes == 'yes' }}
50 | run: |
51 | sudo apt-get update
52 | sudo apt-get install -y jq
53 |
54 | - name: Check for existing PR
55 | id: check_open_pr
56 | if: ${{ steps.git_diff.outputs.has_changes == 'yes' }}
57 | env:
58 | GH_TOKEN: ${{ github.token }}
59 | run: |
60 | pr_number=$(gh pr list --state open --label "update-deps" --json number --jq '.[0].number')
61 | echo "pr_number=${pr_number:-0}" >> "$GITHUB_OUTPUT"
62 |
63 | - name: Create PR if not exists
64 | id: create_pr
65 | if:
66 | ${{ steps.git_diff.outputs.has_changes == 'yes' && steps.check_open_pr.outputs.pr_number
67 | == 0 }}
68 | env:
69 | GH_TOKEN: ${{ github.token }} # make sure your GITHUB_TOKEN has PR creation permissions under "Workflow Permissions" of your repo Actions settings
70 | run: |
71 | # Prepare git
72 | git config --global user.email "noreply@github.com"
73 | git config --global user.name "Github Actions"
74 | git branch -u origin/main main
75 | # Create branch, commit and PR
76 | branch_name="update-deps/$(date +'%Y%m%d-%H%M%S')"
77 | git checkout -b $branch_name
78 | git add -A
79 | git commit -m "chore(deps): update to latest versions"
80 | git push origin $branch_name
81 | gh pr create --title "chore: update dependencies 🪄" --base main --head $branch_name --label "update-deps" \
82 | --body "This PR updates all package dependencies to their latest version. Please review the changes and merge if everything looks good."
83 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 | .pnp
6 | .pnp.js
7 | .pnpm-store
8 |
9 | # testing
10 | coverage
11 | .coverage
12 |
13 | # misc
14 | .DS_Store
15 | *.pem
16 |
17 | # debug
18 | npm-debug.log*
19 | yarn-debug.log*
20 | yarn-error.log*
21 | .pnpm-debug.log*
22 |
23 | # local env files
24 | .env.local
25 | .env.development.local
26 | .env.test.local
27 | .env.production.local
28 |
29 | # caches
30 | .turbo/
31 | .next/
32 | .cache/
33 | .eslintcache
34 | v8-compile-cache-*
35 | .pnpm-store/
36 |
37 | # builds
38 | dist
39 | build
40 | *.tsbuildinfo
41 |
42 | # other
43 | .vercel/
44 | .local/
45 | .history/
46 |
47 | .vscode/pinned-files.json
48 | .nx/
49 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["biomejs.biome"]
3 | }
4 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.wordWrapColumn": 120,
3 | "editor.rulers": [120],
4 | "editor.fontSize": 14,
5 | "files.autoSave": "onFocusChange",
6 | "testing.automaticallyOpenPeekView": "failureInVisibleDocument",
7 | "files.exclude": {
8 | "*/*/node_modules": false,
9 | "**/.git": true,
10 | "**/.svn": true,
11 | "**/.hg": true,
12 | "**/CVS": true,
13 | "**/.DS_Store": true,
14 | "**/Thumbs.db": true,
15 | "**/.turbo": true,
16 | "**/.vercel": true,
17 | "**/dist": false
18 | },
19 | "editor.codeActionsOnSave": {
20 | "source.addMissingImports": "explicit",
21 | "source.organizeImports.biome": "explicit",
22 | "quickfix.biome": "explicit"
23 | },
24 | "[markdown]": {
25 | "editor.defaultFormatter": "esbenp.prettier-vscode",
26 | "editor.fontSize": 14,
27 | "editor.lineHeight": 18,
28 | "editor.wordWrap": "off",
29 | "editor.wordWrapColumn": 100,
30 | "editor.lineNumbers": "off",
31 | "editor.quickSuggestions": {
32 | "comments": "off",
33 | "strings": "on",
34 | "other": "on"
35 | },
36 | "editor.minimap.enabled": true
37 | },
38 | "[json]": {
39 | "editor.defaultFormatter": "vscode.json-language-features"
40 | },
41 | "[javascript]": {
42 | "editor.defaultFormatter": "biomejs.biome"
43 | },
44 | "[javascriptreact]": {
45 | "editor.defaultFormatter": "biomejs.biome"
46 | },
47 | "[typescript]": {
48 | "editor.defaultFormatter": "biomejs.biome"
49 | },
50 | "[typescriptreact]": {
51 | "editor.defaultFormatter": "biomejs.biome"
52 | },
53 | "[css]": {
54 | "editor.defaultFormatter": "vscode.css-language-features"
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing Guide
2 |
3 | Thanks for your interest to contribute to this project. Please take a moment and read through this
4 | guide:
5 |
6 | ## Repository
7 |
8 | - We use Node v18 or v20 and the `pnpm` package manager.
9 | - This project is a monorepo using `pnpm` workspaces.
10 | - We use [Convention Commits](https://www.conventionalcommits.org/en/v1.0.0/) for our commit
11 | messages.
12 |
13 | ## Developing
14 |
15 | The different packages can be found in `packages/*`, and that's where you'll be mainly working.
16 |
17 | ### Quick Start
18 |
19 | Here are the basic commands you'll need to get started:
20 |
21 | ```sh
22 |
23 | # Install dependencies
24 | pnpm install
25 |
26 | # Start the dev server
27 | pnpm dev
28 |
29 | # Build dist files
30 | pnpm build
31 |
32 | # Run tests
33 | pnpm test
34 |
35 | # Run tests with coverage
36 | pnpm test:coverage
37 |
38 | # Lint
39 | pnpm lint
40 |
41 | # Format (format + lint --fix)
42 | pnpm format
43 |
44 | # Type check
45 | pnpm type-check
46 |
47 | # Run all quality checks (formatter-check, type-check, lint, build, publint, test)
48 | pnpm quality-checks
49 |
50 | ```
51 |
52 | ## Testing
53 |
54 | We use `jest` to run tests. You can run all tests with:
55 |
56 | ```sh
57 | pnpm test
58 | ```
59 |
60 | Tests ending with `*.test.tsx` or `*.dom.test.ts` are considered browser tests and will be run in a
61 | browser-like environment using `jsdom`.
62 |
63 | Tests ending with `*.test.ts` (except `*.dom.test.ts`) are considered universal tests and will be
64 | run in both `node` and `jsdom` environments.
65 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Javi Aguilar
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # StoryLite
2 |
3 | > **Project Status** (2025-02-01): I currently have no buffer to work on this project. If you'd like to contribute, feel free to open a pull request. Thank you for your understanding!
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
{JSON.stringify(args, null, 2)}99 |
This story inherits the default args from the default export.
49 |{JSON.stringify(args, null, 2)}118 |