openclaw-multi-auto 1.3.6 → 1.3.8
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/dist/{audio-preflight-5FEeDooz.js → audio-preflight-DDBLZBdb.js} +4 -4
- package/dist/{audio-transcription-runner-B-UvoDjZ.js → audio-transcription-runner-DZbSWT9E.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{chrome-D45SyhQL.js → chrome-CMU2WVFh.js} +8 -8
- package/dist/{deliver-B9cys0EZ.js → deliver-BXVcFIHL.js} +1 -1
- package/dist/{deliver-runtime-DhaQJ0pI.js → deliver-runtime-DTaIS-1i.js} +3 -3
- package/dist/{deps-send-whatsapp.runtime-DvTL2tzN.js → deps-send-whatsapp.runtime-CIZqFAqb.js} +7 -7
- package/dist/extensionAPI.js +6 -6
- package/dist/{image-DAOPwVXi.js → image-BCVLo0qw.js} +1 -1
- package/dist/{image-runtime-wlCLVvVv.js → image-runtime-DtCKpMPZ.js} +3 -3
- package/dist/{pi-embedded-DYU79yGe.js → pi-embedded-CgQ_W6Xs.js} +24 -24
- package/dist/{pi-embedded-helpers-uTRAmQ4n.js → pi-embedded-helpers-CwuBTKza.js} +3 -3
- package/dist/plugin-sdk/{accounts-DyFCXtHv.js → accounts-BslAlVYS.js} +2 -2
- package/dist/plugin-sdk/{accounts-BJAXxY46.js → accounts-C3m65--E.js} +2 -2
- package/dist/plugin-sdk/{accounts-C1j7HSL0.js → accounts-CNCCkdEF.js} +3 -3
- package/dist/plugin-sdk/{active-listener-CftX5jLD.js → active-listener-CkPnMUkB.js} +2 -2
- package/dist/plugin-sdk/{api-key-rotation-8nyyt1kx.js → api-key-rotation-BXnNsojA.js} +2 -2
- package/dist/plugin-sdk/{audio-preflight-C_aSAPR1.js → audio-preflight-CtO4fFvp.js} +26 -26
- package/dist/plugin-sdk/{audio-transcription-runner-CB53F7_7.js → audio-transcription-runner-DnxvOS1-.js} +11 -11
- package/dist/plugin-sdk/{audit-membership-runtime-BXndI4LG.js → audit-membership-runtime-BpfoSk8M.js} +2 -2
- package/dist/plugin-sdk/{channel-activity-C5y8AgAV.js → channel-activity-WJYxcJ3S.js} +3 -3
- package/dist/plugin-sdk/{channel-web-DBTRO03V.js → channel-web-dO5k3ubM.js} +18 -18
- package/dist/plugin-sdk/{chrome-f00sZkDX.js → chrome-CjNTuJML.js} +6 -6
- package/dist/plugin-sdk/{commands-registry-BJ_NxG2F.js → commands-registry-CdYjoI0i.js} +4 -4
- package/dist/plugin-sdk/{common-Cf27Jwxu.js → common-oYc5vPFl.js} +2 -2
- package/dist/plugin-sdk/{config-CHQrpx-Q.js → config-B1z-UxQ3.js} +7 -7
- package/dist/plugin-sdk/{deliver-DNEuetST.js → deliver-D5_6T567.js} +10 -10
- package/dist/plugin-sdk/deliver-runtime-C5dgvvga.js +32 -0
- package/dist/plugin-sdk/deps-send-discord.runtime-Dg4N7PHJ.js +23 -0
- package/dist/plugin-sdk/deps-send-imessage.runtime-0OEwzMQm.js +22 -0
- package/dist/plugin-sdk/deps-send-signal.runtime-BM1jRt3G.js +21 -0
- package/dist/plugin-sdk/deps-send-slack.runtime-1E3BYRdF.js +19 -0
- package/dist/plugin-sdk/deps-send-telegram.runtime-DNCxIflA.js +24 -0
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-OLwr-9c8.js +57 -0
- package/dist/plugin-sdk/{diagnostic-LYUUmjJ5.js → diagnostic-Bxxu0ig-.js} +2 -2
- package/dist/plugin-sdk/{errors-CtMWwS2Z.js → errors-B3cHyZZA.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-CxYB5Kg6.js → fetch-guard-Dcgod0tg.js} +2 -2
- package/dist/plugin-sdk/{fs-safe-DtfhxbrI.js → fs-safe-BaKqI3G4.js} +3 -3
- package/dist/plugin-sdk/{image-BwjYjRHx.js → image-B2mQW9Rb.js} +6 -6
- package/dist/plugin-sdk/{image-ops-BnZKcbd6.js → image-ops-Cbzr4U9l.js} +2 -2
- package/dist/plugin-sdk/image-runtime-BFm45j49.js +25 -0
- package/dist/plugin-sdk/{ir-Z4hX67TJ.js → ir-ZEmrTr4J.js} +7 -7
- package/dist/plugin-sdk/{local-roots-KhjQw04O.js → local-roots-CIPRxA-4.js} +4 -4
- package/dist/plugin-sdk/{logger-DHIIvMxj.js → logger-CvPFVOgT.js} +2 -2
- package/dist/plugin-sdk/{login-C31642Ld.js → login-CCTew9bt.js} +4 -4
- package/dist/plugin-sdk/{login-qr--y2SG_Ue.js → login-qr-BI3Vi_wJ.js} +5 -5
- package/dist/plugin-sdk/{manager-2UZBMCc7.js → manager-BEoYPn7R.js} +8 -8
- package/dist/plugin-sdk/manager-runtime-DxclHQ4U.js +15 -0
- package/dist/plugin-sdk/{outbound-Ba0QUI5h.js → outbound-ByOw1K6W.js} +5 -5
- package/dist/plugin-sdk/{outbound-attachment-B1Laso-8.js → outbound-attachment-BzVhxRRw.js} +2 -2
- package/dist/plugin-sdk/{path-alias-guards-C7Vm5DZ1.js → path-alias-guards-sWayacde.js} +1 -1
- package/dist/plugin-sdk/{paths-DopV9PQG.js → paths-Dpg3qxcl.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-DnA_OCzP.js → pi-embedded-helpers-DIxXkGJf.js} +16 -16
- package/dist/plugin-sdk/{pi-model-discovery-DdPqXk8f.js → pi-model-discovery-DM_2uFtj.js} +1 -1
- package/dist/plugin-sdk/pi-model-discovery-runtime-BuzvkvNR.js +8 -0
- package/dist/plugin-sdk/{pi-tools.before-tool-call.runtime-DxFHiLUE.js → pi-tools.before-tool-call.runtime-w1dqL_ty.js} +4 -4
- package/dist/plugin-sdk/{plugins-CbCt4osF.js → plugins-C4USiH29.js} +4 -4
- package/dist/plugin-sdk/{proxy-env-C63mMdas.js → proxy-env-ET-rp8eg.js} +1 -1
- package/dist/plugin-sdk/{proxy-fetch-Ch95c_Y2.js → proxy-fetch-uDXGKG3Z.js} +1 -1
- package/dist/plugin-sdk/{pw-ai-DpJk62D4.js → pw-ai-CyOt3RDA.js} +9 -9
- package/dist/plugin-sdk/{qmd-manager-Ca-iSfEE.js → qmd-manager-BySdoVR7.js} +7 -7
- package/dist/plugin-sdk/{query-expansion-B_Xe41Ab.js → query-expansion-C6uS-7lj.js} +4 -4
- package/dist/plugin-sdk/{redact-hp9TOulW.js → redact-Bvxt1T_Q.js} +1 -1
- package/dist/plugin-sdk/{reply-CovBlFea.js → reply-CTCSeQqW.js} +73 -73
- package/dist/plugin-sdk/{resolve-outbound-target-BbrHgyUk.js → resolve-outbound-target-Bw8YNANu.js} +2 -2
- package/dist/plugin-sdk/{run-with-concurrency-BR1DXa8T.js → run-with-concurrency-C_KCHwvf.js} +1 -1
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-BxgRDkhc.js +10 -0
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-elOqrkfg.js +19 -0
- package/dist/plugin-sdk/{send-BvAtLLPl.js → send-BZ6nYFZr.js} +5 -5
- package/dist/plugin-sdk/{send-BTztm3D2.js → send-C0w6xP2x.js} +6 -6
- package/dist/plugin-sdk/{send-CWJUuG0i.js → send-CFf-1V89.js} +8 -8
- package/dist/plugin-sdk/{send-EcglC4cG.js → send-CY-Qfwia.js} +7 -7
- package/dist/plugin-sdk/{send-BXpXBwM_.js → send-qPyNGSe4.js} +13 -13
- package/dist/plugin-sdk/{session-k256LJZT.js → session-COrvpvUQ.js} +3 -3
- package/dist/plugin-sdk/signal.js +2 -2
- package/dist/plugin-sdk/{skill-commands-DoRqLzxm.js → skill-commands-DZqhtmiv.js} +4 -4
- package/dist/plugin-sdk/{skills-QudILG6e.js → skills-Cw_vXEJb.js} +6 -6
- package/dist/plugin-sdk/slash-commands.runtime-D67JLweo.js +13 -0
- package/dist/plugin-sdk/slash-dispatch.runtime-DvcpvCJ0.js +52 -0
- package/dist/plugin-sdk/slash-skill-commands.runtime-BM1x3azR.js +16 -0
- package/dist/plugin-sdk/{store-BbDQw3g6.js → store-CMHj6IIw.js} +2 -2
- package/dist/plugin-sdk/subagent-registry-runtime-1lbDyRzz.js +52 -0
- package/dist/plugin-sdk/{tables-BhvloMKN.js → tables-CSqrHsKL.js} +1 -1
- package/dist/plugin-sdk/{thinking-URzkT-3p.js → thinking-DOnsR_A8.js} +7 -7
- package/dist/plugin-sdk/{tokens-B1PW5Ayy.js → tokens-BDr0Z9o3.js} +1 -1
- package/dist/plugin-sdk/{tool-images-xpqbP6RR.js → tool-images-eEfOVkzf.js} +2 -2
- package/dist/plugin-sdk/web-BLyT64pW.js +56 -0
- package/dist/plugin-sdk/{whatsapp-actions-RcZ6vp61.js → whatsapp-actions-xcleMoMv.js} +17 -17
- package/dist/plugin-sdk/whatsapp.js +50 -50
- package/dist/{pw-ai-GcYO6HPE.js → pw-ai-CmphSzHx.js} +1 -1
- package/dist/{slash-dispatch.runtime-Dh053pQK.js → slash-dispatch.runtime-131yup2e.js} +6 -6
- package/dist/{subagent-registry-runtime-DSi5mnCQ.js → subagent-registry-runtime-DbSf_Je6.js} +6 -6
- package/dist/{web-1hWJDzNA.js → web-MR9d7KyB.js} +6 -6
- package/package.json +5 -2
- package/scripts/create-instance.sh +44 -19
- package/scripts/install-maca.sh +39 -28
- package/scripts/npm_publish.sh +8 -6
- package/ui/index.html +16 -0
- package/ui/node_modules/.bin/jiti +21 -0
- package/ui/node_modules/.bin/lessc +21 -0
- package/ui/node_modules/.bin/marked +21 -0
- package/ui/node_modules/.bin/playwright +21 -0
- package/ui/node_modules/.bin/sass +21 -0
- package/ui/node_modules/.bin/tsx +21 -0
- package/ui/node_modules/.bin/vite +21 -0
- package/ui/node_modules/.bin/vitest +21 -0
- package/ui/node_modules/.bin/yaml +21 -0
- package/ui/package.json +27 -0
- package/ui/public/apple-touch-icon.png +0 -0
- package/ui/public/favicon-32.png +0 -0
- package/ui/public/favicon.ico +0 -0
- package/ui/public/favicon.svg +22 -0
- package/ui/src/css.d.ts +1 -0
- package/ui/src/i18n/index.ts +3 -0
- package/ui/src/i18n/lib/lit-controller.ts +22 -0
- package/ui/src/i18n/lib/registry.ts +64 -0
- package/ui/src/i18n/lib/translate.ts +123 -0
- package/ui/src/i18n/lib/types.ts +9 -0
- package/ui/src/i18n/locales/de.ts +129 -0
- package/ui/src/i18n/locales/en.ts +337 -0
- package/ui/src/i18n/locales/pt-BR.ts +128 -0
- package/ui/src/i18n/locales/zh-CN.ts +330 -0
- package/ui/src/i18n/locales/zh-TW.ts +125 -0
- package/ui/src/i18n/test/translate.test.ts +56 -0
- package/ui/src/main.ts +2 -0
- package/ui/src/styles/base.css +385 -0
- package/ui/src/styles/chat/grouped.css +300 -0
- package/ui/src/styles/chat/layout.css +481 -0
- package/ui/src/styles/chat/sidebar.css +117 -0
- package/ui/src/styles/chat/text.css +146 -0
- package/ui/src/styles/chat/tool-cards.css +202 -0
- package/ui/src/styles/chat.css +5 -0
- package/ui/src/styles/components.css +2612 -0
- package/ui/src/styles/config.css +1658 -0
- package/ui/src/styles/layout.css +621 -0
- package/ui/src/styles/layout.mobile.css +374 -0
- package/ui/src/styles.css +5 -0
- package/ui/src/ui/__screenshots__/config-form.browser.test.ts/config-form-renderer-flags-unsupported-unions-1.png +0 -0
- package/ui/src/ui/__screenshots__/config-form.browser.test.ts/config-form-renderer-renders-inputs-and-patches-values-1.png +0 -0
- package/ui/src/ui/__screenshots__/config-form.browser.test.ts/config-form-renderer-renders-union-literals-as-select-options-1.png +0 -0
- package/ui/src/ui/__screenshots__/navigation.browser.test.ts/control-UI-routing-auto-scrolls-chat-history-to-the-latest-message-1.png +0 -0
- package/ui/src/ui/app-channels.ts +279 -0
- package/ui/src/ui/app-chat.ts +266 -0
- package/ui/src/ui/app-defaults.ts +50 -0
- package/ui/src/ui/app-events.ts +5 -0
- package/ui/src/ui/app-gateway.node.test.ts +229 -0
- package/ui/src/ui/app-gateway.ts +349 -0
- package/ui/src/ui/app-lifecycle.node.test.ts +44 -0
- package/ui/src/ui/app-lifecycle.ts +109 -0
- package/ui/src/ui/app-polling.ts +69 -0
- package/ui/src/ui/app-render-usage-tab.ts +273 -0
- package/ui/src/ui/app-render.helpers.node.test.ts +286 -0
- package/ui/src/ui/app-render.helpers.ts +574 -0
- package/ui/src/ui/app-render.ts +1168 -0
- package/ui/src/ui/app-scroll.test.ts +275 -0
- package/ui/src/ui/app-scroll.ts +179 -0
- package/ui/src/ui/app-settings.test.ts +70 -0
- package/ui/src/ui/app-settings.ts +440 -0
- package/ui/src/ui/app-tool-stream.node.test.ts +139 -0
- package/ui/src/ui/app-tool-stream.ts +455 -0
- package/ui/src/ui/app-view-state.ts +321 -0
- package/ui/src/ui/app.ts +621 -0
- package/ui/src/ui/assistant-identity.ts +23 -0
- package/ui/src/ui/chat/constants.ts +12 -0
- package/ui/src/ui/chat/copy-as-markdown.ts +97 -0
- package/ui/src/ui/chat/grouped-render.ts +287 -0
- package/ui/src/ui/chat/message-extract.test.ts +64 -0
- package/ui/src/ui/chat/message-extract.ts +122 -0
- package/ui/src/ui/chat/message-normalizer.test.ts +179 -0
- package/ui/src/ui/chat/message-normalizer.ts +101 -0
- package/ui/src/ui/chat/tool-cards.ts +156 -0
- package/ui/src/ui/chat/tool-helpers.test.ts +141 -0
- package/ui/src/ui/chat/tool-helpers.ts +37 -0
- package/ui/src/ui/chat-event-reload.test.ts +47 -0
- package/ui/src/ui/chat-event-reload.ts +16 -0
- package/ui/src/ui/chat-markdown.browser.test.ts +37 -0
- package/ui/src/ui/components/resizable-divider.ts +110 -0
- package/ui/src/ui/config-form.browser.test.ts +443 -0
- package/ui/src/ui/controllers/agent-files.ts +126 -0
- package/ui/src/ui/controllers/agent-identity.ts +59 -0
- package/ui/src/ui/controllers/agent-skills.ts +33 -0
- package/ui/src/ui/controllers/agents.test.ts +61 -0
- package/ui/src/ui/controllers/agents.ts +64 -0
- package/ui/src/ui/controllers/assistant-identity.ts +34 -0
- package/ui/src/ui/controllers/channels.ts +94 -0
- package/ui/src/ui/controllers/channels.types.ts +15 -0
- package/ui/src/ui/controllers/chat.test.ts +568 -0
- package/ui/src/ui/controllers/chat.ts +318 -0
- package/ui/src/ui/controllers/config/form-coerce.ts +160 -0
- package/ui/src/ui/controllers/config/form-utils.node.test.ts +455 -0
- package/ui/src/ui/controllers/config/form-utils.ts +90 -0
- package/ui/src/ui/controllers/config.test.ts +289 -0
- package/ui/src/ui/controllers/config.ts +219 -0
- package/ui/src/ui/controllers/control-ui-bootstrap.test.ts +82 -0
- package/ui/src/ui/controllers/control-ui-bootstrap.ts +49 -0
- package/ui/src/ui/controllers/cron-filters.test.ts +81 -0
- package/ui/src/ui/controllers/cron.test.ts +1070 -0
- package/ui/src/ui/controllers/cron.ts +921 -0
- package/ui/src/ui/controllers/debug.ts +60 -0
- package/ui/src/ui/controllers/devices.ts +159 -0
- package/ui/src/ui/controllers/exec-approval.ts +100 -0
- package/ui/src/ui/controllers/exec-approvals.ts +170 -0
- package/ui/src/ui/controllers/logs.ts +147 -0
- package/ui/src/ui/controllers/nodes.ts +32 -0
- package/ui/src/ui/controllers/presence.ts +37 -0
- package/ui/src/ui/controllers/sessions.test.ts +104 -0
- package/ui/src/ui/controllers/sessions.ts +127 -0
- package/ui/src/ui/controllers/skills.ts +157 -0
- package/ui/src/ui/controllers/usage.node.test.ts +181 -0
- package/ui/src/ui/controllers/usage.ts +315 -0
- package/ui/src/ui/data/moonshot-kimi-k2.ts +45 -0
- package/ui/src/ui/device-auth.ts +73 -0
- package/ui/src/ui/device-identity.ts +112 -0
- package/ui/src/ui/external-link.test.ts +18 -0
- package/ui/src/ui/external-link.ts +19 -0
- package/ui/src/ui/focus-mode.browser.test.ts +39 -0
- package/ui/src/ui/format.test.ts +101 -0
- package/ui/src/ui/format.ts +60 -0
- package/ui/src/ui/gateway.ts +360 -0
- package/ui/src/ui/icons.ts +256 -0
- package/ui/src/ui/markdown.test.ts +85 -0
- package/ui/src/ui/markdown.ts +139 -0
- package/ui/src/ui/navigation.browser.test.ts +188 -0
- package/ui/src/ui/navigation.test.ts +189 -0
- package/ui/src/ui/navigation.ts +165 -0
- package/ui/src/ui/open-external-url.test.ts +108 -0
- package/ui/src/ui/open-external-url.ts +73 -0
- package/ui/src/ui/presenter.ts +85 -0
- package/ui/src/ui/storage.node.test.ts +63 -0
- package/ui/src/ui/storage.ts +99 -0
- package/ui/src/ui/test-helpers/app-mount.ts +27 -0
- package/ui/src/ui/text-direction.test.ts +24 -0
- package/ui/src/ui/text-direction.ts +30 -0
- package/ui/src/ui/theme-transition.ts +109 -0
- package/ui/src/ui/theme.ts +16 -0
- package/ui/src/ui/tool-display.ts +159 -0
- package/ui/src/ui/types/chat-types.ts +44 -0
- package/ui/src/ui/types.ts +627 -0
- package/ui/src/ui/ui-types.ts +54 -0
- package/ui/src/ui/usage-helpers.node.test.ts +43 -0
- package/ui/src/ui/usage-helpers.ts +321 -0
- package/ui/src/ui/usage-types.ts +22 -0
- package/ui/src/ui/uuid.test.ts +41 -0
- package/ui/src/ui/uuid.ts +57 -0
- package/ui/src/ui/views/agents-panels-status-files.ts +461 -0
- package/ui/src/ui/views/agents-panels-tools-skills.browser.test.ts +102 -0
- package/ui/src/ui/views/agents-panels-tools-skills.ts +537 -0
- package/ui/src/ui/views/agents-utils.test.ts +100 -0
- package/ui/src/ui/views/agents-utils.ts +502 -0
- package/ui/src/ui/views/agents.ts +499 -0
- package/ui/src/ui/views/channel-config-extras.ts +49 -0
- package/ui/src/ui/views/channels.config.ts +155 -0
- package/ui/src/ui/views/channels.discord.ts +65 -0
- package/ui/src/ui/views/channels.googlechat.ts +79 -0
- package/ui/src/ui/views/channels.imessage.ts +65 -0
- package/ui/src/ui/views/channels.nostr-profile-form.ts +321 -0
- package/ui/src/ui/views/channels.nostr.ts +237 -0
- package/ui/src/ui/views/channels.shared.ts +38 -0
- package/ui/src/ui/views/channels.signal.ts +69 -0
- package/ui/src/ui/views/channels.slack.ts +65 -0
- package/ui/src/ui/views/channels.telegram.ts +120 -0
- package/ui/src/ui/views/channels.ts +325 -0
- package/ui/src/ui/views/channels.types.ts +62 -0
- package/ui/src/ui/views/channels.whatsapp.ts +118 -0
- package/ui/src/ui/views/chat-image-open.browser.test.ts +70 -0
- package/ui/src/ui/views/chat.test.ts +227 -0
- package/ui/src/ui/views/chat.ts +616 -0
- package/ui/src/ui/views/config-form.analyze.ts +267 -0
- package/ui/src/ui/views/config-form.node.ts +1073 -0
- package/ui/src/ui/views/config-form.render.ts +478 -0
- package/ui/src/ui/views/config-form.search.node.test.ts +69 -0
- package/ui/src/ui/views/config-form.shared.ts +96 -0
- package/ui/src/ui/views/config-form.ts +4 -0
- package/ui/src/ui/views/config-search.node.test.ts +50 -0
- package/ui/src/ui/views/config-search.ts +92 -0
- package/ui/src/ui/views/config.browser.test.ts +233 -0
- package/ui/src/ui/views/config.ts +820 -0
- package/ui/src/ui/views/cron.test.ts +741 -0
- package/ui/src/ui/views/cron.ts +1758 -0
- package/ui/src/ui/views/debug.ts +151 -0
- package/ui/src/ui/views/exec-approval.ts +89 -0
- package/ui/src/ui/views/gateway-url-confirmation.ts +40 -0
- package/ui/src/ui/views/instances.ts +89 -0
- package/ui/src/ui/views/logs.ts +155 -0
- package/ui/src/ui/views/markdown-sidebar.ts +40 -0
- package/ui/src/ui/views/nodes-exec-approvals.ts +617 -0
- package/ui/src/ui/views/nodes-shared.ts +67 -0
- package/ui/src/ui/views/nodes.ts +485 -0
- package/ui/src/ui/views/overview-hints.ts +16 -0
- package/ui/src/ui/views/overview.node.test.ts +39 -0
- package/ui/src/ui/views/overview.ts +361 -0
- package/ui/src/ui/views/sessions.test.ts +81 -0
- package/ui/src/ui/views/sessions.ts +321 -0
- package/ui/src/ui/views/skills-grouping.ts +40 -0
- package/ui/src/ui/views/skills-shared.ts +52 -0
- package/ui/src/ui/views/skills.ts +192 -0
- package/ui/src/ui/views/usage-metrics.ts +578 -0
- package/ui/src/ui/views/usage-query.ts +277 -0
- package/ui/src/ui/views/usage-render-details.test.ts +136 -0
- package/ui/src/ui/views/usage-render-details.ts +1083 -0
- package/ui/src/ui/views/usage-render-overview.ts +796 -0
- package/ui/src/ui/views/usage-styles/usageStyles-part1.ts +701 -0
- package/ui/src/ui/views/usage-styles/usageStyles-part2.ts +702 -0
- package/ui/src/ui/views/usage-styles/usageStyles-part3.ts +551 -0
- package/ui/src/ui/views/usage.ts +836 -0
- package/ui/src/ui/views/usageStyles.ts +5 -0
- package/ui/src/ui/views/usageTypes.ts +105 -0
- package/ui/vite.config.ts +43 -0
- package/ui/vitest.config.ts +15 -0
- package/ui/vitest.node.config.ts +10 -0
- package/dist/plugin-sdk/deliver-runtime-BFdqklJM.js +0 -32
- package/dist/plugin-sdk/deps-send-discord.runtime-DuqpYwU0.js +0 -23
- package/dist/plugin-sdk/deps-send-imessage.runtime-CZ2rS8Lb.js +0 -22
- package/dist/plugin-sdk/deps-send-signal.runtime-BdqiWhIh.js +0 -21
- package/dist/plugin-sdk/deps-send-slack.runtime-04s36qiC.js +0 -19
- package/dist/plugin-sdk/deps-send-telegram.runtime-LE5tkPvr.js +0 -24
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-Bz57lobC.js +0 -57
- package/dist/plugin-sdk/image-runtime-B8twoubs.js +0 -25
- package/dist/plugin-sdk/manager-runtime-CMeLwose.js +0 -15
- package/dist/plugin-sdk/pi-model-discovery-runtime-D8CJhtJY.js +0 -8
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-SkO91TZH.js +0 -10
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-B0VWK5hm.js +0 -19
- package/dist/plugin-sdk/slash-commands.runtime-DS6vCNSL.js +0 -13
- package/dist/plugin-sdk/slash-dispatch.runtime-BXrxb2wd.js +0 -52
- package/dist/plugin-sdk/slash-skill-commands.runtime-Bd6qQ2oT.js +0 -16
- package/dist/plugin-sdk/subagent-registry-runtime-1uwQbuXj.js +0 -52
- package/dist/plugin-sdk/web-B74yhL2N.js +0 -56
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { html, nothing } from "lit";
|
|
2
|
+
import { formatRelativeTimestamp } from "../format.ts";
|
|
3
|
+
import type { DiscordStatus } from "../types.ts";
|
|
4
|
+
import { renderChannelConfigSection } from "./channels.config.ts";
|
|
5
|
+
import type { ChannelsProps } from "./channels.types.ts";
|
|
6
|
+
|
|
7
|
+
export function renderDiscordCard(params: {
|
|
8
|
+
props: ChannelsProps;
|
|
9
|
+
discord?: DiscordStatus | null;
|
|
10
|
+
accountCountLabel: unknown;
|
|
11
|
+
}) {
|
|
12
|
+
const { props, discord, accountCountLabel } = params;
|
|
13
|
+
|
|
14
|
+
return html`
|
|
15
|
+
<div class="card">
|
|
16
|
+
<div class="card-title">Discord</div>
|
|
17
|
+
<div class="card-sub">Bot status and channel configuration.</div>
|
|
18
|
+
${accountCountLabel}
|
|
19
|
+
|
|
20
|
+
<div class="status-list" style="margin-top: 16px;">
|
|
21
|
+
<div>
|
|
22
|
+
<span class="label">Configured</span>
|
|
23
|
+
<span>${discord?.configured ? "Yes" : "No"}</span>
|
|
24
|
+
</div>
|
|
25
|
+
<div>
|
|
26
|
+
<span class="label">Running</span>
|
|
27
|
+
<span>${discord?.running ? "Yes" : "No"}</span>
|
|
28
|
+
</div>
|
|
29
|
+
<div>
|
|
30
|
+
<span class="label">Last start</span>
|
|
31
|
+
<span>${discord?.lastStartAt ? formatRelativeTimestamp(discord.lastStartAt) : "n/a"}</span>
|
|
32
|
+
</div>
|
|
33
|
+
<div>
|
|
34
|
+
<span class="label">Last probe</span>
|
|
35
|
+
<span>${discord?.lastProbeAt ? formatRelativeTimestamp(discord.lastProbeAt) : "n/a"}</span>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
${
|
|
40
|
+
discord?.lastError
|
|
41
|
+
? html`<div class="callout danger" style="margin-top: 12px;">
|
|
42
|
+
${discord.lastError}
|
|
43
|
+
</div>`
|
|
44
|
+
: nothing
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
${
|
|
48
|
+
discord?.probe
|
|
49
|
+
? html`<div class="callout" style="margin-top: 12px;">
|
|
50
|
+
Probe ${discord.probe.ok ? "ok" : "failed"} ·
|
|
51
|
+
${discord.probe.status ?? ""} ${discord.probe.error ?? ""}
|
|
52
|
+
</div>`
|
|
53
|
+
: nothing
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
${renderChannelConfigSection({ channelId: "discord", props })}
|
|
57
|
+
|
|
58
|
+
<div class="row" style="margin-top: 12px;">
|
|
59
|
+
<button class="btn" @click=${() => props.onRefresh(true)}>
|
|
60
|
+
Probe
|
|
61
|
+
</button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { html, nothing } from "lit";
|
|
2
|
+
import { formatRelativeTimestamp } from "../format.ts";
|
|
3
|
+
import type { GoogleChatStatus } from "../types.ts";
|
|
4
|
+
import { renderChannelConfigSection } from "./channels.config.ts";
|
|
5
|
+
import type { ChannelsProps } from "./channels.types.ts";
|
|
6
|
+
|
|
7
|
+
export function renderGoogleChatCard(params: {
|
|
8
|
+
props: ChannelsProps;
|
|
9
|
+
googleChat?: GoogleChatStatus | null;
|
|
10
|
+
accountCountLabel: unknown;
|
|
11
|
+
}) {
|
|
12
|
+
const { props, googleChat, accountCountLabel } = params;
|
|
13
|
+
|
|
14
|
+
return html`
|
|
15
|
+
<div class="card">
|
|
16
|
+
<div class="card-title">Google Chat</div>
|
|
17
|
+
<div class="card-sub">Chat API webhook status and channel configuration.</div>
|
|
18
|
+
${accountCountLabel}
|
|
19
|
+
|
|
20
|
+
<div class="status-list" style="margin-top: 16px;">
|
|
21
|
+
<div>
|
|
22
|
+
<span class="label">Configured</span>
|
|
23
|
+
<span>${googleChat ? (googleChat.configured ? "Yes" : "No") : "n/a"}</span>
|
|
24
|
+
</div>
|
|
25
|
+
<div>
|
|
26
|
+
<span class="label">Running</span>
|
|
27
|
+
<span>${googleChat ? (googleChat.running ? "Yes" : "No") : "n/a"}</span>
|
|
28
|
+
</div>
|
|
29
|
+
<div>
|
|
30
|
+
<span class="label">Credential</span>
|
|
31
|
+
<span>${googleChat?.credentialSource ?? "n/a"}</span>
|
|
32
|
+
</div>
|
|
33
|
+
<div>
|
|
34
|
+
<span class="label">Audience</span>
|
|
35
|
+
<span>
|
|
36
|
+
${
|
|
37
|
+
googleChat?.audienceType
|
|
38
|
+
? `${googleChat.audienceType}${googleChat.audience ? ` · ${googleChat.audience}` : ""}`
|
|
39
|
+
: "n/a"
|
|
40
|
+
}
|
|
41
|
+
</span>
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<span class="label">Last start</span>
|
|
45
|
+
<span>${googleChat?.lastStartAt ? formatRelativeTimestamp(googleChat.lastStartAt) : "n/a"}</span>
|
|
46
|
+
</div>
|
|
47
|
+
<div>
|
|
48
|
+
<span class="label">Last probe</span>
|
|
49
|
+
<span>${googleChat?.lastProbeAt ? formatRelativeTimestamp(googleChat.lastProbeAt) : "n/a"}</span>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
${
|
|
54
|
+
googleChat?.lastError
|
|
55
|
+
? html`<div class="callout danger" style="margin-top: 12px;">
|
|
56
|
+
${googleChat.lastError}
|
|
57
|
+
</div>`
|
|
58
|
+
: nothing
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
${
|
|
62
|
+
googleChat?.probe
|
|
63
|
+
? html`<div class="callout" style="margin-top: 12px;">
|
|
64
|
+
Probe ${googleChat.probe.ok ? "ok" : "failed"} ·
|
|
65
|
+
${googleChat.probe.status ?? ""} ${googleChat.probe.error ?? ""}
|
|
66
|
+
</div>`
|
|
67
|
+
: nothing
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
${renderChannelConfigSection({ channelId: "googlechat", props })}
|
|
71
|
+
|
|
72
|
+
<div class="row" style="margin-top: 12px;">
|
|
73
|
+
<button class="btn" @click=${() => props.onRefresh(true)}>
|
|
74
|
+
Probe
|
|
75
|
+
</button>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { html, nothing } from "lit";
|
|
2
|
+
import { formatRelativeTimestamp } from "../format.ts";
|
|
3
|
+
import type { IMessageStatus } from "../types.ts";
|
|
4
|
+
import { renderChannelConfigSection } from "./channels.config.ts";
|
|
5
|
+
import type { ChannelsProps } from "./channels.types.ts";
|
|
6
|
+
|
|
7
|
+
export function renderIMessageCard(params: {
|
|
8
|
+
props: ChannelsProps;
|
|
9
|
+
imessage?: IMessageStatus | null;
|
|
10
|
+
accountCountLabel: unknown;
|
|
11
|
+
}) {
|
|
12
|
+
const { props, imessage, accountCountLabel } = params;
|
|
13
|
+
|
|
14
|
+
return html`
|
|
15
|
+
<div class="card">
|
|
16
|
+
<div class="card-title">iMessage</div>
|
|
17
|
+
<div class="card-sub">macOS bridge status and channel configuration.</div>
|
|
18
|
+
${accountCountLabel}
|
|
19
|
+
|
|
20
|
+
<div class="status-list" style="margin-top: 16px;">
|
|
21
|
+
<div>
|
|
22
|
+
<span class="label">Configured</span>
|
|
23
|
+
<span>${imessage?.configured ? "Yes" : "No"}</span>
|
|
24
|
+
</div>
|
|
25
|
+
<div>
|
|
26
|
+
<span class="label">Running</span>
|
|
27
|
+
<span>${imessage?.running ? "Yes" : "No"}</span>
|
|
28
|
+
</div>
|
|
29
|
+
<div>
|
|
30
|
+
<span class="label">Last start</span>
|
|
31
|
+
<span>${imessage?.lastStartAt ? formatRelativeTimestamp(imessage.lastStartAt) : "n/a"}</span>
|
|
32
|
+
</div>
|
|
33
|
+
<div>
|
|
34
|
+
<span class="label">Last probe</span>
|
|
35
|
+
<span>${imessage?.lastProbeAt ? formatRelativeTimestamp(imessage.lastProbeAt) : "n/a"}</span>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
${
|
|
40
|
+
imessage?.lastError
|
|
41
|
+
? html`<div class="callout danger" style="margin-top: 12px;">
|
|
42
|
+
${imessage.lastError}
|
|
43
|
+
</div>`
|
|
44
|
+
: nothing
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
${
|
|
48
|
+
imessage?.probe
|
|
49
|
+
? html`<div class="callout" style="margin-top: 12px;">
|
|
50
|
+
Probe ${imessage.probe.ok ? "ok" : "failed"} ·
|
|
51
|
+
${imessage.probe.error ?? ""}
|
|
52
|
+
</div>`
|
|
53
|
+
: nothing
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
${renderChannelConfigSection({ channelId: "imessage", props })}
|
|
57
|
+
|
|
58
|
+
<div class="row" style="margin-top: 12px;">
|
|
59
|
+
<button class="btn" @click=${() => props.onRefresh(true)}>
|
|
60
|
+
Probe
|
|
61
|
+
</button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nostr Profile Edit Form
|
|
3
|
+
*
|
|
4
|
+
* Provides UI for editing and publishing Nostr profile (kind:0).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { html, nothing, type TemplateResult } from "lit";
|
|
8
|
+
import type { NostrProfile as NostrProfileType } from "../types.ts";
|
|
9
|
+
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// Types
|
|
12
|
+
// ============================================================================
|
|
13
|
+
|
|
14
|
+
export interface NostrProfileFormState {
|
|
15
|
+
/** Current form values */
|
|
16
|
+
values: NostrProfileType;
|
|
17
|
+
/** Original values for dirty detection */
|
|
18
|
+
original: NostrProfileType;
|
|
19
|
+
/** Whether the form is currently submitting */
|
|
20
|
+
saving: boolean;
|
|
21
|
+
/** Whether import is in progress */
|
|
22
|
+
importing: boolean;
|
|
23
|
+
/** Last error message */
|
|
24
|
+
error: string | null;
|
|
25
|
+
/** Last success message */
|
|
26
|
+
success: string | null;
|
|
27
|
+
/** Validation errors per field */
|
|
28
|
+
fieldErrors: Record<string, string>;
|
|
29
|
+
/** Whether to show advanced fields */
|
|
30
|
+
showAdvanced: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface NostrProfileFormCallbacks {
|
|
34
|
+
/** Called when a field value changes */
|
|
35
|
+
onFieldChange: (field: keyof NostrProfileType, value: string) => void;
|
|
36
|
+
/** Called when save is clicked */
|
|
37
|
+
onSave: () => void;
|
|
38
|
+
/** Called when import is clicked */
|
|
39
|
+
onImport: () => void;
|
|
40
|
+
/** Called when cancel is clicked */
|
|
41
|
+
onCancel: () => void;
|
|
42
|
+
/** Called when toggle advanced is clicked */
|
|
43
|
+
onToggleAdvanced: () => void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// ============================================================================
|
|
47
|
+
// Helpers
|
|
48
|
+
// ============================================================================
|
|
49
|
+
|
|
50
|
+
function isFormDirty(state: NostrProfileFormState): boolean {
|
|
51
|
+
const { values, original } = state;
|
|
52
|
+
return (
|
|
53
|
+
values.name !== original.name ||
|
|
54
|
+
values.displayName !== original.displayName ||
|
|
55
|
+
values.about !== original.about ||
|
|
56
|
+
values.picture !== original.picture ||
|
|
57
|
+
values.banner !== original.banner ||
|
|
58
|
+
values.website !== original.website ||
|
|
59
|
+
values.nip05 !== original.nip05 ||
|
|
60
|
+
values.lud16 !== original.lud16
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// ============================================================================
|
|
65
|
+
// Form Rendering
|
|
66
|
+
// ============================================================================
|
|
67
|
+
|
|
68
|
+
export function renderNostrProfileForm(params: {
|
|
69
|
+
state: NostrProfileFormState;
|
|
70
|
+
callbacks: NostrProfileFormCallbacks;
|
|
71
|
+
accountId: string;
|
|
72
|
+
}): TemplateResult {
|
|
73
|
+
const { state, callbacks, accountId } = params;
|
|
74
|
+
const isDirty = isFormDirty(state);
|
|
75
|
+
|
|
76
|
+
const renderField = (
|
|
77
|
+
field: keyof NostrProfileType,
|
|
78
|
+
label: string,
|
|
79
|
+
opts: {
|
|
80
|
+
type?: "text" | "url" | "textarea";
|
|
81
|
+
placeholder?: string;
|
|
82
|
+
maxLength?: number;
|
|
83
|
+
help?: string;
|
|
84
|
+
} = {},
|
|
85
|
+
) => {
|
|
86
|
+
const { type = "text", placeholder, maxLength, help } = opts;
|
|
87
|
+
const value = state.values[field] ?? "";
|
|
88
|
+
const error = state.fieldErrors[field];
|
|
89
|
+
|
|
90
|
+
const inputId = `nostr-profile-${field}`;
|
|
91
|
+
|
|
92
|
+
if (type === "textarea") {
|
|
93
|
+
return html`
|
|
94
|
+
<div class="form-field" style="margin-bottom: 12px;">
|
|
95
|
+
<label for="${inputId}" style="display: block; margin-bottom: 4px; font-weight: 500;">
|
|
96
|
+
${label}
|
|
97
|
+
</label>
|
|
98
|
+
<textarea
|
|
99
|
+
id="${inputId}"
|
|
100
|
+
.value=${value}
|
|
101
|
+
placeholder=${placeholder ?? ""}
|
|
102
|
+
maxlength=${maxLength ?? 2000}
|
|
103
|
+
rows="3"
|
|
104
|
+
style="width: 100%; padding: 8px; border: 1px solid var(--border-color); border-radius: 4px; resize: vertical; font-family: inherit;"
|
|
105
|
+
@input=${(e: InputEvent) => {
|
|
106
|
+
const target = e.target as HTMLTextAreaElement;
|
|
107
|
+
callbacks.onFieldChange(field, target.value);
|
|
108
|
+
}}
|
|
109
|
+
?disabled=${state.saving}
|
|
110
|
+
></textarea>
|
|
111
|
+
${help ? html`<div style="font-size: 12px; color: var(--text-muted); margin-top: 2px;">${help}</div>` : nothing}
|
|
112
|
+
${error ? html`<div style="font-size: 12px; color: var(--danger-color); margin-top: 2px;">${error}</div>` : nothing}
|
|
113
|
+
</div>
|
|
114
|
+
`;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return html`
|
|
118
|
+
<div class="form-field" style="margin-bottom: 12px;">
|
|
119
|
+
<label for="${inputId}" style="display: block; margin-bottom: 4px; font-weight: 500;">
|
|
120
|
+
${label}
|
|
121
|
+
</label>
|
|
122
|
+
<input
|
|
123
|
+
id="${inputId}"
|
|
124
|
+
type=${type}
|
|
125
|
+
.value=${value}
|
|
126
|
+
placeholder=${placeholder ?? ""}
|
|
127
|
+
maxlength=${maxLength ?? 256}
|
|
128
|
+
style="width: 100%; padding: 8px; border: 1px solid var(--border-color); border-radius: 4px;"
|
|
129
|
+
@input=${(e: InputEvent) => {
|
|
130
|
+
const target = e.target as HTMLInputElement;
|
|
131
|
+
callbacks.onFieldChange(field, target.value);
|
|
132
|
+
}}
|
|
133
|
+
?disabled=${state.saving}
|
|
134
|
+
/>
|
|
135
|
+
${help ? html`<div style="font-size: 12px; color: var(--text-muted); margin-top: 2px;">${help}</div>` : nothing}
|
|
136
|
+
${error ? html`<div style="font-size: 12px; color: var(--danger-color); margin-top: 2px;">${error}</div>` : nothing}
|
|
137
|
+
</div>
|
|
138
|
+
`;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const renderPicturePreview = () => {
|
|
142
|
+
const picture = state.values.picture;
|
|
143
|
+
if (!picture) {
|
|
144
|
+
return nothing;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return html`
|
|
148
|
+
<div style="margin-bottom: 12px;">
|
|
149
|
+
<img
|
|
150
|
+
src=${picture}
|
|
151
|
+
alt="Profile picture preview"
|
|
152
|
+
style="max-width: 80px; max-height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-color);"
|
|
153
|
+
@error=${(e: Event) => {
|
|
154
|
+
const img = e.target as HTMLImageElement;
|
|
155
|
+
img.style.display = "none";
|
|
156
|
+
}}
|
|
157
|
+
@load=${(e: Event) => {
|
|
158
|
+
const img = e.target as HTMLImageElement;
|
|
159
|
+
img.style.display = "block";
|
|
160
|
+
}}
|
|
161
|
+
/>
|
|
162
|
+
</div>
|
|
163
|
+
`;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
return html`
|
|
167
|
+
<div class="nostr-profile-form" style="padding: 16px; background: var(--bg-secondary); border-radius: 8px; margin-top: 12px;">
|
|
168
|
+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;">
|
|
169
|
+
<div style="font-weight: 600; font-size: 16px;">Edit Profile</div>
|
|
170
|
+
<div style="font-size: 12px; color: var(--text-muted);">Account: ${accountId}</div>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
${
|
|
174
|
+
state.error
|
|
175
|
+
? html`<div class="callout danger" style="margin-bottom: 12px;">${state.error}</div>`
|
|
176
|
+
: nothing
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
${
|
|
180
|
+
state.success
|
|
181
|
+
? html`<div class="callout success" style="margin-bottom: 12px;">${state.success}</div>`
|
|
182
|
+
: nothing
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
${renderPicturePreview()}
|
|
186
|
+
|
|
187
|
+
${renderField("name", "Username", {
|
|
188
|
+
placeholder: "satoshi",
|
|
189
|
+
maxLength: 256,
|
|
190
|
+
help: "Short username (e.g., satoshi)",
|
|
191
|
+
})}
|
|
192
|
+
|
|
193
|
+
${renderField("displayName", "Display Name", {
|
|
194
|
+
placeholder: "Satoshi Nakamoto",
|
|
195
|
+
maxLength: 256,
|
|
196
|
+
help: "Your full display name",
|
|
197
|
+
})}
|
|
198
|
+
|
|
199
|
+
${renderField("about", "Bio", {
|
|
200
|
+
type: "textarea",
|
|
201
|
+
placeholder: "Tell people about yourself...",
|
|
202
|
+
maxLength: 2000,
|
|
203
|
+
help: "A brief bio or description",
|
|
204
|
+
})}
|
|
205
|
+
|
|
206
|
+
${renderField("picture", "Avatar URL", {
|
|
207
|
+
type: "url",
|
|
208
|
+
placeholder: "https://example.com/avatar.jpg",
|
|
209
|
+
help: "HTTPS URL to your profile picture",
|
|
210
|
+
})}
|
|
211
|
+
|
|
212
|
+
${
|
|
213
|
+
state.showAdvanced
|
|
214
|
+
? html`
|
|
215
|
+
<div style="border-top: 1px solid var(--border-color); padding-top: 12px; margin-top: 12px;">
|
|
216
|
+
<div style="font-weight: 500; margin-bottom: 12px; color: var(--text-muted);">Advanced</div>
|
|
217
|
+
|
|
218
|
+
${renderField("banner", "Banner URL", {
|
|
219
|
+
type: "url",
|
|
220
|
+
placeholder: "https://example.com/banner.jpg",
|
|
221
|
+
help: "HTTPS URL to a banner image",
|
|
222
|
+
})}
|
|
223
|
+
|
|
224
|
+
${renderField("website", "Website", {
|
|
225
|
+
type: "url",
|
|
226
|
+
placeholder: "https://example.com",
|
|
227
|
+
help: "Your personal website",
|
|
228
|
+
})}
|
|
229
|
+
|
|
230
|
+
${renderField("nip05", "NIP-05 Identifier", {
|
|
231
|
+
placeholder: "you@example.com",
|
|
232
|
+
help: "Verifiable identifier (e.g., you@domain.com)",
|
|
233
|
+
})}
|
|
234
|
+
|
|
235
|
+
${renderField("lud16", "Lightning Address", {
|
|
236
|
+
placeholder: "you@getalby.com",
|
|
237
|
+
help: "Lightning address for tips (LUD-16)",
|
|
238
|
+
})}
|
|
239
|
+
</div>
|
|
240
|
+
`
|
|
241
|
+
: nothing
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
<div style="display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap;">
|
|
245
|
+
<button
|
|
246
|
+
class="btn primary"
|
|
247
|
+
@click=${callbacks.onSave}
|
|
248
|
+
?disabled=${state.saving || !isDirty}
|
|
249
|
+
>
|
|
250
|
+
${state.saving ? "Saving..." : "Save & Publish"}
|
|
251
|
+
</button>
|
|
252
|
+
|
|
253
|
+
<button
|
|
254
|
+
class="btn"
|
|
255
|
+
@click=${callbacks.onImport}
|
|
256
|
+
?disabled=${state.importing || state.saving}
|
|
257
|
+
>
|
|
258
|
+
${state.importing ? "Importing..." : "Import from Relays"}
|
|
259
|
+
</button>
|
|
260
|
+
|
|
261
|
+
<button
|
|
262
|
+
class="btn"
|
|
263
|
+
@click=${callbacks.onToggleAdvanced}
|
|
264
|
+
>
|
|
265
|
+
${state.showAdvanced ? "Hide Advanced" : "Show Advanced"}
|
|
266
|
+
</button>
|
|
267
|
+
|
|
268
|
+
<button
|
|
269
|
+
class="btn"
|
|
270
|
+
@click=${callbacks.onCancel}
|
|
271
|
+
?disabled=${state.saving}
|
|
272
|
+
>
|
|
273
|
+
Cancel
|
|
274
|
+
</button>
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
${
|
|
278
|
+
isDirty
|
|
279
|
+
? html`
|
|
280
|
+
<div style="font-size: 12px; color: var(--warning-color); margin-top: 8px">
|
|
281
|
+
You have unsaved changes
|
|
282
|
+
</div>
|
|
283
|
+
`
|
|
284
|
+
: nothing
|
|
285
|
+
}
|
|
286
|
+
</div>
|
|
287
|
+
`;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// ============================================================================
|
|
291
|
+
// Factory
|
|
292
|
+
// ============================================================================
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Create initial form state from existing profile
|
|
296
|
+
*/
|
|
297
|
+
export function createNostrProfileFormState(
|
|
298
|
+
profile: NostrProfileType | undefined,
|
|
299
|
+
): NostrProfileFormState {
|
|
300
|
+
const values: NostrProfileType = {
|
|
301
|
+
name: profile?.name ?? "",
|
|
302
|
+
displayName: profile?.displayName ?? "",
|
|
303
|
+
about: profile?.about ?? "",
|
|
304
|
+
picture: profile?.picture ?? "",
|
|
305
|
+
banner: profile?.banner ?? "",
|
|
306
|
+
website: profile?.website ?? "",
|
|
307
|
+
nip05: profile?.nip05 ?? "",
|
|
308
|
+
lud16: profile?.lud16 ?? "",
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
return {
|
|
312
|
+
values,
|
|
313
|
+
original: { ...values },
|
|
314
|
+
saving: false,
|
|
315
|
+
importing: false,
|
|
316
|
+
error: null,
|
|
317
|
+
success: null,
|
|
318
|
+
fieldErrors: {},
|
|
319
|
+
showAdvanced: Boolean(profile?.banner || profile?.website || profile?.nip05 || profile?.lud16),
|
|
320
|
+
};
|
|
321
|
+
}
|