@tsparticles/shape-line 4.0.0-beta.11 → 4.0.0-beta.15

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.
@@ -0,0 +1,5 @@
1
+ import { loadLineShape } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadLineShape = loadLineShape;
5
+ export * from "./index.js";
package/browser/index.js CHANGED
@@ -1,9 +1,7 @@
1
+ import { LineDrawer } from "./LineDrawer.js";
1
2
  export async function loadLineShape(engine) {
2
- engine.checkVersion("4.0.0-beta.11");
3
+ engine.checkVersion("4.0.0-beta.15");
3
4
  await engine.pluginManager.register(e => {
4
- e.pluginManager.addShape(["line"], async () => {
5
- const { LineDrawer } = await import("./LineDrawer.js");
6
- return new LineDrawer();
7
- });
5
+ e.pluginManager.addShape(["line"], () => Promise.resolve(new LineDrawer()));
8
6
  });
9
7
  }
@@ -0,0 +1,7 @@
1
+ export async function loadLineShape(engine) {
2
+ engine.checkVersion("4.0.0-beta.15");
3
+ await engine.pluginManager.register(async (e) => {
4
+ const { LineDrawer } = await import("./LineDrawer.js");
5
+ e.pluginManager.addShape(["line"], () => Promise.resolve(new LineDrawer()));
6
+ });
7
+ }
package/cjs/browser.js ADDED
@@ -0,0 +1,5 @@
1
+ import { loadLineShape } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadLineShape = loadLineShape;
5
+ export * from "./index.js";
package/cjs/index.js CHANGED
@@ -1,9 +1,7 @@
1
+ import { LineDrawer } from "./LineDrawer.js";
1
2
  export async function loadLineShape(engine) {
2
- engine.checkVersion("4.0.0-beta.11");
3
+ engine.checkVersion("4.0.0-beta.15");
3
4
  await engine.pluginManager.register(e => {
4
- e.pluginManager.addShape(["line"], async () => {
5
- const { LineDrawer } = await import("./LineDrawer.js");
6
- return new LineDrawer();
7
- });
5
+ e.pluginManager.addShape(["line"], () => Promise.resolve(new LineDrawer()));
8
6
  });
9
7
  }
@@ -0,0 +1,7 @@
1
+ export async function loadLineShape(engine) {
2
+ engine.checkVersion("4.0.0-beta.15");
3
+ await engine.pluginManager.register(async (e) => {
4
+ const { LineDrawer } = await import("./LineDrawer.js");
5
+ e.pluginManager.addShape(["line"], () => Promise.resolve(new LineDrawer()));
6
+ });
7
+ }
package/esm/browser.js ADDED
@@ -0,0 +1,5 @@
1
+ import { loadLineShape } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadLineShape = loadLineShape;
5
+ export * from "./index.js";
package/esm/index.js CHANGED
@@ -1,9 +1,7 @@
1
+ import { LineDrawer } from "./LineDrawer.js";
1
2
  export async function loadLineShape(engine) {
2
- engine.checkVersion("4.0.0-beta.11");
3
+ engine.checkVersion("4.0.0-beta.15");
3
4
  await engine.pluginManager.register(e => {
4
- e.pluginManager.addShape(["line"], async () => {
5
- const { LineDrawer } = await import("./LineDrawer.js");
6
- return new LineDrawer();
7
- });
5
+ e.pluginManager.addShape(["line"], () => Promise.resolve(new LineDrawer()));
8
6
  });
9
7
  }
@@ -0,0 +1,7 @@
1
+ export async function loadLineShape(engine) {
2
+ engine.checkVersion("4.0.0-beta.15");
3
+ await engine.pluginManager.register(async (e) => {
4
+ const { LineDrawer } = await import("./LineDrawer.js");
5
+ e.pluginManager.addShape(["line"], () => Promise.resolve(new LineDrawer()));
6
+ });
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/shape-line",
3
- "version": "4.0.0-beta.11",
3
+ "version": "4.0.0-beta.15",
4
4
  "description": "tsParticles line shape",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -55,10 +55,17 @@
55
55
  "require": "./cjs/index.js",
56
56
  "default": "./esm/index.js"
57
57
  },
58
+ "./lazy": {
59
+ "types": "./types/index.lazy.d.ts",
60
+ "browser": "./browser/index.lazy.js",
61
+ "import": "./esm/index.lazy.js",
62
+ "require": "./cjs/index.lazy.js",
63
+ "default": "./esm/index.lazy.js"
64
+ },
58
65
  "./package.json": "./package.json"
59
66
  },
60
67
  "peerDependencies": {
61
- "@tsparticles/engine": "4.0.0-beta.11"
68
+ "@tsparticles/engine": "4.0.0-beta.15"
62
69
  },
63
70
  "publishConfig": {
64
71
  "access": "public"