Skip to content

Update to L3 v3 of renderer #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
154b7a7
update deps to 3.0-0
chiefcll Mar 20, 2025
dfcd0cb
Release 3.0.0-0
chiefcll Mar 20, 2025
06ae187
Merge branch 'main' into rc3
chiefcll Mar 27, 2025
862702b
maybe fix scrolling for auto use case going left after going right a few
chiefcll Mar 27, 2025
228eff5
fix lazy maxoffset was running after reaching end
chiefcll Mar 27, 2025
8bb4c88
remove lazyUp - add fadeinout primitive, needs docs
chiefcll Mar 27, 2025
37ee04c
Release 3.0.0-1
chiefcll Mar 27, 2025
4a195a9
Wrap top-level createRenderEffect in a root (#30)
thetarnav Mar 27, 2025
24b6103
fix off by one error setting selected
chiefcll Mar 27, 2025
a16b069
clean up lazy for fast scrolling
chiefcll Mar 27, 2025
a440ea0
remove style from TS as it doesnt work between view and text
chiefcll Mar 28, 2025
76b6df4
solid-devtools support (#32)
thetarnav Apr 2, 2025
9fd52a5
Make "@lightningtv/solid" usable as "jsxImportSource" (#35)
thetarnav Apr 2, 2025
e02a67f
Use renderer interface types instead of lightning/renderer types dire…
thetarnav Apr 3, 2025
f07a27a
Support swapping parents (#37)
thetarnav Apr 3, 2025
6a90b73
update deps
chiefcll Apr 3, 2025
12df893
Release 3.0.0-2
chiefcll Apr 3, 2025
309e7db
Simplify delete queue logic (#38)
thetarnav Apr 5, 2025
c410ab6
Improve Grid types (#41)
thetarnav Apr 12, 2025
1257e77
Stop extending IntrinsicAttributes interface in JSX module (#43)
thetarnav Apr 15, 2025
f5e3d56
Merge branch 'main' into rc3
chiefcll Apr 18, 2025
07b6463
update core
chiefcll Apr 18, 2025
79210e0
Release 3.0.0-3
chiefcll Apr 18, 2025
e935679
Add CI workflow, testing setup, and initial tests for Solid component…
thetarnav Apr 24, 2025
b3bdb2d
Merge branch 'main' into rc3
chiefcll Apr 28, 2025
4760619
make voice optional
chiefcll Apr 29, 2025
a44754a
Release 3.0.0-4
chiefcll Apr 29, 2025
a7bbe70
expose Announcer and setup options
chiefcll Apr 29, 2025
878e288
Release 3.0.0-5
chiefcll Apr 29, 2025
d22317d
Update parent text when text node is removed (#52)
thetarnav May 13, 2025
1de682d
Correct Dynamic types (#53)
thetarnav May 16, 2025
bd9e11c
Add Marquee component to primitives (#54)
thetarnav May 23, 2025
1542cdf
few tweaks to marquee
chiefcll May 24, 2025
9c6c224
Release 3.0.0-6
chiefcll May 24, 2025
c640cb7
Improve `chainFunctions` and `Dynamic` types, add `chainRefs` (#55)
thetarnav May 27, 2025
28e7a59
Release 3.0.0-7
chiefcll May 28, 2025
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: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: Test
run: pnpm test

- name: Lint
# Will run the step even if build step failed, to give feedback
if: success() || failure()
run: pnpm lint
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

{
"name": "Test",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "pnpm",
"runtimeArgs": ["run", "test", "--watch"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"sourceMaps": true,
"skipFiles": [
"**/node_modules/**/*",
"<node_internals>/**",
"**/@vite/client",
"<eval>/*",
],
}
2 changes: 2 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@
- [Router](/primitives/router.md)
- [Row and Column](/primitives/row_column.md)
- [Visible](/primitives/visible.md)
- Tooling
- [Solid Devtools](/tooling/solid_devtools.md)
2 changes: 1 addition & 1 deletion docs/primitives/lazyUp.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DEPRECATED
# DEPRECATED & Removed in v3

Please use [Lazy Row and Column](/primitives/lazy.md) component instead.

Expand Down
63 changes: 63 additions & 0 deletions docs/tools/solid_devtols.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Integrating with Solid Devtools

[Solid Devtools](https://github.com/thetarnav/solid-devtools) provides debugging capabilities for Solid.js applications. This guide explains how to integrate solid-devtools with Lightning Solid to inspect your Lightning applications.

## Installation

For chrome-development install the [Solid Devtools Chrome Extension](https://chrome.google.com/webstore/detail/solid-devtools/kmcfjchnmmaeeagadbhoofajiopoceel).

Then, install the `solid-devtools` package:

```bash
pnpm add -D solid-devtools
```

## Configuration

### 1. Setup Vite Plugin (Optional)

Add the Solid Devtools Vite plugin to your Vite configuration file:

```ts
import devtools from 'solid-devtools/vite';
import solidPlugin from 'vite-plugin-solid';
import { defineConfig } from 'vite';

export default defineConfig({
plugins: [
devtools({
/* features options - all disabled by default */
autoname: true,
locator: {
jsxLocation: true,
componentLocation: true,
targetIDE: 'vscode',
},
}),
solidPlugin({
solid: {
moduleName: '@lightningtv/solid',
generate: 'universal',
},
}),
],
});
```

### 2. Configure Element Interface

Since Lightning.js uses a custom renderer (not DOM-based), you need to provide Solid Devtools with a custom ElementInterface implementation. Fortunately, `@lightningtv/solid` already includes this implementation.

Add the following code to your application entry file (typically `index.tsx`):

```ts
import 'solid-devtools';
import { setElementInterface } from 'solid-devtools/setup';
import { elementInterface } from '@lightningtv/solid/devtools';

setElementInterface(elementInterface);
```

This allows the Solid Devtools panel to properly display and interact with your Lightning application's component tree.

For more information on supporting custom renderers in Solid Devtools, refer to the [official documentation](https://github.com/thetarnav/solid-devtools/tree/main/packages/debugger#supporting-custom-renderers).
6 changes: 2 additions & 4 deletions src/jsx-runtime.ts → jsx-runtime.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-namespace */
import type { NewOmit, NodeProps, TextProps } from '@lightningtv/core';

declare module 'solid-js' {
Expand All @@ -8,8 +7,7 @@ declare module 'solid-js' {
view: NodeProps;
text: TextProps;
}

interface IntrinsicAttributes
extends NewOmit<NodeProps, 'children' | 'style'> {}
}
}

export type { JSX } from 'solid-js';
27 changes: 21 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightningtv/solid",
"version": "2.7.16",
"version": "3.0.0-7",
"description": "Lightning Renderer for Solid Universal",
"type": "module",
"exports": {
Expand All @@ -17,12 +17,20 @@
"types": "./dist/src/primitives/index.d.ts",
"default": "./dist/src/primitives/index.js"
}
}
},
"./devtools": {
"import": {
"@lightningtv/source": "./src/devtools/index.ts",
"types": "./dist/src/devtools/index.d.ts",
"default": "./dist/src/devtools/index.js"
}
},
"./jsx-runtime": "./jsx-runtime.d.ts"
},
"sideEffects": false,
"scripts": {
"start": "npm run watch",
"test": "echo \"Error: no test specified\" && exit 1",
"test": "vitest",
"lint": "npm run lint:prettier && npm run lint:eslint",
"lint:fix": "npm run lint:fix:prettier && npm run lint:fix:eslint",
"lint:prettier": "prettier --check \"**/*.{ts,js,cjs,md}\"",
Expand All @@ -46,26 +54,30 @@
"author": "Chris Lorenzo",
"license": "Apache-2.0",
"dependencies": {
"@lightningtv/core": "^2.7.7",
"@lightningtv/core": "^3.0.0-3",
"@solid-primitives/event-listener": "^2.3.3",
"@solid-primitives/mouse": "^2.0.20",
"@solid-primitives/scheduled": "^1.4.4"
},
"devDependencies": {
"@eslint/js": "^9.16.0",
"@solid-devtools/debugger": "^0.27.0",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.13.0",
"husky": "^9.1.7",
"jsdom": "^26.1.0",
"lint-staged": "^15.2.10",
"prettier": "^3.4.2",
"release-it": "^17.10.0",
"solid-js": "^1.9.3",
"typescript": "^5.7.2",
"typescript-eslint": "^8.17.0"
"typescript-eslint": "^8.17.0",
"vite-plugin-solid": "^2.11.6",
"vitest": "^3.1.2"
},
"lint-staged": {
"*.ts": [
Expand All @@ -75,10 +87,13 @@
"*.{js,cjs,md}": "prettier --write"
},
"peerDependencies": {
"@lightningjs/renderer": "^2.12.0",
"@lightningjs/renderer": "^3.0.0-beta3",
"@solidjs/router": "^0.15.1",
"solid-js": "*"
},
"optionalDependencies": {
"@solid-devtools/debugger": "^0.27.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/lightning-tv/solid.git"
Expand Down
Loading