@tsparticles/plugin-themes 4.3.0 → 4.3.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.
- package/README.md +1 -3
- package/browser/index.js +1 -1
- package/browser/index.lazy.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.lazy.js +1 -1
- package/esm/index.js +1 -1
- package/esm/index.lazy.js +1 -1
- package/package.json +2 -2
- package/tsparticles.plugin.themes.js +2 -2
- package/tsparticles.plugin.themes.min.js +1 -1
package/README.md
CHANGED
package/browser/index.js
CHANGED
package/browser/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadThemesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.3.
|
|
2
|
+
engine.checkVersion("4.3.1");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ThemesPlugin } = await import("./ThemesPlugin.js");
|
|
5
5
|
e.pluginManager.addPlugin(new ThemesPlugin());
|
package/cjs/index.js
CHANGED
package/cjs/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadThemesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.3.
|
|
2
|
+
engine.checkVersion("4.3.1");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ThemesPlugin } = await import("./ThemesPlugin.js");
|
|
5
5
|
e.pluginManager.addPlugin(new ThemesPlugin());
|
package/esm/index.js
CHANGED
package/esm/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadThemesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.3.
|
|
2
|
+
engine.checkVersion("4.3.1");
|
|
3
3
|
await engine.pluginManager.register(async (e) => {
|
|
4
4
|
const { ThemesPlugin } = await import("./ThemesPlugin.js");
|
|
5
5
|
e.pluginManager.addPlugin(new ThemesPlugin());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-themes",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "tsParticles themes plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"./package.json": "./package.json"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@tsparticles/engine": "4.3.
|
|
95
|
+
"@tsparticles/engine": "4.3.1"
|
|
96
96
|
},
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public"
|
|
@@ -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.3.
|
|
2
|
+
/* Plugin v4.3.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) :
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
async function loadThemesPlugin(engine) {
|
|
107
|
-
engine.checkVersion("4.3.
|
|
107
|
+
engine.checkVersion("4.3.1");
|
|
108
108
|
await engine.pluginManager.register(e => {
|
|
109
109
|
e.pluginManager.addPlugin(new ThemesPlugin());
|
|
110
110
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){e.__tsParticlesInternals=e.__tsParticlesInternals||{},e.__tsParticlesInternals.bundles=e.__tsParticlesInternals.bundles||{},e.__tsParticlesInternals.effects=e.__tsParticlesInternals.effects||{},e.__tsParticlesInternals.engine=e.__tsParticlesInternals.engine||{},e.__tsParticlesInternals.interactions=e.__tsParticlesInternals.interactions||{},e.__tsParticlesInternals.palettes=e.__tsParticlesInternals.palettes||{},e.__tsParticlesInternals.paths=e.__tsParticlesInternals.paths||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins.emittersShapes=e.__tsParticlesInternals.plugins.emittersShapes||{},e.__tsParticlesInternals.presets=e.__tsParticlesInternals.presets||{},e.__tsParticlesInternals.shapes=e.__tsParticlesInternals.shapes||{},e.__tsParticlesInternals.updaters=e.__tsParticlesInternals.updaters||{},e.__tsParticlesInternals.utils=e.__tsParticlesInternals.utils||{},e.__tsParticlesInternals.canvas=e.__tsParticlesInternals.canvas||{},e.__tsParticlesInternals.canvas=e.__tsParticlesInternals.canvas||{},e.__tsParticlesInternals.canvas.utils=e.__tsParticlesInternals.canvas.utils||{},e.__tsParticlesInternals.path=e.__tsParticlesInternals.path||{},e.__tsParticlesInternals.path=e.__tsParticlesInternals.path||{},e.__tsParticlesInternals.path.utils=e.__tsParticlesInternals.path.utils||{};var t="undefined"!=typeof Proxy?function(e){return new Proxy(e,{get:function(e,t){return t in e||(e[t]={}),e[t]}})}:function(e){return e};e.__tsParticlesInternals.bundles=t(e.__tsParticlesInternals.bundles),e.__tsParticlesInternals.effects=t(e.__tsParticlesInternals.effects),e.__tsParticlesInternals.interactions=t(e.__tsParticlesInternals.interactions),e.__tsParticlesInternals.palettes=t(e.__tsParticlesInternals.palettes),e.__tsParticlesInternals.paths=t(e.__tsParticlesInternals.paths),e.__tsParticlesInternals.plugins=t(e.__tsParticlesInternals.plugins),e.__tsParticlesInternals.plugins.emittersShapes=t(e.__tsParticlesInternals.plugins.emittersShapes),e.__tsParticlesInternals.presets=t(e.__tsParticlesInternals.presets),e.__tsParticlesInternals.shapes=t(e.__tsParticlesInternals.shapes),e.__tsParticlesInternals.updaters=t(e.__tsParticlesInternals.updaters),e.__tsParticlesInternals.utils=t(e.__tsParticlesInternals.utils),e.__tsParticlesInternals.canvas=t(e.__tsParticlesInternals.canvas),e.__tsParticlesInternals.path=t(e.__tsParticlesInternals.path),e.tsparticlesInternalExports=e.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).__tsParticlesInternals=e.__tsParticlesInternals||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins.themes=e.__tsParticlesInternals.plugins.themes||{}),e.__tsParticlesInternals.engine)}(this,function(e,t){"use strict";var s;!function(e){e.any="any",e.dark="dark",e.light="light"}(s||(s={}));class n{auto=!1;mode=s.any;value=!1;load(e){t.isNull(e)||(t.loadProperty(this,"auto",e.auto),t.loadProperty(this,"mode",e.mode),t.loadProperty(this,"value",e.value))}}class a{default=new n;name="";options;load(e){t.isNull(e)||(t.loadProperty(this,"name",e.name),this.default.load(e.default),void 0!==e.options&&(this.options=t.deepExtend({},e.options)))}}class l{id="theme";async getPlugin(e){const{ThemesPluginInstance:t}=await Promise.resolve().then(function(){return c});return new t(e)}loadOptions(e,n,l){if(!this.needsPlugin(n)&&!this.needsPlugin(l))return;const r=e=>{if(n.themes)return n.themes.find(t=>t.default.value&&t.default.mode===e)??n.themes.find(e=>e.default.value&&e.default.mode===s.any)};if(n.findDefaultTheme=r,n.setTheme=e=>{if(n.themes)if(e){const t=n.themes.find(t=>t.name===e);t&&n.load(t.options)}else{const e=t.safeMatchMedia("(prefers-color-scheme: dark)"),a=e?.matches,l=r(a?s.dark:s.light);l&&n.load(l.options)}},n.themes??=[],void 0!==l?.themes)for(const e of l.themes){if(!e)continue;const t=n.themes.find(t=>t.name===e.name);if(t)t.load(e);else{const t=new a;t.load(e),n.themes.push(t)}}n.defaultThemes.dark=r(s.dark)?.name,n.defaultThemes.light=r(s.light)?.name}needsPlugin(e){return!!e?.themes?.length}}async function r(e){e.checkVersion("4.3.
|
|
1
|
+
!function(e){e.__tsParticlesInternals=e.__tsParticlesInternals||{},e.__tsParticlesInternals.bundles=e.__tsParticlesInternals.bundles||{},e.__tsParticlesInternals.effects=e.__tsParticlesInternals.effects||{},e.__tsParticlesInternals.engine=e.__tsParticlesInternals.engine||{},e.__tsParticlesInternals.interactions=e.__tsParticlesInternals.interactions||{},e.__tsParticlesInternals.palettes=e.__tsParticlesInternals.palettes||{},e.__tsParticlesInternals.paths=e.__tsParticlesInternals.paths||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins.emittersShapes=e.__tsParticlesInternals.plugins.emittersShapes||{},e.__tsParticlesInternals.presets=e.__tsParticlesInternals.presets||{},e.__tsParticlesInternals.shapes=e.__tsParticlesInternals.shapes||{},e.__tsParticlesInternals.updaters=e.__tsParticlesInternals.updaters||{},e.__tsParticlesInternals.utils=e.__tsParticlesInternals.utils||{},e.__tsParticlesInternals.canvas=e.__tsParticlesInternals.canvas||{},e.__tsParticlesInternals.canvas=e.__tsParticlesInternals.canvas||{},e.__tsParticlesInternals.canvas.utils=e.__tsParticlesInternals.canvas.utils||{},e.__tsParticlesInternals.path=e.__tsParticlesInternals.path||{},e.__tsParticlesInternals.path=e.__tsParticlesInternals.path||{},e.__tsParticlesInternals.path.utils=e.__tsParticlesInternals.path.utils||{};var t="undefined"!=typeof Proxy?function(e){return new Proxy(e,{get:function(e,t){return t in e||(e[t]={}),e[t]}})}:function(e){return e};e.__tsParticlesInternals.bundles=t(e.__tsParticlesInternals.bundles),e.__tsParticlesInternals.effects=t(e.__tsParticlesInternals.effects),e.__tsParticlesInternals.interactions=t(e.__tsParticlesInternals.interactions),e.__tsParticlesInternals.palettes=t(e.__tsParticlesInternals.palettes),e.__tsParticlesInternals.paths=t(e.__tsParticlesInternals.paths),e.__tsParticlesInternals.plugins=t(e.__tsParticlesInternals.plugins),e.__tsParticlesInternals.plugins.emittersShapes=t(e.__tsParticlesInternals.plugins.emittersShapes),e.__tsParticlesInternals.presets=t(e.__tsParticlesInternals.presets),e.__tsParticlesInternals.shapes=t(e.__tsParticlesInternals.shapes),e.__tsParticlesInternals.updaters=t(e.__tsParticlesInternals.updaters),e.__tsParticlesInternals.utils=t(e.__tsParticlesInternals.utils),e.__tsParticlesInternals.canvas=t(e.__tsParticlesInternals.canvas),e.__tsParticlesInternals.path=t(e.__tsParticlesInternals.path),e.tsparticlesInternalExports=e.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).__tsParticlesInternals=e.__tsParticlesInternals||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins.themes=e.__tsParticlesInternals.plugins.themes||{}),e.__tsParticlesInternals.engine)}(this,function(e,t){"use strict";var s;!function(e){e.any="any",e.dark="dark",e.light="light"}(s||(s={}));class n{auto=!1;mode=s.any;value=!1;load(e){t.isNull(e)||(t.loadProperty(this,"auto",e.auto),t.loadProperty(this,"mode",e.mode),t.loadProperty(this,"value",e.value))}}class a{default=new n;name="";options;load(e){t.isNull(e)||(t.loadProperty(this,"name",e.name),this.default.load(e.default),void 0!==e.options&&(this.options=t.deepExtend({},e.options)))}}class l{id="theme";async getPlugin(e){const{ThemesPluginInstance:t}=await Promise.resolve().then(function(){return c});return new t(e)}loadOptions(e,n,l){if(!this.needsPlugin(n)&&!this.needsPlugin(l))return;const r=e=>{if(n.themes)return n.themes.find(t=>t.default.value&&t.default.mode===e)??n.themes.find(e=>e.default.value&&e.default.mode===s.any)};if(n.findDefaultTheme=r,n.setTheme=e=>{if(n.themes)if(e){const t=n.themes.find(t=>t.name===e);t&&n.load(t.options)}else{const e=t.safeMatchMedia("(prefers-color-scheme: dark)"),a=e?.matches,l=r(a?s.dark:s.light);l&&n.load(l.options)}},n.themes??=[],void 0!==l?.themes)for(const e of l.themes){if(!e)continue;const t=n.themes.find(t=>t.name===e.name);if(t)t.load(e);else{const t=new a;t.load(e),n.themes.push(t)}}n.defaultThemes.dark=r(s.dark)?.name,n.defaultThemes.light=r(s.light)?.name}needsPlugin(e){return!!e?.themes?.length}}async function r(e){e.checkVersion("4.3.1"),await e.pluginManager.register(e=>{e.pluginManager.addPlugin(new l)})}const i=globalThis;i.__tsParticlesInternals=i.__tsParticlesInternals??{},i.loadThemesPlugin=r;var c=Object.freeze({__proto__:null,ThemesPluginInstance:class{#e;constructor(e){this.#e=e}init(){const e=this.#e;e.themeMatchMedia=t.safeMatchMedia("(prefers-color-scheme: dark)");return e.themeHandlers={themeChange:e=>{this.#t(e)},oldThemeChange:e=>{this.#t(e)}},e.manageMediaMatch=s=>{const n=e.themeHandlers;n&&e.themeMatchMedia&&t.manageListener(e.themeMatchMedia,"change",n.themeChange,s)},e.loadTheme=async t=>{e.destroyed||(e.currentTheme=t,await e.refresh())},Promise.resolve()}manageListeners(e){const t=this.#e;t.manageMediaMatch?.(e)}async start(){return this.manageListeners(!0),Promise.resolve()}stop(){this.manageListeners(!1)}updateActualOptions(){const e=this.#e;return e.actualOptions.setTheme?.(e.currentTheme),!1}#t(e){const t=e,s=this.#e,n=s.options,a=n.defaultThemes,l=t.matches?a.dark:a.light,r=n.themes?.find(e=>e.name===l);r?.default.auto&&s.loadTheme?.(l)}}});e.loadThemesPlugin=r}),Object.assign(globalThis.window||globalThis,{loadThemesPlugin:(globalThis.__tsParticlesInternals.plugins.themes||{}).loadThemesPlugin}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|