@tsparticles/plugin-themes 4.0.0-beta.16 → 4.0.0-beta.17
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/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/browser/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThemesPlugin } from "./ThemesPlugin.js";
|
|
2
2
|
export async function loadThemesPlugin(engine) {
|
|
3
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
+
engine.checkVersion("4.0.0-beta.17");
|
|
4
4
|
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addPlugin(new ThemesPlugin());
|
|
6
6
|
});
|
package/browser/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadThemesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
2
|
+
engine.checkVersion("4.0.0-beta.17");
|
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThemesPlugin } from "./ThemesPlugin.js";
|
|
2
2
|
export async function loadThemesPlugin(engine) {
|
|
3
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
+
engine.checkVersion("4.0.0-beta.17");
|
|
4
4
|
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addPlugin(new ThemesPlugin());
|
|
6
6
|
});
|
package/cjs/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadThemesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
2
|
+
engine.checkVersion("4.0.0-beta.17");
|
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThemesPlugin } from "./ThemesPlugin.js";
|
|
2
2
|
export async function loadThemesPlugin(engine) {
|
|
3
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
+
engine.checkVersion("4.0.0-beta.17");
|
|
4
4
|
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addPlugin(new ThemesPlugin());
|
|
6
6
|
});
|
package/esm/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadThemesPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
2
|
+
engine.checkVersion("4.0.0-beta.17");
|
|
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.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.17",
|
|
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.0.0-beta.
|
|
95
|
+
"@tsparticles/engine": "4.0.0-beta.17"
|
|
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.0.0-beta.
|
|
2
|
+
/* Plugin v4.0.0-beta.17 */
|
|
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) :
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
async function loadThemesPlugin(engine) {
|
|
124
|
-
engine.checkVersion("4.0.0-beta.
|
|
124
|
+
engine.checkVersion("4.0.0-beta.17");
|
|
125
125
|
await engine.pluginManager.register(e => {
|
|
126
126
|
e.pluginManager.addPlugin(new ThemesPlugin());
|
|
127
127
|
});
|
|
@@ -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;mode;value;constructor(){this.auto=!1,this.mode=s.any,this.value=!1}load(e){t.isNull(e)||(void 0!==e.auto&&(this.auto=e.auto),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.value&&(this.value=e.value))}}class a{default;name;options;constructor(){this.name="",this.default=new n}load(e){t.isNull(e)||(void 0!==e.name&&(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.0.0-beta.
|
|
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;mode;value;constructor(){this.auto=!1,this.mode=s.any,this.value=!1}load(e){t.isNull(e)||(void 0!==e.auto&&(this.auto=e.auto),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.value&&(this.value=e.value))}}class a{default;name;options;constructor(){this.name="",this.default=new n}load(e){t.isNull(e)||(void 0!==e.name&&(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.0.0-beta.17"),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{_container;constructor(e){this._container=e}init(){const e=this._container;e.themeMatchMedia=t.safeMatchMedia("(prefers-color-scheme: dark)");return e.themeHandlers={themeChange:e=>{this._handleThemeChange(e)},oldThemeChange:e=>{this._handleThemeChange(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._container;t.manageMediaMatch?.(e)}async start(){return this.manageListeners(!0),Promise.resolve()}stop(){this.manageListeners(!1)}updateActualOptions(){const e=this._container;return e.actualOptions.setTheme?.(e.currentTheme),!1}_handleThemeChange=e=>{const t=e,s=this._container,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;
|