@agent-native/core-corpus 0.201.0-nightly-20261005153421 → 0.201.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.
Files changed (235) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/security/SKILL.md +9 -2
  3. package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +14 -4
  4. package/corpus/templates/analytics/.agents/skills/storing-data/SKILL.md +12 -7
  5. package/corpus/templates/analytics/CHANGELOG.md +6 -0
  6. package/corpus/templates/analytics/README.md +2 -2
  7. package/corpus/templates/analytics/changelog/2026-10-02-events-with-a-very-long-name-app-or-page-path-no-longer-caus.md +6 -0
  8. package/corpus/templates/analytics/package.json +1 -0
  9. package/corpus/templates/analytics/server/handlers/first-party-analytics.ts +9 -19
  10. package/corpus/templates/analytics/server/handlers/session-replay.ts +34 -47
  11. package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +9 -6
  12. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +57 -36
  13. package/corpus/templates/analytics/server/lib/indexed-text.ts +53 -0
  14. package/corpus/templates/analytics/server/lib/request-errors.ts +73 -0
  15. package/corpus/templates/analytics/server/lib/session-event-index.ts +6 -16
  16. package/corpus/templates/analytics/server/lib/session-replay.ts +12 -2
  17. package/corpus/templates/analytics/server/plugins/auth.ts +2 -1
  18. package/corpus/templates/analytics/server/plugins/otel.ts +6 -0
  19. package/corpus/templates/assets/.agents/skills/security/SKILL.md +9 -2
  20. package/corpus/templates/assets/.agents/skills/storing-data/SKILL.md +12 -7
  21. package/corpus/templates/assets/CHANGELOG.md +7 -0
  22. package/corpus/templates/assets/README.md +2 -2
  23. package/corpus/templates/assets/package.json +1 -0
  24. package/corpus/templates/assets/server/plugins/auth.ts +2 -1
  25. package/corpus/templates/assets/server/plugins/otel.ts +6 -0
  26. package/corpus/templates/brain/.agents/skills/brain/RUNBOOK.md +2 -1
  27. package/corpus/templates/brain/.agents/skills/brain/SKILL.md +5 -4
  28. package/corpus/templates/brain/.agents/skills/security/SKILL.md +9 -2
  29. package/corpus/templates/brain/.agents/skills/storing-data/SKILL.md +12 -7
  30. package/corpus/templates/brain/CHANGELOG.md +6 -0
  31. package/corpus/templates/brain/README.md +12 -8
  32. package/corpus/templates/brain/changelog/2026-10-05-private-slack-channels-are-searchable-org-wide.md +6 -0
  33. package/corpus/templates/brain/package.json +1 -0
  34. package/corpus/templates/brain/server/lib/audiences.ts +1 -98
  35. package/corpus/templates/brain/server/lib/connectors.ts +2 -166
  36. package/corpus/templates/brain/server/plugins/otel.ts +6 -0
  37. package/corpus/templates/calendar/.agents/skills/security/SKILL.md +9 -2
  38. package/corpus/templates/calendar/.agents/skills/storing-data/SKILL.md +12 -7
  39. package/corpus/templates/calendar/CHANGELOG.md +7 -0
  40. package/corpus/templates/calendar/README.md +2 -2
  41. package/corpus/templates/calendar/package.json +1 -0
  42. package/corpus/templates/calendar/server/plugins/auth.ts +2 -1
  43. package/corpus/templates/calendar/server/plugins/otel.ts +6 -0
  44. package/corpus/templates/chat/.agents/skills/security/SKILL.md +9 -2
  45. package/corpus/templates/chat/.agents/skills/storing-data/SKILL.md +12 -7
  46. package/corpus/templates/chat/README.md +2 -2
  47. package/corpus/templates/clips/.agents/skills/ai-video-tools/SKILL.md +9 -0
  48. package/corpus/templates/clips/.agents/skills/security/SKILL.md +9 -2
  49. package/corpus/templates/clips/CHANGELOG.md +24 -0
  50. package/corpus/templates/clips/README.md +2 -2
  51. package/corpus/templates/clips/actions/lib/audio-chunk-list.ts +23 -0
  52. package/corpus/templates/clips/actions/lib/audio-only-transcription.ts +187 -292
  53. package/corpus/templates/clips/actions/lib/chunked-transcription.ts +151 -0
  54. package/corpus/templates/clips/actions/lib/recording-audio-source.ts +191 -0
  55. package/corpus/templates/clips/actions/request-transcript.ts +81 -135
  56. package/corpus/templates/clips/actions/search-recordings.ts +19 -5
  57. package/corpus/templates/clips/app/components/clips-command-menu.tsx +5 -0
  58. package/corpus/templates/clips/app/components/library/library-layout.tsx +3 -1
  59. package/corpus/templates/clips/app/components/library/search-bar.tsx +5 -0
  60. package/corpus/templates/clips/app/hooks/use-library.ts +1 -0
  61. package/corpus/templates/clips/app/lib/local-recording-upload.ts +13 -6
  62. package/corpus/templates/clips/app/lib/recording-section.ts +1 -1
  63. package/corpus/templates/clips/app/routes/_app.r.$recordingId.tsx +7 -5
  64. package/corpus/templates/clips/app/routes/record.tsx +16 -6
  65. package/corpus/templates/clips/changelog/2026-10-02-long-uploads-an-hour-or-more-now-transcribe-reliably-instead.md +6 -0
  66. package/corpus/templates/clips/changelog/2026-10-05-confirming-discard-recording-now-returns-you-to-your-library.md +6 -0
  67. package/corpus/templates/clips/changelog/2026-10-05-discarding-a-recording-now-removes-its-failed-upload-card-fr.md +6 -0
  68. package/corpus/templates/clips/changelog/2026-10-05-discarding-a-recovered-recording-no-longer-warns-that-it-s-o.md +6 -0
  69. package/corpus/templates/clips/changelog/2026-10-05-search-results-identify-recordings-in-trash-and-open-them-wi.md +6 -0
  70. package/corpus/templates/clips/package.json +1 -0
  71. package/corpus/templates/clips/server/lib/builder-cdn.ts +5 -0
  72. package/corpus/templates/clips/server/lib/builder-media-compression.ts +2 -2
  73. package/corpus/templates/clips/server/plugins/auth.ts +2 -1
  74. package/corpus/templates/clips/server/plugins/otel.ts +6 -0
  75. package/corpus/templates/clips/shared/transcript-failure.ts +5 -0
  76. package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +8 -2
  77. package/corpus/templates/content/.agents/skills/security/SKILL.md +9 -2
  78. package/corpus/templates/content/.agents/skills/storing-data/SKILL.md +12 -7
  79. package/corpus/templates/content/CHANGELOG.md +41 -0
  80. package/corpus/templates/content/README.md +2 -2
  81. package/corpus/templates/content/actions/_database-navigation.ts +523 -344
  82. package/corpus/templates/content/actions/_database-row-mutation.ts +44 -10
  83. package/corpus/templates/content/actions/_database-setup-discovery.ts +9 -3
  84. package/corpus/templates/content/actions/_database-utils.ts +299 -271
  85. package/corpus/templates/content/actions/_property-utils.ts +293 -190
  86. package/corpus/templates/content/actions/_relation-values.ts +3 -1
  87. package/corpus/templates/content/actions/get-content-database.ts +1 -0
  88. package/corpus/templates/content/actions/query-content-database-items.ts +32 -5
  89. package/corpus/templates/content/actions/set-document-property.ts +17 -11
  90. package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +21 -6
  91. package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +127 -43
  92. package/corpus/templates/content/app/components/editor/DocumentEditorSkeleton.tsx +159 -50
  93. package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +12 -28
  94. package/corpus/templates/content/app/components/editor/PageDraftRecovery.tsx +6 -1
  95. package/corpus/templates/content/app/components/editor/TableHoverControls.tsx +139 -70
  96. package/corpus/templates/content/app/components/editor/VisualEditor.tsx +16 -1
  97. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +180 -75
  98. package/corpus/templates/content/app/components/editor/database/DatabaseViewSkeleton.tsx +76 -0
  99. package/corpus/templates/content/app/components/editor/database/navigation-state.ts +60 -2
  100. package/corpus/templates/content/app/components/editor/database/sidebar.tsx +41 -42
  101. package/corpus/templates/content/app/components/editor/document-editor-layout.ts +18 -0
  102. package/corpus/templates/content/app/components/editor/extensions/NotionExtensions.tsx +11 -3
  103. package/corpus/templates/content/app/components/editor/suggestions/draft-session.ts +15 -7
  104. package/corpus/templates/content/app/components/editor/suggestions/model.ts +13 -0
  105. package/corpus/templates/content/app/components/editor/suggestions/read-only-blocks.ts +136 -0
  106. package/corpus/templates/content/app/components/editor/table-view.ts +73 -0
  107. package/corpus/templates/content/app/components/layout/ContentStartupShell.tsx +1 -1
  108. package/corpus/templates/content/app/components/layout/Layout.tsx +5 -1
  109. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +57 -16
  110. package/corpus/templates/content/app/components/sidebar/MovePageDialog.tsx +4 -4
  111. package/corpus/templates/content/app/components/sidebar/SidebarNavigationRow.tsx +34 -10
  112. package/corpus/templates/content/app/global.css +16 -8
  113. package/corpus/templates/content/app/hooks/content-action-refresh.ts +14 -13
  114. package/corpus/templates/content/app/hooks/use-content-database.ts +72 -9
  115. package/corpus/templates/content/app/hooks/use-content-personal-navigation.ts +7 -3
  116. package/corpus/templates/content/app/hooks/use-documents.ts +27 -0
  117. package/corpus/templates/content/app/i18n-data.ts +3 -2
  118. package/corpus/templates/content/app/lib/content-landing.ts +3 -31
  119. package/corpus/templates/content/app/lib/files-navigation.ts +182 -10
  120. package/corpus/templates/content/app/lib/files-root-hint.ts +20 -32
  121. package/corpus/templates/content/app/lib/page-startup-hints.ts +108 -0
  122. package/corpus/templates/content/app/lib/private-link-redirect.ts +25 -0
  123. package/corpus/templates/content/app/lib/sidebar-layout-hint.ts +34 -1
  124. package/corpus/templates/content/app/lib/startup-timing.ts +2 -0
  125. package/corpus/templates/content/app/root.tsx +3 -1
  126. package/corpus/templates/content/app/routes/_app.home.tsx +10 -19
  127. package/corpus/templates/content/app/routes/p.$id.tsx +23 -5
  128. package/corpus/templates/content/changelog/2026-10-02-a-page-link-you-cant-open-now-says-so-instead-of-opening-an.md +6 -0
  129. package/corpus/templates/content/changelog/2026-10-02-after-a-refresh-the-files-sidebar-shows-the-open-page-s-fold.md +6 -0
  130. package/corpus/templates/content/changelog/2026-10-02-large-collections-open-faster.md +6 -0
  131. package/corpus/templates/content/changelog/2026-10-02-pages-stay-inside-the-window-at-every-width-long-inline-code.md +6 -0
  132. package/corpus/templates/content/changelog/2026-10-02-pages-with-open-comments-and-collections-with-sorted-or-filt.md +6 -0
  133. package/corpus/templates/content/changelog/2026-10-02-suggest-edits-works-on-pages-written-by-agents-including-pag.md +6 -0
  134. package/corpus/templates/content/changelog/2026-10-02-while-you-suggest-edits-tables-and-other-blocks-that-suggest.md +6 -0
  135. package/corpus/templates/content/changelog/2026-10-05-collection-view-context-now-survives-quick-page-changes-when.md +6 -0
  136. package/corpus/templates/content/changelog/2026-10-05-collection-views-keep-their-saved-rows-accurate-during-refre.md +6 -0
  137. package/corpus/templates/content/changelog/2026-10-05-exact-saved-view-links-keep-collection-retry-available.md +6 -0
  138. package/corpus/templates/content/changelog/2026-10-05-expanding-a-files-folder-now-shares-one-navigation-read-acro.md +6 -0
  139. package/corpus/templates/content/changelog/2026-10-05-files-navigation-retries-temporary-failures-consistently.md +6 -0
  140. package/corpus/templates/content/changelog/2026-10-05-shared-page-owners-keep-edit-and-manage-controls-in-files-an.md +6 -0
  141. package/corpus/templates/content/changelog/2026-10-05-tagging-an-ai-in-a-comment-works-again-instead-of-failing-ri.md +6 -0
  142. package/corpus/templates/content/changelog/2026-10-05-the-home-loading-shell-keeps-the-layout-of-your-last-opened-.md +6 -0
  143. package/corpus/templates/content/changelog/2026-10-05-typing-and-a-space-or-inserting-a-toggle-or-callout-no-longe.md +6 -0
  144. package/corpus/templates/content/docs/product/capabilities/content.workspace.session-restore.md +4 -1
  145. package/corpus/templates/content/e2e/playwright.config.ts +1 -1
  146. package/corpus/templates/content/package.json +2 -1
  147. package/corpus/templates/content/scripts/seed-perf-database.mjs +600 -0
  148. package/corpus/templates/content/scripts/trace-startup.mjs +25 -3
  149. package/corpus/templates/content/server/db/index.ts +1 -1
  150. package/corpus/templates/content/server/lib/suggested-edits.ts +23 -26
  151. package/corpus/templates/content/server/plugins/auth.ts +2 -1
  152. package/corpus/templates/content/server/plugins/otel.ts +6 -0
  153. package/corpus/templates/content/shared/api.ts +17 -0
  154. package/corpus/templates/content/shared/suggestion-diff.ts +124 -38
  155. package/corpus/templates/content/shared/suggestion-formatting.ts +134 -3
  156. package/corpus/templates/crm/.agents/skills/security/SKILL.md +9 -2
  157. package/corpus/templates/crm/.agents/skills/storing-data/SKILL.md +12 -7
  158. package/corpus/templates/crm/package.json +1 -0
  159. package/corpus/templates/crm/server/plugins/otel.ts +6 -0
  160. package/corpus/templates/design/.agents/skills/security/SKILL.md +9 -2
  161. package/corpus/templates/design/.agents/skills/storing-data/SKILL.md +12 -7
  162. package/corpus/templates/design/CHANGELOG.md +41 -0
  163. package/corpus/templates/design/README.md +2 -2
  164. package/corpus/templates/design/actions/list-designs.ts +11 -4
  165. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +110 -32
  166. package/corpus/templates/design/app/components/design/multi-screen/cross-screen-drop.ts +28 -0
  167. package/corpus/templates/design/app/components/design/multi-screen/types.ts +1 -0
  168. package/corpus/templates/design/app/components/home/DesignHomeLibrary.tsx +79 -0
  169. package/corpus/templates/design/app/components/layout/Header.tsx +2 -4
  170. package/corpus/templates/design/app/components/ui/tabs.tsx +59 -1
  171. package/corpus/templates/design/app/global.css +1 -34
  172. package/corpus/templates/design/app/i18n/en-US.ts +4 -0
  173. package/corpus/templates/design/app/lib/design-filter.ts +4 -2
  174. package/corpus/templates/design/app/pages/Index.tsx +91 -59
  175. package/corpus/templates/design/app/pages/design-editor/commands/cross-screen-element-drop.ts +58 -17
  176. package/corpus/templates/design/changelog/2026-10-01-filter-designs-by-owner.md +6 -0
  177. package/corpus/templates/design/changelog/2026-10-03-layers-dropped-into-visible-canvas-space-beyond-a-screen-now.md +6 -0
  178. package/corpus/templates/design/changelog/2026-10-03-visible-screen-overflow-no-longer-routes-drops-to-the-canvas.md +6 -0
  179. package/corpus/templates/design/changelog/2026-10-05-the-recent-tab-shows-loading-placeholders-until-your-designs.md +6 -0
  180. package/corpus/templates/design/package.json +1 -0
  181. package/corpus/templates/design/server/plugins/auth.ts +2 -1
  182. package/corpus/templates/design/server/plugins/otel.ts +6 -0
  183. package/corpus/templates/dispatch/.agents/skills/security/SKILL.md +9 -2
  184. package/corpus/templates/dispatch/.agents/skills/storing-data/SKILL.md +12 -7
  185. package/corpus/templates/dispatch/README.md +2 -2
  186. package/corpus/templates/dispatch/package.json +1 -0
  187. package/corpus/templates/dispatch/server/plugins/otel.ts +6 -0
  188. package/corpus/templates/dispatch/server/plugins/setup-dispatch.ts +2 -1
  189. package/corpus/templates/factory/.agents/skills/security/SKILL.md +9 -2
  190. package/corpus/templates/factory/.agents/skills/storing-data/SKILL.md +12 -7
  191. package/corpus/templates/factory/package.json +1 -0
  192. package/corpus/templates/factory/server/plugins/otel.ts +6 -0
  193. package/corpus/templates/forms/.agents/skills/security/SKILL.md +9 -2
  194. package/corpus/templates/forms/.agents/skills/storing-data/SKILL.md +12 -7
  195. package/corpus/templates/forms/README.md +2 -2
  196. package/corpus/templates/forms/package.json +1 -0
  197. package/corpus/templates/forms/server/plugins/auth.ts +2 -1
  198. package/corpus/templates/forms/server/plugins/otel.ts +6 -0
  199. package/corpus/templates/mail/.agents/skills/security/SKILL.md +9 -2
  200. package/corpus/templates/mail/.agents/skills/storing-data/SKILL.md +12 -7
  201. package/corpus/templates/mail/CHANGELOG.md +6 -0
  202. package/corpus/templates/mail/README.md +2 -2
  203. package/corpus/templates/mail/package.json +1 -0
  204. package/corpus/templates/mail/server/plugins/auth.ts +2 -1
  205. package/corpus/templates/mail/server/plugins/otel.ts +6 -0
  206. package/corpus/templates/plan/.agents/skills/security/SKILL.md +9 -2
  207. package/corpus/templates/plan/.agents/skills/storing-data/SKILL.md +12 -7
  208. package/corpus/templates/plan/CHANGELOG.md +1 -0
  209. package/corpus/templates/plan/README.md +2 -2
  210. package/corpus/templates/plan/package.json +1 -0
  211. package/corpus/templates/plan/server/plugins/auth.ts +2 -1
  212. package/corpus/templates/plan/server/plugins/otel.ts +6 -0
  213. package/corpus/templates/slides/.agents/skills/security/SKILL.md +9 -2
  214. package/corpus/templates/slides/.agents/skills/storing-data/SKILL.md +12 -7
  215. package/corpus/templates/slides/CHANGELOG.md +23 -0
  216. package/corpus/templates/slides/README.md +2 -2
  217. package/corpus/templates/slides/actions/list-decks.ts +11 -4
  218. package/corpus/templates/slides/app/components/deck/DeckFilterMenu.tsx +44 -36
  219. package/corpus/templates/slides/app/components/home/SlidesHomeLibrary.tsx +79 -0
  220. package/corpus/templates/slides/app/components/layout/Header.tsx +2 -15
  221. package/corpus/templates/slides/app/components/ui/tabs.tsx +59 -0
  222. package/corpus/templates/slides/app/global.css +3 -54
  223. package/corpus/templates/slides/app/i18n/en-US.ts +4 -0
  224. package/corpus/templates/slides/app/lib/deck-filter.ts +5 -2
  225. package/corpus/templates/slides/app/pages/Index.tsx +102 -88
  226. package/corpus/templates/slides/changelog/2026-10-01-filter-decks-by-owner.md +6 -0
  227. package/corpus/templates/slides/changelog/2026-10-02-hide-recent-until-decks-available.md +6 -0
  228. package/corpus/templates/slides/changelog/2026-10-05-the-recent-tab-shows-loading-placeholders-until-your-decks-a.md +6 -0
  229. package/corpus/templates/slides/package.json +1 -0
  230. package/corpus/templates/slides/server/handlers/request-auth-context.ts +8 -0
  231. package/corpus/templates/slides/server/plugins/auth.ts +2 -1
  232. package/corpus/templates/slides/server/plugins/otel.ts +6 -0
  233. package/corpus/templates/tasks/.agents/skills/security/SKILL.md +9 -2
  234. package/corpus/templates/tasks/.agents/skills/storing-data/SKILL.md +12 -7
  235. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { useT } from "@agent-native/core/client/i18n";
