@agent-native/core 0.149.2 → 0.149.4
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/actions/SKILL.md +54 -488
- package/corpus/templates/analytics/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/analytics/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/analytics/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/analytics/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/analytics/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/analytics/AGENTS.md +25 -32
- package/corpus/templates/analytics/app/global.css +1 -1
- package/corpus/templates/analytics/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/assets/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/assets/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/assets/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/assets/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/assets/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/assets/AGENTS.md +6 -9
- package/corpus/templates/assets/app/global.css +1 -1
- package/corpus/templates/assets/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/brain/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/brain/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/brain/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/brain/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/brain/AGENTS.md +5 -12
- package/corpus/templates/brain/app/global.css +1 -1
- package/corpus/templates/brain/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/calendar/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/calendar/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/calendar/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/calendar/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/calendar/AGENTS.md +8 -9
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/chat/AGENTS.md +32 -80
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/clips/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/clips/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/clips/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/clips/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/clips/AGENTS.md +25 -31
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/content/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/content/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/content/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/content/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/content/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/content/AGENTS.md +5 -9
- package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/crm/AGENTS.md +7 -11
- package/corpus/templates/crm/app/global.css +1 -1
- package/corpus/templates/crm/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/design/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/design/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/design/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/design/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/design/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +70 -3
- package/corpus/templates/design/AGENTS.md +13 -21
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +12 -0
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +19 -2
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +115 -7
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +82 -7
- package/corpus/templates/design/app/components/design/design-trace.ts +120 -0
- package/corpus/templates/design/app/components/design/dnd-debug.ts +2 -1
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +40 -26
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +4 -1
- package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +12 -3
- package/corpus/templates/design/app/components/design/multi-screen/screen-content-cache.ts +4 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +7 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -2
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -2
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +3 -0
- package/corpus/templates/design/app/i18n-data.ts +1 -0
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +5 -5
- package/corpus/templates/design/app/pages/DesignSystems.tsx +3 -2
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +100 -13
- package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/data-operations.ts +14 -0
- package/corpus/templates/design/changelog/2026-08-10-marquee-selecting-layers-far-down-a-tall-screen-now-selects-.md +6 -0
- package/corpus/templates/design/changelog/2026-08-10-the-frame-tool-draws-a-plain-frame-by-default-with-screen-av.md +6 -0
- package/corpus/templates/design/e2e/global-setup.ts +27 -32
- package/corpus/templates/design/playwright.config.ts +3 -5
- package/corpus/templates/design/shared/breakpoint-media.ts +9 -2
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/dispatch/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/dispatch/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/dispatch/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/dispatch/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/dispatch/AGENTS.md +9 -16
- package/corpus/templates/factory/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/factory/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/factory/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/factory/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/factory/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/factory/AGENTS.md +10 -24
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/forms/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/forms/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/forms/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/forms/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/forms/AGENTS.md +11 -17
- package/corpus/templates/forms/app/global.css +1 -0
- package/corpus/templates/forms/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/macros/AGENTS.md +8 -8
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/mail/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/mail/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/mail/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/mail/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/mail/AGENTS.md +5 -6
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/plan/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/plan/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/plan/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/plan/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/plan/AGENTS.md +5 -14
- package/corpus/templates/plan/changelog/2026-08-11-plan-no-longer-reloads-when-runtime-state-changes.md +6 -0
- package/corpus/templates/plan/vite.config.ts +5 -0
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/slides/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/slides/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/slides/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +2 -2
- package/corpus/templates/slides/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/slides/.agents/skills/creative-context/SKILL.md +6 -3
- package/corpus/templates/slides/.agents/skills/deck-management/SKILL.md +6 -1
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/slides/.agents/skills/image-generation-via-a2a/SKILL.md +3 -2
- package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +3 -0
- package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +3 -3
- package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/slides/AGENTS.md +22 -25
- package/corpus/templates/slides/actions/get-deck-reference-context.ts +2 -2
- package/corpus/templates/slides/actions/get-deck.ts +57 -9
- package/corpus/templates/slides/actions/import-file.ts +2 -1
- package/corpus/templates/slides/actions/patch-deck.ts +45 -2
- package/corpus/templates/slides/actions/update-slide.ts +1 -1
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +2 -2
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +1 -23
- package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -2
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +6 -6
- package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +3 -3
- package/corpus/templates/slides/app/components/editor/DeckEditorSkeleton.tsx +4 -4
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +428 -180
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +294 -266
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +7 -5
- package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +40 -12
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +6 -12
- package/corpus/templates/slides/app/components/editor/editor-command-model.ts +35 -0
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +8 -10
- package/corpus/templates/slides/app/context/DeckContext.tsx +2 -1
- package/corpus/templates/slides/app/global.css +76 -1
- package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
- package/corpus/templates/slides/app/lib/create-deck-generation.ts +51 -23
- package/corpus/templates/slides/app/lib/slide-animation-elements.ts +68 -5
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +13 -6
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -2
- package/corpus/templates/slides/app/pages/Index.tsx +87 -74
- package/corpus/templates/slides/app/root.tsx +43 -0
- package/corpus/templates/slides/changelog/2026-08-11-faster-slides-chat-deck-reads.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-slides-chat-can-read-one-slide-without-loading-the-full-deck.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-slides-clearly-indicate-when-an-ai-agent-is-editing-alongsid.md +6 -0
- package/corpus/templates/slides/package.json +1 -0
- package/corpus/templates/slides/server/lib/validate-slide-animations.ts +163 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +4 -3
- package/corpus/templates/slides/shared/api.ts +46 -15
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/tasks/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/tasks/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/tasks/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/tasks/.agents/skills/efficient-fable/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/efficient-frontier/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/quick-recap/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/stay-within-limits/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/tasks/AGENTS.md +5 -20
- package/dist/agent/production-agent.js +376 -345
- package/dist/agent/run-manager.js +156 -14
- package/dist/agent/run-store.d.ts +11 -10
- package/dist/agent/run-store.js +17 -13
- package/dist/client/AssistantChat.d.ts +6 -2
- package/dist/client/AssistantChat.js +216 -131
- package/dist/client/active-run-state.d.ts +9 -1
- package/dist/client/active-run-state.js +34 -3
- package/dist/client/agent-chat-adapter.d.ts +8 -0
- package/dist/client/agent-chat-adapter.js +114 -28
- package/dist/client/chat/message-components.d.ts +7 -1
- package/dist/client/chat/message-components.js +32 -5
- package/dist/client/chat/run-recovery.d.ts +1 -0
- package/dist/client/chat/run-recovery.js +8 -0
- package/dist/client/chat/tool-call-display.d.ts +2 -0
- package/dist/client/chat/tool-call-display.js +2 -0
- package/dist/client/chat-first/apps-rail.js +1 -1
- package/dist/client/chat-first/chat-history.d.ts +1 -1
- package/dist/client/chat-first/chat-history.js +5 -2
- package/dist/client/sse-event-processor.d.ts +4 -2
- package/dist/client/sse-event-processor.js +36 -6
- package/dist/client/use-run-stuck-detection.d.ts +2 -0
- package/dist/client/use-run-stuck-detection.js +85 -9
- package/dist/collab/routes.d.ts +1 -1
- package/dist/deploy/build.d.ts +4 -0
- package/dist/deploy/build.js +5 -0
- package/dist/deploy/workspace-deploy.js +5 -0
- package/dist/integrations/adapters/slack.d.ts +0 -4
- package/dist/integrations/adapters/slack.js +6 -30
- package/dist/integrations/catalog.js +1 -1
- package/dist/integrations/pending-tasks-store.d.ts +0 -8
- package/dist/integrations/pending-tasks-store.js +0 -21
- package/dist/integrations/slack-manifest.d.ts +2 -2
- package/dist/integrations/slack-manifest.js +0 -3
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +3 -3
- package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
- package/dist/provider-api/actions/provider-api.d.ts +8 -8
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/scripts/docs/source-search.js +2 -2
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-chat/framework-prompts.js +7 -2
- package/dist/server/agent-chat/prompt-resources.js +2 -2
- package/dist/server/agent-chat/skill-frontmatter.d.ts +31 -2
- package/dist/server/agent-chat/skill-frontmatter.js +41 -15
- package/dist/server/agent-chat-plugin.js +3 -3
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agents-bundle.d.ts +16 -19
- package/dist/server/agents-bundle.js +19 -35
- package/dist/server/better-auth-instance.d.ts +1 -0
- package/dist/server/better-auth-instance.js +17 -2
- package/dist/server/prompts/framework-core-compact.d.ts +6 -1
- package/dist/server/prompts/framework-core-compact.js +12 -9
- package/dist/server/prompts/framework-core.d.ts +6 -1
- package/dist/server/prompts/framework-core.js +11 -9
- package/dist/server/prompts/index.d.ts +1 -1
- package/dist/server/prompts/index.js +1 -1
- package/dist/server/prompts/shared-rules.d.ts +15 -11
- package/dist/server/prompts/shared-rules.js +17 -13
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/chat/AGENTS.md +32 -80
- package/dist/templates/default/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/default/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/headless/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
- package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
- package/dist/templates/workspace-core/AGENTS.md +7 -16
- package/docs/content/messaging.mdx +6 -7
- package/package.json +1 -1
- package/src/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/chat/AGENTS.md +32 -80
- package/src/templates/default/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/default/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/headless/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/headless/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
- package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
- package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
- package/src/templates/workspace-core/AGENTS.md +7 -16
|
@@ -27,12 +27,18 @@ import {
|
|
|
27
27
|
IconAdjustments,
|
|
28
28
|
IconPencilPlus,
|
|
29
29
|
IconPin,
|
|
30
|
+
IconBrandGoogle,
|
|
31
|
+
IconCode,
|
|
32
|
+
IconCopy,
|
|
33
|
+
IconFileTypePdf,
|
|
34
|
+
IconPlugConnected,
|
|
30
35
|
} from "@tabler/icons-react";
|
|
31
36
|
import { useTheme } from "next-themes";
|
|
32
|
-
import {
|
|
37
|
+
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
33
38
|
import { Link } from "react-router";
|
|
34
39
|
import { toast } from "sonner";
|
|
35
40
|
|
|
41
|
+
import { Button } from "@/components/ui/button";
|
|
36
42
|
import {
|
|
37
43
|
DropdownMenu,
|
|
38
44
|
DropdownMenuContent,
|
|
@@ -54,8 +60,12 @@ import { getDeckShareLinkOrder } from "@/lib/deck-share-links";
|
|
|
54
60
|
import type { GoogleSlidesExportResult } from "@/lib/export-google-slides-client";
|
|
55
61
|
import { parseUploadResponse } from "@/lib/upload-response";
|
|
56
62
|
|
|
63
|
+
import {
|
|
64
|
+
registerEditorCommands,
|
|
65
|
+
type EditorCommand,
|
|
66
|
+
} from "./editor-command-model";
|
|
57
67
|
import { EditorActionCluster } from "./EditorActionCluster";
|
|
58
|
-
import { ExportMenu } from "./ExportMenu";
|
|
68
|
+
import { ExportMenu, type ExportMenuHandle } from "./ExportMenu";
|
|
59
69
|
interface EditorToolbarProps {
|
|
60
70
|
deck: Deck;
|
|
61
71
|
deckId: string;
|
|
@@ -74,6 +84,8 @@ interface EditorToolbarProps {
|
|
|
74
84
|
onShowHistory: () => void;
|
|
75
85
|
historyButtonRef: React.RefObject<HTMLButtonElement | null>;
|
|
76
86
|
currentSlide?: Slide;
|
|
87
|
+
/** Host for the wide-layout style toolbar in this row. */
|
|
88
|
+
onWideContextToolbarSlotChange?: (element: HTMLDivElement | null) => void;
|
|
77
89
|
/** Active users on the current slide (from collab awareness) */
|
|
78
90
|
activeUsers?: CollabUser[];
|
|
79
91
|
/** Whether the agent has a durable presence entry on this slide */
|
|
@@ -145,6 +157,7 @@ export default function EditorToolbar({
|
|
|
145
157
|
onShowHistory,
|
|
146
158
|
historyButtonRef,
|
|
147
159
|
currentSlide,
|
|
160
|
+
onWideContextToolbarSlotChange,
|
|
148
161
|
activeUsers,
|
|
149
162
|
agentPresent,
|
|
150
163
|
agentActive,
|
|
@@ -223,11 +236,25 @@ export default function EditorToolbar({
|
|
|
223
236
|
// empty deck must keep this fallback or it has no way to add one.
|
|
224
237
|
const contextToolbarVisible = canEdit && Boolean(currentSlide);
|
|
225
238
|
const fileInputRef = useRef<HTMLInputElement>(null);
|
|
239
|
+
const exportMenuRef = useRef<ExportMenuHandle>(null);
|
|
240
|
+
const titleMeasureRef = useRef<HTMLSpanElement>(null);
|
|
241
|
+
const [titleInputWidth, setTitleInputWidth] = useState(96);
|
|
226
242
|
const [importing, setImporting] = useState(false);
|
|
227
243
|
const { setTheme, resolvedTheme } = useTheme();
|
|
228
244
|
const [themeMounted, setThemeMounted] = useState(false);
|
|
229
245
|
useEffect(() => setThemeMounted(true), []);
|
|
230
246
|
const isDark = themeMounted ? resolvedTheme === "dark" : false;
|
|
247
|
+
|
|
248
|
+
useLayoutEffect(() => {
|
|
249
|
+
const measuredWidth =
|
|
250
|
+
titleMeasureRef.current?.getBoundingClientRect().width;
|
|
251
|
+
if (typeof measuredWidth !== "number" || !Number.isFinite(measuredWidth)) {
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
setTitleInputWidth(
|
|
255
|
+
Math.min(500, Math.max(96, Math.ceil(measuredWidth) + 16)),
|
|
256
|
+
);
|
|
257
|
+
}, [deckTitle]);
|
|
231
258
|
const handleImportFile = async (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
232
259
|
const file = e.target.files?.[0];
|
|
233
260
|
if (!file) return;
|
|
@@ -304,8 +331,202 @@ export default function EditorToolbar({
|
|
|
304
331
|
}
|
|
305
332
|
};
|
|
306
333
|
|
|
334
|
+
const editorCommands = useMemo<EditorCommand[]>(() => {
|
|
335
|
+
const commands: EditorCommand[] = [];
|
|
336
|
+
if (canEdit) {
|
|
337
|
+
commands.push(
|
|
338
|
+
{
|
|
339
|
+
id: "generate-image",
|
|
340
|
+
group: "media",
|
|
341
|
+
label: t("editorToolbar.generateImage"),
|
|
342
|
+
keywords: ["image", "media", "ai"],
|
|
343
|
+
icon: IconPhoto,
|
|
344
|
+
run: onGenerateImage,
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
id: "asset-library",
|
|
348
|
+
group: "media",
|
|
349
|
+
label: t("editorToolbar.assetLibrary"),
|
|
350
|
+
keywords: ["image", "media", "assets"],
|
|
351
|
+
icon: IconFolderOpen,
|
|
352
|
+
run: onOpenAssetLibrary,
|
|
353
|
+
},
|
|
354
|
+
);
|
|
355
|
+
if (currentSlide && onToggleAnimations) {
|
|
356
|
+
commands.push({
|
|
357
|
+
id: "element-animations",
|
|
358
|
+
group: "slideTools",
|
|
359
|
+
label: t("editorToolbar.elementAnimations"),
|
|
360
|
+
keywords: ["animation", "motion"],
|
|
361
|
+
icon: IconBolt,
|
|
362
|
+
active: animationsOpen,
|
|
363
|
+
run: onToggleAnimations,
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
if (onToggleTweaks) {
|
|
367
|
+
commands.push({
|
|
368
|
+
id: "slide-tweaks",
|
|
369
|
+
group: "slideTools",
|
|
370
|
+
label: t("editorToolbar.tweaks"),
|
|
371
|
+
keywords: ["style", "inspect", "adjust"],
|
|
372
|
+
icon: IconAdjustments,
|
|
373
|
+
active: tweaksOpen,
|
|
374
|
+
run: onToggleTweaks,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
if (onToggleDrawMode) {
|
|
378
|
+
commands.push({
|
|
379
|
+
id: "draw-on-slide",
|
|
380
|
+
group: "slideTools",
|
|
381
|
+
label: t("editorToolbar.drawOnSlide"),
|
|
382
|
+
keywords: ["annotate", "draw"],
|
|
383
|
+
icon: IconPencilPlus,
|
|
384
|
+
active: drawMode,
|
|
385
|
+
run: onToggleDrawMode,
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
if (onTogglePinMode) {
|
|
389
|
+
commands.push({
|
|
390
|
+
id: "pin-comments",
|
|
391
|
+
group: "slideTools",
|
|
392
|
+
label: t("editorToolbar.pinComments"),
|
|
393
|
+
keywords: ["comment", "pin"],
|
|
394
|
+
icon: IconPin,
|
|
395
|
+
active: pinMode,
|
|
396
|
+
run: onTogglePinMode,
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
if (onToggleComments) {
|
|
401
|
+
commands.push({
|
|
402
|
+
id: "comments",
|
|
403
|
+
group: "comments",
|
|
404
|
+
label: t("editorToolbar.comments"),
|
|
405
|
+
keywords: ["comment", "review"],
|
|
406
|
+
icon: IconMessage,
|
|
407
|
+
active: commentsOpen,
|
|
408
|
+
run: onToggleComments,
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
commands.push(
|
|
413
|
+
{
|
|
414
|
+
id: "download-html",
|
|
415
|
+
group: "deck",
|
|
416
|
+
label: t("editorExport.downloadHtml"),
|
|
417
|
+
keywords: ["export", "html", "download"],
|
|
418
|
+
icon: IconCode,
|
|
419
|
+
run: () => void exportMenuRef.current?.exportHtml(),
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
id: "export-pdf",
|
|
423
|
+
group: "deck",
|
|
424
|
+
label: t("editorExport.exportPdf"),
|
|
425
|
+
keywords: ["export", "pdf", "download"],
|
|
426
|
+
icon: IconFileTypePdf,
|
|
427
|
+
run: () => void onExportPdf?.(),
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
id: "export-pptx",
|
|
431
|
+
group: "deck",
|
|
432
|
+
label: t("editorExport.exportPptx"),
|
|
433
|
+
keywords: ["export", "powerpoint", "pptx", "download"],
|
|
434
|
+
icon: IconDownload,
|
|
435
|
+
run: () => void exportMenuRef.current?.exportPptx(),
|
|
436
|
+
},
|
|
437
|
+
);
|
|
438
|
+
if (onExportGoogleSlides) {
|
|
439
|
+
commands.push(
|
|
440
|
+
{
|
|
441
|
+
id: "connect-google",
|
|
442
|
+
group: "deck",
|
|
443
|
+
label: t("editorExport.connectGoogle"),
|
|
444
|
+
keywords: ["google", "drive", "connect"],
|
|
445
|
+
icon: IconPlugConnected,
|
|
446
|
+
run: () => void exportMenuRef.current?.connectGoogle(),
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
id: "open-in-google-slides",
|
|
450
|
+
group: "deck",
|
|
451
|
+
label: t("editorExport.openInGoogleSlides"),
|
|
452
|
+
keywords: ["google", "slides", "export"],
|
|
453
|
+
icon: IconBrandGoogle,
|
|
454
|
+
run: () => void exportMenuRef.current?.exportGoogleSlides(),
|
|
455
|
+
},
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
if (onDuplicateDeck) {
|
|
459
|
+
commands.push({
|
|
460
|
+
id: "duplicate-deck",
|
|
461
|
+
group: "deck",
|
|
462
|
+
label: t("editorExport.duplicateDeck"),
|
|
463
|
+
keywords: ["copy", "duplicate"],
|
|
464
|
+
icon: IconCopy,
|
|
465
|
+
run: onDuplicateDeck,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
commands.push(
|
|
469
|
+
{
|
|
470
|
+
id: "import-file",
|
|
471
|
+
group: "other",
|
|
472
|
+
label: importing
|
|
473
|
+
? t("editorToolbar.importing")
|
|
474
|
+
: t("editorToolbar.importFile"),
|
|
475
|
+
keywords: ["import", "pptx", "docx", "pdf"],
|
|
476
|
+
icon: importing ? IconLoader2 : IconDownload,
|
|
477
|
+
run: () => fileInputRef.current?.click(),
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
id: "saved-versions",
|
|
481
|
+
group: "other",
|
|
482
|
+
label: t("editorToolbar.savedVersions"),
|
|
483
|
+
keywords: ["history", "versions", "restore"],
|
|
484
|
+
icon: IconHistory,
|
|
485
|
+
run: onShowHistory,
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
id: "toggle-theme",
|
|
489
|
+
group: "other",
|
|
490
|
+
label: isDark
|
|
491
|
+
? t("editorToolbar.lightTheme")
|
|
492
|
+
: t("editorToolbar.darkTheme"),
|
|
493
|
+
keywords: ["theme", "dark", "light", "mode"],
|
|
494
|
+
icon: isDark ? IconSun : IconMoon,
|
|
495
|
+
run: () => setTheme(isDark ? "light" : "dark"),
|
|
496
|
+
},
|
|
497
|
+
);
|
|
498
|
+
return commands;
|
|
499
|
+
}, [
|
|
500
|
+
animationsOpen,
|
|
501
|
+
canEdit,
|
|
502
|
+
commentsOpen,
|
|
503
|
+
currentSlide,
|
|
504
|
+
drawMode,
|
|
505
|
+
importing,
|
|
506
|
+
isDark,
|
|
507
|
+
onDuplicateDeck,
|
|
508
|
+
onExportGoogleSlides,
|
|
509
|
+
onExportPdf,
|
|
510
|
+
onGenerateImage,
|
|
511
|
+
onOpenAssetLibrary,
|
|
512
|
+
onShowHistory,
|
|
513
|
+
onToggleAnimations,
|
|
514
|
+
onToggleComments,
|
|
515
|
+
onToggleDrawMode,
|
|
516
|
+
onTogglePinMode,
|
|
517
|
+
onToggleTweaks,
|
|
518
|
+
pinMode,
|
|
519
|
+
setTheme,
|
|
520
|
+
t,
|
|
521
|
+
tweaksOpen,
|
|
522
|
+
]);
|
|
523
|
+
const editorCommandsRef = useRef<readonly EditorCommand[]>(editorCommands);
|
|
524
|
+
editorCommandsRef.current = editorCommands;
|
|
525
|
+
|
|
526
|
+
useEffect(() => registerEditorCommands(() => editorCommandsRef.current), []);
|
|
527
|
+
|
|
307
528
|
return (
|
|
308
|
-
<div className="flex h-11 shrink-0 items-center gap-1 overflow-x-auto whitespace-nowrap
|
|
529
|
+
<div className="deck-editor-toolbar flex h-11 shrink-0 items-center gap-1 overflow-x-auto whitespace-nowrap bg-background px-2 sm:px-3">
|
|
309
530
|
{/* Back button */}
|
|
310
531
|
<Tooltip>
|
|
311
532
|
<TooltipTrigger asChild>
|
|
@@ -357,22 +578,32 @@ export default function EditorToolbar({
|
|
|
357
578
|
)}
|
|
358
579
|
|
|
359
580
|
{/* Deck title */}
|
|
581
|
+
<span
|
|
582
|
+
ref={titleMeasureRef}
|
|
583
|
+
aria-hidden="true"
|
|
584
|
+
className="pointer-events-none fixed -left-[9999px] whitespace-pre text-sm font-medium opacity-0"
|
|
585
|
+
>
|
|
586
|
+
{deckTitle || " "}
|
|
587
|
+
</span>
|
|
360
588
|
<input
|
|
361
589
|
type="text"
|
|
362
590
|
value={deckTitle}
|
|
363
591
|
onChange={(e) => onTitleChange(e.target.value)}
|
|
364
|
-
|
|
592
|
+
style={{ width: `${titleInputWidth}px` }}
|
|
593
|
+
className="min-w-0 max-w-[500px] flex-shrink bg-transparent text-sm font-medium text-foreground/90 outline-none focus:text-foreground"
|
|
365
594
|
spellCheck={false}
|
|
366
595
|
/>
|
|
367
596
|
|
|
368
|
-
{/* Slide counter */}
|
|
369
|
-
<span className="text-xs text-muted-foreground/70 flex-shrink-0 hidden sm:inline">
|
|
370
|
-
{currentSlideIndex + 1}/{slideCount}
|
|
371
|
-
</span>
|
|
372
|
-
|
|
373
597
|
{/* Spacer */}
|
|
374
598
|
<div className="flex-1 min-w-2" />
|
|
375
599
|
|
|
600
|
+
<div
|
|
601
|
+
ref={onWideContextToolbarSlotChange}
|
|
602
|
+
data-context-toolbar-host="wide"
|
|
603
|
+
data-context-toolbar-visible={contextToolbarVisible ? "true" : "false"}
|
|
604
|
+
className="deck-editor-context-toolbar-host deck-editor-context-toolbar-host--wide"
|
|
605
|
+
/>
|
|
606
|
+
|
|
376
607
|
{/* "View only" badge — mirrors Google Slides' viewer chrome */}
|
|
377
608
|
{!canEdit && (
|
|
378
609
|
<span className="flex-shrink-0 inline-flex items-center gap-1 rounded-full border border-border bg-muted/50 px-2.5 py-1 text-xs font-medium text-muted-foreground">
|
|
@@ -400,6 +631,190 @@ export default function EditorToolbar({
|
|
|
400
631
|
className="flex-shrink-0 mr-0.5"
|
|
401
632
|
/>
|
|
402
633
|
|
|
634
|
+
{/* Consolidated editor menu */}
|
|
635
|
+
<div className="flex-shrink-0">
|
|
636
|
+
<DropdownMenu>
|
|
637
|
+
<Tooltip>
|
|
638
|
+
<TooltipTrigger asChild>
|
|
639
|
+
<DropdownMenuTrigger asChild>
|
|
640
|
+
<Button
|
|
641
|
+
type="button"
|
|
642
|
+
variant="ghost"
|
|
643
|
+
size="icon"
|
|
644
|
+
ref={historyButtonRef}
|
|
645
|
+
className={`${TOOLBAR_ICON_BUTTON_CLASS} cursor-pointer text-muted-foreground hover:bg-accent hover:text-foreground/70`}
|
|
646
|
+
aria-label={t("editorToolbar.more")}
|
|
647
|
+
>
|
|
648
|
+
<IconDotsVertical className="size-4" />
|
|
649
|
+
</Button>
|
|
650
|
+
</DropdownMenuTrigger>
|
|
651
|
+
</TooltipTrigger>
|
|
652
|
+
<TooltipContent>{t("editorToolbar.more")}</TooltipContent>
|
|
653
|
+
</Tooltip>
|
|
654
|
+
<DropdownMenuContent
|
|
655
|
+
align="end"
|
|
656
|
+
className="max-h-[min(80vh,32rem)] w-64 overflow-y-auto"
|
|
657
|
+
>
|
|
658
|
+
{canEdit && (
|
|
659
|
+
<>
|
|
660
|
+
<DropdownMenuLabel>
|
|
661
|
+
{t("editorToolbar.media")}
|
|
662
|
+
</DropdownMenuLabel>
|
|
663
|
+
<DropdownMenuGroup>
|
|
664
|
+
<DropdownMenuItem onSelect={onGenerateImage}>
|
|
665
|
+
<IconPhoto className="size-4" />
|
|
666
|
+
{t("editorToolbar.generateImage")}
|
|
667
|
+
</DropdownMenuItem>
|
|
668
|
+
<DropdownMenuItem onSelect={onOpenAssetLibrary}>
|
|
669
|
+
<IconFolderOpen className="size-4" />
|
|
670
|
+
{t("editorToolbar.assetLibrary")}
|
|
671
|
+
</DropdownMenuItem>
|
|
672
|
+
</DropdownMenuGroup>
|
|
673
|
+
</>
|
|
674
|
+
)}
|
|
675
|
+
|
|
676
|
+
{canEdit &&
|
|
677
|
+
(onToggleAnimations ||
|
|
678
|
+
onToggleTweaks ||
|
|
679
|
+
onToggleDrawMode ||
|
|
680
|
+
onTogglePinMode) && (
|
|
681
|
+
<>
|
|
682
|
+
<DropdownMenuSeparator />
|
|
683
|
+
<DropdownMenuLabel>
|
|
684
|
+
{t("editorToolbar.slideTools")}
|
|
685
|
+
</DropdownMenuLabel>
|
|
686
|
+
<DropdownMenuGroup>
|
|
687
|
+
{currentSlide && onToggleAnimations && (
|
|
688
|
+
<DropdownMenuItem
|
|
689
|
+
onSelect={onToggleAnimations}
|
|
690
|
+
className={
|
|
691
|
+
animationsOpen
|
|
692
|
+
? "bg-accent text-accent-foreground"
|
|
693
|
+
: undefined
|
|
694
|
+
}
|
|
695
|
+
>
|
|
696
|
+
<IconBolt className="size-4" />
|
|
697
|
+
{t("editorToolbar.elementAnimations")}
|
|
698
|
+
</DropdownMenuItem>
|
|
699
|
+
)}
|
|
700
|
+
{onToggleTweaks && (
|
|
701
|
+
<DropdownMenuItem
|
|
702
|
+
onSelect={onToggleTweaks}
|
|
703
|
+
className={
|
|
704
|
+
tweaksOpen
|
|
705
|
+
? "bg-accent text-accent-foreground"
|
|
706
|
+
: undefined
|
|
707
|
+
}
|
|
708
|
+
>
|
|
709
|
+
<IconAdjustments className="size-4" />
|
|
710
|
+
{t("editorToolbar.tweaks")}
|
|
711
|
+
</DropdownMenuItem>
|
|
712
|
+
)}
|
|
713
|
+
{onToggleDrawMode && (
|
|
714
|
+
<DropdownMenuItem
|
|
715
|
+
onSelect={onToggleDrawMode}
|
|
716
|
+
data-toolbar-draw-button
|
|
717
|
+
className={
|
|
718
|
+
drawMode
|
|
719
|
+
? "bg-accent text-accent-foreground"
|
|
720
|
+
: undefined
|
|
721
|
+
}
|
|
722
|
+
>
|
|
723
|
+
<IconPencilPlus className="size-4" />
|
|
724
|
+
{t("editorToolbar.drawOnSlide")}
|
|
725
|
+
</DropdownMenuItem>
|
|
726
|
+
)}
|
|
727
|
+
{onTogglePinMode && (
|
|
728
|
+
<DropdownMenuItem
|
|
729
|
+
onSelect={onTogglePinMode}
|
|
730
|
+
data-toolbar-pin-button
|
|
731
|
+
className={
|
|
732
|
+
pinMode
|
|
733
|
+
? "bg-accent text-accent-foreground"
|
|
734
|
+
: undefined
|
|
735
|
+
}
|
|
736
|
+
>
|
|
737
|
+
<IconPin className="size-4" />
|
|
738
|
+
{t("editorToolbar.pinComments")}
|
|
739
|
+
</DropdownMenuItem>
|
|
740
|
+
)}
|
|
741
|
+
</DropdownMenuGroup>
|
|
742
|
+
</>
|
|
743
|
+
)}
|
|
744
|
+
|
|
745
|
+
{onToggleComments && (
|
|
746
|
+
<>
|
|
747
|
+
<DropdownMenuSeparator />
|
|
748
|
+
<DropdownMenuLabel>
|
|
749
|
+
{t("editorToolbar.comments")}
|
|
750
|
+
</DropdownMenuLabel>
|
|
751
|
+
<DropdownMenuItem
|
|
752
|
+
onSelect={onToggleComments}
|
|
753
|
+
className={
|
|
754
|
+
commentsOpen
|
|
755
|
+
? "bg-accent text-accent-foreground"
|
|
756
|
+
: undefined
|
|
757
|
+
}
|
|
758
|
+
>
|
|
759
|
+
<IconMessage className="size-4" />
|
|
760
|
+
{t("editorToolbar.comments")}
|
|
761
|
+
{unresolvedCommentCount > 0 && (
|
|
762
|
+
<span className="ml-auto rounded-full bg-primary px-1.5 text-[10px] font-semibold text-primary-foreground">
|
|
763
|
+
{unresolvedCommentCount > 9
|
|
764
|
+
? "9+"
|
|
765
|
+
: unresolvedCommentCount}
|
|
766
|
+
</span>
|
|
767
|
+
)}
|
|
768
|
+
</DropdownMenuItem>
|
|
769
|
+
</>
|
|
770
|
+
)}
|
|
771
|
+
|
|
772
|
+
<DropdownMenuSeparator />
|
|
773
|
+
<ExportMenu
|
|
774
|
+
ref={exportMenuRef}
|
|
775
|
+
inline
|
|
776
|
+
deckId={deckId}
|
|
777
|
+
deckTitle={deckTitle}
|
|
778
|
+
onDuplicate={onDuplicateDeck ?? (() => {})}
|
|
779
|
+
onExportPdf={onExportPdf ?? (() => {})}
|
|
780
|
+
onExportPptx={onExportPptx ?? (() => {})}
|
|
781
|
+
onExportGoogleSlides={onExportGoogleSlides}
|
|
782
|
+
/>
|
|
783
|
+
<DropdownMenuSeparator />
|
|
784
|
+
<DropdownMenuItem
|
|
785
|
+
disabled={importing}
|
|
786
|
+
onSelect={() => fileInputRef.current?.click()}
|
|
787
|
+
>
|
|
788
|
+
{importing ? (
|
|
789
|
+
<IconLoader2 className="size-4 animate-spin" />
|
|
790
|
+
) : (
|
|
791
|
+
<IconDownload className="size-4" />
|
|
792
|
+
)}
|
|
793
|
+
{importing
|
|
794
|
+
? t("editorToolbar.importing")
|
|
795
|
+
: t("editorToolbar.importFile")}
|
|
796
|
+
</DropdownMenuItem>
|
|
797
|
+
<DropdownMenuItem onSelect={onShowHistory}>
|
|
798
|
+
<IconHistory className="size-4" />
|
|
799
|
+
{t("editorToolbar.savedVersions")}
|
|
800
|
+
</DropdownMenuItem>
|
|
801
|
+
<DropdownMenuSeparator />
|
|
802
|
+
<DropdownMenuItem
|
|
803
|
+
onSelect={() => setTheme(isDark ? "light" : "dark")}
|
|
804
|
+
>
|
|
805
|
+
{isDark ? (
|
|
806
|
+
<IconSun className="size-4" />
|
|
807
|
+
) : (
|
|
808
|
+
<IconMoon className="size-4" />
|
|
809
|
+
)}
|
|
810
|
+
{isDark
|
|
811
|
+
? t("editorToolbar.lightTheme")
|
|
812
|
+
: t("editorToolbar.darkTheme")}
|
|
813
|
+
</DropdownMenuItem>
|
|
814
|
+
</DropdownMenuContent>
|
|
815
|
+
</DropdownMenu>
|
|
816
|
+
</div>
|
|
817
|
+
|
|
403
818
|
{/* Framework share (ownership, per-user/org grants, visibility) */}
|
|
404
819
|
<div className="flex-shrink-0">
|
|
405
820
|
<ShareButton
|
|
@@ -452,177 +867,10 @@ export default function EditorToolbar({
|
|
|
452
867
|
className="hidden"
|
|
453
868
|
/>
|
|
454
869
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
<
|
|
458
|
-
|
|
459
|
-
<DropdownMenuTrigger asChild>
|
|
460
|
-
<button
|
|
461
|
-
ref={historyButtonRef}
|
|
462
|
-
className={`${TOOLBAR_ICON_BUTTON_CLASS} cursor-pointer text-muted-foreground hover:bg-accent hover:text-foreground/70`}
|
|
463
|
-
aria-label={t("editorToolbar.more")}
|
|
464
|
-
>
|
|
465
|
-
<IconDotsVertical className="size-4" />
|
|
466
|
-
</button>
|
|
467
|
-
</DropdownMenuTrigger>
|
|
468
|
-
</TooltipTrigger>
|
|
469
|
-
<TooltipContent>{t("editorToolbar.more")}</TooltipContent>
|
|
470
|
-
</Tooltip>
|
|
471
|
-
<DropdownMenuContent
|
|
472
|
-
align="end"
|
|
473
|
-
className="max-h-[min(80vh,32rem)] w-64 overflow-y-auto"
|
|
474
|
-
>
|
|
475
|
-
{canEdit && (
|
|
476
|
-
<>
|
|
477
|
-
<DropdownMenuLabel>{t("editorToolbar.media")}</DropdownMenuLabel>
|
|
478
|
-
<DropdownMenuGroup>
|
|
479
|
-
<DropdownMenuItem onSelect={onGenerateImage}>
|
|
480
|
-
<IconPhoto className="size-4" />
|
|
481
|
-
{t("editorToolbar.generateImage")}
|
|
482
|
-
</DropdownMenuItem>
|
|
483
|
-
<DropdownMenuItem onSelect={onOpenAssetLibrary}>
|
|
484
|
-
<IconFolderOpen className="size-4" />
|
|
485
|
-
{t("editorToolbar.assetLibrary")}
|
|
486
|
-
</DropdownMenuItem>
|
|
487
|
-
</DropdownMenuGroup>
|
|
488
|
-
</>
|
|
489
|
-
)}
|
|
490
|
-
|
|
491
|
-
{canEdit &&
|
|
492
|
-
(onToggleAnimations ||
|
|
493
|
-
onToggleTweaks ||
|
|
494
|
-
onToggleDrawMode ||
|
|
495
|
-
onTogglePinMode) && (
|
|
496
|
-
<>
|
|
497
|
-
<DropdownMenuSeparator />
|
|
498
|
-
<DropdownMenuLabel>
|
|
499
|
-
{t("editorToolbar.slideTools")}
|
|
500
|
-
</DropdownMenuLabel>
|
|
501
|
-
<DropdownMenuGroup>
|
|
502
|
-
{currentSlide && onToggleAnimations && (
|
|
503
|
-
<DropdownMenuItem
|
|
504
|
-
onSelect={onToggleAnimations}
|
|
505
|
-
className={
|
|
506
|
-
animationsOpen
|
|
507
|
-
? "bg-accent text-accent-foreground"
|
|
508
|
-
: undefined
|
|
509
|
-
}
|
|
510
|
-
>
|
|
511
|
-
<IconBolt className="size-4" />
|
|
512
|
-
{t("editorToolbar.elementAnimations")}
|
|
513
|
-
</DropdownMenuItem>
|
|
514
|
-
)}
|
|
515
|
-
{onToggleTweaks && (
|
|
516
|
-
<DropdownMenuItem
|
|
517
|
-
onSelect={onToggleTweaks}
|
|
518
|
-
className={
|
|
519
|
-
tweaksOpen
|
|
520
|
-
? "bg-accent text-accent-foreground"
|
|
521
|
-
: undefined
|
|
522
|
-
}
|
|
523
|
-
>
|
|
524
|
-
<IconAdjustments className="size-4" />
|
|
525
|
-
{t("editorToolbar.tweaks")}
|
|
526
|
-
</DropdownMenuItem>
|
|
527
|
-
)}
|
|
528
|
-
{onToggleDrawMode && (
|
|
529
|
-
<DropdownMenuItem
|
|
530
|
-
onSelect={onToggleDrawMode}
|
|
531
|
-
data-toolbar-draw-button
|
|
532
|
-
className={
|
|
533
|
-
drawMode
|
|
534
|
-
? "bg-accent text-accent-foreground"
|
|
535
|
-
: undefined
|
|
536
|
-
}
|
|
537
|
-
>
|
|
538
|
-
<IconPencilPlus className="size-4" />
|
|
539
|
-
{t("editorToolbar.drawOnSlide")}
|
|
540
|
-
</DropdownMenuItem>
|
|
541
|
-
)}
|
|
542
|
-
{onTogglePinMode && (
|
|
543
|
-
<DropdownMenuItem
|
|
544
|
-
onSelect={onTogglePinMode}
|
|
545
|
-
data-toolbar-pin-button
|
|
546
|
-
className={
|
|
547
|
-
pinMode ? "bg-accent text-accent-foreground" : undefined
|
|
548
|
-
}
|
|
549
|
-
>
|
|
550
|
-
<IconPin className="size-4" />
|
|
551
|
-
{t("editorToolbar.pinComments")}
|
|
552
|
-
</DropdownMenuItem>
|
|
553
|
-
)}
|
|
554
|
-
</DropdownMenuGroup>
|
|
555
|
-
</>
|
|
556
|
-
)}
|
|
557
|
-
|
|
558
|
-
{onToggleComments && (
|
|
559
|
-
<>
|
|
560
|
-
<DropdownMenuSeparator />
|
|
561
|
-
<DropdownMenuLabel>
|
|
562
|
-
{t("editorToolbar.comments")}
|
|
563
|
-
</DropdownMenuLabel>
|
|
564
|
-
<DropdownMenuItem
|
|
565
|
-
onSelect={onToggleComments}
|
|
566
|
-
className={
|
|
567
|
-
commentsOpen ? "bg-accent text-accent-foreground" : undefined
|
|
568
|
-
}
|
|
569
|
-
>
|
|
570
|
-
<IconMessage className="size-4" />
|
|
571
|
-
{t("editorToolbar.comments")}
|
|
572
|
-
{unresolvedCommentCount > 0 && (
|
|
573
|
-
<span className="ml-auto rounded-full bg-primary px-1.5 text-[10px] font-semibold text-primary-foreground">
|
|
574
|
-
{unresolvedCommentCount > 9 ? "9+" : unresolvedCommentCount}
|
|
575
|
-
</span>
|
|
576
|
-
)}
|
|
577
|
-
</DropdownMenuItem>
|
|
578
|
-
</>
|
|
579
|
-
)}
|
|
580
|
-
|
|
581
|
-
<DropdownMenuSeparator />
|
|
582
|
-
<ExportMenu
|
|
583
|
-
inline
|
|
584
|
-
deckId={deckId}
|
|
585
|
-
deckTitle={deckTitle}
|
|
586
|
-
onDuplicate={onDuplicateDeck ?? (() => {})}
|
|
587
|
-
onExportPdf={onExportPdf ?? (() => {})}
|
|
588
|
-
onExportPptx={onExportPptx ?? (() => {})}
|
|
589
|
-
onExportGoogleSlides={onExportGoogleSlides}
|
|
590
|
-
/>
|
|
591
|
-
<DropdownMenuSeparator />
|
|
592
|
-
<DropdownMenuItem
|
|
593
|
-
disabled={importing}
|
|
594
|
-
onSelect={() => fileInputRef.current?.click()}
|
|
595
|
-
>
|
|
596
|
-
{importing ? (
|
|
597
|
-
<IconLoader2 className="size-4 animate-spin" />
|
|
598
|
-
) : (
|
|
599
|
-
<IconDownload className="size-4" />
|
|
600
|
-
)}
|
|
601
|
-
{importing
|
|
602
|
-
? t("editorToolbar.importing")
|
|
603
|
-
: t("editorToolbar.importFile")}
|
|
604
|
-
</DropdownMenuItem>
|
|
605
|
-
<DropdownMenuItem onSelect={onShowHistory}>
|
|
606
|
-
<IconHistory className="size-4" />
|
|
607
|
-
{t("editorToolbar.savedVersions")}
|
|
608
|
-
</DropdownMenuItem>
|
|
609
|
-
<DropdownMenuSeparator />
|
|
610
|
-
<DropdownMenuItem
|
|
611
|
-
onSelect={() => setTheme(isDark ? "light" : "dark")}
|
|
612
|
-
>
|
|
613
|
-
{isDark ? (
|
|
614
|
-
<IconSun className="size-4" />
|
|
615
|
-
) : (
|
|
616
|
-
<IconMoon className="size-4" />
|
|
617
|
-
)}
|
|
618
|
-
{isDark
|
|
619
|
-
? t("editorToolbar.lightTheme")
|
|
620
|
-
: t("editorToolbar.darkTheme")}
|
|
621
|
-
</DropdownMenuItem>
|
|
622
|
-
</DropdownMenuContent>
|
|
623
|
-
</DropdownMenu>
|
|
624
|
-
<RunsTray pollMs={0} />
|
|
625
|
-
<AgentToggleButton />
|
|
870
|
+
<div className="flex items-center gap-1">
|
|
871
|
+
<RunsTray pollMs={0} />
|
|
872
|
+
<AgentToggleButton />
|
|
873
|
+
</div>
|
|
626
874
|
</div>
|
|
627
875
|
);
|
|
628
876
|
}
|