@tsparticles/stencil 4.1.3 → 4.2.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 (29) hide show
  1. package/README.md +13 -0
  2. package/dist/cjs/{Container-0BqPfTsu.js → Container-CGxn4Tv3.js} +659 -1010
  3. package/dist/cjs/{index-Bw7g3biq.js → index-7q-LddLf.js} +57 -160
  4. package/dist/cjs/{index-B2lLThjb.js → index-BjS63OiI.js} +95 -5
  5. package/dist/cjs/index.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/stencil-particles.cjs.entry.js +23 -6
  8. package/dist/cjs/tsparticlesstencil.cjs.js +2 -2
  9. package/dist/collection/components/stencil-particles/stencil-particles.js +83 -4
  10. package/dist/esm/{Container-BxLt611H.js → Container-BWWTh10Z.js} +659 -1010
  11. package/dist/esm/{index-DKFk70aj.js → index-PhwiK2_P.js} +95 -6
  12. package/dist/esm/{index-BXzC9NH1.js → index-aPxdqzSw.js} +57 -160
  13. package/dist/esm/index.js +1 -1
  14. package/dist/esm/loader.js +3 -3
  15. package/dist/esm/stencil-particles.entry.js +23 -6
  16. package/dist/esm/tsparticlesstencil.js +3 -3
  17. package/dist/tsparticlesstencil/index.esm.js +1 -1
  18. package/dist/tsparticlesstencil/p-FNL2LsWF.js +1 -0
  19. package/dist/tsparticlesstencil/p-PBQ5N1xQ.js +1 -0
  20. package/dist/tsparticlesstencil/p-PhwiK2_P.js +2 -0
  21. package/dist/tsparticlesstencil/p-e16c4912.entry.js +1 -0
  22. package/dist/tsparticlesstencil/tsparticlesstencil.esm.js +1 -1
  23. package/dist/types/components/stencil-particles/stencil-particles.d.ts +6 -2
  24. package/dist/types/components.d.ts +24 -2
  25. package/package.json +8 -7
  26. package/dist/tsparticlesstencil/p-BhGs05ap.js +0 -1
  27. package/dist/tsparticlesstencil/p-DKFk70aj.js +0 -2
  28. package/dist/tsparticlesstencil/p-LyLjQmWv.js +0 -1
  29. package/dist/tsparticlesstencil/p-cf6e2424.entry.js +0 -1
package/README.md CHANGED
@@ -66,6 +66,19 @@ You can also load options from URL:
66
66
  - `options`: inline particles options (`ISourceOptions`)
67
67
  - `url`: path/url to a JSON options file
68
68
  - `init`: async callback used to register plugins on the same engine instance used by the component
69
+ - `theme`: theme name to apply (requires `@tsparticles/plugin-themes` to be loaded in `init`; without the plugin, the prop is a safe no-op)
70
+
71
+ ## Events
72
+
73
+ - `particlesLoaded`: emitted when the particles container has been successfully initialized
74
+
75
+ ### Reactive behavior
76
+
77
+ The component reloads particles when `container-id`, `options`, or `url` props change. Changes to `theme` apply the theme via `loadTheme` without a full reload.
78
+
79
+ ### Cleanup
80
+
81
+ When the component is removed from the DOM, the particles container is automatically destroyed, stopping all animations and freeing resources.
69
82
 
70
83
  ## Monorepo references
71
84