@agent-native/core 0.80.11 → 0.81.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/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +47 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/design-connect.ts +419 -19
- package/corpus/core/src/client/ConnectBuilderCard.tsx +1 -0
- package/corpus/core/src/client/chat/index.ts +1 -0
- package/corpus/core/src/client/chat/run-recovery.tsx +9 -7
- package/corpus/core/src/client/chat-view-transition.ts +33 -2
- package/corpus/core/src/client/composer/PromptComposer.tsx +21 -2
- package/corpus/core/src/client/index.ts +1 -0
- package/corpus/core/src/client/org/OrgSwitcher.tsx +26 -4
- package/corpus/core/src/client/sharing/ShareButton.tsx +3 -3
- package/corpus/core/src/client/use-agent-chat-home-handoff.ts +31 -3
- package/corpus/core/src/db/client.ts +29 -2
- package/corpus/core/src/provider-api/index.ts +29 -0
- package/corpus/core/src/server/core-routes-plugin.ts +58 -20
- package/corpus/core/src/styles/agent-native.css +54 -0
- package/corpus/core/src/usage/store.ts +2 -2
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +118 -10
- package/corpus/templates/analytics/app/components/layout/layout-route-policy.ts +7 -0
- package/corpus/templates/analytics/app/global.css +8 -0
- package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +7 -1
- package/corpus/templates/analytics/app/lib/chat-handoff.ts +34 -0
- package/corpus/templates/analytics/app/pages/Ask.tsx +9 -18
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +2 -2
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +109 -21
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +4 -6
- package/corpus/templates/analytics/changelog/2026-06-30-ask-opens-a-fresh-chat-unless-you-were-just-chatting-and-das.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-30-dashboard-email-reports-are-more-reliable-and-use-cleaner.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-30-dashboard-toolbar-controls-use-a-quieter-share-button-and-ve.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-30-session-replay-rows-show-whole-minute-durations-in-the-playl.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-30-session-replays-now-render-captured-styling-and-keep-the-eve.md +6 -0
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +16 -3
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +31 -14
- package/corpus/templates/assets/actions/open-asset-picker.ts +9 -0
- package/corpus/templates/assets/app/global.css +15 -0
- package/corpus/templates/assets/app/hooks/use-navigation-state.ts +4 -0
- package/corpus/templates/assets/app/routes/library.tsx +90 -16
- package/corpus/templates/assets/changelog/2026-06-30-the-assets-picker-now-supports-a-vertical-embedded-layout-fo.md +6 -0
- package/corpus/templates/clips/actions/finalize-recording.ts +1 -12
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +10 -5
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +6 -8
- package/corpus/templates/clips/changelog/2026-06-30-extension-save-recovery-avoids-false-upload-failures.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-30-longer-chrome-extension-recordings-now-keep-saving-reliably-.md +6 -0
- package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -1
- package/corpus/templates/clips/chrome-extension/src/background.ts +19 -10
- package/corpus/templates/clips/chrome-extension/src/content-script.ts +38 -12
- package/corpus/templates/clips/chrome-extension/src/finalize-recovery.ts +224 -0
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +119 -16
- package/corpus/templates/clips/chrome-extension/src/overlay.ts +16 -0
- package/corpus/templates/clips/server/lib/recording-upload-state.ts +48 -0
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +9 -1
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +63 -13
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/status.get.ts +74 -0
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +32 -0
- package/corpus/templates/design/AGENTS.md +27 -0
- package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +1 -1
- package/corpus/templates/design/DESIGN-STUDIO-PLAN.md +5 -5
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +63 -20
- package/corpus/templates/design/actions/apply-motion-edit.ts +67 -69
- package/corpus/templates/design/actions/apply-shader-fill.ts +148 -56
- package/corpus/templates/design/actions/capture-design-state.ts +27 -4
- package/corpus/templates/design/actions/connect-localhost.ts +59 -22
- package/corpus/templates/design/actions/export-zip.ts +23 -8
- package/corpus/templates/design/actions/generate-design.ts +53 -1
- package/corpus/templates/design/actions/get-component-details.ts +5 -19
- package/corpus/templates/design/actions/get-motion-timeline.ts +135 -10
- package/corpus/templates/design/actions/grant-localhost-write-consent.ts +116 -0
- package/corpus/templates/design/actions/import-design-tokens.ts +521 -0
- package/corpus/templates/design/actions/index-design-tokens.ts +10 -1
- package/corpus/templates/design/actions/insert-design-native-asset.ts +268 -0
- package/corpus/templates/design/actions/insert-figma-library-asset.ts +233 -0
- package/corpus/templates/design/actions/list-design-extensions.ts +32 -10
- package/corpus/templates/design/actions/list-design-native-assets.ts +105 -0
- package/corpus/templates/design/actions/list-figma-library-assets.ts +292 -0
- package/corpus/templates/design/actions/migrate-board-objects-to-file.ts +238 -0
- package/corpus/templates/design/actions/navigate.ts +18 -3
- package/corpus/templates/design/actions/provider-api-catalog.ts +2 -2
- package/corpus/templates/design/actions/provider-api-docs.ts +1 -1
- package/corpus/templates/design/actions/provider-api-request.ts +3 -3
- package/corpus/templates/design/actions/revoke-localhost-write-consent.ts +48 -0
- package/corpus/templates/design/actions/run-design-audit.ts +53 -4
- package/corpus/templates/design/actions/run-design-extension-action.ts +1 -1
- package/corpus/templates/design/actions/view-screen.ts +1 -1
- package/corpus/templates/design/actions/write-local-file.ts +213 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +230 -3308
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +30 -20
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +776 -287
- package/corpus/templates/design/app/components/design/EditPanel.tsx +212 -208
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +14 -2
- package/corpus/templates/design/app/components/design/LocalhostWriteConsentDialog.tsx +161 -0
- package/corpus/templates/design/app/components/design/MotionDock.tsx +235 -266
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +490 -55
- package/corpus/templates/design/app/components/design/ReviewPanel.tsx +43 -62
- package/corpus/templates/design/app/components/design/StatesPanel.tsx +34 -61
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +251 -0
- package/corpus/templates/design/app/components/design/bridge/codegen.ts +125 -0
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +4037 -0
- package/corpus/templates/design/app/components/design/bridge/embedded-wheel.bridge.ts +62 -0
- package/corpus/templates/design/app/components/design/bridge/hit-test.bridge.ts +272 -0
- package/corpus/templates/design/app/components/design/bridge/nav.bridge.ts +116 -0
- package/corpus/templates/design/app/components/design/bridge/sample.bridge.ts +24 -0
- package/corpus/templates/design/app/components/design/bridge/shader-fill-preview.bridge.ts +78 -0
- package/corpus/templates/design/app/components/design/bridge/tsconfig.json +17 -0
- package/corpus/templates/design/app/components/design/bridge/tweak.bridge.ts +28 -0
- package/corpus/templates/design/app/components/design/bridge/zoom.bridge.ts +43 -0
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +45 -16
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +88 -9
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +94 -9
- package/corpus/templates/design/app/components/layout/Layout.tsx +19 -3
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/design/app/global.css +7 -0
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +23 -0
- package/corpus/templates/design/app/i18n/zh-TW.ts +21 -0
- package/corpus/templates/design/app/i18n-data.ts +358 -0
- package/corpus/templates/design/app/lib/pending-generation.ts +1 -0
- package/corpus/templates/design/app/pages/DesignEditor.tsx +2402 -499
- package/corpus/templates/design/app/pages/Index.tsx +5 -1
- package/corpus/templates/design/changelog/2026-06-30-applying-the-one-click-fix-for-a-small-tap-target-accessibil.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-canvas-creation-screen-dragging-undo-redo-and-image-fill-edi.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-component-prop-edits-and-shader-fills-now-preserve-rapid-sam.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-can-browse-figma-library-components-and-insert-them-i.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-now-has-a-figma-style-left-rail-for-file-agent-assets.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-now-has-native-components-embedded-media-and-figma-im.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-preview-now-includes-a-publish-app-waitlist-option-fr.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-s-left-rail-now-matches-the-sidebar-chrome-and-uses-t.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-s-tools-create-menu-now-stays-compact-instead-of-rend.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-starter-prompts-now-begin-generating-immediately-and-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-design-tools-now-use-a-quieter-figma-style-list-layout.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-drawing-rectangles-on-the-all-screens-canvas-no-longer-flash.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-fixed-code-native-design-studio-edits-so-component-props-mot.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-fixed-visual-editing-hover-overlays-and-spacing-handles-so-s.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-motion-edits-now-save-automatically-without-a-separate-css-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-motion-timelines-now-reopen-as-editable-tracks-after-writing.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-new-design-prompts-with-uploaded-screenshots-work-reliably-o.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-screen-previews-in-all-screens-view-now-keep-rounded-outline.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-selection-outlines-now-sit-flush-on-rectangles-drawn-directl.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-share-options-use-a-tighter-design-editor-popover-with-compa.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-collapsed-motion-panel-now-stays-tucked-under-the-left-s.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-design-inspector-now-shows-states-and-review-in-a-tighte.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-the-sidebar-keeps-the-organization-picker-space-stable-while.md +6 -0
- package/corpus/templates/design/changelog/2026-06-30-tokens-can-now-be-imported-from-pasted-notes-code-files-fold.md +6 -0
- package/corpus/templates/design/e2e/helpers.ts +168 -65
- package/corpus/templates/design/package.json +3 -1
- package/corpus/templates/design/server/db/schema.ts +23 -0
- package/corpus/templates/design/server/handlers/uploads.ts +22 -1
- package/corpus/templates/design/server/lib/provider-api.ts +7 -4
- package/corpus/templates/design/server/lib/verify-write-grant.ts +108 -0
- package/corpus/templates/design/server/plugins/db.ts +39 -0
- package/corpus/templates/design/server/register-secrets.ts +38 -0
- package/corpus/templates/design/shared/board-file.ts +228 -0
- package/corpus/templates/design/shared/board-objects.ts +288 -0
- package/corpus/templates/design/shared/code-layer.ts +52 -0
- package/corpus/templates/design/shared/motion-compiler.ts +58 -7
- package/corpus/templates/design/shared/motion-timeline.ts +2 -2
- package/corpus/templates/design/tsconfig.json +2 -1
- package/corpus/templates/slides/AGENTS.md +9 -0
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +4 -0
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +4 -24
- package/corpus/templates/slides/app/lib/export-pdf-client.ts +29 -20
- package/corpus/templates/slides/app/lib/export-pptx-client.ts +365 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +12 -9
- package/corpus/templates/slides/app/vite-env.d.ts +18 -0
- package/corpus/templates/slides/changelog/2026-06-30-powerpoint-downloads-now-preserve-the-rendered-slide-layout-.md +6 -0
- package/corpus/templates/slides/changelog/2026-06-30-unavailable-decks-open-in-a-cleaner-full-height-centered-sta.md +6 -0
- package/corpus/templates/slides/package.json +1 -0
- package/corpus/templates/slides/vite.config.ts +1 -0
- package/dist/cli/design-connect.d.ts +25 -0
- package/dist/cli/design-connect.d.ts.map +1 -1
- package/dist/cli/design-connect.js +357 -18
- package/dist/cli/design-connect.js.map +1 -1
- package/dist/client/ConnectBuilderCard.d.ts.map +1 -1
- package/dist/client/ConnectBuilderCard.js +1 -0
- package/dist/client/ConnectBuilderCard.js.map +1 -1
- package/dist/client/chat/index.d.ts +1 -1
- package/dist/client/chat/index.d.ts.map +1 -1
- package/dist/client/chat/index.js +1 -1
- package/dist/client/chat/index.js.map +1 -1
- package/dist/client/chat/run-recovery.d.ts.map +1 -1
- package/dist/client/chat/run-recovery.js +5 -5
- package/dist/client/chat/run-recovery.js.map +1 -1
- package/dist/client/chat-view-transition.d.ts +6 -0
- package/dist/client/chat-view-transition.d.ts.map +1 -1
- package/dist/client/chat-view-transition.js +23 -2
- package/dist/client/chat-view-transition.js.map +1 -1
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +3 -2
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +11 -4
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/sharing/ShareButton.js +3 -3
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/use-agent-chat-home-handoff.d.ts +8 -2
- package/dist/client/use-agent-chat-home-handoff.d.ts.map +1 -1
- package/dist/client/use-agent-chat-home-handoff.js +20 -6
- package/dist/client/use-agent-chat-home-handoff.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +2 -2
- package/dist/db/client.d.ts +1 -0
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +28 -2
- package/dist/db/client.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +2 -2
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/index.d.ts +5 -4
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +28 -0
- package/dist/provider-api/index.js.map +1 -1
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/server/core-routes-plugin.d.ts +25 -0
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +43 -18
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/styles/agent-native.css +54 -0
- package/dist/usage/store.js +2 -2
- package/dist/usage/store.js.map +1 -1
- package/package.json +1 -1
|
@@ -37,7 +37,6 @@ import { useState } from "react";
|
|
|
37
37
|
|
|
38
38
|
import { Badge } from "@/components/ui/badge";
|
|
39
39
|
import { Button } from "@/components/ui/button";
|
|
40
|
-
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
41
40
|
import { Separator } from "@/components/ui/separator";
|
|
42
41
|
import { cn } from "@/lib/utils";
|
|
43
42
|
|
|
@@ -393,7 +392,7 @@ function A11ySection({
|
|
|
393
392
|
return (
|
|
394
393
|
<section aria-labelledby="review-a11y-heading">
|
|
395
394
|
{/* Section header */}
|
|
396
|
-
<div className="flex h-
|
|
395
|
+
<div className="flex h-7 items-center justify-between">
|
|
397
396
|
<div className="flex items-center gap-1.5">
|
|
398
397
|
<IconShieldCheck className="size-3.5 text-muted-foreground" />
|
|
399
398
|
<span
|
|
@@ -440,7 +439,7 @@ function A11ySection({
|
|
|
440
439
|
size="sm"
|
|
441
440
|
disabled={loading}
|
|
442
441
|
onClick={onRunAudit}
|
|
443
|
-
className="h-6 px-
|
|
442
|
+
className="h-6 gap-1 rounded-md px-1.5 text-[10px] text-muted-foreground hover:text-foreground"
|
|
444
443
|
>
|
|
445
444
|
{loading ? (
|
|
446
445
|
<IconRefresh className="size-3 animate-spin" />
|
|
@@ -452,12 +451,12 @@ function A11ySection({
|
|
|
452
451
|
)}
|
|
453
452
|
</div>
|
|
454
453
|
|
|
455
|
-
<Separator
|
|
454
|
+
<Separator />
|
|
456
455
|
|
|
457
|
-
<div className="
|
|
456
|
+
<div className="py-1">
|
|
458
457
|
{/* Error state */}
|
|
459
458
|
{auditError && (
|
|
460
|
-
<div className="flex items-center gap-2 rounded px-2
|
|
459
|
+
<div className="flex min-h-7 items-center gap-2 rounded-[5px] px-2">
|
|
461
460
|
<IconAlertCircle className="size-3.5 shrink-0 text-destructive" />
|
|
462
461
|
<span className="text-[11px] text-muted-foreground">
|
|
463
462
|
{auditError}
|
|
@@ -467,23 +466,15 @@ function A11ySection({
|
|
|
467
466
|
|
|
468
467
|
{/* Not yet run */}
|
|
469
468
|
{notRun && (
|
|
470
|
-
<div className="flex
|
|
471
|
-
<IconShieldCheck className="size-5
|
|
472
|
-
<
|
|
473
|
-
No audit has been run yet.
|
|
474
|
-
{onRunAudit && (
|
|
475
|
-
<>
|
|
476
|
-
{" "}
|
|
477
|
-
Click <strong>Run</strong> to scan this design.
|
|
478
|
-
</>
|
|
479
|
-
)}
|
|
480
|
-
</p>
|
|
469
|
+
<div className="flex h-7 items-center gap-2 rounded-[5px] px-2 text-muted-foreground/55">
|
|
470
|
+
<IconShieldCheck className="size-3.5 shrink-0" />
|
|
471
|
+
<span className="truncate text-[11px]">Audit not run</span>
|
|
481
472
|
</div>
|
|
482
473
|
)}
|
|
483
474
|
|
|
484
475
|
{/* Loading */}
|
|
485
476
|
{loading && !hasFindings && (
|
|
486
|
-
<div className="flex items-center gap-2 px-2
|
|
477
|
+
<div className="flex h-7 items-center gap-2 rounded-[5px] px-2">
|
|
487
478
|
<IconRefresh className="size-3.5 animate-spin text-muted-foreground/50" />
|
|
488
479
|
<span className="text-[11px] text-muted-foreground/60">
|
|
489
480
|
Scanning…
|
|
@@ -493,7 +484,7 @@ function A11ySection({
|
|
|
493
484
|
|
|
494
485
|
{/* All clear */}
|
|
495
486
|
{!loading && !auditError && !notRun && !hasFindings && (
|
|
496
|
-
<div className="flex items-center gap-2 px-2
|
|
487
|
+
<div className="flex h-7 items-center gap-2 rounded-[5px] px-2">
|
|
497
488
|
<IconCheck className="size-3.5 text-emerald-500" />
|
|
498
489
|
<span className="text-[11px] text-muted-foreground">
|
|
499
490
|
No issues found.
|
|
@@ -518,7 +509,7 @@ function A11ySection({
|
|
|
518
509
|
|
|
519
510
|
{/* Audit timestamp */}
|
|
520
511
|
{auditedAt && (
|
|
521
|
-
<p className="mt-1
|
|
512
|
+
<p className="mt-1 px-2 text-[10px] text-muted-foreground/40">
|
|
522
513
|
Last audited{" "}
|
|
523
514
|
{new Date(auditedAt).toLocaleString(undefined, {
|
|
524
515
|
dateStyle: "short",
|
|
@@ -551,7 +542,7 @@ function VersionLabel({
|
|
|
551
542
|
<select
|
|
552
543
|
value={value ?? ""}
|
|
553
544
|
onChange={(e) => onChange(e.target.value || null)}
|
|
554
|
-
className="h-6 max-w-[120px] flex-1 truncate rounded border border-border bg-
|
|
545
|
+
className="h-6 max-w-[120px] flex-1 truncate rounded-md border border-[var(--design-editor-control-border)] bg-[var(--design-editor-control-bg)] px-1.5 text-[10px] text-foreground focus:outline-none focus:ring-1 focus:ring-[var(--design-editor-accent-color)]"
|
|
555
546
|
aria-label={placeholder}
|
|
556
547
|
>
|
|
557
548
|
<option value="">{placeholder}</option>
|
|
@@ -567,7 +558,7 @@ function VersionLabel({
|
|
|
567
558
|
function DiffRow({ entry }: { entry: VisualDiffEntry }) {
|
|
568
559
|
const cfg = DIFF_KIND_CONFIG[entry.kind];
|
|
569
560
|
return (
|
|
570
|
-
<div className="flex items-center gap-2 rounded px-2
|
|
561
|
+
<div className="flex h-7 items-center gap-2 rounded-[5px] px-2 hover:bg-[var(--design-editor-layer-hover-color)]">
|
|
571
562
|
<Badge
|
|
572
563
|
variant="outline"
|
|
573
564
|
className={cn("h-4 shrink-0 px-1 text-[9px] font-medium", cfg.badge)}
|
|
@@ -604,7 +595,7 @@ function VisualDiffSection({
|
|
|
604
595
|
|
|
605
596
|
return (
|
|
606
597
|
<section aria-labelledby="review-diff-heading">
|
|
607
|
-
<div className="flex h-
|
|
598
|
+
<div className="flex h-7 items-center gap-1.5">
|
|
608
599
|
<IconArrowsLeftRight className="size-3.5 text-muted-foreground" />
|
|
609
600
|
<span
|
|
610
601
|
id="review-diff-heading"
|
|
@@ -622,9 +613,9 @@ function VisualDiffSection({
|
|
|
622
613
|
)}
|
|
623
614
|
</div>
|
|
624
615
|
|
|
625
|
-
<Separator
|
|
616
|
+
<Separator />
|
|
626
617
|
|
|
627
|
-
<div className="
|
|
618
|
+
<div className="space-y-1.5 py-1">
|
|
628
619
|
{/* Version selectors */}
|
|
629
620
|
{hasVersions && (
|
|
630
621
|
<div className="flex items-center gap-1.5">
|
|
@@ -649,7 +640,7 @@ function VisualDiffSection({
|
|
|
649
640
|
|
|
650
641
|
{/* States */}
|
|
651
642
|
{diffError && (
|
|
652
|
-
<div className="flex items-center gap-2">
|
|
643
|
+
<div className="flex h-7 items-center gap-2 rounded-[5px] px-2">
|
|
653
644
|
<IconAlertCircle className="size-3.5 shrink-0 text-destructive" />
|
|
654
645
|
<span className="text-[11px] text-muted-foreground">
|
|
655
646
|
{diffError}
|
|
@@ -658,7 +649,7 @@ function VisualDiffSection({
|
|
|
658
649
|
)}
|
|
659
650
|
|
|
660
651
|
{loading && (
|
|
661
|
-
<div className="flex items-center gap-2">
|
|
652
|
+
<div className="flex h-7 items-center gap-2 rounded-[5px] px-2">
|
|
662
653
|
<IconRefresh className="size-3.5 animate-spin text-muted-foreground/50" />
|
|
663
654
|
<span className="text-[11px] text-muted-foreground/60">
|
|
664
655
|
Comparing…
|
|
@@ -667,15 +658,13 @@ function VisualDiffSection({
|
|
|
667
658
|
)}
|
|
668
659
|
|
|
669
660
|
{!loading && !diffError && noVersionsSelected && !hasDiff && (
|
|
670
|
-
<
|
|
671
|
-
{hasVersions
|
|
672
|
-
|
|
673
|
-
: "No versions saved yet. Save a version to compare."}
|
|
674
|
-
</p>
|
|
661
|
+
<div className="flex h-7 items-center rounded-[5px] px-2 text-[11px] text-muted-foreground/55">
|
|
662
|
+
{hasVersions ? "Choose versions to diff" : "No versions yet"}
|
|
663
|
+
</div>
|
|
675
664
|
)}
|
|
676
665
|
|
|
677
666
|
{!loading && !diffError && !noVersionsSelected && !hasDiff && (
|
|
678
|
-
<div className="flex items-center gap-2">
|
|
667
|
+
<div className="flex h-7 items-center gap-2 rounded-[5px] px-2">
|
|
679
668
|
<IconCheck className="size-3.5 text-emerald-500" />
|
|
680
669
|
<span className="text-[11px] text-muted-foreground">
|
|
681
670
|
No structural changes detected.
|
|
@@ -730,37 +719,29 @@ export function ReviewPanel({
|
|
|
730
719
|
}: ReviewPanelProps) {
|
|
731
720
|
return (
|
|
732
721
|
<div
|
|
733
|
-
className={cn("flex flex-col
|
|
722
|
+
className={cn("flex flex-col gap-2 text-[11px]", className)}
|
|
734
723
|
data-testid="review-panel"
|
|
735
724
|
>
|
|
736
|
-
<
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
baseVersionId={baseVersionId}
|
|
757
|
-
compareVersionId={compareVersionId}
|
|
758
|
-
onVersionChange={onVersionChange}
|
|
759
|
-
loading={diffLoading}
|
|
760
|
-
diffError={diffError}
|
|
761
|
-
/>
|
|
762
|
-
</div>
|
|
763
|
-
</ScrollArea>
|
|
725
|
+
<A11ySection
|
|
726
|
+
findings={findings}
|
|
727
|
+
loading={auditLoading}
|
|
728
|
+
auditedAt={auditedAt}
|
|
729
|
+
auditError={auditError}
|
|
730
|
+
onRunAudit={onRunAudit}
|
|
731
|
+
onFindingClick={onFindingClick}
|
|
732
|
+
fixSource={fixSource}
|
|
733
|
+
onFixApplied={onFixApplied}
|
|
734
|
+
/>
|
|
735
|
+
|
|
736
|
+
<VisualDiffSection
|
|
737
|
+
diff={visualDiff}
|
|
738
|
+
versionOptions={versionOptions}
|
|
739
|
+
baseVersionId={baseVersionId}
|
|
740
|
+
compareVersionId={compareVersionId}
|
|
741
|
+
onVersionChange={onVersionChange}
|
|
742
|
+
loading={diffLoading}
|
|
743
|
+
diffError={diffError}
|
|
744
|
+
/>
|
|
764
745
|
</div>
|
|
765
746
|
);
|
|
766
747
|
}
|
|
@@ -157,10 +157,10 @@ function StateRow({
|
|
|
157
157
|
if (e.key === "Enter" || e.key === " ") onSelect();
|
|
158
158
|
}}
|
|
159
159
|
className={cn(
|
|
160
|
-
"group flex cursor-pointer items-center gap-2 rounded-
|
|
160
|
+
"group flex h-7 cursor-pointer items-center gap-2 rounded-[5px] px-2 outline-none transition-colors focus-visible:ring-1 focus-visible:ring-[var(--design-editor-accent-color)]",
|
|
161
161
|
isActive
|
|
162
|
-
? "bg-
|
|
163
|
-
: "text-muted-foreground hover:bg-
|
|
162
|
+
? "bg-[var(--design-editor-active-row-color)] text-foreground"
|
|
163
|
+
: "text-muted-foreground hover:bg-[var(--design-editor-layer-hover-color)] hover:text-foreground",
|
|
164
164
|
)}
|
|
165
165
|
>
|
|
166
166
|
{/* Active indicator */}
|
|
@@ -172,7 +172,7 @@ function StateRow({
|
|
|
172
172
|
/>
|
|
173
173
|
|
|
174
174
|
{/* Name */}
|
|
175
|
-
<span className="min-w-0 flex-1 truncate text-[12px] font-
|
|
175
|
+
<span className="min-w-0 flex-1 truncate text-[12px] font-semibold">
|
|
176
176
|
{row.name}
|
|
177
177
|
</span>
|
|
178
178
|
|
|
@@ -241,14 +241,12 @@ export function StatesPanel({
|
|
|
241
241
|
|
|
242
242
|
const createState = useActionMutation("create-design-state");
|
|
243
243
|
const deleteState = useActionMutation("delete-design-state");
|
|
244
|
-
const setActiveBreakpoint = useActionMutation("set-active-breakpoint");
|
|
245
244
|
|
|
246
245
|
const states = data?.states ?? [];
|
|
247
246
|
|
|
248
247
|
// --- Breakpoint control ---
|
|
249
248
|
const handleBreakpointClick = (id: string) => {
|
|
250
249
|
onBreakpointSelect(id);
|
|
251
|
-
setActiveBreakpoint.mutate({ designId, breakpointId: id });
|
|
252
250
|
};
|
|
253
251
|
|
|
254
252
|
// --- Create state ---
|
|
@@ -269,11 +267,11 @@ export function StatesPanel({
|
|
|
269
267
|
};
|
|
270
268
|
|
|
271
269
|
return (
|
|
272
|
-
<div className="flex flex-col gap-
|
|
270
|
+
<div className="flex flex-col gap-2">
|
|
273
271
|
{/* ── Responsive breakpoints ── */}
|
|
274
272
|
<section aria-label="Breakpoints">
|
|
275
|
-
<div className="mb-1
|
|
276
|
-
<span className="text-[
|
|
273
|
+
<div className="mb-1 flex items-center justify-between">
|
|
274
|
+
<span className="text-[11px] font-medium text-muted-foreground">
|
|
277
275
|
Responsive
|
|
278
276
|
</span>
|
|
279
277
|
{onAddBreakpoint && (
|
|
@@ -283,11 +281,11 @@ export function StatesPanel({
|
|
|
283
281
|
type="button"
|
|
284
282
|
variant="ghost"
|
|
285
283
|
size="icon"
|
|
286
|
-
className="size-
|
|
284
|
+
className="size-6 cursor-pointer rounded-md text-muted-foreground hover:text-foreground"
|
|
287
285
|
onClick={onAddBreakpoint}
|
|
288
286
|
aria-label="Add breakpoint"
|
|
289
287
|
>
|
|
290
|
-
<IconPlus className="size-3" />
|
|
288
|
+
<IconPlus className="size-3.5" />
|
|
291
289
|
</Button>
|
|
292
290
|
</TooltipTrigger>
|
|
293
291
|
<TooltipContent>Add breakpoint</TooltipContent>
|
|
@@ -296,7 +294,7 @@ export function StatesPanel({
|
|
|
296
294
|
</div>
|
|
297
295
|
|
|
298
296
|
{/* Segmented control */}
|
|
299
|
-
<div className="flex h-7 overflow-hidden rounded-md
|
|
297
|
+
<div className="flex h-7 min-w-0 overflow-hidden rounded-md bg-[var(--design-editor-control-bg)] p-0.5">
|
|
300
298
|
{/* Auto = single-frame, all breakpoints */}
|
|
301
299
|
<BreakpointButton
|
|
302
300
|
id="auto"
|
|
@@ -343,29 +341,12 @@ export function StatesPanel({
|
|
|
343
341
|
</>
|
|
344
342
|
)}
|
|
345
343
|
</div>
|
|
346
|
-
|
|
347
|
-
{/* Active-frame hint */}
|
|
348
|
-
{activeBreakpointId !== "auto" && (
|
|
349
|
-
<p className="mt-1 text-[10px] text-muted-foreground/60">
|
|
350
|
-
Edits in this frame write{" "}
|
|
351
|
-
<span className="font-mono font-semibold">
|
|
352
|
-
{activeBreakpointId === "bp-mobile"
|
|
353
|
-
? "base:"
|
|
354
|
-
: activeBreakpointId === "bp-tablet"
|
|
355
|
-
? "md:"
|
|
356
|
-
: activeBreakpointId === "bp-desktop"
|
|
357
|
-
? "xl:"
|
|
358
|
-
: "breakpoint:"}
|
|
359
|
-
</span>{" "}
|
|
360
|
-
classes
|
|
361
|
-
</p>
|
|
362
|
-
)}
|
|
363
344
|
</section>
|
|
364
345
|
|
|
365
346
|
{/* ── Design states ── */}
|
|
366
347
|
<section aria-label="Design states">
|
|
367
|
-
<div className="mb-1
|
|
368
|
-
<span className="text-[
|
|
348
|
+
<div className="mb-1 flex items-center justify-between">
|
|
349
|
+
<span className="text-[11px] font-medium text-muted-foreground">
|
|
369
350
|
States
|
|
370
351
|
</span>
|
|
371
352
|
<div className="flex items-center gap-0.5">
|
|
@@ -376,11 +357,11 @@ export function StatesPanel({
|
|
|
376
357
|
type="button"
|
|
377
358
|
variant="ghost"
|
|
378
359
|
size="icon"
|
|
379
|
-
className="size-
|
|
360
|
+
className="size-6 cursor-pointer rounded-md text-muted-foreground hover:text-foreground"
|
|
380
361
|
onClick={onCapture}
|
|
381
362
|
aria-label="Capture from running app"
|
|
382
363
|
>
|
|
383
|
-
<IconCamera className="size-3" />
|
|
364
|
+
<IconCamera className="size-3.5" />
|
|
384
365
|
</Button>
|
|
385
366
|
</TooltipTrigger>
|
|
386
367
|
<TooltipContent>Capture from running app</TooltipContent>
|
|
@@ -392,13 +373,13 @@ export function StatesPanel({
|
|
|
392
373
|
type="button"
|
|
393
374
|
variant="ghost"
|
|
394
375
|
size="icon"
|
|
395
|
-
className="size-
|
|
376
|
+
className="size-6 cursor-pointer rounded-md text-muted-foreground hover:text-foreground"
|
|
396
377
|
onClick={() => refetch()}
|
|
397
378
|
aria-label="Refresh states"
|
|
398
379
|
disabled={isLoading}
|
|
399
380
|
>
|
|
400
381
|
<IconRefresh
|
|
401
|
-
className={cn("size-3", isLoading && "animate-spin")}
|
|
382
|
+
className={cn("size-3.5", isLoading && "animate-spin")}
|
|
402
383
|
/>
|
|
403
384
|
</Button>
|
|
404
385
|
</TooltipTrigger>
|
|
@@ -410,11 +391,11 @@ export function StatesPanel({
|
|
|
410
391
|
type="button"
|
|
411
392
|
variant="ghost"
|
|
412
393
|
size="icon"
|
|
413
|
-
className="size-
|
|
394
|
+
className="size-6 cursor-pointer rounded-md text-muted-foreground hover:text-foreground"
|
|
414
395
|
onClick={() => setIsAdding(true)}
|
|
415
396
|
aria-label="Add state"
|
|
416
397
|
>
|
|
417
|
-
<IconPlus className="size-3" />
|
|
398
|
+
<IconPlus className="size-3.5" />
|
|
418
399
|
</Button>
|
|
419
400
|
</TooltipTrigger>
|
|
420
401
|
<TooltipContent>Add state</TooltipContent>
|
|
@@ -431,10 +412,10 @@ export function StatesPanel({
|
|
|
431
412
|
if (e.key === "Enter" || e.key === " ") onStateSelect(null);
|
|
432
413
|
}}
|
|
433
414
|
className={cn(
|
|
434
|
-
"flex cursor-pointer items-center gap-2 rounded-
|
|
415
|
+
"flex h-7 cursor-pointer items-center gap-2 rounded-[5px] px-2 outline-none transition-colors focus-visible:ring-1 focus-visible:ring-[var(--design-editor-accent-color)]",
|
|
435
416
|
activeStateId === null
|
|
436
|
-
? "bg-
|
|
437
|
-
: "text-muted-foreground hover:bg-
|
|
417
|
+
? "bg-[var(--design-editor-active-row-color)] text-foreground"
|
|
418
|
+
: "text-muted-foreground hover:bg-[var(--design-editor-layer-hover-color)] hover:text-foreground",
|
|
438
419
|
)}
|
|
439
420
|
>
|
|
440
421
|
<div
|
|
@@ -443,7 +424,9 @@ export function StatesPanel({
|
|
|
443
424
|
activeStateId === null ? "bg-primary" : "bg-muted-foreground/30",
|
|
444
425
|
)}
|
|
445
426
|
/>
|
|
446
|
-
<span className="text-[12px] font-
|
|
427
|
+
<span className="min-w-0 flex-1 truncate text-[12px] font-semibold">
|
|
428
|
+
Default
|
|
429
|
+
</span>
|
|
447
430
|
<span className="ml-auto text-[10px] text-muted-foreground/40">
|
|
448
431
|
Live
|
|
449
432
|
</span>
|
|
@@ -478,10 +461,9 @@ export function StatesPanel({
|
|
|
478
461
|
|
|
479
462
|
{/* Empty state (no user-created states yet) */}
|
|
480
463
|
{!isLoading && states.length === 0 && !isAdding && (
|
|
481
|
-
<
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
</p>
|
|
464
|
+
<div className="mt-1 flex h-7 items-center rounded-[5px] px-2 text-[11px] text-muted-foreground/55">
|
|
465
|
+
No saved states
|
|
466
|
+
</div>
|
|
485
467
|
)}
|
|
486
468
|
|
|
487
469
|
{/* Inline add-state form */}
|
|
@@ -498,7 +480,7 @@ export function StatesPanel({
|
|
|
498
480
|
value={newStateName}
|
|
499
481
|
onChange={(e) => setNewStateName(e.target.value)}
|
|
500
482
|
placeholder="State name…"
|
|
501
|
-
className="h-
|
|
483
|
+
className="h-6 min-w-0 flex-1 rounded-md border border-[var(--design-editor-control-border)] bg-[var(--design-editor-control-bg)] px-1.5 text-[11px] text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-[var(--design-editor-accent-color)]"
|
|
502
484
|
onKeyDown={(e) => {
|
|
503
485
|
if (e.key === "Escape") {
|
|
504
486
|
setIsAdding(false);
|
|
@@ -509,7 +491,7 @@ export function StatesPanel({
|
|
|
509
491
|
<Button
|
|
510
492
|
type="submit"
|
|
511
493
|
size="sm"
|
|
512
|
-
className="h-
|
|
494
|
+
className="h-6 cursor-pointer px-2 text-[11px]"
|
|
513
495
|
disabled={!newStateName.trim() || createState.isPending}
|
|
514
496
|
>
|
|
515
497
|
Add
|
|
@@ -518,7 +500,7 @@ export function StatesPanel({
|
|
|
518
500
|
type="button"
|
|
519
501
|
variant="ghost"
|
|
520
502
|
size="sm"
|
|
521
|
-
className="h-
|
|
503
|
+
className="h-6 cursor-pointer px-2 text-[11px]"
|
|
522
504
|
onClick={() => {
|
|
523
505
|
setIsAdding(false);
|
|
524
506
|
setNewStateName("");
|
|
@@ -528,15 +510,6 @@ export function StatesPanel({
|
|
|
528
510
|
</Button>
|
|
529
511
|
</form>
|
|
530
512
|
)}
|
|
531
|
-
|
|
532
|
-
{/* Real-app capture CTA (inline, only when not already canCapture) */}
|
|
533
|
-
{!canCapture && (
|
|
534
|
-
<div className="mt-3 rounded-md border border-dashed border-border/60 bg-muted/30 px-3 py-2.5 text-center">
|
|
535
|
-
<p className="text-[11px] leading-snug text-muted-foreground/70">
|
|
536
|
-
Connect Builder to capture live app data and route states.
|
|
537
|
-
</p>
|
|
538
|
-
</div>
|
|
539
|
-
)}
|
|
540
513
|
</section>
|
|
541
514
|
</div>
|
|
542
515
|
);
|
|
@@ -565,17 +538,17 @@ function BreakpointButton({
|
|
|
565
538
|
onClick={onClick}
|
|
566
539
|
aria-pressed={isActive}
|
|
567
540
|
className={cn(
|
|
568
|
-
"flex flex-1 cursor-pointer items-center justify-center gap-1 px-1 text-[
|
|
541
|
+
"flex min-w-0 flex-1 cursor-pointer items-center justify-center gap-1 rounded-[4px] px-1 text-[10px] font-semibold transition-colors",
|
|
569
542
|
isActive
|
|
570
|
-
? "bg-
|
|
571
|
-
: "text-muted-foreground
|
|
543
|
+
? "bg-[var(--design-editor-panel-bg)] text-foreground shadow-[0_0_0_1px_var(--design-editor-control-border),0_1px_2px_rgba(0,0,0,0.18)]"
|
|
544
|
+
: "text-muted-foreground hover:bg-[var(--design-editor-panel-raised-bg)] hover:text-foreground",
|
|
572
545
|
)}
|
|
573
546
|
title={widthPx ? `${label} (${widthPx}px)` : label}
|
|
574
547
|
>
|
|
575
548
|
{widthPx != null && (
|
|
576
549
|
<BreakpointIcon widthPx={widthPx} className="shrink-0" />
|
|
577
550
|
)}
|
|
578
|
-
<span className="
|
|
551
|
+
<span className="min-w-0 truncate">{label}</span>
|
|
579
552
|
</button>
|
|
580
553
|
);
|
|
581
554
|
}
|