@celljs/ta 4.5.0 → 4.6.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.md +31 -25
- package/bin/ta.mjs +1 -1
- package/dist/cli.mjs +2101 -0
- package/dist/pi/CHANGELOG.md +28 -0
- package/dist/pi/dist/bundle/chunks/chunk-44DLKSKE.js +14 -14
- package/dist/pi/dist/bundle/chunks/openai-chatgpt.js +1 -1
- package/dist/pi/node_modules/@silvia-odwyer/photon-node/LICENSE.md +201 -0
- package/dist/pi/node_modules/@silvia-odwyer/photon-node/README.md +158 -0
- package/dist/pi/node_modules/@silvia-odwyer/photon-node/package.json +23 -0
- package/dist/pi/node_modules/@silvia-odwyer/photon-node/photon_rs.d.ts +3226 -0
- package/dist/pi/node_modules/@silvia-odwyer/photon-node/photon_rs.js +4521 -0
- package/dist/pi/node_modules/@silvia-odwyer/photon-node/photon_rs_bg.js +4270 -0
- package/dist/pi/node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm +0 -0
- package/dist/pi/node_modules/jiti/LICENSE +21 -0
- package/dist/pi/node_modules/jiti/README.md +258 -0
- package/dist/pi/node_modules/jiti/dist/babel.cjs +257 -0
- package/dist/pi/node_modules/jiti/dist/jiti.cjs +1 -0
- package/dist/pi/node_modules/jiti/lib/jiti-cli.mjs +34 -0
- package/dist/pi/node_modules/jiti/lib/jiti-hooks.mjs +124 -0
- package/dist/pi/node_modules/jiti/lib/jiti-native.mjs +121 -0
- package/dist/pi/node_modules/jiti/lib/jiti-register.d.mts +1 -0
- package/dist/pi/node_modules/jiti/lib/jiti-register.mjs +4 -0
- package/dist/pi/node_modules/jiti/lib/jiti-static.mjs +23 -0
- package/dist/pi/node_modules/jiti/lib/jiti.cjs +30 -0
- package/dist/pi/node_modules/jiti/lib/jiti.d.cts +8 -0
- package/dist/pi/node_modules/jiti/lib/jiti.d.mts +8 -0
- package/dist/pi/node_modules/jiti/lib/jiti.mjs +29 -0
- package/dist/pi/node_modules/jiti/lib/types.d.ts +420 -0
- package/dist/pi/node_modules/jiti/package.json +146 -0
- package/dist/pi/node_modules/quickjs-wasi/LICENSE +21 -0
- package/dist/pi/node_modules/quickjs-wasi/README.md +852 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/extensions.d.ts +110 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/extensions.d.ts.map +1 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/extensions.js +372 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/extensions.js.map +1 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/index.d.ts +1263 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/index.d.ts.map +1 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/index.js +2787 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/index.js.map +1 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/version.d.ts +2 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/version.d.ts.map +1 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/version.js +3 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/version.js.map +1 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/wasi-shim.d.ts +61 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/wasi-shim.d.ts.map +1 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/wasi-shim.js +103 -0
- package/dist/pi/node_modules/quickjs-wasi/dist/wasi-shim.js.map +1 -0
- package/dist/pi/node_modules/quickjs-wasi/extensions/crypto/crypto.so +0 -0
- package/dist/pi/node_modules/quickjs-wasi/extensions/encoding/encoding.so +0 -0
- package/dist/pi/node_modules/quickjs-wasi/extensions/headers/headers.so +0 -0
- package/dist/pi/node_modules/quickjs-wasi/extensions/structured-clone/structured-clone.so +0 -0
- package/dist/pi/node_modules/quickjs-wasi/extensions/url/url.so +0 -0
- package/dist/pi/node_modules/quickjs-wasi/package.json +69 -0
- package/dist/pi/node_modules/quickjs-wasi/quickjs.wasm +0 -0
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-channels/README.md +48 -0
- package/dist/pi/packages/ta-channels/extension/index.mjs +651 -0
- package/dist/pi/packages/ta-channels/host/index.mjs +921 -0
- package/dist/pi/packages/ta-channels/lib/agent-menu.d.ts +13 -0
- package/dist/pi/packages/ta-channels/lib/agent-menu.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/agent-menu.js +177 -0
- package/dist/pi/packages/ta-channels/lib/agent-menu.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/channel-menu.d.ts +12 -0
- package/dist/pi/packages/ta-channels/lib/channel-menu.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/channel-menu.js +93 -0
- package/dist/pi/packages/ta-channels/lib/channel-menu.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/channels-model.d.ts +192 -0
- package/dist/pi/packages/ta-channels/lib/channels-model.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/channels-model.js +49 -0
- package/dist/pi/packages/ta-channels/lib/channels-model.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/channels-util.d.ts +149 -0
- package/dist/pi/packages/ta-channels/lib/channels-util.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/channels-util.js +544 -0
- package/dist/pi/packages/ta-channels/lib/channels-util.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/channels.d.ts +81 -0
- package/dist/pi/packages/ta-channels/lib/channels.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/channels.js +181 -0
- package/dist/pi/packages/ta-channels/lib/channels.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/create.d.ts +19 -0
- package/dist/pi/packages/ta-channels/lib/create.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/create.js +182 -0
- package/dist/pi/packages/ta-channels/lib/create.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/extension.d.ts +19 -0
- package/dist/pi/packages/ta-channels/lib/extension.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/extension.js +77 -0
- package/dist/pi/packages/ta-channels/lib/extension.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/faces.d.ts +17 -0
- package/dist/pi/packages/ta-channels/lib/faces.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/faces.js +169 -0
- package/dist/pi/packages/ta-channels/lib/faces.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/host.d.ts +7 -0
- package/dist/pi/packages/ta-channels/lib/host.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/host.js +14 -0
- package/dist/pi/packages/ta-channels/lib/host.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/i18n.d.ts +113 -0
- package/dist/pi/packages/ta-channels/lib/i18n.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/i18n.js +223 -0
- package/dist/pi/packages/ta-channels/lib/i18n.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-channels/lib/index.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/index.js +84 -0
- package/dist/pi/packages/ta-channels/lib/index.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/members.d.ts +9 -0
- package/dist/pi/packages/ta-channels/lib/members.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/members.js +150 -0
- package/dist/pi/packages/ta-channels/lib/members.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/more-menu.d.ts +19 -0
- package/dist/pi/packages/ta-channels/lib/more-menu.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/more-menu.js +79 -0
- package/dist/pi/packages/ta-channels/lib/more-menu.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-channels/lib/react.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/react.js +8 -0
- package/dist/pi/packages/ta-channels/lib/react.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/room.d.ts +22 -0
- package/dist/pi/packages/ta-channels/lib/room.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/room.js +133 -0
- package/dist/pi/packages/ta-channels/lib/room.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +10 -0
- package/dist/pi/packages/ta-channels/lib/sidebar.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/sidebar.js +162 -0
- package/dist/pi/packages/ta-channels/lib/sidebar.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/style.d.ts +5 -0
- package/dist/pi/packages/ta-channels/lib/style.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/style.js +252 -0
- package/dist/pi/packages/ta-channels/lib/style.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/team-tools.d.ts +15 -0
- package/dist/pi/packages/ta-channels/lib/team-tools.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/team-tools.js +92 -0
- package/dist/pi/packages/ta-channels/lib/team-tools.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/team.d.ts +134 -0
- package/dist/pi/packages/ta-channels/lib/team.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/team.js +469 -0
- package/dist/pi/packages/ta-channels/lib/team.js.map +1 -0
- package/dist/pi/packages/ta-channels/lib/views.d.ts +93 -0
- package/dist/pi/packages/ta-channels/lib/views.d.ts.map +1 -0
- package/dist/pi/packages/ta-channels/lib/views.js +188 -0
- package/dist/pi/packages/ta-channels/lib/views.js.map +1 -0
- package/dist/pi/packages/ta-channels/package.json +46 -0
- package/dist/pi/packages/ta-channels/web/index.js +3144 -0
- package/dist/pi/packages/ta-extensions/README.md +20 -0
- package/dist/pi/packages/ta-extensions/host/index.mjs +271 -0
- package/dist/pi/packages/ta-extensions/lib/actions.d.ts +42 -0
- package/dist/pi/packages/ta-extensions/lib/actions.d.ts.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/actions.js +168 -0
- package/dist/pi/packages/ta-extensions/lib/actions.js.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/archive.d.ts +30 -0
- package/dist/pi/packages/ta-extensions/lib/archive.d.ts.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/archive.js +213 -0
- package/dist/pi/packages/ta-extensions/lib/archive.js.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/extensions-util.d.ts +14 -0
- package/dist/pi/packages/ta-extensions/lib/extensions-util.d.ts.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/extensions-util.js +38 -0
- package/dist/pi/packages/ta-extensions/lib/extensions-util.js.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/host.d.ts +36 -0
- package/dist/pi/packages/ta-extensions/lib/host.d.ts.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/host.js +94 -0
- package/dist/pi/packages/ta-extensions/lib/host.js.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.d.ts +64 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.d.ts.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.js +148 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.js.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/import-dialog.d.ts +10 -0
- package/dist/pi/packages/ta-extensions/lib/import-dialog.d.ts.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/import-dialog.js +56 -0
- package/dist/pi/packages/ta-extensions/lib/import-dialog.js.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-extensions/lib/index.d.ts.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/index.js +49 -0
- package/dist/pi/packages/ta-extensions/lib/index.js.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/page.d.ts +22 -0
- package/dist/pi/packages/ta-extensions/lib/page.d.ts.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/page.js +143 -0
- package/dist/pi/packages/ta-extensions/lib/page.js.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/pictures.d.ts +6 -0
- package/dist/pi/packages/ta-extensions/lib/pictures.d.ts.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/pictures.js +62 -0
- package/dist/pi/packages/ta-extensions/lib/pictures.js.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-extensions/lib/react.d.ts.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/react.js +8 -0
- package/dist/pi/packages/ta-extensions/lib/react.js.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-extensions/lib/style.d.ts.map +1 -0
- package/dist/pi/packages/ta-extensions/lib/style.js +94 -0
- package/dist/pi/packages/ta-extensions/lib/style.js.map +1 -0
- package/dist/pi/packages/ta-extensions/package.json +46 -0
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +90 -0
- package/dist/pi/packages/ta-extensions/web/index.js +941 -0
- package/dist/pi/packages/ta-workspace/README.md +29 -0
- package/dist/pi/packages/ta-workspace/lib/browser.d.ts +9 -0
- package/dist/pi/packages/ta-workspace/lib/browser.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/browser.js +162 -0
- package/dist/pi/packages/ta-workspace/lib/browser.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/common.d.ts +63 -0
- package/dist/pi/packages/ta-workspace/lib/common.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/common.js +180 -0
- package/dist/pi/packages/ta-workspace/lib/common.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/editors.d.ts +47 -0
- package/dist/pi/packages/ta-workspace/lib/editors.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/editors.js +353 -0
- package/dist/pi/packages/ta-workspace/lib/editors.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/explorer.d.ts +11 -0
- package/dist/pi/packages/ta-workspace/lib/explorer.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/explorer.js +388 -0
- package/dist/pi/packages/ta-workspace/lib/explorer.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/file-icon.d.ts +9 -0
- package/dist/pi/packages/ta-workspace/lib/file-icon.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/file-icon.js +19 -0
- package/dist/pi/packages/ta-workspace/lib/file-icon.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/host.d.ts +41 -0
- package/dist/pi/packages/ta-workspace/lib/host.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/host.js +117 -0
- package/dist/pi/packages/ta-workspace/lib/host.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +158 -0
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/i18n.js +319 -0
- package/dist/pi/packages/ta-workspace/lib/i18n.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-workspace/lib/index.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/index.js +64 -0
- package/dist/pi/packages/ta-workspace/lib/index.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/open-files.d.ts +3 -0
- package/dist/pi/packages/ta-workspace/lib/open-files.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/open-files.js +59 -0
- package/dist/pi/packages/ta-workspace/lib/open-files.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/preview.d.ts +16 -0
- package/dist/pi/packages/ta-workspace/lib/preview.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/preview.js +116 -0
- package/dist/pi/packages/ta-workspace/lib/preview.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/react.d.ts +5 -0
- package/dist/pi/packages/ta-workspace/lib/react.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/react.js +8 -0
- package/dist/pi/packages/ta-workspace/lib/react.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/scm.d.ts +3 -0
- package/dist/pi/packages/ta-workspace/lib/scm.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/scm.js +262 -0
- package/dist/pi/packages/ta-workspace/lib/scm.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/search.d.ts +9 -0
- package/dist/pi/packages/ta-workspace/lib/search.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/search.js +286 -0
- package/dist/pi/packages/ta-workspace/lib/search.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/style.d.ts +5 -0
- package/dist/pi/packages/ta-workspace/lib/style.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/style.js +228 -0
- package/dist/pi/packages/ta-workspace/lib/style.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/terminal.d.ts +24 -0
- package/dist/pi/packages/ta-workspace/lib/terminal.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/terminal.js +283 -0
- package/dist/pi/packages/ta-workspace/lib/terminal.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/ansi.d.ts +72 -0
- package/dist/pi/packages/ta-workspace/lib/util/ansi.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/ansi.js +434 -0
- package/dist/pi/packages/ta-workspace/lib/util/ansi.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/file-icon.d.ts +10 -0
- package/dist/pi/packages/ta-workspace/lib/util/file-icon.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/file-icon.js +28 -0
- package/dist/pi/packages/ta-workspace/lib/util/file-icon.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/git.d.ts +69 -0
- package/dist/pi/packages/ta-workspace/lib/util/git.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/git.js +173 -0
- package/dist/pi/packages/ta-workspace/lib/util/git.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/keys.d.ts +14 -0
- package/dist/pi/packages/ta-workspace/lib/util/keys.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/keys.js +52 -0
- package/dist/pi/packages/ta-workspace/lib/util/keys.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts +18 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.js +92 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/search.d.ts +86 -0
- package/dist/pi/packages/ta-workspace/lib/util/search.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/search.js +243 -0
- package/dist/pi/packages/ta-workspace/lib/util/search.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/seti-font.d.ts +3 -0
- package/dist/pi/packages/ta-workspace/lib/util/seti-font.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/seti-font.js +8 -0
- package/dist/pi/packages/ta-workspace/lib/util/seti-font.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/seti.d.ts +10 -0
- package/dist/pi/packages/ta-workspace/lib/util/seti.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/seti.js +758 -0
- package/dist/pi/packages/ta-workspace/lib/util/seti.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/workspace.d.ts +109 -0
- package/dist/pi/packages/ta-workspace/lib/util/workspace.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/util/workspace.js +294 -0
- package/dist/pi/packages/ta-workspace/lib/util/workspace.js.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/workspace-client.d.ts +22 -0
- package/dist/pi/packages/ta-workspace/lib/workspace-client.d.ts.map +1 -0
- package/dist/pi/packages/ta-workspace/lib/workspace-client.js +118 -0
- package/dist/pi/packages/ta-workspace/lib/workspace-client.js.map +1 -0
- package/dist/pi/packages/ta-workspace/package.json +41 -0
- package/dist/pi/packages/ta-workspace/scripts/seti.ts +173 -0
- package/dist/pi/packages/ta-workspace/web/index.js +7289 -0
- package/dist/public/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/public/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/public/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/public/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/public/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/public/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/public/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/public/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/public/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/public/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/public/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/public/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/public/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/public/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/public/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/public/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/public/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/public/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/public/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/public/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/public/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/public/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/public/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/public/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/public/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/public/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/public/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/public/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/public/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/public/assets/abap-08VXUWAP.js +1 -0
- package/dist/public/assets/abnfDiagram-S7VZAUFO-3_0FZVeo.js +1 -0
- package/dist/public/assets/apex-BWPQTe0t.js +1 -0
- package/dist/public/assets/architecture-WOLXFQ4H-BX-N-_gd.js +1 -0
- package/dist/public/assets/architectureDiagram-YGSQEFNW-Daeu1xjI.js +36 -0
- package/dist/public/assets/azcli-Bc_sGQ0U.js +1 -0
- package/dist/public/assets/bat-i0X4ZdIN.js +1 -0
- package/dist/public/assets/bicep-B5-_aFwp.js +2 -0
- package/dist/public/assets/blockDiagram-APKKGZFW-DjJS8902.js +140 -0
- package/dist/public/assets/bpmnIcons-APHXDYXF-C0jbCElo.js +1 -0
- package/dist/public/assets/browser-D2CY3Lfb.js +1 -0
- package/dist/public/assets/browser-DZ1aJcgd.js +12 -0
- package/dist/public/assets/c4Diagram-KJ2TOQU5-mKfHFqh9.js +38 -0
- package/dist/public/assets/cameligo-DMUM7wLl.js +1 -0
- package/dist/public/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dist/public/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/dist/public/assets/chunk-6MUBBAK2-Cnx7dsB1.js +2 -0
- package/dist/public/assets/chunk-AXFCVDMN-g4Y7Pg2t.js +62 -0
- package/dist/public/assets/chunk-BG4553SI-QNE6A_Vg.js +129 -0
- package/dist/public/assets/chunk-DQASFODM-DPHr08r0.js +10 -0
- package/dist/public/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
- package/dist/public/assets/chunk-HFQBQIA3-CenkxHlV.js +1 -0
- package/dist/public/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
- package/dist/public/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dist/public/assets/chunk-KQLB2F66-C3Z8V8R_.js +2 -0
- package/dist/public/assets/chunk-KS47KZWR-BbUyxMWY.js +1 -0
- package/dist/public/assets/chunk-LEVMRMFU-CKECy4cp.js +1 -0
- package/dist/public/assets/chunk-M57EVK23-DuZd8RGI.js +1 -0
- package/dist/public/assets/chunk-NGNAAXSQ-Bxuf9Ivc.js +136 -0
- package/dist/public/assets/chunk-OY52VR5R-DatO2fu-.js +88 -0
- package/dist/public/assets/chunk-QB3YPZ4I-11782Ox2.js +213 -0
- package/dist/public/assets/chunk-R3KSYZAL-CCTi2rHV.js +1 -0
- package/dist/public/assets/chunk-STOXU5M4-DU6EHCIH.js +72 -0
- package/dist/public/assets/chunk-TU62E6Q5-BtgGljqq.js +1 -0
- package/dist/public/assets/chunk-X4PVCEUW-Dd_Qy0Gx.js +1 -0
- package/dist/public/assets/chunk-XXDRQBXY-DjOrWHxV.js +1 -0
- package/dist/public/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dist/public/assets/classDiagram-v2-L25IHNXF-KfN1--CA.js +217 -0
- package/dist/public/assets/client-sUFoEC5s.js +1 -0
- package/dist/public/assets/clojure-Cm7r79vr.js +1 -0
- package/dist/public/assets/codicon-DF1abBS2.ttf +0 -0
- package/dist/public/assets/coffee-Ba7i2nA0.js +1 -0
- package/dist/public/assets/common-CGQN5htF.js +4 -0
- package/dist/public/assets/cose-bilkent-JH36ORCC-BuWVQ5UC.js +1 -0
- package/dist/public/assets/cpp-C7h46wYY.js +1 -0
- package/dist/public/assets/csharp-BKxtCVv1.js +1 -0
- package/dist/public/assets/csp-bTuwJoIa.js +1 -0
- package/dist/public/assets/css-DIMkf-bt.js +3 -0
- package/dist/public/assets/cynefin-EF2NZ3EQ-D_GZWaFs.js +1 -0
- package/dist/public/assets/cynefinDiagram-L36ESFBY-BKljxAVP.js +62 -0
- package/dist/public/assets/cypher-CVaqCwHa.js +1 -0
- package/dist/public/assets/cytoscape.esm-DpEiRCgp.js +321 -0
- package/dist/public/assets/d3-scale-CElPUUud.js +1 -0
- package/dist/public/assets/d3-selection-CtCbiJ-r.js +1 -0
- package/dist/public/assets/dagre-SPEB5RXH-nD3f86OL.js +4 -0
- package/dist/public/assets/dart-onAF5SnQ.js +1 -0
- package/dist/public/assets/diagram-3B7GL73J-wSVpHF4f.js +200 -0
- package/dist/public/assets/diagram-DNEMPZML-BOkeaSpr.js +24 -0
- package/dist/public/assets/diagram-L3MUGCDN-CRCErdiz.js +41 -0
- package/dist/public/assets/diagram-LA4NIPWU-y5kaOsii.js +24 -0
- package/dist/public/assets/diagram-MHCOC4E2-D7l7ybij.js +3 -0
- package/dist/public/assets/diagram-XPFHEONP-kHzV_Ibv.js +30 -0
- package/dist/public/assets/dist-B-aKVhGg.js +1 -0
- package/dist/public/assets/dockerfile-DZFCIeNp.js +1 -0
- package/dist/public/assets/ebnfDiagram-UZSYDL2S-BX_-WdHG.js +1 -0
- package/dist/public/assets/ecl-94qehhXe.js +1 -0
- package/dist/public/assets/editor-DjpsE8to.css +1 -0
- package/dist/public/assets/editor.api-Dwz0wCaW.js +908 -0
- package/dist/public/assets/editor.worker-CRz__AKW.js +33 -0
- package/dist/public/assets/elixir-6RTg0lbw.js +1 -0
- package/dist/public/assets/elk-XV6XMXQE-YaOVo5bZ.js +27 -0
- package/dist/public/assets/erDiagram-EYBAPDEH-BXQPjKDV.js +99 -0
- package/dist/public/assets/eventmodeling-K75KTNOO-SiGVyftr.js +1 -0
- package/dist/public/assets/flow9-C5_-GSwl.js +1 -0
- package/dist/public/assets/flowDiagram-MALGAFMO-BHpEyQnS.js +1 -0
- package/dist/public/assets/freemarker2-DmbpSxx5.js +3 -0
- package/dist/public/assets/fsharp-C8Ef5oNN.js +1 -0
- package/dist/public/assets/ganttDiagram-23REXITY-B_i7AN7O.js +292 -0
- package/dist/public/assets/gitGraph-VSP46ZUC-CSv9x0vY.js +1 -0
- package/dist/public/assets/gitGraphDiagram-STJD7YCW-BMA1YavS.js +106 -0
- package/dist/public/assets/go-C-y9NEjX.js +1 -0
- package/dist/public/assets/graphlib-DoDw2DoG.js +1 -0
- package/dist/public/assets/graphql-fmXr3nnJ.js +1 -0
- package/dist/public/assets/handlebars-BVNKBeJT.js +1 -0
- package/dist/public/assets/hcl-CpzslTdj.js +1 -0
- package/dist/public/assets/html-BHaxuuAl.js +1 -0
- package/dist/public/assets/index-DtU34jhH.js +2 -0
- package/dist/public/assets/info-OHQRW6UA-Bx2U6fFU.js +1 -0
- package/dist/public/assets/infoDiagram-KBXO4MBG-BkNpfsDm.js +2 -0
- package/dist/public/assets/ini-sBoK_t0W.js +1 -0
- package/dist/public/assets/ishikawaDiagram-M35NCXHK-xTM6C-Kn.js +70 -0
- package/dist/public/assets/java-BEtHBSE6.js +1 -0
- package/dist/public/assets/javascript-C5dXKvxq.js +1 -0
- package/dist/public/assets/journeyDiagram-OPLOXDXO-C6iaT7vL.js +139 -0
- package/dist/public/assets/json.worker-CV9fqkUp.js +65 -0
- package/dist/public/assets/jsonMode-BD64T5vA.css +1 -0
- package/dist/public/assets/jsonMode-Ia_aRv-z.js +29 -0
- package/dist/public/assets/julia-Bri6UV-V.js +1 -0
- package/dist/public/assets/kanban-definition-BZKZHSQY-MobAdBhz.js +89 -0
- package/dist/public/assets/katex-B9z73Mgk.js +257 -0
- package/dist/public/assets/katex-BydxR-ky.css +1 -0
- package/dist/public/assets/kotlin-BOotOW0E.js +1 -0
- package/dist/public/assets/less-B9JPFI3C.js +2 -0
- package/dist/public/assets/lexon-CfSJPG6W.js +1 -0
- package/dist/public/assets/liquid-CIbIBxiN.js +1 -0
- package/dist/public/assets/lua-CsQS60Ue.js +1 -0
- package/dist/public/assets/m3-D-oSqn_W.js +1 -0
- package/dist/public/assets/markdown-Cimd5fb3.js +1 -0
- package/dist/public/assets/mdx-BqruHcEe.js +1 -0
- package/dist/public/assets/mermaid-parser.core-kBQmxOUn.js +7 -0
- package/dist/public/assets/mermaid.core-BFkQwIYu.js +44 -0
- package/dist/public/assets/mindmap-definition-I2QAS2VK-DxpTmvUG.js +98 -0
- package/dist/public/assets/mips-CIPQ_RoX.js +1 -0
- package/dist/public/assets/module-B8jze-Tx.js +5 -0
- package/dist/public/assets/module-Blc8dqbf.js +1 -0
- package/dist/public/assets/module-C1y_4M09.js +1061 -0
- package/dist/public/assets/module-C9WFrzAc.js +1 -0
- package/dist/public/assets/module-CouMtASh.js +1 -0
- package/dist/public/assets/module-DYWqfyIP.js +1 -0
- package/dist/public/assets/module-EGdAhoOx.js +1 -0
- package/dist/public/assets/module-EeaigZHL.js +1 -0
- package/dist/public/assets/module-ZhkaqrNe.js +1 -0
- package/dist/public/assets/monaco-BRwac88s.js +35 -0
- package/dist/public/assets/monaco-BlFvoJcU.css +1 -0
- package/dist/public/assets/msdax-DauUninz.js +1 -0
- package/dist/public/assets/mysql-SOo6toE5.js +1 -0
- package/dist/public/assets/objective-c-FvmIjYaQ.js +1 -0
- package/dist/public/assets/packet-JDAUHWVQ-Dy7GyfNz.js +1 -0
- package/dist/public/assets/pascal-DrH0SRf2.js +1 -0
- package/dist/public/assets/pascaligo-D-ptJ9y-.js +1 -0
- package/dist/public/assets/pegDiagram-FD4XPPHP-B3bIVo4u.js +1 -0
- package/dist/public/assets/perl-oz_6vUea.js +1 -0
- package/dist/public/assets/pgsql-DTj74zXo.js +1 -0
- package/dist/public/assets/php-nr791fC2.js +1 -0
- package/dist/public/assets/pie-XZMESJXO-B4D2CjUH.js +1 -0
- package/dist/public/assets/pieDiagram-J4AKIIQI-CgnbwU0I.js +39 -0
- package/dist/public/assets/pla-CopQ2nXW.js +1 -0
- package/dist/public/assets/postiats-43DmfD33.js +1 -0
- package/dist/public/assets/powerquery-D3hlyOfw.js +1 -0
- package/dist/public/assets/powershell-DmHpPYUd.js +1 -0
- package/dist/public/assets/protobuf-C531GsRP.js +2 -0
- package/dist/public/assets/pug-Z5eAx3Zn.js +1 -0
- package/dist/public/assets/python-Cwjb3hEe.js +1 -0
- package/dist/public/assets/qsharp-DkqhCAOL.js +1 -0
- package/dist/public/assets/quadrantDiagram-XTYBLID2-DWx4wRau.js +7 -0
- package/dist/public/assets/r-BwWrilGY.js +1 -0
- package/dist/public/assets/radar-ABXABTNO-Dtf3tObc.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-DKGa9xBx.js +1 -0
- package/dist/public/assets/railroad-abnf-LNEFI6M7-CyjF4cc_.js +1 -0
- package/dist/public/assets/railroad-ebnf-DWYD2UWJ-D2ypsr5c.js +1 -0
- package/dist/public/assets/railroad-peg-JR7BVNR7-Cy6Mde1c.js +1 -0
- package/dist/public/assets/railroadDiagram-MRQ6NCDL-B6ya_k_l.js +1 -0
- package/dist/public/assets/razor-D_ClW9Lh.js +1 -0
- package/dist/public/assets/redis-ClamHrr6.js +1 -0
- package/dist/public/assets/redshift-DT7zqm-g.js +1 -0
- package/dist/public/assets/requirementDiagram-Y7LWUY3S-Brg8B8VS.js +84 -0
- package/dist/public/assets/resolver-B7c_-amj.js +1 -0
- package/dist/public/assets/restructuredtext-BYgofb2h.js +1 -0
- package/dist/public/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/dist/public/assets/ruby-DezsRK8O.js +1 -0
- package/dist/public/assets/rust-DdL9SqIa.js +1 -0
- package/dist/public/assets/sankeyDiagram-WGJFYUXA-DbzPDfky.js +40 -0
- package/dist/public/assets/sb-CcwsVR0C.js +1 -0
- package/dist/public/assets/scala-DHpiXF5c.js +1 -0
- package/dist/public/assets/scheme-BeGwcela.js +1 -0
- package/dist/public/assets/scss-gp-XZpBa.js +3 -0
- package/dist/public/assets/sequenceDiagram-5NDRBG5M-BuN84drT.js +169 -0
- package/dist/public/assets/shell-CC2rA5mh.js +1 -0
- package/dist/public/assets/sizeCapture-INFHLROL-3uHXrFqA.js +1 -0
- package/dist/public/assets/solidity-BEEn4gHE.js +1 -0
- package/dist/public/assets/sophia-CRfGWb83.js +1 -0
- package/dist/public/assets/sparql-D_Lu-MrJ.js +1 -0
- package/dist/public/assets/sql-NEE52Syq.js +1 -0
- package/dist/public/assets/st-DbInun42.js +1 -0
- package/dist/public/assets/stateDiagram-v2-FJ4FJNEA-C_CTpHMj.js +291 -0
- package/dist/public/assets/swift-Bxkupp3x.js +1 -0
- package/dist/public/assets/swimlanes-UMQ2AFYF-BvD4v9jw.js +1 -0
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-CMvLg13v.js +8 -0
- package/dist/public/assets/systemverilog-Bz4Y3fRF.js +1 -0
- package/dist/public/assets/tcl-DISqw1ZD.js +1 -0
- package/dist/public/assets/timeline-definition-SEUHKTQE-VE2xWGk8.js +120 -0
- package/dist/public/assets/treeView-D4JQ5SDB-ETecwv1j.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-er6ceAYK.js +1 -0
- package/dist/public/assets/twig-De2hgUGE.js +1 -0
- package/dist/public/assets/typescript-upeNz2VW.js +1 -0
- package/dist/public/assets/typespec-B8J7ngcE.js +1 -0
- package/dist/public/assets/usecaseDiagram-AFA6YXN4-ZtyyvKye.js +328 -0
- package/dist/public/assets/vb-DV3o63ZY.js +1 -0
- package/dist/public/assets/vennDiagram-NNMJR3RB-BTEvzrNd.js +34 -0
- package/dist/public/assets/wardley-7MLQ67FV-CzrxsjBc.js +1 -0
- package/dist/public/assets/wardleyDiagram-S7YFUSEH-CF8wIUhx.js +78 -0
- package/dist/public/assets/wgsl-DpFanUEy.js +298 -0
- package/dist/public/assets/xml-Cki0HxGb.js +1 -0
- package/dist/public/assets/xychartDiagram-GGNKY7IX-DcDpoJ4n.js +7 -0
- package/dist/public/assets/yaml-YIY66l1U.js +1 -0
- package/dist/public/assets/zh-cn-Bhwk8qWJ.js +12 -0
- package/dist/public/favicon.ico +0 -0
- package/dist/public/icons/apple-touch-icon.png +0 -0
- package/dist/public/icons/icon-192.png +0 -0
- package/dist/public/icons/icon-512.png +0 -0
- package/dist/public/icons/icon.svg +1 -0
- package/dist/public/icons/maskable-512.png +0 -0
- package/dist/public/index.html +18 -0
- package/dist/public/manifest.webmanifest +40 -0
- package/dist/public/sw.js +78 -0
- package/dist/serve/index.mjs +8235 -2691
- package/package.json +23 -23
|
@@ -0,0 +1,941 @@
|
|
|
1
|
+
// web-src/extensions-util.ts
|
|
2
|
+
var ExtensionsUtil;
|
|
3
|
+
((ExtensionsUtil) => {
|
|
4
|
+
function group(packages) {
|
|
5
|
+
const byName = (a, b) => a.name.localeCompare(b.name);
|
|
6
|
+
return {
|
|
7
|
+
mine: packages.filter((pkg) => pkg.origin === "directory").sort(byName),
|
|
8
|
+
installed: packages.filter((pkg) => pkg.origin === "package").sort(byName)
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
ExtensionsUtil.group = group;
|
|
12
|
+
function isArchive(fileName) {
|
|
13
|
+
return /\.(tgz|tar\.gz)$/i.test(fileName);
|
|
14
|
+
}
|
|
15
|
+
ExtensionsUtil.isArchive = isArchive;
|
|
16
|
+
function toBase64(bytes) {
|
|
17
|
+
let binary = "";
|
|
18
|
+
for (let at = 0;at < bytes.length; at += 32768) {
|
|
19
|
+
binary += String.fromCharCode(...bytes.subarray(at, at + 32768));
|
|
20
|
+
}
|
|
21
|
+
return btoa(binary);
|
|
22
|
+
}
|
|
23
|
+
ExtensionsUtil.toBase64 = toBase64;
|
|
24
|
+
function fromBase64(data) {
|
|
25
|
+
const binary = atob(data);
|
|
26
|
+
const bytes = new Uint8Array(binary.length);
|
|
27
|
+
for (let i = 0;i < binary.length; i++) {
|
|
28
|
+
bytes[i] = binary.charCodeAt(i);
|
|
29
|
+
}
|
|
30
|
+
return bytes;
|
|
31
|
+
}
|
|
32
|
+
ExtensionsUtil.fromBase64 = fromBase64;
|
|
33
|
+
})(ExtensionsUtil ||= {});
|
|
34
|
+
|
|
35
|
+
// web-src/i18n.ts
|
|
36
|
+
var EN = {
|
|
37
|
+
title: "Extensions",
|
|
38
|
+
heroTitle: "Make an extension in a sentence",
|
|
39
|
+
heroText: "It works as soon as the reply ends, with no restart.",
|
|
40
|
+
placeholder: "Describe the extension, for example: a pomodoro timer beside the conversation",
|
|
41
|
+
makePrompt: "Make an extension: {text}",
|
|
42
|
+
changePrompt: "Change the extension {name} (in {root}): {text}",
|
|
43
|
+
changeTitle: "Change {name}",
|
|
44
|
+
changePlaceholder: "What should it do differently?",
|
|
45
|
+
mine: "Yours",
|
|
46
|
+
mineEmpty: "None yet: say what you want above.",
|
|
47
|
+
installed: "Installed",
|
|
48
|
+
import: "Import",
|
|
49
|
+
export: "Export",
|
|
50
|
+
change: "Change",
|
|
51
|
+
remove: "Remove",
|
|
52
|
+
copySource: "Copy the source",
|
|
53
|
+
copied: "Copied {source}",
|
|
54
|
+
removeTitle: "Remove {name}?",
|
|
55
|
+
removeDetail: "Its pages, cards and commands go with it.",
|
|
56
|
+
removed: "Removed {name}",
|
|
57
|
+
exported: "Exported {file}",
|
|
58
|
+
imported: "Imported {name}; it works now",
|
|
59
|
+
installedOk: "Installed {name}; it works now",
|
|
60
|
+
existsTitle: "{name} is there already. Replace it?",
|
|
61
|
+
existsDetail: "Its files give way to those of the file imported.",
|
|
62
|
+
replace: "Replace",
|
|
63
|
+
project: "This project",
|
|
64
|
+
turnOn: "Turn {name} on",
|
|
65
|
+
turnedOn: "{name} is on",
|
|
66
|
+
turnedOff: "{name} is off",
|
|
67
|
+
shareTitle: "Hand them on",
|
|
68
|
+
shareSteps: ["Export", "Send the .tgz", "They import it"],
|
|
69
|
+
shareMore: "npm and Git sources import too, or just tell Ta.",
|
|
70
|
+
importTitle: "Import an extension",
|
|
71
|
+
dropHere: "Drop a .tgz file here, or",
|
|
72
|
+
chooseFile: "choose a file",
|
|
73
|
+
orSource: "Or install it from npm or Git",
|
|
74
|
+
sourcePlaceholder: "npm:@scope/name or https://github.com/you/repo",
|
|
75
|
+
install: "Install",
|
|
76
|
+
working: "Working…",
|
|
77
|
+
trust: "An extension runs code on this computer: import only those of people you trust.",
|
|
78
|
+
dropToImport: "Drop to import",
|
|
79
|
+
notArchive: "Only a .tgz file of an extension imports.",
|
|
80
|
+
loading: "Loading…",
|
|
81
|
+
kinds: {
|
|
82
|
+
extensions: "Commands",
|
|
83
|
+
web: "On the page",
|
|
84
|
+
skills: "Skills",
|
|
85
|
+
prompts: "Prompts",
|
|
86
|
+
themes: "Themes"
|
|
87
|
+
},
|
|
88
|
+
examples: [
|
|
89
|
+
{
|
|
90
|
+
kind: "card",
|
|
91
|
+
label: "Card",
|
|
92
|
+
example: "Pomodoro",
|
|
93
|
+
text: "a pomodoro timer as a card beside the conversation: 25 minutes of work, 5 of rest, and a notice when each ends"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
kind: "page",
|
|
97
|
+
label: "Page",
|
|
98
|
+
example: "Commits by day",
|
|
99
|
+
text: "a page that shows, by day, the commits and the lines changed of this repository over the last 30 days"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
kind: "command",
|
|
103
|
+
label: "Command",
|
|
104
|
+
example: "/standup",
|
|
105
|
+
text: "a /standup command that sums up what I committed and changed today in this repository, as words for the stand-up"
|
|
106
|
+
},
|
|
107
|
+
{ kind: "skill", label: "Skill", example: "Into English", text: 'a skill: when I say "in English", Ta puts its last reply into natural English' }
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
var ZH = {
|
|
111
|
+
title: "扩展",
|
|
112
|
+
heroTitle: "用一句话做一个扩展",
|
|
113
|
+
heroText: "回答结束就生效,不用重启。",
|
|
114
|
+
placeholder: "描述你想要的扩展,例如:在对话旁放一个番茄钟",
|
|
115
|
+
makePrompt: "做一个扩展:{text}",
|
|
116
|
+
changePrompt: "修改扩展 {name}(在 {root}):{text}",
|
|
117
|
+
changeTitle: "修改 {name}",
|
|
118
|
+
changePlaceholder: "想让它有什么不同?",
|
|
119
|
+
mine: "我的扩展",
|
|
120
|
+
mineEmpty: "还没有,在上面说一句就行。",
|
|
121
|
+
installed: "安装的扩展",
|
|
122
|
+
import: "导入",
|
|
123
|
+
export: "导出",
|
|
124
|
+
change: "修改",
|
|
125
|
+
remove: "移除",
|
|
126
|
+
copySource: "复制来源",
|
|
127
|
+
copied: "已复制 {source}",
|
|
128
|
+
removeTitle: "移除扩展 {name}?",
|
|
129
|
+
removeDetail: "它的页面、卡片和命令也会一起移除。",
|
|
130
|
+
removed: "已移除 {name}",
|
|
131
|
+
exported: "已导出 {file}",
|
|
132
|
+
imported: "已导入 {name},已经生效",
|
|
133
|
+
installedOk: "已安装 {name},已经生效",
|
|
134
|
+
existsTitle: "已有扩展 {name},要替换吗?",
|
|
135
|
+
existsDetail: "现有的文件会换成导入的版本。",
|
|
136
|
+
replace: "替换",
|
|
137
|
+
project: "本项目",
|
|
138
|
+
turnOn: "启用 {name}",
|
|
139
|
+
turnedOn: "已启用 {name}",
|
|
140
|
+
turnedOff: "已停用 {name}",
|
|
141
|
+
shareTitle: "分享给别人",
|
|
142
|
+
shareSteps: ["导出", "发送 .tgz 文件", "对方导入"],
|
|
143
|
+
shareMore: "也支持 npm、Git 来源,或者直接对 Ta 说。",
|
|
144
|
+
importTitle: "导入扩展",
|
|
145
|
+
dropHere: "把 .tgz 文件拖到这里,或",
|
|
146
|
+
chooseFile: "选择文件",
|
|
147
|
+
orSource: "或者从 npm、Git 安装",
|
|
148
|
+
sourcePlaceholder: "npm:@scope/name 或 https://github.com/you/repo",
|
|
149
|
+
install: "安装",
|
|
150
|
+
working: "正在处理…",
|
|
151
|
+
trust: "扩展会在这台电脑上运行代码:只导入你信任的人给的扩展。",
|
|
152
|
+
dropToImport: "松开即可导入",
|
|
153
|
+
notArchive: "只能导入扩展的 .tgz 文件。",
|
|
154
|
+
loading: "正在加载…",
|
|
155
|
+
kinds: {
|
|
156
|
+
extensions: "命令",
|
|
157
|
+
web: "界面",
|
|
158
|
+
skills: "技能",
|
|
159
|
+
prompts: "提示模板",
|
|
160
|
+
themes: "主题"
|
|
161
|
+
},
|
|
162
|
+
examples: [
|
|
163
|
+
{ kind: "card", label: "卡片", example: "番茄钟", text: "在对话旁放一个番茄钟卡片:专注 25 分钟、休息 5 分钟,每段结束时提醒我" },
|
|
164
|
+
{ kind: "page", label: "页面", example: "提交统计", text: "加一个页面,按天显示这个仓库最近 30 天的提交数和改动行数" },
|
|
165
|
+
{ kind: "command", label: "命令", example: "/standup", text: "加一个 /standup 命令:总结我今天在这个仓库里的提交和改动,写成站会发言" },
|
|
166
|
+
{ kind: "skill", label: "技能", example: "翻成英文", text: "加一个技能,我说“翻成英文”时,把上一条回复翻成地道的英文" }
|
|
167
|
+
]
|
|
168
|
+
};
|
|
169
|
+
var ExtensionWords;
|
|
170
|
+
((ExtensionWords) => {
|
|
171
|
+
function of(language) {
|
|
172
|
+
return language === "zh-CN" ? ZH : EN;
|
|
173
|
+
}
|
|
174
|
+
ExtensionWords.of = of;
|
|
175
|
+
function fill(template, values) {
|
|
176
|
+
return template.replace(/\{(\w+)\}/g, (whole, key) => values[key] ?? whole);
|
|
177
|
+
}
|
|
178
|
+
ExtensionWords.fill = fill;
|
|
179
|
+
})(ExtensionWords ||= {});
|
|
180
|
+
|
|
181
|
+
// web-src/actions.ts
|
|
182
|
+
class PackagesStore {
|
|
183
|
+
pi;
|
|
184
|
+
current = {};
|
|
185
|
+
listeners = new Set;
|
|
186
|
+
constructor(pi) {
|
|
187
|
+
this.pi = pi;
|
|
188
|
+
}
|
|
189
|
+
get state() {
|
|
190
|
+
return this.current;
|
|
191
|
+
}
|
|
192
|
+
subscribe(listener) {
|
|
193
|
+
this.listeners.add(listener);
|
|
194
|
+
return () => this.listeners.delete(listener);
|
|
195
|
+
}
|
|
196
|
+
patch(id, change) {
|
|
197
|
+
this.current = { packages: this.current.packages?.map((pkg) => pkg.id === id ? { ...pkg, ...change } : pkg) };
|
|
198
|
+
this.publish();
|
|
199
|
+
}
|
|
200
|
+
async load() {
|
|
201
|
+
try {
|
|
202
|
+
this.current = { packages: await this.pi.packages.listPackages() };
|
|
203
|
+
} catch (error) {
|
|
204
|
+
this.current = { packages: this.current.packages ?? [] };
|
|
205
|
+
this.pi.ui.notify(error instanceof Error ? error.message : String(error), "error");
|
|
206
|
+
}
|
|
207
|
+
this.publish();
|
|
208
|
+
}
|
|
209
|
+
publish() {
|
|
210
|
+
for (const listener of this.listeners) {
|
|
211
|
+
listener();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
class ExtensionActions {
|
|
217
|
+
pi;
|
|
218
|
+
store;
|
|
219
|
+
constructor(pi, store) {
|
|
220
|
+
this.pi = pi;
|
|
221
|
+
this.store = store;
|
|
222
|
+
}
|
|
223
|
+
get words() {
|
|
224
|
+
return ExtensionWords.of(this.pi.ui.language);
|
|
225
|
+
}
|
|
226
|
+
make(text) {
|
|
227
|
+
return this.converse(ExtensionWords.fill(this.words.makePrompt, { text: text.trim() }));
|
|
228
|
+
}
|
|
229
|
+
async change(pkg) {
|
|
230
|
+
const words = this.words;
|
|
231
|
+
const text = await this.pi.ui.input(ExtensionWords.fill(words.changeTitle, { name: pkg.name }), words.changePlaceholder);
|
|
232
|
+
if (text?.trim()) {
|
|
233
|
+
await this.converse(ExtensionWords.fill(words.changePrompt, { name: pkg.name, root: pkg.root, text: text.trim() }));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
async exportPackage(pkg) {
|
|
237
|
+
await this.guard(async () => {
|
|
238
|
+
const { fileName, data } = await this.pi.callHost("exportPackage", pkg.id);
|
|
239
|
+
const url = URL.createObjectURL(new Blob([ExtensionsUtil.fromBase64(data)], { type: "application/gzip" }));
|
|
240
|
+
const link = document.createElement("a");
|
|
241
|
+
link.href = url;
|
|
242
|
+
link.download = fileName;
|
|
243
|
+
document.body.appendChild(link);
|
|
244
|
+
link.click();
|
|
245
|
+
link.remove();
|
|
246
|
+
setTimeout(() => URL.revokeObjectURL(url), 1e4);
|
|
247
|
+
this.pi.ui.notify(ExtensionWords.fill(this.words.exported, { file: fileName }));
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
async remove(pkg) {
|
|
251
|
+
const words = this.words;
|
|
252
|
+
const confirmed = await this.pi.ui.confirm(ExtensionWords.fill(words.removeTitle, { name: pkg.name }), words.removeDetail, {
|
|
253
|
+
confirmLabel: words.remove,
|
|
254
|
+
danger: true
|
|
255
|
+
});
|
|
256
|
+
if (confirmed) {
|
|
257
|
+
await this.guard(async () => {
|
|
258
|
+
await this.pi.packages.removePackage(pkg.id);
|
|
259
|
+
await this.changed();
|
|
260
|
+
this.pi.ui.notify(ExtensionWords.fill(words.removed, { name: pkg.name }));
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
async setEnabled(pkg, enabled) {
|
|
265
|
+
this.store.patch(pkg.id, { enabled });
|
|
266
|
+
await this.guard(async () => {
|
|
267
|
+
await this.pi.packages.setPackageEnabled(pkg.id, enabled);
|
|
268
|
+
await this.changed();
|
|
269
|
+
this.pi.ui.notify(ExtensionWords.fill(enabled ? this.words.turnedOn : this.words.turnedOff, { name: pkg.name }));
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
async copySource(pkg) {
|
|
273
|
+
await this.guard(async () => {
|
|
274
|
+
await navigator.clipboard.writeText(pkg.source);
|
|
275
|
+
this.pi.ui.notify(ExtensionWords.fill(this.words.copied, { source: pkg.source }));
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
async importFile(file) {
|
|
279
|
+
const words = this.words;
|
|
280
|
+
if (!ExtensionsUtil.isArchive(file.name)) {
|
|
281
|
+
this.pi.ui.notify(words.notArchive, "warning");
|
|
282
|
+
return false;
|
|
283
|
+
}
|
|
284
|
+
return this.guard(async () => {
|
|
285
|
+
const data = ExtensionsUtil.toBase64(new Uint8Array(await file.arrayBuffer()));
|
|
286
|
+
let result = await this.pi.callHost("importPackage", data, false);
|
|
287
|
+
if (result.status === "exists") {
|
|
288
|
+
const replace = await this.pi.ui.confirm(ExtensionWords.fill(words.existsTitle, { name: result.name }), words.existsDetail, {
|
|
289
|
+
confirmLabel: words.replace,
|
|
290
|
+
danger: true
|
|
291
|
+
});
|
|
292
|
+
if (!replace) {
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
result = await this.pi.callHost("importPackage", data, true);
|
|
296
|
+
}
|
|
297
|
+
await this.changed();
|
|
298
|
+
this.pi.ui.notify(ExtensionWords.fill(words.imported, { name: result.name }));
|
|
299
|
+
return true;
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
async install(source) {
|
|
303
|
+
const trimmed = source.trim();
|
|
304
|
+
if (!trimmed) {
|
|
305
|
+
return false;
|
|
306
|
+
}
|
|
307
|
+
return this.guard(async () => {
|
|
308
|
+
await this.pi.packages.installPackage(trimmed, "user");
|
|
309
|
+
await this.changed();
|
|
310
|
+
this.pi.ui.notify(ExtensionWords.fill(this.words.installedOk, { name: trimmed }));
|
|
311
|
+
return true;
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
async changed() {
|
|
315
|
+
await this.pi.reloadExtensions();
|
|
316
|
+
await this.store.load();
|
|
317
|
+
}
|
|
318
|
+
async converse(text) {
|
|
319
|
+
await this.guard(async () => {
|
|
320
|
+
const { cwd } = await this.pi.server.getServerInfo();
|
|
321
|
+
const { sessionId } = await this.pi.server.openSession({ cwd });
|
|
322
|
+
await this.pi.switchSession(sessionId);
|
|
323
|
+
await this.pi.sendUserMessage(text);
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
async guard(action) {
|
|
327
|
+
try {
|
|
328
|
+
return await action();
|
|
329
|
+
} catch (error) {
|
|
330
|
+
this.pi.ui.notify(error instanceof Error ? error.message : String(error), "error");
|
|
331
|
+
await this.store.load();
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// web-src/react.ts
|
|
338
|
+
var React;
|
|
339
|
+
function bind(react) {
|
|
340
|
+
React = react;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// web-src/import-dialog.tsx
|
|
344
|
+
function ImportDialog({ pi, actions, onClose }) {
|
|
345
|
+
const words = actions.words;
|
|
346
|
+
const { Dialog, icons } = pi.ui;
|
|
347
|
+
const Upload = icons.Upload ?? icons.Download;
|
|
348
|
+
const input = React.useRef(null);
|
|
349
|
+
const [over, setOver] = React.useState(false);
|
|
350
|
+
const [busy, setBusy] = React.useState(false);
|
|
351
|
+
const [source, setSource] = React.useState("");
|
|
352
|
+
const run = async (action) => {
|
|
353
|
+
setBusy(true);
|
|
354
|
+
try {
|
|
355
|
+
if (await action()) {
|
|
356
|
+
onClose();
|
|
357
|
+
}
|
|
358
|
+
} finally {
|
|
359
|
+
setBusy(false);
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
const take = (file) => file && void run(() => actions.importFile(file));
|
|
363
|
+
return /* @__PURE__ */ React.createElement(Dialog, {
|
|
364
|
+
title: words.importTitle,
|
|
365
|
+
onClose
|
|
366
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
367
|
+
className: "tax-dialog"
|
|
368
|
+
}, /* @__PURE__ */ React.createElement("section", {
|
|
369
|
+
"aria-label": words.importTitle,
|
|
370
|
+
className: `tax-drop${over ? " tax-over" : ""}`,
|
|
371
|
+
onDragOver: (event) => {
|
|
372
|
+
event.preventDefault();
|
|
373
|
+
setOver(true);
|
|
374
|
+
},
|
|
375
|
+
onDragLeave: () => setOver(false),
|
|
376
|
+
onDrop: (event) => {
|
|
377
|
+
event.preventDefault();
|
|
378
|
+
setOver(false);
|
|
379
|
+
take(event.dataTransfer.files[0]);
|
|
380
|
+
}
|
|
381
|
+
}, Upload && /* @__PURE__ */ React.createElement(Upload, {
|
|
382
|
+
size: 22
|
|
383
|
+
}), /* @__PURE__ */ React.createElement("div", null, busy ? words.working : /* @__PURE__ */ React.createElement(React.Fragment, null, words.dropHere, " ", /* @__PURE__ */ React.createElement("button", {
|
|
384
|
+
type: "button",
|
|
385
|
+
className: "tax-link",
|
|
386
|
+
onClick: () => input.current?.click()
|
|
387
|
+
}, words.chooseFile))), /* @__PURE__ */ React.createElement("input", {
|
|
388
|
+
ref: input,
|
|
389
|
+
type: "file",
|
|
390
|
+
accept: ".tgz,.gz,application/gzip",
|
|
391
|
+
hidden: true,
|
|
392
|
+
onChange: (event) => {
|
|
393
|
+
take(event.target.files?.[0]);
|
|
394
|
+
event.target.value = "";
|
|
395
|
+
}
|
|
396
|
+
})), /* @__PURE__ */ React.createElement("div", {
|
|
397
|
+
className: "tax-or"
|
|
398
|
+
}, words.orSource), /* @__PURE__ */ React.createElement("form", {
|
|
399
|
+
className: "tax-source",
|
|
400
|
+
onSubmit: (event) => {
|
|
401
|
+
event.preventDefault();
|
|
402
|
+
run(() => actions.install(source));
|
|
403
|
+
}
|
|
404
|
+
}, /* @__PURE__ */ React.createElement("input", {
|
|
405
|
+
value: source,
|
|
406
|
+
placeholder: words.sourcePlaceholder,
|
|
407
|
+
spellCheck: false,
|
|
408
|
+
onChange: (event) => setSource(event.target.value)
|
|
409
|
+
}), /* @__PURE__ */ React.createElement("button", {
|
|
410
|
+
type: "submit",
|
|
411
|
+
className: "tax-button",
|
|
412
|
+
disabled: busy || !source.trim()
|
|
413
|
+
}, busy ? words.working : words.install)), /* @__PURE__ */ React.createElement("div", {
|
|
414
|
+
className: "tax-note"
|
|
415
|
+
}, words.trust)));
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// web-src/pictures.tsx
|
|
419
|
+
var Frame = () => /* @__PURE__ */ React.createElement("rect", {
|
|
420
|
+
className: "tax-pic-frame",
|
|
421
|
+
x: "1",
|
|
422
|
+
y: "1",
|
|
423
|
+
width: "158",
|
|
424
|
+
height: "94",
|
|
425
|
+
rx: "9"
|
|
426
|
+
});
|
|
427
|
+
var Line = ({ x, y, w }) => /* @__PURE__ */ React.createElement("rect", {
|
|
428
|
+
className: "tax-pic-line",
|
|
429
|
+
x,
|
|
430
|
+
y,
|
|
431
|
+
width: w,
|
|
432
|
+
height: "5",
|
|
433
|
+
rx: "2.5"
|
|
434
|
+
});
|
|
435
|
+
function Card() {
|
|
436
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Frame, null), /* @__PURE__ */ React.createElement(Line, {
|
|
437
|
+
x: 12,
|
|
438
|
+
y: 16,
|
|
439
|
+
w: 58
|
|
440
|
+
}), /* @__PURE__ */ React.createElement(Line, {
|
|
441
|
+
x: 12,
|
|
442
|
+
y: 27,
|
|
443
|
+
w: 74
|
|
444
|
+
}), /* @__PURE__ */ React.createElement(Line, {
|
|
445
|
+
x: 12,
|
|
446
|
+
y: 38,
|
|
447
|
+
w: 46
|
|
448
|
+
}), /* @__PURE__ */ React.createElement("rect", {
|
|
449
|
+
className: "tax-pic-pane",
|
|
450
|
+
x: "100",
|
|
451
|
+
y: "1",
|
|
452
|
+
width: "59",
|
|
453
|
+
height: "94"
|
|
454
|
+
}), /* @__PURE__ */ React.createElement("rect", {
|
|
455
|
+
className: "tax-pic-accent",
|
|
456
|
+
x: "108",
|
|
457
|
+
y: "14",
|
|
458
|
+
width: "43",
|
|
459
|
+
height: "38",
|
|
460
|
+
rx: "6"
|
|
461
|
+
}), /* @__PURE__ */ React.createElement("circle", {
|
|
462
|
+
className: "tax-pic-mark",
|
|
463
|
+
cx: "129.5",
|
|
464
|
+
cy: "33",
|
|
465
|
+
r: "10"
|
|
466
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
467
|
+
className: "tax-pic-hand",
|
|
468
|
+
d: "M129.5 27v6l4 3"
|
|
469
|
+
}), /* @__PURE__ */ React.createElement(Line, {
|
|
470
|
+
x: 108,
|
|
471
|
+
y: 62,
|
|
472
|
+
w: 34
|
|
473
|
+
}), /* @__PURE__ */ React.createElement("rect", {
|
|
474
|
+
className: "tax-pic-box",
|
|
475
|
+
x: "12",
|
|
476
|
+
y: "72",
|
|
477
|
+
width: "78",
|
|
478
|
+
height: "13",
|
|
479
|
+
rx: "6.5"
|
|
480
|
+
}));
|
|
481
|
+
}
|
|
482
|
+
function Page() {
|
|
483
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Frame, null), /* @__PURE__ */ React.createElement("rect", {
|
|
484
|
+
className: "tax-pic-pane",
|
|
485
|
+
x: "1",
|
|
486
|
+
y: "1",
|
|
487
|
+
width: "20",
|
|
488
|
+
height: "94"
|
|
489
|
+
}), /* @__PURE__ */ React.createElement("circle", {
|
|
490
|
+
className: "tax-pic-line",
|
|
491
|
+
cx: "11",
|
|
492
|
+
cy: "16",
|
|
493
|
+
r: "3.5"
|
|
494
|
+
}), /* @__PURE__ */ React.createElement("circle", {
|
|
495
|
+
className: "tax-pic-mark",
|
|
496
|
+
cx: "11",
|
|
497
|
+
cy: "30",
|
|
498
|
+
r: "3.5"
|
|
499
|
+
}), /* @__PURE__ */ React.createElement("circle", {
|
|
500
|
+
className: "tax-pic-line",
|
|
501
|
+
cx: "11",
|
|
502
|
+
cy: "44",
|
|
503
|
+
r: "3.5"
|
|
504
|
+
}), /* @__PURE__ */ React.createElement("rect", {
|
|
505
|
+
className: "tax-pic-accent",
|
|
506
|
+
x: "31",
|
|
507
|
+
y: "13",
|
|
508
|
+
width: "118",
|
|
509
|
+
height: "70",
|
|
510
|
+
rx: "6"
|
|
511
|
+
}), [18, 30, 24, 42, 34, 50].map((height, i) => /* @__PURE__ */ React.createElement("rect", {
|
|
512
|
+
key: height,
|
|
513
|
+
className: "tax-pic-mark",
|
|
514
|
+
x: 42 + i * 17,
|
|
515
|
+
y: 73 - height,
|
|
516
|
+
width: "9",
|
|
517
|
+
height,
|
|
518
|
+
rx: "2"
|
|
519
|
+
})));
|
|
520
|
+
}
|
|
521
|
+
function Command() {
|
|
522
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Frame, null), /* @__PURE__ */ React.createElement("rect", {
|
|
523
|
+
className: "tax-pic-line",
|
|
524
|
+
x: "70",
|
|
525
|
+
y: "12",
|
|
526
|
+
width: "76",
|
|
527
|
+
height: "14",
|
|
528
|
+
rx: "7"
|
|
529
|
+
}), /* @__PURE__ */ React.createElement(Line, {
|
|
530
|
+
x: 12,
|
|
531
|
+
y: 36,
|
|
532
|
+
w: 84
|
|
533
|
+
}), /* @__PURE__ */ React.createElement(Line, {
|
|
534
|
+
x: 12,
|
|
535
|
+
y: 47,
|
|
536
|
+
w: 60
|
|
537
|
+
}), /* @__PURE__ */ React.createElement("rect", {
|
|
538
|
+
className: "tax-pic-box",
|
|
539
|
+
x: "10",
|
|
540
|
+
y: "64",
|
|
541
|
+
width: "140",
|
|
542
|
+
height: "21",
|
|
543
|
+
rx: "10.5"
|
|
544
|
+
}), /* @__PURE__ */ React.createElement("rect", {
|
|
545
|
+
className: "tax-pic-accent",
|
|
546
|
+
x: "16",
|
|
547
|
+
y: "68.5",
|
|
548
|
+
width: "50",
|
|
549
|
+
height: "12",
|
|
550
|
+
rx: "6"
|
|
551
|
+
}), /* @__PURE__ */ React.createElement("text", {
|
|
552
|
+
className: "tax-pic-text",
|
|
553
|
+
x: "22",
|
|
554
|
+
y: "78"
|
|
555
|
+
}, "/standup"));
|
|
556
|
+
}
|
|
557
|
+
function Skill() {
|
|
558
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Frame, null), /* @__PURE__ */ React.createElement("rect", {
|
|
559
|
+
className: "tax-pic-line",
|
|
560
|
+
x: "74",
|
|
561
|
+
y: "12",
|
|
562
|
+
width: "72",
|
|
563
|
+
height: "14",
|
|
564
|
+
rx: "7"
|
|
565
|
+
}), /* @__PURE__ */ React.createElement("rect", {
|
|
566
|
+
className: "tax-pic-accent",
|
|
567
|
+
x: "12",
|
|
568
|
+
y: "34",
|
|
569
|
+
width: "96",
|
|
570
|
+
height: "30",
|
|
571
|
+
rx: "8"
|
|
572
|
+
}), /* @__PURE__ */ React.createElement("rect", {
|
|
573
|
+
className: "tax-pic-mark tax-pic-soft",
|
|
574
|
+
x: "20",
|
|
575
|
+
y: "42",
|
|
576
|
+
width: "58",
|
|
577
|
+
height: "5",
|
|
578
|
+
rx: "2.5"
|
|
579
|
+
}), /* @__PURE__ */ React.createElement("rect", {
|
|
580
|
+
className: "tax-pic-mark tax-pic-soft",
|
|
581
|
+
x: "20",
|
|
582
|
+
y: "51",
|
|
583
|
+
width: "40",
|
|
584
|
+
height: "5",
|
|
585
|
+
rx: "2.5"
|
|
586
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
587
|
+
className: "tax-pic-mark",
|
|
588
|
+
d: "M126 34l3.2 8.3 8.3 3.2-8.3 3.2-3.2 8.3-3.2-8.3-8.3-3.2 8.3-3.2z"
|
|
589
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
590
|
+
className: "tax-pic-mark tax-pic-soft",
|
|
591
|
+
d: "M141 60l1.6 4 4 1.6-4 1.6-1.6 4-1.6-4-4-1.6 4-1.6z"
|
|
592
|
+
}), /* @__PURE__ */ React.createElement("rect", {
|
|
593
|
+
className: "tax-pic-box",
|
|
594
|
+
x: "12",
|
|
595
|
+
y: "74",
|
|
596
|
+
width: "136",
|
|
597
|
+
height: "12",
|
|
598
|
+
rx: "6"
|
|
599
|
+
}));
|
|
600
|
+
}
|
|
601
|
+
var PICTURES = { card: Card, page: Page, command: Command, skill: Skill };
|
|
602
|
+
function KindPicture({ kind }) {
|
|
603
|
+
const Picture = PICTURES[kind];
|
|
604
|
+
return /* @__PURE__ */ React.createElement("svg", {
|
|
605
|
+
className: "tax-pic",
|
|
606
|
+
viewBox: "0 0 160 96",
|
|
607
|
+
"aria-hidden": "true"
|
|
608
|
+
}, /* @__PURE__ */ React.createElement(Picture, null));
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
// web-src/page.tsx
|
|
612
|
+
function icon(pi, name, fallback = "Square") {
|
|
613
|
+
return pi.ui.icons[name] ?? pi.ui.icons[fallback] ?? (() => null);
|
|
614
|
+
}
|
|
615
|
+
function ExtensionsPage({ context }) {
|
|
616
|
+
const { pi, store, actions, importing } = context;
|
|
617
|
+
const words = actions.words;
|
|
618
|
+
const { packages } = React.useSyncExternalStore((listener) => store.subscribe(listener), () => store.state);
|
|
619
|
+
const dialog = React.useSyncExternalStore((listener) => importing.subscribe(listener), () => importing.shown);
|
|
620
|
+
const [dragging, setDragging] = React.useState(false);
|
|
621
|
+
const [starting, setStarting] = React.useState(false);
|
|
622
|
+
React.useEffect(() => {
|
|
623
|
+
store.load();
|
|
624
|
+
}, [store]);
|
|
625
|
+
const groups = ExtensionsUtil.group(packages ?? []);
|
|
626
|
+
const Composer = pi.ui.Composer;
|
|
627
|
+
const Sparkles = icon(pi, "Sparkles");
|
|
628
|
+
const Upload = icon(pi, "Upload");
|
|
629
|
+
const make = async (text) => {
|
|
630
|
+
setStarting(true);
|
|
631
|
+
try {
|
|
632
|
+
await actions.make(text);
|
|
633
|
+
} finally {
|
|
634
|
+
setStarting(false);
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
const files = (event) => Array.from(event.dataTransfer.types).includes("Files");
|
|
638
|
+
return /* @__PURE__ */ React.createElement("section", {
|
|
639
|
+
"aria-label": words.title,
|
|
640
|
+
className: "tax-page",
|
|
641
|
+
onDragOver: (event) => {
|
|
642
|
+
if (files(event) && !dialog) {
|
|
643
|
+
event.preventDefault();
|
|
644
|
+
setDragging(true);
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
onDragLeave: (event) => {
|
|
648
|
+
if (event.currentTarget === event.target) {
|
|
649
|
+
setDragging(false);
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
onDrop: (event) => {
|
|
653
|
+
if (files(event) && !dialog) {
|
|
654
|
+
event.preventDefault();
|
|
655
|
+
setDragging(false);
|
|
656
|
+
const file = event.dataTransfer.files[0];
|
|
657
|
+
if (file) {
|
|
658
|
+
actions.importFile(file);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
663
|
+
className: "tax-body"
|
|
664
|
+
}, /* @__PURE__ */ React.createElement("section", {
|
|
665
|
+
className: "tax-hero"
|
|
666
|
+
}, /* @__PURE__ */ React.createElement("h1", null, /* @__PURE__ */ React.createElement(Sparkles, {
|
|
667
|
+
size: 20
|
|
668
|
+
}), " ", words.heroTitle), /* @__PURE__ */ React.createElement("p", null, words.heroText), /* @__PURE__ */ React.createElement(Composer, {
|
|
669
|
+
placeholder: words.placeholder,
|
|
670
|
+
onSend: make
|
|
671
|
+
}), /* @__PURE__ */ React.createElement("div", {
|
|
672
|
+
className: "tax-kinds"
|
|
673
|
+
}, words.examples.map((example) => /* @__PURE__ */ React.createElement("button", {
|
|
674
|
+
key: example.kind,
|
|
675
|
+
type: "button",
|
|
676
|
+
className: "tax-kind",
|
|
677
|
+
disabled: starting,
|
|
678
|
+
onClick: () => void make(example.text)
|
|
679
|
+
}, /* @__PURE__ */ React.createElement(KindPicture, {
|
|
680
|
+
kind: example.kind
|
|
681
|
+
}), /* @__PURE__ */ React.createElement("span", {
|
|
682
|
+
className: "tax-kind-label"
|
|
683
|
+
}, /* @__PURE__ */ React.createElement("strong", null, example.label), /* @__PURE__ */ React.createElement("span", null, example.example)))))), /* @__PURE__ */ React.createElement("section", {
|
|
684
|
+
className: "tax-section"
|
|
685
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
686
|
+
className: "tax-section-head"
|
|
687
|
+
}, /* @__PURE__ */ React.createElement("h2", null, words.mine, groups.mine.length > 0 && /* @__PURE__ */ React.createElement("span", {
|
|
688
|
+
className: "tax-count"
|
|
689
|
+
}, groups.mine.length)), /* @__PURE__ */ React.createElement("button", {
|
|
690
|
+
type: "button",
|
|
691
|
+
className: "tax-button",
|
|
692
|
+
onClick: () => importing.open()
|
|
693
|
+
}, /* @__PURE__ */ React.createElement(Upload, {
|
|
694
|
+
size: 14
|
|
695
|
+
}), " ", words.import)), packages === undefined ? /* @__PURE__ */ React.createElement("div", {
|
|
696
|
+
className: "tax-empty"
|
|
697
|
+
}, words.loading) : groups.mine.length === 0 ? /* @__PURE__ */ React.createElement("div", {
|
|
698
|
+
className: "tax-empty"
|
|
699
|
+
}, words.mineEmpty) : /* @__PURE__ */ React.createElement("div", {
|
|
700
|
+
className: "tax-list"
|
|
701
|
+
}, groups.mine.map((pkg) => /* @__PURE__ */ React.createElement(PackageRow, {
|
|
702
|
+
key: pkg.id,
|
|
703
|
+
pi,
|
|
704
|
+
actions,
|
|
705
|
+
pkg
|
|
706
|
+
})))), groups.installed.length > 0 && /* @__PURE__ */ React.createElement("section", {
|
|
707
|
+
className: "tax-section"
|
|
708
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
709
|
+
className: "tax-section-head"
|
|
710
|
+
}, /* @__PURE__ */ React.createElement("h2", null, words.installed, /* @__PURE__ */ React.createElement("span", {
|
|
711
|
+
className: "tax-count"
|
|
712
|
+
}, groups.installed.length))), /* @__PURE__ */ React.createElement("div", {
|
|
713
|
+
className: "tax-list"
|
|
714
|
+
}, groups.installed.map((pkg) => /* @__PURE__ */ React.createElement(PackageRow, {
|
|
715
|
+
key: pkg.id,
|
|
716
|
+
pi,
|
|
717
|
+
actions,
|
|
718
|
+
pkg
|
|
719
|
+
})))), /* @__PURE__ */ React.createElement("section", {
|
|
720
|
+
className: "tax-section"
|
|
721
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
722
|
+
className: "tax-section-head"
|
|
723
|
+
}, /* @__PURE__ */ React.createElement("h2", null, words.shareTitle)), /* @__PURE__ */ React.createElement(ShareSteps, {
|
|
724
|
+
pi,
|
|
725
|
+
actions
|
|
726
|
+
}))), dragging && /* @__PURE__ */ React.createElement("div", {
|
|
727
|
+
className: "tax-drop-overlay"
|
|
728
|
+
}, words.dropToImport), dialog && /* @__PURE__ */ React.createElement(ImportDialog, {
|
|
729
|
+
pi,
|
|
730
|
+
actions,
|
|
731
|
+
onClose: () => importing.close()
|
|
732
|
+
}));
|
|
733
|
+
}
|
|
734
|
+
function ShareSteps({ pi, actions }) {
|
|
735
|
+
const words = actions.words;
|
|
736
|
+
const steps = [icon(pi, "Download"), icon(pi, "FileArchive", "File"), icon(pi, "Upload")];
|
|
737
|
+
const Arrow = icon(pi, "ArrowRight");
|
|
738
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
739
|
+
className: "tax-share"
|
|
740
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
741
|
+
className: "tax-steps"
|
|
742
|
+
}, steps.map((Step, index) => /* @__PURE__ */ React.createElement(React.Fragment, {
|
|
743
|
+
key: words.shareSteps[index]
|
|
744
|
+
}, index > 0 && /* @__PURE__ */ React.createElement("span", {
|
|
745
|
+
className: "tax-step-arrow"
|
|
746
|
+
}, /* @__PURE__ */ React.createElement(Arrow, {
|
|
747
|
+
size: 16
|
|
748
|
+
})), /* @__PURE__ */ React.createElement("div", {
|
|
749
|
+
className: "tax-step"
|
|
750
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
751
|
+
className: "tax-step-icon"
|
|
752
|
+
}, /* @__PURE__ */ React.createElement(Step, {
|
|
753
|
+
size: 20
|
|
754
|
+
})), /* @__PURE__ */ React.createElement("span", null, words.shareSteps[index]))))), /* @__PURE__ */ React.createElement("div", {
|
|
755
|
+
className: "tax-note"
|
|
756
|
+
}, words.shareMore));
|
|
757
|
+
}
|
|
758
|
+
function PackageRow({ pi, actions, pkg }) {
|
|
759
|
+
const words = actions.words;
|
|
760
|
+
const mine = pkg.origin === "directory";
|
|
761
|
+
const Icon = icon(pi, mine ? "Puzzle" : "PackageOpen");
|
|
762
|
+
const tags = [...pkg.resources.map((type) => words.kinds[type]), ...pkg.scope === "project" ? [words.project] : []];
|
|
763
|
+
const buttons = mine ? [
|
|
764
|
+
{ key: "change", label: words.change, icon: "Pencil", run: () => actions.change(pkg) },
|
|
765
|
+
{ key: "export", label: words.export, icon: "Download", run: () => actions.exportPackage(pkg) },
|
|
766
|
+
{ key: "remove", label: words.remove, icon: "Trash2", danger: true, run: () => actions.remove(pkg) }
|
|
767
|
+
] : [
|
|
768
|
+
{ key: "copy", label: words.copySource, icon: "Copy", run: () => actions.copySource(pkg) },
|
|
769
|
+
{ key: "remove", label: words.remove, icon: "Trash2", danger: true, run: () => actions.remove(pkg) }
|
|
770
|
+
];
|
|
771
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
772
|
+
className: `tax-row${pkg.enabled ? "" : " tax-off"}`
|
|
773
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
774
|
+
className: "tax-icon"
|
|
775
|
+
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
776
|
+
size: 17
|
|
777
|
+
})), /* @__PURE__ */ React.createElement("div", {
|
|
778
|
+
className: "tax-main"
|
|
779
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
780
|
+
className: "tax-name"
|
|
781
|
+
}, /* @__PURE__ */ React.createElement("span", null, pkg.name), pkg.version && /* @__PURE__ */ React.createElement("span", {
|
|
782
|
+
className: "tax-version"
|
|
783
|
+
}, pkg.version), tags.map((tag) => /* @__PURE__ */ React.createElement("span", {
|
|
784
|
+
key: tag,
|
|
785
|
+
className: "tax-tag"
|
|
786
|
+
}, tag))), (pkg.description || !mine) && /* @__PURE__ */ React.createElement("div", {
|
|
787
|
+
className: "tax-description"
|
|
788
|
+
}, pkg.description || pkg.source)), /* @__PURE__ */ React.createElement("div", {
|
|
789
|
+
className: "tax-actions"
|
|
790
|
+
}, buttons.map((button) => {
|
|
791
|
+
const ButtonIcon = icon(pi, button.icon);
|
|
792
|
+
return /* @__PURE__ */ React.createElement("button", {
|
|
793
|
+
key: button.key,
|
|
794
|
+
type: "button",
|
|
795
|
+
className: `tax-action${button.danger ? " tax-danger" : ""}`,
|
|
796
|
+
title: button.label,
|
|
797
|
+
"aria-label": button.label,
|
|
798
|
+
onClick: () => void button.run()
|
|
799
|
+
}, /* @__PURE__ */ React.createElement(ButtonIcon, {
|
|
800
|
+
size: 15
|
|
801
|
+
}));
|
|
802
|
+
})), /* @__PURE__ */ React.createElement("input", {
|
|
803
|
+
type: "checkbox",
|
|
804
|
+
role: "switch",
|
|
805
|
+
className: "tax-switch",
|
|
806
|
+
"aria-label": ExtensionWords.fill(words.turnOn, { name: pkg.name }),
|
|
807
|
+
"aria-checked": pkg.enabled,
|
|
808
|
+
checked: pkg.enabled,
|
|
809
|
+
onChange: (event) => void actions.setEnabled(pkg, event.target.checked)
|
|
810
|
+
}));
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
// web-src/style.ts
|
|
814
|
+
var STYLE = `
|
|
815
|
+
.tax-page { --tax-accent: var(--ta-green); position: relative; height: 100%; overflow: auto; color: var(--ta-text); font-size: 13.5px; }
|
|
816
|
+
.tax-body { display: flex; flex-direction: column; gap: 32px; max-width: 760px; margin: 0 auto; padding: 44px 24px 56px; box-sizing: border-box; }
|
|
817
|
+
.tax-hero { display: flex; flex-direction: column; gap: 10px; }
|
|
818
|
+
.tax-hero h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
|
|
819
|
+
.tax-hero h1 svg { color: var(--tax-accent); }
|
|
820
|
+
.tax-hero > p { margin: 0 0 6px; color: var(--ta-muted); }
|
|
821
|
+
.tax-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
|
|
822
|
+
@media (max-width: 640px) { .tax-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
|
823
|
+
.tax-kind { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 10px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color 140ms, background 140ms, transform 140ms var(--ta-ease); }
|
|
824
|
+
.tax-kind:hover { border-color: color-mix(in srgb, var(--tax-accent) 55%, var(--ta-border)); background: var(--ta-hover); }
|
|
825
|
+
.tax-kind:hover .tax-pic-accent { fill: color-mix(in srgb, var(--tax-accent) 26%, transparent); }
|
|
826
|
+
.tax-kind:active { transform: scale(.98); }
|
|
827
|
+
.tax-kind:disabled { opacity: .55; cursor: default; }
|
|
828
|
+
.tax-kind-label { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 0 4px; min-width: 0; }
|
|
829
|
+
.tax-kind-label strong { font-size: 13px; font-weight: 600; }
|
|
830
|
+
.tax-kind-label span { overflow: hidden; color: var(--ta-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
|
|
831
|
+
.tax-pic { display: block; width: 100%; height: auto; border-radius: 8px; }
|
|
832
|
+
.tax-pic-frame { fill: var(--ta-raised); stroke: var(--ta-border-muted); stroke-width: 1; }
|
|
833
|
+
.tax-pic-pane { fill: var(--ta-hover); }
|
|
834
|
+
.tax-pic-line { fill: var(--ta-hover-strong); }
|
|
835
|
+
.tax-pic-box { fill: none; stroke: var(--ta-border); stroke-width: 1; }
|
|
836
|
+
.tax-pic-accent { fill: color-mix(in srgb, var(--tax-accent) 16%, transparent); stroke: color-mix(in srgb, var(--tax-accent) 70%, transparent); stroke-width: 1; transition: fill 140ms; }
|
|
837
|
+
.tax-pic-mark { fill: var(--tax-accent); }
|
|
838
|
+
.tax-pic-soft { opacity: .45; }
|
|
839
|
+
.tax-pic-hand { fill: none; stroke: var(--ta-raised); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
840
|
+
.tax-pic-text { fill: var(--tax-accent); font-family: var(--ta-mono); font-size: 8px; font-weight: 600; }
|
|
841
|
+
.tax-section { display: flex; flex-direction: column; gap: 8px; }
|
|
842
|
+
.tax-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
|
|
843
|
+
.tax-section-head h2 { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ta-secondary); font-size: 12.5px; font-weight: 600; }
|
|
844
|
+
.tax-count { padding: 0 6px; border-radius: 8px; background: var(--ta-chip); color: var(--ta-muted); font-size: 11px; font-weight: 500; line-height: 16px; }
|
|
845
|
+
.tax-button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--ta-border-muted); border-radius: 8px; background: var(--ta-raised); color: var(--ta-text); font: inherit; font-size: 13px; cursor: pointer; transition: background 120ms, border-color 120ms; }
|
|
846
|
+
.tax-button:hover { background: var(--ta-hover); border-color: var(--ta-border); }
|
|
847
|
+
.tax-button:disabled { opacity: .55; cursor: default; }
|
|
848
|
+
.tax-list { border: 1px solid var(--ta-border-muted); border-radius: 12px; overflow: hidden; }
|
|
849
|
+
.tax-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
|
|
850
|
+
.tax-row + .tax-row { border-top: 1px solid var(--ta-border-muted); }
|
|
851
|
+
.tax-row:hover { background: var(--ta-hover); }
|
|
852
|
+
.tax-row:hover .tax-icon, .tax-row:hover .tax-tag { background: var(--ta-hover-strong); }
|
|
853
|
+
.tax-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--ta-chip); color: var(--tax-accent); transition: color 160ms; }
|
|
854
|
+
.tax-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; transition: opacity 160ms; }
|
|
855
|
+
.tax-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; }
|
|
856
|
+
.tax-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
857
|
+
.tax-version { flex: none; color: var(--ta-muted); font-size: 12px; font-weight: 400; }
|
|
858
|
+
.tax-description { overflow: hidden; color: var(--ta-secondary); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
|
|
859
|
+
.tax-tag { flex: none; padding: 0 6px; border-radius: 5px; background: var(--ta-chip); color: var(--ta-muted); font-size: 11px; font-weight: 400; line-height: 17px; }
|
|
860
|
+
.tax-off .tax-main { opacity: .5; }
|
|
861
|
+
.tax-off .tax-icon { color: var(--ta-muted); }
|
|
862
|
+
.tax-actions { display: flex; gap: 2px; flex: none; opacity: 0; transition: opacity 120ms; }
|
|
863
|
+
.tax-row:hover .tax-actions, .tax-row:focus-within .tax-actions { opacity: 1; }
|
|
864
|
+
@media (hover: none) { .tax-actions { opacity: 1; } }
|
|
865
|
+
.tax-action { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--ta-muted); cursor: pointer; }
|
|
866
|
+
.tax-action:hover { background: var(--ta-hover-strong); color: var(--ta-text); }
|
|
867
|
+
.tax-action.tax-danger:hover { color: var(--ta-red); }
|
|
868
|
+
.tax-switch { appearance: none; -webkit-appearance: none; position: relative; width: 36px; height: 20px; flex: none; margin: 0 0 0 4px; border-radius: 10px; background: var(--ta-hover-strong); cursor: pointer; transition: background 160ms; }
|
|
869
|
+
.tax-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform 180ms var(--ta-ease); }
|
|
870
|
+
.tax-switch:checked { background: var(--ta-green); }
|
|
871
|
+
.tax-switch:checked::after { transform: translateX(16px); }
|
|
872
|
+
.tax-switch:focus-visible { outline: 2px solid var(--ta-border-focus); outline-offset: 2px; }
|
|
873
|
+
.tax-empty { padding: 16px; border: 1px dashed var(--ta-border-muted); border-radius: 12px; color: var(--ta-muted); text-align: center; }
|
|
874
|
+
.tax-share { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 16px 16px; border: 1px solid var(--ta-border-muted); border-radius: 12px; }
|
|
875
|
+
.tax-steps { display: flex; align-items: flex-start; justify-content: center; gap: 10px; width: 100%; }
|
|
876
|
+
.tax-step { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 120px; color: var(--ta-secondary); font-size: 12.5px; text-align: center; }
|
|
877
|
+
.tax-step-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--tax-accent) 12%, transparent); color: var(--tax-accent); }
|
|
878
|
+
.tax-step-arrow { display: inline-flex; align-items: center; height: 44px; color: var(--ta-muted); }
|
|
879
|
+
.tax-note { color: var(--ta-muted); font-size: 12.5px; }
|
|
880
|
+
.tax-note code { padding: 1px 5px; border-radius: 4px; background: var(--ta-code); font-family: var(--ta-mono); font-size: 12px; }
|
|
881
|
+
.tax-drop-overlay { position: absolute; inset: 12px; z-index: 5; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--ta-border-focus); border-radius: 16px; background: color-mix(in srgb, var(--ta-main) 85%, transparent); color: var(--ta-text); font-size: 15px; font-weight: 600; pointer-events: none; }
|
|
882
|
+
.tax-dialog { display: flex; flex-direction: column; gap: 14px; min-width: min(440px, 80vw); }
|
|
883
|
+
.tax-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border: 1.5px dashed var(--ta-border); border-radius: 12px; color: var(--ta-secondary); text-align: center; transition: border-color 120ms, background 120ms; }
|
|
884
|
+
.tax-drop.tax-over { border-color: var(--ta-border-focus); background: var(--ta-hover); }
|
|
885
|
+
.tax-drop svg { color: var(--ta-muted); }
|
|
886
|
+
.tax-link { padding: 0; border: 0; background: none; color: var(--ta-link); font: inherit; cursor: pointer; }
|
|
887
|
+
.tax-link:hover { text-decoration: underline; }
|
|
888
|
+
.tax-or { display: flex; align-items: center; gap: 10px; color: var(--ta-muted); font-size: 12px; }
|
|
889
|
+
.tax-or::before, .tax-or::after { content: ''; flex: 1; height: 1px; background: var(--ta-border-muted); }
|
|
890
|
+
.tax-source { display: flex; gap: 8px; }
|
|
891
|
+
.tax-source input { flex: 1; min-width: 0; height: 34px; padding: 0 11px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: var(--ta-input); color: var(--ta-text); font: inherit; font-size: 13px; outline: none; box-sizing: border-box; }
|
|
892
|
+
.tax-source input:focus { border-color: var(--ta-border-focus); }
|
|
893
|
+
.tax-source .tax-button { height: 34px; }
|
|
894
|
+
`;
|
|
895
|
+
function injectStyle() {
|
|
896
|
+
const style = document.createElement("style");
|
|
897
|
+
style.dataset.taPackage = "ta-extensions";
|
|
898
|
+
style.textContent = STYLE;
|
|
899
|
+
document.head.appendChild(style);
|
|
900
|
+
return () => style.remove();
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
// web-src/index.tsx
|
|
904
|
+
function activate(pi) {
|
|
905
|
+
bind(pi.React);
|
|
906
|
+
const removeStyle = injectStyle();
|
|
907
|
+
const store = new PackagesStore(pi);
|
|
908
|
+
const actions = new ExtensionActions(pi, store);
|
|
909
|
+
const listeners = new Set;
|
|
910
|
+
const importing = {
|
|
911
|
+
shown: false,
|
|
912
|
+
open: () => set(true),
|
|
913
|
+
close: () => set(false),
|
|
914
|
+
subscribe: (listener) => {
|
|
915
|
+
listeners.add(listener);
|
|
916
|
+
return () => listeners.delete(listener);
|
|
917
|
+
}
|
|
918
|
+
};
|
|
919
|
+
function set(shown) {
|
|
920
|
+
importing.shown = shown;
|
|
921
|
+
for (const listener of listeners) {
|
|
922
|
+
listener();
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
const context = { pi, store, actions, importing };
|
|
926
|
+
const Puzzle = pi.ui.icons.Puzzle ?? pi.ui.icons.Square;
|
|
927
|
+
pi.registerView("extensions", {
|
|
928
|
+
title: () => ExtensionWords.of(pi.ui.language).title,
|
|
929
|
+
icon: Puzzle,
|
|
930
|
+
render: () => /* @__PURE__ */ React.createElement(ExtensionsPage, {
|
|
931
|
+
context
|
|
932
|
+
}),
|
|
933
|
+
menu: () => [[{ key: "import", label: ExtensionWords.of(pi.ui.language).import, icon: pi.ui.icons.Upload, run: () => importing.open() }]],
|
|
934
|
+
order: 90
|
|
935
|
+
});
|
|
936
|
+
pi.on("agent_end", () => void store.load());
|
|
937
|
+
return removeStyle;
|
|
938
|
+
}
|
|
939
|
+
export {
|
|
940
|
+
activate as default
|
|
941
|
+
};
|