@luckylillia-dev/plugin-theme-paper 0.0.0-stage → 1.0.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/GUIDE.md ADDED
@@ -0,0 +1,20 @@
1
+ # 素纸主题
2
+
3
+ 从主题能力示例中独立出来的「素纸」:保留米白与炭黑的纯色背景、纸色卡片和直角轮廓。支持亮色、暗色及跟随系统,无需 QQ 账号。
4
+
5
+ ## 使用
6
+
7
+ 安装、信任并启用「素纸主题」,在 WebUI「页面设置 → 主题与外观」选择「素纸」。亮暗模式使用该处已有的按钮切换。
8
+
9
+ 插件没有独立设置页、侧边栏条目、顶部按钮、调试文字或额外主题选项,因此不显示「主题设置」折叠项。切换主题和停用插件时,由宿主移除对应配色。
10
+
11
+ 替换旧「主题能力示例」后,若当前浏览器原先选择的是旧版素纸,会自动迁移到独立插件;原先选择其他主题时保持选择。旧「主题预览」链接转到页面设置。
12
+
13
+ ## 构建
14
+
15
+ ```powershell
16
+ npm run build
17
+ npm pack
18
+ ```
19
+
20
+ 将生成的安装包导入 WebUI「插件 → 本地安装」。包名为 `@luckylillia-dev/plugin-theme-paper`,分类为 `theme`。前端使用宿主的主题注册能力,不加载外部图片、字体或脚本,没有构建依赖。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LuckyLilliaDev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
2
+ <rect width="64" height="64" rx="14" fill="#e8e1d2"/>
3
+ <path d="M18 11h22l9 9v33H18z" fill="#fffdf7" stroke="#b4a88e" stroke-width="2"/>
4
+ <path d="M40 11v10h9" fill="#d5cbb6" stroke="#b4a88e" stroke-width="2" stroke-linejoin="round"/>
5
+ <path d="M25 29h17M25 36h17M25 43h11" fill="none" stroke="#5a554b" stroke-width="2.5" stroke-linecap="square"/>
6
+ </svg>
@@ -0,0 +1,31 @@
1
+ export default function apply(ctx) {
2
+ if (!ctx.theme?.register) throw new Error('素纸主题需要支持主题插件的新版 LuckyLillia WebUI')
3
+ const stopTheme = ctx.theme.register({
4
+ id: 'paper', title: '素纸', description: '米白与炭黑的纯色背景、直角卡片。',
5
+ css: '.card { border-radius: var(--r-card); }',
6
+ light: {
7
+ tokens: {
8
+ '--accent': '#5a554b', '--accent-strong': '#36322b',
9
+ '--accent-from': '#787166', '--accent-to': '#454139',
10
+ '--r-card': '3px', '--glass-tint': '255 253 247', '--glass-alpha-card': '1',
11
+ },
12
+ background: '#eeeae1',
13
+ },
14
+ dark: {
15
+ tokens: {
16
+ '--accent': '#d1c6ac', '--accent-strong': '#b9a887',
17
+ '--accent-from': '#786e59', '--accent-to': '#4d4639',
18
+ '--r-card': '3px', '--glass-tint': '35 33 29', '--glass-alpha-card': '1',
19
+ },
20
+ background: '#191815',
21
+ },
22
+ })
23
+ // Preserve an existing choice when replacing the old demonstration package.
24
+ if (ctx.theme.get().selected === 'luckylillia-plugin-theme-demo|paper') ctx.theme.select('paper')
25
+ const redirectLegacy = () => {
26
+ if (window.location.hash.slice(1).split('?')[0] === 'luckylillia-plugin-theme-demo:preview') window.location.replace('#webui')
27
+ }
28
+ window.addEventListener('hashchange', redirectLegacy)
29
+ redirectLegacy()
30
+ return () => { window.removeEventListener('hashchange', redirectLegacy); stopTheme() }
31
+ }
package/lib/index.js ADDED
@@ -0,0 +1,3 @@
1
+ /** The browser owns the theme; no QQ account or background service is needed. */
2
+ export const name = 'theme-paper'
3
+ export function apply() {}
package/package.json CHANGED
@@ -1,6 +1,61 @@
1
1
  {
2
2
  "name": "@luckylillia-dev/plugin-theme-paper",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.1",
4
+ "type": "module",
5
+ "description": "素纸:米白与炭黑的纯色背景、直角卡片 WebUI 主题",
6
+ "main": "./lib/index.js",
7
+ "exports": {
8
+ ".": "./lib/index.js",
9
+ "./package.json": "./package.json"
10
+ },
11
+ "files": [
12
+ "lib",
13
+ "assets",
14
+ "GUIDE.md",
15
+ "LICENSE"
16
+ ],
17
+ "author": {
18
+ "name": "LuckyLilliaDev",
19
+ "url": "https://github.com/LuckyLilliaDev"
20
+ },
21
+ "license": "MIT",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/LuckyLilliaDev/lucky-lillia-plugin-theme-paper.git"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public",
28
+ "registry": "https://registry.npmjs.org"
29
+ },
30
+ "engines": {
31
+ "node": ">=22.15"
32
+ },
33
+ "keywords": [
34
+ "luckylillia-plugin",
35
+ "theme",
36
+ "paper",
37
+ "webui"
38
+ ],
39
+ "peerDependencies": {
40
+ "@luckylillia-dev/plugin-sdk": "^1.0.1"
41
+ },
42
+ "devDependencies": {
43
+ "@luckylillia-dev/plugin-sdk": "npm:@luckylillia/plugin-sdk@^1.0.1"
44
+ },
45
+ "scripts": {
46
+ "build": "node scripts/build.mjs",
47
+ "prepack": "npm run build"
48
+ },
49
+ "llbot": {
50
+ "title": "素纸主题",
51
+ "description": "米白与炭黑的纯色背景、直角卡片。通过 WebUI 页面设置选择主题与亮暗模式。",
52
+ "category": "theme",
53
+ "icon": "assets/icon.svg",
54
+ "details": "GUIDE.md",
55
+ "webui": "./lib/client/index.js",
56
+ "service": {
57
+ "required": [],
58
+ "implements": []
59
+ }
60
+ }
61
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.