@number10/phaserjsx 4.1.0 → 4.3.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.
Files changed (67) hide show
  1. package/README.md +14 -1
  2. package/dist/clip/index.cjs +7 -695
  3. package/dist/clip/index.js +1 -687
  4. package/dist/clip/stencil-clip-depth.d.ts +10 -0
  5. package/dist/clip/stencil-clip-depth.d.ts.map +1 -0
  6. package/dist/clip/stencil-clip-fbo-bridge.d.ts +7 -0
  7. package/dist/clip/stencil-clip-fbo-bridge.d.ts.map +1 -0
  8. package/dist/clip/stencil-clip-renderer.d.ts +7 -0
  9. package/dist/clip/stencil-clip-renderer.d.ts.map +1 -0
  10. package/dist/clip/stencil-clip-state.d.ts +28 -0
  11. package/dist/clip/stencil-clip-state.d.ts.map +1 -0
  12. package/dist/clip/stencil-clip-types.d.ts +67 -0
  13. package/dist/clip/stencil-clip-types.d.ts.map +1 -0
  14. package/dist/clip/stencil-clip.d.ts +3 -84
  15. package/dist/clip/stencil-clip.d.ts.map +1 -1
  16. package/dist/clip-CHmjztBQ.cjs +705 -0
  17. package/dist/clip-CHmjztBQ.cjs.map +1 -0
  18. package/dist/clip-CPufWCSD.js +668 -0
  19. package/dist/clip-CPufWCSD.js.map +1 -0
  20. package/dist/components/appliers/applyParticles.d.ts.map +1 -1
  21. package/dist/components/custom/Badge.d.ts +73 -0
  22. package/dist/components/custom/Badge.d.ts.map +1 -0
  23. package/dist/components/custom/Checkbox.d.ts +41 -0
  24. package/dist/components/custom/Checkbox.d.ts.map +1 -0
  25. package/dist/components/custom/DebugPanel.d.ts +30 -0
  26. package/dist/components/custom/DebugPanel.d.ts.map +1 -0
  27. package/dist/components/custom/Particles.d.ts +14 -3
  28. package/dist/components/custom/Particles.d.ts.map +1 -1
  29. package/dist/components/custom/Popover.d.ts +89 -0
  30. package/dist/components/custom/Popover.d.ts.map +1 -0
  31. package/dist/components/custom/ProgressBar.d.ts +52 -0
  32. package/dist/components/custom/ProgressBar.d.ts.map +1 -0
  33. package/dist/components/custom/Toggle.d.ts.map +1 -1
  34. package/dist/components/custom/index.cjs +15 -1
  35. package/dist/components/custom/index.d.ts +5 -0
  36. package/dist/components/custom/index.d.ts.map +1 -1
  37. package/dist/components/custom/index.js +2 -2
  38. package/dist/components/index.d.ts +5 -1
  39. package/dist/components/index.d.ts.map +1 -1
  40. package/dist/components/primitives/graphics.d.ts +2 -2
  41. package/dist/components/primitives/particles.d.ts +14 -4
  42. package/dist/components/primitives/particles.d.ts.map +1 -1
  43. package/dist/components/primitives/tilesprite.d.ts +15 -19
  44. package/dist/components/primitives/tilesprite.d.ts.map +1 -1
  45. package/dist/{custom-Dp3yAJdU.cjs → custom-37gL0VZG.cjs} +1578 -264
  46. package/dist/custom-37gL0VZG.cjs.map +1 -0
  47. package/dist/{custom-C_w8D39m.js → custom-DMZASXll.js} +1455 -231
  48. package/dist/custom-DMZASXll.js.map +1 -0
  49. package/dist/gestures/gesture-manager.d.ts +1 -1
  50. package/dist/index.cjs +49 -111
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.js +29 -105
  53. package/dist/index.js.map +1 -1
  54. package/dist/particles/emit-zone.d.ts +34 -12
  55. package/dist/particles/emit-zone.d.ts.map +1 -1
  56. package/dist/particles/index.d.ts +1 -1
  57. package/dist/particles/index.d.ts.map +1 -1
  58. package/dist/particles/use-particles.d.ts +6 -2
  59. package/dist/particles/use-particles.d.ts.map +1 -1
  60. package/dist/theme-custom.d.ts +68 -0
  61. package/dist/theme-custom.d.ts.map +1 -1
  62. package/dist/theme-defaults.d.ts.map +1 -1
  63. package/package.json +3 -2
  64. package/dist/clip/index.cjs.map +0 -1
  65. package/dist/clip/index.js.map +0 -1
  66. package/dist/custom-C_w8D39m.js.map +0 -1
  67. package/dist/custom-Dp3yAJdU.cjs.map +0 -1
