dsh-live2dwaifu 1.2.0 → 1.2.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 CHANGED
@@ -380,6 +380,11 @@ curl -X POST http://127.0.0.1:<端口>/dsh-live2d/api/push \
380
380
 
381
381
  版本号怎么走:动了功能和结构就抬第二位(1.2.0),只补洞和小修就抬第三位(1.2.1)。
382
382
 
383
+ ### 1.2.1
384
+
385
+ - 人设卡、音色、语料三个页面右上角各加了一个「关掉」。之前只能点外层那条栏上的按钮,页面本身没出口。
386
+ - 外层那条栏的按钮改成「× 关掉」,更好认。
387
+
383
388
  ### 1.2.0
384
389
 
385
390
  - 语料吃的文件多了:`.md`、`.csv`、`.srt`、`.vtt`、`.ass`。字幕会自动去掉序号、时间轴和样式标签。
@@ -37,6 +37,12 @@
37
37
  .tips { color:#6f7783; font-size:11.5px; line-height:1.8; margin-top:10px; }
38
38
  code { background:rgba(255,255,255,.06); border-radius:4px; padding:1px 5px; font-size:11px; }
39
39
  .state { color:var(--dim); font-size:11.5px; margin-left:auto; }
40
+
41
+ .sheet-close { position: fixed; right: 18px; top: 14px; z-index: 20;
42
+ padding: 7px 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.16);
43
+ background: rgba(30,36,45,.92); color: #dfe4ec; font: inherit; font-size: 12px;
44
+ cursor: pointer; backdrop-filter: blur(6px); }
45
+ .sheet-close:hover { background: rgba(46,55,68,.96); }
40
46
  </style>
41
47
  </head>
42
48
  <body>
@@ -310,5 +316,15 @@
310
316
  });
311
317
  })();
312
318
  </script>
319
+ <button id="sheet-close" class="sheet-close">关掉</button>
320
+
321
+ <script>
322
+ (function () {
323
+ var b = document.getElementById('sheet-close');
324
+ if (b) b.onclick = function () {
325
+ try { window.parent.postMessage({ type: 'dsh-live2d/close' }, '*'); } catch (e) {}
326
+ };
327
+ })();
328
+ </script>
313
329
  </body>
314
330
  </html>
@@ -35,6 +35,12 @@
35
35
  button.act:hover { filter:brightness(1.12); }
36
36
  .state { color:var(--dim); font-size:11px; margin-left:auto; }
37
37
  .tip { color:#6f7783; font-size:11px; margin-top:10px; line-height:1.7; }
38
+
39
+ .sheet-close { position: fixed; right: 18px; top: 14px; z-index: 20;
40
+ padding: 7px 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.16);
41
+ background: rgba(30,36,45,.92); color: #dfe4ec; font: inherit; font-size: 12px;
42
+ cursor: pointer; backdrop-filter: blur(6px); }
43
+ .sheet-close:hover { background: rgba(46,55,68,.96); }
38
44
  </style>
39
45
  </head>
40
46
  <body>
@@ -145,5 +151,15 @@
145
151
  .catch(function (e) { state.textContent = '读不了模型表:' + e.message; });
146
152
  })();
147
153
  </script>
154
+ <button id="sheet-close" class="sheet-close">关掉</button>
155
+
156
+ <script>
157
+ (function () {
158
+ var b = document.getElementById('sheet-close');
159
+ if (b) b.onclick = function () {
160
+ try { window.parent.postMessage({ type: 'dsh-live2d/close' }, '*'); } catch (e) {}
161
+ };
162
+ })();
163
+ </script>
148
164
  </body>
149
165
  </html>
package/assets/tone.html CHANGED
@@ -38,6 +38,12 @@
38
38
  .foot { display:flex; align-items:center; gap:10px; }
39
39
  .state { color:var(--dim); font-size:11px; margin-left:auto; }
40
40
  .tip { color:#6f7783; font-size:11px; margin-top:10px; line-height:1.7; }
41
+
42
+ .sheet-close { position: fixed; right: 18px; top: 14px; z-index: 20;
43
+ padding: 7px 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.16);
44
+ background: rgba(30,36,45,.92); color: #dfe4ec; font: inherit; font-size: 12px;
45
+ cursor: pointer; backdrop-filter: blur(6px); }
46
+ .sheet-close:hover { background: rgba(46,55,68,.96); }
41
47
  </style>
42
48
  </head>
43
49
  <body>
@@ -252,5 +258,15 @@
252
258
  });
253
259
  })();
254
260
  </script>
261
+ <button id="sheet-close" class="sheet-close">关掉</button>
262
+
263
+ <script>
264
+ (function () {
265
+ var b = document.getElementById('sheet-close');
266
+ if (b) b.onclick = function () {
267
+ try { window.parent.postMessage({ type: 'dsh-live2d/close' }, '*'); } catch (e) {}
268
+ };
269
+ })();
270
+ </script>
255
271
  </body>
256
272
  </html>
package/lib/client.js CHANGED
@@ -101,6 +101,7 @@
101
101
  const onMsg = (e) => {
102
102
  const d = e.data || {};
103
103
  if (d.type === 'dsh-live2d/open' && d.sheet) setSheet(String(d.sheet));
104
+ if (d.type === 'dsh-live2d/close') setSheet(null);
104
105
  };
105
106
  window.addEventListener('message', onMsg);
106
107
  return () => window.removeEventListener('message', onMsg);
@@ -265,7 +266,7 @@
265
266
  'div',
266
267
  { className: 'dsh-l2d-sheet-bar' },
267
268
  h('span', null, SHEET_TITLE[sheet] || sheet),
268
- h('button', { onClick: () => setSheet(null) }, '关掉'),
269
+ h('button', { onClick: () => setSheet(null) }, '× 关掉'),
269
270
  ),
270
271
  h('iframe', { className: 'dsh-l2d-sheet-body', src: BASE + '/' + sheet }),
271
272
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-live2dwaifu",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "给 DSH 网页右下角请一个 Live2D 角色:会眨眼、会呼吸、视线跟着鼠标、点她有反应、说话时嘴动、心情变了眉毛跟着动。模型不用内置——谁装谁放自己的文件夹;支持自定义 .exp3.json 表情和 .motion3.json 动作,卡片能拖能缩,背景可换。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",