Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/bright-files-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lamberl-lee/file-preview": patch
---

Improve npm discoverability and onboarding with clearer package metadata, search-focused keywords, and a streamlined README.
81 changes: 81 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Bug report
description: Report a reproducible problem with FileVista
title: "[Bug]: "
labels:
- bug
body:
- type: markdown
attributes:
value: Thanks for reporting a problem. Remove confidential content from sample files before attaching them.
- type: input
id: version
attributes:
label: FileVista version
placeholder: "@lamberl-lee/file-preview 0.7.9"
validations:
required: true
- type: dropdown
id: format
attributes:
label: File format
options:
- PDF
- DOCX
- PPTX
- XLSX
- EPUB
- RTF
- Markdown / code / text
- HTML / SVG
- Image / audio / video
- ZIP / CSV / JSON
- Other
validations:
required: true
- type: input
id: browser
attributes:
label: Browser and version
placeholder: "Chrome 126 on macOS 15"
validations:
required: true
- type: dropdown
id: source
attributes:
label: Source type
options:
- File
- Blob
- ArrayBuffer
- Remote URL
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Minimal reproduction
description: Link to a repository or provide the smallest code sample that reproduces the problem.
validations:
required: true
- type: textarea
id: behavior
attributes:
label: Expected and observed behavior
validations:
required: true
- type: textarea
id: logs
attributes:
label: Console output
render: shell
- type: checkboxes
id: checks
attributes:
label: Checklist
options:
- label: I tested the latest published version.
required: true
- label: I removed confidential data from files, logs, and links.
required: true
- label: This is not a security vulnerability; security reports use the private advisory link in SECURITY.md.
required: true
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/CoderLambert/filevista/security/advisories/new
about: Report vulnerabilities privately instead of opening a public issue.
- name: Package documentation
url: https://github.com/CoderLambert/filevista/tree/main/packages/file-preview#readme
about: Review installation, optional dependencies, static assets, and browser support.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Feature request
description: Suggest an integration, renderer, or developer-experience improvement
title: "[Feature]: "
labels:
- enhancement
body:
- type: textarea
id: problem
attributes:
label: Problem to solve
description: Describe the user or integration problem rather than only the proposed implementation.
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed behavior
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
- type: dropdown
id: area
attributes:
label: Area
options:
- New or existing preview format
- Public React API
- Performance and large files
- Security and sandboxing
- Accessibility or i18n
- Documentation and examples
- Build, packaging, or browser compatibility
validations:
required: true
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7

# Read pnpm version from root package.json's "packageManager" field
# so CI never drifts from local — the source of truth is the package.json.
- name: Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
Expand Down Expand Up @@ -76,13 +76,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout repository with Git LFS
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
lfs: true

Expand Down Expand Up @@ -81,10 +81,10 @@ jobs:
PY

- name: Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
# changesets needs full history to diff against the previous
# release tag when computing the changelog.
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
Expand Down
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing to FileVista

Thanks for helping improve FileVista. Contributions that fix rendering issues, improve browser compatibility, add tests, or make the integration experience clearer are welcome.

## Before you start

- Search [existing issues](https://github.com/CoderLambert/filevista/issues) before opening a new one.
- Use the bug report template for reproducible defects and the feature request template for product ideas.
- For a new preview format or a material API change, open an issue before implementation so the format limits and public interface can be agreed first.
- Report security vulnerabilities privately as described in [SECURITY.md](SECURITY.md).

## Local setup

FileVista requires Node.js 22+ and pnpm 11+.

```bash
pnpm install
pnpm run dev
```

The monorepo contains the published library in `packages/file-preview` and the demo application in `apps/playground`.

## Validation

Run the complete validation suite before opening a pull request:

```bash
pnpm run check
```

For focused library work, these commands are also available:

```bash
pnpm run lint
pnpm run typecheck
pnpm run test
pnpm run build:lib
```

Add or update tests for behavior changes. When changing a renderer, test both a representative supported file and its expected fallback or failure state.

## Pull requests

- Keep each pull request focused on one problem.
- Explain the user-visible behavior, important tradeoffs, and how the change was tested.
- Include screenshots or short recordings for visual changes.
- Add a Changeset for changes that affect the published package:

```bash
pnpm changeset
```

- Do not commit generated `dist`, `.next`, or `out` directories.

By contributing, you agree that your contribution is licensed under the repository's [LGPL-3.0-or-later license](LICENSE).
Loading