@kanyun-ai-infra/band-plugin-react 0.0.0-stage → 0.1.2
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/dist/chunk-47BPPTXZ.js +8 -0
- package/dist/chunk-6VMUZ4PQ.js +26 -0
- package/dist/chunk-HX653UQN.js +729 -0
- package/dist/chunk-IJBJEU3H.js +56 -0
- package/dist/chunk-VKASR4EL.js +46 -0
- package/dist/chunk-X32B5VUS.js +107 -0
- package/dist/components.d.ts +313 -0
- package/dist/components.js +94 -0
- package/dist/errors.d.ts +28 -0
- package/dist/errors.js +18 -0
- package/dist/first-delivery.d.ts +52 -0
- package/dist/first-delivery.js +28 -0
- package/dist/image-view.d.ts +153 -0
- package/dist/image-view.js +788 -0
- package/dist/index.d.ts +1311 -0
- package/dist/index.js +5796 -0
- package/dist/scroll.d.ts +20 -0
- package/dist/scroll.js +6 -0
- package/dist/stopped-turn.d.ts +8 -0
- package/dist/stopped-turn.js +6 -0
- package/dist/upgrade-text.d.ts +81 -0
- package/dist/upgrade-text.js +9 -0
- package/package.json +64 -4
- package/README.md +0 -3
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
// src/ui.tsx
|
|
2
|
+
import {
|
|
3
|
+
WORKSHOP_GENRES,
|
|
4
|
+
agentDisplayName
|
|
5
|
+
} from "@kanyun-ai-infra/band-contracts";
|
|
6
|
+
|
|
7
|
+
// ../tokens/assets/genres/classical-compact.svg
|
|
8
|
+
var classical_compact_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u53E4\u5178 Classical"><style>.i,.a{fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="rotate(-28 24 25) translate(24 25) scale(1.12) translate(-24 -25)"><path class="i" d="M24 19.5C18.6 19.5 17.4 22.6 18.8 25.6C19.9 27.9 19.6 29 17.8 30.8C14.6 34 15.9 41.5 24 41.5C32.1 41.5 33.4 34 30.2 30.8C28.4 29 28.1 27.9 29.2 25.6C30.6 22.6 29.4 19.5 24 19.5Z"/><path class="i" d="M24 19.5V8.2"/><circle class="i" cx="24" cy="6.4" r="1.8"/><path class="i" d="M21.4 35.6H26.6"/><path class="i" d="M21.6 28.6v4.2M26.4 28.6v4.2"/></g><path class="a" d="M8.5 37.5L39.5 13.5"/><path class="a" d="M8.2 35.2l2.3 3.1"/></svg>%0A';
|
|
9
|
+
|
|
10
|
+
// ../tokens/assets/genres/classical.svg
|
|
11
|
+
var classical_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u53E4\u5178 Classical"><style>.i,.a{fill:none;stroke-width:2.26;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1.29}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="translate(6.24 1.46) scale(0.774)"><g transform="rotate(-28 24 25) translate(24 25) scale(1.12) translate(-24 -25)"><path class="i" d="M24 19.5C18.6 19.5 17.4 22.6 18.8 25.6C19.9 27.9 19.6 29 17.8 30.8C14.6 34 15.9 41.5 24 41.5C32.1 41.5 33.4 34 30.2 30.8C28.4 29 28.1 27.9 29.2 25.6C30.6 22.6 29.4 19.5 24 19.5Z"/><path class="i" d="M24 19.5V8.2"/><circle class="i" cx="24" cy="6.4" r="1.8"/><path class="i" d="M21.4 35.6H26.6"/><path class="i" d="M21.6 28.6v4.2M26.4 28.6v4.2"/></g><path class="a" d="M8.5 37.5L39.5 13.5"/><path class="a" d="M8.2 35.2l2.3 3.1"/></g><path class="l" d="M5.63 44.57C6.81 44.57 7.6 43.79 7.74 42.84H6.84C6.72 43.43 6.24 43.77 5.64 43.77C4.83 43.77 4.24 43.15 4.24 42.01C4.24 40.87 4.83 40.24 5.65 40.24C6.24 40.24 6.72 40.58 6.84 41.17H7.74C7.58 40.07 6.73 39.44 5.63 39.44C4.33 39.44 3.35 40.39 3.35 42.01C3.35 43.61 4.32 44.57 5.63 44.57ZM8.97 44.5H12.07V43.75H9.87V39.5H8.97ZM12.93 44.5H13.91L14.32 43.26H16.19L16.61 44.5H17.6L15.81 39.5H14.68ZM14.56 42.54 14.77 41.91C14.91 41.46 15.06 40.9 15.24 40.2C15.42 40.89 15.58 41.45 15.73 41.91L15.94 42.54ZM20.43 44.58C21.62 44.58 22.32 43.98 22.32 43.1C22.32 42.23 21.59 41.84 20.85 41.66L20.38 41.54C19.98 41.44 19.53 41.27 19.53 40.86C19.53 40.48 19.88 40.2 20.44 40.2C20.98 40.2 21.34 40.45 21.38 40.87H22.25C22.23 40.04 21.52 39.44 20.45 39.44C19.41 39.44 18.63 40.03 18.63 40.91C18.63 41.61 19.12 42.04 19.96 42.25L20.52 42.4C21.06 42.54 21.42 42.7 21.42 43.09C21.42 43.52 21.01 43.81 20.42 43.81C19.86 43.81 19.41 43.56 19.37 43.03H18.49C18.53 44.02 19.27 44.58 20.43 44.58ZM25.31 44.58C26.5 44.58 27.2 43.98 27.2 43.1C27.2 42.23 26.47 41.84 25.73 41.66L25.26 41.54C24.86 41.44 24.41 41.27 24.41 40.86C24.41 40.48 24.75 40.2 25.32 40.2C25.86 40.2 26.22 40.45 26.26 40.87H27.13C27.11 40.04 26.4 39.44 25.33 39.44C24.28 39.44 23.51 40.03 23.51 40.91C23.51 41.61 24 42.04 24.83 42.25L25.4 42.4C25.94 42.54 26.3 42.7 26.3 43.09C26.3 43.52 25.89 43.81 25.3 43.81C24.74 43.81 24.29 43.56 24.25 43.03H23.37C23.41 44.02 24.14 44.58 25.31 44.58ZM29.33 39.5H28.43V44.5H29.33ZM32.87 44.57C34.05 44.57 34.84 43.79 34.98 42.84H34.08C33.96 43.43 33.48 43.77 32.88 43.77C32.07 43.77 31.48 43.15 31.48 42.01C31.48 40.87 32.07 40.24 32.88 40.24C33.48 40.24 33.96 40.58 34.08 41.17H34.98C34.82 40.07 33.97 39.44 32.87 39.44C31.57 39.44 30.59 40.39 30.59 42.01C30.59 43.61 31.56 44.57 32.87 44.57ZM35.88 44.5H36.86L37.27 43.26H39.13L39.56 44.5H40.54L38.76 39.5H37.62ZM37.5 42.54 37.72 41.91C37.85 41.46 38 40.9 38.18 40.2C38.37 40.89 38.52 41.45 38.67 41.91L38.89 42.54ZM41.62 44.5H44.72V43.75H42.52V39.5H41.62Z"/></svg>%0A';
|
|
12
|
+
|
|
13
|
+
// ../tokens/assets/genres/electronic-compact.svg
|
|
14
|
+
var electronic_compact_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u7535\u5B50 Electronic"><style>.i,.a{fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><rect class="i" x="6" y="26" width="36" height="15" rx="2.5"/><path class="i" d="M12 26v15M18 26v15M24 26v15M30 26v15M36 26v15"/><path class="f" d="M10.4 26h3.2v8h-3.2zM16.4 26h3.2v8h-3.2zM28.4 26h3.2v8h-3.2zM34.4 26h3.2v8h-3.2z"/><path class="a" d="M6 15c3 0 3-7 6-7s3 14 6 14 3-14 6-14 3 14 6 14 3-7 6-7 3 7 6 7"/></svg>%0A';
|
|
15
|
+
|
|
16
|
+
// ../tokens/assets/genres/electronic.svg
|
|
17
|
+
var electronic_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u7535\u5B50 Electronic"><style>.i,.a{fill:none;stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1.29}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="translate(5.33 -2.72) scale(0.778)"><rect class="i" x="6" y="26" width="36" height="15" rx="2.5"/><path class="i" d="M12 26v15M18 26v15M24 26v15M30 26v15M36 26v15"/><path class="f" d="M10.4 26h3.2v8h-3.2zM16.4 26h3.2v8h-3.2zM28.4 26h3.2v8h-3.2zM34.4 26h3.2v8h-3.2z"/><path class="a" d="M6 15c3 0 3-7 6-7s3 14 6 14 3-14 6-14 3 14 6 14 3-7 6-7 3 7 6 7"/></g><path class="l" d="M3.45 44.5H6.33V43.83H4.24V42.6H6.17V41.94H4.24V40.74H6.32V40.08H3.45ZM7.49 44.5H10.24V43.83H8.28V40.08H7.49ZM11.29 44.5H14.18V43.83H12.09V42.6H14.01V41.94H12.09V40.74H14.17V40.08H11.29ZM17.23 44.56C18.27 44.56 18.97 43.87 19.09 43.03H18.29C18.19 43.55 17.76 43.85 17.24 43.85C16.52 43.85 16 43.31 16 42.29C16 41.29 16.51 40.73 17.24 40.73C17.77 40.73 18.19 41.03 18.29 41.55H19.09C18.95 40.58 18.2 40.02 17.23 40.02C16.07 40.02 15.2 40.86 15.2 42.29C15.2 43.72 16.06 44.56 17.23 44.56ZM19.99 40.74H21.35V44.5H22.15V40.74H23.51V40.08H19.99ZM24.57 44.5H25.36V42.88H26.18L27.05 44.5H27.94L26.98 42.74C27.5 42.53 27.78 42.09 27.78 41.49C27.78 40.65 27.24 40.08 26.22 40.08H24.57ZM25.36 42.22V40.74H26.1C26.7 40.74 26.97 41.02 26.97 41.49C26.97 41.96 26.7 42.22 26.1 42.22ZM30.79 44.56C31.95 44.56 32.82 43.72 32.82 42.29C32.82 40.86 31.95 40.02 30.79 40.02C29.63 40.02 28.76 40.86 28.76 42.29C28.76 43.72 29.63 44.56 30.79 44.56ZM30.79 43.85C30.07 43.85 29.55 43.3 29.55 42.29C29.55 41.28 30.07 40.73 30.79 40.73C31.51 40.73 32.02 41.28 32.02 42.29C32.02 43.3 31.51 43.85 30.79 43.85ZM33.94 44.5H34.74V42.3C34.74 42.06 34.72 41.59 34.69 41.04C34.98 41.62 35.15 41.93 35.38 42.31L36.76 44.5H37.66V40.08H36.86V42.4C36.86 42.67 36.87 43.12 36.9 43.54C36.71 43.1 36.52 42.77 36.36 42.51L34.83 40.08H33.94ZM39.71 40.08H38.92V44.5H39.71ZM42.85 44.56C43.9 44.56 44.6 43.87 44.72 43.03H43.92C43.82 43.55 43.39 43.85 42.86 43.85C42.14 43.85 41.62 43.31 41.62 42.29C41.62 41.29 42.14 40.73 42.86 40.73C43.39 40.73 43.82 41.03 43.92 41.55H44.71C44.58 40.58 43.82 40.02 42.85 40.02C41.7 40.02 40.83 40.86 40.83 42.29C40.83 43.72 41.69 44.56 42.85 44.56Z"/></svg>%0A';
|
|
18
|
+
|
|
19
|
+
// ../tokens/assets/genres/folk-compact.svg
|
|
20
|
+
var folk_compact_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u6C11\u8C23 Folk"><style>.i,.a{fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="rotate(32 24 25)"><path class="i" d="M24 18.5C19.4 18.5 18.2 21.9 19.6 25C20.4 26.8 20.1 27.8 18.6 29.3C15.2 32.8 16.2 42 24 42C31.8 42 32.8 32.8 29.4 29.3C27.9 27.8 27.6 26.8 28.4 25C29.8 21.9 28.6 18.5 24 18.5Z"/><circle class="a" cx="24" cy="29.5" r="2.9"/><path class="i" d="M22.8 18.5V7M25.2 18.5V7"/><path class="i" d="M21.8 7l.3-4h3.8l.3 4Z"/><path class="i" d="M21 37h6"/></g></svg>%0A';
|
|
21
|
+
|
|
22
|
+
// ../tokens/assets/genres/folk.svg
|
|
23
|
+
var folk_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u6C11\u8C23 Folk"><style>.i,.a{fill:none;stroke-width:1.93;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1.1}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="translate(-4.00 1.23) scale(0.909)"><g transform="rotate(32 24 25)"><path class="i" d="M24 18.5C19.4 18.5 18.2 21.9 19.6 25C20.4 26.8 20.1 27.8 18.6 29.3C15.2 32.8 16.2 42 24 42C31.8 42 32.8 32.8 29.4 29.3C27.9 27.8 27.6 26.8 28.4 25C29.8 21.9 28.6 18.5 24 18.5Z"/><circle class="a" cx="24" cy="29.5" r="2.9"/><path class="i" d="M22.8 18.5V7M25.2 18.5V7"/><path class="i" d="M21.8 7l.3-4h3.8l.3 4Z"/><path class="i" d="M21 37h6"/></g></g><path class="l" d="M26.5 43.5H27.38V41.53H29.43V40.79H27.38V39.32H29.65V38.57H26.5ZM32.99 43.57C34.28 43.57 35.25 42.63 35.25 41.04C35.25 39.45 34.28 38.51 32.99 38.51C31.7 38.51 30.73 39.45 30.73 41.04C30.73 42.63 31.7 43.57 32.99 43.57ZM32.99 42.78C32.19 42.78 31.62 42.16 31.62 41.04C31.62 39.91 32.19 39.3 32.99 39.3C33.8 39.3 34.36 39.91 34.36 41.04C34.36 42.16 33.8 42.78 32.99 42.78ZM36.5 43.5H39.56V42.76H37.38V38.57H36.5ZM40.73 43.5H41.62V42.02L42.29 41.29L43.78 43.5H44.82L42.9 40.71L44.79 38.57H43.69L42.4 40.05C42.08 40.42 41.83 40.73 41.6 41.09L41.62 40.03V38.57H40.73Z"/></svg>%0A';
|
|
24
|
+
|
|
25
|
+
// ../tokens/assets/genres/guoyue-compact.svg
|
|
26
|
+
var guoyue_compact_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u56FD\u4E50 Guoyue"><style>.i,.a{fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="rotate(-22 24 25) translate(24 25) scale(1.1) translate(-24 -25)"><path class="i" d="M24 18.5C17.6 18.5 14.3 27.2 15.3 33.6C16.1 38.8 19.5 42 24 42C28.5 42 31.9 38.8 32.7 33.6C33.7 27.2 30.4 18.5 24 18.5Z"/><path class="i" d="M24 18.5V8.5"/><path class="i" d="M24 8.5l-2.4-5"/><path class="i" d="M21.2 6.3h-2.4M22.4 9h-2.4M26.4 6.6h2.2M26.4 9.4h2.2"/><path class="i" d="M22.2 12h3.6M22.2 14.6h3.6M22.2 17h3.6"/><path class="af" d="M19.8 35.4h8.4v2.2h-8.4z"/><path class="i" d="M22.6 18.5v16.9M25.4 18.5v16.9"/></g></svg>%0A';
|
|
27
|
+
|
|
28
|
+
// ../tokens/assets/genres/guoyue.svg
|
|
29
|
+
var guoyue_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u56FD\u4E50 Guoyue"><style>.i,.a{fill:none;stroke-width:2.59;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1.48}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="translate(8.37 1.91) scale(0.676)"><g transform="rotate(-22 24 25) translate(24 25) scale(1.1) translate(-24 -25)"><path class="i" d="M24 18.5C17.6 18.5 14.3 27.2 15.3 33.6C16.1 38.8 19.5 42 24 42C28.5 42 31.9 38.8 32.7 33.6C33.7 27.2 30.4 18.5 24 18.5Z"/><path class="i" d="M24 18.5V8.5"/><path class="i" d="M24 8.5l-2.4-5"/><path class="i" d="M21.2 6.3h-2.4M22.4 9h-2.4M26.4 6.6h2.2M26.4 9.4h2.2"/><path class="i" d="M22.2 12h3.6M22.2 14.6h3.6M22.2 17h3.6"/><path class="af" d="M19.8 35.4h8.4v2.2h-8.4z"/><path class="i" d="M22.6 18.5v16.9M25.4 18.5v16.9"/></g></g><path class="l" d="M9.77 44.57C11.11 44.57 12.06 43.71 12.06 42.33V41.68H9.88V42.44H11.12C11.11 43.21 10.59 43.71 9.78 43.71C8.87 43.71 8.24 43.02 8.24 41.8C8.24 40.58 8.88 39.89 9.75 39.89C10.41 39.89 10.85 40.25 11.03 40.83H12.02C11.85 39.76 10.93 39.03 9.74 39.03C8.33 39.03 7.27 40.07 7.27 41.81C7.27 43.51 8.28 44.57 9.77 44.57ZM15.64 44.58C16.95 44.58 17.83 43.78 17.83 42.63V39.1H16.86V42.55C16.86 43.22 16.38 43.71 15.64 43.71C14.89 43.71 14.41 43.22 14.41 42.55V39.1H13.45V42.63C13.45 43.78 14.31 44.58 15.64 44.58ZM21.67 44.57C23.08 44.57 24.14 43.55 24.14 41.8C24.14 40.06 23.08 39.03 21.67 39.03C20.25 39.03 19.18 40.06 19.18 41.8C19.18 43.54 20.25 44.57 21.67 44.57ZM21.67 43.71C20.78 43.71 20.15 43.03 20.15 41.8C20.15 40.57 20.78 39.89 21.67 39.89C22.54 39.89 23.17 40.56 23.17 41.8C23.17 43.04 22.54 43.71 21.67 43.71ZM27.13 44.5H28.1V42.41L30.07 39.1H28.95L28 40.8C27.86 41.06 27.74 41.29 27.62 41.6C27.5 41.3 27.38 41.07 27.24 40.8L26.27 39.1H25.14L27.13 42.41ZM33.43 44.58C34.75 44.58 35.62 43.78 35.62 42.63V39.1H34.65V42.55C34.65 43.22 34.18 43.71 33.43 43.71C32.69 43.71 32.21 43.22 32.21 42.55V39.1H31.24V42.63C31.24 43.78 32.11 44.58 33.43 44.58ZM37.15 44.5H40.67V43.68H38.12V42.18H40.47V41.37H38.12V39.92H40.66V39.1H37.15Z"/></svg>%0A';
|
|
30
|
+
|
|
31
|
+
// ../tokens/assets/genres/hiphop-compact.svg
|
|
32
|
+
var hiphop_compact_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u563B\u54C8 Hip-hop"><style>.i,.a{fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><rect class="i" x="5" y="7" width="38" height="34" rx="4"/><circle class="i" cx="21" cy="24" r="12"/><circle class="t" cx="21" cy="24" r="8.2"/><circle class="af" cx="21" cy="24" r="3.6"/><path class="i" d="M37 11.5v15l-6.2 5.8"/><circle class="i" cx="37" cy="11.5" r="1.8"/><path class="i" d="M29.4 30.8l2.6 2.4"/></svg>%0A';
|
|
33
|
+
|
|
34
|
+
// ../tokens/assets/genres/hiphop.svg
|
|
35
|
+
var hiphop_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u563B\u54C8 Hip-hop"><style>.i,.a{fill:none;stroke-width:2.46;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1.41}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="translate(6.95 -1.97) scale(0.711)"><rect class="i" x="5" y="7" width="38" height="34" rx="4"/><circle class="i" cx="21" cy="24" r="12"/><circle class="t" cx="21" cy="24" r="8.2"/><circle class="af" cx="21" cy="24" r="3.6"/><path class="i" d="M37 11.5v15l-6.2 5.8"/><circle class="i" cx="37" cy="11.5" r="1.8"/><path class="i" d="M29.4 30.8l2.6 2.4"/></g><path class="l" d="M6.66 44.5H7.66V42.06H10.27V44.5H11.27V38.9H10.27V41.22H7.66V38.9H6.66ZM13.86 38.9H12.86V44.5H13.86ZM15.45 44.5H16.46V42.61H17.53C18.83 42.61 19.52 41.83 19.52 40.75C19.52 39.69 18.84 38.9 17.55 38.9H15.45ZM16.46 41.78V39.74H17.39C18.16 39.74 18.49 40.16 18.49 40.75C18.49 41.35 18.16 41.78 17.4 41.78ZM23.36 41.76H20.85V42.57H23.36ZM24.92 44.5H25.93V42.06H28.53V44.5H29.54V38.9H28.53V41.22H25.93V38.9H24.92ZM33.52 44.58C34.99 44.58 36.09 43.51 36.09 41.7C36.09 39.89 34.99 38.82 33.52 38.82C32.05 38.82 30.95 39.89 30.95 41.7C30.95 43.51 32.05 44.58 33.52 44.58ZM33.52 43.68C32.61 43.68 31.96 42.98 31.96 41.7C31.96 40.42 32.61 39.72 33.52 39.72C34.43 39.72 35.08 40.42 35.08 41.7C35.08 42.98 34.43 43.68 33.52 43.68ZM37.5 44.5H38.51V42.61H39.58C40.87 42.61 41.57 41.83 41.57 40.75C41.57 39.69 40.89 38.9 39.6 38.9H37.5ZM38.51 41.78V39.74H39.44C40.21 39.74 40.54 40.16 40.54 40.75C40.54 41.35 40.21 41.78 39.45 41.78Z"/></svg>%0A';
|
|
36
|
+
|
|
37
|
+
// ../tokens/assets/genres/jazz-compact.svg
|
|
38
|
+
var jazz_compact_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u7235\u58EB Jazz"><style>.i,.a{fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><path class="i" d="M19.5 11v20c0 7 4.3 11 10 11s9.5-4 9.5-9.5V27"/><path class="i" d="M24.5 11v19.5c0 4 2 6.5 5 6.5s4.5-2 4.5-4.5V27"/><path class="i" d="M31.5 27h10"/><path class="i" d="M19.5 11c0-4.6-3.8-6.3-7.5-4.6M24.5 11c0-6.3-6-8.6-11-6.2"/><path class="i" d="M12 6.4l-1.6-2.8 2.6-1.3"/><circle class="af" cx="22" cy="16" r="1.7"/><circle class="af" cx="22" cy="21.5" r="1.7"/><circle class="af" cx="22" cy="27" r="1.7"/></svg>%0A';
|
|
39
|
+
|
|
40
|
+
// ../tokens/assets/genres/jazz.svg
|
|
41
|
+
var jazz_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u7235\u58EB Jazz"><style>.i,.a{fill:none;stroke-width:1.81;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1.04}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="translate(-7.03 1.78) scale(0.965)"><path class="i" d="M19.5 11v20c0 7 4.3 11 10 11s9.5-4 9.5-9.5V27"/><path class="i" d="M24.5 11v19.5c0 4 2 6.5 5 6.5s4.5-2 4.5-4.5V27"/><path class="i" d="M31.5 27h10"/><path class="i" d="M19.5 11c0-4.6-3.8-6.3-7.5-4.6M24.5 11c0-6.3-6-8.6-11-6.2"/><path class="i" d="M12 6.4l-1.6-2.8 2.6-1.3"/><circle class="af" cx="22" cy="16" r="1.7"/><circle class="af" cx="22" cy="21.5" r="1.7"/><circle class="af" cx="22" cy="27" r="1.7"/></g><path class="l" d="M27.86 14.07C28.83 14.07 29.45 13.52 29.45 12.53V9.05H28.57V12.54C28.57 13.07 28.29 13.34 27.86 13.34C27.43 13.34 27.15 13.07 27.15 12.54V12.26H26.26V12.54C26.26 13.52 26.88 14.07 27.86 14.07ZM30.52 14H31.49L31.89 12.77H33.75L34.17 14H35.14L33.37 9.05H32.25ZM32.13 12.06 32.34 11.43C32.48 10.99 32.63 10.43 32.8 9.74C32.98 10.42 33.14 10.97 33.29 11.43L33.5 12.06ZM36.11 14H39.77V13.25H38.14C37.81 13.25 37.48 13.25 37.15 13.27C37.35 13.03 37.54 12.79 37.71 12.54L39.75 9.61V9.05H36.1V9.8H37.75C38.08 9.8 38.4 9.8 38.72 9.78C38.53 10.01 38.35 10.23 38.19 10.46L36.11 13.45ZM40.96 14H44.62V13.25H42.99C42.66 13.25 42.33 13.25 42 13.27C42.2 13.03 42.39 12.79 42.56 12.54L44.6 9.61V9.05H40.95V9.8H42.6C42.92 9.8 43.25 9.8 43.56 9.78C43.38 10.01 43.2 10.23 43.04 10.46L40.96 13.45Z"/></svg>%0A';
|
|
42
|
+
|
|
43
|
+
// ../tokens/assets/genres/pop-compact.svg
|
|
44
|
+
var pop_compact_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u6D41\u884C Pop"><style>.i,.a{fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><circle class="i" cx="29.5" cy="17.5" r="8"/><clipPath id="pg"><circle cx="29.5" cy="17.5" r="6.6"/></clipPath><g clip-path="url(%23pg)"><path class="a" d="M20 14l17 12M20 9.5l17 12M23 6l17 12M17 18.5l17 12"/></g><path class="i" d="M23.6 23L12.6 38.7c-.9 1.3.6 2.8 1.9 1.9L30.2 29.4"/><path class="i" d="M39.5 6.5v4M37.5 8.5h4"/></svg>%0A';
|
|
45
|
+
|
|
46
|
+
// ../tokens/assets/genres/pop.svg
|
|
47
|
+
var pop_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u6D41\u884C Pop"><style>.i,.a{fill:none;stroke-width:1.82;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1.04}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="translate(-7.79 -1.75) scale(0.959)"><circle class="i" cx="29.5" cy="17.5" r="8"/><clipPath id="pg"><circle cx="29.5" cy="17.5" r="6.6"/></clipPath><g clip-path="url(%23pg)"><path class="a" d="M20 14l17 12M20 9.5l17 12M23 6l17 12M17 18.5l17 12"/></g><path class="i" d="M23.6 23L12.6 38.7c-.9 1.3.6 2.8 1.9 1.9L30.2 29.4"/><path class="i" d="M39.5 6.5v4M37.5 8.5h4"/></g><path class="l" d="M25.21 43.5H26.46V41.13H27.81C29.43 41.13 30.3 40.15 30.3 38.81C30.3 37.47 29.44 36.49 27.83 36.49H25.21ZM26.46 40.09V37.54H27.63C28.59 37.54 29.01 38.06 29.01 38.81C29.01 39.56 28.59 40.09 27.64 40.09ZM35 43.59C36.84 43.59 38.22 42.26 38.22 40C38.22 37.73 36.84 36.39 35 36.39C33.16 36.39 31.78 37.73 31.78 40C31.78 42.26 33.16 43.59 35 43.59ZM35 42.47C33.86 42.47 33.04 41.59 33.04 40C33.04 38.39 33.86 37.52 35 37.52C36.14 37.52 36.95 38.39 36.95 40C36.95 41.6 36.14 42.47 35 42.47ZM39.99 43.5H41.25V41.13H42.59C44.21 41.13 45.08 40.15 45.08 38.81C45.08 37.47 44.22 36.49 42.61 36.49H39.99ZM41.25 40.09V37.54H42.42C43.38 37.54 43.8 38.06 43.8 38.81C43.8 39.56 43.38 40.09 42.43 40.09Z"/></svg>%0A';
|
|
48
|
+
|
|
49
|
+
// ../tokens/assets/genres/rock-compact.svg
|
|
50
|
+
var rock_compact_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u6447\u6EDA Rock"><style>.i,.a{fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="rotate(38 24 24)"><path class="i" d="M22 30c-.4-3.2-2-5.6-4-4.9-1.7.6-1.1 3.2-1.6 4.9-3.3.2-5.2 3.1-4.4 6.6.8 3.6 4.4 6 9.7 5.6 1.2-.1 2-.1 3.2.1 5.6.6 9.4-1.6 10-5.3.4-2.6-1-4.6-3.5-4.9-.4-2.6.4-5.3-1.4-6.2-2-1-3.6 1.6-4 4.1Z"/><path class="i" d="M23 30V6.5M25.5 30V6.5"/><path class="i" d="M22 6.5l.6-3.5h3.6l.4 3.5Z"/><path class="af" d="M21.2 33.4h5.6v1.8h-5.6zM21.2 37h5.6v1.8h-5.6z"/></g></svg>%0A';
|
|
51
|
+
|
|
52
|
+
// ../tokens/assets/genres/rock.svg
|
|
53
|
+
var rock_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" role="img" aria-label="\u6447\u6EDA Rock"><style>.i,.a{fill:none;stroke-width:2.12;stroke-linecap:round;stroke-linejoin:round}.i{stroke:%231c1e23}.a{stroke:%233462e6}.af{fill:%233462e6}.f{fill:%231c1e23}.bg{fill:%23fff}.t{fill:none;stroke:%231c1e23;stroke-opacity:.32;stroke-width:1.21}.l{fill:%231c1e23}@media (prefers-color-scheme:dark){.i,.t{stroke:%23e9ebef}.f,.l{fill:%23e9ebef}.a{stroke:%2382a4ff}.af{fill:%2382a4ff}.bg{fill:%2316191f}}</style><g transform="translate(8.45 7.00) scale(0.824)"><g transform="rotate(38 24 24)"><path class="i" d="M22 30c-.4-3.2-2-5.6-4-4.9-1.7.6-1.1 3.2-1.6 4.9-3.3.2-5.2 3.1-4.4 6.6.8 3.6 4.4 6 9.7 5.6 1.2-.1 2-.1 3.2.1 5.6.6 9.4-1.6 10-5.3.4-2.6-1-4.6-3.5-4.9-.4-2.6.4-5.3-1.4-6.2-2-1-3.6 1.6-4 4.1Z"/><path class="i" d="M23 30V6.5M25.5 30V6.5"/><path class="i" d="M22 6.5l.6-3.5h3.6l.4 3.5Z"/><path class="af" d="M21.2 33.4h5.6v1.8h-5.6zM21.2 37h5.6v1.8h-5.6z"/></g></g><path class="l" d="M4.01 12.5H4.91V10.66H5.84L6.83 12.5H7.84L6.75 10.5C7.34 10.27 7.65 9.77 7.65 9.08C7.65 8.13 7.04 7.48 5.88 7.48H4.01ZM4.91 9.91V8.23H5.75C6.43 8.23 6.73 8.55 6.73 9.08C6.73 9.62 6.43 9.91 5.75 9.91ZM11.08 12.57C12.39 12.57 13.38 11.61 13.38 9.99C13.38 8.37 12.39 7.41 11.08 7.41C9.76 7.41 8.77 8.37 8.77 9.99C8.77 11.61 9.76 12.57 11.08 12.57ZM11.08 11.76C10.25 11.76 9.67 11.13 9.67 9.99C9.67 8.84 10.25 8.21 11.08 8.21C11.89 8.21 12.47 8.84 12.47 9.99C12.47 11.14 11.89 11.76 11.08 11.76ZM16.79 12.57C17.98 12.57 18.77 11.79 18.91 10.83H18C17.88 11.42 17.4 11.76 16.8 11.76C15.98 11.76 15.39 11.14 15.39 9.99C15.39 8.85 15.98 8.21 16.8 8.21C17.4 8.21 17.89 8.55 18 9.15H18.91C18.75 8.05 17.89 7.41 16.79 7.41C15.48 7.41 14.49 8.37 14.49 9.99C14.49 11.61 15.47 12.57 16.79 12.57ZM20.15 12.5H21.05V10.99L21.73 10.25L23.26 12.5H24.32L22.36 9.65L24.29 7.48H23.17L21.85 8.98C21.52 9.36 21.27 9.68 21.04 10.04L21.05 8.97V7.48H20.15Z"/></svg>%0A';
|
|
54
|
+
|
|
55
|
+
// ../tokens/assets/instruments/drum.svg
|
|
56
|
+
var drum_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M2.5 7.6c0-1 2.5-1.8 5.5-1.8s5.5.8 5.5 1.8v4.6c0 1.1-2.5 1.9-5.5 1.9s-5.5-.8-5.5-1.9Z"/><path d="M2.8 2 6.8 6.2M13.2 2 9.2 6.2" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>%0A';
|
|
57
|
+
|
|
58
|
+
// ../tokens/assets/instruments/guitar.svg
|
|
59
|
+
var guitar_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><g transform="rotate(40 8 8)"><path d="M8 7.2c-1.5 0-2.4.9-2.2 2.1-1.2.4-1.8 1.4-1.6 2.6.3 1.6 1.8 2.6 3.8 2.6s3.5-1 3.8-2.6c.2-1.2-.4-2.2-1.6-2.6.2-1.2-.7-2.1-2.2-2.1Z"/><rect x="7.3" y="2.4" width="1.4" height="6" rx=".4"/><path d="M6.8.8h2.4l-.3 2.2H7.1Z"/></g></svg>%0A';
|
|
60
|
+
|
|
61
|
+
// ../tokens/assets/instruments/keys.svg
|
|
62
|
+
var keys_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 4h11A1.5 1.5 0 0 1 15 5.5v5a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 1 10.5v-5A1.5 1.5 0 0 1 2.5 4Zm-.3 1.2v5.6h2.6V5.2Zm3 0v5.6h2.6V5.2Zm3 0v5.6h2.6V5.2Zm3 0v5.6h2.6V5.2Z"/><path d="M4.2 5.2h1.6v3.2H4.2zM7.2 5.2h1.6v3.2H7.2zM10.2 5.2h1.6v3.2h-1.6z"/></svg>%0A';
|
|
63
|
+
|
|
64
|
+
// ../tokens/assets/instruments/sax.svg
|
|
65
|
+
var sax_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M6.6 2.4v7.8c0 2.6 1.6 4.2 3.7 4.2 1.9 0 3.2-1.4 3.2-3.4V9.6" fill="none" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.2 8.6h4l-.6 1.7h-2.8Z"/><path d="M6.6 2.4c0-1-1.3-1.4-2.7-.8" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>%0A';
|
|
66
|
+
|
|
67
|
+
// ../tokens/assets/instruments/trumpet.svg
|
|
68
|
+
var trumpet_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M1.4 8.8h8.6" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M9.4 7.4 14.6 4.4v8.8l-5.2-3Z"/><path d="M3.8 9.2v2.2c0 .6.4 1 1 1h3.2c.6 0 1-.4 1-1V9.2" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M4.6 5.4v2.6M6.6 5.4v2.6M8.6 5.4v2.6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>%0A';
|
|
69
|
+
|
|
70
|
+
// ../tokens/assets/instruments/violin.svg
|
|
71
|
+
var violin_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><g transform="rotate(-28 8 8)"><path d="M8 5.2c-2.3 0-2.9 1.4-2.3 2.6.4.8.3 1.2-.4 1.9-1.3 1.3-.8 4.6 2.7 4.6s4-3.3 2.7-4.6c-.7-.7-.8-1.1-.4-1.9.6-1.2 0-2.6-2.3-2.6Z"/><rect x="7.3" y="1.8" width="1.4" height="4" rx=".5"/><circle cx="8" cy="1.7" r="1.1"/><path d="M12.2 3.6v8.8" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></g></svg>%0A';
|
|
72
|
+
|
|
73
|
+
// src/ui.tsx
|
|
74
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
75
|
+
function ErrorNote({ children, retry }) {
|
|
76
|
+
if (!children) return null;
|
|
77
|
+
const note = /* @__PURE__ */ jsx("div", { className: "band-plugin-react-error", children });
|
|
78
|
+
if (!retry) return note;
|
|
79
|
+
return /* @__PURE__ */ jsxs("div", { className: "band-plugin-react-retry", role: "alert", children: [
|
|
80
|
+
note,
|
|
81
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "btn sm", onClick: retry, children: "\u91CD\u8BD5" })
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
84
|
+
function InfoNote({ children }) {
|
|
85
|
+
if (!children) return null;
|
|
86
|
+
return /* @__PURE__ */ jsx("div", { className: "band-plugin-react-info", children });
|
|
87
|
+
}
|
|
88
|
+
function PaneHeader({ title, children }) {
|
|
89
|
+
return /* @__PURE__ */ jsxs("div", { className: "band-plugin-react-pane-head", children: [
|
|
90
|
+
/* @__PURE__ */ jsx("h2", { className: "band-plugin-react-pane-title", children: title }),
|
|
91
|
+
children
|
|
92
|
+
] });
|
|
93
|
+
}
|
|
94
|
+
function avatarTone(id, order) {
|
|
95
|
+
const i = order?.indexOf(id) ?? -1;
|
|
96
|
+
if (i >= 0) return i % 5 + 1;
|
|
97
|
+
let h = 2166136261;
|
|
98
|
+
for (const c of id) {
|
|
99
|
+
h ^= c.codePointAt(0) ?? 0;
|
|
100
|
+
h = Math.imul(h, 16777619);
|
|
101
|
+
}
|
|
102
|
+
h ^= h >>> 16;
|
|
103
|
+
h = Math.imul(h, 2246822507);
|
|
104
|
+
h ^= h >>> 13;
|
|
105
|
+
return (h >>> 0) % 5 + 1;
|
|
106
|
+
}
|
|
107
|
+
function memberOrder(members) {
|
|
108
|
+
return members.filter((m) => m.actor.kind === "human").map((m) => m.actor.id);
|
|
109
|
+
}
|
|
110
|
+
function avatarInitial(name) {
|
|
111
|
+
const first = Array.from(name.trim())[0];
|
|
112
|
+
if (!first) return "?";
|
|
113
|
+
const up = first.toUpperCase();
|
|
114
|
+
return Array.from(up).length === 1 ? up : first;
|
|
115
|
+
}
|
|
116
|
+
function Avatar({
|
|
117
|
+
id,
|
|
118
|
+
name,
|
|
119
|
+
agent = false,
|
|
120
|
+
instrument,
|
|
121
|
+
size = "sm",
|
|
122
|
+
decorative = false,
|
|
123
|
+
order
|
|
124
|
+
}) {
|
|
125
|
+
const cls = `av${size === "md" ? "" : ` ${size}`}${agent ? " bot" : ""}`;
|
|
126
|
+
const a11y = decorative ? { "aria-hidden": true } : { role: "img", "aria-label": name };
|
|
127
|
+
return /* @__PURE__ */ jsx(
|
|
128
|
+
"span",
|
|
129
|
+
{
|
|
130
|
+
className: cls,
|
|
131
|
+
title: name,
|
|
132
|
+
style: agent ? void 0 : { background: `var(--av${avatarTone(id, order)})` },
|
|
133
|
+
...a11y,
|
|
134
|
+
children: agent && instrument ? /* @__PURE__ */ jsx(
|
|
135
|
+
"span",
|
|
136
|
+
{
|
|
137
|
+
className: "band-plugin-react-instrument",
|
|
138
|
+
"aria-hidden": "true",
|
|
139
|
+
style: { ["--band-instrument"]: cssUrl(INSTRUMENT_SRC[instrument]) }
|
|
140
|
+
}
|
|
141
|
+
) : agent ? /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ jsx("ellipse", { cx: "8", cy: "8.4", rx: "5.6", ry: "3.7", transform: "rotate(-20 8 8.4)" }) }) : avatarInitial(name)
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function Glyph({ kind, bg = false }) {
|
|
146
|
+
return /* @__PURE__ */ jsx("span", { className: `glyph ${kind}${bg ? " bgwork" : ""}`.trim(), "aria-hidden": "true" });
|
|
147
|
+
}
|
|
148
|
+
function agentInstrument(id, members) {
|
|
149
|
+
const peers = members.filter((m) => m.actor.kind === "agent").map((m) => m.actor.id);
|
|
150
|
+
return instrumentOf(id, peers);
|
|
151
|
+
}
|
|
152
|
+
function AgentAvatar({
|
|
153
|
+
id,
|
|
154
|
+
members,
|
|
155
|
+
size = "xs",
|
|
156
|
+
decorative = false
|
|
157
|
+
}) {
|
|
158
|
+
const list = members ?? [];
|
|
159
|
+
const name = list.find((m) => m.actor.id === id)?.displayName ?? agentDisplayName(id);
|
|
160
|
+
const instrument = agentInstrument(id, list);
|
|
161
|
+
return /* @__PURE__ */ jsx(
|
|
162
|
+
Avatar,
|
|
163
|
+
{
|
|
164
|
+
id,
|
|
165
|
+
name,
|
|
166
|
+
agent: true,
|
|
167
|
+
size,
|
|
168
|
+
decorative,
|
|
169
|
+
...instrument ? { instrument } : {}
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
var INSTRUMENTS = ["sax", "keys", "guitar", "drum", "trumpet", "violin"];
|
|
174
|
+
var INSTRUMENT_SRC = {
|
|
175
|
+
sax: sax_default,
|
|
176
|
+
keys: keys_default,
|
|
177
|
+
guitar: guitar_default,
|
|
178
|
+
drum: drum_default,
|
|
179
|
+
trumpet: trumpet_default,
|
|
180
|
+
violin: violin_default
|
|
181
|
+
};
|
|
182
|
+
function cssUrl(src) {
|
|
183
|
+
return `url("${src.replace(/"/g, "'")}")`;
|
|
184
|
+
}
|
|
185
|
+
function fnv1a(s) {
|
|
186
|
+
let h = 2166136261;
|
|
187
|
+
for (const c of s) {
|
|
188
|
+
h ^= c.codePointAt(0) ?? 0;
|
|
189
|
+
h = Math.imul(h, 16777619);
|
|
190
|
+
}
|
|
191
|
+
return h >>> 0;
|
|
192
|
+
}
|
|
193
|
+
function instrumentOf(name, peers) {
|
|
194
|
+
const isRondo = (n) => n.toLowerCase() === "rondo";
|
|
195
|
+
if (isRondo(name)) return void 0;
|
|
196
|
+
const all = [...new Set([...peers, name].filter((n) => !isRondo(n)))].sort();
|
|
197
|
+
const taken = /* @__PURE__ */ new Set();
|
|
198
|
+
for (const n of all) {
|
|
199
|
+
const start = fnv1a(n) % INSTRUMENTS.length;
|
|
200
|
+
let pick = INSTRUMENTS[start];
|
|
201
|
+
for (let k = 0; k < INSTRUMENTS.length; k++) {
|
|
202
|
+
const cand = INSTRUMENTS[(start + k) % INSTRUMENTS.length];
|
|
203
|
+
if (!taken.has(cand)) {
|
|
204
|
+
pick = cand;
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if (taken.size < INSTRUMENTS.length) taken.add(pick);
|
|
209
|
+
if (n === name) return pick;
|
|
210
|
+
}
|
|
211
|
+
return void 0;
|
|
212
|
+
}
|
|
213
|
+
var GENRE_FULL_SRC = {
|
|
214
|
+
classical: classical_default,
|
|
215
|
+
jazz: jazz_default,
|
|
216
|
+
pop: pop_default,
|
|
217
|
+
rock: rock_default,
|
|
218
|
+
electronic: electronic_default,
|
|
219
|
+
folk: folk_default,
|
|
220
|
+
hiphop: hiphop_default,
|
|
221
|
+
guoyue: guoyue_default
|
|
222
|
+
};
|
|
223
|
+
var GENRE_COMPACT_SRC = {
|
|
224
|
+
classical: classical_compact_default,
|
|
225
|
+
jazz: jazz_compact_default,
|
|
226
|
+
pop: pop_compact_default,
|
|
227
|
+
rock: rock_compact_default,
|
|
228
|
+
electronic: electronic_compact_default,
|
|
229
|
+
folk: folk_compact_default,
|
|
230
|
+
hiphop: hiphop_compact_default,
|
|
231
|
+
guoyue: guoyue_compact_default
|
|
232
|
+
};
|
|
233
|
+
function WorkshopIcon({
|
|
234
|
+
icon,
|
|
235
|
+
size = 20,
|
|
236
|
+
tile = false
|
|
237
|
+
}) {
|
|
238
|
+
return drawWorkshopIcon(GENRE_COMPACT_SRC, icon, size, tile);
|
|
239
|
+
}
|
|
240
|
+
function WorkshopEmblem({ icon, size = 48 }) {
|
|
241
|
+
return drawWorkshopIcon(size >= 48 ? GENRE_FULL_SRC : GENRE_COMPACT_SRC, icon, size, true);
|
|
242
|
+
}
|
|
243
|
+
function drawWorkshopIcon(srcs, icon, size, tile) {
|
|
244
|
+
const genre = icon?.startsWith("genre:") ? icon.slice("genre:".length) : void 0;
|
|
245
|
+
const known = genre && WORKSHOP_GENRES.includes(genre);
|
|
246
|
+
const src = known ? srcs[genre] : void 0;
|
|
247
|
+
const inner = src ? /* @__PURE__ */ jsx("img", { className: "band-plugin-react-wsicon", src, width: size, height: size, alt: "" }) : /* @__PURE__ */ jsx(BandMark, { className: "band-plugin-react-wsicon", size });
|
|
248
|
+
if (!tile) return inner;
|
|
249
|
+
return /* @__PURE__ */ jsx(
|
|
250
|
+
"span",
|
|
251
|
+
{
|
|
252
|
+
className: `band-plugin-react-wstile${size >= 28 ? " is-large" : ""}`,
|
|
253
|
+
style: { ["--band-wstile"]: `${size}px` },
|
|
254
|
+
"aria-hidden": "true",
|
|
255
|
+
children: inner
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
function BandMark({ size = 20, className }) {
|
|
260
|
+
return /* @__PURE__ */ jsxs(
|
|
261
|
+
"svg",
|
|
262
|
+
{
|
|
263
|
+
className,
|
|
264
|
+
viewBox: "0 0 24 24",
|
|
265
|
+
width: size,
|
|
266
|
+
height: size,
|
|
267
|
+
"aria-hidden": "true",
|
|
268
|
+
focusable: "false",
|
|
269
|
+
children: [
|
|
270
|
+
/* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.75", children: [
|
|
271
|
+
/* @__PURE__ */ jsx("path", { d: "M7.67 18.81V6.95" }),
|
|
272
|
+
/* @__PURE__ */ jsx("path", { d: "M14.67 15.71V4.65" }),
|
|
273
|
+
/* @__PURE__ */ jsx("path", { d: "M21.67 12.61V2.35" })
|
|
274
|
+
] }),
|
|
275
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M6.8 5.69L22.55 0.51V3.61L6.8 8.79Z" }),
|
|
276
|
+
/* @__PURE__ */ jsx(
|
|
277
|
+
"ellipse",
|
|
278
|
+
{
|
|
279
|
+
fill: "currentColor",
|
|
280
|
+
cx: "5.4",
|
|
281
|
+
cy: "19.4",
|
|
282
|
+
rx: "3.25",
|
|
283
|
+
ry: "2.2",
|
|
284
|
+
transform: "rotate(-20 5.4 19.4)"
|
|
285
|
+
}
|
|
286
|
+
),
|
|
287
|
+
/* @__PURE__ */ jsx(
|
|
288
|
+
"ellipse",
|
|
289
|
+
{
|
|
290
|
+
fill: "var(--accent)",
|
|
291
|
+
cx: "12.4",
|
|
292
|
+
cy: "16.3",
|
|
293
|
+
rx: "3.25",
|
|
294
|
+
ry: "2.2",
|
|
295
|
+
transform: "rotate(-20 12.4 16.3)"
|
|
296
|
+
}
|
|
297
|
+
),
|
|
298
|
+
/* @__PURE__ */ jsx(
|
|
299
|
+
"ellipse",
|
|
300
|
+
{
|
|
301
|
+
fill: "currentColor",
|
|
302
|
+
cx: "19.4",
|
|
303
|
+
cy: "13.2",
|
|
304
|
+
rx: "3.25",
|
|
305
|
+
ry: "2.2",
|
|
306
|
+
transform: "rotate(-20 19.4 13.2)"
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
function LogoLockup() {
|
|
314
|
+
return /* @__PURE__ */ jsxs("svg", { className: "logo lockup", viewBox: "0 0 111 28", role: "img", "aria-label": "Band", children: [
|
|
315
|
+
/* @__PURE__ */ jsx("g", { className: "staff", children: [5, 9.5, 14, 18.5, 23].map((y) => /* @__PURE__ */ jsx("line", { x1: "1", y1: y, x2: "39", y2: y }, y)) }),
|
|
316
|
+
/* @__PURE__ */ jsx("path", { className: "st", d: "M12.36 20.12V7.65" }),
|
|
317
|
+
/* @__PURE__ */ jsx("path", { className: "st", d: "M21.86 15.62V5.35" }),
|
|
318
|
+
/* @__PURE__ */ jsx("path", { className: "st", d: "M31.36 11.12V3.05" }),
|
|
319
|
+
/* @__PURE__ */ jsx("path", { d: "M11.54 6.4L32.19 1.4V4.3L11.54 9.3Z" }),
|
|
320
|
+
/* @__PURE__ */ jsx("ellipse", { cx: "10", cy: "20.75", rx: "3.3", ry: "2.15", transform: "rotate(-20 10 20.75)" }),
|
|
321
|
+
/* @__PURE__ */ jsx(
|
|
322
|
+
"ellipse",
|
|
323
|
+
{
|
|
324
|
+
className: "ag",
|
|
325
|
+
cx: "19.5",
|
|
326
|
+
cy: "16.25",
|
|
327
|
+
rx: "3.3",
|
|
328
|
+
ry: "2.15",
|
|
329
|
+
transform: "rotate(-20 19.5 16.25)"
|
|
330
|
+
}
|
|
331
|
+
),
|
|
332
|
+
/* @__PURE__ */ jsx("ellipse", { cx: "29", cy: "11.75", rx: "3.3", ry: "2.15", transform: "rotate(-20 29 11.75)" }),
|
|
333
|
+
/* @__PURE__ */ jsx("text", { className: "wm", x: "46", y: "23", children: "Band" })
|
|
334
|
+
] });
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// src/settings/kit.tsx
|
|
338
|
+
import {
|
|
339
|
+
useEffect,
|
|
340
|
+
useId,
|
|
341
|
+
useRef
|
|
342
|
+
} from "react";
|
|
343
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
344
|
+
function settingsLinkHandler(go, target) {
|
|
345
|
+
return (e) => {
|
|
346
|
+
if (!go) return;
|
|
347
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
348
|
+
e.preventDefault();
|
|
349
|
+
go(target);
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
function SettingsLayout({
|
|
353
|
+
navLabel,
|
|
354
|
+
title,
|
|
355
|
+
obj,
|
|
356
|
+
crumb,
|
|
357
|
+
groups,
|
|
358
|
+
current,
|
|
359
|
+
view = "page",
|
|
360
|
+
back,
|
|
361
|
+
backMobile,
|
|
362
|
+
onNavigate,
|
|
363
|
+
mainRef,
|
|
364
|
+
children
|
|
365
|
+
}) {
|
|
366
|
+
return /* @__PURE__ */ jsxs2("div", { className: "band-sf", "data-view": view, children: [
|
|
367
|
+
/* @__PURE__ */ jsxs2("nav", { className: "band-sf-nav", "aria-label": navLabel, children: [
|
|
368
|
+
/* @__PURE__ */ jsxs2("div", { className: "band-sf-head", children: [
|
|
369
|
+
crumb ? /* @__PURE__ */ jsx2("div", { className: "band-sf-crumb", children: crumb }) : null,
|
|
370
|
+
/* @__PURE__ */ jsx2("span", { className: "band-sf-title", children: title }),
|
|
371
|
+
!crumb && obj ? /* @__PURE__ */ jsx2("span", { className: "band-sf-obj", children: obj }) : null
|
|
372
|
+
] }),
|
|
373
|
+
groups.map((g) => /* @__PURE__ */ jsxs2("div", { className: "band-sf-grp", children: [
|
|
374
|
+
/* @__PURE__ */ jsx2("span", { children: g.group }),
|
|
375
|
+
g.sections.map((s) => /* @__PURE__ */ jsxs2(
|
|
376
|
+
"a",
|
|
377
|
+
{
|
|
378
|
+
href: s.href,
|
|
379
|
+
"aria-current": s.slug === current ? "page" : void 0,
|
|
380
|
+
onClick: settingsLinkHandler(onNavigate, s),
|
|
381
|
+
children: [
|
|
382
|
+
s.title,
|
|
383
|
+
s.glyph ?? null,
|
|
384
|
+
/* @__PURE__ */ jsx2("span", { className: "band-sf-chev", "aria-hidden": "true", children: "\u203A" })
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
s.slug
|
|
388
|
+
))
|
|
389
|
+
] }, g.group))
|
|
390
|
+
] }),
|
|
391
|
+
/* @__PURE__ */ jsx2("div", { className: "band-sf-scroll", children: /* @__PURE__ */ jsxs2("main", { className: "band-sf-main", "data-view": view, ref: mainRef, children: [
|
|
392
|
+
view === "page" && back ? /* @__PURE__ */ jsx2(SettingsBack, { target: back, onNavigate }) : null,
|
|
393
|
+
view === "page" && backMobile ? /* @__PURE__ */ jsx2(SettingsBack, { target: backMobile, onNavigate, mobileOnly: true }) : null,
|
|
394
|
+
children
|
|
395
|
+
] }) })
|
|
396
|
+
] });
|
|
397
|
+
}
|
|
398
|
+
function SettingsBack({
|
|
399
|
+
target,
|
|
400
|
+
onNavigate,
|
|
401
|
+
mobileOnly = false
|
|
402
|
+
}) {
|
|
403
|
+
return /* @__PURE__ */ jsxs2(
|
|
404
|
+
"a",
|
|
405
|
+
{
|
|
406
|
+
className: mobileOnly ? "band-sf-back band-sf-back-m" : "band-sf-back",
|
|
407
|
+
href: target.href,
|
|
408
|
+
onClick: settingsLinkHandler(onNavigate, target),
|
|
409
|
+
children: [
|
|
410
|
+
/* @__PURE__ */ jsx2("span", { "aria-hidden": "true", children: "\u2039" }),
|
|
411
|
+
" ",
|
|
412
|
+
target.label
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
function SettingsHead({
|
|
418
|
+
title,
|
|
419
|
+
desc,
|
|
420
|
+
action
|
|
421
|
+
}) {
|
|
422
|
+
return /* @__PURE__ */ jsxs2("div", { className: "band-sf-h", children: [
|
|
423
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
424
|
+
/* @__PURE__ */ jsx2("h1", { children: title }),
|
|
425
|
+
desc ? /* @__PURE__ */ jsx2("p", { children: desc }) : null
|
|
426
|
+
] }),
|
|
427
|
+
action ? /* @__PURE__ */ jsx2("div", { className: "band-sf-h-a", children: action }) : null
|
|
428
|
+
] });
|
|
429
|
+
}
|
|
430
|
+
function SettingsRows({ label, children }) {
|
|
431
|
+
return /* @__PURE__ */ jsx2("ul", { className: "band-sf-rows", "aria-label": label, children });
|
|
432
|
+
}
|
|
433
|
+
var warnedExtra = false;
|
|
434
|
+
function warnExtraWithOpen() {
|
|
435
|
+
const env = globalThis.process?.env?.NODE_ENV;
|
|
436
|
+
if (warnedExtra || env === void 0 || env === "production") return;
|
|
437
|
+
warnedExtra = true;
|
|
438
|
+
console.warn("SettingsRow\uFF1Aextra \u4E0E onOpen \u4E0D\u8981\u540C\u65F6\u7ED9\uFF0C\u6574\u884C\u94FE\u63A5\u4F1A\u76D6\u4F4F\u5C55\u5F00\u7684\u90A3\u4E00\u5757");
|
|
439
|
+
}
|
|
440
|
+
function SettingsRow({
|
|
441
|
+
title,
|
|
442
|
+
tags,
|
|
443
|
+
meta,
|
|
444
|
+
actions,
|
|
445
|
+
leading,
|
|
446
|
+
href,
|
|
447
|
+
onOpen,
|
|
448
|
+
mono = false,
|
|
449
|
+
isNew = false,
|
|
450
|
+
extra
|
|
451
|
+
}) {
|
|
452
|
+
if (extra && onOpen) warnExtraWithOpen();
|
|
453
|
+
const name = /* @__PURE__ */ jsx2("b", { className: mono ? "band-sf-mono" : void 0, children: title });
|
|
454
|
+
const cls = ["band-sf-row", leading ? "has-lead" : "", isNew ? "is-new" : ""].filter(Boolean).join(" ");
|
|
455
|
+
return /* @__PURE__ */ jsxs2("li", { className: cls, children: [
|
|
456
|
+
leading ? /* @__PURE__ */ jsx2("div", { className: "band-sf-row-l", children: leading }) : null,
|
|
457
|
+
/* @__PURE__ */ jsxs2("div", { className: "band-sf-row-t", children: [
|
|
458
|
+
onOpen ? /* @__PURE__ */ jsx2(
|
|
459
|
+
"a",
|
|
460
|
+
{
|
|
461
|
+
className: "band-sf-row-link",
|
|
462
|
+
href: href ?? "#",
|
|
463
|
+
onClick: (e) => {
|
|
464
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
465
|
+
e.preventDefault();
|
|
466
|
+
onOpen();
|
|
467
|
+
},
|
|
468
|
+
children: name
|
|
469
|
+
}
|
|
470
|
+
) : name,
|
|
471
|
+
tags
|
|
472
|
+
] }),
|
|
473
|
+
/* @__PURE__ */ jsxs2("div", { className: "band-sf-row-a", children: [
|
|
474
|
+
actions,
|
|
475
|
+
onOpen ? /* @__PURE__ */ jsx2("span", { className: "band-sf-chev", "aria-hidden": "true", children: "\u203A" }) : null
|
|
476
|
+
] }),
|
|
477
|
+
meta && meta.length > 0 ? /* @__PURE__ */ jsx2("div", { className: "band-sf-row-m", children: meta.map((m, i) => (
|
|
478
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: 元信息是一串短句,没有稳定 id
|
|
479
|
+
/* @__PURE__ */ jsx2("span", { children: m }, i)
|
|
480
|
+
)) }) : null,
|
|
481
|
+
extra ? /* @__PURE__ */ jsx2("div", { className: "band-sf-row-x", children: extra }) : null
|
|
482
|
+
] });
|
|
483
|
+
}
|
|
484
|
+
function SettingsFacts({ items }) {
|
|
485
|
+
return /* @__PURE__ */ jsx2("dl", { className: "band-sf-facts", children: items.map((f) => /* @__PURE__ */ jsxs2("div", { className: "band-sf-fact", children: [
|
|
486
|
+
/* @__PURE__ */ jsx2("dt", { children: f.key }),
|
|
487
|
+
/* @__PURE__ */ jsx2("dd", { children: f.value })
|
|
488
|
+
] }, f.key)) });
|
|
489
|
+
}
|
|
490
|
+
function SettingsSection({
|
|
491
|
+
title,
|
|
492
|
+
desc,
|
|
493
|
+
children
|
|
494
|
+
}) {
|
|
495
|
+
return /* @__PURE__ */ jsxs2("section", { className: "band-sf-sec", "aria-label": title, children: [
|
|
496
|
+
/* @__PURE__ */ jsx2("h2", { children: title }),
|
|
497
|
+
desc ? /* @__PURE__ */ jsx2("p", { children: desc }) : null,
|
|
498
|
+
children
|
|
499
|
+
] });
|
|
500
|
+
}
|
|
501
|
+
function SettingsSingle({ label, children }) {
|
|
502
|
+
return /* @__PURE__ */ jsx2("section", { className: "band-sf-one", "aria-label": label, children });
|
|
503
|
+
}
|
|
504
|
+
function SettingsChoices({ children }) {
|
|
505
|
+
return /* @__PURE__ */ jsx2("div", { className: "band-sf-choices", children });
|
|
506
|
+
}
|
|
507
|
+
function SettingsDanger({ children }) {
|
|
508
|
+
return /* @__PURE__ */ jsxs2("section", { className: "band-sf-dz", "aria-label": "\u5371\u9669\u64CD\u4F5C", children: [
|
|
509
|
+
/* @__PURE__ */ jsx2("h2", { children: "\u5371\u9669\u64CD\u4F5C" }),
|
|
510
|
+
children
|
|
511
|
+
] });
|
|
512
|
+
}
|
|
513
|
+
function SettingsDangerRow({
|
|
514
|
+
title,
|
|
515
|
+
note,
|
|
516
|
+
action
|
|
517
|
+
}) {
|
|
518
|
+
return /* @__PURE__ */ jsxs2("div", { className: "band-sf-dz-r", children: [
|
|
519
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
520
|
+
/* @__PURE__ */ jsx2("b", { children: title }),
|
|
521
|
+
/* @__PURE__ */ jsx2("span", { children: note })
|
|
522
|
+
] }),
|
|
523
|
+
action
|
|
524
|
+
] });
|
|
525
|
+
}
|
|
526
|
+
function SettingsLoading({ text }) {
|
|
527
|
+
return /* @__PURE__ */ jsx2("output", { className: "band-sf-load", children: /* @__PURE__ */ jsxs2("span", { className: "tuning", children: [
|
|
528
|
+
/* @__PURE__ */ jsxs2("svg", { viewBox: "0 0 80 55", "aria-hidden": "true", children: [
|
|
529
|
+
/* @__PURE__ */ jsx2("line", { x1: "0", y1: "12", x2: "80", y2: "12" }),
|
|
530
|
+
/* @__PURE__ */ jsx2("line", { x1: "0", y1: "22", x2: "80", y2: "22" }),
|
|
531
|
+
/* @__PURE__ */ jsx2("line", { x1: "0", y1: "32", x2: "80", y2: "32" }),
|
|
532
|
+
/* @__PURE__ */ jsx2("line", { x1: "0", y1: "42", x2: "80", y2: "42" }),
|
|
533
|
+
/* @__PURE__ */ jsx2("line", { x1: "0", y1: "52", x2: "80", y2: "52" }),
|
|
534
|
+
/* @__PURE__ */ jsx2("circle", { cx: "20", cy: "37", r: "4.6", fill: "var(--ink)" }),
|
|
535
|
+
/* @__PURE__ */ jsx2("circle", { cx: "40", cy: "27", r: "4.6", fill: "var(--accent)" }),
|
|
536
|
+
/* @__PURE__ */ jsx2("circle", { cx: "60", cy: "17", r: "4.6", fill: "var(--ink)" })
|
|
537
|
+
] }),
|
|
538
|
+
/* @__PURE__ */ jsx2("span", { children: text })
|
|
539
|
+
] }) });
|
|
540
|
+
}
|
|
541
|
+
function SettingsEmpty({ children, action }) {
|
|
542
|
+
return /* @__PURE__ */ jsxs2("div", { className: "band-sf-empty rest", children: [
|
|
543
|
+
/* @__PURE__ */ jsx2("i", {}),
|
|
544
|
+
/* @__PURE__ */ jsx2("p", { children }),
|
|
545
|
+
action ?? null
|
|
546
|
+
] });
|
|
547
|
+
}
|
|
548
|
+
function SettingsReadError({ children, retry }) {
|
|
549
|
+
return /* @__PURE__ */ jsx2("div", { className: "band-sf-error", children: /* @__PURE__ */ jsx2(ErrorNote, { retry, children }) });
|
|
550
|
+
}
|
|
551
|
+
function SettingsNoAccess({
|
|
552
|
+
title,
|
|
553
|
+
children,
|
|
554
|
+
action
|
|
555
|
+
}) {
|
|
556
|
+
const id = useId();
|
|
557
|
+
return /* @__PURE__ */ jsxs2("section", { className: "band-settings-no-access", "aria-labelledby": id, children: [
|
|
558
|
+
/* @__PURE__ */ jsx2("h2", { id, children: title }),
|
|
559
|
+
/* @__PURE__ */ jsx2("p", { children }),
|
|
560
|
+
action ? /* @__PURE__ */ jsx2("button", { type: "button", className: "btn", onClick: action.onClick, children: action.label }) : null
|
|
561
|
+
] });
|
|
562
|
+
}
|
|
563
|
+
function SettingsNotice({ text }) {
|
|
564
|
+
return /* @__PURE__ */ jsx2("output", { className: "sr-only", "aria-live": "polite", children: text });
|
|
565
|
+
}
|
|
566
|
+
function SettingsSaved({ text = "\u5DF2\u4FDD\u5B58" }) {
|
|
567
|
+
return /* @__PURE__ */ jsx2("output", { className: "band-sf-ok", children: text });
|
|
568
|
+
}
|
|
569
|
+
function SettingsDialog({
|
|
570
|
+
title,
|
|
571
|
+
children,
|
|
572
|
+
actions,
|
|
573
|
+
onClose
|
|
574
|
+
}) {
|
|
575
|
+
const ref = useRef(null);
|
|
576
|
+
const titleId = useId();
|
|
577
|
+
useEffect(() => {
|
|
578
|
+
const el = ref.current;
|
|
579
|
+
const opener = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
580
|
+
if (el && !el.open) {
|
|
581
|
+
if (typeof el.showModal === "function") el.showModal();
|
|
582
|
+
else el.setAttribute("open", "");
|
|
583
|
+
}
|
|
584
|
+
return () => {
|
|
585
|
+
if (opener?.isConnected) opener.focus();
|
|
586
|
+
};
|
|
587
|
+
}, []);
|
|
588
|
+
return /* @__PURE__ */ jsxs2(
|
|
589
|
+
"dialog",
|
|
590
|
+
{
|
|
591
|
+
ref,
|
|
592
|
+
className: "band-sf-dialog",
|
|
593
|
+
"aria-labelledby": titleId,
|
|
594
|
+
onCancel: (e) => {
|
|
595
|
+
e.preventDefault();
|
|
596
|
+
onClose();
|
|
597
|
+
},
|
|
598
|
+
children: [
|
|
599
|
+
/* @__PURE__ */ jsx2("h2", { id: titleId, children: title }),
|
|
600
|
+
children,
|
|
601
|
+
/* @__PURE__ */ jsx2("div", { className: "band-sf-acts band-sf-acts-end", children: actions })
|
|
602
|
+
]
|
|
603
|
+
}
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
function SettingsForm({
|
|
607
|
+
label,
|
|
608
|
+
onSubmit,
|
|
609
|
+
children
|
|
610
|
+
}) {
|
|
611
|
+
return /* @__PURE__ */ jsx2(
|
|
612
|
+
"form",
|
|
613
|
+
{
|
|
614
|
+
className: "band-sf-form",
|
|
615
|
+
"aria-label": label,
|
|
616
|
+
onSubmit: (e) => {
|
|
617
|
+
e.preventDefault();
|
|
618
|
+
onSubmit?.();
|
|
619
|
+
},
|
|
620
|
+
children
|
|
621
|
+
}
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
function SettingsField({
|
|
625
|
+
label,
|
|
626
|
+
required = false,
|
|
627
|
+
optional = false,
|
|
628
|
+
hint,
|
|
629
|
+
error,
|
|
630
|
+
count,
|
|
631
|
+
over = false,
|
|
632
|
+
children
|
|
633
|
+
}) {
|
|
634
|
+
const id = useId();
|
|
635
|
+
const noteId = `${id}-note`;
|
|
636
|
+
const note = error ?? hint;
|
|
637
|
+
const props = { id };
|
|
638
|
+
if (note) props["aria-describedby"] = `${noteId}-t`;
|
|
639
|
+
if (error) props["aria-invalid"] = true;
|
|
640
|
+
return /* @__PURE__ */ jsxs2("div", { className: "band-sf-fld", children: [
|
|
641
|
+
/* @__PURE__ */ jsxs2("label", { htmlFor: id, children: [
|
|
642
|
+
label,
|
|
643
|
+
required ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
644
|
+
" ",
|
|
645
|
+
/* @__PURE__ */ jsx2("span", { className: "band-sf-req", children: "\u5FC5\u586B" })
|
|
646
|
+
] }) : optional ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
647
|
+
" ",
|
|
648
|
+
/* @__PURE__ */ jsx2("span", { className: "band-sf-optional", children: "\u9009\u586B" })
|
|
649
|
+
] }) : null
|
|
650
|
+
] }),
|
|
651
|
+
children(props),
|
|
652
|
+
note || count ? (
|
|
653
|
+
// 出错的话当场播报:校验被拦时焦点不动,读屏不会自己走到这一行
|
|
654
|
+
/* @__PURE__ */ jsxs2(
|
|
655
|
+
"p",
|
|
656
|
+
{
|
|
657
|
+
className: error ? "field-note err" : "field-note",
|
|
658
|
+
id: noteId,
|
|
659
|
+
role: error ? "alert" : void 0,
|
|
660
|
+
children: [
|
|
661
|
+
note ? /* @__PURE__ */ jsx2("span", { id: `${noteId}-t`, children: note }) : null,
|
|
662
|
+
count ? /* @__PURE__ */ jsx2("span", { className: over ? "field-count over" : "field-count", children: count }) : null
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
)
|
|
666
|
+
) : null
|
|
667
|
+
] });
|
|
668
|
+
}
|
|
669
|
+
function SettingsActions({
|
|
670
|
+
children,
|
|
671
|
+
end = false
|
|
672
|
+
}) {
|
|
673
|
+
return /* @__PURE__ */ jsx2("div", { className: end ? "band-sf-acts band-sf-acts-end" : "band-sf-acts", children });
|
|
674
|
+
}
|
|
675
|
+
function SettingsSaveState({
|
|
676
|
+
saving,
|
|
677
|
+
saved,
|
|
678
|
+
failed,
|
|
679
|
+
missing
|
|
680
|
+
}) {
|
|
681
|
+
if (failed)
|
|
682
|
+
return /* @__PURE__ */ jsx2("p", { className: "band-sf-err", role: "alert", children: failed });
|
|
683
|
+
if (saved) return /* @__PURE__ */ jsx2(SettingsSaved, { text: saved === true ? "\u5DF2\u4FDD\u5B58" : saved });
|
|
684
|
+
const text = saving ?? missing;
|
|
685
|
+
if (!text) return /* @__PURE__ */ jsx2("span", { className: "band-sf-state", "aria-live": "polite" });
|
|
686
|
+
return /* @__PURE__ */ jsx2("span", { className: "band-sf-state", "aria-live": "polite", children: text });
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
export {
|
|
690
|
+
ErrorNote,
|
|
691
|
+
InfoNote,
|
|
692
|
+
PaneHeader,
|
|
693
|
+
avatarTone,
|
|
694
|
+
memberOrder,
|
|
695
|
+
avatarInitial,
|
|
696
|
+
Avatar,
|
|
697
|
+
Glyph,
|
|
698
|
+
agentInstrument,
|
|
699
|
+
AgentAvatar,
|
|
700
|
+
INSTRUMENTS,
|
|
701
|
+
instrumentOf,
|
|
702
|
+
WorkshopIcon,
|
|
703
|
+
WorkshopEmblem,
|
|
704
|
+
BandMark,
|
|
705
|
+
LogoLockup,
|
|
706
|
+
settingsLinkHandler,
|
|
707
|
+
SettingsLayout,
|
|
708
|
+
SettingsBack,
|
|
709
|
+
SettingsHead,
|
|
710
|
+
SettingsRows,
|
|
711
|
+
SettingsRow,
|
|
712
|
+
SettingsFacts,
|
|
713
|
+
SettingsSection,
|
|
714
|
+
SettingsSingle,
|
|
715
|
+
SettingsChoices,
|
|
716
|
+
SettingsDanger,
|
|
717
|
+
SettingsDangerRow,
|
|
718
|
+
SettingsLoading,
|
|
719
|
+
SettingsEmpty,
|
|
720
|
+
SettingsReadError,
|
|
721
|
+
SettingsNoAccess,
|
|
722
|
+
SettingsNotice,
|
|
723
|
+
SettingsSaved,
|
|
724
|
+
SettingsDialog,
|
|
725
|
+
SettingsForm,
|
|
726
|
+
SettingsField,
|
|
727
|
+
SettingsActions,
|
|
728
|
+
SettingsSaveState
|
|
729
|
+
};
|