Skip to content

Commit 4426ef0

Browse files
authored
Merge pull request #2 from taj54/main
feat: update package metadata and dependencies
2 parents 890d883 + 1d0d7d2 commit 4426ef0

14 files changed

+2180
-1
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish to npm
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup pnpm
17+
uses: pnpm/action-setup@v4
18+
with:
19+
version: 10.13.1
20+
run_install: false
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 18
26+
registry-url: 'https://registry.npmjs.org/'
27+
cache: 'pnpm'
28+
29+
- name: Install dependencies
30+
run: pnpm install
31+
32+
- name: Build package
33+
run: pnpm build
34+
35+
- name: Publish to npm
36+
run: pnpm publish --access public --no-git-checks
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+

.github/workflows/test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: 10.13.1
23+
run_install: false
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '18'
29+
cache: 'pnpm'
30+
31+
- name: Install dependencies
32+
run: pnpm install --no-frozen-lockfile
33+
34+
- name: Run tests
35+
run: pnpm test
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Version Bump
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_type:
7+
description: 'Select version bump type'
8+
required: true
9+
default: 'patch'
10+
type: choice
11+
options:
12+
- patch
13+
- minor
14+
- major
15+
16+
jobs:
17+
bump-version:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
fetch-depth: 0
25+
26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@v4
28+
with:
29+
version: 10.13.1
30+
run_install: false
31+
32+
- name: Set up Node
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 18
36+
37+
- name: Install dependencies
38+
run: pnpm install --frozen-lockfile
39+
40+
- name: Generate new version
41+
id: version
42+
run: |
43+
NEW_VERSION=$(pnpm version ${{ inputs.release_type }} --no-git-tag-version | awk '{print $NF}')
44+
echo "new_version=$NEW_VERSION" >> $GITHUB_ENV
45+
46+
- name: Create new branch
47+
run: |
48+
git checkout -b release/${{ env.new_version }}
49+
50+
- name: Commit & Push changes
51+
run: |
52+
git config user.name "github-actions[bot]"
53+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
54+
git add package.json pnpm-lock.yaml
55+
git commit -m "chore(release): bump version to ${{ env.new_version }}"
56+
git push origin release/${{ env.new_version }}
57+
58+
- name: Create Pull Request
59+
run: |
60+
gh pr create \
61+
--base main \
62+
--head release/${{ env.new_version }} \
63+
--title "Release: ${{ env.new_version }}" \
64+
--body "Auto-generated release PR for version ${{ env.new_version }}"
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Notify about Major Release (if major)
69+
if: inputs.release_type == 'major'
70+
run: |
71+
echo "🚨 Major version update detected! Please review and merge manually."

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

CHANGELOG.md

Whitespace-only changes.

CODE_OF_CONDUCT.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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 harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
* Demonstrating empathy and kindness toward other people
14+
* Being respectful of differing opinions, viewpoints, and experiences
15+
* Giving and gracefully accepting constructive feedback
16+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
* Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
* Trolling, insulting or derogatory comments, and personal or political attacks
23+
* Public or private harassment
24+
* Publishing others' private information, such as a physical or email address, without their explicit permission
25+
* Other conduct which can reasonably be considered inappropriate in a professional setting
26+
27+
## Enforcement Responsibilities
28+
29+
Community leaders are responsible for clarifying and enforcing our acceptable standards of behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32+
33+
## Scope
34+
35+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36+
37+
## Enforcement Guidelines
38+
39+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
40+
41+
### 1. Correction
42+
43+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
44+
45+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
46+
47+
### 2. Warning
48+
49+
**Community Impact**: A violation through a significant incident or series of incidents.
50+
51+
**Consequence**: A warning with consequences for continued behavior. No interaction with the involved people for a specified period of time, including unsolicited interaction with those enforcing the Code of Conduct. This includes avoiding interaction in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
52+
53+
### 3. Temporary Ban
54+
55+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
56+
57+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the involved people during this period, including unsolicited interaction with those enforcing the Code of Conduct. Violating these terms may lead to a permanent ban.
58+
59+
### 4. Permanent Ban
60+
61+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
62+
63+
**Consequence**: A permanent ban from any sort of public interaction within the community.
64+
65+
## Attribution
66+
67+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
68+
69+
[homepage]: https://www.contributor-covenant.org
70+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html

