@tsparticles/plugin-named-color 4.0.5 → 4.1.1

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.
@@ -154,15 +154,15 @@ export class NamedColorManager {
154
154
  return namedColors.has(input.toLowerCase());
155
155
  }
156
156
  handleColor(color) {
157
- return this._parseString(color.value);
157
+ return this.#parseString(color.value);
158
158
  }
159
159
  handleRangeColor(color) {
160
- return this._parseString(color.value);
160
+ return this.#parseString(color.value);
161
161
  }
162
162
  parseString(input) {
163
- return this._parseString(input);
163
+ return this.#parseString(input);
164
164
  }
165
- _parseString(input) {
165
+ #parseString(input) {
166
166
  if (!input || typeof input !== "string") {
167
167
  return undefined;
168
168
  }
@@ -171,6 +171,6 @@ export class NamedColorManager {
171
171
  getLogger().error("Color not found", input);
172
172
  return undefined;
173
173
  }
174
- return { ...rgbColor, a: 255 };
174
+ return { ...rgbColor, a: 1 };
175
175
  }
176
176
  }
@@ -0,0 +1,20 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { NamedColorManager } from "./NamedColorManager.js";
3
+ describe("NamedColorManager", () => {
4
+ const manager = new NamedColorManager(), testCases = [
5
+ { name: "red", input: "red", expected: { r: 255, g: 0, b: 0 } },
6
+ { name: "green", input: "lime", expected: { r: 0, g: 255, b: 0 } },
7
+ { name: "blue", input: "blue", expected: { r: 0, g: 0, b: 255 } },
8
+ { name: "yellow", input: "yellow", expected: { r: 255, g: 255, b: 0 } },
9
+ { name: "cyan", input: "aqua", expected: { r: 0, g: 255, b: 255 } },
10
+ { name: "magenta", input: "fuchsia", expected: { r: 255, g: 0, b: 255 } },
11
+ { name: "white", input: "white", expected: { r: 255, g: 255, b: 255 } },
12
+ { name: "black", input: "black", expected: { r: 0, g: 0, b: 0 } },
13
+ ];
14
+ for (const { name, input, expected } of testCases) {
15
+ it(`should convert "${input}" to ${name}`, () => {
16
+ const result = manager.handleColor({ value: input });
17
+ expect(result).toMatchObject(expected);
18
+ });
19
+ }
20
+ });
package/browser/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NamedColorManager } from "./NamedColorManager.js";
2
2
  export async function loadNamedColorPlugin(engine) {
3
- engine.checkVersion("4.0.5");
3
+ engine.checkVersion("4.1.1");
4
4
  await engine.pluginManager.register(e => {
5
5
  e.pluginManager.addColorManager("named", new NamedColorManager());
6
6
  });
@@ -1,5 +1,5 @@
1
1
  export async function loadNamedColorPlugin(engine) {
2
- engine.checkVersion("4.0.5");
2
+ engine.checkVersion("4.1.1");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const { NamedColorManager } = await import("./NamedColorManager.js");
5
5
  e.pluginManager.addColorManager("named", new NamedColorManager());
@@ -154,15 +154,15 @@ export class NamedColorManager {
154
154
  return namedColors.has(input.toLowerCase());
155
155
  }
156
156
  handleColor(color) {
157
- return this._parseString(color.value);
157
+ return this.#parseString(color.value);
158
158
  }
159
159
  handleRangeColor(color) {
160
- return this._parseString(color.value);
160
+ return this.#parseString(color.value);
161
161
  }
162
162
  parseString(input) {
163
- return this._parseString(input);
163
+ return this.#parseString(input);
164
164
  }
165
- _parseString(input) {
165
+ #parseString(input) {
166
166
  if (!input || typeof input !== "string") {
167
167
  return undefined;
168
168
  }
@@ -171,6 +171,6 @@ export class NamedColorManager {
171
171
  getLogger().error("Color not found", input);
172
172
  return undefined;
173
173
  }
174
- return { ...rgbColor, a: 255 };
174
+ return { ...rgbColor, a: 1 };
175
175
  }
176
176
  }
@@ -0,0 +1,20 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { NamedColorManager } from "./NamedColorManager.js";
3
+ describe("NamedColorManager", () => {
4
+ const manager = new NamedColorManager(), testCases = [
5
+ { name: "red", input: "red", expected: { r: 255, g: 0, b: 0 } },
6
+ { name: "green", input: "lime", expected: { r: 0, g: 255, b: 0 } },
7
+ { name: "blue", input: "blue", expected: { r: 0, g: 0, b: 255 } },
8
+ { name: "yellow", input: "yellow", expected: { r: 255, g: 255, b: 0 } },
9
+ { name: "cyan", input: "aqua", expected: { r: 0, g: 255, b: 255 } },
10
+ { name: "magenta", input: "fuchsia", expected: { r: 255, g: 0, b: 255 } },
11
+ { name: "white", input: "white", expected: { r: 255, g: 255, b: 255 } },
12
+ { name: "black", input: "black", expected: { r: 0, g: 0, b: 0 } },
13
+ ];
14
+ for (const { name, input, expected } of testCases) {
15
+ it(`should convert "${input}" to ${name}`, () => {
16
+ const result = manager.handleColor({ value: input });
17
+ expect(result).toMatchObject(expected);
18
+ });
19
+ }
20
+ });
package/cjs/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NamedColorManager } from "./NamedColorManager.js";
2
2
  export async function loadNamedColorPlugin(engine) {
3
- engine.checkVersion("4.0.5");
3
+ engine.checkVersion("4.1.1");
4
4
  await engine.pluginManager.register(e => {
5
5
  e.pluginManager.addColorManager("named", new NamedColorManager());
6
6
  });
package/cjs/index.lazy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadNamedColorPlugin(engine) {
2
- engine.checkVersion("4.0.5");
2
+ engine.checkVersion("4.1.1");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const { NamedColorManager } = await import("./NamedColorManager.js");
5
5
  e.pluginManager.addColorManager("named", new NamedColorManager());
@@ -154,15 +154,15 @@ export class NamedColorManager {
154
154
  return namedColors.has(input.toLowerCase());
155
155
  }
156
156
  handleColor(color) {
157
- return this._parseString(color.value);
157
+ return this.#parseString(color.value);
158
158
  }
159
159
  handleRangeColor(color) {
160
- return this._parseString(color.value);
160
+ return this.#parseString(color.value);
161
161
  }
162
162
  parseString(input) {
163
- return this._parseString(input);
163
+ return this.#parseString(input);
164
164
  }
165
- _parseString(input) {
165
+ #parseString(input) {
166
166
  if (!input || typeof input !== "string") {
167
167
  return undefined;
168
168
  }
@@ -171,6 +171,6 @@ export class NamedColorManager {
171
171
  getLogger().error("Color not found", input);
172
172
  return undefined;
173
173
  }
174
- return { ...rgbColor, a: 255 };
174
+ return { ...rgbColor, a: 1 };
175
175
  }
176
176
  }
@@ -0,0 +1,20 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { NamedColorManager } from "./NamedColorManager.js";
3
+ describe("NamedColorManager", () => {
4
+ const manager = new NamedColorManager(), testCases = [
5
+ { name: "red", input: "red", expected: { r: 255, g: 0, b: 0 } },
6
+ { name: "green", input: "lime", expected: { r: 0, g: 255, b: 0 } },
7
+ { name: "blue", input: "blue", expected: { r: 0, g: 0, b: 255 } },
8
+ { name: "yellow", input: "yellow", expected: { r: 255, g: 255, b: 0 } },
9
+ { name: "cyan", input: "aqua", expected: { r: 0, g: 255, b: 255 } },
10
+ { name: "magenta", input: "fuchsia", expected: { r: 255, g: 0, b: 255 } },
11
+ { name: "white", input: "white", expected: { r: 255, g: 255, b: 255 } },
12
+ { name: "black", input: "black", expected: { r: 0, g: 0, b: 0 } },
13
+ ];
14
+ for (const { name, input, expected } of testCases) {
15
+ it(`should convert "${input}" to ${name}`, () => {
16
+ const result = manager.handleColor({ value: input });
17
+ expect(result).toMatchObject(expected);
18
+ });
19
+ }
20
+ });
package/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NamedColorManager } from "./NamedColorManager.js";
2
2
  export async function loadNamedColorPlugin(engine) {
3
- engine.checkVersion("4.0.5");
3
+ engine.checkVersion("4.1.1");
4
4
  await engine.pluginManager.register(e => {
5
5
  e.pluginManager.addColorManager("named", new NamedColorManager());
6
6
  });
package/esm/index.lazy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadNamedColorPlugin(engine) {
2
- engine.checkVersion("4.0.5");
2
+ engine.checkVersion("4.1.1");
3
3
  await engine.pluginManager.register(async (e) => {
4
4
  const { NamedColorManager } = await import("./NamedColorManager.js");
5
5
  e.pluginManager.addColorManager("named", new NamedColorManager());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/plugin-named-color",
3
- "version": "4.0.5",
3
+ "version": "4.1.1",
4
4
  "description": "tsParticles named color plugin",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -106,7 +106,7 @@
106
106
  "./package.json": "./package.json"
107
107
  },
108
108
  "peerDependencies": {
109
- "@tsparticles/engine": "4.0.5"
109
+ "@tsparticles/engine": "4.1.1"
110
110
  },
111
111
  "publishConfig": {
112
112
  "access": "public"
package/report.html CHANGED
@@ -4930,7 +4930,7 @@ var drawChart = (function (exports) {
4930
4930
  </script>
4931
4931
  <script>
4932
4932
  /*<!--*/
4933
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.plugin.namedColor.js","children":[{"name":"dist/browser","children":[{"uid":"b9601d2c-1","name":"NamedColorManager.js"},{"uid":"b9601d2c-3","name":"index.js"},{"uid":"b9601d2c-5","name":"browser.js"}]}]}],"isRoot":true},"nodeParts":{"b9601d2c-1":{"renderedLength":8227,"gzipLength":0,"brotliLength":0,"metaUid":"b9601d2c-0"},"b9601d2c-3":{"renderedLength":235,"gzipLength":0,"brotliLength":0,"metaUid":"b9601d2c-2"},"b9601d2c-5":{"renderedLength":183,"gzipLength":0,"brotliLength":0,"metaUid":"b9601d2c-4"}},"nodeMetas":{"b9601d2c-0":{"id":"/dist/browser/NamedColorManager.js","moduleParts":{"tsparticles.plugin.namedColor.js":"b9601d2c-1"},"imported":[{"uid":"b9601d2c-6"}],"importedBy":[{"uid":"b9601d2c-2"}]},"b9601d2c-2":{"id":"/dist/browser/index.js","moduleParts":{"tsparticles.plugin.namedColor.js":"b9601d2c-3"},"imported":[{"uid":"b9601d2c-0"}],"importedBy":[{"uid":"b9601d2c-4"}]},"b9601d2c-4":{"id":"/dist/browser/browser.js","moduleParts":{"tsparticles.plugin.namedColor.js":"b9601d2c-5"},"imported":[{"uid":"b9601d2c-2"}],"importedBy":[],"isEntry":true},"b9601d2c-6":{"id":"@tsparticles/engine","moduleParts":{},"imported":[],"importedBy":[{"uid":"b9601d2c-0"}],"isExternal":true}},"env":{"rollup":"4.60.4"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
4933
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.plugin.namedColor.js","children":[{"name":"dist/browser","children":[{"uid":"3660891c-1","name":"NamedColorManager.js"},{"uid":"3660891c-3","name":"index.js"},{"uid":"3660891c-5","name":"browser.js"}]}]}],"isRoot":true},"nodeParts":{"3660891c-1":{"renderedLength":8225,"gzipLength":0,"brotliLength":0,"metaUid":"3660891c-0"},"3660891c-3":{"renderedLength":235,"gzipLength":0,"brotliLength":0,"metaUid":"3660891c-2"},"3660891c-5":{"renderedLength":183,"gzipLength":0,"brotliLength":0,"metaUid":"3660891c-4"}},"nodeMetas":{"3660891c-0":{"id":"/dist/browser/NamedColorManager.js","moduleParts":{"tsparticles.plugin.namedColor.js":"3660891c-1"},"imported":[{"uid":"3660891c-6"}],"importedBy":[{"uid":"3660891c-2"}]},"3660891c-2":{"id":"/dist/browser/index.js","moduleParts":{"tsparticles.plugin.namedColor.js":"3660891c-3"},"imported":[{"uid":"3660891c-0"}],"importedBy":[{"uid":"3660891c-4"}]},"3660891c-4":{"id":"/dist/browser/browser.js","moduleParts":{"tsparticles.plugin.namedColor.js":"3660891c-5"},"imported":[{"uid":"3660891c-2"}],"importedBy":[],"isEntry":true},"3660891c-6":{"id":"@tsparticles/engine","moduleParts":{},"imported":[],"importedBy":[{"uid":"3660891c-0"}],"isExternal":true}},"env":{"rollup":"4.60.4"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
4934
4934
 
4935
4935
  const run = () => {
4936
4936
  const width = window.innerWidth;
@@ -1,5 +1,5 @@
1
1
  (function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
2
- /* Plugin v4.0.5 */
2
+ /* Plugin v4.1.1 */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/engine')) :
5
5
  typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/engine'], factory) :
@@ -161,15 +161,15 @@
161
161
  return namedColors.has(input.toLowerCase());
162
162
  }
163
163
  handleColor(color) {
164
- return this._parseString(color.value);
164
+ return this.#parseString(color.value);
165
165
  }
166
166
  handleRangeColor(color) {
167
- return this._parseString(color.value);
167
+ return this.#parseString(color.value);
168
168
  }
169
169
  parseString(input) {
170
- return this._parseString(input);
170
+ return this.#parseString(input);
171
171
  }
172
- _parseString(input) {
172
+ #parseString(input) {
173
173
  if (!input || typeof input !== "string") {
174
174
  return undefined;
175
175
  }
@@ -178,12 +178,12 @@
178
178
  engine.getLogger().error("Color not found", input);
179
179
  return undefined;
180
180
  }
181
- return { ...rgbColor, a: 255 };
181
+ return { ...rgbColor, a: 1 };
182
182
  }
183
183
  }
184
184
 
185
185
  async function loadNamedColorPlugin(engine) {
186
- engine.checkVersion("4.0.5");
186
+ engine.checkVersion("4.1.1");
187
187
  await engine.pluginManager.register(e => {
188
188
  e.pluginManager.addColorManager("named", new NamedColorManager());
189
189
  });
@@ -1 +1 @@
1
- !function(r){r.__tsParticlesInternals=r.__tsParticlesInternals||{},r.__tsParticlesInternals.bundles=r.__tsParticlesInternals.bundles||{},r.__tsParticlesInternals.effects=r.__tsParticlesInternals.effects||{},r.__tsParticlesInternals.engine=r.__tsParticlesInternals.engine||{},r.__tsParticlesInternals.interactions=r.__tsParticlesInternals.interactions||{},r.__tsParticlesInternals.palettes=r.__tsParticlesInternals.palettes||{},r.__tsParticlesInternals.paths=r.__tsParticlesInternals.paths||{},r.__tsParticlesInternals.plugins=r.__tsParticlesInternals.plugins||{},r.__tsParticlesInternals.plugins=r.__tsParticlesInternals.plugins||{},r.__tsParticlesInternals.plugins.emittersShapes=r.__tsParticlesInternals.plugins.emittersShapes||{},r.__tsParticlesInternals.presets=r.__tsParticlesInternals.presets||{},r.__tsParticlesInternals.shapes=r.__tsParticlesInternals.shapes||{},r.__tsParticlesInternals.updaters=r.__tsParticlesInternals.updaters||{},r.__tsParticlesInternals.utils=r.__tsParticlesInternals.utils||{},r.__tsParticlesInternals.canvas=r.__tsParticlesInternals.canvas||{},r.__tsParticlesInternals.canvas=r.__tsParticlesInternals.canvas||{},r.__tsParticlesInternals.canvas.utils=r.__tsParticlesInternals.canvas.utils||{},r.__tsParticlesInternals.path=r.__tsParticlesInternals.path||{},r.__tsParticlesInternals.path=r.__tsParticlesInternals.path||{},r.__tsParticlesInternals.path.utils=r.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(r){return new Proxy(r,{get:function(r,e){return e in r||(r[e]={}),r[e]}})}:function(r){return r};r.__tsParticlesInternals.bundles=e(r.__tsParticlesInternals.bundles),r.__tsParticlesInternals.effects=e(r.__tsParticlesInternals.effects),r.__tsParticlesInternals.interactions=e(r.__tsParticlesInternals.interactions),r.__tsParticlesInternals.palettes=e(r.__tsParticlesInternals.palettes),r.__tsParticlesInternals.paths=e(r.__tsParticlesInternals.paths),r.__tsParticlesInternals.plugins=e(r.__tsParticlesInternals.plugins),r.__tsParticlesInternals.plugins.emittersShapes=e(r.__tsParticlesInternals.plugins.emittersShapes),r.__tsParticlesInternals.presets=e(r.__tsParticlesInternals.presets),r.__tsParticlesInternals.shapes=e(r.__tsParticlesInternals.shapes),r.__tsParticlesInternals.updaters=e(r.__tsParticlesInternals.updaters),r.__tsParticlesInternals.utils=e(r.__tsParticlesInternals.utils),r.__tsParticlesInternals.canvas=e(r.__tsParticlesInternals.canvas),r.__tsParticlesInternals.path=e(r.__tsParticlesInternals.path),r.tsparticlesInternalExports=r.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],e):e(((r="undefined"!=typeof globalThis?globalThis:r||self).__tsParticlesInternals=r.__tsParticlesInternals||{},r.__tsParticlesInternals.plugins=r.__tsParticlesInternals.plugins||{},r.__tsParticlesInternals.plugins.namedColor=r.__tsParticlesInternals.plugins.namedColor||{}),r.__tsParticlesInternals.engine)}(this,function(r,e){"use strict";const t=new Map([["aliceblue",{r:240,g:248,b:255}],["antiquewhite",{r:250,g:235,b:215}],["aqua",{r:0,g:255,b:255}],["aquamarine",{r:127,g:255,b:212}],["azure",{r:240,g:255,b:255}],["beige",{r:245,g:245,b:220}],["bisque",{r:255,g:228,b:196}],["black",{r:0,g:0,b:0}],["blanchedalmond",{r:255,g:235,b:205}],["blue",{r:0,g:0,b:255}],["blueviolet",{r:138,g:43,b:226}],["brown",{r:165,g:42,b:42}],["burlywood",{r:222,g:184,b:135}],["cadetblue",{r:95,g:158,b:160}],["chartreuse",{r:127,g:255,b:0}],["chocolate",{r:210,g:105,b:30}],["coral",{r:255,g:127,b:80}],["cornflowerblue",{r:100,g:149,b:237}],["cornsilk",{r:255,g:248,b:220}],["crimson",{r:220,g:20,b:60}],["cyan",{r:0,g:255,b:255}],["darkblue",{r:0,g:0,b:139}],["darkcyan",{r:0,g:139,b:139}],["darkgoldenrod",{r:184,g:134,b:11}],["darkgray",{r:169,g:169,b:169}],["darkgreen",{r:0,g:100,b:0}],["darkgrey",{r:169,g:169,b:169}],["darkkhaki",{r:189,g:183,b:107}],["darkmagenta",{r:139,g:0,b:139}],["darkolivegreen",{r:85,g:107,b:47}],["darkorange",{r:255,g:140,b:0}],["darkorchid",{r:153,g:50,b:204}],["darkred",{r:139,g:0,b:0}],["darksalmon",{r:233,g:150,b:122}],["darkseagreen",{r:143,g:188,b:143}],["darkslateblue",{r:72,g:61,b:139}],["darkslategray",{r:47,g:79,b:79}],["darkslategrey",{r:47,g:79,b:79}],["darkturquoise",{r:0,g:206,b:209}],["darkviolet",{r:148,g:0,b:211}],["deeppink",{r:255,g:20,b:147}],["deepskyblue",{r:0,g:191,b:255}],["dimgray",{r:105,g:105,b:105}],["dimgrey",{r:105,g:105,b:105}],["dodgerblue",{r:30,g:144,b:255}],["firebrick",{r:178,g:34,b:34}],["floralwhite",{r:255,g:250,b:240}],["forestgreen",{r:34,g:139,b:34}],["fuchsia",{r:255,g:0,b:255}],["gainsboro",{r:220,g:220,b:220}],["ghostwhite",{r:248,g:248,b:255}],["gold",{r:255,g:215,b:0}],["goldenrod",{r:218,g:165,b:32}],["gray",{r:128,g:128,b:128}],["green",{r:0,g:128,b:0}],["greenyellow",{r:173,g:255,b:47}],["grey",{r:128,g:128,b:128}],["honeydew",{r:240,g:255,b:240}],["hotpink",{r:255,g:105,b:180}],["indianred",{r:205,g:92,b:92}],["indigo",{r:75,g:0,b:130}],["ivory",{r:255,g:255,b:240}],["khaki",{r:240,g:230,b:140}],["lavender",{r:230,g:230,b:250}],["lavenderblush",{r:255,g:240,b:245}],["lawngreen",{r:124,g:252,b:0}],["lemonchiffon",{r:255,g:250,b:205}],["lightblue",{r:173,g:216,b:230}],["lightcoral",{r:240,g:128,b:128}],["lightcyan",{r:224,g:255,b:255}],["lightgoldenrodyellow",{r:250,g:250,b:210}],["lightgray",{r:211,g:211,b:211}],["lightgreen",{r:144,g:238,b:144}],["lightgrey",{r:211,g:211,b:211}],["lightpink",{r:255,g:182,b:193}],["lightsalmon",{r:255,g:160,b:122}],["lightseagreen",{r:32,g:178,b:170}],["lightskyblue",{r:135,g:206,b:250}],["lightslategray",{r:119,g:136,b:153}],["lightslategrey",{r:119,g:136,b:153}],["lightsteelblue",{r:176,g:196,b:222}],["lightyellow",{r:255,g:255,b:224}],["lime",{r:0,g:255,b:0}],["limegreen",{r:50,g:205,b:50}],["linen",{r:250,g:240,b:230}],["magenta",{r:255,g:0,b:255}],["maroon",{r:128,g:0,b:0}],["mediumaquamarine",{r:102,g:205,b:170}],["mediumblue",{r:0,g:0,b:205}],["mediumorchid",{r:186,g:85,b:211}],["mediumpurple",{r:147,g:112,b:219}],["mediumseagreen",{r:60,g:179,b:113}],["mediumslateblue",{r:123,g:104,b:238}],["mediumspringgreen",{r:0,g:250,b:154}],["mediumturquoise",{r:72,g:209,b:204}],["mediumvioletred",{r:199,g:21,b:133}],["midnightblue",{r:25,g:25,b:112}],["mintcream",{r:245,g:255,b:250}],["mistyrose",{r:255,g:228,b:225}],["moccasin",{r:255,g:228,b:181}],["navajowhite",{r:255,g:222,b:173}],["navy",{r:0,g:0,b:128}],["oldlace",{r:253,g:245,b:230}],["olive",{r:128,g:128,b:0}],["olivedrab",{r:107,g:142,b:35}],["orange",{r:255,g:165,b:0}],["orangered",{r:255,g:69,b:0}],["orchid",{r:218,g:112,b:214}],["palegoldenrod",{r:238,g:232,b:170}],["palegreen",{r:152,g:251,b:152}],["paleturquoise",{r:175,g:238,b:238}],["palevioletred",{r:219,g:112,b:147}],["papayawhip",{r:255,g:239,b:213}],["peachpuff",{r:255,g:218,b:185}],["peru",{r:205,g:133,b:63}],["pink",{r:255,g:192,b:203}],["plum",{r:221,g:160,b:221}],["powderblue",{r:176,g:224,b:230}],["purple",{r:128,g:0,b:128}],["rebeccapurple",{r:102,g:51,b:153}],["red",{r:255,g:0,b:0}],["rosybrown",{r:188,g:143,b:143}],["royalblue",{r:65,g:105,b:225}],["saddlebrown",{r:139,g:69,b:19}],["salmon",{r:250,g:128,b:114}],["sandybrown",{r:244,g:164,b:96}],["seagreen",{r:46,g:139,b:87}],["seashell",{r:255,g:245,b:238}],["sienna",{r:160,g:82,b:45}],["silver",{r:192,g:192,b:192}],["skyblue",{r:135,g:206,b:235}],["slateblue",{r:106,g:90,b:205}],["slategray",{r:112,g:128,b:144}],["slategrey",{r:112,g:128,b:144}],["snow",{r:255,g:250,b:250}],["springgreen",{r:0,g:255,b:127}],["steelblue",{r:70,g:130,b:180}],["tan",{r:210,g:180,b:140}],["teal",{r:0,g:128,b:128}],["thistle",{r:216,g:191,b:216}],["tomato",{r:255,g:99,b:71}],["turquoise",{r:64,g:224,b:208}],["violet",{r:238,g:130,b:238}],["wheat",{r:245,g:222,b:179}],["white",{r:255,g:255,b:255}],["whitesmoke",{r:245,g:245,b:245}],["yellow",{r:255,g:255,b:0}],["yellowgreen",{r:154,g:205,b:50}]]);class s{accepts(r){return t.has(r.toLowerCase())}handleColor(r){return this._parseString(r.value)}handleRangeColor(r){return this._parseString(r.value)}parseString(r){return this._parseString(r)}_parseString(r){if(!r||"string"!=typeof r)return;const s=t.get(r.toLowerCase());if(s)return{...s,a:255};e.getLogger().error("Color not found",r)}}async function a(r){r.checkVersion("4.0.5"),await r.pluginManager.register(r=>{r.pluginManager.addColorManager("named",new s)})}const n=globalThis;n.__tsParticlesInternals=n.__tsParticlesInternals??{},n.loadNamedColorPlugin=a,r.loadNamedColorPlugin=a}),Object.assign(globalThis.window||globalThis,{loadNamedColorPlugin:(globalThis.__tsParticlesInternals.plugins.namedColor||{}).loadNamedColorPlugin}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
1
+ !function(r){r.__tsParticlesInternals=r.__tsParticlesInternals||{},r.__tsParticlesInternals.bundles=r.__tsParticlesInternals.bundles||{},r.__tsParticlesInternals.effects=r.__tsParticlesInternals.effects||{},r.__tsParticlesInternals.engine=r.__tsParticlesInternals.engine||{},r.__tsParticlesInternals.interactions=r.__tsParticlesInternals.interactions||{},r.__tsParticlesInternals.palettes=r.__tsParticlesInternals.palettes||{},r.__tsParticlesInternals.paths=r.__tsParticlesInternals.paths||{},r.__tsParticlesInternals.plugins=r.__tsParticlesInternals.plugins||{},r.__tsParticlesInternals.plugins=r.__tsParticlesInternals.plugins||{},r.__tsParticlesInternals.plugins.emittersShapes=r.__tsParticlesInternals.plugins.emittersShapes||{},r.__tsParticlesInternals.presets=r.__tsParticlesInternals.presets||{},r.__tsParticlesInternals.shapes=r.__tsParticlesInternals.shapes||{},r.__tsParticlesInternals.updaters=r.__tsParticlesInternals.updaters||{},r.__tsParticlesInternals.utils=r.__tsParticlesInternals.utils||{},r.__tsParticlesInternals.canvas=r.__tsParticlesInternals.canvas||{},r.__tsParticlesInternals.canvas=r.__tsParticlesInternals.canvas||{},r.__tsParticlesInternals.canvas.utils=r.__tsParticlesInternals.canvas.utils||{},r.__tsParticlesInternals.path=r.__tsParticlesInternals.path||{},r.__tsParticlesInternals.path=r.__tsParticlesInternals.path||{},r.__tsParticlesInternals.path.utils=r.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(r){return new Proxy(r,{get:function(r,e){return e in r||(r[e]={}),r[e]}})}:function(r){return r};r.__tsParticlesInternals.bundles=e(r.__tsParticlesInternals.bundles),r.__tsParticlesInternals.effects=e(r.__tsParticlesInternals.effects),r.__tsParticlesInternals.interactions=e(r.__tsParticlesInternals.interactions),r.__tsParticlesInternals.palettes=e(r.__tsParticlesInternals.palettes),r.__tsParticlesInternals.paths=e(r.__tsParticlesInternals.paths),r.__tsParticlesInternals.plugins=e(r.__tsParticlesInternals.plugins),r.__tsParticlesInternals.plugins.emittersShapes=e(r.__tsParticlesInternals.plugins.emittersShapes),r.__tsParticlesInternals.presets=e(r.__tsParticlesInternals.presets),r.__tsParticlesInternals.shapes=e(r.__tsParticlesInternals.shapes),r.__tsParticlesInternals.updaters=e(r.__tsParticlesInternals.updaters),r.__tsParticlesInternals.utils=e(r.__tsParticlesInternals.utils),r.__tsParticlesInternals.canvas=e(r.__tsParticlesInternals.canvas),r.__tsParticlesInternals.path=e(r.__tsParticlesInternals.path),r.tsparticlesInternalExports=r.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],e):e(((r="undefined"!=typeof globalThis?globalThis:r||self).__tsParticlesInternals=r.__tsParticlesInternals||{},r.__tsParticlesInternals.plugins=r.__tsParticlesInternals.plugins||{},r.__tsParticlesInternals.plugins.namedColor=r.__tsParticlesInternals.plugins.namedColor||{}),r.__tsParticlesInternals.engine)}(this,function(r,e){"use strict";const t=new Map([["aliceblue",{r:240,g:248,b:255}],["antiquewhite",{r:250,g:235,b:215}],["aqua",{r:0,g:255,b:255}],["aquamarine",{r:127,g:255,b:212}],["azure",{r:240,g:255,b:255}],["beige",{r:245,g:245,b:220}],["bisque",{r:255,g:228,b:196}],["black",{r:0,g:0,b:0}],["blanchedalmond",{r:255,g:235,b:205}],["blue",{r:0,g:0,b:255}],["blueviolet",{r:138,g:43,b:226}],["brown",{r:165,g:42,b:42}],["burlywood",{r:222,g:184,b:135}],["cadetblue",{r:95,g:158,b:160}],["chartreuse",{r:127,g:255,b:0}],["chocolate",{r:210,g:105,b:30}],["coral",{r:255,g:127,b:80}],["cornflowerblue",{r:100,g:149,b:237}],["cornsilk",{r:255,g:248,b:220}],["crimson",{r:220,g:20,b:60}],["cyan",{r:0,g:255,b:255}],["darkblue",{r:0,g:0,b:139}],["darkcyan",{r:0,g:139,b:139}],["darkgoldenrod",{r:184,g:134,b:11}],["darkgray",{r:169,g:169,b:169}],["darkgreen",{r:0,g:100,b:0}],["darkgrey",{r:169,g:169,b:169}],["darkkhaki",{r:189,g:183,b:107}],["darkmagenta",{r:139,g:0,b:139}],["darkolivegreen",{r:85,g:107,b:47}],["darkorange",{r:255,g:140,b:0}],["darkorchid",{r:153,g:50,b:204}],["darkred",{r:139,g:0,b:0}],["darksalmon",{r:233,g:150,b:122}],["darkseagreen",{r:143,g:188,b:143}],["darkslateblue",{r:72,g:61,b:139}],["darkslategray",{r:47,g:79,b:79}],["darkslategrey",{r:47,g:79,b:79}],["darkturquoise",{r:0,g:206,b:209}],["darkviolet",{r:148,g:0,b:211}],["deeppink",{r:255,g:20,b:147}],["deepskyblue",{r:0,g:191,b:255}],["dimgray",{r:105,g:105,b:105}],["dimgrey",{r:105,g:105,b:105}],["dodgerblue",{r:30,g:144,b:255}],["firebrick",{r:178,g:34,b:34}],["floralwhite",{r:255,g:250,b:240}],["forestgreen",{r:34,g:139,b:34}],["fuchsia",{r:255,g:0,b:255}],["gainsboro",{r:220,g:220,b:220}],["ghostwhite",{r:248,g:248,b:255}],["gold",{r:255,g:215,b:0}],["goldenrod",{r:218,g:165,b:32}],["gray",{r:128,g:128,b:128}],["green",{r:0,g:128,b:0}],["greenyellow",{r:173,g:255,b:47}],["grey",{r:128,g:128,b:128}],["honeydew",{r:240,g:255,b:240}],["hotpink",{r:255,g:105,b:180}],["indianred",{r:205,g:92,b:92}],["indigo",{r:75,g:0,b:130}],["ivory",{r:255,g:255,b:240}],["khaki",{r:240,g:230,b:140}],["lavender",{r:230,g:230,b:250}],["lavenderblush",{r:255,g:240,b:245}],["lawngreen",{r:124,g:252,b:0}],["lemonchiffon",{r:255,g:250,b:205}],["lightblue",{r:173,g:216,b:230}],["lightcoral",{r:240,g:128,b:128}],["lightcyan",{r:224,g:255,b:255}],["lightgoldenrodyellow",{r:250,g:250,b:210}],["lightgray",{r:211,g:211,b:211}],["lightgreen",{r:144,g:238,b:144}],["lightgrey",{r:211,g:211,b:211}],["lightpink",{r:255,g:182,b:193}],["lightsalmon",{r:255,g:160,b:122}],["lightseagreen",{r:32,g:178,b:170}],["lightskyblue",{r:135,g:206,b:250}],["lightslategray",{r:119,g:136,b:153}],["lightslategrey",{r:119,g:136,b:153}],["lightsteelblue",{r:176,g:196,b:222}],["lightyellow",{r:255,g:255,b:224}],["lime",{r:0,g:255,b:0}],["limegreen",{r:50,g:205,b:50}],["linen",{r:250,g:240,b:230}],["magenta",{r:255,g:0,b:255}],["maroon",{r:128,g:0,b:0}],["mediumaquamarine",{r:102,g:205,b:170}],["mediumblue",{r:0,g:0,b:205}],["mediumorchid",{r:186,g:85,b:211}],["mediumpurple",{r:147,g:112,b:219}],["mediumseagreen",{r:60,g:179,b:113}],["mediumslateblue",{r:123,g:104,b:238}],["mediumspringgreen",{r:0,g:250,b:154}],["mediumturquoise",{r:72,g:209,b:204}],["mediumvioletred",{r:199,g:21,b:133}],["midnightblue",{r:25,g:25,b:112}],["mintcream",{r:245,g:255,b:250}],["mistyrose",{r:255,g:228,b:225}],["moccasin",{r:255,g:228,b:181}],["navajowhite",{r:255,g:222,b:173}],["navy",{r:0,g:0,b:128}],["oldlace",{r:253,g:245,b:230}],["olive",{r:128,g:128,b:0}],["olivedrab",{r:107,g:142,b:35}],["orange",{r:255,g:165,b:0}],["orangered",{r:255,g:69,b:0}],["orchid",{r:218,g:112,b:214}],["palegoldenrod",{r:238,g:232,b:170}],["palegreen",{r:152,g:251,b:152}],["paleturquoise",{r:175,g:238,b:238}],["palevioletred",{r:219,g:112,b:147}],["papayawhip",{r:255,g:239,b:213}],["peachpuff",{r:255,g:218,b:185}],["peru",{r:205,g:133,b:63}],["pink",{r:255,g:192,b:203}],["plum",{r:221,g:160,b:221}],["powderblue",{r:176,g:224,b:230}],["purple",{r:128,g:0,b:128}],["rebeccapurple",{r:102,g:51,b:153}],["red",{r:255,g:0,b:0}],["rosybrown",{r:188,g:143,b:143}],["royalblue",{r:65,g:105,b:225}],["saddlebrown",{r:139,g:69,b:19}],["salmon",{r:250,g:128,b:114}],["sandybrown",{r:244,g:164,b:96}],["seagreen",{r:46,g:139,b:87}],["seashell",{r:255,g:245,b:238}],["sienna",{r:160,g:82,b:45}],["silver",{r:192,g:192,b:192}],["skyblue",{r:135,g:206,b:235}],["slateblue",{r:106,g:90,b:205}],["slategray",{r:112,g:128,b:144}],["slategrey",{r:112,g:128,b:144}],["snow",{r:255,g:250,b:250}],["springgreen",{r:0,g:255,b:127}],["steelblue",{r:70,g:130,b:180}],["tan",{r:210,g:180,b:140}],["teal",{r:0,g:128,b:128}],["thistle",{r:216,g:191,b:216}],["tomato",{r:255,g:99,b:71}],["turquoise",{r:64,g:224,b:208}],["violet",{r:238,g:130,b:238}],["wheat",{r:245,g:222,b:179}],["white",{r:255,g:255,b:255}],["whitesmoke",{r:245,g:245,b:245}],["yellow",{r:255,g:255,b:0}],["yellowgreen",{r:154,g:205,b:50}]]);class s{accepts(r){return t.has(r.toLowerCase())}handleColor(r){return this.#r(r.value)}handleRangeColor(r){return this.#r(r.value)}parseString(r){return this.#r(r)}#r(r){if(!r||"string"!=typeof r)return;const s=t.get(r.toLowerCase());if(s)return{...s,a:1};e.getLogger().error("Color not found",r)}}async function a(r){r.checkVersion("4.1.1"),await r.pluginManager.register(r=>{r.pluginManager.addColorManager("named",new s)})}const n=globalThis;n.__tsParticlesInternals=n.__tsParticlesInternals??{},n.loadNamedColorPlugin=a,r.loadNamedColorPlugin=a}),Object.assign(globalThis.window||globalThis,{loadNamedColorPlugin:(globalThis.__tsParticlesInternals.plugins.namedColor||{}).loadNamedColorPlugin}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
@@ -1,8 +1,8 @@
1
1
  import { type IColor, type IColorManager, type IRangeColor, type IRgb, type IRgba } from "@tsparticles/engine";
2
2
  export declare class NamedColorManager implements IColorManager {
3
+ #private;
3
4
  accepts(input: string): boolean;
4
5
  handleColor(color: IColor): IRgb | undefined;
5
6
  handleRangeColor(color: IRangeColor): IRgb | undefined;
6
7
  parseString(input: string): IRgba | undefined;
7
- private _parseString;
8
8
  }
@@ -0,0 +1 @@
1
+ export {};