From 58529bed979d6c9b917d8eed52ad72fbd2cf33d4 Mon Sep 17 00:00:00 2001
From: chenchen <2782712869@qq.com>
Date: Tue, 25 Feb 2025 11:31:55 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E7=AC=AC=E4=B8=80=E7=89=88=E4=B8=BB?=
=?UTF-8?q?=E9=A2=98=E7=AE=A1=E7=90=86=E6=8F=92=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 1 +
README.md | 269 +++++++
dist/index.d.ts | 2 +
dist/theme.d.ts | 13 +
dist/themeManager.cjs.js | 2 +
dist/themeManager.cjs.js.map | 1 +
dist/themeManager.d.ts | 3 +
dist/themeManager.js | 2 +
dist/themeManager.js.map | 1 +
dist/themeManager.umd.js | 2 +
dist/themeManager.umd.js.map | 1 +
dist/utils.d.ts | 1 +
examples/index.html | 177 +++++
examples/themes.json | 26 +
package-lock.json | 1444 ++++++++++++++++++++++++++++++++++
package.json | 23 +
rollup.config.js | 41 +
src/index.ts | 3 +
src/theme.ts | 13 +
src/themeManager.ts | 122 +++
src/utils.ts | 14 +
tsconfig.json | 22 +
22 files changed, 2183 insertions(+)
create mode 100644 .gitignore
create mode 100644 README.md
create mode 100644 dist/index.d.ts
create mode 100644 dist/theme.d.ts
create mode 100644 dist/themeManager.cjs.js
create mode 100644 dist/themeManager.cjs.js.map
create mode 100644 dist/themeManager.d.ts
create mode 100644 dist/themeManager.js
create mode 100644 dist/themeManager.js.map
create mode 100644 dist/themeManager.umd.js
create mode 100644 dist/themeManager.umd.js.map
create mode 100644 dist/utils.d.ts
create mode 100644 examples/index.html
create mode 100644 examples/themes.json
create mode 100644 package-lock.json
create mode 100644 package.json
create mode 100644 rollup.config.js
create mode 100644 src/index.ts
create mode 100644 src/theme.ts
create mode 100644 src/themeManager.ts
create mode 100644 src/utils.ts
create mode 100644 tsconfig.json
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..40b878d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+node_modules/
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7f0f9d7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,269 @@
+# 主题管理插件
+
+这是一个简单的主题管理插件,允许用户在浅色模式、深色模式及自定义主题之间切换,并实时调整主题的 CSS 变量。该插件通过加载 JSON 配置文件来管理不同的主题样式,并提供了便捷的界面让用户动态更改颜色。
+
+## 特性
+
+- **主题切换**:支持切换不同的预设主题(如浅色、深色),也可以通过json自定义主题。
+- **自定义主题**:用户可以通过界面实时修改主题的各种颜色(如背景色、文字色、主色、成功色、警告色等)。
+- **CSS 变量支持**:所有主题样式通过 CSS 变量管理,支持动态修改。
+- **易于集成**:插件通过 JavaScript 模块进行集成,方便与其他项目配合使用。
+
+## 安装
+
+### 1. 引入插件
+
+npm下载**themeManager**:
+```bash
+npm i theme-switcher-manager
+```
+
+```js
+
+```
+
+#### demo
+
+```html
+
+
+
+
+
+
+ 主题管理
+
+
+
+
+
+ 🎨 主题管理
+
+
+
+
+
+
+
+
+ 调整主题变量
+
+
+
+
当前主题
+
当前主题:loading...
+
+
+
+
+```
+
+### 2. 配置 themes.json 文件
+在你的项目中创建 themes.json 文件,用于存储预设主题的配置,格式如下:
+
+```json
+{
+ "light": {
+ "--background-color": "#ffffff",
+ "--text-color": "#333333",
+ "--primary-color": "#007bff",
+ "--secondary-color": "#6c757d",
+ "--border-color": "#dddddd",
+ "--accent-color": "#ff6600",
+ "--success-color": "#28a745",
+ "--warning-color": "#ffc107",
+ "--error-color": "#dc3545",
+ "--shadow-color": "rgba(0, 0, 0, 0.1)"
+ },
+ "dark": {
+ "--background-color": "#121212",
+ "--text-color": "#ffffff",
+ "--primary-color": "#bb86fc",
+ "--secondary-color": "#03dac6",
+ "--border-color": "#333333",
+ "--accent-color": "#ff4081",
+ "--success-color": "#4caf50",
+ "--warning-color": "#ffeb3b",
+ "--error-color": "#f44336",
+ "--shadow-color": "rgba(0, 0, 0, 0.7)"
+ }
+}
+```
+
+将 themes.json 文件放置在合适的路径下并在 JavaScript 中加载:
+
+```js
+loadThemesFromJSON('./themes.json');
+```
+
+### API 说明
+#### loadThemesFromJSON(url)
+ 描述:加载远程或本地的 JSON 配置文件,用于设置主题。
+ 参数:url(string):主题配置 JSON 文件的路径。
+ 返回:无
+
+#### switchTheme(theme)
+ 描述:切换到指定的主题。
+ 参数:theme(string):主题名称(例如:'light', 'dark', 'blue' 等)。
+ 返回:无
+
+#### setThemeVariable(variable, value)
+ 描述:动态设置指定 CSS 变量的值。
+ 参数:
+ variable(string):CSS 变量名(例如:--primary-color)。
+ value(string):新的 CSS 变量值(例如:#ff6600)。
+ 返回:无
+
+#### onThemeChange(callback)
+ 描述:监听主题变化事件。
+ 参数:
+ callback(function):主题变化时触发的回调函数,接收新的主题名称作为参数。
+ 返回:无
diff --git a/dist/index.d.ts b/dist/index.d.ts
new file mode 100644
index 0000000..73777e8
--- /dev/null
+++ b/dist/index.d.ts
@@ -0,0 +1,2 @@
+import useThemeManager from './themeManager';
+export default useThemeManager;
diff --git a/dist/theme.d.ts b/dist/theme.d.ts
new file mode 100644
index 0000000..82dfd1d
--- /dev/null
+++ b/dist/theme.d.ts
@@ -0,0 +1,13 @@
+export type Theme = Record;
+export type Themes = Record;
+export interface ThemeManager {
+ themes: Record>;
+ currentTheme: string;
+ eventListeners: Array<(theme: string) => void>;
+ loadThemesFromJSON: (url: string) => Promise;
+ switchTheme: (themeName: string) => void;
+ onThemeChange: (callback: (theme: string) => void) => void;
+ setThemeVariable: (variable: string, value: string) => void;
+ addThemeVariable: (themeName: string, variable: string, value: string) => void;
+ applyTheme: () => void;
+}
diff --git a/dist/themeManager.cjs.js b/dist/themeManager.cjs.js
new file mode 100644
index 0000000..5b04410
--- /dev/null
+++ b/dist/themeManager.cjs.js
@@ -0,0 +1,2 @@
+"use strict";function b(e,r,t,o){function m(l){return l instanceof t?l:new t(function(a){a(l)})}return new(t||(t=Promise))(function(l,a){function p(c){try{f(o.next(c))}catch(d){a(d)}}function g(c){try{f(o.throw(c))}catch(d){a(d)}}function f(c){c.done?l(c.value):m(c.value).then(p,g)}f((o=o.apply(e,r||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function y(e,r){const t=document.documentElement.getAttribute("data-theme"),o=localStorage.getItem("theme");return t&&e[t]?t:o&&e[o]?o:r}let n={light:{"--background-color":"#ffffff","--text-color":"#303133","--primary-color":"#409EFF","--secondary-color":"#545c64","--border-color":"#DCDFE6","--accent-color":"#ff6600","--success-color":"#67C23A","--warning-color":"#E6A23C","--error-color":"#F56C6C","--shadow-color":"rgba(0, 0, 0, 0.1)"},dark:{"--background-color":"#121212","--text-color":"#ffffff","--primary-color":"#bb86fc","--secondary-color":"#03DAC6","--border-color":"#333333","--accent-color":"#ff4081","--success-color":"#4caf50","--warning-color":"#ffeb3b","--error-color":"#f44336","--shadow-color":"rgba(0, 0, 0, 0.7)"}},s="light";const u=[],T=e=>b(void 0,void 0,void 0,function*(){try{const t=yield(yield fetch(e)).json();t.light&&(n.light=t.light),t.dark&&(n.dark=t.dark),Object.assign(n,t),console.log("\u2705 \u4E3B\u9898\u5DF2\u52A0\u8F7D:",Object.keys(t));const o=localStorage.getItem("theme");o&&n[o]?h(o):h(s)}catch(r){console.error("\u274C \u52A0\u8F7D JSON \u5931\u8D25:",r)}}),h=e=>{if(!n[e]){console.warn(`\u26A0\uFE0F \u4E3B\u9898 "${e}" \u4E0D\u5B58\u5728`);return}s=e,localStorage.setItem("theme",e),document.documentElement.setAttribute("data-theme",e),i(),C()},w=e=>{u.push(e)},E=(e,r)=>{document.documentElement.style.setProperty(e,r)},k=(e,r,t)=>{const o=Object.assign({},n);o[e]||(o[e]={}),o[e]=Object.assign(Object.assign({},o[e]),{[r]:t}),n=o,i()},i=()=>{const e=n[s],r=document.documentElement;for(const t in e)r.style.setProperty(t,e[t])},C=()=>{u.forEach(e=>e(s))},S=()=>(s=y(n,s),i(),{themes:n,currentTheme:s,eventListeners:u,loadThemesFromJSON:T,switchTheme:h,onThemeChange:w,setThemeVariable:E,addThemeVariable:k,applyTheme:i});module.exports=S;
+//# sourceMappingURL=themeManager.cjs.js.map
diff --git a/dist/themeManager.cjs.js.map b/dist/themeManager.cjs.js.map
new file mode 100644
index 0000000..84cbc88
--- /dev/null
+++ b/dist/themeManager.cjs.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"themeManager.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/dist/themeManager.d.ts b/dist/themeManager.d.ts
new file mode 100644
index 0000000..9970d63
--- /dev/null
+++ b/dist/themeManager.d.ts
@@ -0,0 +1,3 @@
+import { ThemeManager } from './theme';
+declare const useThemeManager: () => ThemeManager;
+export default useThemeManager;
diff --git a/dist/themeManager.js b/dist/themeManager.js
new file mode 100644
index 0000000..5d4bdfe
--- /dev/null
+++ b/dist/themeManager.js
@@ -0,0 +1,2 @@
+function b(e,r,t,o){function m(l){return l instanceof t?l:new t(function(a){a(l)})}return new(t||(t=Promise))(function(l,a){function p(c){try{i(o.next(c))}catch(d){a(d)}}function g(c){try{i(o.throw(c))}catch(d){a(d)}}function i(c){c.done?l(c.value):m(c.value).then(p,g)}i((o=o.apply(e,r||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function y(e,r){const t=document.documentElement.getAttribute("data-theme"),o=localStorage.getItem("theme");return t&&e[t]?t:o&&e[o]?o:r}let n={light:{"--background-color":"#ffffff","--text-color":"#303133","--primary-color":"#409EFF","--secondary-color":"#545c64","--border-color":"#DCDFE6","--accent-color":"#ff6600","--success-color":"#67C23A","--warning-color":"#E6A23C","--error-color":"#F56C6C","--shadow-color":"rgba(0, 0, 0, 0.1)"},dark:{"--background-color":"#121212","--text-color":"#ffffff","--primary-color":"#bb86fc","--secondary-color":"#03DAC6","--border-color":"#333333","--accent-color":"#ff4081","--success-color":"#4caf50","--warning-color":"#ffeb3b","--error-color":"#f44336","--shadow-color":"rgba(0, 0, 0, 0.7)"}},s="light";const u=[],T=e=>b(void 0,void 0,void 0,function*(){try{const t=yield(yield fetch(e)).json();t.light&&(n.light=t.light),t.dark&&(n.dark=t.dark),Object.assign(n,t),console.log("\u2705 \u4E3B\u9898\u5DF2\u52A0\u8F7D:",Object.keys(t));const o=localStorage.getItem("theme");o&&n[o]?h(o):h(s)}catch(r){console.error("\u274C \u52A0\u8F7D JSON \u5931\u8D25:",r)}}),h=e=>{if(!n[e]){console.warn(`\u26A0\uFE0F \u4E3B\u9898 "${e}" \u4E0D\u5B58\u5728`);return}s=e,localStorage.setItem("theme",e),document.documentElement.setAttribute("data-theme",e),f(),C()},w=e=>{u.push(e)},E=(e,r)=>{document.documentElement.style.setProperty(e,r)},k=(e,r,t)=>{const o=Object.assign({},n);o[e]||(o[e]={}),o[e]=Object.assign(Object.assign({},o[e]),{[r]:t}),n=o,f()},f=()=>{const e=n[s],r=document.documentElement;for(const t in e)r.style.setProperty(t,e[t])},C=()=>{u.forEach(e=>e(s))},S=()=>(s=y(n,s),f(),{themes:n,currentTheme:s,eventListeners:u,loadThemesFromJSON:T,switchTheme:h,onThemeChange:w,setThemeVariable:E,addThemeVariable:k,applyTheme:f});export{S as default};
+//# sourceMappingURL=themeManager.js.map
diff --git a/dist/themeManager.js.map b/dist/themeManager.js.map
new file mode 100644
index 0000000..7eb161b
--- /dev/null
+++ b/dist/themeManager.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"themeManager.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/dist/themeManager.umd.js b/dist/themeManager.umd.js
new file mode 100644
index 0000000..e8e3144
--- /dev/null
+++ b/dist/themeManager.umd.js
@@ -0,0 +1,2 @@
+(function(i,f){typeof exports=="object"&&typeof module!="undefined"?module.exports=f():typeof define=="function"&&define.amd?define(f):(i=typeof globalThis!="undefined"?globalThis:i||self,i.themeManager=f())})(this,function(){"use strict";function i(e,n,t,o){function E(l){return l instanceof t?l:new t(function(d){d(l)})}return new(t||(t=Promise))(function(l,d){function k(s){try{m(o.next(s))}catch(p){d(p)}}function C(s){try{m(o.throw(s))}catch(p){d(p)}}function m(s){s.done?l(s.value):E(s.value).then(k,C)}m((o=o.apply(e,n||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function f(e,n){const t=document.documentElement.getAttribute("data-theme"),o=localStorage.getItem("theme");return t&&e[t]?t:o&&e[o]?o:n}let r={light:{"--background-color":"#ffffff","--text-color":"#303133","--primary-color":"#409EFF","--secondary-color":"#545c64","--border-color":"#DCDFE6","--accent-color":"#ff6600","--success-color":"#67C23A","--warning-color":"#E6A23C","--error-color":"#F56C6C","--shadow-color":"rgba(0, 0, 0, 0.1)"},dark:{"--background-color":"#121212","--text-color":"#ffffff","--primary-color":"#bb86fc","--secondary-color":"#03DAC6","--border-color":"#333333","--accent-color":"#ff4081","--success-color":"#4caf50","--warning-color":"#ffeb3b","--error-color":"#f44336","--shadow-color":"rgba(0, 0, 0, 0.7)"}},c="light";const u=[],g=e=>i(void 0,void 0,void 0,function*(){try{const t=yield(yield fetch(e)).json();t.light&&(r.light=t.light),t.dark&&(r.dark=t.dark),Object.assign(r,t),console.log("\u2705 \u4E3B\u9898\u5DF2\u52A0\u8F7D:",Object.keys(t));const o=localStorage.getItem("theme");o&&r[o]?h(o):h(c)}catch(n){console.error("\u274C \u52A0\u8F7D JSON \u5931\u8D25:",n)}}),h=e=>{if(!r[e]){console.warn(`\u26A0\uFE0F \u4E3B\u9898 "${e}" \u4E0D\u5B58\u5728`);return}c=e,localStorage.setItem("theme",e),document.documentElement.setAttribute("data-theme",e),a(),w()},y=e=>{u.push(e)},b=(e,n)=>{document.documentElement.style.setProperty(e,n)},T=(e,n,t)=>{const o=Object.assign({},r);o[e]||(o[e]={}),o[e]=Object.assign(Object.assign({},o[e]),{[n]:t}),r=o,a()},a=()=>{const e=r[c],n=document.documentElement;for(const t in e)n.style.setProperty(t,e[t])},w=()=>{u.forEach(e=>e(c))};return()=>(c=f(r,c),a(),{themes:r,currentTheme:c,eventListeners:u,loadThemesFromJSON:g,switchTheme:h,onThemeChange:y,setThemeVariable:b,addThemeVariable:T,applyTheme:a})});
+//# sourceMappingURL=themeManager.umd.js.map
diff --git a/dist/themeManager.umd.js.map b/dist/themeManager.umd.js.map
new file mode 100644
index 0000000..4699f05
--- /dev/null
+++ b/dist/themeManager.umd.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"themeManager.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/dist/utils.d.ts b/dist/utils.d.ts
new file mode 100644
index 0000000..6c3abe7
--- /dev/null
+++ b/dist/utils.d.ts
@@ -0,0 +1 @@
+export declare function autoDetectTheme(themes: Record, currentTheme: string): string;
diff --git a/examples/index.html b/examples/index.html
new file mode 100644
index 0000000..7eebfc2
--- /dev/null
+++ b/examples/index.html
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+ 主题管理
+
+
+
+
+
+ 🎨 主题管理
+
+
+
+
+
+
+
+
+ 调整主题变量
+
+
+
+
当前主题
+
当前主题:loading...
+
+
+
+
diff --git a/examples/themes.json b/examples/themes.json
new file mode 100644
index 0000000..720d5c5
--- /dev/null
+++ b/examples/themes.json
@@ -0,0 +1,26 @@
+{
+ "blue": {
+ "--background-color": "#e0f7fa",
+ "--text-color": "#212121",
+ "--primary-color": "#409EFF",
+ "--secondary-color": "#0288d1",
+ "--border-color": "#DCDFE6",
+ "--accent-color": "#ff4081",
+ "--success-color": "#67C23A",
+ "--warning-color": "#E6A23C",
+ "--error-color": "#F56C6C",
+ "--shadow-color": "rgba(0, 0, 0, 0.1)"
+ },
+ "green": {
+ "--background-color": "#e8f5e9",
+ "--text-color": "#212121",
+ "--primary-color": "#66bb6a",
+ "--secondary-color": "#388e3c",
+ "--border-color": "#DCDFE6",
+ "--accent-color": "#ff4081",
+ "--success-color": "#67C23A",
+ "--warning-color": "#E6A23C",
+ "--error-color": "#F56C6C",
+ "--shadow-color": "rgba(0, 0, 0, 0.1)"
+ }
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..b694a2d
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,1444 @@
+{
+ "name": "theme-manager",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "theme-manager",
+ "version": "1.0.0",
+ "license": "ISC",
+ "devDependencies": {
+ "@rollup/plugin-commonjs": "^28.0.2",
+ "@rollup/plugin-node-resolve": "^16.0.0",
+ "rollup": "^4.34.8",
+ "rollup-plugin-esbuild": "^6.2.0",
+ "rollup-plugin-typescript2": "^0.36.0",
+ "typescript": "^5.7.3"
+ }
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz",
+ "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz",
+ "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz",
+ "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz",
+ "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz",
+ "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz",
+ "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz",
+ "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz",
+ "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz",
+ "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz",
+ "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz",
+ "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz",
+ "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz",
+ "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz",
+ "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz",
+ "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz",
+ "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz",
+ "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz",
+ "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz",
+ "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz",
+ "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz",
+ "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz",
+ "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz",
+ "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz",
+ "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz",
+ "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
+ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@rollup/plugin-commonjs": {
+ "version": "28.0.2",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.2.tgz",
+ "integrity": "sha512-BEFI2EDqzl+vA1rl97IDRZ61AIwGH093d9nz8+dThxJNH8oSoB7MjWvPCX3dkaK1/RCJ/1v/R1XB15FuSs0fQw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rollup/pluginutils": "^5.0.1",
+ "commondir": "^1.0.1",
+ "estree-walker": "^2.0.2",
+ "fdir": "^6.2.0",
+ "is-reference": "1.2.1",
+ "magic-string": "^0.30.3",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=16.0.0 || 14 >= 14.17"
+ },
+ "peerDependencies": {
+ "rollup": "^2.68.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/plugin-node-resolve": {
+ "version": "16.0.0",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.0.tgz",
+ "integrity": "sha512-0FPvAeVUT/zdWoO0jnb/V5BlBsUSNfkIOtFHzMO4H9MOklrmQFY6FduVHKucNb/aTFxvnGhj4MNj/T1oNdDfNg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rollup/pluginutils": "^5.0.1",
+ "@types/resolve": "1.20.2",
+ "deepmerge": "^4.2.2",
+ "is-module": "^1.0.0",
+ "resolve": "^1.22.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^2.78.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/pluginutils": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz",
+ "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "^1.0.0",
+ "estree-walker": "^2.0.2",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/rollup-android-arm-eabi": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.8.tgz",
+ "integrity": "sha512-q217OSE8DTp8AFHuNHXo0Y86e1wtlfVrXiAlwkIvGRQv9zbc6mE3sjIVfwI8sYUyNxwOg0j/Vm1RKM04JcWLJw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-android-arm64": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.8.tgz",
+ "integrity": "sha512-Gigjz7mNWaOL9wCggvoK3jEIUUbGul656opstjaUSGC3eT0BM7PofdAJaBfPFWWkXNVAXbaQtC99OCg4sJv70Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-arm64": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.8.tgz",
+ "integrity": "sha512-02rVdZ5tgdUNRxIUrFdcMBZQoaPMrxtwSb+/hOfBdqkatYHR3lZ2A2EGyHq2sGOd0Owk80oV3snlDASC24He3Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-darwin-x64": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.8.tgz",
+ "integrity": "sha512-qIP/elwR/tq/dYRx3lgwK31jkZvMiD6qUtOycLhTzCvrjbZ3LjQnEM9rNhSGpbLXVJYQ3rq39A6Re0h9tU2ynw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-arm64": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.8.tgz",
+ "integrity": "sha512-IQNVXL9iY6NniYbTaOKdrlVP3XIqazBgJOVkddzJlqnCpRi/yAeSOa8PLcECFSQochzqApIOE1GHNu3pCz+BDA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-freebsd-x64": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.8.tgz",
+ "integrity": "sha512-TYXcHghgnCqYFiE3FT5QwXtOZqDj5GmaFNTNt3jNC+vh22dc/ukG2cG+pi75QO4kACohZzidsq7yKTKwq/Jq7Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.8.tgz",
+ "integrity": "sha512-A4iphFGNkWRd+5m3VIGuqHnG3MVnqKe7Al57u9mwgbyZ2/xF9Jio72MaY7xxh+Y87VAHmGQr73qoKL9HPbXj1g==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.8.tgz",
+ "integrity": "sha512-S0lqKLfTm5u+QTxlFiAnb2J/2dgQqRy/XvziPtDd1rKZFXHTyYLoVL58M/XFwDI01AQCDIevGLbQrMAtdyanpA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.8.tgz",
+ "integrity": "sha512-jpz9YOuPiSkL4G4pqKrus0pn9aYwpImGkosRKwNi+sJSkz+WU3anZe6hi73StLOQdfXYXC7hUfsQlTnjMd3s1A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.8.tgz",
+ "integrity": "sha512-KdSfaROOUJXgTVxJNAZ3KwkRc5nggDk+06P6lgi1HLv1hskgvxHUKZ4xtwHkVYJ1Rep4GNo+uEfycCRRxht7+Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.8.tgz",
+ "integrity": "sha512-NyF4gcxwkMFRjgXBM6g2lkT58OWztZvw5KkV2K0qqSnUEqCVcqdh2jN4gQrTn/YUpAcNKyFHfoOZEer9nwo6uQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.8.tgz",
+ "integrity": "sha512-LMJc999GkhGvktHU85zNTDImZVUCJ1z/MbAJTnviiWmmjyckP5aQsHtcujMjpNdMZPT2rQEDBlJfubhs3jsMfw==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.8.tgz",
+ "integrity": "sha512-xAQCAHPj8nJq1PI3z8CIZzXuXCstquz7cIOL73HHdXiRcKk8Ywwqtx2wrIy23EcTn4aZ2fLJNBB8d0tQENPCmw==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.8.tgz",
+ "integrity": "sha512-DdePVk1NDEuc3fOe3dPPTb+rjMtuFw89gw6gVWxQFAuEqqSdDKnrwzZHrUYdac7A7dXl9Q2Vflxpme15gUWQFA==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.8.tgz",
+ "integrity": "sha512-8y7ED8gjxITUltTUEJLQdgpbPh1sUQ0kMTmufRF/Ns5tI9TNMNlhWtmPKKHCU0SilX+3MJkZ0zERYYGIVBYHIA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-linux-x64-musl": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.8.tgz",
+ "integrity": "sha512-SCXcP0ZpGFIe7Ge+McxY5zKxiEI5ra+GT3QRxL0pMMtxPfpyLAKleZODi1zdRHkz5/BhueUrYtYVgubqe9JBNQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.8.tgz",
+ "integrity": "sha512-YHYsgzZgFJzTRbth4h7Or0m5O74Yda+hLin0irAIobkLQFRQd1qWmnoVfwmKm9TXIZVAD0nZ+GEb2ICicLyCnQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.8.tgz",
+ "integrity": "sha512-r3NRQrXkHr4uWy5TOjTpTYojR9XmF0j/RYgKCef+Ag46FWUTltm5ziticv8LdNsDMehjJ543x/+TJAek/xBA2w==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.8.tgz",
+ "integrity": "sha512-U0FaE5O1BCpZSeE6gBl3c5ObhePQSfk9vDRToMmTkbhCOgW4jqvtS5LGyQ76L1fH8sM0keRp4uDTsbjiUyjk0g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
+ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/resolve": {
+ "version": "1.20.2",
+ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
+ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/debug": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
+ "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/deepmerge": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/es-module-lexer": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz",
+ "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/esbuild": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz",
+ "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "peer": true,
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.25.0",
+ "@esbuild/android-arm": "0.25.0",
+ "@esbuild/android-arm64": "0.25.0",
+ "@esbuild/android-x64": "0.25.0",
+ "@esbuild/darwin-arm64": "0.25.0",
+ "@esbuild/darwin-x64": "0.25.0",
+ "@esbuild/freebsd-arm64": "0.25.0",
+ "@esbuild/freebsd-x64": "0.25.0",
+ "@esbuild/linux-arm": "0.25.0",
+ "@esbuild/linux-arm64": "0.25.0",
+ "@esbuild/linux-ia32": "0.25.0",
+ "@esbuild/linux-loong64": "0.25.0",
+ "@esbuild/linux-mips64el": "0.25.0",
+ "@esbuild/linux-ppc64": "0.25.0",
+ "@esbuild/linux-riscv64": "0.25.0",
+ "@esbuild/linux-s390x": "0.25.0",
+ "@esbuild/linux-x64": "0.25.0",
+ "@esbuild/netbsd-arm64": "0.25.0",
+ "@esbuild/netbsd-x64": "0.25.0",
+ "@esbuild/openbsd-arm64": "0.25.0",
+ "@esbuild/openbsd-x64": "0.25.0",
+ "@esbuild/sunos-x64": "0.25.0",
+ "@esbuild/win32-arm64": "0.25.0",
+ "@esbuild/win32-ia32": "0.25.0",
+ "@esbuild/win32-x64": "0.25.0"
+ }
+ },
+ "node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fdir": {
+ "version": "6.4.3",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz",
+ "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/find-cache-dir": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
+ "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "commondir": "^1.0.1",
+ "make-dir": "^3.0.2",
+ "pkg-dir": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/avajs/find-cache-dir?sponsor=1"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/fs-extra": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-tsconfig": {
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz",
+ "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "resolve-pkg-maps": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/hasown": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.16.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hasown": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-module": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
+ "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/is-reference": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",
+ "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/jsonfile": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/magic-string": {
+ "version": "0.30.17",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz",
+ "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.0"
+ }
+ },
+ "node_modules/make-dir": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/make-dir/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/pathe": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
+ "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/picomatch": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "find-up": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.22.10",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
+ "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-core-module": "^2.16.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+ }
+ },
+ "node_modules/rollup": {
+ "version": "4.34.8",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.8.tgz",
+ "integrity": "sha512-489gTVMzAYdiZHFVA/ig/iYFllCcWFHMvUHI1rpFmkoUtRlQxqh6/yiNqnYibjMZ2b/+FUQwldG+aLsEt6bglQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "1.0.6"
+ },
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=18.0.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "@rollup/rollup-android-arm-eabi": "4.34.8",
+ "@rollup/rollup-android-arm64": "4.34.8",
+ "@rollup/rollup-darwin-arm64": "4.34.8",
+ "@rollup/rollup-darwin-x64": "4.34.8",
+ "@rollup/rollup-freebsd-arm64": "4.34.8",
+ "@rollup/rollup-freebsd-x64": "4.34.8",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.34.8",
+ "@rollup/rollup-linux-arm-musleabihf": "4.34.8",
+ "@rollup/rollup-linux-arm64-gnu": "4.34.8",
+ "@rollup/rollup-linux-arm64-musl": "4.34.8",
+ "@rollup/rollup-linux-loongarch64-gnu": "4.34.8",
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.34.8",
+ "@rollup/rollup-linux-riscv64-gnu": "4.34.8",
+ "@rollup/rollup-linux-s390x-gnu": "4.34.8",
+ "@rollup/rollup-linux-x64-gnu": "4.34.8",
+ "@rollup/rollup-linux-x64-musl": "4.34.8",
+ "@rollup/rollup-win32-arm64-msvc": "4.34.8",
+ "@rollup/rollup-win32-ia32-msvc": "4.34.8",
+ "@rollup/rollup-win32-x64-msvc": "4.34.8",
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/rollup-plugin-esbuild": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-esbuild/-/rollup-plugin-esbuild-6.2.0.tgz",
+ "integrity": "sha512-LbkHaCahA6ceyWzAd6md2yajNS+HfZmZ5o58ShkZp0cQeZOnZECG2D2xWFNBq5SF6X6pfMK2udkZ+wRtvpzyVQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "es-module-lexer": "^1.6.0",
+ "get-tsconfig": "^4.10.0",
+ "unplugin-utils": "^0.2.3"
+ },
+ "engines": {
+ "node": ">=14.18.0"
+ },
+ "peerDependencies": {
+ "esbuild": ">=0.18.0",
+ "rollup": "^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0"
+ }
+ },
+ "node_modules/rollup-plugin-typescript2": {
+ "version": "0.36.0",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.36.0.tgz",
+ "integrity": "sha512-NB2CSQDxSe9+Oe2ahZbf+B4bh7pHwjV5L+RSYpCu7Q5ROuN94F9b6ioWwKfz3ueL3KTtmX4o2MUH2cgHDIEUsw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@rollup/pluginutils": "^4.1.2",
+ "find-cache-dir": "^3.3.2",
+ "fs-extra": "^10.0.0",
+ "semver": "^7.5.4",
+ "tslib": "^2.6.2"
+ },
+ "peerDependencies": {
+ "rollup": ">=1.26.3",
+ "typescript": ">=2.4.0"
+ }
+ },
+ "node_modules/rollup-plugin-typescript2/node_modules/@rollup/pluginutils": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
+ "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "estree-walker": "^2.0.1",
+ "picomatch": "^2.2.2"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
+ }
+ },
+ "node_modules/rollup-plugin-typescript2/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
+ "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "dev": true,
+ "license": "0BSD"
+ },
+ "node_modules/typescript": {
+ "version": "5.7.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz",
+ "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/universalify": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/unplugin-utils": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/unplugin-utils/-/unplugin-utils-0.2.4.tgz",
+ "integrity": "sha512-8U/MtpkPkkk3Atewj1+RcKIjb5WBimZ/WSLhhR3w6SsIj8XJuKTacSP8g+2JhfSGw0Cb125Y+2zA/IzJZDVbhA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "pathe": "^2.0.2",
+ "picomatch": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=18.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sxzz"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..d5e0c6f
--- /dev/null
+++ b/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "theme-switcher-manager",
+ "version": "1.0.0",
+ "description": "A flexible theme manager",
+ "main": "dist/themeManager.js",
+ "types": "dist/types/index.d.ts",
+ "scripts": {
+ "build": "rollup -c --bundleConfigAsCjs",
+ "dev": "rollup -c -w --bundleConfigAsCjs",
+ "publish": "npm publish"
+ },
+ "keywords": [],
+ "author": "华宇一城科技有限公司",
+ "license": "MIT",
+ "devDependencies": {
+ "@rollup/plugin-commonjs": "^28.0.2",
+ "@rollup/plugin-node-resolve": "^16.0.0",
+ "rollup": "^4.34.8",
+ "rollup-plugin-esbuild": "^6.2.0",
+ "rollup-plugin-typescript2": "^0.36.0",
+ "typescript": "^5.7.3"
+ }
+}
diff --git a/rollup.config.js b/rollup.config.js
new file mode 100644
index 0000000..690db42
--- /dev/null
+++ b/rollup.config.js
@@ -0,0 +1,41 @@
+import typescript from 'rollup-plugin-typescript2'; // 用于处理 TypeScript
+import resolve from '@rollup/plugin-node-resolve'; // 用于处理 node_modules 中的依赖
+import commonjs from '@rollup/plugin-commonjs'; // 用于处理 CommonJS 模块
+import { minify } from 'rollup-plugin-esbuild'; // 确保正确导入 esbuild 插件
+
+export default {
+ input: 'src/index.ts', // 项目的入口文件
+ output: [
+ {
+ file: 'dist/themeManager.cjs.js', // CommonJS 格式的输出
+ format: 'cjs',
+ sourcemap: true, // 生成 source map 文件
+ },
+ {
+ file: 'dist/themeManager.js', // ES模块格式的输出
+ format: 'esm',
+ sourcemap: true,
+ },
+ {
+ file: 'dist/themeManager.umd.js', // UMD 格式的输出(兼容浏览器)
+ format: 'umd',
+ name: 'themeManager', // UMD 格式需要一个全局变量名
+ sourcemap: true,
+ },
+ ],
+ plugins: [
+ resolve(), // 使 Rollup 能够找到外部依赖
+ commonjs(), // 将 CommonJS 模块转换为 ES6 模块
+ typescript({ // 使用 TypeScript 插件
+ tsconfig: './tsconfig.json', // 使用自定义的 tsconfig.json 文件
+ }),
+ minify({ // 使用 esbuild 进行代码压缩
+ minify: true, // 开启压缩
+ target: 'es2015', // 设置目标 ECMAScript 版本
+ }),
+ ],
+ external: ['some-external-library'], // 如果有外部依赖需要排除,可以在此声明
+ watch: {
+ include: 'src/**', // 监控 src 目录中的文件
+ },
+};
\ No newline at end of file
diff --git a/src/index.ts b/src/index.ts
new file mode 100644
index 0000000..9bca03c
--- /dev/null
+++ b/src/index.ts
@@ -0,0 +1,3 @@
+import useThemeManager from './themeManager';
+
+export default useThemeManager;
diff --git a/src/theme.ts b/src/theme.ts
new file mode 100644
index 0000000..82dfd1d
--- /dev/null
+++ b/src/theme.ts
@@ -0,0 +1,13 @@
+export type Theme = Record;
+export type Themes = Record;
+export interface ThemeManager {
+ themes: Record>;
+ currentTheme: string;
+ eventListeners: Array<(theme: string) => void>;
+ loadThemesFromJSON: (url: string) => Promise;
+ switchTheme: (themeName: string) => void;
+ onThemeChange: (callback: (theme: string) => void) => void;
+ setThemeVariable: (variable: string, value: string) => void;
+ addThemeVariable: (themeName: string, variable: string, value: string) => void;
+ applyTheme: () => void;
+}
diff --git a/src/themeManager.ts b/src/themeManager.ts
new file mode 100644
index 0000000..36f9619
--- /dev/null
+++ b/src/themeManager.ts
@@ -0,0 +1,122 @@
+import { Theme, Themes, ThemeManager } from './theme';
+import { autoDetectTheme } from './utils';
+
+let themes: Themes = {
+ light: {
+ "--background-color": "#ffffff", // 背景颜色
+ "--text-color": "#303133", // 主体文字颜色,调整为Element UI偏深的灰色
+ "--primary-color": "#409EFF", // 主色调改为 Element UI 蓝色
+ "--secondary-color": "#545c64", // 次要色调,调整为 Element UI 的灰色
+ "--border-color": "#DCDFE6", // 边框色调更接近Element UI的边框颜色
+ "--accent-color": "#ff6600", // 点缀色仍保持活泼,但可以考虑更为中性一些
+ "--success-color": "#67C23A", // 成功状态色,更接近 Element UI 的绿色
+ "--warning-color": "#E6A23C", // 警告状态色调整为更温暖的橙色
+ "--error-color": "#F56C6C", // 错误状态色更接近 Element UI 的红色
+ "--shadow-color": "rgba(0, 0, 0, 0.1)", // 阴影色更柔和
+ },
+ dark: {
+ "--background-color": "#121212", // 背景颜色为深色
+ "--text-color": "#ffffff", // 文字颜色白色
+ "--primary-color": "#bb86fc", // 主色调使用 Element UI 的紫色
+ "--secondary-color": "#03DAC6", // 次要色调使用 Element UI 的青色
+ "--border-color": "#333333", // 边框颜色调整为深色
+ "--accent-color": "#ff4081", // 点缀色仍使用较为明亮的粉色,但可以更为简约
+ "--success-color": "#4caf50", // 成功状态色为 Element UI 的绿色
+ "--warning-color": "#ffeb3b", // 警告状态色为 Element UI 的黄色
+ "--error-color": "#f44336", // 错误状态色为 Element UI 的红色
+ "--shadow-color": "rgba(0, 0, 0, 0.7)", // 阴影更深
+ },
+};
+
+let currentTheme = 'light';
+const eventListeners: Array<(theme: string) => void> = [];
+
+const loadThemesFromJSON = async (url: string): Promise => {
+ try {
+ const response = await fetch(url);
+ const newThemes = await response.json();
+ if (newThemes.light) themes.light = newThemes.light;
+ if (newThemes.dark) themes.dark = newThemes.dark;
+ Object.assign(themes, newThemes);
+ console.log("✅ 主题已加载:", Object.keys(newThemes));
+
+ const savedTheme = localStorage.getItem("theme");
+ if (savedTheme && themes[savedTheme]) {
+ switchTheme(savedTheme);
+ } else {
+ switchTheme(currentTheme);
+ }
+ } catch (error) {
+ console.error("❌ 加载 JSON 失败:", error);
+ }
+};
+
+const switchTheme = (themeName: string): void => {
+ if (!themes[themeName]) {
+ console.warn(`⚠️ 主题 "${themeName}" 不存在`);
+ return;
+ }
+ currentTheme = themeName;
+ localStorage.setItem("theme", themeName);
+ document.documentElement.setAttribute("data-theme", themeName);
+ applyTheme();
+ notifyThemeChange();
+};
+
+const onThemeChange = (callback: (theme: string) => void): void => {
+ eventListeners.push(callback);
+};
+
+const setThemeVariable = (variable: string, value: string): void => {
+ document.documentElement.style.setProperty(variable, value);
+};
+
+const addThemeVariable = (themeName: string, variable: string, value: string): void => {
+ const updatedThemes = { ...themes }; // 创建一个新对象,保持原始对象不变
+
+ if (!updatedThemes[themeName]) {
+ updatedThemes[themeName] = {}; // 如果该主题不存在,创建一个新的对象
+ }
+
+ updatedThemes[themeName] = {
+ ...updatedThemes[themeName], // 保留原有的变量不变
+ [variable]: value // 更新或添加新的变量
+ };
+
+ themes = updatedThemes;
+
+ // 立即应用更新后的主题
+ applyTheme();
+};
+
+const applyTheme = (): void => {
+ const theme = themes[currentTheme];
+ const root = document.documentElement;
+ for (const key in theme) {
+ root.style.setProperty(key, theme[key]);
+ }
+};
+
+const notifyThemeChange = (): void => {
+ eventListeners.forEach(callback => callback(currentTheme));
+};
+
+const useThemeManager = (): ThemeManager => {
+ const theme = autoDetectTheme(themes, currentTheme);
+ currentTheme = theme;
+ applyTheme();
+
+ return {
+ themes,
+ currentTheme,
+ eventListeners,
+ loadThemesFromJSON,
+ switchTheme,
+ onThemeChange,
+ setThemeVariable,
+ addThemeVariable,
+ applyTheme
+ };
+};
+
+export default useThemeManager;
diff --git a/src/utils.ts b/src/utils.ts
new file mode 100644
index 0000000..68d14db
--- /dev/null
+++ b/src/utils.ts
@@ -0,0 +1,14 @@
+export function autoDetectTheme(themes: Record, currentTheme: string): string {
+ const htmlTheme = document.documentElement.getAttribute("data-theme");
+ const savedTheme = localStorage.getItem("theme");
+
+ if (htmlTheme && themes[htmlTheme]) {
+ return htmlTheme;
+ }
+
+ if (savedTheme && themes[savedTheme]) {
+ return savedTheme;
+ }
+
+ return currentTheme;
+}
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..78d43f3
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,22 @@
+{
+ "compilerOptions": {
+ "target": "ES6",
+ "module": "ES6",
+ "moduleResolution": "node",
+ "esModuleInterop": true,
+ "allowJs": true,
+ "strict": true,
+ "jsx": "preserve",
+ "declaration": true,
+ "declarationDir": "./dist/types",
+ "skipLibCheck": true,
+ "outDir": "./dist"
+ },
+ "include": [
+ "src/**/*.ts",
+ "src/**/*.d.ts"
+ ],
+ "exclude": [
+ "node_modules"
+ ]
+}
\ No newline at end of file