@tsparticles/shape-text 4.0.0-beta.12 → 4.0.0-beta.16

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 { loadTextShape } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadTextShape = loadTextShape;
5
+ export * from "./index.js";
package/browser/index.js CHANGED
@@ -1,10 +1,8 @@
1
+ import { TextDrawer } from "./TextDrawer.js";
1
2
  import { validTypes } from "./Utils.js";
2
3
  export async function loadTextShape(engine) {
3
- engine.checkVersion("4.0.0-beta.12");
4
+ engine.checkVersion("4.0.0-beta.16");
4
5
  await engine.pluginManager.register(e => {
5
- e.pluginManager.addShape(validTypes, async () => {
6
- const { TextDrawer } = await import("./TextDrawer.js");
7
- return new TextDrawer();
8
- });
6
+ e.pluginManager.addShape(validTypes, () => Promise.resolve(new TextDrawer()));
9
7
  });
10
8
  }
@@ -0,0 +1,10 @@
1
+ import { validTypes } from "./Utils.js";
2
+ export async function loadTextShape(engine) {
3
+ engine.checkVersion("4.0.0-beta.16");
4
+ await engine.pluginManager.register(e => {
5
+ e.pluginManager.addShape(validTypes, async () => {
6
+ const { TextDrawer } = await import("./TextDrawer.js");
7
+ return new TextDrawer();
8
+ });
9
+ });
10
+ }
package/cjs/browser.js ADDED
@@ -0,0 +1,5 @@
1
+ import { loadTextShape } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadTextShape = loadTextShape;
5
+ export * from "./index.js";
package/cjs/index.js CHANGED
@@ -1,10 +1,8 @@
1
+ import { TextDrawer } from "./TextDrawer.js";
1
2
  import { validTypes } from "./Utils.js";
2
3
  export async function loadTextShape(engine) {
3
- engine.checkVersion("4.0.0-beta.12");
4
+ engine.checkVersion("4.0.0-beta.16");
4
5
  await engine.pluginManager.register(e => {
5
- e.pluginManager.addShape(validTypes, async () => {
6
- const { TextDrawer } = await import("./TextDrawer.js");
7
- return new TextDrawer();
8
- });
6
+ e.pluginManager.addShape(validTypes, () => Promise.resolve(new TextDrawer()));
9
7
  });
10
8
  }
@@ -0,0 +1,10 @@
1
+ import { validTypes } from "./Utils.js";
2
+ export async function loadTextShape(engine) {
3
+ engine.checkVersion("4.0.0-beta.16");
4
+ await engine.pluginManager.register(e => {
5
+ e.pluginManager.addShape(validTypes, async () => {
6
+ const { TextDrawer } = await import("./TextDrawer.js");
7
+ return new TextDrawer();
8
+ });
9
+ });
10
+ }
package/esm/browser.js ADDED
@@ -0,0 +1,5 @@
1
+ import { loadTextShape } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadTextShape = loadTextShape;
5
+ export * from "./index.js";
package/esm/index.js CHANGED
@@ -1,10 +1,8 @@
1
+ import { TextDrawer } from "./TextDrawer.js";
1
2
  import { validTypes } from "./Utils.js";
2
3
  export async function loadTextShape(engine) {
3
- engine.checkVersion("4.0.0-beta.12");
4
+ engine.checkVersion("4.0.0-beta.16");
4
5
  await engine.pluginManager.register(e => {
5
- e.pluginManager.addShape(validTypes, async () => {
6
- const { TextDrawer } = await import("./TextDrawer.js");
7
- return new TextDrawer();
8
- });
6
+ e.pluginManager.addShape(validTypes, () => Promise.resolve(new TextDrawer()));
9
7
  });
10
8
  }
@@ -0,0 +1,10 @@
1
+ import { validTypes } from "./Utils.js";
2
+ export async function loadTextShape(engine) {
3
+ engine.checkVersion("4.0.0-beta.16");
4
+ await engine.pluginManager.register(e => {
5
+ e.pluginManager.addShape(validTypes, async () => {
6
+ const { TextDrawer } = await import("./TextDrawer.js");
7
+ return new TextDrawer();
8
+ });
9
+ });
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/shape-text",
3
- "version": "4.0.0-beta.12",
3
+ "version": "4.0.0-beta.16",
4
4
  "description": "tsParticles text shape",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -55,11 +55,18 @@
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/canvas-utils": "4.0.0-beta.12",
62
- "@tsparticles/engine": "4.0.0-beta.12"
68
+ "@tsparticles/canvas-utils": "4.0.0-beta.16",
69
+ "@tsparticles/engine": "4.0.0-beta.16"
63
70
  },
64
71
  "publishConfig": {
65
72
  "access": "public"