diff --git a/examples/engines/babylon-worldspace.html b/examples/engines/babylon-worldspace.html index 29704ec7..0d04f4a9 100644 --- a/examples/engines/babylon-worldspace.html +++ b/examples/engines/babylon-worldspace.html @@ -23,10 +23,12 @@ diff --git a/examples/engines/babylon-worldspace.ts b/examples/engines/babylon-worldspace.ts index 0079ae76..d33d5fe5 100644 --- a/examples/engines/babylon-worldspace.ts +++ b/examples/engines/babylon-worldspace.ts @@ -8,7 +8,7 @@ import { Color3, Color4 } from '@babylonjs/core/Maths/math.color.js' import { Vector3 } from '@babylonjs/core/Maths/math.vector.js' import { MeshBuilder } from '@babylonjs/core/Meshes/meshBuilder.js' import { Scene } from '@babylonjs/core/scene.js' -import { loadAssets, registerAssets } from '../shared/assets' +import { registerAssets } from '../shared/assets' import { createBackgroundUI } from '../shared/uis/background-ui' import { createForegroundUI } from '../shared/uis/foreground-ui' @@ -21,8 +21,8 @@ export async function main({ ResourcesWebGPU, UI, UIBabylon, - loadImage, - loadJson, + loadAssets, + loadYoga, }) { const context = canvas.getContext('webgpu') const format = navigator.gpu.getPreferredCanvasFormat() @@ -53,14 +53,15 @@ export async function main({ context, format, }) - const assets = await loadAssets({ loadImage, loadJson }) + const assets = await loadAssets() registerAssets({ resources, assets }) - const { ui: overlay_ui } = await UI.create({ resources, device_pixel_ratio }) + const { ui: overlay_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) const texture_width = Math.round(device_width * TEXTURE_SCALAR) const texture_height = Math.round(device_height * TEXTURE_SCALAR) const { ui: first_ui, plane: first_plane } = await UIBabylon.create({ + loadYoga, scene, resources, device_pixel_ratio, @@ -70,6 +71,7 @@ export async function main({ world_height: WORLD_HEIGHT, }) const { ui: second_ui, plane: second_plane } = await UIBabylon.create({ + loadYoga, scene, resources, device_pixel_ratio, @@ -180,6 +182,8 @@ export async function main({ }) engine.runRenderLoop(() => scene.render()) + + return { uis: [overlay_ui, first_ui, second_ui] } } function syncCanvasSize({ canvas, engine, overlay_ui }) { diff --git a/examples/engines/babylon.html b/examples/engines/babylon.html index ccc8d0a4..ea310f59 100644 --- a/examples/engines/babylon.html +++ b/examples/engines/babylon.html @@ -23,9 +23,11 @@ diff --git a/examples/engines/babylon.ts b/examples/engines/babylon.ts index 9ff450ed..86eed275 100644 --- a/examples/engines/babylon.ts +++ b/examples/engines/babylon.ts @@ -6,11 +6,11 @@ import { StandardMaterial } from '@babylonjs/core/Materials/standardMaterial.js' import { VertexBuffer } from '@babylonjs/core/Buffers/buffer.js' import { Color3 } from '@babylonjs/core/Maths/math.color.js' import { Quaternion, Vector3 } from '@babylonjs/core/Maths/math.vector.js' -import { loadAssets, registerAssets } from '../shared/assets' +import { registerAssets } from '../shared/assets' import { createBackgroundUI } from '../shared/uis/background-ui' import { createForegroundUI } from '../shared/uis/foreground-ui' -export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadImage, loadJson }) { +export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadAssets, loadYoga }) { const context = canvas.getContext('webgpu') const format = navigator.gpu.getPreferredCanvasFormat() const engine = new WebGPUEngine(canvas, { @@ -31,8 +31,8 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma format, }) const device_pixel_ratio = window.devicePixelRatio - const { ui: background_ui } = await UI.create({ resources, device_pixel_ratio }) - const { ui: foreground_ui } = await UI.create({ resources, device_pixel_ratio }) + const { ui: background_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) + const { ui: foreground_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) const scene = new Scene(engine) scene.autoClear = false @@ -61,7 +61,7 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma cube_material.emissiveColor = Color3.White() cube.material = cube_material - const assets = await loadAssets({ loadImage, loadJson }) + const assets = await loadAssets() registerAssets({ resources, assets }) const { grid } = createBackgroundUI({ ui: background_ui, assets, background_color: '#fde2c0' }) createForegroundUI({ ui: foreground_ui, assets, title: 'Hello Babylon.js!' }) @@ -105,6 +105,8 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma cube.rotationQuaternion!.set(Math.sin(now) * rotation_sin, Math.cos(now) * rotation_sin, 0, rotation_cos) scene.render() }) + + return { uis: [background_ui, foreground_ui] } } function syncCanvasSize({ canvas, engine, background_ui, foreground_ui }) { diff --git a/examples/engines/babylonlite-worldspace.html b/examples/engines/babylonlite-worldspace.html index 1aaebd91..40032f11 100644 --- a/examples/engines/babylonlite-worldspace.html +++ b/examples/engines/babylonlite-worldspace.html @@ -23,10 +23,12 @@ diff --git a/examples/engines/babylonlite-worldspace.ts b/examples/engines/babylonlite-worldspace.ts index f2de5d7a..9e3224be 100644 --- a/examples/engines/babylonlite-worldspace.ts +++ b/examples/engines/babylonlite-worldspace.ts @@ -16,7 +16,7 @@ import { renderFrame, resizeEngine, } from '@babylonjs/lite' -import { loadAssets, registerAssets } from '../shared/assets' +import { registerAssets } from '../shared/assets' import { createBackgroundUI } from '../shared/uis/background-ui' import { createForegroundUI } from '../shared/uis/foreground-ui' @@ -29,8 +29,8 @@ export async function main({ ResourcesWebGPU, UI, UIBabylonLite, - loadImage, - loadJson, + loadAssets, + loadYoga, }) { const device_pixel_ratio = window.devicePixelRatio const device_width = Math.max(canvas.clientWidth, canvas.clientHeight) @@ -48,14 +48,15 @@ export async function main({ context, format: engine.format, }) - const assets = await loadAssets({ loadImage, loadJson }) + const assets = await loadAssets() registerAssets({ resources, assets }) - const { ui: overlay_ui } = await UI.create({ resources, device_pixel_ratio }) + const { ui: overlay_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) const texture_width = Math.round(device_width * TEXTURE_SCALAR) const texture_height = Math.round(device_height * TEXTURE_SCALAR) const { ui: first_ui, plane: first_plane } = await UIBabylonLite.create({ + loadYoga, engine, scene, resources, @@ -66,6 +67,7 @@ export async function main({ world_height: WORLD_HEIGHT, }) const { ui: second_ui, plane: second_plane } = await UIBabylonLite.create({ + loadYoga, engine, scene, resources, @@ -181,6 +183,8 @@ export async function main({ } requestAnimationFrame(frame) + + return { uis: [overlay_ui, first_ui, second_ui] } } function syncCanvasSize({ canvas, overlay_ui }) { diff --git a/examples/engines/babylonlite.html b/examples/engines/babylonlite.html index 879e4353..5616dc14 100644 --- a/examples/engines/babylonlite.html +++ b/examples/engines/babylonlite.html @@ -23,9 +23,11 @@ diff --git a/examples/engines/babylonlite.ts b/examples/engines/babylonlite.ts index a2d13aa9..7b5f4b7f 100644 --- a/examples/engines/babylonlite.ts +++ b/examples/engines/babylonlite.ts @@ -15,11 +15,11 @@ import { renderFrame, resizeEngine, } from '@babylonjs/lite' -import { loadAssets, registerAssets } from '../shared/assets' +import { registerAssets } from '../shared/assets' import { createBackgroundUI } from '../shared/uis/background-ui' import { createForegroundUI } from '../shared/uis/foreground-ui' -export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadImage, loadJson }) { +export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadAssets, loadYoga }) { const engine = await createEngine(canvas, { msaaSamples: 1, alphaMode: 'premultiplied' }) const scene = createSceneContext(engine, { defaultRenderTask: false }) @@ -66,10 +66,10 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma format: engine.format, }) const device_pixel_ratio = window.devicePixelRatio - const { ui: background_ui } = await UI.create({ resources, device_pixel_ratio }) - const { ui: foreground_ui } = await UI.create({ resources, device_pixel_ratio }) + const { ui: background_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) + const { ui: foreground_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) - const assets = await loadAssets({ loadImage, loadJson }) + const assets = await loadAssets() registerAssets({ resources, assets }) const { grid } = createBackgroundUI({ ui: background_ui, assets, background_color: '#fbd0dd' }) createForegroundUI({ ui: foreground_ui, assets, title: 'Hello Babylon Lite!' }) @@ -158,6 +158,8 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma } requestAnimationFrame(frame) + + return { uis: [background_ui, foreground_ui] } } function syncCanvasSize({ canvas, background_ui, foreground_ui }) { diff --git a/examples/engines/pixi.html b/examples/engines/pixi.html index 17b6396b..acceb6ba 100644 --- a/examples/engines/pixi.html +++ b/examples/engines/pixi.html @@ -23,9 +23,11 @@ diff --git a/examples/engines/pixi.ts b/examples/engines/pixi.ts index d56a01b4..62fbe003 100644 --- a/examples/engines/pixi.ts +++ b/examples/engines/pixi.ts @@ -1,5 +1,5 @@ import { Container, DOMAdapter, Sprite, Texture, WebGPURenderer } from 'pixi.js' -import { loadAssets, registerAssets } from '../shared/assets' +import { registerAssets } from '../shared/assets' import { createBackgroundUI } from '../shared/uis/background-ui' import { createForegroundUI } from '../shared/uis/foreground-ui' @@ -7,12 +7,12 @@ const TEXTURE_SIZE = 256 export { DOMAdapter } -export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadImage, loadJson }) { +export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadAssets, loadYoga }) { const adapter = await navigator.gpu.requestAdapter() const resources = await ResourcesWebGPU.create({ canvas, adapter }) const device_pixel_ratio = window.devicePixelRatio - const { ui: background_ui } = await UI.create({ resources, device_pixel_ratio }) - const { ui: foreground_ui } = await UI.create({ resources, device_pixel_ratio }) + const { ui: background_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) + const { ui: foreground_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) const pixi_renderer = new WebGPURenderer() await pixi_renderer.init({ @@ -33,7 +33,7 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma square.anchor.set(0.5) stage.addChild(square) - const assets = await loadAssets({ loadImage, loadJson }) + const assets = await loadAssets() registerAssets({ resources, assets }) const { grid } = createBackgroundUI({ ui: background_ui, assets, background_color: '#e2cff4' }) createForegroundUI({ ui: foreground_ui, assets, title: 'Hello Pixi.js!' }) @@ -68,6 +68,8 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma } requestAnimationFrame(frame) + + return { uis: [background_ui, foreground_ui] } } function syncCanvasSize({ canvas, pixi_renderer, square, background_ui, foreground_ui }) { diff --git a/examples/engines/playcanvas-worldspace.html b/examples/engines/playcanvas-worldspace.html index d432f3c0..231f9319 100644 --- a/examples/engines/playcanvas-worldspace.html +++ b/examples/engines/playcanvas-worldspace.html @@ -24,9 +24,11 @@ diff --git a/examples/engines/playcanvas-worldspace.ts b/examples/engines/playcanvas-worldspace.ts index 49aae6a2..f2071c7d 100644 --- a/examples/engines/playcanvas-worldspace.ts +++ b/examples/engines/playcanvas-worldspace.ts @@ -23,7 +23,7 @@ import { Vec3, createGraphicsDevice, } from 'playcanvas' -import { loadAssets, registerAssets } from '../shared/assets' +import { registerAssets } from '../shared/assets' import { createBackgroundUI } from '../shared/uis/background-ui' import { createForegroundUI } from '../shared/uis/foreground-ui' @@ -36,8 +36,8 @@ export async function main({ UIPlayCanvas, UI, ResourcesWebGPU, - loadImage, - loadJson, + loadAssets, + loadYoga, }) { const gfx_options = { deviceTypes: ['webgpu'], @@ -71,13 +71,14 @@ export async function main({ const device_height = Math.min(canvas.clientWidth, canvas.clientHeight) const world_width = WORLD_HEIGHT * (device_width / device_height) - const assets = await loadAssets({ loadImage, loadJson }) + const assets = await loadAssets() registerAssets({ resources, assets }) - const { ui: overlay_ui } = await UI.create({ resources, device_pixel_ratio }) + const { ui: overlay_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) const texture_width = Math.round(device_width * TEXTURE_SCALAR) const texture_height = Math.round(device_height * TEXTURE_SCALAR) const { ui: first_ui, plane: first_plane } = await UIPlayCanvas.create({ + loadYoga, app, resources, device_pixel_ratio, @@ -87,6 +88,7 @@ export async function main({ world_height: WORLD_HEIGHT, }) const { ui: second_ui, plane: second_plane } = await UIPlayCanvas.create({ + loadYoga, app, resources, device_pixel_ratio, @@ -280,6 +282,8 @@ export async function main({ app.on('frameend', () => resources.present()) app.start() + + return { uis: [overlay_ui, first_ui, second_ui] } } function setMouseButtons(mouse_buttons: boolean[], buttons: number) { diff --git a/examples/engines/playcanvas.html b/examples/engines/playcanvas.html index 7eb59147..33d12708 100644 --- a/examples/engines/playcanvas.html +++ b/examples/engines/playcanvas.html @@ -23,9 +23,11 @@ diff --git a/examples/engines/playcanvas.ts b/examples/engines/playcanvas.ts index c2d8ff90..daffe4b4 100644 --- a/examples/engines/playcanvas.ts +++ b/examples/engines/playcanvas.ts @@ -16,11 +16,11 @@ import { Vec3, createGraphicsDevice, } from 'playcanvas' -import { loadAssets, registerAssets } from '../shared/assets' +import { registerAssets } from '../shared/assets' import { createBackgroundUI } from '../shared/uis/background-ui' import { createForegroundUI } from '../shared/uis/foreground-ui' -export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadImage, loadJson }) { +export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadAssets, loadYoga }) { const gfxOptions = { deviceTypes: ['webgpu'], antialias: false, @@ -37,8 +37,8 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma format: graphics_device.canvasConfig.format, }) const device_pixel_ratio = graphics_device.maxPixelRatio - const { ui: background_ui } = await UI.create({ resources, device_pixel_ratio }) - const { ui: foreground_ui } = await UI.create({ resources, device_pixel_ratio }) + const { ui: background_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) + const { ui: foreground_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) const createOptions = new AppOptions() createOptions.graphicsDevice = graphics_device @@ -95,7 +95,7 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma app.root.addChild(camera) camera.setPosition(0, 0, 4) - const assets = await loadAssets({ loadImage, loadJson }) + const assets = await loadAssets() registerAssets({ resources, assets }) const { grid } = createBackgroundUI({ ui: background_ui, assets, background_color: '#d2e5f7' }) createForegroundUI({ ui: foreground_ui, assets, title: 'Hello PlayCanvas!' }) @@ -143,6 +143,8 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma app.on('frameend', () => resources.present()) app.start() + + return { uis: [background_ui, foreground_ui] } } function syncCanvasSize({ canvas, app, graphics_device, background_ui, foreground_ui }) { diff --git a/examples/engines/three-worldspace.html b/examples/engines/three-worldspace.html index 9363b679..ce579414 100644 --- a/examples/engines/three-worldspace.html +++ b/examples/engines/three-worldspace.html @@ -23,10 +23,12 @@ diff --git a/examples/engines/three-worldspace.ts b/examples/engines/three-worldspace.ts index 97390dd2..c30c991e 100644 --- a/examples/engines/three-worldspace.ts +++ b/examples/engines/three-worldspace.ts @@ -1,6 +1,6 @@ import * as THREE from 'three/webgpu' import { OrbitControls } from 'three/addons/controls/OrbitControls.js' -import { loadAssets, registerAssets } from '../shared/assets' +import { registerAssets } from '../shared/assets' import { createBackgroundUI } from '../shared/uis/background-ui' import { createForegroundUI } from '../shared/uis/foreground-ui' @@ -13,8 +13,8 @@ export async function main({ ResourcesWebGPU, UI, UIThree, - loadImage, - loadJson, + loadAssets, + loadYoga, }) { const device_pixel_ratio = window.devicePixelRatio const device_width = Math.max(canvas.clientWidth, canvas.clientHeight) @@ -23,10 +23,10 @@ export async function main({ const resources = await ResourcesWebGPU.create({ canvas }) const { context, device } = resources - const assets = await loadAssets({ loadImage, loadJson }) + const assets = await loadAssets() registerAssets({ resources, assets }) - const { ui: overlay_ui } = await UI.create({ resources, device_pixel_ratio }) + const { ui: overlay_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) const texture_width = Math.round(device_width * TEXTURE_SCALAR) const texture_height = Math.round(device_height * TEXTURE_SCALAR) @@ -37,6 +37,7 @@ export async function main({ material: first_material, geometry: first_geometry, } = await UIThree.create({ + loadYoga, resources, device_pixel_ratio, texture_width: texture_width, @@ -52,6 +53,7 @@ export async function main({ material: second_material, geometry: second_geometry, } = await UIThree.create({ + loadYoga, resources, device_pixel_ratio, texture_width: texture_width, @@ -177,6 +179,8 @@ export async function main({ // }, 10000) requestAnimationFrame(renderFrame) + + return { uis: [overlay_ui, first_ui, second_ui] } } function syncCanvasSize({ canvas, three_renderer, camera, overlay_ui }) { diff --git a/examples/engines/three.html b/examples/engines/three.html index 54b5f2ca..b1e2e537 100644 --- a/examples/engines/three.html +++ b/examples/engines/three.html @@ -23,9 +23,11 @@ diff --git a/examples/engines/three.ts b/examples/engines/three.ts index 3f49a23b..0a1e1e44 100644 --- a/examples/engines/three.ts +++ b/examples/engines/three.ts @@ -1,15 +1,17 @@ import * as THREE from 'three/webgpu' -import { loadAssets, registerAssets } from '../shared/assets' +import { registerAssets } from '../shared/assets' import { createBackgroundUI } from '../shared/uis/background-ui' import { createForegroundUI } from '../shared/uis/foreground-ui' -export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadImage, loadJson }) { +export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadAssets, loadYoga }) { const resources = await ResourcesWebGPU.create({ canvas }) const { ui: background_ui } = await UI.create({ + loadYoga, resources, device_pixel_ratio: devicePixelRatio, }) const { ui: foreground_ui } = await UI.create({ + loadYoga, resources, device_pixel_ratio: devicePixelRatio, }) @@ -43,7 +45,7 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma const cube = new THREE.Mesh(geometry, new THREE.MeshBasicMaterial({ vertexColors: true })) scene.add(cube) - const assets = await loadAssets({ loadImage, loadJson }) + const assets = await loadAssets() registerAssets({ resources, assets }) const { grid } = createBackgroundUI({ ui: background_ui, assets, background_color: '#cfeeda' }) createForegroundUI({ ui: foreground_ui, assets, title: 'Hello Three.js!' }) @@ -84,6 +86,8 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma } requestAnimationFrame(frame) + + return { uis: [background_ui, foreground_ui] } } function syncCanvasSize({ canvas, background_ui, foreground_ui, three_renderer, camera }) { diff --git a/examples/engines/typegpu.html b/examples/engines/typegpu.html index 44ecb262..d905284d 100644 --- a/examples/engines/typegpu.html +++ b/examples/engines/typegpu.html @@ -23,9 +23,11 @@ diff --git a/examples/engines/typegpu.ts b/examples/engines/typegpu.ts index 64da1fa0..4d4732c9 100644 --- a/examples/engines/typegpu.ts +++ b/examples/engines/typegpu.ts @@ -1,17 +1,17 @@ import tgpu from 'typegpu' import * as d from 'typegpu/data' import * as std from 'typegpu/std' -import { loadAssets, registerAssets } from '../shared/assets' +import { registerAssets } from '../shared/assets' import { createBackgroundUI } from '../shared/uis/background-ui' import { createForegroundUI } from '../shared/uis/foreground-ui' const CUBE_VERTEX_COUNT = 36 -export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadImage, loadJson }) { +export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadAssets, loadYoga }) { const resources = await ResourcesWebGPU.create({ canvas }) const device_pixel_ratio = window.devicePixelRatio - const { ui: background_ui } = await UI.create({ resources, device_pixel_ratio }) - const { ui: foreground_ui } = await UI.create({ resources, device_pixel_ratio }) + const { ui: background_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) + const { ui: foreground_ui } = await UI.create({ loadYoga, resources, device_pixel_ratio }) const { device, context, format } = resources const root = tgpu.initFromDevice({ device }) @@ -24,7 +24,7 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma foreground_ui.update() }) - const assets = await loadAssets({ loadImage, loadJson }) + const assets = await loadAssets() registerAssets({ resources, assets }) const { grid } = createBackgroundUI({ ui: background_ui, assets, background_color: '#f4efc2' }) createForegroundUI({ ui: foreground_ui, assets, title: 'Hello TypeGPU!' }) @@ -114,6 +114,8 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma } requestAnimationFrame(frame) + + return { uis: [background_ui, foreground_ui] } } function syncCanvasSize({ canvas, background_ui, foreground_ui }) { diff --git a/examples/engines/webgpu.html b/examples/engines/webgpu.html index 91c571f2..68fff5eb 100644 --- a/examples/engines/webgpu.html +++ b/examples/engines/webgpu.html @@ -23,9 +23,11 @@ diff --git a/examples/engines/webgpu.ts b/examples/engines/webgpu.ts index 6c68ae4a..cc4faaf3 100644 --- a/examples/engines/webgpu.ts +++ b/examples/engines/webgpu.ts @@ -1,5 +1,5 @@ import { mat4 } from 'wgpu-matrix' -import { loadAssets, registerAssets } from '../shared/assets' +import { registerAssets } from '../shared/assets' import { createBackgroundUI } from '../shared/uis/background-ui' import { createForegroundUI } from '../shared/uis/foreground-ui' @@ -21,11 +21,11 @@ const CUBE_VERTEX_ARRAY = new Float32Array([ 1, -1, 1, 1, 1, 0, 1, 0, 0, 1, -1, -1, 1, 1, 0, 0, 1, 0, 1, -1, 1, -1, 1, 0, 1, 0, 1, 1, 0, ]) -export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadImage, loadJson }) { +export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadAssets, loadYoga }) { const resources = await ResourcesWebGPU.create({ canvas }) const device_pixel_ratio = window.devicePixelRatio - const { ui: background_ui } = await UI.create({ resources, device_pixel_ratio }) - const { ui: foreground_ui } = await UI.create({ resources, device_pixel_ratio }) + const { ui: background_ui } = await UI.create({ resources, device_pixel_ratio, loadYoga }) + const { ui: foreground_ui } = await UI.create({ resources, device_pixel_ratio, loadYoga }) const { device, context, format } = resources syncCanvasSize({ canvas, background_ui, foreground_ui }) @@ -37,7 +37,7 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma foreground_ui.update() }) - const assets = await loadAssets({ loadImage, loadJson }) + const assets = await loadAssets() registerAssets({ resources, assets }) const { grid } = createBackgroundUI({ ui: background_ui, assets, background_color: '#e2cff4' }) createForegroundUI({ ui: foreground_ui, assets, title: 'Hello WebGPU!' }) @@ -177,6 +177,8 @@ export async function main({ canvas, onCanvasEvent, UI, ResourcesWebGPU, loadIma } requestAnimationFrame(frame) + + return { uis: [background_ui, foreground_ui] } } function syncCanvasSize({ canvas, background_ui, foreground_ui }) { diff --git a/package-lock.json b/package-lock.json index d8559fe1..2ce61f37 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,13 @@ { "name": "@uno.build/ui", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@uno.build/ui", - "version": "0.1.0", + "version": "0.1.1", + "license": "Apache-2.0", "dependencies": { "@webgpu/types": "0.1.71", "yoga-layout": "^3.2.1" @@ -20,7 +21,7 @@ "@solidjs/universal": "^2.0.0-rc.8", "@solidjs/vite-plugin": "3.0.0-next.28", "@types/react": "^19.3.0", - "@types/react-reconciler": "^0.33.0", + "@types/react-reconciler": "0.33.0", "@types/three": "^0.186.0", "@vitejs/plugin-vue": "^6.0.9", "esbuild": "0.28.2", @@ -140,7 +141,6 @@ "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.7", @@ -391,9 +391,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz", - "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==", + "version": "7.29.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz", + "integrity": "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==", "dev": true, "license": "MIT", "dependencies": { @@ -439,9 +439,9 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.29.7.tgz", - "integrity": "sha512-jK52h8LaLc7JarhQV2ofeFMts4H7vnOXnqZNA6fYglBTZewRBE51KWt3BUltW1P+KoPsYkHoJeXePuz4zo2LMw==", + "version": "7.29.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.29.9.tgz", + "integrity": "sha512-FFwIwzU+7SCOuxxV4YtJql6T9981ZVTm+FHO5GhVsRqCTdy0WwrEZh3l42ARpXruJUDGOptdduHW6Zr7pNPLNg==", "dev": true, "license": "MIT", "dependencies": { @@ -507,16 +507,16 @@ } }, "node_modules/@babylonjs/core": { - "version": "9.26.1", - "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-9.26.1.tgz", - "integrity": "sha512-gaLZVEXih7DZ2VUxFK/BMJbX5o63mbjbqk68UtDtmJQXc0hwDmmdxrreYTK6Yy+FzGyY5niYkmuXXX9jZ9bxAw==", + "version": "9.29.0", + "resolved": "https://registry.npmjs.org/@babylonjs/core/-/core-9.29.0.tgz", + "integrity": "sha512-qWrtTRsZF0DO6IouYTEZrcQtUEJzlKbc3i/7Ek2T1INFJ+zp9fxO+CIRJ9HRInOG6HYjQl1i6RhxXVyUbx8yxQ==", "dev": true, "license": "Apache-2.0" }, "node_modules/@babylonjs/lite": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/@babylonjs/lite/-/lite-1.29.0.tgz", - "integrity": "sha512-wh3QURaldkuc8B2Ga2FR7LexGSiX2YNTNhIH6IKYGOwITRqvAjC3zP0UuCbFdmshlxandIR+jUbhntSBTabVRg==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/@babylonjs/lite/-/lite-1.32.0.tgz", + "integrity": "sha512-FqVBncRib64TnsbHVAPi50+rdVMtM7tLIKN7NZVEgjUg2LYKzc31Zu1dzaTxrAyHOp38jMPVeWwGtOBlkbtG5g==", "dev": true, "license": "Apache-2.0", "peerDependencies": { @@ -625,6 +625,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -639,6 +642,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -682,7 +688,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@emnapi/wasi-threads": "1.2.2", "tslib": "^2.4.0" @@ -695,7 +700,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -1226,9 +1230,9 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.149.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.149.0.tgz", - "integrity": "sha512-Efcc+iF0j3Bf67YjEqIqWXbX5XddXoK/Mw4K1/JuXwRCZ8N16VR7iT23nlCc9XrveFVh/E5Rqs2StT0V8v9LdA==", + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.152.0.tgz", + "integrity": "sha512-oM/5rLBm2tPkg0iBgkH/FOeR3PCDpY19GTgAZjMFM8h9WI9VW7cLgzp6nwtarYKmovavIQZ+Fe/RKX/8C8O/Rw==", "dev": true, "license": "MIT", "funding": { @@ -1259,9 +1263,9 @@ } }, "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.8.tgz", - "integrity": "sha512-tN5aztYkKCte4i5SIrrz5yK/HMjEuCqCSCJa418jOV8tZ1cBY3YF2otxB1ktPxzsLA1BeTqwapK0bfjxNvHJVw==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.12.tgz", + "integrity": "sha512-dB/a1214qKfHMXCpgqR4OZT+jS4kTyEXbQGJPqzobt5EwH5rX080pxE37alt3RzvR1bf1Yz/yGqRfrYAxuPw0A==", "cpu": [ "arm" ], @@ -1276,9 +1280,9 @@ } }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.8.tgz", - "integrity": "sha512-dIYTWl9XprMUiQFoc55KUyk/oS8SKYH3zFl0LTR7RT0Xj4hgSVyuJcroH8JUu8RcpF8fTB6E0aOwCkZoYPcDSQ==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.12.tgz", + "integrity": "sha512-7KHFgQ5VJxIHcLlrwrc3Xbds7oTNQT7Pgi9gQCJKrd2VGab/UksIOYp6VD8MzCstGxOKMgNamPwUCfxPdP1OHg==", "cpu": [ "arm64" ], @@ -1293,9 +1297,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.8.tgz", - "integrity": "sha512-PCSDQGXD2IyTEFrcgPyBM8jJuGmrbCMuoIOXdbEGVemruKACXoLQJrb+A45Z0L5t1RQkdfJprAYPkikbh7dzdA==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.12.tgz", + "integrity": "sha512-3YIhqHD96nA5SaYNRBR16HnGv4oavZvXfD/ayHM+oYZ0WD/8lBAtf6zQua4kEyAvpqrluKXl0lnOBoiNby7x9w==", "cpu": [ "arm64" ], @@ -1310,9 +1314,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.8.tgz", - "integrity": "sha512-Uk7lRsGhPFHVX/sAUC6D5H9Ol30dFHd6iquokll2th3LpdJ3F5CzQB+7DHn0Ri2mG+U7k2zXiPHDrwZenXhwSA==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.12.tgz", + "integrity": "sha512-UuuJ35MFw4gmFOrE9pEqIV+K3syIKveph+Qc1/ljHZVdoDW4pz/JHR/eMVom+TZGl/5OOvGJOWaOCVt3ZfqhxA==", "cpu": [ "x64" ], @@ -1327,9 +1331,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.8.tgz", - "integrity": "sha512-DjszaTEVogPqA5bYzsEeqDCQxbcp2fexQwKcRspYji2yzR68fCf+e4fx6kBSRDwX5/brZaHw/hWS9+A/+/w9sQ==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.12.tgz", + "integrity": "sha512-uMvssit0a4W+/7D8CbHUvG719mH3R2jwXAlh/XcPvuHTE0g++LymF88DCGNX0HM2rBOn0xrzgXktIB6fLSJBTQ==", "cpu": [ "x64" ], @@ -1344,9 +1348,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.8.tgz", - "integrity": "sha512-zmwa7FTmdzB6aaEEuuls18H6Ap5JmJPSoPTuXixeJZV6tG40SyLkApQtz1g8ptZtiEKqj9OM0oNLPh1AgvE31Q==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.12.tgz", + "integrity": "sha512-XcFu0R0xWnwzSf4IQgFH1rJIckPN1pLy2R+4r9IDB7Yfu/ys9cVqfa4pBrMHj7a3gl8mIR4nRNPg0e5IvEVs6g==", "cpu": [ "arm" ], @@ -1361,13 +1365,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.8.tgz", - "integrity": "sha512-KdYQDPHwJVnbFwdTGMgxsI9SqblBlz6STGM+w1We/d5B8OWWidYH0MwkU/uA1wM5fIpO2MkOVxXrNzzuZhw9ew==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.12.tgz", + "integrity": "sha512-260UrKgn8tz39ak+SMDOirKzr7V04M9dWPw5llW00SwBivCZoWcRBKV1d8cXnRkUmSZA3BdiUmBHWk7734Ulpw==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1378,13 +1385,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.8.tgz", - "integrity": "sha512-jFJTifHnNPY+yzOoNZQfSIysrVyXzEQPhPnOUjmD1bcQGHH6s7c8cViKWar8YplQImE5N9JRqMCLrM2CdxOrZA==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.12.tgz", + "integrity": "sha512-5YK1I9SqDkbPgc1IA8BgDl34suqUS2q0KWnBrirm0E51YjOs6eo6dV6jbQfNE/argHRSvd0QUGgtpIoYx+WWpw==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1395,13 +1405,16 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.8.tgz", - "integrity": "sha512-FhiOziBDWPBjbcmRzfLyIJnaP7AVMFXT7YCXPjXxj7wKU3vx24RjrCNN/zjvVa+N2vVoHJwCoUBvsrN/DG3zIA==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.12.tgz", + "integrity": "sha512-Rkcrmp7eFRg74yL5fXEU91JEWbdEPLevWwGtXpmhbjlD1StScbWTmO94Bhly+Mo+ketKYkdmM1vNUKeWSlx8cQ==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1412,13 +1425,16 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.8.tgz", - "integrity": "sha512-WnHfADMzOV2Y55wlx1hzzQnar/wDt/VdvWSD99r18Mz9ylNieIGOkRx3UV21h7m/eJvjySYJkO26VvGNFkwsIQ==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.12.tgz", + "integrity": "sha512-qvK4DuAsQc2BSjlx+Xr+IzOIvvxbGZqxFwdWfG6F518Erj0GGISyQbJ6pIappnOxlNPzNHvo/L0BwB30GZ+zVw==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1429,13 +1445,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.8.tgz", - "integrity": "sha512-H9tRr5ibfXFVLxbPOseVewewFpl28zcEdjRDt2FTUZU7odxP0gEv1ki4/kGmcGOh78oRwZuuQllGLZ9zTJp84g==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.12.tgz", + "integrity": "sha512-Q9uLBO53Xd4QIq1WOycVQyPP1O4HhraEV2qqb3uTrnVw6QZih9duY4vNXOivL1xoUS1/z+W8eF4NMfl2a8Sdjw==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1446,13 +1465,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.8.tgz", - "integrity": "sha512-UefiqfM3D6IVNlZ8tSGs9+Ejjud2T+oxO0IHADU45Y+lyEjD2dVFyZHbkfX0LUb5Zugo/oIv1eCO/KVYhgYJYA==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.12.tgz", + "integrity": "sha512-3IBxWFMjbOZskDPKv8Lf9BCnahlKuHthWkYnyIxOH/QcJrFcS4EmcenthApkwr/5+nEqZlLzeYbxeMaX7A5u4g==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1463,9 +1485,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.8.tgz", - "integrity": "sha512-637Ke4kWSy6rp9cxQ9gMOXlxPgIw/c1beASV4M//3+9I4uwBVOOl74G+e3zyU3u19U7RkRl/HuewixZ/Z6+Rjg==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.12.tgz", + "integrity": "sha512-xtX61xg4LKPkPWilZU1ynKClz5Gj4bf74LML4r3eVLWumKnGjoEr1OSHQhMdbBDoYTi+yjrujvpZe2pUnqCrrA==", "cpu": [ "arm64" ], @@ -1480,9 +1502,9 @@ } }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.8.tgz", - "integrity": "sha512-xWBkPOF1Q9k/Gv1nQXnVdLxKu74jXppuOM4Z3mnypVUJJJwLsMl7hNJGRAUJoG8A5MgOI1ACKM+wBFxSJzKy4A==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.12.tgz", + "integrity": "sha512-At7fPB6PCaIjzgIhEZFxuT+BBFqiQibJDT4d3PhiR3f4E7bbMZF4aKblbFfEM3sETRDd1YiQx/+U/g/B/ou5Ew==", "cpu": [ "arm64" ], @@ -1497,9 +1519,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.8.tgz", - "integrity": "sha512-uz2ZvfgXbxqNwijjjbxrnvALwpyODDcgc1T1N8N3rf/DXKQmaFwmB4LX4yyjggpwN2obdQLb2rgirX5ffCWYng==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.12.tgz", + "integrity": "sha512-WIw2haVKwjuYdXkHaoC0mF8Le71TuCBxjrdKqLbJGctbBABj+ClfmNvtbOnzpq3RokNo5+V1qhtSzJyXorsklQ==", "cpu": [ "x64" ], @@ -1521,9 +1543,9 @@ "license": "MIT" }, "node_modules/@solidjs/signals": { - "version": "2.0.0-rc.8", - "resolved": "https://registry.npmjs.org/@solidjs/signals/-/signals-2.0.0-rc.8.tgz", - "integrity": "sha512-EGk9WkxnlQtqdERjPgS8gvWVjKLZnBQr95e65FOAs9MqkxVhHIjgipan7svZZ6n0rkp6vSc9GxyeY836boaT6w==", + "version": "2.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@solidjs/signals/-/signals-2.0.0-rc.13.tgz", + "integrity": "sha512-4+pRdrAHtfyE9BUJWBup3TpzJojJjgW2mV1vm/Jik4tWa5epxXB/YrLkwqP1v8+S9XjyKKZu5BSLqmcpswMYeQ==", "dev": true, "license": "MIT", "engines": { @@ -1531,16 +1553,16 @@ } }, "node_modules/@solidjs/universal": { - "version": "2.0.0-rc.8", - "resolved": "https://registry.npmjs.org/@solidjs/universal/-/universal-2.0.0-rc.8.tgz", - "integrity": "sha512-8kv1dWX/fvoXnofYz4ww1flttVgm+ysoCYBC3keHKIdmEJ51qGFgT63v7gR8B+htFPxZXfTRkROOshHdLckzLw==", + "version": "2.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@solidjs/universal/-/universal-2.0.0-rc.13.tgz", + "integrity": "sha512-d3RbUw4yioMKBp6+79yPk+UWrPEemLie7GnuI2tqrSHKdauae2FRvg7SfTZ75ZsFyQ1Au6pLEuXshdFSr3HBPw==", "dev": true, "license": "MIT", "engines": { "node": ">=22.12.0" }, "peerDependencies": { - "solid-js": "^2.0.0-rc.8" + "solid-js": "^2.0.0-rc.13" } }, "node_modules/@solidjs/vite-plugin": { @@ -1661,7 +1683,6 @@ "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -1703,8 +1724,7 @@ "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.24.tgz", "integrity": "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@vitejs/plugin-vue": { "version": "6.0.9", @@ -1724,14 +1744,14 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.42.tgz", - "integrity": "sha512-2Ye1ilMtKXxl8qZUrQ5j0CdgenFp/HFQmta6rfRyfEsTG69L6Wk+tWuNoHYHMx9E8tF2Slvdg1FuwDvAXdy1LQ==", + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.43.tgz", + "integrity": "sha512-zdiLhnbe1QQqgDT8xZMpNmyqZ3qlI+/Q/FHQco57Kwl/b05HhCzN6eVGN9QU9rbga4CrS0H5SYY8VGHZCt/1Hg==", "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.29.8", - "@vue/shared": "3.5.42", + "@vue/shared": "3.5.43", "entities": "^7.0.1", "estree-walker": "^2.0.2", "source-map-js": "^1.2.1" @@ -1751,95 +1771,95 @@ } }, "node_modules/@vue/compiler-dom": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.42.tgz", - "integrity": "sha512-qbhQZEFmycr+ni/qyuccS4sucNN7VAbDfbkvNxWOX2VfgFm90MNs3/UhRNKoPMEIVn0F8gdlYjLPvqxHwHeQOA==", + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.43.tgz", + "integrity": "sha512-PEZoAk3NQmsn/ejMzSOCyTYqwGqczrWm70PuhBKjjv1+TCoQAaO/zOqNwjV+honlNstT5ILxtc+8r8UUfj+iEQ==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-core": "3.5.42", - "@vue/shared": "3.5.42" + "@vue/compiler-core": "3.5.43", + "@vue/shared": "3.5.43" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.42.tgz", - "integrity": "sha512-fkCAFB4okcAANGMThboWnScp/gzWjU0ZSkVnjTIiplmMDq2uq0tIB3j+xVu4rhv5rvOgBySCysudmbMd6xRRqw==", + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.43.tgz", + "integrity": "sha512-FCbrG3XNCRl+js3huuKx4IVHBLTvMkJhVepjbxSPu1gn4yWLaYtGNQdjJGZaMytXB6qb76qQDDmDSLy/vkmleQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/parser": "^7.29.8", - "@vue/compiler-core": "3.5.42", - "@vue/compiler-dom": "3.5.42", - "@vue/compiler-ssr": "3.5.42", - "@vue/shared": "3.5.42", + "@vue/compiler-core": "3.5.43", + "@vue/compiler-dom": "3.5.43", + "@vue/compiler-ssr": "3.5.43", + "@vue/shared": "3.5.43", "estree-walker": "^2.0.2", "magic-string": "^0.30.21", - "postcss": "^8.5.19", + "postcss": "^8.5.28", "source-map-js": "^1.2.1" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.42.tgz", - "integrity": "sha512-xmLk3wLkbizPAiLyomjgFFosf2ys9b5Ghb+oh/k2tnvipNz8OFrQOiTcWCzyK7MpBp9KkyGtfvgfLUivbmuGYA==", + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.43.tgz", + "integrity": "sha512-GF62orf7KiJX9RqrHNGrYBudsQGD0OhJ5nDs90O8UiDuS40+YMYomiXu6w6EuvtXuRDc3MSNis3EaaSKAVSWpg==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.5.42", - "@vue/shared": "3.5.42" + "@vue/compiler-dom": "3.5.43", + "@vue/shared": "3.5.43" } }, "node_modules/@vue/reactivity": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.42.tgz", - "integrity": "sha512-TzNNfKpb7hDxbQltwAut8VDQA5YP+BuRlxntHUuRjyKwlMvmAPbs3unhCvieijifY6vFfVBwsS7wG/C7uq+bEQ==", + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.43.tgz", + "integrity": "sha512-G/c9GyOZNI2jVaaS6OX1EF1SSFSv7H0ERqNTl4+DTFMlZmB5eVAB53aLQNam/7NL2NPtaDD7RdVrzf8uJzMuOA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/shared": "3.5.42" + "@vue/shared": "3.5.43" } }, "node_modules/@vue/runtime-core": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.42.tgz", - "integrity": "sha512-9uACtuHs7vJGkm5Bp3xu4xRDLFTIYy5DgxpToVjqGIAhAEKwQfsaLvKINhM6nFVp6bZPRFGdDqd1g52MqKsotA==", + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.43.tgz", + "integrity": "sha512-hU6U6VnVhBGQDpvlnnDlIB8ZGJBiOcgk2lh/0InltHiz3D8oSkluvuvY+do1G2H3+udeKFsmaBlgVYP7gXQzEw==", "dev": true, "license": "MIT", "dependencies": { - "@vue/reactivity": "3.5.42", - "@vue/shared": "3.5.42" + "@vue/reactivity": "3.5.43", + "@vue/shared": "3.5.43" } }, "node_modules/@vue/runtime-dom": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.42.tgz", - "integrity": "sha512-rsCmhiWLaRxGltLwhlCWyYkFn7WAbKRh0q17eZ1A6Dq6eqc2ACQ61IIryxz0LrsvCzHSilLA9JHovVwM8CNE2g==", + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.43.tgz", + "integrity": "sha512-Bb2Jc0YjjJdMt1SJmb9b2L/IWd3I8lIT9x9eS/xvvP9CiVgna0ffua74xKRmt4/uSJ+0r4iN8ex1jrqkhQGWQw==", "dev": true, "license": "MIT", "dependencies": { - "@vue/reactivity": "3.5.42", - "@vue/runtime-core": "3.5.42", - "@vue/shared": "3.5.42", + "@vue/reactivity": "3.5.43", + "@vue/runtime-core": "3.5.43", + "@vue/shared": "3.5.43", "csstype": "^3.2.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.42.tgz", - "integrity": "sha512-2++5dUyYS4gvo7xQXSECUDhB7TS0aOl5SeVfC5qSq1Jgfhjvegw1zqhwTIR3imZ+QYPJQw9gfcFvXGAjGZ7ajQ==", + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.43.tgz", + "integrity": "sha512-l2Ygjv9NehV94PSBxNWsAHC0j/eIIKbn92mBuWXAPGLnn6HfJ6MH5ubsd+Nk0YoZ5FRuxWI1P2VSoh+dbPQhCQ==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-ssr": "3.5.42", - "@vue/runtime-dom": "3.5.42", - "@vue/shared": "3.5.42" + "@vue/compiler-ssr": "3.5.43", + "@vue/runtime-dom": "3.5.43", + "@vue/shared": "3.5.43" } }, "node_modules/@vue/shared": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.42.tgz", - "integrity": "sha512-2rPxex1jQf4jvl9MOHl6YaXCPcrNqz/FstMOEh3QWY+/OME9nQTvl9WYeCwhW7AFjaR0SnngZGlp/wkR6rkI6g==", + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.43.tgz", + "integrity": "sha512-uksS7YGMR5NZyr4JNq0Rp+QyLns0ueaz20KwzIPW9R0LH1Vnt4E+XUM29PNseEbf1www2gOuhuDi5AKOIXag9Q==", "dev": true, "license": "MIT" }, @@ -1847,8 +1867,7 @@ "version": "0.1.71", "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.71.tgz", "integrity": "sha512-mMy8/ODcKhab808co15eW+yN+HgXoQxRQHTiBV9Mrvl1r0ufnid7YOcI+gi4eUWSWl9ezD6TW2KXccrL8HCh2A==", - "license": "BSD-3-Clause", - "peer": true + "license": "BSD-3-Clause" }, "node_modules/@xmldom/xmldom": { "version": "0.8.15", @@ -1897,9 +1916,9 @@ } }, "node_modules/baseline-browser-mapping": { - "version": "2.11.23", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.23.tgz", - "integrity": "sha512-le521dGVfxM7yRX0EikCoSz+rOK+hHzdDt/E7mG1jOJB/6WAAUuwVroLwaB7ApaUsz5Q0kFlDXLSA9MheUIfRQ==", + "version": "2.11.26", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.26.tgz", + "integrity": "sha512-GLQdD3y6UF8iVuMJl5fHgE4jdn/ua7n+toKfLgNlg3BqQtOZjpy68T8Tup8/wGWZCDlm7KMg7tPb4MPn7oN0TQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -1910,9 +1929,9 @@ } }, "node_modules/browserslist": { - "version": "4.28.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.9.tgz", - "integrity": "sha512-EWazOblFYUvlGZcfGhPUPmYh3nikUxBVb+y9MJun5f3hBi812X+8MSQTujLBtgK3cf51fJWbWfOjyeO954d+Eg==", + "version": "4.29.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.3.tgz", + "integrity": "sha512-1R4kiYKXGViqEN0CnoDrXc1StD9niAwu+j2dukWzrD4bJgsD4lDmEp0CRbc6E/vYJIfTHwPmwyaKtVSudICdPA==", "dev": true, "funding": [ { @@ -1929,13 +1948,12 @@ } ], "license": "MIT", - "peer": true, "dependencies": { - "baseline-browser-mapping": "^2.11.20", - "caniuse-lite": "^1.0.30001810", - "electron-to-chromium": "^1.5.420", - "node-releases": "^2.0.54", - "update-browserslist-db": "^1.3.2" + "baseline-browser-mapping": "^2.11.26", + "caniuse-lite": "^1.0.30001813", + "electron-to-chromium": "^1.5.439", + "node-releases": "^2.0.57", + "update-browserslist-db": "^1.3.3" }, "bin": { "browserslist": "cli.js" @@ -1945,9 +1963,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001810", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz", - "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==", + "version": "1.0.30001814", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001814.tgz", + "integrity": "sha512-/Uaf1lAzr59XcMpW0o96WoEfr+VXK2OX4U9AgFoiSHsVJ4HppnIFUjtYzsyDH2+tgANaQb2/oxYGwCPapN1FpA==", "dev": true, "funding": [ { @@ -2015,16 +2033,16 @@ } }, "node_modules/earcut": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.2.3.tgz", - "integrity": "sha512-vnS4AVwp1KHAF13i1vp1/2D5evWy3k5u/iW/B81QVsUZtV8cv2tU0b2VNFlqvh4kYwrFMDdjPCfAmfyJW9y14Q==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.2.4.tgz", + "integrity": "sha512-FHc6yNpnTORB0tM5kmZ03iD2mDuNakDE2lvf4Hw1XkfxtEHIGVi01B/GqUSwx+NcC1WGjidAfpTXzeALtPtfpg==", "dev": true, "license": "ISC" }, "node_modules/electron-to-chromium": { - "version": "1.5.428", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.428.tgz", - "integrity": "sha512-1JxbaFJj1bRKurj1uY3l4xxpU9kOUAUjcIgApj0qu1Pao5GhoIWI8iL0BeMYJ2njig1hBx0A7eKD9VGjH9wlHw==", + "version": "1.5.443", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.443.tgz", + "integrity": "sha512-TDJG36L9A3CWWwZ97HKaE+Iz1sW80pNp6sAU0owzCIV3Zc9eVyRqZK8Vz6NKuMIU8WjP0pIkoqCa0VRf/yFD0Q==", "dev": true, "license": "ISC" }, @@ -2048,7 +2066,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -2378,6 +2395,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -2399,6 +2419,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -2420,6 +2443,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -2441,6 +2467,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -2566,9 +2595,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.55", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.55.tgz", - "integrity": "sha512-mIrE/Cw9y+9Au6dS5vDKDhQza9YvG6w+ZrS6X+ZzA7yFW/soAeaups4Qzn1bL6g5FVy8WtP79+0j82oPIbqRjQ==", + "version": "2.0.57", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.57.tgz", + "integrity": "sha512-kQK9LGGFiHtrWiNhZtA7Qbw17AQz+dmsEKODRIVTXA9+e5MS/2gZEBhYJt13GrAz5/IOZKddH/0Z3TP/Zgo+yw==", "dev": true, "license": "MIT", "engines": { @@ -2623,9 +2652,9 @@ } }, "node_modules/pixi.js": { - "version": "8.20.1", - "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.20.1.tgz", - "integrity": "sha512-akLVBMLvQbaEViqsmVraK0Njer1q4Q4lm4iNKuzvBiFrV8q+6/+HluJN3sWIwO663IBeQtUUS/CaXFJZs6ffXQ==", + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-8.21.0.tgz", + "integrity": "sha512-GJ/KqBtUuWDBPMQu2D0ZHsRCYOcWRjjKrpyC+3jPQI5JTqHMC5dH8l9sSyvoUT4qJidvRzs1fwFWRWceno2Ltw==", "dev": true, "license": "MIT", "workspaces": [ @@ -2737,7 +2766,6 @@ "integrity": "sha512-E8LUcbtBWt20bbl2YoHfx4ZDBdxVTfOKtCZn9cDSJ4l6/nuoApcpIBcj47t2wZoVX8g2ZHuMHbiShgCR1T5Sog==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -2759,14 +2787,13 @@ } }, "node_modules/rolldown": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.8.tgz", - "integrity": "sha512-Z67nTmhZe7anqnM/EjI392w5i/ANUinjip7QYsOyN37oayduxt3ksdX0hf5OOamkAd53BiIHfbfSzfUmzKFQqQ==", + "version": "1.2.12", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.12.tgz", + "integrity": "sha512-8wafseiaG80xmXSfqidUNqZcylTlhmPZZt+za2m+js2sFZ8dTNlhIOV2WcbIPx2hgwPBJpEUGFAMZ9bgBBLTSQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@oxc-project/types": "=0.149.0", + "@oxc-project/types": "=0.152.0", "@rolldown/pluginutils": "^1.0.0" }, "bin": { @@ -2776,21 +2803,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm-eabi": "1.2.8", - "@rolldown/binding-android-arm64": "1.2.8", - "@rolldown/binding-darwin-arm64": "1.2.8", - "@rolldown/binding-darwin-x64": "1.2.8", - "@rolldown/binding-freebsd-x64": "1.2.8", - "@rolldown/binding-linux-arm-gnueabihf": "1.2.8", - "@rolldown/binding-linux-arm64-gnu": "1.2.8", - "@rolldown/binding-linux-arm64-musl": "1.2.8", - "@rolldown/binding-linux-ppc64-gnu": "1.2.8", - "@rolldown/binding-linux-s390x-gnu": "1.2.8", - "@rolldown/binding-linux-x64-gnu": "1.2.8", - "@rolldown/binding-linux-x64-musl": "1.2.8", - "@rolldown/binding-openharmony-arm64": "1.2.8", - "@rolldown/binding-win32-arm64-msvc": "1.2.8", - "@rolldown/binding-win32-x64-msvc": "1.2.8" + "@rolldown/binding-android-arm-eabi": "1.2.12", + "@rolldown/binding-android-arm64": "1.2.12", + "@rolldown/binding-darwin-arm64": "1.2.12", + "@rolldown/binding-darwin-x64": "1.2.12", + "@rolldown/binding-freebsd-x64": "1.2.12", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.12", + "@rolldown/binding-linux-arm64-gnu": "1.2.12", + "@rolldown/binding-linux-arm64-musl": "1.2.12", + "@rolldown/binding-linux-ppc64-gnu": "1.2.12", + "@rolldown/binding-linux-s390x-gnu": "1.2.12", + "@rolldown/binding-linux-x64-gnu": "1.2.12", + "@rolldown/binding-linux-x64-musl": "1.2.12", + "@rolldown/binding-openharmony-arm64": "1.2.12", + "@rolldown/binding-win32-arm64-msvc": "1.2.12", + "@rolldown/binding-win32-x64-msvc": "1.2.12" } }, "node_modules/scheduler": { @@ -2827,6 +2854,7 @@ "integrity": "sha512-HXuLAX2pu/UByPpaeo/TaMfvMIi+1QqIoPJYCcAtU8QkVNwgR6MPlGuCQTErV1JwraaMbYaWVIBX7mppzGLATQ==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10" }, @@ -2835,14 +2863,13 @@ } }, "node_modules/solid-js": { - "version": "2.0.0-rc.8", - "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-2.0.0-rc.8.tgz", - "integrity": "sha512-0DwASKxvwXWAxCiea71cN3bmsyBIOUGmmg/pjSfhxPg+2pBVCh/ZKmwLNjKlPjc8SHeu52ZTio6tBBp1TcPB8A==", + "version": "2.0.0-rc.13", + "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-2.0.0-rc.13.tgz", + "integrity": "sha512-62bYOI4JZ15KOqL5eReKyWSwAXrGb0fbX8SDnHsbJk2UX+SzSyy1gobas2cxW/0BXcobGfQ1V6ffPyQkMIBdoQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@solidjs/signals": "^2.0.0-rc.8", + "@solidjs/signals": "^2.0.0-rc.13", "csstype": "^3.1.0", "seroval": "~1.6.7", "seroval-plugins": "~1.6.7" @@ -2852,20 +2879,19 @@ } }, "node_modules/solid-js/node_modules/seroval": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.6.7.tgz", - "integrity": "sha512-AeDcLh0yO2SFm9W71essgnSzLV9DI8ZH0x0knXn2DMnUZj728mpLbxjlbB6IqKCmqh8JA3cEqRyGoNkt584JcQ==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.6.8.tgz", + "integrity": "sha512-HlSgSAkTk4EqHcje1ptJjfZi1YDv5KbhVJ/d3P7T/nAXua2VmDu+AKDX5VTdFfZf48nDkWB2TKYt0DrCSa+3wg==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=10" } }, "node_modules/solid-js/node_modules/seroval-plugins": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.6.7.tgz", - "integrity": "sha512-4Nk35ttD3DTDJW4hgw5StsVAPeU6qnDFnULAouw6tQ7oLTV/ICXrWpsXo2EE52eSP2joUMazbVf52mFEcADqRw==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.6.8.tgz", + "integrity": "sha512-N7mWAMydj89EnYTHtRpS3LBrAz3J9O6oVrqpuXuvlAHfAUG8WEKqtbAd7SBiJNY5NfCAFhSdyAh7wI4Shjqy4g==", "dev": true, "license": "MIT", "engines": { @@ -2876,9 +2902,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -2886,9 +2912,9 @@ } }, "node_modules/three": { - "version": "0.186.0", - "resolved": "https://registry.npmjs.org/three/-/three-0.186.0.tgz", - "integrity": "sha512-cr/fIM2ddMSVbYVgkfD4jLJv7Fh/8ZTjvo+7gQeSVGUZHxpx9FDwoL5iC7hUz/LiRA8wMbqfnb90xKfm1/HHkQ==", + "version": "0.186.1", + "resolved": "https://registry.npmjs.org/three/-/three-0.186.1.tgz", + "integrity": "sha512-blFeqb49wRCSGUGj7gtpfnSGHy2lwDk94RhUmS1c/hTby70kvChbWpkJ4Pm1390LqzzvTmzgXKHPEafJwCb8jA==", "dev": true, "license": "MIT" }, @@ -2903,9 +2929,9 @@ } }, "node_modules/tinyest": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/tinyest/-/tinyest-0.3.3.tgz", - "integrity": "sha512-LUDiIzyDUQ1mGo8Bam9c7Dubid6Psx14zMzGNwwvOEmNs03FWNUtOrHVXd+TcCorzogQ24Rk0fcfdZ+9rGr1Fw==", + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/tinyest/-/tinyest-0.3.4.tgz", + "integrity": "sha512-81EcMHTCQ2IPweOGk9SpMgjbenR9ZJRsAE84btEv0DhvVKwhe7qBy28hWgatoXa9ppWzmtpHiJ+e86SiaAtY6w==", "dev": true, "license": "MIT", "engines": { @@ -2913,16 +2939,28 @@ } }, "node_modules/tinyest-for-wgsl": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/tinyest-for-wgsl/-/tinyest-for-wgsl-0.4.1.tgz", - "integrity": "sha512-2xCW2a6uJ+8jzYnaeVcJ1HdYBO3OYOsRNUdLEQ1D0O7KekfZkZ46qloczQRVozzbR+J1UocWpXI8UfF2E4CLOg==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/tinyest-for-wgsl/-/tinyest-for-wgsl-0.4.2.tgz", + "integrity": "sha512-syk4IYrWSF653Bktf7Glc/k+jJTY2mOPsEeW9wXowR0Ea7GKQwTxXPWAN8zJKrxQfolXWTdhkn9OwFnIXQX3zA==", "dev": true, "license": "MIT", "dependencies": { - "tinyest": "~0.3.3" + "tinyest": "~0.3.4" }, "engines": { "node": ">=12.20.0" + }, + "peerDependencies": { + "@babel/types": "^7.29.0", + "acorn": "^8.14.1" + }, + "peerDependenciesMeta": { + "@babel/types": { + "optional": true + }, + "acorn": { + "optional": true + } } }, "node_modules/tinyglobby": { @@ -2965,14 +3003,13 @@ "license": "MIT" }, "node_modules/typegpu": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/typegpu/-/typegpu-0.12.5.tgz", - "integrity": "sha512-BNrMbUIuCy2R5ne5J2gFgk6wp7t/fhlCPEJLC1/TIUOzezCi0AUCsR08NjLYzEcx2Sxz5yMerd4ZHigFWSYPJw==", + "version": "0.12.6", + "resolved": "https://registry.npmjs.org/typegpu/-/typegpu-0.12.6.tgz", + "integrity": "sha512-EypNvqL2IA3BL2IsJbd12oOHaxmvtjFVz0+IZTmquc8BZcYYAlL8piT6V0r+GViIWXGr5703Y0P5FswuLKytMA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "tinyest": "~0.3.3", + "tinyest": "~0.3.4", "tsover-runtime": "^0.0.7", "typed-binary": "^4.3.3" }, @@ -2989,7 +3026,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -2999,14 +3035,14 @@ } }, "node_modules/unplugin": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.3.0.tgz", - "integrity": "sha512-qa66K+crbfyE6JK10GjvbJeRrOsuC/JpbnHctfyp/i4oBTxWOzJfRZyDiOk1PtErMFRu8JhsU/wPvOdBNWe5Rg==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-3.4.0.tgz", + "integrity": "sha512-9skdIFlCsPdFV7wUfZxNsFInlW+7nJmGu2gkTu0OUhF56aXGsHab9x52/QhdJ4lC7ZDPWTxbiC4ANqVlsuaW3w==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/remapping": "^2.3.5", - "picomatch": "^4.0.4", + "picomatch": "^4.0.7", "webpack-virtual-modules": "^0.6.2" }, "engines": { @@ -3014,6 +3050,7 @@ }, "peerDependencies": { "@farmfe/core": "*", + "@rsbuild/core": "*", "@rspack/core": "*", "bun-types-no-globals": "*", "esbuild": "*", @@ -3027,6 +3064,9 @@ "@farmfe/core": { "optional": true }, + "@rsbuild/core": { + "optional": true + }, "@rspack/core": { "optional": true }, @@ -3054,9 +3094,9 @@ } }, "node_modules/unplugin-typegpu": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/unplugin-typegpu/-/unplugin-typegpu-0.12.3.tgz", - "integrity": "sha512-60jIV4kH2jt2GMCtPIKjnTiLMrtRGggUD+hPc/8anJrC1TDfBYwnjcQsX0fCJpK24zlF3Ivi3fPAN6o/cRmz+Q==", + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/unplugin-typegpu/-/unplugin-typegpu-0.12.4.tgz", + "integrity": "sha512-nssBuTMPFT1qvtxdSgsRci5XxBw+L1NP+KGYKryMe4FXpHeaa6pq2H450aB5jFq3ZXGqu8QluMpxRMBkqm8oiQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3068,12 +3108,12 @@ "magic-string": "^0.30.21", "pathe": "^2.0.3", "picomatch": "^4.0.4", - "tinyest": "~0.3.3", - "tinyest-for-wgsl": "~0.4.1", + "tinyest": "~0.3.4", + "tinyest-for-wgsl": "~0.4.2", "unplugin": "^3.0.0" }, "peerDependencies": { - "typegpu": "^0.12.4" + "typegpu": "^0.12.6" } }, "node_modules/update-browserslist-db": { @@ -3115,17 +3155,16 @@ "license": "ISC" }, "node_modules/vite": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.0.tgz", - "integrity": "sha512-lhZBVvEHefgE+HQZC9O7EBJgCU/nVzFNl7vkS4RE0APtWLP02/8QVIkQtzBxPquh7lq5/78NHipTj7ODQ6XuyQ==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.2.tgz", + "integrity": "sha512-SQr1x6W5vVSbROg7vsyXIaxK9b0G7zsT68acdWWRmnBUsgDieLCRG+Rep9WdZgcposvv/GSnr4GUUBqB3vXq6w==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", "postcss": "^8.5.28", - "rolldown": "~1.2.6", + "rolldown": "~1.2.11", "tinyglobby": "^0.2.17" }, "bin": { @@ -3214,18 +3253,17 @@ } }, "node_modules/vue": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.42.tgz", - "integrity": "sha512-4RyHQTbQvOPs3MfvUO1Sg0YRrKNnA0mAVtvpd12Tg1fKDN7OHBUl1IqSn8zGJjK9nI3NkNp8cgTpVrSZC5TTcA==", + "version": "3.5.43", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.43.tgz", + "integrity": "sha512-o5qZoksdnjIKvW1srZ3ab7pcDNYAerBjRe54D0LBLfRdCYFrSgBHVXokMas35czQc0//lmx4/tuY4ZNQ+Rf2Ng==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@vue/compiler-dom": "3.5.42", - "@vue/compiler-sfc": "3.5.42", - "@vue/runtime-dom": "3.5.42", - "@vue/server-renderer": "3.5.42", - "@vue/shared": "3.5.42" + "@vue/compiler-dom": "3.5.43", + "@vue/compiler-sfc": "3.5.43", + "@vue/runtime-dom": "3.5.43", + "@vue/server-renderer": "3.5.43", + "@vue/shared": "3.5.43" }, "peerDependencies": { "typescript": "*" diff --git a/package.json b/package.json index e2a67e17..33a8b89b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@uno.build/ui", - "version": "0.1.0", + "version": "0.1.1", "type": "module", "license": "Apache-2.0", "description": "UI system for WebGPU", @@ -26,6 +26,14 @@ "yoga" ], "exports": { + "./style": { + "types": "./dist/style/index.d.ts", + "import": "./dist/style/index.js" + }, + "./components/props": { + "types": "./dist/components/props.d.ts", + "import": "./dist/components/props.js" + }, "./events": { "types": "./dist/events/index.d.ts", "import": "./dist/events/index.js" @@ -172,7 +180,7 @@ "@solidjs/universal": "^2.0.0-rc.8", "@solidjs/vite-plugin": "3.0.0-next.28", "@types/react": "^19.3.0", - "@types/react-reconciler": "^0.33.0", + "@types/react-reconciler": "0.33.0", "@types/three": "^0.186.0", "@vitejs/plugin-vue": "^6.0.9", "esbuild": "0.28.2", diff --git a/scripts/build-check.mjs b/scripts/build-check.mjs index 74139a18..e4e7b653 100644 --- a/scripts/build-check.mjs +++ b/scripts/build-check.mjs @@ -72,9 +72,10 @@ try { } const export_entries = Object.entries(installed_package.exports) - const type_entrypoints = export_entries.map(([, entry]) => + const type_entrypoints = export_entries.flatMap(([subpath, entry]) => [ resolvePackageTarget(installed_directory, entry.types), - ) + resolvePackageTarget(installed_directory, `./dist/public/${subpath.slice(2)}.d.ts`), + ]) const program = ts.createProgram(type_entrypoints, { module: ts.ModuleKind.ESNext, moduleResolution: ts.ModuleResolutionKind.Bundler, @@ -92,11 +93,13 @@ try { const type_filename = resolvePackageTarget(installed_directory, entry.types) const import_filename = resolvePackageTarget(installed_directory, entry.import) - await Promise.all([access(type_filename), access(import_filename)]) + const public_type_filename = resolvePackageTarget(installed_directory, `./dist/public/${subpath.slice(2)}.d.ts`) + const public_import_filename = resolvePackageTarget(installed_directory, `./dist/public/${subpath.slice(2)}.js`) + await Promise.all([access(type_filename), access(import_filename), access(public_type_filename), access(public_import_filename)]) const bundle_result = await bundle({ absWorkingDir: installed_directory, - entryPoints: [import_filename], + entryPoints: [public_import_filename], bundle: true, write: false, packages: 'external', @@ -115,6 +118,14 @@ try { const module_symbol = checker.getSymbolAtLocation(source) assert.ok(module_symbol, `${subpath}: declaration entrypoint is not a module`) + const public_source = program.getSourceFile(public_type_filename) + const public_symbol = checker.getSymbolAtLocation(public_source) + assert.deepEqual( + checker.getExportsOfModule(public_symbol).map((symbol) => symbol.name).sort(), + checker.getExportsOfModule(module_symbol).map((symbol) => symbol.name).sort(), + `${subpath}: public entrypoint exports differ from package exports`, + ) + const type_exports = checker .getExportsOfModule(module_symbol) .filter((symbol) => { diff --git a/scripts/build.mjs b/scripts/build.mjs index 6314d38b..6a6de9c3 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -1,5 +1,5 @@ import assert from 'node:assert/strict' -import { readFile, readdir, rm, writeFile } from 'node:fs/promises' +import { mkdir, readFile, readdir, rm, writeFile } from 'node:fs/promises' import path from 'node:path' import ts from 'typescript' import { transform as transformSolid } from '@dom-expressions/compiler' @@ -56,4 +56,21 @@ for (const file of await readdir(OUTPUT, { recursive: true })) { } await writeFile(destination, text) } -console.log('Modular JavaScript and declarations generated in dist/.') +const package_config = JSON.parse(await readFile(path.join(ROOT, 'package.json'), 'utf8')) +const declaration_program = ts.createProgram(Object.values(package_config.exports).map((entry) => path.join(ROOT, entry.types)), parsed.options) +const checker = declaration_program.getTypeChecker() +for (const [subpath, entry] of Object.entries(package_config.exports)) { + const destination = path.join(OUTPUT, 'public', subpath.slice(2)) + const source = declaration_program.getSourceFile(path.join(ROOT, entry.types)) + const exports = checker.getExportsOfModule(checker.getSymbolAtLocation(source)) + const relative_path = path.relative(path.dirname(destination), path.join(ROOT, entry.import)) + const specifier = relative_path.startsWith('.') ? relative_path : './' + relative_path + let contents = `export * from '${specifier}'\n` + if (exports.some((symbol) => symbol.name === 'default')) { + contents += `export { default } from '${specifier}'\n` + } + await mkdir(path.dirname(destination), { recursive: true }) + await writeFile(destination + '.js', contents) + await writeFile(destination + '.d.ts', contents) +} +console.log('Modular JavaScript, declarations and public entrypoints generated in dist/.') diff --git a/src/events/index.ts b/src/events/index.ts index 0eb71754..8e47eb22 100644 --- a/src/events/index.ts +++ b/src/events/index.ts @@ -1,4 +1,4 @@ -export type { CoreEventMap, NodeEventMap, UIEventMap } from './types' +export type * from './types' import { definePointers } from './pointers' import { defineClick } from './click' diff --git a/src/renderer/webgpu/ResourcesWebGPU.ts b/src/renderer/webgpu/ResourcesWebGPU.ts index c3d52c3f..f0c61974 100644 --- a/src/renderer/webgpu/ResourcesWebGPU.ts +++ b/src/renderer/webgpu/ResourcesWebGPU.ts @@ -14,6 +14,8 @@ import { RESOURCE_EVENT } from '../../core/constants' import { FontManager } from './FontManager' import { ImageManager } from './ImageManager' +export type * from './contracts' + const IMAGE_ATLAS_SIZE = 2048 const FONT_ATLAS_SIZE = 2048 diff --git a/src/style/index.ts b/src/style/index.ts index e5d3e2c4..1b18b250 100644 --- a/src/style/index.ts +++ b/src/style/index.ts @@ -1,5 +1,7 @@ import type { ResolvedStyle, StyleUpdate, StyleRule, StyleContext } from './types' +export type * from './types' + import { normalizeStyleName, normalizeStyleKey } from './normalizers' import { readUnit, runPipeline, runValidators } from './utils' import { expandProperty } from './expand' diff --git a/src/ui/UIWebGPU.ts b/src/ui/UIWebGPU.ts index 9c8a100e..a27a817b 100644 --- a/src/ui/UIWebGPU.ts +++ b/src/ui/UIWebGPU.ts @@ -6,7 +6,8 @@ import UI from '../core/UI' import { DEFINED_EVENTS } from '../events' import RendererWebGPU from '../renderer/RendererWebGPU' -export type { DefinedEvent } from '../core/UI' +export type * from '../core/UI' +export type * from '../renderer/RendererWebGPU' export type UIWebGPUOptions = RendererWebGPUOptions & EventOptions