@celljs/ta 4.9.1 → 4.11.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 +1753 -75
- package/dist/gateway.mjs +311 -25
- package/dist/pi/CHANGELOG.md +30 -0
- package/dist/pi/dist/bundle/chunks/anthropic-messages-CA3HHOL3.js +6 -0
- package/dist/pi/dist/bundle/chunks/{azure-openai-responses-FSC6BAW3.js → azure-openai-responses-76TWS6DT.js} +1 -1
- package/dist/pi/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
- package/dist/pi/dist/bundle/chunks/chunk-4KSTFUIK.js +19 -0
- package/dist/pi/dist/bundle/chunks/chunk-4UNPP53I.js +55 -0
- package/dist/pi/dist/bundle/chunks/chunk-AUUCDC7R.js +4 -0
- package/dist/pi/dist/bundle/chunks/{chunk-V6KH5QG4.js → chunk-BAC3QPNW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-4EYXVSA5.js → chunk-FF6XOTWB.js} +9 -9
- package/dist/pi/dist/bundle/chunks/chunk-FMPAMX2W.js +82 -0
- package/dist/pi/dist/bundle/chunks/chunk-GFUN2N5K.js +2 -0
- package/dist/pi/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
- package/dist/pi/dist/bundle/chunks/{chunk-C2WU32PX.js → chunk-IQUU5XIT.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-EBFHJFEE.js → chunk-LQLJ7CDW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-MMDXLZVS.js +30 -0
- package/dist/pi/dist/bundle/chunks/{chunk-GN3QYODH.js → chunk-QN4TOIZN.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-RKNK4Y6L.js +2 -0
- package/dist/pi/dist/bundle/chunks/{chunk-B46VJEHW.js → chunk-V7SLUK6A.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-VEJDBY3O.js +1237 -0
- package/dist/pi/dist/bundle/chunks/chunk-VKJQ6CME.js +8 -0
- package/dist/pi/dist/bundle/chunks/{chunk-3TGLJEWK.js → chunk-WL4TUXY7.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-YZKQS34S.js → chunk-Y55SJART.js} +5 -1
- package/dist/pi/dist/bundle/chunks/{chunk-EOO47QGR.js → chunk-ZBIZYD6W.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
- package/dist/pi/dist/bundle/chunks/chunk-ZGYS4UTC.js +2 -0
- package/dist/pi/dist/bundle/chunks/{cli-MCOUW5WS.js → cli-7RHMDOHL.js} +7 -7
- package/dist/pi/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLAFJSP6.js → cloudflare-workers-ai-system-one-U4J7D646.js} +1 -1
- package/dist/pi/dist/bundle/chunks/codemode-worker.js +2 -0
- package/dist/pi/dist/bundle/chunks/{easter-egg-3d-WMBNSJ4M.js → easter-egg-3d-GEVPKQF6.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{execute-4CEBORGZ.js → execute-L2EEDV3L.js} +5 -3
- package/dist/pi/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/pi/dist/bundle/chunks/{google-generative-ai-INGKNW72.js → google-generative-ai-D5B6W47J.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{google-vertex-IBTX6MBF.js → google-vertex-U4H5YDEW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{llama-cpp-classify-V5U3QKXI.js → llama-cpp-classify-EJXCQRUQ.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{mistral-conversations-S4OWXIXQ.js → mistral-conversations-S277EKLB.js} +1 -1
- package/dist/pi/dist/bundle/chunks/openai-codex-responses-TEQRB65N.js +10 -0
- package/dist/pi/dist/bundle/chunks/{openai-completions-EJNYB6IX.js → openai-completions-HRZOSLBO.js} +3 -3
- package/dist/pi/dist/bundle/chunks/{openai-decisions-IXI34BYG.js → openai-decisions-F66BDLOM.js} +1 -1
- package/dist/pi/dist/bundle/chunks/openai-responses-BAKFWTGE.js +4 -0
- package/dist/pi/dist/bundle/chunks/{openrouter-images-PISKSFMS.js → openrouter-images-VXF5TVIK.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{pi-messages-NORUKF4E.js → pi-messages-UBJKNDRN.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{runtime-FQB7RU7U.js → runtime-J5ZSBGTX.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{typesafe-system-one-CHVC2UUI.js → typesafe-system-one-56TEMIHL.js} +1 -1
- package/dist/pi/dist/bundle/chunks/virtual-modules-KITQRTYM.js +2 -0
- package/dist/pi/dist/bundle/cli-runtime.js +1 -1
- package/dist/pi/dist/bundle/index.js +1 -1
- package/dist/pi/dist/bundle/rpc-entry.js +1 -1
- package/dist/pi/docs/cli.md +14 -1
- package/dist/pi/docs/extensions.md +27 -7
- package/dist/pi/docs/keybindings.md +1 -1
- package/dist/pi/docs/llama-cpp.md +5 -8
- package/dist/pi/docs/models-configuration.md +6 -1
- package/dist/pi/docs/models.md +2 -1
- package/dist/pi/docs/prompt-templates.md +1 -1
- package/dist/pi/docs/providers.md +1 -1
- package/dist/pi/docs/rpc.md +4 -2
- package/dist/pi/docs/sessions.md +7 -1
- package/dist/pi/docs/settings.md +1 -1
- package/dist/pi/docs/tui.md +1 -1
- package/dist/pi/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/dist/pi/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/dist/pi/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/dist/pi/examples/extensions/gondolin/package-lock.json +2 -2
- package/dist/pi/examples/extensions/gondolin/package.json +1 -1
- package/dist/pi/examples/extensions/plan-mode/index.ts +23 -13
- package/dist/pi/examples/extensions/plan-mode/utils.ts +42 -16
- package/dist/pi/examples/extensions/subagent/README.md +14 -11
- package/dist/pi/examples/extensions/subagent/index.ts +392 -171
- package/dist/pi/examples/extensions/with-deps/package-lock.json +2 -2
- package/dist/pi/examples/extensions/with-deps/package.json +1 -1
- package/dist/pi/examples/tsconfig.json +63 -35
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-agents/extension/index.mjs +185 -140
- package/dist/pi/packages/ta-agents/lib/acp-agent.js +30 -10
- package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-bindings.js +4 -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 +6 -0
- package/dist/pi/packages/ta-agents/lib/agent-prompt.js +19 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.js +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-streamer.js +7 -0
- package/dist/pi/packages/ta-agents/lib/agent-tool.js +3 -2
- package/dist/pi/packages/ta-agents/lib/extension.js +15 -1
- package/dist/pi/packages/ta-agents/lib/texts.d.ts +4 -0
- package/dist/pi/packages/ta-agents/lib/texts.js +4 -0
- package/dist/pi/packages/ta-agents/package.json +3 -3
- package/dist/pi/packages/ta-bots/extension/index.mjs +31 -253
- package/dist/pi/packages/ta-bots/host/index.mjs +189 -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 +6 -5
- package/dist/pi/packages/ta-channels/README.md +6 -5
- package/dist/pi/packages/ta-channels/extension/index.mjs +350 -28
- package/dist/pi/packages/ta-channels/host/index.mjs +638 -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 +14 -4
- 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 +7 -1
- 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 +49 -8
- package/dist/pi/packages/ta-channels/lib/i18n.js +98 -16
- 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/more-menu.d.ts +3 -2
- package/dist/pi/packages/ta-channels/lib/more-menu.js +21 -29
- 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 +26 -10
- package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +1 -6
- package/dist/pi/packages/ta-channels/lib/sidebar.js +257 -84
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +151 -40
- package/dist/pi/packages/ta-channels/lib/tasks.js +3 -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 +54 -1
- package/dist/pi/packages/ta-channels/lib/views.js +129 -1
- package/dist/pi/packages/ta-channels/package.json +2 -1
- package/dist/pi/packages/ta-channels/web/index.js +1792 -439
- package/dist/pi/packages/ta-computer-use/package.json +7 -2
- package/dist/pi/packages/ta-cron/README.en.md +6 -4
- package/dist/pi/packages/ta-cron/README.md +6 -4
- package/dist/pi/packages/ta-cron/extension/index.mjs +416 -44
- package/dist/pi/packages/ta-cron/host/index.mjs +30 -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 +65 -30
- 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 +30 -1
- package/dist/pi/packages/ta-cron/lib/i18n.js +60 -2
- package/dist/pi/packages/ta-cron/lib/index.js +4 -0
- package/dist/pi/packages/ta-cron/lib/page.d.ts +38 -4
- package/dist/pi/packages/ta-cron/lib/page.js +131 -4
- 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 +168 -50
- package/dist/pi/packages/ta-cron/lib/task-extension.d.ts +15 -0
- package/dist/pi/packages/ta-cron/lib/task-extension.js +56 -0
- package/dist/pi/packages/ta-cron/lib/task-util.d.ts +4 -0
- package/dist/pi/packages/ta-cron/lib/task-util.js +31 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.d.ts +4 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +107 -67
- 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 +1346 -415
- package/dist/pi/packages/ta-extensions/README.en.md +4 -2
- package/dist/pi/packages/ta-extensions/README.md +4 -2
- 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 +16 -5
- package/dist/pi/packages/ta-extensions/lib/composer.d.ts +17 -0
- package/dist/pi/packages/ta-extensions/lib/composer.js +84 -0
- 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/i18n.d.ts +9 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.js +18 -0
- package/dist/pi/packages/ta-extensions/lib/index.js +4 -0
- package/dist/pi/packages/ta-extensions/lib/make-model.d.ts +20 -0
- package/dist/pi/packages/ta-extensions/lib/make-model.js +43 -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 +52 -23
- 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/settings.d.ts +4 -0
- package/dist/pi/packages/ta-extensions/lib/settings.js +44 -0
- package/dist/pi/packages/ta-extensions/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/style.js +13 -6
- package/dist/pi/packages/ta-extensions/package.json +6 -1
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +25 -10
- package/dist/pi/packages/ta-extensions/web/index.js +459 -47
- 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 +268 -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 +6 -0
- package/dist/pi/packages/ta-glance/lib/glance-spec.js +204 -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 +164 -0
- package/dist/pi/packages/ta-glance/package.json +53 -0
- package/dist/pi/packages/ta-glance/web/index.js +933 -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.d.ts +9 -0
- package/dist/pi/packages/ta-manual/lib/pictures.js +16 -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 +42 -0
- package/dist/pi/packages/ta-manual/lib/topics.js +354 -0
- package/dist/pi/packages/ta-manual/package.json +54 -0
- package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +119 -0
- package/dist/pi/packages/ta-manual/web/index.js +2223 -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 +614 -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 +46 -0
- package/dist/pi/packages/ta-recall/lib/extension.d.ts +24 -0
- package/dist/pi/packages/ta-recall/lib/extension.js +131 -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 +1038 -0
- package/dist/pi/packages/ta-rooms/README.en.md +23 -0
- package/dist/pi/packages/ta-rooms/README.md +23 -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/i18n.d.ts +101 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.js +203 -0
- package/dist/pi/packages/ta-rooms/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-rooms/lib/index.js +85 -0
- package/dist/pi/packages/ta-rooms/lib/members-view.d.ts +3 -0
- package/dist/pi/packages/ta-rooms/lib/members-view.js +64 -0
- package/dist/pi/packages/ta-rooms/lib/page.d.ts +105 -0
- package/dist/pi/packages/ta-rooms/lib/page.js +306 -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 +17 -0
- package/dist/pi/packages/ta-rooms/lib/room-view.js +150 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-page.d.ts +8 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-page.js +174 -0
- package/dist/pi/packages/ta-rooms/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-rooms/lib/style.js +154 -0
- package/dist/pi/packages/ta-rooms/package.json +50 -0
- package/dist/pi/packages/ta-rooms/web/index.js +1932 -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 +54 -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 +111 -0
- package/dist/pi/packages/ta-share/package.json +56 -0
- package/dist/pi/packages/ta-share/web/index.js +1197 -0
- package/dist/pi/packages/ta-workspace/README.md +2 -2
- package/dist/pi/packages/ta-workspace/README.zh-cn.md +2 -2
- 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/bytes.d.ts +11 -0
- package/dist/pi/packages/ta-workspace/lib/bytes.js +40 -0
- package/dist/pi/packages/ta-workspace/lib/common.d.ts +2 -1
- package/dist/pi/packages/ta-workspace/lib/common.js +15 -37
- package/dist/pi/packages/ta-workspace/lib/editors.js +40 -4
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +14 -4
- package/dist/pi/packages/ta-workspace/lib/i18n.js +31 -11
- package/dist/pi/packages/ta-workspace/lib/index.js +17 -0
- package/dist/pi/packages/ta-workspace/lib/launcher.d.ts +9 -0
- package/dist/pi/packages/ta-workspace/lib/launcher.js +39 -0
- package/dist/pi/packages/ta-workspace/lib/preview.d.ts +22 -3
- package/dist/pi/packages/ta-workspace/lib/preview.js +150 -22
- package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/style.js +70 -41
- 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/keys.d.ts +18 -0
- package/dist/pi/packages/ta-workspace/lib/util/keys.js +23 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts +46 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.js +106 -1
- 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 +1032 -382
- package/dist/public/assets/OrbitControls-DVf70a7w.js +1 -0
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-EVMX_yOb.js → abnfDiagram-S7VZAUFO-D9uU0Tx2.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-CDgbgZ_o.js → architecture-WOLXFQ4H-f7Nm7EIo.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-dHreaCWz.js → architectureDiagram-YGSQEFNW-DSAqlcms.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-D6FhzBDq.js → blockDiagram-APKKGZFW-C0lPIW9g.js} +1 -1
- package/dist/public/assets/browser-WLpgVYno.js +12 -0
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-BFpcr8Cs.js → c4Diagram-KJ2TOQU5-CDcZ7mJq.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-BczXkMV-.js → chunk-6MUBBAK2-CXPuyqPL.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-CjJsv3jB.js → chunk-AXFCVDMN-Du6JRX1x.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-FBaleaLz.js → chunk-BG4553SI-D592E55X.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-BFdXY5sX.js → chunk-DQASFODM-BW2r2SL4.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-C5cwK-Fg.js → chunk-HFQBQIA3-C3yoe54R.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-BUek3IRk.js → chunk-KQLB2F66-DF8gfYCy.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-BxsYBzt6.js → chunk-KS47KZWR-C8CRMTv1.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-Bdcwz9fS.js → chunk-LEVMRMFU-BDcMKiwj.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-kkpP5oug.js → chunk-M57EVK23-CKJPBygc.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-CFhQgxmD.js → chunk-OY52VR5R-B3ZWH07L.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-BVXqu0eC.js → chunk-QB3YPZ4I-DI-z4UPL.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-B7SUqqLI.js → chunk-R3KSYZAL-Bg4-haAc.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-B3abfbnH.js → chunk-STOXU5M4-l_SHib3p.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-C9NqnUav.js → chunk-TU62E6Q5-BINu9tIm.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-BeLfETDx.js → chunk-X4PVCEUW-BQn-mvV5.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-DXai1i8p.js → chunk-XXDRQBXY-uvpAu0Ys.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-Zj6ne_tC.js → classDiagram-v2-L25IHNXF-BIowooW1.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-C0-TjqfJ.js → cose-bilkent-JH36ORCC-BTyx1Mh2.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dg54eFzZ.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-BnqxfzPa.js → cynefinDiagram-L36ESFBY-D64EU9I0.js} +1 -1
- package/dist/public/assets/{d3-selection-DfFLTR9d.js → d3-selection-CN9k6_B9.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-kI17e5cH.js → dagre-SPEB5RXH-FCbz2-Kk.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-DgPjeLA5.js → diagram-3B7GL73J-OhHUSI7j.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-CRhPfa0I.js → diagram-DNEMPZML-Be4xMtp6.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-ExuTg12b.js → diagram-L3MUGCDN-CmKSs3aG.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-Dgx5xNiY.js → diagram-LA4NIPWU-D1C32rMN.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-BuifkUTl.js → diagram-MHCOC4E2-BjoE6JXs.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-CFEaBo7z.js → diagram-XPFHEONP-B22k4v8R.js} +1 -1
- package/dist/public/assets/{dist-C-iJHcSK.js → dist-DcBP8Cf6.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-D-hp5yNt.js → ebnfDiagram-UZSYDL2S-Tn-K8-X7.js} +1 -1
- package/dist/public/assets/{editor.api-BopUWpqY.js → editor.api-Bz4sjRz_.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-CBbk_IpU.js → elk-XV6XMXQE-COnQsWlN.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-B02R_WWE.js → erDiagram-EYBAPDEH-c53dJilq.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-aCZfYnCI.js → eventmodeling-K75KTNOO-DaFpPPks.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-V5qkYWIO.js +1 -0
- package/dist/public/assets/{freemarker2-DMN60LeK.js → freemarker2-BLxfRHsw.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-DioU8TlD.js → ganttDiagram-23REXITY-Md-SavIS.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-1q8ldRXU.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW--q3ctg6y.js → gitGraphDiagram-STJD7YCW-CMSwTghO.js} +1 -1
- package/dist/public/assets/{handlebars-B_-qdvpB.js → handlebars-sNpu01kP.js} +1 -1
- package/dist/public/assets/{html-BN8Ah3Js.js → html-C_tKd-uP.js} +1 -1
- package/dist/public/assets/{index-B3A--ac8.js → index-Bn86rI4n.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-Crere6sx.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-CGXteYo9.js → infoDiagram-KBXO4MBG-CwgNj-7i.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-DM2LmOAc.js → ishikawaDiagram-M35NCXHK-BSlzQNMN.js} +1 -1
- package/dist/public/assets/{javascript-BlizGb0q.js → javascript-l3qKw0L-.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-CNITRtGl.js → journeyDiagram-OPLOXDXO-B09LPEnF.js} +1 -1
- package/dist/public/assets/{jsonMode-CEUmT5sN.js → jsonMode-5SQQn1EX.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-BPUuS9um.js → kanban-definition-BZKZHSQY-BiW4aJ29.js} +1 -1
- package/dist/public/assets/{liquid-BbyLjUbE.js → liquid-BGyTIIUt.js} +1 -1
- package/dist/public/assets/{mdx-DiQz7Q35.js → mdx-8tGjz4em.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-Dum100hC.js → mermaid-parser.core-CctN5b0z.js} +3 -3
- package/dist/public/assets/{mermaid.core-BWmWf6XO.js → mermaid.core-7ERSdZ4-.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-L8HyYUDY.js → mindmap-definition-I2QAS2VK-D-GOUwW1.js} +1 -1
- package/dist/public/assets/module-DEqsdd00.js +1 -0
- package/dist/public/assets/module-TWc52XwT.js +2244 -0
- package/dist/public/assets/{monaco-zOOyBmxy.js → monaco-B_9hlk78.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-qMf5LkHT.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-CTZKPo0Z.js → pegDiagram-FD4XPPHP-Dmy1fWB3.js} +1 -1
- package/dist/public/assets/phaser.esm-BxCDEWDb.js +3202 -0
- package/dist/public/assets/pie-XZMESJXO-BjqLn4qm.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-DAeT3dFi.js → pieDiagram-J4AKIIQI-CXFHLYTg.js} +1 -1
- package/dist/public/assets/{python-C984gt98.js → python-e-JK0s5M.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2--PXxwV1Z.js → quadrantDiagram-XTYBLID2-RQvEpGWO.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-DWO6t_4C.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-D1XOJPWy.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-BYcFfrCa.js → railroad-abnf-LNEFI6M7-CDOSPZwX.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-Cd33qxAm.js → railroad-ebnf-DWYD2UWJ-BTrNQ0DX.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-C5TpzaU8.js → railroad-peg-JR7BVNR7-B7NtVofS.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-DlWwjbhH.js → railroadDiagram-MRQ6NCDL-DsDrT0Jf.js} +1 -1
- package/dist/public/assets/{razor-BBqMR1Qn.js → razor-DtSPwumi.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CsYBy9HS.js → requirementDiagram-Y7LWUY3S-BQh0hFuA.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-Baxyb5p9.js → sankeyDiagram-WGJFYUXA-BUXNAQEF.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-Cq6VeBT_.js → sequenceDiagram-5NDRBG5M-05f-N5V_.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-O60WKaE7.js → stateDiagram-v2-FJ4FJNEA-D6V1fGWV.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-C2nf1-Cc.js → swimlanes-UMQ2AFYF-DWhlPvKs.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-CRn5uHsY.js +8 -0
- package/dist/public/assets/three.module-CeVBJVoU.js +4225 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-DEfUG6YH.js → timeline-definition-SEUHKTQE-CMdocOui.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-D09wHNzT.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-ChxAT7Fq.js +1 -0
- package/dist/public/assets/{typescript-Gtq7f0aU.js → typescript-65jNyipU.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-Gw9DyJcx.js → usecaseDiagram-AFA6YXN4-BQTHUX1f.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-Clb3MLWF.js → vennDiagram-NNMJR3RB-BULkVTfA.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-DfSjKzbJ.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-BrTRpwu2.js → wardleyDiagram-S7YFUSEH-Cek6l8lz.js} +1 -1
- package/dist/public/assets/{xml-Bx3nk7iG.js → xml-DWBejfu-.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-BfjTcIsb.js → xychartDiagram-GGNKY7IX-ujnZQTWA.js} +1 -1
- package/dist/public/assets/{yaml-dFLE_rSl.js → yaml-CwRCT7q1.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/public/launch.svg +46 -42
- package/dist/serve/index.mjs +8244 -3756
- package/package.json +33 -26
- package/dist/pi/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +0 -6
- package/dist/pi/dist/bundle/chunks/chunk-44DLKSKE.js +0 -1232
- package/dist/pi/dist/bundle/chunks/chunk-62VOPMLK.js +0 -65
- package/dist/pi/dist/bundle/chunks/chunk-7O7QKK6A.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-CHWNPHIS.js +0 -82
- package/dist/pi/dist/bundle/chunks/chunk-NL4X6LBY.js +0 -4
- package/dist/pi/dist/bundle/chunks/chunk-NZY7EIPA.js +0 -4
- package/dist/pi/dist/bundle/chunks/chunk-R2EGYMOO.js +0 -7
- package/dist/pi/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-VOLAXWGI.js +0 -2
- package/dist/pi/dist/bundle/chunks/openai-codex-responses-QAWLOQSN.js +0 -10
- package/dist/pi/dist/bundle/chunks/openai-responses-MD3562FB.js +0 -4
- package/dist/pi/dist/bundle/chunks/virtual-modules-O76XM3OB.js +0 -2
- package/dist/public/assets/browser-y6EDNUmc.js +0 -12
- package/dist/public/assets/cynefin-EF2NZ3EQ-CoY4CrZu.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-CATkJShO.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-g4yHXXxx.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-CKADJjz4.js +0 -1
- package/dist/public/assets/module-CH7IXa5L.js +0 -1781
- package/dist/public/assets/module-DNAasuMC.js +0 -1
- package/dist/public/assets/packet-JDAUHWVQ-CpKMhX4K.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-CW-zGDRd.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-Cg8W433p.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-DriMt2PQ.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-B46JxqS8.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-1LhEWwC9.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-D3t3N7nS.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-D3sAsd8p.js +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = activate;
|
|
4
|
+
const relay_hub_util_1 = require("@celljs/ta-relay/lib/common/relay-hub-util");
|
|
5
|
+
const dialogs_1 = require("./dialogs");
|
|
6
|
+
const members_view_1 = require("./members-view");
|
|
7
|
+
const page_1 = require("./page");
|
|
8
|
+
const react_1 = require("./react");
|
|
9
|
+
const rooms_page_1 = require("./rooms-page");
|
|
10
|
+
const style_1 = require("./style");
|
|
11
|
+
/** A room joined this soon after asking opens at once: the user is waiting for it. */
|
|
12
|
+
const OPEN_WITHIN_MS = 15 * 60 * 1000;
|
|
13
|
+
/** What the user is told as rooms they asked to join or are in change. */
|
|
14
|
+
function tell(pi, changes) {
|
|
15
|
+
for (const { before, room } of changes) {
|
|
16
|
+
if ((before === null || before === void 0 ? void 0 : before.status) === 'waiting' && room.status === 'member') {
|
|
17
|
+
pi.ui.notify((0, page_1.t)('admitted', { title: room.title }));
|
|
18
|
+
if (Date.now() - room.createdAt < OPEN_WITHIN_MS) {
|
|
19
|
+
if (room.view) {
|
|
20
|
+
void pi.ui.showView(room.view);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
(0, page_1.openRoom)(room.id);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else if ((before === null || before === void 0 ? void 0 : before.status) === 'waiting' && room.status === 'refused') {
|
|
28
|
+
pi.ui.notify((0, page_1.t)('refusedNotice', { by: room.ownerName, title: room.title }), 'warning');
|
|
29
|
+
}
|
|
30
|
+
else if ((before === null || before === void 0 ? void 0 : before.status) === 'member' && room.status === 'gone') {
|
|
31
|
+
pi.ui.notify(room.reason === 'removed' ? (0, page_1.t)('removedNotice', { title: room.title }) : (0, page_1.t)('closedNotice', { title: room.title }), 'warning');
|
|
32
|
+
if (page_1.book.get().opened === room.id) {
|
|
33
|
+
page_1.book.set({ opened: undefined });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Rooms of Ta (docs/design/ta-link.md 3): the page under Discover (the rooms as a messenger lists its chats, a room
|
|
40
|
+
* its group chat), the members of the room shown in the workbench, the dialog of those asking to join (the owner
|
|
41
|
+
* answers it, nobody else), links that invite (asking the user, then the owner), and what the user is told as rooms
|
|
42
|
+
* change. The rooms themselves are ta serve's (pi.rooms): this only shows them.
|
|
43
|
+
*/
|
|
44
|
+
function activate(pi) {
|
|
45
|
+
var _a;
|
|
46
|
+
(0, react_1.bind)(pi.React);
|
|
47
|
+
(0, page_1.bindPage)(pi);
|
|
48
|
+
const removeStyle = (0, style_1.injectStyle)();
|
|
49
|
+
pi.registerView('rooms', { title: () => (0, page_1.t)('roomsTitle'), icon: (0, page_1.icon)('Users'), render: rooms_page_1.RoomsPage, head: rooms_page_1.RoomsHead, discover: true, order: 81 });
|
|
50
|
+
pi.registerView('members', { title: () => (0, page_1.t)('membersTitle'), icon: (0, page_1.icon)('Users'), render: members_view_1.MembersView, location: 'panel', order: 90 });
|
|
51
|
+
pi.registerOpener(link => {
|
|
52
|
+
if (link.type !== 'url' || !relay_hub_util_1.RelayHubUtil.is(link.url)) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
(0, dialogs_1.openJoin)(link.url);
|
|
56
|
+
return true;
|
|
57
|
+
}, { specific: true });
|
|
58
|
+
// What was said, without the messages of games: the rows of the list and the chats keep it as it comes.
|
|
59
|
+
// An app older than rooms: the page says to update.
|
|
60
|
+
const stop = (_a = pi.onRoomEvent) === null || _a === void 0 ? void 0 : _a.call(pi, event => {
|
|
61
|
+
if (event.type === 'request') {
|
|
62
|
+
void page_1.book.load().then(() => (0, dialogs_1.openRequests)());
|
|
63
|
+
}
|
|
64
|
+
else if (event.type === 'rooms') {
|
|
65
|
+
page_1.book.reload();
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
page_1.book.heard(event);
|
|
69
|
+
}
|
|
70
|
+
}, { messages: false, state: page_1.CHAT_STATE });
|
|
71
|
+
page_1.book.onChange = changes => tell(pi, changes);
|
|
72
|
+
if (pi.rooms) {
|
|
73
|
+
void page_1.book.load().then(() => {
|
|
74
|
+
if (page_1.book.get().requests.length) {
|
|
75
|
+
(0, dialogs_1.openRequests)();
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return () => {
|
|
80
|
+
stop === null || stop === void 0 ? void 0 : stop();
|
|
81
|
+
page_1.book.onChange = undefined;
|
|
82
|
+
removeStyle();
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MembersView = MembersView;
|
|
4
|
+
const dialogs_1 = require("./dialogs");
|
|
5
|
+
const page_1 = require("./page");
|
|
6
|
+
// biome-ignore lint/correctness/noUnusedImports: the JSX below compiles to React.createElement (jsxFactory)
|
|
7
|
+
const react_1 = require("./react");
|
|
8
|
+
const room_view_1 = require("./room-view");
|
|
9
|
+
function MemberRow({ room, member }) {
|
|
10
|
+
const Remove = (0, page_1.icon)('X');
|
|
11
|
+
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);
|
|
12
|
+
return (react_1.React.createElement("li", { className: "trm-member" },
|
|
13
|
+
react_1.React.createElement(page_1.Face, { id: member.id, name: member.name, size: 32, online: member.online }),
|
|
14
|
+
react_1.React.createElement("span", { className: "trm-member-text" },
|
|
15
|
+
react_1.React.createElement("span", { className: "trm-member-name" },
|
|
16
|
+
react_1.React.createElement("span", { className: "trm-ellipsis" }, member.name),
|
|
17
|
+
tags.map(tag => (react_1.React.createElement("span", { key: tag, className: "trm-tag" }, tag)))),
|
|
18
|
+
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'))),
|
|
19
|
+
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); }) },
|
|
20
|
+
react_1.React.createElement(Remove, { size: 15 })))));
|
|
21
|
+
}
|
|
22
|
+
/** A row of the settings of the room: its label, its value quieter on the right. */
|
|
23
|
+
function SettingRow({ label, value, onClick }) {
|
|
24
|
+
const Chevron = (0, page_1.icon)('ChevronRight');
|
|
25
|
+
return (react_1.React.createElement("button", { type: "button", className: "trm-setting", onClick: onClick },
|
|
26
|
+
react_1.React.createElement("span", { className: "trm-setting-label" }, label),
|
|
27
|
+
value && react_1.React.createElement("span", { className: "trm-setting-value trm-ellipsis" }, value),
|
|
28
|
+
react_1.React.createElement(Chevron, { size: 15 })));
|
|
29
|
+
}
|
|
30
|
+
/** The members of the room shown, in the workbench, as a messenger shows the settings of a group. */
|
|
31
|
+
function MembersView() {
|
|
32
|
+
const { identity } = (0, page_1.useBook)();
|
|
33
|
+
const room = (0, page_1.useOpened)();
|
|
34
|
+
const page = (0, page_1.usePageOf)(room !== null && room !== void 0 ? room : { view: undefined });
|
|
35
|
+
if (!room) {
|
|
36
|
+
return (react_1.React.createElement("div", { className: "trm-panel" },
|
|
37
|
+
react_1.React.createElement(page_1.pi.ui.Empty, { title: (0, page_1.t)('noRoomOpen') })));
|
|
38
|
+
}
|
|
39
|
+
const Plus = (0, page_1.icon)('Plus');
|
|
40
|
+
const online = room.members.filter(member => member.online).length;
|
|
41
|
+
return (react_1.React.createElement("div", { className: "trm-panel" },
|
|
42
|
+
react_1.React.createElement("div", { className: "trm-panel-scroll" },
|
|
43
|
+
react_1.React.createElement("div", { className: "trm-panel-top" },
|
|
44
|
+
react_1.React.createElement(page_1.RoomFace, { room: room, size: 44 }),
|
|
45
|
+
react_1.React.createElement("span", { className: "trm-panel-title" },
|
|
46
|
+
react_1.React.createElement("strong", { className: "trm-ellipsis" }, room.title),
|
|
47
|
+
react_1.React.createElement("span", { className: "trm-ellipsis" }, room.owner ? (0, page_1.t)('ownRoom') : (0, page_1.t)('roomOf', { name: room.ownerName })))),
|
|
48
|
+
react_1.React.createElement("div", { className: "trm-panel-label" }, (0, page_1.t)('membersCount', { n: room.members.length, online })),
|
|
49
|
+
react_1.React.createElement("ul", { className: "trm-panel-members" },
|
|
50
|
+
room.owner && (react_1.React.createElement("li", null,
|
|
51
|
+
react_1.React.createElement("button", { type: "button", className: "trm-member trm-member-add", onClick: () => (0, dialogs_1.openInvite)(room) },
|
|
52
|
+
react_1.React.createElement("span", { className: "trm-member-plus" },
|
|
53
|
+
react_1.React.createElement(Plus, { size: 16 })),
|
|
54
|
+
react_1.React.createElement("span", { className: "trm-member-text" },
|
|
55
|
+
react_1.React.createElement("span", { className: "trm-member-name" }, (0, page_1.t)('invite')),
|
|
56
|
+
react_1.React.createElement("span", { className: "trm-member-detail" }, (0, page_1.t)('inviteLine')))))),
|
|
57
|
+
room.members.map(member => (react_1.React.createElement(MemberRow, { key: member.member, room: room, member: member })))),
|
|
58
|
+
react_1.React.createElement("div", { className: "trm-panel-sep" }),
|
|
59
|
+
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) }),
|
|
60
|
+
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)() })),
|
|
61
|
+
react_1.React.createElement("div", { className: "trm-panel-foot" },
|
|
62
|
+
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')))));
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=members-view.js.map
|
|
@@ -0,0 +1,105 @@
|
|
|
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 Words } from './i18n';
|
|
5
|
+
/** The kind of the rooms made here: a group chat, which this page shows (room-view.tsx). */
|
|
6
|
+
export declare const ROOMS_KIND = "ta-rooms";
|
|
7
|
+
/** The page of the rooms (`ui.showView`). */
|
|
8
|
+
export declare const ROOMS_VIEW = "@celljs/ta-rooms/rooms";
|
|
9
|
+
/** The members of the room shown, a tool of the workbench (members-view.tsx). */
|
|
10
|
+
export declare const MEMBERS_VIEW = "@celljs/ta-rooms/members";
|
|
11
|
+
/** What the page hears of the state of the rooms without their messages: what is said (chat.ts). */
|
|
12
|
+
export declare const CHAT_STATE: string[];
|
|
13
|
+
/** The API of the page, bound once by `activate`. */
|
|
14
|
+
export declare let pi: WebExtensionAPI;
|
|
15
|
+
export declare function bindPage(api: WebExtensionAPI): void;
|
|
16
|
+
export declare function t(key: keyof Words, values?: Record<string, string | number>): string;
|
|
17
|
+
/** An icon of the page, or another when the page is older than the icon. */
|
|
18
|
+
export declare function icon(name: string): WebIcon;
|
|
19
|
+
export declare function message(error: unknown): string;
|
|
20
|
+
/** The rooms of ta serve; undefined in an app older than them. */
|
|
21
|
+
export declare function rooms(): WebRooms | undefined;
|
|
22
|
+
export interface BookState {
|
|
23
|
+
identity?: TaIdentity;
|
|
24
|
+
/** Undefined till read. */
|
|
25
|
+
rooms?: TaRoomInfo[];
|
|
26
|
+
requests: TaRoomRequest[];
|
|
27
|
+
friends?: TaFriend[];
|
|
28
|
+
/** The room the page shows, its chat. */
|
|
29
|
+
opened?: string;
|
|
30
|
+
/** When the user last saw what was said in each room, by its id (`pi.storage`). */
|
|
31
|
+
seen: Record<string, number>;
|
|
32
|
+
}
|
|
33
|
+
/** How a room changed between two reads of the list, for the notices of the one who asked to join. */
|
|
34
|
+
export interface RoomChange {
|
|
35
|
+
before?: TaRoomInfo;
|
|
36
|
+
room: TaRoomInfo;
|
|
37
|
+
}
|
|
38
|
+
/** What the page shows of the rooms: read again, at most a few times a second, when the server says they changed. */
|
|
39
|
+
export declare class RoomBook {
|
|
40
|
+
protected state: BookState;
|
|
41
|
+
protected readonly listeners: Set<() => void>;
|
|
42
|
+
protected readonly chats: Map<string, RoomChat>;
|
|
43
|
+
protected timer?: ReturnType<typeof setTimeout>;
|
|
44
|
+
protected loading?: Promise<void>;
|
|
45
|
+
protected again: boolean;
|
|
46
|
+
protected seenRead: boolean;
|
|
47
|
+
/** The rooms whose status changed, as read. */
|
|
48
|
+
onChange?: (changes: RoomChange[]) => void;
|
|
49
|
+
get(): BookState;
|
|
50
|
+
subscribe(listener: () => void): () => void;
|
|
51
|
+
/** Reads all of it again; a read asked while one runs runs once more after it. */
|
|
52
|
+
load(): Promise<void>;
|
|
53
|
+
/** Soon: the server tells of several changes at once; what was said is read again too, for what came while away. */
|
|
54
|
+
reload(): void;
|
|
55
|
+
set(partial: Partial<BookState>): void;
|
|
56
|
+
/** The chat of a room, read the first time it is asked for and kept as its state changes (`heard`). */
|
|
57
|
+
chat(room: string): RoomChat | undefined;
|
|
58
|
+
/** What happened in a room: what was said goes to its chat, if it was read. */
|
|
59
|
+
heard(event: TaRoomEvent): void;
|
|
60
|
+
/** The user saw what was said in a room till `at`. */
|
|
61
|
+
see(room: string, at: number): void;
|
|
62
|
+
protected readSeen(): void;
|
|
63
|
+
protected read(next: BookState): void;
|
|
64
|
+
}
|
|
65
|
+
export declare const book: RoomBook;
|
|
66
|
+
export declare function useBook(): BookState;
|
|
67
|
+
/** What was said in a room, as it changes; nothing for one not joined. */
|
|
68
|
+
export declare function useLines(room: TaRoomInfo): readonly ChatLine[];
|
|
69
|
+
/** Said in a room by others since the user saw it last (or joined). */
|
|
70
|
+
export declare function unseen(room: TaRoomInfo, lines: readonly ChatLine[], seen: Record<string, number>): boolean;
|
|
71
|
+
/** Shows a room: its chat, over the list on a phone, beside it elsewhere. */
|
|
72
|
+
export declare function openRoom(id: string): void;
|
|
73
|
+
/** The room shown, while it is one the user is in. */
|
|
74
|
+
export declare function useOpened(): TaRoomInfo | undefined;
|
|
75
|
+
/** A phone, or a window as narrow: the list, and a room pushed over it, rather than the two side by side. */
|
|
76
|
+
export declare function useCompact(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* The page that shows a room of another extension (its `view`), for its icon and its title: the page knows no kind of
|
|
79
|
+
* room, the extension that made it says by its view. None for a room of this page, or a view not installed here.
|
|
80
|
+
*/
|
|
81
|
+
export declare function usePageOf(room: TaRoomInfo): WebPageInfo | undefined;
|
|
82
|
+
/** What a row says of a room under its title when nothing was said in it. */
|
|
83
|
+
export declare function statusLine(room: TaRoomInfo): string;
|
|
84
|
+
/** When, as a list of chats says it: the time today, yesterday, the day of the week this week, else the date. */
|
|
85
|
+
export declare function when(at: number, now?: number): string;
|
|
86
|
+
/** One of the colours of the faces of the page (--ta-tint-<n>), the same for the same id. */
|
|
87
|
+
export declare function tint(id: string): number;
|
|
88
|
+
export declare function initial(name: string): string;
|
|
89
|
+
/** A round face of a letter, in the colours of the faces of the page. */
|
|
90
|
+
export declare function Face({ id, name, size, online }: {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
size?: number;
|
|
94
|
+
online?: boolean;
|
|
95
|
+
}): import("react").JSX.Element;
|
|
96
|
+
/**
|
|
97
|
+
* The face of a room, as a messenger draws a group: the faces of up to four of its members in a rounded square, the
|
|
98
|
+
* icon of the page of its game in a corner; an amber dot for what the user has not read.
|
|
99
|
+
*/
|
|
100
|
+
export declare function RoomFace({ room, size, unread }: {
|
|
101
|
+
room: TaRoomInfo;
|
|
102
|
+
size?: number;
|
|
103
|
+
unread?: boolean;
|
|
104
|
+
}): import("react").JSX.Element;
|
|
105
|
+
//# sourceMappingURL=page.d.ts.map
|
|
@@ -0,0 +1,306 @@
|
|
|
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.unseen = unseen;
|
|
12
|
+
exports.openRoom = openRoom;
|
|
13
|
+
exports.useOpened = useOpened;
|
|
14
|
+
exports.useCompact = useCompact;
|
|
15
|
+
exports.usePageOf = usePageOf;
|
|
16
|
+
exports.statusLine = statusLine;
|
|
17
|
+
exports.when = when;
|
|
18
|
+
exports.tint = tint;
|
|
19
|
+
exports.initial = initial;
|
|
20
|
+
exports.Face = Face;
|
|
21
|
+
exports.RoomFace = RoomFace;
|
|
22
|
+
const relay_room_chat_1 = require("@celljs/ta-relay/lib/common/relay-room-chat");
|
|
23
|
+
const i18n_1 = require("./i18n");
|
|
24
|
+
const react_1 = require("./react");
|
|
25
|
+
/** The kind of the rooms made here: a group chat, which this page shows (room-view.tsx). */
|
|
26
|
+
exports.ROOMS_KIND = 'ta-rooms';
|
|
27
|
+
/** The page of the rooms (`ui.showView`). */
|
|
28
|
+
exports.ROOMS_VIEW = '@celljs/ta-rooms/rooms';
|
|
29
|
+
/** The members of the room shown, a tool of the workbench (members-view.tsx). */
|
|
30
|
+
exports.MEMBERS_VIEW = '@celljs/ta-rooms/members';
|
|
31
|
+
/** What the page hears of the state of the rooms without their messages: what is said (chat.ts). */
|
|
32
|
+
exports.CHAT_STATE = ['chat:'];
|
|
33
|
+
const SEEN_KEY = 'seen';
|
|
34
|
+
function bindPage(api) {
|
|
35
|
+
exports.pi = api;
|
|
36
|
+
}
|
|
37
|
+
function t(key, values = {}) {
|
|
38
|
+
return i18n_1.RoomWords.format(i18n_1.RoomWords.of(exports.pi.ui.language)[key], values);
|
|
39
|
+
}
|
|
40
|
+
/** An icon of the page, or another when the page is older than the icon. */
|
|
41
|
+
function icon(name) {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
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;
|
|
44
|
+
}
|
|
45
|
+
function message(error) {
|
|
46
|
+
return error instanceof Error ? error.message : String(error);
|
|
47
|
+
}
|
|
48
|
+
/** The rooms of ta serve; undefined in an app older than them. */
|
|
49
|
+
function rooms() {
|
|
50
|
+
return exports.pi.rooms;
|
|
51
|
+
}
|
|
52
|
+
/** What the page shows of the rooms: read again, at most a few times a second, when the server says they changed. */
|
|
53
|
+
class RoomBook {
|
|
54
|
+
constructor() {
|
|
55
|
+
this.state = { requests: [], seen: {} };
|
|
56
|
+
this.listeners = new Set();
|
|
57
|
+
this.chats = new Map();
|
|
58
|
+
this.again = false;
|
|
59
|
+
this.seenRead = false;
|
|
60
|
+
}
|
|
61
|
+
get() {
|
|
62
|
+
return this.state;
|
|
63
|
+
}
|
|
64
|
+
subscribe(listener) {
|
|
65
|
+
this.listeners.add(listener);
|
|
66
|
+
return () => this.listeners.delete(listener);
|
|
67
|
+
}
|
|
68
|
+
/** Reads all of it again; a read asked while one runs runs once more after it. */
|
|
69
|
+
load() {
|
|
70
|
+
if (this.loading) {
|
|
71
|
+
this.again = true;
|
|
72
|
+
return this.loading;
|
|
73
|
+
}
|
|
74
|
+
const server = rooms();
|
|
75
|
+
if (!server) {
|
|
76
|
+
this.set({ rooms: [], friends: [] });
|
|
77
|
+
return Promise.resolve();
|
|
78
|
+
}
|
|
79
|
+
this.readSeen();
|
|
80
|
+
this.loading = Promise.all([
|
|
81
|
+
server.getIdentity().catch(() => this.state.identity),
|
|
82
|
+
server.listRooms().catch(() => { var _a; return (_a = this.state.rooms) !== null && _a !== void 0 ? _a : []; }),
|
|
83
|
+
server.listRequests().catch(() => this.state.requests),
|
|
84
|
+
server.listFriends().catch(() => { var _a; return (_a = this.state.friends) !== null && _a !== void 0 ? _a : []; }),
|
|
85
|
+
])
|
|
86
|
+
.then(([identity, list, requests, friends]) => this.read({ ...this.state, identity, rooms: list, requests, friends }))
|
|
87
|
+
.finally(() => {
|
|
88
|
+
this.loading = undefined;
|
|
89
|
+
if (this.again) {
|
|
90
|
+
this.again = false;
|
|
91
|
+
void this.load();
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
return this.loading;
|
|
95
|
+
}
|
|
96
|
+
/** Soon: the server tells of several changes at once; what was said is read again too, for what came while away. */
|
|
97
|
+
reload() {
|
|
98
|
+
clearTimeout(this.timer);
|
|
99
|
+
this.timer = setTimeout(() => {
|
|
100
|
+
void this.load();
|
|
101
|
+
for (const chat of this.chats.values()) {
|
|
102
|
+
void chat.load().catch(() => undefined);
|
|
103
|
+
}
|
|
104
|
+
}, 300);
|
|
105
|
+
}
|
|
106
|
+
set(partial) {
|
|
107
|
+
this.state = { ...this.state, ...partial };
|
|
108
|
+
for (const listener of this.listeners) {
|
|
109
|
+
listener();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/** The chat of a room, read the first time it is asked for and kept as its state changes (`heard`). */
|
|
113
|
+
chat(room) {
|
|
114
|
+
const server = rooms();
|
|
115
|
+
if (!server) {
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
let chat = this.chats.get(room);
|
|
119
|
+
if (!chat) {
|
|
120
|
+
chat = new relay_room_chat_1.RelayRoomChat(server, room);
|
|
121
|
+
this.chats.set(room, chat);
|
|
122
|
+
void chat.load().catch(() => undefined);
|
|
123
|
+
}
|
|
124
|
+
return chat;
|
|
125
|
+
}
|
|
126
|
+
/** What happened in a room: what was said goes to its chat, if it was read. */
|
|
127
|
+
heard(event) {
|
|
128
|
+
var _a;
|
|
129
|
+
if (event.type === 'state') {
|
|
130
|
+
(_a = this.chats.get(event.room)) === null || _a === void 0 ? void 0 : _a.heard(event.key, event);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/** The user saw what was said in a room till `at`. */
|
|
134
|
+
see(room, at) {
|
|
135
|
+
var _a;
|
|
136
|
+
var _b;
|
|
137
|
+
if (((_b = this.state.seen[room]) !== null && _b !== void 0 ? _b : 0) >= at) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const seen = { ...this.state.seen, [room]: at };
|
|
141
|
+
this.set({ seen });
|
|
142
|
+
void ((_a = exports.pi.storage) === null || _a === void 0 ? void 0 : _a.set(SEEN_KEY, seen).catch(() => undefined));
|
|
143
|
+
}
|
|
144
|
+
readSeen() {
|
|
145
|
+
if (this.seenRead || !exports.pi.storage) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
this.seenRead = true;
|
|
149
|
+
void exports.pi.storage
|
|
150
|
+
.get(SEEN_KEY)
|
|
151
|
+
.then(seen => {
|
|
152
|
+
if (seen && typeof seen === 'object') {
|
|
153
|
+
this.set({ seen: { ...seen, ...this.state.seen } });
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
.catch(() => undefined);
|
|
157
|
+
}
|
|
158
|
+
read(next) {
|
|
159
|
+
var _a;
|
|
160
|
+
var _b, _c;
|
|
161
|
+
const before = new Map(((_b = this.state.rooms) !== null && _b !== void 0 ? _b : []).map(room => [room.id, room]));
|
|
162
|
+
const known = this.state.rooms !== undefined;
|
|
163
|
+
this.set(next);
|
|
164
|
+
const changes = ((_c = next.rooms) !== null && _c !== void 0 ? _c : [])
|
|
165
|
+
.filter(room => { var _a; return !known || ((_a = before.get(room.id)) === null || _a === void 0 ? void 0 : _a.status) !== room.status; })
|
|
166
|
+
.map(room => ({ before: before.get(room.id), room }));
|
|
167
|
+
if (known && changes.length) {
|
|
168
|
+
(_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, changes);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
exports.RoomBook = RoomBook;
|
|
173
|
+
exports.book = new RoomBook();
|
|
174
|
+
function useBook() {
|
|
175
|
+
const state = react_1.React.useSyncExternalStore(listener => exports.book.subscribe(listener), () => exports.book.get());
|
|
176
|
+
react_1.React.useEffect(() => {
|
|
177
|
+
void exports.book.load();
|
|
178
|
+
}, []);
|
|
179
|
+
return state;
|
|
180
|
+
}
|
|
181
|
+
const NO_LINES = [];
|
|
182
|
+
const NO_STOP = () => undefined;
|
|
183
|
+
/** What was said in a room, as it changes; nothing for one not joined. */
|
|
184
|
+
function useLines(room) {
|
|
185
|
+
const chat = room.status === 'member' ? exports.book.chat(room.id) : undefined;
|
|
186
|
+
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; });
|
|
187
|
+
}
|
|
188
|
+
/** Said in a room by others since the user saw it last (or joined). */
|
|
189
|
+
function unseen(room, lines, seen) {
|
|
190
|
+
var _a;
|
|
191
|
+
var _b, _c;
|
|
192
|
+
const self = (_a = room.members.find(member => member.self)) === null || _a === void 0 ? void 0 : _a.member;
|
|
193
|
+
const since = (_c = (_b = seen[room.id]) !== null && _b !== void 0 ? _b : room.joinedAt) !== null && _c !== void 0 ? _c : room.createdAt;
|
|
194
|
+
const last = lines[lines.length - 1];
|
|
195
|
+
return !!last && last.at > since && last.from !== self;
|
|
196
|
+
}
|
|
197
|
+
/** Shows a room: its chat, over the list on a phone, beside it elsewhere. */
|
|
198
|
+
function openRoom(id) {
|
|
199
|
+
exports.book.set({ opened: id });
|
|
200
|
+
void exports.pi.ui.showView(exports.ROOMS_VIEW);
|
|
201
|
+
}
|
|
202
|
+
/** The room shown, while it is one the user is in. */
|
|
203
|
+
function useOpened() {
|
|
204
|
+
const { rooms: list, opened } = useBook();
|
|
205
|
+
return opened ? list === null || list === void 0 ? void 0 : list.find(room => room.id === opened && room.status === 'member') : undefined;
|
|
206
|
+
}
|
|
207
|
+
/** A phone, or a window as narrow: the list, and a room pushed over it, rather than the two side by side. */
|
|
208
|
+
function useCompact() {
|
|
209
|
+
var _a, _b;
|
|
210
|
+
var _c;
|
|
211
|
+
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';
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* The page that shows a room of another extension (its `view`), for its icon and its title: the page knows no kind of
|
|
215
|
+
* room, the extension that made it says by its view. None for a room of this page, or a view not installed here.
|
|
216
|
+
*/
|
|
217
|
+
function usePageOf(room) {
|
|
218
|
+
var _a, _b;
|
|
219
|
+
var _c, _d;
|
|
220
|
+
const pages = (_c = (_b = (_a = exports.pi.ui).usePages) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : [];
|
|
221
|
+
const view = room.view;
|
|
222
|
+
if (!view || view === exports.ROOMS_VIEW) {
|
|
223
|
+
return undefined;
|
|
224
|
+
}
|
|
225
|
+
// One started on open is a page by the name of its extension, till it is.
|
|
226
|
+
return (_d = pages.find(page => page.id === view)) !== null && _d !== void 0 ? _d : pages.find(page => page.onOpen && view.startsWith(`${page.id}/`));
|
|
227
|
+
}
|
|
228
|
+
/** What a row says of a room under its title when nothing was said in it. */
|
|
229
|
+
function statusLine(room) {
|
|
230
|
+
switch (room.status) {
|
|
231
|
+
case 'waiting':
|
|
232
|
+
return t('waiting', { name: room.ownerName });
|
|
233
|
+
case 'refused':
|
|
234
|
+
return t('refused', { name: room.ownerName });
|
|
235
|
+
case 'gone':
|
|
236
|
+
return room.reason === 'removed' ? t('removed') : room.reason === 'invite' ? t('inviteGone') : t('closed');
|
|
237
|
+
}
|
|
238
|
+
if (!room.connected) {
|
|
239
|
+
return t('connecting');
|
|
240
|
+
}
|
|
241
|
+
const online = room.members.filter(member => member.online).length;
|
|
242
|
+
return t('people', { n: room.members.length, online });
|
|
243
|
+
}
|
|
244
|
+
/** When, as a list of chats says it: the time today, yesterday, the day of the week this week, else the date. */
|
|
245
|
+
function when(at, now = Date.now()) {
|
|
246
|
+
const date = new Date(at);
|
|
247
|
+
const today = new Date(now);
|
|
248
|
+
today.setHours(0, 0, 0, 0);
|
|
249
|
+
const day = 24 * 60 * 60 * 1000;
|
|
250
|
+
const language = exports.pi.ui.language;
|
|
251
|
+
if (at >= today.getTime()) {
|
|
252
|
+
return date.toLocaleTimeString(language, { hour: '2-digit', minute: '2-digit' });
|
|
253
|
+
}
|
|
254
|
+
if (at >= today.getTime() - day) {
|
|
255
|
+
return t('yesterday');
|
|
256
|
+
}
|
|
257
|
+
if (at >= today.getTime() - 6 * day) {
|
|
258
|
+
return date.toLocaleDateString(language, { weekday: 'short' });
|
|
259
|
+
}
|
|
260
|
+
return date.toLocaleDateString(language, { month: 'numeric', day: 'numeric', ...(date.getFullYear() !== today.getFullYear() ? { year: '2-digit' } : {}) });
|
|
261
|
+
}
|
|
262
|
+
/** One of the colours of the faces of the page (--ta-tint-<n>), the same for the same id. */
|
|
263
|
+
function tint(id) {
|
|
264
|
+
let hash = 0;
|
|
265
|
+
for (const char of id) {
|
|
266
|
+
hash = (hash * 31 + char.charCodeAt(0)) | 0;
|
|
267
|
+
}
|
|
268
|
+
return Math.abs(hash) % 9;
|
|
269
|
+
}
|
|
270
|
+
function initial(name) {
|
|
271
|
+
var _a;
|
|
272
|
+
var _b;
|
|
273
|
+
return (_b = (_a = Array.from(name.trim())[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase()) !== null && _b !== void 0 ? _b : '?';
|
|
274
|
+
}
|
|
275
|
+
/** A round face of a letter, in the colours of the faces of the page. */
|
|
276
|
+
function Face({ id, name, size = 34, online }) {
|
|
277
|
+
const n = tint(id);
|
|
278
|
+
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})` } },
|
|
279
|
+
initial(name),
|
|
280
|
+
online !== undefined && react_1.React.createElement("i", { className: online ? 'trm-on' : 'trm-off' })));
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* The face of a room, as a messenger draws a group: the faces of up to four of its members in a rounded square, the
|
|
284
|
+
* icon of the page of its game in a corner; an amber dot for what the user has not read.
|
|
285
|
+
*/
|
|
286
|
+
function RoomFace({ room, size = 44, unread }) {
|
|
287
|
+
const page = usePageOf(room);
|
|
288
|
+
const members = room.members.length ? room.members.slice(0, 4) : [{ member: room.id, id: room.id, name: room.title }];
|
|
289
|
+
const Mark = page === null || page === void 0 ? void 0 : page.icon;
|
|
290
|
+
const cell = members.length === 1 ? size : Math.floor((size - 6) / 2);
|
|
291
|
+
return (react_1.React.createElement("span", { className: "trm-room-face", "aria-hidden": "true", style: { width: size, height: size }, "data-count": members.length },
|
|
292
|
+
members.map(member => {
|
|
293
|
+
const n = tint(member.id);
|
|
294
|
+
return (react_1.React.createElement("span", { key: member.member, className: "trm-room-face-cell", style: {
|
|
295
|
+
width: cell,
|
|
296
|
+
height: cell,
|
|
297
|
+
fontSize: Math.round(cell * 0.5),
|
|
298
|
+
background: `var(--ta-tint-${n})`,
|
|
299
|
+
color: `var(--ta-tint-ink-${n})`,
|
|
300
|
+
} }, initial(member.name)));
|
|
301
|
+
}),
|
|
302
|
+
Mark && (react_1.React.createElement("span", { className: "trm-room-face-mark" },
|
|
303
|
+
react_1.React.createElement(Mark, { size: 11, strokeWidth: 2.4 }))),
|
|
304
|
+
unread && react_1.React.createElement("i", { className: "trm-unread" })));
|
|
305
|
+
}
|
|
306
|
+
//# 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
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TaRoomInfo } from '@celljs/ta-protocol';
|
|
2
|
+
export declare function confirmThen(title: string, hint: string, label: string, action: () => Promise<unknown>): Promise<boolean>;
|
|
3
|
+
/** Leaves a room (its owner closes it), asking first; one asked to join, refused or gone is only forgotten. */
|
|
4
|
+
export declare function leaveRoom(room: TaRoomInfo): Promise<boolean>;
|
|
5
|
+
/** The members, as a button that shows them in the workbench, as a messenger's group shows its settings. */
|
|
6
|
+
export declare function MembersButton(): import("react").JSX.Element;
|
|
7
|
+
/** The title of a room, its members counted, as a messenger titles a group. */
|
|
8
|
+
export declare function RoomTitle({ room }: {
|
|
9
|
+
room: TaRoomInfo;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
/** A room, as a group chat: those in it on the left, the user on the right, the box under them. */
|
|
12
|
+
export declare function RoomView({ room, head, onBack }: {
|
|
13
|
+
room: TaRoomInfo;
|
|
14
|
+
head: boolean;
|
|
15
|
+
onBack?(): void;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=room-view.d.ts.map
|