2
- import { IconFilter } from "@tabler/icons-react";
2
+ import { IconChevronDown } from "@tabler/icons-react";
3
3
 
4
4
  import { Button } from "@/components/ui/button";
5
5
  import {
@@ -9,14 +9,7 @@ import {
9
9
  DropdownMenuRadioItem,
10
10
  DropdownMenuTrigger,
11
11
  } from "@/components/ui/dropdown-menu";
12
- import { FilterTriggerIndicator } from "@/components/ui/filter-trigger";
13
- import {
14
- Tooltip,
15
- TooltipContent,
16
- TooltipTrigger,
17
- } from "@/components/ui/tooltip";
18
12
  import type { DeckFilter } from "@/lib/deck-filter";
19
- import { cn } from "@/lib/utils";
20
13
 
21
14
  export function DeckFilterMenu({
22
15
  value,
@@ -26,45 +19,60 @@ export function DeckFilterMenu({
26
19
  onChange: (value: DeckFilter) => void;
27
20
  }) {
28
21
  const t = useT();
29
- const filtered = value === "mine";
30
- const label = filtered ? t("home.showMineDecks") : t("home.showAllDecks");
22
+ const optionLabels: Record<DeckFilter, string> = {
23
+ all: t("home.ownedByAnyone"),
24
+ mine: t("home.ownedByMe"),
25
+ "not-mine": t("home.sharedWithMe"),
26
+ };
27
+ const label = optionLabels[value];
31
28
  return (
32
29
  <DropdownMenu>
33
- <Tooltip>
34
- <TooltipTrigger asChild>
35
- <DropdownMenuTrigger asChild>
36
- <Button
37
- type="button"
38
- variant="outline"
39
- size="sm"
40
- aria-label={label}
41
- className={cn(
42
- "size-9 shrink-0 p-0",
43
- filtered && "border border-primary/40 text-primary",
44
- )}
45
- >
46
- <FilterTriggerIndicator active={filtered}>
47
- <IconFilter className="size-3.5" aria-hidden="true" />
48
- </FilterTriggerIndicator>
49
- </Button>
50
- </DropdownMenuTrigger>
51
- </TooltipTrigger>
52
- <TooltipContent>{label}</TooltipContent>
53
- </Tooltip>
30
+ <DropdownMenuTrigger asChild>
31
+ <Button
32
+ type="button"
33
+ variant="outline"
34
+ size="sm"
35
+ aria-label={label}
36
+ className="h-9 shrink-0 gap-2"
37
+ >
38
+ <span className="grid">
39
+ {Object.entries(optionLabels).map(([filter, option]) => (
40
+ <span
41
+ key={filter}
42
+ aria-hidden="true"
43
+ className="invisible col-start-1 row-start-1 whitespace-nowrap"
44
+ >
45
+ {option}
46
+ </span>
47
+ ))}
48
+ <span className="col-start-1 row-start-1 whitespace-nowrap">
49
+ {label}
50
+ </span>
51
+ </span>
52
+ <IconChevronDown className="size-4" aria-hidden="true" />
53
+ </Button>
54
+ </DropdownMenuTrigger>
54
55
  <DropdownMenuContent align="start">
55
56
  <DropdownMenuRadioGroup
56
57
  value={value}
57
58
  onValueChange={(nextValue) => {
58
- if (nextValue === "mine" || nextValue === "all") {
59
+ if (
60
+ nextValue === "mine" ||
61
+ nextValue === "all" ||
62
+ nextValue === "not-mine"
63
+ ) {
59
64
  onChange(nextValue);
60
65
  }
61
66
  }}
62
67
  >
63
- <DropdownMenuRadioItem value="mine">
64
- {t("home.mine")}
68
+ <DropdownMenuRadioItem value="all" indicator="check">
69
+ {t("home.ownedByAnyone")}
70
+ </DropdownMenuRadioItem>
71
+ <DropdownMenuRadioItem value="mine" indicator="check">
72
+ {t("home.ownedByMe")}
65
73
  </DropdownMenuRadioItem>
66
- <DropdownMenuRadioItem value="all">
67
- {t("home.all")}
74
+ <DropdownMenuRadioItem value="not-mine" indicator="check">
75
+ {t("home.sharedWithMe")}
68
76
  </DropdownMenuRadioItem>
69
77
  </DropdownMenuRadioGroup>
70
78
  </DropdownMenuContent>
@@ -0,0 +1,79 @@
1
+ import type { ReactNode } from "react";
2
+
3
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
4
+
5
+ export type SlidesHomeLibraryTab = "templates" | "recent";
6
+
7
+ interface SlidesHomeLibraryProps {
8
+ value: SlidesHomeLibraryTab;
9
+ onValueChange: (value: SlidesHomeLibraryTab) => void;
10
+ labels: { templates: string; recent: string };
11
+ browseAll?: ReactNode;
12
+ search?: ReactNode;
13
+ recentActions?: ReactNode;
14
+ templates: ReactNode;
15
+ recent?: ReactNode;
16
+ recentVisible: boolean;
17
+ }
18
+
19
+ export function SlidesHomeLibrary({
20
+ value,
21
+ onValueChange,
22
+ labels,
23
+ browseAll,
24
+ search,
25
+ recentActions,
26
+ templates,
27
+ recent,
28
+ recentVisible,
29
+ }: SlidesHomeLibraryProps) {
30
+ const activeValue = recentVisible ? value : "templates";
31
+
32
+ return (
33
+ <section
34
+ className="agent-prompt-home-library"
35
+ aria-label={labels.templates}
36
+ >
37
+ <Tabs
38
+ className="agent-prompt-home-tabs"
39
+ value={activeValue}
40
+ onValueChange={(nextValue) => {
41
+ if (nextValue === "templates" || nextValue === "recent") {
42
+ onValueChange(nextValue);
43
+ }
44
+ }}
45
+ >
46
+ <div className="flex flex-wrap items-center justify-between gap-3">
47
+ <TabsList variant="line">
48
+ {recentVisible ? (
49
+ <TabsTrigger value="recent" className="flex-none">
50
+ {labels.recent}
51
+ </TabsTrigger>
52
+ ) : null}
53
+ <TabsTrigger
54
+ value="templates"
55
+ className="flex-none"
56
+ onClick={() => {
57
+ if (activeValue === "templates") onValueChange("templates");
58
+ }}
59
+ >
60
+ {labels.templates}
61
+ </TabsTrigger>
62
+ </TabsList>
63
+ {activeValue === "recent" ? (
64
+ <div className="flex w-full min-w-0 flex-wrap items-center justify-end gap-2 sm:w-auto">
65
+ {search}
66
+ {recentActions}
67
+ </div>
68
+ ) : (
69
+ browseAll
70
+ )}
71
+ </div>
72
+ <TabsContent value="templates">{templates}</TabsContent>
73
+ {recentVisible ? (
74
+ <TabsContent value="recent">{recent}</TabsContent>
75
+ ) : null}
76
+ </Tabs>
77
+ </section>
78
+ );
79
+ }
@@ -77,21 +77,8 @@ function HeaderControls({
77
77
  );
78
78
  }
79
79
 
80
- export function HomeHeaderActions({
81
- search,
82
- children,
83
- }: {
84
- search: ReactNode;
85
- children: ReactNode;
86
- }) {
87
- return (
88
- <>
89
- {search ? (
90
- <div className="slides-home-search w-full">{search}</div>
91
- ) : null}
92
- <HeaderControls showNotifications={false}>{children}</HeaderControls>
93
- </>
94
- );
80
+ export function HomeHeaderActions({ children }: { children: ReactNode }) {
81
+ return <HeaderControls showNotifications={false}>{children}</HeaderControls>;
95
82
  }
96
83
 
97
84
  export function Header() {
@@ -0,0 +1,59 @@
1
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
2
+ import * as React from "react";
3
+
4
+ import { cn } from "@/lib/utils";
5
+
6
+ const Tabs = TabsPrimitive.Root;
7
+
8
+ const TabsList = React.forwardRef<
9
+ React.ElementRef<typeof TabsPrimitive.List>,
10
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> & {
11
+ variant?: "default" | "line";
12
+ }
13
+ >(({ className, variant = "default", ...props }, ref) => (
14
+ <TabsPrimitive.List
15
+ ref={ref}
16
+ data-variant={variant}
17
+ className={cn(
18
+ variant === "line"
19
+ ? "group/tabs-list inline-flex w-fit items-center justify-start gap-1 border-b border-border bg-transparent p-0 text-muted-foreground"
20
+ : "inline-flex h-9 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
21
+ className,
22
+ )}
23
+ {...props}
24
+ />
25
+ ));
26
+ TabsList.displayName = TabsPrimitive.List.displayName;
27
+
28
+ const TabsTrigger = React.forwardRef<
29
+ React.ElementRef<typeof TabsPrimitive.Trigger>,
30
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
31
+ >(({ className, ...props }, ref) => (
32
+ <TabsPrimitive.Trigger
33
+ ref={ref}
34
+ className={cn(
35
+ "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium ring-offset-background transition-[color,background-color,box-shadow] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
36
+ "group-data-[variant=line]/tabs-list:relative group-data-[variant=line]/tabs-list:h-9 group-data-[variant=line]/tabs-list:flex-none group-data-[variant=line]/tabs-list:rounded-none group-data-[variant=line]/tabs-list:border-b-2 group-data-[variant=line]/tabs-list:border-transparent group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:font-medium group-data-[variant=line]/tabs-list:text-muted-foreground group-data-[variant=line]/tabs-list:data-[state=active]:border-foreground group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:text-foreground group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none",
37
+ className,
38
+ )}
39
+ {...props}
40
+ />
41
+ ));
42
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
43
+
44
+ const TabsContent = React.forwardRef<
45
+ React.ElementRef<typeof TabsPrimitive.Content>,
46
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
47
+ >(({ className, ...props }, ref) => (
48
+ <TabsPrimitive.Content
49
+ ref={ref}
50
+ className={cn(
51
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
52
+ className,
53
+ )}
54
+ {...props}
55
+ />
56
+ ));
57
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
58
+
59
+ export { Tabs, TabsContent, TabsList, TabsTrigger };
@@ -16,69 +16,28 @@
16
16
  @source "./**/*.{ts,tsx}";
17
17
 
18
18
  .slides-home-header {
19
- container-type: inline-size;
20
19
  border-bottom: 0;
21
20
  }
22
21
 
23
22
  .slides-home-toolbar {
24
- display: grid;
25
23
  height: 3.5rem;
26
- grid-template-columns: minmax(0, 1fr) minmax(150px, 1fr) minmax(0, 1fr);
27
- grid-template-rows: 3.5rem;
28
- column-gap: 0.75rem;
29
24
  padding: 0 1rem;
30
25
  }
31
26
 
32
- .slides-home-search {
33
- display: flex;
34
- grid-column: 2;
35
- grid-row: 1;
36
- width: 100%;
37
- min-width: 150px;
38
- max-width: 30rem;
39
- align-items: center;
40
- align-self: center;
41
- justify-self: center;
42
- }
43
-
44
- .slides-home-toolbar:not(:has(.slides-home-search)) > :last-child {
45
- grid-column: 2 / -1;
46
- }
47
-
48
27
  @media (min-width: 64rem) {
49
28
  .slides-home-toolbar {
50
29
  padding-inline: 1.5rem;
51
30
  }
52
31
  }
53
32
 
54
- @container (max-width: 25rem) {
55
- .slides-home-toolbar {
56
- grid-template-columns: minmax(0, 1fr) auto;
57
- }
58
-
59
- .slides-home-toolbar:has(.slides-home-search) {
60
- height: 7rem;
61
- grid-template-rows: 3.5rem 3.5rem;
62
- }
63
-
64
- .slides-home-search {
65
- grid-column: 1 / -1;
66
- grid-row: 2;
67
- justify-self: center;
68
- }
69
- }
70
-
71
33
  .slides-home-toolbar h1 {
72
34
  font-size: 1rem;
73
35
  line-height: 1.25rem;
74
36
  }
75
37
 
76
38
  .slides-home-mobile-toolbar {
77
- display: grid;
78
- grid-template-columns: minmax(4rem, 1fr) minmax(0, min(30rem, 60vw)) minmax(
79
- 4rem,
80
- 1fr
81
- );
39
+ display: flex;
40
+ justify-content: space-between;
82
41
  min-width: 0;
83
42
  align-items: center;
84
43
  }
@@ -91,21 +50,11 @@
91
50
  background-color: var(--color-background);
92
51
  }
93
52
 
94
- .slides-home-mobile-toolbar > .slides-home-mobile-search {
95
- grid-column: 2;
96
- width: 100%;
97
- min-width: 0;
98
- max-width: 30rem;
99
- justify-self: center;
100
- }
101
-
102
53
  .slides-home-mobile-toolbar > .slides-home-mobile-import {
103
- grid-column: 3;
104
- justify-self: end;
105
54
  min-width: 0;
106
55
  max-width: 100%;
107
56
  flex-shrink: 0;
108
- margin-inline-start: 0;
57
+ margin-inline-start: auto;
109
58
  }
110
59
 
111
60
  @media (max-width: 40rem) {
@@ -1008,9 +1008,13 @@ const messages = {
1008
1008
  all: "All",
1009
1009
  showMineDecks: "Show decks created by me",
1010
1010
  mine: "Mine",
1011
+ ownedByAnyone: "Owned by anyone",
1012
+ ownedByMe: "Owned by me",
1013
+ sharedWithMe: "Shared with me",
1011
1014
  createDeckOrVisual: "Create a presentation",
1012
1015
  noMineDecks: "No decks created by you yet.",
1013
1016
  noDecksMatchSearch: "No decks match your search.",
1017
+ noDecksMatchFilter: "No decks match the current filter.",
1014
1018
  deleteDeckTitle: "Delete Deck?",
1015
1019
  deleteDeckDescription:
1016
1020
  "This will permanently delete this deck and all its slides. This action cannot be undone.",
@@ -1,12 +1,13 @@
1
1
  export const DECK_FILTER_STORAGE_KEY = "slides:deck-filter";
2
2
 
3
- export type DeckFilter = "all" | "mine";
3
+ export type DeckFilter = "all" | "mine" | "not-mine";
4
4
 
5
5
  export function resolveDeckFilter(
6
6
  createdByParam: string | null,
7
7
  storedFilter: DeckFilter | undefined,
8
8
  ): DeckFilter {
9
9
  if (createdByParam === "me") return "mine";
10
+ if (createdByParam === "not-me") return "not-mine";
10
11
  if (createdByParam !== null) return "all";
11
12
  return storedFilter ?? "mine";
12
13
  }
@@ -21,7 +22,9 @@ export function readStoredDeckFilter(
21
22
 
22
23
  try {
23
24
  const stored = storage.getItem(DECK_FILTER_STORAGE_KEY);
24
- return stored === "all" || stored === "mine" ? stored : undefined;
25
+ return stored === "all" || stored === "mine" || stored === "not-mine"
26
+ ? stored
27
+ : undefined;
25
28
  } catch {
26
29
  // coercion-ok: localStorage failures intentionally fall back to the default filter.
27
30
  return undefined;