mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 03:52:50 +08:00
feat(skin): add validated runtime UI output bridge
This commit is contained in:
1 parent
7047d71678
commit
d137b41b5c
16 files changed
+443
-155
No files matched your search
@@ -18,14 +18,14 @@ Use this skill when editing or authoring a WebSpeak `.wskin` package, a built-in
|
||||
- Keep WebSpeak's translations and semantic content as the baseline. Add `content.json` only when a text override is an explicit part of the request; never use it to implement visual artwork.
|
||||
- Follow the schema-specific CSS rules: v1/v2 reject layout changes; v3 allows layout, placement, size, typography, and visibility changes within the skin root. Keep CSS package-local, scoped to public hooks, and free of external resources or executable values.
|
||||
- v3 can replace or obscure normal page controls. A surface must request `ui.surface.replace` and stays disabled until the user approves it. Custom interfaces can use their own declarative nodes and CSS; embed optional host widgets only when a trusted WebSpeak control is useful. Available widget IDs are registered in `src/shared/skin-plugin.ts`; each stateful host widget may appear once per page. Preserve usable microphone, disconnect, device-settings, screen-share and recovery paths at desktop and mobile sizes. Verify both the return-to-built-in-UI and restore-built-in-skin buttons. The host recovery and permission UI render outside the skin root. Keep `/admin/**` unskinned.
|
||||
- components.json schema v1 is legacy; v2 adds `mode: "surface"` and optional allowlisted host-widget nodes; v3 expands bounded declarative composition, events and permission-gated voice actions. Keep script/Wasm execution disabled in production until sandbox review and host rendering/action validation are complete. The development Wasm prototype may return one untrusted `ui_emit_json` string up to 16 KiB; do not render it until strict JSON/schema validation maps it to safe declarative nodes. Never execute HTML strings or expose direct network/storage or private host objects. Request only the component-level permissions needed; surfaces require `ui.surface.replace`. Bind voice actions only to explicit trusted activations; passive focus/blur/hover/drag-start/over events may update local UI state only, and input/change must not trigger host actions. Keep server-list labels and opaque identifiers separate from addresses and credentials. Use `servers.quickList` plus `quickServers.switch` when a custom UI should show favorites and recent servers together. Host widgets execute in WebSpeak and do not grant author code access to their private state.
|
||||
- components.json schema v1 is legacy; v2 adds `mode: "surface"` and optional allowlisted host-widget nodes; v3 expands bounded declarative composition, events and permission-gated voice actions. Keep script/Wasm execution disabled in production until sandbox review and host rendering/action validation are complete. The development Wasm prototype may return one untrusted `ui_emit_json` string up to 16 KiB; `parseSkinExtensionUiOutput` accepts only schema v3 display nodes, no widgets, surfaces, permissions, or non-local actions, then the outlet revalidates the combined component tree before rendering. Treat this as a validated development bridge, not production approval. Never execute HTML strings or expose direct network/storage or private host objects. Request only the component-level permissions needed; surfaces require `ui.surface.replace`. Bind voice actions only to explicit trusted activations; passive focus/blur/hover/drag-start/over events may update local UI state only, and input/change must not trigger host actions. Keep server-list labels and opaque identifiers separate from addresses and credentials. Use `servers.quickList` plus `quickServers.switch` when a custom UI should show favorites and recent servers together. Host widgets execute in WebSpeak and do not grant author code access to their private state.
|
||||
- Use the host's reserved artwork hooks for layered character art and the headphone scene. Prefer transparent assets and `background-size: contain` where the reference requires the full character or chibi to remain visible; arrange the artwork around the fixed hook rather than changing its geometry.
|
||||
- Build visual depth with separate background, surface, and foreground artwork already exposed by the hooks. Avoid duplicate static decorations when an animated replacement exists. For motion, keep waveforms/sonar smooth and restrained, honor reduced-motion preferences, and retain readable focus, error, mute, and speaking states.
|
||||
- Keep skin-specific CSS variables under `--skin-*`. Use only package-local assets and confirm their redistribution rights.
|
||||
|
||||
## Verify and package
|
||||
|
||||
1. Compare the implementation with its accessible visual reference at desktop and narrow widths. Check the homepage, voice workspace, empty chat, member list, screen-share player, selectors, and `/demo`; verify no crop, overflow, text collision, or control overlap. Do not claim visual verification when the reference page could not be read.
|
||||
1. Compare the implementation with its accessible visual reference at desktop and narrow widths. Check the homepage, voice workspace, empty chat, member list, screen-share player, selectors, and `/demo`; verify no crop, overflow, text collision, or control overlap. Record exactly which reference pages and states were observed; do not imply that unvisited pages or states were verified.
|
||||
2. Check all five interface languages, day/night modes, keyboard focus, and reduced-motion behavior. Confirm the admin console is unchanged.
|
||||
3. Run the relevant skin-package tests and application build after a related batch of changes. Fix validation failures rather than weakening v1/v2 boundaries, v3 permission and event checks, surface limits, or the host-widget allowlist.
|
||||
4. Package the contents of the skin directory so `manifest.json` is at the archive root, then import it through `/admin/skins` and retest the installed `.wskin` in a visitor session.
|
||||
@@ -37,4 +37,4 @@ The shipped default day, default night, and ILLUSIA skins are protected built-in
|
||||
- A full-page surface is a separate user-approved capability (`ui.surface.replace`); package installation alone must leave the built-in page visible.
|
||||
- The “restore built-in skin” control must use an unconditional selection function, not the skin-load-error-only recovery handler.
|
||||
- Custom quick-server layouts should use the unified favorites/recent collection and opaque host tokens. Labels that match the underlying address are redacted before projection; never expose target addresses or credentials to skin data bindings.
|
||||
- Record external-reference access failures and leave visual checks incomplete; do not replace the authorized page with search snippets or unrelated screenshots.
|
||||
- KOOK voice-only visual reference: the first two user-authorized rooms were accessible in the in-app browser. Observed the server rail, channel tree, voice membership rows, central chat area, right member list, and lower-left voice controls. Microphone remained off and the client was disconnected after inspection. No server/room identifiers, member names, or chat content were retained. Keep discovery, events, companion shop, ads, and operator/admin surfaces out of this skin.
|
||||
@@ -30,13 +30,14 @@ schema v2 支持公开组件布局、桌面/平板/手机配置、本地覆盖
|
||||
- 新增自己的麦克风/扬声器、音量、离开状态、悄悄话、断开连接和屏幕共享等宿主动作及逐项权限;皮肤只调用现有 WebSpeak 流程。
|
||||
- 新增音频、悄悄话和屏幕共享的公开状态数据,不向组件提供私有 SDK 对象、地址、原始音频或屏幕流。
|
||||
- 被动 focus/blur/hover/drag-start/drag-over 只能更新本地 UI 状态;触发宿主动作需要明确用户操作,输入/change 仍不能触发连接、切房或消息发送。
|
||||
- 完成统一批次验证后,再以真实授权语音房间完善 KAAK 参考实现;授权房间在当前浏览器仍不可读取时,保持未完成状态,不猜测视觉细节。
|
||||
- 已获准并实际查看指定服务器前两个语音频道;麦克风全程关闭。将频道列表、频道成员、中心聊天区、右侧成员栏和左下语音控制卡作为 KAAK 布局参考,不记录房间标识、成员名单或聊天内容。
|
||||
|
||||
### R3.2:受限作者逻辑运行时(原型,生产关闭)
|
||||
|
||||
- 现有 JavaScript Worker 因缺少硬内存配额继续关闭;Wasmi 原型用独立 Worker、解释器内存上限、扩展燃料上限和超时终止运行非可信 Wasm。
|
||||
- 当前增量加入 `env.ui_emit_json`:单次运行最多输出一次、不超过 16 KiB 的 UTF-8 UI 数据。宿主只接收有界字符串,不执行 HTML/JS,也不允许通过该接口触发 TeamSpeak 动作。
|
||||
- 下一步先实现严格 JSON/schema 校验,再将结果映射到安全声明式节点;宿主动作必须另走现有权限、可信用户事件与逐次参数校验。验证完整之前继续保持生产开关关闭。
|
||||
- 已实现严格 UTF-8 大小、JSON 与 schema v3 校验,并由 `SkinPluginOutlet` 将通过校验的结果合并进安全节点渲染。输出不能请求皮肤权限、替换页面、嵌入宿主控件或调用 TeamSpeak 动作;仅可使用组件本地状态和 `ui.setState` / `ui.toggleState`。冲突或无效输出会被忽略,原皮肤文档继续显示。
|
||||
- Wasm 执行仍为原型且生产开关关闭;后续还需把输出与扩展级授权/撤销生命周期衔接,并完成完整沙箱联测和独立安全审查。
|
||||
|
||||
### R4:整页皮肤界面和宿主控件组合(进行中)
|
||||
|
||||
@@ -47,7 +48,7 @@ schema v2 支持公开组件布局、桌面/平板/手机配置、本地覆盖
|
||||
- 为完整定制常用服务器栏提供脱敏的收藏/历史列表与宿主切换动作;地址、密码和身份材料仍留在 WebSpeak 内。
|
||||
- 页面权限确认、撤销入口和“返回标准界面”控件在皮肤 CSS 作用域之外。页面替换被拒绝或退出时,原生首页/语音工作区重新显示。
|
||||
- 补充导入、旧包兼容、页面替换、权限拒绝/撤销、宿主控件及皮肤切换回归。
|
||||
- 已提供可导入的完整首页/语音工作区 surface 样例,覆盖服务器切换、频道、成员、聊天、音频、悄悄话和屏幕共享;该样例验证格式与宿主控件组合,不代表已经实测 KOOK 视觉。
|
||||
- 已提供完整首页/语音工作区 surface 样例,覆盖服务器切换、频道、成员、聊天、音频、悄悄话和屏幕共享。KAAK 另作为 KOOK 语音客户端外观参考实现,不引入发现、广告、陪玩、活动或商城页面。
|
||||
- KOOK 参考皮肤只实现语音客户端体验;不复制运营、广告、陪玩、活动和商城页面。只有能实际查看的公开/授权界面才作为视觉依据。
|
||||
|
||||
#### R4 问题记录
|
||||
@@ -56,7 +57,7 @@ schema v2 支持公开组件布局、桌面/平板/手机配置、本地覆盖
|
||||
- surface 的“恢复内置皮肤”按钮误接到仅用于皮肤加载错误的回退函数,正常皮肤下点击无效。已改为明确切换到当前主题对应的内置皮肤,并增加授权/撤销回归。
|
||||
- 初版自定义服务器栏只有收藏数据,缺少最近连接项。新增 `servers.quickList` 和宿主切换动作,使用不透明令牌,不下放目标地址或凭据。
|
||||
- 收藏名/最近连接显示名有时会直接等于服务器地址;投影数据前增加地址匹配与泛化标签,避免通过“显示名”字段间接暴露连接目标。
|
||||
- KOOK 已授权范围是“比奇堡恶人帮”相关的前两个语音房间;用户明确排除陪玩店、活动通知等运营页面。当前能读到服务器页的无障碍结构,包括语音分组、频道列表、主内容区、成员栏和底部语音控件;进入频道的点击与截图读取仍超时,无法确认已加入房间或完成视觉采集。未保存频道标识、成员名单或历史消息;房间视觉复刻与交互验收仍未完成,不以推广内容、历史消息、搜索摘要或不相关页面替代参考。
|
||||
- KOOK 浏览器此前的读取和点击曾超时;恢复后已进入用户授权的前两个语音频道并检查频道页面截图,麦克风保持关闭,完成后断开连接。确认了服务器轨道、频道列表、中心聊天区、成员侧栏和语音控制卡的相对位置。没有记录频道标识、成员名单或聊天内容;陪玩店、活动通知、广告及其他运营页面不作为参考。
|
||||
|
||||
## 下一阶段
|
||||
|
||||
|
||||
@@ -76,5 +76,5 @@ v3 CSS 和 surface 可排列、替换或遮挡公开 UI,因此可能改变麦
|
||||
- 扩展数据字段或宿主动作时,增加精确 schema、权限、明确用户事件约束和宿主侧运行时验证,不暴露内部 SDK 对象。新增宿主控件也必须登记固定 ID、明确页面和确认只在宿主内处理其私有状态;自定义声明式 UI 不应被限制为只能拼装这组控件。
|
||||
- 对恶意输入、路径别名、拒绝授权、撤销、更新和皮肤切换增加测试;高敏能力必须单独设计。
|
||||
- 当前 JavaScript Worker 与 Wasm 扩展运行时都保持生产关闭。JavaScript Worker 缺少硬内存配额;Wasmi 解释器目前只是受限原型:解释器容器上限 64 MiB,扩展线性内存最多 4 MiB,燃料上限 10,000,000,外层 Worker 在 100 ms 后可终止执行。
|
||||
- Wasm 原型新增 `env.ui_emit_json`,每次运行最多提交一次、最多 16 KiB 的 UTF-8 字符串。该结果仍是不可信输入;它不会被当成 HTML 或脚本执行,也不授予网络、存储或宿主动作权限。完成严格 JSON/schema 校验、只用安全节点渲染、动作可信事件校验、授权/撤销流程、资源耗尽测试和独立安全审查之前,不得接入生产渲染或启用运行开关。
|
||||
- Wasm 原型新增 `env.ui_emit_json`,每次运行最多提交一次、最多 16 KiB 的 UTF-8 字符串。当前已通过共享组件 schema v3 校验,再由 `SkinPluginOutlet` 以安全节点渲染;非法 JSON/schema、重复组件 ID 或超限输出会被拒绝并保留原皮肤 UI。该输出不能请求皮肤权限、替换页面、嵌入宿主控件或调用 TeamSpeak 动作,只能使用局部状态和 `ui.setState` / `ui.toggleState`。它不会被当成 HTML 或脚本执行,也不授予网络或存储权限。Wasm 执行仍未连接到生产客户端;完成扩展级授权/撤销衔接、资源耗尽测试、端到端验证和独立安全审查之前,不得启用运行开关。
|
||||
- 商城发布、签名、下架、更新和撤销设计与管理员面板重做一起验收,且保持零新增服务费用为默认约束。
|
||||
@@ -139,7 +139,7 @@ components.json 顶层接受 schemaVersion 1、2 或 3 和 components 数组。s
|
||||
|
||||
当前可选宿主控件 ID:`home.connection-form`、`app.skin-switcher`、`app.language-switcher`、`voice.channel-panel`、`voice.member-cards`、`voice.chat-panel`、`voice.audio-controls`、`voice.screen-share-player`、`voice.whisper-controls`、`voice.performance-panel`、`voice.connection-controls`、`voice.disconnect-control`。未知控件和同页重复控件会被拒绝;每个控件的状态和业务动作仍由 WebSpeak 内部处理。自定义 UI 可以完全用普通声明式节点搭建,不需要采用这些控件。只显示收藏时可用 `favorites.items` 和 `favorites.switch`;若要将收藏与最近连接放在同一自定义栏,可用 `servers.quickList` 数据与 `quickServers.switch` 动作。服务器目标始终使用本机生成的不透明令牌,不把地址、密码或身份材料交给组件。频道行也可把 `voice.joinChannel` 绑定到双击事件,切房继续走 TeamSpeak 原有权限和密码流程。v3 还提供经独立权限保护的麦克风/扬声器、输出音量、离开状态、悄悄话、断开连接和屏幕共享动作;它们只调用 WebSpeak 已有操作,屏幕采集仍由浏览器或操作系统询问用户。
|
||||
|
||||
示例包见 [KAAK voice 示例](./examples/KAAK-VOICE.md),其 components.json 展示了公开频道列表和双击加入频道;[Open Voice Surface](./examples/OPEN-VOICE-SURFACE.md) 展示了完整首页和语音工作区 surface。后者是格式验证脚手架,不声称已经逐像素复刻 KOOK。当前数据权限和宿主动作以[开放皮肤规格](./OPEN_SKIN_SYSTEM_SPEC.zh-CN.md)中的清单为准。组件按本地用户授权后才渲染;权限对每个皮肤版本、页面和组件分别保存,可在宿主权限入口撤销。页面替换时,宿主会额外显示“返回标准界面”和“恢复内置皮肤”入口;拒绝授权或离开 surface 后,普通页面可立即恢复。
|
||||
示例包见 [KAAK voice 示例](./examples/KAAK-VOICE.md),其 components.json 展示了公开频道列表和在线成员侧栏;[Open Voice Surface](./examples/OPEN-VOICE-SURFACE.md) 展示了完整首页和语音工作区 surface,是格式验证脚手架。KAAK 的语音视觉参考来自用户授权进入的前两个语音房间;只记录布局,不保留服务器/房间标识、成员名或聊天内容。当前数据权限和宿主动作以[开放皮肤规格](./OPEN_SKIN_SYSTEM_SPEC.zh-CN.md)中的清单为准。组件按本地用户授权后才渲染;权限对每个皮肤版本、页面和组件分别保存,可在宿主权限入口撤销。页面替换时,宿主会额外显示“返回标准界面”和“恢复内置皮肤”入口;拒绝授权或离开 surface 后,普通页面可立即恢复。
|
||||
|
||||
组件树有硬上限:components.json 256 KiB。schema v1/v2 上限为 32 个组件、每组件 256 个模板节点、16 层深度和 100 条重复记录;schema v3 上限为 128 个组件、每组件 2048 个模板节点、32 层深度和 250 条重复记录,并允许 64 个本地标量状态与 64 个动作。图片资源只能从包内引用,CSS 不能读取外部 URL、脚本或浏览器存储。宿主动作需显式权限,并只能绑定可信的用户事件;输入或 change 事件不能触发宿主动作。focus/blur、hover 和 drag-start/over 等被动事件只可改动组件本地状态,不能触发语音操作。
|
||||
|
||||
@@ -348,4 +348,4 @@ CSS 被限定在 `.ws-skin-root` 内,管理员页面不会继承皮肤。删
|
||||
- surface 上的“恢复内置皮肤”操作必须调用无条件的内置皮肤切换路径;用于“皮肤加载失败”提示的回退函数会在正常情况下直接返回。
|
||||
- 自定义服务器栏需要用 `servers.quickList` 同时显示收藏与最近连接;只能把标签、类型、当前标记和随机令牌交给组件,切换时再由宿主解析本地目标。
|
||||
- 最近连接和默认收藏名可能直接是服务器地址;组件上下文会在投影阶段将这种标签改为通用名称,不能改为暴露原始地址。
|
||||
- 外部 KOOK 页面目前无法通过当前 IAB/Edge 桥接读取;本轮没有采集房间视觉或操作状态。皮肤指南要求将该项保留为未验收,不能根据搜索摘要宣称完成视觉克隆。
|
||||
- KOOK 登录后的前两个用户授权语音房间已在 IAB 中读取。记录的仅为语音界面布局关系;没有保存服务器/房间标识、成员名称或聊天内容。完整的发现、运营及管理页面不属于皮肤范围,也没有检查。
|
||||
@@ -1,16 +1,16 @@
|
||||
# KAAK voice skin
|
||||
|
||||
KAAK is a schema v3 open-skin package for WebSpeak's public connection page and voice workspace. It keeps TeamSpeak connection, channel, member, chat, favorite-server, audio, and screen-sharing behavior in the host. On desktop, its declarative channel/member sidebar replaces the host's channel tree; on narrow screens, WebSpeak's native responsive channel/member UI remains in use.
|
||||
KAAK is a schema v3 open-skin package for WebSpeak's public connection page and voice workspace. It keeps TeamSpeak connection, channel, member, chat, favorite-server, audio, and screen-sharing behavior in the host. The desktop voice layout places the favorite-server rail, a declarative channel list, the active workspace, a member column, and the audio dock in separate regions. Narrow screens return to WebSpeak's responsive channel and member controls.
|
||||
|
||||
The design target is the voice-client portion of KOOK, as requested by the project owner. This skin does not include discovery, advertising, companion/party, event, store, administrator, or other service-operator pages. It does not add a KOOK account flow, direct messages, server administration, or channels absent from the connected TeamSpeak server.
|
||||
The design target is the voice-client portion of KOOK, as requested by the project owner. This skin does not include discovery, companion/party, event, store, advertising, administrator, or other service-operator pages. It does not add a KOOK account flow, direct messages, server administration, or channels absent from the connected TeamSpeak server.
|
||||
|
||||
## Reference access note
|
||||
|
||||
The owner authorized inspection of two specified voice rooms. The current browser bridge exposes the KOOK tab in its inventory but times out when reading its page, and direct page access is unavailable. Therefore this revision is a v3 architecture and styling migration based on the existing KAAK draft and the owner's voice-client scope; it is not a verified pixel-for-pixel reproduction of either live room. No room contents or member details are asserted here.
|
||||
The owner authorized inspection of the first two voice rooms in the KOOK server. Both rooms were entered and viewed; the microphone remained off. The reference confirmed a narrow server rail, grouped channel list with inline voice participants, a central channel/chat workspace, a right-side member column, and a compact voice-control dock near the lower left. This is a layout and styling reference, not a claim of pixel-for-pixel reproduction. Server/room identifiers, member names, and chat contents were not recorded.
|
||||
|
||||
## Components and permissions
|
||||
|
||||
The voice sidebar is defined in [components.json](./kaak-voice/components.json). It reads the public channel tree and visible member names/speaking state. A real user double-click or Enter/Space key action can ask the host to join a listed channel; the host rechecks that the channel is visible and applies the existing TeamSpeak password and permission flow. Permission approval is local to this skin version and can be revoked from the host access control.
|
||||
The channel list and member column are defined as separate components in [components.json](./kaak-voice/components.json). They read only the visible TeamSpeak channel tree and visible member names/speaking state. A user-activated channel control asks the host to join a listed channel; the host rechecks visibility and applies the existing TeamSpeak password and permission flow. Permission approval is local to this skin version and can be revoked from the host access control.
|
||||
|
||||
The favorite-server rail and main audio/chat controls remain WebSpeak components. The plugin does not receive server addresses, passwords, identity keys, microphone controls, raw audio, private messages, or arbitrary network/storage APIs. The /demo page uses synthetic data and does not connect to TeamSpeak.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
This importable schema v2 surface package exercises complete public home and voice pages using only declarative nodes and WebSpeak-owned controls. It includes server switching, channel navigation, visible members, chat, audio, whisper, screen sharing, connection controls, and the built-in language and skin selectors. It contains no discovery, events, shop, companion, advertising, or administration pages.
|
||||
|
||||
This is an implementation scaffold for testing the open-skin format, not a visual claim about KOOK. The current KOOK browser bridge does not expose the logged-in page, so its room-specific visual details remain unverified. Once the reference page can be read, the scaffold can be styled from the two authorized rooms without adding unrelated service pages.
|
||||
This is an implementation scaffold for testing the open-skin format, not a pixel-matched KOOK skin. The visual reference was read in the in-app browser in the first two user-authorized voice rooms. The separate [KAAK voice sample](./KAAK-VOICE.md) records the voice-only layout findings and applies them to the channel and member sidebars. No server/room identifiers, member names, or chat contents were retained. Discovery, companion shop, events, ads, and operator/admin pages are outside the sample's scope.
|
||||
|
||||
- Source: [open-voice-surface](./open-voice-surface/)
|
||||
- Importable package: [open-voice-surface.wskin](./open-voice-surface.wskin)
|
||||
|
||||
Binary file not shown.
@@ -1,14 +1,13 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"schemaVersion": 3,
|
||||
"components": [
|
||||
{
|
||||
"id": "kaak-room-sidebar",
|
||||
"name": "KAAK 频道侧栏 / channel sidebar",
|
||||
"id": "kaak-channel-sidebar",
|
||||
"name": "KAAK 频道列表 / channel list",
|
||||
"page": "voice",
|
||||
"accessibleName": "频道与在线成员 / Channels and online members",
|
||||
"accessibleName": "频道列表 / Channel list",
|
||||
"permissions": [
|
||||
"session.channels.read",
|
||||
"session.members.read",
|
||||
"session.channel.join"
|
||||
],
|
||||
"actions": {
|
||||
@@ -21,16 +20,16 @@
|
||||
},
|
||||
"root": {
|
||||
"tag": "aside",
|
||||
"part": "panel",
|
||||
"className": "kaak-room-sidebar",
|
||||
"part": "channel-panel",
|
||||
"className": "kaak-channel-sidebar",
|
||||
"children": [
|
||||
{
|
||||
"tag": "header",
|
||||
"part": "heading",
|
||||
"className": "kaak-sidebar-heading",
|
||||
"children": [
|
||||
{ "tag": "small", "part": "eyebrow", "children": [{ "text": "KAAK · VOICE SPACE" }] },
|
||||
{ "tag": "h2", "part": "channel-title", "children": [{ "text": "频道 / Channels" }] }
|
||||
{ "tag": "small", "part": "eyebrow", "children": [{ "text": "VOICE SERVER / 语音服务器" }] },
|
||||
{ "tag": "h2", "part": "channel-title", "children": [{ "text": "频道" }] }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -50,13 +49,19 @@
|
||||
"attributes": {
|
||||
"type": "button",
|
||||
"aria-pressed": "{{channel.current}}",
|
||||
"aria-label": "双击加入 / Double-click to join {{channel.name}}"
|
||||
"aria-label": "加入 / Join {{channel.name}}"
|
||||
},
|
||||
"events": {
|
||||
"dblclick": "join-channel",
|
||||
"keydown": "join-channel"
|
||||
"click": "join-channel"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"tag": "span",
|
||||
"part": "channel-glyph",
|
||||
"className": "kaak-channel-glyph",
|
||||
"attributes": { "aria-hidden": true },
|
||||
"children": [{ "text": "♬" }]
|
||||
},
|
||||
{
|
||||
"tag": "span",
|
||||
"part": "channel-name",
|
||||
@@ -74,42 +79,63 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kaak-members-sidebar",
|
||||
"name": "KAAK 在线成员 / online members",
|
||||
"page": "voice",
|
||||
"accessibleName": "在线成员 / Online members",
|
||||
"permissions": ["session.members.read"],
|
||||
"actions": {},
|
||||
"root": {
|
||||
"tag": "aside",
|
||||
"part": "member-panel",
|
||||
"className": "kaak-members-sidebar",
|
||||
"children": [
|
||||
{
|
||||
"tag": "header",
|
||||
"part": "heading",
|
||||
"className": "kaak-sidebar-heading",
|
||||
"children": [
|
||||
{ "tag": "small", "part": "eyebrow", "children": [{ "text": "VOICE / MEMBERS" }] },
|
||||
{ "tag": "h2", "part": "member-title", "children": [{ "text": "成员" }] }
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "section",
|
||||
"part": "members",
|
||||
"className": "kaak-member-section",
|
||||
"tag": "p",
|
||||
"part": "online-label",
|
||||
"className": "kaak-online-label",
|
||||
"children": [{ "text": "当前在线 / Online" }]
|
||||
},
|
||||
{
|
||||
"tag": "ul",
|
||||
"part": "member-list",
|
||||
"className": "kaak-member-list",
|
||||
"children": [
|
||||
{
|
||||
"tag": "h3",
|
||||
"part": "member-title",
|
||||
"className": "kaak-member-title",
|
||||
"children": [{ "text": "在线成员 / Members" }]
|
||||
},
|
||||
{
|
||||
"tag": "ul",
|
||||
"part": "member-list",
|
||||
"className": "kaak-member-list",
|
||||
"tag": "li",
|
||||
"part": "member-row",
|
||||
"className": "kaak-member-row",
|
||||
"repeat": { "path": "session.members", "as": "member" },
|
||||
"children": [
|
||||
{
|
||||
"tag": "li",
|
||||
"part": "member-row",
|
||||
"className": "kaak-member-row",
|
||||
"repeat": { "path": "session.members", "as": "member" },
|
||||
"tag": "div",
|
||||
"part": "member-row-content",
|
||||
"className": "kaak-member-row-content",
|
||||
"attributes": { "data-speaking": "{{member.speaking}}", "data-self": "{{member.self}}" },
|
||||
"children": [
|
||||
{ "tag": "span", "part": "presence", "className": "kaak-member-presence", "attributes": { "aria-hidden": true } },
|
||||
{ "tag": "span", "part": "member-name", "className": "kaak-member-name", "children": [{ "text": "{{member.name}}" }] },
|
||||
{
|
||||
"tag": "span",
|
||||
"part": "member-name",
|
||||
"className": "kaak-member-name",
|
||||
"children": [{ "text": "{{member.name}}" }]
|
||||
},
|
||||
{
|
||||
"tag": "span",
|
||||
"tag": "small",
|
||||
"part": "speaking-indicator",
|
||||
"className": "kaak-speaking-indicator",
|
||||
"when": { "path": "member.speaking", "equals": true },
|
||||
"attributes": { "aria-label": "正在说话 / Speaking" },
|
||||
"children": [{ "text": "说话中 / speaking" }]
|
||||
"children": [{ "text": "说话中" }]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/* KAAK is an original dark voice-client treatment built from WebSpeak's public skin hooks. */
|
||||
:root {
|
||||
--skin-kaak-page: #111319;
|
||||
--skin-kaak-rail: #0d0f14;
|
||||
--skin-kaak-sidebar: #171a22;
|
||||
--skin-kaak-surface: #1d212b;
|
||||
--skin-kaak-raised: #252a36;
|
||||
--skin-kaak-line: #303644;
|
||||
--skin-kaak-text: #e5e9f2;
|
||||
--skin-kaak-muted: #9aa4b5;
|
||||
--skin-kaak-accent: #8495ff;
|
||||
--skin-kaak-accent-soft: rgba(132, 149, 255, .16);
|
||||
--skin-kaak-green: #55d6a0;
|
||||
--skin-kaak-page: #18191b;
|
||||
--skin-kaak-rail: #121315;
|
||||
--skin-kaak-sidebar: #1d1f21;
|
||||
--skin-kaak-surface: #252729;
|
||||
--skin-kaak-raised: #2c2e30;
|
||||
--skin-kaak-line: #3a3c3e;
|
||||
--skin-kaak-text: #f0f1f2;
|
||||
--skin-kaak-muted: #a2a4a6;
|
||||
--skin-kaak-accent: #7ca89a;
|
||||
--skin-kaak-accent-soft: rgba(124, 168, 154, .16);
|
||||
--skin-kaak-green: #7cc98a;
|
||||
--skin-kaak-red: #f07783;
|
||||
--skin-kaak-amber: #e8b866;
|
||||
--skin-kaak-shadow: 0 18px 48px rgba(0, 0, 0, .3);
|
||||
@@ -50,7 +50,7 @@
|
||||
:root [data-ws-part="skin.option"][aria-selected="true"],
|
||||
:root [data-ws-part="language.option"][aria-selected="true"] {
|
||||
color: #ffffff;
|
||||
border-color: rgba(132, 149, 255, .62);
|
||||
border-color: rgba(124, 168, 154, .62);
|
||||
background-color: var(--skin-kaak-accent-soft);
|
||||
}
|
||||
|
||||
@@ -162,8 +162,8 @@
|
||||
[data-ws-part="voice.member-panel.search"]:focus-within,
|
||||
[data-ws-part="voice.chat.composer"]:focus-within,
|
||||
[data-ws-part="voice.favorite-servers.dialog.input"]:focus-within {
|
||||
border-color: rgba(132, 149, 255, .72);
|
||||
box-shadow: 0 0 0 2px rgba(132, 149, 255, .12);
|
||||
border-color: rgba(124, 168, 154, .72);
|
||||
box-shadow: 0 0 0 2px rgba(124, 168, 154, .12);
|
||||
}
|
||||
|
||||
[data-ws-part="home.field"] input,
|
||||
@@ -187,7 +187,7 @@
|
||||
[data-ws-part="home.connect"],
|
||||
[data-ws-part="home.identity-import.submit"],
|
||||
[data-ws-part="home.identity-import.file-button"] {
|
||||
color: #111319;
|
||||
color: #18191b;
|
||||
border-color: var(--skin-kaak-accent);
|
||||
border-radius: 10px;
|
||||
background-color: var(--skin-kaak-accent);
|
||||
@@ -239,10 +239,10 @@
|
||||
[data-ws-part="voice.favorite-servers.add"]:hover,
|
||||
[data-ws-part="voice.favorite-servers.strip.add"]:hover {
|
||||
color: #ffffff;
|
||||
border-color: rgba(132, 149, 255, .55);
|
||||
border-color: rgba(124, 168, 154, .55);
|
||||
border-radius: 11px;
|
||||
background-color: var(--skin-kaak-accent-soft);
|
||||
box-shadow: 0 0 0 1px rgba(132, 149, 255, .12);
|
||||
box-shadow: 0 0 0 1px rgba(124, 168, 154, .12);
|
||||
}
|
||||
|
||||
[data-ws-part="voice.favorite-servers.avatar"] {
|
||||
@@ -301,7 +301,7 @@
|
||||
[data-ws-part="voice.channel-group.heading"]:hover,
|
||||
[data-ws-part="voice.channel-group.heading"][data-ws-state="current"] {
|
||||
color: #eef0ff;
|
||||
border-color: rgba(132, 149, 255, .3);
|
||||
border-color: rgba(124, 168, 154, .3);
|
||||
background-color: var(--skin-kaak-accent-soft);
|
||||
box-shadow: inset 2px 0 0 var(--skin-kaak-accent);
|
||||
}
|
||||
@@ -380,7 +380,7 @@
|
||||
[data-ws-part="voice.favorite-servers.current-toggle"]:hover,
|
||||
[data-ws-part="voice.header-actions"] [data-ws-part="control"]:hover {
|
||||
color: #ffffff;
|
||||
border-color: rgba(132, 149, 255, .34);
|
||||
border-color: rgba(124, 168, 154, .34);
|
||||
border-radius: 8px;
|
||||
background-color: var(--skin-kaak-accent-soft);
|
||||
}
|
||||
@@ -406,13 +406,13 @@
|
||||
}
|
||||
|
||||
[data-ws-part="voice.activity-heading"] {
|
||||
border-color: rgba(132, 149, 255, .3);
|
||||
border-color: rgba(124, 168, 154, .3);
|
||||
}
|
||||
|
||||
[data-ws-part="voice.chat.tabs"] {
|
||||
color: var(--skin-kaak-muted);
|
||||
border-color: #2d3340;
|
||||
background-color: #171a22;
|
||||
background-color: #1d1f21;
|
||||
}
|
||||
|
||||
[data-ws-part="voice.chat.tab"] {
|
||||
@@ -425,13 +425,13 @@
|
||||
[data-ws-part="voice.chat.tab"]:hover,
|
||||
[data-ws-part="voice.chat.tab"][data-ws-state="active"] {
|
||||
color: #f1f2ff;
|
||||
border-color: rgba(132, 149, 255, .35);
|
||||
border-color: rgba(124, 168, 154, .35);
|
||||
background-color: var(--skin-kaak-accent-soft);
|
||||
}
|
||||
|
||||
[data-ws-part="voice.chat.messages"] {
|
||||
color: var(--skin-kaak-text);
|
||||
background-color: #171a22;
|
||||
background-color: #1d1f21;
|
||||
}
|
||||
|
||||
[data-ws-part="voice.chat.message"] {
|
||||
@@ -450,20 +450,20 @@
|
||||
|
||||
[data-ws-part="voice.chat.message-bubble"] {
|
||||
color: var(--skin-kaak-text);
|
||||
border-color: #303644;
|
||||
border-color: #3a3c3e;
|
||||
border-radius: 12px;
|
||||
background-color: #252a35;
|
||||
}
|
||||
|
||||
[data-ws-part="voice.chat.message"][data-ws-state="mine"] [data-ws-part="voice.chat.message-bubble"] {
|
||||
color: #f2f3ff;
|
||||
border-color: rgba(132, 149, 255, .28);
|
||||
border-color: rgba(124, 168, 154, .28);
|
||||
background-color: rgba(77, 90, 159, .28);
|
||||
}
|
||||
|
||||
[data-ws-part="voice.chat.empty"] {
|
||||
color: var(--skin-kaak-muted);
|
||||
border-color: #303644;
|
||||
border-color: #3a3c3e;
|
||||
border-radius: 13px;
|
||||
background-color: #1a1e27;
|
||||
}
|
||||
@@ -483,7 +483,7 @@
|
||||
|
||||
[data-ws-part="voice.audio-dock"] {
|
||||
color: var(--skin-kaak-text);
|
||||
border-color: #303644;
|
||||
border-color: #3a3c3e;
|
||||
border-radius: 14px;
|
||||
background-color: #191d26;
|
||||
box-shadow: var(--skin-kaak-shadow);
|
||||
@@ -500,7 +500,7 @@
|
||||
[data-ws-part="voice.audio-dock.microphone"] button:hover,
|
||||
[data-ws-part="voice.audio-dock.output"] button:hover {
|
||||
color: #ffffff;
|
||||
border-color: rgba(132, 149, 255, .5);
|
||||
border-color: rgba(124, 168, 154, .5);
|
||||
background-color: var(--skin-kaak-accent-soft);
|
||||
}
|
||||
|
||||
@@ -563,9 +563,9 @@
|
||||
}
|
||||
|
||||
[data-ws-part="voice.member"][data-ws-state="self"] {
|
||||
border-color: rgba(132, 149, 255, .34);
|
||||
border-color: rgba(124, 168, 154, .34);
|
||||
border-radius: 14px;
|
||||
background-color: rgba(132, 149, 255, .08);
|
||||
background-color: rgba(124, 168, 154, .08);
|
||||
}
|
||||
|
||||
[data-ws-part="voice.member.status"],
|
||||
@@ -594,7 +594,7 @@
|
||||
[data-ws-part="voice.screen-player.stage"],
|
||||
[data-ws-part="voice.screen-player.placeholder"] {
|
||||
color: var(--skin-kaak-muted);
|
||||
border-color: #303644;
|
||||
border-color: #3a3c3e;
|
||||
border-radius: 11px;
|
||||
background-color: #11141b;
|
||||
}
|
||||
@@ -693,7 +693,7 @@
|
||||
[data-ws-part="demo.chat.empty"],
|
||||
[data-ws-part="demo.note"] {
|
||||
color: var(--skin-kaak-text);
|
||||
border-color: #303644;
|
||||
border-color: #3a3c3e;
|
||||
border-radius: 10px;
|
||||
background-color: var(--skin-kaak-surface);
|
||||
}
|
||||
@@ -718,7 +718,7 @@
|
||||
|
||||
[data-ws-part="demo.channel"][data-ws-state="active"],
|
||||
[data-ws-part="demo.voice-card"][data-ws-state="speaking"] {
|
||||
border-color: rgba(132, 149, 255, .5);
|
||||
border-color: rgba(124, 168, 154, .5);
|
||||
background-color: var(--skin-kaak-accent-soft);
|
||||
}
|
||||
|
||||
@@ -811,32 +811,75 @@
|
||||
[data-ws-part="demo.actions"] [data-ws-part="demo.action.speaking"]:hover,
|
||||
[data-ws-part="demo.chat.tabs"] [data-ws-part="demo.chat.tab"][data-ws-state="active"] {
|
||||
color: #ffffff;
|
||||
border-color: rgba(132, 149, 255, .5);
|
||||
border-color: rgba(124, 168, 154, .5);
|
||||
background-color: var(--skin-kaak-accent-soft);
|
||||
}
|
||||
|
||||
/* Open-skin example: a declarative room sidebar replaces the host channel tree on desktop. */
|
||||
@media (min-width: 981px) {
|
||||
/* The desktop layout follows the voice-room reference: server rail, channels, chat, members. */
|
||||
@media (min-width: 1160px) {
|
||||
[data-ws-page="voice"] [data-ws-part="voice.member-panel.heading"],
|
||||
[data-ws-page="voice"] [data-ws-part="voice.member-panel.search"],
|
||||
[data-ws-page="voice"] [data-ws-part="voice.member-panel.channels"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] .ws-plugin-component[data-ws-plugin-part="kaak-room-sidebar"] {
|
||||
[data-ws-page="voice"] .app-shell[data-favorite-rail="true"] {
|
||||
grid-template-columns: 68px 280px minmax(0, 1fr);
|
||||
background: var(--skin-kaak-page);
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] .app-shell[data-favorite-rail="true"] .workspace {
|
||||
grid-column: 3;
|
||||
grid-row: 1;
|
||||
min-width: 0;
|
||||
margin-right: 248px;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] .app-shell[data-favorite-rail="true"] .member-panel {
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
border-color: var(--skin-kaak-line);
|
||||
background: var(--skin-kaak-sidebar);
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] .favorite-server-rail {
|
||||
grid-column: 1;
|
||||
grid-row: 1;
|
||||
background: var(--skin-kaak-rail);
|
||||
border-color: var(--skin-kaak-line);
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] .ws-plugin-component[data-ws-plugin-part="kaak-channel-sidebar"] {
|
||||
position: fixed;
|
||||
z-index: 18;
|
||||
top: 0;
|
||||
bottom: 94px;
|
||||
bottom: 0;
|
||||
left: 68px;
|
||||
width: 318px;
|
||||
width: 280px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
padding: 22px 15px 16px;
|
||||
padding: 20px 12px 106px;
|
||||
color: var(--skin-kaak-text);
|
||||
border-right: 1px solid var(--skin-kaak-line);
|
||||
background: linear-gradient(180deg, rgba(27, 30, 40, .99), rgba(19, 22, 30, .99));
|
||||
scrollbar-color: #3d4352 transparent;
|
||||
background: var(--skin-kaak-sidebar);
|
||||
scrollbar-color: #45474a transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] .ws-plugin-component[data-ws-plugin-part="kaak-members-sidebar"] {
|
||||
position: fixed;
|
||||
z-index: 18;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 248px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
padding: 20px 12px 18px;
|
||||
color: var(--skin-kaak-text);
|
||||
border-left: 1px solid var(--skin-kaak-line);
|
||||
background: var(--skin-kaak-sidebar);
|
||||
scrollbar-color: #45474a transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
@@ -845,11 +888,29 @@
|
||||
z-index: 22;
|
||||
bottom: 12px;
|
||||
left: 80px;
|
||||
width: 294px;
|
||||
width: 256px;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-part="voice.workspace"] {
|
||||
background: var(--skin-kaak-page);
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-part="voice.workspace"] > [data-ws-part="voice.header"] {
|
||||
background: var(--skin-kaak-page);
|
||||
border-color: var(--skin-kaak-line);
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-part="voice.content"] {
|
||||
width: calc(100% - 32px);
|
||||
max-width: none;
|
||||
margin: 0 16px;
|
||||
padding-top: 18px;
|
||||
background: var(--skin-kaak-page);
|
||||
}
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.heading"] {
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-channel-sidebar.heading"],
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.heading"] {
|
||||
display: grid;
|
||||
gap: 5px;
|
||||
margin: 0 4px 18px;
|
||||
@@ -857,47 +918,55 @@
|
||||
border-bottom: 1px solid var(--skin-kaak-line);
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.eyebrow"] {
|
||||
color: var(--skin-kaak-accent);
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-channel-sidebar.eyebrow"],
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.eyebrow"] {
|
||||
color: var(--skin-kaak-muted);
|
||||
font-size: 10px;
|
||||
font-weight: 800;
|
||||
letter-spacing: .12em;
|
||||
font-weight: 700;
|
||||
letter-spacing: .08em;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.channel-title"] {
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-channel-sidebar.channel-title"],
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.member-title"] {
|
||||
margin: 0;
|
||||
color: var(--skin-kaak-text);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.channels"] {
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-channel-sidebar.channels"] {
|
||||
display: grid;
|
||||
gap: 5px;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.channel-row"] {
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-channel-sidebar.channel-row"] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
gap: 9px;
|
||||
width: 100%;
|
||||
min-height: 44px;
|
||||
padding: 0 11px;
|
||||
min-height: 38px;
|
||||
padding: 0 9px;
|
||||
color: var(--skin-kaak-muted);
|
||||
border: 1px solid transparent;
|
||||
border-radius: 9px;
|
||||
border-radius: 7px;
|
||||
background: transparent;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.channel-row"]:hover,
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.channel-row"][aria-pressed="true"] {
|
||||
color: #f5f6ff;
|
||||
border-color: rgba(132, 149, 255, .28);
|
||||
background: var(--skin-kaak-accent-soft);
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-channel-sidebar.channel-row"]:hover,
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-channel-sidebar.channel-row"][aria-pressed="true"] {
|
||||
color: var(--skin-kaak-text);
|
||||
border-color: rgba(255, 255, 255, .055);
|
||||
background: rgba(255, 255, 255, .07);
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.channel-name"] {
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-channel-sidebar.channel-glyph"] {
|
||||
width: 16px;
|
||||
color: var(--skin-kaak-muted);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-channel-sidebar.channel-name"] {
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
@@ -905,65 +974,81 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.channel-count"] {
|
||||
color: var(--skin-kaak-muted);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.members"] {
|
||||
margin-top: 24px;
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid var(--skin-kaak-line);
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.member-title"] {
|
||||
margin: 0 4px 10px;
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-channel-sidebar.channel-count"] {
|
||||
color: var(--skin-kaak-muted);
|
||||
font-size: 10px;
|
||||
font-weight: 800;
|
||||
letter-spacing: .1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.member-list"] {
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.online-label"] {
|
||||
margin: 0 4px 9px;
|
||||
color: var(--skin-kaak-muted);
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
letter-spacing: .04em;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.member-list"] {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
gap: 2px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.member-row"] {
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.member-row-content"] {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
min-height: 34px;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-height: 36px;
|
||||
padding: 5px 9px;
|
||||
gap: 9px;
|
||||
padding: 5px 7px;
|
||||
color: var(--skin-kaak-text);
|
||||
border-radius: 8px;
|
||||
background: rgba(255, 255, 255, .025);
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.member-name"] {
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.member-row-content"]:hover {
|
||||
background: rgba(255, 255, 255, .055);
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.presence"] {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
flex: 0 0 8px;
|
||||
border-radius: 50%;
|
||||
background: #727579;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.member-row-content"][data-speaking="true"] [data-ws-plugin-part="kaak-members-sidebar.presence"] {
|
||||
background: var(--skin-kaak-green);
|
||||
box-shadow: 0 0 0 3px rgba(124, 201, 138, .15);
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.member-row-content"][data-self="true"] [data-ws-plugin-part="kaak-members-sidebar.member-name"] {
|
||||
color: var(--skin-kaak-accent);
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.member-name"] {
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.speaking-indicator"] {
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-members-sidebar.speaking-indicator"] {
|
||||
color: var(--skin-kaak-green);
|
||||
font-size: 10px;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-room-sidebar.channel-row"]:focus-visible {
|
||||
[data-ws-page="voice"] [data-ws-plugin-part="kaak-channel-sidebar.channel-row"]:focus-visible {
|
||||
outline: 2px solid var(--skin-kaak-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@media (max-width: 980px) {
|
||||
[data-ws-page="voice"] .ws-plugin-component[data-ws-plugin-part="kaak-room-sidebar"] {
|
||||
@media (max-width: 1159px) {
|
||||
[data-ws-page="voice"] .ws-plugin-component[data-ws-plugin-part="kaak-channel-sidebar"],
|
||||
[data-ws-page="voice"] .ws-plugin-component[data-ws-plugin-part="kaak-members-sidebar"] {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
"scripts": {
|
||||
"dev": "tsx src/index.ts",
|
||||
"build": "tsc",
|
||||
"test": "node --import tsx --test src/admin/skin-registry.test.ts web/test/admin-api.integration.test.ts web/test/admin-view.test.mjs web/src/services/admin-api.test.ts src/security/open-target-policy.test.ts src/server/visitor-count.test.ts src/server/voice-protocol.test.ts src/server/teamspeak-resolver.test.ts src/server/ts-client.test.ts src/server/join-ticket.test.ts src/server/identity-lease.test.ts src/server/session-manager.test.ts src/server/directory-sync.test.ts src/server/session-events.test.ts src/server/reconnect-policy.test.ts src/server/voice-commands.test.ts src/server/voice-bridge.test.ts src/server/session-audio.test.ts src/server/voice-bridge.integration.test.ts src/server/webrtc-audio.test.ts src/server/webrtc-config.test.ts src/server/audio-stats.test.ts src/server/directory-view.test.ts src/server/member-avatars.test.ts src/server/screen-share-coordinator.test.ts src/shared/client-commands.test.ts src/shared/skin-layout.test.ts src/shared/skin-plugin.test.ts src/shared/server-messages.test.ts src/shared/webrtc.test.ts scripts/docker-healthcheck.test.mjs web/test/voice-session.test.mjs web/test/audio-controls.test.mjs web/test/connection-dialogs.test.mjs web/test/voice-performance.test.mjs web/test/screen-share.test.ts web/test/screen-share-ui.test.mjs web/test/android-gateway.test.ts web/src/services/skin-catalog.test.ts web/src/services/skin-plugin-runtime.test.ts web/src/services/member-menu-placement.test.ts web/src/services/mobile-viewport.test.ts web/src/services/mobile-away.test.ts web/src/services/screen-wake-lock.test.ts web/src/services/microphone-start.test.ts web/src/services/skin-pack.test.ts web/src/services/skin-layout-storage.test.ts web/src/services/skin-layout-geometry.test.ts web/src/services/skin-layout-focus.test.ts web/test/skin-layout-runtime.test.mjs web/src/services/identity-import.test.ts web/test/identity-dialog.test.mjs web/test/skin-lifecycle.test.mjs web/src/services/local-persistence.test.ts web/src/services/quick-servers.test.ts src/server/teamspeak-alias.test.ts src/server/teamspeak-alias-integration.test.ts web/src/services/teamspeak-target.test.ts web/src/services/skin-extension-sandbox.test.ts web/src/services/skin-extension-wasm-policy.test.ts web/src/services/skin-extension-wasm-sandbox.test.ts web/src/services/skin-wasm-interpreter.test.ts",
|
||||
"test": "node --import tsx --test src/admin/skin-registry.test.ts web/test/admin-api.integration.test.ts web/test/admin-view.test.mjs web/src/services/admin-api.test.ts src/security/open-target-policy.test.ts src/server/visitor-count.test.ts src/server/voice-protocol.test.ts src/server/teamspeak-resolver.test.ts src/server/ts-client.test.ts src/server/join-ticket.test.ts src/server/identity-lease.test.ts src/server/session-manager.test.ts src/server/directory-sync.test.ts src/server/session-events.test.ts src/server/reconnect-policy.test.ts src/server/voice-commands.test.ts src/server/voice-bridge.test.ts src/server/session-audio.test.ts src/server/voice-bridge.integration.test.ts src/server/webrtc-audio.test.ts src/server/webrtc-config.test.ts src/server/audio-stats.test.ts src/server/directory-view.test.ts src/server/member-avatars.test.ts src/server/screen-share-coordinator.test.ts src/shared/client-commands.test.ts src/shared/skin-layout.test.ts src/shared/skin-plugin.test.ts src/shared/server-messages.test.ts src/shared/webrtc.test.ts scripts/docker-healthcheck.test.mjs web/test/voice-session.test.mjs web/test/audio-controls.test.mjs web/test/connection-dialogs.test.mjs web/test/voice-performance.test.mjs web/test/screen-share.test.ts web/test/screen-share-ui.test.mjs web/test/android-gateway.test.ts web/src/services/skin-catalog.test.ts web/src/services/skin-plugin-runtime.test.ts web/src/services/skin-extension-ui.test.ts web/src/services/member-menu-placement.test.ts web/src/services/mobile-viewport.test.ts web/src/services/mobile-away.test.ts web/src/services/screen-wake-lock.test.ts web/src/services/microphone-start.test.ts web/src/services/skin-pack.test.ts web/src/services/skin-layout-storage.test.ts web/src/services/skin-layout-geometry.test.ts web/src/services/skin-layout-focus.test.ts web/test/skin-layout-runtime.test.mjs web/src/services/identity-import.test.ts web/test/identity-dialog.test.mjs web/test/skin-lifecycle.test.mjs web/src/services/local-persistence.test.ts web/src/services/quick-servers.test.ts src/server/teamspeak-alias.test.ts src/server/teamspeak-alias-integration.test.ts web/src/services/teamspeak-target.test.ts web/src/services/skin-extension-sandbox.test.ts web/src/services/skin-extension-wasm-policy.test.ts web/src/services/skin-extension-wasm-sandbox.test.ts web/src/services/skin-wasm-interpreter.test.ts",
|
||||
"verify": "npm test && npm run build && npm run web:build",
|
||||
"start": "node dist/index.js",
|
||||
"web:dev": "cd web && npx vite --host",
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import {
|
||||
parseSkinPluginDocument,
|
||||
type SkinPluginAction,
|
||||
type SkinPluginDocument,
|
||||
type SkinPluginNode,
|
||||
} from "./skin-plugin.js";
|
||||
|
||||
export const SKIN_EXTENSION_UI_OUTPUT_LIMIT_BYTES = 16 * 1024;
|
||||
|
||||
const LOCAL_UI_ACTIONS = new Set<SkinPluginAction>(["ui.setState", "ui.toggleState"]);
|
||||
|
||||
export class SkinExtensionUiOutputError extends Error {
|
||||
constructor(readonly code: string, message: string) {
|
||||
super(message);
|
||||
this.name = "SkinExtensionUiOutputError";
|
||||
}
|
||||
}
|
||||
|
||||
function fail(code: string, message: string): never {
|
||||
throw new SkinExtensionUiOutputError(code, message);
|
||||
}
|
||||
|
||||
function assertLocalUiNode(node: SkinPluginNode): void {
|
||||
if (node.widget) fail("SKIN_EXTENSION_UI_WIDGET_UNSUPPORTED", "Extension UI output cannot embed privileged host widgets.");
|
||||
node.children?.forEach(assertLocalUiNode);
|
||||
}
|
||||
|
||||
/** Parses Wasm output into the existing safe component tree, with no added host capabilities. */
|
||||
export function parseSkinExtensionUiOutput(source: string): SkinPluginDocument {
|
||||
if (typeof source !== "string" || !source.length) {
|
||||
fail("SKIN_EXTENSION_UI_OUTPUT_INVALID", "Extension UI output must be a non-empty JSON string.");
|
||||
}
|
||||
if (new TextEncoder().encode(source).byteLength > SKIN_EXTENSION_UI_OUTPUT_LIMIT_BYTES) {
|
||||
fail("SKIN_EXTENSION_UI_OUTPUT_SIZE", "Extension UI output exceeds the 16 KiB UTF-8 limit.");
|
||||
}
|
||||
|
||||
let input: unknown;
|
||||
try { input = JSON.parse(source); }
|
||||
catch { fail("SKIN_EXTENSION_UI_OUTPUT_JSON", "Extension UI output must contain valid JSON."); }
|
||||
|
||||
let document: SkinPluginDocument;
|
||||
try { document = parseSkinPluginDocument(input); }
|
||||
catch { fail("SKIN_EXTENSION_UI_OUTPUT_SCHEMA", "Extension UI output does not match the safe component schema."); }
|
||||
if (document.schemaVersion !== 3) {
|
||||
fail("SKIN_EXTENSION_UI_SCHEMA_UNSUPPORTED", "Extension UI output requires components schema version 3.");
|
||||
}
|
||||
|
||||
for (const component of document.components) {
|
||||
if (component.page === "demo" || component.mode === "surface" || component.permissions.length > 0) {
|
||||
fail("SKIN_EXTENSION_UI_CAPABILITY_UNSUPPORTED", "Extension UI output cannot request skin permissions or replace a page.");
|
||||
}
|
||||
if (Object.values(component.actions).some((action) => !LOCAL_UI_ACTIONS.has(action.type))) {
|
||||
fail("SKIN_EXTENSION_UI_ACTION_UNSUPPORTED", "Extension UI output can only update its own local UI state.");
|
||||
}
|
||||
assertLocalUiNode(component.root);
|
||||
}
|
||||
return document;
|
||||
}
|
||||
@@ -132,14 +132,18 @@ test("host widget references stay allowlisted and cannot be used on the demo pag
|
||||
errorCode(() => parseSkinPluginDocument(demoWidget), "SKIN_PLUGIN_WIDGET_INVALID");
|
||||
});
|
||||
|
||||
test("KAAK v3 example uses only validated public session data and an explicit join action", async () => {
|
||||
test("KAAK v3 example splits validated channel and member data by component", async () => {
|
||||
const source = await readFile(new URL("../../docs/examples/kaak-voice/components.json", import.meta.url), "utf8");
|
||||
const parsed = parseSkinPluginJson(source);
|
||||
const sidebar = parsed.components[0];
|
||||
assert.equal(sidebar.id, "kaak-room-sidebar");
|
||||
assert.deepEqual(sidebar.permissions, ["session.channels.read", "session.members.read", "session.channel.join"]);
|
||||
assert.equal(sidebar.actions["join-channel"].type, "voice.joinChannel");
|
||||
assert.equal(sidebar.root.children?.[1].children?.[0].repeat?.path, "session.channels");
|
||||
const channelSidebar = parsed.components.find((component) => component.id === "kaak-channel-sidebar");
|
||||
const memberSidebar = parsed.components.find((component) => component.id === "kaak-members-sidebar");
|
||||
assert.ok(channelSidebar);
|
||||
assert.ok(memberSidebar);
|
||||
assert.deepEqual(channelSidebar.permissions, ["session.channels.read", "session.channel.join"]);
|
||||
assert.equal(channelSidebar.actions["join-channel"].type, "voice.joinChannel");
|
||||
assert.equal(channelSidebar.root.children?.[1].children?.[0].repeat?.path, "session.channels");
|
||||
assert.deepEqual(memberSidebar.permissions, ["session.members.read"]);
|
||||
assert.equal(memberSidebar.root.children?.[2].children?.[0].repeat?.path, "session.members");
|
||||
});
|
||||
|
||||
test("skin plugin binds form controls only to declared local state", () => {
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
type SkinPluginHostWidget,
|
||||
type SkinPluginNode,
|
||||
} from "../../../src/shared/skin-plugin.js";
|
||||
import { parseSkinExtensionUiOutput } from "../../../src/shared/skin-extension-ui.js";
|
||||
import { approveSkinPluginComponents, getMissingSkinPluginApprovals, isSkinPluginComponentApproved, revokeSkinPluginApprovals } from "../services/skin-plugin-approval.js";
|
||||
|
||||
type Scalar = string | number | boolean;
|
||||
@@ -28,6 +29,7 @@ export default defineComponent({
|
||||
skinId: { type: String, required: true },
|
||||
skinVersion: { type: String, required: true },
|
||||
document: { type: Object as PropType<SkinPluginDocument>, required: true },
|
||||
extensionOutput: { type: String, default: null },
|
||||
page: { type: String as PropType<"home" | "voice" | "demo">, required: true },
|
||||
data: { type: Object as PropType<SafeContext>, required: true },
|
||||
assets: { type: Object as PropType<Record<string, Blob>>, required: true },
|
||||
@@ -46,8 +48,20 @@ export default defineComponent({
|
||||
const stateByComponent = reactive<Record<string, Record<string, Scalar>>>({});
|
||||
const objectUrls = new Map<string, string>();
|
||||
const validatedDocument = computed(() => {
|
||||
try { return parseSkinPluginDocument(props.document); }
|
||||
let document: SkinPluginDocument;
|
||||
try { document = parseSkinPluginDocument(props.document); }
|
||||
catch { return { schemaVersion: 2 as const, components: [] }; }
|
||||
if (!props.extensionOutput || document.schemaVersion !== 3) return document;
|
||||
try {
|
||||
const extensionDocument = parseSkinExtensionUiOutput(props.extensionOutput);
|
||||
return parseSkinPluginDocument({
|
||||
schemaVersion: 3,
|
||||
components: [...document.components, ...extensionDocument.components],
|
||||
});
|
||||
} catch {
|
||||
// Dynamic output is optional; an invalid or colliding result leaves the package UI intact.
|
||||
return document;
|
||||
}
|
||||
});
|
||||
const matchingComponents = computed(() => validatedDocument.value.components.filter((component) => component.page === props.page));
|
||||
const pendingApproval = computed(() => {
|
||||
@@ -66,7 +80,7 @@ export default defineComponent({
|
||||
const renderedComponents = computed(() => activeComponents.value.filter((component) =>
|
||||
component.mode !== "surface" || component !== surfaceCandidate.value || !surfaceSuppressed.value));
|
||||
|
||||
watch(() => [props.skinId, props.skinVersion, props.document, props.page], () => {
|
||||
watch(() => [props.skinId, props.skinVersion, props.document, props.extensionOutput, props.page], () => {
|
||||
denied.value = false;
|
||||
surfaceSuppressed.value = false;
|
||||
refresh.value += 1;
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
import { createSSRApp } from "vue";
|
||||
import { renderToString } from "@vue/server-renderer";
|
||||
import type { SkinPluginDocument } from "../../../src/shared/skin-plugin.js";
|
||||
import {
|
||||
parseSkinExtensionUiOutput,
|
||||
SKIN_EXTENSION_UI_OUTPUT_LIMIT_BYTES,
|
||||
SkinExtensionUiOutputError,
|
||||
} from "../../../src/shared/skin-extension-ui.js";
|
||||
import SkinPluginOutlet from "../components/SkinPluginOutlet.js";
|
||||
|
||||
function outputDocument(componentId = "runtime-ui", root?: Record<string, unknown>, permissions: string[] = [], actions: Record<string, unknown> = {}, state?: Record<string, unknown>): string {
|
||||
return JSON.stringify({
|
||||
schemaVersion: 3,
|
||||
components: [{
|
||||
id: componentId,
|
||||
name: "Runtime UI",
|
||||
page: "voice",
|
||||
accessibleName: "Runtime UI",
|
||||
permissions,
|
||||
actions,
|
||||
...(state ? { state } : {}),
|
||||
root: root ?? { tag: "section", children: [{ text: "Generated by Wasm" }] },
|
||||
}],
|
||||
});
|
||||
}
|
||||
|
||||
function expectOutputError(source: string, code: string): void {
|
||||
assert.throws(() => parseSkinExtensionUiOutput(source), (error: unknown) =>
|
||||
error instanceof SkinExtensionUiOutputError && error.code === code);
|
||||
}
|
||||
|
||||
test("Wasm UI output uses the v3 schema and supports local-only interaction", () => {
|
||||
const document = parseSkinExtensionUiOutput(outputDocument("runtime-ui", {
|
||||
tag: "section",
|
||||
children: [
|
||||
{ tag: "button", attributes: { type: "button" }, events: { click: "toggle" }, children: [{ text: "Toggle" }] },
|
||||
{ tag: "p", when: { path: "state.open", equals: true }, children: [{ text: "Expanded" }] },
|
||||
],
|
||||
}, [], { toggle: { type: "ui.toggleState", args: { key: "open" } } }, { open: false }));
|
||||
|
||||
assert.equal(document.schemaVersion, 3);
|
||||
assert.equal(document.components[0].actions.toggle.type, "ui.toggleState");
|
||||
});
|
||||
|
||||
test("Wasm UI output rejects malformed, oversized, legacy, and capability-bearing documents", () => {
|
||||
expectOutputError("{", "SKIN_EXTENSION_UI_OUTPUT_JSON");
|
||||
expectOutputError(" ".repeat(SKIN_EXTENSION_UI_OUTPUT_LIMIT_BYTES + 1), "SKIN_EXTENSION_UI_OUTPUT_SIZE");
|
||||
expectOutputError(JSON.stringify({ schemaVersion: 2, components: [{
|
||||
id: "runtime-ui", name: "Runtime UI", page: "voice", accessibleName: "Runtime UI", permissions: [], actions: {}, root: { tag: "section" },
|
||||
}] }), "SKIN_EXTENSION_UI_SCHEMA_UNSUPPORTED");
|
||||
expectOutputError(outputDocument("runtime-ui", undefined, ["session.status.read"]), "SKIN_EXTENSION_UI_CAPABILITY_UNSUPPORTED");
|
||||
expectOutputError(outputDocument("runtime-ui", undefined, [], { disconnect: { type: "voice.disconnect", args: {} } }), "SKIN_EXTENSION_UI_OUTPUT_SCHEMA");
|
||||
expectOutputError(outputDocument("runtime-ui", { widget: "voice.audio-controls" }), "SKIN_EXTENSION_UI_WIDGET_UNSUPPORTED");
|
||||
expectOutputError(outputDocument("runtime-ui", { tag: "p", text: "{{session.status.channelName}}" }), "SKIN_EXTENSION_UI_OUTPUT_SCHEMA");
|
||||
});
|
||||
|
||||
test("SkinPluginOutlet renders validated dynamic output and preserves package UI on collisions", async () => {
|
||||
const document: SkinPluginDocument = {
|
||||
schemaVersion: 3,
|
||||
components: [{
|
||||
id: "base-ui",
|
||||
name: "Base UI",
|
||||
page: "voice",
|
||||
accessibleName: "Base UI",
|
||||
permissions: [],
|
||||
actions: {},
|
||||
root: { tag: "p", children: [{ text: "Package UI" }] },
|
||||
}],
|
||||
};
|
||||
const props = {
|
||||
skinId: "community.test",
|
||||
skinVersion: "1.0.0",
|
||||
document,
|
||||
page: "voice" as const,
|
||||
data: {},
|
||||
assets: {},
|
||||
actions: {},
|
||||
};
|
||||
|
||||
const html = await renderToString(createSSRApp(SkinPluginOutlet, {
|
||||
...props,
|
||||
extensionOutput: outputDocument("runtime-ui"),
|
||||
}));
|
||||
assert.match(html, /data-ws-plugin-component="base-ui"/);
|
||||
assert.match(html, /data-ws-plugin-component="runtime-ui"/);
|
||||
assert.match(html, /Generated by Wasm/);
|
||||
|
||||
const collisionHtml = await renderToString(createSSRApp(SkinPluginOutlet, {
|
||||
...props,
|
||||
extensionOutput: outputDocument("base-ui"),
|
||||
}));
|
||||
assert.match(collisionHtml, /data-ws-plugin-component="base-ui"/);
|
||||
assert.doesNotMatch(collisionHtml, /Generated by Wasm/);
|
||||
assert.match(collisionHtml, /Package UI/);
|
||||
});
|
||||
@@ -1,3 +1,5 @@
|
||||
import { SKIN_EXTENSION_UI_OUTPUT_LIMIT_BYTES } from "../../../src/shared/skin-extension-ui.js";
|
||||
|
||||
export const SKIN_EXTENSION_WASM_SOURCE_LIMIT = 256 * 1024;
|
||||
export const SKIN_EXTENSION_WASM_MEMORY_LIMIT_PAGES = 64;
|
||||
export const SKIN_EXTENSION_WASM_PAGE_BYTES = 64 * 1024;
|
||||
@@ -6,7 +8,7 @@ export const SKIN_EXTENSION_WASM_EXECUTION_LIMIT_MS = 100;
|
||||
export const SKIN_EXTENSION_WASM_MESSAGE_LIMIT = 32 * 1024;
|
||||
export const SKIN_EXTENSION_WASM_STATUS_READ_LIMIT = 10;
|
||||
export const SKIN_EXTENSION_WASM_STATUS_BYTES_LIMIT = 512;
|
||||
export const SKIN_EXTENSION_WASM_UI_OUTPUT_LIMIT_BYTES = 16 * 1024;
|
||||
export const SKIN_EXTENSION_WASM_UI_OUTPUT_LIMIT_BYTES = SKIN_EXTENSION_UI_OUTPUT_LIMIT_BYTES;
|
||||
export const SKIN_EXTENSION_WASM_FUEL_LIMIT = 10_000_000n;
|
||||
export const SKIN_EXTENSION_WASM_INTERPRETER_MEMORY_LIMIT_BYTES = 64 * 1024 * 1024;
|
||||
export const SKIN_EXTENSION_WASM_FUNCTION_LIMIT = 128;
|
||||
|
||||
@@ -368,8 +368,9 @@ test("the distributable KAAK v3 package validates end to end", async () => {
|
||||
const skin = await importSkinPack(file);
|
||||
assert.equal(skin.id, "community.kaak-voice");
|
||||
assert.equal(skin.schemaVersion, 3);
|
||||
assert.equal(skin.pluginData?.components[0].id, "kaak-room-sidebar");
|
||||
assert.ok(skin.css.includes('data-ws-plugin-part="kaak-room-sidebar.channel-row"'));
|
||||
assert.deepEqual(skin.pluginData?.components.map((component) => component.id), ["kaak-channel-sidebar", "kaak-members-sidebar"]);
|
||||
assert.ok(skin.css.includes('data-ws-plugin-part="kaak-channel-sidebar.channel-row"'));
|
||||
assert.ok(skin.css.includes('data-ws-plugin-part="kaak-members-sidebar.member-row-content"'));
|
||||
});
|
||||
|
||||
test("the full voice surface example packages home, voice, and host-owned controls", async () => {
|
||||
|
||||
Reference in new issue
Block a user