@tsparticles/stencil 4.0.5

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 (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +73 -0
  3. package/dist/cjs/Container-DFed5jPA.js +3556 -0
  4. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  5. package/dist/cjs/index-BY5-j3YK.js +1143 -0
  6. package/dist/cjs/index-Dwz1YgEM.js +1229 -0
  7. package/dist/cjs/index.cjs.js +9 -0
  8. package/dist/cjs/loader.cjs.js +13 -0
  9. package/dist/cjs/stencil-particles.cjs.entry.js +76 -0
  10. package/dist/cjs/tsparticlesstencil.cjs.js +25 -0
  11. package/dist/collection/collection-manifest.json +13 -0
  12. package/dist/collection/components/stencil-particles/stencil-particles.js +144 -0
  13. package/dist/collection/index.js +1 -0
  14. package/dist/collection/initParticlesEngine.js +38 -0
  15. package/dist/esm/Container-Di-pVL5B.js +3554 -0
  16. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  17. package/dist/esm/index-BzK79uqU.js +1223 -0
  18. package/dist/esm/index-CPcFDf6d.js +1052 -0
  19. package/dist/esm/index.js +1 -0
  20. package/dist/esm/loader.js +11 -0
  21. package/dist/esm/stencil-particles.entry.js +74 -0
  22. package/dist/esm/tsparticlesstencil.js +21 -0
  23. package/dist/index.cjs.js +1 -0
  24. package/dist/index.js +1 -0
  25. package/dist/tsparticlesstencil/index.esm.js +1 -0
  26. package/dist/tsparticlesstencil/p-2a10755a.entry.js +1 -0
  27. package/dist/tsparticlesstencil/p-BzK79uqU.js +2 -0
  28. package/dist/tsparticlesstencil/p-C6McIuSD.js +1 -0
  29. package/dist/tsparticlesstencil/p-DQuL1Twl.js +1 -0
  30. package/dist/tsparticlesstencil/p-x9G6hxBi.js +1 -0
  31. package/dist/tsparticlesstencil/tsparticlesstencil.esm.js +1 -0
  32. package/dist/types/components/stencil-particles/stencil-particles.d.ts +16 -0
  33. package/dist/types/components.d.ts +52 -0
  34. package/dist/types/index.d.ts +2 -0
  35. package/dist/types/initParticlesEngine.d.ts +5 -0
  36. package/dist/types/stencil-public-runtime.d.ts +1860 -0
  37. package/loader/cdn.js +1 -0
  38. package/loader/index.cjs.js +1 -0
  39. package/loader/index.d.ts +24 -0
  40. package/loader/index.es2017.js +1 -0
  41. package/loader/index.js +2 -0
  42. package/package.json +64 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Matteo Bruni
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ [![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)
2
+
3
+ # @tsparticles/stencil
4
+
5
+ [![npm](https://img.shields.io/npm/v/@tsparticles/stencil)](https://www.npmjs.com/package/@tsparticles/stencil) [![npm](https://img.shields.io/npm/dm/@tsparticles/stencil)](https://www.npmjs.com/package/@tsparticles/stencil) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
6
+
7
+ Official [tsParticles](https://github.com/tsparticles/tsparticles) Stencil wrapper.
8
+
9
+ ## Installation
10
+
11
+ ```shell
12
+ npm install @tsparticles/stencil @tsparticles/engine
13
+ ```
14
+
15
+ or
16
+
17
+ ```shell
18
+ yarn add @tsparticles/stencil @tsparticles/engine
19
+ ```
20
+
21
+ If you need prebuilt features, install one loader package too, for example `@tsparticles/slim`.
22
+
23
+ ## Usage
24
+
25
+ Register Stencil custom elements once:
26
+
27
+ ```ts
28
+ import { defineCustomElements } from "@tsparticles/stencil/loader";
29
+
30
+ defineCustomElements();
31
+ ```
32
+
33
+ Use the component in your app and initialize features with the `init` callback:
34
+
35
+ ```tsx
36
+ import { h } from "@stencil/core";
37
+ import { loadSlim } from "@tsparticles/slim";
38
+
39
+ export const Background = () => (
40
+ <stencil-particles
41
+ container-id="tsparticles"
42
+ init={async engine => {
43
+ await loadSlim(engine);
44
+ }}
45
+ options={{
46
+ fullScreen: { enable: false },
47
+ particles: {
48
+ move: { enable: true },
49
+ number: { value: 80 }
50
+ }
51
+ }}
52
+ ></stencil-particles>
53
+ );
54
+ ```
55
+
56
+ You can also load options from URL:
57
+
58
+ ```html
59
+
60
+ <stencil-particles container-id="tsparticles" url="/assets/default.json"></stencil-particles>
61
+ ```
62
+
63
+ ## Props
64
+
65
+ - `container-id`: container id used by `tsParticles.load`
66
+ - `options`: inline particles options (`ISourceOptions`)
67
+ - `url`: path/url to a JSON options file
68
+ - `init`: async callback used to register plugins on the same engine instance used by the component
69
+
70
+ ## Monorepo references
71
+
72
+ - Package folder: <https://github.com/tsparticles/tsparticles/tree/main/wrappers/stencil>
73
+ - Demo app: <https://github.com/tsparticles/tsparticles/tree/main/demo/stencil>