@celljs/ta 4.10.0 → 4.12.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/README.en.md +3 -1
- package/README.md +3 -1
- package/dist/cli.mjs +1675 -51
- package/dist/gateway.mjs +167 -5
- package/dist/pi/CHANGELOG.md +27 -0
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-agents/extension/index.mjs +359 -155
- package/dist/pi/packages/ta-agents/lib/acp-agent.js +30 -10
- package/dist/pi/packages/ta-agents/lib/acp-protocol.d.ts +5 -0
- package/dist/pi/packages/ta-agents/lib/agent-catalog.d.ts +2 -2
- package/dist/pi/packages/ta-agents/lib/agent-catalog.js +4 -4
- package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +9 -0
- package/dist/pi/packages/ta-agents/lib/agent-prompt.js +25 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +71 -1
- package/dist/pi/packages/ta-agents/lib/agent-session.js +177 -17
- package/dist/pi/packages/ta-agents/lib/agent-streamer.js +23 -2
- package/dist/pi/packages/ta-agents/lib/agent-tool.js +4 -3
- package/dist/pi/packages/ta-agents/lib/agent-turn.d.ts +7 -1
- package/dist/pi/packages/ta-agents/lib/agent-turn.js +26 -3
- package/dist/pi/packages/ta-agents/lib/extension.js +7 -0
- package/dist/pi/packages/ta-agents/lib/texts.d.ts +12 -0
- package/dist/pi/packages/ta-agents/lib/texts.js +12 -0
- package/dist/pi/packages/ta-agents/package.json +1 -1
- package/dist/pi/packages/ta-bots/extension/index.mjs +31 -299
- package/dist/pi/packages/ta-bots/host/index.mjs +143 -1
- package/dist/pi/packages/ta-bots/lib/bots-protocol.d.ts +2 -0
- package/dist/pi/packages/ta-bots/lib/bots-protocol.js +3 -1
- package/dist/pi/packages/ta-bots/lib/bots-view.js +24 -12
- package/dist/pi/packages/ta-bots/lib/composer.js +1 -0
- package/dist/pi/packages/ta-bots/lib/extension.js +10 -17
- package/dist/pi/packages/ta-bots/lib/i18n.d.ts +1 -0
- package/dist/pi/packages/ta-bots/lib/i18n.js +2 -0
- package/dist/pi/packages/ta-bots/lib/index.js +2 -0
- package/dist/pi/packages/ta-bots/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-bots/lib/style.js +1 -0
- package/dist/pi/packages/ta-bots/lib/text-util.js +8 -1
- package/dist/pi/packages/ta-bots/lib/tool-line.d.ts +8 -0
- package/dist/pi/packages/ta-bots/lib/tool-line.js +19 -0
- package/dist/pi/packages/ta-bots/package.json +1 -1
- package/dist/pi/packages/ta-bots/web/index.js +47 -16
- package/dist/pi/packages/ta-changes/extension/index.mjs +23 -13
- package/dist/pi/packages/ta-changes/lib/card.js +18 -4
- package/dist/pi/packages/ta-changes/lib/changes-protocol.d.ts +0 -4
- package/dist/pi/packages/ta-changes/lib/changes-protocol.js +1 -5
- package/dist/pi/packages/ta-changes/lib/extension.js +5 -13
- package/dist/pi/packages/ta-changes/package.json +1 -1
- package/dist/pi/packages/ta-changes/web/index.js +16 -3
- package/dist/pi/packages/ta-channels/README.en.md +4 -3
- package/dist/pi/packages/ta-channels/README.md +4 -3
- package/dist/pi/packages/ta-channels/extension/index.mjs +350 -28
- package/dist/pi/packages/ta-channels/host/index.mjs +588 -43
- package/dist/pi/packages/ta-channels/lib/agent-cards.d.ts +19 -0
- package/dist/pi/packages/ta-channels/lib/agent-cards.js +58 -0
- package/dist/pi/packages/ta-channels/lib/agent-menu.d.ts +2 -2
- package/dist/pi/packages/ta-channels/lib/agent-menu.js +20 -6
- package/dist/pi/packages/ta-channels/lib/card.d.ts +27 -0
- package/dist/pi/packages/ta-channels/lib/card.js +178 -0
- package/dist/pi/packages/ta-channels/lib/channels-model.d.ts +65 -13
- package/dist/pi/packages/ta-channels/lib/channels-model.js +15 -6
- package/dist/pi/packages/ta-channels/lib/channels-util.d.ts +31 -2
- package/dist/pi/packages/ta-channels/lib/channels-util.js +100 -6
- package/dist/pi/packages/ta-channels/lib/channels.d.ts +28 -18
- package/dist/pi/packages/ta-channels/lib/channels.js +65 -65
- package/dist/pi/packages/ta-channels/lib/create.js +3 -1
- package/dist/pi/packages/ta-channels/lib/extension.d.ts +8 -0
- package/dist/pi/packages/ta-channels/lib/extension.js +104 -18
- package/dist/pi/packages/ta-channels/lib/faces.d.ts +2 -0
- package/dist/pi/packages/ta-channels/lib/faces.js +6 -0
- package/dist/pi/packages/ta-channels/lib/handoff-view.d.ts +19 -0
- package/dist/pi/packages/ta-channels/lib/handoff-view.js +113 -0
- package/dist/pi/packages/ta-channels/lib/handoff.d.ts +67 -0
- package/dist/pi/packages/ta-channels/lib/handoff.js +114 -0
- package/dist/pi/packages/ta-channels/lib/host.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/host.js +1 -1
- package/dist/pi/packages/ta-channels/lib/i18n.d.ts +45 -0
- package/dist/pi/packages/ta-channels/lib/i18n.js +90 -0
- package/dist/pi/packages/ta-channels/lib/index.js +10 -1
- package/dist/pi/packages/ta-channels/lib/member-tools.d.ts +23 -0
- package/dist/pi/packages/ta-channels/lib/member-tools.js +56 -0
- package/dist/pi/packages/ta-channels/lib/members.js +6 -2
- package/dist/pi/packages/ta-channels/lib/notice.d.ts +25 -0
- package/dist/pi/packages/ta-channels/lib/notice.js +101 -0
- package/dist/pi/packages/ta-channels/lib/room.js +13 -2
- package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +1 -6
- package/dist/pi/packages/ta-channels/lib/sidebar.js +160 -79
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +72 -4
- package/dist/pi/packages/ta-channels/lib/team.d.ts +58 -10
- package/dist/pi/packages/ta-channels/lib/team.js +159 -38
- package/dist/pi/packages/ta-channels/lib/tool-lines.d.ts +22 -0
- package/dist/pi/packages/ta-channels/lib/tool-lines.js +113 -0
- package/dist/pi/packages/ta-channels/lib/views.d.ts +33 -16
- package/dist/pi/packages/ta-channels/lib/views.js +79 -31
- package/dist/pi/packages/ta-channels/package.json +2 -1
- package/dist/pi/packages/ta-channels/web/index.js +1551 -308
- package/dist/pi/packages/ta-computer-use/package.json +6 -1
- package/dist/pi/packages/ta-cron/README.en.md +4 -2
- package/dist/pi/packages/ta-cron/README.md +4 -2
- package/dist/pi/packages/ta-cron/extension/index.mjs +416 -44
- package/dist/pi/packages/ta-cron/host/index.mjs +24 -3
- package/dist/pi/packages/ta-cron/lib/chat-task.d.ts +48 -0
- package/dist/pi/packages/ta-cron/lib/chat-task.js +133 -0
- package/dist/pi/packages/ta-cron/lib/commands.d.ts +2 -1
- package/dist/pi/packages/ta-cron/lib/commands.js +10 -4
- package/dist/pi/packages/ta-cron/lib/composer.d.ts +11 -0
- package/dist/pi/packages/ta-cron/lib/composer.js +58 -0
- package/dist/pi/packages/ta-cron/lib/cron-protocol.d.ts +10 -3
- package/dist/pi/packages/ta-cron/lib/cron-protocol.js +6 -3
- package/dist/pi/packages/ta-cron/lib/editor.js +5 -3
- package/dist/pi/packages/ta-cron/lib/extension.d.ts +2 -0
- package/dist/pi/packages/ta-cron/lib/extension.js +33 -13
- package/dist/pi/packages/ta-cron/lib/i18n.d.ts +18 -0
- package/dist/pi/packages/ta-cron/lib/i18n.js +36 -0
- package/dist/pi/packages/ta-cron/lib/index.js +4 -0
- package/dist/pi/packages/ta-cron/lib/page.d.ts +5 -1
- package/dist/pi/packages/ta-cron/lib/page.js +12 -0
- package/dist/pi/packages/ta-cron/lib/react.d.ts +3 -0
- package/dist/pi/packages/ta-cron/lib/react.js +8 -0
- package/dist/pi/packages/ta-cron/lib/scheduler.js +3 -2
- package/dist/pi/packages/ta-cron/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-cron/lib/style.js +11 -13
- package/dist/pi/packages/ta-cron/lib/task-util.d.ts +2 -0
- package/dist/pi/packages/ta-cron/lib/task-util.js +20 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +6 -2
- package/dist/pi/packages/ta-cron/lib/tool-line.d.ts +9 -0
- package/dist/pi/packages/ta-cron/lib/tool-line.js +40 -0
- package/dist/pi/packages/ta-cron/lib/tool.d.ts +5 -1
- package/dist/pi/packages/ta-cron/lib/tool.js +6 -3
- package/dist/pi/packages/ta-cron/package.json +12 -1
- package/dist/pi/packages/ta-cron/web/index.js +661 -254
- package/dist/pi/packages/ta-extensions/README.en.md +1 -1
- package/dist/pi/packages/ta-extensions/README.md +1 -1
- package/dist/pi/packages/ta-extensions/host/index.mjs +3 -2
- package/dist/pi/packages/ta-extensions/lib/actions.d.ts +4 -0
- package/dist/pi/packages/ta-extensions/lib/actions.js +13 -4
- package/dist/pi/packages/ta-extensions/lib/extensions-util.d.ts +5 -0
- package/dist/pi/packages/ta-extensions/lib/extensions-util.js +10 -0
- package/dist/pi/packages/ta-extensions/lib/market-parts.js +8 -2
- package/dist/pi/packages/ta-extensions/lib/market-style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/market-style.js +4 -5
- package/dist/pi/packages/ta-extensions/lib/market-util.d.ts +2 -2
- package/dist/pi/packages/ta-extensions/lib/market-util.js +2 -2
- package/dist/pi/packages/ta-extensions/lib/page.js +12 -7
- package/dist/pi/packages/ta-extensions/lib/react.d.ts +3 -0
- package/dist/pi/packages/ta-extensions/lib/react.js +8 -0
- package/dist/pi/packages/ta-extensions/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/style.js +3 -2
- package/dist/pi/packages/ta-extensions/package.json +6 -1
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +20 -8
- package/dist/pi/packages/ta-extensions/web/index.js +191 -22
- package/dist/pi/packages/ta-games/README.en.md +47 -0
- package/dist/pi/packages/ta-games/README.md +47 -0
- package/dist/pi/packages/ta-games/host/index.mjs +65 -0
- package/dist/pi/packages/ta-games/lib/games-view.d.ts +16 -0
- package/dist/pi/packages/ta-games/lib/games-view.js +77 -0
- package/dist/pi/packages/ta-games/lib/host.d.ts +36 -0
- package/dist/pi/packages/ta-games/lib/host.js +83 -0
- package/dist/pi/packages/ta-games/lib/i18n.d.ts +35 -0
- package/dist/pi/packages/ta-games/lib/i18n.js +71 -0
- package/dist/pi/packages/ta-games/lib/ideas.d.ts +6 -0
- package/dist/pi/packages/ta-games/lib/ideas.js +62 -0
- package/dist/pi/packages/ta-games/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-games/lib/index.js +24 -0
- package/dist/pi/packages/ta-games/lib/make-game.d.ts +23 -0
- package/dist/pi/packages/ta-games/lib/make-game.js +67 -0
- package/dist/pi/packages/ta-games/lib/react.d.ts +11 -0
- package/dist/pi/packages/ta-games/lib/react.js +16 -0
- package/dist/pi/packages/ta-games/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-games/lib/style.js +33 -0
- package/dist/pi/packages/ta-games/package.json +60 -0
- package/dist/pi/packages/ta-games/skills/ta-game/SKILL.md +127 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/package.json +22 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/web.js +389 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/package.json +22 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/web.js +423 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/LICENSE.md +22 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/actions-and-utilities/SKILL.md +343 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/animations/SKILL.md +481 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/audio-and-sound/SKILL.md +453 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/SKILL.md +497 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/references/REFERENCE.md +128 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/curves-and-paths/SKILL.md +359 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/data-manager/SKILL.md +406 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/events-system/SKILL.md +497 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/filters-and-postfx/SKILL.md +449 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/SKILL.md +478 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/references/REFERENCE.md +76 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-setup-and-config/SKILL.md +485 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/geometry-and-math/SKILL.md +497 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/graphics-and-shapes/SKILL.md +473 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/groups-and-containers/SKILL.md +418 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/SKILL.md +500 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/references/REFERENCE.md +372 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/SKILL.md +474 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/references/REFERENCE.md +148 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/SKILL.md +499 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/references/REFERENCE.md +17 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-arcade/SKILL.md +468 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-matter/SKILL.md +499 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/render-textures/SKILL.md +441 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/scale-and-responsive/SKILL.md +371 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/SKILL.md +450 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/references/REFERENCE.md +78 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/SKILL.md +417 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/references/REFERENCE.md +160 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/text-and-bitmaptext/SKILL.md +460 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/tilemaps/SKILL.md +440 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/time-and-timers/SKILL.md +496 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/tweens/SKILL.md +414 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/v3-to-v4-migration/SKILL.md +430 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/SKILL.md +384 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/references/REFERENCE.md +69 -0
- package/dist/pi/packages/ta-games/web/index.js +431 -0
- package/dist/pi/packages/ta-glance/README.en.md +11 -0
- package/dist/pi/packages/ta-glance/README.md +11 -0
- package/dist/pi/packages/ta-glance/extension/index.mjs +67 -0
- package/dist/pi/packages/ta-glance/lib/card.d.ts +8 -0
- package/dist/pi/packages/ta-glance/lib/card.js +269 -0
- package/dist/pi/packages/ta-glance/lib/extension.d.ts +15 -0
- package/dist/pi/packages/ta-glance/lib/extension.js +24 -0
- package/dist/pi/packages/ta-glance/lib/glance-json.d.ts +9 -0
- package/dist/pi/packages/ta-glance/lib/glance-json.js +85 -0
- package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +7 -0
- package/dist/pi/packages/ta-glance/lib/glance-prompt.js +34 -0
- package/dist/pi/packages/ta-glance/lib/glance-protocol.d.ts +98 -0
- package/dist/pi/packages/ta-glance/lib/glance-protocol.js +8 -0
- package/dist/pi/packages/ta-glance/lib/glance-spec.d.ts +7 -0
- package/dist/pi/packages/ta-glance/lib/glance-spec.js +206 -0
- package/dist/pi/packages/ta-glance/lib/glance-util.d.ts +3 -0
- package/dist/pi/packages/ta-glance/lib/glance-util.js +12 -0
- package/dist/pi/packages/ta-glance/lib/i18n.d.ts +22 -0
- package/dist/pi/packages/ta-glance/lib/i18n.js +41 -0
- package/dist/pi/packages/ta-glance/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-glance/lib/index.js +22 -0
- package/dist/pi/packages/ta-glance/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-glance/lib/react.js +8 -0
- package/dist/pi/packages/ta-glance/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-glance/lib/style.js +241 -0
- package/dist/pi/packages/ta-glance/package.json +53 -0
- package/dist/pi/packages/ta-glance/web/index.js +1013 -0
- package/dist/pi/packages/ta-launcher/lib/actions.d.ts +4 -4
- package/dist/pi/packages/ta-launcher/lib/actions.js +7 -3
- package/dist/pi/packages/ta-launcher/lib/launcher-util.d.ts +7 -7
- package/dist/pi/packages/ta-launcher/lib/launcher-util.js +11 -8
- package/dist/pi/packages/ta-launcher/lib/launcher-view.js +13 -7
- package/dist/pi/packages/ta-launcher/lib/react.d.ts +3 -0
- package/dist/pi/packages/ta-launcher/lib/react.js +8 -0
- package/dist/pi/packages/ta-launcher/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-launcher/lib/style.js +6 -4
- package/dist/pi/packages/ta-launcher/package.json +1 -1
- package/dist/pi/packages/ta-launcher/web/index.js +34 -17
- package/dist/pi/packages/ta-manual/README.en.md +10 -0
- package/dist/pi/packages/ta-manual/README.md +10 -0
- package/dist/pi/packages/ta-manual/lib/i18n.d.ts +15 -0
- package/dist/pi/packages/ta-manual/lib/i18n.js +31 -0
- package/dist/pi/packages/ta-manual/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-manual/lib/index.js +24 -0
- package/dist/pi/packages/ta-manual/lib/manual-util.d.ts +18 -0
- package/dist/pi/packages/ta-manual/lib/manual-util.js +40 -0
- package/dist/pi/packages/ta-manual/lib/manual-view.d.ts +9 -0
- package/dist/pi/packages/ta-manual/lib/manual-view.js +81 -0
- package/dist/pi/packages/ta-manual/lib/pictures-a.d.ts +2 -0
- package/dist/pi/packages/ta-manual/lib/pictures-a.js +263 -0
- package/dist/pi/packages/ta-manual/lib/pictures-b.d.ts +2 -0
- package/dist/pi/packages/ta-manual/lib/pictures-b.js +216 -0
- package/dist/pi/packages/ta-manual/lib/pictures-c.d.ts +2 -0
- package/dist/pi/packages/ta-manual/lib/pictures-c.js +53 -0
- package/dist/pi/packages/ta-manual/lib/pictures.d.ts +9 -0
- package/dist/pi/packages/ta-manual/lib/pictures.js +17 -0
- package/dist/pi/packages/ta-manual/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-manual/lib/react.js +8 -0
- package/dist/pi/packages/ta-manual/lib/scene.d.ts +68 -0
- package/dist/pi/packages/ta-manual/lib/scene.js +115 -0
- package/dist/pi/packages/ta-manual/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-manual/lib/style.js +47 -0
- package/dist/pi/packages/ta-manual/lib/topics.d.ts +43 -0
- package/dist/pi/packages/ta-manual/lib/topics.js +388 -0
- package/dist/pi/packages/ta-manual/package.json +54 -0
- package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +130 -0
- package/dist/pi/packages/ta-manual/web/index.js +2408 -0
- package/dist/pi/packages/ta-notify/README.en.md +29 -0
- package/dist/pi/packages/ta-notify/README.md +29 -0
- package/dist/pi/packages/ta-notify/extension/index.mjs +259 -0
- package/dist/pi/packages/ta-notify/host/index.mjs +163 -0
- package/dist/pi/packages/ta-notify/lib/ask-card.d.ts +9 -0
- package/dist/pi/packages/ta-notify/lib/ask-card.js +40 -0
- package/dist/pi/packages/ta-notify/lib/extension.d.ts +24 -0
- package/dist/pi/packages/ta-notify/lib/extension.js +102 -0
- package/dist/pi/packages/ta-notify/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-notify/lib/host.js +9 -0
- package/dist/pi/packages/ta-notify/lib/i18n.d.ts +31 -0
- package/dist/pi/packages/ta-notify/lib/i18n.js +63 -0
- package/dist/pi/packages/ta-notify/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-notify/lib/index.js +29 -0
- package/dist/pi/packages/ta-notify/lib/notify-protocol.d.ts +74 -0
- package/dist/pi/packages/ta-notify/lib/notify-protocol.js +23 -0
- package/dist/pi/packages/ta-notify/lib/notify-service.d.ts +21 -0
- package/dist/pi/packages/ta-notify/lib/notify-service.js +75 -0
- package/dist/pi/packages/ta-notify/lib/notify-util.d.ts +39 -0
- package/dist/pi/packages/ta-notify/lib/notify-util.js +119 -0
- package/dist/pi/packages/ta-notify/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-notify/lib/react.js +8 -0
- package/dist/pi/packages/ta-notify/lib/server-texts.d.ts +9 -0
- package/dist/pi/packages/ta-notify/lib/server-texts.js +22 -0
- package/dist/pi/packages/ta-notify/lib/settings.d.ts +8 -0
- package/dist/pi/packages/ta-notify/lib/settings.js +85 -0
- package/dist/pi/packages/ta-notify/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-notify/lib/style.js +29 -0
- package/dist/pi/packages/ta-notify/lib/tool-line.d.ts +9 -0
- package/dist/pi/packages/ta-notify/lib/tool-line.js +20 -0
- package/dist/pi/packages/ta-notify/lib/tool.d.ts +37 -0
- package/dist/pi/packages/ta-notify/lib/tool.js +46 -0
- package/dist/pi/packages/ta-notify/lib/watcher.d.ts +15 -0
- package/dist/pi/packages/ta-notify/lib/watcher.js +81 -0
- package/dist/pi/packages/ta-notify/package.json +55 -0
- package/dist/pi/packages/ta-notify/web/index.js +436 -0
- package/dist/pi/packages/ta-recall/README.en.md +19 -0
- package/dist/pi/packages/ta-recall/README.md +19 -0
- package/dist/pi/packages/ta-recall/extension/index.mjs +615 -0
- package/dist/pi/packages/ta-recall/host/index.mjs +820 -0
- package/dist/pi/packages/ta-recall/lib/brief-card.d.ts +21 -0
- package/dist/pi/packages/ta-recall/lib/brief-card.js +67 -0
- package/dist/pi/packages/ta-recall/lib/brief-home.d.ts +49 -0
- package/dist/pi/packages/ta-recall/lib/brief-home.js +143 -0
- package/dist/pi/packages/ta-recall/lib/brief-seen.d.ts +9 -0
- package/dist/pi/packages/ta-recall/lib/brief-seen.js +26 -0
- package/dist/pi/packages/ta-recall/lib/brief-util.d.ts +64 -0
- package/dist/pi/packages/ta-recall/lib/brief-util.js +179 -0
- package/dist/pi/packages/ta-recall/lib/chat-icons.d.ts +8 -0
- package/dist/pi/packages/ta-recall/lib/chat-icons.js +56 -0
- package/dist/pi/packages/ta-recall/lib/composer.d.ts +7 -0
- package/dist/pi/packages/ta-recall/lib/composer.js +38 -0
- package/dist/pi/packages/ta-recall/lib/conversation-index.d.ts +25 -0
- package/dist/pi/packages/ta-recall/lib/conversation-index.js +72 -0
- package/dist/pi/packages/ta-recall/lib/conversation-util.d.ts +16 -0
- package/dist/pi/packages/ta-recall/lib/conversation-util.js +109 -0
- package/dist/pi/packages/ta-recall/lib/conversations.d.ts +11 -0
- package/dist/pi/packages/ta-recall/lib/conversations.js +52 -0
- package/dist/pi/packages/ta-recall/lib/extension.d.ts +24 -0
- package/dist/pi/packages/ta-recall/lib/extension.js +132 -0
- package/dist/pi/packages/ta-recall/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-recall/lib/host.js +11 -0
- package/dist/pi/packages/ta-recall/lib/i18n.d.ts +41 -0
- package/dist/pi/packages/ta-recall/lib/i18n.js +83 -0
- package/dist/pi/packages/ta-recall/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-recall/lib/index.js +45 -0
- package/dist/pi/packages/ta-recall/lib/react.d.ts +11 -0
- package/dist/pi/packages/ta-recall/lib/react.js +16 -0
- package/dist/pi/packages/ta-recall/lib/recall-protocol.d.ts +186 -0
- package/dist/pi/packages/ta-recall/lib/recall-protocol.js +60 -0
- package/dist/pi/packages/ta-recall/lib/recall-service.d.ts +42 -0
- package/dist/pi/packages/ta-recall/lib/recall-service.js +241 -0
- package/dist/pi/packages/ta-recall/lib/search-source.d.ts +7 -0
- package/dist/pi/packages/ta-recall/lib/search-source.js +49 -0
- package/dist/pi/packages/ta-recall/lib/search-util.d.ts +30 -0
- package/dist/pi/packages/ta-recall/lib/search-util.js +167 -0
- package/dist/pi/packages/ta-recall/lib/server-texts.d.ts +7 -0
- package/dist/pi/packages/ta-recall/lib/server-texts.js +17 -0
- package/dist/pi/packages/ta-recall/lib/settings.d.ts +4 -0
- package/dist/pi/packages/ta-recall/lib/settings.js +77 -0
- package/dist/pi/packages/ta-recall/lib/skill-card.d.ts +9 -0
- package/dist/pi/packages/ta-recall/lib/skill-card.js +51 -0
- package/dist/pi/packages/ta-recall/lib/skill-util.d.ts +19 -0
- package/dist/pi/packages/ta-recall/lib/skill-util.js +110 -0
- package/dist/pi/packages/ta-recall/lib/stored.d.ts +5 -0
- package/dist/pi/packages/ta-recall/lib/stored.js +28 -0
- package/dist/pi/packages/ta-recall/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-recall/lib/style.js +48 -0
- package/dist/pi/packages/ta-recall/lib/tool-line.d.ts +10 -0
- package/dist/pi/packages/ta-recall/lib/tool-line.js +23 -0
- package/dist/pi/packages/ta-recall/lib/tool.d.ts +63 -0
- package/dist/pi/packages/ta-recall/lib/tool.js +71 -0
- package/dist/pi/packages/ta-recall/package.json +55 -0
- package/dist/pi/packages/ta-recall/web/index.js +1042 -0
- package/dist/pi/packages/ta-rooms/README.en.md +29 -0
- package/dist/pi/packages/ta-rooms/README.md +29 -0
- package/dist/pi/packages/ta-rooms/extension/index.mjs +362 -0
- package/dist/pi/packages/ta-rooms/host/index.mjs +966 -0
- package/dist/pi/packages/ta-rooms/lib/agents-view.d.ts +25 -0
- package/dist/pi/packages/ta-rooms/lib/agents-view.js +128 -0
- package/dist/pi/packages/ta-rooms/lib/dialogs.d.ts +39 -0
- package/dist/pi/packages/ta-rooms/lib/dialogs.js +235 -0
- package/dist/pi/packages/ta-rooms/lib/double-host.d.ts +114 -0
- package/dist/pi/packages/ta-rooms/lib/double-host.js +645 -0
- package/dist/pi/packages/ta-rooms/lib/double-i18n.d.ts +85 -0
- package/dist/pi/packages/ta-rooms/lib/double-i18n.js +172 -0
- package/dist/pi/packages/ta-rooms/lib/double-protocol.d.ts +165 -0
- package/dist/pi/packages/ta-rooms/lib/double-protocol.js +73 -0
- package/dist/pi/packages/ta-rooms/lib/double-util.d.ts +99 -0
- package/dist/pi/packages/ta-rooms/lib/double-util.js +180 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-store.d.ts +45 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-store.js +145 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-view.d.ts +34 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-view.js +223 -0
- package/dist/pi/packages/ta-rooms/lib/extension.d.ts +24 -0
- package/dist/pi/packages/ta-rooms/lib/extension.js +176 -0
- package/dist/pi/packages/ta-rooms/lib/host.d.ts +7 -0
- package/dist/pi/packages/ta-rooms/lib/host.js +18 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +105 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.js +211 -0
- package/dist/pi/packages/ta-rooms/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-rooms/lib/index.js +106 -0
- package/dist/pi/packages/ta-rooms/lib/members-view.d.ts +3 -0
- package/dist/pi/packages/ta-rooms/lib/members-view.js +94 -0
- package/dist/pi/packages/ta-rooms/lib/page.d.ts +154 -0
- package/dist/pi/packages/ta-rooms/lib/page.js +400 -0
- package/dist/pi/packages/ta-rooms/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-rooms/lib/react.js +8 -0
- package/dist/pi/packages/ta-rooms/lib/room-view.d.ts +15 -0
- package/dist/pi/packages/ta-rooms/lib/room-view.js +168 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-home.d.ts +32 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-home.js +141 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-page.d.ts +14 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-page.js +217 -0
- package/dist/pi/packages/ta-rooms/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-rooms/lib/style.js +205 -0
- package/dist/pi/packages/ta-rooms/package.json +56 -0
- package/dist/pi/packages/ta-rooms/web/index.js +3165 -0
- package/dist/pi/packages/ta-share/README.en.md +27 -0
- package/dist/pi/packages/ta-share/README.md +27 -0
- package/dist/pi/packages/ta-share/extension/index.mjs +184 -0
- package/dist/pi/packages/ta-share/host/index.mjs +364 -0
- package/dist/pi/packages/ta-share/lib/extension.d.ts +15 -0
- package/dist/pi/packages/ta-share/lib/extension.js +115 -0
- package/dist/pi/packages/ta-share/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-share/lib/host.js +9 -0
- package/dist/pi/packages/ta-share/lib/i18n.d.ts +106 -0
- package/dist/pi/packages/ta-share/lib/i18n.js +213 -0
- package/dist/pi/packages/ta-share/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-share/lib/index.js +77 -0
- package/dist/pi/packages/ta-share/lib/page.d.ts +48 -0
- package/dist/pi/packages/ta-share/lib/page.js +105 -0
- package/dist/pi/packages/ta-share/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-share/lib/react.js +8 -0
- package/dist/pi/packages/ta-share/lib/server-texts.d.ts +14 -0
- package/dist/pi/packages/ta-share/lib/server-texts.js +52 -0
- package/dist/pi/packages/ta-share/lib/share-dialog.d.ts +18 -0
- package/dist/pi/packages/ta-share/lib/share-dialog.js +233 -0
- package/dist/pi/packages/ta-share/lib/share-protocol.d.ts +86 -0
- package/dist/pi/packages/ta-share/lib/share-protocol.js +30 -0
- package/dist/pi/packages/ta-share/lib/share-service.d.ts +50 -0
- package/dist/pi/packages/ta-share/lib/share-service.js +130 -0
- package/dist/pi/packages/ta-share/lib/shared-view.d.ts +18 -0
- package/dist/pi/packages/ta-share/lib/shared-view.js +225 -0
- package/dist/pi/packages/ta-share/lib/shares-page.d.ts +3 -0
- package/dist/pi/packages/ta-share/lib/shares-page.js +78 -0
- package/dist/pi/packages/ta-share/lib/snapshot.d.ts +30 -0
- package/dist/pi/packages/ta-share/lib/snapshot.js +195 -0
- package/dist/pi/packages/ta-share/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-share/lib/style.js +117 -0
- package/dist/pi/packages/ta-share/package.json +56 -0
- package/dist/pi/packages/ta-share/web/index.js +1224 -0
- package/dist/pi/packages/ta-workspace/README.md +1 -1
- package/dist/pi/packages/ta-workspace/README.zh-cn.md +1 -1
- package/dist/pi/packages/ta-workspace/lib/browser-common.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/browser-common.js +29 -30
- package/dist/pi/packages/ta-workspace/lib/browser-tool-line.d.ts +15 -0
- package/dist/pi/packages/ta-workspace/lib/browser-tool-line.js +70 -0
- package/dist/pi/packages/ta-workspace/lib/editors.js +29 -2
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +13 -2
- package/dist/pi/packages/ta-workspace/lib/i18n.js +29 -7
- package/dist/pi/packages/ta-workspace/lib/index.js +2 -0
- package/dist/pi/packages/ta-workspace/lib/preview.d.ts +10 -1
- package/dist/pi/packages/ta-workspace/lib/preview.js +136 -11
- package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/style.js +56 -40
- package/dist/pi/packages/ta-workspace/lib/terminal-sessions.d.ts +15 -4
- package/dist/pi/packages/ta-workspace/lib/terminal-sessions.js +31 -9
- package/dist/pi/packages/ta-workspace/lib/terminal.d.ts +3 -2
- package/dist/pi/packages/ta-workspace/lib/terminal.js +51 -21
- package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts +27 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.js +74 -0
- package/dist/pi/packages/ta-workspace/lib/util/terminal.d.ts +5 -0
- package/dist/pi/packages/ta-workspace/lib/util/terminal.js +14 -0
- package/dist/pi/packages/ta-workspace/package.json +1 -1
- package/dist/pi/packages/ta-workspace/web/index.js +823 -341
- package/dist/public/assets/OrbitControls-DVf70a7w.js +1 -0
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-BmIko5tV.js → abnfDiagram-S7VZAUFO-BnqtcbpZ.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-XgsdQ7ul.js → architecture-WOLXFQ4H-BzPq1Ioe.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW--sVhMS03.js → architectureDiagram-YGSQEFNW-BsquO3a7.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-8f9b-9k2.js → blockDiagram-APKKGZFW-BQNYOEP4.js} +1 -1
- package/dist/public/assets/{browser-DOHZ0JCf.js → browser-DS711n7Y.js} +1 -1
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-CwYQ0Jfy.js → c4Diagram-KJ2TOQU5-D6e79Ycq.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-7Y9ezehi.js → chunk-6MUBBAK2-B-sgaPoU.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-CZIH4pWz.js → chunk-AXFCVDMN-D8pJKIg2.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-DsNATY2m.js → chunk-BG4553SI-86TL-vCz.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-CoXkfYE-.js → chunk-DQASFODM-CfUVuGjc.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-C5OLqki8.js → chunk-HFQBQIA3-Drm0FEYk.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-DMHuYGEF.js → chunk-KQLB2F66-BVFRADlC.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-BKeOttO1.js → chunk-KS47KZWR-DfyALEmP.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-D6zCwkk7.js → chunk-LEVMRMFU-DtJVzk2c.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-B5-QqcZg.js → chunk-M57EVK23-DTy27PHQ.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-DQrq3n0T.js → chunk-OY52VR5R-nSgn7jZg.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-j6ZT7EDR.js → chunk-QB3YPZ4I-CkSxO_X6.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-D5MXUO36.js → chunk-R3KSYZAL-Ck6iAjAL.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-DaBkw4dD.js → chunk-STOXU5M4-DQPHdSTh.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-vXcRfGci.js → chunk-TU62E6Q5-Bc2AbV2Y.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-CIh6H4Y2.js → chunk-X4PVCEUW-Cgpm0IXm.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-C_Vwv1FM.js → chunk-XXDRQBXY-CGE4eLpg.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-DccDWEJn.js → classDiagram-v2-L25IHNXF-4eQuDPEo.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-BX47lumZ.js → cose-bilkent-JH36ORCC-tDLCWq07.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dd40W2Jh.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-BE6WOGxW.js → cynefinDiagram-L36ESFBY-ByqcZ8x9.js} +1 -1
- package/dist/public/assets/{d3-selection-ZcE6yRN5.js → d3-selection-Bgn1374-.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-CE6SOOcN.js → dagre-SPEB5RXH-mCgr71mV.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-xC8VtiYL.js → diagram-3B7GL73J-DpYSwpQ0.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-4dmcBbjL.js → diagram-DNEMPZML-DMozUQzi.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-D14Yn3sQ.js → diagram-L3MUGCDN-Bk5Uf8PD.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-GxSXIhsK.js → diagram-LA4NIPWU-DFt5cPVK.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-Cm7Prlpc.js → diagram-MHCOC4E2-BkZZcKqK.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-mkUnnKFu.js → diagram-XPFHEONP-HEY6kyyN.js} +1 -1
- package/dist/public/assets/{dist-acJS-BlA.js → dist-Bj2CrKn7.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-m77ua3UQ.js → ebnfDiagram-UZSYDL2S-D4JvYyVb.js} +1 -1
- package/dist/public/assets/{editor.api-CljTm-EQ.js → editor.api-BpJFzYbl.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-DsQY1hw9.js → elk-XV6XMXQE-CT6qLJkF.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-CV8gJM0P.js → erDiagram-EYBAPDEH-BGng1goR.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-C1pymbUr.js → eventmodeling-K75KTNOO-Tt8O-Q1Z.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-uFzenfA3.js +1 -0
- package/dist/public/assets/{freemarker2-DYJXaMHN.js → freemarker2-Dd5ksoRn.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-CppxOWRh.js → ganttDiagram-23REXITY-Jl8VO_g2.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-D28I_jUc.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-CrQrZhcP.js → gitGraphDiagram-STJD7YCW-Be4qXALb.js} +1 -1
- package/dist/public/assets/{handlebars-DZCnH9e2.js → handlebars-4xabgUi4.js} +1 -1
- package/dist/public/assets/{html-DuzouNES.js → html-Dk3kt2w_.js} +1 -1
- package/dist/public/assets/{index-B7OYKvCE.js → index-Bx0c7eoh.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-5vIGEIq7.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-6pby19tQ.js → infoDiagram-KBXO4MBG-Coc0tdwb.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-Duf8c8rQ.js → ishikawaDiagram-M35NCXHK-CE_1VQCg.js} +1 -1
- package/dist/public/assets/{javascript-2d_L6cVd.js → javascript-DKLGqy6v.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-Dvv-xzNo.js → journeyDiagram-OPLOXDXO-CrolRZ_7.js} +1 -1
- package/dist/public/assets/{jsonMode-CFadYXyI.js → jsonMode-Chcs19_y.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-Dsk6F-TT.js → kanban-definition-BZKZHSQY-CjJj47De.js} +1 -1
- package/dist/public/assets/{liquid-Din4CF34.js → liquid-jff3p-Ji.js} +1 -1
- package/dist/public/assets/{mdx-DivDuCWI.js → mdx-DW4uRDfJ.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-BfCv4CYZ.js → mermaid-parser.core-XhQj6FvH.js} +3 -3
- package/dist/public/assets/{mermaid.core-DC20ZwJj.js → mermaid.core-OD4Atimg.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-DRZRrJU_.js → mindmap-definition-I2QAS2VK-DpGelVY7.js} +1 -1
- package/dist/public/assets/module-CrD0OHQp.js +1 -0
- package/dist/public/assets/module-DEBMgdtf.js +2273 -0
- package/dist/public/assets/{monaco-D1d6MOPe.js → monaco-BTVZP-tU.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-CBxQ5Mzy.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-DcGr3Tbk.js → pegDiagram-FD4XPPHP-CqcBmPfB.js} +1 -1
- package/dist/public/assets/phaser.esm-BxCDEWDb.js +3202 -0
- package/dist/public/assets/pie-XZMESJXO-DT5V3581.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-GF7pu6ch.js → pieDiagram-J4AKIIQI-CRir3beB.js} +1 -1
- package/dist/public/assets/{python-BQbTTTT5.js → python-BwW_0207.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-D-bcu7Ey.js → quadrantDiagram-XTYBLID2-DIY6gdcf.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-BAOovYEa.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-RZ2Rnwzh.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-BiBHsI-K.js → railroad-abnf-LNEFI6M7-XWNOzunl.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-zKjrfkHs.js → railroad-ebnf-DWYD2UWJ-CI0-j1Jz.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-DKuVn0GT.js → railroad-peg-JR7BVNR7-BVB_IaIG.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-Cyn-16mJ.js → railroadDiagram-MRQ6NCDL-CudwT6q2.js} +1 -1
- package/dist/public/assets/{razor-DiLk54O0.js → razor-DrjCyQqB.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CwU2EBkW.js → requirementDiagram-Y7LWUY3S-CvRMeRqj.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-ajf00HyW.js → sankeyDiagram-WGJFYUXA-adxYCJKr.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-DiX_OIAw.js → sequenceDiagram-5NDRBG5M-lCRsoLUp.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-CV5bRqB7.js → stateDiagram-v2-FJ4FJNEA-DNst1BLg.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-BGQKSlj7.js → swimlanes-UMQ2AFYF-S_omrdvA.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-By5lnz4u.js +8 -0
- package/dist/public/assets/three.module-CeVBJVoU.js +4225 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-DhQoApff.js → timeline-definition-SEUHKTQE-_pMGrTE-.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-Cyb9N8KY.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-BkMo57pG.js +1 -0
- package/dist/public/assets/{typescript-COQ1g-up.js → typescript-0-z_OYCU.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-CmLFzjie.js → usecaseDiagram-AFA6YXN4-B2oJKi5Q.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-DOa6JR5K.js → vennDiagram-NNMJR3RB-inPs2Kkr.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-CSt-uQ-Y.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-BV7EEShp.js → wardleyDiagram-S7YFUSEH-DNhNHM7b.js} +1 -1
- package/dist/public/assets/{xml-BbvtjuaG.js → xml-BXPxQzKF.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-DtMpPbsq.js → xychartDiagram-GGNKY7IX-DJc93dNT.js} +1 -1
- package/dist/public/assets/{yaml-Bw8NFga9.js → yaml-CGmD9Rya.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/serve/index.mjs +6664 -2480
- package/package.json +32 -25
- package/dist/public/assets/cynefin-EF2NZ3EQ-MaI-3dMQ.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-shBnAQFk.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-BtQWboBz.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-CDSLjba_.js +0 -1
- package/dist/public/assets/module-BAQaY56j.js +0 -1
- package/dist/public/assets/module-DxRGg3ED.js +0 -1947
- package/dist/public/assets/packet-JDAUHWVQ-dYb4P9eU.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-CIompBnc.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-DiJl7BtK.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-B5cRBukM.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-DxXlavVT.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-BOP6mkZC.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-BJxuPMz3.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-jqlowjVL.js +0 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MembersView = MembersView;
|
|
4
|
+
const agents_view_1 = require("./agents-view");
|
|
5
|
+
const dialogs_1 = require("./dialogs");
|
|
6
|
+
const double_i18n_1 = require("./double-i18n");
|
|
7
|
+
const doubles_view_1 = require("./doubles-view");
|
|
8
|
+
const page_1 = require("./page");
|
|
9
|
+
// biome-ignore lint/correctness/noUnusedImports: the JSX below compiles to React.createElement (jsxFactory)
|
|
10
|
+
const react_1 = require("./react");
|
|
11
|
+
const room_view_1 = require("./room-view");
|
|
12
|
+
function MemberRow({ room, member }) {
|
|
13
|
+
var _a;
|
|
14
|
+
const Remove = (0, page_1.icon)('X');
|
|
15
|
+
const Key = (_a = page_1.pi.ui.icons.KeyRound) !== null && _a !== void 0 ? _a : (0, page_1.icon)('Bot');
|
|
16
|
+
const may = (0, doubles_view_1.useMayLine)(member);
|
|
17
|
+
const tags = [member.self ? (0, page_1.t)('you') : '', member.owner ? (0, page_1.t)('owner') : '', member.guest ? (0, page_1.t)('guestTag') : ''].filter(Boolean);
|
|
18
|
+
return (react_1.React.createElement("li", { className: "trm-member" },
|
|
19
|
+
react_1.React.createElement(page_1.Face, { id: member.id, name: member.name, size: 34, online: member.online }),
|
|
20
|
+
react_1.React.createElement("span", { className: "trm-member-text" },
|
|
21
|
+
react_1.React.createElement("span", { className: "trm-member-name" },
|
|
22
|
+
react_1.React.createElement("span", { className: "trm-ellipsis" }, member.name),
|
|
23
|
+
tags.map(tag => (react_1.React.createElement("span", { key: tag, className: "trm-tag" }, tag)))),
|
|
24
|
+
react_1.React.createElement("span", { className: `trm-member-detail${member.online ? ' trm-live' : ''}` }, member.online ? (0, page_1.t)('online') : (0, page_1.t)('offline')),
|
|
25
|
+
may && react_1.React.createElement("span", { className: "trm-member-detail trm-member-may trm-ellipsis" }, may)),
|
|
26
|
+
!member.self && !member.guest && (react_1.React.createElement("button", { type: "button", className: `trm-icon trm-member-action${may ? ' trm-on-icon' : ''}`, title: (0, double_i18n_1.dt)('permissions'), "aria-label": (0, double_i18n_1.dt)('permissions'), onClick: () => (0, doubles_view_1.openGrant)(member) },
|
|
27
|
+
react_1.React.createElement(Key, { size: 15 }))),
|
|
28
|
+
room.owner && !member.self && (react_1.React.createElement("button", { type: "button", className: "trm-icon trm-danger trm-member-action", title: (0, page_1.t)('remove'), "aria-label": (0, page_1.t)('remove'), onClick: () => void (0, room_view_1.confirmThen)((0, page_1.t)('removeTitle', { name: member.name, title: room.title }), (0, page_1.t)('removeHint'), (0, page_1.t)('remove'), async () => { var _a; return (_a = (0, page_1.rooms)()) === null || _a === void 0 ? void 0 : _a.removeMember(room.id, member.member); }) },
|
|
29
|
+
react_1.React.createElement(Remove, { size: 15 })))));
|
|
30
|
+
}
|
|
31
|
+
/** A row of the settings of the room: its label, its value quieter on the right. */
|
|
32
|
+
function SettingRow({ label, value, onClick }) {
|
|
33
|
+
const Chevron = (0, page_1.icon)('ChevronRight');
|
|
34
|
+
return (react_1.React.createElement("button", { type: "button", className: "trm-setting", onClick: onClick },
|
|
35
|
+
react_1.React.createElement("span", { className: "trm-setting-label" }, label),
|
|
36
|
+
value && react_1.React.createElement("span", { className: "trm-setting-value trm-ellipsis" }, value),
|
|
37
|
+
react_1.React.createElement(Chevron, { size: 15 })));
|
|
38
|
+
}
|
|
39
|
+
/** The members of the room shown, in the workbench, as a messenger shows the settings of a group. */
|
|
40
|
+
function MembersView() {
|
|
41
|
+
var _a;
|
|
42
|
+
const { identity } = (0, page_1.useBook)();
|
|
43
|
+
const room = (0, page_1.useOpened)();
|
|
44
|
+
const page = (0, page_1.usePageOf)(room !== null && room !== void 0 ? room : { view: undefined });
|
|
45
|
+
const agents = (0, page_1.useAgents)(room !== null && room !== void 0 ? room : { status: 'gone' });
|
|
46
|
+
const joining = (0, page_1.useJoining)(room !== null && room !== void 0 ? room : { id: '', status: 'gone', members: [] });
|
|
47
|
+
if (!room) {
|
|
48
|
+
return (react_1.React.createElement("div", { className: "trm-panel" },
|
|
49
|
+
react_1.React.createElement(page_1.pi.ui.Empty, { title: (0, page_1.t)('noRoomOpen') })));
|
|
50
|
+
}
|
|
51
|
+
const Plus = (0, page_1.icon)('Plus');
|
|
52
|
+
const Bot = (0, page_1.icon)('Bot');
|
|
53
|
+
const online = room.members.filter(member => member.online).length;
|
|
54
|
+
const self = (_a = room.members.find(member => member.self)) === null || _a === void 0 ? void 0 : _a.member;
|
|
55
|
+
return (react_1.React.createElement("div", { className: "trm-panel" },
|
|
56
|
+
react_1.React.createElement("div", { className: "trm-panel-scroll" },
|
|
57
|
+
react_1.React.createElement("div", { className: "trm-panel-top" },
|
|
58
|
+
react_1.React.createElement(page_1.RoomFace, { room: room, size: 44 }),
|
|
59
|
+
react_1.React.createElement("span", { className: "trm-panel-title" },
|
|
60
|
+
react_1.React.createElement("strong", { className: "trm-ellipsis" }, room.title),
|
|
61
|
+
react_1.React.createElement("span", { className: "trm-ellipsis" }, room.owner ? (0, page_1.t)('ownRoom') : (0, page_1.t)('roomOf', { name: room.ownerName })))),
|
|
62
|
+
react_1.React.createElement("div", { className: "trm-panel-label" }, (0, page_1.t)('membersCount', { n: room.members.length, online })),
|
|
63
|
+
react_1.React.createElement("ul", { className: "trm-panel-members" },
|
|
64
|
+
room.owner && (react_1.React.createElement("li", null,
|
|
65
|
+
react_1.React.createElement("button", { type: "button", className: "trm-member trm-member-add", onClick: () => (0, dialogs_1.openInvite)(room) },
|
|
66
|
+
react_1.React.createElement("span", { className: "trm-member-plus" },
|
|
67
|
+
react_1.React.createElement(Plus, { size: 16 })),
|
|
68
|
+
react_1.React.createElement("span", { className: "trm-member-text" },
|
|
69
|
+
react_1.React.createElement("span", { className: "trm-member-name" }, (0, page_1.t)('invite')),
|
|
70
|
+
react_1.React.createElement("span", { className: "trm-member-detail" }, (0, page_1.t)('inviteLine')))))),
|
|
71
|
+
room.members.map(member => (react_1.React.createElement(MemberRow, { key: member.member, room: room, member: member })))),
|
|
72
|
+
react_1.React.createElement("div", { className: "trm-panel-label" }, agents.length ? `${(0, double_i18n_1.dt)('agentsTitle')} · ${agents.length}` : (0, double_i18n_1.dt)('agentsTitle')),
|
|
73
|
+
react_1.React.createElement("ul", { className: "trm-panel-members" },
|
|
74
|
+
react_1.React.createElement("li", null,
|
|
75
|
+
react_1.React.createElement("button", { type: "button", className: "trm-member trm-member-add", onClick: () => (0, agents_view_1.openAgentPicker)(room) },
|
|
76
|
+
react_1.React.createElement("span", { className: "trm-member-plus" },
|
|
77
|
+
react_1.React.createElement(Bot, { size: 16 })),
|
|
78
|
+
react_1.React.createElement("span", { className: "trm-member-text" },
|
|
79
|
+
react_1.React.createElement("span", { className: "trm-member-name" }, (0, double_i18n_1.dt)('inviteAgent')),
|
|
80
|
+
react_1.React.createElement("span", { className: "trm-member-detail" }, (0, double_i18n_1.dt)('inviteAgentLine'))))),
|
|
81
|
+
agents.map(agent => (react_1.React.createElement(agents_view_1.AgentRow, { key: `${agent.member}/${agent.id}`, room: room, agent: agent }))),
|
|
82
|
+
joining
|
|
83
|
+
.filter(agent => !agents.some(each => each.id === agent.id && each.member === self))
|
|
84
|
+
.map(agent => (react_1.React.createElement(agents_view_1.JoiningRow, { key: `joining/${agent.id}`, agent: agent })))),
|
|
85
|
+
react_1.React.createElement("div", { className: "trm-panel-sep" }),
|
|
86
|
+
react_1.React.createElement(doubles_view_1.DoubleSwitch, { room: room }),
|
|
87
|
+
react_1.React.createElement(SettingRow, { label: (0, double_i18n_1.dt)('log'), onClick: () => void page_1.pi.ui.showView(doubles_view_1.DOUBLES_VIEW) }),
|
|
88
|
+
react_1.React.createElement("div", { className: "trm-panel-sep" }),
|
|
89
|
+
page && room.view && react_1.React.createElement(SettingRow, { label: (0, page_1.t)('openPage', { name: page.title }), onClick: () => void page_1.pi.ui.showView(room.view) }),
|
|
90
|
+
react_1.React.createElement(SettingRow, { label: (0, page_1.t)('me'), value: identity === null || identity === void 0 ? void 0 : identity.name, onClick: () => void (0, dialogs_1.rename)() })),
|
|
91
|
+
react_1.React.createElement("div", { className: "trm-panel-foot" },
|
|
92
|
+
react_1.React.createElement("button", { type: "button", className: "trm-link trm-danger", onClick: () => void (0, room_view_1.leaveRoom)(room).then(left => left && page_1.book.set({ opened: undefined })) }, room.owner ? (0, page_1.t)('close') : (0, page_1.t)('leave')))));
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=members-view.js.map
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import type { TaFriend, TaIdentity, TaRoomEvent, TaRoomInfo, TaRoomRequest } from '@celljs/ta-protocol';
|
|
2
|
+
import { type RelayChatLine as ChatLine, RelayRoomChat as RoomChat } from '@celljs/ta-relay/lib/common/relay-room-chat';
|
|
3
|
+
import type { WebExtensionAPI, WebIcon, WebPageInfo, WebRooms } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
|
|
4
|
+
import { type RoomAgent, type RoomAgentIn } from './double-protocol';
|
|
5
|
+
import { type Words } from './i18n';
|
|
6
|
+
/** The kind of the rooms made here: a group chat, which this page shows (room-view.tsx). */
|
|
7
|
+
export declare const ROOMS_KIND = "ta-rooms";
|
|
8
|
+
/** The page of the rooms (`ui.showView`). */
|
|
9
|
+
export declare const ROOMS_VIEW = "@celljs/ta-rooms/rooms";
|
|
10
|
+
/** The members of the room shown, a tool of the workbench (members-view.tsx). */
|
|
11
|
+
export declare const MEMBERS_VIEW = "@celljs/ta-rooms/members";
|
|
12
|
+
/** What the page hears of the state of the rooms without their messages: what is said (chat.ts), the agents invited. */
|
|
13
|
+
export declare const CHAT_STATE: string[];
|
|
14
|
+
/** The API of the page, bound once by `activate`. */
|
|
15
|
+
export declare let pi: WebExtensionAPI;
|
|
16
|
+
export declare function bindPage(api: WebExtensionAPI): void;
|
|
17
|
+
export declare function t(key: keyof Words, values?: Record<string, string | number>): string;
|
|
18
|
+
/** An icon of the page, or another when the page is older than the icon. */
|
|
19
|
+
export declare function icon(name: string): WebIcon;
|
|
20
|
+
export declare function message(error: unknown): string;
|
|
21
|
+
/** The rooms of ta serve; undefined in an app older than them. */
|
|
22
|
+
export declare function rooms(): WebRooms | undefined;
|
|
23
|
+
export interface BookState {
|
|
24
|
+
identity?: TaIdentity;
|
|
25
|
+
/** Undefined till read. */
|
|
26
|
+
rooms?: TaRoomInfo[];
|
|
27
|
+
requests: TaRoomRequest[];
|
|
28
|
+
friends?: TaFriend[];
|
|
29
|
+
/** The room the page shows, its chat. */
|
|
30
|
+
opened?: string;
|
|
31
|
+
/** It was opened from elsewhere (the double's home): on a phone, it alone, back going where the user came from. */
|
|
32
|
+
direct?: boolean;
|
|
33
|
+
/** When the user last saw what was said in each room, by its id (`pi.storage`). */
|
|
34
|
+
seen: Record<string, number>;
|
|
35
|
+
}
|
|
36
|
+
/** How a room changed between two reads of the list, for the notices of the one who asked to join. */
|
|
37
|
+
export interface RoomChange {
|
|
38
|
+
before?: TaRoomInfo;
|
|
39
|
+
room: TaRoomInfo;
|
|
40
|
+
}
|
|
41
|
+
/** What the page shows of the rooms: read again, at most a few times a second, when the server says they changed. */
|
|
42
|
+
export declare class RoomBook {
|
|
43
|
+
protected state: BookState;
|
|
44
|
+
protected readonly listeners: Set<() => void>;
|
|
45
|
+
protected readonly chats: Map<string, RoomChat>;
|
|
46
|
+
/** The agents of each room read, by key of its state (RoomAgentsUtil), and listed. */
|
|
47
|
+
protected readonly agentStates: Map<string, Record<string, {
|
|
48
|
+
value: unknown;
|
|
49
|
+
by: string;
|
|
50
|
+
version: number;
|
|
51
|
+
}>>;
|
|
52
|
+
protected readonly agentLists: Map<string, readonly RoomAgentIn[]>;
|
|
53
|
+
/** The agents the user invites to each room, till they are in it. */
|
|
54
|
+
protected readonly joiningLists: Map<string, readonly RoomAgent[]>;
|
|
55
|
+
protected timer?: ReturnType<typeof setTimeout>;
|
|
56
|
+
protected loading?: Promise<void>;
|
|
57
|
+
protected again: boolean;
|
|
58
|
+
protected seenRead: boolean;
|
|
59
|
+
/** The rooms whose status changed, as read. */
|
|
60
|
+
onChange?: (changes: RoomChange[]) => void;
|
|
61
|
+
get(): BookState;
|
|
62
|
+
subscribe(listener: () => void): () => void;
|
|
63
|
+
/** Reads all of it again; a read asked while one runs runs once more after it. */
|
|
64
|
+
load(): Promise<void>;
|
|
65
|
+
/** Soon: the server tells of several changes at once; what was said is read again too, for what came while away. */
|
|
66
|
+
reload(): void;
|
|
67
|
+
set(partial: Partial<BookState>): void;
|
|
68
|
+
/** The chat of a room, read the first time it is asked for and kept as its state changes (`heard`). */
|
|
69
|
+
chat(room: string): RoomChat | undefined;
|
|
70
|
+
/** The agents invited to a room, read the first time it is asked for and kept as its state changes. */
|
|
71
|
+
agents(room: string): readonly RoomAgentIn[];
|
|
72
|
+
/** The agents the user invites to a room, on their way in. */
|
|
73
|
+
joining(room: string): readonly RoomAgent[];
|
|
74
|
+
/** An agent the user invites is on its way into a room (`true`), or no more. */
|
|
75
|
+
setJoining(room: string, agent: RoomAgent, on: boolean): void;
|
|
76
|
+
/** The agents of the user in a room, as the server listed them on inviting one: shown before the room says so. */
|
|
77
|
+
putMine(room: string, member: string, agents: readonly RoomAgent[]): void;
|
|
78
|
+
/** What happened in a room: what was said goes to its chat, if it was read; who was invited, to its agents. */
|
|
79
|
+
heard(event: TaRoomEvent): void;
|
|
80
|
+
protected readAgents(room: string): void;
|
|
81
|
+
protected putAgents(room: string, state: Record<string, {
|
|
82
|
+
value: unknown;
|
|
83
|
+
by: string;
|
|
84
|
+
version: number;
|
|
85
|
+
}>): void;
|
|
86
|
+
/** The user saw what was said in a room till `at`. */
|
|
87
|
+
see(room: string, at: number): void;
|
|
88
|
+
protected readSeen(): void;
|
|
89
|
+
protected read(next: BookState): void;
|
|
90
|
+
}
|
|
91
|
+
export declare const book: RoomBook;
|
|
92
|
+
export declare function useBook(): BookState;
|
|
93
|
+
/** What was said in a room, as it changes; nothing for one not joined. */
|
|
94
|
+
export declare function useLines(room: TaRoomInfo): readonly ChatLine[];
|
|
95
|
+
/** The agents invited to a room, as they come and go; none for one not joined. */
|
|
96
|
+
export declare function useAgents(room: TaRoomInfo): readonly RoomAgentIn[];
|
|
97
|
+
/** The agents the user invites to a room, till they said hello there. */
|
|
98
|
+
export declare function useJoining(room: TaRoomInfo): readonly RoomAgent[];
|
|
99
|
+
/** Said in a room by others since the user saw it last (or joined). */
|
|
100
|
+
export declare function unseen(room: TaRoomInfo, lines: readonly ChatLine[], seen: Record<string, number>): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Shows a room: its chat, over the list on a phone, beside it elsewhere; `direct` from elsewhere than the list, on a phone
|
|
103
|
+
* without the list under it, so that back goes where the user came from.
|
|
104
|
+
*/
|
|
105
|
+
export declare function openRoom(id: string, direct?: boolean): void;
|
|
106
|
+
/** The room shown, while it is one the user is in. */
|
|
107
|
+
export declare function useOpened(): TaRoomInfo | undefined;
|
|
108
|
+
/** A phone, or a window as narrow: the list, and a room pushed over it, rather than the two side by side. */
|
|
109
|
+
export declare function useCompact(): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* The page that shows a room of another extension (its `view`), for its icon and its title: the page knows no kind of
|
|
112
|
+
* room, the extension that made it says by its view. None for a room of this page, or a view not installed here.
|
|
113
|
+
*/
|
|
114
|
+
export declare function usePageOf(room: TaRoomInfo): WebPageInfo | undefined;
|
|
115
|
+
/** What a row says of a room under its title when nothing was said in it. */
|
|
116
|
+
export declare function statusLine(room: TaRoomInfo): string;
|
|
117
|
+
/** When, as a list of chats says it: the time today, yesterday, the day of the week this week, else the date. */
|
|
118
|
+
export declare function when(at: number, now?: number): string;
|
|
119
|
+
/** One of the colours of the faces of the page (--ta-tint-<n>), the same for the same id. */
|
|
120
|
+
export declare function tint(id: string): number;
|
|
121
|
+
export declare function initial(name: string): string;
|
|
122
|
+
/** A face of one of the rooms, as the agents of channels have (`ui.Face`); a letter in a circle in an app of before. */
|
|
123
|
+
export declare function Face({ id, name, size, online, face }: {
|
|
124
|
+
id: string;
|
|
125
|
+
name: string;
|
|
126
|
+
size?: number;
|
|
127
|
+
online?: boolean;
|
|
128
|
+
face?: number;
|
|
129
|
+
}): import("react").JSX.Element;
|
|
130
|
+
/**
|
|
131
|
+
* Those a room is drawn by, as a channel by its members: the others first, its owner in front, then the agents in it, then
|
|
132
|
+
* the user, so that a room of two (the user and an agent) shows both; the user alone in a room of its own.
|
|
133
|
+
*/
|
|
134
|
+
export declare function faceMembers(room: TaRoomInfo, agents?: readonly RoomAgentIn[]): {
|
|
135
|
+
id: string;
|
|
136
|
+
name: string;
|
|
137
|
+
face?: number;
|
|
138
|
+
}[];
|
|
139
|
+
/**
|
|
140
|
+
* The face of a room, as a channel is drawn (`ui.GroupFace`): two of those in it, one in front of the other; the icon
|
|
141
|
+
* of the page of its game at a corner; an amber dot for what the user has not read.
|
|
142
|
+
*/
|
|
143
|
+
export declare function RoomFace({ room, size, unread }: {
|
|
144
|
+
room: TaRoomInfo;
|
|
145
|
+
size?: number;
|
|
146
|
+
unread?: boolean;
|
|
147
|
+
}): import("react").JSX.Element;
|
|
148
|
+
/** The faces of those in a room, up to five, as the head of a channel shows them; the button shows its members. */
|
|
149
|
+
export declare function MemberFaces({ room, onClick, shown }: {
|
|
150
|
+
room: TaRoomInfo;
|
|
151
|
+
onClick(): void;
|
|
152
|
+
shown: boolean;
|
|
153
|
+
}): import("react").JSX.Element;
|
|
154
|
+
//# sourceMappingURL=page.d.ts.map
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.book = exports.RoomBook = exports.pi = exports.CHAT_STATE = exports.MEMBERS_VIEW = exports.ROOMS_VIEW = exports.ROOMS_KIND = void 0;
|
|
4
|
+
exports.bindPage = bindPage;
|
|
5
|
+
exports.t = t;
|
|
6
|
+
exports.icon = icon;
|
|
7
|
+
exports.message = message;
|
|
8
|
+
exports.rooms = rooms;
|
|
9
|
+
exports.useBook = useBook;
|
|
10
|
+
exports.useLines = useLines;
|
|
11
|
+
exports.useAgents = useAgents;
|
|
12
|
+
exports.useJoining = useJoining;
|
|
13
|
+
exports.unseen = unseen;
|
|
14
|
+
exports.openRoom = openRoom;
|
|
15
|
+
exports.useOpened = useOpened;
|
|
16
|
+
exports.useCompact = useCompact;
|
|
17
|
+
exports.usePageOf = usePageOf;
|
|
18
|
+
exports.statusLine = statusLine;
|
|
19
|
+
exports.when = when;
|
|
20
|
+
exports.tint = tint;
|
|
21
|
+
exports.initial = initial;
|
|
22
|
+
exports.Face = Face;
|
|
23
|
+
exports.faceMembers = faceMembers;
|
|
24
|
+
exports.RoomFace = RoomFace;
|
|
25
|
+
exports.MemberFaces = MemberFaces;
|
|
26
|
+
const relay_room_chat_1 = require("@celljs/ta-relay/lib/common/relay-room-chat");
|
|
27
|
+
const double_protocol_1 = require("./double-protocol");
|
|
28
|
+
const i18n_1 = require("./i18n");
|
|
29
|
+
const react_1 = require("./react");
|
|
30
|
+
/** The kind of the rooms made here: a group chat, which this page shows (room-view.tsx). */
|
|
31
|
+
exports.ROOMS_KIND = 'ta-rooms';
|
|
32
|
+
/** The page of the rooms (`ui.showView`). */
|
|
33
|
+
exports.ROOMS_VIEW = '@celljs/ta-rooms/rooms';
|
|
34
|
+
/** The members of the room shown, a tool of the workbench (members-view.tsx). */
|
|
35
|
+
exports.MEMBERS_VIEW = '@celljs/ta-rooms/members';
|
|
36
|
+
/** What the page hears of the state of the rooms without their messages: what is said (chat.ts), the agents invited. */
|
|
37
|
+
exports.CHAT_STATE = ['chat:', double_protocol_1.ROOM_AGENTS_KEY];
|
|
38
|
+
const SEEN_KEY = 'seen';
|
|
39
|
+
function bindPage(api) {
|
|
40
|
+
exports.pi = api;
|
|
41
|
+
}
|
|
42
|
+
function t(key, values = {}) {
|
|
43
|
+
return i18n_1.RoomWords.format(i18n_1.RoomWords.of(exports.pi.ui.language)[key], values);
|
|
44
|
+
}
|
|
45
|
+
/** An icon of the page, or another when the page is older than the icon. */
|
|
46
|
+
function icon(name) {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
return (_b = (_a = exports.pi.ui.icons[name]) !== null && _a !== void 0 ? _a : exports.pi.ui.icons.Users) !== null && _b !== void 0 ? _b : exports.pi.ui.icons.Circle;
|
|
49
|
+
}
|
|
50
|
+
function message(error) {
|
|
51
|
+
return error instanceof Error ? error.message : String(error);
|
|
52
|
+
}
|
|
53
|
+
/** The rooms of ta serve; undefined in an app older than them. */
|
|
54
|
+
function rooms() {
|
|
55
|
+
return exports.pi.rooms;
|
|
56
|
+
}
|
|
57
|
+
/** What the page shows of the rooms: read again, at most a few times a second, when the server says they changed. */
|
|
58
|
+
class RoomBook {
|
|
59
|
+
constructor() {
|
|
60
|
+
this.state = { requests: [], seen: {} };
|
|
61
|
+
this.listeners = new Set();
|
|
62
|
+
this.chats = new Map();
|
|
63
|
+
/** The agents of each room read, by key of its state (RoomAgentsUtil), and listed. */
|
|
64
|
+
this.agentStates = new Map();
|
|
65
|
+
this.agentLists = new Map();
|
|
66
|
+
/** The agents the user invites to each room, till they are in it. */
|
|
67
|
+
this.joiningLists = new Map();
|
|
68
|
+
this.again = false;
|
|
69
|
+
this.seenRead = false;
|
|
70
|
+
}
|
|
71
|
+
get() {
|
|
72
|
+
return this.state;
|
|
73
|
+
}
|
|
74
|
+
subscribe(listener) {
|
|
75
|
+
this.listeners.add(listener);
|
|
76
|
+
return () => this.listeners.delete(listener);
|
|
77
|
+
}
|
|
78
|
+
/** Reads all of it again; a read asked while one runs runs once more after it. */
|
|
79
|
+
load() {
|
|
80
|
+
if (this.loading) {
|
|
81
|
+
this.again = true;
|
|
82
|
+
return this.loading;
|
|
83
|
+
}
|
|
84
|
+
const server = rooms();
|
|
85
|
+
if (!server) {
|
|
86
|
+
this.set({ rooms: [], friends: [] });
|
|
87
|
+
return Promise.resolve();
|
|
88
|
+
}
|
|
89
|
+
this.readSeen();
|
|
90
|
+
this.loading = Promise.all([
|
|
91
|
+
server.getIdentity().catch(() => this.state.identity),
|
|
92
|
+
server.listRooms().catch(() => { var _a; return (_a = this.state.rooms) !== null && _a !== void 0 ? _a : []; }),
|
|
93
|
+
server.listRequests().catch(() => this.state.requests),
|
|
94
|
+
server.listFriends().catch(() => { var _a; return (_a = this.state.friends) !== null && _a !== void 0 ? _a : []; }),
|
|
95
|
+
])
|
|
96
|
+
.then(([identity, list, requests, friends]) => this.read({ ...this.state, identity, rooms: list, requests, friends }))
|
|
97
|
+
.finally(() => {
|
|
98
|
+
this.loading = undefined;
|
|
99
|
+
if (this.again) {
|
|
100
|
+
this.again = false;
|
|
101
|
+
void this.load();
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
return this.loading;
|
|
105
|
+
}
|
|
106
|
+
/** Soon: the server tells of several changes at once; what was said is read again too, for what came while away. */
|
|
107
|
+
reload() {
|
|
108
|
+
clearTimeout(this.timer);
|
|
109
|
+
this.timer = setTimeout(() => {
|
|
110
|
+
void this.load();
|
|
111
|
+
for (const chat of this.chats.values()) {
|
|
112
|
+
void chat.load().catch(() => undefined);
|
|
113
|
+
}
|
|
114
|
+
for (const room of this.agentStates.keys()) {
|
|
115
|
+
this.readAgents(room);
|
|
116
|
+
}
|
|
117
|
+
}, 300);
|
|
118
|
+
}
|
|
119
|
+
set(partial) {
|
|
120
|
+
this.state = { ...this.state, ...partial };
|
|
121
|
+
for (const listener of this.listeners) {
|
|
122
|
+
listener();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/** The chat of a room, read the first time it is asked for and kept as its state changes (`heard`). */
|
|
126
|
+
chat(room) {
|
|
127
|
+
const server = rooms();
|
|
128
|
+
if (!server) {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
let chat = this.chats.get(room);
|
|
132
|
+
if (!chat) {
|
|
133
|
+
chat = new relay_room_chat_1.RelayRoomChat(server, room);
|
|
134
|
+
this.chats.set(room, chat);
|
|
135
|
+
void chat.load().catch(() => undefined);
|
|
136
|
+
}
|
|
137
|
+
return chat;
|
|
138
|
+
}
|
|
139
|
+
/** The agents invited to a room, read the first time it is asked for and kept as its state changes. */
|
|
140
|
+
agents(room) {
|
|
141
|
+
var _a;
|
|
142
|
+
if (!this.agentStates.has(room)) {
|
|
143
|
+
this.agentStates.set(room, {});
|
|
144
|
+
this.readAgents(room);
|
|
145
|
+
}
|
|
146
|
+
return (_a = this.agentLists.get(room)) !== null && _a !== void 0 ? _a : NO_AGENTS;
|
|
147
|
+
}
|
|
148
|
+
/** The agents the user invites to a room, on their way in. */
|
|
149
|
+
joining(room) {
|
|
150
|
+
var _a;
|
|
151
|
+
return (_a = this.joiningLists.get(room)) !== null && _a !== void 0 ? _a : NO_JOINING;
|
|
152
|
+
}
|
|
153
|
+
/** An agent the user invites is on its way into a room (`true`), or no more. */
|
|
154
|
+
setJoining(room, agent, on) {
|
|
155
|
+
const others = this.joining(room).filter(each => each.id !== agent.id);
|
|
156
|
+
this.joiningLists.set(room, on ? [...others, agent] : others);
|
|
157
|
+
this.set({});
|
|
158
|
+
}
|
|
159
|
+
/** The agents of the user in a room, as the server listed them on inviting one: shown before the room says so. */
|
|
160
|
+
putMine(room, member, agents) {
|
|
161
|
+
var _a;
|
|
162
|
+
var _b;
|
|
163
|
+
const known = this.agentStates.get(room);
|
|
164
|
+
if (!known) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const key = double_protocol_1.RoomAgentsUtil.key(member);
|
|
168
|
+
this.putAgents(room, { ...known, [key]: { value: agents, by: member, version: (_b = (_a = known[key]) === null || _a === void 0 ? void 0 : _a.version) !== null && _b !== void 0 ? _b : 0 } });
|
|
169
|
+
}
|
|
170
|
+
/** What happened in a room: what was said goes to its chat, if it was read; who was invited, to its agents. */
|
|
171
|
+
heard(event) {
|
|
172
|
+
var _a, _b;
|
|
173
|
+
var _c;
|
|
174
|
+
if (event.type !== 'state') {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
(_a = this.chats.get(event.room)) === null || _a === void 0 ? void 0 : _a.heard(event.key, event);
|
|
178
|
+
const known = this.agentStates.get(event.room);
|
|
179
|
+
if (known && event.key.startsWith(double_protocol_1.ROOM_AGENTS_KEY) && ((_c = (_b = known[event.key]) === null || _b === void 0 ? void 0 : _b.version) !== null && _c !== void 0 ? _c : 0) < event.version) {
|
|
180
|
+
this.putAgents(event.room, { ...known, [event.key]: event });
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
readAgents(room) {
|
|
184
|
+
var _a;
|
|
185
|
+
void ((_a = rooms()) === null || _a === void 0 ? void 0 : _a.getState(room, double_protocol_1.ROOM_AGENTS_KEY).then(state => this.putAgents(room, state)).catch(() => undefined));
|
|
186
|
+
}
|
|
187
|
+
putAgents(room, state) {
|
|
188
|
+
this.agentStates.set(room, state);
|
|
189
|
+
this.agentLists.set(room, double_protocol_1.RoomAgentsUtil.of(state));
|
|
190
|
+
this.set({});
|
|
191
|
+
}
|
|
192
|
+
/** The user saw what was said in a room till `at`. */
|
|
193
|
+
see(room, at) {
|
|
194
|
+
var _a;
|
|
195
|
+
var _b;
|
|
196
|
+
if (((_b = this.state.seen[room]) !== null && _b !== void 0 ? _b : 0) >= at) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
const seen = { ...this.state.seen, [room]: at };
|
|
200
|
+
this.set({ seen });
|
|
201
|
+
void ((_a = exports.pi.storage) === null || _a === void 0 ? void 0 : _a.set(SEEN_KEY, seen).catch(() => undefined));
|
|
202
|
+
}
|
|
203
|
+
readSeen() {
|
|
204
|
+
if (this.seenRead || !exports.pi.storage) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
this.seenRead = true;
|
|
208
|
+
void exports.pi.storage
|
|
209
|
+
.get(SEEN_KEY)
|
|
210
|
+
.then(seen => {
|
|
211
|
+
if (seen && typeof seen === 'object') {
|
|
212
|
+
this.set({ seen: { ...seen, ...this.state.seen } });
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
.catch(() => undefined);
|
|
216
|
+
}
|
|
217
|
+
read(next) {
|
|
218
|
+
var _a;
|
|
219
|
+
var _b, _c;
|
|
220
|
+
const before = new Map(((_b = this.state.rooms) !== null && _b !== void 0 ? _b : []).map(room => [room.id, room]));
|
|
221
|
+
const known = this.state.rooms !== undefined;
|
|
222
|
+
this.set(next);
|
|
223
|
+
const changes = ((_c = next.rooms) !== null && _c !== void 0 ? _c : [])
|
|
224
|
+
.filter(room => { var _a; return !known || ((_a = before.get(room.id)) === null || _a === void 0 ? void 0 : _a.status) !== room.status; })
|
|
225
|
+
.map(room => ({ before: before.get(room.id), room }));
|
|
226
|
+
if (known && changes.length) {
|
|
227
|
+
(_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, changes);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
exports.RoomBook = RoomBook;
|
|
232
|
+
exports.book = new RoomBook();
|
|
233
|
+
function useBook() {
|
|
234
|
+
const state = react_1.React.useSyncExternalStore(listener => exports.book.subscribe(listener), () => exports.book.get());
|
|
235
|
+
react_1.React.useEffect(() => {
|
|
236
|
+
void exports.book.load();
|
|
237
|
+
}, []);
|
|
238
|
+
return state;
|
|
239
|
+
}
|
|
240
|
+
const NO_LINES = [];
|
|
241
|
+
const NO_AGENTS = [];
|
|
242
|
+
const NO_JOINING = [];
|
|
243
|
+
const NO_STOP = () => undefined;
|
|
244
|
+
/** What was said in a room, as it changes; nothing for one not joined. */
|
|
245
|
+
function useLines(room) {
|
|
246
|
+
const chat = room.status === 'member' ? exports.book.chat(room.id) : undefined;
|
|
247
|
+
return react_1.React.useSyncExternalStore(listener => { var _a; return (_a = chat === null || chat === void 0 ? void 0 : chat.subscribe(listener)) !== null && _a !== void 0 ? _a : NO_STOP; }, () => { var _a; return (_a = chat === null || chat === void 0 ? void 0 : chat.lines) !== null && _a !== void 0 ? _a : NO_LINES; });
|
|
248
|
+
}
|
|
249
|
+
/** The agents invited to a room, as they come and go; none for one not joined. */
|
|
250
|
+
function useAgents(room) {
|
|
251
|
+
const member = room.status === 'member';
|
|
252
|
+
return react_1.React.useSyncExternalStore(listener => exports.book.subscribe(listener), () => (member ? exports.book.agents(room.id) : NO_AGENTS));
|
|
253
|
+
}
|
|
254
|
+
/** The agents the user invites to a room, till they said hello there. */
|
|
255
|
+
function useJoining(room) {
|
|
256
|
+
return react_1.React.useSyncExternalStore(listener => exports.book.subscribe(listener), () => exports.book.joining(room.id));
|
|
257
|
+
}
|
|
258
|
+
/** Said in a room by others since the user saw it last (or joined). */
|
|
259
|
+
function unseen(room, lines, seen) {
|
|
260
|
+
var _a;
|
|
261
|
+
var _b, _c;
|
|
262
|
+
const self = (_a = room.members.find(member => member.self)) === null || _a === void 0 ? void 0 : _a.member;
|
|
263
|
+
const since = (_c = (_b = seen[room.id]) !== null && _b !== void 0 ? _b : room.joinedAt) !== null && _c !== void 0 ? _c : room.createdAt;
|
|
264
|
+
const last = lines[lines.length - 1];
|
|
265
|
+
return !!last && last.at > since && last.from !== self;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Shows a room: its chat, over the list on a phone, beside it elsewhere; `direct` from elsewhere than the list, on a phone
|
|
269
|
+
* without the list under it, so that back goes where the user came from.
|
|
270
|
+
*/
|
|
271
|
+
function openRoom(id, direct = false) {
|
|
272
|
+
exports.book.set({ opened: id, direct });
|
|
273
|
+
void exports.pi.ui.showView(exports.ROOMS_VIEW);
|
|
274
|
+
}
|
|
275
|
+
/** The room shown, while it is one the user is in. */
|
|
276
|
+
function useOpened() {
|
|
277
|
+
const { rooms: list, opened } = useBook();
|
|
278
|
+
return opened ? list === null || list === void 0 ? void 0 : list.find(room => room.id === opened && room.status === 'member') : undefined;
|
|
279
|
+
}
|
|
280
|
+
/** A phone, or a window as narrow: the list, and a room pushed over it, rather than the two side by side. */
|
|
281
|
+
function useCompact() {
|
|
282
|
+
var _a, _b;
|
|
283
|
+
var _c;
|
|
284
|
+
return ((_c = (_b = (_a = exports.pi.ui).useDevice) === null || _b === void 0 ? void 0 : _b.call(_a).layout) !== null && _c !== void 0 ? _c : 'expanded') === 'compact';
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* The page that shows a room of another extension (its `view`), for its icon and its title: the page knows no kind of
|
|
288
|
+
* room, the extension that made it says by its view. None for a room of this page, or a view not installed here.
|
|
289
|
+
*/
|
|
290
|
+
function usePageOf(room) {
|
|
291
|
+
var _a, _b;
|
|
292
|
+
var _c, _d;
|
|
293
|
+
const pages = (_c = (_b = (_a = exports.pi.ui).usePages) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : [];
|
|
294
|
+
const view = room.view;
|
|
295
|
+
if (!view || view === exports.ROOMS_VIEW) {
|
|
296
|
+
return undefined;
|
|
297
|
+
}
|
|
298
|
+
// One started on open is a page by the name of its extension, till it is.
|
|
299
|
+
return (_d = pages.find(page => page.id === view)) !== null && _d !== void 0 ? _d : pages.find(page => page.onOpen && view.startsWith(`${page.id}/`));
|
|
300
|
+
}
|
|
301
|
+
/** What a row says of a room under its title when nothing was said in it. */
|
|
302
|
+
function statusLine(room) {
|
|
303
|
+
switch (room.status) {
|
|
304
|
+
case 'waiting':
|
|
305
|
+
return t('waiting', { name: room.ownerName });
|
|
306
|
+
case 'refused':
|
|
307
|
+
return t('refused', { name: room.ownerName });
|
|
308
|
+
case 'gone':
|
|
309
|
+
return room.reason === 'removed' ? t('removed') : room.reason === 'invite' ? t('inviteGone') : t('closed');
|
|
310
|
+
}
|
|
311
|
+
if (!room.connected) {
|
|
312
|
+
return t('connecting');
|
|
313
|
+
}
|
|
314
|
+
const online = room.members.filter(member => member.online).length;
|
|
315
|
+
return t('people', { n: room.members.length, online });
|
|
316
|
+
}
|
|
317
|
+
/** When, as a list of chats says it: the time today, yesterday, the day of the week this week, else the date. */
|
|
318
|
+
function when(at, now = Date.now()) {
|
|
319
|
+
const date = new Date(at);
|
|
320
|
+
const today = new Date(now);
|
|
321
|
+
today.setHours(0, 0, 0, 0);
|
|
322
|
+
const day = 24 * 60 * 60 * 1000;
|
|
323
|
+
const language = exports.pi.ui.language;
|
|
324
|
+
if (at >= today.getTime()) {
|
|
325
|
+
return date.toLocaleTimeString(language, { hour: '2-digit', minute: '2-digit' });
|
|
326
|
+
}
|
|
327
|
+
if (at >= today.getTime() - day) {
|
|
328
|
+
return t('yesterday');
|
|
329
|
+
}
|
|
330
|
+
if (at >= today.getTime() - 6 * day) {
|
|
331
|
+
return date.toLocaleDateString(language, { weekday: 'short' });
|
|
332
|
+
}
|
|
333
|
+
return date.toLocaleDateString(language, { month: 'numeric', day: 'numeric', ...(date.getFullYear() !== today.getFullYear() ? { year: '2-digit' } : {}) });
|
|
334
|
+
}
|
|
335
|
+
/** One of the colours of the faces of the page (--ta-tint-<n>), the same for the same id. */
|
|
336
|
+
function tint(id) {
|
|
337
|
+
let hash = 0;
|
|
338
|
+
for (const char of id) {
|
|
339
|
+
hash = (hash * 31 + char.charCodeAt(0)) | 0;
|
|
340
|
+
}
|
|
341
|
+
return Math.abs(hash) % 9;
|
|
342
|
+
}
|
|
343
|
+
function initial(name) {
|
|
344
|
+
var _a;
|
|
345
|
+
var _b;
|
|
346
|
+
return (_b = (_a = Array.from(name.trim())[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase()) !== null && _b !== void 0 ? _b : '?';
|
|
347
|
+
}
|
|
348
|
+
/** A face of one of the rooms, as the agents of channels have (`ui.Face`); a letter in a circle in an app of before. */
|
|
349
|
+
function Face({ id, name, size = 34, online, face }) {
|
|
350
|
+
if (exports.pi.ui.Face) {
|
|
351
|
+
return react_1.React.createElement(exports.pi.ui.Face, { seed: id, face: face, size: size, online: online });
|
|
352
|
+
}
|
|
353
|
+
const n = tint(id);
|
|
354
|
+
return (react_1.React.createElement("span", { className: "trm-face", "aria-hidden": "true", style: { width: size, height: size, fontSize: Math.round(size * 0.42), background: `var(--ta-tint-${n})`, color: `var(--ta-tint-ink-${n})` } },
|
|
355
|
+
initial(name),
|
|
356
|
+
online !== undefined && react_1.React.createElement("i", { className: online ? 'trm-on' : 'trm-off' })));
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Those a room is drawn by, as a channel by its members: the others first, its owner in front, then the agents in it, then
|
|
360
|
+
* the user, so that a room of two (the user and an agent) shows both; the user alone in a room of its own.
|
|
361
|
+
*/
|
|
362
|
+
function faceMembers(room, agents = []) {
|
|
363
|
+
const others = room.members.filter(member => !member.self).sort((a, b) => Number(b.owner) - Number(a.owner));
|
|
364
|
+
const all = [...others, ...agents, ...room.members.filter(member => member.self)];
|
|
365
|
+
return all.length ? all : [{ id: room.owner ? room.id : room.ownerName || room.id, name: room.ownerName || room.title }];
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* The face of a room, as a channel is drawn (`ui.GroupFace`): two of those in it, one in front of the other; the icon
|
|
369
|
+
* of the page of its game at a corner; an amber dot for what the user has not read.
|
|
370
|
+
*/
|
|
371
|
+
function RoomFace({ room, size = 40, unread }) {
|
|
372
|
+
var _a, _b, _c;
|
|
373
|
+
var _d, _e;
|
|
374
|
+
const page = usePageOf(room);
|
|
375
|
+
const Mark = page === null || page === void 0 ? void 0 : page.icon;
|
|
376
|
+
const members = faceMembers(room, useAgents(room));
|
|
377
|
+
return (react_1.React.createElement("span", { className: "trm-room-face", style: { width: size, height: size }, "aria-hidden": "true" },
|
|
378
|
+
exports.pi.ui.GroupFace ? (react_1.React.createElement(exports.pi.ui.GroupFace, { members: members.map(member => ({ seed: member.id, face: member.face })), size: size })) : (react_1.React.createElement(Face, { id: (_d = (_a = members[0]) === null || _a === void 0 ? void 0 : _a.id) !== null && _d !== void 0 ? _d : room.id, name: (_e = (_b = members[0]) === null || _b === void 0 ? void 0 : _b.name) !== null && _e !== void 0 ? _e : room.title, face: (_c = members[0]) === null || _c === void 0 ? void 0 : _c.face, size: size })),
|
|
379
|
+
Mark && (react_1.React.createElement("span", { className: "trm-room-face-mark" },
|
|
380
|
+
react_1.React.createElement(Mark, { size: 11, strokeWidth: 2.4 }))),
|
|
381
|
+
unread && react_1.React.createElement("i", { className: "trm-unread" })));
|
|
382
|
+
}
|
|
383
|
+
/** The faces of those in a room, up to five, as the head of a channel shows them; the button shows its members. */
|
|
384
|
+
function MemberFaces({ room, onClick, shown }) {
|
|
385
|
+
const agents = useAgents(room);
|
|
386
|
+
// The people, its owner first, then the agents in it: all who speak there.
|
|
387
|
+
const members = [
|
|
388
|
+
...[...room.members]
|
|
389
|
+
.sort((a, b) => Number(b.owner) - Number(a.owner))
|
|
390
|
+
.map(member => ({ key: member.member, id: member.id, name: member.name, face: undefined })),
|
|
391
|
+
...agents.map(agent => ({ key: `${agent.member}/${agent.id}`, id: agent.id, name: agent.name, face: agent.face })),
|
|
392
|
+
];
|
|
393
|
+
return (react_1.React.createElement("button", { type: "button", className: `trm-faces${shown ? ' trm-on-icon' : ''}`, title: t('members'), "aria-label": t('members'), "aria-pressed": shown, onClick: onClick },
|
|
394
|
+
members.slice(0, 5).map(member => (react_1.React.createElement("span", { key: member.key, className: "trm-faces-one" },
|
|
395
|
+
react_1.React.createElement(Face, { id: member.id, name: member.name, face: member.face, size: 24 })))),
|
|
396
|
+
members.length > 5 && react_1.React.createElement("span", { className: "trm-faces-more" },
|
|
397
|
+
"+",
|
|
398
|
+
members.length - 5)));
|
|
399
|
+
}
|
|
400
|
+
//# sourceMappingURL=page.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as ReactModule from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The React of the page, which a web extension cannot import: `activate` binds it before anything
|
|
4
|
+
* renders. The JSX of this package compiles to `React.createElement` (tsconfig.json).
|
|
5
|
+
*/
|
|
6
|
+
export declare let React: typeof ReactModule;
|
|
7
|
+
export declare function bind(react: typeof ReactModule): void;
|
|
8
|
+
//# sourceMappingURL=react.d.ts.map
|