@lightningjs/solid
Advanced tools
Comparing version 0.6.4 to 0.6.5
{ | ||
"name": "@lightningjs/solid", | ||
"version": "0.6.4", | ||
"version": "0.6.5", | ||
"description": "Lightning renderer for solid universal", | ||
"type": "module", | ||
"types": "./dist/src/index.d.ts", | ||
"main": "./dist/src/index.js", | ||
"source": "src/index.ts", | ||
"main": "./dist/source/index.js", | ||
"module": "./dist/source/index.js", | ||
"browser": "./dist/esm/index.js", | ||
"types": "./dist/types/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/src/index.d.ts", | ||
"import": "./dist/src/index.js" | ||
"types": "./dist/types/index.d.ts", | ||
"import": "./dist/source/index.js", | ||
"solid": "./dist/source/index.jsx", | ||
"browser": "./dist/esm/index.js" | ||
}, | ||
@@ -27,3 +32,3 @@ "./jsx-runtime": { | ||
"lint:fix:eslint": "eslint --fix .", | ||
"build": "tsc", | ||
"build": "rollup -c", | ||
"watch": "tsc -w", | ||
@@ -45,3 +50,2 @@ "dev": "concurrently -c \"auto\" \"npm:watch\" \"npm:vite\"", | ||
"devDependencies": { | ||
"@lightningjs/solid": "file:./", | ||
"@typescript-eslint/eslint-plugin": "^6.3.0", | ||
@@ -54,2 +58,4 @@ "@typescript-eslint/parser": "^6.3.0", | ||
"prettier": "^3.0.1", | ||
"rollup": "^4.1.4", | ||
"rollup-preset-solid": "^2.0.1", | ||
"solid-js": "^1.8.1", | ||
@@ -56,0 +62,0 @@ "typescript": "^5.2.2", |
@@ -18,3 +18,3 @@ /* | ||
import { renderer, createShader } from '../../index.js'; | ||
import { renderer, createShader } from '../renderer/index.js'; | ||
import Children from './children.js'; | ||
@@ -21,0 +21,0 @@ import States from './states.js'; |
@@ -22,8 +22,11 @@ /* | ||
ThreadXRenderDriver, | ||
type RendererMainSettings | ||
type RendererMainSettings, | ||
} from '@lightningjs/renderer'; | ||
export let renderer: RendererMain; | ||
export let createShader: RendererMain['createShader']; | ||
export interface SolidRendererOptions extends RendererMainSettings { | ||
threadXCoreWorkerUrl?: string; | ||
rootId: string | ||
rootId: string; | ||
} | ||
@@ -40,3 +43,5 @@ | ||
export function startLightningRenderer(options: Partial<SolidRendererOptions> = {}): RendererMain { | ||
export function startLightningRenderer( | ||
options: Partial<SolidRendererOptions> = {}, | ||
): RendererMain { | ||
let driver; | ||
@@ -56,10 +61,17 @@ const resolvedOptions: SolidRendererOptions = { | ||
return new RendererMain({ | ||
appWidth: resolvedOptions.appWidth, | ||
appHeight: resolvedOptions.appHeight, | ||
deviceLogicalPixelRatio: resolvedOptions.deviceLogicalPixelRatio, | ||
devicePhysicalPixelRatio: resolvedOptions.devicePhysicalPixelRatio, | ||
clearColor: resolvedOptions.clearColor, | ||
coreExtensionModule: resolvedOptions.coreExtensionModule, | ||
}, resolvedOptions.rootId, driver); | ||
}; | ||
renderer = new RendererMain( | ||
{ | ||
appWidth: resolvedOptions.appWidth, | ||
appHeight: resolvedOptions.appHeight, | ||
deviceLogicalPixelRatio: resolvedOptions.deviceLogicalPixelRatio, | ||
devicePhysicalPixelRatio: resolvedOptions.devicePhysicalPixelRatio, | ||
clearColor: resolvedOptions.clearColor, | ||
coreExtensionModule: resolvedOptions.coreExtensionModule, | ||
}, | ||
resolvedOptions.rootId, | ||
driver, | ||
); | ||
createShader = renderer.createShader.bind(renderer); | ||
return renderer; | ||
} |
@@ -19,3 +19,3 @@ /* | ||
import universalLightning from './lightning.js'; | ||
import { renderer } from '@lightningjs/solid'; | ||
import { renderer } from '../renderer/index.js'; | ||
import type { ElementNode, SolidNode, TextNode } from '../node/index.js'; | ||
@@ -22,0 +22,0 @@ |
@@ -18,3 +18,3 @@ /* | ||
import { assertTruthy } from '@lightningjs/renderer/utils'; | ||
import { renderer } from '../../index.js'; | ||
import { renderer } from '../renderer/index.js'; | ||
import { createEffect } from 'solid-js'; | ||
@@ -21,0 +21,0 @@ import { log } from '../utils.js'; |
@@ -30,3 +30,4 @@ /* | ||
export * from './components/index.js'; | ||
export * from './core/renderer/index.js'; | ||
export * from './core/render.js'; | ||
export { config as Config } from './config.js'; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
266947
4216
13
60
2
1