CONTRIBUTING.md

Whitespace-only changes.

DEVELOPER.md

Whitespace-only changes.

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
# interactive-video-react-wrapper
1+
# @interactive-video-labs/react
2+
<p align="center">
3+
<img src="https://raw.githubusercontent.com/interactive-video-labs/docs/main/logo.svg" width="200px" alt="Interactive Video Labs Logo" />
4+
</p>
5+
<p align="center">
6+
<img src="https://img.shields.io/npm/v/@interactive-video-labs/react" alt="NPM Version" />
7+
<img src="https://img.shields.io/npm/l/@interactive-video-labs/react" alt="NPM License" />
8+
<img src="https://img.shields.io/npm/d18m/@interactive-video-labs/react?style=flat-square" alt="NPM Downloads" />
9+
<a href="https://github.com/interactive-video-labs/interactive-video-react-wrapper/actions">
10+
<img src="https://github.com/interactive-video-labs/interactive-video-react-wrapper/actions/workflows/release.yml/badge.svg" alt="Build Status" />
11+
</a>
12+
</p>
13+
14+
15+
16+
Welcome to `@interactive-video-labs/react` — a lightweight React wrapper around the `@interactive-video-labs/core` engine for cue-driven interactive video experiences.
17+
18+
This wrapper makes it easy to embed interactive video players in React apps using familiar props and event handlers, while keeping close to the core API.
19+
---

package.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"name": "@interactive-video-labs/react",
3+
"version": "0.0.1",
4+
"description": "Thin React wrapper for the @interactive-video-labs/core engine. Enables cue-based interactive video playback in React apps.",
5+
"main": "dist/index.cjs",
6+
"module": "dist/index.mjs",
7+
"types": "dist/index.d.ts",
8+
"exports": {
9+
".": {
10+
"types": "./dist/index.d.ts",
11+
"import": "./dist/index.mjs",
12+
"require": "./dist/index.cjs"
13+
}
14+
},
15+
"files": [
16+
"dist"
17+
],
18+
"scripts": {
19+
"build": "tsup src/index.ts --format esm,cjs --dts",
20+
"dev": "tsup src/index.ts --watch --format esm,cjs",
21+
"test": "vitest run",
22+
"clean": "rm -rf dist",
23+
"prepare": "pnpm build"
24+
},
25+
"keywords": [
26+
"interactive-video",
27+
"react",
28+
"react-component",
29+
"typescript",
30+
"video-player",
31+
"cue-points",
32+
"interactive-learning",
33+
"react-wrapper"
34+
],
35+
"author": "Taj",
36+
"license": "MIT",
37+
"repository": {
38+
"type": "git",
39+
"url": "git+https://github.com/interactive-video-labs/interactive-video-react-wrapper.git"
40+
},
41+
"homepage": "https://github.com/interactive-video-labs/interactive-video-react-wrapper#readme",
42+
"bugs": {
43+
"url": "https://github.com/interactive-video-labs/interactive-video-react-wrapper/issues"
44+
},
45+
"packageManager": "pnpm@10.13.1",
46+
"peerDependencies": {
47+
"react": ">=17.0.0 || >=18.0.0",
48+
"react-dom": ">=17.0.0 || >=18.0.0",
49+
"@interactive-video-labs/core": "^0.1.2"
50+
},
51+
"dependencies": {
52+
"jsdom": "^26.1.0",
53+
"tsup": "^8.5.0",
54+
"typescript": "^5.8.3",
55+
"vitest": "^3.2.4"
56+
}
57+
}

0 commit comments

Comments
 (0)