Skip to content

Commit 3d5e7ec

Browse files
plex-opsWillsonHaw
authored andcommitted
Initial Commit
0 parents  commit 3d5e7ec

File tree

381 files changed

+75720
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

381 files changed

+75720
-0
lines changed

.changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.gitignore

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
8+
# Local env files
9+
.env
10+
.env.local
11+
.env.development.local
12+
.env.test.local
13+
.env.production.local
14+
15+
# Testing
16+
coverage
17+
18+
# Turbo
19+
.turbo
20+
21+
# Vercel
22+
.vercel
23+
24+
# Build Outputs
25+
.next/
26+
out/
27+
build
28+
dist
29+
storybook-static/
30+
31+
# Debug
32+
npm-debug.log*
33+
yarn-debug.log*
34+
yarn-error.log*
35+
36+
# Misc
37+
.DS_Store
38+
*.pem

.husky/pre-commit

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pnpm lint
2+
pnpm test
3+
pnpm unused

.mise.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tools]
2+
pnpm = "9.12.1"
3+
node = "20.11.1"

.vscode/extensions.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"biomejs.biome"
4+
]
5+
}

.vscode/settings.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"editor.codeActionsOnSave": {
4+
"quickfix.biome": "explicit",
5+
"source.organizeImports.biome": "explicit"
6+
},
7+
"typescript.tsdk": "node_modules/typescript/lib",
8+
"cSpell.words": ["lightningjs", "threadx"],
9+
"biome.enabled": true,
10+
"json.schemas": [
11+
{
12+
"fileMatch": ["manifest.json"],
13+
"url": "https://json.schemastore.org/chrome-manifest.json"
14+
}
15+
],
16+
"[javascript]": {
17+
"editor.defaultFormatter": "biomejs.biome"
18+
},
19+
"[typescriptreact]": {
20+
"editor.defaultFormatter": "biomejs.biome"
21+
},
22+
"[typescript]": {
23+
"editor.defaultFormatter": "biomejs.biome"
24+
},
25+
"[javascriptreact]": {
26+
"editor.defaultFormatter": "biomejs.biome"
27+
}
28+
}

