@wular/coder 0.3.18 → 0.4.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 +18 -16
- package/bin/coder.mjs +3 -1
- package/dist/actions-Mk3FSlpJ.js +20 -0
- package/dist/adapter-B0oYCI0S.js +1 -0
- package/dist/adapter-BKVzTDnn.js +1 -0
- package/dist/adapter-DPInwbJG.js +1 -0
- package/dist/adapter-DaiJMOYo.js +1 -0
- package/dist/adapter-PeKziOUg.js +1 -0
- package/dist/add-BxpLHnvD.js +1 -0
- package/dist/add-CE-70LFs.js +1 -0
- package/dist/add-U-pty9qJ.js +6 -0
- package/dist/add-ej0X9e3a.js +1 -0
- package/dist/add-json-CEa-6luW.js +1 -0
- package/dist/agent-BsYx3Odz.js +3 -0
- package/dist/agent-JdtZozvP.js +1 -0
- package/dist/alias-DX-Bm86x.js +2 -0
- package/dist/app-BT5f7zL5.js +1 -0
- package/dist/approvals-C-AvFt6s.js +2 -0
- package/dist/approve-DOmpQRNd.js +2 -0
- package/dist/apps-CjfrZyM5.js +1 -0
- package/dist/archive-BUB8gFKD.js +4 -0
- package/dist/archive-BziJ1rQ-.js +3 -0
- package/dist/archive-sweep-CtBcARgN.js +1 -0
- package/dist/args-BOEEdpWk.js +1 -0
- package/dist/ask-dE3U3ss2.js +4 -0
- package/dist/auth-BFny--17.js +1 -0
- package/dist/auth-DWHIzqbA.js +1 -0
- package/dist/builtin/coder/agent.json +24 -0
- package/dist/builtin/coder/system.md +17 -0
- package/dist/chat-3Znsevah.js +1 -0
- package/dist/chat-B_yhNTo0.js +13 -0
- package/dist/chat-bridge-BS9WtP3X.js +2 -0
- package/dist/cli-BilSDkvE.js +9 -0
- package/dist/cli.d.ts +71 -1
- package/dist/cli.js +1 -91
- package/dist/client-D9IoAuDD.js +1 -0
- package/dist/config-Da_cwoxI.js +3 -0
- package/dist/create-C_iMJV4Y.js +1 -0
- package/dist/credentials-B1jv6dkg.js +1 -0
- package/dist/dash/manifest.json +3427 -0
- package/dist/dash/public/assets/apple-touch-icon.png +0 -0
- package/dist/dash/public/assets/chunks/agent-pills-69c965aae1737cef.js +1 -0
- package/dist/dash/public/assets/chunks/agent-settings-form-a1ce70812eea3f20.js +1 -0
- package/dist/dash/public/assets/chunks/agents-grid-f62180478e43c192.js +1 -0
- package/dist/dash/public/assets/chunks/badge-d07f35e9abc80e14.js +1 -0
- package/dist/dash/public/assets/chunks/card-be04148b64223a52.js +1 -0
- package/dist/dash/public/assets/chunks/combo-32c321a7a84fa902.js +1 -0
- package/dist/dash/public/assets/chunks/composer-aec9c3c691f1f79a.js +1 -0
- package/dist/dash/public/assets/chunks/composer-data-6f7608fed13f3dd7.js +1 -0
- package/dist/dash/public/assets/chunks/composer-e56860d72742379e.js +1 -0
- package/dist/dash/public/assets/chunks/confirm-b4e2c16aef4b3431.js +1 -0
- package/dist/dash/public/assets/chunks/connect-apps-a5a63941e287c33f.js +1 -0
- package/dist/dash/public/assets/chunks/connect-repositories-e4c049b5b4384623.js +1 -0
- package/dist/dash/public/assets/chunks/credentials-list-2b7d0c771b89f9c5.js +2 -0
- package/dist/dash/public/assets/chunks/custom-range-53b70e0d9eeae84e.js +1 -0
- package/dist/dash/public/assets/chunks/editor-691d2bcecb1ecb87.js +7 -0
- package/dist/dash/public/assets/chunks/engines-list-a5fe1671601ce3b0.js +1 -0
- package/dist/dash/public/assets/chunks/field-9e12e5fc8774b6e5.js +1 -0
- package/dist/dash/public/assets/chunks/format-eb03fc9d9744d960.js +1 -0
- package/dist/dash/public/assets/chunks/heads-4041a925d63ab116.js +1 -0
- package/dist/dash/public/assets/chunks/instructions-4e0d18b9b40edbd7.js +2 -0
- package/dist/dash/public/assets/chunks/instructions-b00959bd4bb70502.js +1 -0
- package/dist/dash/public/assets/chunks/list-d7eb9e02cf261fbe.js +1 -0
- package/dist/dash/public/assets/chunks/mcp-list-a450533109045ef5.js +1 -0
- package/dist/dash/public/assets/chunks/model-options-15c53331a2f28a4f.js +1 -0
- package/dist/dash/public/assets/chunks/models-list-1e273c6843858148.js +1 -0
- package/dist/dash/public/assets/chunks/paged-bc6fa0c2b9d52ed7.js +1 -0
- package/dist/dash/public/assets/chunks/platform-actions-87f3f76ec1b840cb.js +1 -0
- package/dist/dash/public/assets/chunks/runners-list-fc7cdae4fa93e78b.js +1 -0
- package/dist/dash/public/assets/chunks/runtime-246221e985d863e5-1.js +2 -0
- package/dist/dash/public/assets/chunks/segmented-6091dfb2f954799f.js +1 -0
- package/dist/dash/public/assets/chunks/select-dd09a6b9544cfde2.js +1 -0
- package/dist/dash/public/assets/chunks/sentinel-ff7143a47fd22835.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-246221e985d863e5-2.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-8f2ac936c95a7f7b.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-986901c810947c12.js +5 -0
- package/dist/dash/public/assets/chunks/shared-init-baceed9fd2d43661.js +2 -0
- package/dist/dash/public/assets/chunks/tail-5a5bfcd308535d70.js +1 -0
- package/dist/dash/public/assets/chunks/task-actions-7919ca0e901131f4.js +1 -0
- package/dist/dash/public/assets/chunks/task-fa8b82e95e771c4a.js +1 -0
- package/dist/dash/public/assets/chunks/task-view-e8a0f99c992fa11e.js +3 -0
- package/dist/dash/public/assets/chunks/tasks-list-7b72f5b295349532.js +1 -0
- package/dist/dash/public/assets/chunks/toolbar-9b18a5d26dee37c3.js +1 -0
- package/dist/dash/public/assets/chunks/versions-list-8cdf3a41c56b2152.js +1 -0
- package/dist/dash/public/assets/chunks/wular-pnext-246221e985d863e5-0.js +1 -0
- package/dist/dash/public/assets/connect-382b1729a7ae7808.css +1 -0
- package/dist/dash/public/assets/dash-9e02d5d1a6d42ee3.css +1 -0
- package/dist/dash/public/assets/dash-account-04859899c1838ada.css +1 -0
- package/dist/dash/public/assets/dash-agents-9e678137267dec07.css +1 -0
- package/dist/dash/public/assets/dash-agents-new-26fa27b17ef9b8d8.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-b975c48f8abf3444.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-edit-e13fda599bb04843.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-platforms-70292932cb27bc96.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-settings-71f9a86251723fcc.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-tasks-fb8eb2ed71006601.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-usage-7c8740f1cdd52c71.css +1 -0
- package/dist/dash/public/assets/dash-settings-8eb818da462227e8.css +1 -0
- package/dist/dash/public/assets/dash-settings-param-tab-849a1a9542e273f5.css +1 -0
- package/dist/dash/public/assets/dash-tasks-81e510e0b6931b42.css +1 -0
- package/dist/dash/public/assets/dash-tasks-param-id-bbd2a83342f2ec10.css +1 -0
- package/dist/dash/public/assets/dash-usage-8e0259e03eaed1bd.css +1 -0
- package/dist/dash/public/assets/favicon.ico +0 -0
- package/dist/dash/public/assets/favicon.svg +1 -0
- package/dist/dash/public/assets/fonts/LICENSE-fira-code +93 -0
- package/dist/dash/public/assets/fonts/fira-code-latin-400-normal-717ee080.woff2 +0 -0
- package/dist/dash/public/assets/fonts/fira-code-latin-500-normal-530b6706.woff2 +0 -0
- package/dist/dash/public/assets/fonts/fira-code-latin-700-normal-98730669.woff2 +0 -0
- package/dist/dash/public/assets/global-d2adbf01910d9df5.css +1 -0
- package/dist/dash/public/assets/login-c129b1ce237be260.css +1 -0
- package/dist/dash/public/assets/pnext-client-073464b8f422ef57.js +1 -0
- package/dist/dash/public/assets/pnext-client-0b6720fdec66eeb0.js +1 -0
- package/dist/dash/public/assets/pnext-client-1e9cb2f4f6387a87.js +1 -0
- package/dist/dash/public/assets/pnext-client-2f0e78dd006fed0f.js +1 -0
- package/dist/dash/public/assets/pnext-client-3c62e2aa2cbe9fe1.js +1 -0
- package/dist/dash/public/assets/pnext-client-43a88896ed42dd39.js +1 -0
- package/dist/dash/public/assets/pnext-client-4cf2e27d0b9c0365.js +1 -0
- package/dist/dash/public/assets/pnext-client-587008fa987d3073.js +1 -0
- package/dist/dash/public/assets/pnext-client-676360cc86f31573.js +1 -0
- package/dist/dash/public/assets/pnext-client-813427605f424145.js +1 -0
- package/dist/dash/public/assets/pnext-client-82de7cf6dfc35b98.js +1 -0
- package/dist/dash/public/assets/pnext-client-831e8004c09f0b5b.js +1 -0
- package/dist/dash/public/assets/pnext-client-9b557fe468a45ca3.js +1 -0
- package/dist/dash/public/assets/pnext-client-ab7c900c802fe827.js +1 -0
- package/dist/dash/public/assets/pnext-client-d87d00e402811f0c.js +1 -0
- package/dist/dash/public/assets/pnext-client-fbdb7c1da7eda7e5.js +1 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/boot-B2MFTRO2.js +28 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/build-tier-XJJSL5FR.js +2702 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2HFY3DQT.js +206 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2ICEVELW.js +832 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-3UPROT2C.js +33 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4P5CMIYT.js +1580 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4TKZKZ3Q.js +129 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-5RDEILQB.js +435 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-62KEQM43.js +23 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-6KQSWT6D.js +829 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-7DCNCW6O.js +722 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-B4THCTQP.js +20 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-C2LIV2MM.js +170 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-CCATPVTW.js +376 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-COXJAPTU.js +87 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-E6IXL2NJ.js +6268 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FLGRBFAH.js +1196 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FTJVHFWD.js +59 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-H523KSIH.js +5149 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-HT6KKX6A.js +18 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JESFYECC.js +436 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JRPJM2XY.js +15 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L2IWDUXG.js +105 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L5P4Y4UC.js +181 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-NQE46AZN.js +645 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PA4QEARJ.js +127 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PZ5AXOLW.js +7144 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-SNVPTULL.js +2395 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-T3QZT3PG.js +218 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-VC5O2SDP.js +70 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-WZX4V6CM.js +229 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-XUUIDXY5.js +625 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-ZHFDO3PR.js +263 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/compile-CE2DN7ZA.js +16 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-UREY7XJT.js +14 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-loader-UI2XE3PZ.js +15 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/entry.js +217 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/generate-I2PPTDFD.js +14 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/modules-UVOCE4C2.js +46 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/pipeline-UW47K537.js +961 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/proxy-ITGOVJBW.js +24 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/register-4SA55SWT.js +12577 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/router-JNKHLBCZ.js +503 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/routes-PD6J2NXW.js +52 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/tsconfig-defaults-ZXEH7RQK.js +13 -0
- package/dist/default-Bobztoxf.js +1 -0
- package/dist/default-vYPT26DR.js +1 -0
- package/dist/delete-D8gEwoOj.js +4 -0
- package/dist/delete-z1_86nf6.js +2 -0
- package/dist/disable-DVKd-0Xb.js +1 -0
- package/dist/discover-Df-a8K4R.js +3 -0
- package/dist/discover-Dvr_3_Xr.js +1 -0
- package/dist/dispatch-BKeAch9E.js +14 -0
- package/dist/docs-BX65z2Iu.js +2 -0
- package/dist/docs-DKJnqZqt.js +2 -0
- package/dist/enable-C8Zf_wpN.js +1 -0
- package/dist/env-CRf6wkM2.js +1 -0
- package/dist/exec-RZFLclKX.js +11 -0
- package/dist/executor-BvAA7Cgw.js +10 -0
- package/dist/flow/builtin/review.d.ts +157 -0
- package/dist/flow/builtin/review.js +19 -0
- package/dist/flow/index.d.ts +1 -1
- package/dist/flow/index.js +1 -1
- package/dist/flow-17k25MHt.js +1 -0
- package/dist/github-actions-DwUzm4hC.js +24 -0
- package/dist/http-Bkg_OQ6r.js +1 -0
- package/dist/{index-BQ-b77or.d.ts → index-DT7EST00.d.ts} +116 -238
- package/dist/init-CoMfFxbG.js +1 -0
- package/dist/integrations-5xCaXSd-.js +1 -0
- package/dist/integrations-BAgdVDhj.js +5 -0
- package/dist/lib/broker.js +3 -3
- package/dist/list-BAKvxSbh.js +4 -0
- package/dist/list-BYiG8Zav.js +2 -0
- package/dist/list-BxEywhHU.js +1 -0
- package/dist/list-C5w01-8q.js +1 -0
- package/dist/list-CIW2joV1.js +1 -0
- package/dist/list-DX-z3SBp.js +3 -0
- package/dist/list-DpCf4G-H.js +4 -0
- package/dist/list-VToARh3C.js +1 -0
- package/dist/load-BpEsAn51.js +2 -0
- package/dist/local-H3uvqEbq.js +1 -0
- package/dist/log-view-dg0TlKLA.js +1 -0
- package/dist/login-BFxX4jJy.js +1 -0
- package/dist/login-DkkslfBx.js +1 -0
- package/dist/logout-BHAtw4Z8.js +1 -0
- package/dist/maintenance-C5FklUw3.js +1 -0
- package/dist/match-CXAjDhg7.js +1 -0
- package/dist/mcp-BgKb2Cdk.js +1 -0
- package/dist/mcp-CCZOAo06.js +1 -0
- package/dist/mcp-server-DGzme0YX.js +1 -0
- package/dist/migrate-C4vM7DQN.js +2 -0
- package/dist/migrate-N-85_N7J.js +1 -0
- package/dist/model-Bs1StDo3.js +1 -0
- package/dist/models-_5LVGC3m.js +1 -0
- package/dist/output-BKeyLbvt.js +5 -0
- package/dist/prompt-CEuBMNhk.js +7 -0
- package/dist/push-CUC55Bqd.js +1 -0
- package/dist/queue-6io_NOP3.js +116 -0
- package/dist/refresh-BIrmrWYq.js +1 -0
- package/dist/remote-miQNTVRa.js +1 -0
- package/dist/remove-B93LNkZI.js +1 -0
- package/dist/remove-C5_xggx7.js +1 -0
- package/dist/remove-CuH8a3L9.js +1 -0
- package/dist/remove-eQ8y5C5p.js +1 -0
- package/dist/rename-CYfy03FE.js +1 -0
- package/dist/result-BEtQZHaY.js +5 -0
- package/dist/result-BzaM3inj.js +15 -0
- package/dist/resume-DYzKvyEw.js +3 -0
- package/dist/review-oIBeECZE.js +7 -0
- package/dist/rolldown-runtime-DT7IzrpZ.js +1 -0
- package/dist/rotate-key-IdMYH7gg.js +1 -0
- package/dist/run-BDYl0CKl.js +2 -0
- package/dist/run-CTtd0Znc.js +5 -0
- package/dist/run-CawRGnOg.js +2 -0
- package/dist/runner-D7ScbIHJ.js +1 -0
- package/dist/runner-sUpWJ_k0.js +1 -0
- package/dist/schema-CU2iFkp8.js +1 -0
- package/dist/sdk.d.ts +1166 -191
- package/dist/sdk.js +1 -1
- package/dist/serve-BTeomYxW.js +1 -0
- package/dist/serve-CE8YV2e9.js +1 -0
- package/dist/serve-CPnmrKyf.js +2 -0
- package/dist/serve-CQKZxzFE.js +4 -0
- package/dist/serve-GmRO89s5.js +12 -0
- package/dist/server-Kb22cWfF.js +1 -0
- package/dist/setup-host-GFTUzzZJ.js +6 -0
- package/dist/shared-DVtzWhUT.js +1 -0
- package/dist/show-CMUg8SJu.js +1 -0
- package/dist/show-COTZEYgc.js +1 -0
- package/dist/status-D26U--p8.js +1 -0
- package/dist/steer-C6uARLp5.js +4 -0
- package/dist/stop-BrGI3hSS.js +1 -0
- package/dist/stop-ByCAlbmN.js +3 -0
- package/dist/store-B94tSate.js +42 -0
- package/dist/store-DzqXS2wT.js +8 -0
- package/dist/task-C6VAg5WU.js +1 -0
- package/dist/task-CgOKgkEG.js +1 -0
- package/dist/task-DeglY79z.js +5 -0
- package/dist/test-NEbhlxvo.js +1 -0
- package/dist/tools-D0Zfs8Hx.js +1 -0
- package/dist/types-D0q15RJa.js +1 -0
- package/dist/types-Dve7Z0ZP.d.ts +389 -0
- package/dist/unalias-C9NqmSDq.js +1 -0
- package/dist/update-BTxYQj7Z.js +2 -0
- package/dist/upgrade-hA0yWBvx.js +2 -0
- package/dist/usage-BhqoCjvE.js +1 -0
- package/dist/usage-C4d9X2Uq.js +1 -0
- package/dist/watch-CSdj24ct.js +5 -0
- package/dist/watch-DtRuC0Wc.js +8 -0
- package/dist/wire-BeT1Axeo.js +1 -0
- package/dist/worker-CXndxmGF.js +9 -0
- package/dist/worker-DX7P9kWl.js +1 -0
- package/dist/workflow-Dcmdooi8.js +1 -0
- package/docs/agents/coder.md +26 -0
- package/docs/agents/index.md +120 -0
- package/docs/config.md +51 -30
- package/docs/dash.md +64 -0
- package/docs/flows.md +20 -15
- package/docs/mcp.md +62 -0
- package/docs/models.md +41 -23
- package/docs/review.md +41 -0
- package/docs/sdk.md +57 -38
- package/docs/self-host.md +188 -0
- package/migrations/0000_initial.sql +252 -0
- package/migrations/meta/0000_snapshot.json +1787 -0
- package/migrations/meta/_journal.json +13 -0
- package/package.json +37 -7
- package/plugins/agents/skills/coder/SKILL.md +14 -60
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/setup.md +2 -2
- package/plugins/claude/skills/dispatch/SKILL.md +14 -58
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/README.md +5 -5
- package/plugins/cursor/assets/logo.png +0 -0
- package/plugins/cursor/skills/coder/SKILL.md +14 -59
- package/src/client/index.ts +573 -0
- package/src/client/types.ts +506 -0
- package/src/core/errors.ts +72 -0
- package/src/core/task/log-view.ts +173 -0
- package/src/server/auth/sign-in.ts +14 -0
- package/src/server/dash/api/load.ts +62 -0
- package/src/server/dash/api/types.ts +11 -0
- package/src/server/dash/app/connect/page.tsx +42 -0
- package/src/server/dash/app/dash/account/loading.tsx +11 -0
- package/src/server/dash/app/dash/account/notify.tsx +42 -0
- package/src/server/dash/app/dash/account/page.css +81 -0
- package/src/server/dash/app/dash/account/page.tsx +126 -0
- package/src/server/dash/app/dash/account/sign-out.tsx +24 -0
- package/src/server/dash/app/dash/agents/(list)/agent-menu.tsx +10 -0
- package/src/server/dash/app/dash/agents/(list)/agents-grid.tsx +143 -0
- package/src/server/dash/app/dash/agents/(list)/connect-apps.tsx +46 -0
- package/src/server/dash/app/dash/agents/(list)/loading.tsx +14 -0
- package/src/server/dash/app/dash/agents/(list)/page.css +72 -0
- package/src/server/dash/app/dash/agents/(list)/page.tsx +89 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/layout.tsx +135 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/loading.tsx +5 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/page.css +21 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/page.tsx +173 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/loading.tsx +18 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/page.css +87 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/page.tsx +258 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/platform-actions.tsx +111 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/agent-settings-form.css +114 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/agent-settings-form.tsx +294 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/loading.tsx +5 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/page.tsx +54 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/tasks/loading.tsx +5 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/tasks/page.tsx +14 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/loading.tsx +31 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/page.css +12 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/page.tsx +163 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/versions-list.tsx +53 -0
- package/src/server/dash/app/dash/agents/[slug]/edit/loading.tsx +31 -0
- package/src/server/dash/app/dash/agents/[slug]/edit/page.tsx +91 -0
- package/src/server/dash/app/dash/agents/agent/agent-pills.css +27 -0
- package/src/server/dash/app/dash/agents/agent/agent-pills.tsx +133 -0
- package/src/server/dash/app/dash/agents/agent/hero.css +40 -0
- package/src/server/dash/app/dash/agents/agent/hero.tsx +60 -0
- package/src/server/dash/app/dash/agents/agent/instructions.css +29 -0
- package/src/server/dash/app/dash/agents/agent/instructions.tsx +82 -0
- package/src/server/dash/app/dash/agents/editor/connect-repositories.ts +16 -0
- package/src/server/dash/app/dash/agents/editor/editor.css +263 -0
- package/src/server/dash/app/dash/agents/editor/editor.tsx +774 -0
- package/src/server/dash/app/dash/agents/editor/import-picker.css +48 -0
- package/src/server/dash/app/dash/agents/editor/import-picker.tsx +253 -0
- package/src/server/dash/app/dash/agents/editor/names.ts +35 -0
- package/src/server/dash/app/dash/agents/new/loading.tsx +25 -0
- package/src/server/dash/app/dash/agents/new/page.tsx +72 -0
- package/src/server/dash/app/dash/layout.css +265 -0
- package/src/server/dash/app/dash/layout.tsx +332 -0
- package/src/server/dash/app/dash/page.tsx +14 -0
- package/src/server/dash/app/dash/settings/[tab]/credentials-list.css +94 -0
- package/src/server/dash/app/dash/settings/[tab]/credentials-list.tsx +619 -0
- package/src/server/dash/app/dash/settings/[tab]/credentials.tsx +36 -0
- package/src/server/dash/app/dash/settings/[tab]/engines-list.css +16 -0
- package/src/server/dash/app/dash/settings/[tab]/engines-list.tsx +135 -0
- package/src/server/dash/app/dash/settings/[tab]/list.css +98 -0
- package/src/server/dash/app/dash/settings/[tab]/list.tsx +215 -0
- package/src/server/dash/app/dash/settings/[tab]/loading.tsx +6 -0
- package/src/server/dash/app/dash/settings/[tab]/mcp-list.css +43 -0
- package/src/server/dash/app/dash/settings/[tab]/mcp-list.tsx +290 -0
- package/src/server/dash/app/dash/settings/[tab]/models-list.tsx +513 -0
- package/src/server/dash/app/dash/settings/[tab]/page.tsx +89 -0
- package/src/server/dash/app/dash/settings/[tab]/runners-list.css +153 -0
- package/src/server/dash/app/dash/settings/[tab]/runners-list.tsx +457 -0
- package/src/server/dash/app/dash/settings/layout.tsx +50 -0
- package/src/server/dash/app/dash/settings/model-options.ts +117 -0
- package/src/server/dash/app/dash/settings/page.tsx +7 -0
- package/src/server/dash/app/dash/settings/settings-head.tsx +24 -0
- package/src/server/dash/app/dash/settings/tunnel-guide.tsx +28 -0
- package/src/server/dash/app/dash/tasks/[id]/activity.tsx +202 -0
- package/src/server/dash/app/dash/tasks/[id]/loading.tsx +31 -0
- package/src/server/dash/app/dash/tasks/[id]/page.tsx +30 -0
- package/src/server/dash/app/dash/tasks/[id]/task-actions.tsx +164 -0
- package/src/server/dash/app/dash/tasks/[id]/task-view.css +407 -0
- package/src/server/dash/app/dash/tasks/[id]/task-view.tsx +513 -0
- package/src/server/dash/app/dash/tasks/composer-data.ts +96 -0
- package/src/server/dash/app/dash/tasks/composer.css +316 -0
- package/src/server/dash/app/dash/tasks/composer.tsx +890 -0
- package/src/server/dash/app/dash/tasks/list/status.css +50 -0
- package/src/server/dash/app/dash/tasks/list/status.tsx +20 -0
- package/src/server/dash/app/dash/tasks/list/task.ts +45 -0
- package/src/server/dash/app/dash/tasks/list/tasks-list.css +85 -0
- package/src/server/dash/app/dash/tasks/list/tasks-list.tsx +402 -0
- package/src/server/dash/app/dash/tasks/list/tasks-section.tsx +96 -0
- package/src/server/dash/app/dash/tasks/page.tsx +53 -0
- package/src/server/dash/app/dash/token-from-hash.tsx +17 -0
- package/src/server/dash/app/dash/usage/custom-range.tsx +63 -0
- package/src/server/dash/app/dash/usage/day-chart.css +109 -0
- package/src/server/dash/app/dash/usage/day-chart.tsx +110 -0
- package/src/server/dash/app/dash/usage/loading.tsx +17 -0
- package/src/server/dash/app/dash/usage/metric.ts +13 -0
- package/src/server/dash/app/dash/usage/page.tsx +117 -0
- package/src/server/dash/app/dash/usage/range-bar.css +13 -0
- package/src/server/dash/app/dash/usage/range-bar.tsx +69 -0
- package/src/server/dash/app/dash/usage/stats.css +52 -0
- package/src/server/dash/app/dash/usage/stats.tsx +19 -0
- package/src/server/dash/app/dash/usage/top-agents.css +40 -0
- package/src/server/dash/app/dash/usage/top-agents.tsx +138 -0
- package/src/server/dash/app/dash/usage/usage.css +0 -0
- package/src/server/dash/app/globals.css +692 -0
- package/src/server/dash/app/layout.tsx +52 -0
- package/src/server/dash/app/login/page.css +26 -0
- package/src/server/dash/app/login/page.tsx +57 -0
- package/src/server/dash/app/page.tsx +5 -0
- package/src/server/dash/app/responsive.css +49 -0
- package/src/server/dash/app/zone.tsx +13 -0
- package/src/server/dash/comps/frame/auth-panel.css +60 -0
- package/src/server/dash/comps/frame/auth-panel.tsx +44 -0
- package/src/server/dash/comps/frame/drawer.css +28 -0
- package/src/server/dash/comps/frame/drawer.tsx +39 -0
- package/src/server/dash/comps/frame/heads.ts +41 -0
- package/src/server/dash/comps/frame/loading-card.tsx +65 -0
- package/src/server/dash/comps/frame/page-head.css +83 -0
- package/src/server/dash/comps/frame/page-head.tsx +71 -0
- package/src/server/dash/comps/frame/stream.tsx +50 -0
- package/src/server/dash/comps/frame/task-toasts.tsx +214 -0
- package/src/server/dash/comps/frame/theme-choices.tsx +46 -0
- package/src/server/dash/comps/nav/current-link.tsx +53 -0
- package/src/server/dash/comps/nav/side-toggle.tsx +30 -0
- package/src/server/dash/comps/nav/to.ts +22 -0
- package/src/server/dash/comps/ui/badge.css +64 -0
- package/src/server/dash/comps/ui/badge.tsx +41 -0
- package/src/server/dash/comps/ui/card.css +93 -0
- package/src/server/dash/comps/ui/card.tsx +77 -0
- package/src/server/dash/comps/ui/collapse.css +32 -0
- package/src/server/dash/comps/ui/collapse.tsx +49 -0
- package/src/server/dash/comps/ui/combo.tsx +154 -0
- package/src/server/dash/comps/ui/confirm.css +36 -0
- package/src/server/dash/comps/ui/confirm.tsx +67 -0
- package/src/server/dash/comps/ui/field.css +25 -0
- package/src/server/dash/comps/ui/field.tsx +34 -0
- package/src/server/dash/comps/ui/icon.css +22 -0
- package/src/server/dash/comps/ui/icon.tsx +17 -0
- package/src/server/dash/comps/ui/icons.ts +44 -0
- package/src/server/dash/comps/ui/menu.css +178 -0
- package/src/server/dash/comps/ui/menu.tsx +152 -0
- package/src/server/dash/comps/ui/segmented.css +44 -0
- package/src/server/dash/comps/ui/segmented.tsx +58 -0
- package/src/server/dash/comps/ui/select.css +103 -0
- package/src/server/dash/comps/ui/select.tsx +250 -0
- package/src/server/dash/comps/ui/sentinel.css +58 -0
- package/src/server/dash/comps/ui/sentinel.tsx +67 -0
- package/src/server/dash/comps/ui/tabs.css +81 -0
- package/src/server/dash/comps/ui/tabs.tsx +32 -0
- package/src/server/dash/comps/ui/tail.css +12 -0
- package/src/server/dash/comps/ui/tail.tsx +37 -0
- package/src/server/dash/comps/ui/toast.css +72 -0
- package/src/server/dash/comps/ui/toolbar.css +143 -0
- package/src/server/dash/comps/ui/toolbar.tsx +93 -0
- package/src/server/dash/package.json +5 -0
- package/src/server/dash/pnext-env.d.ts +4 -0
- package/src/server/dash/pnext.config.ts +5 -0
- package/src/server/dash/public/assets/apple-touch-icon.png +0 -0
- package/src/server/dash/public/assets/favicon.ico +0 -0
- package/src/server/dash/public/assets/favicon.svg +1 -0
- package/src/server/dash/public/assets/fonts/LICENSE-fira-code +93 -0
- package/src/server/dash/public/assets/fonts/fira-code-latin-400-normal-717ee080.woff2 +0 -0
- package/src/server/dash/public/assets/fonts/fira-code-latin-500-normal-530b6706.woff2 +0 -0
- package/src/server/dash/public/assets/fonts/fira-code-latin-700-normal-98730669.woff2 +0 -0
- package/src/server/dash/tsconfig.json +10 -0
- package/src/server/dash/utils/client.ts +19 -0
- package/src/server/dash/utils/format.ts +75 -0
- package/src/server/dash/utils/paged.ts +184 -0
- package/src/server/dash/utils/range.ts +117 -0
- package/dist/app-server-CW93J9zJ.js +0 -3
- package/dist/runtime-D-U1DNkI.js +0 -26
- package/dist/upgrade-DOj06r5b.js +0 -37
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import './collapse.css';
|
|
4
|
+
|
|
5
|
+
import type { ComponentChildren } from 'preact';
|
|
6
|
+
import { useLayoutEffect, useRef, useState } from 'preact/hooks';
|
|
7
|
+
|
|
8
|
+
/** Long content cut to its first `lines` lines under a fade, with a Show more toggle. */
|
|
9
|
+
export function Collapse({
|
|
10
|
+
lines = 10,
|
|
11
|
+
class: cls,
|
|
12
|
+
children,
|
|
13
|
+
}: {
|
|
14
|
+
lines?: number;
|
|
15
|
+
/** The content box's own class, as `body md`. */
|
|
16
|
+
class?: string;
|
|
17
|
+
children: ComponentChildren;
|
|
18
|
+
}) {
|
|
19
|
+
const box = useRef<HTMLDivElement>(null);
|
|
20
|
+
const [long, setLong] = useState(false);
|
|
21
|
+
const [open, setOpen] = useState(false);
|
|
22
|
+
|
|
23
|
+
useLayoutEffect(() => {
|
|
24
|
+
const el = box.current!;
|
|
25
|
+
const measure = () => setLong(open || el.scrollHeight > el.clientHeight + 1);
|
|
26
|
+
measure();
|
|
27
|
+
const observer = new ResizeObserver(measure);
|
|
28
|
+
observer.observe(el);
|
|
29
|
+
return () => observer.disconnect();
|
|
30
|
+
}, [children, open]);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div class={`collapse${long ? ' long' : ''}${open ? ' open' : ''}`} style={`--lines:${lines}`}>
|
|
34
|
+
<div class={cls ? `collapse-box ${cls}` : 'collapse-box'} ref={box}>
|
|
35
|
+
{children}
|
|
36
|
+
</div>
|
|
37
|
+
{long ? (
|
|
38
|
+
<button
|
|
39
|
+
type="button"
|
|
40
|
+
class="btn ghost sm more-toggle"
|
|
41
|
+
aria-expanded={open}
|
|
42
|
+
onClick={() => setOpen(!open)}
|
|
43
|
+
>
|
|
44
|
+
{open ? 'Show less' : 'Show more'}
|
|
45
|
+
</button>
|
|
46
|
+
) : null}
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { useId, useLayoutEffect, useRef, useState } from 'preact/hooks';
|
|
2
|
+
|
|
3
|
+
import { Icon } from './icon';
|
|
4
|
+
import { iCheck } from './icons';
|
|
5
|
+
|
|
6
|
+
const SHOWN = 50;
|
|
7
|
+
|
|
8
|
+
/** A text input with suggestions under it, filtered as you type; any text is still a value. */
|
|
9
|
+
export function Combo({
|
|
10
|
+
label,
|
|
11
|
+
name,
|
|
12
|
+
class: className,
|
|
13
|
+
options,
|
|
14
|
+
placeholder,
|
|
15
|
+
value,
|
|
16
|
+
onChange,
|
|
17
|
+
onOpen,
|
|
18
|
+
}: {
|
|
19
|
+
label: string;
|
|
20
|
+
name: string;
|
|
21
|
+
class?: string;
|
|
22
|
+
/** Called when the field is focused or clicked, so a caller can fetch its options on demand. */
|
|
23
|
+
onOpen?: () => void;
|
|
24
|
+
options: string[];
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
value: string;
|
|
27
|
+
onChange: (value: string) => void;
|
|
28
|
+
}) {
|
|
29
|
+
const [open, setOpen] = useState(false);
|
|
30
|
+
// Only text typed since opening filters; opening on a picked value shows every option.
|
|
31
|
+
const [typed, setTyped] = useState(false);
|
|
32
|
+
const [active, setActive] = useState(0);
|
|
33
|
+
const [place, setPlace] = useState('');
|
|
34
|
+
const input = useRef<HTMLInputElement>(null);
|
|
35
|
+
const list = useRef<HTMLDivElement>(null);
|
|
36
|
+
const id = useId();
|
|
37
|
+
const query = typed ? value.trim().toLowerCase() : '';
|
|
38
|
+
const shown = (
|
|
39
|
+
query ? options.filter(option => option.toLowerCase().includes(query)) : options
|
|
40
|
+
).slice(0, SHOWN);
|
|
41
|
+
const listed = open && shown.length > 0;
|
|
42
|
+
|
|
43
|
+
const pick = (index: number) => {
|
|
44
|
+
const picked = shown[index];
|
|
45
|
+
if (picked) onChange(picked);
|
|
46
|
+
setOpen(false);
|
|
47
|
+
setTyped(false);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
useLayoutEffect(() => {
|
|
51
|
+
if (!listed) return;
|
|
52
|
+
list.current?.showPopover();
|
|
53
|
+
const position = () => {
|
|
54
|
+
const box = input.current?.getBoundingClientRect();
|
|
55
|
+
const menu = list.current;
|
|
56
|
+
if (!box || !menu) return;
|
|
57
|
+
const below = innerHeight - box.bottom - 12;
|
|
58
|
+
const up = below < Math.min(menu.scrollHeight, 240) && box.top > below;
|
|
59
|
+
setPlace(
|
|
60
|
+
`left:${Math.round(Math.min(box.left, innerWidth - menu.offsetWidth - 8))}px;min-width:${Math.round(box.width)}px;` +
|
|
61
|
+
(up
|
|
62
|
+
? `bottom:${Math.round(innerHeight - box.top + 4)}px;max-height:${Math.round(Math.min(360, box.top - 12))}px`
|
|
63
|
+
: `top:${Math.round(box.bottom + 4)}px;max-height:${Math.round(Math.min(360, below))}px`),
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
position();
|
|
67
|
+
addEventListener('resize', position);
|
|
68
|
+
addEventListener('scroll', position, true);
|
|
69
|
+
return () => {
|
|
70
|
+
removeEventListener('resize', position);
|
|
71
|
+
removeEventListener('scroll', position, true);
|
|
72
|
+
};
|
|
73
|
+
}, [listed, shown.length]);
|
|
74
|
+
|
|
75
|
+
useLayoutEffect(() => {
|
|
76
|
+
if (listed)
|
|
77
|
+
list.current?.querySelector(`[data-index="${active}"]`)?.scrollIntoView({ block: 'nearest' });
|
|
78
|
+
}, [listed, active, place]);
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<>
|
|
82
|
+
<input
|
|
83
|
+
ref={input}
|
|
84
|
+
name={name}
|
|
85
|
+
class={className}
|
|
86
|
+
role="combobox"
|
|
87
|
+
aria-label={label}
|
|
88
|
+
aria-autocomplete="list"
|
|
89
|
+
aria-expanded={listed}
|
|
90
|
+
aria-controls={`${id}-list`}
|
|
91
|
+
aria-activedescendant={listed ? `${id}-${active}` : undefined}
|
|
92
|
+
autocomplete="off"
|
|
93
|
+
placeholder={placeholder}
|
|
94
|
+
value={value}
|
|
95
|
+
onInput={event => {
|
|
96
|
+
onChange(event.currentTarget.value);
|
|
97
|
+
setTyped(true);
|
|
98
|
+
setActive(0);
|
|
99
|
+
setOpen(true);
|
|
100
|
+
}}
|
|
101
|
+
onFocus={() => {
|
|
102
|
+
setTyped(false);
|
|
103
|
+
setOpen(true);
|
|
104
|
+
onOpen?.();
|
|
105
|
+
}}
|
|
106
|
+
onClick={() => {
|
|
107
|
+
setOpen(true);
|
|
108
|
+
onOpen?.();
|
|
109
|
+
}}
|
|
110
|
+
onBlur={() => {
|
|
111
|
+
setOpen(false);
|
|
112
|
+
setTyped(false);
|
|
113
|
+
}}
|
|
114
|
+
onKeyDown={event => {
|
|
115
|
+
if (!listed) return;
|
|
116
|
+
if (event.key === 'ArrowDown') setActive((active + 1) % shown.length);
|
|
117
|
+
else if (event.key === 'ArrowUp') setActive((active - 1 + shown.length) % shown.length);
|
|
118
|
+
else if (event.key === 'Enter') pick(active);
|
|
119
|
+
else if (event.key === 'Escape') setOpen(false);
|
|
120
|
+
else return;
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
}}
|
|
123
|
+
/>
|
|
124
|
+
{listed ? (
|
|
125
|
+
<div
|
|
126
|
+
ref={list}
|
|
127
|
+
id={`${id}-list`}
|
|
128
|
+
class="pop select-pop"
|
|
129
|
+
popover="manual"
|
|
130
|
+
role="listbox"
|
|
131
|
+
aria-label={label}
|
|
132
|
+
style={place || 'visibility:hidden'}
|
|
133
|
+
onMouseDown={event => event.preventDefault()}
|
|
134
|
+
>
|
|
135
|
+
{shown.map((option, index) => (
|
|
136
|
+
<div
|
|
137
|
+
key={option}
|
|
138
|
+
id={`${id}-${index}`}
|
|
139
|
+
data-index={index}
|
|
140
|
+
role="option"
|
|
141
|
+
aria-selected={option === value}
|
|
142
|
+
class={index === active ? 'pop-item on' : 'pop-item'}
|
|
143
|
+
onPointerMove={() => index !== active && setActive(index)}
|
|
144
|
+
onClick={() => pick(index)}
|
|
145
|
+
>
|
|
146
|
+
<span class="grow">{option}</span>
|
|
147
|
+
<Icon d={iCheck} />
|
|
148
|
+
</div>
|
|
149
|
+
))}
|
|
150
|
+
</div>
|
|
151
|
+
) : null}
|
|
152
|
+
</>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
dialog.confirm {
|
|
2
|
+
width: min(420px, calc(100vw - 32px));
|
|
3
|
+
margin: auto;
|
|
4
|
+
padding: 0;
|
|
5
|
+
border: 1px solid var(--line2);
|
|
6
|
+
background: var(--tile);
|
|
7
|
+
color: inherit;
|
|
8
|
+
text-align: left;
|
|
9
|
+
white-space: normal;
|
|
10
|
+
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
|
|
11
|
+
}
|
|
12
|
+
dialog.confirm::backdrop {
|
|
13
|
+
background: rgba(0, 0, 0, 0.45);
|
|
14
|
+
}
|
|
15
|
+
dialog.confirm form {
|
|
16
|
+
display: grid;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
padding: 20px;
|
|
19
|
+
}
|
|
20
|
+
dialog.confirm h2 {
|
|
21
|
+
font-size: 15px;
|
|
22
|
+
font-weight: 700;
|
|
23
|
+
overflow-wrap: anywhere;
|
|
24
|
+
}
|
|
25
|
+
dialog.confirm p {
|
|
26
|
+
color: var(--muted);
|
|
27
|
+
}
|
|
28
|
+
dialog.confirm .actions {
|
|
29
|
+
justify-content: flex-end;
|
|
30
|
+
margin-top: 12px;
|
|
31
|
+
}
|
|
32
|
+
.btn.destructive {
|
|
33
|
+
background: var(--bad);
|
|
34
|
+
border-color: var(--bad);
|
|
35
|
+
color: var(--bg);
|
|
36
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import './confirm.css';
|
|
4
|
+
|
|
5
|
+
import type { ComponentChildren } from 'preact';
|
|
6
|
+
import { useEffect, useId, useRef } from 'preact/hooks';
|
|
7
|
+
|
|
8
|
+
/** A modal question before a destructive step; Escape, Cancel or a backdrop click closes it. */
|
|
9
|
+
export function ConfirmDialog({
|
|
10
|
+
open,
|
|
11
|
+
title,
|
|
12
|
+
body,
|
|
13
|
+
confirmLabel,
|
|
14
|
+
onConfirm,
|
|
15
|
+
onClose,
|
|
16
|
+
busy,
|
|
17
|
+
}: {
|
|
18
|
+
open: boolean;
|
|
19
|
+
title: ComponentChildren;
|
|
20
|
+
body?: ComponentChildren;
|
|
21
|
+
confirmLabel: string;
|
|
22
|
+
onConfirm: () => void;
|
|
23
|
+
onClose: () => void;
|
|
24
|
+
busy?: boolean;
|
|
25
|
+
}) {
|
|
26
|
+
const dialog = useRef<HTMLDialogElement>(null);
|
|
27
|
+
const id = useId();
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
const el = dialog.current!;
|
|
31
|
+
if (open && !el.open) el.showModal();
|
|
32
|
+
else if (!open && el.open) el.close();
|
|
33
|
+
}, [open]);
|
|
34
|
+
|
|
35
|
+
const close = () => !busy && onClose();
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<dialog
|
|
39
|
+
ref={dialog}
|
|
40
|
+
class="confirm"
|
|
41
|
+
aria-labelledby={id}
|
|
42
|
+
onCancel={event => {
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
close();
|
|
45
|
+
}}
|
|
46
|
+
onClick={event => event.target === event.currentTarget && close()}
|
|
47
|
+
>
|
|
48
|
+
<form
|
|
49
|
+
onSubmit={event => {
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
onConfirm();
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<h2 id={id}>{title}</h2>
|
|
55
|
+
{body ? <p>{body}</p> : null}
|
|
56
|
+
<div class="actions">
|
|
57
|
+
<button type="button" class="btn ghost" disabled={busy} onClick={close} autofocus>
|
|
58
|
+
Cancel
|
|
59
|
+
</button>
|
|
60
|
+
<button class="btn destructive" aria-busy={busy}>
|
|
61
|
+
{confirmLabel}
|
|
62
|
+
</button>
|
|
63
|
+
</div>
|
|
64
|
+
</form>
|
|
65
|
+
</dialog>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* forms */
|
|
2
|
+
.field {
|
|
3
|
+
display: grid;
|
|
4
|
+
gap: 6px;
|
|
5
|
+
}
|
|
6
|
+
.field > span:first-child,
|
|
7
|
+
.field > label {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: baseline;
|
|
10
|
+
gap: 8px;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
font-weight: 500;
|
|
13
|
+
}
|
|
14
|
+
.field small {
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
color: var(--muted);
|
|
17
|
+
font-size: 11.5px;
|
|
18
|
+
}
|
|
19
|
+
.field .seg-btns {
|
|
20
|
+
width: max-content;
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
}
|
|
23
|
+
.field .seg-btns > button {
|
|
24
|
+
height: 36px;
|
|
25
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import './field.css';
|
|
2
|
+
import type { ComponentChildren } from 'preact';
|
|
3
|
+
|
|
4
|
+
export function Field({
|
|
5
|
+
label,
|
|
6
|
+
hint,
|
|
7
|
+
group,
|
|
8
|
+
children,
|
|
9
|
+
}: {
|
|
10
|
+
label: ComponentChildren;
|
|
11
|
+
hint?: ComponentChildren;
|
|
12
|
+
/** Holds buttons, not one input, so a click on the label picks nothing. */
|
|
13
|
+
group?: boolean;
|
|
14
|
+
children: ComponentChildren;
|
|
15
|
+
}) {
|
|
16
|
+
const Tag = group ? 'div' : 'label';
|
|
17
|
+
return (
|
|
18
|
+
<Tag class="field">
|
|
19
|
+
<span>
|
|
20
|
+
{label}
|
|
21
|
+
{hint ? <small>{hint}</small> : null}
|
|
22
|
+
</span>
|
|
23
|
+
{children}
|
|
24
|
+
</Tag>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function ErrorText({ value }: { value?: string }) {
|
|
29
|
+
return value ? (
|
|
30
|
+
<p class="flash err" role="alert">
|
|
31
|
+
{value}
|
|
32
|
+
</p>
|
|
33
|
+
) : null;
|
|
34
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.ic {
|
|
2
|
+
width: 16px;
|
|
3
|
+
height: 16px;
|
|
4
|
+
flex: none;
|
|
5
|
+
fill: none;
|
|
6
|
+
stroke: currentColor;
|
|
7
|
+
stroke-width: 1.75;
|
|
8
|
+
stroke-linecap: round;
|
|
9
|
+
stroke-linejoin: round;
|
|
10
|
+
}
|
|
11
|
+
.brand .coder-mark {
|
|
12
|
+
flex: none;
|
|
13
|
+
position: relative;
|
|
14
|
+
top: -1px;
|
|
15
|
+
width: 16px;
|
|
16
|
+
height: 16px;
|
|
17
|
+
fill: currentColor;
|
|
18
|
+
}
|
|
19
|
+
th .ic {
|
|
20
|
+
width: 12px;
|
|
21
|
+
height: 12px;
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import './icon.css';
|
|
2
|
+
export function Icon({ d, class: cls }: { d: string; class?: string }) {
|
|
3
|
+
return (
|
|
4
|
+
<svg class={cls ? `ic ${cls}` : 'ic'} viewBox="0 0 24 24" aria-hidden="true">
|
|
5
|
+
<path d={d} />
|
|
6
|
+
</svg>
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** The Coder mark: eight dots on a 16px grid, drawn in currentColor. */
|
|
11
|
+
export function Mark() {
|
|
12
|
+
return (
|
|
13
|
+
<svg class="coder-mark" viewBox="0 0 16 16" aria-hidden="true">
|
|
14
|
+
<path d="M5 0h3v3h-3zM9 0h3v3h-3zM13 0h3v3h-3zM0 4h3v3h-3zM0 9h3v3h-3zM5 13h3v3h-3zM9 13h3v3h-3zM13 13h3v3h-3z" />
|
|
15
|
+
</svg>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** Icon outlines, one path each, 24 by 24; import only the ones a component draws. */
|
|
2
|
+
export const iAgent =
|
|
3
|
+
'M12 8V4H8M6 8h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2ZM2 14h2M20 14h2M15 13v2M9 13v2';
|
|
4
|
+
export const iActivity = 'M22 12h-4l-3 9L9 3l-3 9H2';
|
|
5
|
+
export const iChart = 'M3 3v18h18M18 17V9M13 17V5M8 17v-3';
|
|
6
|
+
export const iLeft = 'm15 18-6-6 6-6';
|
|
7
|
+
export const iDown = 'm6 9 6 6 6-6';
|
|
8
|
+
export const iRight = 'm9 18 6-6-6-6';
|
|
9
|
+
export const iUp = 'm18 15-6-6-6 6';
|
|
10
|
+
export const iUpdown = 'm7 15 5 5 5-5M7 9l5-5 5 5';
|
|
11
|
+
export const iSun =
|
|
12
|
+
'M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M6.3 17.7l-1.4 1.4M19.1 4.9l-1.4 1.4';
|
|
13
|
+
export const iMoon = 'M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z';
|
|
14
|
+
export const iMonitor =
|
|
15
|
+
'M4 4h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1ZM8 20h8M12 16v4';
|
|
16
|
+
export const iKey =
|
|
17
|
+
'M2 15.5a5.5 5.5 0 1 0 11 0a5.5 5.5 0 1 0 -11 0M21 2l-9.6 9.6M15.5 7.5l3 3L22 7l-3-3';
|
|
18
|
+
export const iUsers =
|
|
19
|
+
'M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8';
|
|
20
|
+
export const iUser = 'M8 8a4 4 0 1 0 8 0a4 4 0 1 0 -8 0M4 21a8 8 0 0 1 16 0';
|
|
21
|
+
export const iOut = 'M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9';
|
|
22
|
+
export const iSpark = 'm12 3 1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9ZM19 3v4M17 5h4';
|
|
23
|
+
export const iGit =
|
|
24
|
+
'M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.7-.9l-.8-1.2A2 2 0 0 0 7.9 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2ZM10 13a2 2 0 1 0 4 0a2 2 0 1 0 -4 0M14 13h3M7 13h3';
|
|
25
|
+
export const iMenu = 'M4 6h16M4 12h16M4 18h16';
|
|
26
|
+
export const iX = 'M18 6 6 18M6 6l12 12';
|
|
27
|
+
export const iCheck = 'M20 6 9 17l-5-5';
|
|
28
|
+
export const iDots =
|
|
29
|
+
'M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0';
|
|
30
|
+
export const iPlus = 'M12 5v14M5 12h14';
|
|
31
|
+
export const iPencil = 'M4 20h4L19 9l-4-4L4 16v4ZM13 7l4 4';
|
|
32
|
+
export const iMessage = 'M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12Z';
|
|
33
|
+
export const iSteer = 'M4 12h12M12 6l6 6-6 6';
|
|
34
|
+
export const iAsk =
|
|
35
|
+
'M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .8-1 1.5M12 17h.01';
|
|
36
|
+
export const iShuffle = 'M16 4h4v4M20 4l-7 7M4 20l6-6M16 20h4v-4M20 20l-5-5M4 4l5 5';
|
|
37
|
+
export const iSearch = 'M4 11a7 7 0 1 0 14 0a7 7 0 1 0 -14 0M20 20l-3.5-3.5';
|
|
38
|
+
export const iAlert =
|
|
39
|
+
'm21.7 18-8-14a2 2 0 0 0-3.4 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.7-3M12 9v4M12 17h.01';
|
|
40
|
+
export const iTerminal = 'm4 17 6-6-6-6M12 19h8';
|
|
41
|
+
export const iClock = 'M12 7v5l3 2M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0';
|
|
42
|
+
export const iPlug = 'M9 2v6M15 2v6M6 8h12v4a6 6 0 0 1-12 0ZM12 18v4';
|
|
43
|
+
export const iCopy = 'M9 9h11v11H9ZM5 15H4V4h11v1';
|
|
44
|
+
export const iSliders = 'M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6';
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/* menus: a button and its popover in the top layer, at the button where anchors work and centred elsewhere */
|
|
2
|
+
.pop,
|
|
3
|
+
.more-list {
|
|
4
|
+
position: fixed;
|
|
5
|
+
inset: auto;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 6px;
|
|
8
|
+
white-space: normal;
|
|
9
|
+
max-height: calc(100vh - 24px);
|
|
10
|
+
overflow-y: auto;
|
|
11
|
+
border: 1px solid var(--line2);
|
|
12
|
+
background: var(--tile);
|
|
13
|
+
color: inherit;
|
|
14
|
+
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
|
|
15
|
+
}
|
|
16
|
+
:where(.menu, .more) > button {
|
|
17
|
+
padding: 0;
|
|
18
|
+
border: 0;
|
|
19
|
+
background: none;
|
|
20
|
+
color: inherit;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
.menu > .pop,
|
|
24
|
+
.more > .more-list {
|
|
25
|
+
inset: 0;
|
|
26
|
+
margin: auto;
|
|
27
|
+
}
|
|
28
|
+
@supports (anchor-scope: --menu) {
|
|
29
|
+
.menu,
|
|
30
|
+
.more {
|
|
31
|
+
anchor-scope: --menu;
|
|
32
|
+
}
|
|
33
|
+
:where(.menu, .more) > button {
|
|
34
|
+
anchor-name: --menu;
|
|
35
|
+
}
|
|
36
|
+
.menu > .pop,
|
|
37
|
+
.more > .more-list {
|
|
38
|
+
position-anchor: --menu;
|
|
39
|
+
position-try-fallbacks: flip-block;
|
|
40
|
+
inset: anchor(bottom) auto auto anchor(left);
|
|
41
|
+
margin: 8px 0 0;
|
|
42
|
+
}
|
|
43
|
+
.menu.right > .pop,
|
|
44
|
+
.more > .more-list {
|
|
45
|
+
inset: anchor(bottom) anchor(right) auto auto;
|
|
46
|
+
}
|
|
47
|
+
.menu.up > .pop {
|
|
48
|
+
inset: auto anchor(right) anchor(top) anchor(left);
|
|
49
|
+
margin: 0 0 8px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
.pop {
|
|
53
|
+
z-index: 40;
|
|
54
|
+
min-width: 180px;
|
|
55
|
+
}
|
|
56
|
+
/* lists with sections or descriptions need the room */
|
|
57
|
+
.pop:has(.pop-label, .pop-item.rich, .pop-row) {
|
|
58
|
+
min-width: 260px;
|
|
59
|
+
}
|
|
60
|
+
.menu.up > .pop {
|
|
61
|
+
min-width: 0;
|
|
62
|
+
}
|
|
63
|
+
.pop.wide {
|
|
64
|
+
width: min(320px, calc(100vw - 32px));
|
|
65
|
+
}
|
|
66
|
+
.pop hr {
|
|
67
|
+
border: 0;
|
|
68
|
+
border-top: 1px solid var(--line);
|
|
69
|
+
margin: 6px 0;
|
|
70
|
+
}
|
|
71
|
+
.pop-label {
|
|
72
|
+
padding: 8px 10px 4px;
|
|
73
|
+
font-size: 10px;
|
|
74
|
+
color: var(--dim);
|
|
75
|
+
border-top: 1px solid var(--line);
|
|
76
|
+
}
|
|
77
|
+
.pop-head + .pop-label,
|
|
78
|
+
.pop .pop-label:first-child {
|
|
79
|
+
border-top: 0;
|
|
80
|
+
}
|
|
81
|
+
.pop-item {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: 12px;
|
|
85
|
+
width: 100%;
|
|
86
|
+
padding: 8px 10px;
|
|
87
|
+
border: 0;
|
|
88
|
+
background: none;
|
|
89
|
+
text-align: left;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
.pop-item:hover {
|
|
93
|
+
background: var(--wash);
|
|
94
|
+
}
|
|
95
|
+
.pop-item.danger:hover {
|
|
96
|
+
background: var(--badbg);
|
|
97
|
+
color: var(--bad);
|
|
98
|
+
}
|
|
99
|
+
.pop-item:disabled {
|
|
100
|
+
cursor: default;
|
|
101
|
+
}
|
|
102
|
+
.pop-item:disabled:hover {
|
|
103
|
+
background: none;
|
|
104
|
+
}
|
|
105
|
+
.pop-item small {
|
|
106
|
+
display: block;
|
|
107
|
+
}
|
|
108
|
+
.pop-item.rich {
|
|
109
|
+
align-items: flex-start;
|
|
110
|
+
}
|
|
111
|
+
.pop-item.rich .ic {
|
|
112
|
+
margin-top: 2px;
|
|
113
|
+
}
|
|
114
|
+
.pop-item[role="menuitemradio"] > .ic:last-child {
|
|
115
|
+
visibility: hidden;
|
|
116
|
+
}
|
|
117
|
+
.pop-item[role="menuitemradio"][aria-checked="true"] > .ic:last-child {
|
|
118
|
+
visibility: visible;
|
|
119
|
+
color: var(--acc);
|
|
120
|
+
}
|
|
121
|
+
.pop form {
|
|
122
|
+
margin: 0;
|
|
123
|
+
}
|
|
124
|
+
.pop-note {
|
|
125
|
+
padding: 0 10px 8px;
|
|
126
|
+
font-size: 11.5px;
|
|
127
|
+
color: var(--muted);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* "+n more" lists */
|
|
131
|
+
.more {
|
|
132
|
+
flex: none;
|
|
133
|
+
}
|
|
134
|
+
.more > button {
|
|
135
|
+
padding: 0 7px;
|
|
136
|
+
border: 1px solid var(--line2);
|
|
137
|
+
color: var(--fg);
|
|
138
|
+
font-size: 11.5px;
|
|
139
|
+
white-space: nowrap;
|
|
140
|
+
}
|
|
141
|
+
.more:hover > button,
|
|
142
|
+
.more:has(:popover-open) > button {
|
|
143
|
+
border-color: var(--acc);
|
|
144
|
+
color: var(--acc);
|
|
145
|
+
}
|
|
146
|
+
.more-list {
|
|
147
|
+
--max: 220px;
|
|
148
|
+
z-index: 45;
|
|
149
|
+
min-width: 220px;
|
|
150
|
+
}
|
|
151
|
+
.more-list::before {
|
|
152
|
+
content: "";
|
|
153
|
+
position: absolute;
|
|
154
|
+
left: 0;
|
|
155
|
+
right: 0;
|
|
156
|
+
top: -8px;
|
|
157
|
+
height: 8px;
|
|
158
|
+
}
|
|
159
|
+
.more-list:popover-open {
|
|
160
|
+
display: grid;
|
|
161
|
+
gap: 4px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media (max-width: 760px) {
|
|
165
|
+
.pop.wide {
|
|
166
|
+
min-width: min(320px, calc(100vw - 32px));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* a trailing link in any menu or select, like "Add models" */
|
|
171
|
+
.pop .add-models {
|
|
172
|
+
margin-top: 4px;
|
|
173
|
+
color: var(--muted);
|
|
174
|
+
}
|
|
175
|
+
.pop .add-models .ic {
|
|
176
|
+
width: 14px;
|
|
177
|
+
height: 14px;
|
|
178
|
+
}
|