Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.tsdk": "node_modules/typescript/lib",
"js/ts.tsdk.path": "node_modules/typescript/lib",
"[ignore]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
Expand Down
8 changes: 0 additions & 8 deletions docs/essentials/render.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,42 +54,34 @@ For the latest renderer options read the official [renderer documentation](https
### Config.rendererOptions

- **appWidth**: Authored logical pixel width of the application.

- _Default_: `1920`

- **appHeight**: Authored logical pixel height of the application.

- _Default_: `1080`

- **txMemByteThreshold**: Texture Memory Byte Threshold. When the GPU VRAM used by textures exceeds this threshold, non-visible textures are freed. Set to `0` to disable.

- **boundsMargin**: Bounds margin to extend the boundary for adding a CoreNode as Quad. Can be a single number or an array of four numbers.

- **deviceLogicalPixelRatio**: Factor to convert app-authored logical coordinates to device logical coordinates. Supports auto-scaling for different resolutions.

- _Default_: `1`

- **devicePhysicalPixelRatio**: Factor to convert device logical coordinates to device physical coordinates. Controls the number of physical pixels used per logical pixel.

- _Default_: `window.devicePixelRatio`

- **clearColor**: RGBA encoded number for the background color.

- _Default_: `0x00000000`

- **Texture Memory Manager Settings**:
textureMemory?: Partial<TextureMemoryManagerSettings>;

- **fpsUpdateInterval**: Interval in milliseconds for receiving FPS updates. Set to `0` to disable.

- _Default_: `0`

- **enableContextSpy**: Includes WebGL context call information in FPS updates. Significantly impacts performance.

- _Default_: `false`

- **numImageWorkers**: Number of image workers to use. Improves image loading on multi-core devices. Set to `0` to disable.

- _Default_: `2`

- **inspector**
Expand Down
1 change: 0 additions & 1 deletion docs/primitives/createTag.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ const App = () => {
Creates a tag component from the provided children.

- **Parameters**:

- `children`: The SolidTV/SolidTV elements to render into the texture.

- **Returns**:
Expand Down
3 changes: 0 additions & 3 deletions docs/primitives/grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,15 @@ The `Grid` component is simplified version of combining Column & Row and doesn't
### Behavior

1. **Grid Navigation**:

- The `Grid` supports navigation via `onUp`, `onDown`, `onLeft`, and `onRight` events.
- Navigation is column-aware, ensuring horizontal navigation stays within the same row unless looping is enabled.

2. **Looping**:

- When `looping` is enabled, navigation wraps around when reaching the grid boundaries.
- For vertical navigation, reaching the last row loops to the first row and vice versa.
- For horizontal navigation, reaching the end of a row wraps to the start of the same row.

3. **Focus Handling**:

- The `Grid` manages focus internally using a `focusedIndex` signal.
- The `onSelectedChanged` callback is invoked when the focused index changes.

Expand Down
3 changes: 0 additions & 3 deletions docs/primitives/row_column.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,15 @@ The components accept the following props:
#### Behavior

1. **Navigation**:

- The `Row` listens for left and right navigation events.
- The `Column` listens for up and down navigation events.
- The `onLeft` and `onRight` handlers can be customized, and default navigation logic is provided via `handleNavigation`.

2. **Focus Management**:

- Focus events are handled via the `onFocus` prop.
- When focus changes, the row ensures that the currently selected child is highlighted and optionally scrolls into view.

3. **Scrolling**:

- The `withScrolling` utility is used to handle scrolling behavior when the `scroll` prop is set to `'auto'` or `'always'`.

4. **Styling**:
Expand Down
35 changes: 23 additions & 12 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettierConfig from 'eslint-config-prettier';
import globals from 'globals';

export default tseslint.config(
{
files: ['src/**/*.js'],
...eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,

ignores: ['dist/**', 'node_modules/**'],
},
eslint.configs.recommended,
{
files: ['src/**/*.{ts,tsx}'],
extends: [...tseslint.configs.recommended],
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
globals: {
...globals.browser,
...globals.es2022,
},
},
rules: {
// Allow us to write async functions that don't use await
// Intresting commentary on this: https://github.com/standard/eslint-config-standard-with-typescript/issues/217
Expand All @@ -19,6 +33,10 @@ export default tseslint.config(
'@typescript-eslint/no-unsafe-call': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-this-alias': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn',
{
Expand All @@ -28,12 +46,5 @@ export default tseslint.config(
],
},
},
{
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
prettierConfig,
);
58 changes: 28 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@
},
"sideEffects": false,
"scripts": {
"start": "npm run watch",
"start": "pnpm run watch",
"test": "vitest",
"lint": "npm run lint:prettier && npm run lint:eslint",
"lint:fix": "npm run lint:fix:prettier && npm run lint:fix:eslint",
"lint": "pnpm run lint:prettier && pnpm run lint:eslint",
"lint:fix": "pnpm run lint:fix:prettier && pnpm run lint:fix:eslint",
"lint:prettier": "prettier --check \"**/*.{ts,js,cjs,md}\"",
"lint:fix:prettier": "prettier --write \"**/*.{ts,js,cjs,md}\"",
"lint:eslint": "eslint .",
"lint:fix:eslint": "eslint --fix .",
"build": "rm -rf dist && npm run tsc && cp jsx-runtime.d.ts dist/",
"build": "rm -rf dist && pnpm run tsc && cp jsx-runtime.d.ts dist/",
"tsc": "tsc",
"watch": "tsc -w",
"prepare": "husky",
"prepack": "npm run build",
"prepack": "pnpm run build",
"release": "release-it",
"test:browser": "vitest --config=vitest.browser.config.ts"
},
Expand All @@ -72,33 +72,27 @@
],
"author": "Chris Lorenzo",
"license": "Apache-2.0",
"dependencies": {
"@solid-primitives/event-listener": "^2.3.3",
"@solid-primitives/list": "^0.1.2",
"@solid-primitives/mouse": "^2.0.20",
"@solid-primitives/scheduled": "^1.4.4"
},
"devDependencies": {
"@eslint/js": "^9.16.0",
"@solidtv/renderer": "1.0.0",
"@eslint/js": "^9.39.4",
"@solid-devtools/debugger": "^0.28.1",
"@solidjs/testing-library": "^0.8.10",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"@vitest/browser-playwright": "^4.0.9",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.13.0",
"@typescript-eslint/eslint-plugin": "^8.59.2",
"@typescript-eslint/parser": "^8.59.2",
"@vitest/browser-playwright": "^4.1.6",
"eslint": "^9.39.4",
"eslint-config-prettier": "^9.1.2",
"eslint-plugin-prettier": "^5.5.5",
"globals": "^17.6.0",
"husky": "^9.1.7",
"jsdom": "^26.1.0",
"lint-staged": "^15.2.10",
"prettier": "^3.4.2",
"release-it": "^17.10.0",
"typescript": "^5.9.2",
"typescript-eslint": "^8.17.0",
"vite-plugin-solid": "^2.11.6",
"vitest": "^4.0.9"
"lint-staged": "^15.5.2",
"prettier": "^3.8.3",
"release-it": "^20.0.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.59.2",
"vite": "8.0.12",
"vite-plugin-solid": "^2.11.12",
"vitest": "^4.1.6"
},
"lint-staged": {
"*.ts": [
Expand All @@ -108,8 +102,12 @@
"*.{js,cjs,md}": "prettier --write"
},
"peerDependencies": {
"@solidtv/renderer": "^1.0.0",
"@solidjs/router": "^0.15.1",
"@solid-primitives/event-listener": "^2.4.5",
"@solid-primitives/list": "^0.1.2",
"@solid-primitives/mouse": "^2.1.6",
"@solid-primitives/scheduled": "^1.5.3",
"@solidjs/router": "^0.16.1",
"@solidtv/renderer": "^1.1.2",
"solid-js": "*"
},
"peerDependenciesMeta": {},
Expand All @@ -126,7 +124,7 @@
"README.md",
"docs/AI_CODING_GUIDELINES.md"
],
"packageManager": "pnpm@10.8.0",
"packageManager": "pnpm@10.33.4",
"publishConfig": {
"access": "public"
}
Expand Down
Loading