@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.
- package/corpus/README.md +1 -1
- package/corpus/templates/analytics/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +14 -4
- package/corpus/templates/analytics/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/analytics/CHANGELOG.md +6 -0
- package/corpus/templates/analytics/README.md +2 -2
- package/corpus/templates/analytics/changelog/2026-10-02-events-with-a-very-long-name-app-or-page-path-no-longer-caus.md +6 -0
- package/corpus/templates/analytics/package.json +1 -0
- package/corpus/templates/analytics/server/handlers/first-party-analytics.ts +9 -19
- package/corpus/templates/analytics/server/handlers/session-replay.ts +34 -47
- package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +9 -6
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +57 -36
- package/corpus/templates/analytics/server/lib/indexed-text.ts +53 -0
- package/corpus/templates/analytics/server/lib/request-errors.ts +73 -0
- package/corpus/templates/analytics/server/lib/session-event-index.ts +6 -16
- package/corpus/templates/analytics/server/lib/session-replay.ts +12 -2
- package/corpus/templates/analytics/server/plugins/auth.ts +2 -1
- package/corpus/templates/analytics/server/plugins/otel.ts +6 -0
- package/corpus/templates/assets/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/assets/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/assets/CHANGELOG.md +7 -0
- package/corpus/templates/assets/README.md +2 -2
- package/corpus/templates/assets/package.json +1 -0
- package/corpus/templates/assets/server/plugins/auth.ts +2 -1
- package/corpus/templates/assets/server/plugins/otel.ts +6 -0
- package/corpus/templates/brain/.agents/skills/brain/RUNBOOK.md +2 -1
- package/corpus/templates/brain/.agents/skills/brain/SKILL.md +5 -4
- package/corpus/templates/brain/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/brain/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/brain/CHANGELOG.md +6 -0
- package/corpus/templates/brain/README.md +12 -8
- package/corpus/templates/brain/changelog/2026-10-05-private-slack-channels-are-searchable-org-wide.md +6 -0
- package/corpus/templates/brain/package.json +1 -0
- package/corpus/templates/brain/server/lib/audiences.ts +1 -98
- package/corpus/templates/brain/server/lib/connectors.ts +2 -166
- package/corpus/templates/brain/server/plugins/otel.ts +6 -0
- package/corpus/templates/calendar/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/calendar/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/calendar/CHANGELOG.md +7 -0
- package/corpus/templates/calendar/README.md +2 -2
- package/corpus/templates/calendar/package.json +1 -0
- package/corpus/templates/calendar/server/plugins/auth.ts +2 -1
- package/corpus/templates/calendar/server/plugins/otel.ts +6 -0
- package/corpus/templates/chat/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/chat/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/chat/README.md +2 -2
- package/corpus/templates/clips/.agents/skills/ai-video-tools/SKILL.md +9 -0
- package/corpus/templates/clips/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/clips/CHANGELOG.md +24 -0
- package/corpus/templates/clips/README.md +2 -2
- package/corpus/templates/clips/actions/lib/audio-chunk-list.ts +23 -0
- package/corpus/templates/clips/actions/lib/audio-only-transcription.ts +187 -292
- package/corpus/templates/clips/actions/lib/chunked-transcription.ts +151 -0
- package/corpus/templates/clips/actions/lib/recording-audio-source.ts +191 -0
- package/corpus/templates/clips/actions/request-transcript.ts +81 -135
- package/corpus/templates/clips/actions/search-recordings.ts +19 -5
- package/corpus/templates/clips/app/components/clips-command-menu.tsx +5 -0
- package/corpus/templates/clips/app/components/library/library-layout.tsx +3 -1
- package/corpus/templates/clips/app/components/library/search-bar.tsx +5 -0
- package/corpus/templates/clips/app/hooks/use-library.ts +1 -0
- package/corpus/templates/clips/app/lib/local-recording-upload.ts +13 -6
- package/corpus/templates/clips/app/lib/recording-section.ts +1 -1
- package/corpus/templates/clips/app/routes/_app.r.$recordingId.tsx +7 -5
- package/corpus/templates/clips/app/routes/record.tsx +16 -6
- package/corpus/templates/clips/changelog/2026-10-02-long-uploads-an-hour-or-more-now-transcribe-reliably-instead.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-05-confirming-discard-recording-now-returns-you-to-your-library.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-05-discarding-a-recording-now-removes-its-failed-upload-card-fr.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-05-discarding-a-recovered-recording-no-longer-warns-that-it-s-o.md +6 -0
- package/corpus/templates/clips/changelog/2026-10-05-search-results-identify-recordings-in-trash-and-open-them-wi.md +6 -0
- package/corpus/templates/clips/package.json +1 -0
- package/corpus/templates/clips/server/lib/builder-cdn.ts +5 -0
- package/corpus/templates/clips/server/lib/builder-media-compression.ts +2 -2
- package/corpus/templates/clips/server/plugins/auth.ts +2 -1
- package/corpus/templates/clips/server/plugins/otel.ts +6 -0
- package/corpus/templates/clips/shared/transcript-failure.ts +5 -0
- package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +8 -2
- package/corpus/templates/content/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/content/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/content/CHANGELOG.md +41 -0
- package/corpus/templates/content/README.md +2 -2
- package/corpus/templates/content/actions/_database-navigation.ts +523 -344
- package/corpus/templates/content/actions/_database-row-mutation.ts +44 -10
- package/corpus/templates/content/actions/_database-setup-discovery.ts +9 -3
- package/corpus/templates/content/actions/_database-utils.ts +299 -271
- package/corpus/templates/content/actions/_property-utils.ts +293 -190
- package/corpus/templates/content/actions/_relation-values.ts +3 -1
- package/corpus/templates/content/actions/get-content-database.ts +1 -0
- package/corpus/templates/content/actions/query-content-database-items.ts +32 -5
- package/corpus/templates/content/actions/set-document-property.ts +17 -11
- package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +21 -6
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +127 -43
- package/corpus/templates/content/app/components/editor/DocumentEditorSkeleton.tsx +159 -50
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +12 -28
- package/corpus/templates/content/app/components/editor/PageDraftRecovery.tsx +6 -1
- package/corpus/templates/content/app/components/editor/TableHoverControls.tsx +139 -70
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +16 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +180 -75
- package/corpus/templates/content/app/components/editor/database/DatabaseViewSkeleton.tsx +76 -0
- package/corpus/templates/content/app/components/editor/database/navigation-state.ts +60 -2
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +41 -42
- package/corpus/templates/content/app/components/editor/document-editor-layout.ts +18 -0
- package/corpus/templates/content/app/components/editor/extensions/NotionExtensions.tsx +11 -3
- package/corpus/templates/content/app/components/editor/suggestions/draft-session.ts +15 -7
- package/corpus/templates/content/app/components/editor/suggestions/model.ts +13 -0
- package/corpus/templates/content/app/components/editor/suggestions/read-only-blocks.ts +136 -0
- package/corpus/templates/content/app/components/editor/table-view.ts +73 -0
- package/corpus/templates/content/app/components/layout/ContentStartupShell.tsx +1 -1
- package/corpus/templates/content/app/components/layout/Layout.tsx +5 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +57 -16
- package/corpus/templates/content/app/components/sidebar/MovePageDialog.tsx +4 -4
- package/corpus/templates/content/app/components/sidebar/SidebarNavigationRow.tsx +34 -10
- package/corpus/templates/content/app/global.css +16 -8
- package/corpus/templates/content/app/hooks/content-action-refresh.ts +14 -13
- package/corpus/templates/content/app/hooks/use-content-database.ts +72 -9
- package/corpus/templates/content/app/hooks/use-content-personal-navigation.ts +7 -3
- package/corpus/templates/content/app/hooks/use-documents.ts +27 -0
- package/corpus/templates/content/app/i18n-data.ts +3 -2
- package/corpus/templates/content/app/lib/content-landing.ts +3 -31
- package/corpus/templates/content/app/lib/files-navigation.ts +182 -10
- package/corpus/templates/content/app/lib/files-root-hint.ts +20 -32
- package/corpus/templates/content/app/lib/page-startup-hints.ts +108 -0
- package/corpus/templates/content/app/lib/private-link-redirect.ts +25 -0
- package/corpus/templates/content/app/lib/sidebar-layout-hint.ts +34 -1
- package/corpus/templates/content/app/lib/startup-timing.ts +2 -0
- package/corpus/templates/content/app/root.tsx +3 -1
- package/corpus/templates/content/app/routes/_app.home.tsx +10 -19
- package/corpus/templates/content/app/routes/p.$id.tsx +23 -5
- package/corpus/templates/content/changelog/2026-10-02-a-page-link-you-cant-open-now-says-so-instead-of-opening-an.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-after-a-refresh-the-files-sidebar-shows-the-open-page-s-fold.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-large-collections-open-faster.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-pages-stay-inside-the-window-at-every-width-long-inline-code.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-pages-with-open-comments-and-collections-with-sorted-or-filt.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-suggest-edits-works-on-pages-written-by-agents-including-pag.md +6 -0
- package/corpus/templates/content/changelog/2026-10-02-while-you-suggest-edits-tables-and-other-blocks-that-suggest.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-collection-view-context-now-survives-quick-page-changes-when.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-collection-views-keep-their-saved-rows-accurate-during-refre.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-exact-saved-view-links-keep-collection-retry-available.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-expanding-a-files-folder-now-shares-one-navigation-read-acro.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-files-navigation-retries-temporary-failures-consistently.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-shared-page-owners-keep-edit-and-manage-controls-in-files-an.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-tagging-an-ai-in-a-comment-works-again-instead-of-failing-ri.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-the-home-loading-shell-keeps-the-layout-of-your-last-opened-.md +6 -0
- package/corpus/templates/content/changelog/2026-10-05-typing-and-a-space-or-inserting-a-toggle-or-callout-no-longe.md +6 -0
- package/corpus/templates/content/docs/product/capabilities/content.workspace.session-restore.md +4 -1
- package/corpus/templates/content/e2e/playwright.config.ts +1 -1
- package/corpus/templates/content/package.json +2 -1
- package/corpus/templates/content/scripts/seed-perf-database.mjs +600 -0
- package/corpus/templates/content/scripts/trace-startup.mjs +25 -3
- package/corpus/templates/content/server/db/index.ts +1 -1
- package/corpus/templates/content/server/lib/suggested-edits.ts +23 -26
- package/corpus/templates/content/server/plugins/auth.ts +2 -1
- package/corpus/templates/content/server/plugins/otel.ts +6 -0
- package/corpus/templates/content/shared/api.ts +17 -0
- package/corpus/templates/content/shared/suggestion-diff.ts +124 -38
- package/corpus/templates/content/shared/suggestion-formatting.ts +134 -3
- package/corpus/templates/crm/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/crm/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/crm/package.json +1 -0
- package/corpus/templates/crm/server/plugins/otel.ts +6 -0
- package/corpus/templates/design/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/design/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/design/CHANGELOG.md +41 -0
- package/corpus/templates/design/README.md +2 -2
- package/corpus/templates/design/actions/list-designs.ts +11 -4
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +110 -32
- package/corpus/templates/design/app/components/design/multi-screen/cross-screen-drop.ts +28 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +1 -0
- package/corpus/templates/design/app/components/home/DesignHomeLibrary.tsx +79 -0
- package/corpus/templates/design/app/components/layout/Header.tsx +2 -4
- package/corpus/templates/design/app/components/ui/tabs.tsx +59 -1
- package/corpus/templates/design/app/global.css +1 -34
- package/corpus/templates/design/app/i18n/en-US.ts +4 -0
- package/corpus/templates/design/app/lib/design-filter.ts +4 -2
- package/corpus/templates/design/app/pages/Index.tsx +91 -59
- package/corpus/templates/design/app/pages/design-editor/commands/cross-screen-element-drop.ts +58 -17
- package/corpus/templates/design/changelog/2026-10-01-filter-designs-by-owner.md +6 -0
- package/corpus/templates/design/changelog/2026-10-03-layers-dropped-into-visible-canvas-space-beyond-a-screen-now.md +6 -0
- package/corpus/templates/design/changelog/2026-10-03-visible-screen-overflow-no-longer-routes-drops-to-the-canvas.md +6 -0
- package/corpus/templates/design/changelog/2026-10-05-the-recent-tab-shows-loading-placeholders-until-your-designs.md +6 -0
- package/corpus/templates/design/package.json +1 -0
- package/corpus/templates/design/server/plugins/auth.ts +2 -1
- package/corpus/templates/design/server/plugins/otel.ts +6 -0
- package/corpus/templates/dispatch/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/dispatch/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/dispatch/README.md +2 -2
- package/corpus/templates/dispatch/package.json +1 -0
- package/corpus/templates/dispatch/server/plugins/otel.ts +6 -0
- package/corpus/templates/dispatch/server/plugins/setup-dispatch.ts +2 -1
- package/corpus/templates/factory/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/factory/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/factory/package.json +1 -0
- package/corpus/templates/factory/server/plugins/otel.ts +6 -0
- package/corpus/templates/forms/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/forms/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/forms/README.md +2 -2
- package/corpus/templates/forms/package.json +1 -0
- package/corpus/templates/forms/server/plugins/auth.ts +2 -1
- package/corpus/templates/forms/server/plugins/otel.ts +6 -0
- package/corpus/templates/mail/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/mail/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/mail/CHANGELOG.md +6 -0
- package/corpus/templates/mail/README.md +2 -2
- package/corpus/templates/mail/package.json +1 -0
- package/corpus/templates/mail/server/plugins/auth.ts +2 -1
- package/corpus/templates/mail/server/plugins/otel.ts +6 -0
- package/corpus/templates/plan/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/plan/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/plan/CHANGELOG.md +1 -0
- package/corpus/templates/plan/README.md +2 -2
- package/corpus/templates/plan/package.json +1 -0
- package/corpus/templates/plan/server/plugins/auth.ts +2 -1
- package/corpus/templates/plan/server/plugins/otel.ts +6 -0
- package/corpus/templates/slides/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/slides/.agents/skills/storing-data/SKILL.md +12 -7
- package/corpus/templates/slides/CHANGELOG.md +23 -0
- package/corpus/templates/slides/README.md +2 -2
- package/corpus/templates/slides/actions/list-decks.ts +11 -4
- package/corpus/templates/slides/app/components/deck/DeckFilterMenu.tsx +44 -36
- package/corpus/templates/slides/app/components/home/SlidesHomeLibrary.tsx +79 -0
- package/corpus/templates/slides/app/components/layout/Header.tsx +2 -15
- package/corpus/templates/slides/app/components/ui/tabs.tsx +59 -0
- package/corpus/templates/slides/app/global.css +3 -54
- package/corpus/templates/slides/app/i18n/en-US.ts +4 -0
- package/corpus/templates/slides/app/lib/deck-filter.ts +5 -2
- package/corpus/templates/slides/app/pages/Index.tsx +102 -88
- package/corpus/templates/slides/changelog/2026-10-01-filter-decks-by-owner.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-02-hide-recent-until-decks-available.md +6 -0
- package/corpus/templates/slides/changelog/2026-10-05-the-recent-tab-shows-loading-placeholders-until-your-decks-a.md +6 -0
- package/corpus/templates/slides/package.json +1 -0
- package/corpus/templates/slides/server/handlers/request-auth-context.ts +8 -0
- package/corpus/templates/slides/server/plugins/auth.ts +2 -1
- package/corpus/templates/slides/server/plugins/otel.ts +6 -0
- package/corpus/templates/tasks/.agents/skills/security/SKILL.md +9 -2
- package/corpus/templates/tasks/.agents/skills/storing-data/SKILL.md +12 -7
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useT } from "@agent-native/core/client/i18n";
|
|
2
|
-
import {
|
|
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
|
|
30
|
-
|
|
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
|
-
<
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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 (
|
|
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="
|
|
64
|
-
{t("home.
|
|
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="
|
|
67
|
-
{t("home.
|
|
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
|
-
|
|
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:
|
|
78
|
-
|
|
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:
|
|
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"
|
|
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;
|