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
2 changes: 1 addition & 1 deletion docs/articles/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const TextPage = lazy(() => import('./pages/Text'));

// Create the renderer and load fonts
const { render } = createRenderer();
loadFonts(fonts);
await loadFonts(fonts);

// Render the app using the HashRouter from SolidRouter
render(() => (
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/migration-2x-to-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Shaders are imported when needed by application. The following example shows how

```typescript
const { renderer, render } = createRenderer();
loadFonts(fonts);
await loadFonts(fonts);
// Prepare for RC3 of Renderer
import {
Rounded,
Expand Down
2 changes: 1 addition & 1 deletion docs/essentials/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Then you'll need to register the custom font in the AppCoreExtensions file:
} as const];

// must be called after createRenderer but before render
loadFonts(fonts);
await loadFonts(fonts);
```

From this moment on you'll be able to use the font `ComicSans` anywhere in your App:
Expand Down
2 changes: 1 addition & 1 deletion docs/primitives/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The `HashRouter` primitive is based on the [SolidTV Router](https://github.com/s
### Usage

```jsx
import { HashRouter } from '@solidtv/solid/primitives';
import { HashRouter } from '@solidtv/solid/primitives/router';

<HashRouter root={App} queryParams={['id', 'search', 'otherParam']}>
<Route path="/" component={HelloWorld} />
Expand Down
3 changes: 2 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const relaxedTypedRules = {
'@typescript-eslint/no-unused-expressions': 'warn',
'@typescript-eslint/unbound-method': 'warn',
'@typescript-eslint/no-this-alias': 'warn',
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/restrict-template-expressions': 'warn',
'@typescript-eslint/prefer-promise-reject-errors': 'warn',
Expand All @@ -40,6 +40,7 @@ export default tseslint.config(
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
warnOnUnsupportedTypeScriptVersion: false,
},
globals: {
...globals.browser,
Expand Down
3 changes: 2 additions & 1 deletion src/core/clickInspector.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Config, isDev } from './config.js';
import { isElementNode } from './utils.js';
import type { ElementNode } from './elementNode.js';
import { IRendererNode } from './dom-renderer/domRendererTypes.js';

let installed = false;

Expand Down Expand Up @@ -48,7 +49,7 @@
const el = findDeepestAtPosition(root, event.clientX, event.clientY);
event.preventDefault();
event.stopPropagation();
const lng = el.lng as any;
const lng = el.lng as IRendererNode;
const label = el.componentName || el._type;
const loc = el.componentLocation ? ` @ ${el.componentLocation}` : '';
console.log(
Expand All @@ -65,7 +66,7 @@
children: el.children,
},
);
(globalThis as any).$el = el;

Check warning on line 69 in src/core/clickInspector.ts

View workflow job for this annotation

GitHub Actions / build-test

Unsafe member access .$el on an `any` value

Check warning on line 69 in src/core/clickInspector.ts

View workflow job for this annotation

GitHub Actions / build-test

Unexpected any. Specify a different type
console.log('Pinned to $el — try $el.parent, $el.setFocus()');
}

Expand Down
8 changes: 6 additions & 2 deletions src/core/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ import {
export const isDev = !!(import.meta.env && import.meta.env.DEV);

/** Whether the DOM renderer is used instead of `@solidtv/renderer` */
export const DOM_RENDERING = globalThis.SOLIDTV_DOM_RENDERING === true;
export const DOM_RENDERING =
typeof SOLIDTV_DOM_RENDERING !== 'undefined' &&
SOLIDTV_DOM_RENDERING === true;

/** Whether element shaders are enabled */
export const SHADERS_ENABLED = globalThis.SOLIDTV_DISABLE_SHADERS !== true;
export const SHADERS_ENABLED =
typeof SOLIDTV_DISABLE_SHADERS === 'undefined' ||
SOLIDTV_DISABLE_SHADERS !== true;

/**
RUNTIME LIGHTNING CONFIGURATION \
Expand Down
Loading
Loading