@agent-native/core 0.79.18 → 0.79.19

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.
Files changed (30) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +6 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/client/i18n.tsx +77 -65
  5. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +1 -1
  6. package/corpus/templates/analytics/app/global.css +15 -0
  7. package/corpus/templates/analytics/app/pages/Ask.tsx +1 -1
  8. package/corpus/templates/analytics/changelog/2026-06-26-the-ask-tab-uses-a-softer-dark-gray-canvas-while-sidebar-cha.md +6 -0
  9. package/corpus/templates/clips/app/components/library/library-layout.tsx +325 -333
  10. package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +80 -40
  11. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +44 -3
  12. package/corpus/templates/clips/app/routes/share.$shareId.tsx +10 -2
  13. package/corpus/templates/clips/changelog/2026-06-26-recording-details-button-stays-at-the-far-right-on-small-screen.md +6 -0
  14. package/corpus/templates/clips/changelog/2026-06-26-the-agent-sidebar-now-slides-in-smoothly-without-duplicate-e.md +6 -0
  15. package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +56 -4
  16. package/corpus/templates/plan/app/global.css +8 -3
  17. package/corpus/templates/plan/app/pages/PlansPage.tsx +1 -1
  18. package/corpus/templates/plan/changelog/2026-06-26-canvas-grid-panning-now-stays-smooth-and-fills-the-workspace.md +6 -0
  19. package/dist/client/i18n.d.ts.map +1 -1
  20. package/dist/client/i18n.js +20 -9
  21. package/dist/client/i18n.js.map +1 -1
  22. package/dist/collab/routes.d.ts +1 -1
  23. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  24. package/dist/notifications/routes.d.ts +2 -2
  25. package/dist/observability/routes.d.ts +8 -8
  26. package/dist/progress/routes.d.ts +1 -1
  27. package/dist/resources/handlers.d.ts +3 -3
  28. package/dist/server/agent-engine-api-key-route.d.ts +2 -2
  29. package/dist/server/transcribe-voice.d.ts +1 -1
  30. package/package.json +1 -1
package/corpus/README.md CHANGED
@@ -28,4 +28,4 @@ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core/corpus
28
28
  ## Generated Counts
29
29
 
30
30
  - core files: 2031
31
- - template files: 4412
31
+ - template files: 4416
@@ -1,5 +1,11 @@
1
1
  # @agent-native/core
2
2
 
3
+ ## 0.79.19
4
+
5
+ ### Patch Changes
6
+
7
+ - 92876ad: Use a compact popover for the shared language picker so icon-only chrome can style it reliably.
8
+
3
9
  ## 0.79.18
4
10
 
5
11
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.79.18",
3
+ "version": "0.79.19",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -1,4 +1,4 @@
1
- import * as SelectPrimitive from "@radix-ui/react-select";
1
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
2
2
  import { IconCheck, IconChevronDown, IconLanguage } from "@tabler/icons-react";
3
3
  import i18next, { type i18n as I18nInstance } from "i18next";
