@kanyun-ai-infra/band-plugin-react 0.1.2 → 0.2.0
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-ER2ITOG5.js +2425 -0
- package/dist/components.d.ts +297 -2
- package/dist/components.js +33 -4
- package/dist/index.d.ts +3 -153
- package/dist/index.js +472 -1245
- package/package.json +5 -5
- package/dist/chunk-HX653UQN.js +0 -729
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* band:inject-css */ /* @kanyun-ai-infra/band-plugin-react 的样式(scripts/tsup-inject-css.ts) */
|
|
2
2
|
if (typeof document !== "undefined" && document.head) {
|
|
3
|
-
const css = "/* src/ui.css */\n.band-plugin-react-error {\n font-size: var(--fs-ui);\n padding: 7px 10px;\n border-radius: 8px;\n background: var(--bad-soft);\n color: var(--bad);\n font-family: var(--mono);\n}\n.band-plugin-react-info {\n font-size: var(--fs-ui);\n padding: 7px 10px;\n border-radius: 8px;\n background: var(--panel);\n color: var(--muted);\n}\n.band-plugin-react-retry {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 10px;\n}\n.band-plugin-react-failed {\n display: grid;\n gap: 6px;\n justify-items: start;\n margin: auto;\n padding: 8px 10px;\n border-radius: var(--r);\n background: var(--bad-soft);\n color: var(--bad);\n font-size: var(--fs-ui);\n}\n.band-plugin-react-failed p {\n margin: 0;\n}\n.band-plugin-react-failed-title {\n font-weight: 600;\n}\n.band-plugin-react-failed-reason {\n overflow-wrap: anywhere;\n}\n.band-plugin-react-pane-head {\n padding: 6px 14px 6px 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n min-height: 36px;\n}\n.band-plugin-react-pane-title {\n margin: 0;\n font-size: var(--fs-dense);\n color: var(--muted);\n font-weight: 500;\n letter-spacing: 0.02em;\n}\n.band-plugin-react-wsicon {\n flex: none;\n display: block;\n}\n.band-plugin-react-wstile {\n --band-wstile: 16px;\n width: var(--band-wstile);\n height: var(--band-wstile);\n display: inline-grid;\n place-items: center;\n flex: none;\n border-radius: calc(var(--band-wstile) * 0.26);\n background: var(--panel);\n box-shadow: var(--shadow-card);\n}\n.band-plugin-react-wstile > :where(.band-plugin-react-wsicon) {\n width: 82%;\n height: 82%;\n}\n.band-plugin-react-wstile:where(.is-large) {\n border-radius: var(--r-xl);\n}\n.band-plugin-react-wstile:where(.is-large) > :where(.band-plugin-react-wsicon) {\n width: 76%;\n height: 76%;\n}\n.band-plugin-react-instrument {\n width: 72%;\n height: 72%;\n background: currentColor;\n -webkit-mask: var(--band-instrument) center / contain no-repeat;\n mask: var(--band-instrument) center / contain no-repeat;\n}\n.band-plugin-react-model-hint {\n margin: 0;\n}\n.band-plugin-react-target-repo {\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin: 0;\n font-size: var(--fs-meta);\n line-height: 1.5;\n color: var(--muted);\n}\n.band-plugin-react-target-repo code {\n font-family: var(--mono);\n color: var(--ink);\n}\n.band-plugin-react-target-repo a {\n color: var(--accent-text);\n}\n.band-plugin-react-target-repo-request {\n align-self: flex-start;\n}\n.band-plugin-react-target-repo-err {\n color: var(--bad);\n}\n.band-plugin-react-first-delivery {\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex-basis: 100%;\n padding: 12px;\n border: 1px solid var(--rule);\n border-radius: var(--r-lg);\n background: var(--panel);\n margin: 0;\n min-width: 0;\n}\n.band-plugin-react-first-delivery-slot {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: var(--fs-meta);\n}\n.band-plugin-react-first-delivery-pick,\n.band-plugin-react-first-delivery-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n}\n.band-plugin-react-first-delivery-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.band-plugin-react-first-delivery-name {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-first-delivery-size {\n color: var(--muted);\n}\n.band-plugin-react-first-delivery-missing {\n margin: 0;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-first-delivery .btn {\n align-self: flex-start;\n}\n.band-plugin-react-no-key {\n margin: 0;\n font-size: var(--fs-ui);\n color: var(--bad);\n}\n\n/* src/controls.css */\n.band-plugin-react-combo-field,\n.band-plugin-react-tags {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n align-items: center;\n padding: 5px 8px;\n border-radius: var(--r);\n background: var(--panel);\n box-shadow: inset 0 0 0 1px var(--control-edge);\n}\n.band-plugin-react-combo-field > :where(.field),\n.band-plugin-react-tags > :where(.field) {\n flex: 1 1 90px;\n min-width: 90px;\n width: auto;\n}\n.band-plugin-react-combo-picked {\n list-style: none;\n margin: 0 0 7px;\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n}\n.band-plugin-react-combo-chip,\n.band-plugin-react-filter-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 22px;\n padding: 0 4px 0 8px;\n border-radius: 999px;\n background: var(--fill-2);\n color: var(--ink);\n font-size: var(--fs-meta);\n white-space: nowrap;\n}\n.band-plugin-react-filter-chip {\n background: var(--accent-soft);\n color: var(--accent-text);\n}\n.band-plugin-react-combo-chip > button,\n.band-plugin-react-filter-chip > button {\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n line-height: 1;\n padding: 0 3px;\n border-radius: 999px;\n opacity: 0.85;\n}\n.band-plugin-react-combo-chip > button:where(:focus-visible),\n.band-plugin-react-filter-chip > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n opacity: 1;\n}\n.band-plugin-react-combo-pop {\n position: absolute;\n left: 0;\n right: 0;\n top: calc(100% + 6px);\n z-index: var(--layer-pop);\n display: grid;\n gap: 1px;\n max-height: 236px;\n overflow: auto;\n overscroll-behavior: contain;\n padding: 5px;\n border-radius: var(--r-lg);\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n}\n.band-plugin-react-combo-group {\n padding: 6px 8px 3px;\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-combo-opt {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-row);\n text-align: left;\n}\n.band-plugin-react-combo-opt:where(.is-active) {\n background: var(--fill-2);\n}\n.band-plugin-react-combo-opt:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-combo-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-combo-label > mark {\n background: var(--accent-soft);\n color: var(--ink);\n border-radius: 2px;\n}\n.band-plugin-react-combo-meta {\n margin-left: auto;\n flex: none;\n font-family: var(--mono);\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-combo-plus {\n display: inline-grid;\n place-items: center;\n width: 20px;\n height: 20px;\n flex: none;\n border-radius: 50%;\n background: var(--fill-3);\n color: var(--muted);\n font-size: var(--fs-badge);\n}\n.band-plugin-react-combo-empty {\n padding: 8px;\n text-align: center;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 22px;\n padding: 0 4px 0 8px;\n border-radius: 999px;\n background: var(--fill-2);\n color: var(--ink);\n font-size: var(--fs-meta);\n white-space: nowrap;\n}\n.band-plugin-react-tag:where([data-dup]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-tag > button {\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n line-height: 1;\n padding: 0 3px;\n border-radius: 999px;\n opacity: 0.85;\n}\n.band-plugin-react-tag > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n opacity: 1;\n}\n.band-plugin-react-tag-hint {\n margin: 5px 0 0;\n min-height: 16px;\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-tag-hint:where([data-err]) {\n color: var(--bad);\n}\n.band-plugin-react-filter {\n display: grid;\n gap: 2px;\n min-width: 0;\n}\n.band-plugin-react-filter-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n margin-bottom: 8px;\n}\n.band-plugin-react-filter-clear {\n margin-left: auto;\n border: 0;\n background: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-meta);\n text-decoration: underline;\n}\n.band-plugin-react-filter-clear:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n border-radius: 4px;\n}\n.band-plugin-react-filter-group {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 7px 8px 3px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-badge);\n text-align: left;\n}\n.band-plugin-react-filter-group:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-filter-group::before {\n content: \"\\25b8\";\n width: 11px;\n flex: none;\n font-size: var(--fs-meta);\n line-height: 1;\n}\n.band-plugin-react-filter-group[aria-expanded=true]::before {\n content: \"\\25be\";\n}\n.band-plugin-react-filter-group-count {\n margin-left: auto;\n font-family: var(--mono);\n}\n.band-plugin-react-filter-opt {\n padding: 4px 8px;\n border-radius: var(--r-sm);\n}\n.band-plugin-react-filter-opt:where(:hover) {\n background: var(--fill);\n}\n.band-plugin-react-filter-count {\n margin-left: auto;\n font-family: var(--mono);\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-filter-empty {\n padding: 8px;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n\n/* src/prompt/prompt.css */\n.band-plugin-react-prompt {\n position: relative;\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n gap: 6px;\n min-width: 0;\n}\n.band-plugin-react-prompt-box {\n position: relative;\n min-width: 0;\n}\n.band-plugin-react-prompt-box.composer {\n grid-template-columns: minmax(0, 1fr);\n}\n.band-plugin-react-prompt-box:where([data-variant=comment] *, [data-variant=reply] *) {\n border-radius: var(--r-lg);\n}\n.band-plugin-react-prompt-box.composer textarea:where([data-variant=comment] *, [data-variant=reply] *) {\n font-size: var(--fs-body);\n padding: 10px 12px 2px;\n}\n.band-plugin-react-prompt-note {\n padding: 6px 12px 12px;\n font-size: var(--fs-ui);\n color: var(--muted);\n}\n.band-plugin-react-prompt-notice {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n font-size: var(--fs-dense);\n padding: 6px 6px 6px 10px;\n border-radius: var(--r);\n background: var(--fill);\n color: var(--muted);\n}\n.band-plugin-react-prompt-notice:where([role=alert]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-prompt-notice > span {\n flex: 1;\n min-width: 0;\n}\n.band-plugin-react-prompt-notice-lines {\n display: flex;\n flex-direction: column;\n gap: 2px;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-prompt-tray {\n list-style: none;\n margin: 0;\n padding: 12px 12px 0;\n display: flex;\n gap: 8px;\n overflow-x: auto;\n scrollbar-width: thin;\n}\n.band-plugin-react-prompt-card {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n border-radius: var(--r-lg);\n background: var(--sunk);\n max-width: 220px;\n}\n.band-plugin-react-prompt-card:where([data-state=failed]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-prompt-open {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n padding: 6px 26px 6px 6px;\n border: 0;\n background: none;\n color: inherit;\n text-align: left;\n font: inherit;\n border-radius: inherit;\n}\n.band-plugin-react-prompt-open:where(:disabled) {\n cursor: default;\n}\n.band-plugin-react-prompt-open:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-prompt-open:where([data-kind=image] *) {\n padding: 0;\n}\n.band-plugin-react-prompt-thumb {\n width: auto;\n min-width: 40px;\n max-width: 140px;\n height: 56px;\n object-fit: cover;\n border-radius: var(--r-lg);\n display: block;\n}\n.band-plugin-react-prompt-icon {\n flex: none;\n width: 36px;\n height: 40px;\n border-radius: var(--r-sm);\n background: var(--panel);\n display: grid;\n place-items: center;\n font-family: var(--mono);\n font-size: 10.5px;\n color: var(--muted);\n box-shadow: 0 0 0 var(--hairline) var(--rule);\n}\n.band-plugin-react-prompt-meta {\n display: grid;\n min-width: 0;\n text-align: left;\n}\n.band-plugin-react-prompt-name {\n font-size: var(--fs-ui);\n color: var(--ink);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-prompt-file {\n text-autospace: no-autospace;\n}\n.band-plugin-react-prompt-d {\n font-size: var(--fs-meta);\n color: var(--muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-prompt-quote {\n display: -webkit-box;\n white-space: normal;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n.band-plugin-react-prompt-d:where([data-state=failed] *) {\n color: var(--bad);\n}\n.band-plugin-react-prompt-progress {\n position: absolute;\n inset: 0;\n display: grid;\n place-items: center;\n border-radius: inherit;\n background: color-mix(in srgb, var(--panel) 55%, transparent);\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-progress:where([data-kind=file] *) {\n inset: auto 30px auto auto;\n background: none;\n}\n.band-plugin-react-prompt-retry {\n border: 0;\n background: none;\n color: var(--bad);\n font: inherit;\n font-size: var(--fs-meta);\n padding: 2px 6px;\n margin: 0 22px 0 6px;\n border-radius: var(--r-sm);\n}\n.band-plugin-react-prompt-retry:where(:hover) {\n background: var(--fill-2);\n}\n.band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card > *) {\n position: absolute;\n top: 3px;\n right: 3px;\n}\n.band-plugin-react-prompt-x {\n width: 20px;\n height: 20px;\n display: inline-grid;\n place-items: center;\n border: 0;\n border-radius: 50%;\n background: none;\n color: var(--muted);\n font-size: var(--fs-body);\n line-height: 1;\n flex: none;\n transition: background var(--sixteenth) var(--ease), color var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-x:where(:hover, :focus-visible) {\n background: var(--fill-3);\n color: var(--ink);\n outline: none;\n}\n.band-plugin-react-prompt-x:where([data-kind=image] > *) {\n background: color-mix(in srgb, var(--panel) 85%, transparent);\n color: var(--ink);\n}\n.band-plugin-react-prompt-chips {\n list-style: none;\n margin: 0;\n padding: 4px 14px 0;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.band-plugin-react-prompt-chip.chip {\n background: var(--fill-2);\n color: var(--ink);\n padding: 1px 2px 1px 8px;\n gap: 3px;\n}\n.band-plugin-react-prompt-chip:where([data-kind=cap]) {\n background: var(--accent-soft);\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-chip:where([data-kind=conn]) {\n padding-right: 8px;\n}\n.band-plugin-react-prompt-sigil {\n font-family: var(--mono);\n color: var(--muted);\n}\n.band-plugin-react-prompt-sigil:where([data-kind=cap] *) {\n color: inherit;\n}\n.band-plugin-react-prompt-cands.mention {\n position: absolute;\n z-index: 25;\n left: 10px;\n right: 10px;\n bottom: calc(100% + 6px);\n max-height: 280px;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n.band-plugin-react-prompt-cands.mention:where([data-variant=comment] *, [data-variant=reply] *) {\n position: static;\n margin: 6px 8px;\n box-shadow: 0 0 0 var(--hairline) var(--rule);\n}\n.band-plugin-react-prompt-cands-h {\n font-size: var(--fs-caption);\n color: var(--muted);\n padding: 4px 8px 2px;\n}\n.band-plugin-react-prompt-empty {\n font-size: var(--fs-ui);\n color: var(--muted);\n padding: 6px 8px 8px;\n}\n.band-plugin-react-prompt-option:where([aria-selected=true]) {\n background: var(--sunk);\n}\n.band-plugin-react-prompt-bar {\n position: relative;\n min-width: 0;\n}\n.band-plugin-react-prompt-bar.composer-bar {\n flex-wrap: nowrap;\n}\n.band-plugin-react-prompt-anchor {\n position: relative;\n display: inline-flex;\n}\n.band-plugin-react-prompt-capbtn.btn {\n font-family: var(--mono);\n font-size: var(--fs-dense);\n}\n.band-plugin-react-prompt-hint {\n font-size: var(--fs-meta);\n color: var(--muted);\n padding: 0 8px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n@media (max-width: 860px) {\n .band-plugin-react-prompt-hint:not([data-notice]) {\n display: none;\n }\n}\n.band-plugin-react-prompt-send:where([data-waiting]) {\n background: var(--fill-3);\n color: var(--ink);\n}\n.band-plugin-react-prompt-ring {\n display: block;\n}\n.band-plugin-react-prompt-menu {\n position: absolute;\n z-index: 26;\n left: 0;\n bottom: calc(100% + 6px);\n min-width: 248px;\n max-width: min(320px, calc(100vw - 32px));\n max-height: 360px;\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: 4px;\n border-radius: 10px;\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n display: grid;\n outline: none;\n}\n.band-plugin-react-prompt-item {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 7px 8px;\n border: 0;\n border-radius: 7px;\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-ui);\n text-align: left;\n text-decoration: none;\n}\n.band-plugin-react-prompt-item:where(:hover, :focus-visible) {\n background: var(--sunk);\n outline: none;\n}\n.band-plugin-react-prompt-item:where(:disabled) {\n color: var(--muted);\n background: none;\n opacity: 0.42;\n}\n.band-plugin-react-prompt-meta:where(.band-plugin-react-prompt-item > *) {\n flex: 1;\n}\n.band-plugin-react-prompt-check {\n width: 14px;\n flex: none;\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-sep {\n border: 0;\n height: var(--hairline);\n background: var(--rule);\n margin: 4px 6px;\n}\n.band-plugin-react-prompt-group {\n font-size: var(--fs-caption);\n color: var(--muted);\n padding: 4px 8px 2px;\n}\n.band-plugin-react-prompt-switch {\n flex: none;\n width: 28px;\n height: 16px;\n border-radius: 999px;\n background: var(--fill-3);\n position: relative;\n transition: background var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-switch::after {\n content: \"\";\n position: absolute;\n top: 2px;\n left: 2px;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background: var(--panel);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n transition: transform var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-switch:where([data-on]) {\n background: var(--primary);\n}\n.band-plugin-react-prompt-switch:where([data-on])::after {\n transform: translateX(12px);\n}\n.band-plugin-react-prompt-source {\n margin: 6px 10px 0;\n padding: 8px;\n border-radius: var(--r-lg);\n background: var(--sunk);\n display: grid;\n gap: 6px;\n}\n.band-plugin-react-prompt-source-h {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--fs-ui);\n}\n:where(.band-plugin-react-prompt-source-h, .band-plugin-react-prompt-preview-h) > .grow {\n flex: 1;\n}\n.band-plugin-react-prompt-drop {\n position: absolute;\n inset: 0;\n z-index: 24;\n display: grid;\n place-items: center;\n padding: 12px;\n text-align: center;\n border-radius: inherit;\n background: color-mix(in srgb, var(--accent-soft) 92%, transparent);\n color: var(--accent-text);\n font-size: var(--fs-ui);\n box-shadow: inset 0 0 0 1.5px var(--accent);\n pointer-events: none;\n}\n.band-plugin-react-prompt-preview {\n border: 0;\n padding: 10px;\n border-radius: var(--r-xl);\n background: var(--panel);\n color: var(--ink);\n box-shadow: var(--shadow-pop);\n max-width: min(960px, calc(100vw - 32px));\n max-height: calc(100vh - 64px);\n}\n.band-plugin-react-prompt-preview::backdrop {\n background: rgba(10, 12, 16, 0.5);\n}\n.band-plugin-react-prompt-preview-h {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0 0 8px 4px;\n}\n.band-plugin-react-prompt-big {\n display: block;\n max-width: 100%;\n max-height: calc(100vh - 140px);\n margin: 0 auto;\n border-radius: var(--r);\n}\n.band-plugin-react-prompt-pre {\n margin: 0;\n padding: 10px 12px;\n border-radius: var(--r);\n background: var(--sunk);\n font-family: var(--mono);\n font-size: var(--fs-meta);\n white-space: pre-wrap;\n overflow: auto;\n overscroll-behavior: contain;\n max-height: calc(100vh - 160px);\n min-width: min(560px, calc(100vw - 64px));\n}\n@media (hover: hover) {\n .band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card > *) {\n opacity: 0;\n }\n .band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card:hover > *, .band-plugin-react-prompt-card:focus-within > *) {\n opacity: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .band-plugin-react-prompt-x,\n .band-plugin-react-prompt-switch,\n .band-plugin-react-prompt-switch::after {\n transition: none;\n }\n}\n.band-plugin-react-prompt-box.composer textarea[aria-invalid=true] {\n box-shadow: inset 0 -2px 0 var(--bad);\n}\n.band-plugin-react-prompt-box.composer textarea[aria-invalid=true]::placeholder {\n color: var(--bad);\n}\n.band-plugin-react-prompt-import {\n display: grid;\n gap: 8px;\n padding: 12px;\n}\n.band-plugin-react-prompt-import p {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-plugin-react-prompt-import-actions {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n}\n.band-plugin-react-prompt-card[data-compressed] {\n max-width: 320px;\n}\n.band-plugin-react-prompt-card[data-compressed] .band-plugin-react-prompt-open {\n padding: 6px 26px 6px 6px;\n}\n\n/* src/message/message.css */\n.band-plugin-react-msg {\n position: relative;\n display: grid;\n gap: 6px;\n min-width: 0;\n border-radius: var(--r);\n outline: none;\n}\n.band-plugin-react-msg:where(.fit) {\n justify-self: start;\n width: fit-content;\n max-width: 100%;\n}\n.band-plugin-react-msg:where(:focus-visible) {\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-msg-bar {\n justify-self: end;\n z-index: 2;\n display: flex;\n gap: 2px;\n padding: 3px;\n background: var(--panel);\n border-radius: var(--r);\n box-shadow: var(--shadow-pop);\n opacity: 0;\n visibility: hidden;\n transition: opacity var(--sixteenth) var(--ease) var(--eighth), visibility 0s linear calc(var(--eighth) + var(--sixteenth));\n}\n:where(.band-plugin-react-msg:focus-within, .band-plugin-react-msg.open) > .band-plugin-react-msg-bar {\n opacity: 1;\n visibility: visible;\n transition: opacity var(--sixteenth) var(--ease);\n}\n@media (hover: hover) {\n :where(.band-plugin-react-msg:hover) > .band-plugin-react-msg-bar {\n opacity: 1;\n visibility: visible;\n transition: opacity var(--sixteenth) var(--ease);\n }\n}\n@media (hover: none) {\n .band-plugin-react-msg-bar {\n display: none;\n }\n}\n.band-plugin-react-msg-ib {\n width: 28px;\n height: 28px;\n display: inline-grid;\n place-items: center;\n border: 0;\n border-radius: 6px;\n background: none;\n color: var(--muted);\n padding: 0;\n transition: background var(--sixteenth) var(--ease);\n}\n.band-plugin-react-msg-ib:where(:hover, .on) {\n background: var(--fill-2);\n color: var(--ink);\n}\n.band-plugin-react-msg-ib:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n color: var(--ink);\n}\n.band-plugin-react-msg-ib:where(.done) {\n color: var(--ok);\n}\n:where(.band-plugin-react-msg-ib, .band-plugin-react-msg-mi, .band-plugin-react-msg-chip) svg {\n width: 16px;\n height: 16px;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-linejoin: round;\n flex: none;\n}\n.band-plugin-react-msg-menu {\n position: fixed;\n z-index: 1000;\n width: 248px;\n max-width: calc(100vw - 32px);\n display: grid;\n gap: 2px;\n padding: 8px;\n background: var(--panel);\n border-radius: var(--r-lg);\n box-shadow: var(--shadow-pop);\n animation: band-plugin-react-msg-in var(--sixteenth) var(--ease);\n}\n@keyframes band-plugin-react-msg-in {\n from {\n opacity: 0;\n transform: translateY(-2px);\n }\n}\n.band-plugin-react-msg-emo {\n margin: 0;\n border: 0;\n min-width: 0;\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n gap: 2px;\n padding: 2px 0 4px;\n}\n.band-plugin-react-msg-emo > button {\n height: 34px;\n display: grid;\n place-items: center;\n border: 0;\n border-radius: var(--r);\n background: none;\n font-size: 20px;\n line-height: 1;\n padding: 0;\n transition: background var(--sixteenth) var(--ease), transform var(--sixteenth) var(--ease);\n}\n.band-plugin-react-msg-emo > button:where(:hover) {\n background: var(--fill-2);\n transform: scale(1.08);\n}\n.band-plugin-react-msg-emo > button:where(.mine) {\n background: var(--accent-soft);\n box-shadow: inset 0 0 0 1px var(--accent);\n}\n.band-plugin-react-msg-emo > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-msg-sep {\n height: var(--hairline);\n margin: 2px 0 4px;\n background: var(--rule);\n}\n.band-plugin-react-msg-mi {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-body);\n text-align: left;\n}\n.band-plugin-react-msg-mi svg {\n stroke: var(--muted);\n}\n.band-plugin-react-msg-mi:where(:hover, :focus-visible) {\n outline: none;\n background: var(--fill-2);\n}\n.band-plugin-react-msg-rx {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n}\n.band-plugin-react-msg-chip {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n height: 26px;\n padding: 0 9px;\n border: 0;\n border-radius: 999px;\n background: var(--fill);\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-ui);\n font-variant-numeric: tabular-nums;\n transition: background var(--sixteenth) var(--ease), opacity var(--sixteenth) var(--ease);\n}\nbutton.band-plugin-react-msg-chip:where(:hover) {\n background: var(--fill-2);\n}\n.band-plugin-react-msg-chip:where(.mine) {\n background: var(--accent-soft);\n color: var(--accent-text);\n box-shadow: inset 0 0 0 1px var(--accent);\n}\n.band-plugin-react-msg-chip:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-msg-chip:where(.pending) {\n opacity: 0.6;\n}\n.band-plugin-react-msg-chip:where(.add) {\n padding: 0 7px;\n color: var(--muted);\n opacity: 0;\n}\n:where(.band-plugin-react-msg:hover, .band-plugin-react-msg:focus-within, .band-plugin-react-msg.open) .band-plugin-react-msg-chip:where(.add) {\n opacity: 1;\n}\n@media (hover: none) {\n .band-plugin-react-msg-chip:where(.add) {\n opacity: 1;\n }\n}\n.band-plugin-react-msg-e {\n font-size: var(--fs-lead);\n line-height: 1;\n}\n.band-plugin-react-msg-tip {\n position: absolute;\n left: 0;\n bottom: calc(100% + 6px);\n z-index: 4;\n white-space: nowrap;\n padding: 4px 8px;\n border-radius: var(--r-sm);\n background: var(--ink);\n color: var(--panel);\n font-size: var(--fs-meta);\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n transition: opacity var(--sixteenth) var(--ease);\n}\n:where(.band-plugin-react-msg-chip:hover, .band-plugin-react-msg-chip:focus-visible) > .band-plugin-react-msg-tip {\n opacity: 1;\n visibility: visible;\n}\n.band-plugin-react-msg-err {\n display: flex;\n gap: 6px;\n align-items: center;\n font-size: var(--fs-meta);\n color: var(--bad);\n}\n.band-plugin-react-msg-err > button {\n border: 0;\n padding: 0;\n background: none;\n color: var(--ink);\n font: inherit;\n text-decoration: underline;\n}\n.band-plugin-react-msg-sheetwrap {\n position: fixed;\n inset: 0;\n z-index: 1000;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n gap: 12px;\n}\n.band-plugin-react-msg-scrim {\n position: absolute;\n inset: 0;\n border: 0;\n padding: 0;\n background: color-mix(in srgb, black 36%, transparent);\n animation: band-plugin-react-msg-fade var(--eighth) var(--ease);\n}\n.band-plugin-react-msg-lifted {\n position: relative;\n margin: 0 16px;\n max-height: 36vh;\n overflow: hidden;\n padding: 12px;\n display: grid;\n gap: 6px;\n background: var(--panel);\n border-radius: var(--r-lg);\n box-shadow: var(--shadow-pop);\n pointer-events: none;\n}\n.band-plugin-react-msg-sheet {\n position: relative;\n display: grid;\n gap: 2px;\n padding: 8px 12px calc(20px + env(safe-area-inset-bottom));\n background: var(--panel);\n border-radius: var(--r-xl) var(--r-xl) 0 0;\n box-shadow: var(--shadow-pop);\n animation: band-plugin-react-msg-rise var(--eighth) var(--ease);\n}\n.band-plugin-react-msg-grab {\n width: 36px;\n height: 4px;\n margin: 0 auto 10px;\n border-radius: 2px;\n background: var(--fill-3);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo {\n gap: 8px;\n padding-bottom: 10px;\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo > button {\n height: 44px;\n font-size: 24px;\n background: var(--fill);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo > button:where(.mine) {\n background: var(--accent-soft);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-mi {\n padding: 12px 8px;\n font-size: var(--fs-lead);\n}\n@keyframes band-plugin-react-msg-fade {\n from {\n opacity: 0;\n }\n}\n@keyframes band-plugin-react-msg-rise {\n from {\n transform: translateY(24px);\n opacity: 0;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n :where(.band-plugin-react-msg-menu, .band-plugin-react-msg-sheet, .band-plugin-react-msg-scrim, .band-plugin-react-msg-bar, .band-plugin-react-msg-chip) {\n animation: none;\n transition: none;\n }\n}\n.band-plugin-react-atts {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin: 0;\n padding: 0;\n list-style: none;\n min-width: 0;\n}\n.band-plugin-react-atts-thumb {\n display: block;\n padding: 0;\n border: 0;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n overflow: hidden;\n cursor: zoom-in;\n}\n.band-plugin-react-atts-thumb:where(:hover) {\n box-shadow: 0 0 0 1px var(--rule-strong);\n}\n.band-plugin-react-atts-thumb:where(:hover) .band-plugin-react-atts-img {\n filter: brightness(0.94);\n}\n.band-plugin-react-atts-thumb:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-atts-pending {\n display: block;\n width: 96px;\n height: 72px;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n}\n.band-plugin-react-atts-pending[data-compact] {\n width: 40px;\n height: 30px;\n}\n.band-plugin-react-atts-img {\n display: block;\n max-width: 160px;\n max-height: 120px;\n min-width: 48px;\n min-height: 48px;\n object-fit: contain;\n}\n.band-plugin-react-atts-img:where([data-loading]) {\n width: 96px;\n height: 72px;\n background: var(--sunk);\n}\n.band-plugin-react-atts:where([data-compact]) {\n align-items: center;\n gap: 4px;\n}\n.band-plugin-react-atts:where([data-compact]) .band-plugin-react-atts-img {\n width: auto;\n height: 32px;\n min-width: 32px;\n max-width: 96px;\n min-height: 0;\n object-fit: cover;\n object-position: left top;\n border-radius: var(--r-sm);\n box-shadow: 0 0 0 1px var(--rule);\n}\n.band-plugin-react-atts-more {\n font-size: var(--fs-dense);\n color: var(--muted);\n}\n.band-plugin-react-atts-file {\n display: inline-grid;\n grid-template-columns: auto minmax(0, 1fr) auto auto;\n align-items: center;\n gap: 8px;\n max-width: 320px;\n padding: 6px 10px 6px 6px;\n border: 0;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-dense);\n text-align: left;\n cursor: pointer;\n}\n.band-plugin-react-atts-file:where(:hover):not([data-deleted]) {\n background: var(--panel);\n}\n.band-plugin-react-atts-file[data-deleted] {\n color: var(--muted);\n cursor: default;\n}\n.band-plugin-react-atts-file:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-atts-ext {\n display: grid;\n place-items: center;\n width: 32px;\n height: 32px;\n border-radius: var(--r-sm);\n background: var(--panel);\n color: var(--muted);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.02em;\n}\n.band-plugin-react-atts-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-autospace: no-autospace;\n}\n.band-plugin-react-atts-size,\n.band-plugin-react-atts-act,\n.band-plugin-react-atts-count {\n color: var(--muted);\n white-space: nowrap;\n}\n.band-plugin-react-atts-act {\n color: var(--accent-text);\n}\n.band-plugin-react-atts-wait {\n display: block;\n margin: 24px;\n color: var(--muted);\n}\n.band-plugin-react-atts-wait:where(div) {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* src/memory/memory.css */\n.band-plugin-react-memo {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n width: fit-content;\n max-width: 100%;\n box-sizing: border-box;\n margin-top: 2px;\n border: 0;\n border-radius: 7px;\n padding: 5px 8px;\n background: var(--fill);\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-dense);\n line-height: 1.5;\n text-align: left;\n cursor: pointer;\n transition: background var(--sixteenth) var(--ease), color var(--sixteenth) var(--ease);\n}\n.band-plugin-react-memo:where(:hover) {\n background: var(--fill-2);\n color: var(--ink);\n}\n.band-plugin-react-memo:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-memo > svg {\n flex: none;\n width: 14px;\n height: 14px;\n margin-top: 2px;\n fill: none;\n stroke: var(--muted);\n stroke-width: 1.4;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.band-plugin-react-memo > span {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-memo-rejected {\n display: block;\n color: var(--warn);\n}\n\n/* src/toast/toast.css */\n.band-plugin-react-toast-stack {\n position: fixed;\n right: 20px;\n bottom: calc(60px + env(safe-area-inset-bottom, 0px));\n z-index: var(--layer-pop);\n width: min(340px, calc(100vw - 40px));\n display: grid;\n gap: 8px;\n}\n.band-plugin-react-toast {\n display: grid;\n grid-template-columns: 16px minmax(0, 1fr) auto;\n gap: 10px;\n align-items: center;\n padding: 10px 12px;\n border-radius: var(--r-lg);\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n font-size: var(--fs-row);\n color: var(--ink);\n animation: band-plugin-react-toast-in var(--eighth) var(--ease);\n}\n@keyframes band-plugin-react-toast-in {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n.band-plugin-react-toast-again {\n animation: none;\n}\n.band-plugin-react-toast-icon {\n width: 16px;\n height: 16px;\n display: grid;\n place-items: center;\n border-radius: 50%;\n font-size: 10px;\n color: var(--panel);\n}\n.band-plugin-react-toast-icon:where(.ok) {\n background: var(--ok);\n}\n.band-plugin-react-toast-icon:where(.bad) {\n background: var(--bad);\n}\n.band-plugin-react-toast-icon:where(.busy) {\n border: 1.6px solid var(--accent);\n border-top-color: transparent;\n color: transparent;\n background: none;\n animation: band-plugin-react-toast-spin 900ms linear infinite;\n}\n@keyframes band-plugin-react-toast-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.band-plugin-react-toast-text {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-toast-detail {\n display: block;\n color: var(--muted);\n font-size: var(--fs-meta);\n overflow-wrap: anywhere;\n}\n.band-plugin-react-toast-act {\n font-size: var(--fs-meta);\n color: var(--ink);\n background: none;\n border: 0;\n font-family: inherit;\n text-decoration: underline;\n padding: 2px 4px;\n border-radius: 4px;\n}\n.band-plugin-react-toast-act:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n@media (prefers-reduced-motion: reduce) {\n .band-plugin-react-toast,\n .band-plugin-react-toast-icon:where(.busy) {\n animation: none;\n }\n}\n\n/* src/status/status.css */\n.band-plugin-react-status {\n display: grid;\n gap: 2px;\n min-width: 0;\n padding: 0 2px 0 4px;\n font-size: var(--fs-dense);\n color: var(--muted);\n}\n.band-plugin-react-status-head {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n color: var(--accent-text);\n}\n.band-plugin-react-status-who {\n font-weight: 600;\n}\n.band-plugin-react-status-context {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-status .band-plugin-react-status-glyph.glyph {\n --c: var(--accent);\n margin-left: 2px;\n}\n.band-plugin-react-status-spacer {\n flex: 1;\n}\n.band-plugin-react-status-elapsed {\n flex: none;\n color: var(--muted);\n font-variant-numeric: tabular-nums;\n}\n.band-plugin-react-status-note {\n padding-left: 22px;\n color: var(--ink);\n overflow-wrap: anywhere;\n}\n.band-plugin-react-status-action {\n padding-left: 22px;\n font-family: var(--mono);\n color: var(--muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-status-stall {\n padding-left: 22px;\n color: var(--warn);\n}\n.band-plugin-react-status-steps {\n display: grid;\n gap: 2px;\n margin: 0;\n padding: 0 0 0 22px;\n list-style: none;\n font-family: var(--mono);\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-status-steps > :where([data-state=done]) {\n color: var(--muted);\n}\n.band-plugin-react-status-steps > :where([data-state=now]) {\n color: var(--ink);\n}\n.band-plugin-react-status-stop {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n padding-left: 26px;\n font-size: var(--fs-dense);\n}\n.band-plugin-react-status-stop-note {\n color: var(--muted);\n}\n.band-plugin-react-stopped {\n margin: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n min-width: 0;\n padding: 0 2px 0 4px;\n font-size: var(--fs-row);\n color: var(--muted);\n}\n.band-plugin-react-stopped-text b {\n font-weight: 600;\n color: var(--ink);\n}\n.band-plugin-react-stopped-took {\n font-size: var(--fs-meta);\n font-variant-numeric: tabular-nums;\n}\n\n/* src/version-reference.css */\n.band-plugin-react-version-ref {\n display: inline-block;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n vertical-align: bottom;\n padding: 0;\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n text-align: left;\n}\n.band-plugin-react-version-ref:where(button) {\n cursor: pointer;\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.band-plugin-react-version-ref:where(:focus-visible) {\n outline: none;\n border-radius: var(--r-sm);\n box-shadow: 0 0 0 2px var(--accent);\n}\n\n/* src/settings/settings.css */\n.band-sf {\n display: grid;\n grid-template-columns: 216px minmax(0, 1fr);\n min-height: 0;\n height: 100%;\n}\n.band-sf-nav {\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n padding: 24px 12px 24px 20px;\n display: grid;\n gap: 16px;\n align-content: start;\n}\n.band-sf-head {\n display: grid;\n gap: 2px;\n min-width: 0;\n padding: 0 8px;\n}\n.band-sf-title {\n font-size: var(--fs-title);\n font-weight: 600;\n line-height: 1.3;\n}\n.band-sf-obj {\n font-size: var(--fs-ui);\n color: var(--muted);\n}\n.band-sf-grp {\n display: grid;\n gap: 1px;\n}\n.band-sf-grp > span {\n padding: 2px 8px;\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-grp a {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 6px 8px;\n border-radius: var(--r);\n color: var(--ink);\n text-decoration: none;\n font-size: var(--fs-row);\n}\n.band-sf-grp a:hover {\n background: var(--fill);\n}\n.band-sf-grp a[aria-current=page] {\n background: var(--fill-2);\n font-weight: 500;\n}\n.band-sf-grp a:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-grp a .band-sf-chev {\n display: none;\n color: var(--muted);\n}\n.band-sf-scroll {\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n}\n.band-sf-main {\n box-sizing: border-box;\n width: 100%;\n max-width: 824px;\n padding: 32px 32px 64px;\n display: grid;\n gap: 20px;\n align-content: start;\n}\n.band-sf-crumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n min-width: 0;\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-crumb-in {\n display: inline-flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n min-width: 0;\n}\n.band-sf-crumb-ws {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n white-space: nowrap;\n}\n.band-sf-crumb-ws > span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.band-sf-crumb a,\n.band-sf-crumb button {\n min-width: 0;\n border: 0;\n padding: 0;\n background: none;\n color: var(--muted);\n font: inherit;\n text-decoration: none;\n border-radius: 4px;\n overflow-wrap: anywhere;\n cursor: pointer;\n}\n.band-sf-crumb button {\n text-align: start;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-sf-crumb a:hover,\n.band-sf-crumb button:hover {\n color: var(--ink);\n}\n.band-sf-crumb a:focus-visible,\n.band-sf-crumb button:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-sf-back {\n display: inline-flex;\n align-self: start;\n justify-self: start;\n gap: 4px;\n color: var(--muted);\n text-decoration: none;\n font-size: var(--fs-ui);\n border-radius: 4px;\n}\n.band-sf-back-m {\n display: none;\n}\n.band-sf-back:hover {\n color: var(--ink);\n}\n.band-sf-back:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-h {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n}\n.band-sf-h > div {\n display: grid;\n gap: 4px;\n min-width: 0;\n}\n.band-sf-h h1 {\n margin: 0;\n font-size: var(--fs-h2);\n font-weight: 600;\n line-height: 1.3;\n}\n.band-sf-h p {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n max-width: 560px;\n}\n.band-sf-h-a {\n flex: none;\n}\n.band-sf-sec {\n display: grid;\n gap: 10px;\n}\n.band-sf-sec h2 {\n margin: 0;\n font-size: var(--fs-lead);\n font-weight: 600;\n}\n.band-sf-sec > p {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-sf-rows {\n display: grid;\n gap: 2px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.band-sf-row {\n position: relative;\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n gap: 2px 12px;\n align-items: center;\n padding: 10px 12px;\n margin: 0 -12px;\n border-radius: var(--r-lg);\n}\n.band-sf-row:hover {\n background: var(--fill);\n}\n.band-sf-row.is-new,\n.band-sf-row.is-new:hover {\n background: var(--ok-soft);\n}\n.band-sf-row-t {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px 8px;\n min-width: 0;\n}\n.band-sf-row-t b {\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n.band-sf-row-link {\n color: inherit;\n text-decoration: none;\n border-radius: 4px;\n}\n.band-sf-row-link::after {\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: var(--r-lg);\n}\n.band-sf-row-a {\n position: relative;\n z-index: 1;\n}\n.band-sf-row-link:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-row-m {\n grid-column: 1;\n display: flex;\n flex-wrap: wrap;\n gap: 2px 14px;\n color: var(--muted);\n font-size: var(--fs-dense);\n min-width: 0;\n}\n.band-sf-row-m > span {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-sf-row-a {\n grid-column: 2;\n grid-row: 1 / span 2;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.band-sf-row-a .btn {\n position: relative;\n z-index: 1;\n}\n.band-sf-chev {\n color: var(--muted);\n}\n.band-sf-mono {\n font-family: var(--mono);\n font-size: 0.92em;\n}\n.band-sf-facts {\n display: grid;\n gap: 6px 16px;\n margin: 0;\n font-size: var(--fs-ui);\n}\n.band-sf-fact {\n display: grid;\n grid-template-columns: 112px minmax(0, 1fr);\n gap: 16px;\n}\n.band-sf-facts dt {\n color: var(--muted);\n}\n.band-sf-facts dd {\n margin: 0;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-sf-dz {\n display: grid;\n gap: 10px;\n padding-top: 8px;\n}\n.band-sf-dz h2 {\n margin: 0;\n font-size: var(--fs-lead);\n font-weight: 600;\n}\n.band-sf-dz-r {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n}\n.band-sf-dz-r > div {\n display: grid;\n gap: 2px;\n min-width: 0;\n}\n.band-sf-dz-r span {\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-dz-r .btn {\n flex: none;\n}\n.band-sf-empty,\n.band-sf .band-sf-empty.rest {\n display: grid;\n justify-items: start;\n text-align: start;\n gap: 10px;\n padding: 24px 0;\n max-width: 480px;\n}\n.band-sf-empty p {\n margin: 0;\n color: var(--muted);\n}\n.band-sf-error {\n min-width: 0;\n}\n.band-sf-load {\n padding: 40px 0;\n display: grid;\n justify-items: start;\n}\n.band-sf-ok {\n margin: 0;\n color: var(--ok);\n font-size: var(--fs-ui);\n}\n.band-sf-muted {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-sf-banner {\n margin: 0;\n padding: 10px 12px;\n border-radius: var(--r-lg);\n background: var(--fill);\n font-size: var(--fs-ui);\n}\n.band-sf-banner.is-warn {\n display: flex;\n align-items: center;\n gap: 8px;\n background: var(--warn-soft);\n}\n.band-sf-form {\n display: grid;\n gap: 16px;\n max-width: 560px;\n min-width: 0;\n}\n.band-sf-form code {\n overflow-wrap: anywhere;\n}\n.band-sf-fld {\n display: grid;\n gap: 6px;\n min-width: 0;\n}\n.band-sf-fld > label {\n font-size: var(--fs-ui);\n font-weight: 500;\n}\n.band-sf-fld .field {\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n}\n.band-sf-fld textarea.field {\n resize: vertical;\n line-height: 1.5;\n}\n.band-sf-req {\n margin-left: 6px;\n color: var(--muted);\n font-weight: 400;\n}\n.band-sf-optional {\n margin-left: 6px;\n color: var(--muted);\n font-weight: 400;\n}\n.band-sf-one {\n display: grid;\n gap: 10px;\n min-width: 0;\n}\n.band-sf-one fieldset {\n margin: 0;\n padding: 0;\n border: 0;\n min-width: 0;\n display: grid;\n gap: 10px;\n}\n.band-sf-choices {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n}\n.band-sf-hint {\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-hint a,\n.band-sf-fld .field-note a,\n.band-sf-muted a {\n color: var(--accent-text);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.band-sf-err {\n margin: 0;\n color: var(--bad);\n font-size: var(--fs-ui);\n}\n.band-sf-fail {\n grid-column: 1 / -1;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n overflow-wrap: anywhere;\n}\n.band-sf-given {\n margin: 0;\n padding: 10px 12px;\n border-radius: var(--r-lg);\n background: var(--fill);\n font-size: var(--fs-ui);\n}\ndl.band-sf-given {\n display: grid;\n grid-template-columns: 56px minmax(0, 1fr);\n gap: 2px 12px;\n}\ndl.band-sf-given dt {\n color: var(--muted);\n}\ndl.band-sf-given dd {\n margin: 0;\n min-width: 0;\n}\ndl.band-sf-given p {\n grid-column: 1 / -1;\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-stepback {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n align-self: start;\n justify-self: start;\n padding: 0;\n border: 0;\n background: none;\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-ui);\n cursor: pointer;\n border-radius: 4px;\n}\n.band-sf-stepback:hover {\n color: var(--ink);\n}\n.band-sf-stepback:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-acts {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n}\n.band-sf-acts-end {\n justify-content: flex-end;\n}\n.band-sf-state {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-settings-no-access {\n display: grid;\n gap: 10px;\n justify-items: start;\n max-width: 560px;\n padding-top: 8px;\n}\n.band-settings-no-access h2 {\n margin: 0;\n font-size: var(--fs-title);\n}\n.band-settings-no-access p {\n margin: 0;\n color: var(--muted);\n}\n.band-sf-dialog {\n box-sizing: border-box;\n width: min(460px, calc(100vw - 32px));\n max-height: calc(100dvh - 32px);\n overflow: auto;\n overscroll-behavior: contain;\n border: 0;\n border-radius: var(--r-xl);\n box-shadow: var(--shadow-pop);\n background: var(--panel);\n color: var(--ink);\n padding: 22px 24px;\n}\n.band-sf-dialog[open] {\n display: grid;\n gap: 14px;\n}\n.band-sf-dialog::backdrop {\n background: var(--scrim);\n}\n.band-sf-dialog h2 {\n margin: 0;\n font-size: var(--fs-title);\n overflow-wrap: anywhere;\n}\n.band-sf-dialog ul {\n margin: 0;\n padding-left: 18px;\n display: grid;\n gap: 4px;\n}\n.band-sf-row-x {\n grid-column: 1 / -1;\n margin-top: 8px;\n min-width: 0;\n}\n.band-sf-row.has-lead {\n grid-template-columns: auto minmax(0, 1fr) auto;\n}\n.band-sf-row-l {\n grid-column: 1;\n grid-row: 1 / span 2;\n display: flex;\n align-items: center;\n}\n.band-sf-row.has-lead .band-sf-row-t,\n.band-sf-row.has-lead .band-sf-row-m {\n grid-column: 2;\n}\n.band-sf-row.has-lead .band-sf-row-a {\n grid-column: 3;\n}\n@media (max-width: 600px) {\n .band-sf {\n grid-template-columns: minmax(0, 1fr);\n }\n .band-sf[data-view=page] .band-sf-nav {\n display: none;\n }\n .band-sf[data-view=index] .band-sf-scroll {\n display: none;\n }\n .band-sf-nav {\n padding: 16px;\n }\n .band-sf-grp a {\n padding: 10px 8px;\n font-size: var(--fs-body);\n }\n .band-sf-grp a .band-sf-chev {\n display: inline;\n }\n .band-sf-grp a[aria-current=page] {\n background: none;\n font-weight: 400;\n }\n .band-sf-main {\n padding: 12px 16px 48px;\n gap: 16px;\n }\n .band-sf-back-m {\n display: inline-flex;\n }\n .band-sf-h {\n display: grid;\n gap: 10px;\n }\n .band-sf-h-a .btn {\n justify-self: start;\n }\n .band-sf-row-a {\n grid-column: 1 / -1;\n grid-row: auto;\n justify-content: flex-start;\n margin-top: 4px;\n }\n .band-sf-row-a .band-sf-chev {\n margin-left: auto;\n }\n .band-sf-row-a:has(.band-sf-chev:only-child) {\n grid-column: 2;\n grid-row: 1 / span 2;\n justify-content: flex-end;\n margin-top: 0;\n }\n .band-sf-row > .band-sf-acts {\n grid-column: 1 / -1;\n justify-content: flex-start;\n margin-top: 4px;\n }\n .band-sf-fact {\n grid-template-columns: 88px minmax(0, 1fr);\n gap: 12px;\n }\n .band-sf-dz-r {\n display: grid;\n gap: 8px;\n }\n .band-sf-dz-r .btn {\n justify-self: start;\n }\n .band-sf-dialog {\n padding: 18px 16px;\n }\n .band-sf-row.has-lead .band-sf-row-a {\n grid-column: 2 / -1;\n }\n}\n";
|
|
3
|
+
const css = "/* src/ui.css */\n.band-plugin-react-error {\n font-size: var(--fs-ui);\n padding: 7px 10px;\n border-radius: 8px;\n background: var(--bad-soft);\n color: var(--bad);\n font-family: var(--mono);\n}\n.band-plugin-react-info {\n font-size: var(--fs-ui);\n padding: 7px 10px;\n border-radius: 8px;\n background: var(--panel);\n color: var(--muted);\n}\n.band-plugin-react-retry {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 10px;\n}\n.band-plugin-react-failed {\n display: grid;\n gap: 6px;\n justify-items: start;\n margin: auto;\n padding: 8px 10px;\n border-radius: var(--r);\n background: var(--bad-soft);\n color: var(--bad);\n font-size: var(--fs-ui);\n}\n.band-plugin-react-failed p {\n margin: 0;\n}\n.band-plugin-react-failed-title {\n font-weight: 600;\n}\n.band-plugin-react-failed-reason {\n overflow-wrap: anywhere;\n}\n.band-plugin-react-pane-head {\n padding: 6px 14px 6px 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n min-height: 36px;\n}\n.band-plugin-react-pane-title {\n margin: 0;\n font-size: var(--fs-dense);\n color: var(--muted);\n font-weight: 500;\n letter-spacing: 0.02em;\n}\n.band-plugin-react-wsicon {\n flex: none;\n display: block;\n}\n.band-plugin-react-wstile {\n --band-wstile: 16px;\n width: var(--band-wstile);\n height: var(--band-wstile);\n display: inline-grid;\n place-items: center;\n flex: none;\n border-radius: calc(var(--band-wstile) * 0.26);\n background: var(--panel);\n box-shadow: var(--shadow-card);\n}\n.band-plugin-react-wstile > :where(.band-plugin-react-wsicon) {\n width: 82%;\n height: 82%;\n}\n.band-plugin-react-wstile:where(.is-large) {\n border-radius: var(--r-xl);\n}\n.band-plugin-react-wstile:where(.is-large) > :where(.band-plugin-react-wsicon) {\n width: 76%;\n height: 76%;\n}\n.band-plugin-react-instrument {\n width: 72%;\n height: 72%;\n background: currentColor;\n -webkit-mask: var(--band-instrument) center / contain no-repeat;\n mask: var(--band-instrument) center / contain no-repeat;\n}\n.band-plugin-react-model-hint {\n margin: 0;\n}\n.band-plugin-react-target-repo {\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin: 0;\n font-size: var(--fs-meta);\n line-height: 1.5;\n color: var(--muted);\n}\n.band-plugin-react-target-repo code {\n font-family: var(--mono);\n color: var(--ink);\n}\n.band-plugin-react-target-repo a {\n color: var(--accent-text);\n}\n.band-plugin-react-target-repo-request {\n align-self: flex-start;\n}\n.band-plugin-react-target-repo-err {\n color: var(--bad);\n}\n.band-plugin-react-first-delivery {\n display: flex;\n flex-direction: column;\n gap: 8px;\n flex-basis: 100%;\n padding: 12px;\n border: 1px solid var(--rule);\n border-radius: var(--r-lg);\n background: var(--panel);\n margin: 0;\n min-width: 0;\n}\n.band-plugin-react-first-delivery-slot {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-size: var(--fs-meta);\n}\n.band-plugin-react-first-delivery-pick,\n.band-plugin-react-first-delivery-file {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n}\n.band-plugin-react-first-delivery-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.band-plugin-react-first-delivery-name {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-first-delivery-size {\n color: var(--muted);\n}\n.band-plugin-react-first-delivery-missing {\n margin: 0;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-first-delivery .btn {\n align-self: flex-start;\n}\n.band-plugin-react-no-key {\n margin: 0;\n font-size: var(--fs-ui);\n color: var(--bad);\n}\n\n/* src/controls.css */\n.band-plugin-react-combo-field,\n.band-plugin-react-tags {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n align-items: center;\n padding: 5px 8px;\n border-radius: var(--r);\n background: var(--panel);\n box-shadow: inset 0 0 0 1px var(--control-edge);\n}\n.band-plugin-react-combo-field > :where(.field),\n.band-plugin-react-tags > :where(.field) {\n flex: 1 1 90px;\n min-width: 90px;\n width: auto;\n}\n.band-plugin-react-combo-picked {\n list-style: none;\n margin: 0 0 7px;\n padding: 0;\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n}\n.band-plugin-react-combo-chip,\n.band-plugin-react-filter-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 22px;\n padding: 0 4px 0 8px;\n border-radius: 999px;\n background: var(--fill-2);\n color: var(--ink);\n font-size: var(--fs-meta);\n white-space: nowrap;\n}\n.band-plugin-react-filter-chip {\n background: var(--accent-soft);\n color: var(--accent-text);\n}\n.band-plugin-react-combo-chip > button,\n.band-plugin-react-filter-chip > button {\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n line-height: 1;\n padding: 0 3px;\n border-radius: 999px;\n opacity: 0.85;\n}\n.band-plugin-react-combo-chip > button:where(:focus-visible),\n.band-plugin-react-filter-chip > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n opacity: 1;\n}\n.band-plugin-react-combo-pop {\n position: absolute;\n left: 0;\n right: 0;\n top: calc(100% + 6px);\n z-index: var(--layer-pop);\n display: grid;\n gap: 1px;\n max-height: 236px;\n overflow: auto;\n overscroll-behavior: contain;\n padding: 5px;\n border-radius: var(--r-lg);\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n}\n.band-plugin-react-combo-group {\n padding: 6px 8px 3px;\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-combo-opt {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-row);\n text-align: left;\n}\n.band-plugin-react-combo-opt:where(.is-active) {\n background: var(--fill-2);\n}\n.band-plugin-react-combo-opt:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-combo-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-combo-label > mark {\n background: var(--accent-soft);\n color: var(--ink);\n border-radius: 2px;\n}\n.band-plugin-react-combo-meta {\n margin-left: auto;\n flex: none;\n font-family: var(--mono);\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-combo-plus {\n display: inline-grid;\n place-items: center;\n width: 20px;\n height: 20px;\n flex: none;\n border-radius: 50%;\n background: var(--fill-3);\n color: var(--muted);\n font-size: var(--fs-badge);\n}\n.band-plugin-react-combo-empty {\n padding: 8px;\n text-align: center;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-tag {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 22px;\n padding: 0 4px 0 8px;\n border-radius: 999px;\n background: var(--fill-2);\n color: var(--ink);\n font-size: var(--fs-meta);\n white-space: nowrap;\n}\n.band-plugin-react-tag:where([data-dup]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-tag > button {\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n line-height: 1;\n padding: 0 3px;\n border-radius: 999px;\n opacity: 0.85;\n}\n.band-plugin-react-tag > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n opacity: 1;\n}\n.band-plugin-react-tag-hint {\n margin: 5px 0 0;\n min-height: 16px;\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-tag-hint:where([data-err]) {\n color: var(--bad);\n}\n.band-plugin-react-filter {\n display: grid;\n gap: 2px;\n min-width: 0;\n}\n.band-plugin-react-filter-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n margin-bottom: 8px;\n}\n.band-plugin-react-filter-clear {\n margin-left: auto;\n border: 0;\n background: none;\n padding: 0 2px;\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-meta);\n text-decoration: underline;\n}\n.band-plugin-react-filter-clear:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n border-radius: 4px;\n}\n.band-plugin-react-filter-group {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding: 7px 8px 3px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-badge);\n text-align: left;\n}\n.band-plugin-react-filter-group:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-filter-group::before {\n content: \"\\25b8\";\n width: 11px;\n flex: none;\n font-size: var(--fs-meta);\n line-height: 1;\n}\n.band-plugin-react-filter-group[aria-expanded=true]::before {\n content: \"\\25be\";\n}\n.band-plugin-react-filter-group-count {\n margin-left: auto;\n font-family: var(--mono);\n}\n.band-plugin-react-filter-opt {\n padding: 4px 8px;\n border-radius: var(--r-sm);\n}\n.band-plugin-react-filter-opt:where(:hover) {\n background: var(--fill);\n}\n.band-plugin-react-filter-count {\n margin-left: auto;\n font-family: var(--mono);\n font-size: var(--fs-badge);\n color: var(--muted);\n}\n.band-plugin-react-filter-empty {\n padding: 8px;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n\n/* src/prompt/prompt.css */\n.band-plugin-react-prompt {\n position: relative;\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n gap: 6px;\n min-width: 0;\n}\n.band-plugin-react-prompt-box {\n position: relative;\n min-width: 0;\n}\n.band-plugin-react-prompt-box.composer {\n grid-template-columns: minmax(0, 1fr);\n}\n.band-plugin-react-prompt-box:where([data-variant=comment] *, [data-variant=reply] *) {\n border-radius: var(--r-lg);\n}\n.band-plugin-react-prompt-box.composer textarea:where([data-variant=comment] *, [data-variant=reply] *) {\n font-size: var(--fs-body);\n padding: 10px 12px 2px;\n}\n.band-plugin-react-prompt-note {\n padding: 6px 12px 12px;\n font-size: var(--fs-ui);\n color: var(--muted);\n}\n.band-plugin-react-prompt-notice {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n font-size: var(--fs-dense);\n padding: 6px 6px 6px 10px;\n border-radius: var(--r);\n background: var(--fill);\n color: var(--muted);\n}\n.band-plugin-react-prompt-notice:where([role=alert]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-prompt-notice > span {\n flex: 1;\n min-width: 0;\n}\n.band-plugin-react-prompt-notice-lines {\n display: flex;\n flex-direction: column;\n gap: 2px;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-prompt-tray {\n list-style: none;\n margin: 0;\n padding: 12px 12px 0;\n display: flex;\n gap: 8px;\n overflow-x: auto;\n scrollbar-width: thin;\n}\n.band-plugin-react-prompt-card {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n border-radius: var(--r-lg);\n background: var(--sunk);\n max-width: 220px;\n}\n.band-plugin-react-prompt-card:where([data-state=failed]) {\n background: var(--bad-soft);\n color: var(--bad);\n}\n.band-plugin-react-prompt-open {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n padding: 6px 26px 6px 6px;\n border: 0;\n background: none;\n color: inherit;\n text-align: left;\n font: inherit;\n border-radius: inherit;\n}\n.band-plugin-react-prompt-open:where(:disabled) {\n cursor: default;\n}\n.band-plugin-react-prompt-open:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-prompt-open:where([data-kind=image] *) {\n padding: 0;\n}\n.band-plugin-react-prompt-thumb {\n width: auto;\n min-width: 40px;\n max-width: 140px;\n height: 56px;\n object-fit: cover;\n border-radius: var(--r-lg);\n display: block;\n}\n.band-plugin-react-prompt-icon {\n flex: none;\n width: 36px;\n height: 40px;\n border-radius: var(--r-sm);\n background: var(--panel);\n display: grid;\n place-items: center;\n font-family: var(--mono);\n font-size: 10.5px;\n color: var(--muted);\n box-shadow: 0 0 0 var(--hairline) var(--rule);\n}\n.band-plugin-react-prompt-meta {\n display: grid;\n min-width: 0;\n text-align: left;\n}\n.band-plugin-react-prompt-name {\n font-size: var(--fs-ui);\n color: var(--ink);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-prompt-file {\n text-autospace: no-autospace;\n}\n.band-plugin-react-prompt-d {\n font-size: var(--fs-meta);\n color: var(--muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-prompt-quote {\n display: -webkit-box;\n white-space: normal;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n.band-plugin-react-prompt-d:where([data-state=failed] *) {\n color: var(--bad);\n}\n.band-plugin-react-prompt-progress {\n position: absolute;\n inset: 0;\n display: grid;\n place-items: center;\n border-radius: inherit;\n background: color-mix(in srgb, var(--panel) 55%, transparent);\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-progress:where([data-kind=file] *) {\n inset: auto 30px auto auto;\n background: none;\n}\n.band-plugin-react-prompt-retry {\n border: 0;\n background: none;\n color: var(--bad);\n font: inherit;\n font-size: var(--fs-meta);\n padding: 2px 6px;\n margin: 0 22px 0 6px;\n border-radius: var(--r-sm);\n}\n.band-plugin-react-prompt-retry:where(:hover) {\n background: var(--fill-2);\n}\n.band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card > *) {\n position: absolute;\n top: 3px;\n right: 3px;\n}\n.band-plugin-react-prompt-x {\n width: 20px;\n height: 20px;\n display: inline-grid;\n place-items: center;\n border: 0;\n border-radius: 50%;\n background: none;\n color: var(--muted);\n font-size: var(--fs-body);\n line-height: 1;\n flex: none;\n transition: background var(--sixteenth) var(--ease), color var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-x:where(:hover, :focus-visible) {\n background: var(--fill-3);\n color: var(--ink);\n outline: none;\n}\n.band-plugin-react-prompt-x:where([data-kind=image] > *) {\n background: color-mix(in srgb, var(--panel) 85%, transparent);\n color: var(--ink);\n}\n.band-plugin-react-prompt-chips {\n list-style: none;\n margin: 0;\n padding: 4px 14px 0;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.band-plugin-react-prompt-chip.chip {\n background: var(--fill-2);\n color: var(--ink);\n padding: 1px 2px 1px 8px;\n gap: 3px;\n}\n.band-plugin-react-prompt-chip:where([data-kind=cap]) {\n background: var(--accent-soft);\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-chip:where([data-kind=conn]) {\n padding-right: 8px;\n}\n.band-plugin-react-prompt-sigil {\n font-family: var(--mono);\n color: var(--muted);\n}\n.band-plugin-react-prompt-sigil:where([data-kind=cap] *) {\n color: inherit;\n}\n.band-plugin-react-prompt-cands.mention {\n position: absolute;\n z-index: 25;\n left: 10px;\n right: 10px;\n bottom: calc(100% + 6px);\n max-height: 280px;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n.band-plugin-react-prompt-cands.mention:where([data-variant=comment] *, [data-variant=reply] *) {\n position: static;\n margin: 6px 8px;\n box-shadow: 0 0 0 var(--hairline) var(--rule);\n}\n.band-plugin-react-prompt-cands-h {\n font-size: var(--fs-caption);\n color: var(--muted);\n padding: 4px 8px 2px;\n}\n.band-plugin-react-prompt-empty {\n font-size: var(--fs-ui);\n color: var(--muted);\n padding: 6px 8px 8px;\n}\n.band-plugin-react-prompt-option:where([aria-selected=true]) {\n background: var(--sunk);\n}\n.band-plugin-react-prompt-bar {\n position: relative;\n min-width: 0;\n}\n.band-plugin-react-prompt-bar.composer-bar {\n flex-wrap: nowrap;\n}\n.band-plugin-react-prompt-anchor {\n position: relative;\n display: inline-flex;\n}\n.band-plugin-react-prompt-capbtn.btn {\n font-family: var(--mono);\n font-size: var(--fs-dense);\n}\n.band-plugin-react-prompt-hint {\n font-size: var(--fs-meta);\n color: var(--muted);\n padding: 0 8px;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n@media (max-width: 860px) {\n .band-plugin-react-prompt-hint:not([data-notice]) {\n display: none;\n }\n}\n.band-plugin-react-prompt-send:where([data-waiting]) {\n background: var(--fill-3);\n color: var(--ink);\n}\n.band-plugin-react-prompt-ring {\n display: block;\n}\n.band-plugin-react-prompt-menu {\n position: absolute;\n z-index: 26;\n left: 0;\n bottom: calc(100% + 6px);\n min-width: 248px;\n max-width: min(320px, calc(100vw - 32px));\n max-height: 360px;\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: 4px;\n border-radius: 10px;\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n display: grid;\n outline: none;\n}\n.band-plugin-react-prompt-item {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 7px 8px;\n border: 0;\n border-radius: 7px;\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-ui);\n text-align: left;\n text-decoration: none;\n}\n.band-plugin-react-prompt-item:where(:hover, :focus-visible) {\n background: var(--sunk);\n outline: none;\n}\n.band-plugin-react-prompt-item:where(:disabled) {\n color: var(--muted);\n background: none;\n opacity: 0.42;\n}\n.band-plugin-react-prompt-meta:where(.band-plugin-react-prompt-item > *) {\n flex: 1;\n}\n.band-plugin-react-prompt-check {\n width: 14px;\n flex: none;\n color: var(--accent-text);\n}\n.band-plugin-react-prompt-sep {\n border: 0;\n height: var(--hairline);\n background: var(--rule);\n margin: 4px 6px;\n}\n.band-plugin-react-prompt-group {\n font-size: var(--fs-caption);\n color: var(--muted);\n padding: 4px 8px 2px;\n}\n.band-plugin-react-prompt-switch {\n flex: none;\n width: 28px;\n height: 16px;\n border-radius: 999px;\n background: var(--fill-3);\n position: relative;\n transition: background var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-switch::after {\n content: \"\";\n position: absolute;\n top: 2px;\n left: 2px;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background: var(--panel);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n transition: transform var(--sixteenth) var(--ease);\n}\n.band-plugin-react-prompt-switch:where([data-on]) {\n background: var(--primary);\n}\n.band-plugin-react-prompt-switch:where([data-on])::after {\n transform: translateX(12px);\n}\n.band-plugin-react-prompt-source {\n margin: 6px 10px 0;\n padding: 8px;\n border-radius: var(--r-lg);\n background: var(--sunk);\n display: grid;\n gap: 6px;\n}\n.band-plugin-react-prompt-source-h {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: var(--fs-ui);\n}\n:where(.band-plugin-react-prompt-source-h, .band-plugin-react-prompt-preview-h) > .grow {\n flex: 1;\n}\n.band-plugin-react-prompt-drop {\n position: absolute;\n inset: 0;\n z-index: 24;\n display: grid;\n place-items: center;\n padding: 12px;\n text-align: center;\n border-radius: inherit;\n background: color-mix(in srgb, var(--accent-soft) 92%, transparent);\n color: var(--accent-text);\n font-size: var(--fs-ui);\n box-shadow: inset 0 0 0 1.5px var(--accent);\n pointer-events: none;\n}\n.band-plugin-react-prompt-preview {\n border: 0;\n padding: 10px;\n border-radius: var(--r-xl);\n background: var(--panel);\n color: var(--ink);\n box-shadow: var(--shadow-pop);\n max-width: min(960px, calc(100vw - 32px));\n max-height: calc(100vh - 64px);\n}\n.band-plugin-react-prompt-preview::backdrop {\n background: rgba(10, 12, 16, 0.5);\n}\n.band-plugin-react-prompt-preview-h {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 0 0 8px 4px;\n}\n.band-plugin-react-prompt-big {\n display: block;\n max-width: 100%;\n max-height: calc(100vh - 140px);\n margin: 0 auto;\n border-radius: var(--r);\n}\n.band-plugin-react-prompt-pre {\n margin: 0;\n padding: 10px 12px;\n border-radius: var(--r);\n background: var(--sunk);\n font-family: var(--mono);\n font-size: var(--fs-meta);\n white-space: pre-wrap;\n overflow: auto;\n overscroll-behavior: contain;\n max-height: calc(100vh - 160px);\n min-width: min(560px, calc(100vw - 64px));\n}\n@media (hover: hover) {\n .band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card > *) {\n opacity: 0;\n }\n .band-plugin-react-prompt-x:where(.band-plugin-react-prompt-card:hover > *, .band-plugin-react-prompt-card:focus-within > *) {\n opacity: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .band-plugin-react-prompt-x,\n .band-plugin-react-prompt-switch,\n .band-plugin-react-prompt-switch::after {\n transition: none;\n }\n}\n.band-plugin-react-prompt-box.composer textarea[aria-invalid=true] {\n box-shadow: inset 0 -2px 0 var(--bad);\n}\n.band-plugin-react-prompt-box.composer textarea[aria-invalid=true]::placeholder {\n color: var(--bad);\n}\n.band-plugin-react-prompt-import {\n display: grid;\n gap: 8px;\n padding: 12px;\n}\n.band-plugin-react-prompt-import p {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-plugin-react-prompt-import-actions {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n}\n.band-plugin-react-prompt-card[data-compressed] {\n max-width: 320px;\n}\n.band-plugin-react-prompt-card[data-compressed] .band-plugin-react-prompt-open {\n padding: 6px 26px 6px 6px;\n}\n\n/* src/message/message.css */\n.band-plugin-react-msg {\n position: relative;\n display: grid;\n gap: 6px;\n min-width: 0;\n border-radius: var(--r);\n outline: none;\n}\n.band-plugin-react-msg:where(.fit) {\n justify-self: start;\n width: fit-content;\n max-width: 100%;\n}\n.band-plugin-react-msg:where(:focus-visible) {\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-msg-bar {\n justify-self: end;\n z-index: 2;\n display: flex;\n gap: 2px;\n padding: 3px;\n background: var(--panel);\n border-radius: var(--r);\n box-shadow: var(--shadow-pop);\n opacity: 0;\n visibility: hidden;\n transition: opacity var(--sixteenth) var(--ease) var(--eighth), visibility 0s linear calc(var(--eighth) + var(--sixteenth));\n}\n:where(.band-plugin-react-msg:focus-within, .band-plugin-react-msg.open) > .band-plugin-react-msg-bar {\n opacity: 1;\n visibility: visible;\n transition: opacity var(--sixteenth) var(--ease);\n}\n@media (hover: hover) {\n :where(.band-plugin-react-msg:hover) > .band-plugin-react-msg-bar {\n opacity: 1;\n visibility: visible;\n transition: opacity var(--sixteenth) var(--ease);\n }\n}\n@media (hover: none) {\n .band-plugin-react-msg-bar {\n display: none;\n }\n}\n.band-plugin-react-msg-ib {\n width: 28px;\n height: 28px;\n display: inline-grid;\n place-items: center;\n border: 0;\n border-radius: 6px;\n background: none;\n color: var(--muted);\n padding: 0;\n transition: background var(--sixteenth) var(--ease);\n}\n.band-plugin-react-msg-ib:where(:hover, .on) {\n background: var(--fill-2);\n color: var(--ink);\n}\n.band-plugin-react-msg-ib:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n color: var(--ink);\n}\n.band-plugin-react-msg-ib:where(.done) {\n color: var(--ok);\n}\n:where(.band-plugin-react-msg-ib, .band-plugin-react-msg-mi, .band-plugin-react-msg-chip) svg {\n width: 16px;\n height: 16px;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-linejoin: round;\n flex: none;\n}\n.band-plugin-react-msg-menu {\n position: fixed;\n z-index: 1000;\n width: 248px;\n max-width: calc(100vw - 32px);\n display: grid;\n gap: 2px;\n padding: 8px;\n background: var(--panel);\n border-radius: var(--r-lg);\n box-shadow: var(--shadow-pop);\n animation: band-plugin-react-msg-in var(--sixteenth) var(--ease);\n}\n@keyframes band-plugin-react-msg-in {\n from {\n opacity: 0;\n transform: translateY(-2px);\n }\n}\n.band-plugin-react-msg-emo {\n margin: 0;\n border: 0;\n min-width: 0;\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n gap: 2px;\n padding: 2px 0 4px;\n}\n.band-plugin-react-msg-emo > button {\n height: 34px;\n display: grid;\n place-items: center;\n border: 0;\n border-radius: var(--r);\n background: none;\n font-size: 20px;\n line-height: 1;\n padding: 0;\n transition: background var(--sixteenth) var(--ease), transform var(--sixteenth) var(--ease);\n}\n.band-plugin-react-msg-emo > button:where(:hover) {\n background: var(--fill-2);\n transform: scale(1.08);\n}\n.band-plugin-react-msg-emo > button:where(.mine) {\n background: var(--accent-soft);\n box-shadow: inset 0 0 0 1px var(--accent);\n}\n.band-plugin-react-msg-emo > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-msg-sep {\n height: var(--hairline);\n margin: 2px 0 4px;\n background: var(--rule);\n}\n.band-plugin-react-msg-mi {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 6px 8px;\n border: 0;\n border-radius: var(--r-sm);\n background: none;\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-body);\n text-align: left;\n}\n.band-plugin-react-msg-mi svg {\n stroke: var(--muted);\n}\n.band-plugin-react-msg-mi:where(:hover, :focus-visible) {\n outline: none;\n background: var(--fill-2);\n}\n.band-plugin-react-msg-rx {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n align-items: center;\n}\n.band-plugin-react-msg-chip {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n height: 26px;\n padding: 0 9px;\n border: 0;\n border-radius: 999px;\n background: var(--fill);\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-ui);\n font-variant-numeric: tabular-nums;\n transition: background var(--sixteenth) var(--ease), opacity var(--sixteenth) var(--ease);\n}\nbutton.band-plugin-react-msg-chip:where(:hover) {\n background: var(--fill-2);\n}\n.band-plugin-react-msg-chip:where(.mine) {\n background: var(--accent-soft);\n color: var(--accent-text);\n box-shadow: inset 0 0 0 1px var(--accent);\n}\n.band-plugin-react-msg-chip:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-msg-chip:where(.pending) {\n opacity: 0.6;\n}\n.band-plugin-react-msg-chip:where(.add) {\n padding: 0 7px;\n color: var(--muted);\n opacity: 0;\n}\n:where(.band-plugin-react-msg:hover, .band-plugin-react-msg:focus-within, .band-plugin-react-msg.open) .band-plugin-react-msg-chip:where(.add) {\n opacity: 1;\n}\n@media (hover: none) {\n .band-plugin-react-msg-chip:where(.add) {\n opacity: 1;\n }\n}\n.band-plugin-react-msg-e {\n font-size: var(--fs-lead);\n line-height: 1;\n}\n.band-plugin-react-msg-tip {\n position: absolute;\n left: 0;\n bottom: calc(100% + 6px);\n z-index: 4;\n white-space: nowrap;\n padding: 4px 8px;\n border-radius: var(--r-sm);\n background: var(--ink);\n color: var(--panel);\n font-size: var(--fs-meta);\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n transition: opacity var(--sixteenth) var(--ease);\n}\n:where(.band-plugin-react-msg-chip:hover, .band-plugin-react-msg-chip:focus-visible) > .band-plugin-react-msg-tip {\n opacity: 1;\n visibility: visible;\n}\n.band-plugin-react-msg-err {\n display: flex;\n gap: 6px;\n align-items: center;\n font-size: var(--fs-meta);\n color: var(--bad);\n}\n.band-plugin-react-msg-err > button {\n border: 0;\n padding: 0;\n background: none;\n color: var(--ink);\n font: inherit;\n text-decoration: underline;\n}\n.band-plugin-react-msg-sheetwrap {\n position: fixed;\n inset: 0;\n z-index: 1000;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n gap: 12px;\n}\n.band-plugin-react-msg-scrim {\n position: absolute;\n inset: 0;\n border: 0;\n padding: 0;\n background: color-mix(in srgb, black 36%, transparent);\n animation: band-plugin-react-msg-fade var(--eighth) var(--ease);\n}\n.band-plugin-react-msg-lifted {\n position: relative;\n margin: 0 16px;\n max-height: 36vh;\n overflow: hidden;\n padding: 12px;\n display: grid;\n gap: 6px;\n background: var(--panel);\n border-radius: var(--r-lg);\n box-shadow: var(--shadow-pop);\n pointer-events: none;\n}\n.band-plugin-react-msg-sheet {\n position: relative;\n display: grid;\n gap: 2px;\n padding: 8px 12px calc(20px + env(safe-area-inset-bottom));\n background: var(--panel);\n border-radius: var(--r-xl) var(--r-xl) 0 0;\n box-shadow: var(--shadow-pop);\n animation: band-plugin-react-msg-rise var(--eighth) var(--ease);\n}\n.band-plugin-react-msg-grab {\n width: 36px;\n height: 4px;\n margin: 0 auto 10px;\n border-radius: 2px;\n background: var(--fill-3);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo {\n gap: 8px;\n padding-bottom: 10px;\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo > button {\n height: 44px;\n font-size: 24px;\n background: var(--fill);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-emo > button:where(.mine) {\n background: var(--accent-soft);\n}\n:where(.band-plugin-react-msg-sheet) .band-plugin-react-msg-mi {\n padding: 12px 8px;\n font-size: var(--fs-lead);\n}\n@keyframes band-plugin-react-msg-fade {\n from {\n opacity: 0;\n }\n}\n@keyframes band-plugin-react-msg-rise {\n from {\n transform: translateY(24px);\n opacity: 0;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n :where(.band-plugin-react-msg-menu, .band-plugin-react-msg-sheet, .band-plugin-react-msg-scrim, .band-plugin-react-msg-bar, .band-plugin-react-msg-chip) {\n animation: none;\n transition: none;\n }\n}\n.band-plugin-react-atts {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin: 0;\n padding: 0;\n list-style: none;\n min-width: 0;\n}\n.band-plugin-react-atts-thumb {\n display: block;\n padding: 0;\n border: 0;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n overflow: hidden;\n cursor: zoom-in;\n}\n.band-plugin-react-atts-thumb:where(:hover) {\n box-shadow: 0 0 0 1px var(--rule-strong);\n}\n.band-plugin-react-atts-thumb:where(:hover) .band-plugin-react-atts-img {\n filter: brightness(0.94);\n}\n.band-plugin-react-atts-thumb:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-atts-pending {\n display: block;\n width: 96px;\n height: 72px;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n}\n.band-plugin-react-atts-pending[data-compact] {\n width: 40px;\n height: 30px;\n}\n.band-plugin-react-atts-img {\n display: block;\n max-width: 160px;\n max-height: 120px;\n min-width: 48px;\n min-height: 48px;\n object-fit: contain;\n}\n.band-plugin-react-atts-img:where([data-loading]) {\n width: 96px;\n height: 72px;\n background: var(--sunk);\n}\n.band-plugin-react-atts:where([data-compact]) {\n align-items: center;\n gap: 4px;\n}\n.band-plugin-react-atts:where([data-compact]) .band-plugin-react-atts-img {\n width: auto;\n height: 32px;\n min-width: 32px;\n max-width: 96px;\n min-height: 0;\n object-fit: cover;\n object-position: left top;\n border-radius: var(--r-sm);\n box-shadow: 0 0 0 1px var(--rule);\n}\n.band-plugin-react-atts-more {\n font-size: var(--fs-dense);\n color: var(--muted);\n}\n.band-plugin-react-atts-file {\n display: inline-grid;\n grid-template-columns: auto minmax(0, 1fr) auto auto;\n align-items: center;\n gap: 8px;\n max-width: 320px;\n padding: 6px 10px 6px 6px;\n border: 0;\n border-radius: var(--r-sm);\n background: var(--sunk);\n box-shadow: 0 0 0 1px var(--rule);\n color: var(--ink);\n font: inherit;\n font-size: var(--fs-dense);\n text-align: left;\n cursor: pointer;\n}\n.band-plugin-react-atts-file:where(:hover):not([data-deleted]) {\n background: var(--panel);\n}\n.band-plugin-react-atts-file[data-deleted] {\n color: var(--muted);\n cursor: default;\n}\n.band-plugin-react-atts-file:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-plugin-react-atts-ext {\n display: grid;\n place-items: center;\n width: 32px;\n height: 32px;\n border-radius: var(--r-sm);\n background: var(--panel);\n color: var(--muted);\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.02em;\n}\n.band-plugin-react-atts-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-autospace: no-autospace;\n}\n.band-plugin-react-atts-size,\n.band-plugin-react-atts-act,\n.band-plugin-react-atts-count {\n color: var(--muted);\n white-space: nowrap;\n}\n.band-plugin-react-atts-act {\n color: var(--accent-text);\n}\n.band-plugin-react-atts-wait {\n display: block;\n margin: 24px;\n color: var(--muted);\n}\n.band-plugin-react-atts-wait:where(div) {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* src/memory/memory.css */\n.band-plugin-react-memo {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n width: fit-content;\n max-width: 100%;\n box-sizing: border-box;\n margin-top: 2px;\n border: 0;\n border-radius: 7px;\n padding: 5px 8px;\n background: var(--fill);\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-dense);\n line-height: 1.5;\n text-align: left;\n cursor: pointer;\n transition: background var(--sixteenth) var(--ease), color var(--sixteenth) var(--ease);\n}\n.band-plugin-react-memo:where(:hover) {\n background: var(--fill-2);\n color: var(--ink);\n}\n.band-plugin-react-memo:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-plugin-react-memo > svg {\n flex: none;\n width: 14px;\n height: 14px;\n margin-top: 2px;\n fill: none;\n stroke: var(--muted);\n stroke-width: 1.4;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.band-plugin-react-memo > span {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-memo-rejected {\n display: block;\n color: var(--warn);\n}\n\n/* src/toast/toast.css */\n.band-plugin-react-toast-stack {\n position: fixed;\n right: 20px;\n bottom: calc(60px + env(safe-area-inset-bottom, 0px));\n z-index: var(--layer-pop);\n width: min(340px, calc(100vw - 40px));\n display: grid;\n gap: 8px;\n}\n.band-plugin-react-toast {\n display: grid;\n grid-template-columns: 16px minmax(0, 1fr) auto;\n gap: 10px;\n align-items: center;\n padding: 10px 12px;\n border-radius: var(--r-lg);\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n font-size: var(--fs-row);\n color: var(--ink);\n animation: band-plugin-react-toast-in var(--eighth) var(--ease);\n}\n@keyframes band-plugin-react-toast-in {\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n.band-plugin-react-toast-again {\n animation: none;\n}\n.band-plugin-react-toast-icon {\n width: 16px;\n height: 16px;\n display: grid;\n place-items: center;\n border-radius: 50%;\n font-size: 10px;\n color: var(--panel);\n}\n.band-plugin-react-toast-icon:where(.ok) {\n background: var(--ok);\n}\n.band-plugin-react-toast-icon:where(.bad) {\n background: var(--bad);\n}\n.band-plugin-react-toast-icon:where(.busy) {\n border: 1.6px solid var(--accent);\n border-top-color: transparent;\n color: transparent;\n background: none;\n animation: band-plugin-react-toast-spin 900ms linear infinite;\n}\n@keyframes band-plugin-react-toast-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.band-plugin-react-toast-text {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-plugin-react-toast-detail {\n display: block;\n color: var(--muted);\n font-size: var(--fs-meta);\n overflow-wrap: anywhere;\n}\n.band-plugin-react-toast-act {\n font-size: var(--fs-meta);\n color: var(--ink);\n background: none;\n border: 0;\n font-family: inherit;\n text-decoration: underline;\n padding: 2px 4px;\n border-radius: 4px;\n}\n.band-plugin-react-toast-act:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n@media (prefers-reduced-motion: reduce) {\n .band-plugin-react-toast,\n .band-plugin-react-toast-icon:where(.busy) {\n animation: none;\n }\n}\n\n/* src/person-picker.css */\n.band-plugin-react-pp-picker {\n display: grid;\n gap: 8px;\n min-width: 0;\n}\n.band-plugin-react-pp-people {\n list-style: none;\n margin: 0;\n padding: 0;\n display: grid;\n gap: 2px;\n}\n.band-plugin-react-pp-person {\n display: flex;\n align-items: center;\n gap: 10px;\n min-height: 44px;\n padding: 4px 6px;\n border-radius: var(--r-sm);\n}\n.band-plugin-react-pp-person:where(:hover) {\n background: var(--fill);\n}\n.band-plugin-react-pp-empty {\n padding: 10px 6px;\n color: var(--muted);\n font-size: var(--fs-row);\n}\n.band-plugin-react-pp-confirm {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: var(--fs-dense);\n color: var(--ink);\n white-space: nowrap;\n}\n.band-plugin-react-pp-count {\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp {\n position: relative;\n min-width: 0;\n}\n.band-plugin-react-pp-field {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 3px 8px;\n border-radius: var(--r);\n background: var(--panel);\n box-shadow: inset 0 0 0 1px var(--control-edge);\n}\n.band-plugin-react-pp-field > :where(.field) {\n flex: 1 1 auto;\n min-width: 0;\n}\n.band-plugin-react-pp-icon {\n width: 14px;\n height: 14px;\n flex: none;\n fill: none;\n stroke: var(--muted);\n stroke-width: 1.5;\n stroke-linecap: round;\n}\n.band-plugin-react-pp-notice {\n display: block;\n margin-top: 6px;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp-pop {\n position: absolute;\n left: 0;\n right: 0;\n top: calc(100% + 6px);\n z-index: var(--layer-pop);\n display: grid;\n gap: 4px;\n padding: 5px;\n border-radius: var(--r-lg);\n background: var(--panel);\n box-shadow: var(--shadow-pop);\n}\n.band-plugin-react-pp-list {\n display: grid;\n gap: 1px;\n max-height: 320px;\n overflow: auto;\n overscroll-behavior: contain;\n}\n.band-plugin-react-pp-fallback {\n padding: 7px 8px;\n border-radius: var(--r-sm);\n background: var(--sunk);\n color: var(--muted);\n font-size: var(--fs-meta);\n}\n.band-plugin-react-pp-trail {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 2px 4px;\n padding: 4px 6px 2px;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp-trail > span {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n.band-plugin-react-pp-trail button {\n border: 0;\n background: none;\n padding: 1px 3px;\n border-radius: 5px;\n font: inherit;\n color: var(--muted);\n}\n.band-plugin-react-pp-trail button:where(:hover) {\n background: var(--fill);\n color: var(--ink);\n}\n.band-plugin-react-pp-trail button:where([aria-current]) {\n color: var(--ink);\n font-weight: 500;\n}\n.band-plugin-react-pp-row {\n display: flex;\n align-items: center;\n gap: 9px;\n min-height: 36px;\n padding: 5px 8px;\n border-radius: var(--r-sm);\n color: var(--ink);\n font-size: var(--fs-row);\n cursor: pointer;\n}\n.band-plugin-react-pp-row:where(.is-active) {\n background: var(--fill-2);\n}\n.band-plugin-react-pp-row:where(.is-off) {\n cursor: default;\n}\n.band-plugin-react-pp-row:where(.is-off) > :where(:not(.band-plugin-react-pp-main)) {\n opacity: 0.42;\n}\n.band-plugin-react-pp-main {\n display: grid;\n min-width: 0;\n flex: 1 1 auto;\n}\n.band-plugin-react-pp-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-pp-name > :where(mark),\n.band-plugin-react-pp-id > :where(mark) {\n background: var(--accent-soft);\n color: inherit;\n border-radius: 2px;\n}\n.band-plugin-react-pp-id {\n font-family: var(--mono);\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp-sub {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp-meta {\n flex: none;\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-pp-chev {\n flex: none;\n width: 14px;\n text-align: center;\n color: var(--muted);\n}\n.band-plugin-react-pp-dept,\n.band-plugin-react-pp-all {\n flex: none;\n display: inline-grid;\n place-items: center;\n width: 20px;\n height: 20px;\n border-radius: 6px;\n background: var(--fill-2);\n color: var(--muted);\n font-size: var(--fs-meta);\n}\n.band-plugin-react-pp-dept > svg {\n width: 13px;\n height: 13px;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.4;\n}\n.band-plugin-react-pp-state {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 18px 8px;\n color: var(--muted);\n font-size: var(--fs-row);\n text-align: center;\n}\n.band-plugin-react-pp-tuning > svg {\n width: 40px;\n height: 28px;\n}\n.band-plugin-react-pp-foot {\n padding: 4px 8px 2px;\n}\n@media (pointer: coarse), (max-width: 599px) {\n .band-plugin-react-pp-person {\n flex-wrap: wrap;\n }\n .band-plugin-react-pp-list {\n max-height: min(56vh, 420px);\n }\n}\n.band-plugin-react-pp-row:where(.is-off) .band-plugin-react-pp-name {\n color: var(--muted);\n}\n.band-plugin-react-pp-chosen {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n flex: none;\n max-width: 70%;\n height: 24px;\n padding: 0 4px 0 4px;\n border-radius: 999px;\n background: var(--fill-2);\n font-size: var(--fs-dense);\n white-space: nowrap;\n}\n.band-plugin-react-pp-chosen > button {\n border: 0;\n background: none;\n color: var(--muted);\n font: inherit;\n line-height: 1;\n padding: 0 4px;\n border-radius: 999px;\n}\n.band-plugin-react-pp-chosen > button:where(:focus-visible) {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n\n/* src/status/status.css */\n.band-plugin-react-status {\n display: grid;\n gap: 2px;\n min-width: 0;\n padding: 0 2px 0 4px;\n font-size: var(--fs-dense);\n color: var(--muted);\n}\n.band-plugin-react-status-head {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n color: var(--accent-text);\n}\n.band-plugin-react-status-who {\n font-weight: 600;\n}\n.band-plugin-react-status-context {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-status .band-plugin-react-status-glyph.glyph {\n --c: var(--accent);\n margin-left: 2px;\n}\n.band-plugin-react-status-spacer {\n flex: 1;\n}\n.band-plugin-react-status-elapsed {\n flex: none;\n color: var(--muted);\n font-variant-numeric: tabular-nums;\n}\n.band-plugin-react-status-note {\n padding-left: 22px;\n color: var(--ink);\n overflow-wrap: anywhere;\n}\n.band-plugin-react-status-action {\n padding-left: 22px;\n font-family: var(--mono);\n color: var(--muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-plugin-react-status-stall {\n padding-left: 22px;\n color: var(--warn);\n}\n.band-plugin-react-status-steps {\n display: grid;\n gap: 2px;\n margin: 0;\n padding: 0 0 0 22px;\n list-style: none;\n font-family: var(--mono);\n font-size: var(--fs-meta);\n color: var(--muted);\n}\n.band-plugin-react-status-steps > :where([data-state=done]) {\n color: var(--muted);\n}\n.band-plugin-react-status-steps > :where([data-state=now]) {\n color: var(--ink);\n}\n.band-plugin-react-status-stop {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n padding-left: 26px;\n font-size: var(--fs-dense);\n}\n.band-plugin-react-status-stop-note {\n color: var(--muted);\n}\n.band-plugin-react-stopped {\n margin: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n min-width: 0;\n padding: 0 2px 0 4px;\n font-size: var(--fs-row);\n color: var(--muted);\n}\n.band-plugin-react-stopped-text b {\n font-weight: 600;\n color: var(--ink);\n}\n.band-plugin-react-stopped-took {\n font-size: var(--fs-meta);\n font-variant-numeric: tabular-nums;\n}\n\n/* src/version-reference.css */\n.band-plugin-react-version-ref {\n display: inline-block;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n vertical-align: bottom;\n padding: 0;\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n text-align: left;\n}\n.band-plugin-react-version-ref:where(button) {\n cursor: pointer;\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.band-plugin-react-version-ref:where(:focus-visible) {\n outline: none;\n border-radius: var(--r-sm);\n box-shadow: 0 0 0 2px var(--accent);\n}\n\n/* src/settings/settings.css */\n.band-sf {\n display: grid;\n grid-template-columns: 216px minmax(0, 1fr);\n min-height: 0;\n height: 100%;\n}\n.band-sf-nav {\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n padding: 24px 12px 24px 20px;\n display: grid;\n gap: 16px;\n align-content: start;\n}\n.band-sf-head {\n display: grid;\n gap: 2px;\n min-width: 0;\n padding: 0 8px;\n}\n.band-sf-title {\n font-size: var(--fs-title);\n font-weight: 600;\n line-height: 1.3;\n}\n.band-sf-obj {\n font-size: var(--fs-ui);\n color: var(--muted);\n}\n.band-sf-grp {\n display: grid;\n gap: 1px;\n}\n.band-sf-grp > span {\n padding: 2px 8px;\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-grp a {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 6px 8px;\n border-radius: var(--r);\n color: var(--ink);\n text-decoration: none;\n font-size: var(--fs-row);\n}\n.band-sf-grp a:hover {\n background: var(--fill);\n}\n.band-sf-grp a[aria-current=page] {\n background: var(--fill-2);\n font-weight: 500;\n}\n.band-sf-grp a:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-grp a .band-sf-chev {\n display: none;\n color: var(--muted);\n}\n.band-sf-scroll {\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n}\n.band-sf-main {\n box-sizing: border-box;\n width: 100%;\n max-width: 824px;\n padding: 32px 32px 64px;\n display: grid;\n gap: 20px;\n align-content: start;\n}\n.band-sf-crumb {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n min-width: 0;\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-crumb-in {\n display: inline-flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n min-width: 0;\n}\n.band-sf-crumb-ws {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n white-space: nowrap;\n}\n.band-sf-crumb-ws > span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.band-sf-crumb a,\n.band-sf-crumb button {\n min-width: 0;\n border: 0;\n padding: 0;\n background: none;\n color: var(--muted);\n font: inherit;\n text-decoration: none;\n border-radius: 4px;\n overflow-wrap: anywhere;\n cursor: pointer;\n}\n.band-sf-crumb button {\n text-align: start;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.band-sf-crumb a:hover,\n.band-sf-crumb button:hover {\n color: var(--ink);\n}\n.band-sf-crumb a:focus-visible,\n.band-sf-crumb button:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n.band-sf-back {\n display: inline-flex;\n align-self: start;\n justify-self: start;\n gap: 4px;\n color: var(--muted);\n text-decoration: none;\n font-size: var(--fs-ui);\n border-radius: 4px;\n}\n.band-sf-back-m {\n display: none;\n}\n.band-sf-back:hover {\n color: var(--ink);\n}\n.band-sf-back:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-h {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n}\n.band-sf-h > div {\n display: grid;\n gap: 4px;\n min-width: 0;\n}\n.band-sf-h h1 {\n margin: 0;\n font-size: var(--fs-h2);\n font-weight: 600;\n line-height: 1.3;\n}\n.band-sf-h p {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n max-width: 560px;\n}\n.band-sf-h-a {\n flex: none;\n}\n.band-sf-sec {\n display: grid;\n gap: 10px;\n}\n.band-sf-sec h2 {\n margin: 0;\n font-size: var(--fs-lead);\n font-weight: 600;\n}\n.band-sf-sec > p {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-sf-rows {\n display: grid;\n gap: 2px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.band-sf-row {\n position: relative;\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n gap: 2px 12px;\n align-items: center;\n padding: 10px 12px;\n margin: 0 -12px;\n border-radius: var(--r-lg);\n}\n.band-sf-row:hover {\n background: var(--fill);\n}\n.band-sf-row.is-new,\n.band-sf-row.is-new:hover {\n background: var(--ok-soft);\n}\n.band-sf-row-t {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px 8px;\n min-width: 0;\n}\n.band-sf-row-t b {\n font-weight: 600;\n overflow-wrap: anywhere;\n}\n.band-sf-row-link {\n color: inherit;\n text-decoration: none;\n border-radius: 4px;\n}\n.band-sf-row-link::after {\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: var(--r-lg);\n}\n.band-sf-row-a {\n position: relative;\n z-index: 1;\n}\n.band-sf-row-link:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-row-m {\n grid-column: 1;\n display: flex;\n flex-wrap: wrap;\n gap: 2px 14px;\n color: var(--muted);\n font-size: var(--fs-dense);\n min-width: 0;\n}\n.band-sf-row-m > span {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-sf-row-a {\n grid-column: 2;\n grid-row: 1 / span 2;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.band-sf-row-a .btn {\n position: relative;\n z-index: 1;\n}\n.band-sf-chev {\n color: var(--muted);\n}\n.band-sf-mono {\n font-family: var(--mono);\n font-size: 0.92em;\n}\n.band-sf-facts {\n display: grid;\n gap: 6px 16px;\n margin: 0;\n font-size: var(--fs-ui);\n}\n.band-sf-fact {\n display: grid;\n grid-template-columns: 112px minmax(0, 1fr);\n gap: 16px;\n}\n.band-sf-facts dt {\n color: var(--muted);\n}\n.band-sf-facts dd {\n margin: 0;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.band-sf-dz {\n display: grid;\n gap: 10px;\n padding-top: 8px;\n}\n.band-sf-dz h2 {\n margin: 0;\n font-size: var(--fs-lead);\n font-weight: 600;\n}\n.band-sf-dz-r {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n}\n.band-sf-dz-r > div {\n display: grid;\n gap: 2px;\n min-width: 0;\n}\n.band-sf-dz-r span {\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-dz-r .btn {\n flex: none;\n}\n.band-sf-empty,\n.band-sf .band-sf-empty.rest {\n display: grid;\n justify-items: start;\n text-align: start;\n gap: 10px;\n padding: 24px 0;\n max-width: 480px;\n}\n.band-sf-empty p {\n margin: 0;\n color: var(--muted);\n}\n.band-sf-error {\n min-width: 0;\n}\n.band-sf-load {\n padding: 40px 0;\n display: grid;\n justify-items: start;\n}\n.band-sf-ok {\n margin: 0;\n color: var(--ok);\n font-size: var(--fs-ui);\n}\n.band-sf-muted {\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-sf-banner {\n margin: 0;\n padding: 10px 12px;\n border-radius: var(--r-lg);\n background: var(--fill);\n font-size: var(--fs-ui);\n}\n.band-sf-banner.is-warn {\n display: flex;\n align-items: center;\n gap: 8px;\n background: var(--warn-soft);\n}\n.band-sf-form {\n display: grid;\n gap: 16px;\n max-width: 560px;\n min-width: 0;\n}\n.band-sf-form code {\n overflow-wrap: anywhere;\n}\n.band-sf-fld {\n display: grid;\n gap: 6px;\n min-width: 0;\n}\n.band-sf-fld > label {\n font-size: var(--fs-ui);\n font-weight: 500;\n}\n.band-sf-fld .field {\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n}\n.band-sf-fld textarea.field {\n resize: vertical;\n line-height: 1.5;\n}\n.band-sf-req {\n margin-left: 6px;\n color: var(--muted);\n font-weight: 400;\n}\n.band-sf-optional {\n margin-left: 6px;\n color: var(--muted);\n font-weight: 400;\n}\n.band-sf-one {\n display: grid;\n gap: 10px;\n min-width: 0;\n}\n.band-sf-one fieldset {\n margin: 0;\n padding: 0;\n border: 0;\n min-width: 0;\n display: grid;\n gap: 10px;\n}\n.band-sf-choices {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n}\n.band-sf-blks-l {\n font-size: var(--fs-ui);\n font-weight: 600;\n}\n.band-sf-blks {\n display: grid;\n gap: 8px;\n}\n.band-sf-blks-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n}\n.band-sf-blks-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n.band-sf-blk {\n display: grid;\n gap: 4px;\n align-content: start;\n padding: 12px 14px;\n border-radius: var(--r-lg);\n background: var(--fill);\n cursor: pointer;\n min-width: 0;\n}\n.band-sf-blk > b {\n font-weight: 600;\n font-size: var(--fs-ui);\n overflow-wrap: anywhere;\n}\n.band-sf-blk > small {\n color: var(--muted);\n font-size: var(--fs-dense);\n overflow-wrap: anywhere;\n}\n.band-sf-blk.is-on {\n background: var(--accent-soft);\n box-shadow: inset 0 0 0 2px var(--accent);\n}\n.band-sf-blk.is-on > b {\n color: var(--accent-text);\n}\n.band-sf-blk:has(:focus-visible) {\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-blk:has(:disabled) {\n cursor: default;\n}\n@media (max-width: 600px) {\n .band-sf-blks-3,\n .band-sf-blks-2 {\n grid-template-columns: minmax(0, 1fr);\n }\n}\n.band-sf-hint {\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-hint a,\n.band-sf-fld .field-note a,\n.band-sf-muted a {\n color: var(--accent-text);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.band-sf-err {\n margin: 0;\n color: var(--bad);\n font-size: var(--fs-ui);\n}\n.band-sf-fail {\n grid-column: 1 / -1;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n overflow-wrap: anywhere;\n}\n.band-sf-given {\n margin: 0;\n padding: 10px 12px;\n border-radius: var(--r-lg);\n background: var(--fill);\n font-size: var(--fs-ui);\n}\ndl.band-sf-given {\n display: grid;\n grid-template-columns: 56px minmax(0, 1fr);\n gap: 2px 12px;\n}\ndl.band-sf-given dt {\n color: var(--muted);\n}\ndl.band-sf-given dd {\n margin: 0;\n min-width: 0;\n}\ndl.band-sf-given p {\n grid-column: 1 / -1;\n margin: 0;\n color: var(--muted);\n font-size: var(--fs-dense);\n}\n.band-sf-stepback {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n align-self: start;\n justify-self: start;\n padding: 0;\n border: 0;\n background: none;\n color: var(--muted);\n font: inherit;\n font-size: var(--fs-ui);\n cursor: pointer;\n border-radius: 4px;\n}\n.band-sf-stepback:hover {\n color: var(--ink);\n}\n.band-sf-stepback:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent);\n}\n.band-sf-acts {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n}\n.band-sf-acts-end {\n justify-content: flex-end;\n}\n.band-sf-state {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var(--muted);\n font-size: var(--fs-ui);\n}\n.band-settings-no-access {\n display: grid;\n gap: 10px;\n justify-items: start;\n max-width: 560px;\n padding-top: 8px;\n}\n.band-settings-no-access h2 {\n margin: 0;\n font-size: var(--fs-title);\n}\n.band-settings-no-access p {\n margin: 0;\n color: var(--muted);\n}\n.band-sf-dialog {\n box-sizing: border-box;\n width: min(460px, calc(100vw - 32px));\n max-height: calc(100dvh - 32px);\n overflow: auto;\n overscroll-behavior: contain;\n border: 0;\n border-radius: var(--r-xl);\n box-shadow: var(--shadow-pop);\n background: var(--panel);\n color: var(--ink);\n padding: 22px 24px;\n}\n.band-sf-dialog[open] {\n display: grid;\n gap: 14px;\n}\n.band-sf-dialog::backdrop {\n background: var(--scrim);\n}\n.band-sf-dialog h2 {\n margin: 0;\n font-size: var(--fs-title);\n overflow-wrap: anywhere;\n}\n.band-sf-dialog ul {\n margin: 0;\n padding-left: 18px;\n display: grid;\n gap: 4px;\n}\n.band-sf-row-x {\n grid-column: 1 / -1;\n margin-top: 8px;\n min-width: 0;\n}\n.band-sf-row.has-lead {\n grid-template-columns: auto minmax(0, 1fr) auto;\n}\n.band-sf-row-l {\n grid-column: 1;\n grid-row: 1 / span 2;\n display: flex;\n align-items: center;\n}\n.band-sf-row.has-lead .band-sf-row-t,\n.band-sf-row.has-lead .band-sf-row-m {\n grid-column: 2;\n}\n.band-sf-row.has-lead .band-sf-row-a {\n grid-column: 3;\n}\n@media (max-width: 600px) {\n .band-sf {\n grid-template-columns: minmax(0, 1fr);\n }\n .band-sf[data-view=page] .band-sf-nav {\n display: none;\n }\n .band-sf[data-view=index] .band-sf-scroll {\n display: none;\n }\n .band-sf-nav {\n padding: 16px;\n }\n .band-sf-grp a {\n padding: 10px 8px;\n font-size: var(--fs-body);\n }\n .band-sf-grp a .band-sf-chev {\n display: inline;\n }\n .band-sf-grp a[aria-current=page] {\n background: none;\n font-weight: 400;\n }\n .band-sf-main {\n padding: 12px 16px 48px;\n gap: 16px;\n }\n .band-sf-back-m {\n display: inline-flex;\n }\n .band-sf-h {\n display: grid;\n gap: 10px;\n }\n .band-sf-h-a .btn {\n justify-self: start;\n }\n .band-sf-row-a {\n grid-column: 1 / -1;\n grid-row: auto;\n justify-content: flex-start;\n margin-top: 4px;\n }\n .band-sf-row-a .band-sf-chev {\n margin-left: auto;\n }\n .band-sf-row-a:has(.band-sf-chev:only-child) {\n grid-column: 2;\n grid-row: 1 / span 2;\n justify-content: flex-end;\n margin-top: 0;\n }\n .band-sf-row > .band-sf-acts {\n grid-column: 1 / -1;\n justify-content: flex-start;\n margin-top: 4px;\n }\n .band-sf-fact {\n grid-template-columns: 88px minmax(0, 1fr);\n gap: 12px;\n }\n .band-sf-dz-r {\n display: grid;\n gap: 8px;\n }\n .band-sf-dz-r .btn {\n justify-self: start;\n }\n .band-sf-dialog {\n padding: 18px 16px;\n }\n .band-sf-row.has-lead .band-sf-row-a {\n grid-column: 2 / -1;\n }\n}\n";
|
|
4
4
|
let el = document.head.querySelector("style[data-band-style=\"@kanyun-ai-infra/band-plugin-react\"]");
|
|
5
5
|
if (!el) {
|
|
6
6
|
el = document.createElement("style");
|
|
@@ -14,12 +14,16 @@ import {
|
|
|
14
14
|
AgentAvatar,
|
|
15
15
|
Avatar,
|
|
16
16
|
BandMark,
|
|
17
|
+
Combobox,
|
|
17
18
|
ErrorNote,
|
|
19
|
+
FilterMenu,
|
|
18
20
|
Glyph,
|
|
19
21
|
INSTRUMENTS,
|
|
20
22
|
InfoNote,
|
|
21
23
|
LogoLockup,
|
|
22
24
|
PaneHeader,
|
|
25
|
+
PersonPicker,
|
|
26
|
+
PersonSearch,
|
|
23
27
|
SettingsActions,
|
|
24
28
|
SettingsBack,
|
|
25
29
|
SettingsChoices,
|
|
@@ -35,6 +39,7 @@ import {
|
|
|
35
39
|
SettingsLoading,
|
|
36
40
|
SettingsNoAccess,
|
|
37
41
|
SettingsNotice,
|
|
42
|
+
SettingsPicks,
|
|
38
43
|
SettingsReadError,
|
|
39
44
|
SettingsRow,
|
|
40
45
|
SettingsRows,
|
|
@@ -42,15 +47,24 @@ import {
|
|
|
42
47
|
SettingsSaved,
|
|
43
48
|
SettingsSection,
|
|
44
49
|
SettingsSingle,
|
|
50
|
+
TagInput,
|
|
51
|
+
ToastHost,
|
|
45
52
|
WorkshopEmblem,
|
|
46
53
|
WorkshopIcon,
|
|
47
54
|
agentInstrument,
|
|
48
55
|
avatarInitial,
|
|
49
56
|
avatarTone,
|
|
57
|
+
dismissAllToasts,
|
|
58
|
+
dismissToast,
|
|
59
|
+
facetedCount,
|
|
60
|
+
filterRows,
|
|
50
61
|
instrumentOf,
|
|
51
62
|
memberOrder,
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
peopleDirectory,
|
|
64
|
+
settingsLinkHandler,
|
|
65
|
+
splitTags,
|
|
66
|
+
toast
|
|
67
|
+
} from "./chunk-ER2ITOG5.js";
|
|
54
68
|
import {
|
|
55
69
|
scrollIntoPanel
|
|
56
70
|
} from "./chunk-VKASR4EL.js";
|
|
@@ -329,7 +343,7 @@ function Slot({
|
|
|
329
343
|
onChange
|
|
330
344
|
}) {
|
|
331
345
|
const input = useRef(null);
|
|
332
|
-
const
|
|
346
|
+
const seq2 = useRef(0);
|
|
333
347
|
const [expanded, setExpanded] = useState(false);
|
|
334
348
|
const remove = (picked) => onChange(files.filter((f) => f !== picked));
|
|
335
349
|
const row = (f) => /* @__PURE__ */ jsxs("span", { className: "band-plugin-react-first-delivery-file", children: [
|
|
@@ -367,7 +381,7 @@ function Slot({
|
|
|
367
381
|
const same2 = next.some((f) => pathOf(f.file) === pathOf(file));
|
|
368
382
|
next = [
|
|
369
383
|
...next.filter((f) => pathOf(f.file) !== pathOf(file)),
|
|
370
|
-
{ id: ++
|
|
384
|
+
{ id: ++seq2.current, file, ...same2 ? { replaced: true } : {} }
|
|
371
385
|
];
|
|
372
386
|
}
|
|
373
387
|
onChange(next);
|
|
@@ -494,8 +508,8 @@ ${JSON.stringify(value)}`;
|
|
|
494
508
|
);
|
|
495
509
|
return useSyncExternalStore(subscribe, read3, read3);
|
|
496
510
|
}
|
|
497
|
-
function entriesFor(
|
|
498
|
-
return
|
|
511
|
+
function entriesFor(entries, field, value) {
|
|
512
|
+
return entries.filter((e) => e.meta[field] === void 0 || e.meta[field] === value);
|
|
499
513
|
}
|
|
500
514
|
function Mount({
|
|
501
515
|
mount,
|
|
@@ -533,16 +547,16 @@ function useGeneration(scope, keys) {
|
|
|
533
547
|
function useLoaded(load, scope, keys, subscribe, keepPrevious) {
|
|
534
548
|
const { gen: current, scopeGen: currentScope } = useGeneration(scope, keys);
|
|
535
549
|
const [state, setState] = useState2({ gen: 0, scope: 0, error: null });
|
|
536
|
-
const
|
|
550
|
+
const seq2 = useRef2(0);
|
|
537
551
|
const reload2 = useCallback(() => {
|
|
538
|
-
const n = ++
|
|
552
|
+
const n = ++seq2.current;
|
|
539
553
|
load().then(
|
|
540
554
|
(v) => {
|
|
541
|
-
if (n !==
|
|
555
|
+
if (n !== seq2.current) return;
|
|
542
556
|
setState({ gen: current, scope: currentScope, data: v, error: null });
|
|
543
557
|
},
|
|
544
558
|
(e) => {
|
|
545
|
-
if (n !==
|
|
559
|
+
if (n !== seq2.current) return;
|
|
546
560
|
setState(
|
|
547
561
|
(s) => s.gen === current ? { ...s, error: errorText(e) } : {
|
|
548
562
|
gen: current,
|
|
@@ -842,531 +856,12 @@ function useComposition(onEnd) {
|
|
|
842
856
|
};
|
|
843
857
|
}
|
|
844
858
|
|
|
845
|
-
// src/controls.tsx
|
|
846
|
-
import { withImeGuard as withImeGuard2 } from "@kanyun-ai-infra/band-plugin-sdk";
|
|
847
|
-
import { useEffect as useEffect3, useId, useMemo, useRef as useRef4, useState as useState5 } from "react";
|
|
848
|
-
import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
849
|
-
function sectionsOf(items) {
|
|
850
|
-
const byTitle = /* @__PURE__ */ new Map();
|
|
851
|
-
for (const item of items) {
|
|
852
|
-
const title = item.group ?? null;
|
|
853
|
-
const bucket = byTitle.get(title);
|
|
854
|
-
if (bucket) bucket.push(item);
|
|
855
|
-
else byTitle.set(title, [item]);
|
|
856
|
-
}
|
|
857
|
-
return [...byTitle].map(([title, list]) => ({ title, items: list }));
|
|
858
|
-
}
|
|
859
|
-
function highlight(text, query) {
|
|
860
|
-
const q = query.trim();
|
|
861
|
-
if (q === "") return text;
|
|
862
|
-
const escaped = q.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
863
|
-
const parts = text.split(new RegExp(`(${escaped})`, "gi"));
|
|
864
|
-
return parts.map(
|
|
865
|
-
(part, i) => (
|
|
866
|
-
// 奇数下标就是命中的那几段;split 带捕获组时长度与命中的段数相关,按内容再判一次更稳
|
|
867
|
-
i % 2 === 1 && part.toLowerCase() === q.toLowerCase() ? (
|
|
868
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: 拆分结果没有稳定的键,重排只发生在查询变化时
|
|
869
|
-
/* @__PURE__ */ jsx4("mark", { children: part }, i)
|
|
870
|
-
) : (
|
|
871
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: 同上
|
|
872
|
-
/* @__PURE__ */ jsx4("span", { children: part }, i)
|
|
873
|
-
)
|
|
874
|
-
)
|
|
875
|
-
);
|
|
876
|
-
}
|
|
877
|
-
function Combobox({
|
|
878
|
-
label,
|
|
879
|
-
items,
|
|
880
|
-
value,
|
|
881
|
-
onChange,
|
|
882
|
-
multiple = false,
|
|
883
|
-
placeholder,
|
|
884
|
-
emptyText,
|
|
885
|
-
onCreate,
|
|
886
|
-
createLabel,
|
|
887
|
-
disabled = false
|
|
888
|
-
}) {
|
|
889
|
-
const id = useId();
|
|
890
|
-
const listId = `${id}-list`;
|
|
891
|
-
const [query, setQuery] = useState5("");
|
|
892
|
-
const [open, setOpen] = useState5(false);
|
|
893
|
-
const [active, setActive] = useState5(0);
|
|
894
|
-
const input = useRef4(null);
|
|
895
|
-
const list = useRef4(null);
|
|
896
|
-
const q = query.trim();
|
|
897
|
-
const matched = useMemo(() => {
|
|
898
|
-
const base = q === "" ? items : items.filter(
|
|
899
|
-
(it) => [it.label, it.meta ?? "", it.keywords ?? ""].some(
|
|
900
|
-
(t) => t.toLowerCase().includes(q.toLowerCase())
|
|
901
|
-
)
|
|
902
|
-
);
|
|
903
|
-
return base.filter((it) => !value.includes(it.value));
|
|
904
|
-
}, [items, value, q]);
|
|
905
|
-
const sections = useMemo(() => sectionsOf(matched), [matched]);
|
|
906
|
-
const flat2 = useMemo(() => sections.flatMap((s) => s.items), [sections]);
|
|
907
|
-
const exact = q !== "" && items.some((it) => it.label === q);
|
|
908
|
-
const canCreate = onCreate !== void 0 && q !== "" && !exact;
|
|
909
|
-
const total = flat2.length + (canCreate ? 1 : 0);
|
|
910
|
-
const activeIndex = total === 0 ? -1 : Math.min(active, total - 1);
|
|
911
|
-
function pick2(item) {
|
|
912
|
-
if (multiple) {
|
|
913
|
-
if (!value.includes(item.value)) onChange([...value, item.value]);
|
|
914
|
-
} else {
|
|
915
|
-
onChange([item.value]);
|
|
916
|
-
}
|
|
917
|
-
setQuery("");
|
|
918
|
-
if (!multiple) setOpen(false);
|
|
919
|
-
setActive(0);
|
|
920
|
-
input.current?.focus();
|
|
921
|
-
}
|
|
922
|
-
function create() {
|
|
923
|
-
if (!onCreate || q === "") return;
|
|
924
|
-
onCreate(q);
|
|
925
|
-
setQuery("");
|
|
926
|
-
if (!multiple) setOpen(false);
|
|
927
|
-
setActive(0);
|
|
928
|
-
input.current?.focus();
|
|
929
|
-
}
|
|
930
|
-
function remove(v) {
|
|
931
|
-
onChange(value.filter((x) => x !== v));
|
|
932
|
-
input.current?.focus();
|
|
933
|
-
}
|
|
934
|
-
function move(step) {
|
|
935
|
-
if (total === 0) return;
|
|
936
|
-
setOpen(true);
|
|
937
|
-
const next = (activeIndex + step + total) % total;
|
|
938
|
-
setActive(next);
|
|
939
|
-
const el = list.current?.querySelector(`[data-index="${next}"]`);
|
|
940
|
-
if (el) scrollIntoPanel(el, { block: "nearest" });
|
|
941
|
-
}
|
|
942
|
-
const onComboKey = withImeGuard2((e) => {
|
|
943
|
-
if (e.key === "Escape") {
|
|
944
|
-
if (open) {
|
|
945
|
-
setOpen(false);
|
|
946
|
-
e.stopPropagation();
|
|
947
|
-
}
|
|
948
|
-
return;
|
|
949
|
-
}
|
|
950
|
-
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
951
|
-
e.preventDefault();
|
|
952
|
-
move(e.key === "ArrowDown" ? 1 : -1);
|
|
953
|
-
return;
|
|
954
|
-
}
|
|
955
|
-
if (e.key === "Enter") {
|
|
956
|
-
if (!open) return;
|
|
957
|
-
e.preventDefault();
|
|
958
|
-
if (activeIndex < 0) return;
|
|
959
|
-
const item = flat2[activeIndex];
|
|
960
|
-
if (item) pick2(item);
|
|
961
|
-
else create();
|
|
962
|
-
return;
|
|
963
|
-
}
|
|
964
|
-
if (e.key === " " && multiple && open && query === "" && activeIndex >= 0) {
|
|
965
|
-
const item = flat2[activeIndex];
|
|
966
|
-
if (!item) return;
|
|
967
|
-
e.preventDefault();
|
|
968
|
-
pick2(item);
|
|
969
|
-
return;
|
|
970
|
-
}
|
|
971
|
-
if (e.key === "Backspace" && query === "" && value.length > 0) {
|
|
972
|
-
const last = value[value.length - 1];
|
|
973
|
-
if (last !== void 0) {
|
|
974
|
-
e.preventDefault();
|
|
975
|
-
remove(last);
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
});
|
|
979
|
-
const selected = value.map((v) => ({
|
|
980
|
-
value: v,
|
|
981
|
-
label: items.find((it) => it.value === v)?.label ?? v
|
|
982
|
-
}));
|
|
983
|
-
return /* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-combo", children: [
|
|
984
|
-
selected.length > 0 && /* @__PURE__ */ jsx4("ul", { className: "band-plugin-react-combo-picked", "aria-label": `\u5DF2\u9009${label}`, children: selected.map((it) => /* @__PURE__ */ jsxs3("li", { className: "band-plugin-react-combo-chip", children: [
|
|
985
|
-
it.label,
|
|
986
|
-
/* @__PURE__ */ jsx4(
|
|
987
|
-
"button",
|
|
988
|
-
{
|
|
989
|
-
type: "button",
|
|
990
|
-
"aria-label": `\u79FB\u9664 ${it.label}`,
|
|
991
|
-
disabled,
|
|
992
|
-
onClick: () => remove(it.value),
|
|
993
|
-
children: "\xD7"
|
|
994
|
-
}
|
|
995
|
-
)
|
|
996
|
-
] }, it.value)) }),
|
|
997
|
-
/* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-combo-field field-host", children: [
|
|
998
|
-
/* @__PURE__ */ jsx4(
|
|
999
|
-
"input",
|
|
1000
|
-
{
|
|
1001
|
-
ref: input,
|
|
1002
|
-
className: "field bare",
|
|
1003
|
-
type: "text",
|
|
1004
|
-
role: "combobox",
|
|
1005
|
-
"aria-label": label,
|
|
1006
|
-
"aria-expanded": open,
|
|
1007
|
-
"aria-controls": open ? listId : void 0,
|
|
1008
|
-
"aria-autocomplete": "list",
|
|
1009
|
-
"aria-activedescendant": open && activeIndex >= 0 ? `${listId}-${activeIndex}` : void 0,
|
|
1010
|
-
autoComplete: "off",
|
|
1011
|
-
disabled,
|
|
1012
|
-
placeholder: placeholder ?? label,
|
|
1013
|
-
value: query,
|
|
1014
|
-
onChange: (e) => {
|
|
1015
|
-
setQuery(e.target.value);
|
|
1016
|
-
setOpen(true);
|
|
1017
|
-
setActive(0);
|
|
1018
|
-
},
|
|
1019
|
-
onFocus: () => setOpen(true),
|
|
1020
|
-
onClick: () => setOpen(true),
|
|
1021
|
-
onBlur: () => setOpen(false),
|
|
1022
|
-
onKeyDown: onComboKey
|
|
1023
|
-
}
|
|
1024
|
-
),
|
|
1025
|
-
open && // biome-ignore lint/a11y/useFocusableInteractive: 焦点留在输入框(combobox + aria-activedescendant),列表自己不取焦点
|
|
1026
|
-
/* @__PURE__ */ jsxs3(
|
|
1027
|
-
"div",
|
|
1028
|
-
{
|
|
1029
|
-
ref: list,
|
|
1030
|
-
className: "band-plugin-react-combo-pop",
|
|
1031
|
-
id: listId,
|
|
1032
|
-
role: "listbox",
|
|
1033
|
-
"aria-label": label,
|
|
1034
|
-
onMouseDown: (e) => {
|
|
1035
|
-
e.preventDefault();
|
|
1036
|
-
const row = e.target.closest("[data-index]");
|
|
1037
|
-
if (!row) return;
|
|
1038
|
-
const i = Number(row.dataset.index);
|
|
1039
|
-
const item = flat2[i];
|
|
1040
|
-
if (item) pick2(item);
|
|
1041
|
-
else if (i === flat2.length) create();
|
|
1042
|
-
},
|
|
1043
|
-
children: [
|
|
1044
|
-
sections.map((section) => /* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-combo-section", children: [
|
|
1045
|
-
section.title !== null && /* @__PURE__ */ jsx4("div", { className: "band-plugin-react-combo-group", role: "presentation", children: section.title }),
|
|
1046
|
-
section.items.map((it) => {
|
|
1047
|
-
const i = flat2.indexOf(it);
|
|
1048
|
-
return (
|
|
1049
|
-
// biome-ignore lint/a11y/useFocusableInteractive: 见上,选项经 aria-activedescendant 标出,不自己取焦点
|
|
1050
|
-
/* @__PURE__ */ jsxs3(
|
|
1051
|
-
"div",
|
|
1052
|
-
{
|
|
1053
|
-
id: `${listId}-${i}`,
|
|
1054
|
-
role: "option",
|
|
1055
|
-
"aria-selected": value.includes(it.value),
|
|
1056
|
-
"data-index": i,
|
|
1057
|
-
className: `band-plugin-react-combo-opt${i === activeIndex ? " is-active" : ""}`,
|
|
1058
|
-
onMouseEnter: () => setActive(i),
|
|
1059
|
-
children: [
|
|
1060
|
-
/* @__PURE__ */ jsx4("span", { className: "band-plugin-react-combo-label", children: highlight(it.label, q) }),
|
|
1061
|
-
it.meta !== void 0 && /* @__PURE__ */ jsx4("span", { className: "band-plugin-react-combo-meta", children: it.meta })
|
|
1062
|
-
]
|
|
1063
|
-
},
|
|
1064
|
-
it.value
|
|
1065
|
-
)
|
|
1066
|
-
);
|
|
1067
|
-
})
|
|
1068
|
-
] }, section.title ?? "\0")),
|
|
1069
|
-
flat2.length === 0 && q !== "" && /* @__PURE__ */ jsx4("div", { className: "band-plugin-react-combo-empty", children: emptyText ?? `\u6CA1\u6709\u5339\u914D\u7684${label}` }),
|
|
1070
|
-
canCreate && // biome-ignore lint/a11y/useFocusableInteractive: 同候选行
|
|
1071
|
-
/* @__PURE__ */ jsxs3(
|
|
1072
|
-
"div",
|
|
1073
|
-
{
|
|
1074
|
-
id: `${listId}-${flat2.length}`,
|
|
1075
|
-
role: "option",
|
|
1076
|
-
"aria-selected": false,
|
|
1077
|
-
"data-index": flat2.length,
|
|
1078
|
-
className: `band-plugin-react-combo-opt${flat2.length === activeIndex ? " is-active" : ""}`,
|
|
1079
|
-
onMouseEnter: () => setActive(flat2.length),
|
|
1080
|
-
children: [
|
|
1081
|
-
/* @__PURE__ */ jsx4("span", { className: "band-plugin-react-combo-plus", "aria-hidden": "true", children: "+" }),
|
|
1082
|
-
/* @__PURE__ */ jsx4("span", { className: "band-plugin-react-combo-label", children: createLabel ? createLabel(q) : `\u65B0\u5EFA\u300C${q}\u300D` })
|
|
1083
|
-
]
|
|
1084
|
-
}
|
|
1085
|
-
)
|
|
1086
|
-
]
|
|
1087
|
-
}
|
|
1088
|
-
)
|
|
1089
|
-
] })
|
|
1090
|
-
] });
|
|
1091
|
-
}
|
|
1092
|
-
var TAG_SPLIT = /[,,\n\t]/;
|
|
1093
|
-
function splitTags(text) {
|
|
1094
|
-
return text.split(TAG_SPLIT).map((s) => s.trim()).filter((s) => s !== "");
|
|
1095
|
-
}
|
|
1096
|
-
function TagInput({
|
|
1097
|
-
label,
|
|
1098
|
-
value,
|
|
1099
|
-
onChange,
|
|
1100
|
-
placeholder,
|
|
1101
|
-
hint,
|
|
1102
|
-
disabled = false,
|
|
1103
|
-
id
|
|
1104
|
-
}) {
|
|
1105
|
-
const auto = useId();
|
|
1106
|
-
const inputId = id ?? auto;
|
|
1107
|
-
const hintId = `${inputId}-hint`;
|
|
1108
|
-
const [draft, setDraft] = useState5("");
|
|
1109
|
-
const [dup, setDup] = useState5(null);
|
|
1110
|
-
const [dupChip, setDupChip] = useState5(null);
|
|
1111
|
-
const timer = useRef4(null);
|
|
1112
|
-
useEffect3(
|
|
1113
|
-
() => () => {
|
|
1114
|
-
if (timer.current !== null) clearTimeout(timer.current);
|
|
1115
|
-
},
|
|
1116
|
-
[]
|
|
1117
|
-
);
|
|
1118
|
-
function flash(name) {
|
|
1119
|
-
setDup(name);
|
|
1120
|
-
setDupChip(name);
|
|
1121
|
-
if (timer.current !== null) clearTimeout(timer.current);
|
|
1122
|
-
timer.current = setTimeout(() => {
|
|
1123
|
-
setDup(null);
|
|
1124
|
-
setDupChip(null);
|
|
1125
|
-
timer.current = null;
|
|
1126
|
-
}, 1800);
|
|
1127
|
-
}
|
|
1128
|
-
function clearDup() {
|
|
1129
|
-
if (timer.current !== null) {
|
|
1130
|
-
clearTimeout(timer.current);
|
|
1131
|
-
timer.current = null;
|
|
1132
|
-
}
|
|
1133
|
-
setDup(null);
|
|
1134
|
-
setDupChip(null);
|
|
1135
|
-
}
|
|
1136
|
-
function add(raw) {
|
|
1137
|
-
const parts = splitTags(raw);
|
|
1138
|
-
if (parts.length === 0) return;
|
|
1139
|
-
const seen = new Set(value);
|
|
1140
|
-
const added = [];
|
|
1141
|
-
let repeated = null;
|
|
1142
|
-
for (const part of parts) {
|
|
1143
|
-
if (seen.has(part)) {
|
|
1144
|
-
repeated = repeated ?? part;
|
|
1145
|
-
continue;
|
|
1146
|
-
}
|
|
1147
|
-
seen.add(part);
|
|
1148
|
-
added.push(part);
|
|
1149
|
-
}
|
|
1150
|
-
if (repeated !== null) flash(repeated);
|
|
1151
|
-
else clearDup();
|
|
1152
|
-
if (added.length > 0) onChange([...value, ...added]);
|
|
1153
|
-
}
|
|
1154
|
-
function removeAt(i) {
|
|
1155
|
-
const gone = value[i];
|
|
1156
|
-
onChange(value.filter((_, k) => k !== i));
|
|
1157
|
-
if (gone !== void 0 && gone === dupChip) clearDup();
|
|
1158
|
-
}
|
|
1159
|
-
const onTagsKey = withImeGuard2((e) => {
|
|
1160
|
-
if (e.key === "Enter") {
|
|
1161
|
-
e.preventDefault();
|
|
1162
|
-
if (draft.trim() === "") return;
|
|
1163
|
-
add(draft);
|
|
1164
|
-
setDraft("");
|
|
1165
|
-
return;
|
|
1166
|
-
}
|
|
1167
|
-
if (e.key === "," || e.key === "\uFF0C") {
|
|
1168
|
-
if (draft.trim() === "") return;
|
|
1169
|
-
e.preventDefault();
|
|
1170
|
-
add(draft);
|
|
1171
|
-
setDraft("");
|
|
1172
|
-
return;
|
|
1173
|
-
}
|
|
1174
|
-
if (e.key === "Backspace" && draft === "" && value.length > 0) {
|
|
1175
|
-
e.preventDefault();
|
|
1176
|
-
const last = value[value.length - 1];
|
|
1177
|
-
if (last !== void 0) {
|
|
1178
|
-
onChange(value.slice(0, -1));
|
|
1179
|
-
if (dupChip === last) clearDup();
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
});
|
|
1183
|
-
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
1184
|
-
/* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-tags field-host", children: [
|
|
1185
|
-
value.map((tag, i) => /* @__PURE__ */ jsxs3(
|
|
1186
|
-
"span",
|
|
1187
|
-
{
|
|
1188
|
-
className: "band-plugin-react-tag",
|
|
1189
|
-
...dupChip === tag ? { "data-dup": "" } : {},
|
|
1190
|
-
children: [
|
|
1191
|
-
tag,
|
|
1192
|
-
/* @__PURE__ */ jsx4(
|
|
1193
|
-
"button",
|
|
1194
|
-
{
|
|
1195
|
-
type: "button",
|
|
1196
|
-
"aria-label": `\u79FB\u9664 ${tag}`,
|
|
1197
|
-
disabled,
|
|
1198
|
-
onClick: () => removeAt(i),
|
|
1199
|
-
children: "\xD7"
|
|
1200
|
-
}
|
|
1201
|
-
)
|
|
1202
|
-
]
|
|
1203
|
-
},
|
|
1204
|
-
tag
|
|
1205
|
-
)),
|
|
1206
|
-
/* @__PURE__ */ jsx4(
|
|
1207
|
-
"input",
|
|
1208
|
-
{
|
|
1209
|
-
id: inputId,
|
|
1210
|
-
className: "field bare",
|
|
1211
|
-
type: "text",
|
|
1212
|
-
"aria-label": label,
|
|
1213
|
-
"aria-describedby": hintId,
|
|
1214
|
-
autoComplete: "off",
|
|
1215
|
-
disabled,
|
|
1216
|
-
placeholder: value.length === 0 ? placeholder ?? "\u7C98\u8D34\u6216\u8F93\u5165\uFF0C\u56DE\u8F66\u786E\u8BA4" : "",
|
|
1217
|
-
value: draft,
|
|
1218
|
-
onChange: (e) => setDraft(e.target.value),
|
|
1219
|
-
onKeyDown: onTagsKey,
|
|
1220
|
-
onPaste: (e) => {
|
|
1221
|
-
const text = e.clipboardData.getData("text");
|
|
1222
|
-
if (!TAG_SPLIT.test(text)) return;
|
|
1223
|
-
e.preventDefault();
|
|
1224
|
-
const el = e.currentTarget;
|
|
1225
|
-
const at = el.selectionStart ?? draft.length;
|
|
1226
|
-
const end = el.selectionEnd ?? at;
|
|
1227
|
-
add(draft.slice(0, at) + text + draft.slice(end));
|
|
1228
|
-
setDraft("");
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
)
|
|
1232
|
-
] }),
|
|
1233
|
-
/* @__PURE__ */ jsx4(
|
|
1234
|
-
"p",
|
|
1235
|
-
{
|
|
1236
|
-
className: "band-plugin-react-tag-hint",
|
|
1237
|
-
id: hintId,
|
|
1238
|
-
...dup !== null ? { "data-err": "" } : {},
|
|
1239
|
-
children: dup !== null ? `\u300C${dup}\u300D\u91CD\u590D\u4E86\uFF0C\u5DF2\u8DF3\u8FC7` : hint
|
|
1240
|
-
}
|
|
1241
|
-
)
|
|
1242
|
-
] });
|
|
1243
|
-
}
|
|
1244
|
-
function facetedCount(rows, groups, selection, groupKey, value) {
|
|
1245
|
-
let n = 0;
|
|
1246
|
-
for (const row of rows) {
|
|
1247
|
-
if (row[groupKey] !== value) continue;
|
|
1248
|
-
let ok = true;
|
|
1249
|
-
for (const g of groups) {
|
|
1250
|
-
if (g.key === groupKey) continue;
|
|
1251
|
-
const picked = selection[g.key] ?? [];
|
|
1252
|
-
if (picked.length === 0) continue;
|
|
1253
|
-
const v = row[g.key];
|
|
1254
|
-
if (v === void 0 || !picked.includes(v)) {
|
|
1255
|
-
ok = false;
|
|
1256
|
-
break;
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
if (ok) n++;
|
|
1260
|
-
}
|
|
1261
|
-
return n;
|
|
1262
|
-
}
|
|
1263
|
-
function filterRows(rows, groups, selection) {
|
|
1264
|
-
return rows.filter(
|
|
1265
|
-
(row) => groups.every((g) => {
|
|
1266
|
-
const picked = selection[g.key] ?? [];
|
|
1267
|
-
if (picked.length === 0) return true;
|
|
1268
|
-
const v = row[g.key];
|
|
1269
|
-
return v !== void 0 && picked.includes(v);
|
|
1270
|
-
})
|
|
1271
|
-
);
|
|
1272
|
-
}
|
|
1273
|
-
function FilterMenu({
|
|
1274
|
-
groups,
|
|
1275
|
-
rows,
|
|
1276
|
-
value,
|
|
1277
|
-
onChange,
|
|
1278
|
-
emptyText
|
|
1279
|
-
}) {
|
|
1280
|
-
const id = useId();
|
|
1281
|
-
const [collapsed, setCollapsed] = useState5(() => /* @__PURE__ */ new Set());
|
|
1282
|
-
function toggle(groupKey, option) {
|
|
1283
|
-
const picked = value[groupKey] ?? [];
|
|
1284
|
-
const next = picked.includes(option) ? picked.filter((x) => x !== option) : [...picked, option];
|
|
1285
|
-
const merged = { ...value, [groupKey]: next };
|
|
1286
|
-
if (next.length === 0) delete merged[groupKey];
|
|
1287
|
-
onChange(merged);
|
|
1288
|
-
}
|
|
1289
|
-
function clear() {
|
|
1290
|
-
onChange({});
|
|
1291
|
-
}
|
|
1292
|
-
function toggleGroup(key) {
|
|
1293
|
-
setCollapsed((prev) => {
|
|
1294
|
-
const next = new Set(prev);
|
|
1295
|
-
if (next.has(key)) next.delete(key);
|
|
1296
|
-
else next.add(key);
|
|
1297
|
-
return next;
|
|
1298
|
-
});
|
|
1299
|
-
}
|
|
1300
|
-
const chips = Object.entries(value).flatMap(([key, values]) => {
|
|
1301
|
-
const group = groups.find((g) => g.key === key);
|
|
1302
|
-
return values.map((v) => ({
|
|
1303
|
-
key,
|
|
1304
|
-
value: v,
|
|
1305
|
-
label: group?.options.find((o) => o.value === v)?.label ?? v
|
|
1306
|
-
}));
|
|
1307
|
-
});
|
|
1308
|
-
return /* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-filter", children: [
|
|
1309
|
-
/* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-filter-chips", children: [
|
|
1310
|
-
chips.map((chip) => /* @__PURE__ */ jsxs3("span", { className: "band-plugin-react-filter-chip", children: [
|
|
1311
|
-
chip.label,
|
|
1312
|
-
/* @__PURE__ */ jsx4(
|
|
1313
|
-
"button",
|
|
1314
|
-
{
|
|
1315
|
-
type: "button",
|
|
1316
|
-
"aria-label": `\u79FB\u9664 ${chip.label} \u7B5B\u9009`,
|
|
1317
|
-
onClick: () => toggle(chip.key, chip.value),
|
|
1318
|
-
children: "\xD7"
|
|
1319
|
-
}
|
|
1320
|
-
)
|
|
1321
|
-
] }, `${chip.key}\0${chip.value}`)),
|
|
1322
|
-
chips.length > 0 && /* @__PURE__ */ jsx4("button", { type: "button", className: "band-plugin-react-filter-clear", onClick: clear, children: "\u6E05\u7A7A" })
|
|
1323
|
-
] }),
|
|
1324
|
-
groups.map((g) => {
|
|
1325
|
-
const picked = value[g.key] ?? [];
|
|
1326
|
-
const isCollapsed = collapsed.has(g.key);
|
|
1327
|
-
const panel = `${id}-${g.key}`;
|
|
1328
|
-
return /* @__PURE__ */ jsxs3("div", { className: "band-plugin-react-filter-group-box", children: [
|
|
1329
|
-
/* @__PURE__ */ jsxs3(
|
|
1330
|
-
"button",
|
|
1331
|
-
{
|
|
1332
|
-
type: "button",
|
|
1333
|
-
className: "band-plugin-react-filter-group",
|
|
1334
|
-
"aria-expanded": !isCollapsed,
|
|
1335
|
-
"aria-controls": panel,
|
|
1336
|
-
onClick: () => toggleGroup(g.key),
|
|
1337
|
-
children: [
|
|
1338
|
-
g.label,
|
|
1339
|
-
/* @__PURE__ */ jsx4("span", { className: "band-plugin-react-filter-group-count", children: picked.length })
|
|
1340
|
-
]
|
|
1341
|
-
}
|
|
1342
|
-
),
|
|
1343
|
-
/* @__PURE__ */ jsxs3("div", { id: panel, hidden: isCollapsed, children: [
|
|
1344
|
-
g.options.length === 0 && /* @__PURE__ */ jsx4("p", { className: "band-plugin-react-filter-empty", children: emptyText ?? "\u6CA1\u6709\u53EF\u7B5B\u7684" }),
|
|
1345
|
-
g.options.map((o) => /* @__PURE__ */ jsxs3("label", { className: "band-plugin-react-filter-opt choice", children: [
|
|
1346
|
-
/* @__PURE__ */ jsx4(
|
|
1347
|
-
"input",
|
|
1348
|
-
{
|
|
1349
|
-
type: "checkbox",
|
|
1350
|
-
className: "checkbox",
|
|
1351
|
-
checked: picked.includes(o.value),
|
|
1352
|
-
onChange: () => toggle(g.key, o.value)
|
|
1353
|
-
}
|
|
1354
|
-
),
|
|
1355
|
-
o.label,
|
|
1356
|
-
/* @__PURE__ */ jsx4("span", { className: "band-plugin-react-filter-count", children: facetedCount(rows, groups, value, g.key, o.value) })
|
|
1357
|
-
] }, o.value))
|
|
1358
|
-
] })
|
|
1359
|
-
] }, g.key);
|
|
1360
|
-
})
|
|
1361
|
-
] });
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
859
|
// src/retry.tsx
|
|
1365
|
-
import { useState as
|
|
1366
|
-
import { Fragment as
|
|
860
|
+
import { useState as useState5 } from "react";
|
|
861
|
+
import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1367
862
|
function Retry({ ctx, stage }) {
|
|
1368
|
-
const [busy, setBusy] =
|
|
1369
|
-
const [error, setError] =
|
|
863
|
+
const [busy, setBusy] = useState5(false);
|
|
864
|
+
const [error, setError] = useState5(null);
|
|
1370
865
|
const can = ctx.member.can("submit-change");
|
|
1371
866
|
const retry = async () => {
|
|
1372
867
|
setBusy(true);
|
|
@@ -1379,8 +874,8 @@ function Retry({ ctx, stage }) {
|
|
|
1379
874
|
setBusy(false);
|
|
1380
875
|
}
|
|
1381
876
|
};
|
|
1382
|
-
return /* @__PURE__ */
|
|
1383
|
-
/* @__PURE__ */
|
|
877
|
+
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
878
|
+
/* @__PURE__ */ jsx4(
|
|
1384
879
|
"button",
|
|
1385
880
|
{
|
|
1386
881
|
type: "button",
|
|
@@ -1391,13 +886,13 @@ function Retry({ ctx, stage }) {
|
|
|
1391
886
|
children: busy ? "\u91CD\u8BD5\u4E2D\u2026" : "\u91CD\u8BD5"
|
|
1392
887
|
}
|
|
1393
888
|
),
|
|
1394
|
-
error && /* @__PURE__ */
|
|
889
|
+
error && /* @__PURE__ */ jsx4(ErrorNote, { children: error })
|
|
1395
890
|
] });
|
|
1396
891
|
}
|
|
1397
892
|
|
|
1398
893
|
// src/stop.tsx
|
|
1399
|
-
import { useEffect as
|
|
1400
|
-
import { Fragment as
|
|
894
|
+
import { useEffect as useEffect3, useRef as useRef4, useState as useState6 } from "react";
|
|
895
|
+
import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1401
896
|
var STOP_COST = "\u505C\u4E0B\u540E\u8FD9\u4E00\u56DE\u5408\u7684\u7ED3\u679C\u4E0D\u4FDD\u7559\uFF1B\u8981\u662F\u505C\u4E0B\u524D\u5DF2\u7ECF\u505A\u5B8C\uFF0C\u4F1A\u7167\u5E38\u4EA4\u4ED8\u3002";
|
|
1402
897
|
function queuedMessages(queue) {
|
|
1403
898
|
return queue.reduce((n, q) => n + q.threadIds.length, 0);
|
|
@@ -1412,11 +907,11 @@ function StopTurn({
|
|
|
1412
907
|
queued = 0,
|
|
1413
908
|
elsewhere = false
|
|
1414
909
|
}) {
|
|
1415
|
-
const [asking, setAsking] =
|
|
1416
|
-
const [busy, setBusy] =
|
|
1417
|
-
const [error, setError] =
|
|
1418
|
-
const confirmRef =
|
|
1419
|
-
|
|
910
|
+
const [asking, setAsking] = useState6(false);
|
|
911
|
+
const [busy, setBusy] = useState6(false);
|
|
912
|
+
const [error, setError] = useState6(null);
|
|
913
|
+
const confirmRef = useRef4(null);
|
|
914
|
+
useEffect3(() => {
|
|
1420
915
|
if (asking && confirmRef.current) scrollIntoPanel(confirmRef.current);
|
|
1421
916
|
}, [asking]);
|
|
1422
917
|
if (!can) return null;
|
|
@@ -1433,9 +928,9 @@ function StopTurn({
|
|
|
1433
928
|
}
|
|
1434
929
|
};
|
|
1435
930
|
if (asking)
|
|
1436
|
-
return /* @__PURE__ */
|
|
1437
|
-
/* @__PURE__ */
|
|
1438
|
-
/* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
932
|
+
/* @__PURE__ */ jsx5("span", { className: noteClassName, children: queued > 0 ? `${STOP_COST}${stopQueuedNote(queued)}` : STOP_COST }),
|
|
933
|
+
/* @__PURE__ */ jsx5(
|
|
1439
934
|
"button",
|
|
1440
935
|
{
|
|
1441
936
|
ref: confirmRef,
|
|
@@ -1446,7 +941,7 @@ function StopTurn({
|
|
|
1446
941
|
children: busy ? "\u505C\u4E0B\u4E2D\u2026" : "\u786E\u5B9A\u505C\u4E0B"
|
|
1447
942
|
}
|
|
1448
943
|
),
|
|
1449
|
-
/* @__PURE__ */
|
|
944
|
+
/* @__PURE__ */ jsx5(
|
|
1450
945
|
"button",
|
|
1451
946
|
{
|
|
1452
947
|
type: "button",
|
|
@@ -1456,10 +951,10 @@ function StopTurn({
|
|
|
1456
951
|
children: "\u7EE7\u7EED\u8DD1"
|
|
1457
952
|
}
|
|
1458
953
|
),
|
|
1459
|
-
error && /* @__PURE__ */
|
|
954
|
+
error && /* @__PURE__ */ jsx5(ErrorNote, { children: error })
|
|
1460
955
|
] });
|
|
1461
956
|
if (elsewhere) return null;
|
|
1462
|
-
return /* @__PURE__ */
|
|
957
|
+
return /* @__PURE__ */ jsx5(
|
|
1463
958
|
"button",
|
|
1464
959
|
{
|
|
1465
960
|
type: "button",
|
|
@@ -1482,7 +977,7 @@ function canRestoreProject(deleted, now = /* @__PURE__ */ new Date()) {
|
|
|
1482
977
|
}
|
|
1483
978
|
|
|
1484
979
|
// src/model-hint.tsx
|
|
1485
|
-
import { useEffect as
|
|
980
|
+
import { useEffect as useEffect4, useState as useState7 } from "react";
|
|
1486
981
|
|
|
1487
982
|
// src/no-key.tsx
|
|
1488
983
|
import { MODEL_PROJECT_CONSENT_PENDING } from "@kanyun-ai-infra/band-contracts/api";
|
|
@@ -1493,7 +988,7 @@ import {
|
|
|
1493
988
|
MODEL_SELECTION_REQUIRED,
|
|
1494
989
|
MODEL_SERVICE_NOT_FOUND
|
|
1495
990
|
} from "@kanyun-ai-infra/band-contracts/api";
|
|
1496
|
-
import { jsx as
|
|
991
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1497
992
|
var MODEL_REQUIRED_REASON = "model-required";
|
|
1498
993
|
var MODELS_FOR_PAGE = "@kanyun-ai-infra/band-settings/models-for";
|
|
1499
994
|
var PERSONAL_MODELS_PAGE = "@kanyun-ai-infra/band-settings/models";
|
|
@@ -1529,10 +1024,10 @@ function takeDraft(workshop) {
|
|
|
1529
1024
|
}
|
|
1530
1025
|
}
|
|
1531
1026
|
function NoKeyNotice({ id, onGo }) {
|
|
1532
|
-
return /* @__PURE__ */
|
|
1027
|
+
return /* @__PURE__ */ jsxs5("p", { id, className: "band-plugin-react-no-key", role: "alert", children: [
|
|
1533
1028
|
NO_KEY_TEXT,
|
|
1534
1029
|
" ",
|
|
1535
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ jsx6("button", { type: "button", className: "btn sm", onClick: onGo, children: NO_KEY_BUTTON })
|
|
1536
1031
|
] });
|
|
1537
1032
|
}
|
|
1538
1033
|
var MODEL_NEEDS_SETTINGS = "\u53BB\u9879\u76EE\u8BBE\u7F6E\u9009\u7528";
|
|
@@ -1590,7 +1085,7 @@ function projectModelNeedsText(n) {
|
|
|
1590
1085
|
}
|
|
1591
1086
|
|
|
1592
1087
|
// src/model-hint.tsx
|
|
1593
|
-
import { Fragment as
|
|
1088
|
+
import { Fragment as Fragment5, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1594
1089
|
function modelHintText(policy, def) {
|
|
1595
1090
|
if (policy === void 0 || policy === "off") return null;
|
|
1596
1091
|
if (def) {
|
|
@@ -1638,8 +1133,8 @@ function ModelHint({
|
|
|
1638
1133
|
className
|
|
1639
1134
|
}) {
|
|
1640
1135
|
const api = ctx.app.data.write?.modelCredentials;
|
|
1641
|
-
const [def, setDef] =
|
|
1642
|
-
|
|
1136
|
+
const [def, setDef] = useState7(void 0);
|
|
1137
|
+
useEffect4(() => {
|
|
1643
1138
|
if (policy === void 0 || policy === "off" || !api) return;
|
|
1644
1139
|
let live = true;
|
|
1645
1140
|
api.list().then((r) => live && setDef(defaultOf(r))).catch(() => live && setDef(void 0));
|
|
@@ -1650,15 +1145,15 @@ function ModelHint({
|
|
|
1650
1145
|
if (!api || def === void 0) return null;
|
|
1651
1146
|
const hint = modelHintText(policy, def);
|
|
1652
1147
|
if (!hint) return null;
|
|
1653
|
-
return /* @__PURE__ */
|
|
1148
|
+
return /* @__PURE__ */ jsxs6(
|
|
1654
1149
|
"p",
|
|
1655
1150
|
{
|
|
1656
1151
|
className: className ? `band-plugin-react-model-hint ${className}` : "band-plugin-react-model-hint",
|
|
1657
1152
|
children: [
|
|
1658
1153
|
hint.text,
|
|
1659
|
-
hint.action && /* @__PURE__ */
|
|
1154
|
+
hint.action && /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
1660
1155
|
" ",
|
|
1661
|
-
/* @__PURE__ */
|
|
1156
|
+
/* @__PURE__ */ jsx7(
|
|
1662
1157
|
"button",
|
|
1663
1158
|
{
|
|
1664
1159
|
type: "button",
|
|
@@ -1674,16 +1169,16 @@ function ModelHint({
|
|
|
1674
1169
|
}
|
|
1675
1170
|
|
|
1676
1171
|
// src/target-repo.tsx
|
|
1677
|
-
import { jsx as
|
|
1172
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1678
1173
|
var TARGET_REPO_DOCS = "/docs/start/target-repo";
|
|
1679
1174
|
function TargetRepoNote({
|
|
1680
1175
|
id,
|
|
1681
1176
|
error,
|
|
1682
1177
|
requestAccessUrl
|
|
1683
1178
|
}) {
|
|
1684
|
-
return /* @__PURE__ */
|
|
1685
|
-
error ? /* @__PURE__ */
|
|
1686
|
-
error && requestAccessUrl ? /* @__PURE__ */
|
|
1179
|
+
return /* @__PURE__ */ jsxs7("div", { className: "band-plugin-react-target-repo", children: [
|
|
1180
|
+
error ? /* @__PURE__ */ jsx8("span", { id: targetRepoErrorId(id), className: "band-plugin-react-target-repo-err", children: error }) : null,
|
|
1181
|
+
error && requestAccessUrl ? /* @__PURE__ */ jsxs7(
|
|
1687
1182
|
"a",
|
|
1688
1183
|
{
|
|
1689
1184
|
className: "band-plugin-react-target-repo-request",
|
|
@@ -1697,10 +1192,10 @@ function TargetRepoNote({
|
|
|
1697
1192
|
]
|
|
1698
1193
|
}
|
|
1699
1194
|
) : null,
|
|
1700
|
-
/* @__PURE__ */
|
|
1195
|
+
/* @__PURE__ */ jsxs7("span", { id, children: [
|
|
1701
1196
|
"\u76EE\u524D\u53EA\u80FD\u63D0\u4EA4\u5230 Band \u5EFA\u597D\u7684\u76EE\u6807\u4ED3\u5E93\uFF1B\u8FD8\u6CA1\u6709\u7684\u8BDD\uFF0C\u8BF7\u627E",
|
|
1702
1197
|
" ",
|
|
1703
|
-
/* @__PURE__ */
|
|
1198
|
+
/* @__PURE__ */ jsx8("a", { href: TARGET_REPO_DOCS, target: "_blank", rel: "noreferrer", children: "Band \u7BA1\u7406\u5458" }),
|
|
1704
1199
|
"\u5EFA\u4E00\u4E2A\u3002"
|
|
1705
1200
|
] })
|
|
1706
1201
|
] });
|
|
@@ -1943,17 +1438,17 @@ import {
|
|
|
1943
1438
|
} from "@kanyun-ai-infra/band-plugin-sdk";
|
|
1944
1439
|
import {
|
|
1945
1440
|
useCallback as useCallback2,
|
|
1946
|
-
useEffect as
|
|
1947
|
-
useId as
|
|
1441
|
+
useEffect as useEffect6,
|
|
1442
|
+
useId as useId2,
|
|
1948
1443
|
useLayoutEffect as useLayoutEffect2,
|
|
1949
|
-
useMemo
|
|
1950
|
-
useRef as
|
|
1951
|
-
useState as
|
|
1444
|
+
useMemo,
|
|
1445
|
+
useRef as useRef6,
|
|
1446
|
+
useState as useState9
|
|
1952
1447
|
} from "react";
|
|
1953
1448
|
|
|
1954
1449
|
// src/prompt/ExternalImport.tsx
|
|
1955
|
-
import { useEffect as
|
|
1956
|
-
import { Fragment as
|
|
1450
|
+
import { useEffect as useEffect5, useId, useRef as useRef5, useState as useState8 } from "react";
|
|
1451
|
+
import { Fragment as Fragment6, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1957
1452
|
function personalImportSource(ctx, attachments, connector, options = {}) {
|
|
1958
1453
|
const read3 = attachments.importExternal;
|
|
1959
1454
|
const connections = ctx.app.data.write?.personalConnections;
|
|
@@ -1987,13 +1482,13 @@ function ExternalImportPanel({
|
|
|
1987
1482
|
onClose,
|
|
1988
1483
|
onBusy
|
|
1989
1484
|
}) {
|
|
1990
|
-
const id =
|
|
1991
|
-
const [connected, setConnected] =
|
|
1992
|
-
const [ref, setRef] =
|
|
1993
|
-
const [error, setError] =
|
|
1994
|
-
const [busy, setBusy] =
|
|
1995
|
-
const live =
|
|
1996
|
-
|
|
1485
|
+
const id = useId();
|
|
1486
|
+
const [connected, setConnected] = useState8(null);
|
|
1487
|
+
const [ref, setRef] = useState8("");
|
|
1488
|
+
const [error, setError] = useState8("");
|
|
1489
|
+
const [busy, setBusy] = useState8(false);
|
|
1490
|
+
const live = useRef5(true);
|
|
1491
|
+
useEffect5(() => {
|
|
1997
1492
|
live.current = true;
|
|
1998
1493
|
source.connected().then(
|
|
1999
1494
|
(value) => {
|
|
@@ -2028,18 +1523,18 @@ function ExternalImportPanel({
|
|
|
2028
1523
|
}
|
|
2029
1524
|
}
|
|
2030
1525
|
};
|
|
2031
|
-
return /* @__PURE__ */
|
|
2032
|
-
/* @__PURE__ */
|
|
2033
|
-
/* @__PURE__ */
|
|
2034
|
-
connected === null && !error && /* @__PURE__ */
|
|
2035
|
-
connected === false && /* @__PURE__ */
|
|
1526
|
+
return /* @__PURE__ */ jsxs8("section", { className: "band-plugin-react-prompt-import", "aria-label": importFrom(source.label), children: [
|
|
1527
|
+
/* @__PURE__ */ jsx9("strong", { children: importFrom(source.label) }),
|
|
1528
|
+
/* @__PURE__ */ jsx9("p", { children: "\u7528\u4F60\u7684\u6743\u9650\u8BFB\uFF0C\u9879\u76EE\u6210\u5458\u90FD\u4F1A\u770B\u5230\u8FD9\u4EFD\u5FEB\u7167" }),
|
|
1529
|
+
connected === null && !error && /* @__PURE__ */ jsx9("output", { children: "\u6B63\u5728\u8BFB\u53D6\u8FDE\u63A5\u2026" }),
|
|
1530
|
+
connected === false && /* @__PURE__ */ jsxs8("p", { children: [
|
|
2036
1531
|
"\u8BF7\u5148\u5728\u300C\u6211\u7684\u8FDE\u63A5\u300D\u8FDE\u4E0A ",
|
|
2037
1532
|
source.label,
|
|
2038
1533
|
"\u3002"
|
|
2039
1534
|
] }),
|
|
2040
|
-
connected && /* @__PURE__ */
|
|
2041
|
-
/* @__PURE__ */
|
|
2042
|
-
/* @__PURE__ */
|
|
1535
|
+
connected && /* @__PURE__ */ jsxs8(Fragment6, { children: [
|
|
1536
|
+
/* @__PURE__ */ jsx9("label", { htmlFor: id, children: "\u6587\u6863\u94FE\u63A5" }),
|
|
1537
|
+
/* @__PURE__ */ jsx9(
|
|
2043
1538
|
"input",
|
|
2044
1539
|
{
|
|
2045
1540
|
id,
|
|
@@ -2052,11 +1547,11 @@ function ExternalImportPanel({
|
|
|
2052
1547
|
}
|
|
2053
1548
|
)
|
|
2054
1549
|
] }),
|
|
2055
|
-
error && /* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2057
|
-
/* @__PURE__ */
|
|
2058
|
-
/* @__PURE__ */
|
|
2059
|
-
connected && /* @__PURE__ */
|
|
1550
|
+
error && /* @__PURE__ */ jsx9(ErrorNote, { children: error }),
|
|
1551
|
+
/* @__PURE__ */ jsxs8("div", { className: "band-plugin-react-prompt-import-actions", children: [
|
|
1552
|
+
/* @__PURE__ */ jsx9("button", { type: "button", className: "btn", disabled: busy, onClick: source.manage, children: "\u6211\u7684\u8FDE\u63A5" }),
|
|
1553
|
+
/* @__PURE__ */ jsx9("button", { type: "button", className: "btn", disabled: busy, onClick: onClose, children: "\u53D6\u6D88" }),
|
|
1554
|
+
connected && /* @__PURE__ */ jsx9(
|
|
2060
1555
|
"button",
|
|
2061
1556
|
{
|
|
2062
1557
|
type: "button",
|
|
@@ -2071,7 +1566,7 @@ function ExternalImportPanel({
|
|
|
2071
1566
|
}
|
|
2072
1567
|
|
|
2073
1568
|
// src/prompt/PromptInput.tsx
|
|
2074
|
-
import { Fragment as
|
|
1569
|
+
import { Fragment as Fragment7, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2075
1570
|
function singleLimitShown(l) {
|
|
2076
1571
|
return Math.min(l.maxFileBytes, l.maxTotalBytes);
|
|
2077
1572
|
}
|
|
@@ -2108,22 +1603,22 @@ function PromptInput(props) {
|
|
|
2108
1603
|
autoFocus
|
|
2109
1604
|
} = props;
|
|
2110
1605
|
const imports = importProp === void 0 ? [] : Array.isArray(importProp) ? importProp : [importProp];
|
|
2111
|
-
const uid =
|
|
2112
|
-
const textRef =
|
|
2113
|
-
const fileRef =
|
|
2114
|
-
const rootRef =
|
|
2115
|
-
const latest =
|
|
1606
|
+
const uid = useId2();
|
|
1607
|
+
const textRef = useRef6(null);
|
|
1608
|
+
const fileRef = useRef6(null);
|
|
1609
|
+
const rootRef = useRef6(null);
|
|
1610
|
+
const latest = useRef6(draft);
|
|
2116
1611
|
latest.current = draft;
|
|
2117
|
-
const onDraftRef =
|
|
1612
|
+
const onDraftRef = useRef6(props.onDraft);
|
|
2118
1613
|
onDraftRef.current = props.onDraft;
|
|
2119
1614
|
const apply = useCallback2((fn) => {
|
|
2120
1615
|
const next = fn(latest.current);
|
|
2121
1616
|
latest.current = next;
|
|
2122
1617
|
onDraftRef.current(next);
|
|
2123
1618
|
}, []);
|
|
2124
|
-
const files =
|
|
2125
|
-
const uploads =
|
|
2126
|
-
|
|
1619
|
+
const files = useRef6(/* @__PURE__ */ new Map());
|
|
1620
|
+
const uploads = useRef6(/* @__PURE__ */ new Map());
|
|
1621
|
+
useEffect6(
|
|
2127
1622
|
() => () => {
|
|
2128
1623
|
for (const c of uploads.current.values()) c.abort();
|
|
2129
1624
|
if (latest.current.items.some((i) => i.kind === "file" && i.state !== "done"))
|
|
@@ -2136,24 +1631,24 @@ function PromptInput(props) {
|
|
|
2136
1631
|
},
|
|
2137
1632
|
[apply]
|
|
2138
1633
|
);
|
|
2139
|
-
const [cand, setCand] =
|
|
2140
|
-
const [candIdx, setCandIdx] =
|
|
2141
|
-
const [refs, setRefs] =
|
|
2142
|
-
const [panel, setPanel] =
|
|
2143
|
-
const [importing, setImporting] =
|
|
2144
|
-
const [dragging, setDragging] =
|
|
2145
|
-
const [notice, setNotice] =
|
|
2146
|
-
const sameAs =
|
|
1634
|
+
const [cand, setCand] = useState9(null);
|
|
1635
|
+
const [candIdx, setCandIdx] = useState9(0);
|
|
1636
|
+
const [refs, setRefs] = useState9(null);
|
|
1637
|
+
const [panel, setPanel] = useState9(null);
|
|
1638
|
+
const [importing, setImporting] = useState9(false);
|
|
1639
|
+
const [dragging, setDragging] = useState9(false);
|
|
1640
|
+
const [notice, setNotice] = useState9(null);
|
|
1641
|
+
const sameAs = useRef6(null);
|
|
2147
1642
|
const noticeSame = useCallback2((key, name) => {
|
|
2148
1643
|
const text = `\u5DF2\u6709\u540C\u4E00\u4EFD\uFF1A${name}\uFF0C\u53D1\u9001\u65F6\u7528\u539F\u6765\u90A3\u4EFD\uFF0C\u4E0D\u518D\u4E0A\u4F20`;
|
|
2149
1644
|
sameAs.current = { key, text };
|
|
2150
1645
|
setNotice(text);
|
|
2151
1646
|
}, []);
|
|
2152
|
-
const [error, setError] =
|
|
2153
|
-
const [waiting, setWaiting] =
|
|
2154
|
-
const [posting, setPosting] =
|
|
2155
|
-
const [preview, setPreview] =
|
|
2156
|
-
const [flagged, setFlagged] =
|
|
1647
|
+
const [error, setError] = useState9(null);
|
|
1648
|
+
const [waiting, setWaiting] = useState9(false);
|
|
1649
|
+
const [posting, setPosting] = useState9(false);
|
|
1650
|
+
const [preview, setPreview] = useState9(null);
|
|
1651
|
+
const [flagged, setFlagged] = useState9(false);
|
|
2157
1652
|
const triggers = [
|
|
2158
1653
|
...mentions ? ["@"] : [],
|
|
2159
1654
|
...references ? ["#"] : [],
|
|
@@ -2291,7 +1786,7 @@ function PromptInput(props) {
|
|
|
2291
1786
|
[apply, addFiles, attach]
|
|
2292
1787
|
);
|
|
2293
1788
|
const refQuery = cand?.trigger === "#" ? cand.query : null;
|
|
2294
|
-
|
|
1789
|
+
useEffect6(() => {
|
|
2295
1790
|
if (refQuery === null || !references) return;
|
|
2296
1791
|
let live = true;
|
|
2297
1792
|
references.search(refQuery).then(
|
|
@@ -2302,8 +1797,8 @@ function PromptInput(props) {
|
|
|
2302
1797
|
live = false;
|
|
2303
1798
|
};
|
|
2304
1799
|
}, [refQuery, references]);
|
|
2305
|
-
const order =
|
|
2306
|
-
const candidates =
|
|
1800
|
+
const order = useMemo(() => memberOrder(mentions?.members ?? []), [mentions]);
|
|
1801
|
+
const candidates = useMemo(() => {
|
|
2307
1802
|
if (!cand) return [];
|
|
2308
1803
|
if (cand.trigger === "@" && mentions) {
|
|
2309
1804
|
return mentionCandidates(mentions.members, cand.query).map((m) => ({
|
|
@@ -2409,7 +1904,7 @@ function PromptInput(props) {
|
|
|
2409
1904
|
};
|
|
2410
1905
|
const pending2 = uploading(draft).length;
|
|
2411
1906
|
const failures = failed(draft).length;
|
|
2412
|
-
|
|
1907
|
+
useEffect6(() => {
|
|
2413
1908
|
if (!waiting) return;
|
|
2414
1909
|
if (failures > 0) {
|
|
2415
1910
|
setWaiting(false);
|
|
@@ -2425,7 +1920,7 @@ function PromptInput(props) {
|
|
|
2425
1920
|
el.style.height = "auto";
|
|
2426
1921
|
el.style.height = `${Math.min(el.scrollHeight, 240)}px`;
|
|
2427
1922
|
});
|
|
2428
|
-
|
|
1923
|
+
useEffect6(() => {
|
|
2429
1924
|
if (!panel && !cand) return;
|
|
2430
1925
|
const onDown = (e) => {
|
|
2431
1926
|
if (rootRef.current && !rootRef.current.contains(e.target)) {
|
|
@@ -2437,7 +1932,7 @@ function PromptInput(props) {
|
|
|
2437
1932
|
return () => document.removeEventListener("mousedown", onDown);
|
|
2438
1933
|
}, [panel, cand, importing]);
|
|
2439
1934
|
if (disabledReason) {
|
|
2440
|
-
return /* @__PURE__ */
|
|
1935
|
+
return /* @__PURE__ */ jsx10("div", { className: "band-plugin-react-prompt-note", children: disabledReason });
|
|
2441
1936
|
}
|
|
2442
1937
|
const onKeyDown = withImeGuard((e) => {
|
|
2443
1938
|
if (candOpen) {
|
|
@@ -2550,7 +2045,7 @@ function PromptInput(props) {
|
|
|
2550
2045
|
const sendState = waiting ? `\u7B49 ${pending2} \u4E2A\u9644\u4EF6\u4F20\u5B8C\u5C31\u53D1\u9001\uFF0C\u518D\u70B9\u4E00\u6B21\u53D6\u6D88` : posting ? "\u53D1\u9001\u4E2D" : submitLabel;
|
|
2551
2046
|
const keyHint = `Enter ${submitText ?? "\u53D1\u9001"}\uFF0CShift+Enter \u6362\u884C`;
|
|
2552
2047
|
const failedLines = uploadFailureLines(draft.items);
|
|
2553
|
-
return /* @__PURE__ */
|
|
2048
|
+
return /* @__PURE__ */ jsxs9(
|
|
2554
2049
|
"div",
|
|
2555
2050
|
{
|
|
2556
2051
|
ref: rootRef,
|
|
@@ -2560,18 +2055,18 @@ function PromptInput(props) {
|
|
|
2560
2055
|
...dropProps,
|
|
2561
2056
|
children: [
|
|
2562
2057
|
(error || notice || failedLines.length > 0) && // 同一时刻只有这一处提示(同队列的「没撤成」,#393):发送失败、没加上的文件、没传上去的文件
|
|
2563
|
-
/* @__PURE__ */
|
|
2058
|
+
/* @__PURE__ */ jsxs9(
|
|
2564
2059
|
"div",
|
|
2565
2060
|
{
|
|
2566
2061
|
className: "band-plugin-react-prompt-notice",
|
|
2567
2062
|
role: error || failedLines.length > 0 ? "alert" : "status",
|
|
2568
2063
|
children: [
|
|
2569
|
-
/* @__PURE__ */
|
|
2570
|
-
(error ?? notice) && /* @__PURE__ */
|
|
2571
|
-
failedLines.map((l) => /* @__PURE__ */
|
|
2064
|
+
/* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-notice-lines", children: [
|
|
2065
|
+
(error ?? notice) && /* @__PURE__ */ jsx10("span", { children: error ?? notice }),
|
|
2066
|
+
failedLines.map((l) => /* @__PURE__ */ jsx10("span", { children: l }, l))
|
|
2572
2067
|
] }),
|
|
2573
2068
|
(error || notice) && // 没传上去的那几行不在这里关:重试或移掉那个文件,它自己就没了
|
|
2574
|
-
/* @__PURE__ */
|
|
2069
|
+
/* @__PURE__ */ jsx10(
|
|
2575
2070
|
"button",
|
|
2576
2071
|
{
|
|
2577
2072
|
type: "button",
|
|
@@ -2587,8 +2082,8 @@ function PromptInput(props) {
|
|
|
2587
2082
|
]
|
|
2588
2083
|
}
|
|
2589
2084
|
),
|
|
2590
|
-
/* @__PURE__ */
|
|
2591
|
-
tray.length > 0 && /* @__PURE__ */
|
|
2085
|
+
/* @__PURE__ */ jsxs9("div", { className: "composer band-plugin-react-prompt-box", "data-band-guide-keep": "", children: [
|
|
2086
|
+
tray.length > 0 && /* @__PURE__ */ jsx10("ul", { className: "band-plugin-react-prompt-tray", "aria-label": "\u9644\u4EF6", children: tray.map((it) => /* @__PURE__ */ jsx10(
|
|
2592
2087
|
TrayItem,
|
|
2593
2088
|
{
|
|
2594
2089
|
item: it,
|
|
@@ -2600,7 +2095,7 @@ function PromptInput(props) {
|
|
|
2600
2095
|
},
|
|
2601
2096
|
it.key
|
|
2602
2097
|
)) }),
|
|
2603
|
-
/* @__PURE__ */
|
|
2098
|
+
/* @__PURE__ */ jsx10(
|
|
2604
2099
|
"textarea",
|
|
2605
2100
|
{
|
|
2606
2101
|
ref: textRef,
|
|
@@ -2631,10 +2126,10 @@ function PromptInput(props) {
|
|
|
2631
2126
|
),
|
|
2632
2127
|
candOpen && cand && // biome-ignore lint/a11y/useSemanticElements: 焦点留在输入框(combobox + aria-activedescendant),候选列表不取焦点,不能用 select
|
|
2633
2128
|
// biome-ignore lint/a11y/useFocusableInteractive: 同上,键盘经输入框的上下键操作
|
|
2634
|
-
/* @__PURE__ */
|
|
2635
|
-
/* @__PURE__ */
|
|
2636
|
-
candidates.length === 0 && /* @__PURE__ */
|
|
2637
|
-
candidates.map((c, i) => /* @__PURE__ */
|
|
2129
|
+
/* @__PURE__ */ jsxs9("div", { className: "mention band-plugin-react-prompt-cands", id: listId, role: "listbox", children: [
|
|
2130
|
+
/* @__PURE__ */ jsx10("div", { className: "band-plugin-react-prompt-cands-h", children: cand.trigger === "@" ? "\u63D0\u5230\u6210\u5458" : cand.trigger === "#" ? "\u5F15\u7528" : "\u80FD\u529B" }),
|
|
2131
|
+
candidates.length === 0 && /* @__PURE__ */ jsx10("div", { className: "band-plugin-react-prompt-empty", children: refs?.q === cand.query ? "\u6CA1\u6709\u5339\u914D\u7684\u5BF9\u8C61" : "\u67E5\u627E\u4E2D\u2026" }),
|
|
2132
|
+
candidates.map((c, i) => /* @__PURE__ */ jsx10(
|
|
2638
2133
|
"button",
|
|
2639
2134
|
{
|
|
2640
2135
|
id: `${listId}-${i}`,
|
|
@@ -2647,34 +2142,34 @@ function PromptInput(props) {
|
|
|
2647
2142
|
pick2(c);
|
|
2648
2143
|
},
|
|
2649
2144
|
onMouseEnter: () => setCandIdx(i),
|
|
2650
|
-
children: /* @__PURE__ */
|
|
2145
|
+
children: /* @__PURE__ */ jsx10(CandidateRow, { c, order })
|
|
2651
2146
|
},
|
|
2652
2147
|
c.key
|
|
2653
2148
|
))
|
|
2654
2149
|
] }),
|
|
2655
|
-
(chips.length > 0 || selectedCaps.length > 0 || selectedConns.length > 0) && /* @__PURE__ */
|
|
2656
|
-
chips.map((c) => /* @__PURE__ */
|
|
2150
|
+
(chips.length > 0 || selectedCaps.length > 0 || selectedConns.length > 0) && /* @__PURE__ */ jsxs9("ul", { className: "band-plugin-react-prompt-chips", "aria-label": "\u5F15\u7528\u3001\u80FD\u529B\u4E0E\u8FDE\u63A5\u5668", children: [
|
|
2151
|
+
chips.map((c) => /* @__PURE__ */ jsxs9(
|
|
2657
2152
|
"li",
|
|
2658
2153
|
{
|
|
2659
2154
|
className: "chip plain band-plugin-react-prompt-chip",
|
|
2660
2155
|
title: c.source ? `\u6765\u81EA ${c.source}` : void 0,
|
|
2661
2156
|
children: [
|
|
2662
|
-
/* @__PURE__ */
|
|
2157
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-sigil", children: "#" }),
|
|
2663
2158
|
c.kind === "ref" ? c.label : "",
|
|
2664
|
-
/* @__PURE__ */
|
|
2159
|
+
/* @__PURE__ */ jsx10(ChipX, { label: c.kind === "ref" ? c.label : "", onClick: () => removeItem(c.key) })
|
|
2665
2160
|
]
|
|
2666
2161
|
},
|
|
2667
2162
|
c.key
|
|
2668
2163
|
)),
|
|
2669
|
-
selectedCaps.map((c) => /* @__PURE__ */
|
|
2164
|
+
selectedCaps.map((c) => /* @__PURE__ */ jsxs9(
|
|
2670
2165
|
"li",
|
|
2671
2166
|
{
|
|
2672
2167
|
className: "chip plain band-plugin-react-prompt-chip",
|
|
2673
2168
|
"data-kind": "cap",
|
|
2674
2169
|
children: [
|
|
2675
|
-
/* @__PURE__ */
|
|
2170
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-sigil", children: "/" }),
|
|
2676
2171
|
c.name,
|
|
2677
|
-
/* @__PURE__ */
|
|
2172
|
+
/* @__PURE__ */ jsx10(
|
|
2678
2173
|
ChipX,
|
|
2679
2174
|
{
|
|
2680
2175
|
label: c.name,
|
|
@@ -2685,14 +2180,14 @@ function PromptInput(props) {
|
|
|
2685
2180
|
},
|
|
2686
2181
|
`cap:${c.id}`
|
|
2687
2182
|
)),
|
|
2688
|
-
selectedConns.map((c) => /* @__PURE__ */
|
|
2183
|
+
selectedConns.map((c) => /* @__PURE__ */ jsxs9(
|
|
2689
2184
|
"li",
|
|
2690
2185
|
{
|
|
2691
2186
|
className: "chip plain band-plugin-react-prompt-chip",
|
|
2692
2187
|
"data-kind": "conn",
|
|
2693
2188
|
children: [
|
|
2694
2189
|
c.name,
|
|
2695
|
-
!c.builtIn && /* @__PURE__ */
|
|
2190
|
+
!c.builtIn && /* @__PURE__ */ jsx10(
|
|
2696
2191
|
ChipX,
|
|
2697
2192
|
{
|
|
2698
2193
|
label: c.name,
|
|
@@ -2704,7 +2199,7 @@ function PromptInput(props) {
|
|
|
2704
2199
|
`conn:${c.id}`
|
|
2705
2200
|
))
|
|
2706
2201
|
] }),
|
|
2707
|
-
activeSource && /* @__PURE__ */
|
|
2202
|
+
activeSource && /* @__PURE__ */ jsx10(
|
|
2708
2203
|
SourcePanel,
|
|
2709
2204
|
{
|
|
2710
2205
|
source: activeSource,
|
|
@@ -2716,7 +2211,7 @@ function PromptInput(props) {
|
|
|
2716
2211
|
},
|
|
2717
2212
|
activeSource.id
|
|
2718
2213
|
),
|
|
2719
|
-
activeImport && /* @__PURE__ */
|
|
2214
|
+
activeImport && /* @__PURE__ */ jsx10(
|
|
2720
2215
|
ExternalImportPanel,
|
|
2721
2216
|
{
|
|
2722
2217
|
source: activeImport,
|
|
@@ -2762,9 +2257,9 @@ function PromptInput(props) {
|
|
|
2762
2257
|
activeImport.label
|
|
2763
2258
|
),
|
|
2764
2259
|
fields,
|
|
2765
|
-
/* @__PURE__ */
|
|
2766
|
-
showPlus && /* @__PURE__ */
|
|
2767
|
-
/* @__PURE__ */
|
|
2260
|
+
/* @__PURE__ */ jsxs9("div", { className: "composer-bar band-plugin-react-prompt-bar", children: [
|
|
2261
|
+
showPlus && /* @__PURE__ */ jsxs9("div", { className: "band-plugin-react-prompt-anchor", children: [
|
|
2262
|
+
/* @__PURE__ */ jsx10(
|
|
2768
2263
|
"button",
|
|
2769
2264
|
{
|
|
2770
2265
|
type: "button",
|
|
@@ -2778,8 +2273,8 @@ function PromptInput(props) {
|
|
|
2778
2273
|
children: "+"
|
|
2779
2274
|
}
|
|
2780
2275
|
),
|
|
2781
|
-
panel === "plus" && /* @__PURE__ */
|
|
2782
|
-
attach && /* @__PURE__ */
|
|
2276
|
+
panel === "plus" && /* @__PURE__ */ jsxs9(Menu, { label: "\u6DFB\u52A0", onClose: () => setPanel(null), children: [
|
|
2277
|
+
attach && /* @__PURE__ */ jsxs9(
|
|
2783
2278
|
MenuItem,
|
|
2784
2279
|
{
|
|
2785
2280
|
onSelect: () => {
|
|
@@ -2787,8 +2282,8 @@ function PromptInput(props) {
|
|
|
2787
2282
|
fileRef.current?.click();
|
|
2788
2283
|
},
|
|
2789
2284
|
children: [
|
|
2790
|
-
/* @__PURE__ */
|
|
2791
|
-
/* @__PURE__ */
|
|
2285
|
+
/* @__PURE__ */ jsx10("span", { children: "\u4E0A\u4F20\u6587\u4EF6" }),
|
|
2286
|
+
/* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-d", children: [
|
|
2792
2287
|
"\u5355\u4E2A ",
|
|
2793
2288
|
formatBytes(singleLimitShown(attach.limits)),
|
|
2794
2289
|
"\u3001\u5408\u8BA1",
|
|
@@ -2799,12 +2294,12 @@ function PromptInput(props) {
|
|
|
2799
2294
|
]
|
|
2800
2295
|
}
|
|
2801
2296
|
),
|
|
2802
|
-
imports.map((source, index) => /* @__PURE__ */
|
|
2803
|
-
sources.map((s) => /* @__PURE__ */
|
|
2804
|
-
connectors && connectors.list.length > 0 && /* @__PURE__ */
|
|
2805
|
-
/* @__PURE__ */
|
|
2806
|
-
/* @__PURE__ */
|
|
2807
|
-
connectors.list.map((c) => /* @__PURE__ */
|
|
2297
|
+
imports.map((source, index) => /* @__PURE__ */ jsx10(MenuItem, { onSelect: () => setPanel({ importFrom: index }), children: /* @__PURE__ */ jsx10("span", { children: importFrom(source.label) }) }, source.label)),
|
|
2298
|
+
sources.map((s) => /* @__PURE__ */ jsx10(MenuItem, { onSelect: () => setPanel({ source: s.id }), children: /* @__PURE__ */ jsx10("span", { children: s.label }) }, s.id)),
|
|
2299
|
+
connectors && connectors.list.length > 0 && /* @__PURE__ */ jsxs9(Fragment7, { children: [
|
|
2300
|
+
/* @__PURE__ */ jsx10("hr", { className: "band-plugin-react-prompt-sep" }),
|
|
2301
|
+
/* @__PURE__ */ jsx10("div", { className: "band-plugin-react-prompt-group", children: "\u8FDE\u63A5\u5668" }),
|
|
2302
|
+
connectors.list.map((c) => /* @__PURE__ */ jsx10(
|
|
2808
2303
|
ConnectorRow,
|
|
2809
2304
|
{
|
|
2810
2305
|
c,
|
|
@@ -2816,7 +2311,7 @@ function PromptInput(props) {
|
|
|
2816
2311
|
},
|
|
2817
2312
|
c.id
|
|
2818
2313
|
)),
|
|
2819
|
-
connectors.manageHref && /* @__PURE__ */
|
|
2314
|
+
connectors.manageHref && /* @__PURE__ */ jsx10(
|
|
2820
2315
|
"a",
|
|
2821
2316
|
{
|
|
2822
2317
|
className: "band-plugin-react-prompt-item",
|
|
@@ -2828,8 +2323,8 @@ function PromptInput(props) {
|
|
|
2828
2323
|
] })
|
|
2829
2324
|
] })
|
|
2830
2325
|
] }),
|
|
2831
|
-
capabilities && capabilities.list.length > 0 && /* @__PURE__ */
|
|
2832
|
-
/* @__PURE__ */
|
|
2326
|
+
capabilities && capabilities.list.length > 0 && /* @__PURE__ */ jsxs9("div", { className: "band-plugin-react-prompt-anchor", children: [
|
|
2327
|
+
/* @__PURE__ */ jsxs9(
|
|
2833
2328
|
"button",
|
|
2834
2329
|
{
|
|
2835
2330
|
type: "button",
|
|
@@ -2845,9 +2340,9 @@ function PromptInput(props) {
|
|
|
2845
2340
|
]
|
|
2846
2341
|
}
|
|
2847
2342
|
),
|
|
2848
|
-
panel === "caps" && /* @__PURE__ */
|
|
2343
|
+
panel === "caps" && /* @__PURE__ */ jsx10(Menu, { label: "\u80FD\u529B", onClose: () => setPanel(null), children: capabilities.list.map((c) => {
|
|
2849
2344
|
const on = draft.capabilities.includes(c.id);
|
|
2850
|
-
return /* @__PURE__ */
|
|
2345
|
+
return /* @__PURE__ */ jsxs9(
|
|
2851
2346
|
MenuItem,
|
|
2852
2347
|
{
|
|
2853
2348
|
checked: on,
|
|
@@ -2856,11 +2351,11 @@ function PromptInput(props) {
|
|
|
2856
2351
|
capabilities: on ? d.capabilities.filter((x) => x !== c.id) : [...d.capabilities, c.id]
|
|
2857
2352
|
})),
|
|
2858
2353
|
children: [
|
|
2859
|
-
/* @__PURE__ */
|
|
2354
|
+
/* @__PURE__ */ jsxs9("span", { children: [
|
|
2860
2355
|
"/",
|
|
2861
2356
|
c.name
|
|
2862
2357
|
] }),
|
|
2863
|
-
c.description && /* @__PURE__ */
|
|
2358
|
+
c.description && /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-d", children: c.description })
|
|
2864
2359
|
]
|
|
2865
2360
|
},
|
|
2866
2361
|
c.id
|
|
@@ -2868,8 +2363,8 @@ function PromptInput(props) {
|
|
|
2868
2363
|
}) })
|
|
2869
2364
|
] }),
|
|
2870
2365
|
footerStart,
|
|
2871
|
-
/* @__PURE__ */
|
|
2872
|
-
/* @__PURE__ */
|
|
2366
|
+
/* @__PURE__ */ jsx10("span", { className: "grow" }),
|
|
2367
|
+
/* @__PURE__ */ jsx10(
|
|
2873
2368
|
"span",
|
|
2874
2369
|
{
|
|
2875
2370
|
className: "band-plugin-react-prompt-hint",
|
|
@@ -2878,7 +2373,7 @@ function PromptInput(props) {
|
|
|
2878
2373
|
}
|
|
2879
2374
|
),
|
|
2880
2375
|
footerEnd,
|
|
2881
|
-
submitText ? /* @__PURE__ */
|
|
2376
|
+
submitText ? /* @__PURE__ */ jsx10(
|
|
2882
2377
|
"button",
|
|
2883
2378
|
{
|
|
2884
2379
|
type: "button",
|
|
@@ -2890,7 +2385,7 @@ function PromptInput(props) {
|
|
|
2890
2385
|
onClick: submit,
|
|
2891
2386
|
children: waiting ? "\u7B49\u9644\u4EF6\u2026 \u53D6\u6D88" : submitText
|
|
2892
2387
|
}
|
|
2893
|
-
) : /* @__PURE__ */
|
|
2388
|
+
) : /* @__PURE__ */ jsx10(
|
|
2894
2389
|
"button",
|
|
2895
2390
|
{
|
|
2896
2391
|
type: "button",
|
|
@@ -2900,11 +2395,11 @@ function PromptInput(props) {
|
|
|
2900
2395
|
disabled: !canSend,
|
|
2901
2396
|
"data-waiting": waiting || void 0,
|
|
2902
2397
|
onClick: submit,
|
|
2903
|
-
children: waiting ? /* @__PURE__ */
|
|
2398
|
+
children: waiting ? /* @__PURE__ */ jsx10(Ring, { value: progressOf(draft) }) : "\u2191"
|
|
2904
2399
|
}
|
|
2905
2400
|
)
|
|
2906
2401
|
] }),
|
|
2907
|
-
attach && /* @__PURE__ */
|
|
2402
|
+
attach && /* @__PURE__ */ jsx10(
|
|
2908
2403
|
"input",
|
|
2909
2404
|
{
|
|
2910
2405
|
ref: fileRef,
|
|
@@ -2920,7 +2415,7 @@ function PromptInput(props) {
|
|
|
2920
2415
|
}
|
|
2921
2416
|
}
|
|
2922
2417
|
),
|
|
2923
|
-
dragging && attach && /* @__PURE__ */
|
|
2418
|
+
dragging && attach && /* @__PURE__ */ jsxs9("div", { className: "band-plugin-react-prompt-drop", "aria-hidden": true, children: [
|
|
2924
2419
|
"\u677E\u5F00\u6DFB\u52A0 \xB7 \u5355\u4E2A ",
|
|
2925
2420
|
formatBytes(singleLimitShown(attach.limits)),
|
|
2926
2421
|
"\u3001\u5408\u8BA1",
|
|
@@ -2931,8 +2426,8 @@ function PromptInput(props) {
|
|
|
2931
2426
|
" \u4E2A"
|
|
2932
2427
|
] })
|
|
2933
2428
|
] }),
|
|
2934
|
-
/* @__PURE__ */
|
|
2935
|
-
previewItem && /* @__PURE__ */
|
|
2429
|
+
/* @__PURE__ */ jsx10("span", { className: "sr-only", "aria-live": "polite", children: pending2 > 0 ? `${pending2} \u4E2A\u9644\u4EF6\u4E0A\u4F20\u4E2D` : "" }),
|
|
2430
|
+
previewItem && /* @__PURE__ */ jsx10(
|
|
2936
2431
|
Preview,
|
|
2937
2432
|
{
|
|
2938
2433
|
item: previewItem,
|
|
@@ -2965,27 +2460,27 @@ function CandidateRow({ c, order }) {
|
|
|
2965
2460
|
const m = c.member;
|
|
2966
2461
|
const bot = m.actor.kind === "agent";
|
|
2967
2462
|
const role = m.roles.map((r) => m.roleLabels?.[r] ?? r).join("\u3001");
|
|
2968
|
-
return /* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */
|
|
2970
|
-
/* @__PURE__ */
|
|
2971
|
-
/* @__PURE__ */
|
|
2463
|
+
return /* @__PURE__ */ jsxs9(Fragment7, { children: [
|
|
2464
|
+
/* @__PURE__ */ jsx10(Avatar, { id: m.actor.id, name: m.displayName, agent: bot, order, decorative: true }),
|
|
2465
|
+
/* @__PURE__ */ jsx10("span", { children: m.displayName }),
|
|
2466
|
+
/* @__PURE__ */ jsx10("span", { className: "d", children: bot ? "Agent" : role })
|
|
2972
2467
|
] });
|
|
2973
2468
|
}
|
|
2974
2469
|
if (c.kind === "ref") {
|
|
2975
|
-
return /* @__PURE__ */
|
|
2976
|
-
/* @__PURE__ */
|
|
2977
|
-
/* @__PURE__ */
|
|
2978
|
-
/* @__PURE__ */
|
|
2470
|
+
return /* @__PURE__ */ jsxs9(Fragment7, { children: [
|
|
2471
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-sigil", children: "#" }),
|
|
2472
|
+
/* @__PURE__ */ jsx10("span", { children: c.ref.label }),
|
|
2473
|
+
/* @__PURE__ */ jsx10("span", { className: "d", children: c.ref.detail ?? "" })
|
|
2979
2474
|
] });
|
|
2980
2475
|
}
|
|
2981
|
-
return /* @__PURE__ */
|
|
2982
|
-
/* @__PURE__ */
|
|
2983
|
-
/* @__PURE__ */
|
|
2984
|
-
/* @__PURE__ */
|
|
2476
|
+
return /* @__PURE__ */ jsxs9(Fragment7, { children: [
|
|
2477
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-sigil", children: "/" }),
|
|
2478
|
+
/* @__PURE__ */ jsx10("span", { children: c.cap.name }),
|
|
2479
|
+
/* @__PURE__ */ jsx10("span", { className: "d", children: c.cap.description ?? "" })
|
|
2985
2480
|
] });
|
|
2986
2481
|
}
|
|
2987
2482
|
function ChipX({ label, onClick }) {
|
|
2988
|
-
return /* @__PURE__ */
|
|
2483
|
+
return /* @__PURE__ */ jsx10(
|
|
2989
2484
|
"button",
|
|
2990
2485
|
{
|
|
2991
2486
|
type: "button",
|
|
@@ -2999,7 +2494,7 @@ function ChipX({ label, onClick }) {
|
|
|
2999
2494
|
function Ring({ value }) {
|
|
3000
2495
|
const r = 7;
|
|
3001
2496
|
const c = 2 * Math.PI * r;
|
|
3002
|
-
return /* @__PURE__ */
|
|
2497
|
+
return /* @__PURE__ */ jsxs9(
|
|
3003
2498
|
"svg",
|
|
3004
2499
|
{
|
|
3005
2500
|
className: "band-plugin-react-prompt-ring",
|
|
@@ -3008,8 +2503,8 @@ function Ring({ value }) {
|
|
|
3008
2503
|
height: "18",
|
|
3009
2504
|
"aria-hidden": "true",
|
|
3010
2505
|
children: [
|
|
3011
|
-
/* @__PURE__ */
|
|
3012
|
-
/* @__PURE__ */
|
|
2506
|
+
/* @__PURE__ */ jsx10("circle", { cx: "9", cy: "9", r, fill: "none", strokeWidth: "2", opacity: "0.3", stroke: "currentColor" }),
|
|
2507
|
+
/* @__PURE__ */ jsx10(
|
|
3013
2508
|
"circle",
|
|
3014
2509
|
{
|
|
3015
2510
|
cx: "9",
|
|
@@ -3029,8 +2524,8 @@ function Ring({ value }) {
|
|
|
3029
2524
|
);
|
|
3030
2525
|
}
|
|
3031
2526
|
function useObjectUrl(file) {
|
|
3032
|
-
const [url, setUrl] =
|
|
3033
|
-
|
|
2527
|
+
const [url, setUrl] = useState9();
|
|
2528
|
+
useEffect6(() => {
|
|
3034
2529
|
if (!file?.type.startsWith("image/") || typeof URL.createObjectURL !== "function") {
|
|
3035
2530
|
setUrl(void 0);
|
|
3036
2531
|
return;
|
|
@@ -3051,32 +2546,32 @@ function TrayItem({
|
|
|
3051
2546
|
}) {
|
|
3052
2547
|
const local = useObjectUrl(file);
|
|
3053
2548
|
if (item.kind === "ref") {
|
|
3054
|
-
return /* @__PURE__ */
|
|
2549
|
+
return /* @__PURE__ */ jsxs9(
|
|
3055
2550
|
"li",
|
|
3056
2551
|
{
|
|
3057
2552
|
className: "band-plugin-react-prompt-card",
|
|
3058
2553
|
"data-kind": "quote",
|
|
3059
2554
|
title: item.source ? `\u6765\u81EA ${item.source}` : void 0,
|
|
3060
2555
|
children: [
|
|
3061
|
-
/* @__PURE__ */
|
|
3062
|
-
/* @__PURE__ */
|
|
3063
|
-
/* @__PURE__ */
|
|
2556
|
+
/* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-open", children: [
|
|
2557
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-icon", "aria-hidden": true, children: "\u275D" }),
|
|
2558
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-meta", children: item.detail ? /* @__PURE__ */ jsx10(
|
|
3064
2559
|
"span",
|
|
3065
2560
|
{
|
|
3066
2561
|
className: "band-plugin-react-prompt-d band-plugin-react-prompt-quote",
|
|
3067
2562
|
title: item.label,
|
|
3068
2563
|
children: item.detail
|
|
3069
2564
|
}
|
|
3070
|
-
) : /* @__PURE__ */
|
|
2565
|
+
) : /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-name", children: item.label }) })
|
|
3071
2566
|
] }),
|
|
3072
|
-
/* @__PURE__ */
|
|
2567
|
+
/* @__PURE__ */ jsx10(ChipX, { label: item.label, onClick: onRemove })
|
|
3073
2568
|
]
|
|
3074
2569
|
}
|
|
3075
2570
|
);
|
|
3076
2571
|
}
|
|
3077
2572
|
if (item.kind === "text") {
|
|
3078
|
-
return /* @__PURE__ */
|
|
3079
|
-
/* @__PURE__ */
|
|
2573
|
+
return /* @__PURE__ */ jsxs9("li", { className: "band-plugin-react-prompt-card", "data-kind": "text", children: [
|
|
2574
|
+
/* @__PURE__ */ jsxs9(
|
|
3080
2575
|
"button",
|
|
3081
2576
|
{
|
|
3082
2577
|
type: "button",
|
|
@@ -3084,10 +2579,10 @@ function TrayItem({
|
|
|
3084
2579
|
onClick: onOpen,
|
|
3085
2580
|
title: "\u67E5\u770B",
|
|
3086
2581
|
children: [
|
|
3087
|
-
/* @__PURE__ */
|
|
3088
|
-
/* @__PURE__ */
|
|
3089
|
-
/* @__PURE__ */
|
|
3090
|
-
/* @__PURE__ */
|
|
2582
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-icon", "aria-hidden": true, children: "\xB6" }),
|
|
2583
|
+
/* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-meta", children: [
|
|
2584
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-name", children: item.label }),
|
|
2585
|
+
/* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-d", children: [
|
|
3091
2586
|
item.text.length,
|
|
3092
2587
|
" \u5B57",
|
|
3093
2588
|
item.source ? ` \xB7 \u6765\u81EA ${item.source}` : ""
|
|
@@ -3096,12 +2591,12 @@ function TrayItem({
|
|
|
3096
2591
|
]
|
|
3097
2592
|
}
|
|
3098
2593
|
),
|
|
3099
|
-
/* @__PURE__ */
|
|
2594
|
+
/* @__PURE__ */ jsx10(ChipX, { label: item.label, onClick: onRemove })
|
|
3100
2595
|
] });
|
|
3101
2596
|
}
|
|
3102
2597
|
const thumb = attachmentKind(item.name, item.mime) === "image" ? local ?? previewUrl : void 0;
|
|
3103
2598
|
const status = item.state === "uploading" ? `\u4E0A\u4F20\u4E2D ${Math.round((item.progress ?? 0) * 100)}%` : item.state === "failed" ? `\u6CA1\u4F20\u4E0A\u53BB${item.error ? `\uFF1A${item.error}` : ""}` : item.originalSize !== void 0 ? `\u5DF2\u538B\u7F29 ${formatBytes(item.originalSize)} \u2192 ${formatBytes(item.size)}` : formatBytes(item.size);
|
|
3104
|
-
return /* @__PURE__ */
|
|
2599
|
+
return /* @__PURE__ */ jsxs9(
|
|
3105
2600
|
"li",
|
|
3106
2601
|
{
|
|
3107
2602
|
className: "band-plugin-react-prompt-card",
|
|
@@ -3109,7 +2604,7 @@ function TrayItem({
|
|
|
3109
2604
|
"data-state": item.state,
|
|
3110
2605
|
"data-compressed": item.originalSize !== void 0 || void 0,
|
|
3111
2606
|
children: [
|
|
3112
|
-
/* @__PURE__ */
|
|
2607
|
+
/* @__PURE__ */ jsxs9(
|
|
3113
2608
|
"button",
|
|
3114
2609
|
{
|
|
3115
2610
|
type: "button",
|
|
@@ -3119,19 +2614,19 @@ function TrayItem({
|
|
|
3119
2614
|
title: thumb ? "\u67E5\u770B\u5927\u56FE" : item.name,
|
|
3120
2615
|
"aria-label": `${item.name}\uFF0C${status}`,
|
|
3121
2616
|
children: [
|
|
3122
|
-
thumb ? /* @__PURE__ */
|
|
3123
|
-
(!thumb || item.originalSize !== void 0) && /* @__PURE__ */
|
|
3124
|
-
/* @__PURE__ */
|
|
3125
|
-
/* @__PURE__ */
|
|
2617
|
+
thumb ? /* @__PURE__ */ jsx10("img", { className: "band-plugin-react-prompt-thumb", src: thumb, alt: item.name }) : /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-icon", "aria-hidden": true, children: fileExt(item.name) }),
|
|
2618
|
+
(!thumb || item.originalSize !== void 0) && /* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-meta", children: [
|
|
2619
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-name band-plugin-react-prompt-file", children: item.name }),
|
|
2620
|
+
/* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-d", children: [
|
|
3126
2621
|
status,
|
|
3127
2622
|
item.source ? ` \xB7 \u6765\u81EA ${item.source}` : ""
|
|
3128
2623
|
] })
|
|
3129
2624
|
] }),
|
|
3130
|
-
item.state === "uploading" && /* @__PURE__ */
|
|
2625
|
+
item.state === "uploading" && /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-progress", "aria-hidden": "true", children: /* @__PURE__ */ jsx10(Ring, { value: item.progress ?? 0 }) })
|
|
3131
2626
|
]
|
|
3132
2627
|
}
|
|
3133
2628
|
),
|
|
3134
|
-
item.state === "failed" && onRetry && /* @__PURE__ */
|
|
2629
|
+
item.state === "failed" && onRetry && /* @__PURE__ */ jsx10(
|
|
3135
2630
|
"button",
|
|
3136
2631
|
{
|
|
3137
2632
|
type: "button",
|
|
@@ -3141,7 +2636,7 @@ function TrayItem({
|
|
|
3141
2636
|
children: "\u91CD\u8BD5"
|
|
3142
2637
|
}
|
|
3143
2638
|
),
|
|
3144
|
-
/* @__PURE__ */
|
|
2639
|
+
/* @__PURE__ */ jsx10(ChipX, { label: item.name, onClick: onRemove })
|
|
3145
2640
|
]
|
|
3146
2641
|
}
|
|
3147
2642
|
);
|
|
@@ -3151,8 +2646,8 @@ function Menu({
|
|
|
3151
2646
|
onClose,
|
|
3152
2647
|
children: children2
|
|
3153
2648
|
}) {
|
|
3154
|
-
const ref =
|
|
3155
|
-
|
|
2649
|
+
const ref = useRef6(null);
|
|
2650
|
+
useEffect6(() => {
|
|
3156
2651
|
ref.current?.querySelector("[role^=menuitem]")?.focus();
|
|
3157
2652
|
}, []);
|
|
3158
2653
|
const onMenuKey = withImeGuard((e) => {
|
|
@@ -3172,7 +2667,7 @@ function Menu({
|
|
|
3172
2667
|
onClose();
|
|
3173
2668
|
}
|
|
3174
2669
|
});
|
|
3175
|
-
return /* @__PURE__ */
|
|
2670
|
+
return /* @__PURE__ */ jsx10(
|
|
3176
2671
|
"div",
|
|
3177
2672
|
{
|
|
3178
2673
|
ref,
|
|
@@ -3190,7 +2685,7 @@ function MenuItem({
|
|
|
3190
2685
|
onSelect,
|
|
3191
2686
|
checked
|
|
3192
2687
|
}) {
|
|
3193
|
-
return /* @__PURE__ */
|
|
2688
|
+
return /* @__PURE__ */ jsxs9(
|
|
3194
2689
|
"button",
|
|
3195
2690
|
{
|
|
3196
2691
|
type: "button",
|
|
@@ -3199,8 +2694,8 @@ function MenuItem({
|
|
|
3199
2694
|
"aria-checked": checked,
|
|
3200
2695
|
onClick: onSelect,
|
|
3201
2696
|
children: [
|
|
3202
|
-
checked !== void 0 && /* @__PURE__ */
|
|
3203
|
-
/* @__PURE__ */
|
|
2697
|
+
checked !== void 0 && /* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-check", "aria-hidden": true, children: checked ? "\u2713" : "" }),
|
|
2698
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-meta", children: children2 })
|
|
3204
2699
|
]
|
|
3205
2700
|
}
|
|
3206
2701
|
);
|
|
@@ -3210,12 +2705,12 @@ function ConnectorRow({
|
|
|
3210
2705
|
on,
|
|
3211
2706
|
onToggle
|
|
3212
2707
|
}) {
|
|
3213
|
-
const meta = /* @__PURE__ */
|
|
3214
|
-
/* @__PURE__ */
|
|
3215
|
-
/* @__PURE__ */
|
|
2708
|
+
const meta = /* @__PURE__ */ jsxs9("span", { className: "band-plugin-react-prompt-meta", children: [
|
|
2709
|
+
/* @__PURE__ */ jsx10("span", { children: c.name }),
|
|
2710
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-d", children: c.builtIn ? "Agent \u81EA\u5E26" : !c.authorized ? "\u8981\u5148\u6388\u6743" : c.description ?? "" })
|
|
3216
2711
|
] });
|
|
3217
2712
|
if (!c.builtIn && !c.authorized && c.authorizeUrl) {
|
|
3218
|
-
return /* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ jsxs9(
|
|
3219
2714
|
"a",
|
|
3220
2715
|
{
|
|
3221
2716
|
className: "band-plugin-react-prompt-item",
|
|
@@ -3225,12 +2720,12 @@ function ConnectorRow({
|
|
|
3225
2720
|
rel: "noreferrer",
|
|
3226
2721
|
children: [
|
|
3227
2722
|
meta,
|
|
3228
|
-
/* @__PURE__ */
|
|
2723
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-d", children: "\u53BB\u6388\u6743" })
|
|
3229
2724
|
]
|
|
3230
2725
|
}
|
|
3231
2726
|
);
|
|
3232
2727
|
}
|
|
3233
|
-
return /* @__PURE__ */
|
|
2728
|
+
return /* @__PURE__ */ jsxs9(
|
|
3234
2729
|
"button",
|
|
3235
2730
|
{
|
|
3236
2731
|
type: "button",
|
|
@@ -3241,7 +2736,7 @@ function ConnectorRow({
|
|
|
3241
2736
|
onClick: () => onToggle(!on),
|
|
3242
2737
|
children: [
|
|
3243
2738
|
meta,
|
|
3244
|
-
/* @__PURE__ */
|
|
2739
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-switch", "data-on": on || void 0, "aria-hidden": true })
|
|
3245
2740
|
]
|
|
3246
2741
|
}
|
|
3247
2742
|
);
|
|
@@ -3251,16 +2746,16 @@ function SourcePanel({
|
|
|
3251
2746
|
onAdd,
|
|
3252
2747
|
onClose
|
|
3253
2748
|
}) {
|
|
3254
|
-
const ref =
|
|
3255
|
-
const [err, setErr] =
|
|
3256
|
-
const addRef =
|
|
2749
|
+
const ref = useRef6(null);
|
|
2750
|
+
const [err, setErr] = useState9(null);
|
|
2751
|
+
const addRef = useRef6(onAdd);
|
|
3257
2752
|
addRef.current = onAdd;
|
|
3258
|
-
const closeRef =
|
|
2753
|
+
const closeRef = useRef6(onClose);
|
|
3259
2754
|
closeRef.current = onClose;
|
|
3260
|
-
const mountRef =
|
|
2755
|
+
const mountRef = useRef6(source.mount);
|
|
3261
2756
|
mountRef.current = source.mount;
|
|
3262
2757
|
const { id, source: owner } = source;
|
|
3263
|
-
|
|
2758
|
+
useEffect6(() => {
|
|
3264
2759
|
const el = ref.current;
|
|
3265
2760
|
if (!el || !id) return;
|
|
3266
2761
|
try {
|
|
@@ -3273,12 +2768,12 @@ function SourcePanel({
|
|
|
3273
2768
|
return void 0;
|
|
3274
2769
|
}
|
|
3275
2770
|
}, [id, owner]);
|
|
3276
|
-
return /* @__PURE__ */
|
|
3277
|
-
/* @__PURE__ */
|
|
3278
|
-
/* @__PURE__ */
|
|
3279
|
-
/* @__PURE__ */
|
|
3280
|
-
/* @__PURE__ */
|
|
3281
|
-
/* @__PURE__ */
|
|
2771
|
+
return /* @__PURE__ */ jsxs9("section", { className: "band-plugin-react-prompt-source", "aria-label": source.label, children: [
|
|
2772
|
+
/* @__PURE__ */ jsxs9("div", { className: "band-plugin-react-prompt-source-h", children: [
|
|
2773
|
+
/* @__PURE__ */ jsx10("span", { children: source.label }),
|
|
2774
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-d", children: source.source }),
|
|
2775
|
+
/* @__PURE__ */ jsx10("span", { className: "grow" }),
|
|
2776
|
+
/* @__PURE__ */ jsx10(
|
|
3282
2777
|
"button",
|
|
3283
2778
|
{
|
|
3284
2779
|
type: "button",
|
|
@@ -3289,8 +2784,8 @@ function SourcePanel({
|
|
|
3289
2784
|
}
|
|
3290
2785
|
)
|
|
3291
2786
|
] }),
|
|
3292
|
-
err && /* @__PURE__ */
|
|
3293
|
-
/* @__PURE__ */
|
|
2787
|
+
err && /* @__PURE__ */ jsx10("div", { className: "band-plugin-react-error", children: err }),
|
|
2788
|
+
/* @__PURE__ */ jsx10("div", { ref })
|
|
3294
2789
|
] });
|
|
3295
2790
|
}
|
|
3296
2791
|
function Preview({
|
|
@@ -3301,15 +2796,15 @@ function Preview({
|
|
|
3301
2796
|
onInline
|
|
3302
2797
|
}) {
|
|
3303
2798
|
const local = useObjectUrl(file);
|
|
3304
|
-
const ref =
|
|
3305
|
-
|
|
2799
|
+
const ref = useRef6(null);
|
|
2800
|
+
useEffect6(() => {
|
|
3306
2801
|
const d = ref.current;
|
|
3307
2802
|
if (!d || d.open) return;
|
|
3308
2803
|
if (typeof d.showModal === "function") d.showModal();
|
|
3309
2804
|
else d.setAttribute("open", "");
|
|
3310
2805
|
}, []);
|
|
3311
2806
|
const name = item.kind === "file" ? item.name : item.label;
|
|
3312
|
-
return /* @__PURE__ */
|
|
2807
|
+
return /* @__PURE__ */ jsxs9(
|
|
3313
2808
|
"dialog",
|
|
3314
2809
|
{
|
|
3315
2810
|
ref,
|
|
@@ -3329,11 +2824,11 @@ function Preview({
|
|
|
3329
2824
|
}
|
|
3330
2825
|
}),
|
|
3331
2826
|
children: [
|
|
3332
|
-
/* @__PURE__ */
|
|
3333
|
-
/* @__PURE__ */
|
|
3334
|
-
/* @__PURE__ */
|
|
3335
|
-
onInline && /* @__PURE__ */
|
|
3336
|
-
/* @__PURE__ */
|
|
2827
|
+
/* @__PURE__ */ jsxs9("div", { className: "band-plugin-react-prompt-preview-h", children: [
|
|
2828
|
+
/* @__PURE__ */ jsx10("span", { className: "band-plugin-react-prompt-name band-plugin-react-prompt-file", children: name }),
|
|
2829
|
+
/* @__PURE__ */ jsx10("span", { className: "grow" }),
|
|
2830
|
+
onInline && /* @__PURE__ */ jsx10("button", { type: "button", className: "btn sm", onClick: onInline, children: "\u653E\u56DE\u6B63\u6587" }),
|
|
2831
|
+
/* @__PURE__ */ jsx10(
|
|
3337
2832
|
"button",
|
|
3338
2833
|
{
|
|
3339
2834
|
type: "button",
|
|
@@ -3344,14 +2839,14 @@ function Preview({
|
|
|
3344
2839
|
}
|
|
3345
2840
|
)
|
|
3346
2841
|
] }),
|
|
3347
|
-
item.kind === "text" ? /* @__PURE__ */
|
|
2842
|
+
item.kind === "text" ? /* @__PURE__ */ jsx10("pre", { className: "band-plugin-react-prompt-pre", children: item.text }) : /* @__PURE__ */ jsx10("img", { className: "band-plugin-react-prompt-big", src: local ?? previewUrl, alt: name })
|
|
3348
2843
|
]
|
|
3349
2844
|
}
|
|
3350
2845
|
);
|
|
3351
2846
|
}
|
|
3352
2847
|
|
|
3353
2848
|
// src/prompt/useDraft.ts
|
|
3354
|
-
import { useCallback as useCallback3, useEffect as
|
|
2849
|
+
import { useCallback as useCallback3, useEffect as useEffect7, useRef as useRef7, useState as useState10 } from "react";
|
|
3355
2850
|
var PREFIX = "band-draft:";
|
|
3356
2851
|
function read(key) {
|
|
3357
2852
|
try {
|
|
@@ -3383,9 +2878,9 @@ function registerDraftFlusher(fn) {
|
|
|
3383
2878
|
};
|
|
3384
2879
|
}
|
|
3385
2880
|
function useUnsavedGuard(hasUnsaved) {
|
|
3386
|
-
const latest =
|
|
2881
|
+
const latest = useRef7(hasUnsaved);
|
|
3387
2882
|
latest.current = hasUnsaved;
|
|
3388
|
-
|
|
2883
|
+
useEffect7(() => registerDraftFlusher(() => !latest.current), []);
|
|
3389
2884
|
}
|
|
3390
2885
|
function flushAllDrafts() {
|
|
3391
2886
|
let ok = true;
|
|
@@ -3399,10 +2894,10 @@ function flushAllDrafts() {
|
|
|
3399
2894
|
return ok;
|
|
3400
2895
|
}
|
|
3401
2896
|
function useDraft(key) {
|
|
3402
|
-
const [draft, setDraft] =
|
|
3403
|
-
const pending2 =
|
|
3404
|
-
const timer =
|
|
3405
|
-
const lost =
|
|
2897
|
+
const [draft, setDraft] = useState10(() => (key ? read(key) : null) ?? emptyDraft());
|
|
2898
|
+
const pending2 = useRef7(null);
|
|
2899
|
+
const timer = useRef7(void 0);
|
|
2900
|
+
const lost = useRef7(false);
|
|
3406
2901
|
const flush = useCallback3(() => {
|
|
3407
2902
|
clearTimeout(timer.current);
|
|
3408
2903
|
const p = pending2.current;
|
|
@@ -3413,8 +2908,8 @@ function useDraft(key) {
|
|
|
3413
2908
|
}
|
|
3414
2909
|
return !lost.current;
|
|
3415
2910
|
}, []);
|
|
3416
|
-
const keyRef =
|
|
3417
|
-
|
|
2911
|
+
const keyRef = useRef7(key);
|
|
2912
|
+
useEffect7(() => {
|
|
3418
2913
|
if (keyRef.current === key) return;
|
|
3419
2914
|
flush();
|
|
3420
2915
|
keyRef.current = key;
|
|
@@ -3431,8 +2926,8 @@ function useDraft(key) {
|
|
|
3431
2926
|
},
|
|
3432
2927
|
[key, flush]
|
|
3433
2928
|
);
|
|
3434
|
-
|
|
3435
|
-
|
|
2929
|
+
useEffect7(() => registerDraftFlusher(flush), [flush]);
|
|
2930
|
+
useEffect7(
|
|
3436
2931
|
() => () => {
|
|
3437
2932
|
flush();
|
|
3438
2933
|
},
|
|
@@ -3539,17 +3034,17 @@ function threadPath(ctx, threadId) {
|
|
|
3539
3034
|
// src/message/Message.tsx
|
|
3540
3035
|
import {
|
|
3541
3036
|
useCallback as useCallback4,
|
|
3542
|
-
useEffect as
|
|
3037
|
+
useEffect as useEffect9,
|
|
3543
3038
|
useLayoutEffect as useLayoutEffect3,
|
|
3544
|
-
useRef as
|
|
3545
|
-
useState as
|
|
3039
|
+
useRef as useRef9,
|
|
3040
|
+
useState as useState12
|
|
3546
3041
|
} from "react";
|
|
3547
3042
|
import { createPortal } from "react-dom";
|
|
3548
3043
|
|
|
3549
3044
|
// src/message/Attachments.tsx
|
|
3550
3045
|
import { isActiveMime } from "@kanyun-ai-infra/band-contracts";
|
|
3551
|
-
import { useEffect as
|
|
3552
|
-
import { Fragment as
|
|
3046
|
+
import { useEffect as useEffect8, useRef as useRef8, useState as useState11, useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
3047
|
+
import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3553
3048
|
var stores = /* @__PURE__ */ new WeakMap();
|
|
3554
3049
|
function storeOf(ctx) {
|
|
3555
3050
|
const hit = stores.get(ctx.attachments);
|
|
@@ -3609,23 +3104,23 @@ function opensInTab(a) {
|
|
|
3609
3104
|
}
|
|
3610
3105
|
function MessageAttachments({ ctx, ids: given, compact = false }) {
|
|
3611
3106
|
const list = useProjectAttachments(ctx);
|
|
3612
|
-
const [open, setOpen] =
|
|
3613
|
-
const [broken, setBroken] =
|
|
3614
|
-
const cards =
|
|
3107
|
+
const [open, setOpen] = useState11(null);
|
|
3108
|
+
const [broken, setBroken] = useState11(/* @__PURE__ */ new Set());
|
|
3109
|
+
const cards = useRef8(/* @__PURE__ */ new Map());
|
|
3615
3110
|
const ids = [...new Set(given)];
|
|
3616
3111
|
const byId = new Map((list ?? []).map((a) => [a.id, a]));
|
|
3617
3112
|
const images = ids.filter((id) => thumbable(byId.get(id)) && !broken.has(id));
|
|
3618
3113
|
const files = ids.filter((id) => !images.includes(id));
|
|
3619
3114
|
const markBroken = (id) => setBroken((b) => new Set(b).add(id));
|
|
3620
3115
|
const gone = open !== null && !images.includes(open) ? open : null;
|
|
3621
|
-
|
|
3116
|
+
useEffect8(() => {
|
|
3622
3117
|
if (gone === null) return;
|
|
3623
3118
|
setOpen(null);
|
|
3624
3119
|
cards.current.get(gone)?.focus();
|
|
3625
3120
|
}, [gone]);
|
|
3626
3121
|
if (ids.length === 0) return null;
|
|
3627
3122
|
if (list === void 0) {
|
|
3628
|
-
return /* @__PURE__ */
|
|
3123
|
+
return /* @__PURE__ */ jsx11("ul", { className: "band-plugin-react-atts", "aria-label": `${ids.length} \u4E2A\u9644\u4EF6`, "aria-busy": "true", children: ids.slice(0, compact ? 3 : ids.length).map((id) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsx11(
|
|
3629
3124
|
"span",
|
|
3630
3125
|
{
|
|
3631
3126
|
className: "band-plugin-react-atts-pending",
|
|
@@ -3636,23 +3131,23 @@ function MessageAttachments({ ctx, ids: given, compact = false }) {
|
|
|
3636
3131
|
if (compact) {
|
|
3637
3132
|
const shown = images.slice(0, 3);
|
|
3638
3133
|
const rest = ids.length - shown.length;
|
|
3639
|
-
return /* @__PURE__ */
|
|
3640
|
-
shown.map((id) => /* @__PURE__ */
|
|
3641
|
-
rest > 0 && /* @__PURE__ */
|
|
3134
|
+
return /* @__PURE__ */ jsxs10("ul", { className: "band-plugin-react-atts", "data-compact": "", "aria-label": `${ids.length} \u4E2A\u9644\u4EF6`, children: [
|
|
3135
|
+
shown.map((id) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsx11(Thumb, { ctx, id, name: byId.get(id)?.name ?? "", onBroken: markBroken }) }, id)),
|
|
3136
|
+
rest > 0 && /* @__PURE__ */ jsx11("li", { className: "band-plugin-react-atts-more", children: shown.length > 0 ? `+${rest}` : `${rest} \u4E2A\u9644\u4EF6` })
|
|
3642
3137
|
] });
|
|
3643
3138
|
}
|
|
3644
|
-
return /* @__PURE__ */
|
|
3645
|
-
images.length > 0 && /* @__PURE__ */
|
|
3139
|
+
return /* @__PURE__ */ jsxs10(Fragment8, { children: [
|
|
3140
|
+
images.length > 0 && /* @__PURE__ */ jsx11("ul", { className: "band-plugin-react-atts", "aria-label": "\u56FE\u7247", children: images.map((id) => /* @__PURE__ */ jsx11("li", { children: /* @__PURE__ */ jsx11(
|
|
3646
3141
|
"button",
|
|
3647
3142
|
{
|
|
3648
3143
|
type: "button",
|
|
3649
3144
|
className: "band-plugin-react-atts-thumb",
|
|
3650
3145
|
"aria-label": `\u67E5\u770B\u56FE\u7247 ${byId.get(id)?.name ?? ""}`,
|
|
3651
3146
|
onClick: () => setOpen(id),
|
|
3652
|
-
children: /* @__PURE__ */
|
|
3147
|
+
children: /* @__PURE__ */ jsx11(Thumb, { ctx, id, name: byId.get(id)?.name ?? "", onBroken: markBroken })
|
|
3653
3148
|
}
|
|
3654
3149
|
) }, id)) }),
|
|
3655
|
-
files.length > 0 && /* @__PURE__ */
|
|
3150
|
+
files.length > 0 && /* @__PURE__ */ jsx11("ul", { className: "band-plugin-react-atts", "data-files": "", "aria-label": "\u6587\u4EF6", children: files.map((id) => /* @__PURE__ */ jsx11("li", { children: byId.get(id)?.deletedAt !== void 0 ? /* @__PURE__ */ jsx11(DeletedCard, { name: byId.get(id)?.name ?? "" }) : /* @__PURE__ */ jsx11(
|
|
3656
3151
|
FileCard,
|
|
3657
3152
|
{
|
|
3658
3153
|
ctx,
|
|
@@ -3664,7 +3159,7 @@ function MessageAttachments({ ctx, ids: given, compact = false }) {
|
|
|
3664
3159
|
}
|
|
3665
3160
|
}
|
|
3666
3161
|
) }, id)) }),
|
|
3667
|
-
open !== null && gone === null && /* @__PURE__ */
|
|
3162
|
+
open !== null && gone === null && /* @__PURE__ */ jsx11(
|
|
3668
3163
|
Lightbox,
|
|
3669
3164
|
{
|
|
3670
3165
|
ctx,
|
|
@@ -3679,10 +3174,10 @@ function MessageAttachments({ ctx, ids: given, compact = false }) {
|
|
|
3679
3174
|
}
|
|
3680
3175
|
function useAttachmentUrl(ctx, id, thumb, onError) {
|
|
3681
3176
|
const key = `${id}\0${thumb ? "thumb" : ""}`;
|
|
3682
|
-
const [got, setGot] =
|
|
3683
|
-
const failed2 =
|
|
3177
|
+
const [got, setGot] = useState11(null);
|
|
3178
|
+
const failed2 = useRef8(onError);
|
|
3684
3179
|
failed2.current = onError;
|
|
3685
|
-
|
|
3180
|
+
useEffect8(() => {
|
|
3686
3181
|
let live = true;
|
|
3687
3182
|
ctx.attachments.url(id, { thumb }).then(
|
|
3688
3183
|
(url) => live && setGot({ key, url }),
|
|
@@ -3705,7 +3200,7 @@ function Thumb({
|
|
|
3705
3200
|
onBroken
|
|
3706
3201
|
}) {
|
|
3707
3202
|
const src = useAttachmentUrl(ctx, id, true, () => onBroken(id));
|
|
3708
|
-
return src ? /* @__PURE__ */
|
|
3203
|
+
return src ? /* @__PURE__ */ jsx11(
|
|
3709
3204
|
"img",
|
|
3710
3205
|
{
|
|
3711
3206
|
className: "band-plugin-react-atts-img",
|
|
@@ -3714,7 +3209,7 @@ function Thumb({
|
|
|
3714
3209
|
loading: "lazy",
|
|
3715
3210
|
onError: () => onBroken(id)
|
|
3716
3211
|
}
|
|
3717
|
-
) : /* @__PURE__ */
|
|
3212
|
+
) : /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-img", "data-loading": "", "aria-hidden": true });
|
|
3718
3213
|
}
|
|
3719
3214
|
function saveAs(url, name) {
|
|
3720
3215
|
const link = document.createElement("a");
|
|
@@ -3741,7 +3236,7 @@ function FileCard({
|
|
|
3741
3236
|
},
|
|
3742
3237
|
(e) => ctx.report(e)
|
|
3743
3238
|
);
|
|
3744
|
-
return /* @__PURE__ */
|
|
3239
|
+
return /* @__PURE__ */ jsxs10(
|
|
3745
3240
|
"button",
|
|
3746
3241
|
{
|
|
3747
3242
|
ref: cardRef,
|
|
@@ -3750,18 +3245,18 @@ function FileCard({
|
|
|
3750
3245
|
title: inTab ? `\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00 ${name}` : `\u4E0B\u8F7D ${name}`,
|
|
3751
3246
|
onClick: go,
|
|
3752
3247
|
children: [
|
|
3753
|
-
/* @__PURE__ */
|
|
3754
|
-
/* @__PURE__ */
|
|
3755
|
-
a && /* @__PURE__ */
|
|
3756
|
-
/* @__PURE__ */
|
|
3248
|
+
/* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-ext", "aria-hidden": true, children: fileExt(name) }),
|
|
3249
|
+
/* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-name", children: name }),
|
|
3250
|
+
a && /* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-size", children: formatBytes(a.size) }),
|
|
3251
|
+
/* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-act", children: inTab ? "\u6253\u5F00" : "\u4E0B\u8F7D" })
|
|
3757
3252
|
]
|
|
3758
3253
|
}
|
|
3759
3254
|
);
|
|
3760
3255
|
}
|
|
3761
3256
|
function DeletedCard({ name }) {
|
|
3762
|
-
return /* @__PURE__ */
|
|
3763
|
-
/* @__PURE__ */
|
|
3764
|
-
/* @__PURE__ */
|
|
3257
|
+
return /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-atts-file", "data-deleted": "", children: [
|
|
3258
|
+
/* @__PURE__ */ jsx11("span", { className: "band-plugin-react-atts-ext", "aria-hidden": true, children: fileExt(name) }),
|
|
3259
|
+
/* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-atts-name", children: [
|
|
3765
3260
|
"\u5DF2\u5220\u9664\u7684\u7D20\u6750 \xB7 ",
|
|
3766
3261
|
name
|
|
3767
3262
|
] })
|
|
@@ -3775,14 +3270,14 @@ function Lightbox({
|
|
|
3775
3270
|
onIndex,
|
|
3776
3271
|
onClose
|
|
3777
3272
|
}) {
|
|
3778
|
-
const ref =
|
|
3273
|
+
const ref = useRef8(null);
|
|
3779
3274
|
const id = ids[index] ?? "";
|
|
3780
3275
|
const src = useAttachmentUrl(ctx, id, false);
|
|
3781
|
-
const [unpainted, setUnpainted] =
|
|
3276
|
+
const [unpainted, setUnpainted] = useState11(null);
|
|
3782
3277
|
if (unpainted !== null && unpainted !== id) setUnpainted(null);
|
|
3783
3278
|
const many = ids.length > 1;
|
|
3784
3279
|
const step = (d) => onIndex((index + d + ids.length) % ids.length);
|
|
3785
|
-
|
|
3280
|
+
useEffect8(() => {
|
|
3786
3281
|
const el = ref.current;
|
|
3787
3282
|
const opener = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
3788
3283
|
if (el && !el.open) {
|
|
@@ -3794,7 +3289,7 @@ function Lightbox({
|
|
|
3794
3289
|
};
|
|
3795
3290
|
}, []);
|
|
3796
3291
|
const name = names[index] ?? "";
|
|
3797
|
-
return /* @__PURE__ */
|
|
3292
|
+
return /* @__PURE__ */ jsxs10(
|
|
3798
3293
|
"dialog",
|
|
3799
3294
|
{
|
|
3800
3295
|
ref,
|
|
@@ -3815,19 +3310,19 @@ function Lightbox({
|
|
|
3815
3310
|
else if (many && e.key === "ArrowLeft") step(-1);
|
|
3816
3311
|
}),
|
|
3817
3312
|
children: [
|
|
3818
|
-
/* @__PURE__ */
|
|
3819
|
-
/* @__PURE__ */
|
|
3820
|
-
many && /* @__PURE__ */
|
|
3313
|
+
/* @__PURE__ */ jsxs10("div", { className: "band-plugin-react-prompt-preview-h", children: [
|
|
3314
|
+
/* @__PURE__ */ jsx11("span", { className: "band-plugin-react-prompt-name band-plugin-react-prompt-file", children: name }),
|
|
3315
|
+
many && /* @__PURE__ */ jsxs10("span", { className: "band-plugin-react-atts-count", children: [
|
|
3821
3316
|
index + 1,
|
|
3822
3317
|
" / ",
|
|
3823
3318
|
ids.length
|
|
3824
3319
|
] }),
|
|
3825
|
-
/* @__PURE__ */
|
|
3826
|
-
many && /* @__PURE__ */
|
|
3827
|
-
/* @__PURE__ */
|
|
3828
|
-
/* @__PURE__ */
|
|
3320
|
+
/* @__PURE__ */ jsx11("span", { className: "grow" }),
|
|
3321
|
+
many && /* @__PURE__ */ jsxs10(Fragment8, { children: [
|
|
3322
|
+
/* @__PURE__ */ jsx11("button", { type: "button", className: "btn sm", "aria-label": "\u4E0A\u4E00\u5F20", onClick: () => step(-1), children: "\u2039" }),
|
|
3323
|
+
/* @__PURE__ */ jsx11("button", { type: "button", className: "btn sm", "aria-label": "\u4E0B\u4E00\u5F20", onClick: () => step(1), children: "\u203A" })
|
|
3829
3324
|
] }),
|
|
3830
|
-
/* @__PURE__ */
|
|
3325
|
+
/* @__PURE__ */ jsx11(
|
|
3831
3326
|
"button",
|
|
3832
3327
|
{
|
|
3833
3328
|
type: "button",
|
|
@@ -3840,14 +3335,14 @@ function Lightbox({
|
|
|
3840
3335
|
] }),
|
|
3841
3336
|
src === null ? (
|
|
3842
3337
|
// 地址都没取到:没有可下载的东西,只说稍后再试(切走再切回来、关了再开会重取)
|
|
3843
|
-
/* @__PURE__ */
|
|
3338
|
+
/* @__PURE__ */ jsx11("output", { className: "band-plugin-react-atts-wait", children: "\u8FD9\u5F20\u56FE\u6253\u4E0D\u5F00\uFF0C\u7A0D\u540E\u518D\u8BD5" })
|
|
3844
3339
|
) : unpainted === id && src ? (
|
|
3845
3340
|
// 地址有、浏览器画不出:原图可能还是好的,给下载
|
|
3846
|
-
/* @__PURE__ */
|
|
3847
|
-
/* @__PURE__ */
|
|
3848
|
-
/* @__PURE__ */
|
|
3341
|
+
/* @__PURE__ */ jsxs10("div", { className: "band-plugin-react-atts-wait", children: [
|
|
3342
|
+
/* @__PURE__ */ jsx11("output", { children: "\u8FD9\u5F20\u56FE\u5728\u8FD9\u91CC\u6253\u4E0D\u5F00\uFF0C\u53EF\u4EE5\u4E0B\u8F7D\u4E0B\u6765\u770B" }),
|
|
3343
|
+
/* @__PURE__ */ jsx11("button", { type: "button", className: "btn sm", onClick: () => saveAs(src, name), children: "\u4E0B\u8F7D" })
|
|
3849
3344
|
] })
|
|
3850
|
-
) : src === void 0 ? /* @__PURE__ */
|
|
3345
|
+
) : src === void 0 ? /* @__PURE__ */ jsx11("p", { className: "band-plugin-react-atts-wait", children: "\u6B63\u5728\u6253\u5F00\u2026" }) : /* @__PURE__ */ jsx11(
|
|
3851
3346
|
"img",
|
|
3852
3347
|
{
|
|
3853
3348
|
className: "band-plugin-react-prompt-big",
|
|
@@ -3862,7 +3357,7 @@ function Lightbox({
|
|
|
3862
3357
|
}
|
|
3863
3358
|
|
|
3864
3359
|
// src/message/Message.tsx
|
|
3865
|
-
import { Fragment as
|
|
3360
|
+
import { Fragment as Fragment9, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3866
3361
|
var P = "band-plugin-react-msg";
|
|
3867
3362
|
var LONG_PRESS_MS = 500;
|
|
3868
3363
|
var SWALLOW_MS = 800;
|
|
@@ -3892,18 +3387,18 @@ async function copyText(text) {
|
|
|
3892
3387
|
}
|
|
3893
3388
|
}
|
|
3894
3389
|
function useReactionPatches(ctx, base) {
|
|
3895
|
-
const [patches, setPatches] =
|
|
3896
|
-
|
|
3390
|
+
const [patches, setPatches] = useState12({ base, map: /* @__PURE__ */ new Map() });
|
|
3391
|
+
useEffect9(() => {
|
|
3897
3392
|
let alive2 = true;
|
|
3898
|
-
const
|
|
3393
|
+
const seq2 = /* @__PURE__ */ new Map();
|
|
3899
3394
|
const off = ctx.events.subscribe("reaction.changed", (e) => {
|
|
3900
3395
|
const threadId = e.payload.threadId;
|
|
3901
3396
|
if (typeof threadId !== "string") return;
|
|
3902
|
-
const n = (
|
|
3903
|
-
|
|
3397
|
+
const n = (seq2.get(threadId) ?? 0) + 1;
|
|
3398
|
+
seq2.set(threadId, n);
|
|
3904
3399
|
ctx.threads.comments(threadId).then(
|
|
3905
3400
|
(comments) => {
|
|
3906
|
-
if (!alive2 ||
|
|
3401
|
+
if (!alive2 || seq2.get(threadId) !== n) return;
|
|
3907
3402
|
setPatches((p) => {
|
|
3908
3403
|
const map2 = new Map(p.base === base ? p.map : []);
|
|
3909
3404
|
for (const c of comments) map2.set(c.id, c.reactions);
|
|
@@ -3926,8 +3421,8 @@ var messagesOf = (root) => [...root.querySelectorAll("[data-band-message]")].fil
|
|
|
3926
3421
|
(el) => el.closest("[data-band-messages]") === root
|
|
3927
3422
|
);
|
|
3928
3423
|
function useMessageList() {
|
|
3929
|
-
const ref =
|
|
3930
|
-
const active =
|
|
3424
|
+
const ref = useRef9(null);
|
|
3425
|
+
const active = useRef9(null);
|
|
3931
3426
|
useLayoutEffect3(() => {
|
|
3932
3427
|
const root = ref.current;
|
|
3933
3428
|
if (!root) return;
|
|
@@ -3974,17 +3469,17 @@ function Message({
|
|
|
3974
3469
|
const system = c.kind === "system";
|
|
3975
3470
|
const react = ctx.threads.react;
|
|
3976
3471
|
const canReact = !system && Boolean(react) && ctx.member.can("comment");
|
|
3977
|
-
const [pending2, setPending] =
|
|
3978
|
-
const [failed2, setFailed] =
|
|
3979
|
-
const [menu, setMenu] =
|
|
3980
|
-
const [sheet, setSheet] =
|
|
3981
|
-
const [copied, setCopied] =
|
|
3982
|
-
const [notice, setNotice] =
|
|
3983
|
-
const root =
|
|
3984
|
-
const reactBtn =
|
|
3985
|
-
const moreBtn =
|
|
3986
|
-
const addBtn =
|
|
3987
|
-
|
|
3472
|
+
const [pending2, setPending] = useState12(/* @__PURE__ */ new Map());
|
|
3473
|
+
const [failed2, setFailed] = useState12();
|
|
3474
|
+
const [menu, setMenu] = useState12(null);
|
|
3475
|
+
const [sheet, setSheet] = useState12(false);
|
|
3476
|
+
const [copied, setCopied] = useState12(false);
|
|
3477
|
+
const [notice, setNotice] = useState12("");
|
|
3478
|
+
const root = useRef9(null);
|
|
3479
|
+
const reactBtn = useRef9(null);
|
|
3480
|
+
const moreBtn = useRef9(null);
|
|
3481
|
+
const addBtn = useRef9(null);
|
|
3482
|
+
useEffect9(() => {
|
|
3988
3483
|
const done = settledPending(reactions, pending2, me);
|
|
3989
3484
|
if (done.length === 0) return;
|
|
3990
3485
|
setPending((p) => {
|
|
@@ -3993,7 +3488,7 @@ function Message({
|
|
|
3993
3488
|
return next;
|
|
3994
3489
|
});
|
|
3995
3490
|
});
|
|
3996
|
-
|
|
3491
|
+
useEffect9(() => {
|
|
3997
3492
|
if (!copied) return;
|
|
3998
3493
|
const t = setTimeout(() => setCopied(false), COPIED_MS);
|
|
3999
3494
|
return () => clearTimeout(t);
|
|
@@ -4067,13 +3562,13 @@ function Message({
|
|
|
4067
3562
|
icon: ICON.copy,
|
|
4068
3563
|
run: () => void copy(plainText(c.body), "")
|
|
4069
3564
|
};
|
|
4070
|
-
const press =
|
|
4071
|
-
const swallowUntil =
|
|
3565
|
+
const press = useRef9(null);
|
|
3566
|
+
const swallowUntil = useRef9(0);
|
|
4072
3567
|
const cancelPress = () => {
|
|
4073
3568
|
if (press.current) clearTimeout(press.current.timer);
|
|
4074
3569
|
press.current = null;
|
|
4075
3570
|
};
|
|
4076
|
-
|
|
3571
|
+
useEffect9(
|
|
4077
3572
|
() => () => {
|
|
4078
3573
|
if (press.current) clearTimeout(press.current.timer);
|
|
4079
3574
|
},
|
|
@@ -4104,7 +3599,7 @@ function Message({
|
|
|
4104
3599
|
checked: Boolean(shown.find((r) => r.emoji === emoji)?.mine)
|
|
4105
3600
|
})) : [];
|
|
4106
3601
|
const returnTo = menu === "react" ? reactBtn : menu === "add" ? addBtn : moreBtn;
|
|
4107
|
-
return /* @__PURE__ */
|
|
3602
|
+
return /* @__PURE__ */ jsxs11(
|
|
4108
3603
|
"article",
|
|
4109
3604
|
{
|
|
4110
3605
|
ref: root,
|
|
@@ -4127,8 +3622,8 @@ function Message({
|
|
|
4127
3622
|
e.stopPropagation();
|
|
4128
3623
|
},
|
|
4129
3624
|
children: [
|
|
4130
|
-
/* @__PURE__ */
|
|
4131
|
-
canReact && /* @__PURE__ */
|
|
3625
|
+
/* @__PURE__ */ jsxs11(Toolbar, { children: [
|
|
3626
|
+
canReact && /* @__PURE__ */ jsx12(
|
|
4132
3627
|
"button",
|
|
4133
3628
|
{
|
|
4134
3629
|
ref: reactBtn,
|
|
@@ -4145,7 +3640,7 @@ function Message({
|
|
|
4145
3640
|
children: ICON.react
|
|
4146
3641
|
}
|
|
4147
3642
|
),
|
|
4148
|
-
/* @__PURE__ */
|
|
3643
|
+
/* @__PURE__ */ jsx12(
|
|
4149
3644
|
"button",
|
|
4150
3645
|
{
|
|
4151
3646
|
type: "button",
|
|
@@ -4159,7 +3654,7 @@ function Message({
|
|
|
4159
3654
|
children: copied ? ICON.check : ICON.copy
|
|
4160
3655
|
}
|
|
4161
3656
|
),
|
|
4162
|
-
items.length > 0 && /* @__PURE__ */
|
|
3657
|
+
items.length > 0 && /* @__PURE__ */ jsx12(
|
|
4163
3658
|
"button",
|
|
4164
3659
|
{
|
|
4165
3660
|
ref: moreBtn,
|
|
@@ -4178,9 +3673,9 @@ function Message({
|
|
|
4178
3673
|
)
|
|
4179
3674
|
] }),
|
|
4180
3675
|
children2,
|
|
4181
|
-
c.attachments && c.attachments.length > 0 && /* @__PURE__ */
|
|
4182
|
-
shown.length > 0 && /* @__PURE__ */
|
|
4183
|
-
shown.map((r) => /* @__PURE__ */
|
|
3676
|
+
c.attachments && c.attachments.length > 0 && /* @__PURE__ */ jsx12(MessageAttachments, { ctx, ids: c.attachments }),
|
|
3677
|
+
shown.length > 0 && /* @__PURE__ */ jsxs11("div", { className: `${P}-rx`, children: [
|
|
3678
|
+
shown.map((r) => /* @__PURE__ */ jsx12(
|
|
4184
3679
|
Chip,
|
|
4185
3680
|
{
|
|
4186
3681
|
r,
|
|
@@ -4190,7 +3685,7 @@ function Message({
|
|
|
4190
3685
|
},
|
|
4191
3686
|
r.emoji
|
|
4192
3687
|
)),
|
|
4193
|
-
canReact && /* @__PURE__ */
|
|
3688
|
+
canReact && /* @__PURE__ */ jsx12(
|
|
4194
3689
|
"button",
|
|
4195
3690
|
{
|
|
4196
3691
|
ref: addBtn,
|
|
@@ -4206,7 +3701,7 @@ function Message({
|
|
|
4206
3701
|
children: ICON.react
|
|
4207
3702
|
}
|
|
4208
3703
|
),
|
|
4209
|
-
menu === "add" && /* @__PURE__ */
|
|
3704
|
+
menu === "add" && /* @__PURE__ */ jsx12(
|
|
4210
3705
|
Menu2,
|
|
4211
3706
|
{
|
|
4212
3707
|
place: "rx",
|
|
@@ -4219,12 +3714,12 @@ function Message({
|
|
|
4219
3714
|
}
|
|
4220
3715
|
)
|
|
4221
3716
|
] }),
|
|
4222
|
-
failed2 && /* @__PURE__ */
|
|
3717
|
+
failed2 && /* @__PURE__ */ jsxs11("div", { className: `${P}-err`, role: "alert", children: [
|
|
4223
3718
|
"\u56DE\u5E94\u6CA1\u53D1\u51FA\u53BB\uFF1A",
|
|
4224
3719
|
failed2.text,
|
|
4225
|
-
/* @__PURE__ */
|
|
3720
|
+
/* @__PURE__ */ jsx12("button", { type: "button", onClick: () => toggle(failed2.emoji, failed2.on), children: "\u91CD\u8BD5" })
|
|
4226
3721
|
] }),
|
|
4227
|
-
(menu === "react" || menu === "more") && /* @__PURE__ */
|
|
3722
|
+
(menu === "react" || menu === "more") && /* @__PURE__ */ jsx12(
|
|
4228
3723
|
Menu2,
|
|
4229
3724
|
{
|
|
4230
3725
|
place: "bar",
|
|
@@ -4237,7 +3732,7 @@ function Message({
|
|
|
4237
3732
|
}
|
|
4238
3733
|
),
|
|
4239
3734
|
sheet && createPortal(
|
|
4240
|
-
/* @__PURE__ */
|
|
3735
|
+
/* @__PURE__ */ jsx12(
|
|
4241
3736
|
Sheet,
|
|
4242
3737
|
{
|
|
4243
3738
|
preview: children2,
|
|
@@ -4252,7 +3747,7 @@ function Message({
|
|
|
4252
3747
|
),
|
|
4253
3748
|
document.body
|
|
4254
3749
|
),
|
|
4255
|
-
notice && /* @__PURE__ */
|
|
3750
|
+
notice && /* @__PURE__ */ jsx12("output", { className: "sr-only", children: notice })
|
|
4256
3751
|
]
|
|
4257
3752
|
}
|
|
4258
3753
|
);
|
|
@@ -4267,7 +3762,7 @@ function Toolbar({ children: children2 }) {
|
|
|
4267
3762
|
e.stopPropagation();
|
|
4268
3763
|
to?.focus();
|
|
4269
3764
|
});
|
|
4270
|
-
return /* @__PURE__ */
|
|
3765
|
+
return /* @__PURE__ */ jsx12("div", { className: `${P}-bar`, role: "toolbar", "aria-label": "\u6D88\u606F\u64CD\u4F5C", onKeyDown: onToolbarKey, children: children2 });
|
|
4271
3766
|
}
|
|
4272
3767
|
function Chip({
|
|
4273
3768
|
r,
|
|
@@ -4276,14 +3771,14 @@ function Chip({
|
|
|
4276
3771
|
onToggle
|
|
4277
3772
|
}) {
|
|
4278
3773
|
const cls = `${P}-chip${r.mine ? " mine" : ""}${r.pending ? " pending" : ""}`;
|
|
4279
|
-
const inner = /* @__PURE__ */
|
|
4280
|
-
/* @__PURE__ */
|
|
4281
|
-
/* @__PURE__ */
|
|
4282
|
-
/* @__PURE__ */
|
|
3774
|
+
const inner = /* @__PURE__ */ jsxs11(Fragment9, { children: [
|
|
3775
|
+
/* @__PURE__ */ jsx12("span", { className: `${P}-e`, "aria-hidden": "true", children: r.emoji }),
|
|
3776
|
+
/* @__PURE__ */ jsx12("span", { "aria-hidden": "true", children: r.actors.length }),
|
|
3777
|
+
/* @__PURE__ */ jsx12("span", { className: `${P}-tip`, "aria-hidden": "true", children: who })
|
|
4283
3778
|
] });
|
|
4284
3779
|
if (!onToggle)
|
|
4285
|
-
return /* @__PURE__ */
|
|
4286
|
-
return /* @__PURE__ */
|
|
3780
|
+
return /* @__PURE__ */ jsx12("span", { className: cls, role: "img", "aria-label": label, children: inner });
|
|
3781
|
+
return /* @__PURE__ */ jsx12(
|
|
4287
3782
|
"button",
|
|
4288
3783
|
{
|
|
4289
3784
|
type: "button",
|
|
@@ -4323,7 +3818,7 @@ function EmojiRow({
|
|
|
4323
3818
|
emojis,
|
|
4324
3819
|
onEmoji
|
|
4325
3820
|
}) {
|
|
4326
|
-
return /* @__PURE__ */
|
|
3821
|
+
return /* @__PURE__ */ jsx12("fieldset", { className: `${P}-emo`, "aria-label": "\u56DE\u5E94", children: emojis.map(({ emoji, checked }) => /* @__PURE__ */ jsx12(
|
|
4327
3822
|
"button",
|
|
4328
3823
|
{
|
|
4329
3824
|
type: "button",
|
|
@@ -4341,7 +3836,7 @@ function EmojiRow({
|
|
|
4341
3836
|
)) });
|
|
4342
3837
|
}
|
|
4343
3838
|
function ItemList({ items, onPick }) {
|
|
4344
|
-
return /* @__PURE__ */
|
|
3839
|
+
return /* @__PURE__ */ jsx12(Fragment9, { children: items.map((it) => /* @__PURE__ */ jsxs11(
|
|
4345
3840
|
"button",
|
|
4346
3841
|
{
|
|
4347
3842
|
type: "button",
|
|
@@ -4368,8 +3863,8 @@ function Menu2({
|
|
|
4368
3863
|
onClose,
|
|
4369
3864
|
returnFocus
|
|
4370
3865
|
}) {
|
|
4371
|
-
const ref =
|
|
4372
|
-
const [pos, setPos] =
|
|
3866
|
+
const ref = useRef9(null);
|
|
3867
|
+
const [pos, setPos] = useState12(null);
|
|
4373
3868
|
const close = useCallback4(() => {
|
|
4374
3869
|
onClose();
|
|
4375
3870
|
returnFocus.current?.focus();
|
|
@@ -4392,10 +3887,10 @@ function Menu2({
|
|
|
4392
3887
|
const top = below + m.height > vh - edge && above >= edge ? above : below;
|
|
4393
3888
|
setPos({ top, left });
|
|
4394
3889
|
}, [place, returnFocus]);
|
|
4395
|
-
|
|
3890
|
+
useEffect9(() => {
|
|
4396
3891
|
if (pos) ref.current?.querySelector('[role^="menuitem"]')?.focus();
|
|
4397
3892
|
}, [pos]);
|
|
4398
|
-
|
|
3893
|
+
useEffect9(() => {
|
|
4399
3894
|
const onDown = (e) => {
|
|
4400
3895
|
const t = e.target;
|
|
4401
3896
|
if (ref.current?.contains(t) || returnFocus.current?.contains(t)) return;
|
|
@@ -4415,7 +3910,7 @@ function Menu2({
|
|
|
4415
3910
|
};
|
|
4416
3911
|
}, [onClose, returnFocus]);
|
|
4417
3912
|
return createPortal(
|
|
4418
|
-
/* @__PURE__ */
|
|
3913
|
+
/* @__PURE__ */ jsxs11(
|
|
4419
3914
|
"div",
|
|
4420
3915
|
{
|
|
4421
3916
|
ref,
|
|
@@ -4425,7 +3920,7 @@ function Menu2({
|
|
|
4425
3920
|
"aria-label": label,
|
|
4426
3921
|
onKeyDown: onMenuKeys,
|
|
4427
3922
|
children: [
|
|
4428
|
-
emojis.length > 0 && /* @__PURE__ */
|
|
3923
|
+
emojis.length > 0 && /* @__PURE__ */ jsx12(
|
|
4429
3924
|
EmojiRow,
|
|
4430
3925
|
{
|
|
4431
3926
|
emojis,
|
|
@@ -4435,8 +3930,8 @@ function Menu2({
|
|
|
4435
3930
|
}
|
|
4436
3931
|
}
|
|
4437
3932
|
),
|
|
4438
|
-
emojis.length > 0 && items.length > 0 && /* @__PURE__ */
|
|
4439
|
-
/* @__PURE__ */
|
|
3933
|
+
emojis.length > 0 && items.length > 0 && /* @__PURE__ */ jsx12("div", { className: `${P}-sep` }),
|
|
3934
|
+
/* @__PURE__ */ jsx12(
|
|
4440
3935
|
ItemList,
|
|
4441
3936
|
{
|
|
4442
3937
|
items,
|
|
@@ -4459,15 +3954,15 @@ function Sheet({
|
|
|
4459
3954
|
onEmoji,
|
|
4460
3955
|
onClose
|
|
4461
3956
|
}) {
|
|
4462
|
-
const ref =
|
|
3957
|
+
const ref = useRef9(null);
|
|
4463
3958
|
const onSheetKeys = withImeGuard(useMenuKeys(onClose));
|
|
4464
3959
|
useLayoutEffect3(() => {
|
|
4465
3960
|
ref.current?.querySelector('[role^="menuitem"]')?.focus();
|
|
4466
3961
|
}, []);
|
|
4467
|
-
return /* @__PURE__ */
|
|
4468
|
-
/* @__PURE__ */
|
|
4469
|
-
/* @__PURE__ */
|
|
4470
|
-
/* @__PURE__ */
|
|
3962
|
+
return /* @__PURE__ */ jsxs11("div", { className: `${P}-sheetwrap`, children: [
|
|
3963
|
+
/* @__PURE__ */ jsx12("button", { type: "button", className: `${P}-scrim`, "aria-label": "\u5173\u95ED", onClick: onClose }),
|
|
3964
|
+
/* @__PURE__ */ jsx12("div", { className: `${P}-lifted`, "aria-hidden": "true", ref: (el) => el?.setAttribute("inert", ""), children: preview }),
|
|
3965
|
+
/* @__PURE__ */ jsxs11(
|
|
4471
3966
|
"div",
|
|
4472
3967
|
{
|
|
4473
3968
|
ref,
|
|
@@ -4476,8 +3971,8 @@ function Sheet({
|
|
|
4476
3971
|
"aria-label": "\u6D88\u606F\u64CD\u4F5C",
|
|
4477
3972
|
onKeyDown: onSheetKeys,
|
|
4478
3973
|
children: [
|
|
4479
|
-
/* @__PURE__ */
|
|
4480
|
-
emojis.length > 0 && /* @__PURE__ */
|
|
3974
|
+
/* @__PURE__ */ jsx12("div", { className: `${P}-grab` }),
|
|
3975
|
+
emojis.length > 0 && /* @__PURE__ */ jsx12(
|
|
4481
3976
|
EmojiRow,
|
|
4482
3977
|
{
|
|
4483
3978
|
emojis,
|
|
@@ -4487,7 +3982,7 @@ function Sheet({
|
|
|
4487
3982
|
}
|
|
4488
3983
|
}
|
|
4489
3984
|
),
|
|
4490
|
-
/* @__PURE__ */
|
|
3985
|
+
/* @__PURE__ */ jsx12(
|
|
4491
3986
|
ItemList,
|
|
4492
3987
|
{
|
|
4493
3988
|
items,
|
|
@@ -4502,36 +3997,36 @@ function Sheet({
|
|
|
4502
3997
|
)
|
|
4503
3998
|
] });
|
|
4504
3999
|
}
|
|
4505
|
-
var svg = (body) => /* @__PURE__ */
|
|
4000
|
+
var svg = (body) => /* @__PURE__ */ jsx12("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: body });
|
|
4506
4001
|
var ICON = {
|
|
4507
4002
|
react: svg(
|
|
4508
|
-
/* @__PURE__ */
|
|
4509
|
-
/* @__PURE__ */
|
|
4510
|
-
/* @__PURE__ */
|
|
4003
|
+
/* @__PURE__ */ jsxs11(Fragment9, { children: [
|
|
4004
|
+
/* @__PURE__ */ jsx12("circle", { cx: "7.5", cy: "8.5", r: "5.5" }),
|
|
4005
|
+
/* @__PURE__ */ jsx12("path", { d: "M5.5 9.8c.5.8 1.2 1.2 2 1.2s1.5-.4 2-1.2M5.6 7h0M9.4 7h0M13 1.5v3M11.5 3h3" })
|
|
4511
4006
|
] })
|
|
4512
4007
|
),
|
|
4513
4008
|
copy: svg(
|
|
4514
|
-
/* @__PURE__ */
|
|
4515
|
-
/* @__PURE__ */
|
|
4516
|
-
/* @__PURE__ */
|
|
4009
|
+
/* @__PURE__ */ jsxs11(Fragment9, { children: [
|
|
4010
|
+
/* @__PURE__ */ jsx12("rect", { x: "5", y: "5", width: "8.5", height: "8.5", rx: "1.5" }),
|
|
4011
|
+
/* @__PURE__ */ jsx12("path", { d: "M11 5V3.5A1.5 1.5 0 0 0 9.5 2h-6A1.5 1.5 0 0 0 2 3.5v6A1.5 1.5 0 0 0 3.5 11H5" })
|
|
4517
4012
|
] })
|
|
4518
4013
|
),
|
|
4519
|
-
check: svg(/* @__PURE__ */
|
|
4520
|
-
more: svg(/* @__PURE__ */
|
|
4521
|
-
md: svg(/* @__PURE__ */
|
|
4014
|
+
check: svg(/* @__PURE__ */ jsx12("path", { d: "M3 8.5l3 3 7-7" })),
|
|
4015
|
+
more: svg(/* @__PURE__ */ jsx12("path", { d: "M3.5 8h0M8 8h0M12.5 8h0", strokeWidth: "2.2" })),
|
|
4016
|
+
md: svg(/* @__PURE__ */ jsx12("path", { d: "M2 12V4l3 3.5L8 4v8M11.5 4v8M9.5 10l2 2 2-2" })),
|
|
4522
4017
|
quote: svg(
|
|
4523
|
-
/* @__PURE__ */
|
|
4524
|
-
/* @__PURE__ */
|
|
4525
|
-
/* @__PURE__ */
|
|
4018
|
+
/* @__PURE__ */ jsxs11(Fragment9, { children: [
|
|
4019
|
+
/* @__PURE__ */ jsx12("path", { d: "M3 4.5h10M3 8h6M3 11.5h8" }),
|
|
4020
|
+
/* @__PURE__ */ jsx12("path", { d: "M13 8.5v4" })
|
|
4526
4021
|
] })
|
|
4527
4022
|
),
|
|
4528
4023
|
link: svg(
|
|
4529
|
-
/* @__PURE__ */
|
|
4024
|
+
/* @__PURE__ */ jsx12("path", { d: "M6.5 9.5l3-3M7 4.5l1-1a2.8 2.8 0 0 1 4 4l-1 1M9 11.5l-1 1a2.8 2.8 0 0 1-4-4l1-1" })
|
|
4530
4025
|
),
|
|
4531
4026
|
eye: svg(
|
|
4532
|
-
/* @__PURE__ */
|
|
4533
|
-
/* @__PURE__ */
|
|
4534
|
-
/* @__PURE__ */
|
|
4027
|
+
/* @__PURE__ */ jsxs11(Fragment9, { children: [
|
|
4028
|
+
/* @__PURE__ */ jsx12("path", { d: "M2 8s2.2-4.5 6-4.5S14 8 14 8s-2.2 4.5-6 4.5S2 8 2 8z" }),
|
|
4029
|
+
/* @__PURE__ */ jsx12("circle", { cx: "8", cy: "8", r: "1.8" })
|
|
4535
4030
|
] })
|
|
4536
4031
|
)
|
|
4537
4032
|
};
|
|
@@ -4569,7 +4064,7 @@ function parseMemoryItem(item) {
|
|
|
4569
4064
|
|
|
4570
4065
|
// src/memory/MemoryNote.tsx
|
|
4571
4066
|
import { defineScopeState } from "@kanyun-ai-infra/band-plugin-sdk";
|
|
4572
|
-
import { jsx as
|
|
4067
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4573
4068
|
var P2 = "band-plugin-react-memo";
|
|
4574
4069
|
var SETTINGS_PAGE = "@kanyun-ai-infra/band-settings/settings";
|
|
4575
4070
|
var lookups = defineScopeState((ctx) => {
|
|
@@ -4626,7 +4121,7 @@ function MemoryNote({ ctx, turnId }) {
|
|
|
4626
4121
|
}
|
|
4627
4122
|
};
|
|
4628
4123
|
const text = n.memo ? `\u8BB0\u4E0B\u4E86\uFF1A${n.memo}${n.more > 0 ? ` \u7B49 ${n.more + 1} \u6761` : ""}` : n.files.length > 0 ? `\u6539\u4E86\u8BB0\u5FC6\uFF1A${n.files.join("\u3001")}` : n.rejected.length > 0 ? "\u8FD9\u6B21\u7684\u8BB0\u5FC6\u6539\u52A8\u6CA1\u6709\u91C7\u7528" : "\u8BB0\u5FC6\u5B58\u4E86\u4E00\u7248\uFF0C\u5185\u5BB9\u6CA1\u53D8";
|
|
4629
|
-
return /* @__PURE__ */
|
|
4124
|
+
return /* @__PURE__ */ jsxs12(
|
|
4630
4125
|
"button",
|
|
4631
4126
|
{
|
|
4632
4127
|
type: "button",
|
|
@@ -4634,13 +4129,13 @@ function MemoryNote({ ctx, turnId }) {
|
|
|
4634
4129
|
onClick: open,
|
|
4635
4130
|
title: "\u9879\u76EE\u8BB0\u5FC6\uFF1AAgent \u5DE5\u4F5C\u65F6\u81EA\u5DF1\u8BFB\u5199\uFF0C\u4F60\u4E5F\u53EF\u4EE5\u6539\u3002\u70B9\u5F00\u770B\u8FD9\u6B21\u7684\u6539\u52A8",
|
|
4636
4131
|
children: [
|
|
4637
|
-
/* @__PURE__ */
|
|
4638
|
-
/* @__PURE__ */
|
|
4639
|
-
/* @__PURE__ */
|
|
4132
|
+
/* @__PURE__ */ jsxs12("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: [
|
|
4133
|
+
/* @__PURE__ */ jsx13("path", { d: "M4 2.5h6l2.5 2.5v8.5H4z" }),
|
|
4134
|
+
/* @__PURE__ */ jsx13("path", { d: "M6 7h4.5M6 9.5h4.5" })
|
|
4640
4135
|
] }),
|
|
4641
|
-
/* @__PURE__ */
|
|
4136
|
+
/* @__PURE__ */ jsxs12("span", { children: [
|
|
4642
4137
|
text,
|
|
4643
|
-
n.rejected.length > 0 && /* @__PURE__ */
|
|
4138
|
+
n.rejected.length > 0 && /* @__PURE__ */ jsxs12("span", { className: `${P2}-rejected`, children: [
|
|
4644
4139
|
n.rejected.join("\u3001"),
|
|
4645
4140
|
" \u7684\u4FEE\u6539\u6CA1\u6709\u91C7\u7528\uFF08\u548C\u522B\u7684\u6539\u52A8\u649E\u4E86\u6216\u8D85\u4E86\u4E0A\u9650\uFF09\uFF0C\u70B9\u5F00\u67E5\u770B"
|
|
4646
4141
|
] })
|
|
@@ -4650,278 +4145,6 @@ function MemoryNote({ ctx, turnId }) {
|
|
|
4650
4145
|
);
|
|
4651
4146
|
}
|
|
4652
4147
|
|
|
4653
|
-
// src/toast/store.ts
|
|
4654
|
-
var MAX_TOASTS = 3;
|
|
4655
|
-
var OK_MS = 4e3;
|
|
4656
|
-
var LEAVE_MS = 2e3;
|
|
4657
|
-
var TOAST_CLOSE_LABEL = "\u5173\u95ED";
|
|
4658
|
-
var EMPTY = [];
|
|
4659
|
-
var entries = [];
|
|
4660
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
4661
|
-
var snapshot = EMPTY;
|
|
4662
|
-
var seq2 = 0;
|
|
4663
|
-
function subscribeToasts(listener) {
|
|
4664
|
-
listeners.add(listener);
|
|
4665
|
-
return () => {
|
|
4666
|
-
listeners.delete(listener);
|
|
4667
|
-
};
|
|
4668
|
-
}
|
|
4669
|
-
function toastsSnapshot() {
|
|
4670
|
-
return snapshot;
|
|
4671
|
-
}
|
|
4672
|
-
function emptyToasts() {
|
|
4673
|
-
return EMPTY;
|
|
4674
|
-
}
|
|
4675
|
-
function publish() {
|
|
4676
|
-
snapshot = entries.length === 0 ? EMPTY : entries.map((e) => ({
|
|
4677
|
-
id: e.id,
|
|
4678
|
-
kind: e.kind,
|
|
4679
|
-
text: e.text,
|
|
4680
|
-
detail: e.detail,
|
|
4681
|
-
action: e.action
|
|
4682
|
-
}));
|
|
4683
|
-
for (const listener of listeners) listener();
|
|
4684
|
-
}
|
|
4685
|
-
function clearTimer(entry) {
|
|
4686
|
-
if (entry.timer !== void 0) {
|
|
4687
|
-
clearTimeout(entry.timer);
|
|
4688
|
-
entry.timer = void 0;
|
|
4689
|
-
}
|
|
4690
|
-
}
|
|
4691
|
-
function arm(id, ms) {
|
|
4692
|
-
const entry = entries.find((e) => e.id === id);
|
|
4693
|
-
if (!entry) return;
|
|
4694
|
-
clearTimer(entry);
|
|
4695
|
-
if (entry.pausedBy.size > 0) return;
|
|
4696
|
-
entry.timer = setTimeout(() => dismissToast(id), ms);
|
|
4697
|
-
}
|
|
4698
|
-
function toast(opts) {
|
|
4699
|
-
const kind = opts.kind ?? "ok";
|
|
4700
|
-
const id = opts.id ?? `toast-${++seq2}`;
|
|
4701
|
-
const existing = entries.find((e) => e.id === id);
|
|
4702
|
-
if (existing) {
|
|
4703
|
-
clearTimer(existing);
|
|
4704
|
-
existing.kind = kind;
|
|
4705
|
-
existing.text = opts.text;
|
|
4706
|
-
existing.detail = opts.detail;
|
|
4707
|
-
existing.action = opts.action;
|
|
4708
|
-
} else {
|
|
4709
|
-
if (entries.length >= MAX_TOASTS) {
|
|
4710
|
-
const i = entries.findIndex((e) => e.kind !== "busy");
|
|
4711
|
-
const [dropped] = entries.splice(i === -1 ? 0 : i, 1);
|
|
4712
|
-
if (dropped) clearTimer(dropped);
|
|
4713
|
-
}
|
|
4714
|
-
entries.push({
|
|
4715
|
-
id,
|
|
4716
|
-
kind,
|
|
4717
|
-
text: opts.text,
|
|
4718
|
-
detail: opts.detail,
|
|
4719
|
-
action: opts.action,
|
|
4720
|
-
pausedBy: /* @__PURE__ */ new Set()
|
|
4721
|
-
});
|
|
4722
|
-
}
|
|
4723
|
-
if (kind === "ok") arm(id, OK_MS);
|
|
4724
|
-
publish();
|
|
4725
|
-
return id;
|
|
4726
|
-
}
|
|
4727
|
-
function pauseToast(id, by = "pointer") {
|
|
4728
|
-
const entry = entries.find((e) => e.id === id);
|
|
4729
|
-
if (!entry) return;
|
|
4730
|
-
entry.pausedBy.add(by);
|
|
4731
|
-
clearTimer(entry);
|
|
4732
|
-
}
|
|
4733
|
-
function resumeToast(id, by = "pointer") {
|
|
4734
|
-
const entry = entries.find((e) => e.id === id);
|
|
4735
|
-
if (!entry) return;
|
|
4736
|
-
entry.pausedBy.delete(by);
|
|
4737
|
-
if (entry.kind === "ok" && entry.pausedBy.size === 0) arm(id, LEAVE_MS);
|
|
4738
|
-
}
|
|
4739
|
-
function syncToastPause(id, paused) {
|
|
4740
|
-
const entry = entries.find((e) => e.id === id);
|
|
4741
|
-
if (!entry) return;
|
|
4742
|
-
const wasPaused = entry.pausedBy.size > 0;
|
|
4743
|
-
entry.pausedBy.clear();
|
|
4744
|
-
if (paused.pointer) entry.pausedBy.add("pointer");
|
|
4745
|
-
if (paused.focus) entry.pausedBy.add("focus");
|
|
4746
|
-
if (entry.pausedBy.size > 0) clearTimer(entry);
|
|
4747
|
-
else if (wasPaused && entry.kind === "ok") arm(id, LEAVE_MS);
|
|
4748
|
-
}
|
|
4749
|
-
function dismissToast(id) {
|
|
4750
|
-
const i = entries.findIndex((e) => e.id === id);
|
|
4751
|
-
if (i < 0) return;
|
|
4752
|
-
const [entry] = entries.splice(i, 1);
|
|
4753
|
-
if (entry) clearTimer(entry);
|
|
4754
|
-
publish();
|
|
4755
|
-
}
|
|
4756
|
-
function dismissAllToasts() {
|
|
4757
|
-
for (const entry of entries) clearTimer(entry);
|
|
4758
|
-
entries = [];
|
|
4759
|
-
publish();
|
|
4760
|
-
}
|
|
4761
|
-
|
|
4762
|
-
// src/toast/ToastHost.tsx
|
|
4763
|
-
import { withImeGuard as withImeGuard3 } from "@kanyun-ai-infra/band-plugin-sdk";
|
|
4764
|
-
import { useEffect as useEffect11, useRef as useRef11, useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
4765
|
-
import { createPortal as createPortal2 } from "react-dom";
|
|
4766
|
-
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4767
|
-
var MODAL_SELECTOR = "dialog:modal, dialog[open][data-band-layer]";
|
|
4768
|
-
var MODAL_FALLBACK = "dialog[open][data-band-layer]";
|
|
4769
|
-
var modalOrder = /* @__PURE__ */ new Map();
|
|
4770
|
-
var modalSeq = 0;
|
|
4771
|
-
function openModals() {
|
|
4772
|
-
try {
|
|
4773
|
-
return [...document.querySelectorAll(MODAL_SELECTOR)];
|
|
4774
|
-
} catch {
|
|
4775
|
-
return [...document.querySelectorAll(MODAL_FALLBACK)];
|
|
4776
|
-
}
|
|
4777
|
-
}
|
|
4778
|
-
function modalTarget() {
|
|
4779
|
-
if (typeof document === "undefined") return null;
|
|
4780
|
-
const modals = openModals();
|
|
4781
|
-
const live = new Set(modals);
|
|
4782
|
-
for (const el of [...modalOrder.keys()]) if (!live.has(el)) modalOrder.delete(el);
|
|
4783
|
-
for (const el of modals) if (!modalOrder.has(el)) modalOrder.set(el, ++modalSeq);
|
|
4784
|
-
let top = null;
|
|
4785
|
-
let seq3 = -1;
|
|
4786
|
-
for (const el of modals) {
|
|
4787
|
-
const n = modalOrder.get(el) ?? 0;
|
|
4788
|
-
if (n > seq3) {
|
|
4789
|
-
seq3 = n;
|
|
4790
|
-
top = el;
|
|
4791
|
-
}
|
|
4792
|
-
}
|
|
4793
|
-
return top ?? null;
|
|
4794
|
-
}
|
|
4795
|
-
var modalListeners = /* @__PURE__ */ new Set();
|
|
4796
|
-
var modalObserver = null;
|
|
4797
|
-
var modalSnapshot = null;
|
|
4798
|
-
function topChanged() {
|
|
4799
|
-
const next = modalTarget();
|
|
4800
|
-
if (next === modalSnapshot) return;
|
|
4801
|
-
modalSnapshot = next;
|
|
4802
|
-
for (const fn of [...modalListeners]) fn();
|
|
4803
|
-
}
|
|
4804
|
-
if (typeof document !== "undefined") {
|
|
4805
|
-
document.addEventListener(
|
|
4806
|
-
"toggle",
|
|
4807
|
-
(e) => {
|
|
4808
|
-
const el = e.target;
|
|
4809
|
-
if (!el || typeof el.tagName !== "string" || el.tagName !== "DIALOG") return;
|
|
4810
|
-
if (el.open) {
|
|
4811
|
-
if (!modalOrder.has(el)) modalOrder.set(el, ++modalSeq);
|
|
4812
|
-
} else {
|
|
4813
|
-
modalOrder.delete(el);
|
|
4814
|
-
}
|
|
4815
|
-
if (modalListeners.size > 0) topChanged();
|
|
4816
|
-
},
|
|
4817
|
-
true
|
|
4818
|
-
);
|
|
4819
|
-
}
|
|
4820
|
-
function subscribeModals(listener) {
|
|
4821
|
-
modalListeners.add(listener);
|
|
4822
|
-
if (!modalObserver && typeof MutationObserver !== "undefined") {
|
|
4823
|
-
modalSnapshot = modalTarget();
|
|
4824
|
-
modalObserver = new MutationObserver(topChanged);
|
|
4825
|
-
modalObserver.observe(document.documentElement, {
|
|
4826
|
-
childList: true,
|
|
4827
|
-
subtree: true,
|
|
4828
|
-
attributes: true,
|
|
4829
|
-
attributeFilter: ["open"]
|
|
4830
|
-
});
|
|
4831
|
-
}
|
|
4832
|
-
return () => {
|
|
4833
|
-
modalListeners.delete(listener);
|
|
4834
|
-
if (modalListeners.size === 0) {
|
|
4835
|
-
modalObserver?.disconnect();
|
|
4836
|
-
modalObserver = null;
|
|
4837
|
-
}
|
|
4838
|
-
};
|
|
4839
|
-
}
|
|
4840
|
-
function modalSnapshotNow() {
|
|
4841
|
-
return modalObserver ? modalSnapshot : modalTarget();
|
|
4842
|
-
}
|
|
4843
|
-
var entered = /* @__PURE__ */ new Set();
|
|
4844
|
-
function ToastRow({ item }) {
|
|
4845
|
-
const label = item.action?.label ?? (item.kind === "bad" ? TOAST_CLOSE_LABEL : void 0);
|
|
4846
|
-
const row = useRef11(null);
|
|
4847
|
-
const first = useRef11(!entered.has(item.id));
|
|
4848
|
-
useEffect11(() => {
|
|
4849
|
-
entered.add(item.id);
|
|
4850
|
-
const el = row.current;
|
|
4851
|
-
if (!el) return;
|
|
4852
|
-
syncToastPause(item.id, {
|
|
4853
|
-
pointer: el.matches(":hover"),
|
|
4854
|
-
focus: el.contains(document.activeElement)
|
|
4855
|
-
});
|
|
4856
|
-
}, [item.id]);
|
|
4857
|
-
const run = () => {
|
|
4858
|
-
dismissToast(item.id);
|
|
4859
|
-
item.action?.onClick();
|
|
4860
|
-
};
|
|
4861
|
-
return /* @__PURE__ */ jsxs14(
|
|
4862
|
-
"div",
|
|
4863
|
-
{
|
|
4864
|
-
ref: row,
|
|
4865
|
-
className: first.current ? "band-plugin-react-toast" : "band-plugin-react-toast band-plugin-react-toast-again",
|
|
4866
|
-
role: item.kind === "bad" ? "alert" : void 0,
|
|
4867
|
-
onPointerEnter: () => pauseToast(item.id, "pointer"),
|
|
4868
|
-
onPointerLeave: () => resumeToast(item.id, "pointer"),
|
|
4869
|
-
onFocus: () => pauseToast(item.id, "focus"),
|
|
4870
|
-
onBlur: () => resumeToast(item.id, "focus"),
|
|
4871
|
-
onKeyDown: withImeGuard3((e) => {
|
|
4872
|
-
if (e.key !== "Escape") return;
|
|
4873
|
-
e.preventDefault();
|
|
4874
|
-
e.stopPropagation();
|
|
4875
|
-
dismissToast(item.id);
|
|
4876
|
-
}),
|
|
4877
|
-
children: [
|
|
4878
|
-
/* @__PURE__ */ jsx15("span", { className: `band-plugin-react-toast-icon ${item.kind}`, "aria-hidden": "true", children: item.kind === "ok" ? "\u2713" : item.kind === "bad" ? "!" : "" }),
|
|
4879
|
-
/* @__PURE__ */ jsxs14("span", { className: "band-plugin-react-toast-text", children: [
|
|
4880
|
-
item.text,
|
|
4881
|
-
item.detail ? /* @__PURE__ */ jsx15("small", { className: "band-plugin-react-toast-detail", children: item.detail }) : null
|
|
4882
|
-
] }),
|
|
4883
|
-
label ? /* @__PURE__ */ jsx15("button", { type: "button", className: "band-plugin-react-toast-act", onClick: run, children: label }) : /* @__PURE__ */ jsx15("span", {})
|
|
4884
|
-
]
|
|
4885
|
-
}
|
|
4886
|
-
);
|
|
4887
|
-
}
|
|
4888
|
-
function ToastHost() {
|
|
4889
|
-
const items = useSyncExternalStore3(subscribeToasts, toastsSnapshot, emptyToasts);
|
|
4890
|
-
const watching = items.length > 0;
|
|
4891
|
-
const target = useSyncExternalStore3(
|
|
4892
|
-
watching ? subscribeModals : noSubscribe,
|
|
4893
|
-
watching ? modalSnapshotNow : noTarget,
|
|
4894
|
-
noTarget
|
|
4895
|
-
);
|
|
4896
|
-
useEffect11(() => {
|
|
4897
|
-
if (items.length === 0) {
|
|
4898
|
-
entered.clear();
|
|
4899
|
-
return;
|
|
4900
|
-
}
|
|
4901
|
-
const live = new Set(items.map((item) => item.id));
|
|
4902
|
-
for (const id of entered) if (!live.has(id)) entered.delete(id);
|
|
4903
|
-
}, [items]);
|
|
4904
|
-
const stack = /* @__PURE__ */ jsx15(
|
|
4905
|
-
"div",
|
|
4906
|
-
{
|
|
4907
|
-
className: "band-plugin-react-toast-stack",
|
|
4908
|
-
"aria-label": "\u901A\u77E5",
|
|
4909
|
-
"aria-live": "polite",
|
|
4910
|
-
"aria-relevant": "additions text",
|
|
4911
|
-
"aria-atomic": "false",
|
|
4912
|
-
children: items.map((item) => /* @__PURE__ */ jsx15(ToastRow, { item }, item.id))
|
|
4913
|
-
}
|
|
4914
|
-
);
|
|
4915
|
-
return target ? createPortal2(stack, target) : stack;
|
|
4916
|
-
}
|
|
4917
|
-
function noSubscribe() {
|
|
4918
|
-
return () => {
|
|
4919
|
-
};
|
|
4920
|
-
}
|
|
4921
|
-
function noTarget() {
|
|
4922
|
-
return null;
|
|
4923
|
-
}
|
|
4924
|
-
|
|
4925
4148
|
// src/status/model.ts
|
|
4926
4149
|
function durationText(ms) {
|
|
4927
4150
|
const total = Number.isFinite(ms) && ms > 0 ? Math.max(1, Math.round(ms / 1e3)) : 0;
|
|
@@ -4979,10 +4202,10 @@ function receiptFooter(comment, stageName = (s) => s) {
|
|
|
4979
4202
|
}
|
|
4980
4203
|
|
|
4981
4204
|
// src/status/StatusMessage.tsx
|
|
4982
|
-
import { useSyncExternalStore as
|
|
4205
|
+
import { useSyncExternalStore as useSyncExternalStore4 } from "react";
|
|
4983
4206
|
|
|
4984
4207
|
// src/status/on-page.ts
|
|
4985
|
-
import { useCallback as useCallback5, useSyncExternalStore as
|
|
4208
|
+
import { useCallback as useCallback5, useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
4986
4209
|
var TURN_STATUS_ATTR = "data-band-turn-status";
|
|
4987
4210
|
var read2 = (id) => typeof document !== "undefined" && [...document.querySelectorAll(`[${TURN_STATUS_ATTR}]`)].some(
|
|
4988
4211
|
(el) => el.getAttribute(TURN_STATUS_ATTR) === id && !el.closest("[hidden], [inert]") && // 没有 checkVisibility 的环境(旧浏览器、jsdom)当看得见
|
|
@@ -5015,7 +4238,7 @@ function useTurnStatusOnPage(changeRequestId) {
|
|
|
5015
4238
|
},
|
|
5016
4239
|
[changeRequestId]
|
|
5017
4240
|
);
|
|
5018
|
-
return
|
|
4241
|
+
return useSyncExternalStore3(
|
|
5019
4242
|
subscribe,
|
|
5020
4243
|
() => read2(changeRequestId),
|
|
5021
4244
|
() => false
|
|
@@ -5023,7 +4246,7 @@ function useTurnStatusOnPage(changeRequestId) {
|
|
|
5023
4246
|
}
|
|
5024
4247
|
|
|
5025
4248
|
// src/status/StatusMessage.tsx
|
|
5026
|
-
import { Fragment as
|
|
4249
|
+
import { Fragment as Fragment10, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
5027
4250
|
var P3 = "band-plugin-react-status";
|
|
5028
4251
|
var clock = (() => {
|
|
5029
4252
|
let now = Date.now();
|
|
@@ -5055,11 +4278,11 @@ var idle = () => () => {
|
|
|
5055
4278
|
function useElapsed(startedAt) {
|
|
5056
4279
|
const start = startedAt ? Date.parse(startedAt) : Number.NaN;
|
|
5057
4280
|
const running = Number.isFinite(start);
|
|
5058
|
-
const now =
|
|
4281
|
+
const now = useSyncExternalStore4(running ? clock.subscribe : idle, clock.get, clock.get);
|
|
5059
4282
|
return running ? Math.max(0, now - start) : null;
|
|
5060
4283
|
}
|
|
5061
4284
|
function useNow(active = true) {
|
|
5062
|
-
return
|
|
4285
|
+
return useSyncExternalStore4(active ? clock.subscribe : idle, clock.get, clock.get);
|
|
5063
4286
|
}
|
|
5064
4287
|
function StatusMessage({
|
|
5065
4288
|
turn,
|
|
@@ -5072,29 +4295,29 @@ function StatusMessage({
|
|
|
5072
4295
|
const stallNote = stallNoteOf(turn, useNow(turn.stall !== void 0));
|
|
5073
4296
|
const note = turn.stopping ? `${memberName(members, turn.stopping.by)} \u70B9\u4E86\u505C\u6B62\uFF0C\u6B63\u5728\u505C\u4E0B\u2026` : turn.activity?.note ?? (turn.activity ? void 0 : turn.summary);
|
|
5074
4297
|
const action = turn.activity?.action;
|
|
5075
|
-
const status = /* @__PURE__ */
|
|
4298
|
+
const status = /* @__PURE__ */ jsxs13(
|
|
5076
4299
|
"output",
|
|
5077
4300
|
{
|
|
5078
4301
|
className: P3,
|
|
5079
4302
|
"aria-label": `${who}\u6B63\u5728\u5904\u7406`,
|
|
5080
4303
|
...stop ? { [TURN_STATUS_ATTR]: turn.changeRequestId } : {},
|
|
5081
4304
|
children: [
|
|
5082
|
-
/* @__PURE__ */
|
|
5083
|
-
/* @__PURE__ */
|
|
5084
|
-
/* @__PURE__ */
|
|
5085
|
-
context && /* @__PURE__ */
|
|
5086
|
-
/* @__PURE__ */
|
|
5087
|
-
/* @__PURE__ */
|
|
4305
|
+
/* @__PURE__ */ jsxs13("span", { className: `${P3}-head`, children: [
|
|
4306
|
+
/* @__PURE__ */ jsx14(AgentAvatar, { id: turn.agent, members, decorative: true }),
|
|
4307
|
+
/* @__PURE__ */ jsx14("span", { className: `${P3}-who`, children: who }),
|
|
4308
|
+
context && /* @__PURE__ */ jsx14("span", { className: `${P3}-context`, children: context }),
|
|
4309
|
+
/* @__PURE__ */ jsx14("span", { className: `glyph working ${P3}-glyph`, "aria-hidden": "true" }),
|
|
4310
|
+
/* @__PURE__ */ jsx14("span", { className: `${P3}-spacer` }),
|
|
5088
4311
|
elapsed !== null && // 每秒都变:不进读屏的实时播报
|
|
5089
|
-
/* @__PURE__ */
|
|
4312
|
+
/* @__PURE__ */ jsxs13("span", { className: `${P3}-elapsed`, "aria-hidden": "true", children: [
|
|
5090
4313
|
"\u5DF2\u7528 ",
|
|
5091
4314
|
durationText(elapsed)
|
|
5092
4315
|
] })
|
|
5093
4316
|
] }),
|
|
5094
|
-
note && /* @__PURE__ */
|
|
5095
|
-
action && /* @__PURE__ */
|
|
5096
|
-
stallNote && !turn.stopping && /* @__PURE__ */
|
|
5097
|
-
turn.steps.length > 0 && /* @__PURE__ */
|
|
4317
|
+
note && /* @__PURE__ */ jsx14("span", { className: `${P3}-note`, children: note }),
|
|
4318
|
+
action && /* @__PURE__ */ jsx14("span", { className: `${P3}-action`, children: action }),
|
|
4319
|
+
stallNote && !turn.stopping && /* @__PURE__ */ jsx14("span", { className: `${P3}-stall`, children: stallNote }),
|
|
4320
|
+
turn.steps.length > 0 && /* @__PURE__ */ jsx14("ol", { className: `${P3}-steps`, children: turn.steps.map((step, i) => /* @__PURE__ */ jsx14(
|
|
5098
4321
|
"li",
|
|
5099
4322
|
{
|
|
5100
4323
|
...i === turn.step ? { "aria-current": "step" } : {},
|
|
@@ -5107,9 +4330,9 @@ function StatusMessage({
|
|
|
5107
4330
|
}
|
|
5108
4331
|
);
|
|
5109
4332
|
if (!stop || turn.stopping || !stop.can) return status;
|
|
5110
|
-
return /* @__PURE__ */
|
|
4333
|
+
return /* @__PURE__ */ jsxs13(Fragment10, { children: [
|
|
5111
4334
|
status,
|
|
5112
|
-
/* @__PURE__ */
|
|
4335
|
+
/* @__PURE__ */ jsx14("div", { className: `${P3}-stop`, children: /* @__PURE__ */ jsx14(
|
|
5113
4336
|
StopTurn,
|
|
5114
4337
|
{
|
|
5115
4338
|
stop: stop.run,
|
|
@@ -5122,7 +4345,7 @@ function StatusMessage({
|
|
|
5122
4345
|
}
|
|
5123
4346
|
|
|
5124
4347
|
// src/status/TurnStopped.tsx
|
|
5125
|
-
import { jsx as
|
|
4348
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5126
4349
|
function turnStoppedOf(c) {
|
|
5127
4350
|
return c.kind === "system" && c.system?.type === "turn.stopped" ? c.system : null;
|
|
5128
4351
|
}
|
|
@@ -5134,14 +4357,14 @@ function TurnStopped({
|
|
|
5134
4357
|
members
|
|
5135
4358
|
}) {
|
|
5136
4359
|
const who = memberName(members, event.by);
|
|
5137
|
-
return /* @__PURE__ */
|
|
5138
|
-
/* @__PURE__ */
|
|
5139
|
-
/* @__PURE__ */
|
|
5140
|
-
/* @__PURE__ */
|
|
4360
|
+
return /* @__PURE__ */ jsxs14("p", { className: "band-plugin-react-stopped", children: [
|
|
4361
|
+
/* @__PURE__ */ jsx15(Avatar, { id: event.by, name: who, size: "xs", order: memberOrder(members), decorative: true }),
|
|
4362
|
+
/* @__PURE__ */ jsxs14("span", { className: "band-plugin-react-stopped-text", children: [
|
|
4363
|
+
/* @__PURE__ */ jsx15("b", { children: who }),
|
|
5141
4364
|
" ",
|
|
5142
4365
|
stoppedTurnText(event.number)
|
|
5143
4366
|
] }),
|
|
5144
|
-
event.durationMs !== void 0 && /* @__PURE__ */
|
|
4367
|
+
event.durationMs !== void 0 && /* @__PURE__ */ jsxs14("span", { className: "band-plugin-react-stopped-took", children: [
|
|
5145
4368
|
"\xB7 \u7528\u4E86 ",
|
|
5146
4369
|
durationText(event.durationMs)
|
|
5147
4370
|
] })
|
|
@@ -5149,7 +4372,7 @@ function TurnStopped({
|
|
|
5149
4372
|
}
|
|
5150
4373
|
|
|
5151
4374
|
// src/version-reference.tsx
|
|
5152
|
-
import { jsx as
|
|
4375
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
5153
4376
|
async function loadVersionReferences(ctx) {
|
|
5154
4377
|
const artifacts = await ctx.artifacts.list();
|
|
5155
4378
|
const lists = await Promise.all(
|
|
@@ -5209,7 +4432,7 @@ function VersionReference({
|
|
|
5209
4432
|
label,
|
|
5210
4433
|
open
|
|
5211
4434
|
}) {
|
|
5212
|
-
return open ? /* @__PURE__ */
|
|
4435
|
+
return open ? /* @__PURE__ */ jsx16(
|
|
5213
4436
|
"button",
|
|
5214
4437
|
{
|
|
5215
4438
|
type: "button",
|
|
@@ -5219,15 +4442,15 @@ function VersionReference({
|
|
|
5219
4442
|
onClick: open,
|
|
5220
4443
|
children: label
|
|
5221
4444
|
}
|
|
5222
|
-
) : /* @__PURE__ */
|
|
4445
|
+
) : /* @__PURE__ */ jsx16("span", { className: "band-plugin-react-version-ref", title: label, children: label });
|
|
5223
4446
|
}
|
|
5224
4447
|
|
|
5225
4448
|
// src/markdown.tsx
|
|
5226
4449
|
import { fromMarkdown as fromMarkdown2 } from "mdast-util-from-markdown";
|
|
5227
4450
|
import { gfmFromMarkdown as gfmFromMarkdown2 } from "mdast-util-gfm";
|
|
5228
4451
|
import { gfm as gfm2 } from "micromark-extension-gfm";
|
|
5229
|
-
import { Fragment as
|
|
5230
|
-
import { Fragment as
|
|
4452
|
+
import { Fragment as Fragment11, useMemo as useMemo2 } from "react";
|
|
4453
|
+
import { Fragment as Fragment12, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5231
4454
|
function safeMarkdownHref(url) {
|
|
5232
4455
|
try {
|
|
5233
4456
|
const u = new URL(url);
|
|
@@ -5243,7 +4466,7 @@ function children(nodes, breaks) {
|
|
|
5243
4466
|
return nodes.map((n, i) => (
|
|
5244
4467
|
// 节点没有稳定 id;README 是只读的整段,顺序就是身份
|
|
5245
4468
|
// biome-ignore lint/suspicious/noArrayIndexKey: 静态文档的节点按位置排
|
|
5246
|
-
/* @__PURE__ */
|
|
4469
|
+
/* @__PURE__ */ jsx17(Fragment11, { children: render(n, breaks) }, i)
|
|
5247
4470
|
));
|
|
5248
4471
|
}
|
|
5249
4472
|
function render(n, breaks) {
|
|
@@ -5253,52 +4476,52 @@ function render(n, breaks) {
|
|
|
5253
4476
|
case "heading": {
|
|
5254
4477
|
const level = Math.min(n.depth + 2, 6);
|
|
5255
4478
|
const Tag = `h${level}`;
|
|
5256
|
-
return /* @__PURE__ */
|
|
4479
|
+
return /* @__PURE__ */ jsx17(Tag, { children: children(n.children, breaks) });
|
|
5257
4480
|
}
|
|
5258
4481
|
case "paragraph":
|
|
5259
|
-
return /* @__PURE__ */
|
|
4482
|
+
return /* @__PURE__ */ jsx17("p", { children: children(n.children, breaks) });
|
|
5260
4483
|
case "text":
|
|
5261
4484
|
return breaks ? n.value.split("\n").map((line, i) => (
|
|
5262
4485
|
// biome-ignore lint/suspicious/noArrayIndexKey: 静态文本按行的位置排
|
|
5263
|
-
/* @__PURE__ */
|
|
5264
|
-
i > 0 && /* @__PURE__ */
|
|
4486
|
+
/* @__PURE__ */ jsxs15(Fragment11, { children: [
|
|
4487
|
+
i > 0 && /* @__PURE__ */ jsx17("br", {}),
|
|
5265
4488
|
line
|
|
5266
4489
|
] }, i)
|
|
5267
4490
|
)) : n.value;
|
|
5268
4491
|
case "emphasis":
|
|
5269
|
-
return /* @__PURE__ */
|
|
4492
|
+
return /* @__PURE__ */ jsx17("em", { children: children(n.children, breaks) });
|
|
5270
4493
|
case "strong":
|
|
5271
|
-
return /* @__PURE__ */
|
|
4494
|
+
return /* @__PURE__ */ jsx17("strong", { children: children(n.children, breaks) });
|
|
5272
4495
|
case "delete":
|
|
5273
|
-
return /* @__PURE__ */
|
|
4496
|
+
return /* @__PURE__ */ jsx17("del", { children: children(n.children, breaks) });
|
|
5274
4497
|
case "inlineCode":
|
|
5275
|
-
return /* @__PURE__ */
|
|
4498
|
+
return /* @__PURE__ */ jsx17("code", { children: n.value });
|
|
5276
4499
|
case "code":
|
|
5277
|
-
return /* @__PURE__ */
|
|
4500
|
+
return /* @__PURE__ */ jsx17("pre", { children: /* @__PURE__ */ jsx17("code", { children: n.value }) });
|
|
5278
4501
|
case "break":
|
|
5279
|
-
return /* @__PURE__ */
|
|
4502
|
+
return /* @__PURE__ */ jsx17("br", {});
|
|
5280
4503
|
case "thematicBreak":
|
|
5281
|
-
return /* @__PURE__ */
|
|
4504
|
+
return /* @__PURE__ */ jsx17("hr", {});
|
|
5282
4505
|
case "blockquote":
|
|
5283
|
-
return /* @__PURE__ */
|
|
4506
|
+
return /* @__PURE__ */ jsx17("blockquote", { children: children(n.children, breaks) });
|
|
5284
4507
|
case "list": {
|
|
5285
4508
|
const items = children(n.children, breaks);
|
|
5286
|
-
return n.ordered ? /* @__PURE__ */
|
|
4509
|
+
return n.ordered ? /* @__PURE__ */ jsx17("ol", { start: n.start ?? void 0, children: items }) : /* @__PURE__ */ jsx17("ul", { children: items });
|
|
5287
4510
|
}
|
|
5288
4511
|
case "listItem":
|
|
5289
|
-
return /* @__PURE__ */
|
|
4512
|
+
return /* @__PURE__ */ jsx17("li", { children: children(n.children, breaks) });
|
|
5290
4513
|
case "link": {
|
|
5291
4514
|
const href = safeMarkdownHref(n.url);
|
|
5292
|
-
return href ? /* @__PURE__ */
|
|
4515
|
+
return href ? /* @__PURE__ */ jsx17("a", { href, target: "_blank", rel: "noreferrer", children: children(n.children, breaks) }) : children(n.children, breaks);
|
|
5293
4516
|
}
|
|
5294
4517
|
case "image":
|
|
5295
4518
|
return n.alt ?? "";
|
|
5296
4519
|
case "table":
|
|
5297
|
-
return /* @__PURE__ */
|
|
4520
|
+
return /* @__PURE__ */ jsx17("div", { className: "band-plugin-react-markdown-table", children: /* @__PURE__ */ jsx17("table", { children: /* @__PURE__ */ jsx17("tbody", { children: children(n.children, breaks) }) }) });
|
|
5298
4521
|
case "tableRow":
|
|
5299
|
-
return /* @__PURE__ */
|
|
4522
|
+
return /* @__PURE__ */ jsx17("tr", { children: children(n.children, breaks) });
|
|
5300
4523
|
case "tableCell":
|
|
5301
|
-
return /* @__PURE__ */
|
|
4524
|
+
return /* @__PURE__ */ jsx17("td", { children: children(n.children, breaks) });
|
|
5302
4525
|
case "html":
|
|
5303
4526
|
return null;
|
|
5304
4527
|
default:
|
|
@@ -5306,19 +4529,19 @@ function render(n, breaks) {
|
|
|
5306
4529
|
}
|
|
5307
4530
|
}
|
|
5308
4531
|
function Markdown({ text, breaks = false }) {
|
|
5309
|
-
const tree =
|
|
5310
|
-
return /* @__PURE__ */
|
|
4532
|
+
const tree = useMemo2(() => parseMarkdown(text), [text]);
|
|
4533
|
+
return /* @__PURE__ */ jsx17(Fragment12, { children: render(tree, breaks) });
|
|
5311
4534
|
}
|
|
5312
4535
|
|
|
5313
4536
|
// src/settings/frame.tsx
|
|
5314
4537
|
import {
|
|
5315
4538
|
useCallback as useCallback6,
|
|
5316
|
-
useEffect as
|
|
5317
|
-
useRef as
|
|
5318
|
-
useState as
|
|
5319
|
-
useSyncExternalStore as
|
|
4539
|
+
useEffect as useEffect10,
|
|
4540
|
+
useRef as useRef10,
|
|
4541
|
+
useState as useState13,
|
|
4542
|
+
useSyncExternalStore as useSyncExternalStore5
|
|
5320
4543
|
} from "react";
|
|
5321
|
-
import { Fragment as
|
|
4544
|
+
import { Fragment as Fragment13, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
5322
4545
|
function settingsNavigate(ctx, target) {
|
|
5323
4546
|
leaveThen(
|
|
5324
4547
|
() => ctx.app.navigate({ page: target.page, ...target.params ? { params: target.params } : {} })
|
|
@@ -5332,7 +4555,7 @@ function settingsLink(ctx, page, params) {
|
|
|
5332
4555
|
}
|
|
5333
4556
|
var NARROW = "(max-width: 600px)";
|
|
5334
4557
|
function useNarrow() {
|
|
5335
|
-
return
|
|
4558
|
+
return useSyncExternalStore5(
|
|
5336
4559
|
(fn) => {
|
|
5337
4560
|
const m = window.matchMedia?.(NARROW);
|
|
5338
4561
|
m?.addEventListener("change", fn);
|
|
@@ -5359,7 +4582,7 @@ function controlValue(el) {
|
|
|
5359
4582
|
}
|
|
5360
4583
|
var inForm = (el) => el.closest("form") !== null;
|
|
5361
4584
|
function useLeaveGuard(root) {
|
|
5362
|
-
|
|
4585
|
+
useEffect10(() => {
|
|
5363
4586
|
const el = root.current;
|
|
5364
4587
|
if (!el) return;
|
|
5365
4588
|
pendingLeave = null;
|
|
@@ -5401,7 +4624,7 @@ function leaveThen(go) {
|
|
|
5401
4624
|
notifyLeave();
|
|
5402
4625
|
}
|
|
5403
4626
|
function usePendingLeave() {
|
|
5404
|
-
return
|
|
4627
|
+
return useSyncExternalStore5(
|
|
5405
4628
|
(fn) => {
|
|
5406
4629
|
leaveWatchers.add(fn);
|
|
5407
4630
|
return () => {
|
|
@@ -5425,16 +4648,16 @@ function SettingsLeaveDialog() {
|
|
|
5425
4648
|
notifyLeave();
|
|
5426
4649
|
go?.();
|
|
5427
4650
|
};
|
|
5428
|
-
return /* @__PURE__ */
|
|
4651
|
+
return /* @__PURE__ */ jsx18(
|
|
5429
4652
|
SettingsDialog,
|
|
5430
4653
|
{
|
|
5431
4654
|
title: "\u653E\u5F03\u6CA1\u4FDD\u5B58\u7684\u5185\u5BB9\uFF1F",
|
|
5432
4655
|
onClose: stay,
|
|
5433
|
-
actions: /* @__PURE__ */
|
|
5434
|
-
/* @__PURE__ */
|
|
5435
|
-
/* @__PURE__ */
|
|
4656
|
+
actions: /* @__PURE__ */ jsxs16(Fragment13, { children: [
|
|
4657
|
+
/* @__PURE__ */ jsx18("button", { type: "button", className: "btn", onClick: stay, children: "\u7EE7\u7EED\u586B\u5199" }),
|
|
4658
|
+
/* @__PURE__ */ jsx18("button", { type: "button", className: "btn primary", onClick: leave, children: "\u653E\u5F03\u5E76\u79BB\u5F00" })
|
|
5436
4659
|
] }),
|
|
5437
|
-
children: /* @__PURE__ */
|
|
4660
|
+
children: /* @__PURE__ */ jsx18("p", { children: "\u8FD9\u4E00\u9875\u586B\u7684\u5185\u5BB9\u8FD8\u6CA1\u4FDD\u5B58\uFF0C\u79BB\u5F00\u540E\u4E0D\u4F1A\u7559\u5728\u8FD9\u91CC\uFF0C\u4E5F\u4E0D\u4F1A\u5B58\u5728\u6D4F\u89C8\u5668\u91CC\u3002" })
|
|
5438
4661
|
}
|
|
5439
4662
|
);
|
|
5440
4663
|
}
|
|
@@ -5451,10 +4674,10 @@ function SettingsFrame({
|
|
|
5451
4674
|
backMobile,
|
|
5452
4675
|
children: children2
|
|
5453
4676
|
}) {
|
|
5454
|
-
const mainRef =
|
|
4677
|
+
const mainRef = useRef10(null);
|
|
5455
4678
|
useLeaveGuard(mainRef);
|
|
5456
|
-
return /* @__PURE__ */
|
|
5457
|
-
/* @__PURE__ */
|
|
4679
|
+
return /* @__PURE__ */ jsxs16(Fragment13, { children: [
|
|
4680
|
+
/* @__PURE__ */ jsx18(
|
|
5458
4681
|
SettingsLayout,
|
|
5459
4682
|
{
|
|
5460
4683
|
navLabel,
|
|
@@ -5471,7 +4694,7 @@ function SettingsFrame({
|
|
|
5471
4694
|
children: children2
|
|
5472
4695
|
}
|
|
5473
4696
|
),
|
|
5474
|
-
/* @__PURE__ */
|
|
4697
|
+
/* @__PURE__ */ jsx18(SettingsLeaveDialog, {})
|
|
5475
4698
|
] });
|
|
5476
4699
|
}
|
|
5477
4700
|
var pending = {};
|
|
@@ -5511,16 +4734,16 @@ function useFreshRow(slug) {
|
|
|
5511
4734
|
return useFreshRows(slug)[0] ?? null;
|
|
5512
4735
|
}
|
|
5513
4736
|
function useFreshRows(slug) {
|
|
5514
|
-
const [ids] =
|
|
5515
|
-
|
|
4737
|
+
const [ids] = useState13(() => peekFreshAll(slug));
|
|
4738
|
+
useEffect10(() => {
|
|
5516
4739
|
if (ids.length > 0) clearFresh();
|
|
5517
4740
|
}, [ids]);
|
|
5518
4741
|
return ids;
|
|
5519
4742
|
}
|
|
5520
4743
|
function useSavedNote() {
|
|
5521
|
-
const [note, setNote] =
|
|
4744
|
+
const [note, setNote] = useState13("");
|
|
5522
4745
|
const flash = useCallback6((text) => setNote(text), []);
|
|
5523
|
-
|
|
4746
|
+
useEffect10(() => {
|
|
5524
4747
|
if (!note) return;
|
|
5525
4748
|
const timer = setTimeout(() => setNote(""), 2e3);
|
|
5526
4749
|
return () => clearTimeout(timer);
|
|
@@ -5529,7 +4752,7 @@ function useSavedNote() {
|
|
|
5529
4752
|
}
|
|
5530
4753
|
function useCrossPageNotice(slug) {
|
|
5531
4754
|
const [note, flash] = useSavedNote();
|
|
5532
|
-
|
|
4755
|
+
useEffect10(() => {
|
|
5533
4756
|
const text = takeNotice(slug);
|
|
5534
4757
|
if (text) flash(text);
|
|
5535
4758
|
}, [slug, flash]);
|
|
@@ -5581,6 +4804,8 @@ export {
|
|
|
5581
4804
|
PROJECT_MODEL_NEEDS_ME,
|
|
5582
4805
|
PROJECT_MODEL_SPEND,
|
|
5583
4806
|
PaneHeader,
|
|
4807
|
+
PersonPicker,
|
|
4808
|
+
PersonSearch,
|
|
5584
4809
|
PromptInput,
|
|
5585
4810
|
QUOTE_DRAW,
|
|
5586
4811
|
REACTION_EMOJI,
|
|
@@ -5608,6 +4833,7 @@ export {
|
|
|
5608
4833
|
SettingsLoading,
|
|
5609
4834
|
SettingsNoAccess,
|
|
5610
4835
|
SettingsNotice,
|
|
4836
|
+
SettingsPicks,
|
|
5611
4837
|
SettingsReadError,
|
|
5612
4838
|
SettingsRow,
|
|
5613
4839
|
SettingsRows,
|
|
@@ -5707,6 +4933,7 @@ export {
|
|
|
5707
4933
|
parseMemoryItem,
|
|
5708
4934
|
peekFresh,
|
|
5709
4935
|
peekFreshAll,
|
|
4936
|
+
peopleDirectory,
|
|
5710
4937
|
persistable,
|
|
5711
4938
|
personalImportSource,
|
|
5712
4939
|
personalImportSources,
|