@1agh/maude 2.0.8 → 2.1.1
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 +2 -1
- package/apps/hub/src/project-transactions/kernel.mjs +13 -7
- package/apps/studio/access/closure.ts +86 -10
- package/apps/studio/access/filters.ts +18 -1
- package/apps/studio/access/request.ts +8 -0
- package/apps/studio/acp/design-write-verb.ts +12 -2
- package/apps/studio/acp/env.ts +7 -2
- package/apps/studio/acp/index.ts +15 -4
- package/apps/studio/acp/login-state.ts +22 -5
- package/apps/studio/acp/may-scope.ts +38 -1
- package/apps/studio/acp/plugin-bootstrap.ts +13 -1
- package/apps/studio/acp/probe.ts +11 -4
- package/apps/studio/actions/agents.ts +110 -28
- package/apps/studio/actions/canvas-keys.ts +4 -2
- package/apps/studio/actions/ctx.ts +3 -0
- package/apps/studio/actions/defs/annotation.ts +84 -2
- package/apps/studio/actions/defs/app.ts +28 -1
- package/apps/studio/actions/defs/edit.ts +13 -0
- package/apps/studio/actions/defs/export.ts +12 -0
- package/apps/studio/actions/defs/sync.ts +18 -0
- package/apps/studio/actions/defs/video.ts +9 -0
- package/apps/studio/actions/documents.ts +6 -1
- package/apps/studio/actions/keymap.gen.ts +147 -9
- package/apps/studio/actions/menu.ts +5 -1
- package/apps/studio/actions/types.ts +4 -2
- package/apps/studio/actions/verbs.ts +9 -0
- package/apps/studio/actions.manifest.json +300 -45
- package/apps/studio/actions.parity.json +19 -1
- package/apps/studio/ai/save-hold.ts +2 -1
- package/apps/studio/ai/write-claim-scope.ts +7 -1
- package/apps/studio/ai/write-claim.ts +154 -3
- package/apps/studio/annotations/ai-read.ts +42 -6
- package/apps/studio/annotations/ai-write.ts +145 -2
- package/apps/studio/annotations/board-ops.ts +34 -3
- package/apps/studio/annotations/checklist-ops.ts +374 -0
- package/apps/studio/annotations/elements/checkitem.model.ts +129 -0
- package/apps/studio/annotations/elements/sticky.model.ts +54 -2
- package/apps/studio/annotations/ops.ts +30 -0
- package/apps/studio/annotations/registry.ts +9 -1
- package/apps/studio/annotations/templates.ts +4 -2
- package/apps/studio/annotations/text-steps.ts +114 -10
- package/apps/studio/annotations/ui/checklist-wire.ts +129 -0
- package/apps/studio/annotations/ui/checklist.tsx +429 -0
- package/apps/studio/annotations/ui/element-node.tsx +48 -2
- package/apps/studio/annotations/ui/template-place.ts +11 -1
- package/apps/studio/annotations/v1-adapter.ts +22 -3
- package/apps/studio/annotations-context-toolbar.tsx +12 -0
- package/apps/studio/annotations-layer.tsx +442 -49
- package/apps/studio/annotations-model.ts +4 -2
- package/apps/studio/api.ts +148 -21
- package/apps/studio/artboard-live-gate.tsx +54 -17
- package/apps/studio/artboard-still-persist.ts +166 -0
- package/apps/studio/artboard-still-raster.ts +6 -2
- package/apps/studio/artboard-still.ts +390 -20
- package/apps/studio/asset-added.ts +154 -0
- package/apps/studio/asset-details.ts +46 -3
- package/apps/studio/asset-origins.ts +5 -3
- package/apps/studio/asset-trash.ts +6 -1
- package/apps/studio/bin/_agent-browser-safe.mjs +3 -4
- package/apps/studio/bin/_annotate-post.mjs +14 -5
- package/apps/studio/bin/_audio-search.mjs +8 -2
- package/apps/studio/bin/_curl-local.mjs +7 -4
- package/apps/studio/bin/_desktop-locate.sh +145 -0
- package/apps/studio/bin/_ds-check-live.mjs +2 -1
- package/apps/studio/bin/_exports.mjs +38 -2
- package/apps/studio/bin/_history.mjs +79 -8
- package/apps/studio/bin/_import-asset.mjs +14 -9
- package/apps/studio/bin/_import-figma.mjs +510 -98
- package/apps/studio/bin/_index-cli.mjs +10 -21
- package/apps/studio/bin/_ingest-footage.mjs +24 -6
- package/apps/studio/bin/_media-probe.mjs +232 -0
- package/apps/studio/bin/_perf-probe-open.mjs +6 -0
- package/apps/studio/bin/_perf-probe-safari.mjs +6 -0
- package/apps/studio/bin/_perf-probe-studio.mjs +6 -1
- package/apps/studio/bin/_perf-probe.mjs +8 -3
- package/apps/studio/bin/_perf-sweep-shared.mjs +789 -0
- package/apps/studio/bin/_perf-sweep.mjs +240 -0
- package/apps/studio/bin/_record-shot.sh +33 -8
- package/apps/studio/bin/_screenshot-playwright.mjs +45 -2
- package/apps/studio/bin/_studio-verb.mjs +8 -3
- package/apps/studio/bin/_thumb-route.mjs +21 -0
- package/apps/studio/bin/_thumbs-playwright.mjs +83 -1
- package/apps/studio/bin/_transcribe.mjs +22 -6
- package/apps/studio/bin/_unsynced-refs.mjs +22 -0
- package/apps/studio/bin/_url-guard.mjs +120 -5
- package/apps/studio/bin/_url-guard.sh +29 -7
- package/apps/studio/bin/_video-limits.mjs +104 -0
- package/apps/studio/bin/_video-playwright.mjs +119 -19
- package/apps/studio/bin/_video-proxy.mjs +130 -0
- package/apps/studio/bin/_write-claim.mjs +38 -16
- package/apps/studio/bin/annotate.mjs +12 -2
- package/apps/studio/bin/canvas-rects.sh +19 -4
- package/apps/studio/bin/chat-open.sh +7 -1
- package/apps/studio/bin/draw-proof.sh +6 -2
- package/apps/studio/bin/generate.sh +32 -10
- package/apps/studio/bin/handoff.sh +2 -2
- package/apps/studio/bin/perf.sh +96 -15
- package/apps/studio/bin/photo-adjust.sh +6 -3
- package/apps/studio/bin/photo-bg-remove.sh +2 -2
- package/apps/studio/bin/prep.sh +21 -4
- package/apps/studio/bin/read-annotations.mjs +3 -0
- package/apps/studio/bin/runtime-health.sh +27 -1
- package/apps/studio/bin/screenshot.sh +152 -12
- package/apps/studio/bin/server-up.sh +64 -6
- package/apps/studio/bin/smoke.sh +43 -8
- package/apps/studio/bin/to-lottie.sh +3 -2
- package/apps/studio/bin/video-proxy.sh +27 -0
- package/apps/studio/bin/visual-sanity.sh +3 -1
- package/apps/studio/bridge/dgn-protocol.ts +157 -1
- package/apps/studio/bridge/mode-shows.ts +8 -6
- package/apps/studio/bridge/still-webp.ts +233 -0
- package/apps/studio/build.ts +18 -0
- package/apps/studio/canvas-build.ts +93 -11
- package/apps/studio/canvas-comment-mount.tsx +53 -8
- package/apps/studio/canvas-edit.ts +34 -1
- package/apps/studio/canvas-lib-module.ts +210 -0
- package/apps/studio/canvas-lib.tsx +3 -12
- package/apps/studio/canvas-pipeline.ts +111 -5
- package/apps/studio/canvas-shell.tsx +8 -11
- package/apps/studio/canvas-theme-pill.tsx +5 -3
- package/apps/studio/check/index.ts +12 -5
- package/apps/studio/check/video.ts +18 -2
- package/apps/studio/client/app.jsx +65 -7
- package/apps/studio/client/clipboard-relay.ts +193 -16
- package/apps/studio/client/comments-overlay.css +18 -0
- package/apps/studio/client/export-center.jsx +30 -0
- package/apps/studio/client/generate-dialog.jsx +49 -4
- package/apps/studio/client/github.js +7 -0
- package/apps/studio/client/home/HomeAccountsRow.jsx +221 -0
- package/apps/studio/client/home/HomeConnection.jsx +111 -0
- package/apps/studio/client/home/home-accounts-model.js +110 -1
- package/apps/studio/client/home/home-api.js +9 -2
- package/apps/studio/client/home/home-app.jsx +126 -13
- package/apps/studio/client/home/home-model.js +69 -1
- package/apps/studio/client/home/home-where-model.js +105 -0
- package/apps/studio/client/home/home.css +239 -1
- package/apps/studio/client/hooks/use-canvas-bridge.jsx +173 -98
- package/apps/studio/client/hooks/use-palette-and-panels.jsx +5 -1
- package/apps/studio/client/hooks/use-tabs.jsx +11 -4
- package/apps/studio/client/panels/DiffView.jsx +7 -1
- package/apps/studio/client/panels/TeamProjects.jsx +137 -134
- package/apps/studio/client/panels/chat-context.js +2 -0
- package/apps/studio/client/panels/slash-commands.gen.js +13 -13
- package/apps/studio/client/selection-scope.js +16 -9
- package/apps/studio/client/share-link.js +12 -0
- package/apps/studio/client/shell/viewport.jsx +11 -1
- package/apps/studio/client/shell-events.js +8 -0
- package/apps/studio/client/styles/3-kit-maude-v2.css +16 -0
- package/apps/studio/client/styles/_index.css +4 -0
- package/apps/studio/client/v2/ai/Feed.jsx +1 -1
- package/apps/studio/client/v2/ai/OfferCard.jsx +34 -0
- package/apps/studio/client/v2/ai/activity-line.js +54 -1
- package/apps/studio/client/v2/ai/ai-offer.js +21 -1
- package/apps/studio/client/v2/ai/run-model.js +3 -1
- package/apps/studio/client/v2/annotations/vote-store.js +28 -4
- package/apps/studio/client/v2/assets/asset-drop-session.js +37 -2
- package/apps/studio/client/v2/assets/canvas-drop-catcher.jsx +7 -5
- package/apps/studio/client/v2/assets/details-model.js +1 -1
- package/apps/studio/client/v2/assets/details.jsx +5 -0
- package/apps/studio/client/v2/assets/tile-drag.js +11 -7
- package/apps/studio/client/v2/comments/comments-panel.jsx +22 -3
- package/apps/studio/client/v2/create/duplicate-done.js +6 -2
- package/apps/studio/client/v2/diagnostics/diagnostics-host.jsx +1 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-model.js +32 -2
- package/apps/studio/client/v2/diagnostics/diagnostics-sheet.jsx +35 -8
- package/apps/studio/client/v2/diagnostics/diagnostics.css +34 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +113 -3
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +343 -6
- package/apps/studio/client/v2/diagnostics/sync-details/unsynced-refs.js +55 -0
- package/apps/studio/client/v2/ds/review.css +1 -1
- package/apps/studio/client/v2/export/exports-model.js +7 -0
- package/apps/studio/client/v2/export/exports-panel.jsx +1 -0
- package/apps/studio/client/v2/export/job-row.jsx +32 -2
- package/apps/studio/client/v2/handoff/ready-card.jsx +1 -1
- package/apps/studio/client/v2/history/compare-view.jsx +1 -0
- package/apps/studio/client/v2/inspector/css-write.js +6 -1
- package/apps/studio/client/v2/inspector/frame.jsx +28 -4
- package/apps/studio/client/v2/inspector/kinds/clip-model.js +51 -0
- package/apps/studio/client/v2/inspector/kinds/clip.jsx +75 -2
- package/apps/studio/client/v2/inspector/model.js +21 -0
- package/apps/studio/client/v2/inspector/sections/fill.jsx +12 -3
- package/apps/studio/client/v2/inspector/sections/recent-colours.js +8 -5
- package/apps/studio/client/v2/inspector/view-mode.jsx +11 -1
- package/apps/studio/client/v2/link-server/LinkServerDialog.jsx +492 -0
- package/apps/studio/client/v2/link-server/LinkServerHost.jsx +42 -0
- package/apps/studio/client/v2/link-server/link-server-api.js +142 -0
- package/apps/studio/client/v2/link-server/link-server-model.js +438 -0
- package/apps/studio/client/v2/link-server/link-server.css +109 -0
- package/apps/studio/client/v2/onboarding/AdvancedSheets.jsx +31 -86
- package/apps/studio/client/v2/onboarding/onboarding-model.js +1 -18
- package/apps/studio/client/v2/preview/link-follow.js +4 -2
- package/apps/studio/client/v2/preview/preview-chrome-host.jsx +16 -6
- package/apps/studio/client/v2/search/help-model.js +2 -0
- package/apps/studio/client/v2/search/search-keywords.js +3 -2
- package/apps/studio/client/v2/settings/account.jsx +4 -2
- package/apps/studio/client/v2/settings/advanced-section.jsx +344 -137
- package/apps/studio/client/v2/settings/connection-row.jsx +3 -59
- package/apps/studio/client/v2/settings/connections-section.jsx +118 -425
- package/apps/studio/client/v2/settings/general-section.jsx +155 -24
- package/apps/studio/client/v2/settings/project-sync-settings.jsx +4 -3
- package/apps/studio/client/v2/settings/reset-section.jsx +14 -3
- package/apps/studio/client/v2/settings/settings-card.jsx +142 -0
- package/apps/studio/client/v2/settings/settings-cards.js +220 -0
- package/apps/studio/client/v2/settings/settings-handlers.js +7 -6
- package/apps/studio/client/v2/settings/settings-model.js +100 -31
- package/apps/studio/client/v2/settings/settings-sheet.jsx +25 -6
- package/apps/studio/client/v2/settings/settings.css +374 -64
- package/apps/studio/client/v2/settings/this-project-card.jsx +730 -0
- package/apps/studio/client/v2/settings/this-project-model.js +172 -0
- package/apps/studio/client/v2/settings/use-connections.js +3 -2
- package/apps/studio/client/v2/settings/use-open-card.js +37 -0
- package/apps/studio/client/v2/share/share-sheet.jsx +28 -11
- package/apps/studio/client/v2/shell/api-session-boot.js +6 -0
- package/apps/studio/client/v2/shell/api-session.js +126 -0
- package/apps/studio/client/v2/shell/connection-state.js +197 -0
- package/apps/studio/client/v2/shell/floating-panels.css +31 -1
- package/apps/studio/client/v2/shell/image-pick.js +61 -8
- package/apps/studio/client/v2/shell/menu-aim.js +43 -0
- package/apps/studio/client/v2/shell/menu-runner.js +25 -7
- package/apps/studio/client/v2/shell/occlusion-insets.js +18 -1
- package/apps/studio/client/v2/shell/project-account-bus.js +36 -0
- package/apps/studio/client/v2/shell/project-account-card.jsx +357 -148
- package/apps/studio/client/v2/shell/project-account-model.js +272 -149
- package/apps/studio/client/v2/shell/project-account-toast.js +66 -0
- package/apps/studio/client/v2/shell/project-account.css +237 -0
- package/apps/studio/client/v2/shell/project-pill.jsx +52 -6
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +166 -83
- package/apps/studio/client/v2/shell/shell-parity.js +3 -2
- package/apps/studio/client/v2/shell/shell-parity.json +71 -36
- package/apps/studio/client/v2/shell/still-bridge.js +194 -0
- package/apps/studio/client/v2/shell/still-store.js +319 -0
- package/apps/studio/client/v2/shell/use-account.js +2 -0
- package/apps/studio/client/v2/shell/use-tool-panels.js +2 -1
- package/apps/studio/client/v2/signin/use-signin.js +1 -1
- package/apps/studio/client/v2/timeline/Timeline.jsx +15 -0
- package/apps/studio/client/v2/timeline/frame-handle-model.js +142 -0
- package/apps/studio/client/v2/timeline/frame-handle.jsx +151 -0
- package/apps/studio/clip-ops.ts +126 -8
- package/apps/studio/cloud/endpoints.ts +29 -4
- package/apps/studio/collab/ai-activity.ts +10 -8
- package/apps/studio/collab/awareness-bridge.ts +34 -9
- package/apps/studio/collab/index.ts +3 -0
- package/apps/studio/collab/registry.ts +41 -10
- package/apps/studio/comment-reattach.ts +149 -0
- package/apps/studio/comments/mine-stamp.ts +15 -7
- package/apps/studio/comments/ops.ts +52 -8
- package/apps/studio/comments-overlay.tsx +146 -9
- package/apps/studio/dist/client.bundle.js +892 -885
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/dom-selection.ts +87 -18
- package/apps/studio/ds/board/directions.css +8 -0
- package/apps/studio/ds/board/outline.tsx +16 -0
- package/apps/studio/ds/canvas-check.ts +6 -0
- package/apps/studio/edit-ops/clip/reframe.ts +19 -3
- package/apps/studio/edit-ops/clip-carry.ts +602 -0
- package/apps/studio/edit-ops/clipboard.ts +318 -23
- package/apps/studio/edit-ops/dispatch.ts +20 -2
- package/apps/studio/edit-ops/scope-names.ts +249 -40
- package/apps/studio/edit-ops/slot-defaults.ts +3 -0
- package/apps/studio/edit-ops/types.ts +6 -0
- package/apps/studio/editing/align-bar.tsx +33 -9
- package/apps/studio/editing/artboard-actions.ts +5 -0
- package/apps/studio/editing/artboard-menu.tsx +6 -2
- package/apps/studio/editing/click-to-type.ts +1 -1
- package/apps/studio/editing/clip-words.ts +48 -0
- package/apps/studio/editing/clipboard.ts +21 -6
- package/apps/studio/editing/declared-background.ts +25 -0
- package/apps/studio/editing/index.tsx +3 -0
- package/apps/studio/editing/object-keys.ts +4 -4
- package/apps/studio/editing/object-menu.tsx +13 -3
- package/apps/studio/editing/pen/points.tsx +61 -0
- package/apps/studio/editing/text-in-place.tsx +11 -0
- package/apps/studio/editing/video-frame-handle.tsx +425 -0
- package/apps/studio/exporters/capture-prepass.ts +374 -0
- package/apps/studio/exporters/degraded.ts +148 -0
- package/apps/studio/exporters/hub-render-door.ts +28 -2
- package/apps/studio/exporters/index.ts +3 -1
- package/apps/studio/exporters/job-budget.ts +93 -0
- package/apps/studio/exporters/jobs.ts +215 -28
- package/apps/studio/exporters/parity-check.ts +254 -0
- package/apps/studio/exporters/remote.ts +209 -15
- package/apps/studio/exporters/svg-inline.ts +87 -0
- package/apps/studio/exporters/video-render-lib.ts +88 -26
- package/apps/studio/exporters/video.ts +29 -6
- package/apps/studio/figma/assets.ts +58 -43
- package/apps/studio/figma/codegen-fonts.ts +100 -0
- package/apps/studio/figma/fig-decode.ts +390 -25
- package/apps/studio/figma/fig-kiwi.ts +18 -4
- package/apps/studio/figma/fig-vector.ts +59 -3
- package/apps/studio/figma/sanitize.ts +2 -0
- package/apps/studio/figma/style-map.ts +293 -48
- package/apps/studio/figma/to-artboard.ts +455 -69
- package/apps/studio/figma/to-strokes.ts +44 -11
- package/apps/studio/figma/types.ts +13 -0
- package/apps/studio/footage/schema.ts +3 -3
- package/apps/studio/generation/adapters/elevenlabs.ts +7 -1
- package/apps/studio/generation/adapters/groq.ts +8 -1
- package/apps/studio/generation/spend.ts +312 -0
- package/apps/studio/generation/types.ts +12 -0
- package/apps/studio/handoff/run.ts +1 -1
- package/apps/studio/handoff/targets.ts +2 -2
- package/apps/studio/handoff/write-scopes.ts +1 -1
- package/apps/studio/history/describe-annotations.ts +4 -0
- package/apps/studio/home/accounts.ts +30 -11
- package/apps/studio/home/cloud.ts +6 -1
- package/apps/studio/home/create-local.ts +32 -3
- package/apps/studio/home/hub-health.ts +76 -0
- package/apps/studio/home/routes.ts +15 -4
- package/apps/studio/http.ts +438 -86
- package/apps/studio/imported-module-ids.ts +91 -0
- package/apps/studio/inspect.ts +2 -0
- package/apps/studio/migrate/hub.ts +8 -1
- package/apps/studio/notifications.tsx +47 -5
- package/apps/studio/paths.ts +10 -1
- package/apps/studio/port.ts +3 -2
- package/apps/studio/preview/preview-camera.tsx +15 -382
- package/apps/studio/readiness.ts +10 -1
- package/apps/studio/release-build.ts +51 -0
- package/apps/studio/routes/agent.ts +188 -9
- package/apps/studio/routes/ai.ts +43 -11
- package/apps/studio/routes/annotations.ts +27 -1
- package/apps/studio/routes/assets.ts +18 -1
- package/apps/studio/routes/canvas-origin.ts +12 -9
- package/apps/studio/routes/cloud-move.ts +15 -0
- package/apps/studio/routes/edit.ts +3 -0
- package/apps/studio/routes/export.ts +51 -0
- package/apps/studio/routes/generate.ts +42 -12
- package/apps/studio/routes/hub-link-folder.ts +334 -0
- package/apps/studio/routes/hub-signin.ts +78 -1
- package/apps/studio/routes/index.ts +9 -1
- package/apps/studio/routes/shell.ts +217 -5
- package/apps/studio/routes/sync.ts +136 -8
- package/apps/studio/routes/votes.ts +2 -1
- package/apps/studio/schema/annotations.v2.schema.json +143 -1
- package/apps/studio/schema/beats.v1.schema.json +1 -1
- package/apps/studio/schema/edl.v1.schema.json +1 -1
- package/apps/studio/schema/formats.ts +3 -3
- package/apps/studio/schema/transcript.v1.schema.json +1 -1
- package/apps/studio/server.ts +142 -43
- package/apps/studio/shell/api-key.ts +503 -0
- package/apps/studio/shell/attest.ts +59 -0
- package/apps/studio/shell/capture-url.ts +20 -0
- package/apps/studio/shell/cli-yield.ts +276 -0
- package/apps/studio/shell/clip-transfer.ts +302 -0
- package/apps/studio/shell/key-file.ts +108 -0
- package/apps/studio/shell/server-json.ts +75 -0
- package/apps/studio/shell/worktree.ts +19 -0
- package/apps/studio/spoof-chars.ts +9 -0
- package/apps/studio/studio-page-host.ts +1 -1
- package/apps/studio/sync/accepted-cold-start.ts +144 -8
- package/apps/studio/sync/accepted-link.ts +76 -29
- package/apps/studio/sync/action-stage.ts +575 -44
- package/apps/studio/sync/adopt-held.ts +85 -0
- package/apps/studio/sync/ctl-heal.ts +58 -0
- package/apps/studio/sync/file-ledger.ts +38 -4
- package/apps/studio/sync/file-membership.ts +16 -1
- package/apps/studio/sync/file-plane.ts +289 -22
- package/apps/studio/sync/held-deletes.ts +86 -5
- package/apps/studio/sync/hub-link.ts +8 -0
- package/apps/studio/sync/index.ts +196 -12
- package/apps/studio/sync/journal-client.ts +50 -4
- package/apps/studio/sync/link-consent.ts +22 -75
- package/apps/studio/sync/link-survey.ts +252 -0
- package/apps/studio/sync/local-kernel.ts +296 -8
- package/apps/studio/sync/projection.ts +22 -3
- package/apps/studio/sync/seed-progress.ts +12 -0
- package/apps/studio/sync/source-recovery.ts +59 -3
- package/apps/studio/sync/status.ts +19 -2
- package/apps/studio/sync/unsynced-refs.ts +397 -0
- package/apps/studio/sync/writer-registry.ts +20 -0
- package/apps/studio/thumbs/service.ts +4 -1
- package/apps/studio/tool-palette.tsx +23 -0
- package/apps/studio/ui-prefs.ts +40 -0
- package/apps/studio/use-agent-presence.tsx +2 -2
- package/apps/studio/use-canvas-keys.ts +6 -1
- package/apps/studio/video/format-ids.ts +2 -2
- package/apps/studio/video/inject.ts +31 -0
- package/apps/studio/video/media-risk.ts +58 -0
- package/apps/studio/video/object-fit.ts +137 -0
- package/apps/studio/video/provider-transcript.ts +141 -0
- package/apps/studio/whats-new.json +137 -0
- package/apps/studio/workspace-mode.ts +1 -0
- package/apps/studio/ws.ts +5 -0
- package/cli/commands/design.mjs +119 -8
- package/cli/lib/bash-guard.mjs +366 -6
- package/cli/lib/confine-read.mjs +1 -0
- package/cli/lib/design-help.gen.mjs +3 -2
- package/cli/lib/design-hook.mjs +387 -81
- package/cli/lib/design-link.mjs +16 -1
- package/cli/lib/design-open.mjs +49 -3
- package/cli/lib/desktop-locate.mjs +770 -0
- package/cli/lib/handoff.mjs +1 -1
- package/cli/lib/hook-state.mjs +291 -0
- package/cli/lib/pkg-root.mjs +65 -13
- package/cli/lib/studio-locate.mjs +59 -16
- package/package.json +15 -8
- package/plugins/design/templates/_shell.html +13 -0
- package/apps/studio/client/v2/onboarding/HubSheet.jsx +0 -212
- package/apps/studio/client/v2/shell/account-card-model.js +0 -114
- package/apps/studio/client/v2/shell/account-card.jsx +0 -189
|
@@ -1,18 +1,132 @@
|
|
|
1
|
-
// client/v2/shell/project-account-card.jsx — 2.
|
|
2
|
-
//
|
|
1
|
+
// client/v2/shell/project-account-card.jsx — 2.1.1 T2/T4: the account chip, its menu, Switch account and
|
|
2
|
+
// its confirm sheet (canvas 17 Accounts and Connections · ac-states, ac-menu-broken, ac-menus, ac-switch).
|
|
3
3
|
//
|
|
4
|
-
// PRESENTATIONAL.
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// exists (a browser tab gets the facts and no button). Sign out asks first (CONTRACT §4).
|
|
4
|
+
// PRESENTATIONAL. Every word comes from project-account-model.js; the host (share-cluster-host.jsx) runs
|
|
5
|
+
// what a row asks for: a registry action (`onAction(id, params)`), the broken sign-in's one button
|
|
6
|
+
// (`onFix(fix)`), a switch (`onUse(row)`, after this sheet). A row exists only where its path does.
|
|
8
7
|
|
|
9
|
-
import { useEffect, useRef
|
|
8
|
+
import { useEffect, useRef } from 'react';
|
|
9
|
+
import { StIcon } from '../../shell/icons.jsx';
|
|
10
10
|
import { onCanvasPointer } from './canvas-pointer.js';
|
|
11
11
|
|
|
12
|
+
/** The team-server glyph (the kit's server; the shell icon set has none). */
|
|
13
|
+
function ServerGlyph({ size = 13 }) {
|
|
14
|
+
return (
|
|
15
|
+
<svg
|
|
16
|
+
width={size}
|
|
17
|
+
height={size}
|
|
18
|
+
viewBox="0 0 16 16"
|
|
19
|
+
fill="none"
|
|
20
|
+
stroke="currentColor"
|
|
21
|
+
strokeWidth={1.6}
|
|
22
|
+
strokeLinecap="round"
|
|
23
|
+
aria-hidden="true"
|
|
24
|
+
>
|
|
25
|
+
<rect x="2.5" y="2.5" width="11" height="4.5" rx="1.2" />
|
|
26
|
+
<rect x="2.5" y="9" width="11" height="4.5" rx="1.2" />
|
|
27
|
+
<path d="M5 4.75h.01M5 11.25h.01" />
|
|
28
|
+
</svg>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** The broken-link glyph — only for a sign-in the person can fix (canvas 17 `BrokenLink`). */
|
|
33
|
+
export function BrokenLinkGlyph({ size = 10 }) {
|
|
34
|
+
return (
|
|
35
|
+
<svg
|
|
36
|
+
width={size}
|
|
37
|
+
height={size}
|
|
38
|
+
viewBox="0 0 16 16"
|
|
39
|
+
fill="none"
|
|
40
|
+
stroke="currentColor"
|
|
41
|
+
strokeWidth={1.8}
|
|
42
|
+
strokeLinecap="round"
|
|
43
|
+
strokeLinejoin="round"
|
|
44
|
+
aria-hidden="true"
|
|
45
|
+
>
|
|
46
|
+
<path d="M6.6 9.4 5.1 10.9a2.1 2.1 0 0 1-3-3l1.5-1.5" />
|
|
47
|
+
<path d="M9.4 6.6 10.9 5.1a2.1 2.1 0 0 1 3 3l-1.5 1.5" />
|
|
48
|
+
<path d="M5.2 1.8v1.6M1.8 5.2h1.6M10.8 14.2v-1.6M14.2 10.8h-1.6" />
|
|
49
|
+
</svg>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const Glyph = ({ name, size = 14 }) =>
|
|
54
|
+
name === 'server' ? <ServerGlyph size={size} /> : <StIcon name={name} size={size} />;
|
|
55
|
+
|
|
56
|
+
/** An account's face: circle + letter (Maude Cloud), server tile (your server), laptop (this Mac only). */
|
|
57
|
+
export function AccountFace({ kind, initial = '', tone = 'grey', badge = null, size = 'md' }) {
|
|
58
|
+
const ic = size === 'sm' ? 10 : 13;
|
|
59
|
+
return (
|
|
60
|
+
<span className={`sh-af sh-af--${size}`} data-kind={kind} data-badge={badge || undefined}>
|
|
61
|
+
{kind === 'cloud' ? (
|
|
62
|
+
<span
|
|
63
|
+
className={`sh-acct-face sh-af-circle sh-af-circle--${size}`}
|
|
64
|
+
data-tone={tone}
|
|
65
|
+
aria-hidden="true"
|
|
66
|
+
>
|
|
67
|
+
{initial}
|
|
68
|
+
</span>
|
|
69
|
+
) : (
|
|
70
|
+
<span className="sh-af-tile" data-kind={kind} aria-hidden="true">
|
|
71
|
+
<Glyph name={kind === 'server' ? 'server' : 'laptop'} size={ic} />
|
|
72
|
+
</span>
|
|
73
|
+
)}
|
|
74
|
+
{badge === 'ring' ? (
|
|
75
|
+
<svg className="sh-af-ring" viewBox="0 0 36 36" aria-hidden="true">
|
|
76
|
+
<circle
|
|
77
|
+
cx="18"
|
|
78
|
+
cy="18"
|
|
79
|
+
r="16"
|
|
80
|
+
fill="none"
|
|
81
|
+
strokeWidth="2.5"
|
|
82
|
+
strokeLinecap="round"
|
|
83
|
+
strokeDasharray="30 100"
|
|
84
|
+
/>
|
|
85
|
+
</svg>
|
|
86
|
+
) : null}
|
|
87
|
+
{badge === 'broken' || badge === 'warn' ? (
|
|
88
|
+
<span
|
|
89
|
+
className={`sh-af-badge sh-af-badge--${badge}`}
|
|
90
|
+
data-testid="share-cluster-account-badge"
|
|
91
|
+
data-badge={badge}
|
|
92
|
+
>
|
|
93
|
+
{badge === 'broken' ? <BrokenLinkGlyph size={8} /> : <StIcon name="problem" size={8} />}
|
|
94
|
+
</span>
|
|
95
|
+
) : null}
|
|
96
|
+
</span>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** The account chip, first in the Share cluster: face · where · chevron. Opens the account menu. */
|
|
101
|
+
export function AccountChip({ face, accountId = null, onOpen, opened = false }) {
|
|
102
|
+
if (!face) return null;
|
|
103
|
+
return (
|
|
104
|
+
<div className="sh-acct">
|
|
105
|
+
<button
|
|
106
|
+
type="button"
|
|
107
|
+
className={`sh-acct-chip${opened ? ' is-on' : ''}`}
|
|
108
|
+
data-testid="share-cluster-account"
|
|
109
|
+
data-account={accountId || undefined}
|
|
110
|
+
data-kind={face.kind}
|
|
111
|
+
data-conn={face.state}
|
|
112
|
+
data-account-opener="true"
|
|
113
|
+
aria-haspopup="menu"
|
|
114
|
+
aria-expanded={opened ? 'true' : 'false'}
|
|
115
|
+
aria-label={`Account: ${face.title}`}
|
|
116
|
+
title={face.title}
|
|
117
|
+
onClick={() => onOpen?.()}
|
|
118
|
+
>
|
|
119
|
+
<AccountFace kind={face.kind} initial={face.initial} tone={face.tone} badge={face.badge} />
|
|
120
|
+
<span className="sh-acct-name">{face.label}</span>
|
|
121
|
+
<StIcon name="chevron-down" size={12} />
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
12
127
|
/**
|
|
13
|
-
* The popover the
|
|
14
|
-
* canvas close it; a press on an opener (`data-account-opener`
|
|
15
|
-
* opener's own toggle, so it is not an outside press.
|
|
128
|
+
* The popover the menu sits in, under the Share cluster's start. Esc, a press outside and a press in the
|
|
129
|
+
* canvas close it; a press on an opener (`data-account-opener`) is the opener's own toggle.
|
|
16
130
|
*/
|
|
17
131
|
export function ProjectAccountPopover({ open, onClose, children }) {
|
|
18
132
|
const wrap = useRef(null);
|
|
@@ -38,166 +152,261 @@ export function ProjectAccountPopover({ open, onClose, children }) {
|
|
|
38
152
|
}, [open, onClose]);
|
|
39
153
|
if (!open) return null;
|
|
40
154
|
return (
|
|
41
|
-
<div className="sh-acct-card sh-pa-pop" role="dialog" aria-label="Account" ref={wrap}>
|
|
155
|
+
<div className="sh-acct-card sh-pa-pop sh-am-pop" role="dialog" aria-label="Account" ref={wrap}>
|
|
42
156
|
{children}
|
|
43
157
|
</div>
|
|
44
158
|
);
|
|
45
159
|
}
|
|
46
160
|
|
|
47
|
-
function Line({
|
|
48
|
-
if (!children) return null;
|
|
161
|
+
function Line({ icon, testid, children }) {
|
|
49
162
|
return (
|
|
50
|
-
<
|
|
51
|
-
<span className="sh-
|
|
52
|
-
<span className="sh-
|
|
53
|
-
|
|
54
|
-
</span>
|
|
55
|
-
</div>
|
|
163
|
+
<span className="sh-am-line" data-testid={testid}>
|
|
164
|
+
<span className="sh-am-ic">{icon}</span>
|
|
165
|
+
<span className="sh-am-txt">{children}</span>
|
|
166
|
+
</span>
|
|
56
167
|
);
|
|
57
168
|
}
|
|
58
169
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
title: `Sign out of @${gh.login}?`,
|
|
77
|
-
body: 'Every project on it is signed out of GitHub. Your work stays on this Mac.',
|
|
78
|
-
primary: 'Sign out',
|
|
79
|
-
cancel: 'Cancel',
|
|
80
|
-
},
|
|
81
|
-
}
|
|
82
|
-
: null;
|
|
83
|
-
|
|
84
|
-
const confirm = async () => {
|
|
85
|
-
const spec = asking;
|
|
86
|
-
setBusy(true);
|
|
87
|
-
try {
|
|
88
|
-
await onSignOut?.(spec.path);
|
|
89
|
-
} finally {
|
|
90
|
-
setBusy(false);
|
|
91
|
-
setAsking(null);
|
|
92
|
-
onClose?.();
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
const go = (id) => {
|
|
96
|
-
onClose?.();
|
|
97
|
-
run?.(id);
|
|
98
|
-
};
|
|
170
|
+
function Row({ icon, label, testid, onClick, sub = false, keys = null, current = false }) {
|
|
171
|
+
return (
|
|
172
|
+
<button
|
|
173
|
+
type="button"
|
|
174
|
+
role="menuitem"
|
|
175
|
+
className="sh-acct-act sh-am-row"
|
|
176
|
+
data-testid={testid}
|
|
177
|
+
data-on={current ? 'true' : undefined}
|
|
178
|
+
onClick={onClick}
|
|
179
|
+
>
|
|
180
|
+
<span className="sh-am-ic">{icon}</span>
|
|
181
|
+
<span className="sh-am-lab">{label}</span>
|
|
182
|
+
{keys ? <span className="sh-am-keys">{keys}</span> : null}
|
|
183
|
+
{sub ? <StIcon name="submenu" size={12} /> : null}
|
|
184
|
+
</button>
|
|
185
|
+
);
|
|
186
|
+
}
|
|
99
187
|
|
|
188
|
+
/** The project block — name · where it lives · account · status; red with the fix when broken. */
|
|
189
|
+
function ProjectBlock({ menu, face, onFix }) {
|
|
190
|
+
const { where, account, status, fix } = menu;
|
|
100
191
|
return (
|
|
101
|
-
<div
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
192
|
+
<div
|
|
193
|
+
className={`sh-am-pb${menu.bad ? ' sh-am-pb--bad' : ''}`}
|
|
194
|
+
data-testid="account-menu-project"
|
|
195
|
+
data-bad={menu.bad ? 'true' : undefined}
|
|
196
|
+
>
|
|
197
|
+
<strong className="sh-am-name">{menu.name}</strong>
|
|
198
|
+
<Line
|
|
199
|
+
icon={
|
|
200
|
+
<Glyph
|
|
201
|
+
name={where.kind === 'server' ? 'server' : where.kind === 'kept' ? 'sparkle' : 'folder'}
|
|
202
|
+
size={13}
|
|
203
|
+
/>
|
|
204
|
+
}
|
|
205
|
+
testid="account-menu-where"
|
|
206
|
+
>
|
|
207
|
+
{where.text}
|
|
208
|
+
{where.mono ? <span className="sh-am-mono"> {where.mono}</span> : null}
|
|
209
|
+
{where.extra ? <span className="sh-am-q"> · {where.extra}</span> : null}
|
|
105
210
|
</Line>
|
|
106
|
-
<Line
|
|
107
|
-
{
|
|
211
|
+
<Line
|
|
212
|
+
icon={
|
|
213
|
+
<AccountFace kind={account.kind} initial={face?.initial} tone={face?.tone} size="sm" />
|
|
214
|
+
}
|
|
215
|
+
testid="account-menu-account"
|
|
216
|
+
>
|
|
217
|
+
{account.text}
|
|
218
|
+
{account.sub ? <span className="sh-am-q"> · {account.sub}</span> : null}
|
|
108
219
|
</Line>
|
|
109
|
-
<Line
|
|
110
|
-
{
|
|
220
|
+
<Line
|
|
221
|
+
icon={<span className="sh-am-dot" data-tone={status.tone} />}
|
|
222
|
+
testid="account-menu-status"
|
|
223
|
+
>
|
|
224
|
+
<span className="sh-am-status" data-tone={status.tone}>
|
|
225
|
+
{status.text}
|
|
226
|
+
</span>
|
|
111
227
|
</Line>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
{gh?.note ? (
|
|
121
|
-
<p className="sh-pa-note" data-testid="project-account-github-note">
|
|
122
|
-
{gh.note}
|
|
123
|
-
</p>
|
|
124
|
-
) : null}
|
|
125
|
-
|
|
126
|
-
{asking ? (
|
|
127
|
-
<div className="sh-acct-ask" role="alertdialog" data-testid="project-account-confirm">
|
|
128
|
-
<strong>{asking.confirm.title}</strong>
|
|
129
|
-
<span>{asking.confirm.body}</span>
|
|
130
|
-
<span className="sh-acct-btns">
|
|
228
|
+
{fix ? (
|
|
229
|
+
<div className="sh-am-fix">
|
|
230
|
+
<span className="sh-am-fixt">{fix.text}</span>
|
|
231
|
+
<span className="sh-am-fixr">
|
|
232
|
+
<span className="sh-am-addr" data-testid="account-menu-fix-address">
|
|
233
|
+
<ServerGlyph size={12} />
|
|
234
|
+
{fix.address}
|
|
235
|
+
</span>
|
|
131
236
|
<button
|
|
132
237
|
type="button"
|
|
133
|
-
className="btn btn--sm"
|
|
134
|
-
data-testid="
|
|
135
|
-
onClick={() =>
|
|
238
|
+
className="btn btn--primary btn--sm"
|
|
239
|
+
data-testid="account-menu-fix"
|
|
240
|
+
onClick={() => onFix?.(fix)}
|
|
136
241
|
>
|
|
137
|
-
{
|
|
138
|
-
</button>
|
|
139
|
-
<button
|
|
140
|
-
type="button"
|
|
141
|
-
className="btn btn--sm btn--danger"
|
|
142
|
-
data-testid="project-account-signout-confirm"
|
|
143
|
-
disabled={busy}
|
|
144
|
-
onClick={confirm}
|
|
145
|
-
>
|
|
146
|
-
{asking.confirm.primary}
|
|
242
|
+
{fix.label}
|
|
147
243
|
</button>
|
|
148
244
|
</span>
|
|
149
245
|
</div>
|
|
150
|
-
) :
|
|
246
|
+
) : null}
|
|
247
|
+
</div>
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/** Switch account — the accounts already on this Mac; the current one ticked; adding one is the foot. */
|
|
252
|
+
function SwitchList({ list, onPick, onAction, onBack }) {
|
|
253
|
+
return (
|
|
254
|
+
<div className="sh-am-sub" role="menu" data-testid="account-switch">
|
|
255
|
+
<button type="button" className="sh-acct-act sh-am-back" onClick={onBack}>
|
|
256
|
+
<StIcon name="chevron-down" size={12} />
|
|
257
|
+
<span className="sh-am-gt">Use for this project</span>
|
|
258
|
+
</button>
|
|
259
|
+
{list.rows.map((r) => (
|
|
260
|
+
<button
|
|
261
|
+
type="button"
|
|
262
|
+
role="menuitemradio"
|
|
263
|
+
aria-checked={r.current ? 'true' : 'false'}
|
|
264
|
+
key={r.id}
|
|
265
|
+
className="sh-acct-act sh-am-row sh-am-row--two"
|
|
266
|
+
data-testid={`account-switch-row-${r.id}`}
|
|
267
|
+
data-on={r.current ? 'true' : undefined}
|
|
268
|
+
onClick={() => (r.current ? onBack() : onPick(r))}
|
|
269
|
+
>
|
|
270
|
+
<span className="sh-am-ic">{r.current ? <StIcon name="check" size={14} /> : null}</span>
|
|
271
|
+
<AccountFace kind={r.kind} initial={r.initial} tone={r.tone} />
|
|
272
|
+
<span className="sh-am-two">
|
|
273
|
+
<strong>{r.title}</strong>
|
|
274
|
+
<span>{r.sub}</span>
|
|
275
|
+
</span>
|
|
276
|
+
</button>
|
|
277
|
+
))}
|
|
278
|
+
<hr className="sh-acct-sep" />
|
|
279
|
+
{list.foot.map((f) => (
|
|
280
|
+
<Row
|
|
281
|
+
key={f.label}
|
|
282
|
+
icon={<Glyph name={f.icon} size={14} />}
|
|
283
|
+
label={f.label}
|
|
284
|
+
testid={
|
|
285
|
+
f.id === 'account.add-cloud'
|
|
286
|
+
? 'account-switch-add-cloud'
|
|
287
|
+
: 'account-switch-custom-server'
|
|
288
|
+
}
|
|
289
|
+
onClick={() => onAction(f.id, f.params)}
|
|
290
|
+
/>
|
|
291
|
+
))}
|
|
292
|
+
</div>
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/** The confirm sheet before a switch: which account, nothing moves, the way back. */
|
|
297
|
+
export function SwitchSheet({ sheet, busy = false, onCancel, onConfirm }) {
|
|
298
|
+
if (!sheet) return null;
|
|
299
|
+
return (
|
|
300
|
+
<div
|
|
301
|
+
className="sh-am-sheet"
|
|
302
|
+
role="alertdialog"
|
|
303
|
+
aria-label={sheet.title}
|
|
304
|
+
data-testid="account-switch-sheet"
|
|
305
|
+
>
|
|
306
|
+
<strong className="sh-am-sheet-h">{sheet.title}</strong>
|
|
307
|
+
{sheet.lines.map((l) => (
|
|
308
|
+
<span key={l.icon} className="sh-am-conf">
|
|
309
|
+
<StIcon name={l.icon} size={14} />
|
|
310
|
+
<span>
|
|
311
|
+
{l.text}
|
|
312
|
+
{l.mono ? <span className="sh-am-mono">{l.mono}</span> : null}
|
|
313
|
+
{l.strong ? <strong>{l.strong}</strong> : null}
|
|
314
|
+
{l.after ?? null}
|
|
315
|
+
</span>
|
|
316
|
+
</span>
|
|
317
|
+
))}
|
|
318
|
+
<span className="sh-acct-btns">
|
|
319
|
+
<button
|
|
320
|
+
type="button"
|
|
321
|
+
className="btn btn--sm"
|
|
322
|
+
data-testid="account-switch-sheet-cancel"
|
|
323
|
+
onClick={onCancel}
|
|
324
|
+
>
|
|
325
|
+
{sheet.cancel}
|
|
326
|
+
</button>
|
|
327
|
+
<button
|
|
328
|
+
type="button"
|
|
329
|
+
className="btn btn--sm btn--primary"
|
|
330
|
+
data-testid="account-switch-sheet-confirm"
|
|
331
|
+
disabled={busy}
|
|
332
|
+
onClick={onConfirm}
|
|
333
|
+
>
|
|
334
|
+
{sheet.primary}
|
|
335
|
+
</button>
|
|
336
|
+
</span>
|
|
337
|
+
</div>
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* The avatar menu.
|
|
343
|
+
* @param menu accountMenu()
|
|
344
|
+
* @param face accountFace()
|
|
345
|
+
* @param list switchList()
|
|
346
|
+
* @param view 'menu' | 'switch'
|
|
347
|
+
* @param onView (view) => void
|
|
348
|
+
* @param onAction (id, params?) => void — a registry action, or 'show-in-finder' / 'retry'
|
|
349
|
+
* @param onFix (fix) => void — the broken sign-in's button
|
|
350
|
+
* @param onPick (row) => void — a Switch account row (the host asks with the sheet)
|
|
351
|
+
*/
|
|
352
|
+
export function ProjectAccountMenu({
|
|
353
|
+
menu,
|
|
354
|
+
face,
|
|
355
|
+
list,
|
|
356
|
+
view = 'menu',
|
|
357
|
+
onView,
|
|
358
|
+
onAction,
|
|
359
|
+
onFix,
|
|
360
|
+
onPick,
|
|
361
|
+
}) {
|
|
362
|
+
if (!menu) return null;
|
|
363
|
+
if (view === 'switch' && list && menu.switch === 'list')
|
|
364
|
+
return (
|
|
365
|
+
<SwitchList list={list} onPick={onPick} onAction={onAction} onBack={() => onView?.('menu')} />
|
|
366
|
+
);
|
|
367
|
+
return (
|
|
368
|
+
<div className="sh-am" role="menu" data-testid="account-menu" data-state={face?.state}>
|
|
369
|
+
<ProjectBlock menu={menu} face={face} onFix={onFix} />
|
|
370
|
+
{menu.actions.length ? <hr className="sh-acct-sep" /> : null}
|
|
371
|
+
{menu.actions.map((a) => (
|
|
372
|
+
<Row
|
|
373
|
+
key={a.id}
|
|
374
|
+
icon={<Glyph name={a.icon} />}
|
|
375
|
+
label={a.label}
|
|
376
|
+
testid={`account-menu-action-${a.id}`}
|
|
377
|
+
onClick={() => onAction(a.id)}
|
|
378
|
+
/>
|
|
379
|
+
))}
|
|
380
|
+
{menu.switch ? (
|
|
151
381
|
<>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
<button
|
|
171
|
-
type="button"
|
|
172
|
-
className="sh-acct-act"
|
|
173
|
-
data-testid="project-account-github-signin"
|
|
174
|
-
onClick={() => go('account.github-signin')}
|
|
175
|
-
>
|
|
176
|
-
Sign in with GitHub…
|
|
177
|
-
</button>
|
|
178
|
-
) : null}
|
|
179
|
-
{account.signOut ? (
|
|
180
|
-
<button
|
|
181
|
-
type="button"
|
|
182
|
-
className="sh-acct-act"
|
|
183
|
-
data-testid="project-account-signout"
|
|
184
|
-
onClick={() => setAsking(account.signOut)}
|
|
185
|
-
>
|
|
186
|
-
{account.signOut.label}
|
|
187
|
-
</button>
|
|
188
|
-
) : null}
|
|
189
|
-
{ghOut ? (
|
|
190
|
-
<button
|
|
191
|
-
type="button"
|
|
192
|
-
className="sh-acct-act"
|
|
193
|
-
data-testid="project-account-github-signout"
|
|
194
|
-
onClick={() => setAsking(ghOut)}
|
|
195
|
-
>
|
|
196
|
-
{ghOut.label}
|
|
197
|
-
</button>
|
|
198
|
-
) : null}
|
|
382
|
+
<hr className="sh-acct-sep" />
|
|
383
|
+
<span className="sh-am-gt">Account</span>
|
|
384
|
+
<Row
|
|
385
|
+
icon={
|
|
386
|
+
<AccountFace
|
|
387
|
+
kind={face?.kind ?? 'local'}
|
|
388
|
+
initial={face?.initial}
|
|
389
|
+
tone={face?.tone}
|
|
390
|
+
size="sm"
|
|
391
|
+
/>
|
|
392
|
+
}
|
|
393
|
+
label={menu.switch === 'list' ? 'Switch account' : 'Switch account…'}
|
|
394
|
+
testid="account-menu-switch"
|
|
395
|
+
sub={menu.switch === 'list'}
|
|
396
|
+
onClick={() =>
|
|
397
|
+
menu.switch === 'list' ? onView?.('switch') : onAction('account.switch')
|
|
398
|
+
}
|
|
399
|
+
/>
|
|
199
400
|
</>
|
|
200
|
-
)}
|
|
401
|
+
) : null}
|
|
402
|
+
<hr className="sh-acct-sep" />
|
|
403
|
+
<Row
|
|
404
|
+
icon={<StIcon name="sliders" size={14} />}
|
|
405
|
+
label="Project settings…"
|
|
406
|
+
keys="⌘,"
|
|
407
|
+
testid="account-menu-settings"
|
|
408
|
+
onClick={() => onAction('settings.open')}
|
|
409
|
+
/>
|
|
201
410
|
</div>
|
|
202
411
|
);
|
|
203
412
|
}
|