CODE_OF_CONDUCT.md

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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, caste, color, 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+
- Publishing spam or promotional links
26+
- Other conduct which could reasonably be considered inappropriate in a professional setting
27+
28+
## Enforcement Responsibilities
29+
30+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
31+
32+
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.
33+
34+
## Scope
35+
36+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces.
37+
38+
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.
39+
40+
## Enforcement
41+
42+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.
43+
44+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45+
46+
## Enforcement Guidelines
47+
48+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49+
50+
### 1. Correction
51+
52+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53+
54+
**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.
55+
56+
### 2. Warning
57+
58+
**Community Impact**: A violation through a single incident or series of actions.
59+
60+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61+
62+
### 3. Temporary Ban
63+
64+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65+
66+
**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 people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67+
68+
### 4. Permanent Ban
69+
70+
**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.
71+
72+
**Consequence**: A permanent ban from any sort of public interaction within the community.
73+
74+
## Attribution
75+
76+
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].
77+
78+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][mozilla coc].
79+
80+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][faq]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
81+
82+
[homepage]: https://www.contributor-covenant.org
83+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
84+
[mozilla coc]: https://github.com/mozilla/diversity
85+
[faq]: https://www.contributor-covenant.org/faq
86+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Contributing
2+
3+
Contributions are always welcome, no matter how large or small!
4+
5+
When contributing to this repository, please first discuss the change you wish to make via an issue with the owners of this repository before making a change.
6+
7+
Please follow the [code of conduct](CODE_OF_CONDUCT.md) in all your interactions with the project.
8+
9+
## Developer Startup Guide
10+
11+
This section will walk you through how to get started working with the code.
12+
13+
### Environment
14+
15+
Verify that node.js is [installed](https://nodejs.org/en/download/).
16+
17+
Verify that `pnpm` is [installed](https://pnpm.io/installation).
18+
19+
Alternatively, we recommend you install [Volta](https://volta.sh) to run the correct node.js and package manager versions for this project.
20+
21+
All code changes must work on the minimum Node version specified in [package.json](./package.json) under the `engines` key.
22+
23+
### Setup
24+
25+
[Fork](https://help.github.com/articles/fork-a-repo/) the `react-lightning` repository to your GitHub Account.
26+
27+
Then, run:
28+
29+
```sh
30+
$ git clone https://github.com/<your-github-username>/react-lightning
31+
$ cd react-lightning
32+
$ pnpm install
33+
```
34+
35+
### Development
36+
37+
You can run a development server using `pnpm dev`. This will run all apps in dev
38+
mode (Every project under the `apps/` folder)
39+
40+
You can filter to a specific project to run in dev, using
41+
`--filter=PROJECT_NAME` or by navigating to `apps/PROJECT` and running `pnpm
42+
dev` from there.
43+
44+
### Running tests
45+
46+
Unit tests:
47+
48+
```sh
49+
$ pnpm test
50+
```
51+
52+
Linting and formatting is done via [Biome](https://biomejs.dev) and can be run using:
53+
54+
```sh
55+
$ pnpm lint
56+
```
57+
58+
## Pull Request Process
59+
60+
1. Create your branch from `main`
61+
1. Make your code or other changes.
62+
1. Add or update relevant unit/type tests.
63+
1. Add changelog information with `pnpm changeset` and commit the generated .md file along with your code changes
64+
1. Push the code to your forked repository and open a draft pull request (please follow the guidelines in [How to write the perfect pull request](https://blog.github.com/2015-01-21-how-to-write-the-perfect-pull-request/))
65+
1. Perform a self-review using the reviewer guidelines below prior to taking the PR out of draft state.
66+
67+
### Reviewer Guidelines
68+
69+
Reviewers should use the following questions to evaluate the implementation for correctness/completeness and ensure all housekeeping items have been addressed prior to merging the code.
70+
71+
- Correctness/completeness
72+
73+
1. Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
74+
1. Is the intention of the code captured in relevant tests?
75+
- Does the description of each test accurately represent the assertions?
76+
- For any test explicitly called out on the issue as desirable to implement, was it implemented?
77+
1. Could these changes impact any adjacent functionality?
78+
1. Are there any errors that might not be correctly caught or propagated?
79+
1. Is there anything that could impact performance?
80+
1. Can you think of a better way to implement any of the functional code or tests? "Better" means any combination of:
81+
- more performant
82+
- better organized / easier to understand / clearer separation of concerns
83+
- easier to maintain (easier to change, harder to accidentally break)
84+
85+
- Housekeeping
86+
87+
1. Does the title and description of the PR reference the correct issue and does it use the correct conventional commit type (e.g., fix, feat, test, breaking change etc)?
88+
1. If there are new TODOs, has a related issue been created?
89+
1. Should any documentation be updated?

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021-present Plex, Inc.
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.

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
A react renderer to render React components to
2+
[Lightningjs](https://lightningjs.io/), so you can write your Lightningjs apps
3+
using React and React Native.
4+
5+
## Getting Started
6+
7+
You can scaffold a new project using degit:
8+
9+
```bash
10+
npx degit plexinc/react-lightning/apps
11+
```
12+
13+
See the docs in [/apps/storybook](./apps/storybook) for usage and examples.
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Sample project for the react-lightning reconciler.
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>React-Lightning Sample App</title>
5+
<meta charset="UTF-8" />
6+
<style>
7+
html,
8+
body {
9+
margin: 0;
10+
padding: 0;
11+
width: 100vw;
12+
height: 100vh;
13+
overflow: hidden;
14+
}
15+
</style>
16+
</head>
17+
18+
<body>
19+
<div id="app"></div>
20+
<script
21+
type="text/javascript"
22+
crossorigin="anonymous"
23+
src="https://polyfill-fastly.io/v3/polyfill.min.js?features=ResizeObserver"
24+
></script>
25+
<script type="module" src="./src/index.tsx"></script>
26+
</body>
27+
</html>
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "@plex/react-lightning-example",
3+
"version": "0.5.37",
4+
"packageManager": "[email protected]",
5+
"type": "module",
6+
"private": true,
7+
"scripts": {
8+
"build": "vite build",
9+
"clean": "del ./dist",
10+
"dev": "vite --host",
11+
"preview": "vite preview --host --port 3333",
12+
"test:unit": "vitest run --passWithNoTests"
13+
},
14+
"dependencies": {
15+
"@lightningjs/renderer": "2.8.0",
16+
"@plex/react-lightning": "workspace:*",
17+
"@plex/react-lightning-components": "workspace:*",
18+
"@plex/react-lightning-plugin-devtools": "workspace:*",
19+
"@plex/react-lightning-plugin-flexbox": "workspace:*",
20+
"react": "18.3.1",
21+
"react-dom": "18.3.1",
22+
"react-router-dom": "7.0.2",
23+
"swr": "2.2.5"
24+
},
25+
"devDependencies": {
26+
"@plex/vite-plugin-msdf-fontgen": "workspace:*",
27+
"@repo/typescript-config": "workspace:*",
28+
"@types/react": "18.3.14",
29+
"@types/react-dom": "18.3.1",
30+
"@vitejs/plugin-react": "4.3.4",
31+
"vite": "6.0.2",
32+
"vite-tsconfig-paths": "5.1.3"
33+
},
34+
"volta": {
35+
"extends": "../../package.json"
36+
}
37+
}

0 commit comments

Comments
 (0)