@number10/jsx-phaser 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +667 -0
- package/README.md +44 -0
- package/dist/_virtual/_commonjsHelpers.cjs +7 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/index.cjs +7 -0
- package/dist/_virtual/index.cjs.map +1 -0
- package/dist/_virtual/index.js +8 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/animation/index.d.ts +7 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/camera/index.d.ts +5 -0
- package/dist/camera/index.d.ts.map +1 -0
- package/dist/camera/use-camera-fx.cjs +49 -0
- package/dist/camera/use-camera-fx.cjs.map +1 -0
- package/dist/camera/use-camera-fx.d.ts +25 -0
- package/dist/camera/use-camera-fx.d.ts.map +1 -0
- package/dist/camera/use-camera-fx.js +49 -0
- package/dist/camera/use-camera-fx.js.map +1 -0
- package/dist/clip/index.cjs +8 -0
- package/dist/clip/index.cjs.map +1 -0
- package/dist/clip/index.d.ts +3 -0
- package/dist/clip/index.d.ts.map +1 -0
- package/dist/clip/index.js +9 -0
- package/dist/clip/index.js.map +1 -0
- package/dist/clip/stencil-clip-depth.cjs +24 -0
- package/dist/clip/stencil-clip-depth.cjs.map +1 -0
- package/dist/clip/stencil-clip-depth.d.ts +10 -0
- package/dist/clip/stencil-clip-depth.d.ts.map +1 -0
- package/dist/clip/stencil-clip-depth.js +24 -0
- package/dist/clip/stencil-clip-depth.js.map +1 -0
- package/dist/clip/stencil-clip-extension.cjs +113 -0
- package/dist/clip/stencil-clip-extension.cjs.map +1 -0
- package/dist/clip/stencil-clip-extension.d.ts +18 -0
- package/dist/clip/stencil-clip-extension.d.ts.map +1 -0
- package/dist/clip/stencil-clip-extension.js +96 -0
- package/dist/clip/stencil-clip-extension.js.map +1 -0
- package/dist/clip/stencil-clip-fbo-bridge.cjs +46 -0
- package/dist/clip/stencil-clip-fbo-bridge.cjs.map +1 -0
- package/dist/clip/stencil-clip-fbo-bridge.d.ts +7 -0
- package/dist/clip/stencil-clip-fbo-bridge.d.ts.map +1 -0
- package/dist/clip/stencil-clip-fbo-bridge.js +46 -0
- package/dist/clip/stencil-clip-fbo-bridge.js.map +1 -0
- package/dist/clip/stencil-clip-renderer.cjs +300 -0
- package/dist/clip/stencil-clip-renderer.cjs.map +1 -0
- package/dist/clip/stencil-clip-renderer.d.ts +7 -0
- package/dist/clip/stencil-clip-renderer.d.ts.map +1 -0
- package/dist/clip/stencil-clip-renderer.js +300 -0
- package/dist/clip/stencil-clip-renderer.js.map +1 -0
- package/dist/clip/stencil-clip-state.cjs +84 -0
- package/dist/clip/stencil-clip-state.cjs.map +1 -0
- package/dist/clip/stencil-clip-state.d.ts +28 -0
- package/dist/clip/stencil-clip-state.d.ts.map +1 -0
- package/dist/clip/stencil-clip-state.js +84 -0
- package/dist/clip/stencil-clip-state.js.map +1 -0
- package/dist/clip/stencil-clip-types.d.ts +67 -0
- package/dist/clip/stencil-clip-types.d.ts.map +1 -0
- package/dist/clip/stencil-clip.cjs +138 -0
- package/dist/clip/stencil-clip.cjs.map +1 -0
- package/dist/clip/stencil-clip.d.ts +53 -0
- package/dist/clip/stencil-clip.d.ts.map +1 -0
- package/dist/clip/stencil-clip.js +122 -0
- package/dist/clip/stencil-clip.js.map +1 -0
- package/dist/colors/use-color-mode.cjs +28 -0
- package/dist/colors/use-color-mode.cjs.map +1 -0
- package/dist/colors/use-color-mode.d.ts +22 -0
- package/dist/colors/use-color-mode.d.ts.map +1 -0
- package/dist/colors/use-color-mode.js +28 -0
- package/dist/colors/use-color-mode.js.map +1 -0
- package/dist/colors/use-colors.cjs +45 -0
- package/dist/colors/use-colors.cjs.map +1 -0
- package/dist/colors/use-colors.d.ts +36 -0
- package/dist/colors/use-colors.d.ts.map +1 -0
- package/dist/colors/use-colors.js +45 -0
- package/dist/colors/use-colors.js.map +1 -0
- package/dist/components/DebugPanel.cjs +88 -0
- package/dist/components/DebugPanel.cjs.map +1 -0
- package/dist/components/DebugPanel.d.ts +45 -0
- package/dist/components/DebugPanel.d.ts.map +1 -0
- package/dist/components/DebugPanel.js +71 -0
- package/dist/components/DebugPanel.js.map +1 -0
- package/dist/components/appliers/applyBackground.cjs +89 -0
- package/dist/components/appliers/applyBackground.cjs.map +1 -0
- package/dist/components/appliers/applyBackground.d.ts +18 -0
- package/dist/components/appliers/applyBackground.d.ts.map +1 -0
- package/dist/components/appliers/applyBackground.js +89 -0
- package/dist/components/appliers/applyBackground.js.map +1 -0
- package/dist/components/appliers/applyGestures.cjs +85 -0
- package/dist/components/appliers/applyGestures.cjs.map +1 -0
- package/dist/components/appliers/applyGestures.d.ts +12 -0
- package/dist/components/appliers/applyGestures.d.ts.map +1 -0
- package/dist/components/appliers/applyGestures.js +68 -0
- package/dist/components/appliers/applyGestures.js.map +1 -0
- package/dist/components/appliers/applyGraphics.cjs +21 -0
- package/dist/components/appliers/applyGraphics.cjs.map +1 -0
- package/dist/components/appliers/applyGraphics.d.ts +13 -0
- package/dist/components/appliers/applyGraphics.d.ts.map +1 -0
- package/dist/components/appliers/applyGraphics.js +21 -0
- package/dist/components/appliers/applyGraphics.js.map +1 -0
- package/dist/components/appliers/applyGraphicsLayout.cjs +18 -0
- package/dist/components/appliers/applyGraphicsLayout.cjs.map +1 -0
- package/dist/components/appliers/applyGraphicsLayout.d.ts +13 -0
- package/dist/components/appliers/applyGraphicsLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyGraphicsLayout.js +18 -0
- package/dist/components/appliers/applyGraphicsLayout.js.map +1 -0
- package/dist/components/appliers/applyImage.cjs +92 -0
- package/dist/components/appliers/applyImage.cjs.map +1 -0
- package/dist/components/appliers/applyImage.d.ts +47 -0
- package/dist/components/appliers/applyImage.d.ts.map +1 -0
- package/dist/components/appliers/applyImage.js +92 -0
- package/dist/components/appliers/applyImage.js.map +1 -0
- package/dist/components/appliers/applyImageLayout.cjs +18 -0
- package/dist/components/appliers/applyImageLayout.cjs.map +1 -0
- package/dist/components/appliers/applyImageLayout.d.ts +18 -0
- package/dist/components/appliers/applyImageLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyImageLayout.js +18 -0
- package/dist/components/appliers/applyImageLayout.js.map +1 -0
- package/dist/components/appliers/applyLayout.cjs +108 -0
- package/dist/components/appliers/applyLayout.cjs.map +1 -0
- package/dist/components/appliers/applyLayout.d.ts +19 -0
- package/dist/components/appliers/applyLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyLayout.js +91 -0
- package/dist/components/appliers/applyLayout.js.map +1 -0
- package/dist/components/appliers/applyNineSlice.cjs +37 -0
- package/dist/components/appliers/applyNineSlice.cjs.map +1 -0
- package/dist/components/appliers/applyNineSlice.d.ts +14 -0
- package/dist/components/appliers/applyNineSlice.d.ts.map +1 -0
- package/dist/components/appliers/applyNineSlice.js +37 -0
- package/dist/components/appliers/applyNineSlice.js.map +1 -0
- package/dist/components/appliers/applyNineSliceLayout.cjs +18 -0
- package/dist/components/appliers/applyNineSliceLayout.cjs.map +1 -0
- package/dist/components/appliers/applyNineSliceLayout.d.ts +18 -0
- package/dist/components/appliers/applyNineSliceLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyNineSliceLayout.js +18 -0
- package/dist/components/appliers/applyNineSliceLayout.js.map +1 -0
- package/dist/components/appliers/applyParticles.cjs +46 -0
- package/dist/components/appliers/applyParticles.cjs.map +1 -0
- package/dist/components/appliers/applyParticles.d.ts +7 -0
- package/dist/components/appliers/applyParticles.d.ts.map +1 -0
- package/dist/components/appliers/applyParticles.js +46 -0
- package/dist/components/appliers/applyParticles.js.map +1 -0
- package/dist/components/appliers/applyParticlesLayout.cjs +7 -0
- package/dist/components/appliers/applyParticlesLayout.cjs.map +1 -0
- package/dist/components/appliers/applyParticlesLayout.d.ts +11 -0
- package/dist/components/appliers/applyParticlesLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyParticlesLayout.js +7 -0
- package/dist/components/appliers/applyParticlesLayout.js.map +1 -0
- package/dist/components/appliers/applyPhaser.cjs +40 -0
- package/dist/components/appliers/applyPhaser.cjs.map +1 -0
- package/dist/components/appliers/applyPhaser.d.ts +24 -0
- package/dist/components/appliers/applyPhaser.d.ts.map +1 -0
- package/dist/components/appliers/applyPhaser.js +40 -0
- package/dist/components/appliers/applyPhaser.js.map +1 -0
- package/dist/components/appliers/applySprite.cjs +124 -0
- package/dist/components/appliers/applySprite.cjs.map +1 -0
- package/dist/components/appliers/applySprite.d.ts +13 -0
- package/dist/components/appliers/applySprite.d.ts.map +1 -0
- package/dist/components/appliers/applySprite.js +124 -0
- package/dist/components/appliers/applySprite.js.map +1 -0
- package/dist/components/appliers/applySpriteLayout.cjs +7 -0
- package/dist/components/appliers/applySpriteLayout.cjs.map +1 -0
- package/dist/components/appliers/applySpriteLayout.d.ts +17 -0
- package/dist/components/appliers/applySpriteLayout.d.ts.map +1 -0
- package/dist/components/appliers/applySpriteLayout.js +7 -0
- package/dist/components/appliers/applySpriteLayout.js.map +1 -0
- package/dist/components/appliers/applyText.cjs +142 -0
- package/dist/components/appliers/applyText.cjs.map +1 -0
- package/dist/components/appliers/applyText.d.ts +32 -0
- package/dist/components/appliers/applyText.d.ts.map +1 -0
- package/dist/components/appliers/applyText.js +142 -0
- package/dist/components/appliers/applyText.js.map +1 -0
- package/dist/components/appliers/applyTextLayout.cjs +16 -0
- package/dist/components/appliers/applyTextLayout.cjs.map +1 -0
- package/dist/components/appliers/applyTextLayout.d.ts +18 -0
- package/dist/components/appliers/applyTextLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyTextLayout.js +16 -0
- package/dist/components/appliers/applyTextLayout.js.map +1 -0
- package/dist/components/appliers/applyTooltip.cjs +247 -0
- package/dist/components/appliers/applyTooltip.cjs.map +1 -0
- package/dist/components/appliers/applyTooltip.d.ts +16 -0
- package/dist/components/appliers/applyTooltip.d.ts.map +1 -0
- package/dist/components/appliers/applyTooltip.js +247 -0
- package/dist/components/appliers/applyTooltip.js.map +1 -0
- package/dist/components/appliers/applyTransform.cjs +61 -0
- package/dist/components/appliers/applyTransform.cjs.map +1 -0
- package/dist/components/appliers/applyTransform.d.ts +24 -0
- package/dist/components/appliers/applyTransform.d.ts.map +1 -0
- package/dist/components/appliers/applyTransform.js +61 -0
- package/dist/components/appliers/applyTransform.js.map +1 -0
- package/dist/components/backgroundImage.cjs +411 -0
- package/dist/components/backgroundImage.cjs.map +1 -0
- package/dist/components/backgroundImage.d.ts +14 -0
- package/dist/components/backgroundImage.d.ts.map +1 -0
- package/dist/components/backgroundImage.js +411 -0
- package/dist/components/backgroundImage.js.map +1 -0
- package/dist/components/creators/createBackground.cjs +18 -0
- package/dist/components/creators/createBackground.cjs.map +1 -0
- package/dist/components/creators/createBackground.d.ts +20 -0
- package/dist/components/creators/createBackground.d.ts.map +1 -0
- package/dist/components/creators/createBackground.js +18 -0
- package/dist/components/creators/createBackground.js.map +1 -0
- package/dist/components/creators/createGestures.cjs +51 -0
- package/dist/components/creators/createGestures.cjs.map +1 -0
- package/dist/components/creators/createGestures.d.ts +11 -0
- package/dist/components/creators/createGestures.d.ts.map +1 -0
- package/dist/components/creators/createGestures.js +34 -0
- package/dist/components/creators/createGestures.js.map +1 -0
- package/dist/components/creators/createGraphicsLayout.cjs +24 -0
- package/dist/components/creators/createGraphicsLayout.cjs.map +1 -0
- package/dist/components/creators/createGraphicsLayout.d.ts +12 -0
- package/dist/components/creators/createGraphicsLayout.d.ts.map +1 -0
- package/dist/components/creators/createGraphicsLayout.js +24 -0
- package/dist/components/creators/createGraphicsLayout.js.map +1 -0
- package/dist/components/creators/createImageLayout.cjs +16 -0
- package/dist/components/creators/createImageLayout.cjs.map +1 -0
- package/dist/components/creators/createImageLayout.d.ts +17 -0
- package/dist/components/creators/createImageLayout.d.ts.map +1 -0
- package/dist/components/creators/createImageLayout.js +16 -0
- package/dist/components/creators/createImageLayout.js.map +1 -0
- package/dist/components/creators/createLayout.cjs +61 -0
- package/dist/components/creators/createLayout.cjs.map +1 -0
- package/dist/components/creators/createLayout.d.ts +15 -0
- package/dist/components/creators/createLayout.d.ts.map +1 -0
- package/dist/components/creators/createLayout.js +61 -0
- package/dist/components/creators/createLayout.js.map +1 -0
- package/dist/components/creators/createNineSliceLayout.cjs +16 -0
- package/dist/components/creators/createNineSliceLayout.cjs.map +1 -0
- package/dist/components/creators/createNineSliceLayout.d.ts +17 -0
- package/dist/components/creators/createNineSliceLayout.d.ts.map +1 -0
- package/dist/components/creators/createNineSliceLayout.js +16 -0
- package/dist/components/creators/createNineSliceLayout.js.map +1 -0
- package/dist/components/creators/createParticlesLayout.cjs +8 -0
- package/dist/components/creators/createParticlesLayout.cjs.map +1 -0
- package/dist/components/creators/createParticlesLayout.d.ts +14 -0
- package/dist/components/creators/createParticlesLayout.d.ts.map +1 -0
- package/dist/components/creators/createParticlesLayout.js +8 -0
- package/dist/components/creators/createParticlesLayout.js.map +1 -0
- package/dist/components/creators/createPhaser.cjs +36 -0
- package/dist/components/creators/createPhaser.cjs.map +1 -0
- package/dist/components/creators/createPhaser.d.ts +14 -0
- package/dist/components/creators/createPhaser.d.ts.map +1 -0
- package/dist/components/creators/createPhaser.js +36 -0
- package/dist/components/creators/createPhaser.js.map +1 -0
- package/dist/components/creators/createSpriteLayout.cjs +10 -0
- package/dist/components/creators/createSpriteLayout.cjs.map +1 -0
- package/dist/components/creators/createSpriteLayout.d.ts +18 -0
- package/dist/components/creators/createSpriteLayout.d.ts.map +1 -0
- package/dist/components/creators/createSpriteLayout.js +10 -0
- package/dist/components/creators/createSpriteLayout.js.map +1 -0
- package/dist/components/creators/createTextLayout.cjs +16 -0
- package/dist/components/creators/createTextLayout.cjs.map +1 -0
- package/dist/components/creators/createTextLayout.d.ts +17 -0
- package/dist/components/creators/createTextLayout.d.ts.map +1 -0
- package/dist/components/creators/createTextLayout.js +16 -0
- package/dist/components/creators/createTextLayout.js.map +1 -0
- package/dist/components/creators/createTransform.cjs +83 -0
- package/dist/components/creators/createTransform.cjs.map +1 -0
- package/dist/components/creators/createTransform.d.ts +26 -0
- package/dist/components/creators/createTransform.d.ts.map +1 -0
- package/dist/components/creators/createTransform.js +83 -0
- package/dist/components/creators/createTransform.js.map +1 -0
- package/dist/components/custom/Graphics.cjs +13 -0
- package/dist/components/custom/Graphics.cjs.map +1 -0
- package/dist/components/custom/Graphics.d.ts +50 -0
- package/dist/components/custom/Graphics.d.ts.map +1 -0
- package/dist/components/custom/Graphics.js +13 -0
- package/dist/components/custom/Graphics.js.map +1 -0
- package/dist/components/custom/NineSlice.cjs +13 -0
- package/dist/components/custom/NineSlice.cjs.map +1 -0
- package/dist/components/custom/NineSlice.d.ts +87 -0
- package/dist/components/custom/NineSlice.d.ts.map +1 -0
- package/dist/components/custom/NineSlice.js +13 -0
- package/dist/components/custom/NineSlice.js.map +1 -0
- package/dist/components/custom/Particles.cjs +8 -0
- package/dist/components/custom/Particles.cjs.map +1 -0
- package/dist/components/custom/Particles.d.ts +28 -0
- package/dist/components/custom/Particles.d.ts.map +1 -0
- package/dist/components/custom/Particles.js +8 -0
- package/dist/components/custom/Particles.js.map +1 -0
- package/dist/components/custom/RefOriginView.cjs +67 -0
- package/dist/components/custom/RefOriginView.cjs.map +1 -0
- package/dist/components/custom/RefOriginView.d.ts +49 -0
- package/dist/components/custom/RefOriginView.d.ts.map +1 -0
- package/dist/components/custom/RefOriginView.js +67 -0
- package/dist/components/custom/RefOriginView.js.map +1 -0
- package/dist/components/custom/Sprite.cjs +13 -0
- package/dist/components/custom/Sprite.cjs.map +1 -0
- package/dist/components/custom/Sprite.d.ts +79 -0
- package/dist/components/custom/Sprite.d.ts.map +1 -0
- package/dist/components/custom/Sprite.js +13 -0
- package/dist/components/custom/Sprite.js.map +1 -0
- package/dist/components/custom/TileSprite.cjs +13 -0
- package/dist/components/custom/TileSprite.cjs.map +1 -0
- package/dist/components/custom/TileSprite.d.ts +65 -0
- package/dist/components/custom/TileSprite.d.ts.map +1 -0
- package/dist/components/custom/TileSprite.js +13 -0
- package/dist/components/custom/TileSprite.js.map +1 -0
- package/dist/components/custom/index.d.ts +15 -0
- package/dist/components/custom/index.d.ts.map +1 -0
- package/dist/components/index.cjs +33 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +33 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/internal/SceneWrapper.cjs +10 -0
- package/dist/components/internal/SceneWrapper.cjs.map +1 -0
- package/dist/components/internal/SceneWrapper.d.ts +20 -0
- package/dist/components/internal/SceneWrapper.d.ts.map +1 -0
- package/dist/components/internal/SceneWrapper.js +10 -0
- package/dist/components/internal/SceneWrapper.js.map +1 -0
- package/dist/components/primitives/graphics.cjs +29 -0
- package/dist/components/primitives/graphics.cjs.map +1 -0
- package/dist/components/primitives/graphics.d.ts +146 -0
- package/dist/components/primitives/graphics.d.ts.map +1 -0
- package/dist/components/primitives/graphics.js +29 -0
- package/dist/components/primitives/graphics.js.map +1 -0
- package/dist/components/primitives/image.cjs +110 -0
- package/dist/components/primitives/image.cjs.map +1 -0
- package/dist/components/primitives/image.d.ts +170 -0
- package/dist/components/primitives/image.d.ts.map +1 -0
- package/dist/components/primitives/image.js +110 -0
- package/dist/components/primitives/image.js.map +1 -0
- package/dist/components/primitives/nineslice.cjs +42 -0
- package/dist/components/primitives/nineslice.cjs.map +1 -0
- package/dist/components/primitives/nineslice.d.ts +271 -0
- package/dist/components/primitives/nineslice.d.ts.map +1 -0
- package/dist/components/primitives/nineslice.js +42 -0
- package/dist/components/primitives/nineslice.js.map +1 -0
- package/dist/components/primitives/particles.cjs +77 -0
- package/dist/components/primitives/particles.cjs.map +1 -0
- package/dist/components/primitives/particles.d.ts +47 -0
- package/dist/components/primitives/particles.d.ts.map +1 -0
- package/dist/components/primitives/particles.js +77 -0
- package/dist/components/primitives/particles.js.map +1 -0
- package/dist/components/primitives/sprite.cjs +100 -0
- package/dist/components/primitives/sprite.cjs.map +1 -0
- package/dist/components/primitives/sprite.d.ts +147 -0
- package/dist/components/primitives/sprite.d.ts.map +1 -0
- package/dist/components/primitives/sprite.js +100 -0
- package/dist/components/primitives/sprite.js.map +1 -0
- package/dist/components/primitives/text.cjs +73 -0
- package/dist/components/primitives/text.cjs.map +1 -0
- package/dist/components/primitives/text.d.ts +155 -0
- package/dist/components/primitives/text.d.ts.map +1 -0
- package/dist/components/primitives/text.js +73 -0
- package/dist/components/primitives/text.js.map +1 -0
- package/dist/components/primitives/tilesprite.cjs +77 -0
- package/dist/components/primitives/tilesprite.cjs.map +1 -0
- package/dist/components/primitives/tilesprite.d.ts +157 -0
- package/dist/components/primitives/tilesprite.d.ts.map +1 -0
- package/dist/components/primitives/tilesprite.js +77 -0
- package/dist/components/primitives/tilesprite.js.map +1 -0
- package/dist/components/primitives/vectorDraw.cjs +73 -0
- package/dist/components/primitives/vectorDraw.cjs.map +1 -0
- package/dist/components/primitives/vectorDraw.d.ts +4 -0
- package/dist/components/primitives/vectorDraw.d.ts.map +1 -0
- package/dist/components/primitives/vectorDraw.js +73 -0
- package/dist/components/primitives/vectorDraw.js.map +1 -0
- package/dist/components/primitives/view.cjs +105 -0
- package/dist/components/primitives/view.cjs.map +1 -0
- package/dist/components/primitives/view.d.ts +23 -0
- package/dist/components/primitives/view.d.ts.map +1 -0
- package/dist/components/primitives/view.js +105 -0
- package/dist/components/primitives/view.js.map +1 -0
- package/dist/core-props.d.ts +105 -0
- package/dist/core-props.d.ts.map +1 -0
- package/dist/core-types.d.ts +71 -0
- package/dist/core-types.d.ts.map +1 -0
- package/dist/design-tokens/resolve-theme-tokens.cjs +27 -0
- package/dist/design-tokens/resolve-theme-tokens.cjs.map +1 -0
- package/dist/design-tokens/resolve-theme-tokens.d.ts +9 -0
- package/dist/design-tokens/resolve-theme-tokens.d.ts.map +1 -0
- package/dist/design-tokens/resolve-theme-tokens.js +27 -0
- package/dist/design-tokens/resolve-theme-tokens.js.map +1 -0
- package/dist/design-tokens/use-theme-tokens.cjs +26 -0
- package/dist/design-tokens/use-theme-tokens.cjs.map +1 -0
- package/dist/design-tokens/use-theme-tokens.d.ts +28 -0
- package/dist/design-tokens/use-theme-tokens.d.ts.map +1 -0
- package/dist/design-tokens/use-theme-tokens.js +26 -0
- package/dist/design-tokens/use-theme-tokens.js.map +1 -0
- package/dist/effects/index.d.ts +2 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/effects/phaser-effects-bridge.cjs +48 -0
- package/dist/effects/phaser-effects-bridge.cjs.map +1 -0
- package/dist/effects/phaser-effects-bridge.d.ts +2 -0
- package/dist/effects/phaser-effects-bridge.d.ts.map +1 -0
- package/dist/effects/phaser-effects-bridge.js +30 -0
- package/dist/effects/phaser-effects-bridge.js.map +1 -0
- package/dist/effects/use-effect.cjs +155 -0
- package/dist/effects/use-effect.cjs.map +1 -0
- package/dist/effects/use-effect.d.ts +30 -0
- package/dist/effects/use-effect.d.ts.map +1 -0
- package/dist/effects/use-effect.js +155 -0
- package/dist/effects/use-effect.js.map +1 -0
- package/dist/fx/convenience-hooks/index.d.ts +7 -0
- package/dist/fx/convenience-hooks/index.d.ts.map +1 -0
- package/dist/fx/convenience-hooks/use-blur.cjs +18 -0
- package/dist/fx/convenience-hooks/use-blur.cjs.map +1 -0
- package/dist/fx/convenience-hooks/use-blur.d.ts +21 -0
- package/dist/fx/convenience-hooks/use-blur.d.ts.map +1 -0
- package/dist/fx/convenience-hooks/use-blur.js +18 -0
- package/dist/fx/convenience-hooks/use-blur.js.map +1 -0
- package/dist/fx/convenience-hooks/use-glow.cjs +18 -0
- package/dist/fx/convenience-hooks/use-glow.cjs.map +1 -0
- package/dist/fx/convenience-hooks/use-glow.d.ts +21 -0
- package/dist/fx/convenience-hooks/use-glow.d.ts.map +1 -0
- package/dist/fx/convenience-hooks/use-glow.js +18 -0
- package/dist/fx/convenience-hooks/use-glow.js.map +1 -0
- package/dist/fx/convenience-hooks/use-shadow.cjs +18 -0
- package/dist/fx/convenience-hooks/use-shadow.cjs.map +1 -0
- package/dist/fx/convenience-hooks/use-shadow.d.ts +21 -0
- package/dist/fx/convenience-hooks/use-shadow.d.ts.map +1 -0
- package/dist/fx/convenience-hooks/use-shadow.js +18 -0
- package/dist/fx/convenience-hooks/use-shadow.js.map +1 -0
- package/dist/fx/fx-creators/blur.cjs +20 -0
- package/dist/fx/fx-creators/blur.cjs.map +1 -0
- package/dist/fx/fx-creators/blur.d.ts +37 -0
- package/dist/fx/fx-creators/blur.d.ts.map +1 -0
- package/dist/fx/fx-creators/blur.js +20 -0
- package/dist/fx/fx-creators/blur.js.map +1 -0
- package/dist/fx/fx-creators/color-matrix.cjs +47 -0
- package/dist/fx/fx-creators/color-matrix.cjs.map +1 -0
- package/dist/fx/fx-creators/color-matrix.d.ts +31 -0
- package/dist/fx/fx-creators/color-matrix.d.ts.map +1 -0
- package/dist/fx/fx-creators/color-matrix.js +47 -0
- package/dist/fx/fx-creators/color-matrix.js.map +1 -0
- package/dist/fx/fx-creators/glow.cjs +27 -0
- package/dist/fx/fx-creators/glow.cjs.map +1 -0
- package/dist/fx/fx-creators/glow.d.ts +36 -0
- package/dist/fx/fx-creators/glow.d.ts.map +1 -0
- package/dist/fx/fx-creators/glow.js +27 -0
- package/dist/fx/fx-creators/glow.js.map +1 -0
- package/dist/fx/fx-creators/index.d.ts +10 -0
- package/dist/fx/fx-creators/index.d.ts.map +1 -0
- package/dist/fx/fx-creators/pixelate.cjs +20 -0
- package/dist/fx/fx-creators/pixelate.cjs.map +1 -0
- package/dist/fx/fx-creators/pixelate.d.ts +24 -0
- package/dist/fx/fx-creators/pixelate.d.ts.map +1 -0
- package/dist/fx/fx-creators/pixelate.js +20 -0
- package/dist/fx/fx-creators/pixelate.js.map +1 -0
- package/dist/fx/fx-creators/shadow.cjs +28 -0
- package/dist/fx/fx-creators/shadow.cjs.map +1 -0
- package/dist/fx/fx-creators/shadow.d.ts +43 -0
- package/dist/fx/fx-creators/shadow.d.ts.map +1 -0
- package/dist/fx/fx-creators/shadow.js +28 -0
- package/dist/fx/fx-creators/shadow.js.map +1 -0
- package/dist/fx/fx-creators/vignette.cjs +20 -0
- package/dist/fx/fx-creators/vignette.cjs.map +1 -0
- package/dist/fx/fx-creators/vignette.d.ts +33 -0
- package/dist/fx/fx-creators/vignette.d.ts.map +1 -0
- package/dist/fx/fx-creators/vignette.js +20 -0
- package/dist/fx/fx-creators/vignette.js.map +1 -0
- package/dist/fx/fx-registry.cjs +43 -0
- package/dist/fx/fx-registry.cjs.map +1 -0
- package/dist/fx/fx-registry.d.ts +59 -0
- package/dist/fx/fx-registry.d.ts.map +1 -0
- package/dist/fx/fx-registry.js +43 -0
- package/dist/fx/fx-registry.js.map +1 -0
- package/dist/fx/index.d.ts +51 -0
- package/dist/fx/index.d.ts.map +1 -0
- package/dist/fx/use-fx.cjs +54 -0
- package/dist/fx/use-fx.cjs.map +1 -0
- package/dist/fx/use-fx.d.ts +53 -0
- package/dist/fx/use-fx.d.ts.map +1 -0
- package/dist/fx/use-fx.js +54 -0
- package/dist/fx/use-fx.js.map +1 -0
- package/dist/gestures/gesture-manager.cjs +773 -0
- package/dist/gestures/gesture-manager.cjs.map +1 -0
- package/dist/gestures/gesture-manager.d.ts +158 -0
- package/dist/gestures/gesture-manager.d.ts.map +1 -0
- package/dist/gestures/gesture-manager.js +773 -0
- package/dist/gestures/gesture-manager.js.map +1 -0
- package/dist/gestures/gesture-types.cjs +9 -0
- package/dist/gestures/gesture-types.cjs.map +1 -0
- package/dist/gestures/gesture-types.d.ts +232 -0
- package/dist/gestures/gesture-types.d.ts.map +1 -0
- package/dist/gestures/gesture-types.js +9 -0
- package/dist/gestures/gesture-types.js.map +1 -0
- package/dist/hooks.cjs +193 -0
- package/dist/hooks.cjs.map +1 -0
- package/dist/hooks.d.ts +151 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +146 -0
- package/dist/hooks.js.map +1 -0
- package/dist/host.cjs +85 -0
- package/dist/host.cjs.map +1 -0
- package/dist/host.d.ts +78 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +85 -0
- package/dist/host.js.map +1 -0
- package/dist/index.cjs +614 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +273 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx-dev-runtime.cjs +20 -0
- package/dist/jsx-dev-runtime.cjs.map +1 -0
- package/dist/jsx-dev-runtime.d.ts +8 -0
- package/dist/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/jsx-dev-runtime.js +8 -0
- package/dist/jsx-dev-runtime.js.map +1 -0
- package/dist/jsx-runtime.cjs +16 -0
- package/dist/jsx-runtime.cjs.map +1 -0
- package/dist/jsx-runtime.d.ts +9 -0
- package/dist/jsx-runtime.d.ts.map +1 -0
- package/dist/jsx-runtime.js +7 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/jsx-types.d.ts +40 -0
- package/dist/jsx-types.d.ts.map +1 -0
- package/dist/layout/appliers/background-applier.cjs +40 -0
- package/dist/layout/appliers/background-applier.cjs.map +1 -0
- package/dist/layout/appliers/background-applier.d.ts +16 -0
- package/dist/layout/appliers/background-applier.d.ts.map +1 -0
- package/dist/layout/appliers/background-applier.js +40 -0
- package/dist/layout/appliers/background-applier.js.map +1 -0
- package/dist/layout/index.d.ts +5 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/layout-engine-test-utils.d.ts +24 -0
- package/dist/layout/layout-engine-test-utils.d.ts.map +1 -0
- package/dist/layout/phaser-layout-bridge.cjs +41 -0
- package/dist/layout/phaser-layout-bridge.cjs.map +1 -0
- package/dist/layout/phaser-layout-bridge.d.ts +9 -0
- package/dist/layout/phaser-layout-bridge.d.ts.map +1 -0
- package/dist/layout/phaser-layout-bridge.js +40 -0
- package/dist/layout/phaser-layout-bridge.js.map +1 -0
- package/dist/layout/types.d.ts +14 -0
- package/dist/layout/types.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.cjs +39 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +39 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js.map +1 -0
- package/dist/particles/emit-zone.cjs +205 -0
- package/dist/particles/emit-zone.cjs.map +1 -0
- package/dist/particles/emit-zone.d.ts +88 -0
- package/dist/particles/emit-zone.d.ts.map +1 -0
- package/dist/particles/emit-zone.js +205 -0
- package/dist/particles/emit-zone.js.map +1 -0
- package/dist/particles/index.d.ts +8 -0
- package/dist/particles/index.d.ts.map +1 -0
- package/dist/particles/particle-types.d.ts +25 -0
- package/dist/particles/particle-types.d.ts.map +1 -0
- package/dist/particles/preset-registry.cjs +57 -0
- package/dist/particles/preset-registry.cjs.map +1 -0
- package/dist/particles/preset-registry.d.ts +49 -0
- package/dist/particles/preset-registry.d.ts.map +1 -0
- package/dist/particles/preset-registry.js +57 -0
- package/dist/particles/preset-registry.js.map +1 -0
- package/dist/particles/use-particles.cjs +67 -0
- package/dist/particles/use-particles.cjs.map +1 -0
- package/dist/particles/use-particles.d.ts +19 -0
- package/dist/particles/use-particles.d.ts.map +1 -0
- package/dist/particles/use-particles.js +67 -0
- package/dist/particles/use-particles.js.map +1 -0
- package/dist/particles/utils.cjs +82 -0
- package/dist/particles/utils.cjs.map +1 -0
- package/dist/particles/utils.d.ts +10 -0
- package/dist/particles/utils.d.ts.map +1 -0
- package/dist/particles/utils.js +82 -0
- package/dist/particles/utils.js.map +1 -0
- package/dist/phaser-bridges.cjs +148 -0
- package/dist/phaser-bridges.cjs.map +1 -0
- package/dist/phaser-bridges.d.ts +78 -0
- package/dist/phaser-bridges.d.ts.map +1 -0
- package/dist/phaser-bridges.js +131 -0
- package/dist/phaser-bridges.js.map +1 -0
- package/dist/phaser-host-adapter.cjs +148 -0
- package/dist/phaser-host-adapter.cjs.map +1 -0
- package/dist/phaser-host-adapter.d.ts +30 -0
- package/dist/phaser-host-adapter.d.ts.map +1 -0
- package/dist/phaser-host-adapter.js +148 -0
- package/dist/phaser-host-adapter.js.map +1 -0
- package/dist/phaser-runtime-types.d.ts +89 -0
- package/dist/phaser-runtime-types.d.ts.map +1 -0
- package/dist/phaser-surface-adapter.cjs +488 -0
- package/dist/phaser-surface-adapter.cjs.map +1 -0
- package/dist/phaser-surface-adapter.d.ts +74 -0
- package/dist/phaser-surface-adapter.d.ts.map +1 -0
- package/dist/phaser-surface-adapter.js +471 -0
- package/dist/phaser-surface-adapter.js.map +1 -0
- package/dist/phaser-vdom-runtime.cjs +63 -0
- package/dist/phaser-vdom-runtime.cjs.map +1 -0
- package/dist/phaser-vdom-runtime.d.ts +2 -0
- package/dist/phaser-vdom-runtime.d.ts.map +1 -0
- package/dist/phaser-vdom-runtime.js +63 -0
- package/dist/phaser-vdom-runtime.js.map +1 -0
- package/dist/plugin.cjs +182 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.ts +161 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +165 -0
- package/dist/plugin.js.map +1 -0
- package/dist/render-context.cjs +106 -0
- package/dist/render-context.cjs.map +1 -0
- package/dist/render-context.d.ts +66 -0
- package/dist/render-context.d.ts.map +1 -0
- package/dist/render-context.js +106 -0
- package/dist/render-context.js.map +1 -0
- package/dist/scene-backgrounds.cjs +285 -0
- package/dist/scene-backgrounds.cjs.map +1 -0
- package/dist/scene-backgrounds.d.ts +69 -0
- package/dist/scene-backgrounds.d.ts.map +1 -0
- package/dist/scene-backgrounds.js +268 -0
- package/dist/scene-backgrounds.js.map +1 -0
- package/dist/theme-base.d.ts +133 -0
- package/dist/theme-base.d.ts.map +1 -0
- package/dist/theme-custom.d.ts +13 -0
- package/dist/theme-custom.d.ts.map +1 -0
- package/dist/theme-defaults.cjs +29 -0
- package/dist/theme-defaults.cjs.map +1 -0
- package/dist/theme-defaults.d.ts +1 -0
- package/dist/theme-defaults.d.ts.map +1 -0
- package/dist/theme-defaults.js +28 -0
- package/dist/theme-defaults.js.map +1 -0
- package/dist/theme.cjs +34 -0
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.ts +36 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +32 -0
- package/dist/theme.js.map +1 -0
- package/dist/tooltip/tooltip-types.d.ts +6 -0
- package/dist/tooltip/tooltip-types.d.ts.map +1 -0
- package/dist/types.d.ts +22 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/KeyboardInputManager.cjs +112 -0
- package/dist/utils/KeyboardInputManager.cjs.map +1 -0
- package/dist/utils/KeyboardInputManager.d.ts +48 -0
- package/dist/utils/KeyboardInputManager.d.ts.map +1 -0
- package/dist/utils/KeyboardInputManager.js +112 -0
- package/dist/utils/KeyboardInputManager.js.map +1 -0
- package/dist/utils/dom-input-manager.cjs +253 -0
- package/dist/utils/dom-input-manager.cjs.map +1 -0
- package/dist/utils/dom-input-manager.d.ts +113 -0
- package/dist/utils/dom-input-manager.d.ts.map +1 -0
- package/dist/utils/dom-input-manager.js +253 -0
- package/dist/utils/dom-input-manager.js.map +1 -0
- package/dist/utils/fast-deep-equal.cjs +7 -0
- package/dist/utils/fast-deep-equal.cjs.map +1 -0
- package/dist/utils/fast-deep-equal.d.ts +4 -0
- package/dist/utils/fast-deep-equal.d.ts.map +1 -0
- package/dist/utils/fast-deep-equal.js +7 -0
- package/dist/utils/fast-deep-equal.js.map +1 -0
- package/dist/utils/image-subtexture-registry.cjs +98 -0
- package/dist/utils/image-subtexture-registry.cjs.map +1 -0
- package/dist/utils/image-subtexture-registry.d.ts +17 -0
- package/dist/utils/image-subtexture-registry.d.ts.map +1 -0
- package/dist/utils/image-subtexture-registry.js +98 -0
- package/dist/utils/image-subtexture-registry.js.map +1 -0
- package/dist/utils/phaser-guards.cjs +15 -0
- package/dist/utils/phaser-guards.cjs.map +1 -0
- package/dist/utils/phaser-guards.d.ts +7 -0
- package/dist/utils/phaser-guards.d.ts.map +1 -0
- package/dist/utils/phaser-guards.js +15 -0
- package/dist/utils/phaser-guards.js.map +1 -0
- package/dist/utils/svg-texture.cjs +48 -0
- package/dist/utils/svg-texture.cjs.map +1 -0
- package/dist/utils/svg-texture.d.ts +34 -0
- package/dist/utils/svg-texture.d.ts.map +1 -0
- package/dist/utils/svg-texture.js +48 -0
- package/dist/utils/svg-texture.js.map +1 -0
- package/dist/utils/texture-registry.cjs +117 -0
- package/dist/utils/texture-registry.cjs.map +1 -0
- package/dist/utils/texture-registry.d.ts +53 -0
- package/dist/utils/texture-registry.d.ts.map +1 -0
- package/dist/utils/texture-registry.js +117 -0
- package/dist/utils/texture-registry.js.map +1 -0
- package/dist/vdom-host-types.d.ts +12 -0
- package/dist/vdom-host-types.d.ts.map +1 -0
- package/dist/vdom-registry.d.ts +27 -0
- package/dist/vdom-registry.d.ts.map +1 -0
- package/dist/vdom-utils.d.ts +16 -0
- package/dist/vdom-utils.d.ts.map +1 -0
- package/dist/vdom.cjs +36 -0
- package/dist/vdom.cjs.map +1 -0
- package/dist/vdom.d.ts +23 -0
- package/dist/vdom.d.ts.map +1 -0
- package/dist/vdom.js +36 -0
- package/dist/vdom.js.map +1 -0
- package/dist/vector/PhaserVectorDrawContext.cjs +97 -0
- package/dist/vector/PhaserVectorDrawContext.cjs.map +1 -0
- package/dist/vector/PhaserVectorDrawContext.d.ts +27 -0
- package/dist/vector/PhaserVectorDrawContext.d.ts.map +1 -0
- package/dist/vector/PhaserVectorDrawContext.js +97 -0
- package/dist/vector/PhaserVectorDrawContext.js.map +1 -0
- package/dist/vector/index.d.ts +2 -0
- package/dist/vector/index.d.ts.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { DebugLogger } from "@number10/jsx-core";
|
|
2
|
+
import "phaser";
|
|
3
|
+
import { applyBackgroundProps } from "../appliers/applyBackground.js";
|
|
4
|
+
import { applyGesturesProps } from "../appliers/applyGestures.js";
|
|
5
|
+
import { applyLayoutProps } from "../appliers/applyLayout.js";
|
|
6
|
+
import { applyPhaserProps } from "../appliers/applyPhaser.js";
|
|
7
|
+
import { applyTooltip } from "../appliers/applyTooltip.js";
|
|
8
|
+
import { applyTransformProps } from "../appliers/applyTransform.js";
|
|
9
|
+
import { createBackground } from "../creators/createBackground.js";
|
|
10
|
+
import { createGestures } from "../creators/createGestures.js";
|
|
11
|
+
import { createLayout } from "../creators/createLayout.js";
|
|
12
|
+
import { createPhaser } from "../creators/createPhaser.js";
|
|
13
|
+
import { resolveAnimatableNumber, createTransform } from "../creators/createTransform.js";
|
|
14
|
+
function normalizeBackgroundProps(props) {
|
|
15
|
+
const bgProps = props;
|
|
16
|
+
const hasBackground = bgProps.backgroundColor !== void 0;
|
|
17
|
+
const hasBorder = bgProps.borderColor !== void 0;
|
|
18
|
+
if (!hasBackground && !hasBorder) {
|
|
19
|
+
return props;
|
|
20
|
+
}
|
|
21
|
+
const normalized = { ...props };
|
|
22
|
+
if (hasBackground && bgProps.backgroundAlpha === void 0) {
|
|
23
|
+
normalized.backgroundAlpha = 1;
|
|
24
|
+
}
|
|
25
|
+
if (hasBorder) {
|
|
26
|
+
if (bgProps.borderWidth === void 0 || bgProps.borderWidth === 0) {
|
|
27
|
+
normalized.borderWidth = 1;
|
|
28
|
+
}
|
|
29
|
+
if (bgProps.borderAlpha === void 0 || bgProps.borderAlpha === 0) {
|
|
30
|
+
normalized.borderAlpha = 1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return normalized;
|
|
34
|
+
}
|
|
35
|
+
const viewCreator = (scene, props) => {
|
|
36
|
+
if (props.backgroundColor !== void 0 || props.cornerRadius !== void 0) {
|
|
37
|
+
DebugLogger.log("theme", "View Creator - Props received:", {
|
|
38
|
+
backgroundColor: props.backgroundColor,
|
|
39
|
+
cornerRadius: props.cornerRadius,
|
|
40
|
+
width: props.width,
|
|
41
|
+
height: props.height
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const normalizedProps = normalizeBackgroundProps(props);
|
|
45
|
+
const container = scene.add.container(
|
|
46
|
+
resolveAnimatableNumber(normalizedProps.x) ?? 0,
|
|
47
|
+
resolveAnimatableNumber(normalizedProps.y) ?? 0
|
|
48
|
+
);
|
|
49
|
+
createTransform(container, normalizedProps);
|
|
50
|
+
createPhaser(container, normalizedProps);
|
|
51
|
+
createBackground(
|
|
52
|
+
scene,
|
|
53
|
+
container,
|
|
54
|
+
normalizedProps
|
|
55
|
+
);
|
|
56
|
+
createLayout(container, normalizedProps);
|
|
57
|
+
if (normalizedProps.onTooltip) {
|
|
58
|
+
const handlers = applyTooltip(
|
|
59
|
+
scene,
|
|
60
|
+
container,
|
|
61
|
+
normalizedProps.onTooltip,
|
|
62
|
+
normalizedProps.onHoverStart,
|
|
63
|
+
normalizedProps.onHoverEnd
|
|
64
|
+
);
|
|
65
|
+
normalizedProps.onHoverStart = handlers.onHoverStart;
|
|
66
|
+
normalizedProps.onHoverEnd = handlers.onHoverEnd;
|
|
67
|
+
}
|
|
68
|
+
createGestures(scene, container, normalizedProps);
|
|
69
|
+
DebugLogger.log(
|
|
70
|
+
"layout",
|
|
71
|
+
"View creator storing __layoutProps with padding:",
|
|
72
|
+
normalizedProps.padding
|
|
73
|
+
);
|
|
74
|
+
return container;
|
|
75
|
+
};
|
|
76
|
+
const viewPatcher = (node, prev, next) => {
|
|
77
|
+
const normalizedPrev = normalizeBackgroundProps(prev);
|
|
78
|
+
const normalizedNext = normalizeBackgroundProps(next);
|
|
79
|
+
applyTransformProps(node, normalizedPrev, normalizedNext);
|
|
80
|
+
applyPhaserProps(node, normalizedPrev, normalizedNext);
|
|
81
|
+
const container = node;
|
|
82
|
+
applyBackgroundProps(container, normalizedPrev, normalizedNext);
|
|
83
|
+
if (container.scene && container.scene.data) {
|
|
84
|
+
if (normalizedNext.onTooltip) {
|
|
85
|
+
const handlers = applyTooltip(
|
|
86
|
+
container.scene,
|
|
87
|
+
container,
|
|
88
|
+
normalizedNext.onTooltip,
|
|
89
|
+
normalizedNext.onHoverStart,
|
|
90
|
+
normalizedNext.onHoverEnd
|
|
91
|
+
);
|
|
92
|
+
normalizedNext.onHoverStart = handlers.onHoverStart;
|
|
93
|
+
normalizedNext.onHoverEnd = handlers.onHoverEnd;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (container.scene && container.scene.data) {
|
|
97
|
+
applyGesturesProps(container.scene, container, normalizedPrev, normalizedNext);
|
|
98
|
+
}
|
|
99
|
+
applyLayoutProps(container, normalizedPrev, normalizedNext);
|
|
100
|
+
};
|
|
101
|
+
export {
|
|
102
|
+
viewCreator,
|
|
103
|
+
viewPatcher
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sources":["../../../src/components/primitives/view.ts"],"sourcesContent":["/**\n * View component - Phaser Container with background Graphics and layout system\n * Status: IMPLEMENTED ✅\n *\n * Design Overview:\n * ================\n *\n * 1. Component Role: LAYOUT CONTAINER\n * Purpose: Primary layout primitive for UI composition\n * Composition: Phaser.Container + Background Graphics (optional)\n * Responsibilities:\n * - Layout orchestration (flexbox-style positioning of children)\n * - Visual styling (background color, borders, corner radius)\n * - Gesture handling (touch/mouse interaction)\n * - Dimension management (defines its own size + provides context for children)\n *\n * 2. Headless Behavior: NEVER HEADLESS ⚠️\n * Decision: View cannot be headless (always participates in layout)\n * Reasoning:\n * - View IS the layout system - it defines layout context for children\n * - Background Graphics has special role (__isBackground flag)\n * - Graphics is internal to View, excluded from child layout calculations\n * - If you need non-layout container, use raw Phaser.Container directly\n *\n * 3. Layout System Architecture:\n * Two-part system:\n * A) Background Graphics (special role):\n * - Defines View dimensions (not a layout child!)\n * - Marked with __isBackground = true\n * - Filtered out in layout calculations (see isLayoutChild helper)\n * - Automatically resized to match container dimensions\n * B) Layout Engine:\n * - Processes children (Views, Text, Images, etc.)\n * - Applies flexbox-style layout (row/column/stack)\n * - Respects headless flag on children\n * - Updates child positions/sizes based on layout props\n *\n * 4. Background Graphics vs. Graphics Component:\n * Distinction:\n * - View Background: Internal, auto-managed, defines dimensions, __isBackground=true\n * - Graphics Component: User-facing, custom shapes, typically headless=true\n * - Both use Phaser.Graphics but completely different purposes\n *\n * 5. Layout Size Provider:\n * Implementation: __getLayoutSize returns explicit or calculated dimensions\n * Behavior:\n * - Explicit width/height: Use those values\n * - Auto-size (undefined): Calculate from children + padding\n * - Percentage/fill: Resolve from parent context\n * - Critical: Background Graphics updates to match final size\n *\n * 6. Gesture System Integration:\n * Features:\n * - enableGestures: true enables touch/mouse interaction\n * - Hit area automatically sized to container dimensions\n * - Updated after layout recalculation (deferred queue)\n * - Supports: onTouch, onTouchMove, onDoubleTap, onLongPress\n * - Cross-platform (transparent mouse/touch support)\n *\n * 7. Styling Props:\n * Background:\n * - backgroundColor/backgroundAlpha: Fill color\n * - cornerRadius: Rounded corners (number or per-corner object)\n * - borderColor/borderWidth/borderAlpha: Stroke\n * Auto-defaults:\n * - backgroundAlpha defaults to 1 if backgroundColor set\n * - borderWidth defaults to 1 if borderColor set\n *\n * 8. Common Patterns:\n * Layout Container:\n * <View direction=\"row\" gap={10} padding={20}>\n * <View flex={1}>Left</View>\n * <View flex={2}>Right</View>\n * </View>\n * Styled Box:\n * <View backgroundColor={0x3498db} cornerRadius={8} padding={16}>\n * <Text text=\"Card Content\" />\n * </View>\n * Interactive Area:\n * <View enableGestures={true} onTouch={() => console.log('clicked')}>\n * <Text text=\"Button\" />\n * </View>\n *\n * 9. Performance Considerations:\n * - Background Graphics redrawn only when visual props change\n * - Layout calculations batched (LayoutBatchQueue)\n * - Gesture hit areas updated in deferred queue (post-layout)\n * - Overflow masking (overflow=\"hidden\") adds Phaser mask overhead\n *\n * 10. Known Limitations:\n * - Background Graphics cannot be independently positioned/rotated\n * - Nested View layout recalculations can be expensive (use sparingly)\n * - Gesture system requires scene pointer plugin (auto-enabled)\n *\n * Implementation Status:\n * ======================\n * [✅] Phaser Container creation\n * [✅] Background Graphics with styling (color, border, radius)\n * [✅] Layout system integration (__layoutProps, __getLayoutSize)\n * [✅] Transform props (position, rotation, scale, alpha)\n * [✅] Gesture system (enableGestures, interaction callbacks)\n * [✅] Auto-defaults for background/border alpha\n * [✅] Overflow masking support\n * [✅] Theme system integration\n * [✅] Deferred layout queue for gesture updates\n */\nimport { DebugLogger } from '@number10/jsx-core'\nimport * as Phaser from 'phaser'\nimport type {\n BackgroundProps,\n GestureProps,\n LayoutProps,\n PhaserProps,\n TransformProps,\n} from '../../core-props'\nimport type { HostCreator, HostPatcher } from '../../host'\nimport type { PropsContainerExtension, PropsDefaultExtension } from '../../types'\nimport { applyBackgroundProps } from '../appliers/applyBackground'\nimport { applyGesturesProps } from '../appliers/applyGestures'\nimport { applyLayoutProps } from '../appliers/applyLayout'\nimport { applyPhaserProps } from '../appliers/applyPhaser'\nimport { applyTooltip } from '../appliers/applyTooltip'\nimport { applyTransformProps } from '../appliers/applyTransform'\nimport type { BackgroundImage } from '../backgroundImage'\nimport { createBackground } from '../creators/createBackground'\nimport { createGestures } from '../creators/createGestures'\nimport { createLayout } from '../creators/createLayout'\nimport { createPhaser } from '../creators/createPhaser'\nimport { createTransform, resolveAnimatableNumber } from '../creators/createTransform'\n\n/**\n * Normalize background props - apply auto-defaults for alpha and border width\n * @param props - Original props\n * @returns Normalized props with auto-defaults applied\n */\nfunction normalizeBackgroundProps<T>(props: T): T {\n // Only process if props contain background/border properties\n const bgProps = props as unknown as Partial<BackgroundProps>\n const hasBackground = bgProps.backgroundColor !== undefined\n const hasBorder = bgProps.borderColor !== undefined\n\n // If no background/border props, return as-is\n if (!hasBackground && !hasBorder) {\n return props\n }\n\n // Only apply defaults if the prop is explicitly undefined or 0 (theme default)\n // This allows users to override with explicit values\n const normalized = { ...props } as T & Partial<BackgroundProps>\n\n if (hasBackground && bgProps.backgroundAlpha === undefined) {\n normalized.backgroundAlpha = 1\n }\n\n if (hasBorder) {\n if (bgProps.borderWidth === undefined || bgProps.borderWidth === 0) {\n normalized.borderWidth = 1\n }\n if (bgProps.borderAlpha === undefined || bgProps.borderAlpha === 0) {\n normalized.borderAlpha = 1\n }\n }\n\n return normalized as T\n}\n\n/**\n * Base props for View - composing shared prop groups\n */\nexport interface ViewBaseProps\n extends TransformProps, PhaserProps, LayoutProps, BackgroundProps, GestureProps {}\n\n/**\n * Props for View (Container) component - extends base props with JSX-specific props\n */\nexport interface ViewProps\n extends\n ViewBaseProps,\n PropsDefaultExtension<Phaser.GameObjects.Container>,\n PropsContainerExtension {}\n\n/**\n * View creator - creates a Phaser Container with optional background and interaction\n */\nexport const viewCreator: HostCreator<'View'> = (scene, props) => {\n // Debug: Log props to verify theme values\n if (props.backgroundColor !== undefined || props.cornerRadius !== undefined) {\n DebugLogger.log('theme', 'View Creator - Props received:', {\n backgroundColor: props.backgroundColor,\n cornerRadius: props.cornerRadius,\n width: props.width,\n height: props.height,\n })\n }\n\n // Normalize props early - apply auto-defaults for background/border\n const normalizedProps = normalizeBackgroundProps(props)\n\n const container = scene.add.container(\n resolveAnimatableNumber(normalizedProps.x) ?? 0,\n resolveAnimatableNumber(normalizedProps.y) ?? 0\n )\n\n // Apply transform props (scale, rotation)\n createTransform(container, normalizedProps)\n\n // Apply Phaser display props (alpha, depth, visible)\n createPhaser(container, normalizedProps)\n\n // Add background if backgroundColor is provided\n createBackground(\n scene,\n container as typeof container & { __background?: BackgroundImage },\n normalizedProps\n )\n\n // Setup layout system (props and size provider)\n // Must be before createGestures so __getLayoutSize is available\n createLayout(container, normalizedProps)\n\n // Tooltip support - inject hover handlers if onTooltip is present\n if (normalizedProps.onTooltip) {\n const handlers = applyTooltip(\n scene,\n container,\n normalizedProps.onTooltip,\n normalizedProps.onHoverStart,\n normalizedProps.onHoverEnd\n )\n normalizedProps.onHoverStart = handlers.onHoverStart\n normalizedProps.onHoverEnd = handlers.onHoverEnd\n }\n\n // Setup gesture system (high-level touch/mouse gestures)\n createGestures(scene, container, normalizedProps)\n\n // Debug: Log layout props storage\n DebugLogger.log(\n 'layout',\n 'View creator storing __layoutProps with padding:',\n normalizedProps.padding\n )\n\n return container\n}\n\n/**\n * View patcher - updates View properties\n */\nexport const viewPatcher: HostPatcher<'View'> = (node, prev, next) => {\n // Normalize props early - apply auto-defaults for background/border\n const normalizedPrev = normalizeBackgroundProps(prev)\n const normalizedNext = normalizeBackgroundProps(next)\n\n // Apply transform props (position, rotation, scale)\n applyTransformProps(node, normalizedPrev, normalizedNext)\n\n // Apply Phaser display props (alpha, depth, visible)\n applyPhaserProps(node, normalizedPrev, normalizedNext)\n\n // Background updates\n const container = node as Phaser.GameObjects.Container & {\n __background?: BackgroundImage\n }\n\n applyBackgroundProps(container, normalizedPrev, normalizedNext)\n\n // Tooltip support (integrates with gesture system)\n // Apply before gestures so hover handlers can be injected\n if (container.scene && container.scene.data) {\n if (normalizedNext.onTooltip) {\n const handlers = applyTooltip(\n container.scene,\n container,\n normalizedNext.onTooltip,\n normalizedNext.onHoverStart,\n normalizedNext.onHoverEnd\n )\n // Inject hover handlers for tooltip\n normalizedNext.onHoverStart = handlers.onHoverStart\n normalizedNext.onHoverEnd = handlers.onHoverEnd\n }\n }\n\n // Gesture event handlers (high-level touch/mouse gestures)\n // Safety check: ensure container has valid scene before applying gestures\n if (container.scene && container.scene.data) {\n applyGesturesProps(container.scene, container, normalizedPrev, normalizedNext)\n }\n\n // Apply layout props and recalculate if needed\n applyLayoutProps(container, normalizedPrev, normalizedNext)\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAuIA,SAAS,yBAA4B,OAAa;AAEhD,QAAM,UAAU;AAChB,QAAM,gBAAgB,QAAQ,oBAAoB;AAClD,QAAM,YAAY,QAAQ,gBAAgB;AAG1C,MAAI,CAAC,iBAAiB,CAAC,WAAW;AAChC,WAAO;AAAA,EACT;AAIA,QAAM,aAAa,EAAE,GAAG,MAAA;AAExB,MAAI,iBAAiB,QAAQ,oBAAoB,QAAW;AAC1D,eAAW,kBAAkB;AAAA,EAC/B;AAEA,MAAI,WAAW;AACb,QAAI,QAAQ,gBAAgB,UAAa,QAAQ,gBAAgB,GAAG;AAClE,iBAAW,cAAc;AAAA,IAC3B;AACA,QAAI,QAAQ,gBAAgB,UAAa,QAAQ,gBAAgB,GAAG;AAClE,iBAAW,cAAc;AAAA,IAC3B;AAAA,EACF;AAEA,SAAO;AACT;AAoBO,MAAM,cAAmC,CAAC,OAAO,UAAU;AAEhE,MAAI,MAAM,oBAAoB,UAAa,MAAM,iBAAiB,QAAW;AAC3E,gBAAY,IAAI,SAAS,kCAAkC;AAAA,MACzD,iBAAiB,MAAM;AAAA,MACvB,cAAc,MAAM;AAAA,MACpB,OAAO,MAAM;AAAA,MACb,QAAQ,MAAM;AAAA,IAAA,CACf;AAAA,EACH;AAGA,QAAM,kBAAkB,yBAAyB,KAAK;AAEtD,QAAM,YAAY,MAAM,IAAI;AAAA,IAC1B,wBAAwB,gBAAgB,CAAC,KAAK;AAAA,IAC9C,wBAAwB,gBAAgB,CAAC,KAAK;AAAA,EAAA;AAIhD,kBAAgB,WAAW,eAAe;AAG1C,eAAa,WAAW,eAAe;AAGvC;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAKF,eAAa,WAAW,eAAe;AAGvC,MAAI,gBAAgB,WAAW;AAC7B,UAAM,WAAW;AAAA,MACf;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,IAAA;AAElB,oBAAgB,eAAe,SAAS;AACxC,oBAAgB,aAAa,SAAS;AAAA,EACxC;AAGA,iBAAe,OAAO,WAAW,eAAe;AAGhD,cAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,EAAA;AAGlB,SAAO;AACT;AAKO,MAAM,cAAmC,CAAC,MAAM,MAAM,SAAS;AAEpE,QAAM,iBAAiB,yBAAyB,IAAI;AACpD,QAAM,iBAAiB,yBAAyB,IAAI;AAGpD,sBAAoB,MAAM,gBAAgB,cAAc;AAGxD,mBAAiB,MAAM,gBAAgB,cAAc;AAGrD,QAAM,YAAY;AAIlB,uBAAqB,WAAW,gBAAgB,cAAc;AAI9D,MAAI,UAAU,SAAS,UAAU,MAAM,MAAM;AAC3C,QAAI,eAAe,WAAW;AAC5B,YAAM,WAAW;AAAA,QACf,UAAU;AAAA,QACV;AAAA,QACA,eAAe;AAAA,QACf,eAAe;AAAA,QACf,eAAe;AAAA,MAAA;AAGjB,qBAAe,eAAe,SAAS;AACvC,qBAAe,aAAa,SAAS;AAAA,IACvC;AAAA,EACF;AAIA,MAAI,UAAU,SAAS,UAAU,MAAM,MAAM;AAC3C,uBAAmB,UAAU,OAAO,WAAW,gBAAgB,cAAc;AAAA,EAC/E;AAGA,mBAAiB,WAAW,gBAAgB,cAAc;AAC5D;"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { FocusEventData, GestureEventData, InputEventData, KeyboardEventData, WheelEventData } from './gestures/gesture-types';
|
|
2
|
+
/**
|
|
3
|
+
* Core prop type definitions for shared component properties.
|
|
4
|
+
* Portable types are re-exported from @number10/jsx-core.
|
|
5
|
+
* Phaser-specific props (PhaserProps, TextSpecificProps, GestureProps) are defined here.
|
|
6
|
+
*
|
|
7
|
+
* @migration(audit:scene-portal-mount) Phase 3A — portable props moved to @number10/jsx-core.
|
|
8
|
+
* This file keeps Phaser-specific types and will eventually move to @number10/jsx-phaser.
|
|
9
|
+
*/
|
|
10
|
+
export { normalizeGap, type Animatable, type BackgroundProps, type Display, type EdgeInsets, type LayoutProps, type SizeValue, type TransformProps, } from '@number10/jsx-core';
|
|
11
|
+
export type { TooltipCallback } from '@number10/jsx-core';
|
|
12
|
+
/**
|
|
13
|
+
* Phaser GameObject display properties — rendering and display list API.
|
|
14
|
+
*
|
|
15
|
+
* NOTE: `alpha` is provided by TransformProps (from @number10/jsx-core).
|
|
16
|
+
*/
|
|
17
|
+
export interface PhaserProps {
|
|
18
|
+
/**
|
|
19
|
+
* Depth (Z-index) of the game object in the display list
|
|
20
|
+
* Higher values are rendered on top of lower values
|
|
21
|
+
* Allows manual control over rendering order independent of child array order
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* // Layer system in stack layout
|
|
25
|
+
* <View direction="stack">
|
|
26
|
+
* <View depth={1}>Background</View>
|
|
27
|
+
* <View depth={2}>Content</View>
|
|
28
|
+
* <View depth={3}>Overlay</View>
|
|
29
|
+
* </View>
|
|
30
|
+
*/
|
|
31
|
+
depth?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Callback invoked when GameObject is created and fully initialized
|
|
34
|
+
* Useful for accessing GameObject properties (dimensions, bounds, etc.)
|
|
35
|
+
* without needing useRef
|
|
36
|
+
*
|
|
37
|
+
* @param node - The created Phaser GameObject
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* // Display image dimensions
|
|
41
|
+
* <Image
|
|
42
|
+
* texture="icon"
|
|
43
|
+
* onReady={(img) => console.log(`${img.width}x${img.height}`)}
|
|
44
|
+
* />
|
|
45
|
+
*
|
|
46
|
+
* // Access View bounds
|
|
47
|
+
* <View
|
|
48
|
+
* width={200}
|
|
49
|
+
* height={100}
|
|
50
|
+
* onReady={(view) => console.log(view.getBounds())}
|
|
51
|
+
* />
|
|
52
|
+
*/
|
|
53
|
+
onReady?: (node: Phaser.GameObjects.GameObject) => void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Text-specific styling properties (Phaser-specific).
|
|
57
|
+
*/
|
|
58
|
+
export interface TextSpecificProps {
|
|
59
|
+
text: string | undefined;
|
|
60
|
+
/** Maximum width for text wrapping */
|
|
61
|
+
maxWidth?: import('@number10/jsx-core').SizeValue;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* High-level gesture props — unified touch and mouse interaction.
|
|
65
|
+
* Phaser-specific: uses Phaser input system and gesture manager.
|
|
66
|
+
*/
|
|
67
|
+
export interface GestureProps {
|
|
68
|
+
/** Enable gesture system for this container */
|
|
69
|
+
enableGestures?: boolean;
|
|
70
|
+
/** Called on pointer down + up on the same target (click/tap) */
|
|
71
|
+
onTouch?: (data: GestureEventData) => void;
|
|
72
|
+
/** Called when pointer up occurs outside the container */
|
|
73
|
+
onTouchOutside?: (data: GestureEventData) => void;
|
|
74
|
+
/** Called during pointer movement */
|
|
75
|
+
onTouchMove?: (data: GestureEventData) => void;
|
|
76
|
+
/** Called when double tap/click is detected */
|
|
77
|
+
onDoubleTap?: (data: GestureEventData) => void;
|
|
78
|
+
/** Called when pointer is held down for configured duration */
|
|
79
|
+
onLongPress?: (data: GestureEventData) => void;
|
|
80
|
+
/** Duration in ms to trigger long press (default: 500ms) */
|
|
81
|
+
longPressDuration?: number;
|
|
82
|
+
/** Max time in ms between taps for double tap (default: 300ms) */
|
|
83
|
+
doubleTapDelay?: number;
|
|
84
|
+
/** Max time in ms for a valid touch/click (default: 500ms) */
|
|
85
|
+
maxTouchDuration?: number;
|
|
86
|
+
/** Called when a key is pressed down */
|
|
87
|
+
onKeyDown?: (data: KeyboardEventData) => void;
|
|
88
|
+
/** Called when a key is released */
|
|
89
|
+
onKeyUp?: (data: KeyboardEventData) => void;
|
|
90
|
+
/** Called when input value changes */
|
|
91
|
+
onInput?: (data: InputEventData) => void;
|
|
92
|
+
/** Called when element receives focus */
|
|
93
|
+
onFocus?: (data: FocusEventData) => void;
|
|
94
|
+
/** Called when element loses focus */
|
|
95
|
+
onBlur?: (data: FocusEventData) => void;
|
|
96
|
+
/** Called when pointer enters the container (desktop/mouse only) */
|
|
97
|
+
onHoverStart?: (data: import('./gestures/gesture-types').HoverEventData) => void;
|
|
98
|
+
/** Called when pointer exits the container (desktop/mouse only) */
|
|
99
|
+
onHoverEnd?: (data: import('./gestures/gesture-types').HoverEventData) => void;
|
|
100
|
+
/** Called when mouse wheel is scrolled (desktop/mouse only) */
|
|
101
|
+
onWheel?: (data: WheelEventData) => void;
|
|
102
|
+
/** Portable tooltip callback; renderer decides how to draw it. */
|
|
103
|
+
onTooltip?: import('@number10/jsx-core').TooltipCallback | undefined;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=core-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-props.d.ts","sourceRoot":"","sources":["../src/core-props.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAA;AAG3B,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,KAAK,IAAI,CAAA;CACxD;AAGD,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACf,MAAM,0BAA0B,CAAA;AAEjC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,oBAAoB,EAAE,SAAS,CAAA;CAClD;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB,iEAAiE;IACjE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAE1C,0DAA0D;IAC1D,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAEjD,qCAAqC;IACrC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAE9C,+CAA+C;IAC/C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAE9C,+DAA+D;IAC/D,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAE9C,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,wCAAwC;IACxC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAA;IAE7C,oCAAoC;IACpC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAA;IAE3C,sCAAsC;IACtC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAA;IAExC,yCAAyC;IACzC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAA;IAExC,sCAAsC;IACtC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAA;IAEvC,oEAAoE;IACpE,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,0BAA0B,EAAE,cAAc,KAAK,IAAI,CAAA;IAEhF,mEAAmE;IACnE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,0BAA0B,EAAE,cAAc,KAAK,IAAI,CAAA;IAE9E,+DAA+D;IAC/D,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAA;IAExC,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,oBAAoB,EAAE,eAAe,GAAG,SAAS,CAAA;CACrE"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { VectorDrawContentPrimitiveProps } from '@number10/jsx-core';
|
|
2
|
+
import { GraphicsBaseProps } from './components/primitives/graphics';
|
|
3
|
+
import { ImageBaseProps } from './components/primitives/image';
|
|
4
|
+
import { NineSliceBaseProps } from './components/primitives/nineslice';
|
|
5
|
+
import { ParticlesBaseProps } from './components/primitives/particles';
|
|
6
|
+
import { SpriteBaseProps } from './components/primitives/sprite';
|
|
7
|
+
import { TextBaseProps } from './components/primitives/text';
|
|
8
|
+
import { TileSpriteBaseProps } from './components/primitives/tilesprite';
|
|
9
|
+
import { ViewBaseProps } from './components/primitives/view';
|
|
10
|
+
/**
|
|
11
|
+
* Core type system for native Phaser GameObject primitives
|
|
12
|
+
* Defines the mapping between node type names and their corresponding Phaser types
|
|
13
|
+
*/
|
|
14
|
+
import type * as Phaser from 'phaser';
|
|
15
|
+
/**
|
|
16
|
+
* Maps node type names to Phaser GameObject classes
|
|
17
|
+
*/
|
|
18
|
+
export interface NodeMap {
|
|
19
|
+
view: Phaser.GameObjects.Container;
|
|
20
|
+
text: Phaser.GameObjects.Text;
|
|
21
|
+
nineslice: Phaser.GameObjects.NineSlice;
|
|
22
|
+
particles: import('./particles/particle-types').ParticlesHandle;
|
|
23
|
+
sprite: Phaser.GameObjects.Sprite;
|
|
24
|
+
image: Phaser.GameObjects.Image;
|
|
25
|
+
graphics: Phaser.GameObjects.Graphics;
|
|
26
|
+
vectorDraw: Phaser.GameObjects.Graphics;
|
|
27
|
+
tilesprite: Phaser.GameObjects.TileSprite;
|
|
28
|
+
View: Phaser.GameObjects.Container;
|
|
29
|
+
Text: Phaser.GameObjects.Text;
|
|
30
|
+
NineSlice: Phaser.GameObjects.NineSlice;
|
|
31
|
+
Particles: import('./particles/particle-types').ParticlesHandle;
|
|
32
|
+
Sprite: Phaser.GameObjects.Sprite;
|
|
33
|
+
Image: Phaser.GameObjects.Image;
|
|
34
|
+
Graphics: Phaser.GameObjects.Graphics;
|
|
35
|
+
TileSprite: Phaser.GameObjects.TileSprite;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Maps node type names to their props interfaces
|
|
39
|
+
*/
|
|
40
|
+
export interface NodePropsMap {
|
|
41
|
+
view: ViewBaseProps;
|
|
42
|
+
text: TextBaseProps;
|
|
43
|
+
nineslice: NineSliceBaseProps;
|
|
44
|
+
particles: ParticlesBaseProps;
|
|
45
|
+
sprite: SpriteBaseProps;
|
|
46
|
+
image: ImageBaseProps;
|
|
47
|
+
graphics: GraphicsBaseProps;
|
|
48
|
+
vectorDraw: VectorDrawContentPrimitiveProps;
|
|
49
|
+
tilesprite: TileSpriteBaseProps;
|
|
50
|
+
View: ViewBaseProps;
|
|
51
|
+
Text: TextBaseProps;
|
|
52
|
+
NineSlice: NineSliceBaseProps;
|
|
53
|
+
Particles: ParticlesBaseProps;
|
|
54
|
+
Sprite: SpriteBaseProps;
|
|
55
|
+
Image: ImageBaseProps;
|
|
56
|
+
Graphics: GraphicsBaseProps;
|
|
57
|
+
TileSprite: TileSpriteBaseProps;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Union of all supported node type names
|
|
61
|
+
*/
|
|
62
|
+
export type NodeType = keyof NodeMap;
|
|
63
|
+
/**
|
|
64
|
+
* Get the instance type for a given node type
|
|
65
|
+
*/
|
|
66
|
+
export type NodeInstance<T extends NodeType = NodeType> = NodeMap[T];
|
|
67
|
+
/**
|
|
68
|
+
* Get the props type for a given node type
|
|
69
|
+
*/
|
|
70
|
+
export type NodeProps<T extends NodeType = NodeType> = NodePropsMap[T];
|
|
71
|
+
//# sourceMappingURL=core-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-types.d.ts","sourceRoot":"","sources":["../src/core-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAA;AACrC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAA;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE;;GAEG;AACH,MAAM,WAAW,OAAO;IAEtB,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,CAAA;IAClC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,CAAA;IACvC,SAAS,EAAE,OAAO,4BAA4B,EAAE,eAAe,CAAA;IAC/D,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAA;IACjC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,KAAK,CAAA;IAC/B,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAA;IACrC,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAA;IACvC,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,CAAA;IAEzC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,CAAA;IAClC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,SAAS,CAAA;IACvC,SAAS,EAAE,OAAO,4BAA4B,EAAE,eAAe,CAAA;IAC/D,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAA;IACjC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,KAAK,CAAA;IAC/B,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAA;IACrC,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,CAAA;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAE3B,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,aAAa,CAAA;IACnB,SAAS,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,kBAAkB,CAAA;IAC7B,MAAM,EAAE,eAAe,CAAA;IACvB,KAAK,EAAE,cAAc,CAAA;IACrB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,UAAU,EAAE,+BAA+B,CAAA;IAC3C,UAAU,EAAE,mBAAmB,CAAA;IAE/B,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,aAAa,CAAA;IACnB,SAAS,EAAE,kBAAkB,CAAA;IAC7B,SAAS,EAAE,kBAAkB,CAAA;IAC7B,MAAM,EAAE,eAAe,CAAA;IACvB,KAAK,EAAE,cAAc,CAAA;IACrB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,UAAU,EAAE,mBAAmB,CAAA;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAA;AAEpC;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,CAAA;AAEpE;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxCore = require("@number10/jsx-core");
|
|
4
|
+
const theme = require("../theme.cjs");
|
|
5
|
+
function resolveThemeTokens(localTheme) {
|
|
6
|
+
if (localTheme?.__colorPreset) {
|
|
7
|
+
const preset = jsxCore.getPresetWithMode(
|
|
8
|
+
localTheme.__colorPreset.name,
|
|
9
|
+
localTheme.__colorPreset.mode ?? "light"
|
|
10
|
+
);
|
|
11
|
+
return jsxCore.createDesignTokens(preset);
|
|
12
|
+
}
|
|
13
|
+
const colors = theme.themeRegistry.getColorTokens();
|
|
14
|
+
if (colors) {
|
|
15
|
+
return {
|
|
16
|
+
colors,
|
|
17
|
+
textStyles: jsxCore.createTextStyleTokens(colors.text.DEFAULT.toString()),
|
|
18
|
+
spacing: jsxCore.defaultSpacingTokens,
|
|
19
|
+
sizes: jsxCore.defaultSizeTokens,
|
|
20
|
+
radius: jsxCore.defaultRadiusTokens
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const fallback = jsxCore.getPresetWithMode("oceanBlue", "light");
|
|
24
|
+
return jsxCore.createDesignTokens(fallback);
|
|
25
|
+
}
|
|
26
|
+
exports.resolveThemeTokens = resolveThemeTokens;
|
|
27
|
+
//# sourceMappingURL=resolve-theme-tokens.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-theme-tokens.cjs","sources":["../../src/design-tokens/resolve-theme-tokens.ts"],"sourcesContent":["/**\n * Resolve design tokens from theme state (synchronous, no hooks).\n * Called by the VDOM cycle to inject tokens into the hook context.\n *\n * Extracted from use-theme-tokens.ts to break circular dependency:\n * phaser-vdom-runtime → phaser-surface-adapter → use-theme-tokens → hooks → vdom → phaser-vdom-runtime\n */\nimport {\n createDesignTokens,\n createTextStyleTokens,\n defaultRadiusTokens,\n defaultSizeTokens,\n defaultSpacingTokens,\n getPresetWithMode,\n type DesignTokens,\n} from '@number10/jsx-core'\nimport type { PhaserPartialTheme } from '../theme'\nimport { themeRegistry } from '../theme'\n\n/**\n * Resolve design tokens from theme state.\n * @param localTheme - Current VDOM theme (or undefined)\n * @returns DesignTokens or undefined\n */\nexport function resolveThemeTokens(localTheme: PhaserPartialTheme | undefined): DesignTokens {\n if (localTheme?.__colorPreset) {\n const preset = getPresetWithMode(\n localTheme.__colorPreset.name as Parameters<typeof getPresetWithMode>[0],\n localTheme.__colorPreset.mode ?? 'light'\n )\n return createDesignTokens(preset)\n }\n\n const colors = themeRegistry.getColorTokens()\n if (colors) {\n return {\n colors,\n textStyles: createTextStyleTokens(colors.text.DEFAULT.toString()),\n spacing: defaultSpacingTokens,\n sizes: defaultSizeTokens,\n radius: defaultRadiusTokens,\n }\n }\n\n // Fallback: use oceanBlue light preset as default (same as Pixi)\n const fallback = getPresetWithMode('oceanBlue', 'light')\n return createDesignTokens(fallback)\n}\n"],"names":["getPresetWithMode","createDesignTokens","themeRegistry","createTextStyleTokens","defaultSpacingTokens","defaultSizeTokens","defaultRadiusTokens"],"mappings":";;;;AAwBO,SAAS,mBAAmB,YAA0D;AAC3F,MAAI,YAAY,eAAe;AAC7B,UAAM,SAASA,QAAAA;AAAAA,MACb,WAAW,cAAc;AAAA,MACzB,WAAW,cAAc,QAAQ;AAAA,IAAA;AAEnC,WAAOC,QAAAA,mBAAmB,MAAM;AAAA,EAClC;AAEA,QAAM,SAASC,MAAAA,cAAc,eAAA;AAC7B,MAAI,QAAQ;AACV,WAAO;AAAA,MACL;AAAA,MACA,YAAYC,QAAAA,sBAAsB,OAAO,KAAK,QAAQ,UAAU;AAAA,MAChE,SAASC,QAAAA;AAAAA,MACT,OAAOC,QAAAA;AAAAA,MACP,QAAQC,QAAAA;AAAAA,IAAA;AAAA,EAEZ;AAGA,QAAM,WAAWN,QAAAA,kBAAkB,aAAa,OAAO;AACvD,SAAOC,QAAAA,mBAAmB,QAAQ;AACpC;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DesignTokens } from '@number10/jsx-core';
|
|
2
|
+
import { PhaserPartialTheme } from '../theme';
|
|
3
|
+
/**
|
|
4
|
+
* Resolve design tokens from theme state.
|
|
5
|
+
* @param localTheme - Current VDOM theme (or undefined)
|
|
6
|
+
* @returns DesignTokens or undefined
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveThemeTokens(localTheme: PhaserPartialTheme | undefined): DesignTokens;
|
|
9
|
+
//# sourceMappingURL=resolve-theme-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-theme-tokens.d.ts","sourceRoot":"","sources":["../../src/design-tokens/resolve-theme-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAGlD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,kBAAkB,GAAG,SAAS,GAAG,YAAY,CAuB3F"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defaultRadiusTokens, defaultSizeTokens, defaultSpacingTokens, createTextStyleTokens, getPresetWithMode, createDesignTokens } from "@number10/jsx-core";
|
|
2
|
+
import { themeRegistry } from "../theme.js";
|
|
3
|
+
function resolveThemeTokens(localTheme) {
|
|
4
|
+
if (localTheme?.__colorPreset) {
|
|
5
|
+
const preset = getPresetWithMode(
|
|
6
|
+
localTheme.__colorPreset.name,
|
|
7
|
+
localTheme.__colorPreset.mode ?? "light"
|
|
8
|
+
);
|
|
9
|
+
return createDesignTokens(preset);
|
|
10
|
+
}
|
|
11
|
+
const colors = themeRegistry.getColorTokens();
|
|
12
|
+
if (colors) {
|
|
13
|
+
return {
|
|
14
|
+
colors,
|
|
15
|
+
textStyles: createTextStyleTokens(colors.text.DEFAULT.toString()),
|
|
16
|
+
spacing: defaultSpacingTokens,
|
|
17
|
+
sizes: defaultSizeTokens,
|
|
18
|
+
radius: defaultRadiusTokens
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const fallback = getPresetWithMode("oceanBlue", "light");
|
|
22
|
+
return createDesignTokens(fallback);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
resolveThemeTokens
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=resolve-theme-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-theme-tokens.js","sources":["../../src/design-tokens/resolve-theme-tokens.ts"],"sourcesContent":["/**\n * Resolve design tokens from theme state (synchronous, no hooks).\n * Called by the VDOM cycle to inject tokens into the hook context.\n *\n * Extracted from use-theme-tokens.ts to break circular dependency:\n * phaser-vdom-runtime → phaser-surface-adapter → use-theme-tokens → hooks → vdom → phaser-vdom-runtime\n */\nimport {\n createDesignTokens,\n createTextStyleTokens,\n defaultRadiusTokens,\n defaultSizeTokens,\n defaultSpacingTokens,\n getPresetWithMode,\n type DesignTokens,\n} from '@number10/jsx-core'\nimport type { PhaserPartialTheme } from '../theme'\nimport { themeRegistry } from '../theme'\n\n/**\n * Resolve design tokens from theme state.\n * @param localTheme - Current VDOM theme (or undefined)\n * @returns DesignTokens or undefined\n */\nexport function resolveThemeTokens(localTheme: PhaserPartialTheme | undefined): DesignTokens {\n if (localTheme?.__colorPreset) {\n const preset = getPresetWithMode(\n localTheme.__colorPreset.name as Parameters<typeof getPresetWithMode>[0],\n localTheme.__colorPreset.mode ?? 'light'\n )\n return createDesignTokens(preset)\n }\n\n const colors = themeRegistry.getColorTokens()\n if (colors) {\n return {\n colors,\n textStyles: createTextStyleTokens(colors.text.DEFAULT.toString()),\n spacing: defaultSpacingTokens,\n sizes: defaultSizeTokens,\n radius: defaultRadiusTokens,\n }\n }\n\n // Fallback: use oceanBlue light preset as default (same as Pixi)\n const fallback = getPresetWithMode('oceanBlue', 'light')\n return createDesignTokens(fallback)\n}\n"],"names":[],"mappings":";;AAwBO,SAAS,mBAAmB,YAA0D;AAC3F,MAAI,YAAY,eAAe;AAC7B,UAAM,SAAS;AAAA,MACb,WAAW,cAAc;AAAA,MACzB,WAAW,cAAc,QAAQ;AAAA,IAAA;AAEnC,WAAO,mBAAmB,MAAM;AAAA,EAClC;AAEA,QAAM,SAAS,cAAc,eAAA;AAC7B,MAAI,QAAQ;AACV,WAAO;AAAA,MACL;AAAA,MACA,YAAY,sBAAsB,OAAO,KAAK,QAAQ,UAAU;AAAA,MAChE,SAAS;AAAA,MACT,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA;AAAA,EAEZ;AAGA,QAAM,WAAW,kBAAkB,aAAa,OAAO;AACvD,SAAO,mBAAmB,QAAQ;AACpC;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../hooks.cjs");
|
|
4
|
+
const theme = require("../theme.cjs");
|
|
5
|
+
const resolveThemeTokens = require("./resolve-theme-tokens.cjs");
|
|
6
|
+
const jsxCore = require("@number10/jsx-core");
|
|
7
|
+
function useThemeTokens() {
|
|
8
|
+
const localTheme = jsxCore.useTheme();
|
|
9
|
+
const getInitialTokens = () => resolveThemeTokens.resolveThemeTokens(localTheme);
|
|
10
|
+
const [tokens, setTokens] = jsxCore.useState(getInitialTokens());
|
|
11
|
+
const [, forceUpdate] = jsxCore.useState(0);
|
|
12
|
+
jsxCore.useEffect(() => {
|
|
13
|
+
const unsubscribe = theme.themeRegistry.subscribe(() => {
|
|
14
|
+
const currentTheme = localTheme?.__colorPreset ? {
|
|
15
|
+
...localTheme,
|
|
16
|
+
__colorPreset: { ...localTheme.__colorPreset, mode: theme.themeRegistry.getColorMode() }
|
|
17
|
+
} : localTheme;
|
|
18
|
+
setTokens(resolveThemeTokens.resolveThemeTokens(currentTheme));
|
|
19
|
+
forceUpdate((n) => n + 1);
|
|
20
|
+
});
|
|
21
|
+
return unsubscribe;
|
|
22
|
+
}, [localTheme]);
|
|
23
|
+
return tokens;
|
|
24
|
+
}
|
|
25
|
+
exports.useThemeTokens = useThemeTokens;
|
|
26
|
+
//# sourceMappingURL=use-theme-tokens.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-theme-tokens.cjs","sources":["../../src/design-tokens/use-theme-tokens.ts"],"sourcesContent":["/**\n * Hook to access complete design token system\n * Combines colors with text styles, spacing, sizes, and radius tokens\n */\nimport type { DesignTokens } from '@number10/jsx-core'\nimport { useEffect, useState, useTheme } from '../hooks'\nimport { themeRegistry } from '../theme'\nimport { resolveThemeTokens } from './resolve-theme-tokens'\n\n/**\n * Hook to access complete design token system from theme context\n * Provides colors, text styles, spacing, sizes, and radius tokens\n * Automatically updates when color mode or preset changes\n * @returns Current DesignTokens or undefined\n * @example\n * ```typescript\n * function MyComponent() {\n * const tokens = useThemeTokens()\n *\n * if (!tokens) return null\n *\n * return (\n * <View\n * backgroundColor={tokens.colors.surface.DEFAULT}\n * padding={tokens.spacing.lg}\n * cornerRadius={tokens.radius.md}\n * >\n * <Text text=\"Title\" style={tokens.textStyles.title} />\n * <Text text=\"Body text\" style={tokens.textStyles.DEFAULT} />\n * </View>\n * )\n * }\n * ```\n */\nexport function useThemeTokens(): DesignTokens | undefined {\n const localTheme = useTheme()\n\n const getInitialTokens = (): DesignTokens | undefined => resolveThemeTokens(localTheme)\n\n const [tokens, setTokens] = useState<DesignTokens | undefined>(getInitialTokens())\n const [, forceUpdate] = useState(0)\n\n useEffect(() => {\n // Subscribe to theme changes (mode/preset switches)\n const unsubscribe = themeRegistry.subscribe(() => {\n const currentTheme = localTheme?.__colorPreset\n ? {\n ...localTheme,\n __colorPreset: { ...localTheme.__colorPreset, mode: themeRegistry.getColorMode() },\n }\n : localTheme\n setTokens(resolveThemeTokens(currentTheme))\n forceUpdate((n) => n + 1)\n })\n\n return unsubscribe\n }, [localTheme])\n\n return tokens\n}\n"],"names":["useTheme","resolveThemeTokens","useState","useEffect","themeRegistry"],"mappings":";;;;;;AAkCO,SAAS,iBAA2C;AACzD,QAAM,aAAaA,QAAAA,SAAA;AAEnB,QAAM,mBAAmB,MAAgCC,mBAAAA,mBAAmB,UAAU;AAEtF,QAAM,CAAC,QAAQ,SAAS,IAAIC,QAAAA,SAAmC,kBAAkB;AACjF,QAAM,GAAG,WAAW,IAAIA,QAAAA,SAAS,CAAC;AAElCC,UAAAA,UAAU,MAAM;AAEd,UAAM,cAAcC,oBAAc,UAAU,MAAM;AAChD,YAAM,eAAe,YAAY,gBAC7B;AAAA,QACE,GAAG;AAAA,QACH,eAAe,EAAE,GAAG,WAAW,eAAe,MAAMA,MAAAA,cAAc,eAAa;AAAA,MAAE,IAEnF;AACJ,gBAAUH,mBAAAA,mBAAmB,YAAY,CAAC;AAC1C,kBAAY,CAAC,MAAM,IAAI,CAAC;AAAA,IAC1B,CAAC;AAED,WAAO;AAAA,EACT,GAAG,CAAC,UAAU,CAAC;AAEf,SAAO;AACT;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DesignTokens } from '@number10/jsx-core';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to access complete design token system from theme context
|
|
4
|
+
* Provides colors, text styles, spacing, sizes, and radius tokens
|
|
5
|
+
* Automatically updates when color mode or preset changes
|
|
6
|
+
* @returns Current DesignTokens or undefined
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* function MyComponent() {
|
|
10
|
+
* const tokens = useThemeTokens()
|
|
11
|
+
*
|
|
12
|
+
* if (!tokens) return null
|
|
13
|
+
*
|
|
14
|
+
* return (
|
|
15
|
+
* <View
|
|
16
|
+
* backgroundColor={tokens.colors.surface.DEFAULT}
|
|
17
|
+
* padding={tokens.spacing.lg}
|
|
18
|
+
* cornerRadius={tokens.radius.md}
|
|
19
|
+
* >
|
|
20
|
+
* <Text text="Title" style={tokens.textStyles.title} />
|
|
21
|
+
* <Text text="Body text" style={tokens.textStyles.DEFAULT} />
|
|
22
|
+
* </View>
|
|
23
|
+
* )
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function useThemeTokens(): DesignTokens | undefined;
|
|
28
|
+
//# sourceMappingURL=use-theme-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-theme-tokens.d.ts","sourceRoot":"","sources":["../../src/design-tokens/use-theme-tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAKtD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,IAAI,YAAY,GAAG,SAAS,CAyBzD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import "../hooks.js";
|
|
2
|
+
import { themeRegistry } from "../theme.js";
|
|
3
|
+
import { resolveThemeTokens } from "./resolve-theme-tokens.js";
|
|
4
|
+
import { useTheme, useState, useEffect } from "@number10/jsx-core";
|
|
5
|
+
function useThemeTokens() {
|
|
6
|
+
const localTheme = useTheme();
|
|
7
|
+
const getInitialTokens = () => resolveThemeTokens(localTheme);
|
|
8
|
+
const [tokens, setTokens] = useState(getInitialTokens());
|
|
9
|
+
const [, forceUpdate] = useState(0);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const unsubscribe = themeRegistry.subscribe(() => {
|
|
12
|
+
const currentTheme = localTheme?.__colorPreset ? {
|
|
13
|
+
...localTheme,
|
|
14
|
+
__colorPreset: { ...localTheme.__colorPreset, mode: themeRegistry.getColorMode() }
|
|
15
|
+
} : localTheme;
|
|
16
|
+
setTokens(resolveThemeTokens(currentTheme));
|
|
17
|
+
forceUpdate((n) => n + 1);
|
|
18
|
+
});
|
|
19
|
+
return unsubscribe;
|
|
20
|
+
}, [localTheme]);
|
|
21
|
+
return tokens;
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
useThemeTokens
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=use-theme-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-theme-tokens.js","sources":["../../src/design-tokens/use-theme-tokens.ts"],"sourcesContent":["/**\n * Hook to access complete design token system\n * Combines colors with text styles, spacing, sizes, and radius tokens\n */\nimport type { DesignTokens } from '@number10/jsx-core'\nimport { useEffect, useState, useTheme } from '../hooks'\nimport { themeRegistry } from '../theme'\nimport { resolveThemeTokens } from './resolve-theme-tokens'\n\n/**\n * Hook to access complete design token system from theme context\n * Provides colors, text styles, spacing, sizes, and radius tokens\n * Automatically updates when color mode or preset changes\n * @returns Current DesignTokens or undefined\n * @example\n * ```typescript\n * function MyComponent() {\n * const tokens = useThemeTokens()\n *\n * if (!tokens) return null\n *\n * return (\n * <View\n * backgroundColor={tokens.colors.surface.DEFAULT}\n * padding={tokens.spacing.lg}\n * cornerRadius={tokens.radius.md}\n * >\n * <Text text=\"Title\" style={tokens.textStyles.title} />\n * <Text text=\"Body text\" style={tokens.textStyles.DEFAULT} />\n * </View>\n * )\n * }\n * ```\n */\nexport function useThemeTokens(): DesignTokens | undefined {\n const localTheme = useTheme()\n\n const getInitialTokens = (): DesignTokens | undefined => resolveThemeTokens(localTheme)\n\n const [tokens, setTokens] = useState<DesignTokens | undefined>(getInitialTokens())\n const [, forceUpdate] = useState(0)\n\n useEffect(() => {\n // Subscribe to theme changes (mode/preset switches)\n const unsubscribe = themeRegistry.subscribe(() => {\n const currentTheme = localTheme?.__colorPreset\n ? {\n ...localTheme,\n __colorPreset: { ...localTheme.__colorPreset, mode: themeRegistry.getColorMode() },\n }\n : localTheme\n setTokens(resolveThemeTokens(currentTheme))\n forceUpdate((n) => n + 1)\n })\n\n return unsubscribe\n }, [localTheme])\n\n return tokens\n}\n"],"names":[],"mappings":";;;;AAkCO,SAAS,iBAA2C;AACzD,QAAM,aAAa,SAAA;AAEnB,QAAM,mBAAmB,MAAgC,mBAAmB,UAAU;AAEtF,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAmC,kBAAkB;AACjF,QAAM,GAAG,WAAW,IAAI,SAAS,CAAC;AAElC,YAAU,MAAM;AAEd,UAAM,cAAc,cAAc,UAAU,MAAM;AAChD,YAAM,eAAe,YAAY,gBAC7B;AAAA,QACE,GAAG;AAAA,QACH,eAAe,EAAE,GAAG,WAAW,eAAe,MAAM,cAAc,eAAa;AAAA,MAAE,IAEnF;AACJ,gBAAU,mBAAmB,YAAY,CAAC;AAC1C,kBAAY,CAAC,MAAM,IAAI,CAAC;AAAA,IAC1B,CAAC;AAED,WAAO;AAAA,EACT,GAAG,CAAC,UAAU,CAAC;AAEf,SAAO;AACT;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/effects/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,yBAAyB,CAAA;AAGhC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxCore = require("@number10/jsx-core");
|
|
3
|
+
const Phaser = require("phaser");
|
|
4
|
+
const useEffect = require("./use-effect.cjs");
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
6
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
|
+
if (e) {
|
|
8
|
+
for (const k in e) {
|
|
9
|
+
if (k !== "default") {
|
|
10
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => e[k]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
const Phaser__namespace = /* @__PURE__ */ _interopNamespaceDefault(Phaser);
|
|
22
|
+
function applyEffectOrigin(obj, effect) {
|
|
23
|
+
const origin = jsxCore.resolveEffectTransformOrigin(effect);
|
|
24
|
+
const originX = origin === "center" || origin === "top-center" ? 0.5 : 0;
|
|
25
|
+
const originY = origin === "center" ? 0.5 : 0;
|
|
26
|
+
const originable = obj;
|
|
27
|
+
if (typeof originable.setOrigin === "function") {
|
|
28
|
+
originable.setOrigin(originX, originY);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const phaserEffectRunner = (node, effect, config) => {
|
|
32
|
+
if (!(node instanceof Phaser__namespace.GameObjects.Container)) return;
|
|
33
|
+
if (!node.scene) return;
|
|
34
|
+
const def = jsxCore.EFFECT_DEFINITIONS[effect];
|
|
35
|
+
if (!def) return;
|
|
36
|
+
applyEffectOrigin(node, effect);
|
|
37
|
+
const origin = jsxCore.resolveEffectTransformOrigin(effect);
|
|
38
|
+
const target = useEffect.createPhaserTarget(node, origin);
|
|
39
|
+
jsxCore.runEffect(node, target, def, config ?? {});
|
|
40
|
+
};
|
|
41
|
+
jsxCore.registerEffectRunner(phaserEffectRunner);
|
|
42
|
+
const phaserEffectStopRunner = (node) => {
|
|
43
|
+
if (!(node instanceof Phaser__namespace.GameObjects.Container)) return;
|
|
44
|
+
if (!node.scene) return;
|
|
45
|
+
jsxCore.stopAnimationEffect(node);
|
|
46
|
+
};
|
|
47
|
+
jsxCore.registerEffectStopRunner(phaserEffectStopRunner);
|
|
48
|
+
//# sourceMappingURL=phaser-effects-bridge.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phaser-effects-bridge.cjs","sources":["../../src/effects/phaser-effects-bridge.ts"],"sourcesContent":["/**\n * Phaser effects bridge — delegates to central Core effect engine.\n *\n * Registers a runner that wraps Phaser game objects as EffectTargets\n * and delegates to runEffect/Core stopEffect.\n */\nimport {\n EFFECT_DEFINITIONS,\n registerEffectRunner,\n registerEffectStopRunner,\n resolveEffectTransformOrigin,\n runEffect,\n stopAnimationEffect as stopEngineEffect,\n type EffectConfig,\n type EffectName,\n} from '@number10/jsx-core'\nimport * as Phaser from 'phaser'\n\n// Import createPhaserTarget from use-effect\nimport { createPhaserTarget } from './use-effect'\n\n/**\n * Apply effect transform origin to a Phaser game object.\n *\n * Phaser Sprites and Images support setOrigin(x, y) natively.\n * Plain Containers don't — they fall back to top-left behavior,\n * which matches the default for 'top-left' effects (fade, shake, etc.).\n */\nfunction applyEffectOrigin(obj: Phaser.GameObjects.Container, effect: EffectName): void {\n const origin = resolveEffectTransformOrigin(effect)\n const originX = origin === 'center' || origin === 'top-center' ? 0.5 : 0\n const originY = origin === 'center' ? 0.5 : 0\n\n // Duck-type check for setOrigin (Sprites, Images, Text have it; Container does not)\n const originable = obj as unknown as { setOrigin?: (x: number, y: number) => void }\n if (typeof originable.setOrigin === 'function') {\n originable.setOrigin(originX, originY)\n }\n}\n\n/**\n * Phaser effect runner: wraps the game object as an EffectTarget,\n * sets the transform origin, and delegates to Core's central engine.\n */\nconst phaserEffectRunner = (node: unknown, effect: EffectName, config?: EffectConfig): void => {\n if (!(node instanceof Phaser.GameObjects.Container)) return\n if (!node.scene) return\n\n const def = EFFECT_DEFINITIONS[effect]\n if (!def) return\n\n // Set transform origin before running the effect\n applyEffectOrigin(node, effect)\n\n const origin = resolveEffectTransformOrigin(effect)\n const target = createPhaserTarget(node, origin)\n runEffect(node, target, def, config ?? {})\n}\n\nregisterEffectRunner(phaserEffectRunner)\n\nconst phaserEffectStopRunner = (node: unknown): void => {\n if (!(node instanceof Phaser.GameObjects.Container)) return\n if (!node.scene) return\n stopEngineEffect(node)\n}\n\nregisterEffectStopRunner(phaserEffectStopRunner)\n"],"names":["resolveEffectTransformOrigin","Phaser","EFFECT_DEFINITIONS","createPhaserTarget","runEffect","registerEffectRunner","stopEngineEffect","registerEffectStopRunner"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BA,SAAS,kBAAkB,KAAmC,QAA0B;AACtF,QAAM,SAASA,QAAAA,6BAA6B,MAAM;AAClD,QAAM,UAAU,WAAW,YAAY,WAAW,eAAe,MAAM;AACvE,QAAM,UAAU,WAAW,WAAW,MAAM;AAG5C,QAAM,aAAa;AACnB,MAAI,OAAO,WAAW,cAAc,YAAY;AAC9C,eAAW,UAAU,SAAS,OAAO;AAAA,EACvC;AACF;AAMA,MAAM,qBAAqB,CAAC,MAAe,QAAoB,WAAgC;AAC7F,MAAI,EAAE,gBAAgBC,kBAAO,YAAY,WAAY;AACrD,MAAI,CAAC,KAAK,MAAO;AAEjB,QAAM,MAAMC,QAAAA,mBAAmB,MAAM;AACrC,MAAI,CAAC,IAAK;AAGV,oBAAkB,MAAM,MAAM;AAE9B,QAAM,SAASF,QAAAA,6BAA6B,MAAM;AAClD,QAAM,SAASG,UAAAA,mBAAmB,MAAM,MAAM;AAC9CC,UAAAA,UAAU,MAAM,QAAQ,KAAK,UAAU,CAAA,CAAE;AAC3C;AAEAC,QAAAA,qBAAqB,kBAAkB;AAEvC,MAAM,yBAAyB,CAAC,SAAwB;AACtD,MAAI,EAAE,gBAAgBJ,kBAAO,YAAY,WAAY;AACrD,MAAI,CAAC,KAAK,MAAO;AACjBK,UAAAA,oBAAiB,IAAI;AACvB;AAEAC,QAAAA,yBAAyB,sBAAsB;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phaser-effects-bridge.d.ts","sourceRoot":"","sources":["../../src/effects/phaser-effects-bridge.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { registerEffectRunner, registerEffectStopRunner, EFFECT_DEFINITIONS, resolveEffectTransformOrigin, runEffect, stopAnimationEffect } from "@number10/jsx-core";
|
|
2
|
+
import * as Phaser from "phaser";
|
|
3
|
+
import { createPhaserTarget } from "./use-effect.js";
|
|
4
|
+
function applyEffectOrigin(obj, effect) {
|
|
5
|
+
const origin = resolveEffectTransformOrigin(effect);
|
|
6
|
+
const originX = origin === "center" || origin === "top-center" ? 0.5 : 0;
|
|
7
|
+
const originY = origin === "center" ? 0.5 : 0;
|
|
8
|
+
const originable = obj;
|
|
9
|
+
if (typeof originable.setOrigin === "function") {
|
|
10
|
+
originable.setOrigin(originX, originY);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const phaserEffectRunner = (node, effect, config) => {
|
|
14
|
+
if (!(node instanceof Phaser.GameObjects.Container)) return;
|
|
15
|
+
if (!node.scene) return;
|
|
16
|
+
const def = EFFECT_DEFINITIONS[effect];
|
|
17
|
+
if (!def) return;
|
|
18
|
+
applyEffectOrigin(node, effect);
|
|
19
|
+
const origin = resolveEffectTransformOrigin(effect);
|
|
20
|
+
const target = createPhaserTarget(node, origin);
|
|
21
|
+
runEffect(node, target, def, config ?? {});
|
|
22
|
+
};
|
|
23
|
+
registerEffectRunner(phaserEffectRunner);
|
|
24
|
+
const phaserEffectStopRunner = (node) => {
|
|
25
|
+
if (!(node instanceof Phaser.GameObjects.Container)) return;
|
|
26
|
+
if (!node.scene) return;
|
|
27
|
+
stopAnimationEffect(node);
|
|
28
|
+
};
|
|
29
|
+
registerEffectStopRunner(phaserEffectStopRunner);
|
|
30
|
+
//# sourceMappingURL=phaser-effects-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phaser-effects-bridge.js","sources":["../../src/effects/phaser-effects-bridge.ts"],"sourcesContent":["/**\n * Phaser effects bridge — delegates to central Core effect engine.\n *\n * Registers a runner that wraps Phaser game objects as EffectTargets\n * and delegates to runEffect/Core stopEffect.\n */\nimport {\n EFFECT_DEFINITIONS,\n registerEffectRunner,\n registerEffectStopRunner,\n resolveEffectTransformOrigin,\n runEffect,\n stopAnimationEffect as stopEngineEffect,\n type EffectConfig,\n type EffectName,\n} from '@number10/jsx-core'\nimport * as Phaser from 'phaser'\n\n// Import createPhaserTarget from use-effect\nimport { createPhaserTarget } from './use-effect'\n\n/**\n * Apply effect transform origin to a Phaser game object.\n *\n * Phaser Sprites and Images support setOrigin(x, y) natively.\n * Plain Containers don't — they fall back to top-left behavior,\n * which matches the default for 'top-left' effects (fade, shake, etc.).\n */\nfunction applyEffectOrigin(obj: Phaser.GameObjects.Container, effect: EffectName): void {\n const origin = resolveEffectTransformOrigin(effect)\n const originX = origin === 'center' || origin === 'top-center' ? 0.5 : 0\n const originY = origin === 'center' ? 0.5 : 0\n\n // Duck-type check for setOrigin (Sprites, Images, Text have it; Container does not)\n const originable = obj as unknown as { setOrigin?: (x: number, y: number) => void }\n if (typeof originable.setOrigin === 'function') {\n originable.setOrigin(originX, originY)\n }\n}\n\n/**\n * Phaser effect runner: wraps the game object as an EffectTarget,\n * sets the transform origin, and delegates to Core's central engine.\n */\nconst phaserEffectRunner = (node: unknown, effect: EffectName, config?: EffectConfig): void => {\n if (!(node instanceof Phaser.GameObjects.Container)) return\n if (!node.scene) return\n\n const def = EFFECT_DEFINITIONS[effect]\n if (!def) return\n\n // Set transform origin before running the effect\n applyEffectOrigin(node, effect)\n\n const origin = resolveEffectTransformOrigin(effect)\n const target = createPhaserTarget(node, origin)\n runEffect(node, target, def, config ?? {})\n}\n\nregisterEffectRunner(phaserEffectRunner)\n\nconst phaserEffectStopRunner = (node: unknown): void => {\n if (!(node instanceof Phaser.GameObjects.Container)) return\n if (!node.scene) return\n stopEngineEffect(node)\n}\n\nregisterEffectStopRunner(phaserEffectStopRunner)\n"],"names":["stopEngineEffect"],"mappings":";;;AA4BA,SAAS,kBAAkB,KAAmC,QAA0B;AACtF,QAAM,SAAS,6BAA6B,MAAM;AAClD,QAAM,UAAU,WAAW,YAAY,WAAW,eAAe,MAAM;AACvE,QAAM,UAAU,WAAW,WAAW,MAAM;AAG5C,QAAM,aAAa;AACnB,MAAI,OAAO,WAAW,cAAc,YAAY;AAC9C,eAAW,UAAU,SAAS,OAAO;AAAA,EACvC;AACF;AAMA,MAAM,qBAAqB,CAAC,MAAe,QAAoB,WAAgC;AAC7F,MAAI,EAAE,gBAAgB,OAAO,YAAY,WAAY;AACrD,MAAI,CAAC,KAAK,MAAO;AAEjB,QAAM,MAAM,mBAAmB,MAAM;AACrC,MAAI,CAAC,IAAK;AAGV,oBAAkB,MAAM,MAAM;AAE9B,QAAM,SAAS,6BAA6B,MAAM;AAClD,QAAM,SAAS,mBAAmB,MAAM,MAAM;AAC9C,YAAU,MAAM,QAAQ,KAAK,UAAU,CAAA,CAAE;AAC3C;AAEA,qBAAqB,kBAAkB;AAEvC,MAAM,yBAAyB,CAAC,SAAwB;AACtD,MAAI,EAAE,gBAAgB,OAAO,YAAY,WAAY;AACrD,MAAI,CAAC,KAAK,MAAO;AACjBA,sBAAiB,IAAI;AACvB;AAEA,yBAAyB,sBAAsB;"}
|