@@ -65,7 +65,7 @@ import { PropsDefaultExtension } from '../../types';
65
65
  * - Compare with current dependencies in patcher
66
66
  * - Call onDraw only if changed
67
67
  *
68
- * 6. Performance Optimization: GENERATETEXTURE PATH 🆕
68
+ * 6. Performance Optimization: GENERATE-TEXTURE PATH 🆕
69
69
  * Strategy for static graphics:
70
70
  * - Static graphics (no redraw) → Consider generateTexture() optimization
71
71
  * - Converts geometry to texture (faster rendering, loses vector quality)
@@ -80,7 +80,7 @@ import { PropsDefaultExtension } from '../../types';
80
80
  * - ✅ Custom complex shapes (polygons, stars, bezier curves)
81
81
  * - ✅ Dynamic visualizations (graphs, charts)
82
82
  * - ✅ Progress bars with custom shapes
83
- * - ✅ Debug overlays (hitboxes, grids)
83
+ * - ✅ Debug overlays (hit boxes, grids)
84
84
  * Use Alternatives For:
85
85
  * - ❌ Simple rectangles → Use View with backgroundColor
86
86
  * - ❌ Borders → Use View with borderColor/borderWidth
@@ -1,6 +1,6 @@
1
1
  import { LayoutProps, PhaserProps, TransformProps } from '../../core-props';
2
2
  import { HostCreator, HostPatcher } from '../../host';
3
- import { ParticleExclusionZoneConfig, ParticleZoneConfig } from '../../particles/emit-zone';
3
+ import { ParticleDeathZoneConfig, ParticleZoneConfig } from '../../particles/emit-zone';
4
4
  import { ParticlesHandle } from '../../particles/particle-types';
5
5
  import { ParticleEmitterConfig, ParticlePresetName } from '../../particles/preset-registry';
6
6
  import { PropsDefaultExtension } from '../../types';
@@ -16,10 +16,20 @@ export interface ParticlesBaseProps extends TransformProps, PhaserProps, LayoutP
16
16
  preset?: ParticlePresetName;
17
17
  /** Optional emitter config overrides */
18
18
  config?: ParticleEmitterConfig;
19
- /** Optional emit zone */
19
+ /** Optional emit zone: where particles are born */
20
+ emitZone?: ParticleZoneConfig;
21
+ /**
22
+ * Optional emit zone: where particles are born.
23
+ * @deprecated Use emitZone.
24
+ */
20
25
  zone?: ParticleZoneConfig;
21
- /** Optional exclusion zones (coordinates relative to particle emitter) */
22
- excludeZones?: ParticleExclusionZoneConfig | ParticleExclusionZoneConfig[] | undefined;
26
+ /** Optional death zones: where particles are removed */
27
+ deathZones?: ParticleDeathZoneConfig | ParticleDeathZoneConfig[] | undefined;
28
+ /**
29
+ * Optional death zones: where particles are removed.
30
+ * @deprecated Use deathZones.
31
+ */
32
+ excludeZones?: ParticleDeathZoneConfig | ParticleDeathZoneConfig[] | undefined;
23
33
  }
