@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
|
@@ -455,6 +455,19 @@ var ZH = {
|
|
|
455
455
|
scm: "源代码管理",
|
|
456
456
|
terminal: "终端",
|
|
457
457
|
browser: "浏览器",
|
|
458
|
+
agentNavigate: "打开网页",
|
|
459
|
+
agentBack: "网页后退",
|
|
460
|
+
agentForward: "网页前进",
|
|
461
|
+
agentReload: "刷新网页",
|
|
462
|
+
agentSnapshot: "读取网页",
|
|
463
|
+
agentClick: "点击",
|
|
464
|
+
agentType: "输入",
|
|
465
|
+
agentPress: "按键",
|
|
466
|
+
agentScroll: "滚动网页",
|
|
467
|
+
agentScreenshot: "网页截图",
|
|
468
|
+
agentEvaluate: "在网页里运行",
|
|
469
|
+
agentWait: "等待网页",
|
|
470
|
+
agentCdp: "调试网页",
|
|
458
471
|
refresh: "刷新",
|
|
459
472
|
collapseAll: "全部折叠",
|
|
460
473
|
showExcluded: "显示默认隐藏的文件(.git、.DS_Store 等)",
|
|
@@ -495,18 +508,16 @@ var ZH = {
|
|
|
495
508
|
forward: "前进",
|
|
496
509
|
openExternal: "在新窗口打开",
|
|
497
510
|
recent: "最近访问",
|
|
498
|
-
browserTitle: "在这里打开网页",
|
|
499
|
-
browserHint: "输入网址或搜索,也可以打开本机的开发服务器。",
|
|
500
511
|
home: "起始页",
|
|
501
512
|
removeRecent: "从最近访问中移除",
|
|
502
|
-
frameHint: "
|
|
513
|
+
frameHint: "页面空白时,可在新窗口打开",
|
|
503
514
|
stop: "停止",
|
|
504
515
|
openBrowser: "在默认浏览器中打开",
|
|
505
516
|
loadFailed: "无法打开这个网页",
|
|
506
517
|
pageCrashed: "这个网页崩溃了",
|
|
507
518
|
retry: "重试",
|
|
508
519
|
agentDriving: "Ta 正在操作",
|
|
509
|
-
importSignIns: "
|
|
520
|
+
importSignIns: "导入浏览器登录状态",
|
|
510
521
|
importTitle: "导入登录状态",
|
|
511
522
|
importHint: "把所选浏览器的 Cookie 复制到这里,你和 Agent 都能直接使用已登录的网站。不导入密码和浏览记录。",
|
|
512
523
|
importFrom: "从哪个浏览器导入",
|
|
@@ -650,6 +661,19 @@ var EN = {
|
|
|
650
661
|
scm: "Source control",
|
|
651
662
|
terminal: "Terminal",
|
|
652
663
|
browser: "Browser",
|
|
664
|
+
agentNavigate: "Open",
|
|
665
|
+
agentBack: "Go back",
|
|
666
|
+
agentForward: "Go forward",
|
|
667
|
+
agentReload: "Reload the page",
|
|
668
|
+
agentSnapshot: "Read the page",
|
|
669
|
+
agentClick: "Click",
|
|
670
|
+
agentType: "Type",
|
|
671
|
+
agentPress: "Press",
|
|
672
|
+
agentScroll: "Scroll the page",
|
|
673
|
+
agentScreenshot: "Screenshot the page",
|
|
674
|
+
agentEvaluate: "Run in the page",
|
|
675
|
+
agentWait: "Wait for the page",
|
|
676
|
+
agentCdp: "Debug the page",
|
|
653
677
|
refresh: "Refresh",
|
|
654
678
|
collapseAll: "Collapse all",
|
|
655
679
|
showExcluded: "Show files hidden by default (.git, .DS_Store…)",
|
|
@@ -690,11 +714,9 @@ var EN = {
|
|
|
690
714
|
forward: "Forward",
|
|
691
715
|
openExternal: "Open in a new window",
|
|
692
716
|
recent: "Recent",
|
|
693
|
-
browserTitle: "Open a page here",
|
|
694
|
-
browserHint: "Enter an address or search, or open a dev server on this machine.",
|
|
695
717
|
home: "Start page",
|
|
696
718
|
removeRecent: "Remove from recent",
|
|
697
|
-
frameHint: "
|
|
719
|
+
frameHint: "Page blank? Open it in a new window",
|
|
698
720
|
stop: "Stop",
|
|
699
721
|
openBrowser: "Open in the default browser",
|
|
700
722
|
loadFailed: "This page did not open",
|
|
@@ -1242,13 +1264,12 @@ var Recent;
|
|
|
1242
1264
|
}
|
|
1243
1265
|
})(Recent ||= {});
|
|
1244
1266
|
var SUGGESTIONS = ["localhost:5173", "localhost:3000", "localhost:8080"];
|
|
1245
|
-
function
|
|
1267
|
+
function siteOf(url) {
|
|
1246
1268
|
try {
|
|
1247
1269
|
const parsed = new URL(url);
|
|
1248
|
-
|
|
1249
|
-
return { host: parsed.host || url, rest };
|
|
1270
|
+
return { host: parsed.host || url, icon: parsed.host ? `${parsed.origin}/favicon.ico` : undefined };
|
|
1250
1271
|
} catch {
|
|
1251
|
-
return { host: url
|
|
1272
|
+
return { host: url };
|
|
1252
1273
|
}
|
|
1253
1274
|
}
|
|
1254
1275
|
function AddressIcon({ value, loading, favicon }) {
|
|
@@ -1368,61 +1389,62 @@ function BrowserBar(props) {
|
|
|
1368
1389
|
className: "taw-browser-loading"
|
|
1369
1390
|
}) : undefined);
|
|
1370
1391
|
}
|
|
1371
|
-
function
|
|
1372
|
-
const
|
|
1392
|
+
function Site({ address, onOpen, onRemove }) {
|
|
1393
|
+
const { host, icon } = siteOf(address);
|
|
1394
|
+
const name = host.replace(/^www\./, "");
|
|
1395
|
+
const local = WorkspaceUtil.localPort(address) !== undefined;
|
|
1396
|
+
const [broken, setBroken] = React.useState(local || !icon);
|
|
1397
|
+
let index = 0;
|
|
1398
|
+
for (const char of name) {
|
|
1399
|
+
index = (index * 31 + char.charCodeAt(0)) % 9;
|
|
1400
|
+
}
|
|
1373
1401
|
return /* @__PURE__ */ React.createElement("div", {
|
|
1374
|
-
className:
|
|
1375
|
-
}, /* @__PURE__ */ React.createElement("
|
|
1376
|
-
|
|
1402
|
+
className: "taw-browser-site"
|
|
1403
|
+
}, /* @__PURE__ */ React.createElement("button", {
|
|
1404
|
+
type: "button",
|
|
1405
|
+
className: "taw-browser-site-main",
|
|
1406
|
+
title: address,
|
|
1407
|
+
onClick: () => onOpen(address)
|
|
1377
1408
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
1378
|
-
className: "taw-browser-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
},
|
|
1409
|
+
className: "taw-browser-tile",
|
|
1410
|
+
style: local ? undefined : { "--taw-tint": `var(--ta-tint-${index})`, "--taw-ink": `var(--ta-tint-ink-${index})` }
|
|
1411
|
+
}, broken ? local ? /* @__PURE__ */ React.createElement(Glyph, {
|
|
1412
|
+
name: "Server",
|
|
1413
|
+
size: 18
|
|
1414
|
+
}) : name.charAt(0).toUpperCase() : /* @__PURE__ */ React.createElement("img", {
|
|
1415
|
+
src: icon,
|
|
1416
|
+
alt: "",
|
|
1417
|
+
referrerPolicy: "no-referrer",
|
|
1418
|
+
onError: () => setBroken(true)
|
|
1419
|
+
})), /* @__PURE__ */ React.createElement("span", {
|
|
1420
|
+
className: "taw-browser-host"
|
|
1421
|
+
}, name)), onRemove ? /* @__PURE__ */ React.createElement("button", {
|
|
1389
1422
|
type: "button",
|
|
1423
|
+
className: "taw-action taw-browser-remove",
|
|
1424
|
+
title: t("removeRecent"),
|
|
1425
|
+
"aria-label": t("removeRecent"),
|
|
1426
|
+
onClick: onRemove
|
|
1427
|
+
}, /* @__PURE__ */ React.createElement(Glyph, {
|
|
1428
|
+
name: "X",
|
|
1429
|
+
size: 11
|
|
1430
|
+
})) : undefined);
|
|
1431
|
+
}
|
|
1432
|
+
function Home({ onOpen, foot, extra }) {
|
|
1433
|
+
const recent = React.useSyncExternalStore(Recent.subscribe, Recent.all);
|
|
1434
|
+
const sites = recent.length > 0 ? recent : SUGGESTIONS.map((address) => `http://${address}`);
|
|
1435
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
1436
|
+
className: "taw-browser-home"
|
|
1437
|
+
}, /* @__PURE__ */ React.createElement("nav", {
|
|
1438
|
+
className: "taw-browser-sites",
|
|
1439
|
+
"aria-label": t("recent")
|
|
1440
|
+
}, sites.map((address) => /* @__PURE__ */ React.createElement(Site, {
|
|
1390
1441
|
key: address,
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
}, /* @__PURE__ */ React.createElement("h3", {
|
|
1396
|
-
className: "taw-browser-heading"
|
|
1397
|
-
}, t("recent")), recent.map((address) => {
|
|
1398
|
-
const { host, rest } = parts(address);
|
|
1399
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
1400
|
-
key: address,
|
|
1401
|
-
className: "taw-browser-site"
|
|
1402
|
-
}, /* @__PURE__ */ React.createElement("button", {
|
|
1403
|
-
type: "button",
|
|
1404
|
-
className: "taw-browser-site-main",
|
|
1405
|
-
title: address,
|
|
1406
|
-
onClick: () => onOpen(address)
|
|
1407
|
-
}, /* @__PURE__ */ React.createElement("span", {
|
|
1408
|
-
className: "taw-browser-letter"
|
|
1409
|
-
}, host.replace(/^www\./, "").charAt(0).toUpperCase()), /* @__PURE__ */ React.createElement("span", {
|
|
1410
|
-
className: "taw-browser-host"
|
|
1411
|
-
}, host), /* @__PURE__ */ React.createElement("span", {
|
|
1412
|
-
className: "taw-browser-path"
|
|
1413
|
-
}, rest)), /* @__PURE__ */ React.createElement("button", {
|
|
1414
|
-
type: "button",
|
|
1415
|
-
className: "taw-action taw-browser-remove",
|
|
1416
|
-
title: t("removeRecent"),
|
|
1417
|
-
"aria-label": t("removeRecent"),
|
|
1418
|
-
onClick: () => Recent.remove(address)
|
|
1419
|
-
}, /* @__PURE__ */ React.createElement(Glyph, {
|
|
1420
|
-
name: "X",
|
|
1421
|
-
size: 13
|
|
1422
|
-
})));
|
|
1423
|
-
})) : undefined, foot ? /* @__PURE__ */ React.createElement("p", {
|
|
1442
|
+
address,
|
|
1443
|
+
onOpen,
|
|
1444
|
+
onRemove: recent.length > 0 ? () => Recent.remove(address) : undefined
|
|
1445
|
+
}))), extra || foot ? /* @__PURE__ */ React.createElement("footer", {
|
|
1424
1446
|
className: "taw-browser-foot"
|
|
1425
|
-
}, foot) : undefined);
|
|
1447
|
+
}, extra, foot ? /* @__PURE__ */ React.createElement("span", null, foot) : undefined) : undefined);
|
|
1426
1448
|
}
|
|
1427
1449
|
var ShowPage = new Channel;
|
|
1428
1450
|
function useForwarded(url, cwd) {
|
|
@@ -1588,13 +1610,13 @@ var BrowserSnapshot;
|
|
|
1588
1610
|
}
|
|
1589
1611
|
BrowserSnapshot.center = center;
|
|
1590
1612
|
function key(input) {
|
|
1591
|
-
const
|
|
1592
|
-
const name = input.endsWith("++") || input === "+" ? "+" :
|
|
1613
|
+
const parts = input.split("+");
|
|
1614
|
+
const name = input.endsWith("++") || input === "+" ? "+" : parts.pop();
|
|
1593
1615
|
if (!name) {
|
|
1594
1616
|
return;
|
|
1595
1617
|
}
|
|
1596
1618
|
let modifiers = 0;
|
|
1597
|
-
for (const part of input === "+" ? [] :
|
|
1619
|
+
for (const part of input === "+" ? [] : parts.filter(Boolean)) {
|
|
1598
1620
|
const bit = MODIFIERS[part.toLowerCase()];
|
|
1599
1621
|
if (bit === undefined) {
|
|
1600
1622
|
return;
|
|
@@ -2401,6 +2423,65 @@ function BrowserView() {
|
|
|
2401
2423
|
return pi.ui.supportsWebview ? /* @__PURE__ */ React.createElement(WebviewBrowser, null) : /* @__PURE__ */ React.createElement(FrameBrowser, null);
|
|
2402
2424
|
}
|
|
2403
2425
|
|
|
2426
|
+
// web-src/browser-tool-line.ts
|
|
2427
|
+
var VERBS = {
|
|
2428
|
+
navigate: "agentNavigate",
|
|
2429
|
+
back: "agentBack",
|
|
2430
|
+
forward: "agentForward",
|
|
2431
|
+
reload: "agentReload",
|
|
2432
|
+
snapshot: "agentSnapshot",
|
|
2433
|
+
click: "agentClick",
|
|
2434
|
+
type: "agentType",
|
|
2435
|
+
press: "agentPress",
|
|
2436
|
+
scroll: "agentScroll",
|
|
2437
|
+
screenshot: "agentScreenshot",
|
|
2438
|
+
evaluate: "agentEvaluate",
|
|
2439
|
+
wait: "agentWait",
|
|
2440
|
+
cdp: "agentCdp"
|
|
2441
|
+
};
|
|
2442
|
+
function text(value) {
|
|
2443
|
+
return typeof value === "string" ? value.trim() : "";
|
|
2444
|
+
}
|
|
2445
|
+
function at(args) {
|
|
2446
|
+
if (typeof args.ref === "number") {
|
|
2447
|
+
return `[${args.ref}]`;
|
|
2448
|
+
}
|
|
2449
|
+
return typeof args.x === "number" && typeof args.y === "number" ? `${Math.round(args.x)}, ${Math.round(args.y)}` : "";
|
|
2450
|
+
}
|
|
2451
|
+
var BrowserToolLine;
|
|
2452
|
+
((BrowserToolLine) => {
|
|
2453
|
+
function renderCall(args, words) {
|
|
2454
|
+
const action = text(args.action);
|
|
2455
|
+
const verb = words(VERBS[action] ?? "browser");
|
|
2456
|
+
switch (action) {
|
|
2457
|
+
case "navigate":
|
|
2458
|
+
return { verb, target: text(args.url) };
|
|
2459
|
+
case "click":
|
|
2460
|
+
return { verb, target: at(args) };
|
|
2461
|
+
case "type":
|
|
2462
|
+
return { verb, target: [at(args), text(args.text)].filter(Boolean).join(" ") };
|
|
2463
|
+
case "press":
|
|
2464
|
+
return { verb, target: text(args.key), code: true };
|
|
2465
|
+
case "scroll":
|
|
2466
|
+
return { verb, target: at(args) || (args.direction === "up" ? "↑" : args.direction === "down" ? "↓" : "") };
|
|
2467
|
+
case "evaluate":
|
|
2468
|
+
return { verb, target: text(args.expression).split(`
|
|
2469
|
+
`)[0], code: true };
|
|
2470
|
+
case "wait":
|
|
2471
|
+
return { verb, target: text(args.text) || (typeof args.ms === "number" ? `${args.ms} ms` : "") };
|
|
2472
|
+
case "cdp":
|
|
2473
|
+
return { verb, target: text(args.method), code: true };
|
|
2474
|
+
default:
|
|
2475
|
+
return { verb };
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
BrowserToolLine.renderCall = renderCall;
|
|
2479
|
+
function register(pi2, words) {
|
|
2480
|
+
pi2.registerToolRenderer?.((name, next) => name === AgentBrowser.TOOL.name ? { renderCall: (args) => renderCall(args, words) } : next());
|
|
2481
|
+
}
|
|
2482
|
+
BrowserToolLine.register = register;
|
|
2483
|
+
})(BrowserToolLine ||= {});
|
|
2484
|
+
|
|
2404
2485
|
// web-src/bytes.ts
|
|
2405
2486
|
function useFileBytesUrl(url, version) {
|
|
2406
2487
|
const [state, setState] = React.useState({});
|
|
@@ -3362,7 +3443,7 @@ function findClosingBracket(str, b) {
|
|
|
3362
3443
|
function outputLink(cap, link, raw, lexer) {
|
|
3363
3444
|
const href = link.href;
|
|
3364
3445
|
const title = link.title ? escape$1(link.title) : null;
|
|
3365
|
-
const
|
|
3446
|
+
const text2 = cap[1].replace(/\\([\[\]])/g, "$1");
|
|
3366
3447
|
if (cap[0].charAt(0) !== "!") {
|
|
3367
3448
|
lexer.state.inLink = true;
|
|
3368
3449
|
const token = {
|
|
@@ -3370,8 +3451,8 @@ function outputLink(cap, link, raw, lexer) {
|
|
|
3370
3451
|
raw,
|
|
3371
3452
|
href,
|
|
3372
3453
|
title,
|
|
3373
|
-
text,
|
|
3374
|
-
tokens: lexer.inlineTokens(
|
|
3454
|
+
text: text2,
|
|
3455
|
+
tokens: lexer.inlineTokens(text2)
|
|
3375
3456
|
};
|
|
3376
3457
|
lexer.state.inLink = false;
|
|
3377
3458
|
return token;
|
|
@@ -3381,16 +3462,16 @@ function outputLink(cap, link, raw, lexer) {
|
|
|
3381
3462
|
raw,
|
|
3382
3463
|
href,
|
|
3383
3464
|
title,
|
|
3384
|
-
text: escape$1(
|
|
3465
|
+
text: escape$1(text2)
|
|
3385
3466
|
};
|
|
3386
3467
|
}
|
|
3387
|
-
function indentCodeCompensation(raw,
|
|
3468
|
+
function indentCodeCompensation(raw, text2) {
|
|
3388
3469
|
const matchIndentToCode = raw.match(/^(\s+)(?:```)/);
|
|
3389
3470
|
if (matchIndentToCode === null) {
|
|
3390
|
-
return
|
|
3471
|
+
return text2;
|
|
3391
3472
|
}
|
|
3392
3473
|
const indentToCode = matchIndentToCode[1];
|
|
3393
|
-
return
|
|
3474
|
+
return text2.split(`
|
|
3394
3475
|
`).map((node) => {
|
|
3395
3476
|
const matchIndentInNode = node.match(/^\s+/);
|
|
3396
3477
|
if (matchIndentInNode === null) {
|
|
@@ -3424,13 +3505,13 @@ class _Tokenizer {
|
|
|
3424
3505
|
code(src) {
|
|
3425
3506
|
const cap = this.rules.block.code.exec(src);
|
|
3426
3507
|
if (cap) {
|
|
3427
|
-
const
|
|
3508
|
+
const text2 = cap[0].replace(/^ {1,4}/gm, "");
|
|
3428
3509
|
return {
|
|
3429
3510
|
type: "code",
|
|
3430
3511
|
raw: cap[0],
|
|
3431
3512
|
codeBlockStyle: "indented",
|
|
3432
|
-
text: !this.options.pedantic ? rtrim(
|
|
3433
|
-
`) :
|
|
3513
|
+
text: !this.options.pedantic ? rtrim(text2, `
|
|
3514
|
+
`) : text2
|
|
3434
3515
|
};
|
|
3435
3516
|
}
|
|
3436
3517
|
}
|
|
@@ -3438,33 +3519,33 @@ class _Tokenizer {
|
|
|
3438
3519
|
const cap = this.rules.block.fences.exec(src);
|
|
3439
3520
|
if (cap) {
|
|
3440
3521
|
const raw = cap[0];
|
|
3441
|
-
const
|
|
3522
|
+
const text2 = indentCodeCompensation(raw, cap[3] || "");
|
|
3442
3523
|
return {
|
|
3443
3524
|
type: "code",
|
|
3444
3525
|
raw,
|
|
3445
3526
|
lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : cap[2],
|
|
3446
|
-
text
|
|
3527
|
+
text: text2
|
|
3447
3528
|
};
|
|
3448
3529
|
}
|
|
3449
3530
|
}
|
|
3450
3531
|
heading(src) {
|
|
3451
3532
|
const cap = this.rules.block.heading.exec(src);
|
|
3452
3533
|
if (cap) {
|
|
3453
|
-
let
|
|
3454
|
-
if (/#$/.test(
|
|
3455
|
-
const trimmed = rtrim(
|
|
3534
|
+
let text2 = cap[2].trim();
|
|
3535
|
+
if (/#$/.test(text2)) {
|
|
3536
|
+
const trimmed = rtrim(text2, "#");
|
|
3456
3537
|
if (this.options.pedantic) {
|
|
3457
|
-
|
|
3538
|
+
text2 = trimmed.trim();
|
|
3458
3539
|
} else if (!trimmed || / $/.test(trimmed)) {
|
|
3459
|
-
|
|
3540
|
+
text2 = trimmed.trim();
|
|
3460
3541
|
}
|
|
3461
3542
|
}
|
|
3462
3543
|
return {
|
|
3463
3544
|
type: "heading",
|
|
3464
3545
|
raw: cap[0],
|
|
3465
3546
|
depth: cap[1].length,
|
|
3466
|
-
text,
|
|
3467
|
-
tokens: this.lexer.inline(
|
|
3547
|
+
text: text2,
|
|
3548
|
+
tokens: this.lexer.inline(text2)
|
|
3468
3549
|
};
|
|
3469
3550
|
}
|
|
3470
3551
|
}
|
|
@@ -3485,7 +3566,7 @@ class _Tokenizer {
|
|
|
3485
3566
|
`).split(`
|
|
3486
3567
|
`);
|
|
3487
3568
|
let raw = "";
|
|
3488
|
-
let
|
|
3569
|
+
let text2 = "";
|
|
3489
3570
|
const tokens = [];
|
|
3490
3571
|
while (lines.length > 0) {
|
|
3491
3572
|
let inBlockquote = false;
|
|
@@ -3508,7 +3589,7 @@ class _Tokenizer {
|
|
|
3508
3589
|
$1`).replace(/^ {0,3}>[ \t]?/gm, "");
|
|
3509
3590
|
raw = raw ? `${raw}
|
|
3510
3591
|
${currentRaw}` : currentRaw;
|
|
3511
|
-
|
|
3592
|
+
text2 = text2 ? `${text2}
|
|
3512
3593
|
${currentText}` : currentText;
|
|
3513
3594
|
const top = this.lexer.state.top;
|
|
3514
3595
|
this.lexer.state.top = true;
|
|
@@ -3528,7 +3609,7 @@ ${currentText}` : currentText;
|
|
|
3528
3609
|
const newToken = this.blockquote(newText);
|
|
3529
3610
|
tokens[tokens.length - 1] = newToken;
|
|
3530
3611
|
raw = raw.substring(0, raw.length - oldToken.raw.length) + newToken.raw;
|
|
3531
|
-
|
|
3612
|
+
text2 = text2.substring(0, text2.length - oldToken.text.length) + newToken.text;
|
|
3532
3613
|
break;
|
|
3533
3614
|
} else if (lastToken?.type === "list") {
|
|
3534
3615
|
const oldToken = lastToken;
|
|
@@ -3538,7 +3619,7 @@ ${currentText}` : currentText;
|
|
|
3538
3619
|
const newToken = this.list(newText);
|
|
3539
3620
|
tokens[tokens.length - 1] = newToken;
|
|
3540
3621
|
raw = raw.substring(0, raw.length - lastToken.raw.length) + newToken.raw;
|
|
3541
|
-
|
|
3622
|
+
text2 = text2.substring(0, text2.length - oldToken.raw.length) + newToken.raw;
|
|
3542
3623
|
lines = newText.substring(tokens[tokens.length - 1].raw.length).split(`
|
|
3543
3624
|
`);
|
|
3544
3625
|
continue;
|
|
@@ -3548,7 +3629,7 @@ ${currentText}` : currentText;
|
|
|
3548
3629
|
type: "blockquote",
|
|
3549
3630
|
raw,
|
|
3550
3631
|
tokens,
|
|
3551
|
-
text
|
|
3632
|
+
text: text2
|
|
3552
3633
|
};
|
|
3553
3634
|
}
|
|
3554
3635
|
}
|
|
@@ -3804,13 +3885,13 @@ ${currentText}` : currentText;
|
|
|
3804
3885
|
paragraph(src) {
|
|
3805
3886
|
const cap = this.rules.block.paragraph.exec(src);
|
|
3806
3887
|
if (cap) {
|
|
3807
|
-
const
|
|
3888
|
+
const text2 = cap[1].charAt(cap[1].length - 1) === `
|
|
3808
3889
|
` ? cap[1].slice(0, -1) : cap[1];
|
|
3809
3890
|
return {
|
|
3810
3891
|
type: "paragraph",
|
|
3811
3892
|
raw: cap[0],
|
|
3812
|
-
text,
|
|
3813
|
-
tokens: this.lexer.inline(
|
|
3893
|
+
text: text2,
|
|
3894
|
+
tokens: this.lexer.inline(text2)
|
|
3814
3895
|
};
|
|
3815
3896
|
}
|
|
3816
3897
|
}
|
|
@@ -3911,11 +3992,11 @@ ${currentText}` : currentText;
|
|
|
3911
3992
|
const linkString = (cap[2] || cap[1]).replace(/\s+/g, " ");
|
|
3912
3993
|
const link = links[linkString.toLowerCase()];
|
|
3913
3994
|
if (!link) {
|
|
3914
|
-
const
|
|
3995
|
+
const text2 = cap[0].charAt(0);
|
|
3915
3996
|
return {
|
|
3916
3997
|
type: "text",
|
|
3917
|
-
raw:
|
|
3918
|
-
text
|
|
3998
|
+
raw: text2,
|
|
3999
|
+
text: text2
|
|
3919
4000
|
};
|
|
3920
4001
|
}
|
|
3921
4002
|
return outputLink(cap, link, cap[0], this.lexer);
|
|
@@ -3955,20 +4036,20 @@ ${currentText}` : currentText;
|
|
|
3955
4036
|
const lastCharLength = [...match[0]][0].length;
|
|
3956
4037
|
const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);
|
|
3957
4038
|
if (Math.min(lLength, rLength) % 2) {
|
|
3958
|
-
const
|
|
4039
|
+
const text3 = raw.slice(1, -1);
|
|
3959
4040
|
return {
|
|
3960
4041
|
type: "em",
|
|
3961
4042
|
raw,
|
|
3962
|
-
text:
|
|
3963
|
-
tokens: this.lexer.inlineTokens(
|
|
4043
|
+
text: text3,
|
|
4044
|
+
tokens: this.lexer.inlineTokens(text3)
|
|
3964
4045
|
};
|
|
3965
4046
|
}
|
|
3966
|
-
const
|
|
4047
|
+
const text2 = raw.slice(2, -2);
|
|
3967
4048
|
return {
|
|
3968
4049
|
type: "strong",
|
|
3969
4050
|
raw,
|
|
3970
|
-
text,
|
|
3971
|
-
tokens: this.lexer.inlineTokens(
|
|
4051
|
+
text: text2,
|
|
4052
|
+
tokens: this.lexer.inlineTokens(text2)
|
|
3972
4053
|
};
|
|
3973
4054
|
}
|
|
3974
4055
|
}
|
|
@@ -3976,17 +4057,17 @@ ${currentText}` : currentText;
|
|
|
3976
4057
|
codespan(src) {
|
|
3977
4058
|
const cap = this.rules.inline.code.exec(src);
|
|
3978
4059
|
if (cap) {
|
|
3979
|
-
let
|
|
3980
|
-
const hasNonSpaceChars = /[^ ]/.test(
|
|
3981
|
-
const hasSpaceCharsOnBothEnds = /^ /.test(
|
|
4060
|
+
let text2 = cap[2].replace(/\n/g, " ");
|
|
4061
|
+
const hasNonSpaceChars = /[^ ]/.test(text2);
|
|
4062
|
+
const hasSpaceCharsOnBothEnds = /^ /.test(text2) && / $/.test(text2);
|
|
3982
4063
|
if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {
|
|
3983
|
-
|
|
4064
|
+
text2 = text2.substring(1, text2.length - 1);
|
|
3984
4065
|
}
|
|
3985
|
-
|
|
4066
|
+
text2 = escape$1(text2, true);
|
|
3986
4067
|
return {
|
|
3987
4068
|
type: "codespan",
|
|
3988
4069
|
raw: cap[0],
|
|
3989
|
-
text
|
|
4070
|
+
text: text2
|
|
3990
4071
|
};
|
|
3991
4072
|
}
|
|
3992
4073
|
}
|
|
@@ -4013,24 +4094,24 @@ ${currentText}` : currentText;
|
|
|
4013
4094
|
autolink(src) {
|
|
4014
4095
|
const cap = this.rules.inline.autolink.exec(src);
|
|
4015
4096
|
if (cap) {
|
|
4016
|
-
let
|
|
4097
|
+
let text2, href;
|
|
4017
4098
|
if (cap[2] === "@") {
|
|
4018
|
-
|
|
4019
|
-
href = "mailto:" +
|
|
4099
|
+
text2 = escape$1(cap[1]);
|
|
4100
|
+
href = "mailto:" + text2;
|
|
4020
4101
|
} else {
|
|
4021
|
-
|
|
4022
|
-
href =
|
|
4102
|
+
text2 = escape$1(cap[1]);
|
|
4103
|
+
href = text2;
|
|
4023
4104
|
}
|
|
4024
4105
|
return {
|
|
4025
4106
|
type: "link",
|
|
4026
4107
|
raw: cap[0],
|
|
4027
|
-
text,
|
|
4108
|
+
text: text2,
|
|
4028
4109
|
href,
|
|
4029
4110
|
tokens: [
|
|
4030
4111
|
{
|
|
4031
4112
|
type: "text",
|
|
4032
|
-
raw:
|
|
4033
|
-
text
|
|
4113
|
+
raw: text2,
|
|
4114
|
+
text: text2
|
|
4034
4115
|
}
|
|
4035
4116
|
]
|
|
4036
4117
|
};
|
|
@@ -4039,17 +4120,17 @@ ${currentText}` : currentText;
|
|
|
4039
4120
|
url(src) {
|
|
4040
4121
|
let cap;
|
|
4041
4122
|
if (cap = this.rules.inline.url.exec(src)) {
|
|
4042
|
-
let
|
|
4123
|
+
let text2, href;
|
|
4043
4124
|
if (cap[2] === "@") {
|
|
4044
|
-
|
|
4045
|
-
href = "mailto:" +
|
|
4125
|
+
text2 = escape$1(cap[0]);
|
|
4126
|
+
href = "mailto:" + text2;
|
|
4046
4127
|
} else {
|
|
4047
4128
|
let prevCapZero;
|
|
4048
4129
|
do {
|
|
4049
4130
|
prevCapZero = cap[0];
|
|
4050
4131
|
cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? "";
|
|
4051
4132
|
} while (prevCapZero !== cap[0]);
|
|
4052
|
-
|
|
4133
|
+
text2 = escape$1(cap[0]);
|
|
4053
4134
|
if (cap[1] === "www.") {
|
|
4054
4135
|
href = "http://" + cap[0];
|
|
4055
4136
|
} else {
|
|
@@ -4059,13 +4140,13 @@ ${currentText}` : currentText;
|
|
|
4059
4140
|
return {
|
|
4060
4141
|
type: "link",
|
|
4061
4142
|
raw: cap[0],
|
|
4062
|
-
text,
|
|
4143
|
+
text: text2,
|
|
4063
4144
|
href,
|
|
4064
4145
|
tokens: [
|
|
4065
4146
|
{
|
|
4066
4147
|
type: "text",
|
|
4067
|
-
raw:
|
|
4068
|
-
text
|
|
4148
|
+
raw: text2,
|
|
4149
|
+
text: text2
|
|
4069
4150
|
}
|
|
4070
4151
|
]
|
|
4071
4152
|
};
|
|
@@ -4074,16 +4155,16 @@ ${currentText}` : currentText;
|
|
|
4074
4155
|
inlineText(src) {
|
|
4075
4156
|
const cap = this.rules.inline.text.exec(src);
|
|
4076
4157
|
if (cap) {
|
|
4077
|
-
let
|
|
4158
|
+
let text2;
|
|
4078
4159
|
if (this.lexer.state.inRawBlock) {
|
|
4079
|
-
|
|
4160
|
+
text2 = cap[0];
|
|
4080
4161
|
} else {
|
|
4081
|
-
|
|
4162
|
+
text2 = escape$1(cap[0]);
|
|
4082
4163
|
}
|
|
4083
4164
|
return {
|
|
4084
4165
|
type: "text",
|
|
4085
4166
|
raw: cap[0],
|
|
4086
|
-
text
|
|
4167
|
+
text: text2
|
|
4087
4168
|
};
|
|
4088
4169
|
}
|
|
4089
4170
|
}
|
|
@@ -4585,9 +4666,9 @@ class _Renderer {
|
|
|
4585
4666
|
space(token) {
|
|
4586
4667
|
return "";
|
|
4587
4668
|
}
|
|
4588
|
-
code({ text, lang, escaped }) {
|
|
4669
|
+
code({ text: text2, lang, escaped }) {
|
|
4589
4670
|
const langString = (lang || "").match(/^\S*/)?.[0];
|
|
4590
|
-
const code =
|
|
4671
|
+
const code = text2.replace(/\n$/, "") + `
|
|
4591
4672
|
`;
|
|
4592
4673
|
if (!langString) {
|
|
4593
4674
|
return "<pre><code>" + (escaped ? code : escape$1(code, true)) + `</code></pre>
|
|
@@ -4602,8 +4683,8 @@ class _Renderer {
|
|
|
4602
4683
|
${body}</blockquote>
|
|
4603
4684
|
`;
|
|
4604
4685
|
}
|
|
4605
|
-
html({ text }) {
|
|
4606
|
-
return
|
|
4686
|
+
html({ text: text2 }) {
|
|
4687
|
+
return text2;
|
|
4607
4688
|
}
|
|
4608
4689
|
heading({ tokens, depth }) {
|
|
4609
4690
|
return `<h${depth}>${this.parser.parseInline(tokens)}</h${depth}>
|
|
@@ -4683,9 +4764,9 @@ ${body}</blockquote>
|
|
|
4683
4764
|
` + body + `</table>
|
|
4684
4765
|
`;
|
|
4685
4766
|
}
|
|
4686
|
-
tablerow({ text }) {
|
|
4767
|
+
tablerow({ text: text2 }) {
|
|
4687
4768
|
return `<tr>
|
|
4688
|
-
${
|
|
4769
|
+
${text2}</tr>
|
|
4689
4770
|
`;
|
|
4690
4771
|
}
|
|
4691
4772
|
tablecell(token) {
|
|
@@ -4701,8 +4782,8 @@ ${text}</tr>
|
|
|
4701
4782
|
em({ tokens }) {
|
|
4702
4783
|
return `<em>${this.parser.parseInline(tokens)}</em>`;
|
|
4703
4784
|
}
|
|
4704
|
-
codespan({ text }) {
|
|
4705
|
-
return `<code>${
|
|
4785
|
+
codespan({ text: text2 }) {
|
|
4786
|
+
return `<code>${text2}</code>`;
|
|
4706
4787
|
}
|
|
4707
4788
|
br(token) {
|
|
4708
4789
|
return "<br>";
|
|
@@ -4711,26 +4792,26 @@ ${text}</tr>
|
|
|
4711
4792
|
return `<del>${this.parser.parseInline(tokens)}</del>`;
|
|
4712
4793
|
}
|
|
4713
4794
|
link({ href, title, tokens }) {
|
|
4714
|
-
const
|
|
4795
|
+
const text2 = this.parser.parseInline(tokens);
|
|
4715
4796
|
const cleanHref = cleanUrl(href);
|
|
4716
4797
|
if (cleanHref === null) {
|
|
4717
|
-
return
|
|
4798
|
+
return text2;
|
|
4718
4799
|
}
|
|
4719
4800
|
href = cleanHref;
|
|
4720
4801
|
let out = '<a href="' + href + '"';
|
|
4721
4802
|
if (title) {
|
|
4722
4803
|
out += ' title="' + title + '"';
|
|
4723
4804
|
}
|
|
4724
|
-
out += ">" +
|
|
4805
|
+
out += ">" + text2 + "</a>";
|
|
4725
4806
|
return out;
|
|
4726
4807
|
}
|
|
4727
|
-
image({ href, title, text }) {
|
|
4808
|
+
image({ href, title, text: text2 }) {
|
|
4728
4809
|
const cleanHref = cleanUrl(href);
|
|
4729
4810
|
if (cleanHref === null) {
|
|
4730
|
-
return
|
|
4811
|
+
return text2;
|
|
4731
4812
|
}
|
|
4732
4813
|
href = cleanHref;
|
|
4733
|
-
let out = `<img src="${href}" alt="${
|
|
4814
|
+
let out = `<img src="${href}" alt="${text2}"`;
|
|
4734
4815
|
if (title) {
|
|
4735
4816
|
out += ` title="${title}"`;
|
|
4736
4817
|
}
|
|
@@ -4743,29 +4824,29 @@ ${text}</tr>
|
|
|
4743
4824
|
}
|
|
4744
4825
|
|
|
4745
4826
|
class _TextRenderer {
|
|
4746
|
-
strong({ text }) {
|
|
4747
|
-
return
|
|
4827
|
+
strong({ text: text2 }) {
|
|
4828
|
+
return text2;
|
|
4748
4829
|
}
|
|
4749
|
-
em({ text }) {
|
|
4750
|
-
return
|
|
4830
|
+
em({ text: text2 }) {
|
|
4831
|
+
return text2;
|
|
4751
4832
|
}
|
|
4752
|
-
codespan({ text }) {
|
|
4753
|
-
return
|
|
4833
|
+
codespan({ text: text2 }) {
|
|
4834
|
+
return text2;
|
|
4754
4835
|
}
|
|
4755
|
-
del({ text }) {
|
|
4756
|
-
return
|
|
4836
|
+
del({ text: text2 }) {
|
|
4837
|
+
return text2;
|
|
4757
4838
|
}
|
|
4758
|
-
html({ text }) {
|
|
4759
|
-
return
|
|
4839
|
+
html({ text: text2 }) {
|
|
4840
|
+
return text2;
|
|
4760
4841
|
}
|
|
4761
|
-
text({ text }) {
|
|
4762
|
-
return
|
|
4842
|
+
text({ text: text2 }) {
|
|
4843
|
+
return text2;
|
|
4763
4844
|
}
|
|
4764
|
-
link({ text }) {
|
|
4765
|
-
return "" +
|
|
4845
|
+
link({ text: text2 }) {
|
|
4846
|
+
return "" + text2;
|
|
4766
4847
|
}
|
|
4767
|
-
image({ text }) {
|
|
4768
|
-
return "" +
|
|
4848
|
+
image({ text: text2 }) {
|
|
4849
|
+
return "" + text2;
|
|
4769
4850
|
}
|
|
4770
4851
|
br() {
|
|
4771
4852
|
return "";
|
|
@@ -5306,6 +5387,13 @@ var KINDS = {
|
|
|
5306
5387
|
flac: "audio",
|
|
5307
5388
|
pdf: "pdf"
|
|
5308
5389
|
};
|
|
5390
|
+
var LONG_CELL = 24;
|
|
5391
|
+
var LONG_CELL_PX = 196;
|
|
5392
|
+
var CHAR_PX = 7;
|
|
5393
|
+
var CELL_EDGE_PX = 25;
|
|
5394
|
+
var PAGE_EDGE_PX = 64;
|
|
5395
|
+
var CARDS_MAX_PX = 640;
|
|
5396
|
+
var CARDS_STEP_PX = 20;
|
|
5309
5397
|
var TEXT_KINDS = new Set(["md", "markdown", "html", "htm", "svg"]);
|
|
5310
5398
|
var PreviewUtil;
|
|
5311
5399
|
((PreviewUtil) => {
|
|
@@ -5318,6 +5406,15 @@ var PreviewUtil;
|
|
|
5318
5406
|
return KINDS[extension(path)];
|
|
5319
5407
|
}
|
|
5320
5408
|
PreviewUtil.kind = kind;
|
|
5409
|
+
function siblings(entries, path) {
|
|
5410
|
+
const pictures = entries.filter((entry) => entry.kind === "file" && kind(entry.path) === "image").map((entry) => entry.path).sort((a, b) => WorkspaceUtil.compareNames(WorkspaceUtil.basename(a), WorkspaceUtil.basename(b)));
|
|
5411
|
+
const index = pictures.indexOf(path);
|
|
5412
|
+
if (index < 0 || pictures.length < 2) {
|
|
5413
|
+
return;
|
|
5414
|
+
}
|
|
5415
|
+
return { index, count: pictures.length, previous: pictures[index - 1], next: pictures[index + 1] };
|
|
5416
|
+
}
|
|
5417
|
+
PreviewUtil.siblings = siblings;
|
|
5321
5418
|
function hasText(path) {
|
|
5322
5419
|
return TEXT_KINDS.has(extension(path));
|
|
5323
5420
|
}
|
|
@@ -5341,8 +5438,8 @@ var PreviewUtil;
|
|
|
5341
5438
|
}
|
|
5342
5439
|
}
|
|
5343
5440
|
PreviewUtil.resolve = resolve;
|
|
5344
|
-
function slug(
|
|
5345
|
-
const base =
|
|
5441
|
+
function slug(text2, taken) {
|
|
5442
|
+
const base = text2.trim().toLowerCase().replace(/[^\p{L}\p{N}\s_-]/gu, "").replace(/\s/g, "-");
|
|
5346
5443
|
const count = taken.get(base) ?? 0;
|
|
5347
5444
|
taken.set(base, count + 1);
|
|
5348
5445
|
return count ? `${base}-${count}` : base;
|
|
@@ -5352,14 +5449,44 @@ var PreviewUtil;
|
|
|
5352
5449
|
const meta = `<meta http-equiv="Content-Security-Policy" content="${PAGE_CSP}">`;
|
|
5353
5450
|
const head = /<head[^>]*>/i.exec(html2);
|
|
5354
5451
|
if (head) {
|
|
5355
|
-
const
|
|
5356
|
-
return html2.slice(0,
|
|
5452
|
+
const at3 = head.index + head[0].length;
|
|
5453
|
+
return html2.slice(0, at3) + meta + html2.slice(at3);
|
|
5357
5454
|
}
|
|
5358
5455
|
const doctype = /<!doctype[^>]*>/i.exec(html2);
|
|
5359
|
-
const
|
|
5360
|
-
return html2.slice(0,
|
|
5456
|
+
const at2 = doctype ? doctype.index + doctype[0].length : 0;
|
|
5457
|
+
return html2.slice(0, at2) + meta + html2.slice(at2);
|
|
5361
5458
|
}
|
|
5362
5459
|
PreviewUtil.pageDocument = pageDocument;
|
|
5460
|
+
function units(text2) {
|
|
5461
|
+
let count = 0;
|
|
5462
|
+
for (const char of text2) {
|
|
5463
|
+
count += (char.codePointAt(0) ?? 0) >= 11904 ? 2 : 1;
|
|
5464
|
+
}
|
|
5465
|
+
return count;
|
|
5466
|
+
}
|
|
5467
|
+
function longCell(text2) {
|
|
5468
|
+
return units(text2.trim()) > LONG_CELL;
|
|
5469
|
+
}
|
|
5470
|
+
PreviewUtil.longCell = longCell;
|
|
5471
|
+
function tableWidth(rows) {
|
|
5472
|
+
const columns = [];
|
|
5473
|
+
for (const row of rows) {
|
|
5474
|
+
row.forEach((cell, index) => {
|
|
5475
|
+
const width = longCell(cell) ? LONG_CELL_PX : units(cell.trim()) * CHAR_PX;
|
|
5476
|
+
columns[index] = Math.max(columns[index] ?? 0, width + CELL_EDGE_PX);
|
|
5477
|
+
});
|
|
5478
|
+
}
|
|
5479
|
+
return columns.reduce((sum, width) => sum + width, 0);
|
|
5480
|
+
}
|
|
5481
|
+
PreviewUtil.tableWidth = tableWidth;
|
|
5482
|
+
function cardsBelow(rows) {
|
|
5483
|
+
if (Math.max(0, ...rows.map((row) => row.length)) < 2) {
|
|
5484
|
+
return 0;
|
|
5485
|
+
}
|
|
5486
|
+
const page = tableWidth(rows) + PAGE_EDGE_PX;
|
|
5487
|
+
return Math.min(CARDS_MAX_PX, Math.ceil(page / CARDS_STEP_PX) * CARDS_STEP_PX);
|
|
5488
|
+
}
|
|
5489
|
+
PreviewUtil.cardsBelow = cardsBelow;
|
|
5363
5490
|
function markdownDocument(body, style) {
|
|
5364
5491
|
return `<!doctype html><html><head><meta charset="utf-8"><style>${style}</style></head><body><article class="markdown">${body}</article></body></html>`;
|
|
5365
5492
|
}
|
|
@@ -5379,10 +5506,26 @@ var LINKED = [
|
|
|
5379
5506
|
function themeValue(name) {
|
|
5380
5507
|
return getComputedStyle(document.documentElement).getPropertyValue(name).trim();
|
|
5381
5508
|
}
|
|
5382
|
-
function
|
|
5509
|
+
function cardStyle(width, v) {
|
|
5510
|
+
const table = `.table[data-cards='${width}']`;
|
|
5511
|
+
return `
|
|
5512
|
+
@media (max-width: ${width - 0.02}px) {
|
|
5513
|
+
${table} { width: auto; overflow: visible; border: 0; border-radius: 0; }
|
|
5514
|
+
${table} :is(table, tbody, tr, td) { display: block; }
|
|
5515
|
+
${table} thead { display: none; }
|
|
5516
|
+
${table} tr { margin: 0 0 10px; padding: 8px 14px 6px; border: 1px solid ${v("border")}; border-radius: 10px; background: ${v("card")}; }
|
|
5517
|
+
${table} tr:last-child { margin-bottom: 0; }
|
|
5518
|
+
${table} td { display: grid; grid-template-columns: min(34%, 9em) minmax(0, 1fr); gap: 12px; min-width: 0; padding: 4px 0; border: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
|
|
5519
|
+
${table} td > .label { display: block; color: ${v("muted")}; }
|
|
5520
|
+
${table} td:first-child { display: block; padding: 2px 0 8px; margin-bottom: 4px; border-bottom: 1px solid ${v("border-muted")}; color: ${v("text")}; font-weight: 600; }
|
|
5521
|
+
${table} td:first-child > .label, ${table} td:not(:first-child):has(> .value:empty) { display: none; }
|
|
5522
|
+
}`;
|
|
5523
|
+
}
|
|
5524
|
+
function markdownStyle(cards) {
|
|
5383
5525
|
const v = (name) => themeValue(`--ta-${name}`);
|
|
5384
5526
|
return `
|
|
5385
5527
|
:root { color-scheme: ${pi.ui.theme}; }
|
|
5528
|
+
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
|
|
5386
5529
|
html, body { margin: 0; overscroll-behavior: none; background: ${v("main")}; color: ${v("body")}; font: 14px/1.7 ${v("sans")}; -webkit-font-smoothing: antialiased; }
|
|
5387
5530
|
.markdown { max-width: 860px; margin: 0 auto; padding: 24px 32px 48px; overflow-wrap: break-word; }
|
|
5388
5531
|
.markdown > :first-child { margin-top: 0; }
|
|
@@ -5399,16 +5542,67 @@ code { padding: 0.15em 0.4em; border-radius: 5px; background: ${v("chip")}; font
|
|
|
5399
5542
|
pre { padding: 12px 14px; overflow: auto; border: 1px solid ${v("border")}; border-radius: 10px; background: ${v("code")}; line-height: 1.55; }
|
|
5400
5543
|
pre code { padding: 0; background: none; font-size: 12.5px; }
|
|
5401
5544
|
blockquote { padding: 0 1em; border-left: 3px solid ${v("border-field")}; color: ${v("secondary")}; }
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5545
|
+
/* A table: short cells keep to one line, long ones wrap from a width that reads; wider than the page, it scrolls
|
|
5546
|
+
in its frame — or, on a narrow page, shows its rows as cards (cardStyle) — rather than squeezes its columns.
|
|
5547
|
+
Its frame, rows and head are those of a table in a conversation (.ta-table of the page). */
|
|
5548
|
+
.table { width: fit-content; max-width: 100%; margin: 0 0 1em; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid ${v("border")}; border-radius: 10px; }
|
|
5549
|
+
.table > table { margin: 0; border-collapse: collapse; font-variant-numeric: tabular-nums; }
|
|
5550
|
+
th, td { padding: 7px 12px; border: 0; border-bottom: 1px solid ${v("border-muted")}; text-align: left; vertical-align: top; white-space: nowrap; }
|
|
5551
|
+
tr:last-child > td { border-bottom: 0; }
|
|
5552
|
+
th { background: ${v("raised")}; font-weight: 600; color: ${v("text")}; }
|
|
5553
|
+
:is(th, td)[align='center'] { text-align: center; } :is(th, td)[align='right'] { text-align: right; }
|
|
5554
|
+
:is(th, td).long { min-width: 14em; white-space: normal; overflow-wrap: anywhere; }
|
|
5555
|
+
td > .label { display: none; }
|
|
5556
|
+
img, video { max-width: 100%; height: auto; } img { border-radius: 4px; }
|
|
5405
5557
|
hr { height: 0; margin: 1.6em 0; border: 0; border-top: 1px solid ${v("border")}; }
|
|
5406
|
-
@media (max-width: 600px) {
|
|
5558
|
+
@media (max-width: 600px) {
|
|
5559
|
+
.markdown { padding: 16px 16px 32px; }
|
|
5560
|
+
h1 { font-size: 1.6em; } h2 { font-size: 1.3em; } h3 { font-size: 1.12em; }
|
|
5561
|
+
ul, ol { padding-left: 1.3em; }
|
|
5562
|
+
blockquote { padding: 0 0.8em; }
|
|
5563
|
+
pre { padding: 10px 12px; } pre code { font-size: 12px; }
|
|
5564
|
+
}
|
|
5565
|
+
:not(pre) > code { overflow-wrap: anywhere; }
|
|
5407
5566
|
kbd { padding: 1px 5px; border: 1px solid ${v("border")}; border-bottom-width: 2px; border-radius: 4px; font-family: ${v("mono")}; font-size: 0.85em; }
|
|
5567
|
+
${[...new Set(cards)].map((width) => cardStyle(width, v)).join("")}
|
|
5408
5568
|
`;
|
|
5409
5569
|
}
|
|
5410
|
-
function
|
|
5411
|
-
const
|
|
5570
|
+
function fitTables(body) {
|
|
5571
|
+
const widths = [];
|
|
5572
|
+
for (const table of body.querySelectorAll("table")) {
|
|
5573
|
+
const rows = [...table.rows];
|
|
5574
|
+
const text2 = rows.map((row) => [...row.cells].map((cell) => cell.textContent ?? ""));
|
|
5575
|
+
const head = table.tHead?.rows[0];
|
|
5576
|
+
for (const [index, row] of rows.entries()) {
|
|
5577
|
+
for (const [column, cell] of [...row.cells].entries()) {
|
|
5578
|
+
if (PreviewUtil.longCell(text2[index][column])) {
|
|
5579
|
+
cell.classList.add("long");
|
|
5580
|
+
}
|
|
5581
|
+
if (cell.tagName === "TD") {
|
|
5582
|
+
const value = body.ownerDocument.createElement("span");
|
|
5583
|
+
value.className = "value";
|
|
5584
|
+
value.append(...cell.childNodes);
|
|
5585
|
+
const label2 = body.ownerDocument.createElement("span");
|
|
5586
|
+
label2.className = "label";
|
|
5587
|
+
label2.innerHTML = head?.cells[column]?.innerHTML ?? "";
|
|
5588
|
+
cell.append(label2, value);
|
|
5589
|
+
}
|
|
5590
|
+
}
|
|
5591
|
+
}
|
|
5592
|
+
const frame = body.ownerDocument.createElement("div");
|
|
5593
|
+
frame.className = "table";
|
|
5594
|
+
const below = PreviewUtil.cardsBelow(text2);
|
|
5595
|
+
if (below) {
|
|
5596
|
+
frame.dataset.cards = String(below);
|
|
5597
|
+
widths.push(below);
|
|
5598
|
+
}
|
|
5599
|
+
table.replaceWith(frame);
|
|
5600
|
+
frame.append(table);
|
|
5601
|
+
}
|
|
5602
|
+
return widths;
|
|
5603
|
+
}
|
|
5604
|
+
function renderMarkdown(text2, directory) {
|
|
5605
|
+
const html2 = marked.parse(text2, { async: false, gfm: true });
|
|
5412
5606
|
const body = new DOMParser().parseFromString(html2, "text/html").body;
|
|
5413
5607
|
for (const [tag2, attribute] of LINKED) {
|
|
5414
5608
|
for (const element of body.querySelectorAll(`${tag2}[${attribute}]`)) {
|
|
@@ -5425,11 +5619,12 @@ function renderMarkdown(text, directory) {
|
|
|
5425
5619
|
for (const heading2 of body.querySelectorAll("h1, h2, h3, h4, h5, h6")) {
|
|
5426
5620
|
heading2.id ||= PreviewUtil.slug(heading2.textContent ?? "", taken);
|
|
5427
5621
|
}
|
|
5428
|
-
|
|
5622
|
+
const cards = fitTables(body);
|
|
5623
|
+
return PreviewUtil.markdownDocument(body.innerHTML, markdownStyle(cards));
|
|
5429
5624
|
}
|
|
5430
|
-
function MarkdownPreview({ text, url }) {
|
|
5625
|
+
function MarkdownPreview({ text: text2, url }) {
|
|
5431
5626
|
const theme = useTheme();
|
|
5432
|
-
const document2 = React.useMemo(() => renderMarkdown(
|
|
5627
|
+
const document2 = React.useMemo(() => renderMarkdown(text2, PreviewUtil.directoryUrl(new URL(url, location.href).href)), [text2, url, theme]);
|
|
5433
5628
|
return /* @__PURE__ */ React.createElement("iframe", {
|
|
5434
5629
|
className: "taw-preview-frame",
|
|
5435
5630
|
title: "Markdown",
|
|
@@ -5437,14 +5632,60 @@ function MarkdownPreview({ text, url }) {
|
|
|
5437
5632
|
srcDoc: document2
|
|
5438
5633
|
});
|
|
5439
5634
|
}
|
|
5440
|
-
|
|
5441
|
-
|
|
5635
|
+
var browsedTo;
|
|
5636
|
+
var browseListeners = new Set;
|
|
5637
|
+
var BROWSE_FOCUS_MS = 2000;
|
|
5638
|
+
function browsePicture(id) {
|
|
5639
|
+
browsedTo = id;
|
|
5640
|
+
for (const listener of browseListeners) {
|
|
5641
|
+
listener();
|
|
5642
|
+
}
|
|
5643
|
+
}
|
|
5644
|
+
function useBrowsedTo(id) {
|
|
5645
|
+
const [at2, setAt] = React.useState(0);
|
|
5646
|
+
React.useEffect(() => {
|
|
5647
|
+
const take = () => {
|
|
5648
|
+
if (browsedTo === id) {
|
|
5649
|
+
browsedTo = undefined;
|
|
5650
|
+
setAt(Date.now());
|
|
5651
|
+
}
|
|
5652
|
+
};
|
|
5653
|
+
take();
|
|
5654
|
+
browseListeners.add(take);
|
|
5655
|
+
return () => {
|
|
5656
|
+
browseListeners.delete(take);
|
|
5657
|
+
};
|
|
5658
|
+
}, [id]);
|
|
5659
|
+
return at2;
|
|
5660
|
+
}
|
|
5661
|
+
function ImagePreview({
|
|
5662
|
+
url,
|
|
5663
|
+
size,
|
|
5664
|
+
onInfo,
|
|
5665
|
+
previous,
|
|
5666
|
+
next,
|
|
5667
|
+
browsedAt = 0
|
|
5668
|
+
}) {
|
|
5669
|
+
const root = React.useRef(null);
|
|
5670
|
+
React.useEffect(() => {
|
|
5671
|
+
if (Date.now() - browsedAt > BROWSE_FOCUS_MS) {
|
|
5672
|
+
return;
|
|
5673
|
+
}
|
|
5674
|
+
const frame = requestAnimationFrame(() => root.current?.querySelector(".ta-zoom-viewport")?.focus({ preventScroll: true }));
|
|
5675
|
+
return () => cancelAnimationFrame(frame);
|
|
5676
|
+
}, [browsedAt]);
|
|
5677
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
5678
|
+
ref: root,
|
|
5679
|
+
className: "taw-preview-picture"
|
|
5680
|
+
}, /* @__PURE__ */ React.createElement(pi.ui.ImageViewer, {
|
|
5442
5681
|
src: url,
|
|
5443
5682
|
className: "taw-preview-image",
|
|
5444
|
-
onLoad: (image) => onInfo(`${image.width} × ${image.height} · ${WorkspaceUtil.size(size)}`)
|
|
5445
|
-
|
|
5683
|
+
onLoad: (image) => onInfo(`${image.width} × ${image.height} · ${WorkspaceUtil.size(size)}`),
|
|
5684
|
+
onPrevious: previous,
|
|
5685
|
+
onNext: next
|
|
5686
|
+
}));
|
|
5446
5687
|
}
|
|
5447
|
-
function PagePreview({ url, text }) {
|
|
5688
|
+
function PagePreview({ url, text: text2 }) {
|
|
5448
5689
|
if (url) {
|
|
5449
5690
|
return /* @__PURE__ */ React.createElement("iframe", {
|
|
5450
5691
|
className: "taw-preview-frame taw-preview-page",
|
|
@@ -5457,14 +5698,17 @@ function PagePreview({ url, text }) {
|
|
|
5457
5698
|
className: "taw-preview-frame taw-preview-page",
|
|
5458
5699
|
title: "HTML",
|
|
5459
5700
|
sandbox: PAGE_SANDBOX,
|
|
5460
|
-
srcDoc: PreviewUtil.pageDocument(
|
|
5701
|
+
srcDoc: PreviewUtil.pageDocument(text2)
|
|
5461
5702
|
});
|
|
5462
5703
|
}
|
|
5463
5704
|
function MediaPreview({
|
|
5464
5705
|
kind,
|
|
5465
5706
|
url,
|
|
5466
5707
|
size,
|
|
5467
|
-
onInfo
|
|
5708
|
+
onInfo,
|
|
5709
|
+
previous,
|
|
5710
|
+
next,
|
|
5711
|
+
browsedAt
|
|
5468
5712
|
}) {
|
|
5469
5713
|
switch (kind) {
|
|
5470
5714
|
case "pdf":
|
|
@@ -5477,7 +5721,10 @@ function MediaPreview({
|
|
|
5477
5721
|
return /* @__PURE__ */ React.createElement(ImagePreview, {
|
|
5478
5722
|
url,
|
|
5479
5723
|
size,
|
|
5480
|
-
onInfo
|
|
5724
|
+
onInfo,
|
|
5725
|
+
previous,
|
|
5726
|
+
next,
|
|
5727
|
+
browsedAt
|
|
5481
5728
|
});
|
|
5482
5729
|
case "video":
|
|
5483
5730
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -5652,12 +5899,12 @@ var TaLocation;
|
|
|
5652
5899
|
TaLocation2.isAbsolute = isAbsolute;
|
|
5653
5900
|
function parentPath(path2) {
|
|
5654
5901
|
const trimmed = path2.replace(/[\\/]+$/, "");
|
|
5655
|
-
const
|
|
5656
|
-
if (
|
|
5902
|
+
const at2 = Math.max(trimmed.lastIndexOf("/"), trimmed.lastIndexOf("\\"));
|
|
5903
|
+
if (at2 < 0) {
|
|
5657
5904
|
return;
|
|
5658
5905
|
}
|
|
5659
|
-
const head = trimmed.slice(0,
|
|
5660
|
-
return head === "" || /^[A-Za-z]:$/.test(head) ? head + trimmed[
|
|
5906
|
+
const head = trimmed.slice(0, at2);
|
|
5907
|
+
return head === "" || /^[A-Za-z]:$/.test(head) ? head + trimmed[at2] : head;
|
|
5661
5908
|
}
|
|
5662
5909
|
function childPath(path2, name) {
|
|
5663
5910
|
const separator = path2.includes("/") || !path2.includes("\\") ? "/" : "\\";
|
|
@@ -5672,12 +5919,12 @@ var TaLocation;
|
|
|
5672
5919
|
var TaPackageServer = Symbol("TaPackageServer");
|
|
5673
5920
|
var TaPackageTextUtil;
|
|
5674
5921
|
(function(TaPackageTextUtil2) {
|
|
5675
|
-
function pick(
|
|
5922
|
+
function pick(text2, language) {
|
|
5676
5923
|
var _a, _b, _c, _d;
|
|
5677
|
-
if (
|
|
5678
|
-
return
|
|
5924
|
+
if (text2 === undefined || typeof text2 === "string") {
|
|
5925
|
+
return text2;
|
|
5679
5926
|
}
|
|
5680
|
-
return (_d = (_c = (_b = (_a =
|
|
5927
|
+
return (_d = (_c = (_b = (_a = text2[language]) !== null && _a !== undefined ? _a : text2[language.split("-")[0]]) !== null && _b !== undefined ? _b : text2.en) !== null && _c !== undefined ? _c : text2["en-US"]) !== null && _d !== undefined ? _d : Object.values(text2)[0];
|
|
5681
5928
|
}
|
|
5682
5929
|
TaPackageTextUtil2.pick = pick;
|
|
5683
5930
|
})(TaPackageTextUtil || (TaPackageTextUtil = {}));
|
|
@@ -5685,8 +5932,64 @@ var TaPackageTextUtil;
|
|
|
5685
5932
|
var TaRelayServer = Symbol("TaRelayServer");
|
|
5686
5933
|
// ../ta-protocol/esm/common/remote-protocol.js
|
|
5687
5934
|
var TaRemoteServer = Symbol("TaRemoteServer");
|
|
5935
|
+
// ../ta-protocol/esm/common/room-protocol.js
|
|
5936
|
+
var TaRoomServer = Symbol("TaRoomServer");
|
|
5937
|
+
var TaRoomWatchUtil;
|
|
5938
|
+
(function(TaRoomWatchUtil2) {
|
|
5939
|
+
function of(messages, state) {
|
|
5940
|
+
const prefixes = Array.isArray(state) ? state.filter((prefix) => typeof prefix === "string" && prefix.length > 0) : [];
|
|
5941
|
+
return { messages: messages !== false, state: [...new Set(prefixes)].sort() };
|
|
5942
|
+
}
|
|
5943
|
+
TaRoomWatchUtil2.of = of;
|
|
5944
|
+
function union(watches) {
|
|
5945
|
+
let messages = false;
|
|
5946
|
+
const state = [];
|
|
5947
|
+
for (const watch of watches) {
|
|
5948
|
+
messages || (messages = watch.messages);
|
|
5949
|
+
state.push(...watch.state);
|
|
5950
|
+
}
|
|
5951
|
+
return of(messages, messages ? [] : state);
|
|
5952
|
+
}
|
|
5953
|
+
TaRoomWatchUtil2.union = union;
|
|
5954
|
+
function same(a, b) {
|
|
5955
|
+
return a === b || !!a && !!b && a.messages === b.messages && a.state.join(`
|
|
5956
|
+
`) === b.state.join(`
|
|
5957
|
+
`);
|
|
5958
|
+
}
|
|
5959
|
+
TaRoomWatchUtil2.same = same;
|
|
5960
|
+
function hears(watch, event) {
|
|
5961
|
+
if (event.type === "message") {
|
|
5962
|
+
return watch.messages;
|
|
5963
|
+
}
|
|
5964
|
+
if (event.type === "state") {
|
|
5965
|
+
return watch.messages || watch.state.some((prefix) => event.key.startsWith(prefix));
|
|
5966
|
+
}
|
|
5967
|
+
return true;
|
|
5968
|
+
}
|
|
5969
|
+
TaRoomWatchUtil2.hears = hears;
|
|
5970
|
+
})(TaRoomWatchUtil || (TaRoomWatchUtil = {}));
|
|
5688
5971
|
// ../ta-protocol/esm/common/settings-protocol.js
|
|
5689
5972
|
var TaSettingsServer = Symbol("TaSettingsServer");
|
|
5973
|
+
// ../ta-protocol/esm/common/ta-extension-host.js
|
|
5974
|
+
var TA_HOST_EVENT = "ta:host";
|
|
5975
|
+
var TaHostUtil;
|
|
5976
|
+
(function(TaHostUtil2) {
|
|
5977
|
+
TaHostUtil2.WAIT_MS = 1000;
|
|
5978
|
+
function reach(events, name, waitMs = TaHostUtil2.WAIT_MS) {
|
|
5979
|
+
return new Promise((resolve) => {
|
|
5980
|
+
const timer = setTimeout(() => resolve(undefined), waitMs);
|
|
5981
|
+
const request = {
|
|
5982
|
+
name,
|
|
5983
|
+
resolve: (answer) => {
|
|
5984
|
+
clearTimeout(timer);
|
|
5985
|
+
resolve(answer);
|
|
5986
|
+
}
|
|
5987
|
+
};
|
|
5988
|
+
events.emit(TA_HOST_EVENT, request);
|
|
5989
|
+
});
|
|
5990
|
+
}
|
|
5991
|
+
TaHostUtil2.reach = reach;
|
|
5992
|
+
})(TaHostUtil || (TaHostUtil = {}));
|
|
5690
5993
|
// ../ta-protocol/esm/common/ta-protocol.js
|
|
5691
5994
|
var TaServer = Symbol("TaServer");
|
|
5692
5995
|
var TaClient = Symbol("TaClient");
|
|
@@ -5701,6 +6004,15 @@ var TaErrorUtil;
|
|
|
5701
6004
|
}
|
|
5702
6005
|
TaErrorUtil2.code = code;
|
|
5703
6006
|
})(TaErrorUtil || (TaErrorUtil = {}));
|
|
6007
|
+
var TaSlashCommandUtil;
|
|
6008
|
+
(function(TaSlashCommandUtil2) {
|
|
6009
|
+
function description(command, language) {
|
|
6010
|
+
var _a, _b;
|
|
6011
|
+
const { descriptions } = command;
|
|
6012
|
+
return (_b = (_a = descriptions === null || descriptions === undefined ? undefined : descriptions[language]) !== null && _a !== undefined ? _a : descriptions === null || descriptions === undefined ? undefined : descriptions[language.split("-")[0]]) !== null && _b !== undefined ? _b : command.description;
|
|
6013
|
+
}
|
|
6014
|
+
TaSlashCommandUtil2.description = description;
|
|
6015
|
+
})(TaSlashCommandUtil || (TaSlashCommandUtil = {}));
|
|
5704
6016
|
var TaMessageContext;
|
|
5705
6017
|
(function(TaMessageContext2) {
|
|
5706
6018
|
const BLOCK = /^<context>\n?[\s\S]*?\n?<\/context>\n?/;
|
|
@@ -5719,31 +6031,103 @@ ${message}`;
|
|
|
5719
6031
|
var TaImageNote;
|
|
5720
6032
|
(function(TaImageNote2) {
|
|
5721
6033
|
const NOTE = /^\[Image: original \d+x\d+, displayed at \d+x\d+\. Multiply coordinates by [\d.]+ to map to original image\.\]$|^\[Image converted from [^\]]+ to [^\]]+\.\]$/;
|
|
5722
|
-
function strip(
|
|
5723
|
-
const lines =
|
|
6034
|
+
function strip(text2) {
|
|
6035
|
+
const lines = text2.split(`
|
|
5724
6036
|
`);
|
|
5725
6037
|
const kept = lines.filter((line) => !NOTE.test(line.trim()));
|
|
5726
6038
|
if (kept.length === lines.length) {
|
|
5727
|
-
return
|
|
6039
|
+
return text2;
|
|
5728
6040
|
}
|
|
5729
6041
|
return kept.join(`
|
|
5730
6042
|
`).replace(/\n+$/, "").replace(/^\n+/, "");
|
|
5731
6043
|
}
|
|
5732
6044
|
TaImageNote2.strip = strip;
|
|
5733
6045
|
})(TaImageNote || (TaImageNote = {}));
|
|
6046
|
+
var TaImageSize;
|
|
6047
|
+
(function(TaImageSize2) {
|
|
6048
|
+
const JPEG_BYTES = 256 * 1024;
|
|
6049
|
+
function of(base64) {
|
|
6050
|
+
var _a, _b, _c;
|
|
6051
|
+
let bytes;
|
|
6052
|
+
try {
|
|
6053
|
+
const binary = atob(base64.slice(0, Math.ceil(JPEG_BYTES * 4 / 3 / 4) * 4));
|
|
6054
|
+
bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0));
|
|
6055
|
+
} catch (_d) {
|
|
6056
|
+
return;
|
|
6057
|
+
}
|
|
6058
|
+
const size = (_c = (_b = (_a = png(bytes)) !== null && _a !== undefined ? _a : gif(bytes)) !== null && _b !== undefined ? _b : webp(bytes)) !== null && _c !== undefined ? _c : jpeg(bytes);
|
|
6059
|
+
return size && size.width > 0 && size.height > 0 ? size : undefined;
|
|
6060
|
+
}
|
|
6061
|
+
TaImageSize2.of = of;
|
|
6062
|
+
function u16be(bytes, at2) {
|
|
6063
|
+
return bytes[at2] << 8 | bytes[at2 + 1];
|
|
6064
|
+
}
|
|
6065
|
+
function u16le(bytes, at2) {
|
|
6066
|
+
return bytes[at2] | bytes[at2 + 1] << 8;
|
|
6067
|
+
}
|
|
6068
|
+
function u24le(bytes, at2) {
|
|
6069
|
+
return bytes[at2] | bytes[at2 + 1] << 8 | bytes[at2 + 2] << 16;
|
|
6070
|
+
}
|
|
6071
|
+
function u32be(bytes, at2) {
|
|
6072
|
+
return (bytes[at2] << 24 | bytes[at2 + 1] << 16 | bytes[at2 + 2] << 8 | bytes[at2 + 3]) >>> 0;
|
|
6073
|
+
}
|
|
6074
|
+
function text2(bytes, at2, length) {
|
|
6075
|
+
return String.fromCharCode(...bytes.subarray(at2, at2 + length));
|
|
6076
|
+
}
|
|
6077
|
+
function png(bytes) {
|
|
6078
|
+
return bytes.length >= 24 && bytes[0] === 137 && text2(bytes, 1, 3) === "PNG" ? { width: u32be(bytes, 16), height: u32be(bytes, 20) } : undefined;
|
|
6079
|
+
}
|
|
6080
|
+
function gif(bytes) {
|
|
6081
|
+
return bytes.length >= 10 && text2(bytes, 0, 3) === "GIF" ? { width: u16le(bytes, 6), height: u16le(bytes, 8) } : undefined;
|
|
6082
|
+
}
|
|
6083
|
+
function webp(bytes) {
|
|
6084
|
+
if (bytes.length < 30 || text2(bytes, 0, 4) !== "RIFF" || text2(bytes, 8, 4) !== "WEBP") {
|
|
6085
|
+
return;
|
|
6086
|
+
}
|
|
6087
|
+
switch (text2(bytes, 12, 4)) {
|
|
6088
|
+
case "VP8 ":
|
|
6089
|
+
return { width: u16le(bytes, 26) & 16383, height: u16le(bytes, 28) & 16383 };
|
|
6090
|
+
case "VP8L": {
|
|
6091
|
+
const bits = bytes[21] | bytes[22] << 8 | bytes[23] << 16 | bytes[24] << 24;
|
|
6092
|
+
return { width: (bits & 16383) + 1, height: (bits >> 14 & 16383) + 1 };
|
|
6093
|
+
}
|
|
6094
|
+
case "VP8X":
|
|
6095
|
+
return { width: u24le(bytes, 24) + 1, height: u24le(bytes, 27) + 1 };
|
|
6096
|
+
default:
|
|
6097
|
+
return;
|
|
6098
|
+
}
|
|
6099
|
+
}
|
|
6100
|
+
function jpeg(bytes) {
|
|
6101
|
+
if (bytes[0] !== 255 || bytes[1] !== 216) {
|
|
6102
|
+
return;
|
|
6103
|
+
}
|
|
6104
|
+
let at2 = 2;
|
|
6105
|
+
while (at2 + 9 < bytes.length) {
|
|
6106
|
+
if (bytes[at2] !== 255) {
|
|
6107
|
+
return;
|
|
6108
|
+
}
|
|
6109
|
+
const marker = bytes[at2 + 1];
|
|
6110
|
+
if (marker >= 192 && marker <= 207 && marker !== 196 && marker !== 200 && marker !== 204) {
|
|
6111
|
+
return { width: u16be(bytes, at2 + 7), height: u16be(bytes, at2 + 5) };
|
|
6112
|
+
}
|
|
6113
|
+
at2 += 2 + u16be(bytes, at2 + 2);
|
|
6114
|
+
}
|
|
6115
|
+
return;
|
|
6116
|
+
}
|
|
6117
|
+
})(TaImageSize || (TaImageSize = {}));
|
|
5734
6118
|
var TaAgentSummary;
|
|
5735
6119
|
(function(TaAgentSummary2) {
|
|
5736
6120
|
const START = /^\s*<conversation_history_summary>/;
|
|
5737
6121
|
const BLOCK = /^\s*<conversation_history_summary>[\s\S]*?(?:<\/conversation_history_summary>\s*|$)/;
|
|
5738
|
-
function read(
|
|
5739
|
-
if (!START.test(
|
|
6122
|
+
function read(text2) {
|
|
6123
|
+
if (!START.test(text2)) {
|
|
5740
6124
|
return;
|
|
5741
6125
|
}
|
|
5742
|
-
return
|
|
6126
|
+
return text2.replace(/<\/?(?:conversation_history_summary|summary)>/g, "").replace(/<\/?\w*$/, "").trim();
|
|
5743
6127
|
}
|
|
5744
6128
|
TaAgentSummary2.read = read;
|
|
5745
|
-
function strip(
|
|
5746
|
-
return
|
|
6129
|
+
function strip(text2) {
|
|
6130
|
+
return text2.replace(BLOCK, "");
|
|
5747
6131
|
}
|
|
5748
6132
|
TaAgentSummary2.strip = strip;
|
|
5749
6133
|
})(TaAgentSummary || (TaAgentSummary = {}));
|
|
@@ -5880,8 +6264,8 @@ var SearchUtil;
|
|
|
5880
6264
|
}
|
|
5881
6265
|
}
|
|
5882
6266
|
SearchUtil.patternError = patternError;
|
|
5883
|
-
function escapeText(
|
|
5884
|
-
return
|
|
6267
|
+
function escapeText(text2) {
|
|
6268
|
+
return text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5885
6269
|
}
|
|
5886
6270
|
SearchUtil.escapeText = escapeText;
|
|
5887
6271
|
function toExtendedRegExp(source) {
|
|
@@ -5889,10 +6273,10 @@ var SearchUtil;
|
|
|
5889
6273
|
return source.replace(/\\\\|\\([dDwWsS])/g, (all, name) => name ? classes[name] : all);
|
|
5890
6274
|
}
|
|
5891
6275
|
SearchUtil.toExtendedRegExp = toExtendedRegExp;
|
|
5892
|
-
function find(
|
|
6276
|
+
function find(text2, expression) {
|
|
5893
6277
|
const out = [];
|
|
5894
6278
|
expression.lastIndex = 0;
|
|
5895
|
-
for (let found = expression.exec(
|
|
6279
|
+
for (let found = expression.exec(text2);found; found = expression.exec(text2)) {
|
|
5896
6280
|
if (!found[0]) {
|
|
5897
6281
|
expression.lastIndex++;
|
|
5898
6282
|
continue;
|
|
@@ -5914,60 +6298,60 @@ var SearchUtil;
|
|
|
5914
6298
|
if (filter && !filter(path)) {
|
|
5915
6299
|
continue;
|
|
5916
6300
|
}
|
|
5917
|
-
const
|
|
5918
|
-
for (const [index, length] of find(
|
|
6301
|
+
const text2 = found[3].replace(/\r$/, "");
|
|
6302
|
+
for (const [index, length] of find(text2, expression)) {
|
|
5919
6303
|
if (matches.length === limit) {
|
|
5920
6304
|
return { matches, truncated: true };
|
|
5921
6305
|
}
|
|
5922
|
-
matches.push({ path, line: Number(found[2]), column: index + 1, length, ...preview(
|
|
6306
|
+
matches.push({ path, line: Number(found[2]), column: index + 1, length, ...preview(text2, index, length) });
|
|
5923
6307
|
}
|
|
5924
6308
|
}
|
|
5925
6309
|
return { matches, truncated: false };
|
|
5926
6310
|
}
|
|
5927
6311
|
SearchUtil.parseMatches = parseMatches;
|
|
5928
|
-
function preview(
|
|
5929
|
-
const trimmed =
|
|
5930
|
-
const
|
|
6312
|
+
function preview(text2, index, length = 0) {
|
|
6313
|
+
const trimmed = text2.trimStart();
|
|
6314
|
+
const at2 = Math.max(0, index - (text2.length - trimmed.length));
|
|
5931
6315
|
if (trimmed.length <= PREVIEW_CHARS) {
|
|
5932
|
-
return { preview: trimmed, previewColumn:
|
|
6316
|
+
return { preview: trimmed, previewColumn: at2 };
|
|
5933
6317
|
}
|
|
5934
|
-
const start = Math.max(0, Math.min(
|
|
5935
|
-
const end = Math.max(start + PREVIEW_CHARS,
|
|
6318
|
+
const start = Math.max(0, Math.min(at2 - PREVIEW_CHARS / 4, trimmed.length - Math.max(PREVIEW_CHARS, length)));
|
|
6319
|
+
const end = Math.max(start + PREVIEW_CHARS, at2 + length);
|
|
5936
6320
|
const head = start > 0 ? "…" : "";
|
|
5937
|
-
return { preview: head + trimmed.slice(start, end) + (end < trimmed.length ? "…" : ""), previewColumn:
|
|
6321
|
+
return { preview: head + trimmed.slice(start, end) + (end < trimmed.length ? "…" : ""), previewColumn: at2 - start + head.length };
|
|
5938
6322
|
}
|
|
5939
6323
|
SearchUtil.preview = preview;
|
|
5940
|
-
function replace(
|
|
6324
|
+
function replace(text2, query, replacement, at2) {
|
|
5941
6325
|
const expression = queryRegExp(query);
|
|
5942
6326
|
const expand = (match, groups) => query.regex ? substitute(replacement, match, groups) : replacement;
|
|
5943
|
-
if (!
|
|
6327
|
+
if (!at2) {
|
|
5944
6328
|
let count = 0;
|
|
5945
|
-
const replaced =
|
|
6329
|
+
const replaced = text2.replace(expression, (match, ...rest) => {
|
|
5946
6330
|
count++;
|
|
5947
6331
|
return expand(match, groupsOf(rest));
|
|
5948
6332
|
});
|
|
5949
6333
|
return { text: replaced, count };
|
|
5950
6334
|
}
|
|
5951
6335
|
let start = 0;
|
|
5952
|
-
for (let line = 1;line <
|
|
5953
|
-
const next =
|
|
6336
|
+
for (let line = 1;line < at2.line; line++) {
|
|
6337
|
+
const next = text2.indexOf(`
|
|
5954
6338
|
`, start);
|
|
5955
6339
|
if (next < 0) {
|
|
5956
|
-
return { text, count: 0 };
|
|
6340
|
+
return { text: text2, count: 0 };
|
|
5957
6341
|
}
|
|
5958
6342
|
start = next + 1;
|
|
5959
6343
|
}
|
|
5960
|
-
const end =
|
|
6344
|
+
const end = text2.indexOf(`
|
|
5961
6345
|
`, start);
|
|
5962
|
-
const lineText =
|
|
6346
|
+
const lineText = text2.slice(start, end < 0 ? text2.length : end);
|
|
5963
6347
|
const sticky = new RegExp(expression.source, expression.flags.replace("g", "y"));
|
|
5964
|
-
sticky.lastIndex =
|
|
6348
|
+
sticky.lastIndex = at2.column - 1;
|
|
5965
6349
|
const found = sticky.exec(lineText);
|
|
5966
6350
|
if (!found?.[0]) {
|
|
5967
|
-
return { text, count: 0 };
|
|
6351
|
+
return { text: text2, count: 0 };
|
|
5968
6352
|
}
|
|
5969
6353
|
const offset = start + found.index;
|
|
5970
|
-
return { text:
|
|
6354
|
+
return { text: text2.slice(0, offset) + expand(found[0], found.slice(1)) + text2.slice(offset + found[0].length), count: 1 };
|
|
5971
6355
|
}
|
|
5972
6356
|
SearchUtil.replace = replace;
|
|
5973
6357
|
function groupsOf(rest) {
|
|
@@ -5992,11 +6376,11 @@ var SearchUtil;
|
|
|
5992
6376
|
var UploadUtil;
|
|
5993
6377
|
((UploadUtil) => {
|
|
5994
6378
|
function segments(path) {
|
|
5995
|
-
const
|
|
5996
|
-
if (!
|
|
6379
|
+
const parts2 = path.split(/[\\/]+/).filter((part) => part && part !== ".");
|
|
6380
|
+
if (!parts2.length || parts2.some((part) => part === ".." || part.includes("\x00"))) {
|
|
5997
6381
|
throw new Error(`Not a path to upload to: ${path}`);
|
|
5998
6382
|
}
|
|
5999
|
-
return
|
|
6383
|
+
return parts2;
|
|
6000
6384
|
}
|
|
6001
6385
|
UploadUtil.segments = segments;
|
|
6002
6386
|
function fromFiles(files) {
|
|
@@ -6045,9 +6429,9 @@ var UploadUtil;
|
|
|
6045
6429
|
function emptyFolders(batch) {
|
|
6046
6430
|
const filled = new Set;
|
|
6047
6431
|
for (const { path } of batch.files) {
|
|
6048
|
-
const
|
|
6049
|
-
for (let i = 1;i <
|
|
6050
|
-
filled.add(
|
|
6432
|
+
const parts2 = segments(path);
|
|
6433
|
+
for (let i = 1;i < parts2.length; i++) {
|
|
6434
|
+
filled.add(parts2.slice(0, i).join("/"));
|
|
6051
6435
|
}
|
|
6052
6436
|
}
|
|
6053
6437
|
const folders = batch.folders.map((folder) => segments(folder).join("/"));
|
|
@@ -6058,7 +6442,7 @@ var UploadUtil;
|
|
|
6058
6442
|
return batch.files.reduce((sum, { file }) => sum + file.size, 0);
|
|
6059
6443
|
}
|
|
6060
6444
|
UploadUtil.totalBytes = totalBytes;
|
|
6061
|
-
function
|
|
6445
|
+
function parts(size, partBytes) {
|
|
6062
6446
|
if (size === 0) {
|
|
6063
6447
|
return [[0, 0]];
|
|
6064
6448
|
}
|
|
@@ -6068,7 +6452,7 @@ var UploadUtil;
|
|
|
6068
6452
|
}
|
|
6069
6453
|
return out;
|
|
6070
6454
|
}
|
|
6071
|
-
UploadUtil.parts =
|
|
6455
|
+
UploadUtil.parts = parts;
|
|
6072
6456
|
function toBase64(bytes) {
|
|
6073
6457
|
let binary = "";
|
|
6074
6458
|
for (let i = 0;i < bytes.length; i += 32768) {
|
|
@@ -6130,14 +6514,14 @@ var ZipUtil;
|
|
|
6130
6514
|
}
|
|
6131
6515
|
const header = (signature, central) => {
|
|
6132
6516
|
const view = new DataView(new ArrayBuffer(central ? 46 : 30));
|
|
6133
|
-
let
|
|
6517
|
+
let at3 = 0;
|
|
6134
6518
|
const u16 = (value) => {
|
|
6135
|
-
view.setUint16(
|
|
6136
|
-
|
|
6519
|
+
view.setUint16(at3, value, true);
|
|
6520
|
+
at3 += 2;
|
|
6137
6521
|
};
|
|
6138
6522
|
const u32 = (value) => {
|
|
6139
|
-
view.setUint32(
|
|
6140
|
-
|
|
6523
|
+
view.setUint32(at3, value >>> 0, true);
|
|
6524
|
+
at3 += 4;
|
|
6141
6525
|
};
|
|
6142
6526
|
u32(signature);
|
|
6143
6527
|
if (central) {
|
|
@@ -6174,12 +6558,12 @@ var ZipUtil;
|
|
|
6174
6558
|
end.setUint16(10, entries.length, true);
|
|
6175
6559
|
end.setUint32(12, centralSize, true);
|
|
6176
6560
|
end.setUint32(16, offset, true);
|
|
6177
|
-
const
|
|
6178
|
-
const out = new Uint8Array(
|
|
6179
|
-
let
|
|
6180
|
-
for (const part of
|
|
6181
|
-
out.set(part,
|
|
6182
|
-
|
|
6561
|
+
const parts = [...locals, ...centrals, new Uint8Array(end.buffer)];
|
|
6562
|
+
const out = new Uint8Array(parts.reduce((sum, part) => sum + part.length, 0));
|
|
6563
|
+
let at2 = 0;
|
|
6564
|
+
for (const part of parts) {
|
|
6565
|
+
out.set(part, at2);
|
|
6566
|
+
at2 += part.length;
|
|
6183
6567
|
}
|
|
6184
6568
|
return out;
|
|
6185
6569
|
}
|
|
@@ -6534,12 +6918,26 @@ function Message({ children, tone }) {
|
|
|
6534
6918
|
}, children);
|
|
6535
6919
|
}
|
|
6536
6920
|
function Header({ path, extra }) {
|
|
6921
|
+
const parts = path.split(/[\\/]/).filter(Boolean);
|
|
6922
|
+
const name = parts.pop() ?? path;
|
|
6537
6923
|
return /* @__PURE__ */ React.createElement("header", {
|
|
6538
6924
|
className: "taw-editor-head"
|
|
6539
6925
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
6540
|
-
className: "taw-
|
|
6926
|
+
className: "taw-crumbs",
|
|
6541
6927
|
title: path
|
|
6542
|
-
},
|
|
6928
|
+
}, parts.map((part, index) => /* @__PURE__ */ React.createElement(React.Fragment, {
|
|
6929
|
+
key: index
|
|
6930
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
6931
|
+
className: "taw-crumb"
|
|
6932
|
+
}, part), /* @__PURE__ */ React.createElement(Glyph, {
|
|
6933
|
+
name: "ChevronRight",
|
|
6934
|
+
size: 12
|
|
6935
|
+
}))), /* @__PURE__ */ React.createElement("span", {
|
|
6936
|
+
className: "taw-crumb taw-crumb-file"
|
|
6937
|
+
}, /* @__PURE__ */ React.createElement(FileIcon, {
|
|
6938
|
+
path: name,
|
|
6939
|
+
size: 14
|
|
6940
|
+
}), /* @__PURE__ */ React.createElement("span", null, name))), extra);
|
|
6543
6941
|
}
|
|
6544
6942
|
function useVersion(url) {
|
|
6545
6943
|
const changed = useFilesChanged();
|
|
@@ -6601,20 +6999,27 @@ function FileEditor({ id, cwd, path }) {
|
|
|
6601
6999
|
const media = !byUrl && !!kind && kind !== "markdown" && kind !== "html";
|
|
6602
7000
|
const bytes = useFileBytesUrl(media ? url.value : undefined, changed);
|
|
6603
7001
|
const [info, setInfo] = React.useState();
|
|
7002
|
+
const pictures = useLoad(async () => kind === "image" ? PreviewUtil.siblings(await pi.workspace.listDirectory(WorkspaceUtil.dirname(path), cwd), path) : undefined, [cwd, path, changed]);
|
|
7003
|
+
const siblings = pictures.value;
|
|
7004
|
+
const browsedAt = useBrowsedTo(id);
|
|
7005
|
+
const showPicture = (to) => to === undefined ? undefined : () => {
|
|
7006
|
+
browsePicture(fileId(cwd, to));
|
|
7007
|
+
openFile(cwd, to, undefined, { preview: true });
|
|
7008
|
+
};
|
|
6604
7009
|
const [draft, setDraft] = React.useState();
|
|
6605
7010
|
const [base, setBase] = React.useState();
|
|
6606
7011
|
const [saving, setSaving] = React.useState(false);
|
|
6607
|
-
const
|
|
6608
|
-
const dirty = draft !== undefined && draft !==
|
|
7012
|
+
const text2 = file.value?.text;
|
|
7013
|
+
const dirty = draft !== undefined && draft !== text2;
|
|
6609
7014
|
React.useEffect(() => pi.ui.setEditorDirty(id, dirty), [id, dirty]);
|
|
6610
7015
|
React.useEffect(() => {
|
|
6611
|
-
if (draft !== undefined && draft ===
|
|
7016
|
+
if (draft !== undefined && draft === text2) {
|
|
6612
7017
|
setDraft(undefined);
|
|
6613
7018
|
setBase(undefined);
|
|
6614
7019
|
}
|
|
6615
|
-
}, [draft,
|
|
7020
|
+
}, [draft, text2]);
|
|
6616
7021
|
const save = async (value) => {
|
|
6617
|
-
if (saving || value ===
|
|
7022
|
+
if (saving || value === text2) {
|
|
6618
7023
|
return;
|
|
6619
7024
|
}
|
|
6620
7025
|
setSaving(true);
|
|
@@ -6652,11 +7057,13 @@ function FileEditor({ id, cwd, path }) {
|
|
|
6652
7057
|
const showPreview = !!kind && (mode === "preview" || !textual);
|
|
6653
7058
|
const extra = /* @__PURE__ */ React.createElement("div", {
|
|
6654
7059
|
className: "taw-editor-tools"
|
|
6655
|
-
}, showPreview &&
|
|
7060
|
+
}, showPreview && siblings && /* @__PURE__ */ React.createElement("span", {
|
|
7061
|
+
className: "taw-note"
|
|
7062
|
+
}, siblings.index + 1, " / ", siblings.count), showPreview && info && /* @__PURE__ */ React.createElement("span", {
|
|
6656
7063
|
className: "taw-note"
|
|
6657
7064
|
}, info), !showPreview && readOnly && /* @__PURE__ */ React.createElement("span", {
|
|
6658
7065
|
className: "taw-note"
|
|
6659
|
-
}, t("truncated")), !showPreview && dirty && base !== undefined && base !==
|
|
7066
|
+
}, t("truncated")), !showPreview && dirty && base !== undefined && base !== text2 && /* @__PURE__ */ React.createElement("span", {
|
|
6660
7067
|
className: "taw-note taw-warning"
|
|
6661
7068
|
}, t("changedOnDisk"), " ", /* @__PURE__ */ React.createElement("button", {
|
|
6662
7069
|
type: "button",
|
|
@@ -6682,29 +7089,32 @@ function FileEditor({ id, cwd, path }) {
|
|
|
6682
7089
|
path,
|
|
6683
7090
|
extra
|
|
6684
7091
|
}), showPreview && fileUrl && kind === "markdown" && /* @__PURE__ */ React.createElement(MarkdownPreview, {
|
|
6685
|
-
text: draft ??
|
|
7092
|
+
text: draft ?? text2 ?? "",
|
|
6686
7093
|
url: fileUrl
|
|
6687
7094
|
}), showPreview && kind === "html" && /* @__PURE__ */ React.createElement(PagePreview, {
|
|
6688
7095
|
url: byUrl ? fileUrl : undefined,
|
|
6689
|
-
text: draft ??
|
|
7096
|
+
text: draft ?? text2 ?? ""
|
|
6690
7097
|
}), showPreview && kind && kind !== "markdown" && kind !== "html" && shownUrl && /* @__PURE__ */ React.createElement(MediaPreview, {
|
|
6691
7098
|
key: shownUrl,
|
|
6692
7099
|
kind,
|
|
6693
7100
|
url: shownUrl,
|
|
6694
7101
|
size: file.value?.size ?? bytes.size ?? size ?? 0,
|
|
6695
|
-
onInfo: setInfo
|
|
7102
|
+
onInfo: setInfo,
|
|
7103
|
+
previous: showPicture(siblings?.previous),
|
|
7104
|
+
next: showPicture(siblings?.next),
|
|
7105
|
+
browsedAt
|
|
6696
7106
|
}), showPreview && kind && kind !== "markdown" && kind !== "html" && !shownUrl && /* @__PURE__ */ React.createElement(Message, {
|
|
6697
7107
|
tone: bytes.error ? "error" : undefined
|
|
6698
7108
|
}, bytes.error ?? t("loading")), !showPreview && /* @__PURE__ */ React.createElement(pi.ui.CodeEditor, {
|
|
6699
7109
|
path,
|
|
6700
|
-
value: draft ??
|
|
7110
|
+
value: draft ?? text2 ?? "",
|
|
6701
7111
|
readOnly,
|
|
6702
7112
|
line: target?.line,
|
|
6703
7113
|
column: target?.column,
|
|
6704
7114
|
endColumn: target?.endColumn,
|
|
6705
7115
|
selection: target?.endLine ? { startLine: target.line, startColumn: target.column, endLine: target.endLine, endColumn: target.endColumn } : undefined,
|
|
6706
7116
|
onChange: (value) => {
|
|
6707
|
-
setBase((previous) => previous === undefined ?
|
|
7117
|
+
setBase((previous) => previous === undefined ? text2 : previous);
|
|
6708
7118
|
setDraft(value);
|
|
6709
7119
|
},
|
|
6710
7120
|
onSave: (value) => void save(value)
|
|
@@ -7085,21 +7495,21 @@ function SearchView() {
|
|
|
7085
7495
|
const dismiss = (key) => setState((previous) => ({ ...previous, dismissed: [...previous.dismissed, key] }));
|
|
7086
7496
|
const refresh = () => setState((previous) => ({ ...previous, run: previous.run + 1 }));
|
|
7087
7497
|
const replacing = state.showReplace;
|
|
7088
|
-
const replaceIn = async (path,
|
|
7498
|
+
const replaceIn = async (path, at2) => {
|
|
7089
7499
|
const file = await pi.workspace.readFile(path, cwd);
|
|
7090
7500
|
if (file.text === undefined || file.truncated) {
|
|
7091
7501
|
throw new Error(t("cannotReplace", { path }));
|
|
7092
7502
|
}
|
|
7093
|
-
const done = SearchUtil.replace(file.text, query, state.replace,
|
|
7503
|
+
const done = SearchUtil.replace(file.text, query, state.replace, at2 && { line: at2.line, column: at2.column });
|
|
7094
7504
|
if (done.count) {
|
|
7095
7505
|
await pi.workspace.writeFile(path, done.text, cwd);
|
|
7096
7506
|
}
|
|
7097
7507
|
return done.count;
|
|
7098
7508
|
};
|
|
7099
|
-
const replace = async (paths,
|
|
7509
|
+
const replace = async (paths, at2) => {
|
|
7100
7510
|
try {
|
|
7101
7511
|
for (const path of paths) {
|
|
7102
|
-
await replaceIn(path,
|
|
7512
|
+
await replaceIn(path, at2);
|
|
7103
7513
|
}
|
|
7104
7514
|
} catch (error) {
|
|
7105
7515
|
pi.ui.notify(Host.message(error), "error");
|
|
@@ -8319,15 +8729,15 @@ function treeRows(list2) {
|
|
|
8319
8729
|
return da === db ? WorkspaceUtil.compareNames(a.file.path, b.file.path) : WorkspaceUtil.compareNames(da, db);
|
|
8320
8730
|
});
|
|
8321
8731
|
for (const row of sorted) {
|
|
8322
|
-
const
|
|
8323
|
-
for (let depth = 0;depth <
|
|
8324
|
-
const folder =
|
|
8732
|
+
const parts = row.file.path.split("/");
|
|
8733
|
+
for (let depth = 0;depth < parts.length - 1; depth++) {
|
|
8734
|
+
const folder = parts.slice(0, depth + 1).join("/");
|
|
8325
8735
|
if (!seen.has(folder)) {
|
|
8326
8736
|
seen.add(folder);
|
|
8327
8737
|
out.push({ folder, depth });
|
|
8328
8738
|
}
|
|
8329
8739
|
}
|
|
8330
|
-
out.push({ row, depth:
|
|
8740
|
+
out.push({ row, depth: parts.length - 1 });
|
|
8331
8741
|
}
|
|
8332
8742
|
return out;
|
|
8333
8743
|
}
|
|
@@ -8496,7 +8906,12 @@ var STYLE = `
|
|
|
8496
8906
|
.taw-chip { padding: 0 6px; border-radius: 8px; background: var(--ta-chip); font-size: calc(11px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); }
|
|
8497
8907
|
.taw-editor { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--ta-main); color: var(--ta-text); }
|
|
8498
8908
|
.taw-editor-head { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-bottom: 1px solid var(--ta-border-muted); font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-secondary); flex: none; }
|
|
8499
|
-
|
|
8909
|
+
/* The breadcrumbs of a file: its directories give way first (they shrink, the name does not). */
|
|
8910
|
+
.taw-crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; overflow: hidden; white-space: nowrap; }
|
|
8911
|
+
.taw-crumbs > svg { flex: none; color: var(--ta-muted); opacity: 0.8; }
|
|
8912
|
+
.taw-crumb { flex: 0 1 auto; min-width: 1.5em; overflow: hidden; text-overflow: ellipsis; }
|
|
8913
|
+
.taw-crumb-file { flex: 0 0 auto; min-width: 0; max-width: 100%; display: inline-flex; align-items: center; gap: 5px; color: var(--ta-text); }
|
|
8914
|
+
.taw-crumb-file > span:last-child { overflow: hidden; text-overflow: ellipsis; }
|
|
8500
8915
|
.taw-view > .taw-editor { flex: 1; height: auto; }
|
|
8501
8916
|
.taw-browser { display: flex; flex-direction: column; height: 100%; min-height: 0; color: var(--ta-text); font-size: calc(13px * var(--ta-font-scale)); }
|
|
8502
8917
|
.taw-browser-bar { position: relative; display: flex; align-items: center; gap: 2px; height: 42px; padding: 0 8px; border-bottom: 1px solid var(--ta-border-muted); flex: none; }
|
|
@@ -8511,28 +8926,28 @@ var STYLE = `
|
|
|
8511
8926
|
.taw-spin { display: inline-flex; animation: taw-spin 0.9s linear infinite; }
|
|
8512
8927
|
@keyframes taw-spin { to { transform: rotate(360deg); } }
|
|
8513
8928
|
.taw-browser-loading { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--ta-accent), transparent) 0 0 / 30% 100% no-repeat; animation: taw-slide 1.1s linear infinite; pointer-events: none; }
|
|
8514
|
-
.taw-browser-home { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; padding:
|
|
8515
|
-
.taw-browser-
|
|
8516
|
-
.taw-browser-
|
|
8517
|
-
.taw-browser-
|
|
8929
|
+
.taw-browser-home { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; padding: clamp(40px, 20%, 160px) 16px 14px; }
|
|
8930
|
+
.taw-browser-sites { display: grid; grid-template-columns: repeat(auto-fit, 100px); justify-content: center; gap: 4px; width: 100%; max-width: 624px; }
|
|
8931
|
+
.taw-browser-site { position: relative; }
|
|
8932
|
+
.taw-browser-site-main { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 12px 4px 8px; border: 0; border-radius: 10px; background: none; color: var(--ta-secondary); font: inherit; cursor: pointer; outline: none; transition: background-color 120ms, color 120ms; }
|
|
8933
|
+
.taw-browser-site-main:hover { background: var(--ta-hover); color: var(--ta-text); }
|
|
8934
|
+
.taw-browser-site-main:focus-visible { box-shadow: inset 0 0 0 1px var(--ta-border-focus); }
|
|
8935
|
+
.taw-browser-tile { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(16px * var(--ta-font-scale)); font-weight: 600; }
|
|
8936
|
+
.taw-browser-tile[style] { background: var(--taw-tint); color: var(--taw-ink); }
|
|
8937
|
+
.taw-browser-tile img { width: 20px; height: 20px; object-fit: contain; }
|
|
8938
|
+
.taw-browser-host { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(11.5px * var(--ta-font-scale)); }
|
|
8939
|
+
.taw-browser-remove { position: absolute; top: 4px; right: 8px; width: 18px; height: 18px; border-radius: 9px; background: var(--ta-raised); opacity: 0; }
|
|
8940
|
+
.taw-browser-site:hover .taw-browser-remove, .taw-browser-remove:focus-visible { opacity: 1; }
|
|
8941
|
+
.taw-browser-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: auto; padding-top: 24px; max-width: 360px; text-align: center; font-size: calc(11.5px * var(--ta-font-scale)); line-height: 1.6; color: var(--ta-muted); }
|
|
8942
|
+
.taw-browser-import { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--ta-muted); font: inherit; cursor: pointer; }
|
|
8943
|
+
.taw-browser-import:hover { color: var(--ta-text); }
|
|
8518
8944
|
.taw-browser-mark { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 14px; border-radius: 14px; background: var(--ta-chip); color: var(--ta-secondary); }
|
|
8519
8945
|
.taw-browser-title { margin: 0; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-text); }
|
|
8520
8946
|
.taw-browser-sub { margin: 6px 0 0; font-size: calc(12.5px * var(--ta-font-scale)); line-height: 1.6; color: var(--ta-muted); }
|
|
8521
8947
|
.taw-browser-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
|
|
8522
8948
|
.taw-browser-chip { height: 26px; padding: 0 10px; border: 1px solid var(--ta-border); border-radius: 13px; background: none; color: var(--ta-secondary); font-family: var(--ta-mono); font-size: calc(11px * var(--ta-font-scale)); cursor: pointer; transition: background-color 120ms, color 120ms; }
|
|
8523
8949
|
.taw-browser-chip:hover { background: var(--ta-hover); color: var(--ta-text); }
|
|
8524
|
-
.taw-browser-recent { width: 100%; max-width: 480px; margin-top: 32px; }
|
|
8525
|
-
.taw-browser-heading { margin: 0 0 4px; padding: 0 10px; font-size: calc(11px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-secondary); }
|
|
8526
|
-
.taw-browser-site { display: flex; align-items: center; border-radius: 8px; }
|
|
8527
|
-
.taw-browser-site:hover { background: var(--ta-hover); }
|
|
8528
|
-
.taw-browser-site-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 4px 0 8px; border: 0; background: none; color: var(--ta-body); font: inherit; text-align: left; cursor: pointer; outline: none; }
|
|
8529
8950
|
.taw-browser-letter { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(11px * var(--ta-font-scale)); font-weight: 600; }
|
|
8530
|
-
.taw-browser-host { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-text); }
|
|
8531
|
-
.taw-browser-path { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
|
|
8532
|
-
.taw-browser-remove { margin-right: 6px; opacity: 0; }
|
|
8533
|
-
.taw-browser-site:hover .taw-browser-remove, .taw-browser-remove:focus-visible { opacity: 1; }
|
|
8534
|
-
.taw-browser-site-main:focus-visible { box-shadow: inset 0 0 0 1px var(--ta-border-focus); border-radius: 8px; }
|
|
8535
|
-
.taw-browser-foot { margin: auto 0 0; padding-top: 24px; max-width: 340px; text-align: center; font-size: calc(11.5px * var(--ta-font-scale)); line-height: 1.6; color: var(--ta-muted); opacity: 0.8; }
|
|
8536
8951
|
.taw-editor-tools { display: flex; align-items: center; gap: 8px; flex: none; min-width: 0; }
|
|
8537
8952
|
.taw-editor-tools .taw-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
8538
8953
|
.taw-warning { color: var(--ta-yellow); }
|
|
@@ -8551,8 +8966,10 @@ var STYLE = `
|
|
|
8551
8966
|
.taw-preview-media { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; background: var(--ta-code); }
|
|
8552
8967
|
.taw-preview-media video { max-width: 100%; max-height: 100%; border-radius: 8px; background: #000; outline: none; }
|
|
8553
8968
|
.taw-preview-media audio { width: min(480px, 100%); }
|
|
8969
|
+
.taw-preview-picture { flex: 1; display: flex; min-height: 0; }
|
|
8554
8970
|
.taw-preview-image { background-color: var(--ta-code); background-image: linear-gradient(45deg, var(--ta-chip) 25%, transparent 25%, transparent 75%, var(--ta-chip) 75%), linear-gradient(45deg, var(--ta-chip) 25%, transparent 25%, transparent 75%, var(--ta-chip) 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
|
|
8555
|
-
|
|
8971
|
+
/* What a file shows while it loads, or why it does not: in the middle of where the file would be. */
|
|
8972
|
+
.taw-message { flex: 1; display: flex; align-items: center; justify-content: center; height: 100%; min-height: 0; padding: 16px; text-align: center; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }
|
|
8556
8973
|
.taw-code { flex: 1; min-height: 0; overflow: auto; padding: 6px 0; background: var(--ta-code); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(20px * var(--ta-font-scale)); }
|
|
8557
8974
|
.taw-code-block { content-visibility: auto; }
|
|
8558
8975
|
.taw-code-line { display: flex; min-width: max-content; white-space: pre; }
|
|
@@ -8566,8 +8983,6 @@ var STYLE = `
|
|
|
8566
8983
|
.taw-browser-driven { display: inline-flex; align-items: center; flex: none; gap: 6px; height: 22px; margin-right: 2px; padding: 0 9px 0 8px; border-radius: 11px; background: color-mix(in srgb, var(--ta-green) 14%, transparent); color: var(--ta-green); font-size: calc(11.5px * var(--ta-font-scale)); white-space: nowrap; }
|
|
8567
8984
|
.taw-browser-driven-dot { width: 6px; height: 6px; border-radius: 3px; background: currentColor; animation: taw-pulse 1.2s ease-in-out infinite; }
|
|
8568
8985
|
@keyframes taw-pulse { 50% { opacity: 0.35; } }
|
|
8569
|
-
.taw-browser-import { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; padding: 0; border: 0; background: none; color: var(--ta-secondary); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }
|
|
8570
|
-
.taw-browser-import:hover { color: var(--ta-text); text-decoration: underline; text-underline-offset: 3px; }
|
|
8571
8986
|
.taw-import { display: flex; flex-direction: column; gap: 12px; width: min(420px, 80vw); font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-text); }
|
|
8572
8987
|
.taw-import-hint { margin: 0; color: var(--ta-secondary); line-height: 1.6; }
|
|
8573
8988
|
.taw-import-error { margin: 0; color: var(--ta-red); line-height: 1.5; overflow-wrap: anywhere; }
|
|
@@ -8606,26 +9021,35 @@ var STYLE = `
|
|
|
8606
9021
|
}
|
|
8607
9022
|
.taw-file-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; font-family: 'taw-seti'; font-style: normal; font-weight: normal; line-height: 1; color: var(--taw-icon); -webkit-font-smoothing: antialiased; speak: never; }
|
|
8608
9023
|
:root[data-theme='light'] .taw-file-icon { color: var(--taw-icon-light); }
|
|
8609
|
-
/*
|
|
9024
|
+
/*
|
|
9025
|
+
* Terminals: a bar over the screen (its title, or tabs when there are more), the screen, and under it the keys of a
|
|
9026
|
+
* touch screen or how it ended. Tabs a level under those of the workbench (cards): words over a line, the one
|
|
9027
|
+
* shown underlined, its cross stronger; + after the last, the kill of the one shown at the end.
|
|
9028
|
+
*/
|
|
8610
9029
|
.taw-terminals .taw-editor { background: var(--ta-code); }
|
|
8611
|
-
.taw-terminal-bar { display: flex; align-items:
|
|
8612
|
-
.taw-terminal-
|
|
9030
|
+
.taw-terminal-bar { display: flex; align-items: stretch; gap: 2px; height: 36px; padding: 0 6px 0 4px; flex: none; background: var(--ta-main); box-shadow: inset 0 -1px 0 var(--ta-border-muted); }
|
|
9031
|
+
.taw-terminal-bar > .taw-action { align-self: center; }
|
|
9032
|
+
.taw-terminal-bar > .taw-actions { align-items: center; margin-left: auto; }
|
|
9033
|
+
.taw-terminal-tabs { display: flex; align-items: stretch; gap: 2px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
|
|
8613
9034
|
.taw-terminal-tabs::-webkit-scrollbar { display: none; }
|
|
8614
|
-
.taw-terminal-tab { display: flex; align-items: center; flex: none; max-width: 200px;
|
|
8615
|
-
.taw-terminal-tab
|
|
8616
|
-
.taw-terminal-tab
|
|
8617
|
-
.taw-terminal-tab-
|
|
8618
|
-
.taw-terminal-tab-
|
|
9035
|
+
.taw-terminal-tab { position: relative; display: flex; align-items: center; flex: none; max-width: 200px; padding-right: 2px; color: var(--ta-muted); transition: color 0.12s; }
|
|
9036
|
+
.taw-terminal-tab::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--ta-text); opacity: 0; transform: scaleX(0.6); transition: opacity 0.16s, transform 0.2s var(--ta-ease); }
|
|
9037
|
+
.taw-terminal-tab:hover { color: var(--ta-body); }
|
|
9038
|
+
.taw-terminal-tab.taw-on { color: var(--ta-text); }
|
|
9039
|
+
.taw-terminal-tab.taw-on::after { opacity: 1; transform: none; }
|
|
9040
|
+
.taw-terminal-tab-main { display: flex; align-items: center; gap: 6px; min-width: 0; height: 100%; padding: 0 4px 0 8px; border: 0; background: none; color: inherit; font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }
|
|
9041
|
+
.taw-terminal-tab-main:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -5px; border-radius: 8px; }
|
|
8619
9042
|
.taw-terminal-tab-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
9043
|
+
/* The number after a title another tab has too (cell 2): quieter than the title. */
|
|
9044
|
+
.taw-terminal-ordinal { color: var(--ta-muted); font-variant-numeric: tabular-nums; }
|
|
9045
|
+
.taw-terminal-tab.taw-on .taw-terminal-ordinal { color: var(--ta-secondary); }
|
|
8620
9046
|
.taw-terminal-tab > .taw-action { width: 18px; height: 18px; border-radius: 4px; opacity: 0; transition: opacity 0.12s; }
|
|
8621
9047
|
.taw-terminal-tab:hover > .taw-action, .taw-terminal-tab.taw-on > .taw-action, .taw-terminal-tab:focus-within > .taw-action { opacity: 1; }
|
|
8622
9048
|
.taw-terminal-tab > .taw-action svg { width: 13px; height: 13px; }
|
|
8623
|
-
.taw-terminal-title { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; padding: 0 6px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-secondary); cursor: default; }
|
|
9049
|
+
.taw-terminal-title { display: flex; align-items: center; gap: 7px; flex: 0 1 auto; min-width: 0; padding: 0 6px 0 8px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-secondary); cursor: default; }
|
|
8624
9050
|
.taw-terminal-rename { width: 140px; min-width: 0; height: 20px; padding: 0 5px; border: 1px solid var(--ta-border-focus); border-radius: 4px; background: var(--ta-input); color: var(--ta-text); font: inherit; font-size: calc(12px * var(--ta-font-scale)); outline: none; }
|
|
8625
9051
|
.taw-terminal-dot { flex: none; width: 7px; height: 7px; margin: 0 3px; border-radius: 50%; background: var(--ta-muted); }
|
|
8626
9052
|
.taw-terminal-dot.taw-failed { background: var(--ta-red); }
|
|
8627
|
-
.taw-terminal-index { flex: none; min-width: 20px; height: 16px; padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, currentColor 12%, transparent); font-family: var(--ta-mono); font-size: calc(10px * var(--ta-font-scale)); font-weight: 600; line-height: calc(16px * var(--ta-font-scale)); text-align: center; letter-spacing: 0.02em; }
|
|
8628
|
-
.taw-terminal-tab.taw-on .taw-terminal-index { background: color-mix(in srgb, currentColor 16%, transparent); }
|
|
8629
9053
|
/* What its program says of itself: at work (a spinner), how far (a ring), that it rang while out of sight (a dot after the title). */
|
|
8630
9054
|
.taw-terminal-spinner { flex: none; box-sizing: border-box; width: 12px; height: 12px; margin: 0 0.5px; border: 1.6px solid color-mix(in srgb, currentColor 22%, transparent); border-top-color: var(--ta-brand); border-radius: 50%; animation: taw-terminal-spin 0.9s linear infinite; }
|
|
8631
9055
|
@keyframes taw-terminal-spin { to { transform: rotate(360deg); } }
|
|
@@ -8648,11 +9072,14 @@ var STYLE = `
|
|
|
8648
9072
|
.taw-touch-key { flex: none; min-width: 42px; height: 36px; padding: 0 10px; border: 1px solid var(--ta-border); border-radius: 8px; background: var(--ta-card); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(14px * var(--ta-font-scale)); -webkit-user-select: none; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
|
|
8649
9073
|
.taw-touch-key:active { background: var(--ta-hover); }
|
|
8650
9074
|
.taw-touch-key.taw-on { border-color: var(--ta-brand); background: var(--ta-brand); color: var(--ta-brand-text); }
|
|
8651
|
-
:
|
|
8652
|
-
:root[data-touch] .taw-terminal-
|
|
8653
|
-
:root[data-touch] .taw-terminal-tab-main { font-size: calc(
|
|
8654
|
-
:root[data-touch] .taw-terminal-tab > .taw-action { width: 30px; height: 30px; }
|
|
9075
|
+
/* A finger: a bar of its height, tabs of its width; the cross of the one shown only; a tap leaves no hover behind. */
|
|
9076
|
+
:root[data-touch] .taw-terminal-bar { height: 44px; padding-left: 2px; }
|
|
9077
|
+
:root[data-touch] .taw-terminal-tab-main { padding: 0 6px 0 10px; font-size: calc(13.5px * var(--ta-font-scale)); }
|
|
9078
|
+
:root[data-touch] .taw-terminal-tab > .taw-action { width: 30px; height: 30px; margin-left: -6px; }
|
|
8655
9079
|
:root[data-touch] .taw-terminal-tab:not(.taw-on) > .taw-action { display: none; }
|
|
9080
|
+
:root[data-touch] .taw-terminal-tab:hover:not(.taw-on) { color: var(--ta-muted); }
|
|
9081
|
+
:root[data-touch] .taw-action:hover:not(:disabled):not(.taw-on) { background: none; color: var(--ta-muted); }
|
|
9082
|
+
:root[data-touch] .taw-action:active:not(:disabled):not(.taw-on) { background: var(--ta-hover); color: var(--ta-text); }
|
|
8656
9083
|
/* The tools of the workbench in the launcher, as the tiles of the launcher's own sections */
|
|
8657
9084
|
.taw-launch { display: flex; flex-direction: column; }
|
|
8658
9085
|
.taw-launch-head { display: flex; align-items: center; gap: 8px; min-height: 30px; margin: 0 2px 10px; }
|
|
@@ -8660,14 +9087,13 @@ var STYLE = `
|
|
|
8660
9087
|
.taw-launch-cwd { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 55%; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
|
|
8661
9088
|
.taw-launch-cwd > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
8662
9089
|
.taw-launch-cwd > svg { flex: none; }
|
|
8663
|
-
.taw-launch-explorer { --taw-
|
|
8664
|
-
.taw-launch-search { --taw-
|
|
8665
|
-
.taw-launch-scm { --taw-
|
|
8666
|
-
.taw-launch-terminal { --taw-
|
|
9090
|
+
.taw-launch-explorer { --taw-tint: var(--ta-tint-8); --taw-ink: var(--ta-tint-ink-8); }
|
|
9091
|
+
.taw-launch-search { --taw-tint: var(--ta-tint-4); --taw-ink: var(--ta-tint-ink-4); }
|
|
9092
|
+
.taw-launch-scm { --taw-tint: var(--ta-tint-3); --taw-ink: var(--ta-tint-ink-3); }
|
|
9093
|
+
.taw-launch-terminal { --taw-tint: var(--ta-tint-5); --taw-ink: var(--ta-tint-ink-5); }
|
|
8667
9094
|
.taw-launch-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 -2px; }
|
|
8668
9095
|
.taw-launch-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; padding: 4px 2px; border: 0; border-radius: 14px; background: none; color: var(--ta-text); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; }
|
|
8669
|
-
.taw-launch-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background:
|
|
8670
|
-
:root[data-theme='dark'] .taw-launch-icon { background: hsl(var(--taw-hue) 26% 21%); color: hsl(var(--taw-hue) 72% 76%); box-shadow: inset 0 0 0 1px hsl(var(--taw-hue) 40% 70% / 0.1); }
|
|
9096
|
+
.taw-launch-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--taw-tint); color: var(--taw-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--taw-ink) 10%, transparent); transition: transform 160ms var(--ta-ease), filter 160ms; }
|
|
8671
9097
|
.taw-launch-tile:hover .taw-launch-icon { filter: brightness(0.97); }
|
|
8672
9098
|
.taw-launch-tile:active .taw-launch-icon { transform: scale(0.92); }
|
|
8673
9099
|
.taw-launch-tile:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }
|
|
@@ -8693,16 +9119,16 @@ var CTRL_SYMBOLS = { "@": "\x00", " ": "\x00", "[": "\x1B", "\\": "\x1C", "]": "
|
|
|
8693
9119
|
var TerminalUtil;
|
|
8694
9120
|
((TerminalUtil) => {
|
|
8695
9121
|
function title(raw) {
|
|
8696
|
-
const
|
|
8697
|
-
if (!
|
|
9122
|
+
const text2 = raw?.trim();
|
|
9123
|
+
if (!text2) {
|
|
8698
9124
|
return;
|
|
8699
9125
|
}
|
|
8700
|
-
const
|
|
8701
|
-
const where =
|
|
9126
|
+
const at2 = text2.lastIndexOf(":");
|
|
9127
|
+
const where = at2 < 0 ? "" : text2.slice(at2 + 1).trim();
|
|
8702
9128
|
if (where === "~") {
|
|
8703
9129
|
return where;
|
|
8704
9130
|
}
|
|
8705
|
-
return /[\\/]/.test(where) ? dir(where.replace(/[\\/]+$/, "")) ||
|
|
9131
|
+
return /[\\/]/.test(where) ? dir(where.replace(/[\\/]+$/, "")) || text2 : text2;
|
|
8706
9132
|
}
|
|
8707
9133
|
TerminalUtil.title = title;
|
|
8708
9134
|
function dir(cwd) {
|
|
@@ -8717,6 +9143,15 @@ var TerminalUtil;
|
|
|
8717
9143
|
return terminals.map((terminal) => terminal.name || terminal.title || shellName(terminal.shell) || fallback);
|
|
8718
9144
|
}
|
|
8719
9145
|
TerminalUtil.titles = titles;
|
|
9146
|
+
function ordinals(titles2) {
|
|
9147
|
+
const seen = new Map;
|
|
9148
|
+
return titles2.map((title2) => {
|
|
9149
|
+
const count = (seen.get(title2) ?? 0) + 1;
|
|
9150
|
+
seen.set(title2, count);
|
|
9151
|
+
return count > 1 ? count : undefined;
|
|
9152
|
+
});
|
|
9153
|
+
}
|
|
9154
|
+
TerminalUtil.ordinals = ordinals;
|
|
8720
9155
|
function ctrl(data) {
|
|
8721
9156
|
if (data.length !== 1) {
|
|
8722
9157
|
return data;
|
|
@@ -8741,6 +9176,7 @@ var Terminals;
|
|
|
8741
9176
|
let list2 = [];
|
|
8742
9177
|
let frame = 0;
|
|
8743
9178
|
let seen;
|
|
9179
|
+
let fitted;
|
|
8744
9180
|
function all() {
|
|
8745
9181
|
return list2;
|
|
8746
9182
|
}
|
|
@@ -8765,8 +9201,7 @@ var Terminals;
|
|
|
8765
9201
|
});
|
|
8766
9202
|
}
|
|
8767
9203
|
}
|
|
8768
|
-
function create(info, name) {
|
|
8769
|
-
const terminal = pi.ui.createTerminal({ cols: OPEN_COLS, rows: OPEN_ROWS, cwd: info.cwd || undefined });
|
|
9204
|
+
function create(info, terminal, name) {
|
|
8770
9205
|
const created = { info, terminal, name };
|
|
8771
9206
|
const id = info.terminalId;
|
|
8772
9207
|
terminal.onData((data) => {
|
|
@@ -8784,6 +9219,7 @@ var Terminals;
|
|
|
8784
9219
|
});
|
|
8785
9220
|
let timer;
|
|
8786
9221
|
terminal.onResize(({ cols, rows }) => {
|
|
9222
|
+
fitted = { cols, rows };
|
|
8787
9223
|
clearTimeout(timer);
|
|
8788
9224
|
timer = setTimeout(() => void pi.terminals.resizeTerminal(id, cols, rows).catch(() => {
|
|
8789
9225
|
return;
|
|
@@ -8811,10 +9247,10 @@ var Terminals;
|
|
|
8811
9247
|
});
|
|
8812
9248
|
return created;
|
|
8813
9249
|
}
|
|
8814
|
-
function add(info) {
|
|
9250
|
+
function add(info, terminal) {
|
|
8815
9251
|
let session = sessions.get(info.terminalId);
|
|
8816
9252
|
if (!session) {
|
|
8817
|
-
session = create(info);
|
|
9253
|
+
session = create(info, terminal ?? pi.ui.createTerminal({ cols: OPEN_COLS, rows: OPEN_ROWS, cwd: info.cwd || undefined }));
|
|
8818
9254
|
sessions.set(info.terminalId, session);
|
|
8819
9255
|
changed();
|
|
8820
9256
|
}
|
|
@@ -8874,11 +9310,25 @@ var Terminals;
|
|
|
8874
9310
|
}
|
|
8875
9311
|
}
|
|
8876
9312
|
Terminals.setCtrl = setCtrl;
|
|
9313
|
+
function viewSize() {
|
|
9314
|
+
return fitted;
|
|
9315
|
+
}
|
|
9316
|
+
Terminals.viewSize = viewSize;
|
|
9317
|
+
function fit(terminal) {
|
|
9318
|
+
return new Promise((resolve) => {
|
|
9319
|
+
const off = terminal.onResize((size) => {
|
|
9320
|
+
off();
|
|
9321
|
+
fitted = size;
|
|
9322
|
+
resolve(size);
|
|
9323
|
+
});
|
|
9324
|
+
});
|
|
9325
|
+
}
|
|
9326
|
+
Terminals.fit = fit;
|
|
8877
9327
|
async function restart(session) {
|
|
8878
9328
|
const old = session.info.terminalId;
|
|
8879
9329
|
const { cols, rows } = session.terminal;
|
|
8880
9330
|
const info = await pi.terminals.openTerminal({ cwd: session.info.cwd || undefined, cols, rows });
|
|
8881
|
-
const created = create(info, session.name);
|
|
9331
|
+
const created = create(info, pi.ui.createTerminal({ cols, rows, cwd: info.cwd || undefined }), session.name);
|
|
8882
9332
|
sessions = new Map([...sessions].map(([id, other]) => id === old ? [info.terminalId, created] : [id, other]));
|
|
8883
9333
|
if (!sessions.has(info.terminalId)) {
|
|
8884
9334
|
sessions.set(info.terminalId, created);
|
|
@@ -8925,26 +9375,23 @@ function closeEach(sessions) {
|
|
|
8925
9375
|
}
|
|
8926
9376
|
}
|
|
8927
9377
|
function copySelection(session) {
|
|
8928
|
-
const
|
|
8929
|
-
if (
|
|
8930
|
-
navigator.clipboard?.writeText(
|
|
9378
|
+
const text2 = session.terminal.getSelection();
|
|
9379
|
+
if (text2) {
|
|
9380
|
+
navigator.clipboard?.writeText(text2).catch(() => {
|
|
8931
9381
|
return;
|
|
8932
9382
|
});
|
|
8933
9383
|
}
|
|
8934
9384
|
}
|
|
8935
9385
|
function pasteClipboard(session) {
|
|
8936
|
-
navigator.clipboard?.readText().then((
|
|
9386
|
+
navigator.clipboard?.readText().then((text2) => text2 && session.terminal.paste(text2)).catch(() => {
|
|
8937
9387
|
return;
|
|
8938
9388
|
});
|
|
8939
9389
|
}
|
|
8940
9390
|
|
|
8941
9391
|
// web-src/terminal.tsx
|
|
8942
|
-
function TerminalBadge({ session
|
|
9392
|
+
function TerminalBadge({ session }) {
|
|
8943
9393
|
const progress = session.progress;
|
|
8944
|
-
return
|
|
8945
|
-
className: "taw-terminal-index",
|
|
8946
|
-
"aria-hidden": "true"
|
|
8947
|
-
}, "T", index + 1), session.exitCode !== undefined ? /* @__PURE__ */ React.createElement("span", {
|
|
9394
|
+
return session.exitCode !== undefined ? /* @__PURE__ */ React.createElement("span", {
|
|
8948
9395
|
className: `taw-terminal-dot ${session.exitCode ? "taw-failed" : ""}`,
|
|
8949
9396
|
"aria-hidden": "true"
|
|
8950
9397
|
}) : progress?.state === "busy" ? /* @__PURE__ */ React.createElement("span", {
|
|
@@ -8953,7 +9400,7 @@ function TerminalBadge({ session, index }) {
|
|
|
8953
9400
|
}) : progress && (progress.value !== undefined || progress.state === "error") ? /* @__PURE__ */ React.createElement(ProgressRing, {
|
|
8954
9401
|
state: progress.state,
|
|
8955
9402
|
value: progress.value ?? 100
|
|
8956
|
-
}) : null
|
|
9403
|
+
}) : null;
|
|
8957
9404
|
}
|
|
8958
9405
|
function ProgressRing({ state, value }) {
|
|
8959
9406
|
const radius = 5;
|
|
@@ -9020,17 +9467,35 @@ function TerminalView() {
|
|
|
9020
9467
|
const [renaming, setRenaming] = React.useState();
|
|
9021
9468
|
const [error, setError] = React.useState();
|
|
9022
9469
|
const opening = React.useRef(false);
|
|
9470
|
+
const [measuring, setMeasuring] = React.useState();
|
|
9471
|
+
const unmounted = React.useRef(false);
|
|
9472
|
+
React.useEffect(() => () => {
|
|
9473
|
+
unmounted.current = true;
|
|
9474
|
+
}, []);
|
|
9023
9475
|
const create = React.useCallback(async () => {
|
|
9024
9476
|
if (opening.current) {
|
|
9025
9477
|
return;
|
|
9026
9478
|
}
|
|
9027
9479
|
opening.current = true;
|
|
9480
|
+
const known = Terminals.viewSize();
|
|
9481
|
+
const terminal = pi.ui.createTerminal({ cols: known?.cols ?? 2, rows: known?.rows ?? 1, cwd });
|
|
9028
9482
|
try {
|
|
9029
9483
|
setError(undefined);
|
|
9030
|
-
|
|
9484
|
+
if (!known) {
|
|
9485
|
+
setMeasuring(terminal);
|
|
9486
|
+
await Terminals.fit(terminal);
|
|
9487
|
+
}
|
|
9488
|
+
if (unmounted.current) {
|
|
9489
|
+
terminal.dispose();
|
|
9490
|
+
return;
|
|
9491
|
+
}
|
|
9492
|
+
const info = await pi.terminals.openTerminal({ cwd, cols: terminal.cols, rows: terminal.rows });
|
|
9493
|
+
setShown(Terminals.add(info, terminal).info.terminalId);
|
|
9031
9494
|
} catch (failure) {
|
|
9495
|
+
terminal.dispose();
|
|
9032
9496
|
setError(Host.message(failure));
|
|
9033
9497
|
} finally {
|
|
9498
|
+
setMeasuring(undefined);
|
|
9034
9499
|
opening.current = false;
|
|
9035
9500
|
}
|
|
9036
9501
|
}, [cwd]);
|
|
@@ -9052,6 +9517,13 @@ function TerminalView() {
|
|
|
9052
9517
|
shell: session.info.shell
|
|
9053
9518
|
})), t("terminal"));
|
|
9054
9519
|
const titleOf = (session) => titles[sessions.indexOf(session)] ?? t("terminal");
|
|
9520
|
+
const ordinals = TerminalUtil.ordinals(titles);
|
|
9521
|
+
const ordinalOf = (session) => {
|
|
9522
|
+
const ordinal = ordinals[sessions.indexOf(session)];
|
|
9523
|
+
return ordinal && /* @__PURE__ */ React.createElement("span", {
|
|
9524
|
+
className: "taw-terminal-ordinal"
|
|
9525
|
+
}, ` ${ordinal}`);
|
|
9526
|
+
};
|
|
9055
9527
|
const restart = (session) => {
|
|
9056
9528
|
Terminals.restart(session).then(setShown, (failure) => setError(Host.message(failure)));
|
|
9057
9529
|
};
|
|
@@ -9064,10 +9536,10 @@ function TerminalView() {
|
|
|
9064
9536
|
};
|
|
9065
9537
|
const [menu, openMenu] = useContextMenu();
|
|
9066
9538
|
const tabMenu = (session) => {
|
|
9067
|
-
const
|
|
9539
|
+
const at2 = sessions.indexOf(session);
|
|
9068
9540
|
const others = sessions.filter((other) => other !== session);
|
|
9069
|
-
const left = sessions.slice(0,
|
|
9070
|
-
const right = sessions.slice(
|
|
9541
|
+
const left = sessions.slice(0, at2);
|
|
9542
|
+
const right = sessions.slice(at2 + 1);
|
|
9071
9543
|
const ended = sessions.filter((other) => other.exitCode !== undefined);
|
|
9072
9544
|
return [
|
|
9073
9545
|
{ label: t("renameTerminal"), run: () => setRenaming(session.info.terminalId) },
|
|
@@ -9123,8 +9595,7 @@ function TerminalView() {
|
|
|
9123
9595
|
}, renaming === id ? /* @__PURE__ */ React.createElement("span", {
|
|
9124
9596
|
className: "taw-terminal-tab-main"
|
|
9125
9597
|
}, /* @__PURE__ */ React.createElement(TerminalBadge, {
|
|
9126
|
-
session
|
|
9127
|
-
index: sessions.indexOf(session)
|
|
9598
|
+
session
|
|
9128
9599
|
}), /* @__PURE__ */ React.createElement(RenameField, {
|
|
9129
9600
|
value: title,
|
|
9130
9601
|
onDone: finishRename(session)
|
|
@@ -9138,11 +9609,10 @@ function TerminalView() {
|
|
|
9138
9609
|
onAuxClick: (event) => event.button === 1 && void close2(session),
|
|
9139
9610
|
onContextMenu: (event) => openMenu(event, tabMenu(session))
|
|
9140
9611
|
}, /* @__PURE__ */ React.createElement(TerminalBadge, {
|
|
9141
|
-
session
|
|
9142
|
-
index: sessions.indexOf(session)
|
|
9612
|
+
session
|
|
9143
9613
|
}), /* @__PURE__ */ React.createElement("span", {
|
|
9144
9614
|
className: "taw-terminal-tab-title"
|
|
9145
|
-
}, title), stateOf(session) && /* @__PURE__ */ React.createElement("span", {
|
|
9615
|
+
}, title, ordinalOf(session)), stateOf(session) && /* @__PURE__ */ React.createElement("span", {
|
|
9146
9616
|
className: "taw-sr-only"
|
|
9147
9617
|
}, stateOf(session)), session.attention && !on && /* @__PURE__ */ React.createElement("span", {
|
|
9148
9618
|
className: "taw-terminal-attention"
|
|
@@ -9159,27 +9629,26 @@ function TerminalView() {
|
|
|
9159
9629
|
onDoubleClick: () => setRenaming(current.info.terminalId),
|
|
9160
9630
|
onContextMenu: (event) => openMenu(event, tabMenu(current))
|
|
9161
9631
|
}, /* @__PURE__ */ React.createElement(TerminalBadge, {
|
|
9162
|
-
session: current
|
|
9163
|
-
index: sessions.indexOf(current)
|
|
9632
|
+
session: current
|
|
9164
9633
|
}), renaming === current.info.terminalId ? /* @__PURE__ */ React.createElement(RenameField, {
|
|
9165
9634
|
value: titleOf(current),
|
|
9166
9635
|
onDone: finishRename(current)
|
|
9167
9636
|
}) : /* @__PURE__ */ React.createElement("span", {
|
|
9168
9637
|
className: "taw-terminal-tab-title"
|
|
9169
|
-
}, titleOf(current))), /* @__PURE__ */ React.createElement(
|
|
9170
|
-
className: "taw-actions"
|
|
9171
|
-
}, /* @__PURE__ */ React.createElement(Action, {
|
|
9638
|
+
}, titleOf(current))), /* @__PURE__ */ React.createElement(Action, {
|
|
9172
9639
|
icon: "Plus",
|
|
9173
9640
|
label: t("newTerminal"),
|
|
9174
9641
|
onClick: () => void create()
|
|
9175
|
-
}),
|
|
9642
|
+
}), /* @__PURE__ */ React.createElement("div", {
|
|
9643
|
+
className: "taw-actions"
|
|
9644
|
+
}, current && /* @__PURE__ */ React.createElement(Action, {
|
|
9176
9645
|
icon: "Trash2",
|
|
9177
9646
|
label: t("killTerminal"),
|
|
9178
9647
|
onClick: () => void close2(current)
|
|
9179
9648
|
}))), menu, error && /* @__PURE__ */ React.createElement(Empty, {
|
|
9180
9649
|
tone: "error",
|
|
9181
9650
|
title: t("failed", { message: error })
|
|
9182
|
-
}), !error && sessions.length === 0 && /* @__PURE__ */ React.createElement(Empty, {
|
|
9651
|
+
}), !error && sessions.length === 0 && !measuring && /* @__PURE__ */ React.createElement(Empty, {
|
|
9183
9652
|
title: t("noTerminals")
|
|
9184
9653
|
}, /* @__PURE__ */ React.createElement("button", {
|
|
9185
9654
|
type: "button",
|
|
@@ -9188,7 +9657,9 @@ function TerminalView() {
|
|
|
9188
9657
|
}, /* @__PURE__ */ React.createElement(Glyph, {
|
|
9189
9658
|
name: "Plus",
|
|
9190
9659
|
size: 14
|
|
9191
|
-
}), t("newTerminal"))), current && /* @__PURE__ */ React.createElement(
|
|
9660
|
+
}), t("newTerminal"))), measuring && !current && /* @__PURE__ */ React.createElement(MeasuringScreen, {
|
|
9661
|
+
terminal: measuring
|
|
9662
|
+
}), current && /* @__PURE__ */ React.createElement(TerminalEditor, {
|
|
9192
9663
|
key: current.info.terminalId,
|
|
9193
9664
|
terminalId: current.info.terminalId,
|
|
9194
9665
|
onMenu: (event, session) => openMenu(event, screenMenu(session)),
|
|
@@ -9225,7 +9696,7 @@ function TouchKeys({ session }) {
|
|
|
9225
9696
|
onPointerDown: keep,
|
|
9226
9697
|
onMouseDown: keep,
|
|
9227
9698
|
onClick: press(() => Terminals.setCtrl(id, !session.ctrl))
|
|
9228
|
-
}, "Ctrl"), TOUCH_KEYS.map(({ label: label2, key, text }) => /* @__PURE__ */ React.createElement("button", {
|
|
9699
|
+
}, "Ctrl"), TOUCH_KEYS.map(({ label: label2, key, text: text2 }) => /* @__PURE__ */ React.createElement("button", {
|
|
9229
9700
|
key: label2,
|
|
9230
9701
|
type: "button",
|
|
9231
9702
|
className: "taw-touch-key",
|
|
@@ -9235,12 +9706,22 @@ function TouchKeys({ session }) {
|
|
|
9235
9706
|
if (key) {
|
|
9236
9707
|
Terminals.setCtrl(id, false);
|
|
9237
9708
|
session.terminal.sendKey(key);
|
|
9238
|
-
} else if (
|
|
9239
|
-
session.terminal.type(
|
|
9709
|
+
} else if (text2) {
|
|
9710
|
+
session.terminal.type(text2);
|
|
9240
9711
|
}
|
|
9241
9712
|
})
|
|
9242
9713
|
}, label2)));
|
|
9243
9714
|
}
|
|
9715
|
+
function MeasuringScreen({ terminal }) {
|
|
9716
|
+
const box = React.useRef(null);
|
|
9717
|
+
React.useEffect(() => box.current ? terminal.attach(box.current) : undefined, [terminal]);
|
|
9718
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
9719
|
+
className: "taw-editor"
|
|
9720
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
9721
|
+
className: "taw-terminal",
|
|
9722
|
+
ref: box
|
|
9723
|
+
}));
|
|
9724
|
+
}
|
|
9244
9725
|
function TerminalEditor({
|
|
9245
9726
|
terminalId,
|
|
9246
9727
|
onMenu,
|
|
@@ -9373,6 +9854,7 @@ function activate(pi2) {
|
|
|
9373
9854
|
if (pi2.ui.debugWebview) {
|
|
9374
9855
|
pi2.registerTool(AgentBrowser.TOOL);
|
|
9375
9856
|
}
|
|
9857
|
+
BrowserToolLine.register(pi2, (key) => t(key));
|
|
9376
9858
|
pi2.registerView("launcher", { title: label("workbench"), icon: Host.icon("SquareTerminal"), render: LauncherTools, location: "launcher", order: -10 });
|
|
9377
9859
|
const onKey = (event) => {
|
|
9378
9860
|
const tool = WorkspaceKeys.tool(event, MAC);
|