4
4
  import React, {
@@ -34,6 +34,7 @@ import {
34
34
  } from "../localization/shared.js";
35
35
  import { setClientAppState } from "./application-state.js";
36
36
  import { callAction } from "./use-action.js";
37
+ import { cn } from "./utils.js";
37
38
 
38
39
  export {
39
40
  DEFAULT_LOCALE,
@@ -676,6 +677,7 @@ export function LanguagePicker({
676
677
  variant?: "select" | "icon";
677
678
  }) {
678
679
  const { locale, preference, setPreference } = useLocale();
680
+ const [open, setOpen] = useState(false);
679
681
  const copy =
680
682
  LANGUAGE_PICKER_COPY[locale] ?? LANGUAGE_PICKER_COPY[DEFAULT_LOCALE];
681
683
  const resolvedLabel = label ?? copy.label;
@@ -691,84 +693,94 @@ export function LanguagePicker({
691
693
  : []),
692
694
  ...SUPPORTED_LOCALES.map((code) => ({
693
695
  value: code,
694
- label:
695
- LOCALE_METADATA[code].nativeName === LOCALE_METADATA[code].englishName
696
- ? LOCALE_METADATA[code].nativeName
697
- : `${LOCALE_METADATA[code].nativeName} (${LOCALE_METADATA[code].englishName})`,
696
+ label: `${LOCALE_METADATA[code].nativeName} (${code})`,
698
697
  description: code,
699
698
  })),
700
699
  ];
701
700
  const selected = options.find((option) => option.value === preference);
701
+ const selectedLabel = selected?.label ?? preference;
702
+ const triggerLabel = `${resolvedLabel}: ${selectedLabel}`;
703
+
704
+ function handleOptionClick(value: LocalePreference) {
705
+ setOpen(false);
706
+ void setPreference(normalizeLocalizationPreference(value).locale);
707
+ }
702
708
 
703
709
  return (
704
710
  <div className={className}>
705
- <SelectPrimitive.Root
706
- value={preference}
707
- onValueChange={(value) =>
708
- void setPreference(normalizeLocalizationPreference(value).locale)
709
- }
710
- >
711
- <SelectPrimitive.Trigger
712
- className={
713
- variant === "icon"
714
- ? "flex h-8 w-8 items-center justify-center rounded-md border border-border bg-background text-foreground outline-none transition-colors hover:bg-accent/40 data-[placeholder]:text-muted-foreground"
715
- : "flex h-9 w-full items-center justify-between rounded-md border border-border bg-background px-3 text-start text-[12px] text-foreground outline-none transition-colors hover:bg-accent/40 data-[placeholder]:text-muted-foreground"
716
- }
717
- aria-label={resolvedLabel}
718
- title={selected?.label ?? resolvedLabel}
719
- >
720
- <span className="flex min-w-0 items-center gap-2">
721
- <IconLanguage className="h-4 w-4 shrink-0 text-muted-foreground" />
711
+ <PopoverPrimitive.Root open={open} onOpenChange={setOpen}>
712
+ <PopoverPrimitive.Trigger asChild>
713
+ <button
714
+ type="button"
715
+ aria-label={triggerLabel}
716
+ title={triggerLabel}
717
+ data-language-picker-trigger
718
+ className={cn(
719
+ "shrink-0 rounded-md border border-border bg-background text-foreground outline-none transition-colors hover:border-foreground/30 hover:bg-accent/40 hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 data-[state=open]:border-foreground/30 data-[state=open]:bg-accent/40",
720
+ variant === "icon"
721
+ ? "flex h-8 w-8 items-center justify-center"
722
+ : "flex h-9 w-full items-center justify-between gap-2 px-3 text-start text-sm",
723
+ )}
724
+ >
725
+ <span className="flex min-w-0 items-center gap-2">
726
+ <IconLanguage className="h-4 w-4 shrink-0 text-muted-foreground" />
727
+ {variant === "select" ? (
728
+ <span className="truncate">{selectedLabel}</span>
729
+ ) : (
730
+ <span className="sr-only">{triggerLabel}</span>
731
+ )}
732
+ </span>
722
733
  {variant === "select" ? (
723
- <SelectPrimitive.Value>
724
- <span className="truncate">
725
- {selected?.label ?? preference}
726
- </span>
727
- </SelectPrimitive.Value>
734
+ <IconChevronDown
735
+ className="h-3.5 w-3.5 shrink-0 text-muted-foreground"
736
+ aria-hidden="true"
737
+ />
728
738
  ) : null}
729
- </span>
730
- {variant === "select" ? (
731
- <SelectPrimitive.Icon asChild>
732
- <IconChevronDown className="h-3.5 w-3.5 text-muted-foreground" />
733
- </SelectPrimitive.Icon>
734
- ) : null}
735
- </SelectPrimitive.Trigger>
736
- <SelectPrimitive.Portal>
737
- <SelectPrimitive.Content
738
- position="popper"
739
+ </button>
740
+ </PopoverPrimitive.Trigger>
741
+ <PopoverPrimitive.Portal>
742
+ <PopoverPrimitive.Content
743
+ align={variant === "icon" ? "end" : "start"}
739
744
  sideOffset={6}
740
- className={
745
+ role="menu"
746
+ className={cn(
747
+ "z-[9999] max-h-[min(20rem,var(--radix-popover-content-available-height))] overflow-y-auto rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg outline-none will-change-[transform,opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:duration-100 data-[state=open]:duration-150 data-[state=closed]:ease-in data-[state=open]:ease-out data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
741
748
  variant === "icon"
742
- ? "z-[9999] min-w-56 overflow-hidden rounded-lg border border-border bg-popover shadow-lg"
743
- : "z-[9999] w-[var(--radix-select-trigger-width)] overflow-hidden rounded-lg border border-border bg-popover shadow-lg"
744
- }
749
+ ? "min-w-56"
750
+ : "w-[min(20rem,calc(100vw-2rem))] min-w-[var(--radix-popover-trigger-width)]",
751
+ )}
745
752
  >
746
- <SelectPrimitive.Viewport className="p-1">
747
- {options.map((option) => (
748
- <SelectPrimitive.Item
753
+ {options.map((option) => {
754
+ const optionSelected = option.value === preference;
755
+ return (
756
+ <button
749
757
  key={option.value}
750
- value={option.value}
751
- className="relative flex w-full cursor-pointer select-none items-start gap-2 rounded-md px-8 py-2.5 text-[12px] outline-none data-[highlighted]:bg-accent/60 data-[state=checked]:bg-accent/40"
758
+ type="button"
759
+ role="menuitemradio"
760
+ aria-checked={optionSelected}
761
+ title={option.description}
762
+ onClick={() => handleOptionClick(option.value)}
763
+ className={cn(
764
+ "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm outline-none transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:bg-accent/60 focus-visible:text-foreground",
765
+ optionSelected
766
+ ? "bg-accent/40 text-foreground"
767
+ : "text-muted-foreground",
768
+ )}
752
769
  >
753
- <span className="absolute start-2 top-2.5 flex h-4 w-4 items-center justify-center text-muted-foreground">
754
- <SelectPrimitive.ItemIndicator>
755
- <IconCheck className="h-3.5 w-3.5" />
756
- </SelectPrimitive.ItemIndicator>
757
- </span>
758
- <div className="flex min-w-0 flex-col">
759
- <SelectPrimitive.ItemText>
760
- <span className="text-foreground">{option.label}</span>
761
- </SelectPrimitive.ItemText>
762
- <span className="mt-0.5 text-[11px] leading-relaxed text-muted-foreground">
763
- {option.description}
764
- </span>
765
- </div>
766
- </SelectPrimitive.Item>
767
- ))}
768
- </SelectPrimitive.Viewport>
769
- </SelectPrimitive.Content>
770
- </SelectPrimitive.Portal>
771
- </SelectPrimitive.Root>
770
+ <IconCheck
771
+ className={cn(
772
+ "h-3.5 w-3.5 shrink-0",
773
+ optionSelected ? "opacity-100" : "opacity-0",
774
+ )}
775
+ aria-hidden="true"
776
+ />
777
+ <span className="truncate">{option.label}</span>
778
+ </button>
779
+ );
780
+ })}
781
+ </PopoverPrimitive.Content>
782
+ </PopoverPrimitive.Portal>
783
+ </PopoverPrimitive.Root>
772
784
  </div>
773
785
  );
774
786
  }
@@ -2263,7 +2263,7 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
2263
2263
  <LanguagePicker
2264
2264
  variant="icon"
2265
2265
  label={t("settings.languageLabel")}
2266
- className="[&_[role=combobox]]:rounded-lg [&_[role=combobox]]:border-0 [&_[role=combobox]]:bg-transparent [&_[role=combobox]]:text-muted-foreground [&_[role=combobox]]:hover:bg-sidebar-accent/50 [&_[role=combobox]]:hover:text-primary"
2266
+ className="[&_[data-language-picker-trigger]]:rounded-lg [&_[data-language-picker-trigger]]:border-0 [&_[data-language-picker-trigger]]:bg-transparent [&_[data-language-picker-trigger]]:text-muted-foreground [&_[data-language-picker-trigger]]:hover:bg-sidebar-accent/50 [&_[data-language-picker-trigger]]:hover:text-primary"
2267
2267
  />
2268
2268
  </div>
2269
2269
  </div>
@@ -146,6 +146,19 @@
146
146
  display: none;
147
147
  }
148
148
 
149
+ .dark .analytics-ask-page {
150
+ background: hsl(var(--secondary) / 0.38);
151
+ }
152
+
153
+ .dark .analytics-ask-page .analytics-chat-panel {
154
+ background: transparent;
155
+ }
156
+
157
+ .dark .agent-sidebar-panel[data-agent-sidebar-layout="desktop"],
158
+ .dark .agent-sidebar-panel[data-agent-sidebar-layout="mobile"] {
159
+ background: #000 !important;
160
+ }
161
+
149
162
  .analytics-chat-panel
150
163
  [data-agent-empty-state="centered"]
151
164
  .analytics-chat-intro {
@@ -236,9 +249,11 @@
236
249
  }
237
250
 
238
251
  .dark
252
+ .analytics-ask-page
239
253
  .analytics-chat-panel
240
254
  [data-agent-empty-state="centered"]
241
255
  .agent-composer-root {
256
+ background: hsl(var(--secondary) / 0.72);
242
257
  box-shadow: none;
243
258
  }
244
259
 
@@ -22,7 +22,7 @@ export default function AskPage() {
22
22
  }, []);
23
23
 
24
24
  return (
25
- <div className="flex h-full min-h-0 flex-col bg-background">
25
+ <div className="analytics-ask-page flex h-full min-h-0 flex-col bg-background">
26
26
  <AgentChatSurface
27
27
  mode="page"
28
28
  chatViewTransition
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-06-26
4
+ ---
5
+
6
+ The Ask tab uses a softer dark-gray canvas while sidebar chat stays black.