24
34
  /**
25
35
  * Props for primitive Particles component (internal use only)
@@ -1 +1 @@
1
- {"version":3,"file":"particles.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/particles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,KAAK,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAEhG,OAAO,KAAK,EAA8B,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACjG,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AAQhG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AASxD;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,cAAc,EAAE,WAAW,EAAE,WAAW;IAClF,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAA;IAEf,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEvB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAE3B,wCAAwC;IACxC,MAAM,CAAC,EAAE,qBAAqB,CAAA;IAE9B,yBAAyB;IACzB,IAAI,CAAC,EAAE,kBAAkB,CAAA;IAEzB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,2BAA2B,GAAG,2BAA2B,EAAE,GAAG,SAAS,CAAA;CACvF;AAED;;GAEG;AACH,MAAM,WAAW,uBACf,SAAQ,kBAAkB,EAAE,qBAAqB,CAAC,eAAe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AG,SAAS,CAAA;CAC/E;AAED;;GAEG;AACH,MAAM,WAAW,uBACf,SAAQ,kBAAkB,EAAE,qBAAqB,CAAC,eAAe,CAAC;CAAG;AAEvE;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,WAAW,CA6ErD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,WAAW,CAYrD,CAAA"}
@@ -1,9 +1,9 @@
1
- import { TransformProps } from '../../core-props';
1
+ import { LayoutProps, PhaserProps, TransformProps } from '../../core-props';
2
2
  import { HostCreator, HostPatcher } from '../../host';
3
3
  import { PropsDefaultExtension } from '../../types';
4
4
  /**
5
5
  * TileSprite component - Phaser TileSprite GameObject (repeating texture pattern)
6
- * Status: DUMMY - Not implemented yet
6
+ * Status: IMPLEMENTED
7
7
  *
8
8
  * Design Decisions & Answers:
9
9
  * ===========================
@@ -104,22 +104,20 @@ import { PropsDefaultExtension } from '../../types';
104
104
  *
105
105
  * Implementation Checklist:
106
106
  * ========================
107
- * [ ] Create TileSprite with scene.add.tileSprite(x, y, width, height, texture, frame)
108
- * [ ] Set origin to (0, 0) by default (UI-friendly)
109
- * [ ] Apply transform props via applyTransformProps
110
- * [ ] Setup tilePosition/tileScale props
111
- * [ ] Implement layout size resolver (support %, fill)
112
- * [ ] Setup layout size provider (width/height)
113
- * [ ] Handle dimension changes (recreate if needed)
114
- * [ ] Support tint, origin props
115
- * [ ] Test with scrolling, scaling, rotation
116
- * [ ] Document power-of-2 texture recommendation
107
+ * [] Create TileSprite with scene.add.tileSprite(x, y, width, height, texture, frame)
108
+ * [] Set origin to (0, 0) by default (UI-friendly)
109
+ * [] Apply transform props via applyTransformProps
110
+ * [] Setup tilePosition/tileScale props
111
+ * [] Setup layout size provider (width/height)
112
+ * [] Handle dimension changes via setSize
113
+ * [] Support tint, origin props
114
+ * [] Document power-of-2 texture recommendation
117
115
  */
118
116
  import type * as Phaser from 'phaser';
119
117
  /**
120
118
  * Base props for TileSprite component
121
119
  */
122
- export interface TileSpriteBaseProps extends TransformProps {
120
+ export interface TileSpriteBaseProps extends TransformProps, PhaserProps, LayoutProps {
123
121
  /** Texture key (loaded via Phaser's texture manager) */
124
122
  texture: string;
125
123
  /** Optional frame from texture atlas */
@@ -138,9 +136,9 @@ export interface TileSpriteBaseProps extends TransformProps {
138
136
  tileScaleY?: number;
139
137
  /** Tint color applied to tiles (0xRRGGBB) */
140
138
  tint?: number;
141
- /** Origin X (0-1, default 0.5) */
139
+ /** Origin X (0-1, default 0) */
142
140
  originX?: number;
143
- /** Origin Y (0-1, default 0.5) */
141
+ /** Origin Y (0-1, default 0) */
144
142
  originY?: number;
145
143
  }
146
144
  /**
@@ -149,13 +147,11 @@ export interface TileSpriteBaseProps extends TransformProps {
149
147
  export interface TileSpriteProps extends TileSpriteBaseProps, PropsDefaultExtension<Phaser.GameObjects.TileSprite> {
150
148
  }
151
149
  /**
152
- * TileSprite creator - NOT IMPLEMENTED YET
153
- * @throws Error indicating component is not implemented
150
+ * TileSprite creator - creates a Phaser TileSprite object.
154
151
  */
155
152
  export declare const tileSpriteCreator: HostCreator<'TileSprite'>;
156
153
  /**
157
- * TileSprite patcher - NOT IMPLEMENTED YET
158
- * @throws Error indicating component is not implemented
154
+ * TileSprite patcher - updates texture, size, tiling and shared display props.
159
155
  */
160
156
  export declare const tileSpritePatcher: HostPatcher<'TileSprite'>;
161
157
  //# sourceMappingURL=tilesprite.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tilesprite.d.ts","sourceRoot":"","sources":["../../../src/components/primitives/tilesprite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiHG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,QAAQ,CAAA;AACrC,OAAO,KAAK,EAAE,cAAc,E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